/* WKND·FM — walnut cabinet, cream faceplate, amber glass, red needle. */

@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/literata.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --wood-hi: #5a331b;
  --wood: #3d2212;
  --wood-dark: #22130a;
  --cream: #efe3c8;
  --cream-hi: #f8f0dc;
  --cream-lo: #dccba6;
  --ink: #2b1d12;
  --ink-soft: #5b4630;
  --amber: #ffb547;
  --amber-hot: #ffd98a;
  --amber-dim: #c9b28a;
  --glass: #140c06;
  --red: #ff4a2e;
  --brass: #c49a5a;
  --display: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --radius: 14px;
}

.cat-art        { --c: #ff8f70; --cd: #a8361b; }
.cat-film       { --c: #6fd6c8; --cd: #0f6b62; }
.cat-food       { --c: #f2c94c; --cd: #7a5a00; }
.cat-literature { --c: #c9a3ff; --cd: #6a3fa8; }
.cat-music      { --c: #ffb547; --cd: #964d00; }
.cat-outdoors   { --c: #95d77f; --cd: #2f6a1f; }
.cat-walks      { --c: #86bcff; --cd: #1f539c; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  background:
    repeating-linear-gradient(93deg, rgba(255, 220, 180, .025) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(87deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 27px),
    radial-gradient(120% 80% at 30% 0%, var(--wood-hi), var(--wood) 45%, var(--wood-dark));
  background-attachment: fixed;
}
body.sheet-open { overflow: hidden; }

h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--amber-hot); outline-offset: 2px; }
.faceplate :focus-visible,
.broadcast :focus-visible,
.guide :focus-visible { outline: 3px solid #1a0f06; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(255, 181, 71, .7); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--ink);
  padding: 10px 14px; border-radius: 8px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .08em;
}
.skip:focus { top: 12px; }

/* ---------- cabinet ---------- */
.cabinet {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 14px 18px 8px;
  gap: 12px;
}

.brandbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 4px 6px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: .06em;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 181, 71, .35);
}
.logo i { font-style: normal; color: var(--red); }
.logo-waves { width: 44px; height: 30px; color: var(--red); overflow: visible; }
.tagline {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .86rem;
  color: var(--cream);
}
.tagline span { color: var(--amber-dim); }
.onband {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--cream);
  white-space: nowrap;
}
.led {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red), 0 0 2px #fff inset;
  animation: led 2.4s ease-in-out infinite;
}
@keyframes led { 50% { opacity: .45; } }

.foot {
  padding: 2px 6px 6px;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--amber-dim);
}

/* ---------- receiver grid ---------- */
.receiver {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "controls dial speaker"
    "presets  dial speaker";
  gap: 14px;
  min-height: 0;
  height: calc(100vh - 128px);
  min-height: 640px;
}
.controls { grid-area: controls; }
.presets  { grid-area: presets; }
.dial-wrap { grid-area: dial; }
.speaker  { grid-area: speaker; }

/* ---------- cream faceplates ---------- */
.faceplate {
  background:
    radial-gradient(140% 90% at 20% 0%, var(--cream-hi), var(--cream) 55%, var(--cream-lo));
  color: var(--ink);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  box-shadow:
    0 0 0 3px #1a0e06,
    0 0 0 5px var(--brass),
    0 14px 30px rgba(0, 0, 0, .45),
    inset 0 2px 0 rgba(255, 255, 255, .6),
    inset 0 -3px 8px rgba(80, 50, 20, .18);
  position: relative;
}
.faceplate::before, .faceplate::after {
  /* screw heads */
  content: "";
  position: absolute; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3e1bd, #8a6a3c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.faceplate::before { left: 9px; }
.faceplate::after { right: 9px; }

.plate-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .3em;
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

/* readout LCD */
.readout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: linear-gradient(180deg, #0c0703, #1c1108);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .5);
  color: var(--amber);
}
.freq {
  font-family: var(--mono);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--amber-hot);
  text-shadow: 0 0 14px rgba(255, 181, 71, .6);
  font-variant-numeric: tabular-nums;
}
.freq small { font-size: .8rem; margin-left: 6px; color: var(--amber); letter-spacing: .1em; }
.clock {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--amber);
}
.tuned {
  margin-top: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: .86rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.meter {
  display: flex; align-items: flex-end; gap: 3px;
  height: 52px; align-self: center;
}
.meter span {
  width: 6px;
  background: #3a2614;
  border-radius: 1px;
  transition: background .15s;
}
.meter span:nth-child(1) { height: 20%; }
.meter span:nth-child(2) { height: 40%; }
.meter span:nth-child(3) { height: 60%; }
.meter span:nth-child(4) { height: 80%; }
.meter span:nth-child(5) { height: 100%; }
.meter span.on { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.meter span.on:nth-child(5) { background: #ffe9b8; }

/* knob + seek */
.knobrow {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
}
.seek {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 35% 30%, #4e3420, #1e1209);
  color: var(--amber);
  font-size: .9rem;
  box-shadow: 0 3px 0 #0c0603, 0 4px 10px rgba(0, 0, 0, .35);
}
.seek:active { transform: translateY(2px); box-shadow: 0 1px 0 #0c0603; }
.knob {
  --rot: -150deg;
  width: 64px; height: 64px; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(0, 0, 0, .18) 0 4deg, transparent 4deg 12deg),
    radial-gradient(circle at 35% 30%, #f1d7a2, var(--brass) 45%, #6b4a22);
  box-shadow: 0 4px 0 #3b2611, 0 8px 18px rgba(0, 0, 0, .4), inset 0 0 0 4px rgba(0, 0, 0, .08);
  position: relative;
  transform: rotate(var(--rot));
  transition: transform .12s linear;
}
.knob span {
  position: absolute; left: 50%; top: 6px;
  width: 4px; height: 16px; margin-left: -2px;
  border-radius: 2px;
  background: var(--red);
}
.knob-hint {
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* fields */
.field { display: grid; gap: 4px; }
.field + .field-row, .field-search { margin-top: 2px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.field label {
  font-family: var(--display);
  font-weight: 500;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ink-soft);
}
.field input, .field select {
  height: 44px;
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream-hi);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--ink);
  box-shadow: inset 0 2px 4px rgba(60, 35, 10, .18);
}
.field input::placeholder { color: #8a7458; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: right 17px center, right 11px center;
  background-size: 6px 6px; background-repeat: no-repeat;
  background-color: var(--cream-hi);
}

.rocker {
  height: 44px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(180deg, #4b311d, #24150b);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .82rem;
  box-shadow: 0 3px 0 #0c0603;
  white-space: nowrap;
}
.rocker-led {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4a2e18; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}
.rocker[aria-pressed="true"] {
  background: linear-gradient(180deg, #ffcf73, var(--amber));
  color: var(--ink);
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0c0603, inset 0 2px 4px rgba(120, 60, 0, .4);
}
.rocker[aria-pressed="true"] .rocker-led { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- presets ---------- */
.presets { display: flex; flex-direction: column; min-height: 0; }
.presets-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.presets-head .plate-title { margin: 0; text-align: left; padding-left: 10px; }
.pcount { font-family: var(--mono); letter-spacing: 0; font-weight: 400; color: var(--ink); margin-left: 6px; }
.sound {
  border: 1.5px solid var(--ink-soft);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  margin-right: 10px;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--ink);
  min-height: 30px;
}
.sound[aria-pressed="true"] { background: var(--ink); color: var(--amber); }

.preset-keys {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.pkey {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  border: 0;
  font-family: var(--mono);
  line-height: 1.1;
}
.pkey.empty {
  background: linear-gradient(180deg, #d8c6a0, #c9b48b);
  color: #7a6446;
  box-shadow: inset 0 2px 4px rgba(60, 35, 10, .25);
}
.pkey.filled {
  background: linear-gradient(180deg, #3e2817, #1d1109);
  color: var(--cream);
  box-shadow: 0 3px 0 #0c0603, inset 0 -3px 0 var(--c);
}
.pkey.filled:hover { transform: translateY(1px); box-shadow: 0 2px 0 #0c0603, inset 0 -3px 0 var(--c); }
.pk-n { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.pkey.filled .pk-n { color: var(--c); }
.pk-f { font-size: .66rem; }

.preset-log-wrap {
  margin-top: 12px;
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  border-top: 2px dashed rgba(43, 29, 18, .3);
  padding-top: 10px;
}
.log-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.preset-log { display: grid; gap: 6px; }
.preset-log li { border-left: 4px solid var(--cd, var(--ink-soft)); padding-left: 8px; }
.log-empty { font-size: .86rem; color: var(--ink-soft); border: 0 !important; padding: 0 !important; }
.log-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 8px;
  width: 100%;
  text-align: left;
  border: 0; background: transparent;
  padding: 3px 2px;
  border-radius: 4px;
  color: var(--ink);
}
.log-row:hover .log-t { text-decoration: underline; }
.log-p { font-family: var(--display); font-weight: 700; color: var(--cd); grid-row: span 2; font-size: 1rem; }
.log-when { font-family: var(--mono); font-size: .7rem; color: var(--ink-soft); }
.log-t { font-size: .88rem; line-height: 1.25; }
.clash {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  color: #9b2414;
  margin-top: 2px;
  padding-left: 2px;
}
.clash::before { content: "≈ "; }

/* ---------- the dial (glass) ---------- */
.dial-wrap {
  --static: .3;
  position: relative;
  min-height: 0;
  border-radius: 18px;
  background: #0b0603;
  box-shadow:
    0 0 0 3px #1a0e06,
    0 0 0 6px var(--brass),
    0 0 0 9px #1a0e06,
    0 18px 40px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.dial {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
  scrollbar-width: thin;
  scrollbar-color: #5a3a1c transparent;
  background:
    radial-gradient(120% 60% at 50% 50%, rgba(255, 170, 60, .16), transparent 70%),
    linear-gradient(90deg, #120a04, var(--glass) 30%, var(--glass) 70%, #120a04);
}
.dial:focus-visible { outline: 3px solid var(--amber-hot); outline-offset: -5px; }
.dial-inner {
  position: relative;
  /* the tick rail scrolls with the stations */
  background:
    repeating-linear-gradient(180deg, rgba(255, 181, 71, .75) 0 2px, transparent 2px 60px) 0 0 / 26px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(255, 181, 71, .4) 0 1px, transparent 1px 12px) 0 0 / 14px 100% no-repeat;
}
.dial-inner::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 30px;
  width: 1px; background: rgba(255, 181, 71, .25);
}
.spacer { height: var(--half, 40vh); }

.stations { padding: 0 14px 0 0; }

.daymark {
  padding: 22px 0 8px 44px;
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .82rem;
  color: var(--amber);
  border-bottom: 1px dashed rgba(255, 181, 71, .35);
  margin-bottom: 10px;
}
.signoff {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 130px;
  margin: 10px 0 0 40px;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #b49c74;
  background: repeating-linear-gradient(180deg, transparent 0 6px, rgba(255, 181, 71, .05) 6px 7px);
  border-radius: 8px;
}
.moon { font-size: 1.6rem; color: var(--amber-hot); letter-spacing: 0; }

.gap {
  height: var(--gap, 24px);
  display: flex; align-items: center;
  padding-left: 48px;
  font-family: var(--mono);
  font-size: .7rem;
  color: #a68e69;
  letter-spacing: .04em;
}
.gap.crosstalk { color: #ff9a7f; }

.station {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0 14px;
  padding: 14px 14px 14px 44px;
  border-radius: 8px;
  scroll-snap-align: center;
  cursor: pointer;
  transition: background-color .25s, box-shadow .25s;
}
.station::before {
  /* the station's mark on the tick rail */
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 34px; height: 3px; margin-top: -1px;
  background: var(--c);
  opacity: .7;
}
.st-freq { display: flex; flex-direction: column; padding-top: 2px; }
.mhz {
  font-family: var(--mono);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--c);
  font-variant-numeric: tabular-nums;
}
.st-time {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--amber-dim);
  letter-spacing: .06em;
}
.st-band {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--display);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--c);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.st-title {
  margin-top: 3px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  line-height: 1.22;
  color: #d9c7a3;
  transition: color .25s, text-shadow .25s;
}
.st-title mark { background: rgba(255, 74, 46, .35); color: inherit; border-radius: 2px; padding: 0 1px; }
.st-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: .76rem;
  color: #bca784;
}
.st-meta strong { color: var(--cream); font-weight: 400; }
.st-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.listen {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  transition: background-color .2s, color .2s;
}
.listen:hover { background: rgba(255, 181, 71, .15); }
.st-preset {
  font-family: var(--mono);
  font-size: .7rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
}
.st-preset::before { content: "★ "; color: #9b2414; }

.station.locked {
  background: linear-gradient(90deg, rgba(255, 181, 71, .18), rgba(255, 181, 71, .05) 60%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 181, 71, .35);
}
.station.locked::before { opacity: 1; box-shadow: 0 0 8px var(--c); }
.station.locked .st-title { color: var(--amber-hot); text-shadow: 0 0 14px rgba(255, 181, 71, .5); }
.station.locked .listen { background: var(--amber); color: #1b1006; }

/* needle + static overlays (never intercept the pointer) */
.needle {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 0;
  pointer-events: none;
  z-index: 3;
}
.needle::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -1px;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red), 0 0 24px rgba(255, 74, 46, .5);
  opacity: .9;
}
.needle span {
  position: absolute; left: 0; top: -9px;
  border-left: 14px solid var(--red);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  filter: drop-shadow(0 0 6px var(--red));
}
.needle::after {
  content: "";
  position: absolute; right: 0; top: -9px;
  border-right: 14px solid var(--red);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.static {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: var(--static);
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 .8 0 0 0 0 .55 0 0 0 1.6 -.55'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: hiss .35s steps(4) infinite;
  transition: opacity .2s;
}
@keyframes hiss {
  0% { background-position: 0 0; }
  25% { background-position: -40px 30px; }
  50% { background-position: 60px -20px; }
  75% { background-position: -20px -50px; }
  100% { background-position: 0 0; }
}
.dial-count {
  position: absolute; right: 14px; top: 10px; z-index: 4;
  pointer-events: none;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--amber);
  background: rgba(12, 7, 3, .85);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 181, 71, .3);
}

.empty {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(86%, 360px);
  text-align: center;
  padding: 24px 20px;
  border-radius: 12px;
  background: rgba(12, 7, 3, .92);
  border: 1px solid rgba(255, 181, 71, .4);
}
.empty-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
  text-shadow: 0 0 16px rgba(255, 74, 46, .5);
}
.empty-msg { margin: 6px 0 16px; color: var(--cream); font-size: .95rem; }
.dial-wrap.is-empty .needle::before { animation: flatline 1.4s ease-in-out infinite; }
@keyframes flatline { 50% { opacity: .25; } }

.btn-amber {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--amber);
  color: #1b1006;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
}

/* ---------- speaker ---------- */
.speaker {
  min-height: 0;
  overflow-y: auto;
  border-radius: 18px;
  padding: 22px;
  background:
    radial-gradient(circle, rgba(0, 0, 0, .5) 0 1.6px, transparent 2.2px) 0 0 / 8px 8px,
    radial-gradient(130% 90% at 50% 30%, #5a3820, #2e1a0d);
  box-shadow:
    0 0 0 3px #1a0e06,
    0 0 0 6px var(--brass),
    0 0 0 9px #1a0e06,
    0 18px 40px rgba(0, 0, 0, .55),
    inset 0 0 60px rgba(0, 0, 0, .55);
}
.idle { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.cone {
  position: relative;
  width: 200px; height: 200px;
  border-radius: 50%;
  margin: 6px 0 8px;
  display: grid; place-items: center;
  background:
    radial-gradient(circle, #2b1a0d 0 22%, #4b2f19 23% 24%, #241509 25% 46%, #3d2614 47% 48%, #1d1108 49% 70%, #3a2412 71% 72%, transparent 73%);
  box-shadow: 0 0 0 2px rgba(196, 154, 90, .5), inset 0 0 30px rgba(0, 0, 0, .6);
}
.cone::before, .cone::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 181, 71, .35);
  animation: ripple 3.2s ease-out infinite;
}
.cone::after { animation-delay: 1.6s; }
@keyframes ripple {
  0% { transform: scale(.9); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.cone span {
  font-family: var(--display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .2em;
  line-height: 1.1;
  color: var(--amber);
}
.idle-line {
  font-family: var(--display);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--cream);
}
.idle-sub { max-width: 34ch; color: #e6d6b6; font-size: .98rem; }
.idle-sub strong { color: var(--amber); }

/* program guide */
.guide {
  margin-top: 18px;
  width: 100%;
  text-align: left;
  background: var(--cream);
  color: var(--ink);
  border-radius: 10px;
  padding: 14px 16px 26px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.guide-title {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--display);
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .24em;
  margin-bottom: 10px;
}
.guide-title span { font-family: var(--mono); font-weight: 400; letter-spacing: 0; font-size: .72rem; color: var(--ink-soft); }
.g-day { display: grid; grid-template-columns: 46px 1fr; gap: 8px; align-items: start; margin-bottom: 8px; }
.g-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding-top: 6px;
}
.g-track {
  position: relative;
  height: calc(var(--lanes) * 30px + 4px);
  background:
    repeating-linear-gradient(90deg, rgba(43, 29, 18, .18) 0 1px, transparent 1px calc(100% / 13));
  border-bottom: 1px solid rgba(43, 29, 18, .3);
}
.g-bar {
  position: absolute;
  top: calc(var(--lane) * 30px + 2px);
  height: 26px;
  min-width: 34px;
  border: 0;
  border-radius: 4px;
  background: var(--cd);
  color: #fff8e8;
  font-family: var(--mono);
  font-size: .68rem;
  padding: 0 4px;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.g-bar span { color: var(--amber-hot); margin-right: 2px; }
.g-bar.faded { opacity: .35; }
.g-bar.saved { box-shadow: 0 0 0 2px var(--ink), 0 2px 0 rgba(0, 0, 0, .25); }
.g-bar:hover { filter: brightness(1.15); }
.g-axis { position: relative; margin-left: 54px; height: 14px; }
.g-axis span {
  position: absolute; top: 2px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--ink-soft);
}

/* on-air broadcast card */
.broadcast {
  background: linear-gradient(180deg, var(--cream-hi), var(--cream));
  color: var(--ink);
  border-radius: 12px;
  padding: 18px 22px 22px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5), inset 0 6px 0 var(--cd);
  animation: tunein .35s ease-out;
}
@keyframes tunein {
  0% { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  100% { opacity: 1; transform: none; filter: none; }
}
.bc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.onair {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #1a0e06;
  color: var(--red);
  font-family: var(--display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.lamp { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: led 1.2s ease-in-out infinite; }
.bc-freq { font-family: var(--mono); font-size: .82rem; color: var(--cd); }
.bc-close {
  margin-left: auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.bc-close:hover { background: var(--ink); color: var(--cream); }
.bc-title {
  margin: 14px 0 14px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.bc-title:focus { outline: none; }
.bc-title:focus-visible { outline: 3px solid #1a0f06; outline-offset: 4px; }
.bc-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.bc-specs > div { padding: 9px 10px 9px 0; border-bottom: 1px dashed rgba(43, 29, 18, .3); }
.bc-specs > div:nth-child(odd) { border-right: 1px dashed rgba(43, 29, 18, .3); }
.bc-specs > div:nth-child(even) { padding-left: 12px; }
.bc-specs > div:nth-last-child(-n+2) { border-bottom: 0; }
.bc-specs dt {
  font-family: var(--display);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--ink-soft);
}
.bc-specs dd { font-family: var(--mono); font-size: .86rem; line-height: 1.4; }
.bc-body { margin-top: 16px; }
.bc-body .lede { font-size: 1.12rem; line-height: 1.5; }
.bc-body .note { font-size: .98rem; }
.bc-sub {
  margin: 14px 0 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--cd);
}
.bc-cross {
  margin-top: 14px;
  padding: 2px 12px 10px;
  border-left: 4px solid #9b2414;
  background: rgba(155, 36, 20, .06);
  font-size: .92rem;
}
.bc-cross .bc-sub { color: #9b2414; }
.bc-cross.clear { border-left-color: #2f6a1f; background: rgba(47, 106, 31, .06); }
.bc-cross.clear .bc-sub { color: #2f6a1f; }
.bc-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px;
  padding: 0 18px 0 6px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(180deg, #3e2817, #1d1109);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 500;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  box-shadow: 0 4px 0 #0c0603;
}
.store:active { transform: translateY(3px); box-shadow: 0 1px 0 #0c0603; }
.store-key {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 6px;
  background: #2b1a0d;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 1.1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6);
}
.store[aria-pressed="true"] { background: linear-gradient(180deg, #ffcf73, var(--amber)); color: var(--ink); }
.store[aria-pressed="true"] .store-key { background: var(--ink); color: var(--amber-hot); }
.store-note { font-size: .86rem; color: var(--ink-soft); max-width: 30ch; }

/* ---------- mid widths ---------- */
@media (max-width: 1180px) and (min-width: 900px) {
  .receiver { grid-template-columns: 290px minmax(0, 1fr) minmax(0, 1fr); }
  .tagline span { display: none; }
  .station { grid-template-columns: 64px minmax(0, 1fr); }
  .mhz { font-size: 1.3rem; }
}

/* ---------- phones & narrow ---------- */
@media (max-width: 899px) {
  body { background-attachment: scroll; }
  .cabinet { padding: 10px 10px 8px; gap: 14px; min-height: 0; }
  .brandbar { flex-wrap: wrap; gap: 4px 12px; padding: 2px 4px; }
  .logo { font-size: 1.7rem; }
  .logo-waves { width: 36px; height: 24px; }
  .tagline { order: 3; flex-basis: 100%; font-size: .74rem; letter-spacing: .08em; }
  .tagline span { display: none; }
  .onband { font-size: .72rem; }

  .receiver {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    gap: 18px;
  }
  .controls { order: 1; padding: 14px 14px 16px; }
  .dial-wrap { order: 2; height: 66vh; min-height: 440px; margin: 4px 4px; }
  .presets { order: 3; }
  .speaker { order: 4; display: none; }

  .controls .plate-title { margin-bottom: 8px; }
  .freq { font-size: 2.2rem; }
  .tuned { max-width: 230px; }
  .knobrow { grid-template-columns: auto auto auto 1fr; margin: 12px 0 10px; }
  .knob { width: 52px; height: 52px; }
  .knob-hint { font-size: .68rem; }
  .field-row { grid-template-columns: minmax(0, 1fr) auto; }

  .station { grid-template-columns: 1fr; padding: 12px 10px 14px 40px; gap: 2px; }
  .st-freq { flex-direction: row; align-items: baseline; gap: 10px; padding: 0; }
  .mhz { font-size: 1.3rem; }
  .st-time { margin: 0; }
  .station::before { width: 30px; }
  .gap { padding-left: 40px; font-size: .66rem; }
  .daymark { padding-left: 40px; }
  .signoff { margin-left: 36px; height: 110px; text-align: center; }
  .stations { padding-right: 8px; }
  .dial-count { top: 8px; right: 10px; }

  .speaker.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    border-radius: 0;
    padding: 12px 10px 28px;
    overscroll-behavior: contain;
  }
  .broadcast { padding: 14px 16px 20px; }
  .bc-title { font-size: 1.65rem; }
  .bc-specs { grid-template-columns: 1fr; }
  .bc-specs > div, .bc-specs > div:nth-child(even) { padding: 8px 0; border-right: 0 !important; border-bottom: 1px dashed rgba(43, 29, 18, .3); }
  .bc-specs > div:last-child { border-bottom: 0; }
  .bc-actions { flex-direction: column; align-items: stretch; }
  .store { justify-content: flex-start; }
}

@media (max-width: 360px) {
  .field-row { grid-template-columns: 1fr; }
  .knob-hint { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .static { animation: none; }
  .cone::before, .cone::after { animation: none; opacity: .4; transform: scale(1.1); }
}
