/* Basstion FM - radio receiver layer. Loaded after app.css + gold.css.
   Scoped to .rd-* so it can't leak into the rest of the site. Removing the
   <link> + <script> and the #pg-radio section reverts everything. */

:root {
  --rd-gold: #f5c518;
  --rd-pink: #ec4899;
  --rd-purple: #a855f7;
  --rd-case: #14101f;
  --rd-panel: #0c0913;
  --rd-scale-h: 132px;      /* высота шкалы: по ней же центрируется ручка */
}

/* ===== корпус приёмника ===== */
.rd-set {
  position: relative;
  width: 100%;              /* ширину задаёт контейнер страницы, а не сам корпус */
  margin: 0 auto;
  padding: 34px 34px 30px;
  border-radius: 30px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(245,197,24,.10), transparent 60%),
    linear-gradient(165deg, #1b1428, var(--rd-case) 55%, #0a0810);
  border: 1px solid rgba(245,197,24,.28);
  box-shadow:
    0 30px 70px -30px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 0 60px rgba(168,85,247,.05);
}
/* винты по углам - мелочь, которая делает из блока «прибор» */
.rd-set::before, .rd-set::after {
  content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6b6252, #211d16);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), inset 0 -1px 1px rgba(255,255,255,.15);
}
.rd-set::before { top: 13px; left: 13px; }
.rd-set::after  { top: 13px; right: 13px; }

.rd-off .rd-dim { opacity: .25; filter: grayscale(.8); pointer-events: none; }
.rd-dim { transition: opacity .35s ease, filter .35s ease; }

/* ===== верхняя панель: табло + станция ===== */
.rd-top {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 20px 24px; margin-bottom: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.3));
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 2px 14px rgba(0,0,0,.6);
}
.rd-freq {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(32px, 6vw, 58px); font-weight: 700; line-height: 1;
  color: var(--rd-gold); letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(245,197,24,.55), 0 0 46px rgba(245,197,24,.22);
  font-variant-numeric: tabular-nums;
}
.rd-freq small { font-size: .38em; opacity: .65; margin-left: 6px; letter-spacing: .2em; }
.rd-meta { flex: 1; min-width: 150px; }
.rd-station-name {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800; font-size: clamp(18px, 3vw, 28px); line-height: 1.15;
  background: linear-gradient(100deg, #fff, var(--rd-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rd-station-desc { font-size: 13px; color: rgba(255,255,255,.45); margin-top: 5px; }

/* индикаторы */
.rd-leds { display: flex; gap: 8px; align-items: center; }
.rd-led {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em;
  padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.3); background: rgba(0,0,0,.4); transition: all .25s;
}
.rd-led.on {
  color: #0a0810; background: var(--rd-gold); border-color: var(--rd-gold);
  box-shadow: 0 0 14px rgba(245,197,24,.5);
}
.rd-led.live-on {
  color: #fff; background: #e11d48; border-color: #e11d48;
  box-shadow: 0 0 14px rgba(225,29,72,.6); animation: rd-blink 1.6s infinite;
}
@keyframes rd-blink { 50% { opacity: .45; } }

/* часы на табло - есть на любой магнитоле, стоят почти ничего */
.rd-clock {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700;
  letter-spacing: .1em; color: rgba(245,197,24,.75); padding: 4px 9px;
  border-radius: 6px; background: rgba(0,0,0,.45); border: 1px solid rgba(245,197,24,.2);
  font-variant-numeric: tabular-nums;
}

/* ===== шкала настройки ===== */
.rd-tuner { position: relative; margin-bottom: 24px; }
.rd-tuner-row { display: flex; gap: 18px; align-items: flex-start; }
.rd-tuner-main { flex: 1; min-width: 0; }

/* ручка настройки: крутится синхронно со шкалой, её саму тоже можно вращать.
   Колонка ростом ровно со шкалу — иначе подпись TUNE тянет блок вниз и центр
   ручки уезжает выше центра шкалы (было -18px). */
.rd-knob-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; height: var(--rd-scale-h);
}
.rd-knob {
  position: relative; width: 96px; height: 96px; border-radius: 50%; cursor: grab;
  touch-action: none; user-select: none;
  background:
    repeating-conic-gradient(from 0deg, rgba(255,255,255,.07) 0deg 3deg, transparent 3deg 9deg),
    radial-gradient(circle at 38% 32%, #3a3346, #1a1622 60%, #0d0b12);
  box-shadow:
    0 10px 26px -10px rgba(0,0,0,.95),
    inset 0 0 0 1px rgba(255,255,255,.07),
    inset 0 -6px 14px rgba(0,0,0,.6);
}
.rd-knob:active { cursor: grabbing; }
.rd-knob::after {          /* утопленный центр */
  content: ''; position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #2c2637, #14111c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.5);
}
.rd-knob i {               /* риска положения */
  position: absolute; left: 50%; top: 7px; width: 3px; height: 22px; margin-left: -1.5px;
  border-radius: 2px; background: var(--rd-gold);
  box-shadow: 0 0 9px rgba(245,197,24,.8); z-index: 2;
}
/* подпись вне потока: иначе она входит в расчёт центра и поднимает круг */
.rd-knob-cap {
  position: absolute; left: 0; right: 0; bottom: 6px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .22em;
  color: rgba(255,255,255,.3); pointer-events: none;
}

/* пресеты - тычок вместо поиска */
.rd-presets { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rd-preset {
  flex: 1; min-width: 74px; padding: 8px 6px 7px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 0 rgba(0,0,0,.4);
  transition: transform .1s, background .2s, border-color .2s;
  text-align: center;
}
.rd-preset:hover { background: rgba(255,255,255,.11); border-color: rgba(245,197,24,.3); }
.rd-preset:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.rd-preset.current {
  background: linear-gradient(180deg, rgba(245,197,24,.22), rgba(245,197,24,.08));
  border-color: rgba(245,197,24,.5);
}
.rd-preset b {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 9px;
  color: rgba(255,255,255,.35); letter-spacing: .1em;
}
.rd-preset span {
  display: block; font-size: 11px; font-weight: 800; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rd-preset.current span { color: var(--rd-gold); }

/* ===== решётка динамика + шильдик ===== */
.rd-grille {
  position: relative; margin-top: 22px; height: 54px; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,.07) 1.1px, transparent 1.4px) 0 0 / 7px 7px,
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15));
  border: 1px solid rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
}
.rd-plate {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .28em;
  color: rgba(245,197,24,.32); text-transform: uppercase;
  padding: 5px 14px; border-radius: 6px;
  background: rgba(0,0,0,.5); border: 1px solid rgba(245,197,24,.12);
  text-shadow: 0 1px 0 rgba(0,0,0,.8);
}

/* тембр */
.rd-tone { display: flex; gap: 16px; align-items: center; margin-left: 12px; }
.rd-tone-item { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.rd-tone-item span {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .14em; color: rgba(255,255,255,.35);
}
.rd-tone-item input[type=range] {
  -webkit-appearance: none; appearance: none; width: 74px; height: 4px; padding: 0;
  border-radius: 3px; outline: none; background: rgba(255,255,255,.16);
}
.rd-tone-item input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--rd-gold); cursor: pointer; border: none;
  box-shadow: 0 0 8px rgba(245,197,24,.55);
}
.rd-tone-item input[type=range]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; border: none;
  background: var(--rd-gold); cursor: pointer; box-shadow: 0 0 8px rgba(245,197,24,.55);
}

/* прогрев ламп: шкала и табло разгораются, а не вспыхивают */
.rd-warmup .rd-scale, .rd-warmup .rd-top { animation: rd-warm 1.1s ease-out; }
@keyframes rd-warm {
  0%   { filter: brightness(.25) saturate(.4); }
  55%  { filter: brightness(1.15) saturate(1.1); }
  100% { filter: none; }
}
.rd-scale {
  position: relative; height: var(--rd-scale-h); border-radius: 16px; overflow: hidden;
  cursor: grab; touch-action: none; user-select: none;
  background:
    linear-gradient(180deg, rgba(245,197,24,.05), transparent 40%),
    linear-gradient(180deg, #0a0812, #120d1c);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 4px 20px rgba(0,0,0,.75);
}
.rd-scale:active { cursor: grabbing; }
/* деления: частые мелкие + редкие крупные */
.rd-ticks {
  position: absolute; inset: auto 0 0 0; height: 46px;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.30) 0 1px, transparent 1px var(--rd-tick-major)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.13) 0 1px, transparent 1px var(--rd-tick-minor));
  background-size: 100% 24px, 100% 13px;
  background-position: bottom left, bottom left;
  background-repeat: repeat-x;
}
/* подписи станций на шкале */
.rd-mark {
  position: absolute; top: 16px; transform: translateX(-50%);
  text-align: center; pointer-events: none; transition: opacity .2s, color .2s;
}
.rd-mark b {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: .1em; color: rgba(255,255,255,.42); white-space: nowrap;
}
.rd-mark i {
  display: block; width: 2px; height: 18px; margin: 6px auto 0;
  background: rgba(255,255,255,.3); border-radius: 1px;
}
.rd-mark.near b { color: var(--rd-gold); text-shadow: 0 0 12px rgba(245,197,24,.6); }
.rd-mark.near i { background: var(--rd-gold); box-shadow: 0 0 10px rgba(245,197,24,.8); }
.rd-mark.is-live b { color: #ff4d6d; }
.rd-mark.is-live i { background: #ff4d6d; }

/* риска-указатель */
.rd-needle {
  position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, #ff4d6d, #ff8fa3);
  box-shadow: 0 0 12px rgba(255,77,109,.9), 0 0 30px rgba(255,77,109,.45);
  pointer-events: none; z-index: 3;
}
.rd-needle::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 8px solid #ff4d6d;
}
/* «свечение захвата» - тем ярче, чем чище сигнал */
.rd-glow {
  position: absolute; top: 0; bottom: 0; width: 130px; margin-left: -65px;
  background: radial-gradient(50% 60% at 50% 50%, rgba(245,197,24,.22), transparent 70%);
  pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 2;
}

/* ползунок под шкалой (мобильный запасной ход) */
.rd-range { width: 100%; margin-top: 10px; }
input[type=range].rd-range {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(245,197,24,.5), rgba(168,85,247,.5));
  outline: none; padding: 0;
}
input[type=range].rd-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%; cursor: pointer;
  background: var(--rd-gold); border: 2px solid #0a0810;
  box-shadow: 0 0 10px rgba(245,197,24,.7);
}
input[type=range].rd-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; cursor: pointer; border: 2px solid #0a0810;
  background: var(--rd-gold); box-shadow: 0 0 10px rgba(245,197,24,.7);
}

/* ===== средний блок: винил + трек ===== */
.rd-deck { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }

.rd-vinyl {
  position: relative; width: 156px; height: 156px; border-radius: 50%; flex-shrink: 0;
  background:
    repeating-radial-gradient(circle at 50% 50%, #17151c 0 2px, #0d0c11 2px 4px),
    radial-gradient(circle at 50% 50%, #1a1820, #08070b);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.9), inset 0 0 0 1px rgba(255,255,255,.05);
  animation: rd-spin 3.4s linear infinite; animation-play-state: paused;
}
.rd-playing .rd-vinyl { animation-play-state: running; }
@keyframes rd-spin { to { transform: rotate(360deg); } }
.rd-vinyl::after { /* блик */
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.09) 50%, transparent 60%);
}
/* обложка печатается прямо на пластинке: дорожки и затемнение идут ПОВЕРХ картинки,
   иначе на деке лежит не винил, а круглая фотография */
.rd-cover {
  position: absolute; inset: 0; border-radius: 50%;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .35s ease;
}
.rd-cover.on { opacity: .92; }
.rd-cover::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,.34) 0 2px, rgba(0,0,0,0) 2px 4px),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.55) 0 21%, rgba(0,0,0,0) 44%);
}

.rd-label {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  z-index: 2;
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 20px; color: #14100a;
  background: radial-gradient(circle at 40% 35%, #ffe27a, var(--rd-gold) 60%, #b8930f);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.rd-label::after { /* дырка */
  content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: #08070b; box-shadow: inset 0 0 2px rgba(0,0,0,.9);
}

.rd-now { flex: 1; min-width: 240px; }
.rd-now-title {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800; font-size: clamp(19px, 3vw, 30px); line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rd-now-author { font-size: 15px; color: rgba(255,255,255,.5); margin-top: 6px; }
.rd-now-badges { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.rd-badge {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
}
.rd-badge.score { background: rgba(245,197,24,.14); border-color: rgba(245,197,24,.35); color: var(--rd-gold); }

/* прогресс */
.rd-progress {
  position: relative; height: 4px; border-radius: 3px; margin-top: 14px;
  background: rgba(255,255,255,.09); overflow: hidden; cursor: pointer;
}
.rd-progress-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--rd-gold), var(--rd-pink));
  box-shadow: 0 0 10px rgba(245,197,24,.5);
}
.rd-time {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(255,255,255,.4);
}

/* ===== приборы: VU + спектр ===== */
.rd-gauges { display: flex; gap: 18px; align-items: stretch; margin-top: 24px; flex-wrap: wrap; }
.rd-vu, .rd-spectrum {
  border-radius: 14px; border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.25));
  box-shadow: inset 0 2px 12px rgba(0,0,0,.6);
}
.rd-vu { width: 230px; height: 118px; flex-shrink: 0; }
.rd-spectrum { flex: 1; min-width: 220px; height: 118px; }
.rd-vu canvas, .rd-spectrum canvas { display: block; width: 100%; height: 100%; }

/* ===== кнопки ===== */
.rd-controls { display: flex; gap: 12px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.rd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 14px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.11);
  transition: transform .12s, background .2s, border-color .2s, color .2s;
}
.rd-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(245,197,24,.35); }
.rd-btn:active { transform: scale(.96); }
.rd-btn.round { width: 50px; padding: 0; font-size: 16px; }
.rd-btn.power {
  color: var(--rd-gold); border-color: rgba(245,197,24,.4); background: rgba(245,197,24,.1);
}
.rd-on .rd-btn.power {
  color: #14100a; background: var(--rd-gold); border-color: var(--rd-gold);
  box-shadow: 0 0 22px rgba(245,197,24,.45);
}
.rd-btn.play {
  width: 64px; height: 64px; padding: 0; border-radius: 50%; font-size: 21px;
  color: #14100a; background: radial-gradient(circle at 40% 30%, #ffe27a, var(--rd-gold));
  border: none; box-shadow: 0 8px 22px -8px rgba(245,197,24,.8);
}
.rd-vol { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* динамик - настоящая кнопка: гасит звук и помнит прежний уровень */
.rd-mute {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; background: transparent; border: none;
  color: rgba(255,255,255,.45); transition: background .2s, transform .12s, opacity .2s;
}
.rd-mute:hover { background: rgba(255,255,255,.08); color: #fff; }
.rd-mute:active { transform: scale(.9); }
.rd-mute.off { opacity: .5; }
.rd-vol input[type=range] { width: 96px; }
input[type=range].rd-volume {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px; padding: 0;
  background: rgba(255,255,255,.16); outline: none;
}
input[type=range].rd-volume::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; cursor: pointer; border: none;
}
input[type=range].rd-volume::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; background: #fff; cursor: pointer; border: none;
}

/* ===== легенда волн: что вообще ловится на шкале ===== */
.rd-legend { margin-top: 22px; }
.rd-legend-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}
.rd-wave {
  display: flex; align-items: center; gap: 14px; padding: 15px 17px;
  border-radius: 16px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07);
  transition: background .18s, border-color .18s, transform .12s;
}
.rd-wave:hover { background: rgba(255,255,255,.07); border-color: rgba(245,197,24,.3); }
.rd-wave:active { transform: scale(.985); }
.rd-wave.current { background: rgba(245,197,24,.1); border-color: rgba(245,197,24,.42); }
.rd-wave-freq {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  color: var(--rd-gold); flex-shrink: 0; width: 46px;
  font-variant-numeric: tabular-nums;
}
.rd-wave-body { min-width: 0; flex: 1; }
.rd-wave-name {
  font-weight: 800; font-size: 12.5px; letter-spacing: .04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* описание переносим, а не обрезаем многоточием - «Лучшее по оценк…» читается как баг */
.rd-wave-desc {
  font-size: 11px; color: rgba(255,255,255,.42); margin-top: 2px; line-height: 1.35;
}
.rd-wave-count {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: rgba(255,255,255,.3); flex-shrink: 0;
}
.rd-wave.is-live .rd-wave-freq { color: #ff4d6d; }
.rd-note {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(168,85,247,.07); border: 1px solid rgba(168,85,247,.16);
  font-size: 12px; line-height: 1.55; color: rgba(255,255,255,.55);
}
.rd-note b { color: rgba(255,255,255,.8); }

/* ===== список волны ===== */
.rd-list { margin-top: 26px; }
.rd-list-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.35);
}
.rd-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border-radius: 14px; cursor: pointer; transition: background .18s, border-color .18s;
  border: 1px solid transparent;
}
.rd-item:hover { background: rgba(255,255,255,.05); }
.rd-item.current {
  background: rgba(245,197,24,.09); border-color: rgba(245,197,24,.3);
}
.rd-item-num {
  width: 22px; flex-shrink: 0; text-align: right;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,.3);
}
.rd-item.current .rd-item-num { color: var(--rd-gold); }
.rd-item-cover {
  width: 34px; height: 34px; border-radius: 7px; flex-shrink: 0;
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.rd-item-main { flex: 1; min-width: 0; }
.rd-item-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-item-author { font-size: 12px; color: rgba(255,255,255,.42); margin-top: 2px; }
.rd-item-score {
  font-family: 'JetBrains Mono', monospace; font-size: 13.5px; font-weight: 700;
  color: var(--rd-gold); flex-shrink: 0;
}

/* ===== LIVE-волна: врезка Twitch ===== */
.rd-live-box { margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(225,29,72,.4); }
.rd-live-box iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }

/* ===== пустые состояния ===== */
.rd-empty {
  padding: 22px; text-align: center; border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.14); color: rgba(255,255,255,.45); font-size: 13px;
}

/* подсказка по управлению */
.rd-hint {
  margin-top: 12px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .1em; color: rgba(255,255,255,.25);
}
.rd-hint kbd {
  padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.5);
}

/* ============================================================
   MODERN CLASSIC SKIN - под фото за окном: тёмное стекло, янтарь,
   тонкие линии. Классику оставляем там, где она несёт смысл:
   светящаяся шкала, ручка настройки, стрелочный VU.
   Откат: удалить блок - вернётся базовый неон-вариант.
   ============================================================ */

:root {
  --rd-amber: #ffb648;
  --rd-glass: rgba(18,16,22,.72);
  --rd-line: rgba(255,255,255,.09);
  --rd-cream: #f0e6d6;
}

/* корпус - плита тёмного стекла поверх фотографии */
.rd-set {
  background: linear-gradient(180deg, rgba(34,29,28,.72), rgba(12,10,14,.85));
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  box-shadow:
    0 50px 100px -40px rgba(0,0,0,.95),
    0 0 0 1px rgba(255,182,72,.05),
    inset 0 1px 0 rgba(255,255,255,.10);
}
.rd-set::before, .rd-set::after { display: none; }   /* винты не нужны: корпус не деревянный */

/* табло */
.rd-top {
  background: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.22));
  border: 1px solid var(--rd-line);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.rd-freq {
  color: var(--rd-amber); font-weight: 300; letter-spacing: -.01em;
  text-shadow: 0 0 26px rgba(255,182,72,.35);
}
.rd-freq small { font-weight: 500; opacity: .5; }
.rd-station-name {
  background: none; -webkit-background-clip: initial; background-clip: initial;
  color: var(--rd-cream); font-weight: 700;
}
.rd-station-desc { color: rgba(240,230,214,.42); }
.rd-clock {
  color: rgba(240,230,214,.55); background: rgba(255,255,255,.05);
  border-color: var(--rd-line); font-weight: 500;
}
.rd-led {
  border-color: var(--rd-line); color: rgba(240,230,214,.32);
  background: rgba(255,255,255,.04); font-weight: 500;
}
.rd-led.on {
  color: #17120a; background: var(--rd-amber); border-color: transparent;
  box-shadow: 0 0 18px rgba(255,182,72,.35);
}

/* шкала - подсвеченное тёплое стекло вместо бумажной подложки */
.rd-scale {
  background:
    radial-gradient(120% 130% at 50% 120%, rgba(255,170,70,.22), transparent 68%),
    linear-gradient(180deg, rgba(255,240,220,.07), rgba(0,0,0,.34));
  border: 1px solid rgba(255,182,72,.16);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -20px 40px rgba(255,150,50,.06);
}
.rd-ticks {
  background-image:
    repeating-linear-gradient(90deg, rgba(255,214,160,.45) 0 1px, transparent 1px var(--rd-tick-major)),
    repeating-linear-gradient(90deg, rgba(255,214,160,.16) 0 1px, transparent 1px var(--rd-tick-minor));
}
.rd-mark b { color: rgba(240,230,214,.4); font-weight: 500; text-shadow: none; }
.rd-mark i { background: rgba(240,230,214,.22); }
.rd-mark.near b { color: var(--rd-amber); text-shadow: 0 0 14px rgba(255,182,72,.5); }
.rd-mark.near i { background: var(--rd-amber); box-shadow: 0 0 10px rgba(255,182,72,.7); }
.rd-mark.is-live b { color: #ff5a4d; }
.rd-mark.is-live i { background: #ff5a4d; }
.rd-needle {
  width: 1px; margin-left: -.5px;
  background: linear-gradient(180deg, #fff, var(--rd-amber));
  box-shadow: 0 0 10px rgba(255,182,72,.9), 0 0 26px rgba(255,182,72,.45);
}
.rd-needle::before {
  border-left-width: 4px; border-right-width: 4px; border-top: 6px solid var(--rd-amber);
}
.rd-glow { background: radial-gradient(50% 60% at 50% 50%, rgba(255,182,72,.18), transparent 70%); }

/* ручка - графитовый диск с тонкой насечкой */
.rd-knob {
  background:
    repeating-conic-gradient(from 0deg, rgba(255,255,255,.05) 0deg 2deg, transparent 2deg 8deg),
    radial-gradient(circle at 36% 30%, #35323b, #1a181e 62%, #0e0d11);
  box-shadow:
    0 14px 30px -14px rgba(0,0,0,.9),
    inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 -8px 18px rgba(0,0,0,.5);
}
.rd-knob::after {
  inset: 26%;
  background: radial-gradient(circle at 40% 34%, #2a272f, #141317);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 8px rgba(0,0,0,.5);
}
.rd-knob i {
  width: 2px; height: 18px; top: 9px; background: var(--rd-amber);
  box-shadow: 0 0 10px rgba(255,182,72,.8);
}
.rd-knob-cap {
  font-family: 'JetBrains Mono', monospace; font-style: normal;
  letter-spacing: .3em; color: rgba(240,230,214,.28);
}

/* пресеты - стеклянные чипы вместо клавиш слоновой кости */
.rd-preset {
  background: rgba(255,255,255,.045);
  border: 1px solid var(--rd-line);
  border-radius: 12px;
  box-shadow: none;
}
.rd-preset:hover { background: rgba(255,255,255,.08); border-color: rgba(255,182,72,.28); }
.rd-preset:active { transform: translateY(1px); }
.rd-preset.current {
  background: rgba(255,182,72,.13);
  border-color: rgba(255,182,72,.42);
  box-shadow: 0 0 20px -6px rgba(255,182,72,.45);
}
.rd-preset b { color: rgba(240,230,214,.32); font-weight: 500; }
.rd-preset span { color: rgba(240,230,214,.8); }
.rd-preset.current span { color: var(--rd-amber); }

/* приборы */
.rd-vu, .rd-spectrum {
  background: linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.18));
  border: 1px solid var(--rd-line);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

/* пластинка и данные трека */
.rd-label { background: radial-gradient(circle at 40% 35%, #ffd08a, var(--rd-amber) 62%, #b9762a); }
.rd-now-title { color: #fff; font-weight: 700; }
.rd-now-author { color: rgba(240,230,214,.45); }
.rd-badge {
  background: rgba(255,255,255,.05); border-color: var(--rd-line);
  color: rgba(240,230,214,.7); font-weight: 500;
}
.rd-badge.score {
  background: rgba(255,182,72,.12); border-color: rgba(255,182,72,.32); color: var(--rd-amber);
}
.rd-progress { background: rgba(255,255,255,.08); height: 3px; }
.rd-progress-fill { background: var(--rd-amber); box-shadow: 0 0 12px rgba(255,182,72,.5); }
.rd-time { color: rgba(240,230,214,.35); }

/* кнопки - тонкие, без объёма */
.rd-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--rd-line);
  color: rgba(240,230,214,.85);
  border-radius: 14px;
  box-shadow: none;
}
.rd-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,182,72,.3); }
.rd-btn.power { color: var(--rd-amber); border-color: rgba(255,182,72,.35); background: rgba(255,182,72,.08); }
.rd-on .rd-btn.power {
  background: var(--rd-amber); color: #17120a; border-color: transparent;
  box-shadow: 0 0 26px -4px rgba(255,182,72,.55);
}
.rd-btn.play {
  background: var(--rd-amber); color: #17120a; border: none;
  box-shadow: 0 10px 30px -10px rgba(255,182,72,.7);
}
.rd-btn.play:hover { background: #ffc76b; }

input[type=range].rd-volume, .rd-tone-item input[type=range] { background: rgba(255,255,255,.12); }
input[type=range].rd-volume::-webkit-slider-thumb,
.rd-tone-item input[type=range]::-webkit-slider-thumb {
  background: var(--rd-amber); box-shadow: 0 0 10px rgba(255,182,72,.5);
}
input[type=range].rd-volume::-moz-range-thumb,
.rd-tone-item input[type=range]::-moz-range-thumb { background: var(--rd-amber); }
.rd-tone-item span { color: rgba(240,230,214,.35); letter-spacing: .18em; }
input[type=range].rd-range { background: rgba(255,255,255,.1); }
input[type=range].rd-range::-webkit-slider-thumb {
  background: var(--rd-amber); border-color: rgba(0,0,0,.6);
  box-shadow: 0 0 12px rgba(255,182,72,.6);
}
input[type=range].rd-range::-moz-range-thumb {
  background: var(--rd-amber); border-color: rgba(0,0,0,.6);
}

/* нижняя планка вместо тканевой решётки */
.rd-grille {
  height: 34px; border-radius: 0;
  background: none; border: none; border-top: 1px solid var(--rd-line);
  box-shadow: none;
}
.rd-plate {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .34em;
  color: rgba(240,230,214,.22); background: none; border: none;
  text-shadow: none; box-shadow: none; padding: 0;
}
.rd-hint { color: rgba(240,230,214,.25); }
.rd-hint kbd {
  border-color: var(--rd-line); background: rgba(255,255,255,.04); color: rgba(240,230,214,.45);
}

/* выключён - гаснет подсветка шкалы */
.rd-off .rd-scale { filter: brightness(.5) saturate(.6); }

/* ============================================================
   СЦЕНА: ночная комната, распахнутое окно, за ним крыши.
   Всё рисуется кодом - ни одной картинки. Подложка не ловит клики
   и гасится вместе со страницей (в OBS-оверлей не попадает).
   ============================================================ */
.rd-scene {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: #07060b;
}
#pg-radio { position: relative; }

/* Сцена лежит fixed на всём экране, поэтому накрывала подвал: он в обычном
   потоке и рисуется под позиционированным слоем. Поднимаем над фоном.
   NB: замер elementFromPoint это НЕ показывает - он проходит сквозь слои
   с pointer-events:none и «видит» футер, хотя визуально тот закрыт. */
/* у body висит pb-32 (128px) ради панели оценки - на радио её нет, а поверх
   фотографии этот отступ читался как полоса фона под подвалом */
body[data-page="radio"] { padding-bottom: 0; }

body[data-page="radio"] footer {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(6,4,10,.72), rgba(6,4,10,.92));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top-color: rgba(255,182,72,.18);
}

/* фото за стеклом: чуть крупнее кадра, чтобы параллакс не оголял края */
.rd-photo {
  position: absolute; inset: -3%;
  background: #05040a url('../img/city-night.jpg') center 40% / cover no-repeat;
  will-change: transform;
}
/* приглушаем фото под интерфейс: центр темнее, общий тон теплее */
.rd-photo-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(85% 65% at 50% 42%, rgba(4,3,8,.78) 0%, rgba(4,3,8,.45) 45%, transparent 78%),
    linear-gradient(180deg, rgba(4,3,8,.55) 0%, transparent 28%),
    linear-gradient(0deg, rgba(30,16,6,.35), rgba(30,16,6,.35));
}

/* тёплый свет комнаты слева + пыль в луче */
.rd-lamp {
  position: absolute; left: -6%; top: 8%; width: 55%; height: 80%;
  background: radial-gradient(closest-side, rgba(255,170,70,.16), transparent 72%);
  filter: blur(12px);
}
.rd-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(115% 85% at 50% 45%, transparent 42%, rgba(0,0,0,.72) 100%),
    linear-gradient(180deg, rgba(0,0,0,.5), transparent 30%);
}

/* приёмник на этом фоне: тень на подоконник и тёплый ореол */
#pg-radio .rd-set {
  box-shadow:
    0 44px 90px -30px rgba(0,0,0,.95),
    0 0 120px -20px rgba(255,150,50,.10),
    inset 0 1px 0 rgba(255,225,180,.14),
    inset 0 0 90px rgba(0,0,0,.55);
}

/* легенда и плейлист в той же тёплой гамме, а не в фиолетовой сайта */
#pg-radio .rd-wave {
  background: rgba(38,24,14,.62); border-color: rgba(201,154,78,.22);
  backdrop-filter: blur(6px);
}
#pg-radio .rd-wave:hover { background: rgba(58,36,20,.72); border-color: rgba(201,154,78,.5); }
#pg-radio .rd-wave.current { background: rgba(92,58,22,.6); border-color: rgba(255,182,72,.5); }
#pg-radio .rd-wave-freq { color: var(--rd-amber); }
#pg-radio .rd-wave-desc { color: rgba(239,220,180,.45); }
#pg-radio .rd-note {
  background: rgba(38,24,14,.6); border-color: rgba(201,154,78,.2);
  color: rgba(239,220,180,.6); backdrop-filter: blur(6px);
}
#pg-radio .rd-note b { color: rgba(255,225,180,.9); }
#pg-radio .rd-item:hover { background: rgba(255,200,130,.07); }
#pg-radio .rd-item.current { background: rgba(255,182,72,.12); border-color: rgba(255,182,72,.35); }
#pg-radio .rd-item-score { color: var(--rd-amber); }
#pg-radio .rd-list-head { color: rgba(239,220,180,.4); }
#pg-radio .rd-empty { border-color: rgba(201,154,78,.25); color: rgba(239,220,180,.45); }

/* заголовок вкладки под старую вывеску */
#pg-radio h2 {
  font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(255,150,50,.25);
}
#pg-radio h2 span { color: var(--rd-amber) !important; }
/* название длиннее прежнего «Басстион FM» - держим в одну строку на десктопе */
#pg-radio h2 { white-space: nowrap; }
@media (max-width: 560px) { #pg-radio h2 { white-space: normal; } }
#pg-radio .section-eyebrow { color: rgba(255,182,72,.65); }

/* у брата OBS-захват: лишние кадры дороже красоты */
@media (prefers-reduced-motion: reduce) {
  .rd-photo { transition: none; }
}

/* На узкой шкале семь подписей сливаются в кашу - оставляем штрихи, а имя
   станции проявляется при подъезде к ней (название всё равно есть на табло). */
@media (max-width: 760px) {
  .rd-mark b { opacity: 0; transition: opacity .2s; }
  .rd-mark.near b { opacity: 1; }
  .rd-mark i { height: 17px; background: rgba(255,255,255,.42); }
}

@media (max-width: 900px) {
  /* на узком экране фон почти не виден из-за корпуса - гасим его сильнее */
  .rd-photo-tint { background: rgba(4,3,8,.72); }
}

@media (max-width: 640px) {
  .rd-set { padding: 20px 14px 18px; border-radius: 20px; }
  .rd-knob { width: 72px; height: 72px; }
  .rd-tone { margin-left: 0; width: 100%; justify-content: space-between; }
  .rd-tone-item input[type=range] { width: 90px; }
  .rd-grille { height: 44px; }
  .rd-plate { font-size: 8px; letter-spacing: .18em; }
  .rd-vinyl { width: 88px; height: 88px; }
  .rd-vu { width: 100%; }
  .rd-vol { margin-left: 0; width: 100%; }
  .rd-vol input[type=range] { flex: 1; width: auto; }
}

/* у брата OBS-захват - лишние кадры дороже красоты */
@media (prefers-reduced-motion: reduce) {
  .rd-vinyl { animation: none; }
  .rd-led.live-on { animation: none; }
}
