/* Asteria: a star atlas for a Brawlhalla clipping clan.
   One bold element (the dual rank ladder); everything else quiet. */
:root {
  --night: #0f1130;          /* page */
  --night-2: #161a42;        /* raised surfaces */
  --night-3: #23285c;        /* lines, rails */
  --ink: #e9ecf8;            /* moonlight: text and line art */
  --ink-2: #b4b9d8;          /* secondary text */
  --ink-3: #7d83ab;          /* tertiary text */
  --space: linear-gradient(90deg, #a7b2d0, #5a86eb, #9176ef, #bc61e8, #ff5fc8);
  --space-v: linear-gradient(0deg, #a7b2d0, #5a86eb, #9176ef, #bc61e8, #ff5fc8);
  --earth: linear-gradient(90deg, #5aa8ff, #5fd39a, #e8a040, #ff5a2a, #e23a2c);
  --earth-v: linear-gradient(0deg, #5aa8ff, #5fd39a, #e8a040, #ff5a2a, #e23a2c);
  --gold: #f3d38a;           /* Luminary */
  --serif: "Unbounded", "Figtree", system-ui, sans-serif;   /* display: wide, futuristic */
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 68ch;
  --radius-s: 6px;
  --radius-l: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* faint star field */
  background-image:
    radial-gradient(1px 1px at 12% 18%, #ffffff55 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, #ffffff44 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 34%, #ffffff3a 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 61%, #ffffff33 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 82%, #ffffff2e 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 90%, #ffffff33 50%, transparent 51%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid #9176ef; outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: 0.01em; margin: 0; }
h1 { font-size: clamp(3rem, 9vw, 6.2rem); line-height: 0.95; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.35rem; line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
section { padding: 88px 0 24px; }
section > .wrap > h2 { margin-bottom: 10px; }
.lede { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 36px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--night-3); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.nav { display: flex; gap: 22px; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .nav { gap: 14px; font-size: 0.9rem; } .nav .hide-sm { display: none; } }

.button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid var(--night-3); background: var(--night-2); color: var(--ink); }
.button.primary { background: var(--ink); color: var(--night); border-color: var(--ink); }
.button:hover { border-color: var(--ink-3); }

.notice { margin: 16px auto 0; padding: 10px 14px; border: 1px dashed var(--night-3); border-radius: var(--radius-s); color: var(--ink-2); font-size: 0.92rem; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-top { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero-top img { width: min(380px, 80%); justify-self: center; opacity: 0.95; }
.hero p.tagline { font-size: 1.25rem; color: var(--ink-2); margin: 22px 0 28px; max-width: 34ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 820px) { .hero-top { grid-template-columns: 1fr; } .hero-coin { grid-row: 1; } .coin.big { --size: 210px; --depth: 1.5px; } }

/* the ladder: the one bold element */
.ladder { margin-top: 64px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 clamp(16px, 4vw, 56px); align-items: end; }
.ladder .crown { grid-column: 1 / -1; justify-self: center; text-align: center; margin-bottom: 18px; }
.crown .name { font-family: var(--serif); font-size: 1.9rem; color: var(--gold); text-shadow: 0 0 22px #f3d38a66; }
.crown .count { color: var(--ink-2); font-size: 0.95rem; }
.crown-arc { grid-column: 1 / -1; height: 26px; margin: 0 12% 6px; border: 1px solid var(--night-3); border-bottom: 0; border-radius: 26px 26px 0 0; }
.track { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; }
.track.right { grid-template-columns: 1fr auto; }
.rail { width: 4px; border-radius: 4px; grid-row: 1 / span 2; }
.track.space .rail { background: var(--space-v); box-shadow: 0 0 18px #9176ef55; }
.track.earth .rail { background: var(--earth-v); box-shadow: 0 0 18px #5fd39a44; }
.track.right .rail { grid-column: 2; }
.rungs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rung { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #23285c99; position: relative; }
.rung::before { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); transform: translateY(-50%); }
.track.left .rung::before { left: -25px; }
.track.right .rung { flex-direction: row-reverse; text-align: right; }
.track.right .rung::before { right: -25px; }
.rung .label { font-family: var(--serif); font-size: 1.1rem; }
.rung .short { display: none; }
.rung .count { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.95rem; white-space: nowrap; }
.rung .count b { color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.track-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.track.right .track-foot { flex-direction: row-reverse; text-align: right; }
.track-foot img { width: 56px; height: 56px; object-fit: contain; }
.track-foot .t { font-family: var(--serif); font-size: 1.25rem; }
.track-foot .s { color: var(--ink-3); font-size: 0.9rem; }
.ladder .spine { width: 1px; height: 100%; background: linear-gradient(transparent, var(--night-3)); }
@media (max-width: 720px) {
  .ladder { grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .ladder .spine { display: none; }
  .rung .full { display: none; }
  .rung .short { display: inline; }
  .rung .count { font-size: 0.85rem; }
  .crown-arc { margin: 0 20% 6px; }
}

/* ---------- leaderboards ---------- */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .boards { grid-template-columns: 1fr; } }
.board h3 { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 2px solid transparent; border-image: var(--line) 1; }
.board.space { --line: var(--space); --bar: var(--space); }
.board.earth { --line: var(--earth); --bar: var(--earth); }
.board h3 img { width: 30px; height: 30px; object-fit: contain; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 2.2ch 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 6px; border-radius: var(--radius-s); text-decoration: none; }
a.row:hover { background: var(--night-2); }
.row .pos { color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.row .who { min-width: 0; }
.row .who .n { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who .r { color: var(--ink-2); font-size: 0.9rem; }
.row .prog { width: 96px; display: block; }
.bar { display: block; height: 6px; background: var(--night-3); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--bar, var(--space)); background-size: 400% 100%; }
.prog small { display: block; text-align: right; color: var(--ink-3); font-size: 0.78rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.row.luminary .who .r { color: var(--gold); }
.row.luminary .avatar { box-shadow: 0 0 0 2px var(--gold), 0 0 14px #f3d38a77; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--night-3); object-fit: cover; }
.tier-icon { width: 34px; height: 34px; }
.empty { color: var(--ink-3); padding: 18px 6px; }

/* ---------- monthly top 5 ---------- */
.row .score { font-family: var(--serif); font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .score small { font-family: var(--sans); color: var(--ink-3); font-size: 0.8rem; }
.row .pos.place-1 { color: var(--gold); font-weight: 700; }

/* ---------- specialties ---------- */
.specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 28px; }
.spec { padding: 18px 0; border-top: 1px solid var(--night-3); }
.spec-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.spec h3 { font-size: 1.3rem; }
.spec .cap { color: var(--ink-3); font-size: 0.88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spec p { color: var(--ink-2); margin: 0; }
.spec .where { color: var(--ink-3); font-size: 0.88rem; margin-top: 8px; }
.spec.revolution .steps { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.spec.revolution .steps li { margin-bottom: 10px; }
.spec.revolution .where { display: block; margin-top: 2px; }
@media (min-width: 900px) { .spec.revolution { grid-column: span 2; } }
.spec.revolution .steps b { color: var(--ink); font-weight: 600; }
.spec-card { margin-top: 28px; background: var(--night-2); border-radius: var(--radius-l); padding: 24px; }
.spec-card h3 { margin-bottom: 12px; }
.spec-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 36px; }
.spec-rows li { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 12px; font-size: 0.95rem; }
.spec-rows .ct { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.spec-rows .bar i { background: var(--ink-3); }
.spec-rows li.earned .bar i { background: var(--gold); box-shadow: 0 0 10px #f3d38a77; }
.spec-rows li.earned .nm { color: var(--gold); }


/* ---------- uploads ---------- */
.uploads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 28px; }
.upload { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #23285c99; }
.upload .when { color: var(--ink-3); font-size: 0.88rem; }
.upload a.watch { font-weight: 600; font-size: 0.92rem; }

/* ---------- how it works ---------- */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } }
.rules h3 { margin-bottom: 10px; }
.rules p, .rules li { color: var(--ink-2); }
.rules ol { padding-left: 1.2em; margin: 0; }
.points { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-top: 8px; }
.points td { padding: 6px 0; border-bottom: 1px solid #23285c99; color: var(--ink-2); }
.points td:last-child { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; margin: 28px 0 36px; }
.profile-head .avatar { width: 88px; height: 88px; }
.profile-head .sub { color: var(--ink-2); }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .tracks { grid-template-columns: 1fr; } }
.track-card { background: var(--night-2); border-radius: var(--radius-l); padding: 24px; position: relative; overflow: hidden; }
.track-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--line); }
.track-card.space { --line: var(--space); --bar: var(--space); }
.track-card.earth { --line: var(--earth); --bar: var(--earth); }
.track-card .now { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.track-card .now img { width: 64px; height: 64px; }
.track-card .rank { font-family: var(--serif); font-size: 1.6rem; }
.track-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 0.95rem; }
.track-card dt { color: var(--ink-3); }
.track-card dd { margin: 0; }
.clips { list-style: none; padding: 0; margin: 0; }
.clips li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #23285c99; }
.clips .d { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.back { display: inline-block; margin-top: 28px; color: var(--ink-2); }

/* ---------- legal pages ---------- */
.legal { padding-top: 48px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-2); max-width: var(--measure); }
.legal .updated { color: var(--ink-3); }

/* ---------- footer ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--night-3); padding: 28px 0 40px; color: var(--ink-3); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--ink-2); }


/* =========================================================================
   v3: bold, game-like layer. Motion lives in the hero and in highlights only.
   ========================================================================= */

/* ---------- hero sky ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 70% at 12% 0%, #9176ef40, transparent 70%),
    radial-gradient(40% 50% at 30% 30%, #ff5fc81f, transparent 70%),
    radial-gradient(55% 60% at 92% 108%, #e23a2c55, #4a0d0d33 45%, transparent 75%),
    radial-gradient(35% 40% at 75% 95%, #e8a04022, transparent 70%); }
.hero .sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero h1 { background: linear-gradient(180deg, #ffffff 30%, #c9c3ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px #9176ef66); letter-spacing: 0.02em; }
.hero-coin { justify-self: center; position: relative; display: grid; place-items: center; }
.hero-coin::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, #9176ef55 0%, #ff5fc822 40%, transparent 68%); }
.button.primary { box-shadow: 0 0 0 1px #ffffff33, 0 0 28px #9176ef66; }
.button.primary:hover { box-shadow: 0 0 0 1px #ffffff55, 0 0 36px #bc61e899; }

/* ---------- spinning coins ---------- */
.coin { --size: 64px; --depth: 1.1px; display: inline-block; width: var(--size); height: var(--size); perspective: calc(var(--size) * 5); flex: none; }
.coin.big { --size: min(340px, 70vw); --depth: 1.5px; }
.coin-spin { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: coin-spin 7s linear infinite; }
.coin-spin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.coin-spin img.edge { filter: brightness(0.5) sepia(0.4) hue-rotate(195deg) saturate(1.4); }
@keyframes coin-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* ---------- section headings ---------- */
section > .wrap > h2::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 14px; border-radius: 3px; background: var(--space); }

/* ---------- rank names in their role colors ---------- */
.rk { --g1: var(--ink); --g2: var(--ink-2); font-weight: 700; background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.rk-c1 { --g1: #a7b2d0; --g2: #5a86eb; } .rk-c2 { --g1: #5a86eb; --g2: #9176ef; } .rk-c3 { --g1: #9176ef; --g2: #bc61e8; }
.rk-c4 { --g1: #bc61e8; --g2: #ff5fc8; } .rk-c5 { --g1: #ff5fc8; --g2: #ffd6f1; }
.rk-t1 { --g1: #5aa8ff; --g2: #5fd39a; } .rk-t2 { --g1: #5fd39a; --g2: #e8a040; } .rk-t3 { --g1: #e8a040; --g2: #ff5a2a; }
.rk-t4 { --g1: #ff5a2a; --g2: #e23a2c; } .rk-t5 { --g1: #ff8a5c; --g2: #e23a2c; }
.rk.lum { background: linear-gradient(90deg, #d9a743, #fff3c4, #f3d38a); -webkit-background-clip: text; background-clip: text; }
.row .who .rk { display: block; font-size: 0.9rem; width: fit-content; }

/* ---------- avatars with tier badges ---------- */
.av { position: relative; display: inline-block; width: 40px; height: 40px; flex: none; }
.av .avatar { display: block; width: 100%; height: 100%; }
.av .badge { position: absolute; right: -7px; bottom: -7px; width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 0 3px #000c); }
.av.gold .avatar { box-shadow: 0 0 0 2px var(--gold), 0 0 16px #f3d38a88; }
.av.big { width: 96px; height: 96px; }
.row .av { width: 40px; height: 40px; }

/* ---------- ladder icons ---------- */
.rung .label { display: inline-flex; align-items: center; gap: 10px; }
.track.right .rung .label { flex-direction: row-reverse; }
.rung-icon { width: 30px; height: 30px; object-fit: contain; }

/* ---------- rows: hover and live-update glow ---------- */
.row { transition: background 0.2s; }
.row:hover { background: #ffffff0a; }
.row.flash { animation: flash 2.6s ease-out; }
@keyframes flash {
  0% { background: #9176ef40; box-shadow: 0 0 0 1px #bc61e8, 0 0 26px #bc61e899; }
  100% { background: transparent; box-shadow: 0 0 0 1px transparent; }
}
.board.earth .row.flash { animation-name: flash-earth; }
@keyframes flash-earth {
  0% { background: #ff5a2a33; box-shadow: 0 0 0 1px #ff5a2a, 0 0 26px #ff5a2a88; }
  100% { background: transparent; box-shadow: 0 0 0 1px transparent; }
}

/* ---------- page transitions ---------- */
#app.enter { animation: page-in 0.4s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- monthly podium ---------- */
.podium-col h3 { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 2px solid transparent; border-image: var(--line) 1; }
.podium-col.space { --line: var(--space); } .podium-col.earth { --line: var(--earth); }
.podium-col h3 img { width: 30px; height: 30px; object-fit: contain; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 22px 0 6px; }
.step { --medal: #c9cfe6; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; text-align: center; min-width: 0; }
.step.p1 { --medal: var(--gold); } .step.p3 { --medal: #d08b5b; }
.step .av { width: 52px; height: 52px; }
.step.p1 .av { width: 68px; height: 68px; }
.step .av .avatar { box-shadow: 0 0 0 2px var(--medal), 0 0 18px color-mix(in srgb, var(--medal) 55%, transparent); }
.step .nm { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.step .sc { font-family: var(--serif); font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.step .sc small { font-family: var(--sans); color: var(--ink-3); font-size: 0.78rem; }
.step .block { width: 100%; display: grid; place-items: center; margin-top: 6px; border-radius: 10px 10px 0 0;
  border-top: 3px solid var(--medal); background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 30%, transparent), transparent); }
.step .block b { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; color: var(--medal); text-shadow: 0 0 18px color-mix(in srgb, var(--medal) 60%, transparent); }
.step.p1 .block { height: 118px; } .step.p2 .block { height: 84px; } .step.p3 .block { height: 62px; }
.step:hover .nm { text-decoration: underline; text-decoration-color: var(--ink-3); }
.coin.crown { --size: 46px; --depth: 0.9px; margin-bottom: 2px; }
.podium-col .rows { margin-top: 4px; }

/* ---------- member emblem ---------- */
.track-card .now { gap: 20px; align-items: center; }
.emblem { position: relative; width: 132px; height: 132px; flex: none; }
.emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.emblem .track-ring { fill: none; stroke: var(--night-3); stroke-width: 6; }
.emblem .fill-ring { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--off);
  animation: ring-in 1.3s cubic-bezier(.2,.8,.2,1) both; filter: drop-shadow(0 0 6px #ffffff40); }
@keyframes ring-in { from { stroke-dashoffset: var(--c); } }
.emblem-in { position: absolute; inset: 18px; display: grid; place-items: center; }
.emblem-in > img { width: 100%; height: 100%; object-fit: contain; }
.coin.emblem-coin { --size: 92px; --depth: 1.2px; }
.emblem .unranked { color: var(--ink-3); font-size: 0.82rem; }
.emblem.gold::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, #f3d38a40, transparent 65%); }
.track-card .rank { font-size: 1.7rem; line-height: 1.15; }
.track-card .progress-line { margin: 6px 0 0; }
.track-card.gold { box-shadow: 0 0 0 1px #f3d38a55, 0 0 44px #f3d38a22; }
.track-card.gold::before { background: linear-gradient(90deg, #d9a743, #fff3c4, #f3d38a); }
.profile-head.gold h2 { background: linear-gradient(90deg, #d9a743, #fff3c4, #f3d38a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px #f3d38a55); }
.profile-head .av.big .avatar { width: 100%; height: 100%; }
@media (max-width: 520px) {
  .emblem { width: 104px; height: 104px; } .emblem-in { inset: 14px; } .coin.emblem-coin { --size: 72px; }
  .track-card .rank { font-size: 1.35rem; }
  .podium { gap: 6px; } .step .nm { font-size: 0.9rem; } .step.p1 .av { width: 56px; height: 56px; } .step .av { width: 44px; height: 44px; }
}

.rung { align-items: center; }
/* Luminary coins turn gold */
.emblem.gold .coin-spin img { filter: sepia(1) saturate(2.6) hue-rotate(-12deg) brightness(1.05); }
.emblem.gold .coin-spin img.edge { filter: sepia(1) saturate(2.4) hue-rotate(-14deg) brightness(0.6); }
@media (max-width: 720px) {
  .rung .count .word { display: none; }
  .rung .count b { font-size: 1.1rem; }
  .rung-icon { width: 26px; height: 26px; }
  .rung .label { gap: 8px; font-size: 1rem; }
}
.ladder { align-items: start; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, var(--night)); }


/* =========================================================================
   v4: futuristic layer. A 3D space scene sits behind the page (scene.js);
   content floats over it on glass panels and slides in as you scroll.
   ========================================================================= */
#space { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }
.has-3d body { background-image: none; }
.has-3d .hero { background: none; }
.has-3d .hero .sky, .has-3d .hero-coin::before { display: none; }
.has-3d .hero-coin .coin { visibility: hidden; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
h1 { font-weight: 800; font-size: clamp(2.8rem, 8vw, 5.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.05rem; }
.hero p.tagline { font-size: 1.2rem; }
.rung .label { font-size: 0.92rem; }
.crown .name { font-size: 1.5rem; font-weight: 600; }
.track-foot .t { font-size: 1rem; font-weight: 600; }
.track-card .rank { font-size: 1.35rem; font-weight: 600; }
.step .sc, .row .score { font-weight: 600; }
.step .block b { font-weight: 800; }
.spec h3 { font-size: 1.05rem; }

/* glass panels over the 3D scene */
.board, .podium-col, .rules > div, .spec, .track-card, .spec-card, .uploads {
  background: linear-gradient(180deg, rgba(26, 30, 74, 0.62), rgba(13, 15, 42, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 20px 50px rgba(0, 0, 0, 0.35);
}
.board, .podium-col, .rules > div { padding: 22px 22px 14px; }
.spec { padding: 20px 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.specs { gap: 16px; }
.uploads { padding: 6px 22px; gap: 0 28px; }
.rules { gap: 18px; }
.boards { gap: 20px; }
.track-card::before { border-radius: 18px 18px 0 0; }
.ladder { padding: 28px 24px 22px; border-radius: 22px; background: rgba(11, 13, 38, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.06); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.site-header { background: rgba(11, 13, 38, 0.55); }
.button { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: rgba(22, 26, 66, 0.6); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px) scale(0.985); filter: blur(5px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(.2,.8,.2,1), filter 0.75s ease; transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.board.reveal.in, .podium-col.reveal.in, .track-card.reveal.in { animation: panel-glow 1.6s ease-out both; animation-delay: var(--d, 0ms); }
@keyframes panel-glow {
  0% { box-shadow: 0 0 0 1px #bc61e8aa, 0 0 40px #9176ef66, 0 20px 50px rgba(0,0,0,.35); }
  100% { box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 20px 50px rgba(0,0,0,.35); }
}
.track-card.gold.reveal.in { animation: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; filter: none; } }
@media (max-width: 720px) {
  .ladder { padding: 18px 12px 14px; }
  .board, .podium-col, .rules > div { padding: 16px 14px 10px; }
  .uploads { padding: 4px 14px; }
}

/* keep text readable where a planet drifts behind it */
section > .wrap > h2, section > .wrap > .lede, .hero h1, .hero .tagline, .crown { text-shadow: 0 2px 18px rgba(5, 6, 20, 0.85), 0 0 2px rgba(5, 6, 20, 0.6); }
.hero h1 { text-shadow: none; }

/* ---------- showcase ---------- */
.showcase { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.show-card { border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(26,30,74,.62), rgba(13,15,42,.55)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.show-card.space { box-shadow: 0 0 0 1px #9176ef22, 0 18px 40px rgba(0,0,0,.35); }
.show-card.earth { box-shadow: 0 0 0 1px #e23a2c22, 0 18px 40px rgba(0,0,0,.35); }
.show-card .media { aspect-ratio: 16 / 9; background: #080a1f; display: grid; place-items: center; overflow: hidden; }
.show-card .media > video, .show-card .media > img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.media-fallback { display: grid; place-items: center; gap: 10px; width: 100%; height: 100%; text-decoration: none; color: var(--ink-2);
  font-weight: 600; background: radial-gradient(circle at 50% 40%, #23285c, #080a1f 70%); }
.show-card.earth .media-fallback { background: radial-gradient(circle at 50% 40%, #3a1414, #0b0507 70%); }
.media-fallback .fallback-icon { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 0 18px #9176ef88); }
.show-card.earth .media-fallback .fallback-icon { filter: drop-shadow(0 0 18px #ff5a2a88); }
.media-fallback:hover span { color: var(--ink); text-decoration: underline; }
.show-card .meta { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
.show-card .who { display: flex; flex-direction: column; min-width: 0; }
.show-card .who .n { font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-card .who .n:hover { text-decoration: underline; }
.show-card .who .rk { font-size: 0.88rem; width: fit-content; }
.show-card .open { font-size: 0.85rem; color: var(--ink-3); text-decoration: none; border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 6px 12px; }
.show-card .open:hover { color: var(--ink); border-color: rgba(255,255,255,.3); }

/* ---------- hall of fame ---------- */
.hall-hero { padding: 72px 0 8px; }
.hall-hero.gold-title h1 { background: linear-gradient(90deg, #d9a743, #fff3c4, #f3d38a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px #f3d38a55); }
.lum-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.lum-card a { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 12px; text-decoration: none; border-radius: 18px;
  background: linear-gradient(180deg, rgba(243,211,138,.12), rgba(13,15,42,.5)); border: 1px solid #f3d38a44;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 0 34px #f3d38a1c; }
.lum-card .nm { font-family: var(--serif); font-size: 1rem; text-align: center; }
.lum-card a:hover { box-shadow: 0 0 44px #f3d38a44; }
.hall-months { display: grid; gap: 18px; }
.hall-month { padding: 20px 22px; border-radius: 18px; border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(26,30,74,.62), rgba(13,15,42,.52)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.hall-month h3 { margin-bottom: 14px; }
.hall-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.hall-cols h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.95rem; color: var(--ink-2); font-weight: 600; }
.hall-cols h4 img { width: 22px; height: 22px; object-fit: contain; }
.hall-rows { list-style: none; margin: 0; padding: 0; }
.hall-rows li { display: grid; grid-template-columns: 2ch 1fr auto; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.06); align-items: baseline; }
.hall-rows .pl { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hall-rows li.p1 .pl { color: var(--gold); font-weight: 700; } .hall-rows li.p2 .pl { color: #c9cfe6; } .hall-rows li.p3 .pl { color: #d08b5b; }
.hall-rows a { text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-rows a:hover { text-decoration: underline; }
.hall-rows .sc { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 0.92rem; }
@media (max-width: 640px) { .hall-cols { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- sign in ---------- */
.site-header .wrap { gap: 18px; }
.auth { display: flex; align-items: center; gap: 12px; margin-left: 8px; flex: none; }
.auth a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; }
.auth a:hover { color: var(--ink); }
.auth .me { display: inline-flex; align-items: center; gap: 8px; }
.auth .me img { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px #9176ef88; }
.auth button { font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(22,26,66,.6); color: var(--ink); }
.auth .signin { background: #5865f2; border-color: #5865f2; box-shadow: 0 0 20px #5865f255; }
.auth .signin:hover { background: #6a75f5; }
.auth .signout { color: var(--ink-3); }
.auth button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 720px) { .auth .signin { padding: 6px 10px; font-size: 0.8rem; } }

/* ---------- your account ---------- */
.account-card { margin-top: 24px; padding: 22px 24px; border-radius: 18px; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(26,30,74,.62), rgba(13,15,42,.52)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.account-card h3 { margin-bottom: 10px; }
.account-card p { color: var(--ink-2); margin: 0 0 14px; }
.account-card .notice { margin-bottom: 14px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button.quiet { background: transparent; color: var(--ink-2); }
.button.quiet[data-sure] { color: #ffb4a8; border-color: #ff8a7a66; }

/* ---------- gallery tabs and queue ---------- */
.tabs { display: flex; gap: 8px; margin-top: 18px; }
.tab { padding: 7px 16px; border-radius: 999px; text-decoration: none; color: var(--ink-2); border: 1px solid rgba(255,255,255,.12); font-weight: 600; font-size: 0.92rem; }
.tab.on { color: var(--ink); background: rgba(145,118,239,.28); border-color: #9176ef88; }
.rows.queue .row { grid-template-columns: 1fr auto; }
.rows.queue .tier-icon { display: none; }
.rows.queue .open { font-size: 0.85rem; color: var(--ink-3); }
.hall-hero .lede { margin-top: 10px; }
.site-footer { background: rgba(11, 13, 38, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); position: relative; }

/* ---------- phones: header on two rows (logo + sign-in, then the links) ---------- */
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 4px; }
  .site-header .brand { order: 1; }
  .site-header .auth { order: 2; margin-left: auto; }
  .site-header .nav { order: 3; width: 100%; gap: 20px; overflow-x: auto; white-space: nowrap;
    padding-bottom: 10px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .site-header .nav .hide-sm { display: inline; }
}
html { scroll-padding-top: 76px; }
@media (max-width: 640px) { html { scroll-padding-top: 104px; } }

/* ---------- a member's own showcase ---------- */
.member-clips { margin-top: 22px; }
.member-clips .meta { grid-template-columns: 1fr auto; }
.member-clips .who .rk { font-size: 0.95rem; font-weight: 700; }
.member-clips .when { color: var(--ink-3); font-size: 0.85rem; margin-top: 2px; }
.clip-tabs { margin-bottom: 4px; }
button.tab { font: inherit; font-weight: 600; font-size: 0.92rem; background: transparent; cursor: pointer; }
button.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.member-clips + .more { text-align: center; margin-top: 24px; }

/* ---------- likes ---------- */
.show-card .acts { display: flex; align-items: center; gap: 8px; }
.like { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  color: var(--ink-3); background: transparent; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 6px 11px; min-height: 32px; }
.like svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.like:hover:not(:disabled) { color: var(--ink); border-color: rgba(255,255,255,.3); }
.like.on { color: #ff7ab8; border-color: #ff5fc866; background: rgba(255,95,200,.1); }
.like.on svg { fill: currentColor; transform: scale(1.08); }
.like:disabled { opacity: .45; cursor: default; }
.like:focus-visible, .grade-btn:focus-visible, .ev-watch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.clip-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.empty-li { grid-column: 1 / -1; list-style: none; }

/* ---------- share + rank history ---------- */
.profile-head .share { margin-top: 12px; padding: 8px 16px; font-size: 0.88rem; cursor: pointer; font-family: inherit; }
.timeline { list-style: none; margin: 22px 0 0; padding: 0 0 0 6px; border-left: 2px solid rgba(255,255,255,.1); display: grid; gap: 18px; }
.timeline .ev { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; margin-left: -23px; }
.timeline .ev-icon { width: 44px; height: 44px; border-radius: 50%; background: #0c0e2c; box-shadow: 0 0 0 3px #0b0d26, 0 0 18px #9176ef55; }
.timeline .ev.earth .ev-icon { box-shadow: 0 0 0 3px #0b0d26, 0 0 18px #e23a2c55; }
.timeline .ev.demotion { opacity: .78; }
.timeline .ev-line { font-weight: 700; font-size: 1.02rem; }
.timeline .ev-sub { color: var(--ink-3); font-size: 0.88rem; margin-top: 2px; }
.ev-watch { margin-top: 8px; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); background: transparent;
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.ev-watch:hover { color: var(--ink); border-color: rgba(255,255,255,.3); }
.ev-media { margin-top: 10px; max-width: 520px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; display: grid; }
.ev-media > video, .ev-media > img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Clip of the Week + vote ---------- */
.lede a, .sub a { color: var(--ink); }
.winners { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.show-card.winner { box-shadow: 0 0 0 1px #f3d38a55, 0 0 40px #e8a04033, 0 18px 40px rgba(0,0,0,.35); }
.crown-label { font-size: 0.78rem; font-weight: 700; color: #f3d38a; letter-spacing: .02em; }
.vote-col { padding-top: 40px; }
.vote-col h2 { margin-bottom: 18px; }
.vote-card .meta { grid-template-columns: 40px 1fr auto; }
.vote-card .vote { padding: 7px 16px; font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer; min-height: 34px; }
.vote-card .vote:disabled { opacity: .5; cursor: default; }
.vote-card.voted { box-shadow: 0 0 0 2px #c9bdff, 0 0 34px #9176ef66; }
.linkish { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ---------- grading queue ---------- */
h2 .count { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; margin-left: 8px; vertical-align: middle;
  border-radius: 999px; font-size: 1rem; background: rgba(145,118,239,.25); border: 1px solid #9176ef66; }
.queue-grid { margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.q-meta { padding: 14px 16px 16px; display: grid; gap: 12px; }
.q-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.q-who .n { font-weight: 700; text-decoration: none; }
.q-who .when, .q-who .detail { color: var(--ink-3); font-size: 0.85rem; }
.grade-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grade-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--ink);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 6px 10px 6px 6px; cursor: pointer; min-height: 40px; }
.grade-btn .g-icon { width: 28px; height: 28px; }
.grade-btn:hover:not(:disabled) { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.08); }
.grade-btn.on { background: rgba(145,118,239,.35); border-color: #c9bdff; }
.q-card.earth .grade-btn.on { background: rgba(226,58,44,.3); border-color: #ffb4a8; }
.grade-btn:disabled { cursor: default; }
.grade-row .open { margin-left: auto; }
.q-status { margin: 0; min-height: 1.2em; font-size: 0.9rem; color: var(--ink-2); }
.q-card.graded { opacity: .55; }
.q-card.graded .q-status { color: #9be7b8; font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); }
.grader-table, .week-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.grader-table th, .grader-table td, .week-table th, .week-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.grader-table th, .week-table th { color: var(--ink-3); font-weight: 600; font-size: 0.85rem; background: rgba(255,255,255,.03); }
.grader-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.gname { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.gname img { width: 28px; height: 28px; border-radius: 50%; }
.week-table a { color: var(--ink); }
.week-table .tiny { color: var(--ink-3); font-size: 0.82rem; margin-left: 6px; }
.week-table .muted { color: var(--ink-3); }

/* ---------- hall extras ---------- */
.month-pick { display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 18px; color: var(--ink-2); font-weight: 600; }
.month-pick select { font: inherit; color: var(--ink); background: rgba(22,26,66,.8); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 12px; }
.hall-rows .av { width: 30px; height: 30px; }
.hall-rows li { align-items: center; grid-template-columns: 2ch 30px minmax(0, 1fr) auto; }
.hall-rows .sc { white-space: nowrap; }
.reel-month { margin: 22px 0 12px; }
.reels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 280px)); gap: 18px; }
.reel { border-radius: 18px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.1); position: relative; }
.reel video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.reel-label { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: rgba(0,0,0,.55); }
.grader-wall { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.grader-wall li { display: grid; grid-template-columns: 26px 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 12px 16px; border-radius: 14px; background: rgba(22,26,66,.55); border: 1px solid rgba(255,255,255,.08); }
.grader-wall .pl { grid-row: 1 / 3; color: var(--ink-3); font-weight: 700; }
.grader-wall .av { grid-row: 1 / 3; width: 40px; height: 40px; }
.grader-wall .gn { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grader-wall .sc { color: var(--ink-3); font-size: 0.85rem; }
@media (max-width: 640px) {
  .queue-grid, .winners { grid-template-columns: 1fr; }
  .reels { grid-template-columns: repeat(2, 1fr); }
}
.ev-media[hidden] { display: none; }
@media (max-width: 640px) {
  .auth { gap: 10px; margin-left: auto; }
  .auth .hide-sm { display: none; }
  .auth .signout { padding: 6px 10px; font-size: 0.8rem; }
  .site-header .brand { font-size: 1.25rem; }
}

/* ---------- header: show which page or section you're on ---------- */
.nav a { position: relative; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #5A86EB, #BC61E8); }
.nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* ---------- TikTok-style clips: profile grid ---------- */
.pstats { display: flex; gap: 18px; margin-top: 8px; color: var(--ink-3); font-size: .95rem; }
.pstats b { color: var(--ink); font-size: 1.15rem; margin-right: 4px; font-variant-numeric: tabular-nums; }
.grid-tabs { display: flex; gap: 4px; margin: 14px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); overflow-x: auto; scrollbar-width: none; }
.gtab { font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink-3); background: none; border: 0; padding: 10px 16px 12px; cursor: pointer; white-space: nowrap; position: relative; }
.gtab:hover { color: var(--ink-2); }
.gtab.on { color: var(--ink); }
.gtab.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #5A86EB, #BC61E8); }
.gtab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 8px; }
.clip-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.tile { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: radial-gradient(ellipse at 50% 35%, #2a2f7a, #0b0d26 75%); color: #fff; font: inherit; }
.tile.earth { background: radial-gradient(ellipse at 50% 35%, #5a1d17, #160707 75%); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 28%, transparent 62%, rgba(0,0,0,.65)); pointer-events: none; }
.tile:hover video { transform: scale(1.04); transition: transform .3s; }
.tile:focus-visible { outline: 3px solid #c9bdff; outline-offset: 2px; }
.tile-art { position: absolute; inset: 0; display: grid; place-items: center; }
.tile-icon { width: 46%; height: auto; opacity: .85; }
.tile-views { position: absolute; left: 8px; bottom: 7px; z-index: 1; display: flex; align-items: center; gap: 3px; font-weight: 700; font-size: .9rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tile-views svg { width: 16px; height: 16px; fill: #fff; }
.pinned-tag { position: absolute; left: 7px; top: 7px; z-index: 1; padding: 2px 8px; border-radius: 5px; font-size: .75rem; font-weight: 800; background: #ff5fc8; color: #1a0420; }
.tile-marks { position: absolute; right: 6px; top: 6px; z-index: 1; display: flex; gap: 4px; align-items: center; }
.mark-tier { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.mark svg { width: 14px; height: 14px; }
.mark.weekly { background: #f3d38a; color: #3a2600; } .mark.weekly svg { fill: currentColor; }
.mark.loved { background: #ff5fc8; color: #fff; } .mark.loved svg { fill: currentColor; stroke: none; }
.hint-own { margin-top: 14px; color: var(--ink-3); font-size: .9rem; }

/* ---------- badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.badge .b-icon { width: 20px; height: 20px; }
.badge svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.badge.weekly { color: #3a2600; background: linear-gradient(90deg, #ffe7a8, #e8a040); border-color: transparent; padding-left: 9px; }
.badge.loved { background: rgba(255, 95, 200, .85); border-color: transparent; padding-left: 9px; }

/* ---------- full-screen player and For You ---------- */
.no-scroll { overflow: hidden; }
.player-overlay { position: fixed; inset: 0; z-index: 100; background: #05060f; }
.player-close { position: absolute; top: 14px; left: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.player-close svg { width: 22px; height: 22px; }
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(145, 118, 239, .28), transparent 60%), #05060f; }
.slide.earth { background: radial-gradient(ellipse at 50% 40%, rgba(226, 58, 44, .26), transparent 60%), #0b0405; }
.slide-media { position: absolute; inset: 0; display: grid; place-items: center; }
.slide-media video { width: 100%; height: 100%; object-fit: contain; }
.slide-media .media-fallback { position: static; width: auto; height: auto; padding: 30px; }
.tap-pause { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; }
.slide-info { position: absolute; left: 16px; right: 96px; bottom: 22px; z-index: 2; display: grid; gap: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.slide-who { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.05rem; justify-self: start; }
.slide-who .avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; background: #23285c; }
.slide-when { font-size: .85rem; color: rgba(255, 255, 255, .75); }
.rail { position: absolute; right: 12px; bottom: 26px; z-index: 2; display: grid; gap: 16px; justify-items: center; }
.rail-btn, .rail-stat, .like.big { display: grid; justify-items: center; gap: 3px; font: inherit; font-size: .78rem; font-weight: 700; color: #fff; background: none; border: 0; cursor: pointer; padding: 0; min-height: 0; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.rail-stat { cursor: default; }
.rail-btn svg, .rail-stat svg, .like.big svg { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: rgba(255, 255, 255, .14); fill: #fff; box-sizing: border-box; }
.like.big { border: 0; border-radius: 0; }
.like.big svg { stroke: #fff; fill: none; stroke-width: 2; }
.like.big.on svg { fill: #ff5fc8; stroke: #ff5fc8; background: rgba(255, 95, 200, .22); }
.like.big span:empty::before { content: "0"; }
.rail-btn.on svg { background: #ff5fc8; }
.rail-btn:focus-visible svg, .like.big:focus-visible svg { outline: 2px solid #fff; outline-offset: 2px; }
.foryou { height: calc(100dvh - var(--hdr, 64px)); }
.page-feed { height: 100%; }
.feed-loading { padding: 40px 20px; text-align: center; }
@media (min-width: 900px) {
  .slide-media { inset: 24px 120px 24px 24px; }
  .slide-media video { border-radius: 16px; }
  .rail { right: 28px; bottom: 50%; transform: translateY(50%); }
  .slide-info { left: 48px; bottom: 44px; right: 160px; }
}
@media (max-width: 640px) {
  .clip-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .tile { border-radius: 4px; }
  .tile-views { font-size: .8rem; }
  .mark-tier { width: 20px; height: 20px; }
}
.rail { width: 64px; }
.rail > * { width: 100%; }

/* header: links never wrap mid-label; tighter on mid-size screens */
.site-header .nav a { white-space: nowrap; }
/* nine links and the account area don't fit on one row: logo and account on the first row,
   the links on the second (scrolling sideways on narrow screens) */
@media all {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 4px; }
  .site-header .brand { order: 1; }
  .site-header .auth { order: 2; margin-left: auto; }
  .site-header .nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; white-space: nowrap; padding-bottom: 10px; scrollbar-width: none; }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .site-header .nav .hide-sm { display: inline; }
}
