/* notaplayer.net — layout + components
 *
 * The iOS app is a phone app: bottom tab bar, top-right surface switcher,
 * SurfaceHeader in the scroll content. The desktop translation keeps the
 * type, colour and shape language exactly and moves only the shell:
 * a fixed left rail for the persistent chrome, a centred content column,
 * and a full-bleed player docked at the bottom.
 */

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

/* The UA's `[hidden] { display: none }` loses to ANY author `display` rule,
 * and nearly every control here sets one (.icon-btn is inline-flex). Without
 * this the player showed prev/next AND +/-30 AND the LIVE chip at once,
 * because toggling .hidden had no visual effect. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-card);
}
.skip-link:focus { left: 12px; top: 12px; }

/* ── Shell ─────────────────────────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px calc(var(--player-h) + 28px);
  border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  background: var(--bg);
  z-index: 20;
}

.content {
  grid-column: 2;
  min-width: 0;
  padding: 0 32px calc(var(--player-h) + 64px);
}
.content:focus { outline: none; }

.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 26px;
}

/* ── Surface switcher ──────────────────────────────────────────────
 * BrandSwitcher.swift is a Menu, not a segmented control: an outlined
 * capsule with no fill, icon + label in the surface accent, and the
 * chevron alone in dim. Kept as a dropdown here for the same reason.
 */

.switcher { position: relative; }

.switcher-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px;
  transition: border-color 0.15s var(--ease);
}
.switcher-pill:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.switcher-icon { display: inline-flex; }
.switcher-icon svg { width: 13px; height: 13px; }
.switcher-chev { color: var(--dim); display: inline-flex; margin-left: 2px; }

.switcher-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 190px; padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 18px 40px var(--shadow-strong);
  z-index: 40;
}
.switcher-menu[hidden] { display: none; }

.switcher-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px; font-weight: 500;
  text-align: left;
}
.switcher-item:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.switcher-item svg { width: 15px; height: 15px; flex: none; }
.switcher-item[aria-current="true"] { color: var(--accent); }

/* ── Rail nav ──────────────────────────────────────────────────────── */

.rail-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.rail-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: var(--r-pod);
  color: var(--dim);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: color 0.12s var(--ease), background 0.12s var(--ease);
}
.rail-link svg { width: 16px; height: 16px; flex: none; }
.rail-link:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
/* In the light theme the accent is a dark violet and the 12% pill is very
 * pale, which measured 4.11:1 — under AA at 14px. Darkening the text
 * against the same pill clears it without changing the look. */
.rail-link[aria-current="page"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
html[data-theme="light"] .rail-link[aria-current="page"] {
  color: color-mix(in srgb, var(--accent) 82%, #000);
}

.rail-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* ── Account ───────────────────────────────────────────────────────── */

.acct-btn {
  display: inline-flex; align-items: center; gap: 9px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  color: var(--dim);
  font-size: 13px; font-weight: 600;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.acct-btn:hover { color: var(--text); }
.acct-btn.is-in { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.acct-btn svg { width: 15px; height: 15px; flex: none; }
.acct-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.acct-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 60px var(--shadow-strong);
}
.acct-dialog::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); }

.acct-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 0;
}

.acct-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 20px; }
.acct-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.2px; }
.acct-copy { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--dim); }
.acct-copy strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.acct-fine { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--dim); }

.acct-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  color: var(--text);
  font: inherit; font-size: 14px;
}
.acct-input::placeholder { color: var(--dim); }
.acct-input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.acct-code {
  font-family: var(--mono);
  font-size: 22px; letter-spacing: 8px; text-align: center;
}

.acct-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--r-pod);
  background: color-mix(in srgb, #ef4444 14%, transparent);
  color: color-mix(in srgb, #ef4444 78%, var(--text));
  font-size: 12.5px; line-height: 1.5;
}

.acct-link {
  align-self: flex-start;
  padding: 0;
  color: var(--accent);
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
}
.acct-link:hover { text-decoration: underline; }
.acct-danger { color: color-mix(in srgb, #ef4444 72%, var(--text)); }

.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-rule { width: 100%; height: 1px; margin: 4px 0 0; border: 0; background: color-mix(in srgb, var(--line) 55%, transparent); }
.acct-hint { align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.5; }
.acct-hint > div { display: flex; flex-direction: column; gap: 4px; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle-icon { display: inline-flex; }
.theme-toggle-icon svg { width: 13px; height: 13px; }

/* ── SurfaceHeader ─────────────────────────────────────────────────
 * Wordmark (lowercase mono, .net in the current surface accent) above a
 * big bold bare surface name, above the mono kicker. Same stack as
 * SurfaceHeader.swift, scaled up for desktop.
 */

.surface-header { margin-bottom: 30px; }

.wordmark {
  display: inline-flex;
  font-family: var(--mono);
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 4px;
}
.wordmark-name { color: var(--text); }
.wordmark-tld { color: var(--accent); }

.surface-name {
  margin: 0;
  font-size: 44px; font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.05;
  color: var(--text);
}

.kicker {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker-tagline { letter-spacing: 1.6px; display: block; margin-top: 9px; }

.surface-header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 9px;
}
.surface-header-row .kicker-tagline { margin-top: 0; }

/* ── Sections ──────────────────────────────────────────────────────── */

.section { margin-bottom: 40px; }
.section-head { margin-bottom: 16px; }
.section-title {
  margin: 4px 0 0;
  font-size: 24px; font-weight: 700; letter-spacing: -0.2px;
  color: var(--text);
}
.section-sub { margin: 6px 0 0; font-size: 13px; color: var(--dim); line-height: 1.5; }

.intro-copy {
  margin: 14px 0 0;
  font-size: 13.5px; line-height: 1.62; color: var(--dim);
  max-width: 68ch;
}

/* ── Cards, generic ────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: var(--r-card);
}

.cover {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--card);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 10%;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  line-height: 1.35;
  overflow: hidden;
}

/* Play overlay — 36pt circle, black@55, white hairline, inset 8 (TapeCard) */
.cover-play {
  position: absolute; right: 8px; bottom: 8px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(var(--scrim), 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  opacity: 0; transform: translateY(3px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.cover-play svg { width: 14px; height: 14px; }
.tape-card:hover .cover-play,
.tape-card:focus-within .cover-play { opacity: 1; transform: none; }
.cover-play.is-on { opacity: 1; transform: none; }

/* Now-playing scrim on small row covers */
.cover-state {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--scrim), 0.45);
  color: var(--accent);
}
.cover-state svg { width: 40%; height: 40%; }

/* ── TapeCard (the repeated grid/rail unit) ────────────────────────── */

.tape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 22px 18px;
}

.tape-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 172px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.tape-rail > * { scroll-snap-align: start; }

.tape-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tape-card-hit { display: block; text-align: left; width: 100%; }

.tape-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tape-sub {
  font-size: 12px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tape-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; min-width: 0; }
.tape-foot .spacer { flex: 1; min-width: 0; }

/* ── Chips / badges / pills ────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase;
  /* Upstream text fields are not length-bounded — an archive `source` field
   * turned out to hold a 120-char taper lineage and blew the page out to
   * 2168px. Chips clip; they never widen their row. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
}
.badge-quiet {
  background: color-mix(in srgb, var(--text) 9%, transparent);
  color: var(--dim);
}
/* 4.12:1 in the light theme at 10px/700 — under AA. The dark theme's same
 * chip measures 7.9:1, so only light needs the darker ink. */
html[data-theme="light"] .badge-quiet { color: color-mix(in srgb, var(--dim) 55%, #000); }

.meta {
  font-family: var(--mono);
  font-size: 11px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.quick-link:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.quick-link svg { width: 14px; height: 14px; }

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  transition: transform 0.12s var(--ease), opacity 0.12s var(--ease);
}
.btn:active { transform: scale(0.975); }
.btn-fill { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-fill:hover { opacity: 0.9; }
.btn-out { border: 1px solid var(--line); color: var(--text); }
.btn-out:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--accent); }
.btn svg { width: 14px; height: 14px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  color: var(--dim);
  transition: color 0.12s var(--ease), background 0.12s var(--ease);
}
.icon-btn:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn-sm { width: 28px; height: 28px; }
.icon-btn-sm svg { width: 15px; height: 15px; }

/* Vote cluster — mono digits, compact (TapeCard footer) */
.votes { display: inline-flex; align-items: center; gap: 1px; }
.votes .icon-btn { width: 24px; height: 24px; }
.votes .icon-btn svg { width: 12px; height: 12px; }
.vote-score {
  min-width: 18px; text-align: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--dim);
}
.vote-score.is-up { color: var(--accent); }

/* ── Hero (music) ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 22px;
  border-radius: var(--r-hero);
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  overflow: hidden;
}
/* Deterministic per-item hue, but lightness/saturation per THEME. The dark
 * card takes a deep saturated wash; the light card needs a pale tint or the
 * accent kicker and the dim subline lose their contrast against it. */
.hero-wash {
  position: absolute; inset: 0;
  pointer-events: none;
  --hue: 270;
}
html[data-theme="dark"] .hero-wash {
  background: linear-gradient(135deg, hsl(var(--hue) 55% 32% / 0.85) 0%, transparent 70%);
}
html[data-theme="light"] .hero-wash {
  background: linear-gradient(135deg, hsl(var(--hue) 72% 93%) 0%, transparent 72%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; gap: 16px; }
.hero-main { display: flex; gap: 20px; align-items: flex-start; }
.hero-art {
  width: 150px; flex: none;
  border-radius: var(--r-art);
  overflow: hidden;
  box-shadow: 0 6px 18px var(--shadow-soft);
}
.hero-text { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hero-title {
  margin: 0;
  font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.3px;
  color: var(--text);
}
.hero-sub { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.hero-reason {
  margin: 0;
  font-size: 14px; line-height: 1.58;
  color: color-mix(in srgb, var(--text) 85%, transparent);
  max-width: 72ch;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Feed tabs (From the room) ─────────────────────────────────────── */

.feed-tabs { display: flex; gap: 24px; margin-bottom: 18px; }
.feed-tab {
  position: relative;
  padding-bottom: 8px;
  font-size: 17px; font-weight: 700;
  color: var(--dim);
  transition: color 0.14s var(--ease);
}
.feed-tab:hover { color: var(--text); }
.feed-tab[aria-selected="true"] { color: var(--text); }
.feed-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 32px; height: 3px; border-radius: 999px;
  background: var(--accent);
}

/* ── Rows (episodes, stations, favourites) ─────────────────────────── */

.rows { display: flex; flex-direction: column; }

.row {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 11px 10px;
  border-radius: var(--r-card);
  text-align: left;
  transition: background 0.12s var(--ease);
}
.row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.row + .row { border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
.row-cover { width: 52px; height: 52px; flex: none; border-radius: var(--r-pod); }
/* The cover hit-target in a ROW must size to the cover. Reusing
 * .tape-card-hit here (width:100%) made it consume the whole row and pushed
 * the title and actions out of view. */
.row-hit { flex: none; width: 52px; line-height: 0; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-title.is-played { color: var(--dim); }
/* The row's full-width hover state has to correspond to a real target. */
.row-title-btn { text-align: left; padding: 0; width: 100%; }
.row-title-btn:hover { color: var(--accent); }
.row-feed {
  font-family: var(--mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.row-progress { height: 2px; border-radius: 999px; background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; margin-top: 4px; }
.row-progress > i { display: block; height: 100%; background: var(--accent); }

.group-head { margin: 26px 0 8px; }
.group-head:first-child { margin-top: 0; }

/* ── Pods continue-listening rail ──────────────────────────────────── */

.cont-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px;
  gap: 16px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin;
}
.cont-card { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.cont-title {
  font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cont-bar { height: 3px; border-radius: 999px; background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.cont-bar > i { display: block; height: 100%; background: var(--accent); }
.cont-left { font-family: var(--mono); font-size: 10px; color: var(--dim); }

/* ── Pods shelf ────────────────────────────────────────────────────── */

.pick-list { display: flex; flex-direction: column; gap: 12px; }
.pick {
  display: flex; gap: 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: var(--r-card);
  text-align: left;
  transition: border-color 0.14s var(--ease);
}
.pick:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pick-cover { width: 74px; height: 74px; flex: none; border-radius: var(--r-pod); }
.pick-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pick-title { font-size: 15px; font-weight: 600; color: var(--text); }
.pick-author { font-size: 12px; color: var(--dim); }
.pick-blurb {
  margin: 2px 0 0;
  font-size: 12.5px; line-height: 1.55;
  color: color-mix(in srgb, var(--text) 80%, transparent);
  max-width: 78ch;
}
.pick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Taper recording chain. Long, full of unbroken "A>B>C" runs, so it needs
 * an explicit break opportunity or it becomes one giant word. */
.lineage {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 11px; line-height: 1.65; color: var(--dim);
  max-width: 76ch;
  overflow-wrap: anywhere;
}

/* ── Stations deck ─────────────────────────────────────────────────── */

.deck { position: relative; }
.deck-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.deck-card {
  position: relative;
  scroll-snap-align: start;
  height: 290px;
  border-radius: var(--r-deck);
  overflow: hidden;
  text-align: left;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.deck-wash { position: absolute; inset: 0; }
.deck-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Small station icons sit centred over the wash rather than being upscaled
 * to fill — a 64px .ico stretched to 290px reads as a broken image. */
.deck-card img.is-logo {
  inset: 0 0 auto 50%;
  transform: translateX(-50%);
  top: 54px;
  width: 108px; height: 108px;
  object-fit: contain;
  border-radius: var(--r-card);
}
.deck-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(var(--scrim), 0.78) 100%);
}
.deck-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
/* .deck-card is a fixed 290px with overflow:hidden and .deck-body is
 * bottom-anchored, so an unbounded name grows UPWARD and pushes the song
 * line out of the card. Clamp it. */
.deck-name {
  font-size: 19px; font-weight: 700; color: #fff; line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.deck-song {
  font-family: var(--mono); font-size: 13px; color: rgba(255, 255, 255, 0.92);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deck-fav {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(var(--scrim), 0.55);
  /* The scrim is always dark (white text over station art), so this chip
   * must NOT follow the theme accent — the light theme's dark indigo can
   * never reach 4.5:1 on black. Pinned to the dark-theme accent. */
  color: var(--accent-stations-fixed, #c7d2fe);
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.deck-fav svg { width: 10px; height: 10px; }

.deck-placeholder {
  height: 290px; border-radius: var(--r-deck);
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  display: flex; align-items: center; justify-content: center;
}

.scan-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
}
.scan-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.scan-btn svg { width: 12px; height: 12px; }

/* ── Recents rail (stations) ───────────────────────────────────────── */

.recent-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 108px;
  gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin;
}
.recent-card { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.recent-name {
  font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Search ────────────────────────────────────────────────────────── */

.searchbar { display: flex; gap: 10px; margin-bottom: 24px; }
.searchbar input {
  flex: 1;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit; font-size: 14px;
}
.searchbar input::placeholder { color: var(--dim); }
.searchbar input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.directory-status { margin: -8px 0 18px; }
.directory-status .btn { margin-left: auto; flex: none; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter-chip {
  padding: 6px 13px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase;
}
.filter-chip[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ── Skeletons / empty / error ─────────────────────────────────────── */

.sk { background: color-mix(in srgb, var(--text) 9%, transparent); border-radius: var(--r-bar-sm); animation: pulse 0.9s ease-in-out infinite alternate; }
.sk-cover { aspect-ratio: 1/1; width: 100%; border-radius: var(--r-card); }
.sk-line { height: 10px; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) {
  /* Covers the scan bar's infinite pulse and the toast slide too — the
   * earlier block only disabled the skeleton shimmer. */
  .sk, .scanbar-label svg, .toast { animation: none !important; }
  .sk { opacity: 0.75; }
  * { scroll-behavior: auto !important; }
  .artist-year-bar { transition: none !important; }
  .artist-year:hover .artist-year-bar { transform: none !important; }
}

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 54px 24px;
  text-align: center;
  color: var(--dim);
}
.empty svg { width: 30px; height: 30px; opacity: 0.75; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.empty-msg { font-size: 13px; max-width: 42ch; line-height: 1.55; }

.hint {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: var(--r-card);
  font-size: 13px; color: var(--dim);
}
.hint svg { width: 19px; height: 19px; color: var(--accent); flex: none; }

/* ── Attribution ───────────────────────────────────────────────────── */

.attribution {
  margin-top: 46px; padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  font-size: 11px; line-height: 1.7; color: var(--dim);
  max-width: 82ch;
}
.attribution a { color: var(--accent); }

/* ── Dock: scan bar + player ───────────────────────────────────────── */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 30;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }

.scanbar-slot { padding: 0 18px 10px; }
.scanbar {
  display: flex; align-items: center; gap: 14px;
  max-width: 620px; margin: 0 auto;
  padding: 10px 14px;
  border-radius: var(--r-bar);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid color-mix(in srgb, var(--accent-stations) 50%, transparent);
}
.scanbar-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent-stations);
  display: flex; align-items: center; gap: 7px;
}
.scanbar-label svg { width: 13px; height: 13px; animation: throb 1.1s ease-in-out infinite alternate; }
@keyframes throb { from { opacity: 0.45; } to { opacity: 1; } }
.scanbar-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Player — one persistent bar, survives surface switches */
.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  height: var(--player-h);
  padding: 0 20px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.player[hidden] { display: none; }

.player-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art { width: 46px; height: 46px; flex: none; border-radius: var(--r-mini); }
.player-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player-sub {
  font-size: 11px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player-sub.is-mono { font-family: var(--mono); }
.player-sub.is-accent { color: var(--pc-accent, var(--accent)); }

.player-transport { display: flex; align-items: center; gap: 6px; }
.player-transport .icon-btn { color: var(--text); }
.player-transport .icon-btn:disabled { color: var(--dim); opacity: 0.4; cursor: default; }
.player-transport .icon-btn:disabled:hover { background: none; }
.player-play {
  width: 42px; height: 42px;
  background: var(--pc-accent, var(--accent));
  color: var(--on-accent);
}
.player-play:hover { background: var(--pc-accent, var(--accent)); opacity: 0.9; }
.player-play svg { width: 17px; height: 17px; }

.player-end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.player-time { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }

.player-scrub {
  flex: 1; min-width: 90px; max-width: 260px;
  height: 4px;
  -webkit-appearance: none; appearance: none;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  cursor: pointer;
}
.player-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 999px;
  background: var(--pc-accent, var(--accent));
  border: 0;
}
.player-scrub::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 999px;
  background: var(--pc-accent, var(--accent)); border: 0;
}
.player-scrub:disabled { opacity: 0.4; cursor: default; }

.player-live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-stations) 16%, transparent);
  color: var(--accent-stations);
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1px;
}
.player-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
}
.player-love[aria-pressed="true"] { color: var(--accent-music); }
.player-love:disabled { opacity: 0.55; cursor: progress; }

.player-bar {
  position: absolute; left: 0; right: 0; top: 0;
  height: 2px;
  background: transparent;
}
.player-bar > i { display: block; height: 100%; background: var(--pc-accent, var(--accent)); }

/* ── Toast ─────────────────────────────────────────────────────────── */

.toast-slot {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 22px);
  transform: translateX(-50%);
  z-index: 45;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: 0 10px 30px var(--shadow-soft);
  animation: toast-in 0.3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Track list ────────────────────────────────────────────────────── */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  align-items: start;
}
.charts-grid-single { grid-template-columns: minmax(0, 1fr); }
.charts-grid > .section { margin: 0; min-width: 0; }
.chart-list { display: flex; flex-direction: column; }
.chart-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  color: var(--text);
  text-decoration: none;
}
.chart-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.chart-rank {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}
.chart-copy { min-width: 0; }
.chart-title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-meta {
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-love {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}
.chart-love svg { width: 14px; height: 14px; }
.chart-open { color: var(--dim); font-size: 22px; text-align: center; }

.tracklist { display: flex; flex-direction: column; }
.track {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  border-radius: var(--r-pod);
  text-align: left; width: 100%;
}
.track:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.track[aria-current="true"] { color: var(--accent); }
.track-num { font-family: var(--mono); font-size: 11px; color: var(--dim); width: 24px; flex: none; }
.track[aria-current="true"] .track-num { color: var(--accent); }
.track-name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-len { font-family: var(--mono); font-size: 11px; color: var(--dim); flex: none; }

/* ── Detail header ─────────────────────────────────────────────────── */

.detail-head { display: flex; gap: 26px; margin-bottom: 32px; align-items: flex-start; }
.detail-art { width: 208px; flex: none; border-radius: var(--r-art); overflow: hidden; box-shadow: 0 10px 28px var(--shadow-soft); }
.detail-body { min-width: 0; display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
/* Upstream identifiers arrive as unbroken 60+ character runs, which set a
 * min-content width the flex column cannot shrink below — the whole detail
 * body then pushed past the viewport. */
.detail-title {
  margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.4px;
  line-height: 1.15; overflow-wrap: anywhere;
}
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.detail-artist-link {
  display: inline-flex; align-items: center; gap: 9px;
  color: inherit; text-decoration: none;
}
.detail-artist-link:hover { color: var(--accent); }
.detail-artist-arrow {
  color: var(--dim); font-size: 0.72em; font-weight: 500;
  transform: translateY(-0.02em);
}

/* ── Artists ───────────────────────────────────────────────────────
 * One archive vocabulary across directory + detail: numbered reels,
 * catalog bars, tape rows and a procedural contact sheet when there is no
 * licensed portrait. All colour derives from existing music tokens.
 */

.explore-context {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: -10px 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--dim);
  font-family: var(--mono); font-size: 11px;
}
.explore-context-clear {
  margin-left: auto; color: var(--accent); font-weight: 700; text-decoration: none;
}
.explore-context-clear:hover { text-decoration: underline; }

.artist-directory-page,
.artist-page { width: 100%; }

.artist-searchbar { max-width: 580px; }
.artist-directory-search { padding-left: 16px !important; }
.artist-jump {
  display: flex; gap: 5px; overflow-x: auto;
  margin: -8px 0 20px; padding: 2px 0 8px;
  scrollbar-width: thin;
}
.artist-jump-key {
  width: 30px; height: 30px; flex: 0 0 30px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 7px;
  color: var(--dim);
  font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.artist-jump-key:hover { color: var(--accent); border-color: var(--accent); }
.artist-directory {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 34px; align-items: start;
}
.artist-letter-group {
  min-width: 0; scroll-margin-top: 88px;
  content-visibility: auto; contain-intrinsic-size: 1px 420px;
}
.artist-letter-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 8px; margin-bottom: 3px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}
.artist-letter-head h2 {
  margin: 0; color: var(--accent);
  font: 700 15px/1 var(--mono);
}
.artist-letter-head span { color: var(--dim); font: 10px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.8px; }
.artist-directory-rows { display: flex; flex-direction: column; }
.artist-directory-row {
  display: flex; align-items: center; gap: 11px; min-width: 0;
  padding: 8px 7px;
  border-radius: var(--r-pod);
  color: var(--text); text-decoration: none;
}
.artist-directory-row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.artist-directory-monogram {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center;
  border: 1px solid hsl(var(--artist-hue) 42% 58% / 0.35);
  border-radius: 999px;
  background: linear-gradient(145deg,
    hsl(var(--artist-hue) 38% 42%),
    hsl(var(--artist-hue) 32% 18%));
  color: rgba(255, 255, 255, 0.88);
  font: 700 14px/1 var(--mono);
}
.artist-directory-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.artist-directory-name {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 14px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.artist-directory-meta { color: var(--dim); font: 10px/1.3 var(--mono); }
.artist-featured-badge {
  flex: none; padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 4px; color: var(--accent);
  font: 700 8px/1.2 var(--mono); letter-spacing: 0.7px; text-transform: uppercase;
}
.artist-row-chevron { color: var(--dim); font-size: 18px; }

.artist-skeleton { display: flex; flex-direction: column; gap: 28px; }
.artist-skeleton-hero { width: 100%; min-height: 520px; border-radius: var(--r-hero); }

.artist-hero {
  position: relative; overflow: hidden;
  margin-bottom: 48px; padding: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--r-hero);
  background:
    radial-gradient(circle at 82% 20%, hsl(var(--artist-hue) 50% 34% / 0.22), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, var(--card) 90%, #000), var(--card));
  box-shadow: 0 18px 46px var(--shadow-soft);
}
.artist-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,0.015) 3px 4px);
}
.artist-hero > * { position: relative; }
.artist-hero-top {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 32px; align-items: stretch;
}
.artist-hero-copy {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-width: 0; padding: 20px 0;
}
.artist-stamp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.artist-stamp {
  padding: 4px 10px 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 68%, transparent);
  color: var(--accent);
  font: 700 10px/1 var(--mono); letter-spacing: 1px; text-transform: uppercase;
  transform: rotate(-1.5deg);
}
.artist-reel-number { color: var(--dim); font: 10px/1 var(--mono); letter-spacing: 0.5px; }
.artist-title {
  margin: 0; max-width: 100%;
  font-size: clamp(40px, 5.3vw, 76px); line-height: 0.94;
  letter-spacing: -2.5px; overflow-wrap: anywhere;
}
.artist-meta {
  margin: 17px 0 0; color: var(--dim);
  font: 12px/1.55 var(--mono);
}
.artist-tagline {
  margin: 18px 0 0; max-width: 42ch;
  color: color-mix(in srgb, var(--text) 88%, var(--accent));
  font-size: 17px; font-weight: 550; font-style: italic; line-height: 1.5;
}
.artist-genre { margin-top: 15px; }
.artist-procedural-art {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  min-height: 350px; aspect-ratio: 1.3 / 1;
  overflow: hidden;
  border: 1px solid hsl(var(--artist-hue) 45% 70% / 0.18);
  border-radius: 16px 16px 12px 12px;
  background:
    radial-gradient(circle at 38% 32%, hsl(var(--artist-hue) 46% 38% / 0.72), transparent 36%),
    linear-gradient(145deg, hsl(var(--artist-hue) 38% 30%), hsl(var(--artist-hue) 32% 13%));
  box-shadow: inset 0 0 80px rgba(0,0,0,0.18), 0 15px 34px rgba(0,0,0,0.22);
  transform: rotate(0.7deg);
}
.artist-procedural-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-radial-gradient(circle at 45% 46%, transparent 0 11px, rgba(255,255,255,0.025) 12px 13px);
}
.artist-art-ring { position: absolute; border: 1px solid rgba(255,255,255,0.07); border-radius: 999px; }
.artist-art-ring-a { width: 70%; aspect-ratio: 1; }
.artist-art-ring-b { width: 42%; aspect-ratio: 1; }
.artist-art-no-print {
  position: absolute; right: 18px; top: 16px;
  padding: 4px 8px 3px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.46);
  font: 9px/1 var(--mono); letter-spacing: 0.8px; text-transform: uppercase;
  transform: rotate(4deg);
}
.artist-art-initial {
  color: rgba(255,255,255,0.9);
  font: 750 clamp(92px, 13vw, 160px)/1 var(--sans);
  text-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.artist-art-cassette { position: absolute; left: 18px; bottom: 16px; color: rgba(255,255,255,0.38); }
.artist-art-cassette svg { width: 24px; height: 24px; }
.artist-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.artist-hero-actions .btn { text-decoration: none; }
.artist-hero-actions .btn[disabled] { opacity: 0.48; cursor: default; }
.artist-play-reason {
  display: flex; gap: 8px; margin: 9px 0 0;
  color: var(--dim); font: 10px/1.5 var(--mono);
}
.artist-play-reason span { color: var(--accent); }
.artist-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0; margin-top: 26px; padding-top: 19px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 75%, transparent);
}
.artist-stat { min-width: 0; padding: 0 19px; border-left: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.artist-stat:first-child { padding-left: 0; border-left: 0; }
.artist-stat strong { display: block; color: var(--text); font: 700 clamp(20px, 2.4vw, 31px)/1 var(--mono); letter-spacing: 1px; }
.artist-stat span { display: block; margin-top: 7px; color: var(--dim); font: 9px/1.35 var(--mono); letter-spacing: 0.9px; text-transform: uppercase; }

.artist-section { margin-bottom: 48px; }
.artist-story-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr); gap: 36px; }
.artist-story-prose p { margin: 0 0 15px; color: color-mix(in srgb, var(--text) 90%, var(--dim)); font-size: 15px; line-height: 1.72; }
.artist-story-prose blockquote {
  margin: 22px 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent);
  color: var(--accent); font-size: 19px; font-style: italic; line-height: 1.55;
}
.artist-story-prose .artist-story-signoff { color: var(--dim); font: 10px/1.4 var(--mono); }
.artist-story-side { display: flex; flex-direction: column; gap: 12px; }
.artist-story-links { display: flex; flex-direction: column; }
.artist-story-links a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  color: var(--text); text-decoration: none;
}
.artist-story-links a:hover strong { color: var(--accent); }
.artist-story-links strong { font-size: 13px; }
.artist-story-links span { color: var(--dim); font: 9px/1 var(--mono); }
.artist-charity {
  display: flex; flex-direction: column; gap: 7px;
  padding: 15px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--r-card); background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: inherit; text-decoration: none;
}
.artist-charity:hover { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); }
.artist-charity strong { font-size: 14px; }
.artist-charity > span:last-child { color: var(--dim); font-size: 12px; line-height: 1.5; }

.artist-essential-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.artist-essential-grid .artist-tape-row {
  align-items: stretch; border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: var(--r-card); background: var(--card);
}
.artist-essential-grid .artist-tape-main { align-items: flex-start; padding: 13px; }
.artist-essential-grid .artist-tape-art { width: 62px; flex-basis: 62px; }
.artist-essential-grid .artist-tape-rank { display: none; }
.artist-essential-grid .artist-tape-copy em { white-space: normal; }

.artist-catalog > .section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.artist-catalog > .section-head .section-title { margin-right: auto; }
.artist-timeline {
  margin: 20px 0 34px; padding: 22px 18px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 66%, transparent);
  border-radius: var(--r-card); background: color-mix(in srgb, var(--card) 78%, transparent);
}
.artist-year-bars {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(19px, 1fr);
  align-items: end; gap: 5px; min-height: 132px;
  overflow-x: auto; padding: 4px 1px 7px; scrollbar-width: thin;
}
.artist-year,
.artist-year-gap {
  min-width: 19px; height: 126px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  gap: 5px; text-decoration: none;
}
.artist-year-count { color: var(--dim); font: 8px/1 var(--mono); opacity: 0.78; }
.artist-year-bar {
  display: block; width: 100%; max-width: 15px; min-height: 6px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 68%, #4a2f6d), var(--accent));
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}
.artist-year:hover .artist-year-bar { filter: brightness(1.15); transform: translateY(-2px); }
.artist-year-label { color: var(--dim); font: 8px/1 var(--mono); }
.artist-year:hover .artist-year-label { color: var(--accent); }
.artist-era-notes { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--line) 62%, transparent); }
.artist-era-notes span { color: var(--dim); font: 9px/1.35 var(--mono); }

.artist-catalog-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.artist-ledger { position: relative; min-width: 0; }
.artist-ledger h3 { margin: 0 0 10px; font-size: 20px; }
.artist-ledger-rows { display: flex; flex-direction: column; }
.artist-ledger-all {
  display: inline-block; margin-top: 10px; color: var(--dim);
  font: 10px/1 var(--mono); text-decoration: none;
}
.artist-ledger-all:hover { color: var(--accent); }
.artist-tape-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 52%, transparent);
}
.artist-tape-main {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1;
  padding: 9px 4px; color: inherit; text-decoration: none;
}
.artist-tape-main:hover strong { color: var(--accent); }
.artist-tape-rank,
.artist-room-rank { width: 22px; flex: 0 0 22px; color: var(--dim); font: 9px/1 var(--mono); }
.artist-tape-art { width: 44px; flex: 0 0 44px; }
.artist-tape-art .cover { border-radius: 7px; }
.artist-tape-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.artist-tape-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.artist-tape-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font: 9px/1.3 var(--mono); }
.artist-tape-copy em { color: var(--dim); font-size: 11px; line-height: 1.45; }
.artist-downloads,
.artist-track-plays { flex: none; color: var(--dim); font: 9px/1 var(--mono); white-space: nowrap; }
.artist-row-play { flex: none; width: 34px; height: 34px; }
.artist-row-play svg { width: 12px; height: 12px; }

.artist-room-list,
.artist-top-track-list { display: flex; flex-direction: column; }
.artist-room-row,
.artist-top-track {
  display: flex; align-items: baseline; gap: 10px; min-width: 0;
  padding: 11px 3px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 52%, transparent);
  color: inherit; text-decoration: none;
}
.artist-room-row:hover strong,
.artist-top-track:hover strong { color: var(--accent); }
.artist-room-row strong { min-width: 0; font-size: 13px; }
.artist-room-place { color: var(--dim); font: 9px/1 var(--mono); white-space: nowrap; }
.artist-room-rule { flex: 1; min-width: 12px; border-bottom: 1px dotted color-mix(in srgb, var(--line) 80%, transparent); }
.artist-room-count { color: var(--dim); font: 10px/1 var(--mono); white-space: nowrap; }
.artist-top-track { align-items: center; }
.artist-top-track .artist-tape-copy strong { white-space: normal; }
.artist-track-plays { margin-left: auto; }
.artist-fallback-search { display: table; margin: -34px auto 30px; text-decoration: none; }

html[data-theme="light"] .artist-hero {
  background:
    radial-gradient(circle at 82% 20%, hsl(var(--artist-hue) 48% 62% / 0.16), transparent 40%),
    linear-gradient(145deg, #faf9fc, var(--card));
}
html[data-theme="light"] .artist-procedural-art { box-shadow: inset 0 0 70px rgba(0,0,0,0.11), 0 15px 34px var(--shadow-soft); }

.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 20px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--dim);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 12px; height: 12px; }

/* ── Responsive ────────────────────────────────────────────────────
 * Desktop is the target. Below 900px the rail becomes a top bar so the
 * site stays usable on a narrow window — not a mobile app.
 */

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: sticky; inset: 0 auto auto 0;
    width: 100%;
    /* `height: auto` alone still stretched to the grid row, which
     * min-height:100vh on .shell made a full viewport tall. */
    height: auto; align-self: start;
    flex-direction: row; align-items: center; gap: 16px;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    /* NOT overflow-x: auto. That established a scroll container which
     * clipped the absolutely-positioned switcher dropdown, leaving only the
     * first of the three surfaces reachable — pods and stations became
     * unusable on any narrow window. */
    overflow: visible;
    flex-wrap: wrap;
  }
  .rail-nav { flex-direction: row; flex: 1; gap: 4px; flex-wrap: wrap; }
  .rail-link { white-space: nowrap; }
  /* The label is the link's ONLY text and the icon is aria-hidden, so
   * hiding it left three nav links with an empty accessible name. Shrink
   * rather than remove. */
  .rail-link span { font-size: 13px; }
  .rail-foot { flex: none; }
  .theme-toggle-label { display: none; }
  .content { grid-column: 1; padding: 0 18px calc(var(--player-h) + 48px); }
  .surface-name { font-size: 34px; }
  .hero-main { flex-direction: column; }
  .hero-art { width: 128px; }
  .detail-head { flex-direction: column; }
  .detail-art { width: 168px; }
  .artist-directory { grid-template-columns: minmax(0, 1fr); }
  .artist-hero { padding: 22px; }
  .artist-hero-top { grid-template-columns: minmax(0, 1fr); }
  .artist-procedural-art { min-height: 280px; aspect-ratio: 1.7 / 1; }
  .artist-story-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .artist-essential-grid { grid-template-columns: minmax(0, 1fr); }
  .artist-catalog-columns { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .charts-grid { grid-template-columns: minmax(0, 1fr); }
  /* Keep the close button and the scrubber. Hiding the whole trailing group
   * removed the only way to dismiss the player AND all seeking, which is
   * worse than a cramped bar. Only the time readouts go. */
  .player { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 0 12px; }
  .player-end { gap: 8px; }
  .player-time { display: none; }
  .player-scrub { min-width: 60px; max-width: 120px; }
}

@media (max-width: 560px) {
  .player-scrub { display: none; }
  .artist-title { font-size: 40px; letter-spacing: -1.4px; }
  .artist-hero { padding: 17px; margin-left: -3px; margin-right: -3px; }
  .artist-procedural-art { min-height: 220px; aspect-ratio: 1.35 / 1; }
  .artist-hero-actions { flex-direction: column; }
  .artist-hero-actions .btn { width: 100%; justify-content: center; }
  .artist-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .artist-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .artist-year-count { visibility: hidden; }
  .artist-room-place,
  .artist-room-rule { display: none; }
  .artist-tape-art { width: 40px; flex-basis: 40px; }
  .artist-downloads { display: none; }
  .artist-story-prose blockquote { font-size: 17px; }
}

/* Keep the issue reporter above the persistent audio dock. The widget CSS is
 * loaded after this sheet; the body-qualified selectors intentionally win on
 * specificity without coupling the shared widget to this app's player. */
body .fcc-twg-fab {
  bottom: calc(var(--player-h) + 1rem);
}
body .fcc-twg-modal {
  bottom: calc(var(--player-h) + 4.5rem);
  max-height: calc(100vh - var(--player-h) - 6rem);
  max-height: calc(100dvh - var(--player-h) - 6rem);
}
