:root{
  --void:#0A0714;
  --void-deep:#050310;
  --panel:#150F24;
  --panel-hover:#1C1533;
  --panel-raised:#211A3A;
  --surface:rgba(21,15,36,.72);
  --surface-2:rgba(33,26,58,.78);
  /* faint top-lit sheen layered over surfaces, so panels read as glass */
  --glass:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.008) 60%);
  --pink:#FF3EA5;
  --cyan:#2FF3E0;
  --violet:#9B5DE5;
  --text:#F1EAFB;
  --text-dim:#9C90BE;
  --text-faint:#6C6390;
  --line:rgba(155,93,229,.28);
  --line-bright:rgba(155,93,229,.55);
  --danger:#FF5470;
  --ok:#2FF3B0;
  --radius:18px;
  --grad-brand: linear-gradient(90deg, var(--pink), var(--violet) 55%, var(--cyan));
  --grad-action: linear-gradient(135deg, var(--pink), var(--violet));
  --glow-pink: 0 0 18px rgba(255,62,165,.45);
  --glow-cyan: 0 0 18px rgba(47,243,224,.4);
  --glow-violet: 0 0 22px rgba(155,93,229,.4);
  /* set by app.js while the floating mini player is on screen */
  --mini-h:0px;
  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
/* .np-content, .tab etc explicitly set display, which otherwise beats the
   browser's default [hidden]{display:none} at equal specificity */
[hidden]{ display:none !important; }
body{
  position:relative;
  background:var(--void);
  color:var(--text);
  font-family:"Rajdhani", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size:16.5px;
  font-weight:500;
  line-height:1.5;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
  animation: body-in .5s ease both;
}
/* Wide, low-alpha radial gradients over near-black band visibly at 8-bit
   colour depth. A faint, fixed noise layer breaks the bands up into a clean,
   film-grain-like gradient instead of adding more gradient stops. */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.05;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxmaWx0ZXIgaWQ9Im4iPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjg1IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI24pIi8+PC9zdmc+");
}
/* ---------- background atmosphere ---------- */
.bg-fx{ position:fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden; }
.glow{ position:absolute; width:70vmax; height:70vmax; border-radius:50%; will-change:transform; }
.g1{ top:-38vmax; left:-22vmax; background:radial-gradient(circle, rgba(255,62,165,.17), transparent 62%); animation:drift-a 32s ease-in-out infinite alternate; }
.g2{ top:-24vmax; right:-34vmax; background:radial-gradient(circle, rgba(47,243,224,.11), transparent 62%); animation:drift-b 38s ease-in-out infinite alternate; }
.g3{ bottom:-46vmax; left:18vw; background:radial-gradient(circle, rgba(155,93,229,.14), transparent 62%); animation:drift-c 44s ease-in-out infinite alternate; }
@keyframes drift-a{ to{ transform:translate(14vw, 10vh) scale(1.12); } }
@keyframes drift-b{ to{ transform:translate(-12vw, 14vh) scale(.92); } }
@keyframes drift-c{ to{ transform:translate(-16vw, -8vh) scale(1.08); } }
/* synthwave floor: a perspective grid rolling slowly towards the viewer */
.grid-floor{
  position:absolute; left:0; right:0; bottom:0; height:46vh; perspective:320px; perspective-origin:50% 0;
  -webkit-mask-image:linear-gradient(to top, rgba(0,0,0,.9), transparent 92%);
  mask-image:linear-gradient(to top, rgba(0,0,0,.9), transparent 92%);
  opacity:.16;
}
.grid-plane{
  position:absolute; left:-60%; width:220%; top:0; height:260%;
  background-image:
    linear-gradient(rgba(255,62,165,.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,93,229,.9) 1px, transparent 1px);
  background-size:72px 72px;
  transform-origin:50% 0; transform:rotateX(72deg);
  animation:grid-roll 5s linear infinite;
}
@keyframes grid-roll{ to{ transform:rotateX(72deg) translateY(72px); } }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation-duration:.001s !important; animation-iteration-count:1 !important; transition-duration:.001s !important; }
}
@keyframes body-in{ from{ opacity:0; } to{ opacity:1; } }
@keyframes spin{ to{ transform:rotate(360deg); } }

h1,h2,h3{ margin:0; font-weight:600; }
p{ margin:0; }
h1, .brand-word, .np-title{ font-family:"Orbitron","Rajdhani",sans-serif; }
code{ font-family:"IBM Plex Mono", monospace; background:var(--panel-raised); padding:1px 6px; border-radius:5px; color:var(--cyan); font-size:.85em; }
a{ color:var(--cyan); }
button{ font-family:inherit; cursor:pointer; color:inherit; }
img{ display:block; }
::selection{ background:rgba(255,62,165,.35); color:var(--text); }
html{ scrollbar-color:rgba(155,93,229,.45) transparent; }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:rgba(155,93,229,.35); border-radius:6px; border:2px solid transparent; background-clip:padding-box; }
::-webkit-scrollbar-thumb:hover{ background-color:rgba(255,62,165,.55); }
::-webkit-scrollbar-track{ background:transparent; }
:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }

.ic{ width:1.2em; height:1.2em; flex:none; display:inline-block; vertical-align:middle; }

.shell{
  position:relative; z-index:1;
  max-width:1000px; margin:0 auto;
  padding:18px 18px calc(64px + var(--mini-h));
}

/* ---------- topbar ---------- */
.topbar{
  position:relative;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:6px 2px 18px; margin-bottom:22px;
}
/* a neon hairline that fades out at both ends instead of a flat border */
.topbar::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,62,165,.55) 20%, rgba(155,93,229,.5) 55%, rgba(47,243,224,.45) 80%, transparent);
}
.brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.brand-word{
  font-size:1.5rem; font-weight:700; letter-spacing:.06em;
  background:linear-gradient(90deg, var(--pink), var(--violet), var(--cyan), var(--violet), var(--pink));
  background-size:200% 100%;
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 0 10px rgba(155,93,229,.35));
  animation:brand-flow 12s linear infinite;
}
@keyframes brand-flow{ to{ background-position:200% 0; } }
/* melting vinyl ice cream — see the note next to it in index.html */
.brand-mark{ height:44px; width:auto; aspect-ratio:42 / 59; flex-shrink:0;
  filter:drop-shadow(0 0 7px rgba(255,62,165,.45)); }

.user-box{ display:flex; align-items:center; gap:10px; font-size:.9rem; color:var(--text-dim); }
.voice-pill{
  display:inline-flex; align-items:center; gap:7px; padding:4px 11px; border-radius:999px;
  border:1px solid var(--line); font-size:.8rem; font-weight:600; letter-spacing:.02em; white-space:nowrap;
  transition:color .3s, border-color .3s;
}
.voice-pill.live{ color:var(--ok); border-color:rgba(47,243,176,.35); }
.status-dot{ width:8px; height:8px; border-radius:50%; background:var(--text-faint); display:inline-block; transition:.3s; }
.voice-pill.live .status-dot{ background:var(--ok); box-shadow:0 0 8px var(--ok); animation:pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot{ 50%{ opacity:.45; } }
.user-chip{ display:inline-flex; align-items:center; gap:8px; color:var(--text); font-weight:600; min-width:0; }
.user-name{ max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.avatar{
  width:30px; height:30px; border-radius:50%; flex:none;
  display:grid; place-items:center; font-weight:700; font-size:.85rem; color:#fff;
  background:var(--grad-action); box-shadow:0 0 12px rgba(255,62,165,.35);
}
.icon-link{
  width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  color:var(--text-dim); transition:color .2s, background .2s;
}
button.icon-link{ border:none; background:none; padding:0; }
.icon-link:hover{ color:var(--cyan); background:rgba(255,255,255,.06); }
.icon-link .ic{ width:19px; height:19px; }

.conn-banner{
  position:sticky; top:0; z-index:40; margin:0 0 14px; padding:9px 14px; border-radius:10px;
  background:rgba(255,84,112,.14); border:1px solid var(--danger); color:var(--text);
  font-size:.9rem; text-align:center; backdrop-filter:blur(8px);
}

/* ---------- layout ---------- */
/* one column: player, then tabs, then content (see the wide-screen override) */
.layout{
  display:grid; grid-template-columns:minmax(0,1fr); column-gap:28px; row-gap:0;
  grid-template-areas:"side" "tabs" "main";
}
.side{ grid-area:side; min-width:0; margin-bottom:12px; }
.tabs-wrap{ grid-area:tabs; min-width:0; }
.main{ grid-area:main; min-width:0; }

/* ---------- now playing ---------- */
.now-playing{
  position:relative; isolation:isolate; overflow:hidden;
  background:linear-gradient(160deg, rgba(21,15,36,.94), rgba(33,26,58,.9));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  min-height:150px;
  display:flex; align-items:center;
  box-shadow:0 18px 40px rgba(0,0,0,.35);
}
.now-playing::before{
  content:""; position:absolute; inset:0; padding:1px; border-radius:var(--radius);
  background:var(--grad-brand); opacity:.4; -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; pointer-events:none;
}
/* the cover, blown up and blurred behind the card: each track tints the player */
.np-backdrop{
  position:absolute; inset:-40px; z-index:-2;
  background-image:var(--art, none); background-size:cover; background-position:center;
  filter:blur(40px) saturate(1.6); transform:scale(1.1);
  opacity:0; transition:opacity .8s ease;
}
.now-playing.has-art .np-backdrop{ opacity:.42; }
.now-playing::after{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, rgba(10,7,20,.15), rgba(10,7,20,.7));
}

.np-empty{ width:100%; display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; padding:8px 0; }
.np-empty-mark{ width:46px; height:64px; filter:drop-shadow(0 0 12px rgba(255,62,165,.45)); animation:float 4s ease-in-out infinite; margin-bottom:6px; }
@keyframes float{ 50%{ transform:translateY(-5px); } }
.np-empty-title{ font-size:1.15rem; font-weight:700; color:var(--text); }
.np-empty-sub{ color:var(--text-dim); font-size:.92rem; max-width:340px; }
.np-empty-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:12px; }

.np-content{
  width:100%;
  display:grid;
  grid-template-columns:182px minmax(0,1fr);
  grid-template-areas:
    "art meta"
    "art progress"
    "art controls"
    "extras extras"
    "picker picker";
  column-gap:22px; row-gap:10px; align-items:center;
}
/* room on the right of the cover for the record to slide out into */
.np-art-wrap{ grid-area:art; align-self:start; position:relative; padding-right:32px; }
.np-meta{ grid-area:meta; min-width:0; align-self:end; }
.np-progress{ grid-area:progress; }
.np-controls{ grid-area:controls; }
.np-extras{ grid-area:extras; }
.playlist-picker{ grid-area:picker; }

.np-art{
  position:relative; z-index:1;
  width:150px; height:150px; border-radius:14px; object-fit:cover; background:var(--panel-raised);
  box-shadow:0 12px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
  transition:box-shadow .6s ease;
}
.np-art-wrap.spin .np-art{ animation:art-pulse 3.2s ease-in-out infinite; }
@keyframes art-pulse{ 50%{ box-shadow:0 12px 30px rgba(0,0,0,.45), 0 0 26px rgba(255,62,165,.45); } }

/* The record behind the sleeve (the logo's vinyl): tucked in when paused,
   slides out and spins while playing. Its label uses the brand colours, and
   the violet quarter makes the rotation visible. */
.np-vinyl{
  position:absolute; z-index:0; top:4%; right:0; height:92%; aspect-ratio:1;
  transform:translateX(-22%); transition:transform .9s cubic-bezier(.2,.8,.2,1);
}
.now-playing.playing .np-vinyl{ transform:none; }
.np-vinyl-disc{
  position:absolute; inset:0; border-radius:50%;
  background:
    /* iridescent reflections that turn with the record, so the spin shows */
    conic-gradient(from 0deg, rgba(255,62,165,.22), transparent 14%, rgba(155,93,229,.14) 30%, transparent 44%,
      rgba(47,243,224,.18) 58%, transparent 72%, rgba(255,62,165,.12) 86%, rgba(255,62,165,.22)),
    repeating-radial-gradient(circle, #241c36 0 1px, #0e0b17 1.5px 3.1px);
  box-shadow:
    0 10px 26px rgba(0,0,0,.6),
    0 0 0 1px rgba(155,93,229,.45), 0 0 18px rgba(155,93,229,.3),
    inset 0 0 0 4px #0e0b17;
}
.np-vinyl-disc::before{
  content:""; position:absolute; inset:33%; border-radius:50%;
  background:
    radial-gradient(circle, #0A0714 0 9%, var(--cyan) 10% 24%, transparent 25%),
    conic-gradient(var(--violet) 0 25%, var(--pink) 25% 100%);
  box-shadow:0 0 0 2px #0c0a13;
}
.np-vinyl::after{
  content:""; position:absolute; inset:0; border-radius:50%; pointer-events:none;
  background:conic-gradient(from 210deg, transparent 0 6%, rgba(255,255,255,.16) 11%, transparent 17% 50%, rgba(255,255,255,.1) 57%, transparent 63%);
}
.now-playing.playing .np-vinyl-disc{ animation:spin 3.2s linear infinite; }

.np-label{
  font-family:"IBM Plex Mono",monospace; font-size:.68rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--cyan); margin:0 0 6px; display:flex; align-items:center; gap:8px;
}
.eq{ display:inline-flex; align-items:flex-end; gap:2px; height:11px; flex:none; }
.eq i{ width:2.5px; height:100%; background:currentColor; border-radius:1px; transform-origin:bottom; transform:scaleY(.3); }
.now-playing.playing .eq i{ animation:eq 1.1s ease-in-out infinite; }
.now-playing.playing .eq i:nth-child(2){ animation-delay:-.45s; }
.now-playing.playing .eq i:nth-child(3){ animation-delay:-.2s; }
.now-playing.playing .eq i:nth-child(4){ animation-delay:-.7s; }
@keyframes eq{ 0%,100%{ transform:scaleY(.25); } 50%{ transform:scaleY(1); } }
.now-playing.paused .np-label{ color:var(--pink); }

.np-title{
  font-size:1.22rem; font-weight:600; letter-spacing:.01em; line-height:1.3; margin-bottom:3px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere;
}
.np-artist{ color:var(--text-dim); font-size:1rem; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.np-by{ color:var(--text-faint); font-size:.82rem; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* progress bar = seek slider: click/drag anywhere on it (generous invisible
   hit area), knob + time tooltip on hover */
.np-bar{
  position:relative; height:5px; border-radius:4px; background:rgba(255,255,255,.1);
  cursor:pointer; touch-action:none; transition:height .15s ease;
}
.np-bar::before{ content:""; position:absolute; left:0; right:0; top:-10px; bottom:-10px; }
.np-bar:hover, .np-bar.dragging, .np-bar:focus-visible{ height:8px; }
.np-bar:focus-visible{ outline-offset:6px; }
#np-bar-fill{
  display:block; height:100%; width:0%; border-radius:4px;
  background:var(--grad-brand);
  box-shadow:0 0 10px rgba(255,62,165,.5);
  /* matches the 250 ms local progress tick in app.js */
  transition:width .25s linear;
}
.np-bar.dragging #np-bar-fill{ transition:none; }
.np-bar-knob{
  position:absolute; top:50%; left:var(--k, 0%); width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%;
  background:#fff; box-shadow:0 0 0 3px rgba(255,62,165,.3), 0 0 10px rgba(255,62,165,.7);
  opacity:0; transform:scale(.6); transition:opacity .15s, transform .15s; pointer-events:none;
}
.np-bar:hover .np-bar-knob, .np-bar.dragging .np-bar-knob, .np-bar:focus-visible .np-bar-knob{ opacity:1; transform:none; }
.np-bar-tip{
  position:absolute; bottom:calc(100% + 10px); left:var(--h, 0px); transform:translateX(-50%);
  padding:3px 8px; border-radius:6px; background:rgba(28,21,51,.95); border:1px solid var(--line-bright);
  font-family:"IBM Plex Mono",monospace; font-size:.72rem; color:var(--text); white-space:nowrap;
  opacity:0; pointer-events:none; transition:opacity .12s;
}
.np-bar.hovering .np-bar-tip, .np-bar.dragging .np-bar-tip{ opacity:1; }
@media (hover:none){ .np-bar{ height:7px; } .np-bar-knob{ opacity:1; transform:scale(.8); } }
/* a light sheen running along the filled part while playing */
.now-playing.playing #np-bar-fill{
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent) 0 0 / 30% 100% no-repeat,
    var(--grad-brand);
  animation:bar-sheen 2.6s linear infinite;
}
@keyframes bar-sheen{ from{ background-position:-40% 0, 0 0; } to{ background-position:140% 0, 0 0; } }
.np-time{ display:flex; justify-content:space-between; font-family:"IBM Plex Mono",monospace; font-size:.72rem; color:var(--text-dim); margin-top:6px; font-variant-numeric:tabular-nums; }

.np-controls{ display:flex; align-items:center; gap:12px; }
.ctrl{
  width:44px; height:44px; border-radius:50%; border:none; padding:0;
  background:transparent; color:var(--text-dim);
  display:inline-flex; align-items:center; justify-content:center; gap:6px; position:relative; flex:none;
  transition:transform .15s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
}
.ctrl .ic{ width:22px; height:22px; }
.ctrl:hover{ color:var(--text); background:rgba(255,255,255,.07); }
.ctrl:active{ transform:scale(.94); }
.ctrl.active{ color:var(--cyan); }
/* a dot under an enabled toggle (loop), like most players */
.ctrl.active:not(.is-loading)::after{ content:""; position:absolute; bottom:3px; left:50%; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:currentColor; }
.ctrl.liked{ color:var(--pink); }
.ctrl.liked:hover{ color:var(--pink); }
.ctrl-play{
  width:58px; height:58px; color:#fff;
  background:var(--grad-action); box-shadow:0 6px 22px rgba(255,62,165,.42);
}
.ctrl-play .ic{ width:26px; height:26px; }
.ctrl-play:hover{ color:#fff; background:var(--grad-action); box-shadow:0 6px 28px rgba(255,62,165,.65); transform:scale(1.04); }
.ctrl-sm{ width:38px; height:38px; }
.ctrl-sm .ic{ width:19px; height:19px; }
.ctrl-play-sm{ width:42px; height:42px; }
.ctrl-play-sm .ic{ width:20px; height:20px; }
.ctrl-danger:hover{ color:var(--danger); background:rgba(255,84,112,.12); }
/* "Stop" empties the whole queue for everyone: first click arms it */
.ctrl-danger.confirm{
  width:auto; padding:0 14px; border-radius:999px; color:#fff; background:var(--danger);
  font-weight:700; font-size:.85rem; box-shadow:0 0 16px rgba(255,84,112,.45);
}
.ctrl:disabled{ opacity:.35; pointer-events:none; }

.np-extras{ display:flex; align-items:center; gap:4px; padding-top:12px; border-top:1px solid rgba(255,255,255,.07); }
.np-volume{ flex:1; display:flex; align-items:center; gap:10px; min-width:0; max-width:300px; margin-left:auto; color:var(--text-dim); font-size:.8rem; }
.np-volume .ic{ width:19px; height:19px; }
#volume-value{ font-family:"IBM Plex Mono",monospace; min-width:3.2em; text-align:right; font-variant-numeric:tabular-nums; }

input[type=range]{
  -webkit-appearance:none; appearance:none; flex:1; min-width:0; height:4px; border-radius:4px; margin:0;
  background:
    linear-gradient(90deg, var(--pink), var(--violet)) 0 0 / var(--val, 100%) 100% no-repeat,
    rgba(255,255,255,.14);
  cursor:pointer;
}
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:14px; height:14px; border-radius:50%; background:#fff; border:none;
  box-shadow:0 0 0 3px rgba(255,62,165,.25), 0 0 10px rgba(255,62,165,.6); transition:transform .15s;
}
input[type=range]::-moz-range-thumb{
  width:14px; height:14px; border-radius:50%; background:#fff; border:none;
  box-shadow:0 0 0 3px rgba(255,62,165,.25), 0 0 10px rgba(255,62,165,.6);
}
input[type=range]::-moz-range-track{ background:transparent; }
input[type=range]:hover::-webkit-slider-thumb{ transform:scale(1.15); }

.playlist-picker{ display:flex; align-items:center; gap:8px; }
.playlist-picker select{
  flex:1; max-width:300px; padding:9px 12px; border-radius:999px; border:1px solid var(--line-bright);
  background:var(--panel-raised); color:var(--text); font:inherit; font-size:.9rem;
}

/* ---------- up next (wide screens) ---------- */
.up-next{
  margin-top:16px; padding:14px 12px 8px; border-radius:var(--radius);
  border:1px solid var(--line); background:var(--glass), var(--surface);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.up-next-list{ counter-reset:n; }
.up-next-list li:not(.up-next-more)::before{
  counter-increment:n; content:counter(n); width:1.1em; flex:none; text-align:right;
  font-family:"IBM Plex Mono",monospace; font-size:.72rem; color:var(--text-faint);
}
.up-next-head{ display:flex; align-items:center; justify-content:space-between; padding:0 4px 6px; }
.up-next-head h3{ font-size:.78rem; font-family:"IBM Plex Mono",monospace; letter-spacing:.14em; text-transform:uppercase; color:var(--text-dim); font-weight:500; }
.link-btn{ display:inline-flex; align-items:center; gap:2px; background:none; border:none; padding:2px 4px; color:var(--cyan); font-weight:600; font-size:.85rem; }
.link-btn .ic{ width:16px; height:16px; }
.link-btn:hover{ text-decoration:underline; }
.up-next-list{ list-style:none; margin:0; padding:0; }
.up-next-list li{ display:flex; align-items:center; gap:10px; padding:6px 4px; border-radius:10px; }
.up-next-list li:hover{ background:rgba(255,255,255,.04); }
.up-next-list img{ width:38px; height:38px; border-radius:7px; object-fit:cover; background:var(--panel-raised); flex:none; }
.up-next-list .t{ flex:1; min-width:0; }
.up-next-list .t1{ font-size:.9rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.up-next-list .t2{ font-size:.78rem; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.up-next-list .d{ font-family:"IBM Plex Mono",monospace; font-size:.72rem; color:var(--text-faint); flex:none; }
.up-next-more{ font-size:.8rem; color:var(--text-faint); padding:4px 4px 6px; }

/* ---------- tabs ---------- */
/* The tab bar spans the whole layout (above both columns on wide screens)
   and sticks to the top. Its backdrop is a separate fixed element so that,
   once pinned, it covers the full viewport width instead of stopping at a
   column edge. */
.tabs-wrap{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; gap:10px;
  padding:10px 0; margin-bottom:14px;
}
.tabs-bg{
  position:fixed; left:0; right:0; top:0; height:var(--tabs-h, 58px); z-index:29; pointer-events:none;
  background:rgba(10,7,20,.86); backdrop-filter:blur(16px) saturate(1.3); -webkit-backdrop-filter:blur(16px) saturate(1.3);
  box-shadow:0 10px 28px rgba(0,0,0,.4);
  opacity:0; transform:translateY(-6px); transition:opacity .22s ease, transform .22s ease;
}
.tabs-bg::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,62,165,.55) 20%, rgba(155,93,229,.5) 55%, rgba(47,243,224,.45) 80%, transparent);
}
body.tabs-stuck .tabs-bg{ opacity:1; transform:none; }
/* small logo that appears in the pinned bar; a click goes back to the top */
.tabs-logo{
  display:none; flex:none; width:30px; height:38px; padding:0; border:none; background:none;
  filter:drop-shadow(0 0 7px rgba(255,62,165,.45));
}
.tabs-logo img{ width:27px; height:38px; }
body.tabs-stuck .tabs-logo{ display:block; animation:logo-in .25s ease both; }
@keyframes logo-in{ from{ opacity:0; transform:translateX(-6px); } to{ opacity:1; transform:none; } }
.tabs{
  flex:1; min-width:0;
  display:flex; gap:4px;
  overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
}
.tabs::-webkit-scrollbar{ display:none; }
/* Labels give way to icons when the bar runs out of room, measured by
   app.js (fitTabs) on the actual width rather than a fixed breakpoint:
   .compact keeps only the active tab's label, .icons drops them all. */
.tabs.compact, .tabs.icons{ justify-content:space-between; }
.tabs.compact .tab:not(.active) > span:not(.tab-count),
.tabs.icons .tab > span:not(.tab-count){ display:none; }
/* hints that more tabs are hidden off either edge (phones) */
.tabs.fade-r{ -webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image:linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.tabs.fade-l{ -webkit-mask-image:linear-gradient(90deg, transparent, #000 36px); mask-image:linear-gradient(90deg, transparent, #000 36px); }
.tabs.fade-l.fade-r{ -webkit-mask-image:linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image:linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.tab{
  background:none; border:none; padding:8px 14px; border-radius:999px;
  font-size:.95rem; font-weight:600; color:var(--text-dim); letter-spacing:.02em;
  display:flex; align-items:center; gap:7px; flex-shrink:0; white-space:nowrap;
  transition:color .2s ease, background .2s ease, box-shadow .2s ease;
}
.tab .ic{ width:18px; height:18px; }
.tab:hover{ color:var(--text); background:rgba(255,255,255,.05); }
.tab.active{
  color:var(--text);
  background:linear-gradient(135deg, rgba(255,62,165,.2), rgba(155,93,229,.2));
  box-shadow:inset 0 0 0 1px rgba(255,62,165,.45);
}
.tab.active .ic{ color:var(--pink); }
.tab-count{
  min-width:20px; padding:0 6px; border-radius:999px; font-size:.7rem; line-height:1.55;
  font-family:"IBM Plex Mono",monospace; text-align:center;
  background:var(--cyan); color:var(--void); font-weight:500;
}
/* the queue badge jumps when something gets added */
.tab-count.bump{ animation:bump .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump{ 35%{ transform:scale(1.45); box-shadow:0 0 14px var(--cyan); } }

.panel{ min-height:260px; animation: panel-in .28s ease both; }
@keyframes panel-in{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }
.panel-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px 16px; flex-wrap:wrap; margin:6px 0 4px; }
.panel-title{ font-size:1.45rem; font-weight:700; letter-spacing:.01em; margin-bottom:4px; }
.panel-title::after{ content:""; display:block; width:34px; height:3px; margin-top:3px; border-radius:2px; background:var(--grad-action); box-shadow:0 0 10px rgba(255,62,165,.5); }
.panel-subtitle{
  font-size:.78rem; font-family:"IBM Plex Mono",monospace; font-weight:500; letter-spacing:.14em; text-transform:uppercase;
  color:var(--text-dim); margin:26px 0 8px; display:flex; align-items:center; gap:10px;
}
.panel-subtitle::after{ content:""; flex:1; height:1px; background:linear-gradient(90deg, var(--line), transparent); }
.panel-actions{ display:flex; flex-wrap:wrap; gap:8px; }
.hint{ color:var(--text-dim); font-size:.9rem; margin:2px 0 0; }
.muted{ color:var(--text-faint); }

/* ---------- buttons ---------- */
.btn{
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 18px; border-radius:999px; border:1px solid var(--line-bright);
  background:var(--surface-2); color:var(--text);
  font-weight:600; font-size:.95rem; letter-spacing:.02em; white-space:nowrap;
  transition:box-shadow .2s ease, border-color .2s ease, transform .15s ease, background .2s ease, filter .2s ease;
}
.btn .ic{ width:18px; height:18px; }
.btn:hover{ border-color:var(--cyan); box-shadow:var(--glow-cyan); }
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--grad-action); border-color:transparent; color:#fff; box-shadow:0 4px 18px rgba(255,62,165,.3); overflow:hidden; }
.btn-primary:hover{ border-color:transparent; box-shadow:0 4px 24px rgba(255,62,165,.55); filter:brightness(1.08); }
/* a light sweep across primary buttons on hover */
.btn-primary::before{
  content:""; position:absolute; top:0; bottom:0; left:-70%; width:45%; pointer-events:none;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent); transform:skewX(-20deg);
  transition:left .65s ease;
}
.btn-primary:hover::before{ left:125%; }
.btn-sm{ padding:7px 14px; font-size:.85rem; }
.btn:disabled{ opacity:.5; pointer-events:none; }

.icon-btn{
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:34px; padding:0 12px; border-radius:999px; border:1px solid var(--line);
  background:var(--surface-2); color:var(--text); font-size:.82rem; font-weight:600; white-space:nowrap;
  transition:border-color .2s, color .2s, box-shadow .2s, background .2s;
}
.icon-btn .ic{ width:16px; height:16px; }
.icon-btn:hover{ border-color:var(--cyan); color:var(--cyan); }
.icon-btn.square{ width:34px; padding:0; }
.icon-btn.danger:hover{ border-color:var(--danger); color:var(--danger); }
.icon-btn.liked{ color:var(--pink); }
.icon-btn:disabled{ opacity:.45; pointer-events:none; }

/* in-flight request: the label is hidden behind a spinner */
.is-loading{ color:transparent !important; pointer-events:none; }
.is-loading::after{
  content:""; position:absolute; inset:0; margin:auto; width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,.3); border-top-color:#fff; animation:spin .7s linear infinite;
}

/* ---------- search ---------- */
.search-form{ display:flex; gap:10px; align-items:center; margin-top:6px; }
.search-field{
  flex:1; min-width:0; display:flex; align-items:center; gap:10px; padding:0 8px 0 16px;
  border-radius:999px; border:1px solid var(--line-bright); background:var(--glass), var(--surface);
  color:var(--text-faint); cursor:text; transition:border-color .2s, box-shadow .2s;
}
.search-field:focus-within{ border-color:var(--pink); box-shadow:0 0 0 3px rgba(255,62,165,.15); color:var(--pink); }
.search-field input{
  flex:1; min-width:0; border:none; outline:none; background:none; color:var(--text);
  font:inherit; font-size:1.05rem; font-weight:500; padding:12px 0;
}
.search-field input::placeholder{ color:var(--text-faint); }
.search-field input::-webkit-search-cancel-button{ filter:invert(.7) sepia(1) hue-rotate(220deg); cursor:pointer; }
.kbd-hint{
  font-family:"IBM Plex Mono",monospace; font-size:.72rem; color:var(--text-faint);
  border:1px solid var(--line); border-radius:6px; padding:1px 7px; margin-right:6px;
}
.search-field:focus-within .kbd-hint{ display:none; }
@media (hover:none){ .kbd-hint{ display:none; } }

.chip-row{ display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 6px; }
.chip{
  position:relative; padding:6px 14px; border-radius:999px; border:1px solid var(--line); background:var(--surface);
  font-size:.86rem; font-weight:600; color:var(--text-dim); transition:all .18s ease;
}
.chip:hover{ color:var(--text); border-color:var(--line-bright); }
.chip.active{ color:#fff; background:var(--grad-action); border-color:transparent; box-shadow:0 2px 14px rgba(255,62,165,.35); }

/* ---------- lists ---------- */
.result-list{ list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:2px; }
.result-row{
  position:relative;
  display:flex; align-items:center; gap:12px; padding:8px 10px; border-radius:12px;
  transition:background .2s ease;
}
/* neon accent on the left edge of the hovered row */
.result-row::before{
  content:""; position:absolute; left:0; top:22%; bottom:22%; width:3px; border-radius:3px;
  background:var(--grad-action); box-shadow:0 0 8px rgba(255,62,165,.6); opacity:0; transition:opacity .2s ease;
}
.result-row:hover{ background:linear-gradient(90deg, rgba(255,62,165,.09), rgba(155,93,229,.05) 45%, rgba(255,255,255,.02)); }
.result-row:hover::before{ opacity:1; }
/* the track playing right now, wherever it appears */
.result-row.is-current .result-title{ color:var(--pink); }
.result-row.is-current::before{ opacity:1; background:var(--pink); }
.thumb{ position:relative; flex:none; display:block; }
.thumb-eq{
  position:absolute; inset:0; border-radius:8px; display:none; align-items:center; justify-content:center; gap:2px;
  background:rgba(10,7,20,.62); color:var(--cyan);
}
.thumb-eq i{ width:3px; height:16px; border-radius:1px; background:currentColor; transform:scaleY(.35); transform-origin:center; }
.is-current .thumb-eq{ display:flex; }
body.is-playing .is-current .thumb-eq i{ animation:eq 1.1s ease-in-out infinite; }
body.is-playing .is-current .thumb-eq i:nth-child(2){ animation-delay:-.45s; }
body.is-playing .is-current .thumb-eq i:nth-child(3){ animation-delay:-.2s; }
body.is-playing .is-current .thumb-eq i:nth-child(4){ animation-delay:-.7s; }
.result-thumb{ width:48px; height:48px; border-radius:8px; object-fit:cover; background:var(--panel-raised); flex:none; box-shadow:0 4px 12px rgba(0,0,0,.3); }
.result-thumb.round{ border-radius:50%; }
.result-thumb.tile{ display:grid; place-items:center; color:var(--violet); background:linear-gradient(135deg, rgba(255,62,165,.18), rgba(155,93,229,.22)); }
.result-thumb.tile .ic{ width:22px; height:22px; }
.result-text{ flex:1; min-width:0; }
.result-title{ font-size:1rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:color .2s; }
.result-sub{ font-size:.86rem; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.result-dur{ font-family:"IBM Plex Mono",monospace; font-size:.75rem; color:var(--text-faint); flex:none; min-width:3.4em; text-align:right; font-variant-numeric:tabular-nums; }
.result-actions{ display:flex; gap:6px; flex:none; }
/* With a mouse, a row's buttons stay ghosted until the row is hovered or
   focused: a long list no longer reads as a wall of identical pills. */
@media (hover:hover){
  .result-row .icon-btn{ background:transparent; border-color:transparent; color:var(--text-faint); }
  .result-row .icon-btn.liked{ color:var(--pink); }
  .result-row:hover .icon-btn, .result-row:focus-within .icon-btn{ background:var(--surface-2); border-color:var(--line); color:var(--text); }
  .result-row:hover .icon-btn.liked, .result-row:focus-within .icon-btn.liked{ color:var(--pink); }
  .result-row .icon-btn:hover{ border-color:var(--cyan); color:var(--cyan); box-shadow:0 0 12px rgba(47,243,224,.25); }
  .result-row .icon-btn.danger:hover{ border-color:var(--danger); color:var(--danger); box-shadow:none; }
}
.result-row.removing{ opacity:0; transform:translateX(12px); transition:opacity .2s, transform .2s; }

.queue-row{ cursor:grab; }
.queue-row:active{ cursor:grabbing; }
.queue-num{ width:1.6em; flex:none; text-align:right; font-family:"IBM Plex Mono",monospace; font-size:.78rem; color:var(--text-faint); }
.drag-handle{ color:var(--text-faint); flex:none; display:flex; }
.drag-handle .ic{ width:16px; height:16px; }
.queue-row:hover .drag-handle{ color:var(--text-dim); }
.queue-row.dragging{ opacity:.4; }
.queue-row.drag-over{ box-shadow:inset 0 2px 0 0 var(--cyan); background:rgba(47,243,224,.06); }

.empty-state{
  display:flex; align-items:center; gap:12px; padding:20px 18px; margin-top:6px;
  color:var(--text-dim); border:1px dashed var(--line); border-radius:14px; font-size:.95rem;
  background:var(--glass);
}

/* "now playing" strip at the top of the queue tab */
.queue-now{
  display:flex; align-items:center; gap:12px; margin:12px 0 4px; padding:10px 12px; border-radius:14px;
  background:linear-gradient(90deg, rgba(255,62,165,.16), rgba(155,93,229,.08) 60%, rgba(47,243,224,.05));
  border:1px solid rgba(255,62,165,.35); box-shadow:0 0 22px rgba(255,62,165,.12);
}
.queue-now .result-thumb{ width:52px; height:52px; }
.queue-now .label{ font-family:"IBM Plex Mono",monospace; font-size:.66rem; letter-spacing:.14em; text-transform:uppercase; color:var(--pink); display:flex; align-items:center; gap:7px; }
.queue-now .label .eq{ color:var(--cyan); }
body.is-playing .queue-now .eq i{ animation:eq 1.1s ease-in-out infinite; }
body.is-playing .queue-now .eq i:nth-child(2){ animation-delay:-.45s; }
body.is-playing .queue-now .eq i:nth-child(3){ animation-delay:-.2s; }
body.is-playing .queue-now .eq i:nth-child(4){ animation-delay:-.7s; }
.empty-state .ic{ width:22px; height:22px; color:var(--violet); }

/* ---------- cards (albums / playlists) ---------- */
.card-grid{
  list-style:none; margin:10px 0 0; padding:0;
  display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:14px;
}
.card{
  display:flex; flex-direction:column; gap:8px; padding:10px; border-radius:14px; min-width:0;
  background:var(--glass), var(--surface); border:1px solid rgba(155,93,229,.14);
  transition:border-color .25s, background .25s, transform .25s ease, box-shadow .25s;
}
.card:hover{
  border-color:rgba(255,62,165,.4); background:var(--glass), var(--panel-hover);
  transform:translateY(-3px); box-shadow:0 14px 30px rgba(0,0,0,.4), 0 0 18px rgba(255,62,165,.12);
}
.card-art{ position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--panel-raised); }
.card-art img{ width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.card:hover .card-art img{ transform:scale(1.05); }
.card-title{ font-weight:600; font-size:.95rem; line-height:1.25; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.card-sub{ font-size:.8rem; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-actions{ display:flex; gap:6px; margin-top:auto; }
.card-actions .icon-btn:first-child{ flex:1; }
.card-grid > .empty-state, .card-grid > .muted{ grid-column:1 / -1; }
/* one swipeable row instead of a tall grid (new releases) */
.card-grid.card-row{
  grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(150px, 168px);
  overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth;
  /* room for the hover lift and shadow, which overflow:auto would clip */
  padding:6px 2px 14px; margin-top:4px; scrollbar-width:none;
}
.card-grid.card-row::-webkit-scrollbar{ display:none; }
.card-row .card{ scroll-snap-align:start; }
/* arrows instead of a scrollbar, for mouse users */
.carousel{ position:relative; }
.car-btn{
  position:absolute; top:calc(50% - 36px); z-index:3; width:40px; height:40px; border-radius:50%;
  display:grid; place-items:center; padding:0;
  background:rgba(28,21,51,.92); border:1px solid var(--line-bright); color:var(--text);
  box-shadow:0 8px 20px rgba(0,0,0,.55); backdrop-filter:blur(8px);
  transition:opacity .2s, border-color .2s, color .2s, transform .15s;
}
.car-btn:hover{ border-color:var(--pink); color:var(--pink); }
.car-btn:active{ transform:scale(.92); }
.car-btn .ic{ width:20px; height:20px; }
.car-btn.prev{ left:-14px; }
.car-btn.prev .ic{ transform:scaleX(-1); }
.car-btn.next{ right:-14px; }
.car-btn:disabled{ opacity:0; pointer-events:none; }
@media (hover:none){ .car-btn{ display:none; } }

/* ---------- lyrics ---------- */
.lyrics-panel{ position:relative; }
.lyrics-bar{ display:flex; align-items:center; justify-content:space-between; gap:8px 10px; flex-wrap:wrap; min-height:36px; margin:2px 0; }
.lyrics-badge{
  display:inline-flex; align-items:center; gap:7px; padding:4px 11px; border-radius:999px; cursor:help;
  font-size:.8rem; font-weight:600; letter-spacing:.02em; color:var(--text-dim);
  border:1px solid var(--line); background:var(--glass), var(--surface);
}
.lyrics-badge::before{ content:""; width:7px; height:7px; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor; }
.lyrics-badge.exact{ color:var(--cyan); border-color:rgba(47,243,224,.35); }
.lyrics-badge.approx{ color:var(--pink); border-color:rgba(255,62,165,.4); }
#lyrics-focus{ margin-left:auto; }
.sync-adjust{
  display:flex; align-items:center; gap:2px; padding:2px; border-radius:999px;
  border:1px solid rgba(255,62,165,.35); background:var(--glass), var(--surface);
}
.sync-adjust .icon-btn{ height:30px; padding:0 10px; border-color:transparent; background:transparent; color:var(--text-dim); }
.sync-adjust .icon-btn:hover{ color:var(--cyan); border-color:transparent; }
.sync-value{
  min-width:7.6em; padding:4px 6px; border:none; background:none; border-radius:999px; cursor:default;
  font-family:"IBM Plex Mono",monospace; font-size:.74rem; color:var(--text-dim); text-align:center;
}
.sync-value.shifted{ color:var(--pink); cursor:pointer; }
.sync-value.shifted:hover{ background:rgba(255,62,165,.12); }
@media (max-width:600px){ .sync-value{ min-width:6.6em; } }

.lyrics-stage{ position:relative; }
.lyrics-box{
  position:relative; /* offsetParent of its lines, for in-box auto-scroll */
  white-space:pre-line; line-height:1.9; font-size:1.05rem; color:var(--text-dim);
  padding:18px 4px; max-height:min(68vh, 640px); overflow-y:auto; scrollbar-width:none;
  -webkit-mask-image:linear-gradient(transparent, #000 10%, #000 90%, transparent);
  mask-image:linear-gradient(transparent, #000 10%, #000 90%, transparent);
}
.lyrics-box::-webkit-scrollbar{ display:none; }
.lyrics-box.synced{ font-size:1.55rem; font-weight:700; line-height:1.4; padding:30vh 4px; white-space:normal; }
.lyrics-line{ padding:8px 0; color:rgba(241,234,251,.28); transition:color .35s ease, transform .35s ease, text-shadow .35s; transform-origin:left center; }
.lyrics-line.past{ color:rgba(241,234,251,.5); }
.lyrics-line.active{ color:#fff; transform:scale(1.04); text-shadow:0 0 22px rgba(47,243,224,.45); }
/* instrumental intro/break: three dots lighting up over its length (--p, 0→1) */
.lyrics-line.gap{ display:flex; gap:12px; padding:16px 0; max-height:60px; overflow:hidden; transition:max-height .45s ease, padding .45s ease, opacity .45s ease; }
.lyrics-line.gap i{ width:13px; height:13px; border-radius:50%; background:currentColor; opacity:.4; transform:scale(.8); }
.lyrics-line.gap.active i{ background:var(--cyan); box-shadow:0 0 10px rgba(47,243,224,.6); }
.lyrics-line.gap.active i:nth-child(1){ opacity:calc(.3 + .7 * clamp(0, var(--p, 0) * 3, 1)); transform:scale(calc(.8 + .35 * clamp(0, var(--p, 0) * 3, 1))); }
.lyrics-line.gap.active i:nth-child(2){ opacity:calc(.3 + .7 * clamp(0, var(--p, 0) * 3 - 1, 1)); transform:scale(calc(.8 + .35 * clamp(0, var(--p, 0) * 3 - 1, 1))); }
.lyrics-line.gap.active i:nth-child(3){ opacity:calc(.3 + .7 * clamp(0, var(--p, 0) * 3 - 2, 1)); transform:scale(calc(.8 + .35 * clamp(0, var(--p, 0) * 3 - 2, 1))); }
.lyrics-line.gap.past{ max-height:0; padding:0; opacity:0; }
.lyrics-follow{
  position:absolute; left:50%; bottom:16px; transform:translateX(-50%); z-index:2;
  display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; white-space:nowrap;
  border:1px solid var(--line-bright); background:rgba(28,21,51,.92); color:var(--text);
  font-weight:600; font-size:.9rem; box-shadow:0 8px 22px rgba(0,0,0,.5); backdrop-filter:blur(8px);
  animation:toast-in .2s ease both;
}
.lyrics-follow:hover{ border-color:var(--cyan); color:var(--cyan); }
.lyrics-follow .ic{ width:16px; height:16px; }

/* full-screen karaoke: the lyrics panel takes over the screen over the cover's colours */
.lyrics-backdrop{ display:none; }
body.lyrics-focus{ overflow:hidden; }
body.lyrics-focus .lyrics-panel{
  position:fixed; inset:0; z-index:300; isolation:isolate; overflow:hidden;
  display:flex; flex-direction:column; gap:10px; min-height:0; margin:0;
  padding:clamp(14px, 3.5vw, 44px); background:var(--void); animation:none;
}
body.lyrics-focus .lyrics-backdrop{
  display:block; position:absolute; inset:-80px; z-index:-1;
  background:var(--art, none) center / cover, radial-gradient(circle at 20% 10%, rgba(255,62,165,.25), transparent 60%);
  filter:blur(70px) saturate(1.5) brightness(.42); transform:scale(1.1);
}
body.lyrics-focus .lyrics-bar{ width:100%; max-width:1100px; margin:0 auto; }
body.lyrics-focus .lyrics-stage{ flex:1; min-height:0; display:flex; }
body.lyrics-focus .lyrics-box{ flex:1; max-height:none; width:100%; max-width:1100px; margin:0 auto; }
body.lyrics-focus .lyrics-box.synced{ font-size:clamp(1.7rem, 3.6vw, 3.1rem); padding:34vh 0; }
/* the floating mini player doubles as the karaoke remote: always shown,
   centred, above the overlay (it lives outside .shell, which the overlay is in) */
body.lyrics-focus .mini-player{
  display:flex !important; left:50%; right:auto; width:min(760px, calc(100vw - 24px));
  transform:translateX(-50%); opacity:1; pointer-events:auto;
  bottom:calc(18px + env(safe-area-inset-bottom));
}
body.lyrics-focus .lyrics-panel{ padding-bottom:calc(96px + env(safe-area-inset-bottom)); }

/* ---------- settings ---------- */
.status-card{
  display:flex; align-items:center; gap:10px; margin-top:10px; padding:14px 16px; border-radius:14px;
  border:1px solid var(--line); background:var(--glass), var(--surface); font-size:1rem; font-weight:600;
}
.status-card.ok{ border-color:rgba(47,243,176,.4); }
.status-card.ok #cookie-status{ color:var(--ok); }
.status-card.warn{ border-color:rgba(255,84,112,.5); }
.status-card.warn #cookie-status{ color:var(--danger); }
.steps{ margin:4px 0 14px; padding-left:22px; color:var(--text-dim); font-size:.95rem; }
.steps li{ margin:3px 0; }
.steps li::marker{ color:var(--pink); font-weight:700; }
textarea#cookies-input{
  width:100%; display:block; margin-bottom:12px; font-family:"IBM Plex Mono",monospace; font-size:.78rem;
  border-radius:12px; border:1px solid var(--line-bright); background:var(--surface); color:var(--text);
  padding:12px; resize:vertical;
}
textarea#cookies-input:focus{ outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(47,243,224,.12); }
#cookie-save-result{ font-size:.92rem; margin-top:10px; }

/* skeletons */
.skel{ position:relative; overflow:hidden; background:var(--panel-raised); border-radius:6px; }
.skel::after{
  content:""; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation:shimmer 1.4s infinite;
}
@keyframes shimmer{ 100%{ transform:translateX(100%); } }
.skel-row{ display:flex; gap:12px; align-items:center; padding:8px 10px; }
.skel-thumb{ width:48px; height:48px; border-radius:8px; flex:none; }
.skel-line{ height:12px; border-radius:4px; margin-bottom:6px; }
.skel-card{ aspect-ratio:1; border-radius:14px; }

/* ---------- mini player (narrow screens, once the big one scrolls away) ---------- */
.mini-player{
  position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); z-index:60;
  display:flex; align-items:center; gap:4px; padding:8px 8px 8px 8px; overflow:hidden;
  border-radius:16px; border:1px solid var(--line-bright);
  background:rgba(28,21,51,.9); backdrop-filter:blur(16px) saturate(1.4); -webkit-backdrop-filter:blur(16px) saturate(1.4);
  box-shadow:0 12px 34px rgba(0,0,0,.55);
  transition:transform .28s ease, opacity .28s ease;
}
.mini-player.off{ transform:translateY(140%); opacity:0; pointer-events:none; }
.mini-bar{ position:absolute; left:0; right:0; top:0; height:2px; background:rgba(255,255,255,.08); }
.mini-bar span{ display:block; height:100%; width:0; background:var(--grad-brand); transition:width .25s linear; }
.mini-main{ flex:1; min-width:0; display:flex; align-items:center; gap:10px; background:none; border:none; padding:0; text-align:left; }
.mini-art{ width:44px; height:44px; border-radius:9px; object-fit:cover; background:var(--panel-raised); flex:none; }
.mini-text{ display:flex; flex-direction:column; min-width:0; }
.mini-title{ font-weight:700; font-size:.95rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mini-artist{ font-size:.8rem; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- toasts ---------- */
.toast-stack{
  position:fixed; bottom:calc(20px + var(--mini-h)); right:20px; display:flex; flex-direction:column; gap:10px; z-index:1000;
  max-width:min(360px, calc(100vw - 32px)); transition:bottom .28s ease;
}
.toast{
  display:flex; align-items:flex-start; gap:10px;
  background:rgba(33,26,58,.94); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border:1px solid var(--line-bright); border-radius:12px; padding:11px 14px; font-size:.92rem; font-weight:500; color:var(--text);
  box-shadow:0 10px 28px rgba(0,0,0,.45);
  animation:toast-in .25s ease both;
}
.toast .ic{ width:18px; height:18px; color:var(--ok); margin-top:1px; }
.toast.err{ border-color:rgba(255,84,112,.6); }
.toast.err .ic{ color:var(--danger); }
@keyframes toast-in{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
.toast.out{ animation:toast-out .2s ease both; }
@keyframes toast-out{ to{ opacity:0; transform:translateX(12px); } }

/* ---------- responsive ---------- */
@media (min-width:1100px){
  .shell{ max-width:1280px; padding-left:28px; padding-right:28px; }
  /* tab bar across both columns, then content | player */
  .layout{ grid-template-columns:minmax(0,1fr) 340px; grid-template-areas:"tabs tabs" "main side"; align-items:start; }
  /* the player sticks just below the pinned tab bar, never under it */
  .side{
    position:sticky; top:calc(var(--tabs-h, 58px) + 14px); margin-bottom:0;
    max-height:calc(100vh - var(--tabs-h, 58px) - 28px); overflow-y:auto; scrollbar-width:none;
  }
  .side::-webkit-scrollbar{ display:none; }
  .now-playing{ min-height:0; padding:18px; }
  .np-content{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"art" "meta" "progress" "controls" "extras" "picker";
    row-gap:12px;
  }
  .np-art-wrap{ padding-right:17%; }
  .np-art{ width:100%; height:auto; aspect-ratio:1; border-radius:14px; }
  .np-meta{ text-align:left; }
  .np-controls{ justify-content:center; gap:10px; }
  .np-empty{ padding:26px 0; }
  .mini-player{ display:none !important; }
}
@media (max-width:1099px){
  .up-next{ display:none !important; }
}
@media (max-width:600px){
  .shell{ padding-left:14px; padding-right:14px; }
  .topbar{ margin-bottom:16px; padding-bottom:14px; }
  .brand-word{ font-size:1.15rem; }
  .brand-mark{ height:36px; }
  .voice-pill #voice-label, .user-name{ display:none; }
  .voice-pill{ padding:6px 8px; }
  .now-playing{ padding:16px; }
  .np-content{
    grid-template-columns:84px minmax(0,1fr);
    grid-template-areas:"art meta" "progress progress" "controls controls" "extras extras" "picker picker";
    column-gap:14px;
  }
  .np-art-wrap{ align-self:center; padding-right:0; }
  .np-vinyl{ display:none; }
  .np-art{ width:84px; height:84px; border-radius:10px; }
  .np-meta{ align-self:center; }
  .np-title{ font-size:1.02rem; }
  .np-controls{ justify-content:center; gap:8px; }
  .np-volume{ max-width:none; }
  .tabs-wrap{ padding:8px 0; }
  .tabs{ gap:0; }
  .tab{ padding:8px 7px; font-size:.9rem; gap:5px; }
  .tabs.compact .tab.active, .tabs.icons .tab.active{ padding:8px 10px; }
  /* no room for the logo next to the tabs on a phone */
  body.tabs-stuck .tabs-logo{ display:none; }
  .search-form .btn{ padding:10px 14px; }
  .icon-btn .lbl{ display:none; }
  .icon-btn{ width:36px; height:36px; padding:0; }
  .result-dur{ display:none; }
  .result-row{ padding:8px 6px; gap:10px; }
  .drag-handle{ display:none; }
  .card-grid{ grid-auto-flow:column; grid-template-columns:none; grid-auto-columns:44%; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:6px; scrollbar-width:none; }
  .card-grid::-webkit-scrollbar{ display:none; }
  .card{ scroll-snap-align:start; }
  .card-actions .icon-btn{ width:auto; flex:1; }
  .lyrics-box.synced{ font-size:1.28rem; }
  .toast-stack{ left:14px; right:14px; max-width:none; }
}

/* ---------- queue tools ---------- */
.queue-tools{ align-self:center; }
/* armed destructive button ("Vider la suite"): red, label forced visible */
.icon-btn.confirm{ background:var(--danger); border-color:transparent; color:#fff; width:auto; padding:0 12px; box-shadow:0 0 14px rgba(255,84,112,.45); }
.icon-btn.confirm .lbl{ display:inline !important; }
.icon-btn.confirm:hover{ color:#fff; border-color:transparent; }

/* ---------- media keys toggle (header) ---------- */
#btn-media-keys.on{ color:var(--cyan); }
#btn-media-keys.on::after{ content:""; position:absolute; top:5px; right:5px; width:6px; height:6px; border-radius:50%; background:var(--cyan); box-shadow:0 0 6px var(--cyan); }
#btn-media-keys{ position:relative; }
#btn-media-keys.waiting{ opacity:.7; }
#btn-media-keys:not(.on):not(.waiting){ opacity:.45; }
