/* ==========================================================================
   WebRadioRadar — "Studio Neutral"
   Warm stone, mid-light, airy. One restrained accent (pine). Product-grade.
   ========================================================================== */

:root {
  --font: "Hanken Grotesk", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  --bg: #e9e6de;
  --bg-soft: #efece4;
  --surface: #faf8f2;
  --surface-2: #f3f0e8;
  --ink: #211f1a;
  --muted: #6b6358;
  --faint: #9a9085;

  --line: rgba(33, 30, 24, 0.10);
  --line-2: rgba(33, 30, 24, 0.16);
  --accent: #1f6e5a;
  --accent-ink: #16513f;
  --accent-soft: rgba(31, 110, 90, 0.10);
  --accent-on: #fff;
  --live: #d2492c;

  --c1: #2f5d4e;
  --c2: #a8543b;
  --c3: #3f5670;
  --c4: #97712a;
  --c5: #6d4659;
  --c6: #2c6168;
  --cover-ink: #f5f1e8;

  --grad-top: #edeae2;
  --grad-bottom: #e6e2d9;
  --header-bg: rgba(233, 230, 222, 0.82);
  --header-bg-2: rgba(236, 233, 225, 0.92);
  --inset-hi: rgba(255, 255, 255, 0.5);
  --hover-soft: rgba(33, 30, 24, 0.05);
  --on-ink-soft: rgba(255, 255, 255, 0.55);
  --strong-hover: #000;
  --player-bg: rgba(250, 248, 242, 0.86);
  --band-bg: #211f1a;

  --sh-1: 0 1px 2px rgba(46, 40, 30, 0.05), 0 2px 6px rgba(46, 40, 30, 0.04);
  --sh-2: 0 2px 6px rgba(46, 40, 30, 0.05), 0 18px 38px -18px rgba(46, 40, 30, 0.20);
  --sh-pop: 0 10px 24px -8px rgba(46, 40, 30, 0.18), 0 30px 60px -24px rgba(46, 40, 30, 0.24);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --header-h: 72px;
  --dock-h: 84px;
}

/* ---------- dark theme (warm, neutral, product-grade — same restraint) ---------- */
[data-theme="dark"] {
  --bg: #16140f;
  --bg-soft: #1b1812;
  --surface: #211e16;
  --surface-2: #2a2619;
  --ink: #ece7dc;
  --muted: #a89e8d;
  --faint: #7b7365;

  --line: rgba(236, 231, 220, 0.10);
  --line-2: rgba(236, 231, 220, 0.18);
  --accent: #54c2a2;
  --accent-ink: #6bd4b4;
  --accent-soft: rgba(84, 194, 162, 0.14);
  --accent-on: #0c1512;
  --live: #e8623f;

  --cover-ink: #f5f1e8;

  --grad-top: #1a1710;
  --grad-bottom: #100e09;
  --header-bg: rgba(22, 20, 15, 0.82);
  --header-bg-2: rgba(26, 23, 17, 0.92);
  --inset-hi: rgba(255, 255, 255, 0.05);
  --hover-soft: rgba(236, 231, 220, 0.07);
  --on-ink-soft: rgba(0, 0, 0, 0.45);
  --strong-hover: #fff;
  --player-bg: rgba(31, 28, 21, 0.86);
  --band-bg: #1e2b25;

  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.40), 0 2px 6px rgba(0, 0, 0, 0.30);
  --sh-2: 0 2px 6px rgba(0, 0, 0, 0.40), 0 18px 38px -18px rgba(0, 0, 0, 0.70);
  --sh-pop: 0 10px 24px -8px rgba(0, 0, 0, 0.60), 0 30px 60px -24px rgba(0, 0, 0, 0.80);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--dock-h) + 24px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--grad-top) 0%, var(--bg) 38%, var(--grad-bottom) 100%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
::selection { background: var(--accent); color: var(--accent-on); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.mono { font-family: var(--font-mono); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  padding: 11px 18px; font-size: 14.5px; font-weight: 600; line-height: 1;
  transition: transform 0.4s var(--ease-out), background 0.25s, color 0.25s, box-shadow 0.3s, border-color 0.25s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--strong-hover); box-shadow: var(--sh-2); }
.btn-accent { background: var(--accent); color: var(--accent-on); }
.btn-accent:hover { background: var(--accent-ink); box-shadow: 0 10px 24px -10px rgba(31, 110, 90, 0.6); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; }

/* ===================== HEADER / NAV ===================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: var(--header-bg-2);
  backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 1px 0 var(--inset-hi) inset, var(--sh-1);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand .logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: var(--surface); }
.brand .logo svg { width: 20px; height: 20px; }
.brand b { font-weight: 700; }
.brand .x { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 8px; padding: 0; }
.nav-links a { padding: 8px 13px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 500; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--ink); background: var(--hover-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 8px 14px; color: var(--faint);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.nav-search:focus-within { border-color: var(--line-2); box-shadow: var(--sh-1); }
.nav-search svg { width: 16px; height: 16px; stroke: var(--faint); }
.nav-search input { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; width: 150px; }
.nav-search input::placeholder { color: var(--faint); }

.link-login { font-size: 14.5px; font-weight: 500; color: var(--muted); padding: 8px 6px; transition: color 0.2s; }
.link-login:hover { color: var(--ink); }

.theme-toggle {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.3s var(--ease-out);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.nav-toggle .bars { width: 18px; margin: 0 auto; display: grid; gap: 4px; }
.nav-toggle .bars i { height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.4s var(--ease), opacity 0.25s; display: block; }
body.nav-open .nav-toggle .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle .bars i:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- cover art block ---------- */
.cover {
  aspect-ratio: 1 / 1; border-radius: var(--r);
  display: grid; place-items: center; position: relative; overflow: hidden;
  color: var(--cover-ink); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  background: var(--c1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -40px 60px -20px rgba(0, 0, 0, 0.22);
}
.cover.c1 { background: var(--c1); } .cover.c2 { background: var(--c2); } .cover.c3 { background: var(--c3); }
.cover.c4 { background: var(--c4); } .cover.c5 { background: var(--c5); } .cover.c6 { background: var(--c6); }
.cover .init { font-size: 1.9em; opacity: 0.96; position: relative; z-index: 1; }
.cover::after {
  content: ""; position: absolute; right: -28%; bottom: -28%; width: 90%; height: 90%;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.06), 0 0 0 30px rgba(255, 255, 255, 0.04);
}

/* ===================== DISCOVER (top) ===================== */
.discover { padding: 30px 0 10px; }

/* --- promo / ad space (2 big featured stations) --- */
.promo {
  overflow: hidden;
  max-height: 600px; opacity: 1;
  margin-bottom: 6px;
  transition: max-height 0.6s var(--ease-out), opacity 0.35s, margin 0.4s;
}
body.filtering .promo { max-height: 0; opacity: 0; margin-bottom: 0; pointer-events: none; }
.promo-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.promo-head .pair { display: inline-flex; align-items: center; gap: 10px; }
.promo-head .promo-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.promo-advertise { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; transition: gap 0.3s var(--ease-out); }
.promo-advertise svg { width: 14px; height: 14px; }
.promo-advertise:hover { gap: 9px; }

.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo-card {
  position: relative; display: flex; align-items: center; gap: 20px;
  padding: 18px; text-align: left; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  transition: transform 0.45s var(--ease-out), box-shadow 0.35s, border-color 0.25s;
}
.promo-card:hover { transform: translateY(-3px); box-shadow: var(--sh-pop); border-color: var(--line-2); }
.promo-cover { position: relative; flex: none; }
.promo-card .cover { width: 116px; height: 116px; }
.promo-play {
  position: absolute; right: -10px; bottom: -10px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--sh-2);
  transition: background 0.2s, color 0.2s, transform 0.4s var(--ease-out);
}
.promo-play svg { width: 18px; height: 18px; }
.promo-card:hover .promo-play { background: var(--accent); color: var(--accent-on); transform: scale(1.06); }
.promo-card.is-active .promo-play { background: var(--accent); color: var(--accent-on); }
.promo-body { min-width: 0; }
.promo-badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; display: inline-block; margin-bottom: 8px; }
.promo-card h3 { font-size: 22px; margin-bottom: 4px; }
.promo-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }
.promo-tagline { font-size: 13.5px; color: var(--faint); margin-top: 8px; }

/* --- genre bar (sticky, collapsible) --- */
.genre-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0 13px; margin-bottom: 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.gb-row { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; max-height: 44px; overflow: hidden; transition: max-height 0.5s var(--ease-out); }
.genre-bar.expanded .gb-row { max-height: 320px; }
.genre-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--ease-out);
}
.genre-pill:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.genre-pill .gc { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.genre-pill.is-on { background: var(--ink); color: var(--surface); border-color: transparent; }
.genre-pill.is-on .gc { color: var(--on-ink-soft); }
.gb-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: transparent; border: 1px dashed var(--line-2); color: var(--muted);
  font-size: 13px; font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.gb-toggle:hover { color: var(--ink); border-color: var(--ink); background: var(--surface); }
.gb-toggle svg { width: 15px; height: 15px; transition: transform 0.4s var(--ease); }
.genre-bar.expanded .gb-toggle svg { transform: rotate(180deg); }
.gb-toggle .lbl-less { display: none; }
.genre-bar.expanded .gb-toggle .lbl-more { display: none; }
.genre-bar.expanded .gb-toggle .lbl-less { display: inline; }

/* --- grid head --- */
.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 22px 0 18px; }
.grid-head h2 { font-size: clamp(22px, 2.6vw, 30px); }
.grid-head .count { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-left: 10px; }
.clear-filter { display: none; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 7px 13px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); transition: color 0.2s, border-color 0.2s; }
.clear-filter:hover { color: var(--ink); border-color: var(--ink); }
.clear-filter svg { width: 13px; height: 13px; }
body.filtering .clear-filter { display: inline-flex; }

/* --- station tiles --- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tile { display: flex; flex-direction: column; gap: 12px; background: transparent; border: 0; text-align: left; padding: 0; color: var(--ink); }
.tile.hide { display: none; }
.tile-cover { position: relative; }
.tile-cover .cover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -40px 60px -20px rgba(0, 0, 0, 0.22), var(--sh-1); transition: box-shadow 0.4s, transform 0.5s var(--ease-out); }
.tile:hover .tile-cover .cover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), var(--sh-pop); }
.tile-play {
  position: absolute; right: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--sh-2);
  opacity: 0; transform: translateY(8px) scale(0.9);
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out), background 0.2s, color 0.2s;
}
.tile-play svg { width: 19px; height: 19px; }
.tile:hover .tile-play, .tile:focus-within .tile-play { opacity: 1; transform: translateY(0) scale(1); }
.tile-play:hover { background: var(--accent); color: var(--accent-on); }
.tile.is-active .tile-play { opacity: 1; transform: none; background: var(--accent); color: var(--accent-on); }
.tile-body { display: flex; flex-direction: column; gap: 3px; }
.tile-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.tile-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; display: flex; align-items: center; gap: 7px; }
.tile-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.tile-listeners { display: inline-flex; align-items: center; gap: 5px; }
.tile-listeners svg { width: 12px; height: 12px; stroke: var(--faint); }

.empty-note { display: none; color: var(--muted); font-size: 15px; padding: 30px 0; }
body.no-results .empty-note { display: block; }

/* ===================== GENERIC SECTION HEAD ===================== */
section.block { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.section-head .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.section-head .more { font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; flex: none; transition: gap 0.3s var(--ease-out); }
.section-head .more svg { width: 15px; height: 15px; }
.section-head .more:hover { gap: 10px; }

/* country chips */
.country-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.country { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 14px; font-weight: 500; transition: transform 0.35s var(--ease-out), border-color 0.2s, box-shadow 0.3s; }
.country:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--sh-1); }
.country .flag { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--muted); }
.country .num { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* broadcaster band */
.broadcast { background: var(--band-bg); color: #f4f1e9; border-radius: var(--r-lg); padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; box-shadow: var(--sh-2); }
.broadcast h2 { color: #fff; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; }
.broadcast .b-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #74d0b6; margin-bottom: 14px; }
.broadcast .b-note { margin-top: 18px; font-size: 13.5px; color: rgba(244, 241, 233, 0.55); }
.broadcast .b-note a { color: rgba(244, 241, 233, 0.85); text-decoration: underline; text-underline-offset: 3px; }
.broadcast .b-note a:hover { color: #fff; }
.broadcast .b-lede { color: rgba(244, 241, 233, 0.72); font-size: 16px; margin: 16px 0 26px; max-width: 40ch; }
.broadcast .b-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.broadcast .btn-ghost { color: #f4f1e9; border-color: rgba(244, 241, 233, 0.28); }
.broadcast .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(244, 241, 233, 0.6); }
.b-steps { display: flex; flex-direction: column; gap: 4px; }
.b-step { display: flex; gap: 16px; padding: 16px; border-radius: var(--r); transition: background 0.25s; }
.b-step:hover { background: rgba(255, 255, 255, 0.04); }
.b-step .n { font-family: var(--font-mono); font-size: 13px; width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(244, 241, 233, 0.22); color: #f4f1e9; }
.b-step.key .n { background: var(--accent); border-color: transparent; color: var(--accent-on); }
.b-step h4 { margin: 0 0 3px; font-size: 15.5px; font-weight: 600; font-family: var(--font); }
.b-step p { margin: 0; font-size: 13.5px; color: rgba(244, 241, 233, 0.6); }
.b-step .tag { display: inline-block; margin-top: 7px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #74d0b6; background: rgba(31, 110, 90, 0.28); padding: 3px 8px; border-radius: 6px; }

/* ===================== FOOTER ===================== */
.site-footer { padding: 60px 0 40px; border-top: 1px solid var(--line); margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 30ch; }
.footer-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: var(--muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); flex-wrap: wrap; }

/* ===================== PERSISTENT PLAYER DOCK ===================== */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0 16px 14px; pointer-events: none; }
.player-inner {
  pointer-events: auto; max-width: 1200px; margin: 0 auto; height: var(--dock-h);
  display: grid; grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr); align-items: center; gap: 16px;
  padding: 0 16px 0 14px;
  background: var(--player-bg); backdrop-filter: saturate(1.5) blur(16px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-pop);
}
.player-now { display: flex; align-items: center; gap: 13px; min-width: 0; }
.player-now .cover { width: 54px; height: 54px; flex: none; border-radius: 11px; font-size: 16px; }
.player-now .cover::after { display: none; }
.player-now.idle .cover { background: var(--surface-2); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
.player-info { min-width: 0; }
.player-info .pn { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info .ps { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info .live { display: none; align-items: center; gap: 5px; color: var(--live); font-weight: 600; letter-spacing: 0.08em; }
.player-info .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: pulse 1.6s var(--ease) infinite; }
.player.is-playing .player-info .live { display: inline-flex; }

.player-controls { display: flex; align-items: center; gap: 8px; }
.pc-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; transition: color 0.2s, background 0.2s, transform 0.3s var(--ease-out); }
.pc-btn:hover { color: var(--ink); background: var(--hover-soft); }
.pc-btn:active { transform: scale(0.92); }
.pc-btn svg { width: 18px; height: 18px; }
.pc-btn.play { width: 50px; height: 50px; background: var(--ink); color: var(--surface); box-shadow: var(--sh-2); }
.pc-btn.play:hover { background: var(--strong-hover); }
.pc-btn.play .ico-pause { display: none; }
.player.is-playing .pc-btn.play .ico-play { display: none; }
.player.is-playing .pc-btn.play .ico-pause { display: block; }
.pc-btn.play.loading { pointer-events: none; }
.pc-btn.play.loading .ico-play, .pc-btn.play.loading .ico-pause { display: none; }
.pc-btn.play .spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(250, 248, 242, 0.35); border-top-color: var(--surface); border-radius: 50%; animation: spin 0.7s linear infinite; }
.pc-btn.play.loading .spinner { display: block; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 16px; opacity: 0; transition: opacity 0.3s; }
.player.is-playing .eq { opacity: 1; }
.eq i { width: 3px; height: 4px; background: var(--accent); border-radius: 2px; }
.player.is-playing .eq i { animation: eq 0.9s var(--ease) infinite; }
.eq i:nth-child(1) { animation-delay: -0.2s; } .eq i:nth-child(2) { animation-delay: -0.5s; }
.eq i:nth-child(3) { animation-delay: -0.1s; } .eq i:nth-child(4) { animation-delay: -0.7s; }

.volume { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.volume svg { width: 17px; height: 17px; stroke: var(--muted); flex: none; }
.volume input[type="range"] { -webkit-appearance: none; appearance: none; width: 90px; height: 4px; border-radius: 4px; background: var(--line-2); outline: 0; }
.volume input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 2px solid var(--surface); box-shadow: var(--sh-1); }
.volume input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 2px solid var(--surface); }
.player-open { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; }
.player-open:hover { color: var(--ink); }
.player-open svg { width: 14px; height: 14px; }

/* ===================== COOKIE BANNER ===================== */
.cookie { position: fixed; left: 16px; right: 16px; bottom: calc(var(--dock-h) + 22px); z-index: 55; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--sh-pop); padding: 20px 22px; transform: translateY(calc(100% + 120px)); opacity: 0; transition: transform 0.6s var(--ease-out), opacity 0.4s; }
.cookie.show { transform: none; opacity: 1; }
.cookie h4 { margin: 0 0 6px; font-family: var(--font); font-size: 15px; font-weight: 600; }
.cookie p { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }
.cookie p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { padding: 10px 16px; font-size: 13.5px; }

/* ===================== REVEAL ===================== */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out) var(--d, 0s), transform 0.7s var(--ease-out) var(--d, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }

@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links, .nav-search, .link-login { display: none; }
  .nav-toggle { display: grid; }
  body.nav-open .nav-links { display: flex; flex-direction: column; gap: 4px; position: absolute; left: 16px; right: 16px; top: 70px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--sh-pop); }
  body.nav-open .nav-links a { padding: 12px 14px; font-size: 16px; }
  .promo-grid { grid-template-columns: 1fr; }
  .broadcast { grid-template-columns: 1fr; padding: 36px; gap: 30px; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .discover { padding: 18px 0 6px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .promo-card { gap: 14px; padding: 14px; }
  .promo-card .cover { width: 88px; height: 88px; }
  .promo-card h3 { font-size: 19px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  :root { --dock-h: 76px; }
  .player { padding: 0 10px 10px; }
  .player-inner { grid-template-columns: 1fr auto; gap: 10px; padding: 0 12px 0 10px; height: 76px; }
  .player-right { display: none; }
  .player-now .cover { width: 46px; height: 46px; }
  .pc-btn.prev, .pc-btn.next { display: none; }
  .cookie { bottom: calc(76px + 18px); }
}

/* ==========================================================================
   Sub-pages added with the PHP backend
   ========================================================================== */

/* --- breadcrumbs --- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin: 4px 0 18px; }
.crumbs a { color: var(--muted); transition: color 0.2s; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--line-2); }
.crumbs em { color: var(--ink); font-style: normal; }

/* --- current nav item --- */
.nav-links a.is-current { color: var(--ink); }

/* --- pjax top progress bar --- */
body.pjax-loading::after {
  content: ""; position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 80;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: pjaxbar 1s linear infinite;
}
@keyframes pjaxbar { 0% { background-position: -50% 0; } 100% { background-position: 150% 0; } }

/* --- category grid (genres index) --- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cat-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform 0.35s var(--ease-out), border-color 0.2s, box-shadow 0.3s;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--sh-1); }
.cat-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.cat-num { font-size: 11.5px; color: var(--faint); flex: none; }

/* --- station detail --- */
.station-hero { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; margin: 6px 0 10px; }
.sh-cover .cover { width: 240px; height: 240px; border-radius: var(--r-lg); font-size: 22px; box-shadow: var(--sh-2); }
.sh-body { min-width: 0; padding-top: 4px; }
.sh-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sh-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px;
  transition: color 0.2s, border-color 0.2s;
}
.sh-tag:hover { color: var(--ink); border-color: var(--line-2); }
.station-hero h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.04; }
.sh-desc { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 16px 0 0; max-width: 56ch; }
.sh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.sh-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 12px; color: var(--faint); }
.sh-stats .ok { color: var(--accent); }
.ok { color: var(--accent); }

/* --- simple / prose pages (about, legal, etc.) --- */
.simple-page { max-width: 760px; margin: 0 auto; }
.simple-page > h1 { font-size: clamp(30px, 4vw, 44px); margin: 10px 0 0; }
.simple-page .eyebrow { display: block; margin-bottom: 6px; }
.lede { font-size: 18px; color: var(--muted); line-height: 1.6; margin: 16px 0 0; }
.prose { margin-top: 30px; color: var(--ink); }
.prose > p { font-size: 15.5px; line-height: 1.72; color: var(--muted); margin: 0 0 18px; }
.prose h2 { font-family: var(--font-display); font-size: 21px; margin: 34px 0 12px; }
.prose h3 { font-family: var(--font); font-weight: 600; font-size: 16px; margin: 22px 0 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-ink); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; margin: 0 0 18px; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.6; color: var(--ink); }
.muted-note { font-size: 13.5px; color: var(--faint); }

/* --- auth (register / login) --- */
.auth { max-width: 460px; margin: 0 auto; }
.auth-wide { max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.auth-intro { position: sticky; top: calc(var(--header-h) + 20px); }
.auth-intro h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 8px 0 0; }
.auth-points { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; gap: 10px; font-size: 15px; color: var(--muted); }
.auth-points .ok { font-weight: 700; }
.auth-points a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.auth-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); padding: 30px; display: flex; flex-direction: column; gap: 18px;
}
.auth-narrow { gap: 14px; }
.auth-card > h1 { font-size: 26px; }
.auth-card .eyebrow { margin-bottom: -4px; }
.auth-card .lede { font-size: 14.5px; margin: 0 0 4px; }

.form-set { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.form-set legend { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding: 0; margin-bottom: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field-hint { font-size: 12px; color: var(--faint); }
.field-error { font-size: 12px; color: var(--live); }
.field input, .field textarea, .select select {
  width: 100%; font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .select select:focus {
  outline: 0; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft);
}
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 9px; height: 9px; pointer-events: none;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.check input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.check-inline { align-items: center; }
.form-aux { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aux-link { font-size: 13px; color: var(--muted); }
.aux-link:hover { color: var(--ink); }
.form-alert { font-size: 13.5px; color: var(--live); background: rgba(210, 73, 44, 0.08); border: 1px solid rgba(210, 73, 44, 0.25); border-radius: var(--r-sm); padding: 10px 13px; margin: 0; }
.btn-block { justify-content: center; width: 100%; padding: 13px 18px; }
.auth-alt { font-size: 13.5px; color: var(--muted); text-align: center; margin: 2px 0 0; }
.auth-alt a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 860px) {
  .auth-wide { grid-template-columns: 1fr; gap: 28px; }
  .auth-intro { position: static; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .station-hero { grid-template-columns: 160px 1fr; gap: 24px; }
  .sh-cover .cover { width: 160px; height: 160px; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .station-hero { grid-template-columns: 1fr; }
  .sh-cover .cover { width: 140px; height: 140px; }
  .auth-card { padding: 22px; }
}

/* ==========================================================================
   Auth helpers, flash, dashboard
   ========================================================================== */

.btn-sm { padding: 8px 13px; font-size: 13px; }
.inline-form { display: inline; }
.auth-narrow-wrap { max-width: 560px; }
.auth-account { box-shadow: none; }

/* --- flash messages --- */
.flash-stack { position: fixed; left: 16px; right: 16px; top: calc(var(--header-h) + 12px); z-index: 70; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.flash {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.45;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--sh-2);
  animation: flashIn 0.4s var(--ease-out);
}
.flash span { flex: 1; }
.flash-x { border: 0; background: transparent; color: var(--faint); font-size: 20px; line-height: 1; padding: 0 2px; flex: none; }
.flash-x:hover { color: var(--ink); }
.flash-success { border-color: rgba(31, 110, 90, 0.4); }
.flash-success span { color: var(--accent-ink); }
.flash-error { border-color: rgba(210, 73, 44, 0.4); }
.flash-error span { color: var(--live); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* --- dashboard --- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-head h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 6px 0 4px; }

.dash-empty { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 56px 28px; }
.dash-empty h2 { font-size: 22px; margin-bottom: 8px; }
.dash-empty p { color: var(--muted); max-width: 44ch; margin: 0 auto 22px; }

.dash-list { display: flex; flex-direction: column; gap: 16px; }
.verify-banner { border-color: rgba(151, 113, 42, 0.35); background: rgba(151, 113, 42, 0.06); margin-bottom: 24px; }
.verify-banner h3 { font-size: 17px; margin-bottom: 4px; }
.dash-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--sh-1); }
.dash-card-main { display: flex; gap: 18px; min-width: 0; align-items: flex-start; }
.dash-cover { width: 64px; height: 64px; flex: none; border-radius: 12px; font-size: 16px; }
.dash-card-body { min-width: 0; }
.dash-card-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-card-top h3 { font-size: 19px; }
.dash-meta { font-size: 12px; color: var(--muted); margin: 5px 0 12px; }

.badge { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; padding: 4px 9px; border-radius: var(--r-pill); border: 1px solid transparent; }
.badge-ok   { color: var(--accent-ink); background: var(--accent-soft); border-color: rgba(31, 110, 90, 0.3); }
.badge-warn { color: #9a6a16; background: rgba(151, 113, 42, 0.12); border-color: rgba(151, 113, 42, 0.3); }
.badge-bad  { color: var(--live); background: rgba(210, 73, 44, 0.1); border-color: rgba(210, 73, 44, 0.3); }
.badge-mute { color: var(--muted); background: var(--surface-2); border-color: var(--line); }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px; }
.check-pill i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.check-pill.is-ok i { background: var(--accent); }
.check-pill.is-no i { background: var(--live); }
.check-pill em { font-style: normal; font-size: 11px; color: var(--faint); }

.dash-hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; max-width: 60ch; }
.dash-hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.dash-actions { display: flex; flex-direction: column; gap: 8px; flex: none; align-items: stretch; }
.dash-actions .btn { justify-content: center; }

.dash-account { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.dash-account h2 { font-size: 22px; margin-bottom: 16px; }
.auth-account { max-width: 620px; }
.dash-account-foot { display: flex; align-items: center; gap: 16px; }

@media (max-width: 720px) {
  .flash-stack { top: 76px; }
  .dash-card { flex-direction: column; align-items: stretch; gap: 16px; }
  .dash-actions { flex-direction: row; flex-wrap: wrap; }
  .dash-actions .btn, .dash-actions .inline-form { flex: 1; }
  .dash-actions .inline-form .btn { width: 100%; }
}
