@font-face {
  font-family: 'Shrikhand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/radio/shrikhand.woff2) format('woff2');
}

:root {
  color-scheme: dark;
  --room: #1a110b;
  --room-2: #24170e;
  --ink: #f3e6cf;
  --ink-soft: #c9b497;
  --ink-faint: #8f7a60;
  --wood-1: #6b3a1c;
  --wood-2: #4a2611;
  --wood-3: #8a4f27;
  --brass: #d9b36a;
  --dial-bg: #f1dfb4;
  --dial-ink: #3b2412;
  --dial-glow: #ffd27a;
  --needle: #c8231b;
  --amber: #ffb547;
  --eye: #39ff8f;
  --eye-dark: #062b16;
  --display-bg: #120c07;
  --key: #efe3cb;
  --key-ink: #2a1a0d;
  --key-on: #ffb547;
  --orange: #ff6a2b;
  --pink: #ff4fa3;
  --line: #3a2a1c;
  --focus: #ffd27a;
}

/* Same look in both themes: a radio in a dark room. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --room: #1d130c; }
}
:root[data-theme="dark"] { --room: #1a110b; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, #3a2414 0%, transparent 70%),
    var(--room);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

a { color: var(--amber); }
a:hover { color: var(--dial-glow); }

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

.room {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

/* ---------- masthead ---------- */
.masthead { text-align: center; margin-bottom: 28px; }
.kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
h1 {
  margin: 4px 0 12px;
  font: 400 clamp(40px, 9vw, 72px)/1.05 'Shrikhand', Georgia, serif;
  background: linear-gradient(90deg, var(--orange), var(--pink) 45%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- cabinet ---------- */
.cabinet {
  border-radius: 22px;
  padding: 18px;
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,.08) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(88deg, rgba(255,255,255,.04) 0 1px, transparent 1px 13px),
    linear-gradient(160deg, var(--wood-3), var(--wood-1) 40%, var(--wood-2));
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.12),
    inset 0 -3px 0 rgba(0,0,0,.35),
    0 30px 60px rgba(0,0,0,.55),
    0 4px 0 #2b160a;
}

/* dial window */
.dial {
  position: relative;
  height: 176px;
  border-radius: 10px;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 120% at 50% 50%, var(--dial-glow) 0%, var(--dial-bg) 55%, #d8bf8a 100%);
  box-shadow: inset 0 0 0 3px var(--brass), inset 0 6px 18px rgba(0,0,0,.35);
  filter: brightness(.62) saturate(.7);
  transition: filter .8s ease;
}
.on .dial { filter: none; }
.scale {
  position: absolute;
  inset: 0;
  color: var(--dial-ink);
  font-family: Georgia, "Times New Roman", serif;
}
.scale > * { position: absolute; }
.scale .tick { width: 1px; background: var(--dial-ink); }
.scale .tick.fm { top: 34px; height: 7px; }
.scale .tick.fm.major { height: 13px; width: 2px; margin-left: -.5px; }
.scale .tick.mw { bottom: 34px; height: 7px; }
.scale .tick.mw.major { height: 13px; width: 2px; margin-left: -.5px; }
.scale .num { transform: translateX(-50%); font-size: 15px; line-height: 1; }
.scale .num.fm { top: 12px; }
.scale .num.mw { bottom: 12px; }
.scale .band { left: 1.2%; font: 700 11px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: .08em; }
.scale .band.fm { top: 13px; }
.scale .band.mw { bottom: 13px; }
.scale .tag {
  transform: translateX(-50%);
  font-size: 12px;
  font-style: italic;
  line-height: 1;
  color: #8a2a14;
  white-space: nowrap;
}
.scale .tag.fm.l0 { top: 52px; }
.scale .tag.fm.l1 { top: 66px; }
.scale .tag.fm.l2 { top: 80px; }
.scale .tag.mw.l1 { top: 98px; }
.scale .tag.mw.l0 { top: 112px; }
.scale .tag.gone { display: none; }

.needle {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: var(--needle);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(200,35,27,.6);
  transition: left 1.3s cubic-bezier(.45,.05,.25,1);
  pointer-events: none;
}
.needle.free { transition: none; }

/* face: eye + display */
.face {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.eye {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 0 22%, #0a0a0a 23%);
  box-shadow: 0 0 0 4px var(--brass), 0 0 0 7px #2b160a, inset 0 0 10px #000;
  position: relative;
  overflow: hidden;
}
.eye span {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  --open: 70deg;
  background: conic-gradient(from calc(-1 * var(--open) / 2), var(--eye-dark) 0 var(--open), var(--eye) var(--open) 360deg);
  -webkit-mask: radial-gradient(circle, transparent 0 28%, #000 29%);
  mask: radial-gradient(circle, transparent 0 28%, #000 29%);
  opacity: .12;
  transition: opacity .6s ease, --open .9s ease;
}
@property --open { syntax: '<angle>'; inherits: false; initial-value: 70deg; }
.on .eye span { opacity: 1; box-shadow: 0 0 18px var(--eye); }
.tuning .eye span { --open: 120deg; }
.locked .eye span { --open: 14deg; animation: flicker 2.6s infinite; }
@keyframes flicker {
  0%, 100% { --open: 14deg; }
  30% { --open: 22deg; }
  55% { --open: 10deg; }
  75% { --open: 18deg; }
}

.display {
  min-width: 0;
  background: var(--display-bg);
  border-radius: 10px;
  padding: 12px 16px 12px;
  box-shadow: inset 0 0 0 2px #000, inset 0 0 24px rgba(255,181,71,.06);
}
.display p { margin: 0; }
.onair {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lamp {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4a1a10;
  flex: none;
}
.locked .lamp { background: #ff3b2b; box-shadow: 0 0 10px #ff3b2b; }
.tuning .lamp { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.station {
  margin-top: 4px !important;
  font: 400 30px/1.1 'Shrikhand', Georgia, serif;
  color: var(--amber);
  text-shadow: 0 0 14px rgba(255,181,71,.35);
  overflow-wrap: anywhere;
}
.freq { font: 600 18px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink-soft); text-shadow: none; }
.where { color: var(--ink-soft); font-size: 14px; }
.day { margin-top: 8px !important; font-size: 19px; font-weight: 600; color: var(--ink); }
.show { color: var(--ink-soft); font-size: 15px; min-height: 1.5em; }
.progress {
  margin-top: 10px;
  height: 4px;
  border-radius: 2px;
  background: #2a1e14;
  overflow: hidden;
}
.progress span { display: block; height: 100%; width: 0; background: var(--amber); transition: width 1s linear; }
.clock { margin-top: 6px !important; font: 13px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink-faint); }

/* controls */
.controls {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "power volume";
  gap: 14px 20px;
  align-items: center;
  margin-top: 18px;
}
.power {
  grid-area: power;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.power .knob {
  width: 54px; height: 54px; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(0,0,0,.25) 0 4deg, transparent 4deg 12deg),
    radial-gradient(circle at 35% 30%, #fff8e6, #cdb48a 45%, #7c6040);
  box-shadow: 0 4px 0 #2b160a, 0 6px 12px rgba(0,0,0,.5), inset 0 -2px 3px rgba(0,0,0,.3);
  position: relative;
  transition: transform .25s ease;
}
.power .knob::after {
  content: '';
  position: absolute;
  left: 50%; top: 6px;
  width: 4px; height: 14px; margin-left: -2px;
  border-radius: 2px;
  background: #3b2412;
}
.on .power .knob { transform: rotate(60deg); }
.power .label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

.presets { display: grid; gap: 14px; margin-top: 18px; }
.group-name {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #f0d9b0;
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
.keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px 8px;
}
.key {
  min-width: 0;
  padding: 10px 6px 9px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(#fbf3e1, var(--key) 60%, #d7c6a4);
  color: var(--key-ink);
  box-shadow: 0 5px 0 #8e7a5a, 0 7px 10px rgba(0,0,0,.45);
  cursor: pointer;
  text-align: center;
  transition: transform .08s ease, box-shadow .08s ease, background .3s ease;
}
.key b { display: block; font: 400 15px/1.1 'Shrikhand', Georgia, serif; overflow-wrap: anywhere; }
.key small { display: block; margin-top: 3px; font: 600 11px/1.2 ui-monospace, Consolas, monospace; color: #6d5537; }
.key:active { transform: translateY(3px); box-shadow: 0 2px 0 #8e7a5a, 0 3px 6px rgba(0,0,0,.45); }
.key[aria-checked="true"] {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #8e7a5a, 0 2px 4px rgba(0,0,0,.45);
  background: linear-gradient(#ffe2a6, var(--key-on) 70%, #e09630);
}

.volume {
  grid-area: volume;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.volume input { flex: 1; accent-color: var(--brass); min-width: 0; }

.skips {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.ghost {
  padding: 8px 12px;
  border: 1px solid rgba(243,230,207,.25);
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ghost:hover { background: rgba(0,0,0,.32); }
#live { border-color: var(--amber); color: var(--amber); }

/* ---------- guide ---------- */
.station-notes { margin-top: 36px; }
.blurb { color: var(--ink-soft); font-size: 17px; text-wrap: pretty; margin: 0 0 24px; }
h2 {
  margin: 0 0 4px;
  font: 400 24px/1.2 'Shrikhand', Georgia, serif;
  color: var(--amber);
}
.hint { margin: 0 0 14px; color: var(--ink-faint); font-size: 14px; }
.guide { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.guide li { border-bottom: 1px solid var(--line); }
.guide .row {
  display: grid;
  grid-template-columns: 3.6em 1fr auto;
  gap: 4px 14px;
  align-items: baseline;
  width: 100%;
  padding: 11px 6px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.guide .row:hover { background: rgba(255,181,71,.06); }
.guide .d { color: var(--ink-faint); font: 13px/1.4 ui-monospace, Consolas, monospace; }
.guide .t { min-width: 0; }
.guide .t em { display: block; font-style: normal; font-size: 14px; color: var(--ink-soft); }
.guide .m { color: var(--ink-faint); font-size: 13px; white-space: nowrap; }
.guide li.now .row { background: rgba(255,181,71,.1); }
.guide li.now .t::before {
  content: 'ON AIR';
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #ff3b2b;
  color: #fff;
  font: 700 10px/1.6 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .1em;
  vertical-align: 2px;
}
.guide .src { display: inline-block; padding: 0 6px 10px; font-size: 13px; }

/* ---------- credits ---------- */
.back { margin: -16px 0 18px; font-size: 14px; }
.back a { color: var(--ink-faint); text-decoration: none; }
.back a:hover { color: var(--amber); }

/* ---------- every station and show ---------- */
.archive { margin-top: 44px; }
.archive details { border-top: 1px solid var(--line); }
.archive details:last-of-type { border-bottom: 1px solid var(--line); }
.archive summary { padding: 12px 6px; cursor: pointer; color: var(--ink); }
.archive summary b { font: 400 18px/1.2 "Shrikhand", Georgia, serif; color: var(--amber); margin-right: 8px; }
.archive summary span { color: var(--ink-faint); font-size: 14px; }
.archive .about { margin: 0 6px 10px; color: var(--ink-soft); font-size: 15px; }
.archive ul { list-style: none; margin: 0 0 14px; padding: 0 6px; }
.archive li { padding: 5px 0; font-size: 14px; color: var(--ink-soft); }
.archive li .d { display: inline-block; min-width: 9.5em; color: var(--ink-faint); font: 13px/1.4 ui-monospace, Consolas, monospace; }

.credits { margin-top: 44px; color: var(--ink-faint); font-size: 14px; }
.credits p { margin: 0 0 10px; }

@media (max-width: 560px) {
  .room { padding-top: 28px; }
  .cabinet { padding: 12px; border-radius: 16px; }
  .scale .sm-hide { display: none; }
  .eye { width: 48px; height: 48px; }
  .face { gap: 12px; }
  .station { font-size: 24px; }
  .day { font-size: 17px; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide .row { grid-template-columns: 3.4em 1fr; }
  .guide .m { grid-column: 2; }
  .archive li .d { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .needle, .power .knob, .eye span { transition: none; }
  .locked .eye span { animation: none; }
}
