/* ==========================================================================
   Soul Rhythms Radio UK — app styles
   Foundation: premium ink (deep violet-tinted charcoal, never pure black)
   Accents:    neon emerald #00ff88, royal violet #7a00ff, live crimson #ff1f45
   ========================================================================== */

/* ------------------------------------------------------------- tokens ---- */
:root {
  --emerald: #00ff88;
  --emerald-dim: #0bd473;
  --violet: #7a00ff;
  --violet-soft: #a95cff;
  --crimson: #ff1f45;
  --crimson-deep: #c70f31;

  --ink-900: #05060b;
  --ink-800: #080a11;
  --ink-700: #0c0f18;
  --ink-600: #12151f;
  --ink-500: #1a1e2b;

  --paper: #f4f6fb;
  --paper-dim: #b9c0d4;
  --paper-mute: #7d869e;

  --glass: rgba(18, 22, 34, 0.62);
  --glass-strong: rgba(12, 15, 24, 0.86);
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-emerald: rgba(0, 255, 136, 0.28);
  --hairline-violet: rgba(122, 0, 255, 0.34);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-deep: 0 32px 80px -32px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 18px 44px -24px rgba(0, 0, 0, 0.85);

  --font-display: 'Unbounded', 'Trebuchet MS', sans-serif;
  --font-body: 'Familjen Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --topbar-h: 68px;
  --sponsor-h: 46px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* --------------------------------------------------------------- reset ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: linear-gradient(168deg, #0a0617, var(--ink-900) 58%, #04050a);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

.srr-audio-element { display: none !important; }

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

/* ------------------------------------------------------------ ambience ---- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 6% -12%, rgba(122, 0, 255, 0.46), transparent 60%),
    radial-gradient(85% 65% at 98% 2%, rgba(0, 255, 136, 0.2), transparent 56%),
    radial-gradient(70% 60% at 86% 84%, rgba(255, 31, 69, 0.13), transparent 60%),
    radial-gradient(140% 120% at 48% 120%, rgba(122, 0, 255, 0.28), transparent 58%),
    linear-gradient(168deg, #0b0718 0%, var(--ink-800) 30%, var(--ink-900) 66%, #04050a 100%);
}

/* Woven crosshatch: gives the gradient a fabric-like weave under the grain. */
.ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.055) 0 1px, transparent 1px 6px);
}

/* Film grain, plus a coarser mottle so the wash never reads as flat colour. */
.ambient::after {
  content: '';
  position: absolute;
  inset: -20%;
  opacity: 0.5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='4'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23m)' opacity='0.42'/%3E%3C/svg%3E");
  background-size: 160px 160px, 420px 420px;
  mix-blend-mode: soft-light;
}

.ambient__beam {
  position: absolute;
  left: 50%;
  top: -40vh;
  width: 60vw;
  height: 110vh;
  transform: translateX(-50%) rotate(14deg);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.1), transparent 70%);
  filter: blur(60px);
}

/* -------------------------------------------------------------- topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px clamp(14px, 3vw, 30px);
  min-height: var(--topbar-h);
  background: linear-gradient(180deg, rgba(8, 10, 17, 0.94), rgba(8, 10, 17, 0.72));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: none;
  filter: drop-shadow(0 0 14px rgba(0, 255, 136, 0.35));
}

.brand__text { display: grid; gap: 1px; }

.brand__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
  background: linear-gradient(96deg, var(--paper), var(--emerald) 58%, #b47cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------- world clock ---- */
.worldclock {
  position: relative;
  flex: none;
}

.worldclock__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.07), rgba(255, 255, 255, 0.035) 60%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

.worldclock__toggle:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-emerald);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.12), rgba(255, 255, 255, 0.05) 60%);
}

.worldclock__globe {
  width: 17px;
  height: 17px;
  flex: none;
  fill: var(--emerald);
  opacity: 0.82;
}

.worldclock__readout {
  display: grid;
  gap: 1px;
  min-width: 108px;
}

.worldclock__city {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-mute);
  white-space: nowrap;
}

.worldclock__digits {
  display: flex;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.worldclock__colon {
  padding: 0 1px;
  color: var(--emerald);
  animation: clock-blink 2s steps(1, end) infinite;
}

@keyframes clock-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.28; }
}

.worldclock__seconds {
  margin-left: 4px;
  font-size: 10.5px;
  color: var(--emerald-dim);
}

.worldclock__meta {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--paper-mute);
  white-space: nowrap;
}

.worldclock__caret {
  width: 13px;
  height: 13px;
  flex: none;
  fill: var(--paper-mute);
  transform: rotate(90deg);
  transition: transform 0.22s ease, fill 0.2s ease;
}

.worldclock.is-open .worldclock__toggle { border-color: var(--hairline-emerald); }
.worldclock.is-open .worldclock__caret {
  transform: rotate(-90deg);
  fill: var(--emerald);
}

.worldclock__menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 60;
  width: 274px;
  padding: 12px 8px 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow-deep);
  animation: clock-menu-in 0.18s ease both;
}

.worldclock__menu[hidden] { display: none; }

@keyframes clock-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.worldclock__menu-title {
  margin: 0 0 8px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.worldclock__list {
  display: grid;
  gap: 2px;
  max-height: min(56vh, 330px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.zone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.zone-row:hover,
.zone-row:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--hairline);
}

.zone-row.is-active {
  background: linear-gradient(120deg, rgba(0, 255, 136, 0.16), rgba(122, 0, 255, 0.12));
  border-color: var(--hairline-emerald);
}

.zone-row__label {
  display: grid;
  gap: 0;
  margin-right: auto;
  min-width: 0;
}

.zone-row__city {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.zone-row__note {
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--paper-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-row__time {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--paper-dim);
}

.zone-row.is-active .zone-row__time { color: var(--emerald); }

/* --------------------------------------------------------------- button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn:active { transform: translateY(0) scale(0.985); }

.btn svg { width: 16px; height: 16px; flex: none; }

.btn--violet {
  border-color: var(--hairline-violet);
  background: linear-gradient(135deg, rgba(122, 0, 255, 0.34), rgba(122, 0, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn--violet:hover {
  border-color: rgba(160, 90, 255, 0.6);
  box-shadow: 0 0 24px -6px rgba(122, 0, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn--emerald {
  border-color: var(--hairline-emerald);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.9), rgba(11, 212, 115, 0.62));
  color: #04120a;
}
.btn--emerald:hover {
  box-shadow: 0 0 26px -6px rgba(0, 255, 136, 0.7);
  background: linear-gradient(135deg, var(--emerald), #19e087);
}

.btn--ghost { background: transparent; }

.btn[hidden] { display: none; }

/* ---------------------------------------------------------------- views ---- */
.views {
  position: relative;
  z-index: 1;
  padding: clamp(16px, 2.6vw, 30px) clamp(14px, 3vw, 30px);
  padding-bottom: calc(var(--sponsor-h) + var(--tabbar-h) + var(--safe-b) + 96px);
  max-width: 1320px;
  margin: 0 auto;
}

.view { display: none; animation: view-in 0.34s ease both; }
.view.is-active { display: block; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin: 0 0 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--hairline), transparent);
}

/* ---------------------------------------------------------------- glass ---- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), transparent 34%);
  opacity: 0.7;
}

/* ----------------------------------------------------------- radio grid ---- */
.deck-grid {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 980px) {
  .deck-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------------- deck ---- */
.deck { padding: clamp(18px, 2.4vw, 28px); }

.deck__top {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 26px);
  align-items: center;
}

@media (max-width: 620px) {
  .deck__top {
    grid-template-columns: 106px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .track { gap: 8px; }
}

.artwork {
  position: relative;
  width: clamp(150px, 22vw, 216px);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(122, 0, 255, 0.55), transparent 60%),
    radial-gradient(90% 90% at 90% 100%, rgba(0, 255, 136, 0.35), transparent 60%),
    var(--ink-600);
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 60px -30px rgba(122, 0, 255, 0.8);
}

.artwork img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.artwork img.is-loaded { opacity: 1; }

.artwork__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.4);
  transition: opacity 0.4s ease;
}

.artwork.has-art .artwork__fallback,
.artwork:has(img.is-loaded) .artwork__fallback { opacity: 0; }

@media (max-width: 620px) {
  .artwork { width: 106px; }
}

.artwork__fallback svg { width: 38%; height: 38%; }

.onair {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline-emerald);
  background: rgba(0, 255, 136, 0.08);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--emerald);
}

.onair__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper-mute);
  box-shadow: none;
}

.onair[data-state='live'] { border-color: rgba(255, 31, 69, 0.45); background: rgba(255, 31, 69, 0.1); color: #ff8098; }
.onair[data-state='live'] .onair__dot { background: var(--crimson); box-shadow: 0 0 10px var(--crimson); animation: dot-blink 1.8s ease-in-out infinite; }
.onair[data-state='connecting'] { color: #ffd76e; border-color: rgba(255, 215, 110, 0.35); background: rgba(255, 215, 110, 0.08); }
.onair[data-state='connecting'] .onair__dot { background: #ffd76e; animation: dot-blink 0.9s ease-in-out infinite; }
.onair[data-state='error'] { color: #ff9a9a; border-color: rgba(255, 90, 90, 0.4); background: rgba(255, 60, 60, 0.1); }

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.track { min-width: 0; display: grid; gap: 10px; }

.track__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.1vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.track__artist {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 600;
  color: var(--emerald);
  overflow-wrap: anywhere;
}

.track__album {
  font-size: 13.5px;
  color: var(--paper-dim);
  overflow-wrap: anywhere;
}

.chips { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.chip--violet { border-color: var(--hairline-violet); background: rgba(122, 0, 255, 0.14); color: #c9a6ff; }
.chip--emerald { border-color: var(--hairline-emerald); background: rgba(0, 255, 136, 0.1); color: var(--emerald); }

/* ------------------------------------------------------------- progress ---- */
.progress { display: grid; gap: 7px; margin-top: 18px; }

.progress__bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--emerald));
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
  transition: width 0.9s linear;
}

.progress__times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--paper-mute);
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------ transport ---- */
.transport {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 26px);
  flex-wrap: wrap;
  margin-top: clamp(18px, 2.4vw, 26px);
  padding-top: clamp(18px, 2.4vw, 24px);
  border-top: 1px solid var(--hairline);
}

/* The play toggle: solid neon emerald when paused, crimson + breathing
   glow the instant the broadcast is live. */
.play-toggle {
  position: relative;
  width: 108px;
  height: 108px;
  flex: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, #6bffbb, var(--emerald) 46%, var(--emerald-dim));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 18px 40px -18px rgba(0, 255, 136, 0.9), 0 0 36px -6px rgba(0, 255, 136, 0.55);
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.18s ease;
}

.play-toggle:hover { transform: scale(1.035); }
.play-toggle:active { transform: scale(0.97); }

.play-toggle__glyph {
  width: 42px;
  height: 42px;
  fill: #041209;
  transform: translateX(3px);
  transition: transform 0.2s ease;
}

.play-toggle__glyph--pause { display: none; transform: none; fill: #fff3f5; }

.play-toggle.is-live {
  background: radial-gradient(circle at 34% 28%, #ff6b85, var(--crimson) 48%, var(--crimson-deep));
  animation: breathe 2.4s ease-in-out infinite;
}

.play-toggle.is-live .play-toggle__glyph--play { display: none; }
.play-toggle.is-live .play-toggle__glyph--pause { display: block; }

/* Continuous breathing / pulsating glow while the stream is on air. */
@keyframes breathe {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset,
                0 0 0 0 rgba(255, 31, 69, 0.55),
                0 0 34px -4px rgba(255, 31, 69, 0.75);
  }
  50% {
    transform: scale(1.045);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset,
                0 0 0 18px rgba(255, 31, 69, 0),
                0 0 62px 4px rgba(255, 31, 69, 0.95);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset,
                0 0 0 0 rgba(255, 31, 69, 0.55),
                0 0 34px -4px rgba(255, 31, 69, 0.75);
  }
}

.play-toggle::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.play-toggle.is-live::after { opacity: 1; animation: ring-pulse 2.4s ease-in-out infinite; }

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 0.1; }
}

.transport__meta { display: grid; gap: 12px; min-width: 210px; flex: 1; }

.transport__hint {
  font-size: 13px;
  color: var(--paper-dim);
  min-height: 20px;
}

/* ------------------------------------------------------------ sound bar ---- */
/* Live level meter. Bars are a fixed-height gradient column revealed from the
   bottom by clip-path, so the colour a bar shows depends on how loud it is:
   emerald in the body of the mix, amber and crimson only on peaks. */
.soundbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.soundbar__caption {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
  flex: none;
}

.soundbar__bars {
  display: flex;
  align-items: stretch;
  gap: 3px;
  flex: 1;
  min-width: 0;
  height: 26px;
}

.soundbar__bar {
  position: relative;
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.065);
  overflow: hidden;
}

.soundbar__fill {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(to top, var(--emerald), #8bff9e 42%, #ffd34d 74%, var(--crimson));
  clip-path: inset(calc((1 - var(--h, 0.035)) * 100%) 0 0 0);
}

/* At rest, and while the stream is somebody else's, the strip greys out. */
.soundbar[data-state='idle'] .soundbar__fill,
.soundbar[data-state='muted'] .soundbar__fill {
  background: rgba(255, 255, 255, 0.22);
}

.soundbar[data-state='muted'] .soundbar__caption { color: var(--crimson); }

.soundbar[data-state='connecting'] .soundbar__fill { opacity: 0.6; }

.soundbar[data-state='live'] .soundbar__bar { background: rgba(255, 255, 255, 0.09); }
.soundbar[data-state='live'] .soundbar__caption { color: var(--emerald); }

.soundbar[data-peak='hot'] .soundbar__caption { color: var(--crimson); }

.soundbar__peak {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--paper-mute);
  flex: none;
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- volume ---- */
.volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.volume__btn:hover { border-color: var(--hairline-emerald); background: rgba(0, 255, 136, 0.1); }
.volume__btn svg { width: 16px; height: 16px; fill: var(--paper-dim); }
.volume__btn.is-muted svg { fill: var(--crimson); }

input[type='range'].volume__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 132px;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

input[type='range'].volume__slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald) calc(var(--vol, 0.8) * 100%), rgba(255, 255, 255, 0.12) calc(var(--vol, 0.8) * 100%));
}

input[type='range'].volume__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5px;
  border-radius: 50%;
  background: #eafff4;
  border: 2px solid var(--emerald);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.7);
}

input[type='range'].volume__slider::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
input[type='range'].volume__slider::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--emerald);
}
input[type='range'].volume__slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #eafff4;
  border: 2px solid var(--emerald);
}

.volume__value {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--paper-mute);
  min-width: 34px;
}

/* ------------------------------------------------------------- side rail ---- */
.rail { display: grid; gap: clamp(16px, 2vw, 20px); }

.panel { padding: 20px; }

.history { display: grid; gap: 4px; }

.history__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.history__row:hover { background: rgba(255, 255, 255, 0.045); }

.history__art {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--ink-500);
  border: 1px solid var(--hairline);
}

.history__meta { min-width: 0; display: grid; gap: 1px; }
.history__title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history__artist { font-size: 12px; color: var(--paper-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history__time { font-family: var(--font-mono); font-size: 10px; color: var(--paper-mute); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
  color: var(--paper);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

/* ------------------------------------------------------------ station bio -- */
.bio__tagline {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.1vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  background: linear-gradient(96deg, var(--paper), var(--emerald) 62%, #b47cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bio__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-dim);
}

.bio__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-emerald);
  background: rgba(0, 255, 136, 0.07);
}

.bio__note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; fill: var(--emerald); }
.bio__note p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--paper-dim); }

.bio__note a {
  color: var(--emerald);
  font-weight: 600;
  word-break: break-word;
  border-bottom: 1px solid rgba(0, 255, 136, 0.4);
}

.bio__note a:hover { border-bottom-color: var(--emerald); }

.link-list { display: grid; gap: 8px; }

.link-row {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-row:hover {
  transform: translateX(3px);
  border-color: var(--hairline-emerald);
  background: rgba(0, 255, 136, 0.07);
}

.link-row svg { width: 17px; height: 17px; flex: none; fill: var(--emerald); }
.link-row span { flex: 1; min-width: 0; }
.link-row small { font-family: var(--font-mono); font-size: 9.5px; color: var(--paper-mute); letter-spacing: 0.1em; text-transform: uppercase; }
.link-row small.is-email { text-transform: none; letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 8px;
  color: transparent !important;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--paper-mute);
  font-size: 13.5px;
}

.empty svg { width: 30px; height: 30px; fill: var(--paper-mute); opacity: 0.6; margin: 0 auto 10px; }

/* ---------------------------------------------------------- chat + merch ---- */
.frame-grid {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 900px) {
  .frame-grid { grid-template-columns: minmax(0, 1fr); }
}

.frame-shell {
  position: relative;
  padding: 0;
  min-height: min(72vh, 680px);
  display: flex;
  flex-direction: column;
}

.frame-shell__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 10, 17, 0.6);
}

.frame-shell__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-right: auto;
}

.frame-shell iframe {
  flex: 1;
  width: 100%;
  min-height: min(64vh, 620px);
  border: 0;
  background: var(--ink-700);
}

.frame-fallback {
  position: absolute;
  inset: 54px 0 0;
  display: none;
  place-content: center;
  text-align: center;
  gap: 14px;
  padding: 30px;
  background: rgba(6, 8, 14, 0.94);
}

.frame-shell.has-fallback .frame-fallback { display: grid; }

.frame-fallback h3 { font-size: 19px; }
.frame-fallback p { color: var(--paper-dim); font-size: 14px; max-width: 42ch; margin: 0 auto; }

.member-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }

.member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.member:hover { background: rgba(255, 255, 255, 0.05); }

.member__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink-500);
  border: 1px solid var(--hairline);
}

.member__name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.member__status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
  background: var(--paper-mute);
}
.member__status[data-status='online'] { background: var(--emerald); box-shadow: 0 0 8px rgba(0, 255, 136, 0.8); }
.member__status[data-status='idle'] { background: #ffc45a; }
.member__status[data-status='dnd'] { background: var(--crimson); }

.channel-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------- drawer ---- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scrim.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(460px, 94vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--glass-strong);
  border-left: 1px solid var(--hairline-violet);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: -40px 0 90px -40px rgba(0, 0, 0, 0.95);
  transform: translateX(102%);
  transition: transform 0.36s cubic-bezier(0.22, 0.75, 0.2, 1);
  visibility: hidden;
}

.drawer.is-open { transform: none; visibility: visible; }

.drawer__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}

.drawer__title { font-size: 20px; }
.drawer__sub { font-size: 12.5px; color: var(--paper-mute); margin-top: 3px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}
.icon-btn:hover { background: rgba(255, 31, 69, 0.14); border-color: rgba(255, 31, 69, 0.4); transform: rotate(90deg); }
.icon-btn svg { width: 15px; height: 15px; fill: var(--paper); }

.day-strip {
  display: flex;
  gap: 7px;
  padding: 14px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--hairline);
}
.day-strip::-webkit-scrollbar { display: none; }

.day-chip {
  flex: none;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: all 0.2s ease;
}

.day-chip:hover { color: var(--paper); border-color: rgba(255, 255, 255, 0.2); }

.day-chip.is-active {
  color: #04120a;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dim));
  border-color: transparent;
  box-shadow: 0 0 20px -6px rgba(0, 255, 136, 0.8);
}

.drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }

.show-row {
  width: 100%;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 18px;
  gap: 13px;
  align-items: center;
  text-align: left;
  padding: 13px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.028);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.show-row:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-violet);
  background: rgba(122, 0, 255, 0.12);
}

.show-row.is-now {
  border-color: rgba(255, 31, 69, 0.45);
  background: linear-gradient(120deg, rgba(255, 31, 69, 0.16), rgba(122, 0, 255, 0.1));
}

.show-row__time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  display: grid;
  gap: 2px;
}

.show-row__time span:last-child { color: var(--paper-mute); }

.show-row__name { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.show-row__host { font-size: 11.5px; color: var(--paper-mute); margin-top: 2px; }
.show-row__arrow { fill: var(--paper-mute); width: 16px; height: 16px; }

.now-pill {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--crimson);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- modal ---- */
dialog.modal {
  width: min(520px, 92vw);
  padding: 0;
  border: 1px solid var(--hairline-violet);
  border-radius: var(--radius-xl);
  background: var(--glass-strong);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  color: var(--paper);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}

dialog.modal::backdrop {
  background: rgba(3, 4, 8, 0.78);
  backdrop-filter: blur(6px);
}

dialog.modal[open] { animation: modal-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.modal__head {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(135deg, rgba(122, 0, 255, 0.24), transparent 70%);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.modal__title { font-size: 21px; line-height: 1.2; }
.modal__eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 7px;
}

.modal__body { padding: 20px 22px 24px; display: grid; gap: 16px; }
.modal__body p { margin: 0; color: var(--paper-dim); font-size: 14.5px; }

.social-row { display: flex; flex-wrap: wrap; gap: 9px; }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-emerald);
  background: rgba(0, 255, 136, 0.1);
}

.social-link svg { width: 15px; height: 15px; fill: var(--emerald); }

.steps { margin: 0; padding-left: 20px; color: var(--paper-dim); font-size: 14px; display: grid; gap: 7px; }

/* ----------------------------------------------------------- coffee fab ---- */
.coffee-fab {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: calc(var(--sponsor-h) + var(--tabbar-h) + var(--safe-b) + 16px);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 19px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: #04120a;
  background: linear-gradient(120deg, var(--emerald), #7bffc4 55%, #c9a6ff);
  box-shadow: 0 18px 44px -18px rgba(0, 255, 136, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.coffee-fab:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 24px 54px -18px rgba(0, 255, 136, 0.95);
}

.coffee-fab svg { width: 19px; height: 19px; fill: #04120a; }

/* --------------------------------------------------------- whatsapp fab ---- */
/* Sits above the coffee FAB in the bottom-right stack, and above every other
   layer (player, sponsor strip, tabbar, drawers) so it is always reachable. */
.whatsapp-fab {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: calc(var(--sponsor-h) + var(--tabbar-h) + var(--safe-b) + 78px);
  z-index: 9999;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 16px 34px -14px rgba(37, 211, 102, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 22px 44px -14px rgba(37, 211, 102, 1);
}

.whatsapp-fab svg { width: 31px; height: 31px; fill: #fff; }

@media (max-width: 560px) {
  .whatsapp-fab {
    width: 54px;
    height: 54px;
    bottom: calc(var(--sponsor-h) + var(--tabbar-h) + var(--safe-b) + 76px);
  }
  .whatsapp-fab svg { width: 29px; height: 29px; }
}

@media (max-width: 560px) {
  /* Tighter header chrome so the clock and actions stay on one compact row pair. */
  .topbar { gap: 10px; padding: 10px 14px; }
  .topbar__actions { gap: 7px; }
  .btn { padding: 8px 12px; font-size: 12.5px; }
  .brand__mark { width: 36px; height: 36px; }
  /* Keep the single-line station name from wrapping on narrow phones. */
  .brand__name { font-size: 13px; letter-spacing: 0.07em; }
  .brand__sub { font-size: 9px; letter-spacing: 0.2em; }

  .worldclock__toggle { gap: 8px; padding: 5px 10px; }
  .worldclock__readout { min-width: 0; }
  .worldclock__digits { font-size: 15.5px; }
  .worldclock__menu { width: min(274px, calc(100vw - 28px)); }

  .coffee-fab span { display: none; }
  .coffee-fab { padding: 14px; }

  /* Keep the volume slider and hint clear of the floating support button. */
  .transport__meta { padding-right: 62px; }

  /* The meter keeps its bars on a phone; the caption and dB read-out go. */
  .soundbar__caption, .soundbar__peak { display: none; }
  .soundbar__bars { height: 22px; gap: 2px; }
}

/* -------------------------------------------------------- sponsor strip ---- */
.sponsors {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 45;
  height: var(--sponsor-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(90deg, rgba(122, 0, 255, 0.18), rgba(8, 10, 17, 0.92) 30%, rgba(8, 10, 17, 0.92) 70%, rgba(0, 255, 136, 0.14));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sponsors__label {
  flex: none;
  padding: 0 14px;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
  background: rgba(5, 6, 11, 0.8);
  border-right: 1px solid var(--hairline);
}

@media (max-width: 620px) { .sponsors__label { display: none; } }

.sponsors__viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.sponsors__track {
  display: flex;
  align-items: center;
  gap: 38px;
  width: max-content;
  animation: marquee 46s linear infinite;
}

.sponsors__viewport:hover .sponsors__track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.sponsor {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--paper-dim);
  transition: color 0.2s ease;
}

.sponsor:hover { color: var(--emerald); }

.sponsor__kind {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.sponsor__dot { color: var(--violet); }

/* --------------------------------------------------------------- tabbar ---- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: linear-gradient(180deg, rgba(8, 10, 17, 0.88), rgba(4, 5, 10, 0.98));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid var(--hairline);
}

.tab {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--paper-mute);
  transition: color 0.22s ease;
}

.tab svg { width: 21px; height: 21px; fill: currentColor; transition: transform 0.22s ease; }

.tab__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tab:hover { color: var(--paper-dim); }

.tab[aria-selected='true'] { color: var(--emerald); }
.tab[aria-selected='true'] svg { transform: translateY(-2px) scale(1.06); }

.tab[aria-selected='true']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--emerald));
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.8);
}

.tab__badge {
  position: absolute;
  top: 11px;
  right: calc(50% - 22px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--crimson);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  display: grid;
  place-items: center;
}

.tab__badge[hidden] { display: none; }

/* ---------------------------------------------------------------- toast ---- */
.toast-stack {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--sponsor-h) + var(--tabbar-h) + var(--safe-b) + 84px);
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(420px, 92vw);
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-emerald);
  background: rgba(8, 12, 18, 0.95);
  backdrop-filter: blur(12px);
  font-size: 13.5px;
  box-shadow: var(--shadow-lift);
  animation: toast-in 0.26s ease both;
}

.toast[data-kind='warn'] { border-color: rgba(255, 196, 90, 0.5); }
.toast[data-kind='error'] { border-color: rgba(255, 31, 69, 0.55); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------ reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .play-toggle.is-live {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24) inset, 0 0 46px 2px rgba(255, 31, 69, 0.9);
  }
  .sponsors__track { animation: none; }
}
