/* radio.grokpot.io — Midnight Broadcast Booth
   Mobile-first · desktop multi-pane · no mock chrome · prefers-reduced-motion */

:root {
  color-scheme: dark;
  --ink: #06080c;
  --ink-2: #0b1018;
  --panel: #101820;
  --panel-2: #15202b;
  --panel-3: #1a2836;
  --line: rgba(148, 175, 200, 0.14);
  --line-strong: rgba(148, 175, 200, 0.28);
  --text: #eef4fb;
  --muted: #8fa3b8;
  --dim: #5f738a;
  --green: #1ed760;
  --green-2: #14a84a;
  --cyan: #3ee0ff;
  --violet: #a78bfa;
  --rose: #fb7185;
  --amber: #fbbf24;
  --onair: #ff3b5c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --radius-sm: 14px;
  --nav-h: 72px;
  --player-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --max: 1320px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --space: 16px;
  --space-lg: 24px;
}

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

html { height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 16px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(30, 215, 96, 0.16), transparent 55%),
    radial-gradient(800px 480px at 96% 4%, rgba(62, 224, 255, 0.1), transparent 50%),
    radial-gradient(700px 420px at 50% 110%, rgba(167, 139, 250, 0.08), transparent 55%),
    linear-gradient(180deg, #070a10 0%, var(--ink) 40%, #05070b 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

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

.hidden { display: none !important; }

/* —— App shell ——
   Only topbar + shell body (rail + main) participate in layout.
   Mini-player + bottom-nav are fixed overlays (never grid cells). */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

.app.has-player {
  padding-bottom: calc(var(--nav-h) + var(--player-h) + var(--safe-b) + 12px);
}

.app-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(14px + var(--safe-t)) 18px 14px;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(6, 8, 12, 0.78);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #041016;
  background: linear-gradient(145deg, var(--green), var(--green-2) 65%, #0e7a35);
  box-shadow: 0 0 0 1px rgba(30, 215, 96, 0.25), 0 0 28px rgba(30, 215, 96, 0.28);
  animation: logoPulse 3.4s ease-in-out infinite;
  flex: 0 0 auto;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(30, 215, 96, 0.2), 0 0 18px rgba(30, 215, 96, 0.22); transform: scale(1); }
  50% { box-shadow: 0 0 0 1px rgba(30, 215, 96, 0.35), 0 0 34px rgba(30, 215, 96, 0.45); transform: scale(1.03); }
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.brand .tag {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
  line-height: 1.3;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* —— Buttons —— */
.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s var(--ease), filter 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  min-height: 44px;
}

.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #2bc4e8);
  color: #041016;
}

.btn-spotify {
  background: linear-gradient(135deg, #1ed760, #1db954);
  color: #041016;
}

.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: rgba(255, 59, 92, 0.14);
  color: #ff8da0;
  border: 1px solid rgba(255, 59, 92, 0.35);
}

.btn-onair {
  background: linear-gradient(135deg, #ff5c7a, var(--onair));
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.18), 0 8px 24px rgba(255, 59, 92, 0.25);
}

.btn-sm {
  padding: 9px 12px;
  font-size: 0.8rem;
  border-radius: 11px;
  min-height: 38px;
}
.btn-lg {
  padding: 15px 20px;
  font-size: 1rem;
  border-radius: 16px;
  min-height: 52px;
}
.btn-block { width: 100%; }
.btn-icon {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.05rem;
}

/* —— Pills —— */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(16, 24, 32, 0.85);
  color: var(--muted);
  white-space: nowrap;
}

.pill.live {
  color: #ffb3c0;
  border-color: rgba(255, 59, 92, 0.4);
  background: rgba(255, 59, 92, 0.12);
}

.pill.ok {
  color: #7dffa8;
  border-color: rgba(30, 215, 96, 0.35);
  background: rgba(30, 215, 96, 0.1);
}

.pill.warn {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--onair);
  box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.55);
  animation: pulseDot 1.4s ease infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}

/* —— Main —— */
.main {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 20px 18px 36px;
  flex: 1;
}

.view { display: none; animation: viewIn 0.35s var(--ease); }
.view.active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.hero {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}

.hero-copy h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero-copy h2 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--green), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 40ch;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  text-align: center;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.stat span {
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* —— Section heads —— */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 16px;
}

.section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 800;
}

.section-head .hint {
  color: var(--dim);
  font-size: 0.82rem;
}

/* —— Cards / grid —— */
.station-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.station-card {
  position: relative;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.15s ease;
  text-align: left;
  width: 100%;
  color: inherit;
  animation: cardIn 0.45s var(--ease) both;
  min-height: 120px;
  align-items: center;
}

.station-card:nth-child(1) { animation-delay: 0.02s; }
.station-card:nth-child(2) { animation-delay: 0.08s; }
.station-card:nth-child(3) { animation-delay: 0.14s; }
.station-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.station-card:hover,
.station-card:focus-visible {
  border-color: rgba(62, 224, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(62, 224, 255, 0.12);
  outline: none;
}

.station-art {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(30, 215, 96, 0.2), rgba(62, 224, 255, 0.12)),
    var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(30, 215, 96, 0.12);
  flex: 0 0 auto;
}

.station-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.station-meta .title {
  font-weight: 750;
  font-size: 1.05rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.station-meta .sub {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-meta .now {
  color: var(--dim);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-meta .now strong { color: var(--text); font-weight: 650; }

.station-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.empty {
  text-align: center;
  padding: 48px 22px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(16, 24, 32, 0.45);
}

.empty h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.2rem;
}

.empty p {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

/* —— Station room (tune-in) —— */
.room {
  display: grid;
  gap: 18px;
}

.room-stage {
  border-radius: var(--radius);
  border: 1px solid rgba(30, 215, 96, 0.22);
  background:
    radial-gradient(500px 220px at 0% 0%, rgba(30, 215, 96, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(24, 40, 32, 0.92), var(--panel));
  padding: 20px;
  box-shadow: var(--shadow);
}

.room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.room-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.room-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

.np {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
}

.np-art {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  background: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  overflow: hidden;
  box-shadow: 0 0 32px rgba(30, 215, 96, 0.2);
}

.np-art.playing {
  animation: artGlow 2.8s ease-in-out infinite;
}

@keyframes artGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(30, 215, 96, 0.18); }
  50% { box-shadow: 0 0 40px rgba(30, 215, 96, 0.38); }
}

.np-art img { width: 100%; height: 100%; object-fit: cover; }

.np-meta .track {
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 4px;
  line-height: 1.25;
}

.np-meta .artist { color: var(--muted); font-size: 0.95rem; }

.eq {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 20px;
  margin-top: 12px;
}

.eq span {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7dffa8, var(--green));
  animation: eqBar 0.9s ease-in-out infinite;
}

.eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.eq span:nth-child(2) { height: 80%; animation-delay: 0.15s; }
.eq span:nth-child(3) { height: 55%; animation-delay: 0.3s; }
.eq span:nth-child(4) { height: 95%; animation-delay: 0.05s; }
.eq span:nth-child(5) { height: 45%; animation-delay: 0.25s; }
.eq.paused span { animation: none; opacity: 0.35; height: 30% !important; }

@keyframes eqBar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.progress {
  margin-top: 18px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.4s linear;
}

.transport {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.react-btn {
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.45);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 1.1rem;
  min-height: 44px;
  transition: transform 0.12s var(--ease), border-color 0.15s ease, background 0.15s ease;
}

.react-btn:hover {
  border-color: rgba(62, 224, 255, 0.35);
  background: rgba(62, 224, 255, 0.08);
  transform: translateY(-1px);
}

.react-btn:active { transform: scale(1.12); }

.room-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Chat panel */
.chat-panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 440px;
  box-shadow: var(--shadow);
}

.chat-panel header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-panel header h3 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  font-family: var(--font-display);
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: grid;
  gap: 3px;
  font-size: 0.92rem;
}

.chat-msg .who {
  font-weight: 750;
  font-size: 0.78rem;
  color: var(--violet);
}

.chat-msg.host .who { color: var(--green); }
.chat-msg.system .who { color: var(--dim); }
.chat-msg .body { color: var(--text); word-break: break-word; line-height: 1.45; }

.chat-compose {
  display: flex;
  gap: 10px;
  padding: 12px 14px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
}

.chat-compose input {
  flex: 1;
  min-width: 0;
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  min-height: 46px;
}

.chat-compose input:focus {
  border-color: rgba(62, 224, 255, 0.45);
}

/* Banter strip */
.banter {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.12), rgba(18, 26, 34, 0.6));
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.banter .label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet);
  font-weight: 800;
  margin-bottom: 6px;
}

/* Host booth */
.booth-grid {
  display: grid;
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  font-weight: 800;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  min-height: 48px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(62, 224, 255, 0.45);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.hint {
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.5;
}

.premium-gate {
  border: 1px solid rgba(30, 215, 96, 0.28);
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(30, 215, 96, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(20, 36, 28, 0.95), var(--panel));
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}

.premium-gate h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(62, 224, 255, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(62, 224, 255, 0.22);
  cursor: pointer;
  user-select: none;
}

.chip.on {
  background: linear-gradient(135deg, var(--cyan), #2bc4e8);
  color: #041016;
  border-color: transparent;
}

/* Bottom nav (mobile) — fixed overlay, not in flex/grid flow */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px 10px calc(10px + var(--safe-b));
  background: rgba(6, 8, 12, 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid var(--line);
}

.bottom-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 10px 4px;
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 52px;
  transition: color 0.15s ease, background 0.15s ease;
}

.bottom-nav button .ico { font-size: 1.25rem; line-height: 1; }
.bottom-nav button.active {
  color: var(--cyan);
  background: rgba(62, 224, 255, 0.08);
}

.bottom-nav button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

/* Sticky mini player — fixed overlay */
.mini-player {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 6px);
  z-index: 45;
  display: none;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(22, 36, 28, 0.96), rgba(12, 18, 24, 0.96));
  border: 1px solid rgba(30, 215, 96, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.app.has-player .mini-player { display: grid; }

.mini-player .art {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--ink-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mini-player .meta { min-width: 0; }
.mini-player .meta .t {
  font-weight: 750;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player .meta .a {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Desktop rail (hidden on phone) */
.side-rail { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--player-h) + 28px + var(--safe-b));
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  background: rgba(16, 24, 32, 0.95);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  max-width: min(92vw, 420px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— Tablet+ —— */
@media (min-width: 640px) {
  .main { padding: 28px 28px 48px; }

  .station-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .np {
    grid-template-columns: 148px 1fr;
    gap: 20px;
  }

  .np-art {
    width: 148px;
    height: 148px;
    border-radius: 22px;
  }

  .hero {
    grid-template-columns: 1.45fr 0.9fr;
    align-items: end;
    gap: 28px;
  }

  .stats-row { gap: 14px; }
}

/* —— Desktop —— */
@media (min-width: 1024px) {
  .app {
    padding-bottom: 0;
  }

  .app.has-player { padding-bottom: 0; }

  .app-body {
    flex-direction: row;
    align-items: stretch;
  }

  .topbar {
    padding-left: 24px;
    padding-right: 24px;
  }

  .side-rail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 16px 28px;
    border-right: 1px solid var(--line);
    background: rgba(6, 8, 12, 0.55);
    position: sticky;
    top: 74px;
    height: calc(100dvh - 74px);
    width: 232px;
    flex: 0 0 232px;
    align-self: start;
  }

  .side-rail button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: left;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .side-rail button:hover {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text);
  }

  .side-rail button.active {
    background: rgba(62, 224, 255, 0.1);
    color: var(--cyan);
  }

  .side-rail .rail-foot {
    margin-top: auto;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 0.8rem;
    color: var(--dim);
    line-height: 1.45;
  }

  .main {
    padding: 32px 36px 56px;
    max-width: none;
    width: 100%;
    flex: 1;
    min-width: 0;
  }

  .main-inner {
    width: min(100%, var(--max));
    margin: 0 auto;
  }

  .bottom-nav { display: none; }

  .mini-player {
    left: auto;
    right: 28px;
    bottom: 28px;
    width: min(400px, calc(100vw - 280px));
  }

  .station-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .room {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    align-items: start;
    gap: 22px;
  }

  .room-stage { grid-column: 1; }
  .room-side {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 96px;
  }

  .chat-panel {
    min-height: 520px;
    max-height: calc(100dvh - 160px);
    flex: 1;
  }

  .booth-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
  }

  .booth-grid .span-2 { grid-column: 1 / -1; }
}

/* —— Wide —— */
@media (min-width: 1400px) {
  .station-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-copy h2 { font-size: 2.6rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
