/* ArtFM: a '57 Bel Air parked outside a chrome diner.
   Day: tropical turquoise, India ivory, cherry vinyl, chrome trim, black-and-white checker floor.
   Night: the drive-in after dark, with the neon turned up. */

:root {
  --page: #4fbfb5;            /* tropical turquoise paint */
  --page-deep: #2c938b;
  --spark: rgba(255, 255, 255, 0.28);
  --card: #fbf4e2;            /* ivory formica */
  --card-2: #fffaf0;
  --ink: #1b2a2c;
  --muted: #5c6a69;
  --line: #e6d9bc;
  --red: #d32437;             /* cherry vinyl */
  --red-deep: #96131f;
  --red-ink: #fff6ea;
  --mustard: #e9a92c;
  --mint: #2f9d6a;            /* money green */
  --neon: #ff3b4e;
  --neon-glow: rgba(255, 59, 78, 0.65);
  --sign: #fbf4e2;
  --check-a: #111;
  --check-b: #f6f1e5;
  --chrome: linear-gradient(180deg, #ffffff 0%, #c9d1d6 22%, #8d979e 48%, #eef2f4 62%, #a6afb5 80%, #e9edf0 100%);
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.12), 0 18px 30px -18px rgba(10, 50, 48, 0.55);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e2427;
    --page-deep: #08171a;
    --spark: rgba(120, 230, 220, 0.18);
    --card: #15292c;
    --card-2: #1b3337;
    --ink: #f2ead8;
    --muted: #9fb3b1;
    --line: #2a4448;
    --red: #e3364a;
    --red-deep: #a51a2b;
    --red-ink: #fff6ea;
    --mustard: #f2b84a;
    --mint: #49c08a;
    --neon: #ff4d60;
    --neon-glow: rgba(255, 77, 96, 0.85);
    --sign: #15292c;
    --check-a: #050808;
    --check-b: #d9d2c2;
    --chrome: linear-gradient(180deg, #d9dfe3 0%, #8a949b 25%, #4b545a 50%, #aab3b9 65%, #5f686e 82%, #b8c0c5 100%);
    --shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 20px 40px -18px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  /* Atomic-age sparkles scattered over the paint. */
  background-color: var(--page-deep);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='white' fill-opacity='0.35'%3E%3Cpath d='M30 18 L32 28 L42 30 L32 32 L30 42 L28 32 L18 30 L28 28Z'/%3E%3Cpath d='M118 96 L119.5 103 L126 104.5 L119.5 106 L118 113 L116.5 106 L110 104.5 L116.5 103Z'/%3E%3Ccircle cx='96' cy='34' r='2'/%3E%3Ccircle cx='44' cy='122' r='2.5'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse at top, var(--spark), transparent 60%),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 16px/1.5 "Nunito Sans", system-ui, sans-serif;
}
main { flex: 1; width: 100%; }

/* The diner floor. */
.checker {
  height: 36px;
  background: conic-gradient(var(--check-a) 25%, var(--check-b) 0 50%, var(--check-a) 0 75%, var(--check-b) 0) 0 0 / 28px 28px;
  border-block: 4px solid transparent;
  border-image: var(--chrome) 1;
}

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }

/* ---------- The sign out front ---------- */

.masthead {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sign {
  padding: 6px 26px 14px;
  border-radius: 999px 999px 28px 28px;
  border: 5px solid transparent;
  background: linear-gradient(var(--sign), var(--sign)) padding-box, var(--chrome) border-box;
  box-shadow: var(--shadow);
  text-align: center;
  min-width: 0;
}

.logo {
  font: 72px/1 "Yellowtail", cursive;
  color: var(--neon);
  text-shadow: 0 0 2px #fff, 0 0 10px var(--neon-glow), 0 0 26px var(--neon-glow), 3px 4px 0 rgba(0, 0, 0, 0.15);
  transform: rotate(-4deg);
  margin: 4px 0 2px;
}

.byline {
  font: 600 13px/1.3 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.byline strong { color: var(--ink); font-weight: 700; }
.byline .dot { color: var(--red); }
.slogan { margin-top: 4px; font: italic 600 14px/1.3 "Nunito Sans", system-ui, sans-serif; color: var(--red); }

/* A neon tube sign: dark until the station is live and you're tuned in. */
.lamp {
  flex: none;
  font: 700 22px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.55);
  background: #1a1414;
  border: 3px solid #3a3030;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8);
  transition: color 0.4s, text-shadow 0.4s, border-color 0.4s;
}
.live.tuned .lamp {
  color: #fff;
  border-color: var(--neon);
  text-shadow: 0 0 4px #fff, 0 0 12px var(--neon), 0 0 28px var(--neon);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 26px var(--neon-glow);
  animation: buzz 6s infinite;
}
@keyframes buzz { 0%, 92%, 96%, 100% { opacity: 1; } 94% { opacity: 0.55; } }

/* ---------- Chrome-trimmed formica panels ---------- */

.card {
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 5px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--chrome) border-box;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 15px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.eyebrow::after { content: ""; flex: 1; height: 3px; border-radius: 2px; background: var(--chrome); opacity: 0.8; }

a { color: var(--red); }
li { margin-bottom: 6px; }

label { display: block; font-weight: 600; }
input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--card-2);
  border: 2px solid var(--line);
  border-radius: 12px;
}
input:focus { outline: 3px solid var(--mustard); outline-offset: 1px; }

button {
  font: 600 16px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--red-ink);
  background: var(--red);
  box-shadow: inset 0 -3px 0 var(--red-deep);
}
button:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
button:active { transform: translateY(1px); }

/* Tuck-and-roll cherry vinyl, like the booth seats. */
button.big {
  font-size: 22px;
  padding: 16px 30px;
  border: 4px solid transparent;
  border-radius: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 18px, rgba(0, 0, 0, 0.14) 18px 20px) padding-box,
    linear-gradient(180deg, #ef4155, var(--red) 45%, var(--red-deep)) padding-box,
    var(--chrome) border-box;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  box-shadow: 0 6px 14px -6px rgba(120, 10, 20, 0.7);
}

.fine { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.tight { margin: 0 0 12px; }
.footer-link { color: #fff; font-weight: 700; white-space: nowrap; }
#credit-link { white-space: normal; }
.footer { text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }

/* ---------- Dashboard: tune in and volume ---------- */

.controls { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.vol {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
  font: 600 14px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.vol input { padding: 0; border: 0; background: none; accent-color: var(--red); height: 24px; }
.status-line { margin: 10px 0 0; font-weight: 700; color: var(--red); }
.status-line:empty { display: none; }
.mic { margin-top: 12px; background: var(--mustard); color: #3a2400; box-shadow: inset 0 -3px 0 #a8730f; }
.mic[hidden] { display: none; }

/* ---------- The TV in the dash ---------- */

.bezel {
  padding: 10px;
  border-radius: 26px;
  background: var(--chrome);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
  margin-bottom: 18px;
}
.screen-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; }
.screen-frame iframe, .screen-frame #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 600 18px/1.2 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7fd9cf;
  text-shadow: 0 0 10px rgba(127, 217, 207, 0.6);
  background: radial-gradient(ellipse at center, #20403f 0%, #070d0d 75%);
}
.tuned .screen-idle { display: none; }

/* Commercial break: a vintage "we'll be right back" card on the TV. */
.screen-ad {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  background:
    repeating-conic-gradient(from 0deg at 50% 120%, #f6e7c0 0 6deg, #f1d9a0 6deg 12deg);
  color: #3a1d10;
}
.tuned.commercial .screen-ad { display: flex; }
.screen-ad-top { font: 600 14px/1.2 "Oswald", system-ui, sans-serif; letter-spacing: 0.18em; text-transform: uppercase; }
.screen-ad-product {
  font: 52px/1 "Yellowtail", cursive;
  color: var(--red);
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.15);
  transform: rotate(-3deg);
  max-width: 90%;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) { .screen-ad-product { font-size: 34px; } .screen-ad-top { font-size: 11px; } }
/* The other stations' newsbreak screens wear their own colors and sign fonts. */
[data-station]:not([data-station="art"]) .screen-ad {
  background: radial-gradient(ellipse at 50% 40%, var(--card-2) 0%, var(--page-deep) 80%);
  color: var(--muted);
}
[data-station]:not([data-station="art"]) .screen-ad-product { transform: none; text-shadow: 0 0 14px var(--neon-glow); }
[data-station="saucer"] .screen-ad-product { font-family: "Monoton", cursive; color: var(--neon); font-size: 40px; }
[data-station="shroom"] .screen-ad-product { font-family: "Shrikhand", cursive; font-size: 40px; }
[data-station="underground"] .screen-ad-product { font-family: "Special Elite", "Courier New", monospace; }
:root[data-station="crescent"] .screen-ad { background: radial-gradient(ellipse at 50% 40%, #5b2a86 0%, #12081d 80%); color: #e8d6f5; }
[data-station="crescent"] .screen-ad-product { font-family: "Abril Fatface", Georgia, serif; color: #f6dc7a; }
:root[data-station="gibbard"] .screen-ad { background: radial-gradient(circle at 50% 38%, #2a3a6e 0%, #0c1430 58%, #050817 100%); color: #d7dcea; }
[data-station="gibbard"] .screen-ad-product { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 700; color: #f3e3a6; text-shadow: 0 0 16px rgba(243, 227, 166, 0.45); }
@media (max-width: 560px) {
  [data-station="saucer"] .screen-ad-product,
  [data-station="shroom"] .screen-ad-product { font-size: 28px; }
}

.np-text { min-width: 0; }
.np-title { font: 700 30px/1.1 "Oswald", system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.np-artist { font-size: 19px; font-weight: 600; color: var(--muted); }
.np-note { font-size: 15px; color: var(--muted); font-style: italic; margin-top: 4px; }
.downvote-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; min-height: 0; }
.downvote {
  font: 600 13px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
}
.downvote:hover:not(:disabled) { color: var(--red); border-color: var(--red); }
.downvote:disabled { opacity: 0.5; cursor: default; }
.downvote[hidden] { display: none; }
.program-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.program-row[hidden] { display: none; }
.program-request {
  font: 600 13px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
}
.program-request:hover:not(:disabled) { border-color: var(--neon); color: var(--neon); }
.program-request:disabled { opacity: 0.55; cursor: default; }
.program-archive { margin-left: auto; color: var(--ink); font-weight: 700; }
.bar { height: 8px; border-radius: 4px; margin-top: 14px; overflow: hidden; background: var(--line); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2); }
#np-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--mustard)); transition: width 1s linear; }

/* ---------- From the booth ---------- */

.captions { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.captions li { margin: 0; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.captions li:last-child { border-bottom: 0; }
.captions li:first-child { font-size: 19px; font-weight: 600; }
.captions time { display: block; font: 600 12px/1 "Oswald", system-ui, sans-serif; letter-spacing: 0.12em; color: var(--red); margin-bottom: 6px; }
.captions li.ad, .captions li.news, .captions li.program { font-style: italic; }
.captions li.ad time, .captions li.news time, .captions li.program time { color: var(--mint); }
.captions:empty::after { content: attr(data-empty); color: var(--muted); }

/* ---------- The Payola Board, dressed as a jukebox ---------- */

.payola-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.payola-head > div:first-child { min-width: 0; flex: 1; }
.wallet { flex: none; }
#bucks { display: flex; align-items: center; gap: 4px; }
.bill {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 18px;
  border-radius: 3px;
  font: 700 12px/1 "Oswald", system-ui, sans-serif;
  color: #fff;
  background: var(--mint);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.bill.spent { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.bill-count { margin-left: 6px; font: 600 14px/1 "Oswald", system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mint); }

.on-deck {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--red-ink);
  background: linear-gradient(180deg, #ef4155, var(--red-deep));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* Each song is a jukebox title strip. */
.board li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--card-2);
  border-block: 4px solid var(--red);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.board li:first-child { border-color: var(--mustard); }
.code {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font: 700 15px/1 "Oswald", system-ui, sans-serif;
  color: var(--red-ink);
  background: var(--red);
  box-shadow: inset 0 -3px 0 var(--red-deep);
}
.board li:first-child .code { background: var(--mustard); color: #3a2400; box-shadow: inset 0 -3px 0 #a8730f; }
.board .song { flex: 1; min-width: 0; }
.board .song strong { display: block; font: 600 17px/1.2 "Oswald", system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.02em; }
.board .song span { color: var(--muted); font-weight: 600; }
.tag { font: 700 11px/1 "Oswald", system-ui, sans-serif; font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); border: 2px solid var(--red); border-radius: 999px; padding: 2px 6px; }

.votes { display: flex; gap: 6px; flex: none; }
.vote { padding: 8px 10px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--card); border: 2px solid var(--line); box-shadow: none; }
.vote.up.on { color: #fff; background: var(--mint); border-color: var(--mint); }
.vote.down.on { color: var(--card); background: var(--ink); border-color: var(--ink); }
#locks { font-weight: 700; color: var(--ink); }
#payola-flash { color: var(--mint); font-weight: 700; }

/* ---------- Request line ---------- */

.request .row { display: flex; gap: 8px; }
.request .name { flex: 0 0 190px; }
.request #request { flex: 1; min-width: 0; }
.request button { flex: none; }

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .masthead { flex-direction: column; align-items: stretch; padding-top: 22px; }
  .logo { font-size: 60px; }
  .lamp { align-self: center; font-size: 18px; }
  .card { padding: 16px; border-radius: 18px; }
  .controls button.big { flex: 1; }
  .np-title { font-size: 24px; }
  .payola-head { flex-direction: column; gap: 4px; }
  .request .row { flex-wrap: wrap; }
  .request .name { flex: 1 1 100%; }
  .board li { flex-wrap: wrap; }
  .board .song { flex-basis: calc(100% - 50px); }
  .votes { margin-left: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .live.tuned .lamp { animation: none; }
  #np-progress { transition: none; }
}

/* ---------- The dial: the same spot on every station ---------- */

.dial-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px 16px 8px;
  background: var(--dial-bezel);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.6);
}
.dial-card { max-width: 728px; margin: 0 auto; }
.dial {
  position: relative;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--dial-glass);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.dial-scale { position: absolute; inset: 0; }
.tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 10px;
  background: var(--dial-ink);
  opacity: 0.6;
  transform: translateX(-50%);
}
.tick.major { height: 16px; opacity: 0.9; }
.tick[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font: 600 11px/1 "Oswald", system-ui, sans-serif;
  color: var(--dial-ink);
}
.station-mark {
  position: absolute;
  top: 5px;
  z-index: 2;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  font: 600 11px/1.2 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--dial-glass);
  background: var(--dial-ink);
  box-shadow: none;
}
/* Two rows of station names on a narrow dial (see layoutDialRows in app.js). */
.dial.two-rows { height: 72px; }
.station-mark.row-2 { top: 24px; }
.needle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: var(--needle);
  box-shadow: 0 0 10px var(--needle);
  transition: left 0.08s linear;
  pointer-events: none;
  z-index: 1;
}
/* The real control: an invisible slider over the whole dial, so you can drag anywhere. */
#tuner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  border: 0;
  padding: 0;
  z-index: 1;
}
.dial-readout {
  margin-top: 6px;
  text-align: center;
  font: 600 13px/1 "Oswald", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dial-readout);
}
.dial-readout .dot { color: var(--needle); }
#freq { font-variant-numeric: tabular-nums; }

:root {
  --dial-bezel: linear-gradient(180deg, #3a2a20, #1f1611);
  --dial-glass: #f3e2b8;
  --dial-ink: #4a2c12;
  --dial-readout: #f3e2b8;
  --needle: #d32437;
}

/* Between stations: snow on the TV. */
.screen-static {
  position: absolute;
  inset: 0;
  display: none;
  background: #555 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: snow 0.2s steps(4) infinite;
}
.static .screen-static { display: block; }
@keyframes snow {
  0% { background-position: 0 0; }
  25% { background-position: -37px 51px; }
  50% { background-position: 63px -18px; }
  75% { background-position: -12px -77px; }
}

/* ---------- Flying Saucer Radio: same page, deep space ---------- */

:root[data-station="saucer"] {
  --page: #0b0f2a;
  --page-deep: #04040d;
  --spark: rgba(140, 120, 255, 0.22);
  --card: rgba(16, 18, 44, 0.82);
  --card-2: rgba(26, 28, 64, 0.85);
  --ink: #e6e9ff;
  --muted: #a4abd6;
  --line: #2c3168;
  --red: #7ef0d8;          /* the accent becomes saucer-light teal */
  --red-deep: #2a9c8c;
  --red-ink: #06121a;
  --mustard: #c9a4ff;
  --mint: #7ef0d8;
  --neon: #8ff5ff;
  --neon-glow: rgba(143, 245, 255, 0.7);
  --sign: rgba(12, 14, 36, 0.9);
  --chrome: linear-gradient(135deg, #6b5cff 0%, #2bd2c8 45%, #b56cff 100%);
  --shadow: 0 0 0 1px rgba(120, 110, 255, 0.15), 0 18px 40px -16px rgba(80, 60, 220, 0.6);
  --dial-bezel: linear-gradient(180deg, #11122e, #05050f);
  --dial-glass: #070a1e;
  --dial-ink: #9fe9ff;
  --dial-readout: #9fe9ff;
  --needle: #c9a4ff;
  color-scheme: dark;
}
:root[data-station="saucer"] {
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 68% 42%, #cfe6ff, transparent),
    radial-gradient(1.5px 1.5px at 38% 76%, #fff, transparent),
    radial-gradient(1px 1px at 86% 12%, #fff, transparent),
    radial-gradient(1px 1px at 22% 58%, #b9b4ff, transparent),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(150, 80, 255, 0.28), transparent),
    radial-gradient(ellipse 50% 40% at 15% 70%, rgba(40, 200, 200, 0.18), transparent),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
  background-size: 200px 200px, 260px 260px, 320px 320px, 180px 180px, 240px 240px, 100% 100%, 100% 100%, 100% 100%;
}
[data-station="saucer"] .checker {
  height: 6px;
  border: 0;
  background: linear-gradient(90deg, transparent, #7ef0d8, #c9a4ff, transparent);
  opacity: 0.6;
}
[data-station="saucer"] .sign {
  border-radius: 50% / 60% 60% 40% 40%; /* a saucer, seen from the side */
  padding: 18px 40px 22px;
  backdrop-filter: blur(6px);
}
[data-station="saucer"] .logo {
  font: 44px/1.1 "Monoton", cursive;
  transform: none;
  letter-spacing: 0.04em;
  color: var(--neon);
  text-shadow: 0 0 8px var(--neon-glow), 0 0 24px var(--neon-glow);
  animation: hover 6s ease-in-out infinite;
}
@keyframes hover { 50% { transform: translateY(-4px); } }
[data-station="saucer"] .card { backdrop-filter: blur(8px); }
[data-station="saucer"] button.big {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.35), transparent 60%) padding-box,
    linear-gradient(180deg, #8ff5ff, #2a9c8c) padding-box,
    var(--chrome) border-box;
  color: #06121a;
  text-shadow: none;
  box-shadow: 0 0 22px -4px rgba(126, 240, 216, 0.7);
}
[data-station="saucer"] .live.tuned .lamp,
:root[data-station="saucer"] .live.tuned .lamp {
  border-color: var(--neon);
  text-shadow: 0 0 4px #fff, 0 0 12px var(--neon), 0 0 28px var(--neon);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 26px var(--neon-glow);
  animation: none;
}
[data-station="saucer"] .screen-idle {
  color: #c9a4ff;
  text-shadow: 0 0 12px rgba(201, 164, 255, 0.7);
  background: radial-gradient(ellipse at center, #241a55 0%, #04040d 75%);
}
[data-station="saucer"] .np-title { font-weight: 500; letter-spacing: 0.06em; }
[data-station="saucer"] .captions li:first-child { font-style: italic; font-weight: 400; }
[data-station="saucer"] .footer { color: var(--muted); text-shadow: none; }
[data-station="saucer"] .footer-link { color: var(--neon); }
@media (max-width: 560px) {
  [data-station="saucer"] .logo { font-size: 30px; }
  [data-station="saucer"] .sign { padding: 14px 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-station="saucer"] .logo, .screen-static { animation: none; }
}

.debug { margin: 12px 0 0; padding: 8px; font: 12px/1.4 ui-monospace, monospace; white-space: pre-wrap; color: var(--ink); background: var(--card-2); border: 1px dashed var(--line); border-radius: 8px; }
.debug[hidden], #sound[hidden], #sound-tip[hidden] { display: none; }
.sound-tip { max-width: 46ch; margin: 8px 0 0; }
.autoplay-help { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.autoplay-help[hidden] { display: none; }
.autoplay-help p { margin: 0; flex: 1 1 280px; }

/* ---------- Shroomfest Radio: same page, festival field at dusk, tie-dye and moss ---------- */

:root[data-station="shroom"] {
  --page: #1d1030;
  --page-deep: #0e1a12;
  --spark: rgba(255, 170, 60, 0.18);
  --card: rgba(28, 18, 38, 0.86);
  --card-2: rgba(44, 28, 56, 0.88);
  --ink: #fbeedd;
  --muted: #d7bfa8;
  --line: #4a3355;
  --red: #ff9f43;          /* the accent becomes sunset orange */
  --red-deep: #c0631a;
  --red-ink: #1d1030;
  --mustard: #b8f35d;      /* moss green */
  --mint: #b8f35d;
  --neon: #ffb3ec;
  --neon-glow: rgba(255, 120, 220, 0.6);
  --sign: rgba(30, 16, 40, 0.92);
  --chrome: linear-gradient(120deg, #ff5f6d, #ffc371, #b8f35d, #3ee0c5, #7b6cff, #ff5fd2);
  --shadow: 0 0 0 1px rgba(255, 160, 90, 0.15), 0 18px 40px -16px rgba(120, 40, 160, 0.7);
  --dial-bezel: linear-gradient(180deg, #2b1640, #120a1c);
  --dial-glass: #1a0f24;
  --dial-ink: #ffc371;
  --dial-readout: #ffc371;
  --needle: #b8f35d;
  color-scheme: dark;
}
:root[data-station="shroom"] {
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255, 95, 109, 0.35), transparent 40%),
    radial-gradient(circle at 80% 15%, rgba(123, 108, 255, 0.35), transparent 42%),
    radial-gradient(circle at 70% 75%, rgba(62, 224, 197, 0.25), transparent 40%),
    radial-gradient(circle at 25% 85%, rgba(184, 243, 93, 0.22), transparent 38%),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
  background-attachment: fixed;
}
/* A slow tie-dye swirl drifting behind everything. */
[data-station="shroom"] body::before {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: -1;
  background: conic-gradient(from 0deg, rgba(255, 95, 109, 0.12), rgba(255, 195, 113, 0.12), rgba(184, 243, 93, 0.12), rgba(62, 224, 197, 0.12), rgba(123, 108, 255, 0.12), rgba(255, 95, 210, 0.12), rgba(255, 95, 109, 0.12));
  animation: swirl 90s linear infinite;
  pointer-events: none;
}
@keyframes swirl { to { transform: rotate(1turn); } }
[data-station="shroom"] .checker {
  height: 10px;
  border: 0;
  background: repeating-linear-gradient(90deg, #ff5f6d 0 20px, #ffc371 20px 40px, #b8f35d 40px 60px, #3ee0c5 60px 80px, #7b6cff 80px 100px, #ff5fd2 100px 120px);
  opacity: 0.75;
}
[data-station="shroom"] .sign {
  border-radius: 46% 54% 40% 40% / 70% 70% 30% 30%; /* a mushroom cap */
  padding: 16px 36px 18px;
  backdrop-filter: blur(6px);
}
[data-station="shroom"] .logo {
  font: 50px/1.05 "Shrikhand", cursive;
  transform: rotate(-3deg);
  color: #ffc371;
  background: linear-gradient(90deg, #ff5f6d, #ffc371, #b8f35d, #3ee0c5, #7b6cff, #ff5fd2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45));
  animation: wobble 7s ease-in-out infinite;
}
@keyframes wobble { 50% { transform: rotate(-1deg) scale(1.02); } }
[data-station="shroom"] .card { backdrop-filter: blur(8px); }
[data-station="shroom"] button.big {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.3), transparent 60%) padding-box,
    linear-gradient(120deg, #ff9f43, #ff5f6d) padding-box,
    var(--chrome) border-box;
  color: #1d1030;
  text-shadow: none;
}
:root[data-station="shroom"] .live.tuned .lamp {
  border-color: #b8f35d;
  text-shadow: 0 0 4px #fff, 0 0 12px #b8f35d, 0 0 28px #b8f35d;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 26px rgba(184, 243, 93, 0.6);
}
[data-station="shroom"] .screen-idle {
  color: #ffc371;
  text-shadow: 0 0 12px rgba(255, 159, 67, 0.7);
  background: radial-gradient(ellipse at center, #3a1d4a 0%, #0e0814 75%);
}
[data-station="shroom"] .footer { color: var(--muted); text-shadow: none; }
[data-station="shroom"] .footer-link { color: #ffc371; }
@media (max-width: 560px) {
  [data-station="shroom"] .logo { font-size: 36px; }
  [data-station="shroom"] .sign { padding: 12px 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-station="shroom"] body::before, [data-station="shroom"] .logo { animation: none; }
}

/* ---------- On deck, coming up, and what's played ---------- */

.log-next {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--red-ink);
  background: linear-gradient(180deg, var(--red), var(--red-deep));
}
.log-head { margin: 12px 0 4px; font: 600 12px/1 "Oswald", system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; padding: 7px 0; margin: 0; border-bottom: 1px dashed var(--line); }
.log-list li:last-child { border-bottom: 0; }
.log-list time { flex: none; width: 5.2em; font: 600 12px/1 "Oswald", system-ui, sans-serif; letter-spacing: 0.06em; color: var(--red); }
.log-list strong { font-weight: 700; }
.log-list .by { color: var(--muted); }
#log-later-wrap[hidden], #log-next[hidden], #log-played-head[hidden] { display: none; }

/* ---------- Underground Radio: a basement studio at two in the morning ---------- */

:root[data-station="underground"] {
  --page: #14100c;
  --page-deep: #070605;
  --spark: rgba(255, 140, 40, 0.12);
  --card: rgba(26, 20, 15, 0.92);
  --card-2: rgba(38, 29, 21, 0.92);
  --ink: #f1e4cc;
  --muted: #b39d82;
  --line: #3d3024;
  --red: #ff8a2a;          /* the accent becomes amber tube-glow */
  --red-deep: #b4561a;
  --red-ink: #160f08;
  --mustard: #e3c25c;
  --mint: #e3c25c;
  --neon: #ff8a2a;
  --neon-glow: rgba(255, 138, 42, 0.55);
  --sign: rgba(22, 16, 11, 0.95);
  --chrome: linear-gradient(180deg, #5a4632, #2a2017 55%, #4a3a2a);
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 22px 40px -18px rgba(0, 0, 0, 0.9);
  --dial-bezel: linear-gradient(180deg, #2b2118, #120d09);
  --dial-glass: #1a120b;
  --dial-ink: #ffb066;
  --dial-readout: #ffb066;
  --needle: #ff5a2a;
  color-scheme: dark;
}
:root[data-station="underground"] {
  /* Wood paneling, and a lava lamp's glow in the corner. */
  background-image:
    radial-gradient(ellipse 30% 40% at 88% 70%, rgba(255, 70, 40, 0.22), transparent 70%),
    radial-gradient(ellipse 22% 30% at 10% 20%, rgba(255, 160, 60, 0.12), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 70px),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
}
[data-station="underground"] .checker {
  height: 4px;
  border: 0;
  background: linear-gradient(90deg, transparent, #ff8a2a, transparent);
  opacity: 0.5;
}
[data-station="underground"] .sign {
  border-radius: 6px;
  padding: 14px 30px 16px;
  transform: rotate(-1deg);
  box-shadow: 0 0 0 1px rgba(255, 138, 42, 0.2), 0 18px 40px -12px rgba(0, 0, 0, 0.9);
}
[data-station="underground"] .logo {
  font: 46px/1.05 "Special Elite", "Courier New", monospace;
  transform: none;
  letter-spacing: 0.02em;
  color: #ffb066;
  text-shadow: 0 0 6px rgba(255, 138, 42, 0.6), 0 0 22px rgba(255, 90, 42, 0.35);
}
[data-station="underground"] .byline,
[data-station="underground"] .eyebrow,
[data-station="underground"] .np-title,
[data-station="underground"] .board .song strong { font-family: "Special Elite", "Courier New", monospace; letter-spacing: 0.04em; }
[data-station="underground"] button.big {
  background:
    linear-gradient(180deg, #ff9d47, #c75d1a) padding-box,
    var(--chrome) border-box;
  color: #160f08;
  text-shadow: none;
}
:root[data-station="underground"] .live.tuned .lamp {
  border-color: #ff5a2a;
  text-shadow: 0 0 4px #fff, 0 0 12px #ff5a2a, 0 0 28px #ff5a2a;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 26px rgba(255, 90, 42, 0.6);
}
[data-station="underground"] .screen-idle {
  font-family: "Special Elite", "Courier New", monospace;
  color: #ffb066;
  text-shadow: 0 0 10px rgba(255, 138, 42, 0.6);
  background: radial-gradient(ellipse at 80% 70%, #4a1a0c 0%, #0a0705 70%);
}
[data-station="underground"] .footer { color: var(--muted); text-shadow: none; }
[data-station="underground"] .footer-link { color: #ffb066; }
@media (max-width: 560px) {
  [data-station="underground"] .logo { font-size: 32px; }
}

/* ---------- Crescent Connection: a balcony over a New Orleans street, Mardi Gras colors ---------- */

:root[data-station="crescent"] {
  --page: #2a1240;
  --page-deep: #12081d;
  --spark: rgba(242, 196, 48, 0.14);
  --card: rgba(255, 249, 236, 0.96);
  --card-2: rgba(248, 238, 214, 0.96);
  --ink: #23142f;
  --muted: #6c5a74;
  --line: #e2d3b4;
  --red: #5b2a86;          /* the accent becomes Mardi Gras purple */
  --red-deep: #3c1a5c;
  --red-ink: #fff6dc;
  --mustard: #f2c430;
  --mint: #138a4d;
  --neon: #f2c430;
  --neon-glow: rgba(242, 196, 48, 0.55);
  --sign: rgba(30, 14, 46, 0.95);
  --chrome: linear-gradient(180deg, #f6dc7a, #b8871c 55%, #f2c430);
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 22px 40px -18px rgba(0, 0, 0, 0.8);
  --dial-bezel: linear-gradient(180deg, #3a1d55, #160a24);
  --dial-glass: #1d0f2c;
  --dial-ink: #f6dc7a;
  --dial-readout: #f2c430;
  --needle: #2fd17f;
}
:root[data-station="crescent"] {
  /* Gas lamps and wrought iron: warm glows over a purple night. */
  background-image:
    radial-gradient(ellipse 26% 34% at 12% 18%, rgba(242, 196, 48, 0.22), transparent 70%),
    radial-gradient(ellipse 24% 32% at 90% 64%, rgba(47, 209, 127, 0.16), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 3px, transparent 3px 46px),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
}
[data-station="crescent"] .checker {
  height: 10px;
  border: 0;
  background: repeating-linear-gradient(90deg, #5b2a86 0 28px, #f2c430 28px 56px, #138a4d 56px 84px);
}
[data-station="crescent"] .sign {
  border-radius: 18px 18px 6px 6px;
  border: 3px solid #f2c430;
  box-shadow: 0 0 0 3px #3c1a5c, 0 0 28px rgba(242, 196, 48, 0.35), 0 18px 40px -12px rgba(0, 0, 0, 0.9);
}
[data-station="crescent"] .logo {
  font: 48px/1.05 "Abril Fatface", Georgia, serif;
  transform: none;
  letter-spacing: 0.01em;
  color: #f6dc7a;
  text-shadow: 0 2px 0 #5b2a86, 0 0 18px rgba(242, 196, 48, 0.45);
}
[data-station="crescent"] .byline { color: #e8d6f5; }
[data-station="crescent"] .byline strong { color: #2fd17f; }
[data-station="crescent"] .slogan { color: #d9b8f2; }
[data-station="crescent"] .np-title,
[data-station="crescent"] .board .song strong { font-family: "Abril Fatface", Georgia, serif; letter-spacing: 0.01em; }
[data-station="crescent"] button.big {
  background:
    linear-gradient(180deg, #7a3cb0, #4b2070) padding-box,
    var(--chrome) border-box;
  color: #fff6dc;
}
:root[data-station="crescent"] .live.tuned .lamp {
  border-color: #2fd17f;
  text-shadow: 0 0 4px #fff, 0 0 12px #2fd17f, 0 0 28px #2fd17f;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 0 26px rgba(47, 209, 127, 0.55);
}
[data-station="crescent"] .screen-idle {
  font-family: "Abril Fatface", Georgia, serif;
  color: #f6dc7a;
  text-shadow: 0 0 10px rgba(242, 196, 48, 0.5);
  background: radial-gradient(ellipse at 30% 30%, #5b2a86 0%, #12081d 72%);
}
[data-station="crescent"] .footer-link { color: #f6dc7a; }
@media (max-width: 560px) {
  [data-station="crescent"] .logo { font-size: 34px; }
}

/* ---------- Waxing Gibbard: the fan club's observatory, under a moonlit night ---------- */

:root[data-station="gibbard"] {
  --page: #101a3a;
  --page-deep: #050817;
  --spark: rgba(220, 228, 255, 0.14);
  --card: rgba(16, 24, 52, 0.94);
  --card-2: rgba(26, 37, 74, 0.94);
  --ink: #e9ecf5;
  --muted: #a9b2c8;
  --line: #2c3a66;
  --red: #c9d1e6;          /* the accent becomes moonlit silver */
  --red-deep: #7d88a8;
  --red-ink: #0b1230;
  --mustard: #f3e3a6;      /* pale moon gold */
  --mint: #f3e3a6;
  --neon: #f3e3a6;
  --neon-glow: rgba(243, 227, 166, 0.5);
  --sign: rgba(9, 14, 34, 0.95);
  --chrome: linear-gradient(180deg, #f1f3f8, #9aa4bd 45%, #5d6784 60%, #dfe3ee);
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 22px 40px -18px rgba(0, 0, 0, 0.9);
  --dial-bezel: linear-gradient(180deg, #1b2550, #070b1d);
  --dial-glass: #0b1230;
  --dial-ink: #dfe4f2;
  --dial-readout: #f3e3a6;
  --needle: #f3e3a6;
  color-scheme: dark;
}
:root[data-station="gibbard"] {
  /* A big pale moon low in the corner, and a scatter of stars. */
  background-image:
    radial-gradient(circle at 86% 14%, rgba(250, 244, 220, 0.95) 0 46px, rgba(243, 227, 166, 0.25) 48px, transparent 140px),
    radial-gradient(1px 1px at 14% 22%, #fff, transparent),
    radial-gradient(1px 1px at 32% 64%, #e3e8ff, transparent),
    radial-gradient(1.5px 1.5px at 58% 36%, #fff, transparent),
    radial-gradient(1px 1px at 72% 82%, #fff, transparent),
    radial-gradient(1px 1px at 8% 88%, #e3e8ff, transparent),
    radial-gradient(1px 1px at 46% 12%, #fff, transparent),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
  background-attachment: fixed;
}
[data-station="gibbard"] .checker {
  height: 4px;
  border: 0;
  background: linear-gradient(90deg, transparent, #c9d1e6, #f3e3a6, #c9d1e6, transparent);
  opacity: 0.6;
}
[data-station="gibbard"] .sign {
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(201, 209, 230, 0.25), 0 0 30px rgba(243, 227, 166, 0.18), 0 18px 40px -12px rgba(0, 0, 0, 0.9);
}
[data-station="gibbard"] .logo {
  font: italic 700 54px/1.05 "Cormorant Garamond", Georgia, serif;
  transform: none;
  letter-spacing: 0.01em;
  color: #f3e3a6;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.6), 0 0 18px rgba(243, 227, 166, 0.45);
}
[data-station="gibbard"] .byline { color: #a9b2c8; }
[data-station="gibbard"] .byline strong { color: #e9ecf5; }
[data-station="gibbard"] .byline .dot { color: #f3e3a6; }
[data-station="gibbard"] .slogan { color: #c9d1e6; }
[data-station="gibbard"] .np-title,
[data-station="gibbard"] .board .song strong { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 700; letter-spacing: 0.01em; text-transform: none; }
[data-station="gibbard"] button.big {
  background:
    linear-gradient(180deg, #f6ecc2, #cdb871) padding-box,
    var(--chrome) border-box;
  color: #0b1230;
  text-shadow: none;
}
:root[data-station="gibbard"] .live.tuned .lamp {
  border-color: #f3e3a6;
  color: #fffbe8;
  text-shadow: 0 0 4px #fff, 0 0 12px #f3e3a6, 0 0 28px #f3e3a6;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 26px rgba(243, 227, 166, 0.5);
}
[data-station="gibbard"] .screen-idle {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: #f3e3a6;
  text-shadow: 0 0 10px rgba(243, 227, 166, 0.5);
  background: radial-gradient(circle at 70% 30%, #2a3a6e 0%, #0c1430 55%, #050817 100%);
}
[data-station="gibbard"] .footer { color: var(--muted); text-shadow: none; }
[data-station="gibbard"] .footer-link { color: #f3e3a6; }
@media (max-width: 560px) {
  [data-station="gibbard"] .logo { font-size: 38px; }
}
