/* mokimioki — soft void studio
   void #160d24 · surface #1f1433 · paper #f4ecff
   foil #c84bff · rose #ff7ad9 · mist #9b87b0 */

:root {
  --void: #160d24;
  --surface: #1f1433;
  --surface-2: #271a3d;
  --paper: #f4ecff;
  --ink: #1a1028;
  --mist: #9b87b0;
  --mist-2: #c4b0d8;
  --foil: #c84bff;
  --rose: #ff7ad9;
  --line: rgba(244, 236, 255, 0.1);
  --line-2: rgba(244, 236, 255, 0.18);
  --glow: 0 12px 40px rgba(200, 75, 255, 0.15);
  --soft: 0 20px 50px rgba(0, 0, 0, 0.28);
  --display: "Syne", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.45s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--body);
  color: var(--paper);
  background: var(--void);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, select, input { font: inherit; color: inherit; }
a { color: var(--rose); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--paper); }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ── Ambient breath ── */
.wash {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
  background: var(--void);
}
.wash::before,
.wash::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform, opacity;
}
.wash::before {
  width: min(55vw, 520px); height: min(55vw, 520px);
  top: -12%; left: -8%;
  background: rgba(200, 75, 255, 0.28);
  animation: breathA 14s var(--ease) infinite alternate;
}
.wash::after {
  width: min(48vw, 440px); height: min(48vw, 440px);
  bottom: -10%; right: -12%;
  background: rgba(255, 122, 217, 0.18);
  animation: breathB 18s var(--ease) infinite alternate;
}
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes breathA {
  from { transform: translate(0, 0) scale(1); opacity: 0.7; }
  to { transform: translate(40px, 30px) scale(1.15); opacity: 1; }
}
@keyframes breathB {
  from { transform: translate(0, 0) scale(1); opacity: 0.6; }
  to { transform: translate(-35px, -25px) scale(1.2); opacity: 0.95; }
}
@keyframes floatY {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes softIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 217, 0.45); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ── Frame ── */
.frame {
  position: relative; z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* ── Header ── */
.mast {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  animation: fadeUp 0.7s var(--ease) both;
}

.brand { min-width: 0; }
.brand-mark { display: none !important; }
.eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  font-weight: 600;
  margin-bottom: 2px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1;
  background: linear-gradient(120deg, #fff 0%, var(--paper) 40%, var(--rose) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 10s linear infinite;
}

.rail {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.rail-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--mist);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.rail-btn:hover { color: var(--paper); }
.rail-btn:focus-visible { outline: 2px solid var(--foil); outline-offset: 2px; }
.rail-btn.active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(244, 236, 255, 0.2);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--mist-2);
  font-size: 0.78rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mist); flex-shrink: 0;
  transition: background 0.3s;
}
.live-dot.on {
  background: var(--rose);
  animation: pulse 1.6s infinite;
}

/* ── Stages ── */
.stage { display: none; }
.stage.active {
  display: block;
  animation: softIn 0.5s var(--ease) both;
}
.stage.active .reveal {
  animation: fadeUp 0.65s var(--ease) both;
}
.stage.active .reveal:nth-child(1) { animation-delay: 0.04s; }
.stage.active .reveal:nth-child(2) { animation-delay: 0.1s; }
.stage.active .reveal:nth-child(3) { animation-delay: 0.16s; }
.stage.active .reveal:nth-child(4) { animation-delay: 0.22s; }
.stage.active .reveal:nth-child(5) { animation-delay: 0.28s; }
.stage.active .reveal:nth-child(6) { animation-delay: 0.34s; }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 32px 40px;
  align-items: start;
  margin-bottom: 44px;
}

.photocard {
  position: relative;
  border-radius: 24px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(244, 236, 255, 0.14), rgba(244, 236, 255, 0.04));
  border: 1px solid var(--line-2);
  box-shadow: var(--soft), var(--glow);
  animation: floatY 5s ease-in-out infinite alternate;
}
.holo {
  position: absolute; inset: 0;
  border-radius: 24px;
  pointer-events: none;
  opacity: 0.25;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(200, 75, 255, 0.35) 45%,
    rgba(255, 122, 217, 0.3) 55%,
    transparent 70%
  );
  background-size: 220% 220%;
  animation: shimmer 8s linear infinite;
  mix-blend-mode: screen;
}
.photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  background: var(--surface-2);
}
.photo-cap { padding: 14px 8px 6px; text-align: center; }
.photo-tag {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  font-weight: 600;
}
.photo-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
  color: var(--paper);
}
.photo-line {
  font-size: 0.84rem;
  color: var(--mist-2);
  font-weight: 400;
}

.hero-side { min-width: 0; }
.lede {
  font-size: 1.2rem;
  font-weight: 500;
  max-width: 26ch;
  margin-bottom: 24px;
  color: rgba(244, 236, 255, 0.88);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Stats pins — unified soft cards */
.pins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.pins-sm {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-bottom: 24px;
}
.pin {
  border-radius: var(--r-sm);
  padding: 16px 14px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s, box-shadow 0.35s;
}
.pin:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--glow);
}
.pin-n {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: -0.03em;
  color: var(--paper);
  line-height: 1.1;
}
.pin-l {
  display: block;
  margin-top: 5px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  font-weight: 600;
}

/* Panels */
.panel {
  border-radius: var(--r);
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  box-shadow: var(--soft);
  backdrop-filter: blur(16px);
  color: var(--paper);
  min-width: 0;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.35s var(--ease);
}
.panel:hover {
  border-color: var(--line-2);
  box-shadow: var(--soft), 0 0 0 1px rgba(200, 75, 255, 0.06);
}
.panel-wide { margin-top: 14px; }
.panel-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-h h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.strip { margin: 36px 0; }
.strip-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.strip-h h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.text-btn {
  appearance: none; border: none; background: none;
  color: var(--rose); font-weight: 700; font-size: 0.88rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.25s var(--ease);
}
.text-btn:hover { color: var(--paper); transform: translateX(3px); }

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0;
}

/* Stream cards */
.polaroids {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.vod-card {
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease);
}
.vod-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);
  box-shadow: var(--glow), var(--soft);
}
.vod-card img,
.vod-card .ph {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-2);
  transition: transform 0.5s var(--ease);
}
.vod-card:hover img { transform: scale(1.04); }
.vod-card .body { padding: 12px 14px 14px; }
.vod-card .date {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  font-weight: 600;
}
.vod-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  margin: 6px 0 8px;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vod-card .meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 0.74rem; color: var(--mist-2); font-weight: 500;
}
.live-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Clips */
.clips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.clip {
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.clip:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--glow);
}
.clip img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--surface-2);
  transition: transform 0.5s var(--ease);
}
.clip:hover img { transform: scale(1.05); }
.clip .body { padding: 10px 12px 12px; }
.clip h3 {
  font-size: 0.84rem; font-weight: 700; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clip .meta { font-size: 0.72rem; color: var(--mist); display: flex; gap: 8px; }

/* Emotes */
.sticker-sheet {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 220px; overflow: auto;
}
.emote {
  width: 64px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.emote:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: var(--line-2);
  background: rgba(200, 75, 255, 0.1);
}
.emote img { width: 30px; height: 30px; object-fit: contain; }
.emote span {
  font-size: 0.58rem; color: var(--mist);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Lists */
.soft {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 260px; overflow: auto;
  font-size: 0.88rem;
}
.soft .row,
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.soft .row:hover,
.cat-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-2);
  transform: translateX(2px);
}
.soft .n, .cat-item span {
  font-size: 0.75rem;
  color: var(--mist);
  font-weight: 600;
  flex-shrink: 0;
}
.cat-item { justify-content: flex-start; gap: 12px; }
.cat-swatch {
  width: 3px; height: 28px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--rose), var(--foil));
}
.cat-item strong { display: block; font-size: 0.9rem; color: var(--paper); }

/* Charts */
.chart {
  position: relative;
  height: 200px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  padding: 10px;
}
.chart.tall { height: 320px; }
.chart canvas { width: 100% !important; height: 100% !important; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field, .btn {
  appearance: none;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.field { min-width: 180px; max-width: 100%; outline: none; border-radius: 12px; }
.field:focus {
  border-color: var(--foil);
  box-shadow: 0 0 0 3px rgba(200, 75, 255, 0.15);
}
.btn.quiet:hover { background: rgba(255, 255, 255, 0.08); }
.btn.solid {
  background: linear-gradient(135deg, var(--foil), var(--rose));
  border: none;
  color: #fff;
  box-shadow: 0 6px 20px rgba(200, 75, 255, 0.3);
}
.btn.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(200, 75, 255, 0.4);
}
.btn:focus-visible, .text-btn:focus-visible {
  outline: 2px solid var(--foil);
  outline-offset: 2px;
}

/* Chat */
.chat-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.cloud-panel { grid-row: span 2; }
.cloud {
  height: 340px;
  border-radius: var(--r-sm);
  background:
    radial-gradient(ellipse at center, rgba(200, 75, 255, 0.12), transparent 65%),
    rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cloud canvas { width: 100% !important; height: 100% !important; display: block; }
.word-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
  max-height: 56px; overflow: auto;
}
.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--mist-2);
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.chip:hover {
  transform: scale(1.05);
  background: rgba(200, 75, 255, 0.12);
}
.chip b { color: var(--rose); margin-left: 4px; }
.word-fallback {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 16px;
  min-height: 200px; align-content: flex-start;
}
.word-fallback .wf {
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-weight: 600; color: var(--mist-2);
}
.word-fallback .wf b { color: var(--rose); margin-left: 4px; }

.roster {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 360px; overflow: auto;
}
.person {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.person:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  transform: translateX(3px);
}
.person img {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(200, 75, 255, 0.5);
  background: var(--surface-2);
  transition: transform 0.3s var(--ease);
}
.person:hover img { transform: scale(1.08); }
.person .rank {
  width: 22px; font-size: 0.72rem; color: var(--mist); font-weight: 700;
}
.person .name {
  flex: 1; font-weight: 700; font-size: 0.88rem;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person .cnt {
  font-size: 0.75rem; font-weight: 700;
  color: var(--rose);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 122, 217, 0.1);
}

.replies {
  display: flex; flex-direction: column; gap: 5px;
  max-height: 280px; overflow: auto; font-size: 0.84rem;
}
.link-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: background 0.25s, opacity 0.25s;
}
.link-row .arrow { color: var(--rose); font-weight: 800; }
.link-row .w { margin-left: auto; font-size: 0.72rem; color: var(--mist); font-weight: 700; }
.link-row.lit {
  background: rgba(255, 122, 217, 0.1);
  border-color: rgba(255, 122, 217, 0.3);
}
.link-row.dim { opacity: 0.28; }

/* RU VTuber ranking */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rank-row {
  display: grid;
  grid-template-columns: 48px 44px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.rank-row:hover {
  transform: translateX(3px);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.06);
}
.rank-row.moki {
  background: linear-gradient(105deg, rgba(200, 75, 255, 0.2), rgba(255, 122, 217, 0.1));
  border-color: rgba(200, 75, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(200, 75, 255, 0.15), var(--glow);
  animation: mokiPulse 3.5s ease-in-out infinite;
}
@keyframes mokiPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(200, 75, 255, 0.15), 0 8px 28px rgba(200, 75, 255, 0.12); }
  50% { box-shadow: 0 0 0 1px rgba(255, 122, 217, 0.35), 0 10px 36px rgba(255, 122, 217, 0.2); }
}
.rank-row .pos {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--mist-2);
  letter-spacing: -0.03em;
}
.rank-row.moki .pos { color: var(--rose); }
.rank-row img {
  width: 40px; height: 40px; border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(200, 75, 255, 0.35);
  background: var(--surface-2);
}
.rank-row.moki img {
  border-color: var(--rose);
  box-shadow: 0 0 12px rgba(255, 122, 217, 0.35);
}
.rank-row .who { min-width: 0; }
.rank-row .who strong {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-row .who span {
  font-size: 0.72rem;
  color: var(--mist);
}
.rank-row .fol {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--paper);
  white-space: nowrap;
}
.rank-row .live {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.rank-row .live.on {
  background: rgba(255, 122, 217, 0.18);
  color: var(--rose);
}
.rank-row .live.off {
  background: rgba(255, 255, 255, 0.04);
  color: var(--mist);
}

/* Per-stream word clouds */
.word-duo { margin-top: 14px; }
.mini-stat {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--rose);
  letter-spacing: -0.02em;
}
.mini-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  min-height: 120px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.mini-cloud .mw {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--paper);
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.mini-cloud .mw:hover {
  transform: scale(1.06);
  background: rgba(200, 75, 255, 0.15);
}
.mini-cloud .mw b {
  color: var(--rose);
  margin-left: 5px;
  font-weight: 800;
}
.word-rank {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}
.word-rank .wr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 0.86rem;
}
.word-rank .wr .i {
  width: 22px;
  color: var(--mist);
  font-weight: 700;
  font-size: 0.75rem;
}
.word-rank .wr .w {
  flex: 1;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.word-rank .wr .c {
  color: var(--rose);
  font-weight: 800;
  font-size: 0.8rem;
}

.emote-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  max-height: 300px; overflow: auto;
}
.et {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.et:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--line-2);
  background: rgba(200, 75, 255, 0.08);
}
.et-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: auto;
}
.et-fallback {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mist-2);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.et .meta { width: 100%; min-width: 0; }
.et .bar {
  height: 3px; margin: 0 0 4px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.et .bar i {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--foil), var(--rose));
  transition: width 0.6s var(--ease);
}
.et .c {
  font-size: 0.72rem;
  color: var(--mist-2);
  font-weight: 700;
  text-align: center;
}

/* Peek / race */
.peek {
  position: absolute; z-index: 5; bottom: 12px; left: 12px;
  display: flex; gap: 10px; max-width: min(380px, 92%);
  padding: 8px;
  border-radius: 14px;
  background: rgba(22, 13, 36, 0.92);
  border: 1px solid var(--line-2);
  box-shadow: var(--soft);
  pointer-events: none;
  backdrop-filter: blur(12px);
  animation: fadeUp 0.25s var(--ease);
}
.vod-frame {
  width: 140px; height: 80px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2) center/cover no-repeat;
  border: 1px solid var(--line);
}
.peek-copy {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 0.78rem; min-width: 0;
}
.peek-copy strong {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.peek-copy a { color: var(--rose); pointer-events: auto; margin-top: auto; font-weight: 700; }

.race-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.race-lane-label {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  animation: fadeUp 0.4s var(--ease) both;
}
.race-lane-label img {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(200, 75, 255, 0.55);
}
.race-lane-label .rank { width: 26px; color: var(--mist); font-weight: 700; font-size: 0.75rem; }
.race-lane-label .count { margin-left: auto; color: var(--rose); font-weight: 700; font-size: 0.75rem; }
.race-on-chart {
  position: absolute; left: 0;
  display: flex; align-items: center; gap: 6px;
  transform: translateY(-50%);
  transition: left 0.07s linear;
  white-space: nowrap;
}
.race-on-chart img {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--rose); background: var(--surface-2);
}
.race-on-chart span {
  font-size: 0.68rem; font-weight: 700;
  background: rgba(22, 13, 36, 0.88); padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.race-on-chart.winner img {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}
.race-win {
  margin-top: 12px; padding: 14px; text-align: center;
  font-family: var(--display); font-weight: 800;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(200, 75, 255, 0.15), rgba(255, 122, 217, 0.1));
  border: 1px solid var(--line-2);
  animation: softIn 0.45s var(--ease);
}

.detail { font-size: 0.9rem; }
.detail img {
  width: 100%; margin-bottom: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.detail dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
}
.detail dt { color: var(--mist); font-weight: 600; }
.detail dd { font-weight: 700; word-break: break-word; }

.palette { display: flex; flex-wrap: wrap; gap: 10px; }
.sw {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 0.62rem; color: var(--mist); font-weight: 600;
  transition: transform 0.3s var(--ease);
}
.sw:hover { transform: scale(1.1); }
.sw i {
  width: 30px; height: 30px; display: block;
  border-radius: 10px;
  border: 1px solid var(--line-2);
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills .pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.78rem; font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.pills .pill:hover {
  transform: translateY(-2px);
  background: rgba(200, 75, 255, 0.12);
}
.pills .pill em {
  font-style: normal; color: var(--rose); margin-left: 5px; font-weight: 800;
}

/* Pulse */
.pulse-duo { align-items: stretch; }
#radarCanvas {
  width: 100%; height: auto; max-height: 380px;
  display: block;
  border-radius: var(--r-sm);
  background:
    radial-gradient(circle at center, rgba(200, 75, 255, 0.12), transparent 60%),
    rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
}
.count-badge {
  min-width: 28px; padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--foil), var(--rose));
  color: #fff;
  font-weight: 800; font-size: 0.85rem;
}
.feed {
  height: 360px; overflow: auto;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.86rem;
}
.chat-line {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  word-break: break-word;
  animation: fadeUp 0.35s var(--ease) both;
}
.chat-line .u { color: var(--rose); font-weight: 800; margin-right: 6px; }
.chat-line .t {
  float: right; font-size: 0.65rem; color: var(--mist); font-weight: 600;
}

.empty {
  color: var(--mist);
  font-size: 0.9rem;
  padding: 28px 12px;
  text-align: center;
  font-weight: 500;
}
.loading-placeholder { color: var(--mist); text-align: center; padding: 20px; }

.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 40;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--soft);
  color: var(--paper);
  font-size: 0.88rem;
  max-width: 90vw;
  animation: fadeUp 0.3s var(--ease);
}

/* ── Custom scroll (fits void studio) ── */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 75, 255, 0.45) transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 75, 255, 0.4) rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  margin: 4px 0;
}
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  background-image: linear-gradient(
    180deg,
    rgba(200, 75, 255, 0.55),
    rgba(255, 122, 217, 0.5)
  );
  box-shadow: 0 0 12px rgba(200, 75, 255, 0.15);
  transition: background 0.25s var(--ease);
}
::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(
    180deg,
    rgba(200, 75, 255, 0.85),
    rgba(255, 122, 217, 0.8)
  );
  box-shadow: 0 0 16px rgba(255, 122, 217, 0.25);
}
::-webkit-scrollbar-thumb:active {
  background-image: linear-gradient(
    180deg,
    #c84bff,
    #ff7ad9
  );
}

/* Nested panels — slightly thinner, same language */
.soft::-webkit-scrollbar,
.roster::-webkit-scrollbar,
.replies::-webkit-scrollbar,
.emote-rows::-webkit-scrollbar,
.sticker-sheet::-webkit-scrollbar,
.feed::-webkit-scrollbar,
.word-chips::-webkit-scrollbar,
.polaroids::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.soft::-webkit-scrollbar-track,
.roster::-webkit-scrollbar-track,
.replies::-webkit-scrollbar-track,
.emote-rows::-webkit-scrollbar-track,
.sticker-sheet::-webkit-scrollbar-track,
.feed::-webkit-scrollbar-track,
.word-chips::-webkit-scrollbar-track {
  background: transparent;
  margin: 2px 0;
}

/* Fade mask hint: scrollable areas gently fade at edges */
.soft,
.roster,
.replies,
.emote-rows,
.sticker-sheet,
.feed {
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 10px,
    #000 calc(100% - 12px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 8px,
    #000 calc(100% - 10px),
    transparent 100%
  );
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wash::before, .wash::after,
  .wordmark, .holo, .photocard, .live-dot.on { animation: none !important; }
  .stage.active, .stage.active .reveal,
  .chat-line, .race-lane-label, .race-win, .peek, .toast { animation: none !important; }
  .vod-card, .clip, .pin, .person, .emote, .et, .panel { transition: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .photocard { max-width: 280px; margin: 0 auto; }
  .chat-layout { grid-template-columns: 1fr 1fr; }
  .cloud-panel { grid-column: 1 / -1; grid-row: auto; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .rail { margin-left: 0; width: 100%; order: 3; justify-content: center; }
  .live-pill { margin-left: auto; }
}

@media (max-width: 640px) {
  .frame { padding: 20px 14px 56px; }
  .pins { grid-template-columns: 1fr 1fr; }
  .duo, .chat-layout, .grid-3, .pulse-duo { grid-template-columns: 1fr; }
  .cloud { height: 260px; }
  .chart.tall { height: 240px; }
  .field { width: 100%; min-width: 0; }
  .emote-rows { grid-template-columns: 1fr; }
  .rail-btn { padding: 9px 14px; font-size: 0.82rem; }
}
