/* ==========================================================================
   DDR Score Tracker
   Dark by default; [data-theme="light"] on <html> flips the token block.
   ========================================================================== */

/* ---------- tokens ---------- */

:root {
  /* Deep teal-blue rather than near-black: the wash sits on top of this at high
     alpha, and a black base would grey the DDR (2014) hues out. */
  --bg: var(--bg-dark);
  --bg-elev: #172c50;
  /* Dark glass, not light: over a vivid wash a white-tinted panel has almost no
     separation, whereas a dark one gives every card a field for its text. Kept
     25% lighter than the contrast-optimal value so the wash still shows through
     and the page keeps its mood. */
  --panel: rgba(8, 18, 40, 0.285);
  --panel-hover: rgba(8, 18, 40, 0.405);
  --line: rgba(255, 255, 255, 0.20);
  --line-soft: rgba(255, 255, 255, 0.13);

  /* Near-white throughout: on a mid-luminance coloured wash, grey secondary
     text disappears, so the hierarchy is carried by size and weight instead. */
  --text: #ffffff;
  --text-dim: #e8eefa;
  --muted: #d5deef;

  --gold: #f5c53d;
  --gold-grad: linear-gradient(100deg, #fff3c4 0%, #f5c53d 34%, #d99a1c 62%, #ffe89a 100%);

  --accent: #7ceaff;
  --accent-ink: #06070c;
  /* Brightened so they still separate from the violet end of the wash. */
  --expert: #93e896;
  --challenge: #e2adff;

  /* Strong enough to read as movement against the wash beneath. Colours come
     from the active mix palette (see "background palettes"). */
  --glow-a: rgb(var(--c1) / 0.26);
  --glow-b: rgb(var(--c2) / 0.22);
  --glow-c: rgb(var(--c3) / 0.30);
  /* Cyan end kept; the blue end lifted so the bars don't go muddy on the panel. */
  --grade: linear-gradient(90deg, #6f95ec 0%, #35c8f0 58%, #a6f4ff 100%);

  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: var(--sans);
  /* Pixel display face — small on the body, so anything using it gets a size
     bump and looser tracking to stay legible. */
  --headline: "Jersey 10", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1360px;
  --gut: 40px;
  --radius: 14px;
  --header-h: 72px;
  --player-h: 60px;
}

[data-theme="light"] {
  --bg: #f8fafd;
  --bg-elev: #ffffff;
  --panel: rgba(10, 14, 30, 0.028);
  --panel-hover: rgba(10, 14, 30, 0.055);
  --line: rgba(10, 14, 30, 0.13);
  --line-soft: rgba(10, 14, 30, 0.07);

  --text: #0a0d16;
  --text-dim: #3d445c;
  --muted: #5b6278;

  --accent: #0d7f99;
  --accent-ink: #ffffff;
  --expert: #2f8f45;
  --challenge: #8a3fc0;

  /* Same mix palette, kept faint so the page stays bright. */
  --glow-a: rgb(var(--c1) / 0.22);
  --glow-b: rgb(var(--c2) / 0.22);
  --glow-c: rgb(var(--c3) / 0.24);
  --grade: linear-gradient(90deg, #1146b8 0%, #0d7f99 60%, #16b6cf 100%);

  --shadow: 0 20px 50px rgba(16, 24, 48, 0.14);

  --gold: #a97400;
  --gold-grad: linear-gradient(100deg, #c99512 0%, #a97400 40%, #8a5c00 70%, #c99512 100%);
}

/* ---------- background palettes ---------- */

/**
 * The wash and the drifting blobs are built from three colours, so switching the
 * background music also switches the background: app.js writes the mix's key to
 * `data-mix` on <html> and the palette below takes over. `--c1/2/3` are raw
 * "r g b" triples so both themes can re-use them at their own alphas.
 *
 * DDR (2013) is the default palette in :root. Every other palette is keyed to
 * that release's own artwork.
 */
:root,
[data-mix="ddr-2013"] {
  --c1: 20 231 226;      /* cyan   */
  --c2: 56 150 246;      /* azure  */
  --c3: 168 104 242;     /* violet */
  --bg-dark: #123048;
}
[data-mix="ddr-extreme"] {           /* neon violet / blue / teal */
  --c1: 168 92 246;
  --c2: 70 104 240;
  --c3: 32 206 196;
  --bg-dark: #17123a;
}
[data-mix="ddr-supernova2"] {        /* icy blue and white */
  --c1: 176 232 255;
  --c2: 63 169 245;
  --c3: 32 78 190;
  --bg-dark: #0d2145;
}
[data-mix="ddr-x"] {                 /* orange, amber, ember */
  --c1: 255 216 74;
  --c2: 255 138 30;
  --c3: 217 58 22;
  --bg-dark: #34190a;
}
[data-mix="ddr-x2"] {                /* lime green into magenta */
  --c1: 182 240 90;
  --c2: 69 201 140;
  --c3: 224 36 139;
  --bg-dark: #10301f;
}
[data-mix="ddr-a"] {                 /* bright sky blue */
  --c1: 191 233 255;
  --c2: 56 168 240;
  --c3: 24 78 206;
  --bg-dark: #0b2450;
}
[data-mix="ddr-a20"] {               /* gold into deep purple */
  --c1: 255 216 107;
  --c2: 224 162 51;
  --c3: 122 63 191;
  --bg-dark: #241a3d;
}
[data-mix="ddr-world"] {             /* spring green */
  --c1: 140 255 210;
  --c2: 0 222 139;
  --c3: 11 127 99;
  --bg-dark: #05301f;
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-bottom: var(--player-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  /* The dark theme's wash is deliberately vivid, so small text gets a tight
     shadow to stay readable over the brighter cyan band. */
  text-shadow: 0 1px 2px rgba(4, 12, 30, 0.45);
}
[data-theme="light"] body { text-shadow: none; }

img { max-width: 100%; display: block; }
/* `display` on a component class otherwise beats the [hidden] default. */
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Small caps mono label — the recurring POGO device. */
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------- ambient glow ---------- */

/**
 * Three coloured blobs drifting around the viewport on long, offset loops, so
 * the gradient never repeats the same arrangement twice in a row — the violet
 * sweeps bottom-left → bottom-right → top-right and back while the cyan and
 * azure travel their own paths. Animating `transform` only keeps it on the
 * compositor; the whole layer sits behind everything at z-index -1.
 */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transition: opacity .35s ease;
}
[data-theme="light"] .glow { opacity: .5; }

/**
 * The DDR (2014) screen is fundamentally a vertical wash — cyan at the top,
 * azure through the middle, violet at the base — and the drifting blobs alone
 * could never reproduce that, which is why the page kept reading as flat navy.
 * This fixed layer supplies the wash; the blobs move over the top of it.
 */
.glow::before {
  content: "";
  position: absolute;
  inset: -10%;
  /* Built from the active mix palette. Tuned for the DDR mood at the owner's
     explicit request rather than the contrast-safe version: text over the top
     band sits around 3.6:1, which carries the large hero type but is under AA
     for body copy — the shadow on `body` is what keeps small text readable. */
  background: linear-gradient(178deg,
    rgb(var(--c1) / 0.55) 0%,
    rgb(var(--c1) / 0.55) 18%,
    rgb(var(--c2) / 0.52) 50%,
    rgb(var(--c3) / 0.58) 84%,
    rgb(var(--c3) / 0.62) 100%);
}
[data-theme="light"] .glow::before { display: none; }

.glow__blob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78vmax;
  height: 78vmax;
  margin: -39vmax 0 0 -39vmax;
  border-radius: 50%;
  will-change: transform;
}
/**
 * Each blob orbits the centre rather than hopping between corners: the outer
 * span carries a steady `rotate` and the inner one an offset, so `rotate(A)
 * translate(R)` sweeps a circle. Different radii, directions and a slow scale
 * breath on an unrelated period keep it from looking like a turntable.
 */
.glow__blob {
  animation: orbit 21s linear infinite;
}
.glow__blob i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: breathe 15s ease-in-out infinite;
}
.glow__blob--cyan   { animation-duration: 21s; }
.glow__blob--cyan i {
  background: radial-gradient(circle closest-side, var(--glow-a), transparent 72%);
  transform: translate(26%, 0);
  animation-duration: 15s;
}
.glow__blob--azure   { animation-duration: 26s; animation-direction: reverse; }
.glow__blob--azure i {
  background: radial-gradient(circle closest-side, var(--glow-b), transparent 72%);
  transform: translate(34%, 0);
  animation-duration: 19s;
}
.glow__blob--violet   { animation-duration: 23s; }
.glow__blob--violet i {
  background: radial-gradient(circle closest-side, var(--glow-c), transparent 72%);
  transform: translate(30%, 0);
  animation-duration: 17s;
}

@keyframes orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* Applied to the inner span, which already carries the orbit offset. */
@keyframes breathe {
  0%, 100% { scale: 1; }
  50%      { scale: 1.18; }
}

/* ---------- header ---------- */

/* Frosted glass: a heavy blur over a translucent tint, a hairline top highlight
   for the "lit edge", and a soft drop shadow so it floats over the gradient. */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  /* A light tint, never a dark one: over the vivid wash a `--bg` tint would
     read as a dark band across the top of the page. This lifts instead. */
  background: rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid var(--line);
}
.header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(255, 255, 255, .22) 22%,
    rgba(255, 255, 255, .22) 78%, transparent);
  pointer-events: none;
}
[data-theme="light"] .header {
  background: color-mix(in srgb, #ffffff 55%, transparent);
}
[data-theme="light"] .header::before {
  background: linear-gradient(90deg,
    transparent, rgba(255, 255, 255, .8) 22%,
    rgba(255, 255, 255, .8) 78%, transparent);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 34px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: none;
}
.logo__mark {
  width: 41px;
  height: 41px;
  object-fit: contain;
  transition: transform .25s cubic-bezier(.3,1.4,.5,1);
}
.logo:hover .logo__mark { transform: translateY(-2px); }
/* Wordmark with the build version tucked under it. */
.logo__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1;
}
.logo__word {
  font-family: var(--headline);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  color: var(--text);
}
.logo__ver {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: var(--header-h);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color .2s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link svg { width: 15px; height: 15px; opacity: .75; }

.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.header__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--panel-hover); border-color: var(--line); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }

/* Track-and-knob switch. Both icons stay visible on the track; the knob slides
   over whichever mode is active. */
.theme-toggle {
  position: relative;
  width: 66px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  transition: background-color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { background: var(--panel-hover); }
.theme-toggle svg {
  width: 15px;
  height: 15px;
  position: relative;
  z-index: 1;
  margin: 0 8px;
  color: var(--muted);
  transition: color .25s ease;
}
.theme-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .28s cubic-bezier(.3,1.3,.5,1);
}
/* Dark is the default: knob left, over the moon. */
.theme-toggle .theme-toggle__moon { color: var(--accent-ink); }
[data-theme="light"] .theme-toggle .theme-toggle__moon { color: var(--muted); }
[data-theme="light"] .theme-toggle .theme-toggle__sun { color: var(--accent-ink); }
[data-theme="light"] .theme-toggle .theme-toggle__knob { transform: translateX(32px); }

.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero { padding: 72px 0 40px; text-align: center; }

/* Page headers that sit on one row: title flush left with the first card in the
   grid below, blurb flush right with the last. */
.hero--row { text-align: left; padding: 44px 0 22px; }
.hero--row .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.hero--row .hero__title { margin: 0; white-space: normal; }
.hero--row .hero__sub {
  margin: 0;
  text-align: right;
  max-width: 46ch;
  flex: 0 1 auto;
}

.hero__logo {
  width: 240px;
  max-width: 62vw;
  height: auto;
  margin: 0 auto 26px;
}
[data-theme="light"] .hero__logo { filter: none; }

.hero__title {
  font-family: var(--headline);
  font-weight: 400;
  /* Sized off the viewport so the line fits across without wrapping; the vw
     term is what keeps it a single row on any desktop width. */
  /* Jersey 10's cap height is 0.536em against Inter's 0.727, so it still needs a
     large size to read at the same optical scale. The headline measures 11.84em
     wide, so the one-line fit has plenty of headroom at this scale. */
  font-size: clamp(32px, 5.6vw, 77px);
  line-height: 1.1;
  letter-spacing: .01em;
  margin: 10px 0 0;
  margin-inline: auto;
}
.hero__title em { font-style: italic; color: var(--accent); }

@media (min-width: 821px) {
  .hero__title { white-space: nowrap; }
}

/* The title doubles as a play button for the announcer clip. */
.hero__sfx {
  font: inherit;
  font-style: italic;
  background: none;
  border: 0;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  color: inherit;
  border-radius: 8px;
  transition: filter .25s ease;
}
.hero__sfx:hover,
.hero__sfx:focus-visible,
.hero__sfx.is-playing {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px color-mix(in srgb, var(--gold) 45%, transparent));
}

/* Tooltip pinned to the pointer (positioned in home.js), sitting above it. */
.cursor-tip {
  position: fixed;
  z-index: 60;
  transform: translate(-50%, -100%);
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  box-shadow: var(--shadow);
  color: var(--gold);
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .02em;
  max-width: min(380px, 80vw);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.cursor-tip.is-on { opacity: 1; }

.hero__sub {
  margin: 18px auto 0;
  max-width: 58ch;
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- hero capsules ---------- */

.capsules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;   /* 30% tighter to the headline than before */
}
.capsules + .capsules { margin-top: 10px; }
.capsules--metric { margin-top: 16px; }

.capsule {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.capsule strong {
  color: var(--text);
  font-weight: 600;
  letter-spacing: .04em;
}
.capsule--latest {
  text-transform: none;
  letter-spacing: .02em;
  font-size: 12px;
}
.capsule--latest .capsule__label {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
  color: var(--muted);
}
.capsule--esp {
  color: var(--expert);
  border-color: color-mix(in srgb, var(--expert) 42%, transparent);
  background: color-mix(in srgb, var(--expert) 13%, transparent);
}
.capsule--esp strong { color: var(--expert); }
.capsule--csp {
  color: var(--challenge);
  border-color: color-mix(in srgb, var(--challenge) 42%, transparent);
  background: color-mix(in srgb, var(--challenge) 13%, transparent);
}
.capsule--csp strong { color: var(--challenge); }

/* ---------- hero metrics (POGO 2: numbers as the headline) ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 48px;
}

.metric { padding: 34px 26px 30px; text-align: center; position: relative; }
.metric + .metric::before {
  content: "";
  position: absolute; left: 0; top: 26px; bottom: 26px;
  width: 1px; background: var(--line);
}

.metric__value {
  font-size: clamp(44px, 7.4vw, 92px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
}
/* Number plus the AAA emblem on one baseline. The mark is sized in `em` so it
   tracks the number's clamped font-size at 60% of its height. */
.metric__value--mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
}
.metric__mark {
  height: 0.9em;
  width: auto;
  flex: none;
  filter: drop-shadow(0 2px 10px rgba(255, 206, 92, 0.28));
}

.metric__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
  display: block;
}
/* Matches .capsule exactly so every pill under a metric is the same size,
   whatever it says. */
.metric__note {
  display: inline-flex;
  align-items: baseline;
  margin-top: 16px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  backdrop-filter: blur(10px);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- section shell ---------- */

.section { padding: 64px 0; }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.section__title {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin: 8px 0 0;
}
/* No max-width, so a blurb sits on one line wherever the row has the space and
   wraps only when it genuinely runs out. `margin: 0` matters as much as the
   width: a default <p> bottom margin would sit under the last line and throw
   out every bottom alignment in the header row. */
.section__note {
  color: var(--muted);
  font-size: 13px;
  max-width: none;
  margin: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}

/* ---------- stat rail (POGO 1: serif numbers down the left) ---------- */

.rail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 48px;
  align-items: start;
}

/* Inside the two-column rail grid the section head must not bottom-align, or
   its eyebrow drops below the one in the left column — but the sort control
   still drops to sit on the same baseline as the note beneath the title. */
.rail-grid .section__head { align-items: flex-start; }
.rail-grid .section__head .seg { align-self: flex-end; }

.rail { display: grid; gap: 2px; }

/* No permanent highlight on any row — the accent is a hover affordance only,
   picking up both the rule and the number. */
.rail__item {
  position: relative;
  padding: 18px 0 18px 22px;
  border-left: 2px solid var(--line-soft);
  transition: border-color .3s ease;
}
.rail__item:hover { border-left-color: var(--accent); }
.rail__item:hover .rail__value { color: var(--accent); }

.rail__value {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: block;
}
.rail__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 9px;
  display: block;
}

/* ---------- bar chart (POGO 3) ---------- */

/* Segmented control for the level chart's sort order. */
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.bars { display: grid; gap: 2px; }

.bar-row {
  display: grid;
  grid-template-columns: 68px 1fr 88px;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.bar-row:last-child { border-bottom: 0; }

.bar-row__key {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--text-dim);
}

.bar-row__track { position: relative; height: 30px; }
.bar-row__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 3px;
  background: var(--grade);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: width 1.1s cubic-bezier(.22,.9,.24,1);
  min-width: 34px;
}
/* Chart numerals sit on their own fill or on the panel, so they don't need the
   page-wide shadow — it only muddies them at this size. */
.bar-row__fill span {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #04121c;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.bar-row__meta { text-shadow: none; }
/* The light-theme gradient is dark, so the count flips to white to stay legible. */
[data-theme="light"] .bar-row__fill span { color: #fff; }
.bar-row__meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- proportion circles (POGO 4) ---------- */

.circles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 26px 18px;
}
.circle-cell { text-align: center; }
.circle-cell__disc {
  width: 100%;
  max-width: 128px;
  aspect-ratio: 1;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--panel-hover);
  display: grid;
  place-items: center;
}
.circle-cell__inner {
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #8ef0ff, var(--accent) 62%, #2a6df5 100%);
  width: 0; height: 0;
  transition: width 1s cubic-bezier(.22,.9,.24,1), height 1s cubic-bezier(.22,.9,.24,1);
}
.circle-cell__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.circle-cell__value {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

/* ---------- hall of fame strip ---------- */

.hof {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.hof__card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.hof__card:hover {
  background: var(--panel-hover);
  border-color: var(--line);
  transform: translateY(-2px);
}

.hof__jacket {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--line-soft);
  background: var(--bg-elev);
  display: grid;
  place-items: center;
}
.hof__jacket img { width: 100%; height: 100%; object-fit: cover; }
.hof__jacket .jacket-ph > span { font-size: 22px; }
.hof__body { min-width: 0; display: block; }
.hof__title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hof__meta {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .05em;
  margin-top: 4px;
}
/* The two numbers that actually matter carry the gold. */
.hof__meta b {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- records: toolbar ---------- */

/* Same frosted glass as the header, so the two stacked bars read as one unit. */
.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(6, 16, 38, 0.18);
  padding: 14px 0;
}
[data-theme="light"] .toolbar {
  background: color-mix(in srgb, #ffffff 55%, transparent);
  box-shadow: 0 8px 30px rgba(24, 32, 64, 0.10);
}
.toolbar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}
.search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.search input::placeholder { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

.chips { display: flex; gap: 6px; }
.chip {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text-dim);
  transition: all .2s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip:hover { background: var(--panel-hover); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; }
.chip--esp .chip__dot { background: var(--expert); }
.chip--csp .chip__dot { background: var(--challenge); }

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select select {
  appearance: none;
  height: 42px;
  padding: 0 36px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.select select option { background: var(--bg-elev); color: var(--text); text-transform: none; }
.select::after {
  content: "";
  position: absolute; right: 15px; top: 50%;
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}


/* ---------- records: list ---------- */

.records { padding: 28px 0 80px; }

.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.record {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  text-align: left;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.record:hover {
  background: var(--panel-hover);
  border-color: var(--line);
  transform: translateY(-2px);
}

.record__jacket {
  width: 62px; height: 62px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--panel-hover), transparent),
    var(--bg-elev);
  border: 1px solid var(--line-soft);
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
}
.record__jacket img { width: 100%; height: 100%; object-fit: cover; }

/* Around 100 of the older songs pre-date DDR's square jacket art and have no
   artwork in any source. Rather than an empty tile they get a generated one:
   the hue is derived from the title, so a song always looks the same. */
.jacket-ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg,
      hsl(var(--ph-h) 62% 32%) 0%,
      hsl(calc(var(--ph-h) + 38) 58% 16%) 100%);
  position: relative;
}
.jacket-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), transparent 58%);
}
/* Songs from before the jacket era still have their wide banner. Shown whole
   (contain) on the generated tile rather than cropped to a square, so the
   artwork stays readable. */
.jacket-ph img {
  position: relative;
  z-index: 1;
  /* Overscanned a little so the artwork is legible in a 62px tile — the tile
     clips the ends rather than shrinking the banner to a sliver. */
  width: 132%;
  max-width: none;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
}

.jacket-ph > span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
  position: relative;
  z-index: 1;
}
[data-theme="light"] .jacket-ph {
  background:
    linear-gradient(145deg,
      hsl(var(--ph-h) 58% 58%) 0%,
      hsl(calc(var(--ph-h) + 38) 52% 38%) 100%);
}

/* The card is built from <span>s inside a <button>; grid only blockifies its
   direct children, so the nested ones need it spelled out or ellipsis and
   wrapping silently do nothing. */
.record__body { min-width: 0; display: block; }
.record__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record__alt {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
/* One line only: the origin is the flexible part and truncates first, so every
   card in a row keeps the same height. */
.record__tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  min-width: 0;
}
.record__tags .pill--origin {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record__tags .pill--esp,
.record__tags .pill--csp,
.record__tags .pill--lvl { flex: none; }

.pill {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  line-height: 1.4;
}
.pill--esp { color: var(--expert); background: color-mix(in srgb, var(--expert) 16%, transparent); }
.pill--csp { color: var(--challenge); background: color-mix(in srgb, var(--challenge) 16%, transparent); }
.pill--lvl { color: var(--text-dim); background: var(--panel-hover); }
.pill--origin { color: var(--muted); background: transparent; padding-left: 0; letter-spacing: .08em; }

.record__score { display: block; text-align: right; flex: none; padding-right: 4px; }
.record__score-value {
  display: block;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.record__score-sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  margin-top: 3px;
}
.record--sdp .record__score-value { color: var(--accent); }

.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- detail drawer (POGO 5) ---------- */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 4, 8, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.drawer-scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 61;
  width: min(560px, 100%);
  background: var(--bg-elev);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.3,.9,.25,1);
  overflow-y: auto;
  padding: 34px 38px 60px;
}
.drawer.is-open { transform: none; }

.drawer__close {
  position: absolute;
  top: 22px; right: 24px;
}

.drawer__jacket {
  width: 132px; height: 132px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 22px;
  display: grid; place-items: center;
}
.drawer__jacket img { width: 100%; height: 100%; object-fit: cover; }
.drawer__jacket .jacket-ph > span { font-size: 56px; }

.drawer__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}
.drawer__alt { color: var(--muted); font-size: 13px; margin-top: 6px; }

.drawer__score {
  margin: 26px 0 8px;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.drawer__score small {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}

.spec {
  margin: 30px 0 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12.5px;
}
.spec div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.spec dt { color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-size: 10.5px; }
.spec dd { margin: 0; }

.drawer__prose {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-dim);
}
/* ---------- drawer: proof photo ---------- */

.proof {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.proof__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.proof__tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.proof__frame {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  cursor: zoom-in;
}
.proof__frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .5s cubic-bezier(.22,.9,.24,1);
}
.proof__frame:hover img { transform: scale(1.02); }
.proof__caption {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

/* Click-to-enlarge overlay. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(3, 4, 8, .88);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  /* Sized against the viewport rather than the grid area, which would let a
     tall photo overflow the screen. */
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.drawer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.drawer__link:hover { text-decoration: underline; }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 400px);
  gap: 64px;
  align-items: start;
}
.prose { max-width: 62ch; }
.prose p { color: var(--text-dim); font-size: 15.5px; line-height: 1.75; }
.prose p + p { margin-top: 1.15em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 44px 0 10px;
}

.aside-card { padding: 26px 28px; }
.aside-card + .aside-card { margin-top: 14px; }

/* ---------- about: section tabs ---------- */

/* Sized to its tabs rather than the content column, so the rule under them ends
   where the last tab does. */
.tabs {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.tabs__btn {
  position: relative;
  border: 0;
  background: none;
  padding: 12px 16px 14px;
  border-radius: 10px 10px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.tabs__btn:hover { color: var(--text); background: var(--panel); }
.tabs__btn[aria-selected="true"] { color: var(--text); }
/* Full-bleed to the button box, so the active rule matches the hover shape
   exactly instead of sitting inset from it. */
.tabs__btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}
/* "Coming soon" — present in the row but inert. */
.tabs__btn[disabled] { cursor: default; opacity: .75; }
.tabs__btn[disabled]:hover { color: var(--muted); background: none; }
.tabs__soon {
  display: inline-block;
  margin-left: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .1em;
}

.tab-panel[hidden] { display: none !important; }
.tab-panel { animation: tabIn .32s ease both; }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- about: the room ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.photo-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  aspect-ratio: 4 / 3;
}
.photo-grid figure:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.9,.24,1);
}
.photo-grid figure:hover img { transform: scale(1.04); }
/* Stand-in tile for a slot with no photo chosen yet. */
.photo-grid figure.is-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg,
      hsl(var(--ph-h, 200) 52% 30%) 0%,
      hsl(calc(var(--ph-h, 200) + 44) 48% 16%) 100%);
}
.photo-grid figure.is-placeholder span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  text-align: center;
  padding: 0 14px;
  line-height: 1.7;
}

.photo-grid figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 2px 0;
}

/* ---------- music player ---------- */

.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  height: var(--player-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  /* Same light glass as the header — a dark bar would read as a band across the
     bottom of the wash rather than as part of the chrome. */
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-top: 1px solid var(--line);
}
[data-theme="light"] .player {
  background: color-mix(in srgb, #ffffff 78%, transparent);
}

.player__btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  flex: none;
  transition: background-color .2s ease, transform .15s ease;
}
.player__btn:hover { background: var(--panel-hover); }
.player__btn:active { transform: scale(.92); }
.player__btn svg { width: 14px; height: 14px; }
.player__btn--play { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.player__btn--play:hover { background: var(--accent); filter: brightness(1.08); }

.player__icon--pause, .player__btn.is-playing .player__icon--play { display: none; }
.player__btn.is-playing .player__icon--pause { display: block; }

.player__icon--muted { display: none; }
.player__btn.is-muted .player__icon--muted { display: block; }
.player__btn.is-muted .player__icon--sound { display: none; }

.player__meta { min-width: 0; flex: 1 1 auto; }
.player__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.player__track {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/**
 * Mix picker. A native <select> can't have its option list styled, so this is a
 * custom listbox: a bare-text trigger that matches the "now playing" line, and
 * a glass panel that opens upward — the bar is pinned to the bottom.
 */
.mixpick { position: relative; margin: 1px 0 0 -8px; }

.mixpick__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 3px 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  max-width: 230px;
  transition: background-color .2s ease, border-color .2s ease;
}
.mixpick__btn:hover,
.mixpick[data-open="true"] .mixpick__btn {
  background: var(--panel-hover);
  border-color: var(--line);
}
.mixpick__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mixpick__caret {
  width: 12px; height: 12px; flex: none;
  color: var(--muted);
  transition: transform .22s ease;
}
.mixpick[data-open="true"] .mixpick__caret { transform: rotate(180deg); }

.mixpick__menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 55;
  min-width: 210px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--shadow);
  transform-origin: bottom left;
  animation: mixpickIn .18s ease both;
}
@keyframes mixpickIn {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.mixpick__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.mixpick__opt:hover,
.mixpick__opt:focus-visible { background: var(--panel-hover); color: var(--text); }
.mixpick__opt[aria-selected="true"] { color: var(--accent); }

/* Each release's own palette, as a swatch. */
.mixpick__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex: none;
  border: 1px solid rgb(255 255 255 / .25);
  background: linear-gradient(135deg,
    rgb(var(--c1)) 0%, rgb(var(--c2)) 50%, rgb(var(--c3)) 100%);
}

.player__hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  flex: none;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.player__hint[hidden] { display: none; }

#yt-host {
  position: fixed;
  width: 1px; height: 1px;
  left: -100px; bottom: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .rail-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 820px) {
  :root { --gut: 20px; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 14px;
    /* The panel is anchored below the header, so translating by a percentage of
       its own height does not clear the viewport — at three links it left a
       20px sliver of itself showing above the header. Offsetting by the header
       height as well is exact at any menu height, and `visibility` also stops
       the drop shadow bleeding down onto the page. */
    transform: translateY(calc(-100% - var(--header-h)));
    visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
    box-shadow: var(--shadow);
  }
  .nav.is-open {
    transform: none;
    visibility: visible;
    transition: transform .3s ease, visibility 0s;
  }
  .nav__link { height: 50px; padding-inline: 20px; }
  .nav__link[aria-current="page"]::after { left: 20px; right: auto; width: 22px; bottom: 8px; }

  .nav-toggle { display: grid; }
  .logo__text { display: none; }

  .metrics { grid-template-columns: 1fr; }
  .metric + .metric { border-top: 1px solid var(--line); }
  .metric + .metric::before { display: none; }

  .bar-row { grid-template-columns: 54px 1fr; }
  .bar-row__meta { display: none; }

  .record-grid { grid-template-columns: 1fr; }
  .drawer { padding: 28px 22px 60px; }
  
  /* Two controls per row instead of one each. */
  .search { flex: 1 1 100%; }
  .chips { width: 100%; }
  .chip { flex: 1 1 auto; justify-content: center; padding-inline: 10px; }
  .select { flex: 1 1 calc(50% - 5px); }
  .select select { width: 100%; font-size: 10.5px; letter-spacing: .06em; }
  /* "All difficulties" is the longest label — give it the whole row. */
  .select--wide { flex: 1 1 100%; }

  /* Only the transport and the track name survive at this width; the label,
     meter and volume slider would push the bar past its fixed height. */
  .player { gap: 10px; padding-inline: 14px; }
  .player__volume, .player__eq, .player__label { display: none; }
  .player__track { font-size: 12px; }
  .player__hint { padding: 5px 10px; letter-spacing: .08em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
