/* Trackboard
   Radius rule: interactive controls (buttons, chips, tags, segmented) are full pill;
   surfaces (cards, panels, tiles) use --r (16px); inputs use --r-sm (10px). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jbmono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #f3f4f1;
  --bg-2: #e9ebe6;
  --surface: #fbfbf9;
  --surface-2: #ffffff;
  --line: rgb(18 20 16 / .1);
  --line-strong: rgb(18 20 16 / .2);
  --text: #121410;
  --muted: #565b55;
  --accent: #c6f432;
  --accent-ink: #141a00;
  --accent-text: #4a6400;
  --shadow: 0 1px 0 rgb(255 255 255 / .7) inset, 0 12px 32px -18px rgb(40 48 20 / .35);
  --r: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0e10;
    --bg-2: #131518;
    --surface: #16181b;
    --surface-2: #1c1f23;
    --line: rgb(237 240 230 / .09);
    --line-strong: rgb(237 240 230 / .18);
    --text: #eceee6;
    --muted: #9a9e98;
    --accent-text: #c6f432;
    --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 20px 40px -24px rgb(0 0 0 / .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0e10;
  --bg-2: #131518;
  --surface: #16181b;
  --surface-2: #1c1f23;
  --line: rgb(237 240 230 / .09);
  --line-strong: rgb(237 240 230 / .18);
  --text: #eceee6;
  --muted: #9a9e98;
  --accent-text: #c6f432;
  --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 20px 40px -24px rgb(0 0 0 / .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: .85em; background: var(--bg-2); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; z-index: 30; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); }

/* Type */
.display {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  font-weight: 850;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0;
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--accent-text); }
.h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; font-stretch: 108%; letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.h3 { font-size: 1.15rem; font-weight: 750; letter-spacing: -.01em; margin: 0; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 46ch; }

/* Nav (z-index scale: nav 20, toast 25, skip 30) */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.nav__in { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__word { font-weight: 850; font-stretch: 115%; letter-spacing: -.03em; font-size: 1.15rem; }
.brand__mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; }
.brand__mark i { width: 4px; background: var(--accent-text); border-radius: 2px; }
.brand__mark i:nth-child(1) { height: 45%; } .brand__mark i:nth-child(2) { height: 100%; }
.brand__mark i:nth-child(3) { height: 70%; } .brand__mark i:nth-child(4) { height: 35%; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  text-decoration: none; font-weight: 700; font-size: .9rem; letter-spacing: .01em;
  padding: 8px 14px; border-radius: 999px; color: var(--muted); transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--bg-2); }
.nav__links a[aria-current] { color: var(--accent-ink); background: var(--accent); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; display: grid; place-items: center; cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--bg-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 13px 22px; border-radius: 999px; font-weight: 750; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: color-mix(in oklab, var(--accent) 88%, white); }
.btn--accent i { transition: transform .25s var(--ease); }
.btn--accent:hover i { transform: translateX(3px); }
.btn--ghost { border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { background: var(--bg-2); }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent-text); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link--danger { color: #d1453b; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy { display: grid; gap: 24px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.deck { position: relative; }
.eq {
  height: 96px; margin: 0 18px -1px; display: flex; align-items: flex-end; gap: 5px;
  pointer-events: none;
}
.eq i {
  flex: 1; border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), color-mix(in oklab, var(--accent) 20%, transparent));
  height: var(--h, 50%);
  transform-origin: bottom;
}
.deck__card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 18px;
}
.deck__head { display: grid; gap: 2px; }
.deck__tag { font-size: .8rem; font-weight: 700; color: var(--accent-text); }
.deck__title { font-size: 1.5rem; font-weight: 850; font-stretch: 112%; letter-spacing: -.03em; text-decoration: none; }
.deck__list { display: grid; gap: 4px; }
.deck__list li { display: grid; grid-template-columns: 30px 108px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; }
.deck__list li + li { border-top: 1px solid var(--line); }
.deck__list .mono { color: var(--muted); font-size: .85rem; }
.deck__slot { font-size: .85rem; color: var(--muted); }
.deck__song { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck__more { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; color: var(--accent-text); }

/* Class tiles: one wide, one narrow, each with its own pattern */
.classes { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; padding-bottom: clamp(56px, 8vw, 104px); }
.class-tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 18px; align-content: start;
  padding: clamp(22px, 3vw, 36px); border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  transition: transform .35s var(--ease), border-color .3s;
}
.class-tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.class-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9; }
.class-tile--bodypump::before {
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--accent) 38%, transparent), transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 46px, var(--line) 46px 47px);
}
.class-tile--rpm::before {
  background:
    radial-gradient(90% 80% at 0% 100%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 60%),
    repeating-linear-gradient(-58deg, transparent 0 18px, var(--line) 18px 19px);
}
.class-tile__top { display: flex; justify-content: space-between; align-items: center; }
.class-tile__kind { font-weight: 700; font-size: .9rem; color: var(--muted); }
.class-tile__go {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 1.1rem; transition: transform .35s var(--ease);
}
.class-tile:hover .class-tile__go { transform: rotate(45deg); }
.class-tile__name { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.045em; line-height: .95; margin: 0; }
.class-tile__blurb { max-width: 40ch; color: var(--muted); }
.stats { display: flex; gap: clamp(20px, 3vw, 40px); margin: 0; }
.stats div { display: grid; gap: 0; }
.stats dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font-size: 1.6rem; font-weight: 700; }
.slot-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-strip li { font-size: .78rem; font-weight: 650; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: color-mix(in oklab, var(--surface) 70%, transparent); display: inline-flex; gap: 6px; }
.slot-strip .mono { color: var(--muted); }

/* Leaderboard rails */
.board { display: grid; gap: 28px; padding-bottom: clamp(64px, 9vw, 120px); }
.board__row { display: grid; gap: 14px; }
.board__label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px;
  scrollbar-width: thin;
}
.rail li { scroll-snap-align: start; }
.leader {
  height: 100%; display: grid; grid-template-rows: auto 1fr auto auto; gap: 6px;
  padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; min-height: 178px; transition: border-color .25s, transform .3s var(--ease);
}
.leader:hover { border-color: var(--accent-text); transform: translateY(-2px); }
.leader__slot { font-size: .82rem; font-weight: 700; color: var(--muted); }
.leader__song { font-size: 1.12rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; align-self: end; }
.leader__meta { font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader__foot { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 700; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); }
.leader__foot .mono { color: var(--accent-text); }
.leader--empty { background: transparent; border-style: dashed; }
.leader--empty .leader__song { color: var(--muted); }

/* Page header */
.phead { padding: clamp(28px, 5vw, 56px) 0 28px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate; }
.phead::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.phead--bodypump::before { background: radial-gradient(60% 120% at 100% 0%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%); }
.phead--rpm::before { background: radial-gradient(60% 120% at 100% 100%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%), repeating-linear-gradient(-58deg, transparent 0 22px, var(--line) 22px 23px); mask-image: linear-gradient(to left, #000, transparent 70%); }
.crumbs { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.crumbs a { text-decoration: none; font-weight: 650; }
.crumbs a:hover { color: var(--text); }
.phead__name { font-size: clamp(2.8rem, 8vw, 6.2rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.05em; line-height: .95; margin: 0 0 22px; }
.phead__num { font-weight: 700; font-stretch: 100%; color: var(--accent-text); letter-spacing: -.06em; }
.phead__row { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.stats--inline dd { font-size: 1.3rem; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); gap: 2px; }
.seg a, .seg button {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: .9rem; color: var(--muted);
  border: 0; background: none; cursor: pointer; white-space: nowrap;
}
.seg a:hover, .seg button:hover { color: var(--text); }
.seg [aria-current], .seg [aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.seg--sm a, .seg--sm button { padding: 7px 13px; font-size: .85rem; }

/* Slot view */
.slotview { padding: 22px 0 clamp(56px, 8vw, 96px); display: grid; gap: 26px; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 10px;
  scrollbar-width: thin; mask-image: linear-gradient(to right, #000 92%, transparent);
}
.chip {
  scroll-snap-align: start; flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none;
  font-weight: 700; font-size: .9rem; transition: background .2s, border-color .2s;
}
.chip .mono { color: var(--muted); font-size: .8rem; }
.chip:hover { background: var(--bg-2); }
.chip[aria-current] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-current] .mono { color: inherit; opacity: .6; }
.chip--done i { color: var(--accent-text); }
.chip[aria-current].chip--done i { color: var(--accent); }

.slot { display: grid; gap: 22px; }
.slot__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.slot__head .muted { margin-top: 6px; }
.slot__num { color: var(--accent-text); font-weight: 600; }
.slot__tools { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }

.field { display: grid; gap: 6px; }
.field label, .field__label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.field__box { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.field__box:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent); }
.field__box i { color: var(--muted); }
.field__box input { border: 0; outline: 0; background: transparent; padding: 11px 0; min-width: 0; width: 230px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .85; }
.field textarea, .admin__inline input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 10px 12px; font-family: var(--mono); font-size: .85rem; }

.ranks { display: grid; gap: 8px; }
.rank {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto 150px auto; align-items: center; gap: 18px;
  padding: 14px 16px 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .25s, background .25s;
}
.rank:hover { border-color: var(--line-strong); }
.rank--top { background: linear-gradient(100deg, color-mix(in oklab, var(--accent) 16%, var(--surface)), var(--surface) 55%); border-color: color-mix(in oklab, var(--accent-text) 40%, transparent); }
.rank__rel { display: grid; gap: 1px; text-decoration: none; padding-right: 14px; border-right: 1px solid var(--line); }
.rank__relnum { font-size: 1.5rem; font-weight: 700; line-height: 1.05; letter-spacing: -.05em; }
.rank__period { font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rank__rel:hover .rank__relnum { color: var(--accent-text); }
.rank--top .rank__relnum { color: var(--accent-text); }
.rank__pos { color: var(--muted); margin-right: 4px; }
.spot {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; flex: none;
  color: var(--muted); border: 1px solid var(--line); text-decoration: none; font-size: 1.15rem;
  transition: color .2s, border-color .2s;
}
.spot:hover { color: var(--accent-text); border-color: var(--accent-text); }
.deck__period { font-size: .82rem; color: var(--muted); }
.rank__title { font-weight: 750; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.rank__crown { color: var(--accent-text); vertical-align: -1px; }
.rank__artist { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: .78rem; font-weight: 750; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; white-space: nowrap; }
.tag:hover { border-color: var(--accent-text); color: var(--accent-text); }
.rank__score { display: grid; gap: 6px; font-size: .85rem; }
.rank__score b { font-size: 1rem; }
.rank__score [data-share] { color: var(--muted); }
.bar { display: block; height: 4px; width: var(--w); border-radius: 4px; background: var(--accent-text); transition: width .6s var(--ease); }

.vote {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; font-weight: 750; font-size: .9rem; cursor: pointer;
  white-space: nowrap; transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.vote:hover { border-color: var(--accent-text); }
.vote:active { transform: scale(.96); }
.vote.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vote[aria-busy="true"] { opacity: .6; pointer-events: none; }
.vote.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.08); } }

.slotnav { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }

.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 56px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.empty > i { font-size: 2rem; color: var(--accent-text); }
.empty--filter { padding: 28px; }
.empty--page { margin-block: clamp(48px, 10vw, 120px); gap: 14px; }

/* Releases grid */
.releases { padding: 28px 0 clamp(56px, 8vw, 96px); }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.rel {
  position: relative; display: grid; gap: 4px; padding: 20px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-height: 168px;
  transition: transform .3s var(--ease), border-color .25s;
}
.rel:hover { transform: translateY(-3px); border-color: var(--accent-text); }
.rel--new { background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 24%, var(--surface)), var(--surface) 70%); }
.rel__label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.rel__num { font-size: 3.4rem; font-weight: 700; line-height: 1; letter-spacing: -.06em; align-self: end; }
.rel__meta { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.rel__new { position: absolute; top: 16px; right: 16px; font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }

/* Release tracklist */
.tracklist { padding: 28px 0 clamp(56px, 8vw, 96px); display: grid; gap: 20px; }
.tl { display: grid; gap: 8px; }
.tl__row {
  display: grid; grid-template-columns: 40px 140px minmax(0, 1fr) auto auto auto; gap: 18px; align-items: center;
  padding: 14px 16px 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
}
.tl--bonus .tl__row { grid-template-columns: 40px 140px minmax(0, 1fr) auto; background: transparent; }
.tl__pos { color: var(--muted); font-weight: 600; }
.tl__slot { font-weight: 750; font-size: .88rem; text-decoration: none; color: var(--accent-text); }
.tl__slot:hover { text-decoration: underline; text-underline-offset: 3px; }
.tl__slot--muted { color: var(--muted); }
.tl__votes { color: var(--muted); font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.bonus summary { cursor: pointer; font-weight: 750; display: inline-flex; gap: 8px; align-items: center; padding: 8px 0; list-style: none; }
.bonus summary::-webkit-details-marker { display: none; }
.bonus[open] summary i { transform: rotate(45deg); }
.bonus summary i { transition: transform .25s var(--ease); }
.bonus .tl { margin-top: 10px; }

/* Admin */
.admin { padding: 36px 0 80px; display: grid; gap: 18px; }
.admin__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 14px; align-content: start; }
.panel--narrow { max-width: 420px; }
.panel .field__box input { width: 100%; }
.admin__gap { margin-top: 10px; }
.admin__table { display: grid; }
.admin__row { display: grid; grid-template-columns: 90px 1fr 170px auto; gap: 14px; align-items: center; padding: 10px 0; }
.admin__row + .admin__row { border-top: 1px solid var(--line); }
.admin__row a { text-decoration: none; font-weight: 700; }
.admin__inline { display: flex; gap: 8px; align-items: center; }
.admin__inline input { width: 80px; padding: 6px 10px; }
.admin__inline select { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 6px 8px; font-family: var(--mono); font-size: .85rem; }
.admin__row { grid-template-columns: 90px 1fr 250px auto; }
.admin__sp { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; padding: 8px 0; }
.admin__sp + .admin__sp { border-top: 1px solid var(--line); }
.admin__sp input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 9px 12px; font-family: var(--mono); font-size: .8rem; }
@media (max-width: 760px) { .admin__sp { grid-template-columns: 26px 1fr auto; } .admin__sp input { grid-column: 2 / 4; } }
.flash { padding: 12px 16px; border-radius: var(--r-sm); font-weight: 650; }
.flash--ok { background: color-mix(in oklab, var(--accent) 30%, var(--surface)); }
.flash--err { background: color-mix(in oklab, #d1453b 18%, var(--surface)); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.foot__in { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; font-size: .9rem; }
.foot__brand { font-weight: 850; font-stretch: 115%; letter-spacing: -.03em; font-size: 1.1rem; margin-bottom: 8px; }
.foot__note { color: var(--muted); max-width: 52ch; }
.foot__links { display: grid; gap: 6px; color: var(--muted); justify-items: end; text-align: right; }
.foot__links a { color: var(--text); font-weight: 650; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 25; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px;
  font-weight: 700; font-size: .92rem; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .45);
  max-width: calc(100% - 32px);
}

/* Motion: reveal on scroll + equalizer, only when the user allows motion */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .eq i { animation: eq 1.4s var(--ease) infinite alternate; animation-delay: calc(var(--i) * -97ms); }
  .toast:not([hidden]) { animation: toast .35s var(--ease); }
}
@keyframes eq { 0% { transform: scaleY(.35); } 100% { transform: scaleY(1); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Mobile */
@media (max-width: 900px) {
  .hero__grid, .classes, .admin__grid, .foot__in { grid-template-columns: 1fr; }
  .foot__links { justify-items: start; text-align: left; }
  .eq { height: 64px; }
}
@media (max-width: 760px) {
  .nav__in { gap: 10px; }
  .brand__word { display: none; }
  .nav__links a { padding: 8px 11px; font-size: .85rem; }
  .rank { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px; }
  .rank__rel { grid-row: span 2; align-self: start; padding-right: 10px; }
  .rank__relnum { font-size: 1.25rem; }
  .rank__body { grid-column: 2; }
  .rank .spot { grid-column: 3; grid-row: 1; }
  .rank__score { grid-column: 2; grid-row: 2; align-self: center; }
  .rank .vote { grid-column: 3; grid-row: 2; }
  .tl__row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px; }
  .tl__pos { grid-row: span 2; align-self: start; }
  .tl__slot { grid-column: 2; }
  .tl__song { grid-column: 2; }
  .tl__votes { grid-column: 3; grid-row: 1; justify-self: end; }
  .tl .vote { grid-column: 3; grid-row: 2; }
  .tl .spot { grid-column: 2; grid-row: 3; width: 32px; height: 32px; font-size: 1rem; }
  .tl--bonus .tl__row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .tl--bonus .spot { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .slot__tools, .slot__tools .field { width: 100%; }
  .field__box input { width: 100%; }
  .deck__list li { grid-template-columns: 26px 1fr; }
  .deck__slot { display: none; }
  .admin__row { grid-template-columns: 1fr auto; }
  .seg { max-width: 100%; overflow-x: auto; }
}
