:root {
  --bg: rgb(0, 14, 45);
  --bg-2: #04173f;
  --panel: rgba(10, 28, 72, 0.62);
  --panel-solid: #0a1c48;
  --panel-2: rgba(18, 40, 96, 0.55);
  --line: rgba(120, 160, 255, 0.14);
  --line-2: rgba(120, 160, 255, 0.24);
  --text: #eef3ff;
  --muted: #9fb0d8;
  --dim: #6c7fae;
  --cyan: #22e3ff;
  --magenta: #e14bff;
  --purple: #8b5cf6;
  --grad: linear-gradient(90deg, #8b5cf6 0%, #d946ef 50%, #22e3ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .35), rgba(217, 70, 239, .22) 50%, rgba(34, 227, 255, .25));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Outfit', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Subtle Groove banner art washed into the navy background */
.bg-banner {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-banner::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: url('/static/img/banner.webp') 100% 36% / auto 130% no-repeat;
  opacity: .55;
  filter: blur(12px) saturate(1.35) brightness(1.2);
  mix-blend-mode: screen;
  -webkit-mask-image:
    linear-gradient(to bottom, rgba(0,0,0,.9) 0%, rgba(0,0,0,.65) 48%, rgba(0,0,0,.22) 78%, transparent 100%),
    linear-gradient(to right, transparent 0%, rgba(0,0,0,.15) 26%, rgba(0,0,0,.85) 48%, rgba(0,0,0,.95) 70%, rgba(0,0,0,.8) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, rgba(0,0,0,.9) 0%, rgba(0,0,0,.65) 48%, rgba(0,0,0,.22) 78%, transparent 100%),
    linear-gradient(to right, transparent 0%, rgba(0,0,0,.15) 26%, rgba(0,0,0,.85) 48%, rgba(0,0,0,.95) 70%, rgba(0,0,0,.8) 100%);
  mask-composite: intersect;
}
.bg-banner::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 14, 45, .12) 58%, rgba(0, 14, 45, .55) 100%);
  pointer-events: none;
}
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(34, 227, 255, .14), transparent 60%),
    radial-gradient(800px 600px at 60% 120%, rgba(217, 70, 239, .14), transparent 60%);
}
/* Landing: a little more of the art in the open navy, still faded under the headline */
body:has(.landing) .bg-banner::before {
  background-position: 80% 30%;
  background-size: auto 120%;
  opacity: .62;
  filter: blur(14px) saturate(1.4) brightness(1.22);
  -webkit-mask-image:
    linear-gradient(to bottom, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 62%, transparent 100%),
    radial-gradient(ellipse 95% 80% at 58% 30%, #000 0%, transparent 80%);
  mask-image:
    linear-gradient(to bottom, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 62%, transparent 100%),
    radial-gradient(ellipse 95% 80% at 58% 30%, #000 0%, transparent 80%);
}
body:has(.landing) .bg-banner::after {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 14, 45, .1) 65%, rgba(0, 14, 45, .7) 100%);
}
@media (max-width: 860px) {
  .bg-banner::before {
    background-position: 95% 22%;
    opacity: .48;
    filter: blur(14px) saturate(1.3) brightness(1.18);
  }
  body:has(.landing) .bg-banner::before {
    background-position: 78% 18%;
    opacity: .55;
  }
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(14px, 3vw, 32px);
  background: rgba(0, 14, 45, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 50%; box-shadow: 0 0 18px rgba(139, 92, 246, .55); }
.topbar-mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.guild-btn {
  display: flex; align-items: center; gap: 10px; max-width: 360px; min-width: 0;
  padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); cursor: pointer; transition: border-color .2s, background .2s;
}
.guild-btn:hover { border-color: rgba(34, 227, 255, .5); }
.guild-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.gicon { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; background: var(--grad-soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; }
.gicon img { width: 100%; height: 100%; object-fit: cover; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.user-chip .uname { font-weight: 600; font-size: 14px; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer;
  transition: transform .12s, border-color .2s, background .2s, opacity .2s; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: rgba(34, 227, 255, .55); text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 8px 26px rgba(217, 70, 239, .35); }
.btn.discord { background: #5865f2; border: 0; color: #fff; height: 50px; padding: 0 26px; font-size: 16px; box-shadow: 0 10px 30px rgba(88, 101, 242, .45); }
.btn.ghost { background: transparent; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); transition: color .15s, background .15s, transform .12s;
}
.icon-btn:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .06); }
.icon-btn:active:not(:disabled) { transform: scale(.92); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.on { color: var(--cyan); }
.icon-btn.on::after { content: ''; position: absolute; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 17px; height: 17px; }
.play-btn {
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(217, 70, 239, .45), 0 0 0 6px rgba(139, 92, 246, .12);
  transition: transform .12s, box-shadow .2s;
}
.play-btn:hover:not(:disabled) { box-shadow: 0 12px 36px rgba(34, 227, 255, .45), 0 0 0 7px rgba(34, 227, 255, .14); }
.play-btn:active:not(:disabled) { transform: scale(.94); }
.play-btn:disabled { opacity: .45; cursor: not-allowed; }
.play-btn svg { width: 28px; height: 28px; }

/* ---------- layout ---------- */
.app { position: relative; z-index: 1; padding: 22px clamp(14px, 3vw, 32px) 60px; max-width: 1380px; margin: 0 auto; }
.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head h2 svg { width: 18px; height: 18px; color: var(--cyan); }
.panel-head .meta { color: var(--dim); font-size: 13px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- landing ---------- */
.landing { display: flex; flex-direction: column; gap: 46px; padding-top: 10px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 60px); line-height: 1.04; margin: 0 0 16px; font-weight: 800; letter-spacing: -.5px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 18px; margin: 0 0 26px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-art { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(139, 92, 246, .25); aspect-ratio: 16 / 9; background: #020b24; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 18px; }
.feature .ficon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); margin-bottom: 12px; color: #fff; }
.feature .ficon svg { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-family: var(--display); font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.login-error { background: rgba(255, 70, 120, .12); border: 1px solid rgba(255, 70, 120, .4); color: #ffc2d4; padding: 10px 14px; border-radius: 12px; margin-bottom: 18px; }

/* ---------- server picker ---------- */
.picker h1 { font-family: var(--display); font-size: 30px; margin: 4px 0 6px; }
.picker > p { color: var(--muted); margin: 0 0 22px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.guild-card { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); transition: transform .15s, border-color .2s; }
.guild-card:hover { transform: translateY(-2px); border-color: rgba(34, 227, 255, .45); text-decoration: none; }
.guild-card .gicon { width: 52px; height: 52px; font-size: 18px; }
.guild-card b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-card small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-card .gc-body { min-width: 0; }
.guild-card.add { border-style: dashed; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34f5a5; box-shadow: 0 0 10px #34f5a5; margin-right: 6px; vertical-align: middle; }

/* ---------- access banner ---------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: linear-gradient(90deg, rgba(139, 92, 246, .16), rgba(34, 227, 255, .08)); margin-bottom: 22px; }
.banner .b-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); flex: 0 0 auto; color: var(--cyan); }
.banner .b-icon svg { width: 20px; height: 20px; }
.banner .b-text { flex: 1; min-width: 0; }
.banner .b-text b { display: block; }
.banner .b-text span { color: var(--muted); font-size: 14px; }

/* ---------- now playing ---------- */
.np { position: relative; overflow: hidden; padding: 0; }
.np-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(48px) saturate(1.4); opacity: .38; transform: scale(1.1); transition: background-image .4s; }
.np-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 14, 45, .35), rgba(0, 14, 45, .92)); }
.np-inner { position: relative; padding: 22px; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: center; }
.np-art { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #071640; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); border: 1px solid var(--line-2); }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.art-ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grad-soft); }
.art-ph img { width: 46%; height: auto; aspect-ratio: 1; border-radius: 50%; opacity: .92; }
.eq { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 3px; align-items: flex-end; height: 18px; padding: 5px 7px; border-radius: 8px; background: rgba(0, 14, 45, .7); }
.eq i { width: 3px; background: var(--cyan); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; background: var(--magenta); }
.eq i:nth-child(3) { animation-delay: .4s; background: var(--purple); }
.eq i:nth-child(4) { animation-delay: .1s; }
.eq.paused i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.np-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--cyan); margin-bottom: 6px; }
.np-title { font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.15; margin: 0 0 4px; overflow-wrap: anywhere; }
.np-title a { color: var(--text); }
.np-artist { color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted); }
.chip img { width: 18px; height: 18px; border-radius: 50%; }
.chip.src-youtube { color: #ff8a8a; }
.chip.src-soundcloud { color: #ffb36b; }
.chip.src-audius { color: #c99bff; }
.chip.src-local { color: #7dffc4; }
.chip.accent { color: var(--cyan); border-color: rgba(34, 227, 255, .35); }
.np-empty { padding: 34px 22px; text-align: center; position: relative; }
.np-empty img { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px; box-shadow: 0 0 40px rgba(139, 92, 246, .5); }
.np-empty h3 { font-family: var(--display); font-size: 22px; margin: 0 0 6px; }
.np-empty p { color: var(--muted); margin: 0 auto; max-width: 440px; }

.progress { position: relative; padding: 0 22px; }
.bar { position: relative; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); border-radius: 6px; box-shadow: 0 0 14px rgba(34, 227, 255, .6); transition: width .25s linear; }
.times { display: flex; justify-content: space-between; color: var(--dim); font-size: 12.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.controls { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 22px 6px; }
.controls-2 { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 22px 20px; flex-wrap: wrap; }
.vol { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; max-width: 320px; color: var(--muted); }
.vol svg { width: 20px; height: 20px; flex: 0 0 auto; }
.vol output { width: 36px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 246, .45); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 246, .45); }
input[type=range]:disabled { opacity: .4; cursor: not-allowed; }
.loop-badge { position: relative; }
.loop-badge small { position: absolute; top: 3px; right: 3px; font-size: 9px; font-weight: 800; color: var(--cyan); }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: 14px; }
.toggle input { display: none; }
.toggle .track { width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .14); position: relative; transition: background .2s; flex: 0 0 auto; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .track { background: var(--grad); }
.toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:disabled + .track { opacity: .45; }

/* ---------- stations ---------- */
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.station {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; min-height: 104px;
  text-align: left; cursor: pointer; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.station:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(255, 255, 255, .35); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.station:disabled { opacity: .5; cursor: not-allowed; }
.station .s-emoji { font-size: 24px; }
.station b { font-family: var(--display); font-size: 18px; }
.station small { display: block; color: rgba(255, 255, 255, .72); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station.active { box-shadow: 0 0 0 2px var(--cyan), 0 0 24px rgba(34, 227, 255, .35); }
.st-country { background: linear-gradient(135deg, #b45309, #7c2d12 70%, #3b0764); }
.st-hiphop { background: linear-gradient(135deg, #7c3aed, #1e1b4b); }
.st-pop { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.st-rock { background: linear-gradient(135deg, #dc2626, #450a0a); }
.st-rnb { background: linear-gradient(135deg, #a21caf, #312e81); }
.st-edm { background: linear-gradient(135deg, #06b6d4, #4338ca); }
.st-lofi { background: linear-gradient(135deg, #0f766e, #1e3a8a 70%, #312e81); }

/* ---------- search ---------- */
.search-form { display: flex; gap: 10px; }
.search-input { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(0, 10, 34, .6); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; min-width: 0; }
.search-input:focus-within { border-color: rgba(34, 227, 255, .6); box-shadow: 0 0 0 4px rgba(34, 227, 255, .1); }
.search-input svg { width: 18px; height: 18px; color: var(--dim); flex: 0 0 auto; }
.search-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 15px; }
.search-input input::placeholder { color: var(--dim); }
.results { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; max-height: 460px; overflow-y: auto; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ---------- track rows ---------- */
.row { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; transition: background .15s; position: relative; }
.row.no-handle { grid-template-columns: 64px minmax(0, 1fr) auto; }
.row:hover { background: rgba(255, 255, 255, .05); }
.thumb { width: 64px; height: 36px; border-radius: 8px; overflow: hidden; background: var(--grad-soft); flex: 0 0 auto; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 16px; height: 16px; color: rgba(255, 255, 255, .7); }
.r-body { min-width: 0; }
.r-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub { color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.r-sub img { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.r-actions { display: flex; align-items: center; gap: 2px; }
.r-dur { color: var(--dim); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.handle { cursor: grab; color: var(--dim); width: 22px; height: 36px; display: grid; place-items: center; touch-action: none; border: 0; background: transparent; padding: 0; }
.handle:disabled { cursor: default; opacity: .3; }
.handle svg { width: 16px; height: 16px; }
.row.dragging { background: rgba(34, 227, 255, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); z-index: 5; }
.row.placeholder { border: 1px dashed rgba(34, 227, 255, .5); background: rgba(34, 227, 255, .05); }
.row .idx { width: 22px; text-align: center; color: var(--dim); font-size: 12.5px; }
.queue-list { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow-y: auto; position: relative; }
.queue-empty { padding: 22px 8px; text-align: center; color: var(--muted); font-size: 14px; }
.badge-auto { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--magenta); }

/* ---------- party ---------- */
.party-list { display: flex; flex-wrap: wrap; gap: 10px; }
.listener { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.listener img, .listener .ph { width: 28px; height: 28px; border-radius: 50%; background: var(--grad-soft); }
.listener.me { border-color: rgba(34, 227, 255, .5); }
.autoplay-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-top: 14px; }
.autoplay-box p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 50; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { pointer-events: auto; padding: 11px 16px; border-radius: 12px; background: rgba(8, 24, 64, .96); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; animation: pop .2s ease-out; max-width: 100%; }
.toast.err { border-color: rgba(255, 90, 130, .55); color: #ffd0dc; }
.toast.ok { border-color: rgba(34, 227, 255, .45); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* dropdown menu */
.menu { position: absolute; z-index: 40; min-width: 260px; max-width: 92vw; max-height: 70vh; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--text); font-size: 14px; }
.menu button:hover, .menu a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.menu .gicon { width: 26px; height: 26px; font-size: 11px; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: #f5b334; }
.conn.live i { background: #34f5a5; box-shadow: 0 0 8px #34f5a5; }

footer.foot { position: relative; z-index: 1; text-align: center; color: var(--dim); font-size: 12.5px; padding: 0 16px 30px; }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .grid { display: flex; flex-direction: column; }
  .col { display: contents; }
  .np { order: 1; } .o-search { order: 2; } .o-queue { order: 3; } .o-stations { order: 4; } .o-party { order: 5; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .hero-art { order: -1; }
  .np-inner { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .progress { padding: 0 16px; }
  .controls { gap: 6px; padding: 10px 10px 4px; }
  .controls-2 { padding: 6px 16px 16px; }
  .vol { max-width: none; }
  .user-chip .uname, .brand span, .conn { display: none; }
  .topbar { gap: 10px; }
  .guild-btn { max-width: 62vw; }
  .panel { padding: 14px; }
  .r-dur { display: none; }
  .features { grid-template-columns: 1fr; }
  .row { grid-template-columns: auto 56px minmax(0, 1fr) auto; gap: 10px; }
  .row.no-handle { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .thumb { width: 56px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.chev { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.panel { min-width: 0; }
.search-input input { width: 100%; }
.search-form .btn { flex: 0 0 auto; }

/* =================== v2: app shell =================== */
:root { --accent: #22e3ff; --accent-rgb: 34, 227, 255; --sidebar: 248px; --bar: 84px; }
body[data-accent="magenta"] { --accent: #e14bff; --accent-rgb: 225, 75, 255; }
body[data-accent="purple"] { --accent: #a78bfa; --accent-rgb: 167, 139, 250; }
body[data-accent="lime"] { --accent: #a3e635; --accent-rgb: 163, 230, 53; }
body[data-accent="amber"] { --accent: #fbbf24; --accent-rgb: 251, 191, 36; }
a { color: var(--accent); }
.np-kicker, .panel-head h2 svg, .icon-btn.on, .chip.accent { color: var(--accent); }
.chip.accent { border-color: rgba(var(--accent-rgb), .35); }
.loop-badge small { color: var(--accent); }

.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s; }
.shell.collapsed { --sidebar: 76px; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 16px 12px calc(var(--bar) + 12px); display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); background: rgba(0, 10, 34, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow-y: auto; overflow-x: hidden; }
.sidebar .brand { padding: 4px 8px; }
.sb-guild { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; text-align: left; min-width: 0; }
.sb-guild:hover { border-color: rgba(var(--accent-rgb), .5); }
.sb-guild .gname { flex: 1; min-width: 0; }
.sb-guild b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-guild small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { color: var(--dim); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 10px 10px 4px; display: flex; align-items: center; justify-content: space-between; }
.nav a, .nav button.navlink { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14.5px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a:hover, .nav button.navlink:hover { background: rgba(255, 255, 255, .05); color: var(--text); text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), .02)); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav .pl-thumb { width: 26px; height: 26px; border-radius: 6px; background: var(--grad-soft); flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; }
.nav .pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nav .pl-thumb svg { width: 14px; height: 14px; }
.shell.collapsed .sidebar .brand span, .shell.collapsed .nav a span, .shell.collapsed .nav-label, .shell.collapsed .sb-guild .gname, .shell.collapsed .sb-guild .chev, .shell.collapsed .nav-playlists { display: none; }
.shell.collapsed .nav a { justify-content: center; padding: 10px; }
.shell.collapsed .sb-guild { justify-content: center; padding: 6px; }
.sb-foot { margin-top: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px clamp(14px, 3vw, 28px); background: rgba(0, 14, 45, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .navbtns { display: flex; gap: 4px; }
.topbar .navbtns .icon-btn { width: 36px; height: 36px; background: rgba(255, 255, 255, .05); }
.topbar form { flex: 1; max-width: 560px; }
.topbar .search-input { height: 42px; border-radius: 999px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.view { padding: 22px clamp(14px, 3vw, 28px) calc(var(--bar) + 40px); max-width: 1500px; width: 100%; }
.page-title { font-family: var(--display); font-size: clamp(26px, 3vw, 34px); font-weight: 800; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 22px; }
.section { margin: 0 0 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-family: var(--display); font-size: 21px; margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head .meta { color: var(--dim); font-size: 13px; }
.carousel-wrap { position: relative; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.carousel > * { scroll-snap-align: start; }
.car-arrows { display: flex; gap: 6px; }
.car-arrows .icon-btn { width: 32px; height: 32px; background: rgba(255, 255, 255, .06); }

/* cards */
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; color: var(--text); transition: transform .15s, border-color .2s, background .2s; min-width: 0; }
.card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .4); background: rgba(14, 34, 84, .7); text-decoration: none; }
.card .art { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--grad-soft); display: grid; place-items: center; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .art .ph { color: rgba(255, 255, 255, .8); }
.card .art .ph svg { width: 40px; height: 40px; }
.card .art.round { border-radius: 50%; }
.card b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.card small { color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.card .card-play { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; cursor: pointer; }
.card .card-play svg { width: 20px; height: 20px; }
.card:hover .card-play, .card:focus-within .card-play { opacity: 1; transform: none; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.genre-card { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); display: block; color: #fff; text-align: left; padding: 0; transition: transform .15s, box-shadow .2s; }
.genre-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.genre-card:disabled { opacity: .55; cursor: not-allowed; }
.genre-card .g-art { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; opacity: .55; }
.genre-card .g-art img { width: 100%; height: 100%; object-fit: cover; }
.genre-card .g-tint { position: absolute; inset: 0; mix-blend-mode: normal; opacity: .82; }
.genre-card .g-body { position: absolute; inset: auto 0 0 0; padding: 14px; background: linear-gradient(0deg, rgba(0, 0, 0, .55), transparent); }
.genre-card .g-body b { font-family: var(--display); font-size: 21px; display: block; }
.genre-card .g-body small { color: rgba(255, 255, 255, .78); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre-card .s-emoji { position: absolute; top: 12px; left: 14px; font-size: 26px; }
.genre-card.active { box-shadow: 0 0 0 2px var(--accent), 0 0 24px rgba(var(--accent-rgb), .35); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.qp { display: flex; align-items: center; gap: 12px; padding: 6px; padding-right: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-width: 0; cursor: pointer; transition: background .15s, border-color .2s; }
.qp:hover { background: rgba(14, 34, 84, .75); border-color: rgba(var(--accent-rgb), .35); }
.qp .thumb { width: 52px; height: 52px; border-radius: 9px; }
.qp .r-body { flex: 1; }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 16px; }
.empty b { display: block; color: var(--text); font-family: var(--display); font-size: 18px; margin-bottom: 4px; }

/* hero header for collections */
.hero-head { display: flex; align-items: flex-end; gap: 24px; padding: 22px; border-radius: 22px; margin-bottom: 22px; background: linear-gradient(135deg, rgba(139, 92, 246, .35), rgba(217, 70, 239, .18) 55%, rgba(var(--accent-rgb), .18)); border: 1px solid var(--line-2); }
.hero-head .cover { width: 180px; height: 180px; border-radius: 16px; overflow: hidden; flex: 0 0 auto; background: var(--grad); display: grid; place-items: center; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.hero-head .cover.round { border-radius: 50%; }
.hero-head .cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-head .cover svg { width: 64px; height: 64px; color: #fff; }
.hero-head .kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent); }
.hero-head h1 { font-family: var(--display); font-size: clamp(28px, 4vw, 48px); margin: 4px 0 6px; line-height: 1.05; overflow-wrap: anywhere; }
.hero-head .muted { font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.list { display: flex; flex-direction: column; gap: 2px; }
.row.lib { grid-template-columns: 28px 56px minmax(0, 1fr) minmax(0, .6fr) auto; }
.row.lib .idx { width: 28px; }
.row.lib .thumb { width: 56px; height: 56px; border-radius: 8px; }
.row .r-album { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-title a, .r-sub a, .r-album a { color: inherit; }
.row .play-overlay { display: none; }
.heart { color: var(--dim); }
.heart.on { color: #ff4f9a; }
.heart.on svg { fill: currentColor; }
.day-label { color: var(--dim); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin: 18px 6px 6px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.tag.added { color: var(--accent); background: rgba(var(--accent-rgb), .1); }

/* now-playing compact hero (home) */
.np-mini { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; margin-bottom: 26px; cursor: pointer; background: linear-gradient(90deg, rgba(139, 92, 246, .22), rgba(var(--accent-rgb), .08)); border: 1px solid var(--line-2); }
.np-mini .thumb { width: 96px; height: 54px; border-radius: 10px; }
.np-mini .r-title { font-size: 16px; }

/* bottom player bar */
.playerbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: var(--bar); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 18px; background: rgba(2, 12, 38, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line-2); box-shadow: 0 -10px 30px rgba(0, 0, 0, .3); }
.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-left .thumb { width: 54px; height: 54px; border-radius: 10px; cursor: pointer; }
.pb-left .r-body { min-width: 0; cursor: pointer; }
.pb-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pb-controls { display: flex; align-items: center; gap: 8px; }
.pb-controls .play-btn { width: 42px; height: 42px; box-shadow: 0 6px 18px rgba(217, 70, 239, .4); }
.pb-controls .play-btn svg { width: 20px; height: 20px; }
.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.pb-progress .bar { flex: 1; height: 4px; }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.pb-right .vol { max-width: 150px; min-width: 90px; }
.pb-right .listeners { display: flex; align-items: center; margin-right: 6px; }
.pb-right .listeners img { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #02102f; margin-left: -6px; }
.pb-empty { color: var(--dim); font-size: 13.5px; }

/* settings */
.settings { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.setting .s-text { min-width: 0; }
.setting .s-text b { display: block; }
.setting .s-text span { color: var(--muted); font-size: 13.5px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--grad); color: #fff; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }

/* staff */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.stat small { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; display: block; }
.stat b { font-family: var(--display); font-size: 20px; display: block; margin-top: 4px; }
.stat .ok { color: #34f5a5; } .stat .bad { color: #ff7a9a; } .stat .warn { color: #fbbf24; }
.staff-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.guild-box { margin-bottom: 18px; }
.guild-box .gb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.guild-box .gb-head b { font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger { border-color: rgba(255, 90, 130, .5); color: #ffb3c6; }
.btn.danger:hover:not(:disabled) { border-color: #ff5a82; }
.field { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0, 10, 34, .6); color: var(--text); font: inherit; font-size: 14px; outline: none; min-width: 0; }
.input:focus { border-color: rgba(var(--accent-rgb), .6); }
.log { display: flex; flex-direction: column; max-height: 640px; overflow-y: auto; }
.log-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log-row time { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.log-row .who { font-weight: 600; }
.log-row .act { color: var(--accent); font-weight: 600; }
.log-row .det { color: var(--muted); overflow-wrap: anywhere; }
.ban-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mini-q { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.dialog-back { position: fixed; inset: 0; z-index: 60; background: rgba(0, 5, 20, .6); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(440px, 100%); padding: 20px; border-radius: 18px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.dialog h3 { margin: 0 0 6px; font-family: var(--display); font-size: 20px; }
.dialog p { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.dialog .input { width: 100%; margin-bottom: 14px; }
.dialog .btn-row { justify-content: flex-end; }
.menu .sub-label { color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; padding: 8px 10px 4px; font-weight: 700; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .who { padding: 10px; display: flex; align-items: center; gap: 10px; }
.menu .who img { width: 36px; height: 36px; border-radius: 50%; }
.menu .who small { display: block; color: var(--dim); font-size: 12px; }
.ver { color: var(--dim); font-size: 12px; padding: 6px 10px; }

@media (max-width: 1100px) {
  .staff-grid { grid-template-columns: 1fr; }
  .playerbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pb-right { display: flex; }
  .pb-right > :not(.lyrics-btn) { display: none; }
  .pb-center { align-items: flex-end; }
  .pb-progress { display: none; }
}
@media (max-width: 860px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; --sidebar: 270px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 55; transform: translateX(-105%); transition: transform .22s; background: rgba(0, 10, 34, .97); }
  .shell.drawer .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
  .shell.collapsed .sidebar .brand span, .shell.collapsed .nav a span, .shell.collapsed .nav-label, .shell.collapsed .sb-guild .gname, .shell.collapsed .nav-playlists { display: initial; }
  .scrim { position: fixed; inset: 0; z-index: 54; background: rgba(0, 0, 0, .5); }
  .menu-btn { display: inline-grid; }
  .topbar .navbtns { display: none; }
  .collapse-btn { display: none !important; }
  .hero-head { flex-direction: column; align-items: flex-start; }
  .hero-head .cover { width: 140px; height: 140px; }
  .row.lib { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .row.lib .idx, .row.lib .r-album { display: none; }
  .row.lib .thumb { width: 48px; height: 48px; }
  .carousel { grid-auto-columns: 148px; }
  :root { --bar: 70px; }
  .playerbar { padding: 0 10px; gap: 8px; }
  .playerbar::before { content: ''; position: absolute; left: 0; top: 0; height: 2px; width: var(--pb-pos, 0%); background: var(--grad); }
  .pb-left .thumb { width: 46px; height: 46px; }
  .pb-controls .icon-btn.prev, .pb-controls .icon-btn.hide-sm { display: none; }
  .quick { grid-template-columns: 1fr; }
}

/* =================== v2: component details =================== */
.ico { display: contents; }
.pb-art { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; background: var(--grad-soft); display: grid; place-items: center; }
.pb-art img { width: 100%; height: 100%; object-fit: cover; }
.pb-meta { min-width: 0; flex: 0 1 auto; }
.pb-title { display: block; color: var(--text); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-title:hover { text-decoration: none; color: var(--accent); }
.pb-sub { color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-sub a { color: inherit; }
.play-btn.sm { width: 42px; height: 42px; }
.play-btn.sm svg { width: 20px; height: 20px; }
.playerbar.idle .pb-art { opacity: .7; }
.row.lib.noidx { grid-template-columns: 56px minmax(0, 1fr) minmax(0, .6fr) auto; }
.r-idx { position: relative; width: 28px; height: 28px; display: grid; place-items: center; color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.r-idx .r-play { position: absolute; inset: 0; opacity: 0; }
.row.lib:hover .r-idx b { opacity: 0; }
.row.lib:hover .r-idx .r-play { opacity: 1; }
.r-play { border: 0; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; border-radius: 8px; }
.r-play svg { width: 16px; height: 16px; }
.r-play:disabled { cursor: not-allowed; }
.thumb-wrap { position: relative; }
.r-play.over { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .15s; }
.row.lib:hover .r-play.over { opacity: 1; }
.row.lib.playing .r-title { color: var(--accent); }
.row.lib.playing .r-idx b { color: var(--accent); }
.row.lib { cursor: default; }
.a-link { color: inherit; }
.r-sub .tag { margin-left: 6px; }
.nav-label .icon-btn.sm { width: 26px; height: 26px; }
.nav-label .icon-btn.sm svg { width: 15px; height: 15px; }
.shell.collapsed .sb-foot span { display: none; }
.topbar .conn { margin-right: 4px; }
.topbar .conn { font-size: 0; }
.topbar .conn i { margin: 0; }
.np-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.np-page .col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.np-page .queue-list { max-height: 520px; }
.np-mini .np-text { flex: 1; min-width: 0; }
.np-mini .np-kick { color: var(--accent); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.np-mini .eq { position: static; }
.card .art .mosaic { position: absolute; inset: 0; }
.g-tint.st-country { background: linear-gradient(160deg, #f59e0b, #b45309); }
.g-tint.st-hiphop { background: linear-gradient(160deg, #8b5cf6, #3b0764); }
.g-tint.st-pop { background: linear-gradient(160deg, #ec4899, #9d174d); }
.g-tint.st-rock { background: linear-gradient(160deg, #ef4444, #7f1d1d); }
.g-tint.st-rnb { background: linear-gradient(160deg, #d946ef, #581c87); }
.g-tint.st-edm { background: linear-gradient(160deg, #06b6d4, #1e3a8a); }
.g-tint.st-lofi { background: linear-gradient(160deg, #14b8a6, #134e4a); }
.g-tint { background: var(--grad); }
.artist-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.staff-guild-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.staff-guild-tabs .btn.on { border-color: var(--accent); color: var(--text); background: rgba(var(--accent-rgb), .12); }
.gb-now { display: flex; gap: 12px; align-items: center; margin: 8px 0 12px; }
.gb-now .thumb { width: 72px; height: 40px; }
.restart-box p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
@media (max-width: 1100px) { .np-page { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .row.lib.noidx { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .row.lib .r-idx { display: none; }
  .row.lib .r-actions .r-dur { display: none; }
  .hide-sm { display: none !important; }
  .pb-art { width: 46px; height: 46px; }
  .topbar .search-input { height: 38px; }
  .topbar .user-chip .uname { display: none; }
}
.section-head h2 svg { width: 22px; height: 22px; color: var(--accent); flex: 0 0 auto; }
.sb-foot svg { width: 18px; height: 18px; }
.page-title + .page-sub { margin-top: 2px; }
.empty svg, .np-empty svg { width: 18px; height: 18px; }
.hero-head .muted a { color: inherit; }
.card .art .ph { display: grid; place-items: center; }
.menu svg { width: 17px; height: 17px; flex: 0 0 auto; }
.chip svg { width: 14px; height: 14px; }
.banner .b-icon svg { width: 22px; height: 22px; }
.stat b { overflow-wrap: anywhere; }
@media (max-width: 860px) { .topbar .spacer { display: none; } .topbar form { flex: 1; max-width: none; min-width: 0; } .topbar { gap: 8px; } }

/* ---------- Trey control (owner only) ---------- */
.trey-page .stats { margin-bottom: 12px; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tr-panel { margin-bottom: 18px; }
.tr-panel .panel-head { flex-wrap: wrap; }
.tr-panel .meta.over { color: #ff7a9a; }
.tr-session { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(0, 10, 34, .35); }
.tr-session + .tr-session { margin-top: 10px; }
.tr-session-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tr-roster { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.tr-person { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.tr-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.tr-inline { display: flex; gap: 8px; align-items: center; }
.tr-inline + .tr-inline { margin-top: 6px; }
.tr-inline .input { flex: 1; min-width: 0; }
.tr-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tr-toggle-row b { font-size: 14px; }
.tr-sliders { padding-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.tr-slider-top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.tr-slider-top output { color: var(--accent); font-variant-numeric: tabular-nums; }
.tr-slider input[type=range] { width: 100%; accent-color: var(--accent); }
.tr-config { font-size: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.tr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tr-field > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
.tr-textarea { width: 100%; height: 320px; padding: 10px 12px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; }
.tr-textarea.sm { height: 90px; font-family: inherit; font-size: 14px; }
.tr-sep { height: 1px; background: var(--line); margin: 16px 0; }
.tr-users { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 520px; overflow-y: auto; }
.tr-user { border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 10, 34, .35); }
.tr-user-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.tr-user-head:hover { background: rgba(255, 255, 255, .04); }
.tr-user-head b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-user-body { padding: 4px 12px 12px; }
.tr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.tr-logs { margin: 0; max-height: 420px; overflow: auto; padding: 10px 12px; border-radius: 12px; background: rgba(0, 6, 22, .75); border: 1px solid var(--line); font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.tr-logs .err { color: #ff9ab3; }
.section-head .seg { flex: 0 0 auto; }
@media (max-width: 860px) {
  .tr-session-head { flex-wrap: wrap; }
  .tr-textarea { height: 240px; }
}
.trey-page .staff-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.trey-page .staff-grid > div { min-width: 0; }
@media (max-width: 1100px) { .trey-page .staff-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .trey-page .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .trey-page .section-head { flex-wrap: wrap; gap: 10px; }
  .tr-panel { padding: 14px; }
  .tr-person .btn.sm { padding: 0 10px; }
}

/* ---------- staff panel v2 (home server + cleaner layout) ---------- */
.home-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(34, 227, 255, .4);
  background: rgba(34, 227, 255, .1);
  vertical-align: middle;
}
.menu button.home-opt .home-tag { display: block; margin: 3px 0 0; width: fit-content; }
.section-hint { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; line-height: 1.45; }
.staff-page .section-head { margin-bottom: 6px; }
.staff-overview {
  margin-bottom: 22px;
  padding: 18px 20px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.so-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px 24px; align-items: start; }
.so-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.so-metric { min-width: 0; padding: 4px 2px; }
.so-metric small { display: block; color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.so-metric b { display: block; font-family: var(--display); font-size: 26px; margin: 2px 0 2px; letter-spacing: -.3px; }
.so-metric span { color: var(--muted); font-size: 12.5px; }
.so-health-label { color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; margin-bottom: 8px; }
.so-pills, .so-health .tr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.so-pill { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); min-width: 92px; }
.so-pill small { color: var(--dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; }
.so-pill b { font-size: 13.5px; font-weight: 700; }
.so-pill.ok b { color: #34f5a5; }
.so-pill.bad b { color: #ff7a9a; }
.so-pill.warn b { color: #fbbf24; }
.so-hint { margin: 14px 0 0; color: var(--dim); font-size: 12.5px; }
.st-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted);
  flex: 0 0 auto;
}
.st-badge.playing { color: #34f5a5; border-color: rgba(52, 245, 165, .4); background: rgba(52, 245, 165, .1); }
.st-badge.paused { color: #fbbf24; border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .1); }
.st-badge.connected { color: var(--cyan); border-color: rgba(34, 227, 255, .35); background: rgba(34, 227, 255, .08); }
.st-badge.idle { color: var(--dim); }
.guild-box .gb-title { flex: 1; min-width: 0; }
.guild-box .gb-title b { font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-box .gb-sub { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.guild-box.is-playing { border-color: rgba(52, 245, 165, .28); }
.guild-box.is-paused { border-color: rgba(251, 191, 36, .28); }
.gb-idle { margin: 4px 0 8px; font-size: 13.5px; }
.gb-actions { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.gb-danger-row {
  margin-top: 12px;
  padding-top: 12px;
  padding-left: 2px;
  border-top: 1px dashed rgba(255, 90, 130, .35);
  gap: 8px;
}
.danger-note { color: #ffb3c6; font-size: 12.5px; align-self: center; }
.danger-zone { border-color: rgba(255, 90, 130, .28); background: linear-gradient(180deg, rgba(255, 90, 130, .06), rgba(10, 28, 72, .62)); }
.danger-zone .panel-head h2 { color: #ffb3c6; }
.danger-zone .panel-head h2 svg { color: #ff7a9a; }
.staff-tools, .staff-owner { margin-top: 28px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tool-card { padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.tool-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tool-head b { font-size: 15px; }
.tool-block { margin-top: 4px; }
.tool-block + .tool-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tool-danger { border-top-color: rgba(255, 90, 130, .3); }
.tool-label { margin: 0 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
.ban-list { margin-top: 10px; }
.log-panel { min-height: 280px; }
.log-filters { margin-bottom: 12px; }
.log-row { display: grid; grid-template-columns: 72px 22px minmax(0, 1fr); gap: 8px 10px; align-items: start; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log-row time { display: flex; flex-direction: column; color: var(--dim); font-variant-numeric: tabular-nums; line-height: 1.25; }
.log-row .log-time { font-size: 12.5px; color: var(--muted); }
.log-row .log-ago { font-size: 11px; color: var(--dim); }
.log-ico { color: var(--accent); display: grid; place-items: center; padding-top: 2px; }
.log-ico svg { width: 16px; height: 16px; }
.log-body { min-width: 0; }
.log-main { overflow-wrap: anywhere; }
.log-meta { color: var(--dim); font-size: 12px; margin-top: 2px; }
.staff-page .empty { margin: 8px 0; padding: 20px 16px; }
@media (max-width: 1100px) {
  .so-top { grid-template-columns: 1fr; }
  .so-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .staff-overview { padding: 14px; }
  .so-metrics { gap: 10px; }
  .so-metric b { font-size: 22px; }
  .log-row { grid-template-columns: 64px minmax(0, 1fr); }
  .log-ico { display: none; }
  .gb-head { flex-wrap: wrap; }
  .gb-actions .btn-row { width: 100%; }
  .tool-grid { grid-template-columns: 1fr; }
  .section-head { flex-wrap: wrap; }
  .home-tag { margin-left: 6px; }
}

/* ---------- lyrics panel ---------- */
.lyrics-panel { position: fixed; inset: 0; z-index: 48; pointer-events: none; }
.lyrics-panel.open { pointer-events: auto; }
.lyrics-scrim { display: none; position: absolute; inset: 0; background: rgba(0, 4, 18, .55); }
.lyrics-drawer {
  position: absolute; top: 12px; right: 12px; bottom: calc(var(--bar) + 12px);
  width: min(420px, calc(100vw - 24px));
  display: flex; flex-direction: column;
  background: rgba(4, 16, 48, .94);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 0 40px rgba(34, 227, 255, .08);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateX(110%);
  transition: transform .22s ease;
  overflow: hidden;
}
.lyrics-panel.open .lyrics-drawer { transform: none; }
.lyrics-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .12), transparent);
  flex: 0 0 auto;
}
.lyrics-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.lyrics-title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyrics-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.lyrics-head-text { min-width: 0; flex: 1; }
.lyrics-body {
  flex: 1; overflow-y: auto; padding: 28px 22px 80px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 28px), transparent 100%);
}
.ly-line, .ly-plain {
  font-family: var(--display);
  font-size: 20px; font-weight: 600; line-height: 1.45;
  color: var(--dim); padding: 6px 0;
  transition: color .15s, transform .15s, text-shadow .15s;
  overflow-wrap: anywhere;
}
.ly-line.on {
  color: var(--text);
  transform: translateX(2px);
  text-shadow: 0 0 18px rgba(var(--accent-rgb), .35);
}
.ly-plain { color: var(--text); font-weight: 600; font-size: 16px; line-height: 1.6; }
.lyrics-empty { color: var(--muted); text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 15px; }
.lyrics-btn.on { color: var(--accent); }
@media (max-width: 860px) {
  .lyrics-scrim { display: block; }
  .lyrics-drawer {
    top: 0; right: 0; left: 0; bottom: 0;
    width: 100%; border-radius: 0; border: 0;
  }
  .ly-line, .ly-plain { font-size: 22px; }
  .lyrics-title { white-space: normal; }
}
