/* ============================================================================
   5RADIO — the boombox
   ----------------------------------------------------------------------------
   One 1984 portable stereo, drawn entirely in CSS: no images, no sprites.
   Everything is gradients, borders and shadows, so it stays crisp at any size
   and the whole machine scales off a single custom property (--u).

   Structure:
     .boombox
       .antenna     telescoping mast, three tapering segments
       .handle      chrome carry bail
       .chassis
         .top-strip model badge, vents, power lamp
         .deck      [ speaker | console | speaker ]
           .console lcd, tuner scale, VU meters, cassette, keys, volume
         .feet
   ========================================================================== */

:root {
  /* one knob to size the whole machine */
  --u: clamp(9px, 1.35vw, 13px);

  /* case */
  --case-1: #3a3d44;
  --case-2: #26282e;
  --case-3: #16171b;
  --case-edge: #55595f;
  --silver-1: #d8dade;
  --silver-2: #9aa0a7;
  --silver-3: #6b7076;

  /* accents */
  --hot: #ff3b6b;
  --cyan: #00e5d0;
  --amber: #f7c948;
  --lime: #7ef29d;

  /* display */
  --lcd-bg: #071614;
  --lcd-ink: #4dffd8;
  --lcd-dim: rgba(77, 255, 216, 0.28);
}

/* ─────────────────────────────── shell ─────────────────────────────── */

.stage {
  padding: calc(var(--u) * 9) var(--u) calc(var(--u) * 2);
  display: flex;
  justify-content: center;
}

.boombox {
  position: relative;
  width: min(100%, 1020px);
  filter: drop-shadow(0 calc(var(--u) * 2.5) calc(var(--u) * 3) rgba(0, 0, 0, 0.65));
}

/* ───────────────────────────── antenna ───────────────────────────── */

.antenna {
  position: absolute;
  left: 11%;
  bottom: 88%;
  height: calc(var(--u) * 22);
  width: calc(var(--u) * 2);
  transform-origin: bottom center;
  transform: rotate(21deg);
  z-index: 0;
  animation: ant-rest 9s ease-in-out infinite;
}

.ant-seg {
  position: absolute;
  left: 50%;
  border-radius: 2px;
  background: linear-gradient(90deg, #5c6169 0%, #e6e9ec 38%, #f7f9fa 46%, #a7adb4 62%, #4a4e55 100%);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}

/* widest at the base, thinnest at the tip — a real telescoping mast */
.ant-1 { width: 5px;   height: 34%; bottom: 0;   margin-left: -2.5px; }
.ant-2 { width: 3.6px; height: 36%; bottom: 32%; margin-left: -1.8px; }
.ant-3 { width: 2.4px; height: 36%; bottom: 66%; margin-left: -1.2px; }

.ant-tip {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #9aa0a7 55%, #3d4147);
}

.ant-base {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: calc(var(--u) * 1.5);
  height: calc(var(--u) * 1.5);
  margin-left: calc(var(--u) * -0.75);
  border-radius: 50% 50% 40% 40%;
  background: linear-gradient(160deg, var(--silver-1), var(--silver-3) 60%, #2b2e33);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* the mast drifts a little; on air it drifts more */
@keyframes ant-rest {
  0%, 100% { transform: rotate(21deg); }
  50%      { transform: rotate(19.4deg); }
}
@keyframes ant-live {
  0%, 100% { transform: rotate(21.6deg); }
  25%      { transform: rotate(19deg); }
  60%      { transform: rotate(22.4deg); }
}
.is-playing .antenna { animation: ant-live 3.4s ease-in-out infinite; }

/* ───────────────────────────── handle ───────────────────────────── */

.handle {
  position: absolute;
  left: 50%;
  bottom: 97.5%;      /* tucked against the case, so the bail looks anchored */
  width: 34%;
  height: calc(var(--u) * 4);
  margin-left: -17%;
  z-index: 0;
}

/* A chrome bail: a rounded rectangle with no bottom edge, stroked with a
 * left-to-right metal gradient. border-image would flatten the corners, so the
 * gradient goes on the background and a padding-box/border-box mask pair keeps
 * only the border ring visible. */
.handle i {
  position: absolute;
  inset: 0;
  border: calc(var(--u) * 0.5) solid transparent;
  border-bottom: 0;
  border-radius: calc(var(--u) * 2.6) calc(var(--u) * 2.6) 0 0;
  background:
    linear-gradient(90deg, #43474d, #cfd3d8 20%, #f4f6f8 48%, #b7bcc2 78%, #3f434a) border-box;
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
          mask-composite: exclude;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
}

.hinge {
  position: absolute;
  bottom: calc(var(--u) * -0.7);
  width: calc(var(--u) * 1.9);
  height: calc(var(--u) * 1.9);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #e9ecef, #8d9298 55%, #34383d);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.hinge-l { left: calc(var(--u) * -0.6); }
.hinge-r { right: calc(var(--u) * -0.6); }

/* ───────────────────────────── chassis ───────────────────────────── */

.chassis {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--u) * 1.6);
  padding: calc(var(--u) * 1.1);
  background:
    linear-gradient(180deg, var(--case-1) 0%, var(--case-2) 42%, var(--case-3) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 calc(var(--u) * -1.2) calc(var(--u) * 1.6) rgba(0, 0, 0, 0.45),
    0 calc(var(--u) * 1.2) 0 #0a0b0d;
}

/* faint vertical brushed-plastic texture over the whole case */
.chassis::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
}

.top-strip {
  display: flex;
  align-items: center;
  gap: var(--u);
  padding: 0 calc(var(--u) * 0.8) calc(var(--u) * 0.9);
}

.badge-model {
  font: 700 calc(var(--u) * 0.95) / 1 ui-monospace, "Consolas", monospace;
  letter-spacing: 0.16em;
  color: var(--silver-1);
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}
.badge-model em {
  font-style: normal;
  color: var(--hot);
  letter-spacing: 0.22em;
}

.vents {
  flex: 1;
  height: calc(var(--u) * 0.9);
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0 2px,
    rgba(255, 255, 255, 0.05) 2px 5px
  );
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
}

.power-lamp {
  width: calc(var(--u) * 0.95);
  height: calc(var(--u) * 0.95);
  border-radius: 50%;
  background: #3a1420;
  box-shadow: inset 0 0 3px #000;
  transition: background 0.25s, box-shadow 0.25s;
}
.is-playing .power-lamp,
.is-tuning .power-lamp {
  background: var(--hot);
  box-shadow: 0 0 calc(var(--u) * 0.9) var(--hot), inset 0 0 3px rgba(255, 255, 255, 0.7);
}
.is-tuning .power-lamp { animation: lamp-blink 0.55s steps(1) infinite; }
@keyframes lamp-blink { 50% { background: #3a1420; box-shadow: inset 0 0 3px #000; } }

.deck {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.45fr) 1fr;
  gap: calc(var(--u) * 1.1);
  align-items: stretch;
}

.feet {
  display: flex;
  justify-content: space-between;
  padding: calc(var(--u) * 0.8) calc(var(--u) * 2) 0;
}
.feet i {
  width: calc(var(--u) * 4);
  height: calc(var(--u) * 0.7);
  border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, #1b1c20, #000);
}

/* ───────────────────────────── speakers ───────────────────────────── */

.speaker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 0.7);
  padding: calc(var(--u) * 1.2) calc(var(--u) * 0.6);
  border-radius: calc(var(--u) * 1.1);
  background: linear-gradient(160deg, #23252a, #121316 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 0 calc(var(--u) * 2) rgba(0, 0, 0, 0.6);
}

/* corner screws */
.speaker::before,
.speaker::after {
  content: "";
  position: absolute;
  width: calc(var(--u) * 0.8);
  height: calc(var(--u) * 0.8);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 42%, rgba(0, 0, 0, 0.75) 42% 58%, transparent 58%),
    radial-gradient(circle at 35% 32%, #c9ced3, #767b81 60%, #2c3035);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}
.speaker::before { top: calc(var(--u) * 0.6); left: calc(var(--u) * 0.6); }
.speaker::after  { bottom: calc(var(--u) * 0.6); right: calc(var(--u) * 0.6); }

.woofer {
  position: relative;
  width: min(100%, calc(var(--u) * 17));
  aspect-ratio: 1;
  border-radius: 50%;
  padding: calc(var(--u) * 0.7);
  background:
    conic-gradient(from 210deg, #6a6f76, #2b2e33 25%, #7b8087 50%, #26292e 75%, #6a6f76);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* the grille: concentric rings, like a stamped speaker cover */
.cone {
  position: relative;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      #0c0d0f 0 2px,
      #202226 2px 3px,
      #0c0d0f 3px 5px
    ),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.16), transparent 55%);
  box-shadow:
    inset 0 0 calc(var(--u) * 1.6) rgba(0, 0, 0, 0.9),
    inset 0 0 0 2px rgba(0, 0, 0, 0.8);
}

.dustcap {
  width: 34%;
  height: 34%;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #4a4e55, #1a1c20 62%, #0a0b0d);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.12s ease-out;
}

/* cones breathe with the music */
.is-playing .dustcap { animation: cone-pulse 0.62s ease-in-out infinite; }
.is-playing .woofer  { animation: woof-pulse 0.62s ease-in-out infinite; }
@keyframes cone-pulse { 50% { transform: scale(1.07); } }
@keyframes woof-pulse { 50% { box-shadow: 0 2px 4px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.1), 0 0 calc(var(--u) * 1.4) rgba(255, 59, 107, 0.22); } }

.tweeter {
  width: calc(var(--u) * 4.2);
  height: calc(var(--u) * 4.2);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #0b0c0e 0 1.5px, #1e2024 1.5px 2.5px),
    #111;
  box-shadow: inset 0 0 0 2px #4a4e55, inset 0 0 calc(var(--u)) rgba(0, 0, 0, 0.9);
}

.spk-label {
  font: 600 calc(var(--u) * 0.68) / 1 ui-monospace, "Consolas", monospace;
  letter-spacing: 0.14em;
  color: rgba(216, 218, 222, 0.42);
  text-align: center;
}

/* ───────────────────────────── console ───────────────────────────── */

.console {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.85);
  padding: calc(var(--u) * 1.1);
  border-radius: calc(var(--u) * 1.1);
  background: linear-gradient(180deg, #2c2f35, #191b1f 60%, #131417);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

/* ── LCD ── */

.lcd {
  position: relative;
  border-radius: calc(var(--u) * 0.6);
  padding: calc(var(--u) * 0.85) calc(var(--u) * 0.95);
  background: linear-gradient(180deg, #0b1f1c, var(--lcd-bg) 55%, #04100e);
  box-shadow:
    inset 0 0 0 2px #0a0b0d,
    inset 0 0 calc(var(--u) * 1.8) rgba(0, 0, 0, 0.85),
    0 0 calc(var(--u) * 1.4) rgba(0, 229, 208, 0.12);
  overflow: hidden;
}

.lcd-glass {
  font-family: ui-monospace, "Consolas", "SF Mono", monospace;
  color: var(--lcd-ink);
  text-shadow: 0 0 calc(var(--u) * 0.5) rgba(77, 255, 216, 0.55);
}

.lcd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--u);
  font-size: calc(var(--u) * 0.82);
  letter-spacing: 0.12em;
}

.lcd-mode {
  padding: 1px calc(var(--u) * 0.5);
  border: 1px solid var(--lcd-dim);
  border-radius: 2px;
  font-weight: 700;
}
.is-playing .lcd-mode { color: #061; background: var(--lcd-ink); border-color: var(--lcd-ink); color: #041a17; }
.is-error   .lcd-mode { color: #2a0910; background: var(--hot); border-color: var(--hot); }

.lcd-stereo { color: var(--lcd-dim); font-size: calc(var(--u) * 0.7); }
.is-playing .lcd-stereo { color: var(--lcd-ink); animation: stereo-flick 2.6s ease-in-out infinite; }
@keyframes stereo-flick { 50% { opacity: 0.55; } }

.lcd-freq { font-weight: 700; letter-spacing: 0.06em; }

.lcd-marquee {
  overflow: hidden;
  margin: calc(var(--u) * 0.45) 0;
  height: calc(var(--u) * 2.1);
  display: flex;
  align-items: center;
}

.lcd-name {
  font-size: calc(var(--u) * 1.55);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow: 0 0 calc(var(--u) * 0.7) rgba(77, 255, 216, 0.5);
}
/* only scroll when the name genuinely overflows (js adds the class) */
.lcd-name.scrolling { animation: marquee 12s linear infinite; }
@keyframes marquee {
  0%, 8%     { transform: translateX(0); }
  92%, 100%  { transform: translateX(var(--shift, -40%)); }
}

.lcd-sub {
  font-size: calc(var(--u) * 0.76);
  color: var(--lcd-dim);
  letter-spacing: 0.1em;
  gap: calc(var(--u) * 0.6);
}
.lcd-sub span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lcd-sub span:last-child { white-space: nowrap; }

/* scanlines + glass sheen */
.lcd-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    linear-gradient(105deg, rgba(255, 255, 255, 0.07) 0 22%, transparent 42%);
}

/* ── tuning scale ── */

.tuner { padding: 0 calc(var(--u) * 0.2); }

.scale {
  position: relative;
  height: calc(var(--u) * 2.6);
  border-radius: calc(var(--u) * 0.35);
  padding: 0 calc(var(--u) * 0.6);
  background: linear-gradient(180deg, #efe7cf, #cfc6ac);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65), inset 0 2px 4px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.band {
  position: absolute;
  left: calc(var(--u) * 0.5);
  top: 50%;
  transform: translateY(-50%);
  font: 700 calc(var(--u) * 0.75) / 1 ui-monospace, monospace;
  color: #7a2338;
  letter-spacing: 0.1em;
}

.ticks {
  position: absolute;
  inset: 0 calc(var(--u) * 0.6) 0 calc(var(--u) * 3);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.ticks i {
  width: 1px;
  height: 38%;
  background: rgba(40, 30, 25, 0.65);
}
.ticks i.major { height: 66%; width: 2px; background: rgba(30, 22, 18, 0.9); }
.ticks i.major::after {
  content: attr(data-n);
  position: absolute;
  transform: translate(-45%, calc(var(--u) * -2.05));
  font: 700 calc(var(--u) * 0.62) / 1 ui-monospace, monospace;
  color: rgba(40, 28, 22, 0.8);
}

.needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, #ff2d55, #b3122f);
  box-shadow: 0 0 calc(var(--u) * 0.5) rgba(255, 45, 85, 0.9);
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.needle::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: calc(var(--u) * 0.9);
  height: calc(var(--u) * 0.6);
  transform: translateX(-50%);
  background: #ff2d55;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* ── VU meters ── */

.vu {
  display: grid;
  gap: calc(var(--u) * 0.3);
  padding: calc(var(--u) * 0.5) calc(var(--u) * 0.6);
  border-radius: calc(var(--u) * 0.45);
  background: #0a0b0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 3px rgba(0, 0, 0, 0.8);
}
.vu-ch { display: flex; align-items: center; gap: calc(var(--u) * 0.5); }
.vu-lab {
  font: 700 calc(var(--u) * 0.68) / 1 ui-monospace, monospace;
  color: var(--silver-3);
  width: calc(var(--u) * 0.8);
}
.leds { display: flex; gap: 2px; flex: 1; }
.leds i {
  flex: 1;
  height: calc(var(--u) * 0.62);
  border-radius: 1px;
  background: #1b1d21;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7);
  transition: background 0.09s linear, box-shadow 0.09s linear;
}
.leds i.on            { background: var(--lime); box-shadow: 0 0 calc(var(--u) * 0.4) rgba(126, 242, 157, 0.75); }
.leds i.on.warm       { background: var(--amber); box-shadow: 0 0 calc(var(--u) * 0.4) rgba(247, 201, 72, 0.75); }
.leds i.on.hotseg     { background: var(--hot); box-shadow: 0 0 calc(var(--u) * 0.45) rgba(255, 59, 107, 0.85); }

/* ── cassette deck ── */

.cassette { padding: 0 calc(var(--u) * 0.2); }

.cass-door {
  position: relative;
  border-radius: calc(var(--u) * 0.5);
  padding: calc(var(--u) * 0.7);
  background: linear-gradient(180deg, #34373d, #1d1f23 60%, #141518);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 2px 3px rgba(0, 0, 0, 0.5);
}

.cass-window {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 0.6);
  height: calc(var(--u) * 4.4);
  border-radius: calc(var(--u) * 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(180deg, #1a1f24, #0c1013);
  box-shadow: inset 0 0 0 1px #05070a, inset 0 0 calc(var(--u)) rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

/* A hub with tape wound around it: solid brown pack outside, toothed grey
 * spool inside. */
.reel {
  position: relative;
  width: calc(var(--u) * 3.1);
  height: calc(var(--u) * 3.1);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      #6d4826 0 62%,
      #4a2f17 62% 88%,
      #35210f 88% 100%),
    #4a2f17;
  box-shadow:
    0 0 0 1px #000,
    inset 0 0 calc(var(--u) * 0.5) rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.reel i {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #c6cbd1 0 30deg, #7d8288 30deg 60deg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(0, 0, 0, 0.45);
}
.is-playing .reel i { animation: spin 2.4s linear infinite; }
.is-playing .reel-r i { animation-duration: 3.1s; }
@keyframes spin { to { transform: rotate(360deg); } }

.tape-span {
  flex: 1;
  max-width: calc(var(--u) * 5);
  height: calc(var(--u) * 1.5);
  background: linear-gradient(180deg, #6b4523, #3d2612);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cass-text {
  display: block;
  margin-top: calc(var(--u) * 0.45);
  text-align: center;
  font: 600 calc(var(--u) * 0.62) / 1 ui-monospace, monospace;
  letter-spacing: 0.16em;
  color: rgba(216, 218, 222, 0.35);
}

/* ── transport keys ── */

.transport {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: calc(var(--u) * 0.45);
}

.key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: calc(var(--u) * 0.6) calc(var(--u) * 0.2) calc(var(--u) * 0.5);
  border: 0;
  border-radius: calc(var(--u) * 0.35);
  cursor: pointer;
  color: #e7e9ec;
  background: linear-gradient(180deg, #4a4e56 0%, #33373d 46%, #24272c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 calc(var(--u) * 0.32) 0 #0d0e11,
    0 calc(var(--u) * 0.42) calc(var(--u) * 0.4) rgba(0, 0, 0, 0.55);
  transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.2s;
}
.key .glyph { font-size: calc(var(--u) * 1.05); line-height: 1; }
.key .key-lab {
  font: 700 calc(var(--u) * 0.6) / 1 ui-monospace, monospace;
  letter-spacing: 0.12em;
  color: rgba(231, 233, 236, 0.62);
}
.key:hover { background: linear-gradient(180deg, #565b64, #3a3e45 46%, #282b31); }
.key:active,
.key.pressed {
  transform: translateY(calc(var(--u) * 0.3));
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7), 0 0 0 #0d0e11;
}
.key:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.key-play .glyph { color: var(--lime); }
.key-play.on .glyph { color: var(--amber); }
.key-scan {
  background: linear-gradient(180deg, #ff6f8f 0%, #e42553 46%, #ab1339 100%);
}
.key-scan:hover { background: linear-gradient(180deg, #ff88a2, #f0335f 46%, #b81742); }
.key-scan .key-lab { color: rgba(255, 255, 255, 0.85); }

/* ── volume fader ── */

.fader {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.7);
  padding: 0 calc(var(--u) * 0.2);
}
.fader label {
  font: 700 calc(var(--u) * 0.68) / 1 ui-monospace, monospace;
  letter-spacing: 0.12em;
  color: var(--silver-2);
}
.fader output {
  font: 700 calc(var(--u) * 0.7) / 1 ui-monospace, monospace;
  color: var(--lcd-ink);
  min-width: calc(var(--u) * 2);
  text-align: right;
}

#volume {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: calc(var(--u) * 1.1);
  border-radius: calc(var(--u) * 0.55);
  background:
    linear-gradient(180deg, #0a0b0d, #1c1e22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: calc(var(--u) * 1.5);
  height: calc(var(--u) * 2.2);
  border-radius: calc(var(--u) * 0.25);
  background:
    linear-gradient(90deg, #8f949b, #eef0f2 40%, #b9bec4 60%, #6c7178),
    #ccc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
#volume::-moz-range-thumb {
  width: calc(var(--u) * 1.5);
  height: calc(var(--u) * 2.2);
  border: 0;
  border-radius: calc(var(--u) * 0.25);
  background: linear-gradient(90deg, #8f949b, #eef0f2 40%, #b9bec4 60%, #6c7178);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
#volume:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ─────────────────────────── responsive ─────────────────────────── */

@media (max-width: 780px) {
  :root { --u: clamp(10px, 3.1vw, 14px); }

  .deck {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "console console"
      "spkl    spkr";
  }
  .console { grid-area: console; }
  .speaker:first-of-type { grid-area: spkl; }
  .speaker:last-of-type  { grid-area: spkr; }
  .woofer { width: min(100%, calc(var(--u) * 12)); }
  .handle { display: none; }   /* the bail reads as clutter once the case narrows */
  .antenna { left: 8%; height: calc(var(--u) * 14); }
  .transport { grid-template-columns: repeat(5, 1fr); }
  .key { min-height: 44px; }           /* thumb-sized, not mouse-sized */
  .key .key-lab { font-size: calc(var(--u) * 0.52); }
  #volume { height: calc(var(--u) * 1.5); }
}

@media (prefers-reduced-motion: reduce) {
  .antenna,
  .is-playing .antenna,
  .is-playing .reel i,
  .is-playing .dustcap,
  .is-playing .woofer,
  .is-playing .lcd-stereo,
  .lcd-name.scrolling,
  .is-tuning .power-lamp {
    animation: none !important;
  }
  .needle { transition: none; }
}
