/* Goldenrod Radio. Warm paper by day, a lit dial by night. */

:root {
  color-scheme: light;
  --paper: #f5efe2;
  --card: #fffcf5;
  --card-2: #f9f3e6;
  --ink: #1f1a12;
  --ink-2: #574f40;
  --muted: #847a67;
  --line: #e7dfcc;
  --line-2: #d8ceb6;
  --gold: #daa520;
  --gold-ink: #845e00;
  --gold-wash: rgba(218, 165, 32, 0.14);
  --focus: #b57d00;

  --plate: #1f170a;
  --plate-2: #2c2010;
  --lcd-bg: #120c04;
  --lcd: #ffc94a;
  --lcd-dim: rgba(255, 201, 74, 0.45);

  /* Genre families: fixed slots, validated against --card (light) and dark --card. */
  --f-electronic: #2a78d6;
  --f-classical: #eb6834;
  --f-ambient: #1baf7a;
  --f-pop: #eda100;
  --f-hiphop: #e87ba4;
  --f-folk: #008300;
  --f-jazz: #4a3aa7;
  --f-rock: #e34948;
  --f-none: #b9b09c;

  /* Sequential gold, little -> lots. */
  --s0: #efe7d4;
  --s1: #f3dc9c;
  --s2: #e7bd52;
  --s3: #c8920f;
  --s4: #8e6400;
  --s5: #573c00;

  --radius: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(60, 40, 0, 0.06), 0 6px 18px rgba(60, 40, 0, 0.06);
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #110e09;
    --card: #1c1914;
    --card-2: #221e17;
    --ink: #f2eadb;
    --ink-2: #c6baa2;
    --muted: #93886f;
    --line: #2d281f;
    --line-2: #3b3428;
    --gold: #e8b23a;
    --gold-ink: #f0c45e;
    --gold-wash: rgba(232, 178, 58, 0.12);
    --focus: #f0c45e;
    --plate: #0b0804;
    --plate-2: #17110a;
    --f-electronic: #3987e5;
    --f-classical: #d95926;
    --f-ambient: #199e70;
    --f-pop: #c98500;
    --f-hiphop: #d55181;
    --f-folk: #008300;
    --f-jazz: #9085e9;
    --f-rock: #e66767;
    --f-none: #5d5546;
    --s0: #26211a;
    --s1: #4a3810;
    --s2: #7a5a0e;
    --s3: #b0820f;
    --s4: #e2ad34;
    --s5: #ffd877;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #110e09;
  --card: #1c1914;
  --card-2: #221e17;
  --ink: #f2eadb;
  --ink-2: #c6baa2;
  --muted: #93886f;
  --line: #2d281f;
  --line-2: #3b3428;
  --gold: #e8b23a;
  --gold-ink: #f0c45e;
  --gold-wash: rgba(232, 178, 58, 0.12);
  --focus: #f0c45e;
  --plate: #0b0804;
  --plate-2: #17110a;
  --f-electronic: #3987e5;
  --f-classical: #d95926;
  --f-ambient: #199e70;
  --f-pop: #c98500;
  --f-hiphop: #d55181;
  --f-folk: #008300;
  --f-jazz: #9085e9;
  --f-rock: #e66767;
  --f-none: #5d5546;
  --s0: #26211a;
  --s1: #4a3810;
  --s2: #7a5a0e;
  --s3: #b0820f;
  --s4: #e2ad34;
  --s5: #ffd877;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3 { margin: 0; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Faceplate: the radio itself ---------- */
.faceplate {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(var(--plate-2), var(--plate));
  color: #f6e6c0; box-shadow: 0 1px 0 rgba(255, 201, 74, 0.12), 0 6px 20px rgba(0, 0, 0, 0.25);
}
.faceplate-in {
  max-width: 1180px; margin: 0 auto; padding: 10px 24px 8px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
}
.ident { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #f6e6c0; }
.ident:hover { color: #fff; }
.ident img { image-rendering: pixelated; border-radius: 6px; }
.ident-name { font: 700 17px/1 var(--mono); letter-spacing: 0.14em; }
.ident-name b { color: var(--lcd); margin-left: 4px; }

.lcd {
  min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) 140px; align-items: center; gap: 12px;
  padding: 8px 14px; border-radius: 10px; background: var(--lcd-bg);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.08);
  font: 500 13px/1.2 var(--mono); color: var(--lcd); text-shadow: 0 0 8px rgba(255, 190, 40, 0.35);
}
.lamp { width: 9px; height: 9px; border-radius: 50%; background: #4a3008; }
.lamp.live { background: #ff4b3e; box-shadow: 0 0 9px #ff4b3e; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.5; } }
.lcd-text { min-width: 0; display: flex; gap: 10px; white-space: nowrap; overflow: hidden; }
.lcd-state { font-weight: 700; letter-spacing: 0.1em; flex: none; }
.lcd-song { overflow: hidden; text-overflow: ellipsis; color: #ffe3a0; }
.lcd-song a { text-decoration: none; }
.lcd-song a:hover { color: #fff; text-decoration: underline; }
.lcd-scale {
  position: relative; height: 14px;
  background:
    repeating-linear-gradient(90deg, var(--lcd-dim) 0 1px, transparent 1px 7px) bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--lcd) 0 1px, transparent 1px 35px) bottom / 100% 9px no-repeat;
}
.lcd-scale i { position: absolute; top: -2px; bottom: -2px; left: 0; width: 2px; background: #ff4b3e; box-shadow: 0 0 6px #ff4b3e; transition: left 0.5s linear; }

.tune {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: #2a1c00;
  background: linear-gradient(#ffd466, #e9a91f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 0 #9c6a00;
}
.tune:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 #9c6a00; }
.tune:disabled { opacity: 0.4; cursor: default; }
.tune.on { background: linear-gradient(#6fd88a, #2f9a4a); color: #052610; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #1b6430; }
.tune.blocked { background: linear-gradient(#ff8a7a, #d23a2c); color: #fff; box-shadow: 0 2px 0 #8a1d14; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; height: 100%; border-radius: 1px; background: currentColor; }
.eq i:nth-child(1) { height: 55%; }
.eq i:nth-child(3) { height: 75%; }
.tune.on .eq i { animation: eq 0.9s ease-in-out infinite; }
.tune.on .eq i:nth-child(2) { animation-delay: -0.3s; }
.tune.on .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

.presets {
  max-width: 1180px; margin: 0 auto; padding: 0 24px 10px;
  display: flex; gap: 8px;
}
.presets a {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 14px 7px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 14px; color: #e9d8b0;
  background: linear-gradient(#3a2c16, #2a1f0e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #0b0703;
}
.presets a small { font: 700 10px var(--mono); color: rgba(255, 201, 74, 0.55); }
.presets a:hover { color: #fff; }
.presets a[aria-current='page'] {
  color: #2a1c00; background: linear-gradient(#ffd466, #e9a91f); transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 #9c6a00;
}
.presets a[aria-current='page'] small { color: rgba(42, 28, 0, 0.6); }

/* ---------- Page ---------- */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 24px 40px; outline: none; }
.loading, .empty { padding: 60px 0; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 18px; }
.foot { max-width: 1180px; width: 100%; margin: 0 auto; padding: 18px 24px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot p { margin: 0; max-width: 70ch; }
.foot p + p { margin-top: 8px; }
.foot-toggle { padding: 0; border: 0; background: none; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot-toggle:hover { color: var(--ink); }

.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.page-head h1 { font: 700 34px/1.05 var(--serif); letter-spacing: -0.01em; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }
.kicker { display: block; font: 700 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px; }
.kicker a { text-decoration: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { margin-top: 34px; }
.section > h2 { font: 700 22px/1.2 var(--serif); margin-bottom: 12px; }
.section > .sub { margin: -8px 0 14px; color: var(--muted); font-size: 14px; }

/* ---------- On air card ---------- */
.onair { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding: 18px; align-items: center; }
.onair .art { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--card-2); }
.onair .art img { width: 100%; height: 100%; object-fit: cover; }
.onair h2 { font: 700 28px/1.1 var(--serif); margin: 6px 0 4px; overflow-wrap: anywhere; }
.onair .who { font-weight: 600; color: var(--ink-2); }
.onair .from { margin-top: 2px; font-size: 13px; color: var(--muted); }
.progress { margin-top: 14px; height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.5s linear; }
.times { display: flex; justify-content: space-between; font: 500 12px var(--mono); color: var(--muted); margin-top: 6px; }
.offair { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--ink-2); }
.offair .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.tile { padding: 14px 16px; }
.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; line-height: 1.15; overflow-wrap: anywhere; }
.tile .value small { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tile .note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hero-fig { font-size: 56px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

/* ---------- Days ---------- */
.day { margin-top: 26px; padding: 20px 22px 14px; }
.day-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.day-head h2 { font: 700 24px/1.1 var(--serif); }
.day-head h2 a { text-decoration: none; }
.day-head h2 em { font-style: italic; font-weight: 500; color: var(--muted); margin-right: 8px; }
.day-meta { font-size: 14px; color: var(--ink-2); }
.day-meta b { color: var(--ink); }
.mix { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 9px; height: 9px; border-radius: 3px; flex: none; }

.ribbon { margin: 14px 0 6px; }
.ribbon svg { display: block; width: 100%; height: 44px; overflow: visible; }
.ribbon .hour { stroke: var(--line); stroke-width: 1; }
.ribbon .hour-label { fill: var(--muted); font: 500 10px var(--mono); }
.ribbon .track-bg { fill: var(--card-2); }
.ribbon rect.seg { cursor: pointer; }
.ribbon rect.seg:hover, .ribbon rect.seg.hot { stroke: var(--ink); stroke-width: 1.5; }

.plays { list-style: none; margin: 8px 0 0; padding: 0; }
.play {
  display: grid; grid-template-columns: 52px 72px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 7px 8px; margin: 0 -8px; border-radius: 10px;
}
.play:hover, .play.hot { background: var(--gold-wash); }
.play time { font: 500 12px var(--mono); color: var(--muted); }
.play .thumb { width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: var(--card-2); }
.play .t { min-width: 0; }
.play .title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.play .by { display: block; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play .by a { text-decoration: none; }
.play .by a:hover { text-decoration: underline; }
.play .right { display: flex; align-items: center; gap: 10px; }
.play .dur { font: 500 12px var(--mono); color: var(--muted); min-width: 40px; text-align: right; }
.play .dur2 { display: none; font: 500 11px var(--mono); color: var(--muted); margin-top: 2px; }
.play.skip { opacity: 0.5; }
.play.skip .dur::after, .play.skip .dur2::after { content: ' skip'; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--card); text-decoration: none; white-space: nowrap;
}
a.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* What version a song is: "slowed + reverb", "piano arrangement" */
.vtag { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line-2); font: 500 11px/1.6 var(--sans); color: var(--muted); vertical-align: 1px; white-space: nowrap; letter-spacing: 0; }
h1 .vtag { margin: 0 0 0 12px; font-size: 13px; vertical-align: 0.35em; }
.table tbody tr[aria-current] { background: var(--gold-wash); }

.group { margin: 6px 0 6px 64px; }
/* The line marking the album's songs starts under its heading, so the heading's thumbnail sits clear of it. */
.group > .plays { border-left: 2px solid var(--line-2); padding-left: 12px; margin-top: 6px; }
.group-head { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); padding: 4px 0 2px; }
/* The album's or mix's own thumbnail, where its songs' would be, in line with the log's other thumbnails. */
.group-head .thumb { width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: var(--card-2); flex: none; display: block; }
.group-head a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.group-head a:hover { text-decoration: underline; }
.group .play { grid-template-columns: 52px minmax(0, 1fr) auto; margin-left: -12px; }
.group .play .thumb { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--gold); color: var(--ink); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #261900; }

/* ---------- The log's pager: one day per page, side by side, swiped or stepped through ---------- */
.pager { --gutter: 24px; margin-top: 22px; }
.pager-bar { display: flex; align-items: flex-end; gap: 6px 24px; }
.pager-label { flex: none; padding-bottom: 6px; font-size: 13px; color: var(--muted); }
.pager-label .kicker { margin-bottom: 6px; }
.daystrip {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; padding: 2px 0 4px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.daystrip > :first-child { margin-left: auto; } /* few days: sit at the right, by the newest */
/* Many days: fade the edges so the strip reads as scrollable (padded so the ends can clear the fade). */
.daystrip.scrolls { padding-inline: 18px; mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.daystrip-month { flex: none; padding: 0 5px 5px 10px; font: 700 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.daystrip-day {
  flex: none; display: grid; justify-items: center; gap: 4px; width: 26px; padding: 5px 0 4px; border-radius: 7px;
  text-decoration: none; color: var(--muted);
}
.daystrip-day.gap { margin-left: 8px; }
.daystrip-day .bar { display: flex; align-items: flex-end; height: 26px; }
.daystrip-day .bar i { display: block; width: 10px; min-height: 2px; border-radius: 3px 3px 1px 1px; background: var(--muted); opacity: 0.4; }
.daystrip-day .d { font: 500 10px/1 var(--mono); font-variant-numeric: tabular-nums; }
.daystrip-day:hover { color: var(--ink); }
.daystrip-day:hover .bar i { opacity: 0.8; }
.daystrip-day[aria-current] { color: var(--gold-ink); background: var(--gold-wash); }
.daystrip-day[aria-current] .bar i { background: var(--gold); opacity: 1; }
.daystrip-day[aria-current] .d { font-weight: 700; }

.pager-view { position: relative; margin-top: 6px; }
/* Pages are 100% wide; the track reaches into the page gutters so card edges and shadows aren't cut. */
.pager-track {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 100%; column-gap: calc(var(--gutter) * 2); align-items: start;
  margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 24px; scroll-padding-inline: var(--gutter);
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.pager-track::-webkit-scrollbar { display: none; }
.pager-track > .day { margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.pager .day-head { display: block; }
.pager .day-head h2 { padding-right: 84px; }
.pager .day-meta { margin-top: 4px; }
/* The arrows stay put while the pages slide under them, so they can be clicked again and again. */
.pager-arrows { position: absolute; z-index: 1; top: 21px; right: 23px; display: flex; gap: 6px; }
.pager-arrow {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2);
}
.pager-arrow:hover { border-color: var(--gold); color: var(--ink); }
.pager-arrow[aria-disabled='true'] { opacity: 0.35; cursor: default; }
.pager-arrow[aria-disabled='true']:hover { border-color: var(--line-2); color: var(--ink-2); }

/* ---------- Library ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.search {
  flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--card);
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button, .seg a {
  border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; text-decoration: none;
}
.seg button[aria-pressed='true'], .seg a[aria-current='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(40, 30, 0, 0.15); }
select {
  height: 36px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font: 500 13px var(--sans); appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filters button { cursor: pointer; }
.filters button[aria-pressed='true'] { border-color: var(--ink-2); color: var(--ink); background: var(--card-2); }
.count { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--gold-wash); }
.table .r { text-align: right; }
.table .song { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .song img { width: 64px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; background: var(--card-2); }
.table .song div { min-width: 0; }
.table .song a.title { font-weight: 600; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .song .by { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .song .by a { text-decoration: none; }
.table .song .by a:hover { text-decoration: underline; }
.table td.mono, .table td .mono { font-size: 12px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell i { display: block; height: 6px; border-radius: 0 3px 3px 0; background: var(--gold); min-width: 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile-link { display: block; padding: 14px 16px; text-decoration: none; transition: transform 0.12s, border-color 0.12s; }
.tile-link:hover { transform: translateY(-2px); border-color: var(--gold); color: inherit; }
.tile-link h3 { font: 700 17px/1.2 var(--serif); overflow-wrap: anywhere; }
.tile-link .meta { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.tile-link .chips { margin-top: 10px; }
.thumbs { display: flex; margin-top: 12px; }
.thumbs img { width: 52px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; border: 2px solid var(--card); margin-left: -10px; background: var(--card-2); }
.thumbs img:first-child { margin-left: 0; }
.album-card img.cover { width: calc(100% + 32px); margin: -14px -16px 12px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: var(--card-2); }
.badge { display: inline-block; font: 700 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- Track / collection pages ---------- */
.track-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.player { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: var(--shadow); }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player button.play-btn {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.45)); cursor: pointer; color: #fff;
}
.play-btn span {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; font-weight: 700;
  background: rgba(20, 14, 4, 0.75); backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.play-btn span::before { content: ''; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--lcd); }
.track-hero h1 { font: 700 38px/1.05 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.track-hero .who { font-size: 18px; font-weight: 600; color: var(--ink-2); margin-top: 8px; }
.track-hero .who a { text-decoration: none; }
.track-hero .who a:hover { text-decoration: underline; }
.track-hero .from { margin-top: 6px; color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.fact { padding: 10px 12px; }
.fact .label { font-size: 12px; color: var(--muted); }
.fact .value { font-weight: 700; font-size: 17px; }
.dials { display: grid; gap: 12px; margin-top: 18px; }
.dial-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 13px; }
.dial-row .name { font-weight: 600; color: var(--ink-2); }
.dial-row > span:last-child { display: block; }
.dial-track { display: block; position: relative; height: 8px; border-radius: 999px; background: var(--line); }
.dial-track i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid var(--card); transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.dial-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 3px; grid-column: 2; }
.listens-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 18px; }
.listens-list li { font-size: 14px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.listens-list a { text-decoration: none; }
.listens-list a:hover { text-decoration: underline; }
.tracklist { counter-reset: tl; }

/* ---------- Charts ---------- */
.chart { padding: 18px 18px 14px; }
.chart h3 { font: 600 15px/1.3 var(--sans); margin-bottom: 12px; }
.chart .sub { font-size: 13px; color: var(--muted); margin: -10px 0 12px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-grid .wide { grid-column: 1 / -1; }
.axis text, .tick { fill: var(--muted); font: 500 10px var(--mono); }
.gridline { stroke: var(--line); stroke-width: 1; }
.baseline { stroke: var(--line-2); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); margin: 0 0 10px; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 4.5rem; gap: 10px; align-items: center; font-size: 13px; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; text-decoration: none; }
.hbar .name small { color: var(--muted); font-weight: 400; }
.hbar .track { height: 14px; display: flex; align-items: center; }
.hbar .track i { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--gold); min-width: 2px; }
.hbar .v { font: 500 12px var(--mono); color: var(--ink-2); text-align: right; }
.cal-cell { shape-rendering: crispEdges; }
.cal-cell:hover { stroke: var(--ink); stroke-width: 1.5; }
.scale-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.scale-legend i { width: 12px; height: 12px; border-radius: 3px; }
details.table-view { margin-top: 10px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--muted); }
details.table-view table { margin-top: 8px; border-collapse: collapse; font-size: 12px; }
details.table-view td, details.table-view th { padding: 3px 12px 3px 0; text-align: left; border-bottom: 1px solid var(--line); }

/* ---------- Map ---------- */
/* The picture on the left, the panel for whatever was clicked on the right (below, on a phone). */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 16px; align-items: start; }
.map-main { min-width: 0; }
.map-chart { position: relative; overflow: hidden; }
/* A scene: a name artists and uploaders give their own music. */
.chip.scene { border-color: color-mix(in oklab, var(--gold) 45%, var(--line)); background: color-mix(in oklab, var(--gold) 9%, var(--card)); }
.chip.scene b { color: var(--gold-ink); font-size: 10px; }
.acc { display: inline-flex; gap: 6px; }
.acc a { font: 600 10.5px var(--mono); letter-spacing: 0.02em; text-decoration: none; color: var(--muted); padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
.acc a:hover { color: var(--ink); border-color: var(--gold); }
.why-line { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.vid { display: grid; gap: 3px; text-decoration: none; min-width: 0; }
.vid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--card-2); margin-bottom: 4px; transition: transform 0.15s; }
.vid:hover img { transform: translateY(-2px); }
.vid b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Blocks: tiles sized by listening time, in areas. */
.tm { padding: 0; }
.tm-area { position: absolute; height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 10.5px/18px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.tm-area b { color: var(--ink-2); font-weight: 700; }
.tm-tile {
  position: absolute; overflow: hidden; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  padding: 5px 7px; border-radius: 7px; cursor: pointer; color: var(--ink); line-height: 1.08; font-family: var(--serif);
  background: color-mix(in oklab, var(--c) 24%, var(--card)); border: 1px solid color-mix(in oklab, var(--c) 52%, var(--card));
  transition: background 0.12s;
}
.tm-tile.bare { padding: 0; border-radius: 4px; }
/* The line between the scenes' band and everything else. */
.tm-band-label { position: absolute; left: 4px; right: 4px; height: 16px; font: 500 10.5px/16px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 3px; pointer-events: none; }
/* A genre holding its sound scenes. */
.tm-block { position: absolute; border: 1px dashed var(--line-2); border-radius: 9px; pointer-events: none; }
.tm-block span { position: absolute; left: 7px; top: 2px; font: 500 10px/14px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; max-width: calc(100% - 12px); text-overflow: ellipsis; }
.tm-block b { color: var(--ink-2); }
/* Music in no scene, by its genre: quieter than the scenes. */
.tm-tile.genre { background: color-mix(in oklab, var(--c) 10%, var(--card)); border-color: color-mix(in oklab, var(--c) 30%, var(--card)); color: var(--ink-2); }
.tm-tile.genre b { font-weight: 600; }
.tm-tile b { font-weight: 700; }
.tm-tile span { font: 500 0.68em var(--mono); color: var(--ink-2); white-space: nowrap; }
.tm-tile:hover { background: color-mix(in oklab, var(--c) 38%, var(--card)); }
.tm-tile.on { background: color-mix(in oklab, var(--c) 46%, var(--card)); border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); z-index: 1; }

/* The map: a pannable, zoomable picture. */
.map-card { padding: 0; }
.map-card svg { display: block; width: 100%; height: min(72vh, 720px); min-height: 420px; touch-action: none; cursor: grab; user-select: none; }
.map-card svg.dragging { cursor: grabbing; }
.map-zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-weight: 700; }

/* The panel: whatever was clicked. */
.map-panel { position: sticky; top: 124px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 16px 16px 14px; scroll-margin-top: 124px; }
.has-remote .map-panel { max-height: calc(100vh - 216px); }
.map-panel h2 { font: 700 23px/1.12 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; padding-right: 22px; }
.map-panel h2 a { text-decoration: none; }
.map-panel h4 { font: 700 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
[data-detail] > h4:first-child { margin-top: 2px; }
.map-panel .what { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.map-panel .what a { text-decoration: none; font-weight: 600; }
.map-panel .close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.map-panel .close:hover { background: var(--card-2); color: var(--ink); }
.map-panel .chips { margin-top: 10px; }
.map-panel h4 + .chips { margin-top: 0; }
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; margin-top: 14px; }
.p-stats div { padding: 7px 9px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); }
.p-stats b { display: block; font-size: 15px; white-space: nowrap; }
.p-stats span { font-size: 11px; color: var(--muted); }
.p-spark { margin-top: 14px; }
.p-spark svg { display: block; width: 100%; height: 46px; }
.p-spark rect { fill: var(--s2); }
.p-spark rect.peak { fill: var(--s3); }
.p-spark .ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font: 500 10px var(--mono); color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 4px; }
.p-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.p-actions .btn { padding: 6px 13px; font-size: 13px; }
.p-songs, .p-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.p-songs li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 6px 4px 4px; border-radius: 9px; }
.p-songs li:hover, .p-songs li.playing { background: var(--gold-wash); }
.p-songs .t { min-width: 0; display: grid; }
.p-songs .t a { font-size: 13.5px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-songs .t a:hover { text-decoration: underline; }
.p-songs .t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-songs .mono, .p-rank .mono { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.p-play { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; display: grid; place-items: center; flex: none; }
.p-play::before { content: ''; margin-left: 2px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--ink-2); }
.p-play:hover, li.playing .p-play { background: var(--gold); border-color: var(--gold); }
.p-play:hover::before, li.playing .p-play::before { border-left-color: #261900; }
.p-cover { position: relative; margin: 2px 0 12px; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.p-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-play.big { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border: 0; background: rgba(18, 12, 4, 0.78); }
.p-play.big::before { border-width: 9px 0 9px 15px; border-left-color: var(--lcd); margin-left: 4px; }
.p-rank a { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 8px; text-decoration: none; font-size: 13px; }
.p-rank a:hover { background: var(--gold-wash); }
.p-rank .n { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; }
.p-rank .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-rank .n i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.p-rank .bar { height: 6px; }
.p-rank .bar i { display: block; height: 6px; min-width: 2px; border-radius: 0 3px 3px 0; background: var(--gold); }
.map-panel .why { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.map-panel .why b { color: var(--ink-2); }
.p-vids { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-vids button { display: grid; gap: 2px; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; }
.p-vids .th { position: relative; display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--card-2); margin-bottom: 3px; }
.p-vids img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.p-vids .th i { position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(18, 12, 4, 0.72); opacity: 0; transition: opacity 0.15s; }
.p-vids .th i::before { content: ''; position: absolute; left: 11px; top: 9px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--lcd); }
.p-vids button:hover img { transform: scale(1.05); }
.p-vids button:hover .th i, .p-vids li.playing .th i { opacity: 1; }
.p-vids li.playing .th { box-shadow: 0 0 0 2px var(--gold); }
.p-vids b { font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-vids small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-artists { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.p-artists li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; }
.p-artists li:hover { background: var(--gold-wash); }
.p-artists li > a { font-size: 13.5px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-artists .mono { font-size: 11px; color: var(--ink-2); }

/* Web: scenes as circles, artists as dots. */
.map-card.web svg { height: 680px; }
.web .wl { stroke-opacity: 0.22; transition: stroke-opacity 0.15s; }
.web .wl.hot { stroke-opacity: 0.85; }
.web .wl.dim { stroke-opacity: 0.05; }
.web .wn { cursor: pointer; transition: opacity 0.15s; }
.web .wn.dim { opacity: 0.18; }
.web .wg circle { fill: color-mix(in oklab, var(--c) 26%, var(--card)); stroke: color-mix(in oklab, var(--c) 70%, var(--card)); stroke-width: 1.5; }
.web .wg:hover circle, .web .wg.on circle { fill: color-mix(in oklab, var(--c) 45%, var(--card)); stroke: var(--ink); stroke-width: 2; }
.web .gl { font: 700 12px var(--serif); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; dominant-baseline: middle; transition: opacity 0.15s; }
.web .gl.dim { opacity: 0.18; }
.web .wa circle { stroke: var(--card); stroke-width: 1; }
.web .wa.bridge circle { stroke: var(--ink); stroke-width: 1.4; }
.web .wa:hover circle, .web .wa.on circle { stroke: var(--ink); stroke-width: 2.5; }
.web .an { font: 500 10.5px var(--sans); fill: var(--ink-2); paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.web .wa.named .an, .web .wa.on .an { fill: var(--ink); font-weight: 600; }
.web .gone { display: none; }
.web .wn { touch-action: none; }
.web .wg.pinned circle { stroke-dasharray: 3 3; }
.web .ws circle { stroke: var(--ink); stroke-width: 1; }
.web .ws:hover circle { stroke-width: 2.5; }
.web .wl.song { stroke-opacity: 0.6; stroke-dasharray: 2 2; }
/* Whatever is on air right now pulses. */
.web .wn.live circle { animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { stroke: var(--gold); stroke-width: 5; } }
/* The scrubber: the map as it stood at the end of any week. */
.scrub { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: linear-gradient(transparent, color-mix(in oklab, var(--card) 92%, transparent) 40%); }
.scrub input { flex: 1; accent-color: var(--gold); cursor: pointer; }
.scrub-label { font: 500 11px var(--mono); color: var(--ink-2); white-space: nowrap; min-width: 15em; text-align: right; }
.scrub-play { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--gold); cursor: pointer; display: grid; place-items: center; flex: none; }
.scrub-play::before { content: ''; margin-left: 2px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #261900; }
.scrub-play.on::before { margin: 0; width: 10px; height: 12px; border: 0; border-left: 3px solid #261900; border-right: 3px solid #261900; box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { .tm-tile { transition: none; } .web .wn.live circle { animation: none; stroke: var(--gold); stroke-width: 4; } }
.p-up { display: none; margin-top: 16px; border: 0; background: none; padding: 0; font: 600 13px var(--sans); color: var(--gold-ink); cursor: pointer; }

/* The panel's player: runs through the listed songs. */
.pl { position: sticky; top: -16px; z-index: 2; margin: -16px -16px 14px; background: var(--plate); color: #f2eadb; }
.pl[hidden] { display: none; }
.pl-frame { aspect-ratio: 16 / 9; background: #000; }
.pl-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.pl.in-tab .pl-frame { display: none; }
.pl-meta { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; }
.pl-meta .t { flex: 1; min-width: 0; display: grid; }
.pl-meta b, .pl-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta b { font-size: 13.5px; }
.pl-meta small { font-size: 11.5px; color: #b9ab8c; }
.pl-meta button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.pl-meta button:hover { background: rgba(255, 201, 74, 0.14); color: var(--lcd); }

@media (max-width: 980px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .map-panel { position: relative; top: auto; max-height: none; }
  .has-remote .map-panel { max-height: none; }
  .p-up { display: block; }
}

/* ---------- Tooltip ---------- */
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 280px; padding: 9px 11px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.tip b { display: block; font-size: 14px; }
.tip .tip-sub { opacity: 0.75; font-size: 12px; }

/* The audio player for "Listen along": out of sight, but on the page so browsers let it play. */
/* ---------- The owner's remote (remote.js): a dock that drives the YouTube tab ---------- */
/* The music is already playing in this browser: listening along too would double it. */
.has-remote .tune { display: none; }
.has-remote body { padding-bottom: 76px; }
.remote { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; color: #f2eadb; font-size: 13px; pointer-events: none; }
/* Only the bar and the drawer catch clicks: the empty strip beside the drawer is the page's. */
.remote-bar, .remote-drawer { pointer-events: auto; }
.remote button { border: 0; background: none; cursor: pointer; color: inherit; padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.remote [hidden] { display: none; }
.remote button:hover { background: rgba(255, 201, 74, 0.14); color: var(--lcd); }
.remote svg { fill: currentColor; }
.remote-bar {
  display: grid; grid-template-columns: auto minmax(120px, 1.1fr) auto minmax(160px, 1.6fr) auto auto; gap: 14px; align-items: center;
  padding: 9px 18px; background: linear-gradient(var(--plate-2), var(--plate)); border-top: 1px solid #4a3a1c; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
}
.remote-art { width: 71px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--lcd-bg); }
.remote-now { min-width: 0; display: grid; }
.remote-now b, .remote-now span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-now b { font-size: 14px; }
.remote-now span { color: #b9ab8c; font-size: 12px; }
.remote-now b a { color: inherit; text-decoration: none; }
.remote-now b a:hover { text-decoration: underline; }
.remote .remote-count { padding: 0 6px; margin-right: 6px; border: 1px solid #4a3a1c; border-radius: 999px; font: 500 11px var(--mono); color: #b9ab8c; vertical-align: 1px; }
.remote-keys { display: flex; align-items: center; gap: 4px; }
.remote .remote-play { width: 38px; height: 38px; border-radius: 50%; color: #2a1c00; background: linear-gradient(#ffd466, #e9a91f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 0 #9c6a00; }
.remote .remote-play:hover { color: #2a1c00; background: linear-gradient(#ffe08a, #f0b535); }
.remote-seek { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font: 500 11px var(--mono); color: #b9ab8c; font-variant-numeric: tabular-nums; }
/* The seek bar, with a notch where each song of an album or mix starts. */
.remote-track { position: relative; display: grid; align-items: center; min-width: 0; }
.remote-track input { position: relative; z-index: 1; width: 100%; margin: 0; }
.remote-marks { position: absolute; left: 8px; right: 8px; top: 50%; pointer-events: none; }
.remote-marks i { position: absolute; top: -6px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: #8a7a58; }
.remote-vol { display: flex; align-items: center; gap: 2px; }
.remote-vol input { width: 76px; }
.remote input[type='range'] { accent-color: var(--lcd); height: 4px; min-width: 0; cursor: pointer; }
.remote-more { display: flex; align-items: center; gap: 2px; }
.remote .remote-text { padding: 6px 12px; border: 1px solid #4a3a1c; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.remote.idle .remote-keys, .remote.idle .remote-seek, .remote.idle .remote-vol { opacity: 0.35; pointer-events: none; }
.remote-drawer {
  width: min(560px, calc(100% - 24px)); margin: 0 12px 8px auto; max-height: min(62vh, 560px); display: flex; flex-direction: column;
  background: var(--plate); border: 1px solid #4a3a1c; border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); overflow: hidden;
}
.remote-drawer[hidden] { display: none; }
.remote-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 8px 6px; border-bottom: 1px solid #3a2d15; }
.remote-tabs button { padding: 5px 11px; font-weight: 600; color: #b9ab8c; }
.remote-tabs button[aria-pressed='true'] { color: #2a1c00; background: var(--lcd); }
.remote-tabs .remote-close { margin-left: auto; font-size: 18px; line-height: 1; }
.remote-search { flex: 1 1 100%; order: 5; }
.remote-search input { width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid #4a3a1c; background: var(--lcd-bg); color: #f2eadb; font: inherit; }
.remote-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.remote-list .note { padding: 18px 14px; color: #b9ab8c; }
.remote-list button { width: 100%; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 11px; align-items: center; text-align: left; padding: 6px 8px; justify-content: stretch; }
.remote-list img { width: 96px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: var(--lcd-bg); }
.remote-list .t { min-width: 0; display: grid; gap: 2px; }
.remote-list .t b { font-size: 13.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.remote-list .t span { color: #b9ab8c; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-list .len { font: 500 11px var(--mono); color: #b9ab8c; }
.remote-list .current button { background: rgba(255, 201, 74, 0.12); }
.remote-list .current .len { color: var(--lcd); font-size: 14px; }
.remote-list [data-r-use] .len { font-size: 11px; }
.remote-list .song button { grid-template-columns: 3.4em minmax(0, 1fr); }
.remote-list .song .n { font: 500 11px var(--mono); color: #b9ab8c; text-align: right; }
.remote-list .song.current .n { color: var(--lcd); font-size: 14px; }
.remote-list .has-x { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px; }
.remote-list .has-x.current { background: rgba(255, 201, 74, 0.12); border-radius: 8px; }
.remote-list .has-x.current button { background: none; }
.remote-list .x { width: 34px; height: 34px; display: inline-flex; padding: 0; font-size: 20px; line-height: 1; color: #b9ab8c; }
.remote-list .x:hover { color: #ff8a7a; background: rgba(255, 138, 122, 0.14); }
@media (max-width: 860px) {
  .has-remote body { padding-bottom: 118px; }
  .remote-bar { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 10px; padding: 8px 12px; }
  .remote-seek { grid-column: 1 / -1; order: 9; }
  .remote-vol { display: none; }
  .remote-drawer { margin: 0 auto 8px; }
}

.tuner-player { position: fixed; left: -9999px; top: 0; width: 320px; height: 180px; opacity: 0; pointer-events: none; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .faceplate-in { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 8px 16px 6px; }
  .ident-name { display: none; }
  .lcd { grid-template-columns: auto minmax(0, 1fr); padding: 7px 10px; }
  .lcd-scale { display: none; }
  .tune { padding: 8px 12px; }
  .tune [data-tune-label] { display: none; }
  .presets { padding: 0 16px 8px; gap: 6px; }
  .presets a { flex: 1; justify-content: center; padding: 6px 4px 7px; }
  .presets a small { display: none; }
  main { padding: 20px 16px 32px; }
  .foot { padding: 16px; }
  .onair { grid-template-columns: 1fr; }
  .track-hero { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 28px; }
  .track-hero h1 { font-size: 30px; }
  .day { padding: 16px 14px 10px; }
  .pager { --gutter: 16px; }
  .pager-bar { flex-direction: column; align-items: stretch; }
  .pager-label { display: flex; align-items: baseline; gap: 10px; padding: 0; }
  .pager-label .kicker { margin: 0; }
  .pager .day-head h2 { padding-right: 80px; }
  .pager-arrows { top: 17px; right: 15px; }
  .play { grid-template-columns: 50px 56px minmax(0, 1fr); gap: 10px; }
  .play .thumb { width: 56px; }
  .play .right { display: none; }
  .play .dur2 { display: block; }
  .group { margin-left: 8px; }
  .group-head .thumb { width: 56px; }
  .group .play { grid-template-columns: 50px minmax(0, 1fr); }
  .ribbon .h3 { display: none; }
  .hbar { grid-template-columns: minmax(0, 8rem) minmax(0, 1fr) 4rem; }
  .table .hide-sm { display: none; }
  .table .song img { width: 48px; }
  .hero-fig { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .lamp.live, .tune.on .eq i { animation: none; }
  .tile-link, .progress i, .lcd-scale i { transition: none; }
}
