/* The player's look: a radio receiver with a pale faceplate and one lit dial.
   Plain CSS loaded by index.html; the dial and the Coming-up chips share their marks. */
/* A receiver: pale faceplate, one lit dial. The dial keeps its colours in both themes. */
:root {
  --plate: #e3e4de; --ink: #1b2230; --muted: #5a6270; --rule: rgba(27, 34, 48, 0.16);
  --glass: #16323b; --mark: #efe7c8; --amber: #f2b544; --needle: #f0482e;
  --focus: #0b62d6;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --plate: #24282d; --ink: #ebe9e1; --muted: #a0a6ad; --rule: rgba(235, 233, 225, 0.16); --focus: #7db4ff; }
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--plate); color: var(--ink);
  font: 400 1rem/1.45 "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh; display: flex; flex-direction: column;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
.col { width: 100%; max-width: 40rem; margin-inline: auto; padding-inline: 1.25rem; }

.brand { padding-block: 1.25rem 1rem; font-size: 1.125rem; font-weight: 700; font-stretch: 85%; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
.logo { flex: none; width: 1.5rem; height: 1.5rem; }

/* The dial: time slides under a fixed needle. */
.dial { position: relative; background: var(--glass); height: 132px; overflow: hidden; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45), inset 0 -1px 0 rgba(255, 255, 255, 0.06); }
.dial::before { /* the lamp behind the glass */
  content: ""; position: absolute; inset: -40% 0; left: calc(var(--needle-x) - 45%); width: 90%;
  background: radial-gradient(closest-side, rgba(239, 231, 200, 0.26), transparent);
  opacity: 0; transition: opacity 0.9s ease;
}
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; transition: opacity 0.9s ease; }
.dial.lit::before { opacity: 1; }
.dial.lit svg { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dial::before, .dial svg { transition: none; } }
.dial .tick { stroke: var(--mark); stroke-width: 1; opacity: 0.55; }
.dial .tick.major { opacity: 1; stroke-width: 1.5; }
.dial text { fill: var(--mark); font: 500 13px "Bricolage Grotesque", sans-serif; font-stretch: 75%; }
.dial .video { fill: none; stroke: var(--mark); stroke-width: 1.25; opacity: 0.8; }
.dial .podcast { fill: var(--amber); }
.dial .host { fill: var(--mark); }
.needle { position: absolute; top: 0; bottom: 0; left: var(--needle-x); width: 2px; margin-left: -1px; background: var(--needle); box-shadow: 0 0 8px rgba(240, 72, 46, 0.6); }
.needle::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid var(--needle); }

.now { padding-block: 1.75rem 1.5rem; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.25rem; }
.now > div:last-child { flex: 1 1 14rem; min-width: 0; }
/* YouTube's own player, kept as a cover-art tile: it is where the sound comes from. */
.tile { position: relative; flex: none; width: 200px; height: 200px; background: var(--glass); border-radius: 4px; overflow: hidden; }
.tile iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
/* Only while a phone is holding YouTube's sound back does the picture take taps (see player.js). */
.tile.tappable iframe { pointer-events: auto; }
/* Our own cover sits over the player until a video is actually showing: a play mark before
   tuning in, the station mark while the host talks. It never takes clicks. */
.cover { position: absolute; inset: 0; display: grid; place-items: center; background: var(--glass); pointer-events: none; }
.cover .mark { display: none; border-radius: 12px; }
.tile.listening .cover .play { display: none; }
.tile.listening .cover .mark { display: block; }
.tile.on-air .cover { display: none; }
/* Phones: the picture runs edge to edge as a wide 16:9 frame, so videos fill it without black
   bars. 200px is YouTube's minimum player height. Desktop keeps the square beside the title. */
@media (max-width: 32rem) {
  .tile { width: calc(100% + 2.5rem); height: auto; aspect-ratio: 16 / 9; min-height: 200px; margin-inline: -1.25rem; border-radius: 0; }
}
#title { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; overflow-wrap: anywhere; text-wrap: balance;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; } /* video titles run long */
.meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; color: var(--muted); font-size: 1.0625rem; }
#left { flex: none; }

#toggle {
  font: inherit; font-size: 1.125rem; font-weight: 600; color: var(--plate); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px; padding: 0.8rem 1.25rem; width: 100%; cursor: pointer;
}
#toggle[aria-pressed="true"] { background: transparent; color: var(--ink); }
#toggle:disabled { opacity: 0.4; cursor: default; }
#toggle:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#note { color: var(--muted); font-size: 0.9375rem; margin-top: 0.6rem; min-height: 1.4em; }

.next { padding-top: 1.25rem; }
h2 { font-size: 1rem; font-weight: 600; padding-bottom: 0.5rem; }
ol { list-style: none; padding: 0; }
li { display: grid; grid-template-columns: 3.1rem 1.5rem 1fr; column-gap: 0.75rem; align-items: start; padding-block: 0.7rem; border-top: 1px solid var(--rule); }
li time { font-stretch: 80%; font-weight: 500; }
li b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li small { font-size: 0.875rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li div { min-width: 0; }
/* Same marks as on the dial, so the list teaches you how to read it. */
.chip { width: 1.5rem; height: 1rem; margin-top: 0.2rem; background: var(--glass); border-radius: 2px; display: grid; place-items: center; }
.chip::after { content: ""; width: 0.9rem; height: 0.5rem; border-radius: 1px; }
.chip.video::after { height: 0.3rem; border: 1px solid var(--mark); }
.chip.podcast::after { background: var(--amber); }
.chip.host::after { background: var(--mark); width: 0.35rem; }

footer { margin-top: auto; padding-top: 2.5rem; color: var(--muted); font-size: 0.875rem; }
footer a { color: inherit; }
