/* Next Bot dashboard.
   The three colors --c1, --c2, --c3 come from the artist's photo (or the
   station) and are set by app.js; @property lets them fade between songs. */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #8b5cff; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #22d3c5; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #0d0b1a; }

:root {
  --c1: #8b5cff;
  --c2: #22d3c5;
  --c3: #0d0b1a;
  --bg: #07060d;
  --ink: #f5f3ff;
  --ink-2: rgba(245, 243, 255, 0.68);
  --ink-3: rgba(245, 243, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.09);
  --glass-3: rgba(255, 255, 255, 0.14);
  --stroke: rgba(255, 255, 255, 0.1);
  --panel: rgba(14, 12, 24, 0.55);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --danger: #ff4d6d;
  --ok: #3ee6a0;
  --display: 'Unbounded', 'Rubik', system-ui, sans-serif;
  --body: 'Rubik', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
  transition: --c1 1.4s ease, --c2 1.4s ease, --c3 1.4s ease;
}
:root[data-theme="light"] {
  --bg: #f3f1fa;
  --ink: #15121f;
  --ink-2: rgba(21, 18, 31, 0.7);
  --ink-3: rgba(21, 18, 31, 0.45);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(20, 16, 40, 0.06);
  --glass-3: rgba(20, 16, 40, 0.11);
  --stroke: rgba(20, 16, 40, 0.1);
  --panel: rgba(255, 255, 255, 0.62);
  --shadow: 0 24px 60px rgba(40, 30, 90, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 16px 110px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 10px; }

/* ------------------------------------------------------------ sky */
.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--c3) 85%, var(--bg)), var(--bg) 70%); }
:root[data-theme="light"] .sky { background: radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--c1) 12%, var(--bg)), var(--bg) 70%); }
.sky-photo {
  position: absolute; inset: -80px;
  background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.6);
  opacity: 0.32; transform: scale(1.1);
  transition: background-image 1s ease, opacity 1s ease;
}
:root[data-theme="light"] .sky-photo { opacity: 0.22; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; mix-blend-mode: screen; will-change: transform; }
:root[data-theme="light"] .blob { mix-blend-mode: multiply; opacity: 0.22; }
.b1 { width: 55vmax; height: 55vmax; background: var(--c1); top: -18vmax; inset-inline-start: -12vmax; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 45vmax; height: 45vmax; background: var(--c2); bottom: -20vmax; inset-inline-end: -10vmax; animation: drift2 32s ease-in-out infinite alternate; }
.b3 { width: 30vmax; height: 30vmax; background: color-mix(in oklab, var(--c1) 50%, var(--c2)); top: 35%; left: 40%; opacity: 0.3; animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-14vmax, -8vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-18vmax, 12vmax) scale(1.3); } }
.grain {
  position: absolute; inset: 0; opacity: 0.09; mix-blend-mode: overlay;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 560px; height: 560px; border-radius: 50%; left: 0; top: 0;
  background: radial-gradient(circle, color-mix(in oklab, var(--c1) 22%, transparent), transparent 65%);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.4s;
}
@media (hover: hover) { .cursor-glow.on { opacity: 1; } }

/* ------------------------------------------------------------ glass */
.glass, .stage, .panel, .login, .palette-box {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}
/* Light that follows the pointer over a card. */
.stage::before, .panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, -20%), color-mix(in oklab, var(--c1) 14%, transparent), transparent 45%);
}

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  max-width: 1440px; margin: 0 auto; padding: 14px 0;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; }
.brand-disc {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; position: relative; overflow: hidden;
  background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c1));
  box-shadow: 0 0 24px color-mix(in oklab, var(--c1) 50%, transparent);
  animation: spin 8s linear infinite;
}
.brand-disc::after { content: ''; position: absolute; inset: 36%; border-radius: 50%; background: var(--bg); }
.brand-disc img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; object-fit: cover; animation: spin 8s linear infinite reverse; z-index: 1; }
.guild-name { font-family: var(--display); font-weight: 700; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.status { font-size: 0.78rem; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.status.on .dot { background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ok) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

.cmd {
  flex: 1 1 auto; max-width: 520px; margin-inline: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--stroke); color: var(--ink-3);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.2s, background 0.2s;
}
.cmd:hover { border-color: color-mix(in oklab, var(--c1) 60%, transparent); background: var(--glass-2); }
.cmd span { flex: 1; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font-family: var(--body); font-size: 0.72rem; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--stroke); background: var(--glass-2); color: var(--ink-2); }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.chip {
  background: var(--glass-2); border: 1px solid var(--stroke); border-radius: 999px;
  padding: 8px 13px; font-size: 0.84rem; font-weight: 500; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.chip:hover { background: var(--glass-3); }
.chip:active { transform: scale(0.95); }
.icon-chip { padding: 8px; display: grid; place-items: center; }
.icon-chip svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------ layout */
.layout {
  max-width: 1440px; margin: 10px auto 0;
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1.2fr) minmax(400px, 0.8fr); align-items: start; }
  .stage { position: sticky; top: 84px; }
}

/* ------------------------------------------------------------ stage */
.stage {
  border-radius: 34px; padding: clamp(20px, 3vw, 40px);
  display: grid; grid-template-columns: clamp(220px, 24vw, 330px) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 48px); align-items: center;
  overflow: hidden;
}
.stage.is-idle { grid-template-columns: minmax(0, 1fr); }

.deck { display: grid; place-items: center; }
.turntable { position: relative; width: 100%; aspect-ratio: 1; }
.ring { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); transform: rotate(-90deg); overflow: visible; cursor: pointer; touch-action: none; }
.ring .stop1 { stop-color: var(--c1); }
.ring .stop2 { stop-color: var(--c2); }
.ring-track { fill: none; stroke: var(--glass-2); stroke-width: 3; }
.ring-fill { fill: none; stroke: url(#ringGrad); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 603.19; stroke-dashoffset: 603.19; filter: drop-shadow(0 0 6px var(--c1)); transition: stroke-dashoffset 0.3s linear; }
.ring-knob { fill: #fff; filter: drop-shadow(0 0 6px var(--c2)); transform-box: view-box; transform-origin: 100px 100px; transition: transform 0.3s linear; }
.ring.live .ring-fill { stroke-dasharray: 8 14; stroke-dashoffset: 0; animation: crawl 3s linear infinite; }
.ring.live .ring-knob { display: none; }
@keyframes crawl { to { stroke-dashoffset: -220; } }

.vinyl {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 41%, rgba(0, 0, 0, 0.35) 41.5%, transparent 43%),
    repeating-radial-gradient(circle, #111018 0 2px, #17151f 2px 3px),
    #0d0c12;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 80px color-mix(in oklab, var(--c1) 30%, transparent);
  animation: spin 7s linear infinite; animation-play-state: paused;
}
.stage.playing .vinyl { animation-play-state: running; }
.grooves {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 30deg, transparent 0 10%, rgba(255, 255, 255, 0.10) 14%, transparent 20% 55%, rgba(255, 255, 255, 0.07) 60%, transparent 66%);
}
.label { position: absolute; inset: 29%; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.5); }
.label img { width: 100%; height: 100%; object-fit: cover; }
.art-empty { position: absolute; inset: 0; background: conic-gradient(from 90deg, var(--c1), var(--c2), var(--c1)); }
.spindle { position: absolute; inset: 48.6%; border-radius: 50%; background: #d8d6e0; box-shadow: 0 0 0 3px #0d0c12; }
@keyframes spin { to { transform: rotate(360deg); } }

.tonearm {
  position: absolute; top: -6%; inset-inline-end: -8%; width: 46%; height: 70%;
  transform-origin: 85% 8%; transform: rotate(-26deg); transition: transform 1.2s var(--ease);
  pointer-events: none;
}
[dir="rtl"] .tonearm { transform-origin: 15% 8%; transform: rotate(26deg); }
.tonearm::before { content: ''; position: absolute; top: 0; inset-inline-end: 6%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #e9e7f0 30%, #9b98a8 31%, #5d5a68 70%); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.tonearm span { position: absolute; top: 9%; inset-inline-end: 15%; width: 5px; height: 82%; border-radius: 3px; background: linear-gradient(#e9e7f0, #8d8a99); transform: rotate(18deg); transform-origin: top; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); }
[dir="rtl"] .tonearm span { transform: rotate(-18deg); }
.tonearm span::after { content: ''; position: absolute; bottom: -10px; left: -5px; width: 15px; height: 20px; border-radius: 3px; background: #cfccd8; }
.stage.playing .tonearm { transform: rotate(0deg); }

.meta { min-width: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }

/* The console: everything you press, across the whole card, centered. */
.console {
  grid-column: 1 / -1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding-top: 18px; border-top: 1px solid var(--stroke);
}
.console .viz { max-width: 900px; }
.console .controls { width: 100%; max-width: 820px; justify-content: center; }
.console .vol { flex: 1 1 240px; max-width: 360px; }
.console .pills { justify-content: center; }
.console .filters { flex-wrap: wrap; justify-content: center; overflow: visible; mask-image: none; max-width: 900px; }
[dir="rtl"] .console .filters { mask-image: none; }
.console .listeners { justify-content: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c2); padding: 6px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--c2) 12%, transparent); border: 1px solid color-mix(in oklab, var(--c2) 30%, transparent);
}
.eyebrow.live { color: #ff5c7a; background: rgba(255, 45, 85, 0.12); border-color: rgba(255, 45, 85, 0.35); }
.eq-mini { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.eq-mini i { width: 3px; height: 100%; background: currentColor; border-radius: 2px; transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; animation-play-state: paused; }
.eq-mini i:nth-child(2) { animation-delay: -0.3s; }
.eq-mini i:nth-child(3) { animation-delay: -0.6s; }
.stage.playing .eq-mini i { animation-play-state: running; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.title {
  margin: 0; font-family: var(--display); font-weight: 900;
  font-size: clamp(1.7rem, 3.3vw, 3.3rem); line-height: 1.04; letter-spacing: -0.025em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.title a, .title span { color: inherit; text-decoration: none; }
.marquee {
  background: linear-gradient(100deg, var(--ink) 35%, color-mix(in oklab, var(--c1) 70%, var(--ink)) 70%, var(--c2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.title.enter .marquee { animation: rise 0.9s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.artist-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.artist-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px color-mix(in oklab, var(--c1) 60%, transparent); }
.author { color: var(--ink-2); font-size: 1.08rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 0.76rem; padding: 4px 10px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--stroke);
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2);
}
.badge img { width: 16px; height: 16px; border-radius: 50%; }
.badge.why { color: var(--ink); background: linear-gradient(90deg, color-mix(in oklab, var(--c1) 22%, transparent), color-mix(in oklab, var(--c2) 18%, transparent)); border-color: color-mix(in oklab, var(--c1) 40%, transparent); }
.badge.why svg { width: 14px; height: 14px; color: var(--c2); }
.badge.air { color: var(--ink); font-weight: 600; }

/* sliders */
.scrub { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 4px; }
.time { font-variant-numeric: tabular-nums; font-size: 0.82rem; color: var(--ink-3); min-width: 3.3em; text-align: center; }
.bar { position: relative; height: 8px; border-radius: 999px; background: var(--glass-2); }
.bar.small { height: 6px; flex: 1; }
.bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c1), var(--c2)); box-shadow: 0 0 14px color-mix(in oklab, var(--c1) 60%, transparent); }
.bar input { position: absolute; inset: -8px 0; width: 100%; height: calc(100% + 16px); margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.bar input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px color-mix(in oklab, var(--c1) 35%, transparent), 0 2px 8px rgba(0, 0, 0, 0.4); transition: transform 0.15s; }
.bar input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px color-mix(in oklab, var(--c1) 35%, transparent); }
.bar input:hover::-webkit-slider-thumb { transform: scale(1.25); }
.bar input:disabled { cursor: default; }
.bar input:disabled::-webkit-slider-thumb { opacity: 0; }
[dir="rtl"] .bar input { direction: rtl; }

.viz { width: 100%; height: 64px; display: block; opacity: 0.95; }

/* transport */
.transport { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.6vw, 16px); }
.t-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--glass-2); border: 1px solid var(--stroke); color: var(--ink);
  transition: transform 0.25s var(--ease), background 0.2s, box-shadow 0.25s;
}
.t-btn svg { width: 22px; height: 22px; }
.t-btn:hover { background: var(--glass-3); transform: translateY(-2px); }
.t-btn:active { transform: scale(0.9); }
.t-btn.on { color: var(--c2); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c2) 60%, transparent), 0 0 18px color-mix(in oklab, var(--c2) 35%, transparent); }
.t-btn b { position: absolute; bottom: 9px; inset-inline-end: 10px; font-size: 0.6rem; font-weight: 800; }
.t-btn.play {
  width: 78px; height: 78px; border: 0; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 14px 40px color-mix(in oklab, var(--c1) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.t-btn.play svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)); }
.t-btn.play::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--c1) 60%, transparent); opacity: 0; }
.stage.playing .t-btn.play::after { animation: halo 2.4s ease-out infinite; }
@keyframes halo { 0% { transform: scale(0.95); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.vol { display: flex; align-items: center; gap: 10px; flex: 1 1 210px; min-width: 190px; color: var(--ink-2); }
.vol b { font-variant-numeric: tabular-nums; min-width: 2.4em; font-size: 0.85rem; color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px;
  background: var(--glass-2); border: 1px solid var(--stroke); font-size: 0.84rem; font-weight: 500;
  transition: background 0.2s, color 0.2s, box-shadow 0.25s, transform 0.15s;
}
.pill svg { width: 16px; height: 16px; }
.pill:hover { background: var(--glass-3); }
.pill:active { transform: scale(0.95); }
.pill.on { color: #fff; background: linear-gradient(135deg, color-mix(in oklab, var(--c1) 85%, #000), color-mix(in oklab, var(--c2) 75%, #000)); border-color: transparent; box-shadow: 0 6px 22px color-mix(in oklab, var(--c1) 45%, transparent); }
.pill.danger:hover { background: var(--danger); color: #fff; }
.pill.select { padding-inline-end: 6px; }
.pill select { background: transparent; border: 0; outline: none; cursor: pointer; padding: 0 4px; }
select option { background: #15131f; color: #f5f3ff; }

.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.filters::-webkit-scrollbar { display: none; }
[dir="rtl"] .filters { mask-image: linear-gradient(270deg, #000 85%, transparent); }
.filters button { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; font-size: 0.78rem; background: var(--glass); border: 1px solid var(--stroke); color: var(--ink-2); transition: all 0.2s; }
.filters button:hover { color: var(--ink); background: var(--glass-2); }
.filters button.on { color: var(--ink); border-color: color-mix(in oklab, var(--c2) 70%, transparent); background: color-mix(in oklab, var(--c2) 16%, transparent); }
.listeners { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--ink-3); }
.listeners img { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); margin-inline-start: -8px; }
.listeners img:first-child { margin-inline-start: 0; }
.listeners span { margin-inline-start: 8px; }

/* idle */
.idle { text-align: center; padding: clamp(30px, 6vw, 70px) 10px; display: grid; justify-items: center; gap: 14px; }
.idle-orb { position: relative; width: 150px; height: 150px; margin-bottom: 10px; }
.idle-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--c1) 60%, transparent); animation: orb 3.6s ease-out infinite; }
.idle-orb i:nth-child(2) { animation-delay: -1.2s; border-color: color-mix(in oklab, var(--c2) 60%, transparent); }
.idle-orb i:nth-child(3) { animation-delay: -2.4s; }
.idle-orb::after { content: ''; position: absolute; inset: 34%; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 60px var(--c1); }
@keyframes orb { 0% { transform: scale(0.35); opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } }
.idle-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.03em; background: linear-gradient(100deg, var(--ink), var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.idle p { margin: 0; color: var(--ink-2); max-width: 460px; line-height: 1.6; }
.idle-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.big-cta, .ghost-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 18px; font-weight: 700; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.big-cta { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 40px color-mix(in oklab, var(--c1) 50%, transparent); }
.big-cta:hover, .ghost-cta:hover { transform: translateY(-3px); }
.ghost-cta { background: var(--glass-2); border: 1px solid var(--stroke); }

/* ------------------------------------------------------------ panel */
.panel { border-radius: 30px; padding: 14px; min-width: 0; }
.tabs { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--glass); border: 1px solid var(--stroke); border-radius: 20px; margin-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 15px; white-space: nowrap; font-weight: 600; font-size: 0.86rem; color: var(--ink-3); transition: color 0.25s; }
.tab svg { width: 17px; height: 17px; }
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); }
.tab-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 15px; background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--stroke), 0 6px 18px rgba(0, 0, 0, 0.18); transition: left 0.45s var(--ease), width 0.45s var(--ease); }
.sheet { padding: 4px; animation: fade 0.4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 4px 12px; }
.sheet-head.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-3); font-size: 0.86rem; line-height: 1.55; }

.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.track { display: grid; grid-template-columns: 2em 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 14px; transition: background 0.2s; animation: fade 0.35s var(--ease) both; }
.track:hover { background: var(--glass-2); }
.track.dragging { opacity: 0.35; }
.track.drop-before { box-shadow: inset 0 3px 0 var(--c2); }
.track .num { text-align: center; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 0.8rem; cursor: grab; touch-action: none; user-select: none; }
.track img, .track .ph { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: linear-gradient(135deg, var(--glass-2), var(--glass-3)); }
.track .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .s { color: var(--ink-3); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .s .spark { color: var(--c2); }
.track .acts { display: flex; gap: 4px; align-items: center; }
.track .acts button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 10px; font-size: 0.78rem; font-weight: 600; background: var(--glass); border: 1px solid var(--stroke); opacity: 0.75; transition: opacity 0.2s, background 0.2s; }
.track .acts button svg { width: 15px; height: 15px; }
.track:hover .acts button { opacity: 1; }
.track .acts button:hover { background: var(--glass-3); }
.track .d { color: var(--ink-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; margin-inline-end: 4px; }
.empty { padding: 30px 10px; text-align: center; color: var(--ink-3); }

.search { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.search input { flex: 1 1 200px; background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 12px 15px; outline: none; transition: border-color 0.2s; }
.search input:focus { border-color: color-mix(in oklab, var(--c1) 70%, transparent); }
.search select { background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 0 12px; }
.primary { color: #fff; border-radius: 14px; padding: 11px 18px; font-weight: 700; background: linear-gradient(135deg, var(--c1), color-mix(in oklab, var(--c1) 50%, var(--c2))); box-shadow: 0 8px 22px color-mix(in oklab, var(--c1) 40%, transparent); }

/* stations */
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
.station {
  position: relative; text-align: start; padding: 8px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--stroke);
  transition: transform 0.35s var(--ease), background 0.25s, box-shadow 0.35s;
  animation: fade 0.4s var(--ease) both;
}
.station:hover { transform: translateY(-4px) rotate(-0.6deg); background: var(--glass-2); }
.station img { width: 100%; aspect-ratio: 1; border-radius: 16px; object-fit: cover; }
.station .sn { font-weight: 700; margin: 9px 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station .st { font-size: 0.76rem; color: var(--ink-3); margin: 1px 4px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station.playing { box-shadow: 0 0 0 2px var(--sc1), 0 18px 40px color-mix(in oklab, var(--sc1) 40%, transparent); }
.station.playing::after { content: 'LIVE'; position: absolute; top: 16px; inset-inline-start: 16px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; color: #fff; background: #ff2d55; padding: 3px 8px; border-radius: 999px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.55; } }
.star { position: absolute; top: 14px; inset-inline-end: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(6px); transition: color 0.2s, transform 0.2s; }
.star svg { width: 16px; height: 16px; }
.star:hover { transform: scale(1.12); color: #fff; }
.star.on { color: #ffd166; }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--ink-2); }
.switch span { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--glass-3); transition: background 0.25s; flex-shrink: 0; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.switch[aria-checked="true"] span { background: linear-gradient(135deg, var(--c1), var(--c2)); }
.switch[aria-checked="true"] span::after { transform: translateX(18px); }
[dir="rtl"] .switch[aria-checked="true"] span::after { transform: translateX(-18px); }
.switch b { font-weight: 600; }
.switches { display: flex; flex-wrap: wrap; gap: 10px 18px; }

/* lyrics */
.lyrics { max-height: 62vh; overflow-y: auto; padding: 30px 8px; scroll-behavior: smooth; text-align: center; mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); scrollbar-width: none; }
.lyrics::-webkit-scrollbar { display: none; }
.lyrics p { margin: 0; padding: 8px 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.45rem); line-height: 1.35; color: var(--ink-3); transition: color 0.35s, transform 0.45s var(--ease), opacity 0.35s, filter 0.35s; opacity: 0.55; filter: blur(0.4px); }
.lyrics p.past { opacity: 0.28; }
.lyrics p.now { opacity: 1; filter: none; transform: scale(1.08); background: linear-gradient(90deg, var(--ink), var(--c2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lyrics pre { white-space: pre-wrap; font: inherit; line-height: 1.8; color: var(--ink-2); text-align: center; }

.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.plist .acts { display: flex; gap: 6px; flex-shrink: 0; }
.plist .acts button { background: var(--glass-2); border-radius: 10px; padding: 7px 11px; font-size: 0.8rem; font-weight: 600; }

/* profile preview, shaped like Discord's popout */
.profile-card { border-radius: 22px; overflow: hidden; background: #111018; border: 1px solid var(--stroke); max-width: 420px; margin: 4px auto 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); color: #f2f3f5; }
.pc-banner { aspect-ratio: 17 / 6; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.pc-banner img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { position: relative; padding: 52px 18px 18px; }
.pc-avatar { position: absolute; top: -46px; inset-inline-start: 16px; width: 92px; height: 92px; border-radius: 50%; padding: 6px; background: #111018; }
.pc-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #2b2d31; }
.pc-name { font-weight: 800; font-size: 1.2rem; }
.pc-bio { color: #b5bac1; font-size: 0.88rem; margin-top: 6px; min-height: 1.2em; }

/* health */
.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.health-grid > div { background: var(--glass); border: 1px solid var(--stroke); border-radius: 18px; padding: 14px 16px; }
.health-grid h3 { margin: 0 0 8px; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c2); }
.health-grid ul { margin: 0; padding-inline-start: 18px; font-size: 0.86rem; line-height: 1.65; }
.log { font-family: ui-monospace, Consolas, monospace; font-size: 0.74rem; white-space: pre-wrap; max-height: 260px; overflow: auto; background: rgba(0, 0, 0, 0.35); border-radius: 14px; padding: 12px; margin-top: 12px; direction: ltr; text-align: left; color: #d7d4e4; }

/* admin */
.admin-bar {
  max-width: 1440px; margin: 2px auto 8px; padding: 8px 12px; border-radius: 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  background: var(--panel); border: 1px solid var(--stroke);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 0.86rem; color: var(--ink-2);
}
.admin-bar label { display: inline-flex; align-items: center; gap: 8px; }
.admin-bar select { background: var(--glass-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 7px 10px; max-width: 60vw; }
.admin-tag { font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.7rem; color: #fff; padding: 5px 10px; border-radius: 999px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.admin-form { display: flex; gap: 8px; margin-top: 14px; }
.admin-form input { flex: 1; min-width: 0; background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 12px 14px; outline: none; }
.admin-form input:focus { border-color: color-mix(in oklab, var(--c1) 70%, transparent); }

/* login */
.login { max-width: 480px; margin: 12vh auto 0; padding: 40px 32px; text-align: center; border-radius: 32px; }
.login-disc { width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; background: radial-gradient(circle, var(--bg) 9%, transparent 10%), conic-gradient(var(--c1), var(--c2), var(--c1)); animation: spin 6s linear infinite; box-shadow: 0 0 60px color-mix(in oklab, var(--c1) 55%, transparent); }
.login h2 { margin: 0 0 10px; font-family: var(--display); font-size: 1.5rem; }
.login p { color: var(--ink-2); line-height: 1.6; }
.error { color: var(--danger) !important; }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 50; background: rgba(5, 4, 10, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 11vh 16px 16px; animation: fade 0.25s ease; }
.palette-box { width: min(640px, 100%); border-radius: 24px; overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--stroke); }
.palette-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 1.1rem; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; }
.palette-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; cursor: pointer; }
.palette-list li.sel, .palette-list li:hover { background: var(--glass-2); }
.palette-list li.sel { box-shadow: inset 3px 0 0 var(--c1); }
.palette-list img, .palette-list .ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--glass-2); }
.palette-list .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list .s { font-size: 0.8rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list .d { font-size: 0.78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.palette-foot { padding: 10px 18px; border-top: 1px solid var(--stroke); font-size: 0.76rem; color: var(--ink-3); }

.toast {
  position: fixed; bottom: 22px; left: 50%; z-index: 60; transform: translate(-50%, 140px);
  background: var(--panel); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--ink); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  padding: 12px 18px; border-radius: 16px; max-width: calc(100vw - 32px); transition: transform 0.45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }
.toast.bad { border-color: var(--danger); }

/* ------------------------------------------------------------ small screens */
@media (max-width: 820px) {
  .stage, .stage.is-idle { grid-template-columns: minmax(0, 1fr); text-align: center; border-radius: 28px; }
  .topbar { gap: 10px; }
  .turntable { width: min(68vw, 300px); margin: 12px auto 4px; }
  .meta { align-items: stretch; }
  .eyebrow { align-self: center; }
  .artist-row, .badges, .pills, .listeners { justify-content: center; }
  .title { font-size: clamp(1.6rem, 7.5vw, 2.4rem); }
  .controls { justify-content: center; }
}
@media (max-width: 640px) {
  body { padding: 0 12px 100px; }
  .cmd span, .cmd kbd { display: none; }
  .cmd { flex: 0 0 auto; margin-inline: auto 0; padding: 10px; }
  .guild-name { max-width: 40vw; }
  #logoutBtn { display: none; }
  .track { grid-template-columns: 1.6em 42px minmax(0, 1fr) auto; gap: 9px; }
  .track img, .track .ph { width: 42px; height: 42px; }
  .track .d { display: none; }
  .tab span { display: none; }
  .tab { padding: 10px 12px; }
  .tab.active span { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
