:root {
  --bg: #0a0e13;
  --bg-2: #0f151c;
  --surface: #141c25;
  --surface-2: #1c2632;
  --surface-3: #253141;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef3f7;
  --text-2: #c3ccd6;
  --muted: #8593a3;
  --mint: #3fe0b5;
  --mint-2: #8af0d2;
  --mint-ink: #04241b;
  --sky: #7fa8ff;
  --ok: #3fe0b5;
  --warn: #ffc56b;
  --danger: #ff7a7a;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --glow: 0 10px 30px -10px rgba(63, 224, 181, .55);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(127, 168, 255, .10), transparent 60%),
    radial-gradient(700px 500px at -10% 10%, rgba(63, 224, 181, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 14px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line-2);
  transition: transform .12s, background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--mint-2), var(--mint)); color: var(--mint-ink);
  border-color: transparent; box-shadow: var(--glow);
}
.btn-primary:hover { background: linear-gradient(135deg, #a3f5dd, var(--mint)); box-shadow: 0 14px 34px -10px rgba(63, 224, 181, .7); }
.btn-ghost { background: rgba(255, 255, 255, .04); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 11px; box-shadow: none; }

.coin {
  display: inline-block; width: .9em; height: .9em; border-radius: 50%; vertical-align: -.1em;
  background: radial-gradient(circle at 32% 30%, #d9fff3, var(--mint) 55%, #17a882);
  box-shadow: inset 0 0 0 1.5px rgba(4, 36, 27, .35);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 24px; padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(10, 14, 19, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 22px; letter-spacing: -.04em; line-height: 1; }
.logo i {
  display: inline-block; width: .38em; height: .38em; margin-left: 2px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mint-2), var(--sky)); box-shadow: 0 0 12px rgba(63, 224, 181, .7);
}
.topbar .spacer { flex: 1; }
.nav-link {
  position: relative; color: var(--muted); font-weight: 600; font-size: 14px; padding: 6px 0;
  transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
}
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 9px;
  border-radius: 999px; background: rgba(63, 224, 181, .1); border: 1px solid rgba(63, 224, 181, .3);
  color: var(--mint-2); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
}

.page { max-width: 1160px; margin: 0 auto; padding: 0 24px 64px; }
.nav-main { display: flex; gap: 22px; align-items: center; }
.nav-ic { display: none; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; padding: 16px; gap: 16px; }
.login-art {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background:
    radial-gradient(500px 360px at 20% 15%, rgba(63, 224, 181, .35), transparent 65%),
    radial-gradient(520px 420px at 90% 85%, rgba(127, 168, 255, .35), transparent 65%),
    linear-gradient(160deg, #11202a, #0d1420);
  border: 1px solid var(--line);
}
.login-art .logo { font-size: 28px; }
.login-art h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1; letter-spacing: -.045em; max-width: 10ch; }
.login-art h1 em {
  font-style: normal; background: linear-gradient(90deg, var(--mint-2), var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-art .strip { display: flex; gap: 12px; align-items: flex-end; }
.login-art .strip span {
  flex: 1; max-width: 92px; aspect-ratio: 9 / 16; border-radius: 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.login-art .strip span:nth-child(2) { transform: translateY(-18px); background: linear-gradient(160deg, rgba(63, 224, 181, .55), rgba(63, 224, 181, .1)); }
.login-art .strip span:nth-child(3) { transform: translateY(-6px); background: linear-gradient(160deg, rgba(127, 168, 255, .5), rgba(127, 168, 255, .08)); }
.login-art small { color: var(--text-2); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.login-form { display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 32px; margin: 0 0 6px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; }
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.tabs button { padding: 9px; border-radius: 10px; font-weight: 700; color: var(--muted); transition: background .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.portals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.portal {
  padding: 14px 16px; border-radius: var(--r); text-align: left;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s;
}
.portal:hover { border-color: var(--line-2); }
.portal .eyebrow { display: none; }
.portal strong { display: block; font-size: 17px; }
.portal small { color: var(--muted); font-size: 13px; }
.portal.selected {
  border-color: rgba(63, 224, 181, .6);
  background: linear-gradient(160deg, rgba(63, 224, 181, .14), rgba(63, 224, 181, .03));
}
.link { color: var(--mint-2); font-weight: 700; padding: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.field { display: block; margin-bottom: 14px; }
.field > span, .field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238593a3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 4px rgba(63, 224, 181, .15); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted);
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--text); }
.pw-toggle .slash { display: none; }
.pw-toggle[aria-pressed="true"] .slash { display: inline; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 18px; text-align: center; }
.login-card .btn-primary { width: 100%; padding: 14px; }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; padding: 10px; gap: 0; }
  .login-art { padding: 24px 22px; gap: 18px; }
  .login-art h1 { font-size: clamp(36px, 10vw, 54px); }
  .login-art .strip { display: none; }
  .login-form { padding: 26px 8px 40px; place-items: start center; }
}

/* ---------- home ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center;
  margin: 24px 0 40px; padding: 40px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: var(--hero-bg, none) center / cover; filter: blur(70px) saturate(1.5); opacity: .5;
}
.hero .text { min-width: 0; }
.hero .eyebrow { color: var(--mint-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 6.5vw, 76px); line-height: 1; letter-spacing: -.045em; margin: 0 0 14px; }
.hero p { margin: 0 0 26px; max-width: 46ch; font-size: 18px; color: var(--text-2); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .poster {
  position: relative; width: 200px; aspect-ratio: 9 / 16; border-radius: 20px;
  background-size: cover; background-position: center;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .1);
  transform: rotate(2.5deg);
}
.hero .poster .eps {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(10, 14, 19, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 700;
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding: 24px 20px; gap: 22px; margin-top: 16px; }
  .hero .poster { width: 120px; order: -1; border-radius: 14px; }
}

.rail { margin-bottom: 40px; }
.rail-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.rail-head .eyebrow { display: none; }
.rail-head h2 { font-size: 22px; }
.rail-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 156px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 4px 12px; margin: -4px; scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.rail-row.ranked { grid-auto-columns: 204px; }
.card { scroll-snap-align: start; display: block; }
.card .thumb {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden;
  background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px var(--line), var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover .thumb { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(63, 224, 181, .5), 0 22px 40px -16px rgba(0, 0, 0, .9); }
.card .badge {
  position: absolute; right: 8px; top: 8px; padding: 3px 9px; border-radius: 999px;
  background: rgba(10, 14, 19, .65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 700;
}
.card .resume {
  position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 10px;
  background: rgba(63, 224, 181, .9); color: var(--mint-ink); font-size: 12px; font-weight: 800;
}
.card h3 { font-size: 15px; margin-top: 10px; letter-spacing: -.01em; }
.card small { color: var(--muted); font-size: 13px; }
.ranked .card { display: grid; grid-template-columns: 48px 1fr; align-items: end; }
.ranked .card .rank {
  font-size: 96px; font-weight: 800; line-height: .8; letter-spacing: -.06em; color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, .28); margin-right: -10px; padding-bottom: 50px;
}
.ranked .card:hover .rank { -webkit-text-stroke-color: var(--mint); }
.ranked .card .meta { min-width: 0; }

/* ---------- feed ---------- */
.feed-wrap { position: fixed; inset: 0; background: #000; }
.feed {
  height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; overscroll-behavior: contain;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden;
}
.stage {
  position: relative; height: 100%; width: min(100%, calc(100dvh * 9 / 16));
  background-size: cover; background-position: center;
}
.stage video { width: 100%; height: 100%; object-fit: cover; display: block; background: transparent; }
.stage .tap { position: absolute; inset: 0; }
.paused-icon {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: rgba(10, 14, 19, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .2); display: none; place-items: center; pointer-events: none;
}
.paused-icon::after { content: ""; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; margin-left: 7px; }
.slide.paused .paused-icon { display: grid; }
.feed-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--text-2); }
.feed-empty h2 { color: var(--text); }

.feed-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(rgba(0, 0, 0, .5), transparent);
  transition: opacity .35s;
}
.feed-top .spacer { flex: 1; }
.icon-btn, .feed-top .pill {
  background: rgba(10, 14, 19, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .14);
}
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; }
.feed-top .pill { color: #fff; }

.info {
  position: absolute; left: 0; right: 74px; bottom: 0; padding: 18px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  transition: opacity .35s; pointer-events: none;
}
.info::before { content: ""; position: absolute; inset: -90px -74px 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); z-index: -1; }
.info .ep {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(63, 224, 181, .18); border: 1px solid rgba(63, 224, 181, .45); color: var(--mint-2);
  font-size: 12px; font-weight: 800;
}
.info h2 { font-size: 22px; }
.info p { margin: 5px 0 0; font-size: 14px; color: #e6ebef; }

.rail-actions {
  position: absolute; right: 10px; bottom: 96px; display: flex; flex-direction: column; gap: 16px;
  align-items: center; transition: opacity .35s;
}
.rail-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.rail-actions .ic {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 19px;
  background: rgba(10, 14, 19, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .14); text-shadow: none; transition: background .2s, transform .15s;
}
.rail-actions button:active .ic { transform: scale(.9); }
.rail-actions .on .ic { background: var(--mint); color: var(--mint-ink); border-color: transparent; box-shadow: var(--glow); }

.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .18); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--sky)); }

.feed-wrap.idle .feed-top,
.feed-wrap.idle .info,
.feed-wrap.idle .rail-actions { opacity: 0; pointer-events: none; }

/* paywall */
.info, .rail-actions { z-index: 2; }
.lock {
  position: absolute; inset: 0; z-index: 1; display: none; place-items: center; padding: 20px;
  background: rgba(8, 11, 15, .5); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.slide.locked .lock { display: grid; }
@media (max-width: 480px) { .lock { padding: 20px 72px 150px 14px; } }
.feed-wrap.idle .slide.locked .info,
.feed-wrap.idle .slide.locked .rail-actions { opacity: 1; }
.feed-wrap.idle .slide.locked .rail-actions { pointer-events: auto; }
.paywall {
  width: 100%; max-width: 320px; text-align: center; padding: 24px 20px; border-radius: var(--r-lg);
  background: rgba(20, 28, 37, .88); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
}
.paywall .eyebrow { color: var(--mint-2); font-size: 11px; }
.paywall h3 { font-size: 24px; margin: 10px 0 6px; }
.paywall p { color: var(--text-2); font-size: 14px; margin: 0 0 18px; }
.paywall .btn { width: 100%; }
.paywall .balance { margin-top: 14px; font-size: 13px; color: var(--muted); }
.paywall .balance a { color: var(--mint-2); font-weight: 700; }

/* episode sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.sheet {
  width: 100%; max-width: 520px; max-height: 70dvh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line-2); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px 18px 18px; padding-bottom: max(18px, env(safe-area-inset-bottom));
  animation: up .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--surface-3); margin: 0 auto 14px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet h3 { font-size: 20px; }
.sheet header small { color: var(--muted); font-size: 13px; }
.ep-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ep-cell {
  position: relative; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; font-weight: 800;
  transition: background .2s;
}
.ep-cell:hover { background: var(--surface-3); }
.ep-cell.current { background: linear-gradient(135deg, var(--mint-2), var(--mint)); color: var(--mint-ink); border-color: transparent; }
.ep-cell .tag { position: absolute; top: 4px; right: 6px; font-size: 10px; }
.ep-cell .free { position: absolute; bottom: 4px; font-size: 9px; color: var(--mint); font-weight: 800; }
.ep-cell.current .free { color: var(--mint-ink); }

/* ---------- wallet / studio ---------- */
.section-title { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -.035em; margin: 32px 0 22px; }
.sub-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 20px; margin: 0 0 14px; }
.sub-title small { font-size: 13px; font-weight: 600; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 36px; }
.stat {
  padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
}
.stat:first-child { background: linear-gradient(160deg, rgba(63, 224, 181, .14), rgba(127, 168, 255, .06)); border-color: rgba(63, 224, 181, .25); }
.stat small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { display: block; margin-top: 6px; font-size: 34px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 40px; }
.pack {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.pack:hover { border-color: rgba(63, 224, 181, .4); transform: translateY(-2px); }
.pack strong { font-size: 28px; letter-spacing: -.03em; }
.pack .bonus { color: var(--mint); font-size: 13px; font-weight: 700; min-height: 20px; }
.pack .btn { margin-top: 8px; }
.panel {
  margin-bottom: 36px; padding: 6px 18px 10px; overflow-x: auto; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
form.panel { padding: 22px 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
th, td { padding: 13px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.plus { color: var(--mint); font-weight: 700; }
.minus { color: var(--danger); font-weight: 700; }
.struck { text-decoration: line-through; opacity: .5; }
.mini-thumb {
  width: 32px; height: 56px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line);
  background-size: cover; background-position: center; display: inline-block; vertical-align: middle; margin-right: 12px;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.empty { color: var(--muted); padding: 14px 0; }

/* ---------- studio: series & uploads ---------- */
.back { display: inline-block; margin-top: 24px; }
.row-link { cursor: pointer; }
.row-link td { transition: background .15s; }
.row-link:hover td { background: rgba(255, 255, 255, .03); }
.row-link a { font-weight: 700; }
.muted-note { color: var(--muted); font-size: 13px; }
form .muted-note { margin-left: 14px; }
.muted { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.series-head { display: flex; gap: 26px; align-items: center; margin: 18px 0 30px; }
.series-head h1 { font-size: clamp(30px, 5vw, 50px); letter-spacing: -.04em; margin: 8px 0 8px; }
.series-head p { margin: 0 0 4px; color: var(--text-2); }
.series-head .genre { color: var(--mint-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.poster-sm {
  flex: none; width: 108px; aspect-ratio: 9 / 16; border-radius: 14px;
  background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--line-2), var(--shadow);
}
.badge-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.badge-status.ready { background: rgba(63, 224, 181, .14); color: var(--mint); }
.badge-status.processing, .badge-status.uploading { background: rgba(127, 168, 255, .14); color: var(--sky); }
.badge-status.failed { background: rgba(255, 122, 122, .14); color: var(--danger); }
.badge-status.draft { background: var(--surface-2); color: var(--muted); }
.status-cell { white-space: normal; min-width: 230px; }
.bar { height: 6px; margin-top: 8px; max-width: 260px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sky), var(--mint)); transition: width .3s; }
.error-inline { color: var(--danger); font-size: 12px; display: block; margin-top: 4px; }
.free-tag { color: var(--mint); font-weight: 800; font-size: 10px; letter-spacing: .06em; }
.add-ep { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 0 8px; }
table.episodes td { vertical-align: middle; }
table.episodes td:first-child { color: var(--muted); font-weight: 800; }
@media (max-width: 560px) {
  .series-head { align-items: flex-start; gap: 18px; }
  .poster-sm { width: 78px; border-radius: 10px; }
}

/* ---------- notifications ---------- */
.bell-wrap { position: relative; }
.bell {
  position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-2); transition: background .2s, color .2s;
}
.bell:hover, .bell[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.bell-dot {
  position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--mint); color: var(--mint-ink); font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.notif-panel {
  position: absolute; right: -60px; top: calc(100% + 10px); z-index: 30; width: min(360px, calc(100vw - 24px));
  max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: var(--r);
  background: rgba(20, 28, 37, .97); border: 1px solid var(--line-2); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9);
  animation: up .18s ease-out;
}
.notif-panel header { padding: 8px 10px 10px; font-weight: 800; }
.notif-panel .empty { padding: 4px 10px 12px; font-size: 14px; }
.notif { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.notif:hover { background: var(--surface-2); }
.notif .mini-thumb { flex: none; margin: 0; }
.notif strong { display: block; font-size: 14px; }
.notif span > span { display: block; font-size: 13px; color: var(--text-2); }
.notif small { color: var(--muted); font-size: 12px; }
.notif.unread strong::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--mint); vertical-align: middle; }
@media (max-width: 560px) { .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }

/* ---------- browse ---------- */
.search-bar input {
  width: 100%; padding: 14px 18px 14px 46px; border-radius: 16px; font-size: 16px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238593a3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E") no-repeat 17px center;
  border: 1px solid var(--line-2); color: var(--text);
}
.search-bar input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 4px rgba(63, 224, 181, .15); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 26px; }
.chip {
  padding: 7px 15px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); transition: background .2s, color .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed="true"] { background: rgba(63, 224, 181, .14); border-color: rgba(63, 224, 181, .5); color: var(--mint-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 18px; }
.grid .empty { grid-column: 1 / -1; }

/* ---------- series page ---------- */
.series-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; gap: 32px; align-items: flex-end; margin: 24px 0 36px; padding: 32px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
}
.series-hero::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: var(--hero-bg, none) center / cover; filter: blur(70px) saturate(1.5); opacity: .45;
}
.series-hero .poster {
  flex: none; width: 180px; aspect-ratio: 9 / 16; border-radius: 18px; background-size: cover; background-position: center;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .1);
}
.series-hero .eyebrow { color: var(--mint-2); }
.series-hero h1 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -.04em; margin: 10px 0; }
.series-hero p { margin: 0 0 8px; color: var(--text-2); max-width: 52ch; }
.series-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 640px) {
  .series-hero { flex-direction: column; align-items: flex-start; padding: 22px 18px; gap: 18px; }
  .series-hero .poster { width: 120px; border-radius: 14px; }
}
.ep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ep-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, background .2s;
}
.ep-row:hover { border-color: rgba(63, 224, 181, .4); background: var(--surface-2); }
.ep-n { font-size: 20px; font-weight: 800; color: var(--muted); text-align: center; }
.ep-main strong { display: block; }
.ep-main small { color: var(--muted); font-size: 13px; }
.ep-main .bar { display: block; max-width: 220px; margin-top: 6px; height: 4px; }
.ep-tag { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ep-tag.free { background: rgba(63, 224, 181, .14); color: var(--mint); }
.ep-tag.owned { background: rgba(127, 168, 255, .14); color: var(--sky); }
.ep-tag.locked { background: var(--surface-3); color: var(--text-2); }

/* ---------- studio: series management ---------- */
.poster-col { display: flex; flex-direction: column; gap: 10px; align-items: center; flex: none; }
.head-text { min-width: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn.danger, .icon-sm.danger { color: var(--danger); }
.btn.danger:hover { background: rgba(255, 122, 122, .1); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.paywall-stat {
  margin: -12px 0 22px; padding: 14px 18px; border-radius: var(--r); font-size: 14px; color: var(--text-2);
  background: linear-gradient(135deg, rgba(63, 224, 181, .08), rgba(127, 168, 255, .05)); border: 1px solid var(--line);
}
.paywall-stat strong { color: var(--mint-2); font-size: 18px; margin-right: 4px; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.icon-sm {
  width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 15px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); transition: background .2s, color .2s;
}
.icon-sm:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.icon-sm:disabled { opacity: .3; cursor: default; }
.edit-row td { background: var(--bg-2); white-space: normal; }
.edit-row form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 260px) auto; gap: 0 14px; align-items: end; padding: 6px 0; }
.edit-row .form-actions { margin-bottom: 14px; }
@media (max-width: 720px) { .edit-row form { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .panel:has(table.episodes) { overflow-x: visible; }
  table.episodes thead { display: none; }
  table.episodes, table.episodes tbody, table.episodes td { display: block; }
  table.episodes tr {
    display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  table.episodes td { padding: 0; border: 0; white-space: normal; min-width: 0; }
  table.episodes td:first-child { grid-row: span 4; padding-top: 1px; }
  table.episodes td.num { text-align: left; }
  table.episodes .row-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }
  table.episodes .status-cell { min-width: 0; }
  table.episodes .edit-row td:first-child { display: none; }
  table.episodes .edit-row { grid-template-columns: 1fr; }
}

/* ---------- studio: preview ---------- */
.preview-backdrop {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.preview {
  display: flex; flex-direction: column; gap: 10px; width: min(100%, calc((100dvh - 140px) * 9 / 16), 420px);
  padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2);
}
.preview header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.preview video { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; }

/* ---------- landing (signed out) ---------- */
.landing { overflow-x: hidden; }
.landing .eyebrow { color: var(--mint-2); }
.l-nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 26px;
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
}
.l-nav::before {
  content: ""; position: absolute; inset: 0 -100vw; z-index: -1;
  background: rgba(10, 14, 19, .72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.l-nav nav { display: flex; gap: 22px; }
.l-nav nav a, .l-signin { color: var(--text-2); font-weight: 600; font-size: 14px; }
.l-nav nav a:hover, .l-signin:hover { color: var(--text); }
.l-nav .spacer { flex: 1; }

.l-hero {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 56px 24px 72px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center;
}
.l-hero::before {
  content: ""; position: absolute; z-index: -1; inset: -10% -20% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(63, 224, 181, .16), transparent 70%),
    radial-gradient(closest-side at 30% 70%, rgba(127, 168, 255, .18), transparent 70%);
  filter: blur(20px);
}
.l-hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: .98; letter-spacing: -.05em; margin: 18px 0 20px; }
.l-hero h1 em, .l-final h2 em {
  font-style: normal; background: linear-gradient(90deg, var(--mint-2), var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.l-hero p { font-size: 19px; color: var(--text-2); max-width: 34ch; margin: 0 0 30px; }
.l-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.l-cta .btn { padding: 15px 24px; font-size: 16px; }
.l-fine { display: block; margin-top: 16px; color: var(--muted); font-size: 13px; }

.l-stage { position: relative; height: 600px; display: grid; place-items: center; }
.l-phone {
  position: relative; z-index: 2; width: 290px; aspect-ratio: 9 / 19.5; padding: 10px; border-radius: 46px;
  background: linear-gradient(160deg, #2a3442, #0d1219); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .9),
    0 0 0 1px rgba(255, 255, 255, .12), inset 0 0 0 2px rgba(255, 255, 255, .05);
  animation: l-float 7s ease-in-out infinite;
}
.l-phone::before { /* camera notch */
  content: ""; position: absolute; z-index: 3; top: 18px; left: 50%; width: 84px; height: 22px; margin-left: -42px;
  border-radius: 20px; background: #05080b;
}
.l-screen {
  position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: #141c25 center / cover;
}
.l-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-ui {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
}
.l-ep {
  display: inline-block; margin-bottom: 6px; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800;
  background: rgba(63, 224, 181, .18); border: 1px solid rgba(63, 224, 181, .45); color: var(--mint-2);
}
.l-ui strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.l-bar { height: 3px; margin-top: 12px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.l-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--sky)); }
.l-rail { position: absolute; right: 10px; bottom: 96px; display: flex; flex-direction: column; gap: 10px; }
.l-rail i {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px;
  background: rgba(10, 14, 19, .5); border: 1px solid rgba(255, 255, 255, .15);
}
.l-float {
  position: absolute; z-index: 1; width: 170px; aspect-ratio: 9 / 16; border-radius: 20px; background-size: cover; background-position: center;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .1); opacity: .9;
}
.l-float-a { left: 0; top: 70px; transform: rotate(-9deg); animation: l-float 8s ease-in-out -2s infinite; }
.l-float-b { right: 0; bottom: 60px; transform: rotate(8deg); animation: l-float 9s ease-in-out -4s infinite; }
@keyframes l-float { 50% { translate: 0 -14px; } }

.l-trending { padding: 10px 0 40px; }
.l-head { max-width: 1200px; margin: 0 auto 16px; padding: 0 24px; }
/* Same column as the rest of the page: starts under the "Trending now" heading. */
.l-marquee {
  max-width: 1152px; margin: 0 auto; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 92%, transparent);
}
@media (max-width: 1200px) { .l-marquee { margin: 0 24px; } }
.l-track { display: flex; gap: 16px; width: max-content; animation: l-scroll 60s linear infinite; }
.l-marquee:hover .l-track { animation-play-state: paused; }
@keyframes l-scroll { to { transform: translateX(-50%); } }
.l-poster {
  position: relative; flex: none; width: 160px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--line);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; transition: transform .2s;
}
.l-poster::before { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.l-poster > * { position: relative; }
.l-poster span { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-2); }
.l-poster strong { font-size: 15px; line-height: 1.2; }
.l-poster:hover { transform: translateY(-4px); }

.l-section { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.l-section h2, .l-final h2 { font-size: clamp(32px, 4.5vw, 56px); letter-spacing: -.04em; margin: 14px 0 34px; max-width: 18ch; }
.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.l-step {
  padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
}
.l-step h3 { font-size: 20px; margin: 18px 0 8px; }
.l-step p { margin: 0; color: var(--text-2); }
.l-ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--mint-ink);
  background: linear-gradient(135deg, var(--mint-2), var(--sky));
}
.l-creators { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.l-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.l-list li { position: relative; padding-left: 30px; color: var(--text-2); font-size: 17px; }
.l-list li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 800; }
.l-mock {
  position: relative; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(63, 224, 181, .1), rgba(127, 168, 255, .06)), var(--surface);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); transform: rotate(1.5deg);
}
.l-mock-head small { display: block; color: var(--muted); font-weight: 600; }
.l-mock-head strong { font-size: 40px; letter-spacing: -.04em; }
.l-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin: 18px 0 20px; }
.l-chart i { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--mint-2), rgba(63, 224, 181, .25)); }
.l-mock-row {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 11px 0;
  border-top: 1px solid var(--line); font-size: 14px;
}
.l-mock-row span:first-child { color: var(--muted); font-weight: 800; }
.l-mock-note { position: absolute; right: 16px; top: 14px; color: var(--muted); font-size: 11px; }
.l-final {
  max-width: 1150px; margin: 20px auto 80px; padding: 70px 24px; text-align: center; border-radius: 32px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(63, 224, 181, .18), transparent 70%), var(--surface);
  border: 1px solid var(--line);
}
.l-final h2 { margin: 0 auto 30px; }
.l-final .btn { padding: 16px 28px; font-size: 17px; }
.l-footer {
  max-width: 1200px; margin: 0 auto; padding: 30px 24px 40px; display: flex; gap: 20px; align-items: center;
  color: var(--muted); font-size: 14px; border-top: 1px solid var(--line);
}
.l-footer .spacer { flex: 1; }
.l-footer a:hover { color: var(--text); }

/* Sections fade in when they scroll into view. */
.l-section, .l-final, .l-trending { opacity: 0; translate: 0 30px; transition: opacity .7s ease, translate .7s ease; }
.l-section.in, .l-final.in, .l-trending.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .l-phone, .l-float, .l-track { animation: none; }
  .l-section, .l-final, .l-trending { opacity: 1; translate: none; transition: none; }
}

@media (max-width: 900px) {
  .l-hero { grid-template-columns: 1fr; padding-top: 36px; text-align: center; }
  .l-hero p { margin-left: auto; margin-right: auto; }
  .l-cta { justify-content: center; }
  .l-stage { height: 520px; }
  .l-steps, .l-creators { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .l-nav { gap: 14px; padding: 12px 16px; }
  .l-nav nav { display: none; }
  .l-hero { padding: 24px 16px 40px; gap: 10px; }
  .l-hero h1 { font-size: 46px; }
  .l-hero p { font-size: 17px; }
  .l-cta .btn { flex: 1 1 100%; }
  .l-stage { height: 470px; }
  .l-phone { width: 230px; border-radius: 38px; }
  .l-screen { border-radius: 30px; }
  .l-float { width: 120px; }
  .l-float-a { left: -18px; }
  .l-float-b { right: -18px; }
  .l-poster { width: 128px; }
  .l-marquee { margin: 0 16px; }
  .l-head { padding: 0 16px; }
  .l-section { padding: 56px 16px; }
  .l-final { margin: 10px 16px 50px; padding: 50px 18px; }
  .l-footer { flex-wrap: wrap; padding: 24px 16px 36px; }
}

/* ---------- toasts ---------- */
#toasts {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 10px; width: min(92vw, 440px);
}
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 16px;
  background: rgba(28, 38, 50, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .8); font-size: 14px;
  animation: up .22s cubic-bezier(.2, .8, .2, 1);
}
.toast .msg { flex: 1; }
.toast.error { background: rgba(70, 26, 30, .94); border-color: rgba(255, 122, 122, .35); }

@media (max-width: 560px) {
  .hide-sm { display: none; }
  /* No backdrop-filter here: it would make the fixed bottom bar position itself inside the header. */
  .topbar { gap: 12px; padding-left: 16px; padding-right: 16px; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .page { padding: 0 16px 56px; }
  /* Phones: main navigation becomes a bottom tab bar. */
  .nav-main {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; gap: 0; justify-content: space-around;
    padding: 6px 8px max(8px, env(safe-area-inset-bottom));
    background: rgba(10, 14, 19, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .nav-main .nav-link { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 1; font-size: 11px; padding: 4px 0; }
  .nav-main .nav-link.active::after { display: none; }
  .nav-main .nav-link.active { color: var(--mint-2); }
  .nav-ic { display: block; font-size: 19px; line-height: 1.2; }
  body:has(.nav-main) .page { padding-bottom: 96px; }
  body:has(.nav-main) #toasts { bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)); }
  .rail-row { grid-auto-columns: 128px; gap: 12px; }
  .rail-row.ranked { grid-auto-columns: 166px; }
  .ranked .card { grid-template-columns: 38px 1fr; }
  .ranked .card .rank { font-size: 74px; }
}
