/* Radio Dial (v19): the landing. The set is drawn at 1200 by 780 and scaled to the
   window on a desktop; on a phone (or any tall window) it is laid out again with
   the dial running down the right-hand side. */

.set { position: relative; }

.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  overflow: clip;
  background-image:
    radial-gradient(62% 52% at 50% 60%, rgba(255, 160, 70, .16), rgba(255, 160, 70, 0) 72%),
    radial-gradient(130% 95% at 50% 45%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .6) 100%),
    repeating-linear-gradient(90deg,
      rgba(255, 226, 180, .03) 0 1px, rgba(0, 0, 0, 0) 1px 38px,
      rgba(0, 0, 0, .17) 38px 44px, rgba(0, 0, 0, 0) 44px 82px);
}

/* ---------- Desktop: the set at its drawn size, scaled by --s ---------- */

.rig {
  position: absolute; left: 50%; top: 50%;
  width: 1200px; height: 780px;
  margin: -390px 0 0 -600px;
  transform: scale(var(--s, 1));
  transform-origin: 50% 50%;
}
.rig::before, .rig::after {
  content: ''; position: absolute; bottom: 2px; width: 120px; height: 18px;
  background: linear-gradient(180deg, #2c170a, #110803);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, .6);
}
.rig::before { left: 130px; }
.rig::after { right: 130px; }

.shelf {
  position: absolute; left: -2400px; right: -2400px; top: 778px; height: 900px; z-index: -1;
  background: linear-gradient(180deg, #5a3820 0, #3a2312 3px, #24150b 26px, #160c06 140px, #0f0804 100%);
}
.shelf::before {
  content: ''; position: absolute; left: 50%; top: 0; width: 1400px; height: 60px; margin-left: -700px;
  background: radial-gradient(50% 60% at 50% 0, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0) 75%);
}
.shelf::after {
  content: ''; position: absolute; left: 50%; top: 0; width: 1000px; height: 120px; margin-left: -500px;
  background: radial-gradient(50% 70% at 50% 0, rgba(255, 170, 80, .10), rgba(255, 170, 80, 0) 80%);
}

.cabinet {
  position: absolute; left: 0; top: 0; width: 1200px; height: 762px;
  border-radius: 46px 46px 18px 18px;
  padding: 20px 30px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 66px 322px 168px minmax(0, 1fr);
  row-gap: 14px;
  box-shadow:
    inset 0 2px 0 rgba(255, 222, 180, .3),
    inset 0 0 0 1px rgba(0, 0, 0, .55),
    inset 0 -4px 0 rgba(0, 0, 0, .35),
    inset 0 0 60px rgba(0, 0, 0, .25),
    0 34px 60px rgba(0, 0, 0, .6),
    0 10px 20px rgba(0, 0, 0, .45);
}

/* Rail and badge */
.rail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.badge { margin: 0; font-weight: 400; line-height: 1; }
.maker {
  margin: 0;
  font: italic 400 14px/1.2 var(--f-body);
  letter-spacing: .02em;
  color: var(--gold-dim);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
  text-align: center;
}

/* Grille cloth, where the broadcast comes through */
.grille {
  position: relative;
  border-radius: 14px;
  padding: 24px 46px 24px 34px;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  column-gap: 42px;
  align-items: center;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background-color: #33261b;
  background-image:
    radial-gradient(90% 120% at 50% 50%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55) 100%),
    var(--slub),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 228, 180, .07) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(214, 170, 90, .10) 0 2px, rgba(0, 0, 0, 0) 2px 26px),
    linear-gradient(180deg, #3d2d20, #2b1f15);
  background-size: 100% 100%, 240px 240px, auto, auto, auto, 100% 100%;
  box-shadow:
    0 0 0 3px #170c05,
    0 0 0 6px #a88544,
    0 0 0 7px #3a230f,
    inset 0 0 50px rgba(0, 0, 0, .6),
    inset 0 0 0 1px rgba(0, 0, 0, .6);
}
.grille::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 90% at 58% 50%, rgba(255, 168, 70, .22), rgba(255, 168, 70, 0) 72%);
  opacity: var(--sig, 1);
}
.static {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  opacity: 0;
  mix-blend-mode: screen;
  image-rendering: pixelated;
  pointer-events: none;
}
.meter, .broadcast { position: relative; z-index: 2; }
.meter { width: 214px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
.meter-svg { display: block; width: 100%; height: auto; }
.m-label { font: 700 9px var(--f-label); letter-spacing: .24em; text-transform: uppercase; fill: var(--gold); }
.m-num { font: 700 11px var(--f-label); fill: #3a1c08; }

/* The broadcast */
.broadcast {
  --o: 1; --bl: 0px; --jx: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "meta meta" "title title" "tag btn";
  column-gap: 30px;
  align-items: end;
  min-width: 0;
  animation: comeIn .6s .2s both;
}
@keyframes comeIn { from { opacity: 0; } to { opacity: 1; } }
.bc-meta, .bc-title, .bc-tag {
  opacity: var(--o);
  filter: blur(var(--bl));
  transform: translateX(var(--jx));
}
.bc-meta {
  grid-area: meta;
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 8px;
}
.bc-no {
  font: 700 56px/.9 var(--f-label);
  letter-spacing: .01em;
  color: var(--amber-lt);
  text-shadow: 0 0 22px rgba(255, 170, 70, .45);
  font-variant-numeric: tabular-nums;
}
.bc-sub {
  display: flex; flex-direction: column; gap: 3px;
  padding-left: 16px;
  border-left: 1px solid rgba(244, 228, 193, .3);
  font: 700 14px/1.2 var(--f-label);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
#bc-freq { text-transform: none; letter-spacing: .1em; }
.bc-title {
  grid-area: title;
  margin: 0 0 14px;
  font: 400 60px/1.03 var(--f-title);
  color: var(--cream);
  text-shadow: 0 0 26px rgba(255, 170, 70, .35);
  text-wrap: balance;
  min-width: 0;
}
.bc-title.is-long { font-size: 52px; }
.bc-title.is-xlong { font-size: 42px; }
.bc-title-vis .w { display: inline-block; white-space: nowrap; }
.bc-title-vis .ch { transition: opacity .06s linear; }
.bc-title-vis .ch.off { opacity: .14; }
.bc-tag {
  grid-area: tag;
  margin: 0;
  max-width: 36em;
  font: italic 400 21px/1.38 var(--f-body);
  color: var(--cream-dim);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.tune-in {
  grid-area: btn;
  align-self: end;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px;
  padding: 0 22px 0 24px;
  border-radius: 7px;
  background: linear-gradient(180deg, #f6eddb 0, #e7dbc0 55%, #d3c29d 100%);
  color: #2a1a0c;
  font: 800 15px/1 var(--f-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 2px 0 #8b7550, 0 5px 0 #3a2716, 0 10px 18px rgba(0, 0, 0, .55),
    inset 0 1px 0 #fffbea;
  transition: transform .12s ease, box-shadow .12s ease, opacity .3s ease;
}
.tune-in i {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffd9b0, #e2401c 45%, #8a1708);
  box-shadow: 0 0 10px 2px rgba(255, 80, 30, .55);
  transition: background .3s ease, box-shadow .3s ease;
}
.tune-in:hover { box-shadow: 0 2px 0 #8b7550, 0 5px 0 #3a2716, 0 10px 18px rgba(0, 0, 0, .55), inset 0 1px 0 #fffbea, 0 0 0 3px rgba(255, 200, 120, .25); }
.tune-in:active { transform: translateY(4px); box-shadow: 0 1px 0 #8b7550, 0 1px 0 #3a2716, 0 4px 8px rgba(0, 0, 0, .55), inset 0 1px 0 #fffbea; }
.broadcast.is-weak .tune-in { opacity: .5; }
.broadcast:not(.is-locked) .tune-in i { background: radial-gradient(circle at 40% 35%, #8a5a48, #4a1a10 60%); box-shadow: none; }

/* ---------- The dial glass ---------- */

.dial {
  position: relative;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ead197 0, #b08c4b 42%, #6f5323 56%, #c6a263 100%);
  box-shadow:
    0 0 0 2px #1a0d05,
    0 8px 16px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 250, 225, .75),
    inset 0 -1px 0 rgba(60, 40, 10, .6);
  min-width: 0; min-height: 0;
}
.glass {
  --np: 50%;
  position: relative;
  width: 100%; height: 100%;
  border-radius: 6px;
  overflow: hidden;
  overflow: clip;
  cursor: ew-resize;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  background-color: #f1b45f;
  background-image:
    radial-gradient(240px 140px at var(--np) 58%, rgba(255, 248, 222, .82), rgba(255, 226, 160, 0) 70%),
    radial-gradient(170px 150px at 0 50%, rgba(255, 238, 196, .55), rgba(255, 238, 196, 0) 70%),
    radial-gradient(170px 150px at 100% 50%, rgba(255, 238, 196, .55), rgba(255, 238, 196, 0) 70%),
    linear-gradient(180deg, #e39b45 0, #f6c271 38%, #f3b660 72%, #cf8834 100%);
  box-shadow:
    inset 0 0 0 1px rgba(70, 35, 0, .45),
    inset 0 9px 18px rgba(90, 45, 0, .32),
    inset 0 -9px 16px rgba(90, 45, 0, .28);
}

.band { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
.band .scale, .marks {
  position: absolute; left: 0; top: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 230px), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(90deg, #000 calc(100% - 230px), rgba(0, 0, 0, 0));
}
.marks { width: 100%; height: 100%; }
.mk { position: absolute; top: 0; width: 0; height: 100%; }
.mk em {
  position: absolute; top: 95px; left: 0;
  transform: translateX(-50%);
  font: 700 11px/1 var(--f-label);
  font-style: normal;
  letter-spacing: .04em;
  color: rgba(43, 22, 7, .85);
  font-variant-numeric: tabular-nums;
}

.st { position: absolute; top: 0; width: 0; height: 100%; }
.st-name {
  position: absolute; left: 0;
  transform: translateX(-50%);
  max-width: 300px;
  padding: 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 800 12px/15px var(--f-label);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: color .2s ease, text-shadow .2s ease;
}
.st-name b { display: none; }
.r0 .st-name { top: 9px; }
.r1 .st-name { top: 29px; }
.r2 .st-name { top: 49px; }
.st-lead { position: absolute; left: -.5px; top: 67px; width: 1px; height: 19px; background: rgba(163, 32, 15, .7); }
.st-dot {
  position: absolute; left: -4px; top: 83px; width: 8px; height: 8px;
  background: var(--red);
  transform: rotate(45deg);
}
.st-no {
  position: absolute; left: 0; top: 114px;
  transform: translateX(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--red);
  font: 800 11px/21px var(--f-label);
  text-align: center;
  color: var(--red);
  transition: background .2s ease, color .2s ease;
}
.st.is-near .st-name { color: #5e1408; }
.st.is-on .st-name { color: var(--red); text-shadow: 0 0 10px rgba(255, 246, 214, .95); }
.st.is-on .st-no { background: var(--red); color: var(--amber-lt); }

.needle {
  position: absolute; left: -1px; top: 64px; bottom: 4px; width: 2px; z-index: 3;
  background: linear-gradient(180deg, rgba(198, 42, 20, 0) 0, #c62a14 12px, #8f160a 100%);
  box-shadow: 0 0 6px rgba(200, 40, 10, .5);
  pointer-events: none;
  will-change: transform;
}
.needle::after {
  content: ''; position: absolute; left: -5px; bottom: -4px; width: 12px; height: 9px;
  background: linear-gradient(180deg, #3a2414, #140a04);
  border-radius: 2px 2px 0 0;
}

.cap { position: absolute; top: 0; bottom: 0; width: 30px; z-index: 4; pointer-events: none; }
.cap-a {
  left: 0;
  background:
    radial-gradient(circle at 50% 50%, #f0dca3 0 1.5px, #6b5020 2.5px, #b9944f 4.5px, rgba(0, 0, 0, 0) 5.5px) 0 0 / 100% 100%,
    linear-gradient(90deg, #6f5323, #d3b06c 45%, #8d6c33);
  box-shadow: 2px 0 6px rgba(60, 30, 0, .45);
}
.cap-b {
  right: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, #8d6c33, #d3b06c 55%, #6f5323);
  box-shadow: -2px 0 6px rgba(60, 30, 0, .45);
}
.cap-b span {
  writing-mode: vertical-rl;
  font: 800 11px/1 var(--f-label);
  letter-spacing: .2em;
  color: #2c1a06;
}
.sheen {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 0 28%, rgba(255, 255, 255, .17) 35%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 26%);
}
.dark {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background: #0d0703;
  animation: lampsOn 1s ease-out .05s both;
}
@keyframes lampsOn {
  0% { opacity: 1; }
  28% { opacity: .78; }
  36% { opacity: .9; }
  58% { opacity: .32; }
  66% { opacity: .42; }
  100% { opacity: 0; }
}

/* ---------- Controls ---------- */

.controls {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  align-items: center;
  min-width: 0;
}
.ctl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ctl-name {
  font: 800 11px/1 var(--f-label);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6);
}

.knob {
  position: relative;
  display: block;
  padding: 0; border: 0; border-radius: 50%;
  background: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.knob::before {
  content: ''; position: absolute; inset: -7px; border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, 0) 70%);
}
.knob::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 27%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 40%);
}
.knob-cap {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f1e8d3 0 55%, #d9caa8 56% 59%, rgba(0, 0, 0, 0) 60%),
    repeating-conic-gradient(#e8dbbd 0 5deg, #b6a17a 5deg 10deg);
  box-shadow:
    0 7px 12px rgba(0, 0, 0, .6),
    0 2px 0 #6e5a3a,
    inset 0 -5px 9px rgba(80, 60, 30, .35);
  will-change: transform;
}
.knob-cap::after {
  content: ''; position: absolute; left: 50%; top: 8%; width: 4px; height: 25%; margin-left: -2px;
  border-radius: 2px;
  background: #7a2112;
}
.knob:focus-visible { outline: 3px solid var(--amber-lt); outline-offset: 8px; }
.knob.is-grab { cursor: grabbing; }

.knob-t { width: 104px; height: 104px; }
.ctl-tune::before {
  content: ''; position: absolute; left: 50%; top: -10px;
  width: 124px; height: 124px; margin-left: -62px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(240, 217, 153, .55) 0 1.3deg, rgba(0, 0, 0, 0) 1.3deg 12deg);
  -webkit-mask: radial-gradient(circle, rgba(0, 0, 0, 0) 0 55px, #000 56px 61px, rgba(0, 0, 0, 0) 62px);
  mask: radial-gradient(circle, rgba(0, 0, 0, 0) 0 55px, #000 56px 61px, rgba(0, 0, 0, 0) 62px);
  pointer-events: none;
}

.knob-s { width: 70px; height: 70px; cursor: pointer; }
.knob-s .knob-cap { transform: rotate(-50deg); transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.knob-s.is-on .knob-cap { transform: rotate(50deg); }
.mark {
  position: absolute; top: 56px;
  font: 800 10px/1 var(--f-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(240, 217, 153, .6);
}
.mark-off { right: calc(50% + 46px); }
.mark-on { left: calc(50% + 46px); }
.knob-s.is-on ~ .mark-on, .knob-s:not(.is-on) ~ .mark-off { color: var(--gold); }
.lamp {
  position: absolute; top: 6px; left: calc(50% + 50px);
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #6b3a1a, #2a1408);
  box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #a68343, 0 0 0 3px #2a1806;
  transition: background .3s ease, box-shadow .3s ease;
}
.lamp.is-on {
  background: radial-gradient(circle at 40% 35%, #fff2c0, #ffae3c 45%, #c45f0f);
  box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #a68343, 0 0 0 3px #2a1806, 0 0 14px 4px rgba(255, 160, 60, .6);
}

.keys {
  justify-self: center;
  align-self: start;
  display: flex; gap: 6px;
  padding: 8px 8px 0;
  margin-top: 4px;
  border-radius: 6px 6px 2px 2px;
  background: #130a04;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 220, 180, .14), 0 -1px 0 rgba(0, 0, 0, .6);
}
.key {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 66px; height: 66px;
  padding: 0 12px;
  border: 0; border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #cfc1a2 0, #f3ead6 12%, #ece1c8 72%, #d6c7a4 100%);
  box-shadow: 0 5px 0 #9d8a66, 0 7px 10px rgba(0, 0, 0, .55), inset 0 -2px 0 rgba(120, 100, 60, .35);
  color: #2e1d0e;
  font: 800 12px/1.1 var(--f-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, box-shadow .08s ease;
}
.key:active, .key.is-down { transform: translateY(5px); box-shadow: 0 0 0 #9d8a66, 0 2px 4px rgba(0, 0, 0, .5), inset 0 -2px 0 rgba(120, 100, 60, .35); }
.key-list { width: 140px; }
.key-prev::before, .key-next::before { content: ''; width: 0; height: 0; border-style: solid; }
.key-prev::before { border-width: 8px 13px 8px 0; border-color: rgba(0, 0, 0, 0) #3a2414 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); }
.key-next::before { border-width: 8px 0 8px 13px; border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #3a2414; }

/* ---------- The back of the set: station list ---------- */

.back { position: relative; padding: 70px 24px 110px; }
.vents {
  max-width: 820px; height: 112px; margin: 0 auto 46px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 176, 86, .75) 0 2px, rgba(120, 60, 20, .9) 3px, #0e0704 4.5px 6.5px, rgba(0, 0, 0, 0) 7px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, #000 55%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(70% 90% at 50% 50%, #000 55%, rgba(0, 0, 0, 0) 100%);
  opacity: .9;
}
.card {
  max-width: 900px; margin: 0 auto;
  padding: 50px 56px 46px;
  transform: rotate(-.35deg);
}
.card-head { text-align: center; margin-bottom: 30px; }
.card-head h2 {
  margin: 0;
  font: 800 30px/1 var(--f-label);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--paper-ink);
}
.card-maker { margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; }
.card-name { font: 400 26px/1 var(--f-badge); color: var(--red); }
.card-line { font: italic 400 17px/1.3 var(--f-body); color: rgba(42, 33, 24, .8); }

.log-head, .row {
  display: grid;
  grid-template-columns: 58px 64px minmax(0, 1fr) 100px;
  column-gap: 18px;
  align-items: baseline;
}
.log-head {
  padding-bottom: 9px;
  border-bottom: 2px solid var(--paper-ink);
  font: 800 12px/1 var(--f-label);
  letter-spacing: .22em;
  text-transform: uppercase;
}
.log-head span:nth-child(2) { text-transform: none; letter-spacing: .1em; }
.log-head span:last-child { text-align: right; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { border-bottom: 1px dotted rgba(42, 33, 24, .5); }
.row {
  padding: 15px 0 16px;
  color: inherit;
  text-decoration: none;
  border-radius: 3px;
  transition: background .2s ease;
}
.row:hover { background: rgba(214, 150, 60, .12); }
.row:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.r-no {
  font: 800 24px/1 var(--f-label);
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.r-f { font: 700 17px/1 var(--f-label); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.r-f .u { display: none; }
.r-title { display: block; font: 400 27px/1.15 var(--f-title); transition: color .2s ease; }
.r-tag { display: block; margin-top: 4px; font: italic 400 17px/1.42 var(--f-body); color: rgba(42, 33, 24, .78); }
.r-k {
  text-align: right;
  font: 800 13px/1 var(--f-label);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.row:hover .r-title { color: var(--red); }
.log .row-next { padding: 15px 0 16px; display: grid; grid-template-columns: 58px; }
.row-next .r-no { color: rgba(42, 33, 24, .22); }

/* ---------- Phone and tall windows: the dial runs vertically ---------- */

@media (max-width: 979px), (max-aspect-ratio: 1/1) {
  .stage { padding: 8px; }
  .rig {
    position: relative; left: auto; top: auto;
    width: auto; max-width: 760px; height: 100%;
    margin: 0 auto;
    transform: none;
  }
  .rig::before, .rig::after, .shelf { display: none; }
  .cabinet {
    position: relative; left: auto; top: auto;
    width: 100%; height: 100%;
    border-radius: 28px 28px 16px 16px;
    padding: 10px 12px 12px;
    grid-template-columns: minmax(0, 1fr) 128px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px 12px;
  }
  .rail { grid-column: 1 / -1; gap: 4px; padding-top: 2px; }
  .plate { font-size: 27px; padding: 0 22px 4px; }
  .maker { font-size: 13px; }

  .grille {
    grid-column: 1; grid-row: 2;
    display: flex; flex-direction: column;
    padding: 14px 14px 14px;
    min-height: 0;
    box-shadow: 0 0 0 2px #170c05, 0 0 0 4px #a88544, 0 0 0 5px #3a230f, inset 0 0 40px rgba(0, 0, 0, .6);
  }
  .meter { width: auto; flex: none; }
  .meter-svg { width: 100px; height: 62px; }
  .broadcast {
    display: flex; flex-direction: column;
    margin: auto 0;
    padding-top: 12px;
    min-height: 0;
    flex: 0 1 auto;
  }
  .bc-meta { gap: 10px; margin-bottom: 8px; }
  .bc-no { font-size: 40px; }
  .bc-sub { padding-left: 10px; font-size: 12px; letter-spacing: .16em; }
  .bc-title { font-size: clamp(27px, 8.2vw, 42px); line-height: 1.04; margin-bottom: 10px; }
  .bc-title.is-long { font-size: clamp(25px, 7.2vw, 38px); }
  .bc-title.is-xlong { font-size: clamp(22px, 6vw, 32px); }
  .bc-tag { font-size: 16px; line-height: 1.4; -webkit-line-clamp: 7; min-height: 0; }
  .tune-in { align-self: stretch; margin-top: 16px; min-height: 46px; font-size: 14px; flex: none; }

  .dial { grid-column: 2; grid-row: 2; padding: 6px; border-radius: 10px; }
  .glass {
    cursor: ns-resize;
    background-image:
      radial-gradient(130px 200px at 60% var(--np), rgba(255, 248, 222, .82), rgba(255, 226, 160, 0) 70%),
      radial-gradient(150px 120px at 50% 0, rgba(255, 238, 196, .55), rgba(255, 238, 196, 0) 70%),
      radial-gradient(150px 120px at 50% 100%, rgba(255, 238, 196, .55), rgba(255, 238, 196, 0) 70%),
      linear-gradient(90deg, #dd9440 0, #f6c271 34%, #f3b660 70%, #cf8834 100%);
  }
  .band { width: 100%; height: auto; }
  .band .scale, .marks {
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 200px), rgba(0, 0, 0, 0));
    mask-image: linear-gradient(180deg, #000 calc(100% - 200px), rgba(0, 0, 0, 0));
  }
  .mk { top: auto; left: 0; width: 100%; height: 0; }
  .mk em { top: -12px; left: 7px; width: 23px; transform: none; text-align: center; font-size: 9px; letter-spacing: 0; }
  .st { top: auto; left: 0; width: 100%; height: 0; }
  .st-name {
    left: 40px; right: 2px; top: 0;
    transform: translateY(-50%);
    max-width: none;
    padding: 0;
    white-space: normal; overflow: visible;
    font-size: 10.5px; line-height: 12px; letter-spacing: .05em;
    text-align: left;
  }
  .st-name b { display: inline; color: var(--red); margin-right: 3px; }
  .r0 .st-name, .r1 .st-name, .r2 .st-name { top: 0; }
  .st-lead, .st-no { display: none; }
  .st-dot { left: 27px; top: -4px; width: 8px; height: 8px; border-radius: 50%; transform: none; }
  .needle {
    left: 0; right: 0; top: -21px; bottom: auto; width: auto; height: 42px;
    background: linear-gradient(180deg, rgba(170, 30, 12, .06), rgba(170, 30, 12, .15) 50%, rgba(170, 30, 12, .06));
    border-top: 1px solid rgba(150, 25, 10, .75);
    border-bottom: 1px solid rgba(150, 25, 10, .75);
    box-shadow: none;
  }
  .needle::after {
    left: 1px; top: 50%; bottom: auto; width: 0; height: 0; margin-top: -6px;
    border-radius: 0;
    background: none;
    border-style: solid; border-width: 6px 0 6px 8px;
    border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #9e1b10;
  }
  .cap { left: 0; right: 0; width: auto; height: 22px; }
  .cap-a {
    top: 0; bottom: auto;
    background:
      radial-gradient(circle at 50% 50%, #f0dca3 0 1.5px, #6b5020 2.5px, #b9944f 4.5px, rgba(0, 0, 0, 0) 5.5px) 0 0 / 100% 100%,
      linear-gradient(180deg, #6f5323, #d3b06c 45%, #8d6c33);
    box-shadow: 0 2px 6px rgba(60, 30, 0, .45);
  }
  .cap-b {
    top: auto; bottom: 0;
    background: linear-gradient(180deg, #8d6c33, #d3b06c 55%, #6f5323);
    box-shadow: 0 -2px 6px rgba(60, 30, 0, .45);
  }
  .cap-b span { writing-mode: horizontal-tb; font-size: 9px; }
  .sheen {
    background:
      linear-gradient(170deg, rgba(255, 255, 255, 0) 0 24%, rgba(255, 255, 255, .16) 30%, rgba(255, 255, 255, 0) 38%),
      linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 30%);
  }

  .controls {
    grid-column: 1 / -1; grid-row: 3;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 8px;
    padding: 0 2px;
  }
  .ctl { gap: 5px; }
  .ctl-name { font-size: 9.5px; letter-spacing: .2em; }
  .knob-s { width: 48px; height: 48px; }
  .mark { display: none; }
  .lamp { top: -3px; left: calc(50% + 17px); width: 10px; height: 10px; }
  .keys { padding: 6px 6px 0; gap: 4px; margin-top: 0; align-self: center; }
  .key { width: 44px; height: 52px; padding: 0 6px; font-size: 10px; letter-spacing: .1em; }
  .key-list { width: 74px; }
  .key-prev::before { border-width: 7px 11px 7px 0; }
  .key-next::before { border-width: 7px 0 7px 11px; }
  .knob-t { width: 74px; height: 74px; }
  .ctl-tune::before { top: -7px; width: 88px; height: 88px; margin-left: -44px;
    -webkit-mask: radial-gradient(circle, rgba(0, 0, 0, 0) 0 39px, #000 40px 43px, rgba(0, 0, 0, 0) 44px);
    mask: radial-gradient(circle, rgba(0, 0, 0, 0) 0 39px, #000 40px 43px, rgba(0, 0, 0, 0) 44px);
  }

  .back { padding: 44px 10px 70px; }
  .vents { height: 70px; margin-bottom: 28px; background-size: 18px 18px; }
  .card { padding: 34px 18px 30px; transform: rotate(-.25deg); }
  .card-head { margin-bottom: 20px; }
  .card-head h2 { font-size: 23px; letter-spacing: .2em; }
  .card-name { font-size: 23px; }
  .card-line { font-size: 16px; }
  .log-head { display: none; }
  .log { border-top: 2px solid var(--paper-ink); }
  .row {
    grid-template-columns: 40px auto minmax(0, 1fr);
    grid-template-areas: "no st st" "no f k";
    row-gap: 8px; column-gap: 12px;
    padding: 14px 0 15px;
  }
  .r-no { grid-area: no; font-size: 21px; }
  .r-st { grid-area: st; }
  .r-f { grid-area: f; font-size: 14px; }
  .r-f .u { display: inline; }
  .r-k { grid-area: k; text-align: left; font-size: 12px; align-self: baseline; }
  .r-title { font-size: 23px; }
  .r-tag { font-size: 16px; }
  .log .row-next { grid-template-columns: 40px; }
}

@media (max-width: 979px) and (min-width: 600px), (max-aspect-ratio: 1/1) and (min-width: 600px) {
  .cabinet { grid-template-columns: minmax(0, 1fr) 150px; padding: 14px 18px 16px; gap: 14px; }
  .grille { padding: 22px 26px; }
  .meter-svg { width: 135px; height: 84px; }
  .bc-tag { font-size: 18px; }
  .st-name { font-size: 11.5px; line-height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .broadcast, .dark { animation: none; }
  .dark { opacity: 0; }
  .knob-s .knob-cap { transition: none; }
}

/* Phone: keep per-frame repaints off the blurred inset shadows and glows */
@media (max-width: 820px), (pointer: coarse) {
  .grille { will-change: transform; box-shadow: 0 0 0 3px #170c05, 0 0 0 6px #a88544, 0 0 0 7px #3a230f, inset 0 0 0 1px rgba(0, 0, 0, .6); }
  .grille::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    border-radius: inherit; box-shadow: inset 0 0 50px rgba(0, 0, 0, .6);
    will-change: transform;
  }
  .grille::after { will-change: opacity; }
  .meter { will-change: transform; }
  .bc-meta, .bc-title, .bc-tag { will-change: transform, opacity; }
  .bc-no { text-shadow: 0 0 10px rgba(255, 170, 70, .4); }
  .bc-title { text-shadow: 0 0 10px rgba(255, 170, 70, .3); }
  .glass { will-change: transform; box-shadow: inset 0 0 0 1px rgba(70, 35, 0, .45); }
  .glass::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 9px 18px rgba(90, 45, 0, .32), inset 0 -9px 16px rgba(90, 45, 0, .28);
    will-change: transform;
  }
}
@media (max-width: 979px) and (max-width: 820px), (max-aspect-ratio: 1/1) and (max-width: 820px), (max-width: 979px) and (pointer: coarse), (max-aspect-ratio: 1/1) and (pointer: coarse) {
  .grille::before { box-shadow: inset 0 0 40px rgba(0, 0, 0, .6); }
}

/* Phones: sharp edges in place of the large blurred cabinet and dial shadows, which were redrawn every frame. */
@media (max-width: 820px), (pointer: coarse) {
  .cabinet { box-shadow: inset 0 2px 0 rgba(255, 222, 180, .3), inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 -4px 0 rgba(0, 0, 0, .35); }
  .rig::before, .rig::after { box-shadow: 0 4px 0 rgba(0, 0, 0, .45); }
  .grille::before { box-shadow: none; background: radial-gradient(ellipse 75% 60% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .45) 100%); }
  .dial { box-shadow: 0 0 0 2px #1a0d05, inset 0 1px 0 rgba(255, 250, 225, .75), inset 0 -1px 0 rgba(60, 40, 10, .6); }
  .glass::before { box-shadow: none; background: linear-gradient(180deg, rgba(90, 45, 0, .3) 0, rgba(90, 45, 0, 0) 16px, rgba(90, 45, 0, 0) calc(100% - 16px), rgba(90, 45, 0, .26) 100%); }
  .cap-a { box-shadow: 0 2px 0 rgba(60, 30, 0, .35); }
  .cap-b { box-shadow: 0 -2px 0 rgba(60, 30, 0, .35); }
}
