/* Layout: cable-guide channel. TV + "now playing" panel up top, scrolling listings grid below. */
:root {
  --navy: #07124a;        /* page ground, the guide channel's deep blue */
  --grid: #13299c;        /* listing cells */
  --grid-hi: #2342d6;     /* hovered / tuned row */
  --line: #050b33;        /* gaps between cells */
  --gold: #ffd23a;        /* titles, the guide's yellow type */
  --ivory: #f3efe2;       /* body text */
  --red: #d8322b;         /* channel number tiles */
  --osd: #5dff6a;         /* on-screen display green */
  --wood: #4a2f1c;        /* TV cabinet */
  --wood-hi: #6b4428;
  --font-guide: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-osd: "VT323", "Courier New", monospace;
  --font-logo: "Bungee", "Impact", sans-serif;
  --sister-bg: linear-gradient(135deg, #3a0b6b, #6f1a9e);  /* card pointing to the other site */
  --sister-edge: #ff4fb8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--navy); color: var(--ivory); }
body { font-family: var(--font-guide); font-size: 17px; line-height: 1.35; }

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 12px 24px;
  display: grid;
  gap: 14px;
}

/* ---------- Masthead ---------- */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.logo-retro, .logo-cable { font-family: var(--font-logo); font-size: clamp(26px, 5vw, 40px); line-height: 1; letter-spacing: .02em; }
.logo-retro { color: var(--gold); text-shadow: 3px 3px 0 var(--red); }
.logo-cable { color: var(--ivory); text-shadow: 3px 3px 0 var(--grid); }
.logo-tag { margin-left: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; color: var(--gold); }
.clock { font-family: var(--font-osd); font-size: 34px; color: var(--gold); display: flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
#clockAmPm { font-size: 22px; }
.visits {
  display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto;
  font-family: var(--font-osd); font-size: 22px; color: var(--osd);
  background: #000; border: 2px solid var(--line); border-radius: 6px; padding: 2px 10px;
  text-shadow: 0 0 6px currentColor; font-variant-numeric: tabular-nums;
}
.visits b { font-weight: 400; }
.visits + .install-btn { margin-left: 0; }
.install-btn {
  margin-left: auto; font: inherit; font-weight: 800; font-size: 16px; letter-spacing: .04em;
  background: var(--gold); color: var(--navy); border: 0; border-radius: 6px;
  padding: 8px 14px; cursor: pointer; box-shadow: 0 3px 0 #a8850f;
}
.install-btn:hover, .install-btn:focus-visible { background: #ffe07a; outline: none; }
.install-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a8850f; }

/* ---------- Top: TV + now panel ---------- */
.top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }

.tv-cabinet {
  background: linear-gradient(160deg, var(--wood-hi), var(--wood) 55%, #2d1b0f);
  border-radius: 22px;
  padding: 18px 18px 10px;
  box-shadow: 0 10px 0 #1d1109, 0 18px 40px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.12);
}
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  border: 8px solid #141414;
  box-shadow: 0 0 0 2px #3a3a3a;
}
.screen > iframe, .screen > canvas, .bars, .testcard, .poweron {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
#snow { image-rendering: pixelated; display: block; }
#yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; z-index: 1; }
.screen[data-mode="yt"] #yt { visibility: visible; }
.screen.flash #yt { visibility: hidden; }
.screen.on-video #snow { opacity: 0; }
.screen.flash #snow { opacity: 1; z-index: 3; }

/* Sister-station card */
.sister {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center;
  padding: 12px 14px; text-decoration: none; color: var(--ivory);
  background: var(--sister-bg); border: 3px solid var(--line); box-shadow: inset 0 0 0 2px var(--sister-edge);
}
.sister img { grid-row: span 3; width: 56px; height: 56px; border-radius: 10px; }
.sister-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--sister-edge); }
.sister strong { font-family: var(--font-logo); font-weight: 400; font-size: 22px; line-height: 1.05; }
.sister span:last-child { font-size: 15px; opacity: .9; }
.sister:hover, .sister:focus-visible { filter: brightness(1.12); outline: none; }
.foot nav a.sister-link { font-weight: 700; }
.sister.console-card { --sister-bg: linear-gradient(135deg, #0b1714, #1c3a2f); --sister-edge: #ff8a1f; }
.sister + .sister { margin-top: 10px; }

/* Find a show */
.finder { position: relative; display: grid; gap: 6px; }
.finder-label { text-transform: uppercase; letter-spacing: .14em; font-size: 14px; font-weight: 700; color: var(--gold); }
.finder-box { position: relative; display: flex; align-items: center; }
#find {
  width: 100%; font: inherit; font-size: 20px; color: var(--ivory);
  background: var(--grid); border: 3px solid var(--line); box-shadow: inset 0 0 0 2px var(--grid-hi);
  padding: 10px 14px; border-radius: 4px;
}
.finder-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#find::placeholder { color: rgba(243,239,226,.6); }
#find:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.finder-count { font-size: 14px; opacity: .75; font-variant-numeric: tabular-nums; }
.finder-results {
  list-style: none; margin: 0; padding: 3px; display: grid; gap: 3px;
  background: var(--line); max-height: 360px; overflow-y: auto;
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.finder-results button {
  width: 100%; text-align: left; font: inherit; color: var(--ivory); cursor: pointer;
  background: var(--grid); border: 0; padding: 8px 12px; display: grid; gap: 2px;
}
.finder-results button:hover, .finder-results button:focus-visible { background: var(--grid-hi); outline: none; }
.finder-results b { color: var(--gold); font-size: 18px; }
.finder-results small { font-size: 14px; opacity: .85; }
.finder-results .empty { padding: 10px 12px; background: var(--grid); }

/* OSD channel number, top right like a 90s set */
.osd {
  position: absolute; top: 6%; right: 7%; z-index: 6;
  font-family: var(--font-osd); color: var(--osd);
  font-size: clamp(28px, 6vw, 56px); line-height: .9; text-align: right;
  text-shadow: 0 0 6px rgba(93,255,106,.7), 2px 2px 0 #000;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.osd.show { opacity: 1; }
.osd small { display: block; font-size: .5em; }

/* Power-on overlay */
.poweron {
  z-index: 7; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: rgba(0,0,0,.45); text-align: center; padding: 16px;
}
.poweron small { color: var(--ivory); opacity: .85; font-size: 15px; }
.power-btn {
  font-family: var(--font-osd); font-size: 30px; color: var(--osd);
  background: #000; border: 2px solid var(--osd); border-radius: 8px;
  padding: 8px 20px; cursor: pointer; display: flex; gap: 10px; align-items: center;
  text-shadow: 0 0 6px rgba(93,255,106,.7);
}
.power-btn:hover, .power-btn:focus-visible { background: #0b2a10; outline: none; }

/* SMPTE-style color bars for empty channels */
.bars { z-index: 2; display: grid; grid-template-rows: 67% 8% 25%; }
.bars > div { display: grid; }
.bars-top, .bars-mid { grid-template-columns: repeat(7, 1fr); }
.bars-bot { grid-template-columns: 5fr 5fr 5fr 6fr; }
.bars-top i:nth-child(1){background:#c0c0c0}.bars-top i:nth-child(2){background:#c0c000}
.bars-top i:nth-child(3){background:#00c0c0}.bars-top i:nth-child(4){background:#00c000}
.bars-top i:nth-child(5){background:#c000c0}.bars-top i:nth-child(6){background:#c00000}
.bars-top i:nth-child(7){background:#0000c0}
.bars-mid i:nth-child(1){background:#0000c0}.bars-mid i:nth-child(2){background:#131313}
.bars-mid i:nth-child(3){background:#c000c0}.bars-mid i:nth-child(4){background:#131313}
.bars-mid i:nth-child(5){background:#00c0c0}.bars-mid i:nth-child(6){background:#131313}
.bars-mid i:nth-child(7){background:#c0c0c0}
.bars-bot i:nth-child(1){background:#00214c}.bars-bot i:nth-child(2){background:#fff}
.bars-bot i:nth-child(3){background:#32006a}.bars-bot i:nth-child(4){background:#131313}
.bars-label {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  background: #000; color: #fff; padding: 10px 22px; text-align: center;
  font-family: var(--font-osd); display: grid; gap: 2px; border: 2px solid #fff;
}
.bars-label strong { font-size: 34px; letter-spacing: .1em; }
.bars-label span { font-size: 24px; color: var(--gold); }
.bars-label small { font-size: 16px; opacity: .8; }

/* Preview-mode stand-in when a player can't load */
.testcard {
  z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px;
  text-align: center; padding: 8%;
  background: radial-gradient(circle at 50% 40%, #1b3bc4, #07124a 75%);
}
.testcard-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 13px; color: var(--gold); }
.testcard strong { font-size: clamp(20px, 3.4vw, 32px); line-height: 1.1; text-wrap: balance; }
.testcard a { color: var(--gold); font-weight: 700; margin-top: 6px; }
.testcard small { font-size: 13px; opacity: .7; max-width: 34ch; margin-top: 6px; }

.tv-chin { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; flex-wrap: wrap; }
.brand { font-family: var(--font-logo); font-size: 13px; letter-spacing: .3em; color: #d9b98a; text-shadow: 0 1px 0 #000; }
.knobs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vol { display: flex; align-items: center; gap: 6px; font-size: 13px; letter-spacing: .1em; color: #d9b98a; }
.vol input { width: 110px; accent-color: var(--gold); }
.ch-btn {
  font-family: var(--font-guide); font-weight: 700; font-size: 16px; letter-spacing: .06em;
  background: linear-gradient(#333, #111); color: var(--ivory);
  border: 1px solid #000; border-radius: 6px; padding: 7px 14px; cursor: pointer;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.2);
}
.ch-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.ch-btn:focus-visible, .row:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Now panel */
.now { display: grid; gap: 14px; min-width: 0; }
.now-card {
  background: linear-gradient(var(--grid), #0d1f7a);
  border: 3px solid var(--line); box-shadow: inset 0 0 0 2px var(--grid-hi);
  padding: 14px 16px;
}
.now-chan { display: flex; gap: 12px; align-items: center; }
.now-num {
  background: var(--red); color: #fff; font-weight: 800; font-size: 40px;
  min-width: 64px; text-align: center; padding: 2px 8px; line-height: 1.1;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); font-variant-numeric: tabular-nums;
}
.now-call { display: block; font-weight: 800; font-size: 26px; color: var(--gold); letter-spacing: .06em; line-height: 1; }
.now-name { display: block; font-size: 17px; text-transform: uppercase; letter-spacing: .08em; }
.now-blurb { margin: 10px 0; font-size: 17px; }
.now-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 16px; }
.now-meta dt { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--gold); padding-top: 2px; }
.now-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Viewer support card, styled like a station PSA slide */
.support {
  display: grid; gap: 8px; padding: 14px 16px;
  background: repeating-linear-gradient(135deg, #0d1f7a 0 14px, #10248a 14px 28px);
  border: 3px solid var(--line); box-shadow: inset 0 0 0 2px var(--gold);
}
.support-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--gold); }
.support strong { font-family: var(--font-logo); font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--ivory); text-wrap: balance; }
.support p { margin: 0; font-size: 16px; }
.support-btn {
  justify-self: start; background: var(--gold); color: var(--navy); text-decoration: none;
  font-weight: 800; font-size: 18px; padding: 8px 16px; border-radius: 6px;
  box-shadow: 0 3px 0 #a8850f;
}
.support-btn:hover, .support-btn:focus-visible { background: #ffe07a; outline: none; }
.support-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a8850f; }

/* ---------- Guide grid ---------- */
.guide { min-width: 0; }
.guide-head, .row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 3px; }
.guide-head { background: var(--line); padding: 3px; }
.gh-chan, .gh-slots span {
  background: var(--gold); color: var(--navy); font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 8px; font-variant-numeric: tabular-nums;
}
.gh-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }

.guide-window {
  height: 360px; overflow: hidden; position: relative;
  background: var(--line); padding: 0 3px 3px;
}
/* Scroll-it-yourself guide: every channel listed once */
.guide-window.manual {
  height: auto; max-height: 520px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-color: var(--grid-hi) var(--line);
}
.guide-rows { display: grid; gap: 3px; will-change: transform; }
.guide-window.scrolling .guide-rows { animation: roll var(--roll-time, 40s) linear infinite; }
.guide-window:hover .guide-rows, .guide-window:focus-within .guide-rows, .guide-window.paused .guide-rows { animation-play-state: paused; }
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(var(--roll-dist, -50%)); } }

.row {
  width: 100%; border: 0; padding: 0; background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.row-chan {
  background: var(--red); color: #fff; padding: 6px 8px; display: grid; align-content: center;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
}
.row-chan b { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.row-chan span { font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.row-progs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; min-width: 0; }
.cell {
  background: var(--grid); padding: 6px 10px; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.cell b { display: block; color: var(--gold); font-weight: 700; font-size: 18px; line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell small { font-size: 14px; opacity: .85; }
.cell.span3 { grid-column: span 3; }
.row:hover .cell, .row:focus-visible .cell { background: var(--grid-hi); }
.row.tuned .row-chan { background: var(--gold); color: var(--navy); }
.row.tuned .cell { background: var(--grid-hi); }
.guide-hint { margin: 8px 0 0; font-size: 14px; opacity: .7; }

.foot { border-top: 2px solid var(--grid); padding-top: 12px; font-size: 15px; opacity: .85; }
.foot p { margin: 0 0 6px; max-width: 70ch; }
.foot a { color: var(--gold); }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tv-cabinet { padding: 10px 10px 8px; border-radius: 14px; }
  .screen { border-width: 5px; }
  #find { font-size: 17px; }
  .guide-head, .row { grid-template-columns: 74px minmax(0, 1fr); }
  .gh-slots, .row-progs { grid-template-columns: 1fr; }
  .gh-slots span:nth-child(n+2), .cell:nth-child(n+2) { display: none; }
  .cell.span3 { grid-column: auto; display: block; }
  .row-chan b { font-size: 22px; }
  .clock { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-window { overflow-y: auto; }
  .guide-window.scrolling .guide-rows { animation: none; }
}

/* Sister-site card colors, one per site in the family */
.sister.cable-card { --sister-bg: linear-gradient(135deg, #07124a, #13299c); --sister-edge: #ffd23a; }
.sister.jukebox-card { --sister-bg: linear-gradient(135deg, #3a0b6b, #6f1a9e); --sister-edge: #ff4fb8; }
.sister.radio-card { --sister-bg: linear-gradient(135deg, #24110a, #5a2d16); --sister-edge: #ffb43c; }

/* RetroRadio: same layout as RetroCable and RetroJukebox, recolored like a glowing hi-fi receiver.
   Walnut-brown ground, amber dial light, red call-letter tiles. The TV screen becomes the tuning dial. */
:root {
  --navy: #170c08;
  --grid: #3a1d10;
  --grid-hi: #5a2d16;
  --line: #0b0503;
  --gold: #ffb43c;
  --ivory: #f6ead6;
  --red: #d9442a;
  --osd: #ffcf6e;
  --wood: #4a2f1c;
  --wood-hi: #6b4428;
  --sister-bg: linear-gradient(135deg, #07124a, #13299c);
  --sister-edge: #ffd23a;
  --d70: #ff8a2a; --d80: #ff4fb8; --d90: #2fd6c8; --d00: #a6e84d; --d10: #9b7bff;
}
.logo-retro { text-shadow: 3px 3px 0 var(--red); }
.logo-cable { text-shadow: 3px 3px 0 #7a3a14; }
.support { background: repeating-linear-gradient(135deg, #2c150b 0 14px, #34190d 14px 28px); }
.now-card { background: linear-gradient(var(--grid), #24110a); }
.cell small, .now-name { color: #eedcc2; }
.gh-chan, .gh-slots span { color: var(--line); }
.install-btn, .support-btn { box-shadow: 0 3px 0 #a0640e; }
.install-btn:hover, .support-btn:hover { background: #ffc96e; }

/* ---- The dial (sits where the TV screen is on the sister sites) ---- */
.screen.dialface {
  aspect-ratio: 16 / 7; display: grid; grid-template-rows: 1fr auto; gap: 8px; padding: 14px 18px 16px;
  background: radial-gradient(ellipse at 50% 120%, #3b2208, #120903 70%); border-color: #1a0f07;
  box-shadow: 0 0 0 2px #3a2a1a, inset 0 0 40px rgba(255,160,40,.12);
}
.readout { display: flex; align-items: center; gap: 18px; min-width: 0; position: relative; z-index: 1; }
.freq {
  font-family: var(--font-osd); color: var(--osd); line-height: .8; font-variant-numeric: tabular-nums;
  font-size: clamp(48px, 10vw, 104px); text-shadow: 0 0 14px rgba(255,180,60,.55), 2px 2px 0 #000;
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
}
.freq small { font-size: .32em; letter-spacing: .1em; }
.readout-right { display: grid; gap: 8px; justify-items: start; }
.lamp {
  font-family: var(--font-guide); font-weight: 800; font-size: 13px; letter-spacing: .2em; padding: 2px 8px;
  border: 2px solid #4a2d12; border-radius: 4px; color: #5a3a1a;
}
.signal { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.signal i { width: 7px; background: #3a2412; border-radius: 1px; }
.signal i:nth-child(1) { height: 20%; } .signal i:nth-child(2) { height: 40%; } .signal i:nth-child(3) { height: 60%; }
.signal i:nth-child(4) { height: 80%; } .signal i:nth-child(5) { height: 100%; }
.signal i.on { background: var(--osd); box-shadow: 0 0 6px rgba(255,180,60,.6); }
.screen[data-state="locked"] .lamp, .screen[data-state="preview"] .lamp {
  color: #ff5a3c; border-color: #ff5a3c; text-shadow: 0 0 8px rgba(255,80,50,.8); box-shadow: 0 0 10px rgba(255,80,50,.35);
}

/* fake spectrum bars, dancing only while a station is locked in */
.eq { margin-left: auto; display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.eq i { width: 8px; height: 10%; background: linear-gradient(to top, var(--gold), #ff5a3c); border-radius: 2px; opacity: .25; }
.screen[data-state="locked"] .eq i, .screen[data-state="preview"] .eq i { opacity: 1; animation: eq 900ms ease-in-out infinite alternate; }
.eq i:nth-child(3n) { animation-duration: 640ms !important; } .eq i:nth-child(4n+1) { animation-duration: 1100ms !important; }
.eq i:nth-child(5n+2) { animation-duration: 760ms !important; animation-delay: -300ms; }
@keyframes eq { from { height: 12%; } to { height: 100%; } }

.dial {
  position: relative; height: 92px; cursor: ew-resize; touch-action: none; user-select: none; z-index: 1;
  background: linear-gradient(#f3d9a4, #e9c27b); border-radius: 6px;
  box-shadow: inset 0 0 0 2px #7a5222, inset 0 0 24px rgba(255,190,90,.75), 0 0 26px rgba(255,170,50,.28);
}
.dial:focus-visible { outline: 3px solid var(--osd); outline-offset: 3px; }
.bands { position: absolute; left: 3%; right: 3%; top: 8px; height: 20px; }
.band {
  position: absolute; top: 0; height: 100%; display: grid; place-items: center;
  font-family: var(--font-guide); font-weight: 800; font-size: 13px; letter-spacing: .14em; color: #2a1606;
  border-bottom: 4px solid currentColor;
}
.band[data-decade="70s"] { color: #b24f05; } .band[data-decade="80s"] { color: #b0217a; }
.band[data-decade="90s"] { color: #0d7f77; } .band[data-decade="2000s"] { color: #4f7d0e; } .band[data-decade="2010s"] { color: #5638c4; }
.scale {
  position: absolute; left: 3%; right: 3%; top: 32px; bottom: 8px;
  background:
    repeating-linear-gradient(90deg, #4a2b0c 0 1px, transparent 1px 100%) 0 0 / 4.878% 9px repeat-x,
    repeating-linear-gradient(90deg, #4a2b0c 0 2px, transparent 2px 100%) 0 0 / 9.756% 16px repeat-x;
}
.scale .num {
  position: absolute; bottom: 0; transform: translateX(-50%);
  font-family: var(--font-osd); font-size: 22px; color: #3a1f06; line-height: 1;
}
.scale .num.last { transform: translateX(-80%); }
.scale .mark {
  position: absolute; top: 20px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: #8a5a26; box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.needle {
  position: absolute; top: 4px; bottom: 4px; width: 3px; margin-left: -1.5px; border-radius: 2px;
  background: #e0201a; box-shadow: 0 0 8px rgba(224,32,26,.8), 0 0 2px #fff; pointer-events: none;
  left: 3%; transform-origin: center;
}
/* the dial's 3% side margins: map the needle into the same inner track as the scale */
.dial .needle { left: calc(3% + (94% * var(--p, 0))); }

.screen[data-state="off"] .readout, .screen[data-state="off"] .dial { filter: brightness(.45) saturate(.6); }
.poweron { z-index: 7; }

/* decade preset buttons on the chin, like car-radio presets */
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.preset {
  font-family: var(--font-guide); font-weight: 800; font-size: 15px; letter-spacing: .06em; min-width: 44px;
  background: linear-gradient(#e9dcc4, #bfae90); color: #2a1606; border: 1px solid #000; border-radius: 5px;
  padding: 6px 8px; cursor: pointer; box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.6);
}
.preset:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.preset[aria-pressed="true"] { background: linear-gradient(#ffd27a, #ffb43c); }
.preset:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.retry-btn {
  margin-top: 10px; font: inherit; font-weight: 800; font-size: 15px; letter-spacing: .04em; cursor: pointer;
  background: transparent; color: var(--gold); border: 2px solid var(--gold); border-radius: 6px; padding: 5px 12px;
}
.retry-btn:hover, .retry-btn:focus-visible { background: rgba(255,180,60,.12); outline: none; }
.now-meta dd a { color: var(--gold); font-weight: 700; }

/* guide rows colored by decade on the frequency tile */
.row[data-decade="70s"] .row-chan { box-shadow: inset 6px 0 0 var(--d70), inset 0 -3px 0 rgba(0,0,0,.25); }
.row[data-decade="80s"] .row-chan { box-shadow: inset 6px 0 0 var(--d80), inset 0 -3px 0 rgba(0,0,0,.25); }
.row[data-decade="90s"] .row-chan { box-shadow: inset 6px 0 0 var(--d90), inset 0 -3px 0 rgba(0,0,0,.25); }
.row[data-decade="2000s"] .row-chan { box-shadow: inset 6px 0 0 var(--d00), inset 0 -3px 0 rgba(0,0,0,.25); }
.row[data-decade="2010s"] .row-chan { box-shadow: inset 6px 0 0 var(--d10), inset 0 -3px 0 rgba(0,0,0,.25); }
.row-chan { padding-left: 14px; }
.row-chan b { font-size: 24px; }
.cell { display: block; }
.cell small { display: block; }
.cell.blurb { display: flex; align-items: center; }
.cell.blurb small { white-space: normal; line-height: 1.25; }
.guide-head, .row { grid-template-columns: 110px minmax(0, 1fr); }
.gh-slots, .row-progs { grid-template-columns: 1.1fr .6fr 2fr; }

@media (max-width: 860px) {
  .screen.dialface { aspect-ratio: auto; }
}
@media (max-width: 560px) {
  .screen.dialface { padding: 10px 10px 12px; gap: 10px; }
  .readout { gap: 10px; }
  .eq { height: 40px; gap: 3px; }
  .eq i { width: 5px; }
  .eq i:nth-child(n+9) { display: none; }
  .dial { height: 84px; }
  .scale .num { font-size: 17px; }
  .scale .num:nth-child(even) { visibility: hidden; }
  .band { font-size: 11px; letter-spacing: .06em; }
  .presets { order: 3; width: 100%; justify-content: space-between; }
  .preset { flex: 1; min-width: 0; }
  .tv-chin .knobs { width: 100%; }
  .tv-chin .vol { flex: 1 1 100%; }
  .tv-chin .vol input { flex: 1; width: auto; }
  .tv-chin .ch-btn { flex: 1; }
  .guide-head, .row { grid-template-columns: 84px minmax(0, 1fr); }
  .gh-slots, .row-progs { grid-template-columns: 1fr; }
  .row-chan b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen[data-state="locked"] .eq i { animation: none; height: 60%; }
}
