/* ============================================================
   Symphony Console — navy & antique gold
   ============================================================ */
:root {
  --bg: #0a1220;
  --bg-2: #0f1a2e;
  --panel: rgba(17, 29, 49, 0.62);
  --panel-solid: rgba(16, 27, 46, 0.97);
  --line-rgb: 170, 195, 230;
  --line: rgba(var(--line-rgb), 0.10);
  --line-strong: rgba(var(--line-rgb), 0.2);
  --text: #e8edf5;
  --text-rgb: 232, 237, 245;
  --muted: #9dadc3;
  --faint: #677a93;
  --accent: #8aaedc;
  --accent-deep: #5b82bb;
  --accent-rgb: 138, 174, 220;
  --accent-deep-rgb: 91, 130, 187;
  --gold: #c9a96e;
  --gold-rgb: 201, 169, 110;
  --gold-light: #f3dfae;
  --gold-light-rgb: 255, 244, 220;
  --gold-deep: #9c7f4a;
  --gold-text: #ecdcb9;
  --gold-soft: rgba(var(--gold-rgb), 0.16);
  --on-gold: #1a1408;
  --title: #f3efe6;
  --play-b: #d9d2c2;
  --deep-rgb: 8, 14, 26;
  --surface: #16233a;
  --surface-2: #1d2d48;
  --grad-a: #1e3050;
  --grad-b: #121e34;
  --hero-a: rgba(30, 48, 80, .7);
  --hero-b: rgba(14, 22, 38, .7);
  --danger: #e58a8a;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(var(--line-rgb), .16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--line-rgb), .14); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--line-rgb), .26); }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.display { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.sub { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- background ---------- */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(var(--accent-deep-rgb), .22), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(var(--gold-rgb), .10), transparent 60%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(var(--deep-rgb), .55) 100%);
}
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.panel-solid { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .75); }

/* logo: the animated chrome Symphony avatar (same as the bot's Discord picture) */
.logo { display: block; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(var(--gold-rgb), .55), 0 14px 40px -10px rgba(0, 0, 0, .8), 0 0 36px -6px rgba(var(--gold-rgb), .35); }
.logo.small { width: 34px; height: 34px; margin: 0; flex: none; box-shadow: 0 0 0 1.5px rgba(var(--gold-rgb), .55); }
@keyframes bar { from { height: 30%; } to { height: 100%; } }

/* ---------- login ---------- */
.login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 24px; overflow: auto; }
.login-card { width: min(460px, 100%); padding: 44px 38px; text-align: center; animation: rise .8s var(--ease) both; }
.login-card h1 { font-size: clamp(38px, 6vw, 52px); line-height: 1; margin: 10px 0 14px; color: var(--title); }
.lead { color: var(--muted); margin: 0 auto 28px; max-width: 36ch; }
.btn-discord {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 26px; border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none;
  background: linear-gradient(135deg, #5865f2, #4a5fb8); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 30px -10px rgba(88, 101, 242, .8); transition: transform .25s var(--ease), box-shadow .25s;
}
.btn-discord svg { width: 22px; height: 22px; }
.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -10px rgba(88, 101, 242, 1); }
.login-error { color: var(--danger); margin: 18px 0 0; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- layout ---------- */
.app {
  position: relative; z-index: 1; height: 100dvh; padding: 12px; gap: 12px; overflow: hidden;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 360px;
  grid-template-rows: 64px minmax(0, 1fr) 92px;
  grid-template-areas: "top top top" "servers stage side" "player player player";
}
.app > * { min-width: 0; min-height: 0; }
.topbar { grid-area: top; display: flex; align-items: center; gap: 18px; padding: 0 14px 0 18px; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-name { font-size: 24px; color: var(--title); }
.nav-back { flex: none; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .35); background: var(--gold-soft); margin-right: -4px; }
.nav-back:hover { color: var(--gold-light); border-color: var(--gold); }
.user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold); }
.user span { font-weight: 600; font-size: 13.5px; }

/* ---------- search ---------- */
.search { position: relative; flex: 1; max-width: 620px; margin: 0 auto; }
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 42px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(var(--deep-rgb), .5); outline: none; transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: rgba(var(--gold-rgb), .55); box-shadow: 0 0 0 3px var(--gold-soft); }
.search input::placeholder { color: var(--faint); }
.search-icon { position: absolute; left: 14px; top: 11px; width: 20px; height: 20px; fill: var(--muted); }
.search-results { position: absolute; top: 50px; left: 0; right: 0; padding: 10px; animation: pop .2s var(--ease); }
.search-body { max-height: min(62vh, 560px); overflow: auto; margin-top: 8px; }
.search-group { margin: 4px 0 10px; }
.search-group h5 { margin: 8px 8px 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.search-hint { padding: 14px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(var(--deep-rgb), .45); border: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: none; padding: 7px 10px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .2s, color .2s; }
.tabs button[aria-selected="true"] { background: rgba(var(--accent-rgb), .16); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.tabs button:hover { color: var(--text); }
.tabs.small button { padding: 5px 8px; font-size: 12.5px; }

/* one row of a list: song or playlist */
.row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 7px 8px;
  border: 0; border-radius: 12px; background: none; text-align: left; transition: background .15s;
}
.row:hover, .row.active { background: rgba(var(--accent-rgb), .09); }
.row .thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.row .thumb.round { border-radius: 50%; }
.row .text { min-width: 0; }
.row strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .actions { display: flex; align-items: center; gap: 2px; }
.row time, .row .count { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.row .hover-only { display: none; }
.row:hover .hover-only, .row:focus-within .hover-only { display: flex; }
.row:hover time, .row:focus-within time { display: none; }
.row.enter { animation: slide-in .45s var(--ease) both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } }
.line { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12.5px; }
.line .src { flex: none; display: inline-flex; }
.line .src svg { width: 14px; height: 14px; }
.line .artist { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { flex: none; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 17px; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(var(--gold-rgb), .3); }
.num { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.skeleton { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton-line { height: 10px; border-radius: 6px; margin: 5px 0; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* ---------- servers ---------- */
.servers { grid-area: servers; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; overflow-y: auto; }
.server {
  position: relative; width: 48px; height: 48px; border-radius: 16px; border: 1px solid var(--line); padding: 0; background: rgba(var(--accent-rgb), .08);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; transition: border-radius .25s var(--ease), box-shadow .25s;
}
.server img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.server:hover { border-radius: 12px; }
.server.selected { border-radius: 12px; border-color: transparent; box-shadow: 0 0 0 2px var(--gold); }
.server.live::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #6fcf97; border: 3px solid var(--bg-2); }

/* ---------- stage ---------- */
.stage { grid-area: stage; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 4px 8px; }
.hero { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); padding: 18px clamp(8px, 2vw, 22px) 8px; }
.art-wrap { position: relative; flex: none; width: clamp(170px, 18vw, 230px); aspect-ratio: 1; perspective: 900px; margin-right: clamp(56px, 6vw, 80px); /* room for the vinyl */ }
.art-card {
  position: relative; width: 100%; height: 100%; border-radius: 16px; overflow: hidden; z-index: 2;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(var(--gold-rgb), .25);
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
}
.art-card img { width: 100%; height: 100%; object-fit: cover; }
.art-card.swap { animation: fade-in .7s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: scale(.94); } }
.vinyl {
  position: absolute; top: 6%; left: 6%; width: 88%; height: 88%; border-radius: 50%; z-index: 1; transition: transform .9s var(--ease);
  background: conic-gradient(from 30deg, transparent 0 20%, rgba(255, 255, 255, .1) 25%, transparent 30% 70%, rgba(255, 255, 255, .07) 75%, transparent 80%),
              repeating-radial-gradient(circle, var(--surface) 0 2px, var(--surface-2) 2px 4px);
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}
.vinyl-label { position: absolute; inset: 36%; border-radius: 50%; background: radial-gradient(circle, var(--gold) 0 30%, var(--gold-deep) 70%); }
.vinyl-label::after { content: ""; position: absolute; inset: 44%; border-radius: 50%; background: var(--bg); }
body.has-track .vinyl { transform: translateX(34%); }
body.playing .vinyl { animation: spin-out 4s linear infinite; }
@keyframes spin-out { from { transform: translateX(34%) rotate(0); } to { transform: translateX(34%) rotate(360deg); } }

.meta { min-width: 0; flex: 1; }
.now-label { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; height: 35%; border-radius: 1px; background: var(--gold); }
body.playing .eq i { animation: bar .9s ease-in-out infinite alternate; }
body.playing .eq i:nth-child(2) { animation-delay: -.3s; }
body.playing .eq i:nth-child(3) { animation-delay: -.6s; }
body.playing .eq i:nth-child(4) { animation-delay: -.15s; }
.source-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; background: rgba(var(--accent-rgb), .1); letter-spacing: 0; text-transform: none; font-size: 12px; color: var(--text); }
.source-badge:empty { display: none; }
.source-badge svg { width: 17px; height: 17px; }
.track-title {
  font-size: clamp(32px, 4vw, 54px); line-height: 1.02; margin: 10px 0 6px; color: var(--title);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.track-artist { color: var(--muted); font-size: 17px; margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; background: rgba(var(--accent-rgb), .08); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); max-width: 100%; }
.chip img { width: 18px; height: 18px; border-radius: 50%; }
.hero-actions { display: flex; gap: 8px; margin-top: 14px; }
.notice { margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid rgba(var(--gold-rgb), .32); color: var(--gold-text); font-size: 13.5px; max-width: 540px; }

/* ---------- discover ---------- */
.discover { padding: 6px clamp(8px, 2vw, 22px) 10px; }
.discover h3 { margin: 2px 0 6px; font-size: 26px; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title { margin: 14px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: 156px; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.card { position: relative; border: 0; padding: 0; background: none; text-align: left; scroll-snap-align: start; }
.card .cover { position: relative; width: 156px; height: 156px; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .9); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .cover img { transform: scale(1.06); }
.card .overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 8px; background: linear-gradient(to top, rgba(var(--deep-rgb), .85), transparent 55%); opacity: 0; transition: opacity .2s; }
.card:hover .overlay, .card:focus-within .overlay { opacity: 1; }
.card .play-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--gold); color: var(--on-gold); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); transition: transform .2s var(--ease); }
.card .play-dot svg { width: 20px; height: 20px; fill: currentColor; }
.card .play-dot:hover { transform: scale(1.08); }
.card .overlay .icon-btn { background: rgba(var(--deep-rgb), .6); color: var(--text); }
.card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.card span { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.skeleton-card .cover { animation: shimmer 1.3s linear infinite; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; }
.card .cover .cover-img, .card .cover .ph { width: 100%; height: 100%; object-fit: cover; }
.card .cover .ph { font-size: 42px; }
.card.artist .cover { border-radius: 50%; }
.card.artist strong, .card.artist span { text-align: center; }
.skeleton-line.short { width: 60%; }

/* shelves: song quick-picks grid (3 rows, scrolls sideways) */
.shelf { margin-bottom: 8px; }
.quick-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: minmax(260px, 310px); gap: 4px 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.quick { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 10px; cursor: pointer; scroll-snap-align: start; transition: background .15s; }
.quick:hover, .quick:focus-visible { background: rgba(var(--accent-rgb), .09); }
.quick .thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.quick .text { min-width: 0; }
.quick strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-actions { display: flex; opacity: 0; transition: opacity .15s; }
.quick:hover .quick-actions, .quick:focus-within .quick-actions { opacity: 1; }

/* artwork placeholders (missing or failed covers) */
.ph {
  display: grid; place-items: center; overflow: hidden; color: var(--gold); font-family: var(--serif); font-weight: 600; letter-spacing: .04em;
  background: radial-gradient(circle at 30% 25%, rgba(var(--gold-rgb), .18), transparent 60%), linear-gradient(135deg, var(--grad-a), var(--grad-b));
}
.thumb.ph { font-size: 15px; }
.chip-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; font-size: 8px; }
.pl-cover { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; font-size: 20px; flex: none; }
.server .server-icon { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.server .server-icon.ph { background: none; color: var(--text); font-family: var(--ui); font-size: 13px; letter-spacing: 0; }
.art-card.empty img { display: none; }
.art-card.empty::after {
  content: "♪"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 96px; color: var(--gold);
  background: radial-gradient(circle at 30% 25%, rgba(var(--gold-rgb), .2), transparent 60%), linear-gradient(135deg, var(--grad-a), var(--grad-b));
}
.mini img.empty, .mini img:not([src]) { visibility: hidden; }
.mini img { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.empty { color: var(--muted); text-align: center; padding: 34px 16px; font-size: 13.5px; }
.empty .big { display: block; font-size: 30px; margin-bottom: 6px; }

/* ---------- side panel ---------- */
.side { grid-area: side; display: flex; flex-direction: column; padding: 12px; gap: 10px; }
.tab-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 8px; }
.head-actions { display: flex; gap: 4px; }
.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overflow-x: hidden; flex: 1; }
.list .row { grid-template-columns: 20px 44px minmax(0, 1fr) auto; }
.list .thumb { width: 44px; height: 44px; }
.pill-btn { border: 1px solid rgba(var(--gold-rgb), .45); background: var(--gold-soft); color: var(--gold-text); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill-btn:hover:not(:disabled) { background: rgba(var(--gold-rgb), .28); }
.pill-btn:disabled { opacity: .4; cursor: not-allowed; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); padding: 4px 6px; font-weight: 600; font-size: 13px; }
.back-btn:hover { color: var(--text); }
.pl-detail-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px; }
.pl-detail-head img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface); }
.pl-detail-head h4 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.pl-detail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------- buttons ---------- */
.icon-btn {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: var(--muted);
  transition: color .2s, background .2s, transform .2s var(--ease);
}
.icon-btn svg { width: 21px; height: 21px; fill: currentColor; }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn:hover:not(:disabled) { color: var(--text); background: rgba(var(--accent-rgb), .12); }
.icon-btn.on { color: var(--gold); }
.icon-btn.on::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.icon-btn.fav-on { color: #e7a0a8; }
.icon-btn:disabled, .play-btn:disabled { opacity: .35; cursor: not-allowed; }
.text-btn { border: 0; background: none; color: var(--gold); font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.text-btn:hover:not(:disabled) { background: var(--gold-soft); }
.text-btn:disabled { opacity: .4; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--accent-rgb), .08); color: var(--text); font-size: 13px; font-weight: 600; transition: background .2s, border-color .2s; }
.hero-btn svg { width: 17px; height: 17px; fill: currentColor; }
.hero-btn:hover { background: rgba(var(--accent-rgb), .16); }
.hero-btn.fav-on { color: #f0b8bf; border-color: rgba(231, 160, 168, .45); }

/* ---------- player bar ---------- */
.player { grid-area: player; position: relative; z-index: 46; /* stays usable above the lyrics view */ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 20px; }
.mini { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; background: var(--surface); flex: none; }
.mini-text { min-width: 0; }
.mini-text strong, .mini-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text strong { font-size: 13.5px; }
.mini-text span { color: var(--muted); font-size: 12.5px; }
.transport { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.buttons { display: flex; align-items: center; gap: 12px; }
.play-btn {
  position: relative; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(var(--gold-rgb), .6); display: grid; place-items: center;
  color: var(--on-gold); background: linear-gradient(145deg, var(--title), var(--play-b)); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .8); transition: transform .2s var(--ease);
}
.play-btn svg { width: 24px; height: 24px; fill: currentColor; }
.play-btn:hover:not(:disabled) { transform: scale(1.06); }
.progress-row { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 640px; }
.time { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; }
.progress { position: relative; flex: 1; height: 5px; border-radius: 999px; background: rgba(var(--line-rgb), .16); cursor: pointer; transition: height .15s; touch-action: none; }
.progress:hover, .progress.dragging { height: 7px; }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-deep), var(--accent) 70%, var(--gold)); }
.progress-knob { position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--title); border: 2px solid var(--gold); transform: translateY(-50%) scale(0); transition: transform .15s; }
.progress:hover .progress-knob, .progress.dragging .progress-knob { transform: translateY(-50%) scale(1); }
.progress.locked { cursor: default; }
.controls-side { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.volume { display: flex; align-items: center; gap: 2px; }
#volume { width: 104px; accent-color: var(--gold); }
.vol-level { min-width: 44px; padding: 2px 7px; border-radius: 999px; text-align: center; font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--muted); transition: color .2s, background .2s, transform .2s var(--ease); }
.vol-level.active { color: rgb(var(--deep-rgb)); background: var(--gold); transform: scale(1.08); }
.vol-level.boost { color: var(--gold-light); }
.vol-level.active.boost { color: rgb(var(--deep-rgb)); background: var(--gold-light); }

/* ---------- popovers ---------- */
.popover { position: fixed; z-index: 40; padding: 16px; animation: pop .2s var(--ease); }
#filters-pop { right: 24px; bottom: 116px; width: min(460px, calc(100vw - 32px)); }
#filters-pop .section-head { display: flex; align-items: center; justify-content: space-between; }
#filters-pop h3 { margin: 0; font-size: 24px; color: var(--title); }
#filters-pop .sub { margin: 2px 0 12px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.filter {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--radius-sm); text-align: center;
  border: 1px solid var(--line); background: rgba(var(--accent-rgb), .05); font-size: 12px; font-weight: 600; transition: border-color .2s, background .2s;
}
.filter .fx { font-size: 20px; line-height: 1; }
.filter:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(var(--accent-rgb), .1); }
.filter.on { border-color: rgba(var(--gold-rgb), .7); background: var(--gold-soft); color: var(--gold-text); }
.filter:disabled { opacity: .4; cursor: not-allowed; }
.menu { width: 240px; padding: 6px; max-height: 320px; overflow-y: auto; }
.menu h5 { margin: 6px 10px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; text-align: left; font-size: 13.5px; }
.menu button:hover { background: rgba(var(--accent-rgb), .12); }
.menu .muted { color: var(--muted); }

/* ---------- toasts & motion ---------- */
.toasts { position: fixed; right: 20px; bottom: 116px; z-index: 50; display: grid; gap: 10px; }
.toast { padding: 11px 15px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 12px 34px rgba(0, 0, 0, .5); max-width: 360px; font-size: 13.5px; animation: toast-in .3s var(--ease); }
.toast.error { border-color: rgba(229, 138, 138, .5); }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .app { grid-template-columns: 70px minmax(0, 1fr) 320px; } }
@media (max-width: 1100px) {
  .brand-name { display: none; }
  .controls-side #volume { width: 80px; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  .app {
    height: auto; min-height: 100dvh; padding: 10px 10px 190px; overflow: visible;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto;
    grid-template-areas: "top" "servers" "stage" "side";
  }
  .topbar { flex-wrap: wrap; padding: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .user span { display: none; }
  .brand-name { display: inline; font-size: 20px; }
  .servers { flex-direction: row; padding: 10px 14px; overflow-x: auto; overflow-y: hidden; }
  .stage { overflow: visible; }
  .hero { flex-direction: column; text-align: center; }
  .now-label, .chips, .hero-actions { justify-content: center; }
  .side { max-height: 75vh; }
  .player { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 20; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px; }
  .mini { display: none; }
  .controls-side { justify-content: center; flex-wrap: wrap; row-gap: 2px; }  /* nine buttons + volume: wrap, never overflow */
  #filters-pop { right: 16px; bottom: 200px; }
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toasts { bottom: 200px; left: 12px; right: 12px; }
  .art-wrap { margin-right: 0; margin-bottom: 8px; }
  body.has-track .vinyl { transform: none; }
  body.playing .vinyl { animation: none; }
}
/* ============================================================
   Motion & 3D layer
   ============================================================ */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

/* where the music plays */
.output-switch { position: relative; display: flex; padding: 3px; border-radius: 999px; background: rgba(var(--deep-rgb), .55); border: 1px solid var(--line-strong); flex: none; }
.output-switch button { position: relative; z-index: 1; border: 0; background: none; padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .25s; }
.output-switch button[aria-checked="true"] { color: var(--on-gold); }
.switch-glider { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 4px 16px rgba(var(--gold-rgb), .45); transition: transform .45s var(--ease); }
.output-switch.device .switch-glider { transform: translateX(100%); }

/* 3D equaliser ring around the album art */
#halo { position: absolute; left: 50%; top: 50%; width: 176%; height: 176%; transform: translate(-50%, -47%); z-index: 0; pointer-events: none; }
.hero { padding-left: clamp(44px, 4.5vw, 70px); padding-top: 34px; padding-bottom: 26px; }
.art-wrap { margin-right: clamp(80px, 8vw, 116px); }
.art-wrap .vinyl, .art-wrap .art-card { z-index: 2; }
.art-wrap .vinyl { z-index: 1; }
body.playing .art-card { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 24px 70px -18px rgba(0, 0, 0, .8), 0 0 42px -6px rgba(var(--gold-rgb), .45), 0 0 0 1px rgba(var(--gold-rgb), .45); } }

/* "This device": YouTube's player (kept visible, as YouTube requires) takes the album art's place */
.yt-box { position: relative; flex: none; width: clamp(300px, 32vw, 460px); aspect-ratio: 16 / 9; min-height: 200px; border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(var(--gold-rgb), .45), 0 0 40px -10px rgba(var(--accent-rgb), .45); }
.yt-box iframe, .yt-box #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.yt-box::before { content: "♪  Pick a song — it plays right here"; position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center;
  font-family: var(--serif); font-size: 20px; color: var(--gold); background: radial-gradient(circle at 30% 25%, rgba(var(--gold-rgb), .18), transparent 60%), linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
body.device-mode:not(.has-track) .yt-box iframe { opacity: 0; }
body.device-mode .art-wrap { display: none; }
body:not(.device-mode) .yt-box { display: none !important; }

/* tilt + glare (cards, covers) */
[data-tilt] { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s var(--ease); transform-style: preserve-3d; will-change: transform; }
[data-tilt].tilting { transition: transform .08s linear; }
[data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(var(--gold-light-rgb), .35), transparent 50%); mix-blend-mode: soft-light; }
[data-tilt].tilting::after { opacity: 1; }

/* scroll-in reveal */
.reveal { opacity: 0; transform: translateY(26px) scale(.985); }
.reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.card-row .card, .quick-grid .quick { animation: rise-in .6s var(--ease) both; }
.card-row .card:nth-child(2), .quick-grid .quick:nth-child(4) { animation-delay: .05s; }
.card-row .card:nth-child(3), .quick-grid .quick:nth-child(7) { animation-delay: .1s; }
.card-row .card:nth-child(4), .quick-grid .quick:nth-child(10) { animation-delay: .15s; }
.card-row .card:nth-child(5), .quick-grid .quick:nth-child(13) { animation-delay: .2s; }
.card-row .card:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }

/* magnetic play buttons + shimmering title */
.play-btn { transform: translate(var(--mx, 0), var(--my, 0)); transition: transform .25s var(--ease); }
.play-btn:hover:not(:disabled) { transform: translate(var(--mx, 0), var(--my, 0)) scale(1.07); }
body.playing .play-btn { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), .55), 0 8px 22px -8px rgba(0, 0, 0, .8); animation: halo-pulse 2.2s ease-out infinite; }
@keyframes halo-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), .5), 0 8px 22px -8px rgba(0, 0, 0, .8); } 100% { box-shadow: 0 0 0 16px rgba(var(--gold-rgb), 0), 0 8px 22px -8px rgba(0, 0, 0, .8); } }
.track-title {
  background: linear-gradient(100deg, var(--title) 0%, var(--title) 40%, var(--gold-light) 50%, var(--title) 60%, var(--title) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.brand-name { background: linear-gradient(100deg, var(--title) 30%, var(--gold-light) 50%, var(--title) 70%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 8s ease-in-out infinite; }
.card .play-dot { transform: translate(var(--mx, 0), var(--my, 0)); }

/* live lyrics */
.lyrics-overlay {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; padding: clamp(16px, 4vw, 48px) clamp(16px, 8vw, 140px) 120px;
  background: radial-gradient(900px 600px at 50% 0%, rgba(var(--accent-deep-rgb), .25), transparent 70%), rgba(var(--deep-rgb), .86);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: fade-up .45s var(--ease);
}
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } }
.lyrics-head { display: flex; align-items: center; gap: 16px; max-width: 900px; width: 100%; margin: 0 auto 16px; }
.lyrics-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface); }
.lyrics-head > div { flex: 1; min-width: 0; }
.lyrics-head h3 { margin: 2px 0 0; font-size: 26px; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lyrics-body { flex: 1; overflow-y: auto; max-width: 900px; width: 100%; margin: 0 auto; padding: 30vh 0; scroll-behavior: smooth; mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.lyric { margin: 0; padding: 8px 0; font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3.4vw, 42px); line-height: 1.25; color: rgba(var(--text-rgb), .32);
  transform-origin: left center; transition: color .35s, transform .35s var(--ease), text-shadow .35s; cursor: default; }
.lyric.past { color: rgba(var(--text-rgb), .55); }
.lyric.now { color: var(--gold-light); transform: scale(1.06); text-shadow: 0 0 24px rgba(var(--gold-rgb), .55); }
.lyrics-body.seekable .lyric { cursor: pointer; }
.lyrics-body.seekable .lyric:hover { color: rgba(var(--text-rgb), .8); }
.lyrics-plain { white-space: pre-wrap; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 30px); line-height: 1.6; color: rgba(var(--text-rgb), .85); }
.lyrics-empty { text-align: center; color: var(--muted); font-size: 16px; }
.lyrics-empty .big { display: block; font-size: 48px; margin-bottom: 10px; }

/* ============================================================
   Pages: rail navigation, artist profiles, stats, about
   ============================================================ */
.servers { justify-content: space-between; }
.server-list { display: flex; flex-direction: column; align-items: center; gap: 12px; overflow-y: auto; min-height: 0; }
.view { animation: fade-up .45s var(--ease); }
.clickable-artist { cursor: pointer; text-decoration: underline transparent; transition: color .2s, text-decoration-color .2s; }
.clickable-artist:hover { color: var(--gold); text-decoration-color: currentColor; }

/* artist profile */
.artist-hero { position: relative; display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding: 34px clamp(12px, 3vw, 36px) 26px; margin: 8px 4px 10px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(700px 300px at 15% 0%, rgba(var(--gold-rgb), .18), transparent 70%), linear-gradient(135deg, var(--hero-a), var(--hero-b)); border: 1px solid var(--line); }
.artist-photo { width: clamp(140px, 16vw, 210px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; flex: none; font-size: 56px;
  box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .8), 0 0 0 3px rgba(var(--gold-rgb), .55), 0 0 60px -10px rgba(var(--gold-rgb), .5); }
.artist-hero h2 { margin: 6px 0 4px; font-size: clamp(34px, 4.6vw, 62px); line-height: 1; color: var(--title); }
.artist-meta { color: var(--muted); margin: 0 0 12px; }
.artist-bio { color: var(--muted); max-width: 70ch; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.artist-bio.open { -webkit-line-clamp: unset; }
.artist-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gold-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0; font-weight: 700; color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 8px 24px -8px rgba(var(--gold-rgb), .7); transition: transform .2s var(--ease); }
.gold-btn:hover { transform: translateY(-2px); }
.gold-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* stats */
.stats-head { display: flex; align-items: center; gap: 20px; padding: 26px clamp(12px, 3vw, 30px); margin: 8px 4px 14px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(700px 300px at 10% 0%, rgba(var(--accent-rgb), .2), transparent 70%), linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.stats-head .guild-icon { width: 84px; height: 84px; border-radius: 22px; object-fit: cover; flex: none; font-size: 28px; box-shadow: 0 0 0 2px rgba(var(--gold-rgb), .5); }
.stats-head h2 { margin: 4px 0; font-size: clamp(28px, 3.4vw, 44px); color: var(--title); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); background: rgba(var(--accent-rgb), .09); border: 1px solid var(--line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 4px 16px; }
.tile { position: relative; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.tile .label { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.tile .value { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.05; margin-top: 6px; color: var(--title); }
.tile .value small { font-family: var(--ui); font-size: 14px; color: var(--muted); font-weight: 500; }
.tile .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tile.me { border-color: rgba(var(--gold-rgb), .45); background: linear-gradient(135deg, rgba(var(--gold-rgb), .12), var(--panel)); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 0 4px 16px; }
.stat-card { padding: 16px 16px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.stat-card h4 { margin: 0 0 12px; font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--title); }
.stat-card.wide { grid-column: 1 / -1; }
.lb-row { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 10px; }
.lb-row:hover { background: rgba(var(--accent-rgb), .07); }
.lb-row .thumb, .lb-row .avatar { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; font-size: 12px; }
.lb-row .avatar { border-radius: 50%; }
.lb-row .who { min-width: 0; }
.lb-row .who strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .meter { height: 4px; border-radius: 4px; margin-top: 5px; background: rgba(var(--line-rgb), .12); overflow: hidden; }
.lb-row .meter i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-deep), var(--gold)); }
.lb-row .num-val { font-variant-numeric: tabular-nums; color: var(--text); font-size: 13px; font-weight: 600; text-align: right; }
.lb-row .num-val small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; }
.lb-row.you { box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .45); }
.rank { color: var(--faint); font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.rank.top { color: var(--gold); font-weight: 700; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.chart .bar { fill: var(--gold); transition: fill .15s; }
.chart .bar-hit:hover + .bar, .chart .bar.hover { fill: var(--gold-light); }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--ui); }
.chart .grid { stroke: rgba(var(--line-rgb), .1); stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; background: var(--panel-solid); border: 1px solid var(--line-strong); color: var(--text); white-space: nowrap; transform: translate(-50%, -110%); }
.stats-note { color: var(--faint); font-size: 12.5px; margin: 0 6px 20px; }

/* about */
.about { padding: 8px 4px 20px; }
.about-hero { text-align: center; padding: 40px 20px 30px; margin-bottom: 16px; border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(700px 320px at 50% 0%, rgba(var(--gold-rgb), .2), transparent 70%), linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.about-hero h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1; margin: 8px 0 14px; color: var(--title); }
.about-hero .lead { max-width: 60ch; margin: 0 auto 18px; }
.signature { margin: 0; font-family: var(--serif); font-size: 26px; color: var(--muted); }
.signature strong { background: linear-gradient(100deg, var(--gold-light), var(--gold) 45%, var(--gold-light) 60%, var(--gold)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 5s ease-in-out infinite; font-weight: 700; }
.signature.small { font-size: 17px; margin-top: 22px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.about-card { position: relative; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.about-card span { font-size: 26px; }
.about-card h4 { margin: 10px 0 6px; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--title); }
.about-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.about-tech { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.about-tech h4 { margin: 0 0 8px; font-size: 20px; color: var(--title); }
.about-tech p { color: var(--muted); margin: 0 0 8px; }
@media (max-width: 900px) {
  .servers { flex-direction: row; }
  .server-list { flex-direction: row; overflow-x: auto; }
  .artist-hero, .stats-head { flex-direction: column; text-align: center; }
  .artist-actions, .badges { justify-content: center; }
}

/* ✨ switched to calm: keep the page, drop the heavy motion */
body.motion-calm *, body.motion-calm *::before, body.motion-calm *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
}
body.motion-calm .reveal { opacity: 1; transform: none; }
body.motion-calm .track-title, body.motion-calm .brand-name { animation: none; }
@media (max-width: 1100px) { .output-switch button { padding: 7px 9px; } }
@media (max-width: 900px) { .output-switch { order: 2; } #halo { width: 170%; height: 170%; } .yt-box { width: min(100%, 460px); } }

/* ============================================================
   Live features: room, profile, wrapped, history, admin, health
   ============================================================ */
.live-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: #6fcf97; padding: 3px 8px; border-radius: 999px; background: rgba(111, 207, 151, .12); border: 1px solid rgba(111, 207, 151, .35); }
.page-head, .room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px clamp(12px, 3vw, 30px); margin: 8px 4px 14px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(700px 300px at 10% 0%, rgba(var(--gold-rgb), .16), transparent 70%), linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.page-head h2, .room-head h2, .wrapped-head h2 { margin: 4px 0; font-size: clamp(28px, 3.4vw, 44px); color: var(--title); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head h4 { margin: 0; }
.lb-row.clickable { cursor: pointer; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chip.hot { color: var(--gold-text); border-color: rgba(var(--gold-rgb), .45); background: var(--gold-soft); }
.tag.votes { color: var(--text); background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .3); }
.menu button.selected { background: var(--gold-soft); }
.menu-icon { width: 20px; text-align: center; }
.swatch { display: inline-flex; gap: 0; }
.swatch i { width: 12px; height: 18px; display: block; }
.swatch i:first-child { border-radius: 9px 0 0 9px; }
.swatch i:last-child { border-radius: 0 9px 9px 0; }
.head-actions .pill-btn { white-space: nowrap; }

/* reactions */
.react-bar { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(var(--accent-rgb), .08); border: 1px solid var(--line); }
.react-bar button, .react-pad button { border: 0; background: none; font-size: 18px; width: 34px; height: 34px; border-radius: 50%; transition: transform .2s var(--ease), background .2s; }
.react-bar button:hover, .react-pad button:hover { transform: scale(1.25); background: rgba(var(--accent-rgb), .12); }
.hero-actions { flex-wrap: wrap; align-items: center; }
.reactions { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.float-react { position: absolute; bottom: -60px; animation: float-up 3.1s cubic-bezier(.3, .6, .4, 1) forwards; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); }
@keyframes float-up { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translate(0, -12vh) scale(1.1); } 100% { transform: translate(var(--drift, 0), -95vh) scale(.9) rotate(12deg); opacity: 0; } }

/* room */
.room-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.presence { display: flex; align-items: center; }
.presence .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; margin-left: -8px; border: 2px solid var(--bg-2); font-size: 11px; }
.presence .sub { margin-left: 8px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live-dot.on { color: #6fcf97; }
.live-dot.on::before { background: #6fcf97; box-shadow: 0 0 0 0 rgba(111, 207, 151, .6); animation: ping 1.6s infinite; }
.live-dot.bad { color: var(--danger); }
.live-dot.bad::before { background: var(--danger); }
@keyframes ping { to { box-shadow: 0 0 0 8px rgba(111, 207, 151, 0); } }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin: 0 4px 16px; min-height: 420px; }
.room-chat { display: flex; flex-direction: column; min-height: 420px; max-height: 62vh; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.chat-list { list-style: none; margin: 0; padding: 12px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.chat-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; animation: rise-in .35s var(--ease); }
.chat-row .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; font-size: 11px; }
.chat-row .who { display: flex; align-items: baseline; gap: 8px; }
.chat-row .who strong { font-size: 13px; }
.chat-row time { font-size: 11px; color: var(--faint); }
.chat-row p { margin: 2px 0 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: rgba(var(--accent-rgb), .09); width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.chat-row.mine p { background: var(--gold-soft); }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .45); outline: none; }
.chat-form input:focus { border-color: rgba(var(--gold-rgb), .55); }
.chat-form .icon-btn { color: var(--gold); }
.room-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.room-side h4 { margin: 6px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.room-now { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.room-now .thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.room-now strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-now .text { min-width: 0; display: grid; }
.react-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.react-pad button { width: 100%; height: 44px; border-radius: 12px; font-size: 22px; }
.voice-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* profile */
.profile-hero { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding: 30px clamp(12px, 3vw, 36px); margin: 8px 4px 14px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(700px 300px at 15% 0%, rgba(var(--gold-rgb), .2), transparent 70%), linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.profile-hero h2 { margin: 4px 0; font-size: clamp(32px, 4vw, 54px); line-height: 1; color: var(--title); }
.level-ring { position: relative; flex: none; width: clamp(130px, 14vw, 170px); aspect-ratio: 1; border-radius: 50%; padding: 8px;
  background: conic-gradient(var(--gold) var(--p, 0%), rgba(var(--line-rgb), .15) 0); box-shadow: 0 0 50px -10px rgba(var(--gold-rgb), .55); }
.level-ring .avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-2); font-size: 40px; }
.level-num { position: absolute; right: 2px; bottom: 6px; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--on-gold); font-family: var(--serif); font-weight: 700; font-size: 24px; border: 3px solid var(--bg-2); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-card { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--accent-rgb), .04); opacity: .55; filter: grayscale(.8); transition: transform .25s var(--ease); }
.badge-card.earned { opacity: 1; filter: none; border-color: rgba(var(--gold-rgb), .45); background: linear-gradient(160deg, var(--gold-soft), transparent); }
.badge-card.earned:hover { transform: translateY(-3px) rotate(-1deg); }
.badge-icon { font-size: 30px; }
.badge-card strong { font-size: 13px; }
.badge-card small { color: var(--muted); font-size: 11.5px; }
.hour-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.hour-chart i { flex: 1; border-radius: 3px 3px 1px 1px; background: rgba(var(--gold-rgb), .45); min-height: 3px; }
.hour-chart i.peak { background: var(--gold); box-shadow: 0 0 12px rgba(var(--gold-rgb), .6); }
.hour-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; }
.month-bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.month-bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.month-bars i { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, var(--accent-deep), var(--gold)); }
.month-bars span { font-size: 11px; color: var(--faint); }

/* wrapped */
.wrapped-head { padding: 26px 8px 10px; text-align: center; }
.period-tabs { max-width: 620px; margin: 12px auto 0; }
.wrapped-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 4px 14px; }
.wrap-slide { position: relative; overflow: hidden; min-height: 230px; padding: 22px; border-radius: 22px; border: 1px solid rgba(var(--gold-rgb), .3); display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  background: radial-gradient(420px 260px at 20% 0%, rgba(var(--gold-rgb), .25), transparent 70%), linear-gradient(160deg, var(--grad-a), var(--grad-b)); }
.wrap-slide .huge { font-family: var(--serif); font-weight: 700; font-size: clamp(56px, 7vw, 92px); line-height: .95; color: var(--gold-light); }
.wrap-slide .huge.small { font-size: clamp(40px, 4.6vw, 60px); }
.wrap-slide p { margin: 0; font-size: 17px; color: var(--title); }
.wrap-slide small { color: var(--muted); }
.wrap-slide.big { grid-column: span 2; }
.wrap-slide.top-song .cover-img, .wrap-slide.top-song .ph { width: 110px; height: 110px; border-radius: 14px; object-fit: cover; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .7); margin-bottom: auto; font-size: 30px; }
.wrap-slide.top-song strong { font-family: var(--serif); font-size: 28px; line-height: 1.1; color: var(--title); }
.wrap-slide ol { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.wrap-slide li { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap-slide li small { font-family: var(--ui); font-size: 12px; font-weight: 500; }
.wrapped-actions { justify-content: center; margin: 0 4px 24px; }
.wrap-slide .hour-chart { height: 64px; }
@media (max-width: 700px) { .wrap-slide.big { grid-column: auto; } }

/* history */
.history-list { overflow: visible; margin: 0 4px 20px; }
.history-list .row { grid-template-columns: 0 46px minmax(0, 1fr) auto; }

/* admin */
.admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 0 4px 20px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-label { font-weight: 600; font-size: 13.5px; }
.field small { color: var(--muted); font-size: 12px; }
.field select, .field input[type=text], .field input[type=number], .field textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .45); color: var(--text); font: inherit; outline: none; }
.field select:focus, .field input:focus, .field textarea:focus { border-color: rgba(var(--gold-rgb), .6); box-shadow: 0 0 0 3px var(--gold-soft); }
.field select option { background: var(--bg-2); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--gold-soft); color: var(--gold-text); border-color: rgba(var(--gold-rgb), .6); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input { flex: 1; accent-color: var(--gold); }
.range-row output { min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: rgba(var(--line-rgb), .25); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--title); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--gold); }
.switch input:checked::after { transform: translateX(18px); background: var(--on-gold); }
.switch input:disabled { opacity: .4; cursor: not-allowed; }
.admin-save { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

/* health */
.tile.ok .value { color: #6fcf97; }
.tile.bad .value { color: var(--danger); }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2; }
.chart .area { fill: rgba(var(--gold-rgb), .12); }
.chart .down { stroke: rgba(229, 138, 138, .5); stroke-width: 3; }
.uptime-days { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.uptime-days > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.uptime-days i { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; }
.uptime-days i.good { background: #6fcf97; }
.uptime-days i.warn { background: #e8c16a; }
.uptime-days i.bad { background: var(--danger); }
.uptime-days span { font-size: 11px; color: var(--muted); }
.uptime-days small { font-size: 10.5px; color: var(--faint); }
.incident { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.incident.down strong { color: var(--danger); }
.incident.up strong { color: #6fcf97; }
.incident time { color: var(--faint); font-size: 12px; }

/* stats season */
.season-banner { display: flex; align-items: center; gap: 14px; margin: 0 4px 14px; padding: 14px 18px; border-radius: 18px; cursor: pointer; border: 1px solid rgba(var(--gold-rgb), .45);
  background: linear-gradient(100deg, var(--gold-soft), transparent 70%); animation: rise-in .6s var(--ease); }
.season-banner .trophy { font-size: 34px; }
.season-banner .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold); font-size: 14px; }
.season-banner strong { font-size: 24px; color: var(--title); }

/* queue drag & drop */
.row.draggable { cursor: grab; }
.row.dragging { opacity: .4; }
.row.drop-before { box-shadow: inset 0 2px 0 var(--gold); }
.row.drop-after { box-shadow: inset 0 -2px 0 var(--gold); }

/* sound lab: custom EQ */
#lab-tabs { margin-bottom: 12px; }
.eq-sliders { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 2px; height: 170px; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.eq-band input { writing-mode: vertical-lr; direction: rtl; width: 22px; flex: 1; accent-color: var(--gold); margin: 0; }
.eq-band span { font-size: 9.5px; color: var(--faint); }
.eq-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 10px; }
.eq-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(var(--accent-rgb), .07); font-size: 12.5px; font-weight: 600; padding: 0; }
button.chip-btn { padding: 4px 10px; }
.chip-btn button { border: 0; background: none; padding: 4px 4px 4px 10px; font-weight: 600; }
.chip-btn button.x { padding: 4px 9px 4px 4px; color: var(--faint); }
.chip-btn button.x:hover { color: var(--danger); }

/* lyrics: translate + search */
.lyrics-lang { max-width: 150px; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .5); color: var(--text); font: inherit; font-size: 13px; }
.lyrics-lang option { background: var(--bg-2); }
.lyric .tr { display: block; font-family: var(--ui); font-weight: 500; font-size: .45em; letter-spacing: .01em; color: rgba(var(--text-rgb), .55); margin-top: 2px; }
.lyric.now .tr { color: var(--gold-text); }
.lyrics-plain p { margin: 0 0 6px; }
.lyrics-plain .tr { display: block; font-family: var(--ui); font-size: .6em; color: rgba(var(--text-rgb), .55); }
.lyrics-search { max-width: 700px; margin: -26vh auto 0; }
.lyrics-search-row { display: flex; gap: 8px; margin: 10px 0 14px; }
.lyrics-search-row input { flex: 1; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .5); outline: none; }
.lyrics-results { display: grid; gap: 6px; }
.lyrics-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--accent-rgb), .06); }
.lyrics-hit:hover { background: rgba(var(--accent-rgb), .14); }
.lyrics-hit span { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.lyrics-hit em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 11px; color: var(--gold); }

@media (max-width: 900px) {
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-hero { flex-direction: column; text-align: center; }
  .profile-hero .badges, .profile-hero .artist-actions { justify-content: center; }
  .user .live-badge { display: inline-block; }
  .lyrics-head { flex-wrap: wrap; }
  .eq-sliders { height: 140px; }
}

/* ============================================================
   Themes — body[data-theme]; Navy Gold is the default above
   ============================================================ */
body[data-mode="light"] .backdrop { background: radial-gradient(1200px 700px at 15% -10%, rgba(61, 95, 149, .12), transparent 60%), radial-gradient(900px 600px at 110% 110%, rgba(154, 116, 51, .12), transparent 60%); }
body[data-mode="light"] #scene { opacity: .55; }
body[data-mode="light"] .panel { box-shadow: 0 18px 50px -28px rgba(40, 50, 75, .35); }
body[data-mode="light"] .play-btn { color: #141b2b; }
body[data-mode="light"] .lyrics-overlay { background: radial-gradient(900px 600px at 50% 0%, rgba(61, 95, 149, .15), transparent 70%), rgba(248, 245, 238, .92); }
body[data-mode="light"] .lyric { color: rgba(27, 34, 51, .3); }
body[data-mode="light"] .lyric.past { color: rgba(27, 34, 51, .5); }
body[data-mode="light"] .lyric.now { color: var(--gold); text-shadow: none; }
body[data-mode="light"] .card .overlay { background: linear-gradient(to top, rgba(20, 27, 43, .7), transparent 55%); }
body[data-mode="light"] .live-badge, body[data-mode="light"] .live-dot.on, body[data-mode="light"] .tile.ok .value { color: #1f8a4f; }

/* ============================================================
   Server rail + Menu drawer + quick search
   ============================================================ */
.servers { padding: 12px 0 10px; gap: 10px; }
.server-list { flex: 1; width: 100%; padding: 4px 0 8px; }
.server-list::-webkit-scrollbar { width: 0; }
.server.pinned::before { content: "📌"; position: absolute; left: -6px; top: -7px; font-size: 11px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.server .server-name { display: none; }
.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding-top: 10px; border-top: 1px solid var(--line); }
.rail-add { width: 48px; height: 48px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: var(--gold); text-decoration: none;
  border: 1.5px dashed rgba(var(--gold-rgb), .45); transition: border-radius .25s var(--ease), background .2s; }
.rail-add:hover { border-radius: 12px; background: var(--gold-soft); }
.menu-btn { position: relative; display: grid; justify-items: center; gap: 4px; width: 62px; padding: 9px 0 7px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(var(--accent-rgb), .08); color: var(--text); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; transition: background .2s, border-color .2s; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--gold-soft); border-color: rgba(var(--gold-rgb), .55); color: var(--gold-text); }
.menu-btn::before { content: attr(data-icon); font-size: 17px; line-height: 1; }
.burger { position: absolute; top: 6px; right: 7px; display: grid; gap: 2px; }
.burger i { display: block; width: 9px; height: 1.5px; border-radius: 2px; background: var(--gold); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.menu-btn[data-badge]:not([data-badge=""])::after, .page-grid button[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge); position: absolute; top: -6px; left: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; box-shadow: 0 0 0 2px var(--bg-2); }

/* wide rail with names (quick setting) */
body.rail-names .app { grid-template-columns: 230px minmax(0, 1fr) 340px; }
body.rail-names .servers { align-items: stretch; }
body.rail-names .server-list { align-items: stretch; padding: 4px 10px 8px; }
body.rail-names .server { width: 100%; height: 52px; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 6px 8px; border-radius: 14px; text-align: left; place-items: center start; }
body.rail-names .server .server-icon { width: 40px; height: 40px; border-radius: 12px; }
body.rail-names .server .server-name { display: grid; min-width: 0; }
body.rail-names .server-name strong, body.rail-names .server-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.rail-names .server-name strong { font-size: 13px; }
body.rail-names .server-name small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
body.rail-names .server.selected { box-shadow: 0 0 0 1.5px var(--gold); background: var(--gold-soft); }
body.rail-names .server.live::after { right: 8px; bottom: auto; top: 8px; }
body.rail-names .rail-foot { flex-direction: row; justify-content: center; }
body.rail-names .menu-btn { width: auto; flex: 1; margin-right: 10px; grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; padding: 12px; }
body.rail-names .rail-add { margin-left: 10px; }

/* hover card next to a server icon */
.server-tip { position: fixed; z-index: 75; transform: translateY(-50%); display: grid; gap: 2px; max-width: 260px; padding: 9px 13px; border-radius: 12px; pointer-events: none;
  background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); animation: tip-in .18s var(--ease); }
.server-tip::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%) rotate(45deg); background: inherit; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.server-tip strong { font-size: 13.5px; }
.server-tip span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-tip small { font-size: 11px; color: var(--gold); }
@keyframes tip-in { from { opacity: 0; transform: translate(-6px, -50%); } }

/* the Menu drawer */
.drawer { position: fixed; z-index: 48; left: 100px; top: 88px; bottom: 116px; width: min(460px, calc(100vw - 120px)); display: flex; flex-direction: column; overflow: hidden;
  animation: drawer-in .32s var(--ease); }
body.rail-names .drawer { left: 254px; }
@keyframes drawer-in { from { opacity: 0; transform: translateX(-18px) scale(.98); } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.drawer-head > div { flex: 1; }
.drawer-head h3 { margin: 0; font-size: 26px; color: var(--title); line-height: 1; }
.palette-hint { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .4); color: var(--muted); font-size: 12.5px; }
.palette-hint:hover { color: var(--text); border-color: rgba(var(--gold-rgb), .5); }
kbd { display: inline-block; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: rgba(var(--accent-rgb), .08); font: 600 10.5px/1.5 var(--ui); color: var(--muted); }
.drawer-body { overflow-y: auto; padding: 4px 16px 18px; }
.drawer-sec { padding: 14px 0 6px; }
.drawer-sec + .drawer-sec { border-top: 1px solid var(--line); }
.drawer-sec h5 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-head h5 { margin: 0; }
.page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.page-grid button { position: relative; display: grid; justify-items: start; gap: 2px; padding: 11px 10px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--accent-rgb), .05);
  text-align: left; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.page-grid button:hover { transform: translateY(-2px); border-color: var(--line-strong); background: rgba(var(--accent-rgb), .1); }
.page-grid button[aria-current="page"] { border-color: rgba(var(--gold-rgb), .6); background: linear-gradient(150deg, var(--gold-soft), transparent); }
.page-grid b { font-size: 22px; font-weight: 400; line-height: 1.1; }
.page-grid span { font-weight: 700; font-size: 13.5px; }
.page-grid small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.page-grid kbd { position: absolute; top: 8px; right: 8px; font-size: 9.5px; opacity: .7; }
#server-filter { width: 170px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .45); outline: none; font-size: 12.5px; }
#server-filter:focus { border-color: rgba(var(--gold-rgb), .55); }
.server-rows { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.server-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.server-row:hover, .server-row:focus-visible { background: rgba(var(--accent-rgb), .09); }
.server-row.selected { background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .45); }
.server-row .server-icon { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; font-size: 12px; }
.server-row .text { min-width: 0; display: grid; }
.server-row strong, .server-row .text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-row strong { font-size: 13.5px; }
.server-row .text span { color: var(--muted); font-size: 12px; }
.server-row .live { width: 9px; height: 9px; border-radius: 50%; background: #6fcf97; box-shadow: 0 0 0 3px rgba(111, 207, 151, .2); }
.server-row .pin { border: 0; background: none; font-size: 14px; opacity: .3; filter: grayscale(1); padding: 4px; border-radius: 8px; transition: opacity .2s; }
.server-row:hover .pin { opacity: .6; }
.server-row .pin.on { opacity: 1; filter: none; }

/* theme gallery */
.theme-group { margin-bottom: 10px; }
.theme-group > small { display: block; margin: 0 0 6px 2px; color: var(--faint); font-size: 11px; font-weight: 600; }
.theme-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.theme-card { display: grid; gap: 6px; padding: 6px 6px 7px; border-radius: 14px; border: 1px solid var(--line); background: none; font-size: 12px; font-weight: 600; color: var(--muted); transition: transform .2s var(--ease), border-color .2s; }
.theme-card:hover { transform: translateY(-2px); color: var(--text); border-color: var(--line-strong); }
.theme-card[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-text); box-shadow: 0 0 0 1px var(--gold), 0 8px 22px -10px rgba(var(--gold-rgb), .6); }
.theme-preview { position: relative; display: block; height: 54px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.theme-preview .bar { position: absolute; left: 8px; right: 34%; bottom: 10px; height: 5px; border-radius: 4px; }
.theme-preview .line { position: absolute; left: 8px; right: 50%; top: 12px; height: 4px; border-radius: 4px; }
.theme-preview .dot { position: absolute; right: 9px; top: 9px; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.custom-theme { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--muted); }
.custom-theme strong { flex-basis: 100%; color: var(--text); font-size: 13px; }
.custom-theme label:not(.switch) { display: inline-flex; align-items: center; gap: 6px; }
.custom-theme input[type=color] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: none; cursor: pointer; }
.custom-theme input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.custom-theme input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.quick-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; font-size: 12.5px; color: var(--muted); }
.keys kbd { margin-right: 6px; }

/* quick search (Ctrl+K) */
.palette { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 13vh 16px 16px;
  background: rgba(var(--deep-rgb), .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .2s var(--ease); }
.palette-box { width: min(640px, 100%); overflow: hidden; animation: pop .22s var(--ease); }
#palette-input { width: 100%; height: 58px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; font-size: 16.5px; }
#palette-input::placeholder { color: var(--faint); }
.palette-list { max-height: min(52vh, 460px); overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.palette-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette-item.active { background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .4); }
.pi-icon { font-size: 17px; text-align: center; }
.pi-label { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item small { color: var(--muted); font-size: 12px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-foot { margin: 0; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11.5px; display: flex; gap: 6px; align-items: center; }

/* compact lists (quick setting) */
body.compact .list .row, body.compact .quick { padding-top: 3px; padding-bottom: 3px; }
body.compact .list .thumb, body.compact .quick .thumb { width: 36px; height: 36px; }
body.compact .list .row { grid-template-columns: 18px 36px minmax(0, 1fr) auto; gap: 10px; }
body.compact .quick-grid { grid-template-rows: repeat(4, auto); }

@media (max-width: 1280px) { body.rail-names .app { grid-template-columns: 210px minmax(0, 1fr) 300px; } body.rail-names .drawer { left: 234px; } }
@media (max-width: 900px) {
  .servers { flex-direction: row; flex-wrap: nowrap; align-items: center; padding: 10px 12px; }
  .server-list { flex: 1 1 auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 6px 4px; }
  .rail-foot { flex-direction: row; width: auto; flex: none; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--line); }
  .menu-btn { width: 58px; }
  body.rail-names .app { grid-template-columns: minmax(0, 1fr); }
  body.rail-names .server { width: 190px; flex: none; }
  body.rail-names .server-list { padding: 6px 4px; }
  body.rail-names .rail-foot { flex-direction: row; }
  body.rail-names .menu-btn { width: 58px; flex: none; display: grid; grid-auto-flow: row; gap: 4px; padding: 9px 0 7px; margin: 0; }
  .drawer, body.rail-names .drawer { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 82vh; z-index: 60; animation: sheet-in .32s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } }
  .page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-grid small, .page-grid kbd { display: none; }
  .palette-hint kbd, .keys { display: none; }
  .drawer-sec:last-child h5 { display: none; }
  .quick-settings { grid-template-columns: minmax(0, 1fr); }
  #server-filter { width: 140px; }
  .server-tip { display: none; }
}

/* ============================================================
   Menu tabs + Appearance (backgrounds) + Settings
   ============================================================ */
.drawer-tabs { margin: 12px 16px 0; }
.drawer-tabs button { font-size: 12.5px; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.bg-card { position: relative; display: grid; gap: 2px; justify-items: start; padding: 10px 10px 9px; border-radius: 14px; border: 1px solid var(--line); text-align: left;
  background: radial-gradient(120px 70px at 85% 0%, rgba(var(--gold-rgb), .12), transparent 70%), rgba(var(--accent-rgb), .05);
  transition: transform .2s var(--ease), border-color .2s, background .2s; }
.bg-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.bg-card[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 8px 22px -10px rgba(var(--gold-rgb), .6); background: linear-gradient(150deg, var(--gold-soft), transparent); }
.bg-card[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 7px; right: 9px; font-size: 12px; font-weight: 800; color: var(--gold); }
.bg-icon { font-size: 22px; line-height: 1.2; }
.bg-card strong { font-size: 12.5px; }
.bg-card small { color: var(--muted); font-size: 10.5px; line-height: 1.3; }
.bg-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--accent-rgb), .04); }
.bg-sec.off .bg-grid, .bg-sec.off .bg-settings { opacity: .45; }
.sec-note { margin: -4px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.slider { display: grid; grid-template-columns: 78px minmax(0, 1fr) 42px; align-items: center; gap: 8px; grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.slider input { width: 100%; accent-color: var(--gold); }
.slider output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.select-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.select-row select { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .5); color: var(--text); font: inherit; font-size: 12.5px; }
.select-row select option { background: var(--bg-2); }
.sync-line { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; font-size: 13px; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.sync-dot[data-state="saved"] { background: #6fcf97; box-shadow: 0 0 0 3px rgba(111, 207, 151, .2); }
.sync-dot[data-state="saving"] { background: var(--gold); animation: ping 1s infinite; }
.sync-dot[data-state="error"] { background: var(--danger); }
#reset-appearance { margin-top: 10px; padding-left: 0; }
@media (max-width: 900px) {
  .bg-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .bg-card small { display: none; }
  .bg-settings { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   Lyrics dock: a panel on one side (right by default, ⇄ flips it) instead of a full page
   ============================================================ */
.lyrics-overlay {
  inset: auto; top: 88px; bottom: 116px; right: 12px; width: min(420px, calc(100vw - 24px)); padding: 14px 16px 10px;
  border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
  background: radial-gradient(420px 260px at 50% 0%, rgba(var(--gold-rgb), .12), transparent 70%), var(--panel-solid);
  backdrop-filter: none; -webkit-backdrop-filter: none; animation: dock-in .35s var(--ease);
}
.lyrics-overlay.left { right: auto; left: 100px; animation-name: dock-in-left; }
body.rail-names .lyrics-overlay.left { left: 254px; }
@keyframes dock-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes dock-in-left { from { opacity: 0; transform: translateX(-28px); } }
.lyrics-overlay .lyrics-head { gap: 10px; margin: 0 0 8px; max-width: none; flex-wrap: wrap; }
.lyrics-overlay .lyrics-head img { width: 44px; height: 44px; }
.lyrics-overlay .lyrics-head h3 { font-size: 20px; }
.lyrics-overlay .lyrics-lang { max-width: 118px; padding: 5px 8px; font-size: 12px; }
.lyrics-overlay .lyrics-body { max-width: none; padding: 22vh 0 22vh; }
.lyrics-overlay .lyric { font-size: clamp(17px, 1.5vw, 23px); padding: 6px 0; }
.lyrics-overlay .lyric.now { transform: scale(1.04); }
.lyrics-overlay .lyrics-plain { font-size: clamp(15px, 1.3vw, 19px); }
.lyrics-overlay .lyrics-search { margin-top: -12vh; }
.lyrics-overlay .lyrics-empty { font-size: 14px; }
.lyrics-overlay .lyrics-empty .big { font-size: 36px; }
body.lyrics-open .toasts { right: auto; left: 20px; }
@media (max-width: 1100px) { .lyrics-overlay { width: min(360px, calc(100vw - 24px)); } }
@media (max-width: 900px) {
  .lyrics-overlay, .lyrics-overlay.left { top: 70px; bottom: 196px; left: 8px; right: 8px; width: auto; }
  body.lyrics-open .toasts { left: 12px; right: 12px; }
  .lyrics-overlay .lyrics-body { padding: 18vh 0; }
}
body[data-mode="light"] .lyrics-overlay { background: radial-gradient(420px 260px at 50% 0%, rgba(var(--gold-rgb), .12), transparent 70%), var(--panel-solid); }
.lyrics-overlay .lyrics-head > div { flex: 1 1 120px; order: 1; }
.lyrics-overlay .lyrics-head img { order: 0; }
.lyrics-overlay #lyrics-side { order: 2; }
.lyrics-overlay #lyrics-close { order: 3; }
.lyrics-overlay .lyrics-lang { order: 4; flex: 1 1 100px; max-width: none; }
.lyrics-overlay #lyrics-search { order: 5; }

/* ============================================================
   🎙️ Listen: sing or say a song
   ============================================================ */
.listen-btn { position: relative; }
.listen-btn.on { color: var(--gold); }
.listen-sheet {
  position: fixed; z-index: 46; left: 50%; bottom: 128px; transform: translateX(-50%); width: min(440px, calc(100vw - 24px));
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 22px 18px; text-align: center;
  background: radial-gradient(420px 260px at 50% 0%, rgba(var(--accent-deep-rgb), .28), transparent 70%), var(--panel-solid);
  border: 1px solid rgba(var(--gold-rgb), .35); border-radius: var(--radius);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(var(--gold-rgb), .12);
  animation: fade-up .35s var(--ease);
}
.listen-close { position: absolute; top: 10px; right: 10px; }
.listen-sheet h3 { margin: 2px 0 0; font-size: 24px; color: var(--title); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listen-sheet .sub { margin: 0; color: var(--muted); font-size: 13px; min-height: 1.5em; }
.listen-orb { --level: 0; position: relative; width: 92px; height: 92px; margin-bottom: 10px; display: grid; place-items: center; }
.listen-orb b { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--on-gold);
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 10px 26px -8px rgba(var(--gold-rgb), .7), inset 0 2px 3px rgba(255, 255, 255, .45);
  transform: scale(calc(1 + var(--level) * .18)); transition: transform .08s linear; }
.listen-orb b svg { width: 30px; height: 30px; fill: currentColor; }
.listen-orb span { position: absolute; inset: 14px; border-radius: 50%; border: 2px solid rgba(var(--gold-rgb), .5); opacity: 0; }
.listen-sheet[data-stage="recording"] .listen-orb span, .listen-sheet[data-stage="hearing"] .listen-orb span { animation: ripple 1.8s var(--ease) infinite; }
.listen-orb span:nth-child(2) { animation-delay: .6s !important; }
.listen-orb span:nth-child(3) { animation-delay: 1.2s !important; }
@keyframes ripple { from { opacity: .9; transform: scale(.8); } to { opacity: 0; transform: scale(1.6); } }
.listen-sheet[data-stage="thinking"] .listen-orb b { animation: breathe-orb 1.1s ease-in-out infinite alternate; }
@keyframes breathe-orb { to { filter: brightness(1.25); transform: scale(1.08); } }
.listen-sheet[data-stage="error"] .listen-orb b { background: radial-gradient(circle at 35% 30%, #f6c9c9, var(--danger) 60%, #9a4a4a); }
.listen-heard { margin: 10px 0 2px; padding: 8px 12px; max-width: 100%; border-left: 2px solid var(--gold); border-radius: 0 8px 8px 0; background: rgba(var(--accent-rgb), .08);
  font-family: var(--serif); font-size: 18px; font-style: italic; color: var(--gold-text); text-align: left; overflow-wrap: anywhere; }
.listen-results { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 10px; }
.listen-results:empty { display: none; }
.listen-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); background: rgba(var(--accent-rgb), .07); border: 1px solid var(--line); text-align: left; }
.listen-row.chosen { border-color: rgba(var(--gold-rgb), .55); background: var(--gold-soft); }
.listen-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.listen-row strong, .listen-row span, .listen-row q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listen-row span { color: var(--muted); font-size: 12.5px; }
.listen-row q { color: var(--faint); font-size: 12px; font-style: italic; }
.listen-row small { color: var(--gold); font-size: 12px; font-weight: 600; }
.listen-art { width: 52px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface); }
.listen-art.ph { display: grid; place-items: center; color: var(--gold); font-weight: 700; }
.listen-actions { display: flex; gap: 8px; margin-top: 14px; }
body[data-mode="light"] .listen-sheet { background: radial-gradient(420px 260px at 50% 0%, rgba(61, 95, 149, .12), transparent 70%), rgba(250, 247, 240, .98); }
@media (max-width: 700px) {
  .listen-sheet { left: 0; right: 0; bottom: 0; transform: none; width: 100%; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .listen-orb span, .listen-orb b { animation: none !important; transition: none; }
}

/* ============================================================
   About numbers · Feedback · Owner panel
   ============================================================ */
.about-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0 auto 18px; max-width: 1100px; }
.about-stat { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); text-align: center; }
.about-stat strong { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--title); font-variant-numeric: tabular-nums; line-height: 1.1; }
.about-stat span { font-size: 12.5px; color: var(--muted); }
.about-stat.live strong { color: var(--gold-text); }

.fb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 0 4px 20px; }
.fb-form textarea { width: 100%; resize: vertical; min-height: 84px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(var(--deep-rgb), .35); color: var(--text); font: inherit; }
.fb-form textarea:focus { outline: none; border-color: rgba(var(--gold-rgb), .55); box-shadow: 0 0 0 3px var(--gold-soft); }
.fb-stars { display: flex; gap: 6px; }
.fb-stars button { border: 0; background: none; font-size: 38px; line-height: 1; color: rgba(var(--line-rgb), .35); padding: 0 2px; transition: transform .15s var(--ease), color .15s; }
.fb-stars button.on { color: var(--gold); }
.fb-stars button:hover { transform: scale(1.12); }
.fb-cats { flex-wrap: wrap; }
.fb-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.fb-send { font-size: 14.5px; padding: 9px 22px; }
.fb-note { margin: 0; color: var(--gold-text); font-size: 13.5px; }

.owner-login { max-width: 460px; margin: 0 4px 20px; }
.owner-login-row { display: flex; gap: 10px; }
.owner-login input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .35); color: var(--text); font: inherit; }
.owner-head-actions { display: flex; align-items: center; gap: 12px; }
.tile.ok .value { color: var(--title); }
.tile.warn { border-color: rgba(255, 196, 64, .45); }
.tile.bad { border-color: rgba(229, 138, 138, .55); }
.tile.bad .value { color: var(--danger); }
.owner-chart svg { height: 170px; }
.chart .line.s1 { stroke: var(--accent); }
.chart .line.s2 { stroke: #6fcf97; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -4px 0 6px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; background: var(--gold); }
.legend .s1 i { background: var(--accent); }
.legend .s2 i { background: #6fcf97; }
.legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.owner-bar { display: grid; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.owner-bar i { display: block; height: 7px; border-radius: 4px; background: rgba(var(--line-rgb), .14); position: relative; overflow: hidden; }
.owner-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent-deep), var(--gold)); }
.owner-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; }
.owner-kv div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.owner-kv span { color: var(--muted); }
.owner-kv b { font-variant-numeric: tabular-nums; color: var(--title); }
.owner-feedback { margin: 0 4px 20px; }
.fb-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--deep-rgb), .25); margin-bottom: 10px; }
.fb-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.fb-card header time { margin-left: auto; color: var(--faint); font-size: 12px; }
.fb-rating { color: var(--gold); letter-spacing: 1px; }
.fb-card p { margin: 4px 0; font-size: 13.5px; overflow-wrap: anywhere; }
.fb-card p b { color: var(--gold-text); font-weight: 600; }

/* ---- Owner panel: live server list ---- */
#owner-servers-card .owner-srv-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
#owner-servers-card .owner-srv-head h4 { margin:0; }
.owner-srv-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.owner-srv { display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; padding:14px 10px; border:1px solid var(--line); border-radius:var(--radius-sm); background:rgba(var(--accent-rgb),.05); }
.owner-srv-ic { width:54px; height:54px; border-radius:16px; object-fit:cover; background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700; color:var(--accent); }
.owner-srv-ic.ph { background:rgba(var(--accent-rgb),.15); }
.owner-srv-name { font-weight:600; font-size:13.5px; line-height:1.2; word-break:break-word; }
.owner-srv-sub { color:var(--muted); font-size:11.5px; }
/* ================================================================ About: live numbers + every server, right now */
.about-stat { position: relative; overflow: hidden; transition: border-color .3s, transform .45s var(--ease); }
.about-stat em { font-style: normal; font-size: 18px; line-height: 1; opacity: .9; }
.about-stat.live { border-color: rgba(var(--gold-rgb), .32); background: linear-gradient(160deg, rgba(var(--gold-rgb), .10), var(--panel) 60%); }
.about-stat.live::before { content: ""; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: #6fcf97; box-shadow: 0 0 0 0 rgba(111, 207, 151, .6); animation: ping 1.6s infinite; }
.about-stat:hover { border-color: var(--line-strong); }
.about-sub-title { text-align: center; font-size: clamp(24px, 3vw, 32px); color: var(--title); margin: 28px 0 14px; }

.about-live { max-width: 1100px; margin: 0 auto 8px; padding: 20px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); }
.about-live:empty { display: none; }
.about-live-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.about-live-head h3 { margin: 4px 0 4px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.05; color: var(--title); }
.about-live-head .live-dot { flex: none; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--deep-rgb), .35); }
.about-live-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.about-filter span[data-count]::after { content: attr(data-count); margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; background: rgba(var(--accent-rgb), .16); color: var(--text); }
#about-search { height: 36px; min-width: 220px; flex: 0 1 280px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(var(--deep-rgb), .35); color: var(--text); }
#about-search:focus { outline: none; border-color: rgba(var(--gold-rgb), .55); box-shadow: 0 0 0 3px var(--gold-soft); }

.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.srv-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 12px; min-height: 172px; padding: 14px;
  border-radius: 18px; border: 1px solid var(--line); background: rgba(var(--deep-rgb), .42); transition: border-color .35s, box-shadow .35s, transform .45s var(--ease); }
.srv-card:hover { border-color: var(--line-strong); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9); }
.srv-card.enter { animation: rise-in .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.srv-card.changed { animation: srv-flash 1.2s var(--ease); }
@keyframes srv-flash { 0% { box-shadow: 0 0 0 2px rgba(var(--gold-rgb), .7); } 100% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0); } }
.srv-card.skeleton { background: linear-gradient(90deg, rgba(var(--line-rgb), .05), rgba(var(--line-rgb), .12), rgba(var(--line-rgb), .05)); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }
.srv-card.state-playing { border-color: rgba(var(--gold-rgb), .45); box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .12), 0 16px 44px -24px rgba(var(--gold-rgb), .55); }
.srv-card.state-playing::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, rgba(var(--gold-rgb), .8) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: srv-spin 4s linear infinite; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes srv-spin { to { --spin: 360deg; } }
.srv-card.state-idle { opacity: .78; }
.srv-card.state-idle:hover { opacity: 1; }

.srv-backdrop { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.srv-backdrop-img { width: 100%; height: 100%; object-fit: cover; filter: blur(26px) saturate(1.3); opacity: .28; transform: scale(1.3); }
.srv-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--deep-rgb), .25), rgba(var(--deep-rgb), .85)); }

.srv-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.srv-icon { width: 42px; height: 42px; flex: none; border-radius: 14px; object-fit: cover; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; font-size: 16px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: var(--gold); overflow: hidden; }
.srv-name { min-width: 0; flex: 1; }
.srv-name h4 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-name span { color: var(--muted); font-size: 12px; }
.srv-state { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  border: 1px solid var(--line); color: var(--muted); background: rgba(var(--deep-rgb), .4); }
.srv-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.srv-state.playing { color: #6fcf97; border-color: rgba(111, 207, 151, .35); }
.srv-state.playing i { background: #6fcf97; box-shadow: 0 0 0 0 rgba(111, 207, 151, .6); animation: ping 1.6s infinite; }
.srv-state.paused { color: var(--gold-text); border-color: rgba(var(--gold-rgb), .35); }
.srv-state.paused i { background: var(--gold); }
.srv-state.waiting { color: var(--accent); border-color: rgba(var(--accent-rgb), .35); }
.srv-state.waiting i { background: var(--accent); }

.srv-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srv-now.quiet { color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); }
.srv-art { position: relative; width: 58px; height: 58px; flex: none; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .8); }
.srv-art-img { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; font-weight: 700; color: var(--gold); background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.state-playing .srv-art-img { animation: srv-breathe 3.2s ease-in-out infinite; }
@keyframes srv-breathe { 50% { transform: scale(1.07); } }
.srv-art .eq { position: absolute; left: 6px; bottom: 6px; height: 14px; padding: 2px 3px; border-radius: 4px; background: rgba(0, 0, 0, .55); }
.srv-art .eq.on i { animation: bar .9s ease-in-out infinite alternate; }
.srv-art .eq.on i:nth-child(2) { animation-delay: -.3s; }
.srv-art .eq.on i:nth-child(3) { animation-delay: -.6s; }
.srv-art .eq.on i:nth-child(4) { animation-delay: -.15s; }
.srv-track { display: grid; gap: 1px; min-width: 0; }
.srv-track strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-track > span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-source { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 11px; }
.srv-source .src { width: 14px; height: 14px; display: inline-grid; }

.srv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.srv-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); background: rgba(var(--deep-rgb), .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-chip.hot { color: var(--text); border-color: rgba(111, 207, 151, .35); background: rgba(111, 207, 151, .10); }
.srv-chip.gold { color: var(--gold-text); border-color: rgba(var(--gold-rgb), .35); background: var(--gold-soft); }

@media (max-width: 640px) {
  .about-live { padding: 14px; border-radius: 18px; }
  .about-live-head { flex-direction: column; }
  #about-search { min-width: 0; flex: 1 1 100%; }
  .srv-grid { grid-template-columns: 1fr; }
}
body.motion-calm .srv-card.state-playing::before, body.motion-calm .state-playing .srv-art-img { animation: none; }
/* About: 12 counters always fill whole rows (6, 4, 3 or 2 a row) */
@media (max-width: 1180px) { .about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .about-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.about-stat strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about-stat[data-key="busiest"] strong { font-size: 20px; line-height: 1.5; }

/* "who is listening" chip + pop-up */
button.srv-chip { font: inherit; font-size: 11.5px; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s; }
button.srv-chip:hover { transform: translateY(-1px); border-color: rgba(111, 207, 151, .6); background: rgba(111, 207, 151, .18); }
.people-stack { display: inline-flex; margin-right: 2px; }
.people-mini { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(var(--deep-rgb), .9); margin-left: -5px; font-size: 7px;
  display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: var(--gold); }
.people-mini:first-child { margin-left: 0; }
.people-pop { width: min(300px, calc(100vw - 16px)); max-height: min(380px, 70vh); overflow: auto; padding: 14px; border-radius: 16px; }
.people-pop header { display: grid; gap: 2px; margin-bottom: 10px; }
.people-pop header strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.people-pop li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; animation: rise-in .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.people-pop li:hover { background: rgba(var(--accent-rgb), .1); }
.people-pop li span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-av { width: 30px; height: 30px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--gold); background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.people-pop > .sub { margin: 8px 8px 0; }
/* 24/7 button beside the volume */
.stay-btn { width: auto; min-width: 46px; height: 28px; padding: 0 9px; border-radius: 999px; font: 700 12px/1 var(--ui); letter-spacing: .04em;
  color: var(--muted); border: 1px solid var(--line-strong); transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease); }
.stay-btn:hover:not(:disabled) { color: var(--text); border-color: rgba(var(--gold-rgb), .5); }
.stay-btn.on { color: var(--on-gold, #1a1408); background: linear-gradient(135deg, var(--gold-light), var(--gold)); border-color: transparent;
  box-shadow: 0 4px 14px -4px rgba(var(--gold-rgb), .6); }
.stay-btn.on::after { display: none; }
