/* Contribution song player.
   Colors come from the cover: player.js reads the sleeve color it drew and sets --g (sleeve),
   --g-deep (a darker cut of it for light mode) and the two backgrounds. The values below are
   the defaults for a lime sleeve, used until the script runs. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "JB Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  &:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
  &:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }

  --g: #cbef4a;
  --g-deep: #4a5e0a;
  --bg-d: #0f120a;
  --bg-l: #eef1e1;
  --ink: #0d0e0c;

  --bg: light-dark(var(--bg-l), var(--bg-d));
  --fg: light-dark(#12150b, #f4f6ec);
  --fg-2: color-mix(in oklab, var(--fg) 66%, transparent);
  --fg-3: color-mix(in oklab, var(--fg) 56%, transparent);
  --line: color-mix(in oklab, var(--fg) 13%, transparent);
  --wash: color-mix(in oklab, var(--fg) 7%, transparent);
  --accent: light-dark(var(--ink), var(--g));
  --on-accent: light-dark(var(--g), var(--ink));
  --mark: light-dark(var(--g-deep), var(--g));

  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JB Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* 4px spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --pad: clamp(var(--s5), 4vw, var(--s8));

  /* Springs sampled into linear(): settle (stiffness 180, damping 0.82) and bounce (260, 0.6). */
  --spring: linear(0, 0.028, 0.099, 0.193, 0.298, 0.404, 0.505, 0.598, 0.681, 0.752, 0.812, 0.861, 0.901, 0.933, 0.957, 0.975, 0.988, 0.998, 1.004, 1.008, 1.01, 1.011, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.005, 1.004, 1.003, 1.002, 1);
  --bounce: linear(0, 0.043, 0.15, 0.292, 0.446, 0.598, 0.734, 0.849, 0.941, 1.008, 1.054, 1.081, 1.093, 1.094, 1.087, 1.075, 1.061, 1.046, 1.032, 1.02, 1.01, 1.003, 0.997, 0.994, 0.992, 0.991, 0.991, 0.992, 0.993, 0.995, 0.996, 0.997, 1);
  --emph: cubic-bezier(0.2, 0, 0, 1);
}
/* 0 in light, 1 in dark: for the few non-color values that differ (light-dark() only takes colors) */
:root { --dark: 0; }
@media (prefers-color-scheme: dark) { :root:not(:has(> head > meta[name="color-scheme"][content="light"])) { --dark: 1; } }
:root:has(> head > meta[name="color-scheme"][content="dark"]) { --dark: 1; }

@supports not (color: light-dark(#000, #fff)) {
  :root { --bg: var(--bg-l); --fg: #12150b; --accent: var(--ink); --on-accent: var(--g); --mark: var(--g-deep); }
  @media (prefers-color-scheme: dark) {
    :root { --bg: var(--bg-d); --fg: #f4f6ec; --accent: var(--g); --on-accent: var(--ink); --mark: var(--g); }
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.5 var(--font);
  font-size-adjust: from-font;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--fg-3); }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--g); color: var(--ink); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 10; padding: var(--s2) var(--s4); background: var(--fg); color: var(--bg); border-radius: 8px; }
.skip:focus { top: var(--s4); }

/* ---------- backdrop: the cover, blurred and turning slowly ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: var(--bg);
}
.backdrop canvas {
  position: absolute; left: 50%; top: 42%;
  width: 150vmax; height: 150vmax;
  translate: -50% -50%;
  opacity: calc(0.3 + var(--kick, 0) * 0.12);
  filter: blur(28px) saturate(1.15);
  animation: drift 120s linear infinite;
}
.backdrop::after {
  /* print grain, so large color fields don't look like a flat gradient */
  content: ""; position: absolute; inset: 0; opacity: calc(0.09 - var(--dark) * 0.02); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { rotate: 360deg; } }

/* ---------- top bar ---------- */
.top {
  position: absolute; inset: 0 0 auto; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3);
  padding: max(var(--s4), env(safe-area-inset-top)) var(--pad) 0;
  height: 64px;
}
.handle { font: 500 0.8125rem/1 var(--mono); letter-spacing: 0.02em; text-decoration: none; color: var(--fg-2); padding: var(--s2) 0; justify-self: start; }
.handle:hover { color: var(--fg); }
.top .icon-btn { justify-self: end; }
.top-end { justify-self: end; display: flex; align-items: center; gap: var(--s1); }
/* Song / Videos switch, the same pill as on the video page */
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--wash); border: 1px solid var(--line); }
.tabs a {
  display: grid; place-items: center; height: 32px; padding: 0 var(--s4); border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; text-decoration: none; color: var(--fg-2);
  transition: background-color 0.25s, color 0.25s;
}
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); }
@media (max-width: 699px) { .tabs a { padding: 0 var(--s3); } }
.tabs a { white-space: nowrap; }
@media (max-width: 479px) { .handle { display: none; } .top { grid-template-columns: 1fr auto; } .tabs { justify-self: start; } .tabs a { padding: 0 var(--s2); font-size: 0.8125rem; } }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--fg-2);
  transition: background-color 0.2s, color 0.2s, scale 0.4s var(--bounce);
}
.icon-btn:hover { background: var(--wash); color: var(--fg); }
.icon-btn:active { scale: 0.88; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme .icon-moon, .theme .to-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(meta[name="color-scheme"][content="light"])) .theme .icon-sun,
  :root:not(:has(meta[name="color-scheme"][content="light"])) .theme .to-dark { display: none; }
  :root:not(:has(meta[name="color-scheme"][content="light"])) .theme .icon-moon,
  :root:not(:has(meta[name="color-scheme"][content="light"])) .theme .to-light { display: initial; }
}
:root:has(meta[name="color-scheme"][content="dark"]) .theme .icon-sun,
:root:has(meta[name="color-scheme"][content="dark"]) .theme .to-dark { display: none; }
:root:has(meta[name="color-scheme"][content="dark"]) .theme .icon-moon,
:root:has(meta[name="color-scheme"][content="dark"]) .theme .to-light { display: initial; }

/* ---------- now playing ---------- */
.np {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "art" "meta" "scrub" "controls" "downloads";
  gap: 0;
  padding: 72px var(--pad) var(--s7);
  max-width: 560px;
  margin-inline: auto;
}
.deck { display: contents; }
.art { grid-area: art; position: relative; aspect-ratio: 1; width: 100%; margin-bottom: var(--s6); view-transition-name: art; }
#sleeve {
  display: block; width: 100%; height: 100%; border-radius: 6px;
  background: var(--g);
  box-shadow: 0 1px 0 color-mix(in oklab, white 25%, transparent) inset, 0 30px 60px -24px rgb(0 0 0 / calc(0.35 + var(--dark) * 0.25)), 0 12px 24px -12px rgb(0 0 0 / 0.3);
}

.meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s5); view-transition-name: meta; }
.titles { min-width: 0; }
h1 {
  margin: 0; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em;
  text-wrap: balance;
}
.artist { margin: var(--s1) 0 0; font-size: 1.0625rem; color: var(--fg-2); font-weight: 500; }
.artist a { text-decoration: none; }
.artist a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); }

.pill {
  display: inline-flex; align-items: center; gap: var(--s2); flex: none;
  height: 40px; padding: 0 var(--s4) 0 var(--s3);
  border: 1px solid var(--line); border-radius: 999px; background: var(--wash);
  font-weight: 600; font-size: 0.9375rem; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, scale 0.45s var(--bounce);
}
.pill:hover { border-color: var(--fg-3); }
.pill:active { scale: 0.94; }
.pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill[hidden] { display: none; }
.meta-actions { display: flex; gap: var(--s2); flex: none; }

/* scrubber: the song's waveform is the track */
.scrub { grid-area: scrub; view-transition-name: scrub; }
.wave { position: relative; height: 48px; touch-action: none; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.wave:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 8px; }
.thumb {
  position: absolute; top: 50%; left: calc(var(--p, 0) * 100%);
  width: 4px; height: 34px; translate: -50% -50%; border-radius: 4px;
  background: var(--fg); pointer-events: none;
  box-shadow: 0 0 0 3px var(--bg);
  transition: height 0.35s var(--bounce), width 0.35s var(--bounce);
}
.wave:hover .thumb, .wave:has(input:active) .thumb { height: 42px; width: 6px; }
.hover-tip {
  /* follows the pointer but stays inside the waveform's width */
  position: absolute; bottom: calc(100% + 6px); left: calc(var(--h, 0) * 100%); translate: calc(var(--h, 0) * -100%) 4px;
  visibility: hidden;
  padding: 3px 8px; border-radius: 6px; background: var(--fg); color: var(--bg);
  font: 500 0.75rem/1.4 var(--mono); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s, translate 0.25s var(--emph);
}
.wave.hovering:hover .hover-tip { opacity: 1; visibility: visible; translate: calc(var(--h, 0) * -100%) 0; }
.times {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: baseline;
  margin-top: var(--s2); font: 500 0.75rem/1.4 var(--mono); color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.where { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); }

.controls {
  grid-area: controls; display: flex; align-items: center; justify-content: center; gap: var(--s6);
  margin-top: var(--s5); outline: none; view-transition-name: controls;
}
.skipbtn {
  display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 18px; background: transparent; cursor: pointer;
  transition: background-color 0.2s, scale 0.45s var(--bounce);
}
.skipbtn:hover { background: var(--wash); }
.skipbtn:active { scale: 0.86 0.92; }
.skipbtn:disabled { opacity: 0.35; cursor: default; }
.skipbtn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skipbtn svg .fill { fill: currentColor; stroke: none; }

.play {
  position: relative; display: grid; place-items: center;
  width: 84px; height: 84px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--on-accent);
  -webkit-tap-highlight-color: transparent;
}
.play::before {
  /* M3 Expressive style: a squircle that becomes a slowly turning nine-lobe cookie while playing */
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  clip-path: var(--shape, circle(50%));
  transition: clip-path 0.55s var(--emph), scale 0.45s var(--bounce);
  scale: calc(1 + var(--kick, 0) * 0.05);
  animation: spin 14s linear infinite paused;
}
.playing .play::before { animation-play-state: running; }
.play:active::before { scale: 0.9; }
.play:disabled { cursor: progress; }
.play:disabled::before { opacity: 0.5; }
.play svg { position: relative; width: 34px; height: 34px; fill: currentColor; transition: scale 0.4s var(--bounce), opacity 0.2s; }
.play .i-pause, .playing .play .i-play { scale: 0.4; opacity: 0; position: absolute; }
.playing .play .i-pause { scale: 1; opacity: 1; position: relative; }
@keyframes spin { to { rotate: 360deg; } }

.downloads {
  grid-area: downloads; display: flex; justify-content: center; align-items: center; gap: var(--s2); flex-wrap: wrap;
  margin-top: var(--s6);
}
.to-notes {
  flex-basis: 100%; display: flex; justify-content: center; align-items: center; gap: var(--s2); margin-top: var(--s4);
  font: 500 0.75rem/1 var(--mono); color: var(--fg-3); text-decoration: none; letter-spacing: 0.04em;
}
.to-notes:hover { color: var(--fg); }
.to-notes svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl {
  display: inline-flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 var(--s4) 0 var(--s3);
  border-radius: 999px; border: 1px solid var(--line); text-decoration: none;
  font-size: 0.875rem; font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s, scale 0.45s var(--bounce);
}
.dl:hover { border-color: var(--fg-3); background: var(--wash); }
.dl:active { scale: 0.94; }
.dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl small { font: 500 0.75rem var(--mono); color: var(--fg-2); margin-left: 2px; }

/* ---------- lyrics ---------- */
.lyrics-pane {
  grid-area: lyrics; display: none; position: relative; overflow: hidden; min-height: 0;
  --ly: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 72%, transparent);
  container-type: inline-size;
}
.lyrics { position: relative; padding-block: 34cqb 60cqb; padding-block: 30vh 60vh; outline: none; }
.ly {
  display: block; transform: translateY(var(--y, 0px));
  transition: transform 0.61s var(--spring) var(--d, 0ms);
  will-change: transform;
}
.ly-sec {
  margin: 1.4em 0 0.35em; font: 600 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3);
}
.ly-sec:first-child { margin-top: 0; }
.line {
  width: 100%; margin: 0 0 0 -0.35em; padding: 0.2em 0.35em; border: 0; border-radius: 0.3em;
  background: transparent; text-align: left; cursor: pointer;
  max-width: 16em;
  font-size: var(--ly); font-weight: 760; line-height: 1.12; letter-spacing: -0.028em; text-wrap: pretty;
  color: var(--fg);
}
.line > span {
  display: block; transform-origin: left center; scale: 0.965;
  opacity: 0.3; filter: blur(var(--blur, 0px));
  transition: scale 0.61s var(--spring), opacity 0.4s ease, filter 0.4s ease;
}
@media (hover: hover) {
  .line:hover { background: var(--wash); }
  .line:hover > span { opacity: 0.6; filter: none; }
}
.line.on > span { scale: 1; opacity: 1; filter: none; }
.line.on .w {
  color: transparent;
  background-image: linear-gradient(90deg, var(--fg) calc(var(--wp, 0) * 130% - 30%), color-mix(in oklab, var(--fg) 34%, transparent) calc(var(--wp, 0) * 130%));
  -webkit-background-clip: text; background-clip: text;
}
.line { position: relative; }
/* three breathing dots while an instrumental stretch leads into the next line:
   after the section name when the line opens a section, otherwise just above the line */
.line::before, .ly-sec::after {
  content: ""; opacity: 0; scale: 0.6; transform-origin: left center;
  background: radial-gradient(circle closest-side, currentColor 92%, transparent) 0 50% / 0.26em 0.26em no-repeat, radial-gradient(circle closest-side, currentColor 92%, transparent) 50% 50% / 0.26em 0.26em no-repeat, radial-gradient(circle closest-side, currentColor 92%, transparent) 100% 50% / 0.26em 0.26em no-repeat;
  transition: opacity 0.3s, scale 0.5s var(--bounce);
}
.line::before { position: absolute; left: 0.35em; top: -0.16em; width: 1.1em; height: 0.3em; color: var(--fg); }
.ly-sec::after { display: inline-block; vertical-align: middle; width: 1.15em; height: 0.3em; margin-left: 0.4em; font-size: 2.2em; translate: 0 -0.05em; }
.ly-sec { transition: color 0.3s; }
.ly-sec.wait { color: var(--fg); }
.line.wait::before, .ly-sec.wait::after { opacity: 0.8; scale: 1; animation: breathe 1.7s ease-in-out infinite; }
@keyframes breathe { 50% { scale: 1.15; opacity: 1; } }
.w { display: inline-block; transition: translate 0.7s var(--spring); }
.line.on .w.sung { translate: 0 -0.035em; }
.browsing .line > span { opacity: 0.55; filter: none; }
.browsing .line.on > span { opacity: 1; }

/* ---------- liner notes ---------- */
.notes {
  max-width: 1200px; margin: 0 auto; padding: var(--s6) var(--pad) 0;
  display: grid; gap: var(--s8);
}
.block { display: grid; align-content: start; gap: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); min-width: 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s5); }
.block-head h2 { margin: 0; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 780; letter-spacing: -0.025em; line-height: 1.1; }
.block-head p { margin: 0; color: var(--fg-2); font-size: 0.9375rem; max-width: 46ch; }

.grid-scroll {
  /* 53 equal columns that always fit the width: no horizontal scrolling at any size */
  container-type: inline-size;
  padding: 0 4px var(--s2);
  min-width: 0;
}
.months, .weeks { display: grid; grid-template-columns: repeat(var(--cols, 53), minmax(0, 1fr)); column-gap: var(--gap); }
.months, .weeks, .wk { --gap: clamp(1px, 0.4cqi, 3px); }
.months { height: 18px; font: 500 clamp(0.625rem, 0.5rem + 0.5cqi, 0.6875rem)/1 var(--mono); color: var(--fg-3); }
.months span { grid-column: calc(var(--i) + 1) / span 5; grid-row: 1; white-space: nowrap; }
.wk {
  display: flex; flex-direction: column; gap: var(--gap); padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 3px; position: relative; min-width: 0;
}
.wk::after {
  content: ""; position: absolute; inset: -4px calc(var(--gap) / -2 - 1px); border-radius: 5px;
  box-shadow: 0 0 0 1.5px var(--fg); opacity: 0; transition: opacity 0.2s;
}
.wk.now::after { opacity: 1; }
@media (hover: hover) { .wk:hover .c { filter: brightness(1.15); } }
.c {
  width: 100%; aspect-ratio: 1; border-radius: 28%;
  background: var(--wash);
}
.c[data-l="1"] { background: color-mix(in oklch, var(--mark) 30%, var(--bg)); }
.c[data-l="2"] { background: color-mix(in oklch, var(--mark) 52%, var(--bg)); }
.c[data-l="3"] { background: color-mix(in oklch, var(--mark) 76%, var(--bg)); }
.c[data-l="4"] { background: var(--mark); }
.wk.ahead .c { opacity: 0.55; }
.c.hit { animation: hit 0.5s var(--bounce); }
@keyframes hit { 0% { scale: 1.9; box-shadow: 0 0 12px var(--mark); } 100% { scale: 1; box-shadow: 0 0 0 transparent; } }

.bar-now {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4);
  padding: var(--s5); border-radius: 20px; background: var(--wash);
}
.bar-label h3 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.bar-label p { margin: 2px 0 0; color: var(--fg-2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pads {
  display: grid; grid-template-columns: 3.4rem repeat(7, minmax(0, 44px)); gap: 6px; align-items: center;
}
.pads .day, .pads .lab { font: 500 0.6875rem/1 var(--mono); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.pads .day { text-align: center; }
.pad {
  aspect-ratio: 1; border-radius: 10px; background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.1s, scale 0.45s var(--bounce);
}
.pad.on { background: color-mix(in oklch, var(--mark) calc(var(--o, 1) * 100%), var(--bg)); box-shadow: none; }
.pad.step { box-shadow: inset 0 0 0 2px var(--fg); }
.pad.on.step { scale: 1.08; }
button.pad { appearance: none; border: 0; padding: 0; margin: 0; width: 100%; font: inherit; color: inherit; cursor: pointer; }
.pad:hover { box-shadow: inset 0 0 0 1.5px var(--fg-3); }
.pad.on:hover { box-shadow: inset 0 0 0 1.5px var(--fg-2); }
.pad:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.pad.hit { animation: pad-hit 0.5s var(--bounce); }
@keyframes pad-hit { 0% { scale: 0.82; } 100% { scale: 1; } }

/* the record as a turntable */
#sleeve { touch-action: pinch-zoom; }
#sleeve.on-disc { cursor: grab; }
#sleeve.scratching { cursor: grabbing; }
#sleeve:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

/* what the playing week was about: its main language and anything that shipped */
.now-badge { display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; height: 26px; margin-top: var(--s3); overflow: hidden; }
.now-badge .chip { flex: 0 1 auto; min-width: 0; }
.now-badge .chip.lang, .now-badge .chip.more { flex: none; }
.now-badge .chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 10px; border-radius: 999px; background: var(--wash); color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 500 0.75rem/1.2 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.now-badge .chip.lang { color: var(--fg); }
.now-badge .chip.ev-release, .now-badge .chip.ev-peak { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-3); }
.now-badge .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in oklab, var(--fg) 20%, transparent); }
.now-badge.in .chip { animation: chip-in 0.5s var(--spring) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes chip-in { from { opacity: 0; translate: 0 6px; scale: 0.92; } }
.rule { margin: 0; color: var(--fg-2); font-size: 0.875rem; }

.stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: var(--s6) var(--s5); }
.stats div { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.stats dt { order: 2; font-weight: 650; font-size: 0.9375rem; }
.stats dd { order: 1; margin: 0; font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats dd.word { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); letter-spacing: -0.03em; }
.stats small { order: 3; color: var(--fg-2); font-size: 0.875rem; }

.tracklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); column-gap: var(--s6); }
.tracklist button {
  display: grid; grid-template-columns: 2.25rem 1fr auto; align-items: baseline; gap: var(--s3);
  width: 100%; padding: var(--s3) var(--s2); margin: 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; text-align: left; cursor: pointer; border-radius: 0; font-size: 1.0625rem; font-weight: 600;
  transition: background-color 0.2s;
}
.tracklist button:hover { background: var(--wash); }
.tracklist .n, .tracklist .t { font: 500 0.8125rem var(--mono); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tracklist [aria-current="true"] button { color: var(--fg); }
.tracklist [aria-current="true"] .n { color: var(--fg); }
.tracklist [aria-current="true"] .n::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mark); margin-right: 6px; translate: 0 -1px; }

.prose { max-width: 62ch; color: var(--fg-2); }
.prose p { margin: 0 0 var(--s4); }
.prose a { color: var(--fg); }
.keys summary { cursor: pointer; color: var(--fg); font-weight: 600; width: fit-content; padding: var(--s1) 0; }
.keys dl { margin: var(--s3) 0 0; display: grid; gap: var(--s2); }
.keys dl div { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; gap: var(--s4); }
.keys dt { color: var(--fg); }
.keys dd { margin: 0; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px; text-align: center;
  border: 1px solid var(--line); border-bottom-width: 2px; font: 500 0.75rem/1.5 var(--mono); color: var(--fg);
}

.foot {
  max-width: 1200px; margin: 0 auto; padding: var(--s8) var(--pad) max(var(--s7), env(safe-area-inset-bottom));
  color: var(--fg-3); font-size: 0.875rem;
}
.foot p { margin: 0; }


/* ---------- remix desk ---------- */
.remix-pane { grid-area: remix; display: none; min-height: 0; container-type: inline-size; }
.remix-open .remix-pane { display: flex; flex-direction: column; gap: var(--s5); }
.rx-head { display: flex; align-items: start; justify-content: space-between; gap: var(--s4); }
.rx-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.rx-head p { margin: var(--s1) 0 0; color: var(--fg-2); font-size: 0.9375rem; text-wrap: pretty; }
.rx-head .icon-btn { flex: none; margin: -6px -4px 0 0; }
.rx-grab { display: none; }
.rx-bar { height: 2px; margin-top: calc(var(--s5) * -1 + var(--s2)); border-radius: 2px; background: var(--line); overflow: hidden; visibility: hidden; }
.rx-bar::before { content: ""; display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--fg); transition: width 0.2s linear; }
.loading .rx-bar { visibility: visible; }
.rx-cap { font: 600 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }

.rx-stems { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rx-stem {
  display: grid; grid-template-columns: minmax(6.5rem, 1fr) minmax(5rem, 1.5fr) 36px 36px; align-items: center; gap: var(--s2) var(--s3);
  padding: var(--s2) 0; border-bottom: 1px solid var(--line);
}
.rx-name { display: grid; min-width: 0; }
.rx-label { font-weight: 650; font-size: 0.9375rem; transition: opacity 0.2s; }
.rx-hint { font-size: 0.75rem; line-height: 1.3; color: var(--fg-3); text-wrap: pretty; transition: opacity 0.2s; }
.rx-meter { grid-column: 1 / -1; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.rx-meter i { display: block; height: 100%; width: 100%; background: var(--mark); transform-origin: left; transform: scaleX(var(--l, 0)); transition: transform 0.06s linear; }
.rx-stem.silent .rx-label, .rx-stem.silent .rx-hint { opacity: 0.4; }
.rx-stem.silent .rx-meter i { background: var(--fg-3); }
.loading .rx-stem { opacity: 0.6; }
@container (max-width: 379px) { .rx-hint { display: none; } }

.rx-ms {
  width: 36px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer;
  font: 600 0.75rem/1 var(--mono); color: var(--fg-2);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, scale 0.35s var(--bounce);
}
.rx-ms:hover { border-color: var(--fg-3); color: var(--fg); }
.rx-ms:active { scale: 0.9; }
.rx-m[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.rx-s[aria-pressed="true"] { background: var(--g); border-color: var(--g); color: var(--ink); }

/* faders: a thin track that fills up to the handle */
.rx-fader {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y;
  --fill: color-mix(in oklab, var(--fg) 80%, transparent);
}
.rx-fader::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--fill) calc(var(--v, 1) * 100%), var(--line) 0); }
.rx-fader::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--fill) calc(var(--v, 1) * 100%), var(--line) 0); }
.rx-fader::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--fg); border: 0; box-shadow: 0 0 0 3px var(--bg); transition: scale 0.3s var(--bounce); }
.rx-fader::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--fg); border: 0; box-shadow: 0 0 0 3px var(--bg); transition: scale 0.3s var(--bounce); }
.rx-fader:active::-webkit-slider-thumb { scale: 1.2; }
.rx-fader:active::-moz-range-thumb { scale: 1.2; }
.rx-fader:focus-visible { outline: none; }
.rx-fader:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--fg); }
.rx-fader:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--fg); }
.rx-stem.silent .rx-fader { --fill: var(--fg-3); }

.rx-tempo .rx-line { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.rx-tempo output { font: 500 0.875rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.rx-tempo .rx-fader { margin-top: var(--s1); }
.rx-scale { display: flex; justify-content: space-between; gap: var(--s2); font: 500 0.6875rem/1 var(--mono); color: var(--fg-3); }
/* 100% sits at 30/70 of the track */
.rx-scale span:nth-child(2) { position: relative; left: calc(30% / 0.7 - 50%); }
.rx-link { border: 0; background: none; padding: 4px 2px; cursor: pointer; font-size: 0.8125rem; color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 0.2em; }
.rx-link:hover { color: var(--fg); }
.rx-link[hidden] { display: none; }
.rx-switch {
  margin-left: auto; display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 0; border: 0; background: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 600; color: var(--fg-2);
}
.rx-switch:hover { color: var(--fg); }
.rx-sw { position: relative; width: 32px; height: 20px; border-radius: 10px; background: var(--line); transition: background-color 0.2s; }
.rx-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); transition: translate 0.35s var(--bounce); }
.rx-switch[aria-checked="true"] .rx-sw { background: var(--mark); }
.rx-switch[aria-checked="true"] .rx-sw::after { translate: 12px 0; background: var(--bg); }

.rx-presets {
  display: flex; flex: none; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none;
  margin-inline: calc(var(--s1) * -1); padding: var(--s1);
}
.rx-presets::-webkit-scrollbar { display: none; }
.rx-preset {
  flex: none; scroll-snap-align: start; height: 32px; min-height: 32px; line-height: 1; padding: 0 var(--s3); border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--wash); color: var(--fg-2); white-space: nowrap;
  font-size: 0.8125rem; font-weight: 600;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, scale 0.35s var(--bounce);
}
.rx-preset:hover { color: var(--fg); border-color: var(--fg-3); }
.rx-preset:active { scale: 0.96; }
.rx-preset[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.rx-preset:focus-visible, .rx-loop:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.rx-loopbox { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.rx-loop {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 var(--s3) 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--wash); color: var(--fg); font-size: 0.875rem; font-weight: 600;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, scale 0.35s var(--bounce);
}
.rx-loop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rx-loop .rx-loop-mode { font: 500 0.75rem/1 var(--mono); color: var(--fg-2); padding-left: 8px; border-left: 1px solid var(--line); }
.rx-loop[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.rx-loop[aria-pressed="true"] .rx-loop-mode { color: var(--bg); border-color: color-mix(in oklab, var(--bg) 35%, transparent); }
.rx-loop:active { scale: 0.96; }
.rx-loop-out { font: 500 0.75rem/1.2 var(--mono); color: var(--fg-2); font-variant-numeric: tabular-nums; }

.rx-sound { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--s5); }
.rx-kitbox { display: grid; gap: var(--s3); }
.rx-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--wash); border: 1px solid var(--line); width: max-content; }
.rx-seg button {
  height: 32px; padding: 0 var(--s3); border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 0.875rem; font-weight: 600; color: var(--fg-2); transition: background-color 0.2s, color 0.2s;
}
.rx-seg button:hover { color: var(--fg); }
.rx-seg button[aria-checked="true"] { background: var(--fg); color: var(--bg); }

.rx-knobs { display: flex; gap: var(--s5); }
.rx-k { display: grid; justify-items: center; gap: 6px; width: 64px; }
.rx-knob {
  position: relative; width: 48px; height: 48px; border-radius: 50%; cursor: ns-resize; touch-action: none;
  --from: 0; --len: 0;
}
.rx-knob::before {
  /* 270° track with the active arc, a ring cut out of a conic gradient */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 225deg, var(--line) calc(var(--from) * 1deg), var(--mark) 0 calc((var(--from) + var(--len)) * 1deg), var(--line) 0 270deg, transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
}
.rx-knob::after {
  /* the cap, with a pointer line */
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  background: linear-gradient(var(--fg), var(--fg)) 50% 3px / 2px 10px no-repeat, var(--wash);
  border: 1px solid var(--line); rotate: var(--rot, -135deg);
  transition: rotate 0.08s linear;
}
.rx-knob.on::after { border-color: var(--fg-3); }
.rx-knob:focus-visible { outline-offset: 2px; border-radius: 50%; }
.rx-kv { font: 500 0.6875rem/1.2 var(--mono); color: var(--fg-2); text-align: center; min-height: 2.4em; }

.rx-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rx-actions .dl { background: transparent; cursor: pointer; }
.rx-actions .dl:disabled { opacity: 0.45; cursor: default; }
.rx-actions .dl:disabled:hover { border-color: var(--line); background: transparent; }
#rx-reset { padding-left: var(--s4); }
.rx-status { margin: calc(var(--s5) * -1 + var(--s2)) 0 0; min-height: 1.4em; font-size: 0.8125rem; color: var(--fg-2); overflow-wrap: anywhere; }
.rx-status[data-kind="error"] { color: light-dark(#a3260f, #ff9f87); }
.rx-length { margin: -8px 0 0; font: 500 0.75rem/1.4 var(--mono); color: var(--fg-3); }
.rx-length:empty, .rx-status:empty { display: none; }
/* the desk scrolls; its rows keep their height instead of shrinking into each other */
.remix-pane > * { flex-shrink: 0; }

/* a thin scrollbar, only shown when the desk is taller than its space */
.remix-pane { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--fg) 24%, transparent) transparent; }
.remix-pane::-webkit-scrollbar { width: 6px; }
.remix-pane::-webkit-scrollbar-thumb { border-radius: 6px; background: color-mix(in oklab, var(--fg) 24%, transparent); }
.remix-pane::-webkit-scrollbar-track { background: transparent; }

/* ---------- small screens: lyrics take over the cover's spot ---------- */
@media (max-width: 899px) {
  .lyrics-mode .np {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "art meta" "lyrics lyrics" "scrub scrub" "controls controls";
    column-gap: var(--s4);
    height: 100svh;
    padding-bottom: max(var(--s5), env(safe-area-inset-bottom));
  }
  .lyrics-mode .art { margin: 0; }
  .lyrics-mode #sleeve { border-radius: 4px; }
  .lyrics-mode .meta { margin: 0; align-items: center; }
  .lyrics-mode h1 { font-size: 1.25rem; }
  .lyrics-mode .artist { font-size: 0.9375rem; margin: 0; }
  .lyrics-mode .lyrics-pane { display: block; margin: var(--s3) calc(var(--pad) * -1) var(--s3); padding-inline: var(--pad); --ly: clamp(1.625rem, 6.6vw, 2.25rem); }
  .lyrics-mode .downloads { display: none; }
  .lyrics-mode .controls { margin-top: var(--s3); }
  .lyrics-mode .lyrics { padding-block: 22vh 50vh; }

  /* the remix desk takes the same spot and scrolls on its own */
  .remix-open .np {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "art meta" "remix remix" "scrub scrub" "controls controls";
    column-gap: var(--s4);
    height: 100svh;
    padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
  }
  .remix-open .art { margin: 0; }
  .remix-open #sleeve { border-radius: 4px; }
  .remix-open .meta { margin: 0; align-items: center; flex-wrap: nowrap; }
  .remix-open h1 { font-size: 1.25rem; }
  .remix-open .artist { font-size: 0.9375rem; margin: 0; }
  .remix-open .downloads { display: none; }
  .remix-open .controls { margin-top: var(--s2); }
  .remix-open .play { width: 72px; height: 72px; }
  .remix-open .remix-pane {
    margin: var(--s3) calc(var(--pad) * -1) var(--s3); padding: var(--s3) var(--pad) var(--s5);
    overflow-y: auto; overscroll-behavior: contain;
    border-block: 1px solid var(--line);
  }
  .remix-open .rx-head h2 { font-size: 1.25rem; }
  .remix-open .rx-head p { font-size: 0.875rem; }
  /* side panels open: the pills shrink to icons so the header row fits */
  :is(.lyrics-mode, .remix-open) .meta-actions .pill { width: 40px; padding: 0; justify-content: center; }
  :is(.lyrics-mode, .remix-open) .pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- phones and tablets: the desk is a bottom sheet, with the song and transport above it ---------- */
@media (max-width: 899px) {
  .remix-open .np {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: "art meta" "scrub scrub" "controls controls" "remix remix";
    padding-bottom: 0;
  }
  .remix-open .scrub { margin-top: var(--s4); }
  .remix-open .controls { margin-top: var(--s1); gap: var(--s5); }
  .remix-open .play { width: 64px; height: 64px; }
  .remix-open .skipbtn { width: 48px; height: 48px; }
  .remix-open .remix-pane {
    margin: var(--s3) calc(var(--pad) * -1) 0; padding: 0 var(--pad) max(var(--s5), env(safe-area-inset-bottom));
    gap: var(--s4); border: 0; border-radius: 22px 22px 0 0;
    background: color-mix(in oklab, var(--bg), var(--fg) 6%);
    box-shadow: 0 -1px 0 var(--line), 0 -18px 40px -24px rgb(0 0 0 / calc(0.25 + var(--dark) * 0.35));
    animation: sheet-in 0.45s var(--emph);
  }
  .remix-open .rx-grab {
    display: block; position: sticky; top: 0; z-index: 2; height: 22px; margin: 0 calc(var(--pad) * -1) -10px;
    background: inherit; touch-action: none; cursor: grab;
  }
  .rx-grab::before { content: ""; position: absolute; top: 9px; left: 50%; width: 36px; height: 4px; translate: -50% 0; border-radius: 4px; background: var(--fg-3); }
  /* the title and close button stay put while the sheet scrolls */
  .remix-open .rx-head { position: sticky; top: 12px; z-index: 1; padding-block: var(--s2) var(--s2); margin-bottom: calc(var(--s4) * -1 + var(--s1)); background: color-mix(in oklab, var(--bg), var(--fg) 6%); }
  .remix-open .rx-head p { display: none; }
  .remix-open .rx-bar { margin-top: 0; }
}
@keyframes sheet-in { from { translate: 0 40px; opacity: 0; } }

/* ---------- wide screens: cover and controls left, lyrics right ---------- */
@media (min-width: 900px) {
  .np {
    /* grows with its content on short windows instead of spilling into the notes below */
    max-width: 1440px; min-height: 100svh;
    grid-template-columns: clamp(320px, 34vw, 500px) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto auto auto 1fr;
    grid-template-areas: ". lyrics" "art lyrics" "meta lyrics" "scrub lyrics" "controls lyrics" "downloads lyrics" ". lyrics";
    column-gap: clamp(var(--s7), 7vw, 128px);
    padding: 72px var(--pad) var(--s5);
  }
  .lyrics-toggle { display: none; }
  .remix-open .lyrics-pane { display: none; }
  .remix-open .remix-pane {
    /* sits under the header (the .np top padding), centered in the column, scrolls inside on short windows */
    grid-area: lyrics; position: sticky; top: 72px; bottom: var(--s5); align-self: center;
    max-height: calc(100svh - 72px - var(--s5)); overflow-y: auto; overscroll-behavior: contain;
    width: min(100%, 600px); justify-self: start; padding: var(--s2) var(--s4) var(--s4) 4px;
  }
  /* the lyrics stay in view while the left column scrolls on short windows */
  .lyrics-pane { display: block; position: sticky; top: 0; align-self: start; height: 100svh; margin-top: -72px; }
  /* out of flow so the long lyric sheet doesn't stretch the grid row */
  .lyrics { position: absolute; inset: 0 0 auto; }
  .art { margin-bottom: var(--s5); width: min(100%, max(240px, 100svh - 440px)); justify-self: center; }
  .meta { margin-bottom: var(--s4); }
  .controls { margin-top: var(--s4); }
  .downloads { margin-top: var(--s5); }
  .bar-now { padding: var(--s6); }
  .pads { grid-template-columns: 3.6rem repeat(7, minmax(0, 56px)); gap: 8px; }
  .pad { border-radius: 12px; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s8); }
  .notes .year { grid-column: 1 / -1; }
}
/* short windows: the desk tightens up before it needs to scroll */
@media (min-width: 900px) and (max-height: 820px) {
  .remix-open .remix-pane { gap: var(--s4); }
  .remix-open .rx-head h2 { font-size: 1.25rem; }
  .remix-open .rx-head p { font-size: 0.875rem; }
  .remix-open .rx-stem { padding-block: 3px; }
  .remix-open .rx-knob { width: 42px; height: 42px; }
  .remix-open .rx-knob::after { inset: 7px; }
  .remix-open .rx-k { gap: 4px; }
  .remix-open .rx-kv { min-height: 1.2em; }
}

@media (min-width: 900px) and (max-height: 740px) {
  .remix-open .remix-pane { gap: var(--s3); }
  .remix-open .rx-head p { display: none; }
}

/* label beside the pads only when there is room for both */
@media (min-width: 1100px) {
  .bar-now {
    grid-template-columns: minmax(12rem, 18rem) auto; grid-template-areas: "label pads" "rule pads";
    justify-content: space-between; align-content: center; column-gap: var(--s7);
  }
  .bar-label { grid-area: label; align-self: end; }
  .bar-now .rule { grid-area: rule; align-self: start; }
  .pads { grid-area: pads; }
}
@media (min-width: 1400px) {
  .lyrics-pane { --ly: clamp(2.5rem, 1.2rem + 1.9vw, 3.5rem); }
}
@media (max-width: 380px) {
  .controls { gap: var(--s4); }
  .pads { grid-template-columns: 2.9rem repeat(7, minmax(0, 1fr)); gap: 4px; }
}

::view-transition-group(art), ::view-transition-group(meta) { animation-duration: 0.5s; animation-timing-function: var(--emph); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
.dragging .ly { transition: none; }
.dl[hidden] { display: none; }

/* ---------- player style picker ---------- */
.looks {
  position: fixed; inset: 64px var(--pad) auto auto; margin: 0; width: min(320px, calc(100vw - 2 * var(--s4)));
  padding: var(--s4); border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--fg); box-shadow: 0 12px 32px -16px rgb(0 0 0 / 0.35);
}
.looks fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; }
.looks legend { padding: 0 0 var(--s2); font: 600 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.looks label { display: flex; gap: var(--s3); align-items: start; padding: var(--s2) var(--s3); border-radius: 8px; cursor: pointer; }
.looks label:hover { background: var(--wash); }
.looks label:has(input:checked) { background: var(--wash); outline: 1px solid var(--line); }
.looks input { margin: 4px 0 0; accent-color: var(--fg); }
.looks b { display: block; font-weight: 600; font-size: 0.9375rem; }
.looks small { display: block; color: var(--fg-2); font-size: 0.8125rem; }
.looks p { margin: var(--s3) 0 0; font-size: 0.8125rem; color: var(--fg-3); }

/* ---------- looks other than vinyl: own type, colors, controls and motion ----------
   Each one sets its own background and accent, so the sleeve palette only applies to vinyl. */
:root:not([data-persona="vinyl"]):is([data-persona]) {
  .backdrop canvas, .backdrop::after { display: none; }
  #sleeve { box-shadow: none; background: var(--art-bg); }
  .play::before { animation: none; scale: 1; clip-path: none; }
}

/* alternative transport icons, shown by the looks that use them */
.skipbtn .i-ed, .skipbtn .i-arrow { display: none; }

/* ---------- Poster ----------
   Acid yellow field (deep grey and neon green in dark mode), big lowercase grotesk, thin outlined circles.
   Deck: title first, then the sleeve, then a dark rounded panel with thin bars and a time tag,
   then one big arrow-circle play button with small arrows beside it. */
:root[data-persona="poster"] {
  --bg: light-dark(#e3fb1d, #161616);
  --fg: light-dark(#111111, #f1f1ec);
  --accent: light-dark(#111111, #3df06a);
  --on-accent: light-dark(#e3fb1d, #111111);
  --mark: var(--accent);
  --art-bg: var(--bg);
  --ink-panel: #1d1d1d;
  --on-panel: #f1f1ec;
  .np { grid-template-areas: "meta" "art" "scrub" "controls" "downloads"; }
  .meta { margin-bottom: var(--s4); flex-wrap: nowrap; align-items: center; }
  .art { margin-bottom: var(--s4); }
  #sleeve { border-radius: 0; }
  h1 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem); font-weight: 600; letter-spacing: -0.04em; text-transform: lowercase; line-height: 1; }
  .artist { font-weight: 500; color: var(--fg); }
  .artist::after { content: "R"; display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; margin-left: 0.5em; border: 1px solid currentColor; border-radius: 50%; font-size: 0.7em; vertical-align: 0.15em; }
  .tabs { background: transparent; border-color: var(--fg); }
  .tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); }
  .pill, .dl { background: transparent; border-color: var(--fg); border-radius: 999px; }
  .remix-toggle { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .remix-toggle .pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scrub {
    background: var(--ink-panel); color: var(--on-panel); border-radius: 26px; padding: var(--s5) var(--s5) var(--s4);
    --fg: var(--on-panel); --fg-2: color-mix(in oklab, var(--on-panel) 70%, transparent); --fg-3: color-mix(in oklab, var(--on-panel) 55%, transparent);
    --wave-on: light-dark(#e3fb1d, #3df06a);
  }
  .wave { height: 40px; }
  .scrub .thumb { background: var(--wave-on); width: 2px; height: 40px; box-shadow: none; }
  #cur { justify-self: start; padding: 2px 8px; background: var(--wave-on); color: #111; border-radius: 4px; font-weight: 600; }
  .controls { justify-content: space-between; gap: var(--s3); margin-top: var(--s5); }
  .skipbtn { order: 2; width: 48px; height: 48px; border: 1px solid var(--fg); border-radius: 50%; background: transparent; }
  .skipbtn .i-std { display: none; }
  .skipbtn .i-arrow { display: block; width: 20px; height: 20px; stroke-width: 1.5; }
  #prev { margin-left: auto; }
  .play { order: 1; width: 96px; height: 96px; border: 1px solid var(--fg); border-radius: 50%; background: transparent; color: var(--fg); }
  .play::before { display: none; }
  .play svg { width: 26px; height: 26px; }
  .playing .play { background: var(--fg); color: var(--bg); }
  .skipbtn:hover, .play:hover { background: color-mix(in oklab, var(--fg) 10%, transparent); }
  .skipbtn:active, .play:active { scale: 0.95; }
  .line { font-weight: 600; letter-spacing: -0.04em; text-transform: lowercase; }
  .line > span { filter: none !important; }
  .line::before, .ly-sec::after { display: none; }
}
@media (min-width: 900px) {
  :root[data-persona="poster"] .np { grid-template-areas: ". lyrics" "meta lyrics" "art lyrics" "scrub lyrics" "controls lyrics" "downloads lyrics" ". lyrics"; }
}

/* ---------- Editorial ----------
   A flat slate spread. The cover is the hero (title, stepped words, the figure in its rings), so the
   page title shrinks to a caption. Controls sit in one flat card: a single line for the scrubber and
   filled double triangles for skip, like a magazine's audio strip. */
:root[data-persona="editorial"] {
  --bg: light-dark(#d9dbdf, #3a3d43);
  --fg: light-dark(#17181b, #f4f4f2);
  --accent: var(--fg);
  --on-accent: var(--bg);
  --mark: var(--fg);
  --art-bg: var(--bg);
  --card: light-dark(#eceef1, #4a4e55);
  .np { grid-template-areas: "art" "scrub" "controls" "meta" "downloads"; }
  .art { aspect-ratio: 4 / 3; margin-bottom: var(--s4); }
  .meta { margin: var(--s4) 0 0; }
  h1 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
  .artist { font-size: 0.875rem; font-weight: 400; }
  .tabs { background: var(--card); border: 0; }
  .tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); }
  .scrub, .controls { background: var(--card); }
  .scrub { border-radius: 18px 18px 0 0; padding: var(--s4) var(--s5) 0; }
  .wave { height: 22px; }
  .thumb { width: 10px; height: 10px; border-radius: 50%; box-shadow: none; }
  .wave:hover .thumb { width: 12px; height: 12px; }
  .times { display: flex; justify-content: space-between; }
  .where { display: none; }
  .controls { margin-top: 0; padding: var(--s2) 0 var(--s4); border-radius: 0 0 18px 18px; gap: var(--s6); }
  .skipbtn { width: 44px; height: 44px; border-radius: 8px; }
  .skipbtn .i-std { display: none; }
  .skipbtn .i-ed { display: block; width: 24px; height: 24px; }
  .play { width: 52px; height: 52px; color: var(--fg); }
  .play::before { background: transparent; }
  .play svg { width: 32px; height: 32px; }
  .pill { background: transparent; border: 0; padding: 0; height: auto; text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
  .pill svg { display: none; }
  .pill[aria-pressed="true"] { background: transparent; color: var(--fg); text-decoration-thickness: 2px; }
  .dl { background: var(--card); border: 0; border-radius: 10px; }
  .lyrics-pane { --ly: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); mask-image: none; }
  .line { font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; margin-left: calc(var(--k, 0) * 6%); max-width: 76%; }
  .line > span { filter: none !important; }
  .line::before, .ly-sec::after { display: none; }
}
@media (min-width: 900px) {
  :root[data-persona="editorial"] .art { width: 100%; }
  :root[data-persona="editorial"] .np { grid-template-columns: clamp(380px, 40vw, 600px) minmax(0, 1fr); grid-template-areas: ". lyrics" "art lyrics" "scrub lyrics" "controls lyrics" "meta lyrics" "downloads lyrics" ". lyrics"; }
}

/* ---------- Sketchbook ----------
   Warm flat cards (orange or green, lilac), heavy capitals, ink outlines with flat offset blocks.
   Deck: sleeve, title, then the controls as ink stickers, then chunky bars in a lilac card. */
:root[data-persona="sketch"] {
  --bg: light-dark(#f3ead9, #1f2a22);
  --fg: light-dark(#191714, #f3ead9);
  --accent: light-dark(#e8833a, #f5a623);
  --on-accent: #191714;
  --mark: var(--accent);
  --art-bg: light-dark(#f5a623, #2f6b46);
  --paper: light-dark(#fbf5e8, #24302a);
  --card: light-dark(#d9cdf2, #3b3354);
  .np { grid-template-areas: "art" "meta" "controls" "scrub" "downloads"; }
  #sleeve { border-radius: 24px; background: transparent; }
  h1 { font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
  .controls { margin: var(--s2) 0 var(--s5); gap: var(--s4); }
  .skipbtn, .play, .pill, .dl { border: 2px solid var(--fg); box-shadow: 3px 3px 0 var(--fg); }
  .skipbtn { width: 52px; height: 52px; border-radius: 50%; background: var(--paper); }
  .play { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
  .play::before { display: none; }
  .skipbtn:active, .play:active, .pill:active, .dl:active { translate: 3px 3px; box-shadow: 0 0 0 var(--fg); scale: 1; }
  .scrub { background: var(--card); border: 2px solid var(--fg); border-radius: 20px; padding: var(--s4) var(--s5) var(--s3); }
  .thumb { width: 4px; box-shadow: none; }
  .pill, .dl { background: var(--card); border-radius: 999px; }
  .remix-toggle { background: var(--accent); color: var(--on-accent); }
  .line { font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }
  .line > span { filter: none !important; }
}
@media (min-width: 900px) {
  :root[data-persona="sketch"] .np { grid-template-areas: ". lyrics" "art lyrics" "meta lyrics" "controls lyrics" "scrub lyrics" "downloads lyrics" ". lyrics"; }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-persona] .skipbtn, :root[data-persona] .play, :root[data-persona] .ly, :root[data-persona] .line > span { transition: none !important; }
}
