/* ============================================================
   RESONANCE — base design system
   Refined 2026: professional editorial layer (fluid type,
   serif display, extended micro-labels, slow deliberate motion)
   ============================================================ */

/* --- type faces (self-hosted) --- */
@font-face {
  font-family: "Google Sans";
  src: url("../fonts/resonance-sans.woff2") format("woff2");
  font-weight: 100 1000; font-style: normal; font-display: swap;
  ascent-override: 105%; descent-override: 35%; line-gap-override: 0%;
}
@font-face {
  font-family: "Roslindale Display";
  src: url("../fonts/resonance-serif.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roslindale Display";
  src: url("../fonts/resonance-serif-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Monument Extended";
  src: url("../fonts/resonance-extended.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #0a0a12;
  --bg-2: #0e0e18;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f4fb;
  --text-2: rgba(206, 212, 235, 0.66);
  --text-3: rgba(206, 212, 235, 0.4);
  --navy: #1F2B5E;
  --ink-muted: #626C95;
  --hue: 234;
  --accent: hsl(var(--hue) 78% 66%);
  --accent-soft: hsl(var(--hue) 72% 64% / 0.14);
  --accent-2: hsl(calc(var(--hue) + 40) 76% 62%);
  --grad: linear-gradient(135deg, hsl(var(--hue) 68% 62%), hsl(calc(var(--hue) + 38) 58% 54%));
  --sans: "Google Sans", -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Roslindale Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ext: "Monument Extended", "Google Sans", -apple-system, sans-serif;
  --ease-std: cubic-bezier(0.7, 0.6, 0, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-wipe: cubic-bezier(0.73, 0.15, 0.15, 0.99);
  --dur-slow: 0.8s;
  --dur-med: 0.6s;
  --danger: #ff5c6c;
  --ok: #3ddc97;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --font: var(--sans);
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --pb-h: 84px;
  --tab-h: 60px;
  --sb-w: 248px;
  --qp-w: 320px;
  --glass: rgba(10, 10, 16, 0.6);
  --bar: rgba(13, 13, 20, 0.88);
  --fs-card: rgba(14, 14, 22, 0.72);
  --fs-scrim-a: rgba(8, 8, 14, 0.25);
  --fs-scrim: rgba(8, 8, 14, 0.92);
  --scrim: rgba(5, 5, 10, 0.66);
  --surface: #15151f;
  --track: rgba(255, 255, 255, 0.14);
  -webkit-tap-highlight-color: transparent;
}

/* ---------- light theme (Settings → Appearance → Theme) ---------- */
:root[data-theme="light"] {
  --bg: #f4f4f9;
  --bg-2: #fbfbfe;
  --panel: rgba(20, 22, 48, 0.05);
  --panel-2: rgba(20, 22, 48, 0.09);
  --line: rgba(20, 22, 48, 0.14);
  --text: #171a30;
  --text-2: rgba(24, 28, 60, 0.66);
  --text-3: rgba(24, 28, 60, 0.45);
  --accent: hsl(var(--hue) 72% 47%);
  --accent-soft: hsl(var(--hue) 72% 47% / 0.12);
  --ok: #129a6c;
  --danger: #d9364c;
  --shadow: 0 18px 50px rgba(35, 40, 90, 0.16);
  --glass: rgba(255, 255, 255, 0.62);
  --bar: rgba(255, 255, 255, 0.86);
  --fs-card: rgba(255, 255, 255, 0.72);
  --fs-scrim-a: rgba(236, 238, 248, 0.35);
  --fs-scrim: rgba(236, 238, 248, 0.94);
  --scrim: rgba(24, 28, 56, 0.42);
  --surface: #ffffff;
  --track: rgba(20, 22, 48, 0.18);
}
html[data-theme="light"] { color-scheme: light; }

/* The `hidden` attribute must beat any explicit display value, or
   overlays that toggle it (fullscreen player, player bar, modals)
   stay visible over the app. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  overflow: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

/* fine film grain — premium surface texture */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: 0.05; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* extended-face micro labels (kickers, badges, CTA text) */
.kicker {
  font-family: var(--ext); font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 11px; color: var(--text-3);
  margin-bottom: 10px;
}
/* underline-wipe link (background-position sweep) */
.u-wipe {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-position 0.75s var(--ease-std);
  padding-bottom: 2px;
}
.u-wipe:hover, .u-wipe.active { background-size: 100% 1px; }
::selection { background: hsl(var(--hue) 90% 60% / 0.35); }

.skip {
  position: fixed; left: -999px; top: 8px; z-index: 200;
  background: var(--grad); color: #fff; padding: 8px 14px; border-radius: 999px;
}
.skip:focus { left: 8px; }

/* ---------- entry veil (navy lift-away) ---------- */
.entry-veil {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(160deg, #1F2B5E 0%, #12182e 55%, #0a0a12 100%);
  opacity: 0; transition: opacity 0.5s ease;
}
.entry-veil.ready { opacity: 1; }
.entry-veil.lift {
  transform: translateY(-101%);
  transition: transform 1.15s cubic-bezier(0.73, 0.15, 0.15, 0.99), opacity 0.9s ease 0.35s;
  pointer-events: none;
}
.ev-word {
  font-family: var(--ext); font-size: 15px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.42em; color: rgba(244, 244, 251, 0.92);
  padding-left: 0.42em;
}
.ev-sub {
  font-family: var(--serif); font-size: 15px; font-weight: 300; font-style: italic;
  color: rgba(206, 212, 235, 0.6);
}
.ev-bar { width: 120px; height: 1px; background: rgba(244,244,251,0.18); overflow: hidden; }
.ev-bar i { display: block; height: 100%; width: 40%; background: rgba(244,244,251,0.7); animation: evslide 1.1s cubic-bezier(0.33,1,0.68,1) infinite; }
@keyframes evslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .entry-veil { display: none; } }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient-glow {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(130px); opacity: 0.11; transition: background 1.4s var(--ease-std);
}
.ambient-glow.g1 {
  top: -30vmax; left: -18vmax;
  background: radial-gradient(circle, hsl(var(--hue) 90% 55%), transparent 65%);
}
.ambient-glow.g2 {
  bottom: -34vmax; right: -20vmax;
  background: radial-gradient(circle, hsl(calc(var(--hue) + 40) 60% 42%), transparent 65%);
  opacity: 0.08;
}

/* ============================================================
   APP GRID
   ============================================================ */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sb-w) minmax(0, 1fr) var(--qp-w);
  grid-template-rows: minmax(0, 1fr);
  height: 100dvh;
  padding-bottom: var(--pb-h);
  transition: grid-template-columns 0.25s ease;
}
.app.no-queue { grid-template-columns: var(--sb-w) minmax(0, 1fr) 0px; }
.app.sb-hidden { --sb-w: 0px; }
.app.sb-hidden .sidebar { transform: translateX(-100%); opacity: 0; pointer-events: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  overflow-y: auto; overflow-x: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 14px;
}
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.bm { fill: url(#none); }
.b1 { fill: hsl(var(--hue) 90% 66%); }
.b2 { fill: hsl(calc(var(--hue) + 12) 90% 62%); }
.b3 { fill: hsl(calc(var(--hue) + 24) 90% 58%); }
.b4 { fill: hsl(calc(var(--hue) + 36) 90% 56%); }
.b5 { fill: hsl(calc(var(--hue) + 48) 90% 55%); }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 600; font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav-item.active::before {
  content: ""; width: 4px; height: 18px; border-radius: 4px; margin-right: 2px;
  background: var(--grad);
}
.nav-ico { width: 20px; height: 20px; display: inline-grid; place-items: center; }

.side-pllists { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; flex: 1; min-height: 60px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); padding: 0 12px 8px; }
#sidePlaylists a {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px; white-space: nowrap; overflow: hidden;
}
#sidePlaylists a:hover { background: var(--panel); color: var(--text); }
#sidePlaylists img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; }

.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.side-plan { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.plan-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid hsl(var(--hue) 90% 60% / 0.3); }
.plan-up { font-size: 12px; color: var(--text-2); }
.plan-up:hover { color: var(--text); }
.side-user { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-weight: 800; font-size: 13px; color: #fff; background: var(--grad); flex: none;
}
.avatar-you { background: var(--grad); }
.side-user-name { font-size: 13.5px; font-weight: 600; flex: 1; }

/* ============================================================
   MAIN + TOPBAR
   ============================================================ */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  flex: none;
}
.topbar-search {
  flex: 1; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.topbar-search:focus-within { border-color: hsl(var(--hue) 90% 60% / 0.5); background: var(--panel-2); }
.topbar-search-ico { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.topbar-search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); }
.topbar-search input::placeholder { color: var(--text-3); }
.topbar-kbd {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; flex: none;
}
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--text-2);
  transition: all 0.15s ease;
}
.chip-btn:hover { color: var(--text); background: var(--panel-2); }
.chip-btn.active { background: var(--accent-soft); border-color: hsl(var(--hue) 90% 60% / 0.4); color: var(--accent); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.chip-dot.duo { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.chip-btn .chip-ico { width: 16px; height: 16px; }

/* ============================================================
   VIEW + SECTIONS
   ============================================================ */
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.view-inner { max-width: 1240px; margin: 0 auto; padding: 26px 26px 90px; }

.section { margin-top: 44px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-title { font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: -0.01em; }
.section-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.section-link { font-family: var(--ext); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); }
.section-link:hover { color: var(--accent); }
.section-link.u-wipe { background-image: linear-gradient(currentColor, currentColor); }

.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: max-content;
  gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory;
  cursor: grab; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.row-scroll > * { scroll-snap-align: start; }
.row-scroll .card { width: 196px; flex: none; }
.row-scroll.dragging { cursor: grabbing; }
.row-scroll.dragging, .row-scroll.dragging * { cursor: grabbing; user-select: none; -webkit-user-select: none; }

.greeting { font-family: var(--serif); font-size: 38px; font-weight: 400; letter-spacing: -0.015em; margin-bottom: 8px; line-height: 1.12; }
.greeting-sub { color: var(--text-2); font-size: 14.5px; max-width: 56ch; }
/* home hero */
.greet-hero { padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.greet-title { font-family: var(--serif); font-size: clamp(34px, 3.4vw, 52px); font-weight: 400; letter-spacing: -0.018em; line-height: 1.05; margin: 2px 0 10px; }
.marquee {
  margin-top: 22px; overflow: hidden; white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: inline-block; animation: marquee 26s linear infinite; will-change: transform; }
.marquee-track span {
  font-family: var(--ext); font-size: 11px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--text-3);
  padding: 0 18px;
}
.marquee-track i { font-style: normal; color: var(--ink-muted); font-size: 8px; vertical-align: 1px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column; gap: 10px; min-width: 168px;
}
.card:hover { background: var(--panel-2); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.35); }
.card { transition: transform var(--dur-med) var(--ease-std), background var(--dur-med) var(--ease-std), box-shadow var(--dur-med) var(--ease-std); }
.card-art { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: #14141e; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-std), filter var(--dur-med) var(--ease-std); }
.card:hover .card-art img { transform: scale(1.055); filter: brightness(1.14) saturate(1.12); }
.card-art .art-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; font-weight: 800; color: rgba(255,255,255,0.85);
}
.card-title { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(10, 10, 16, 0.75); backdrop-filter: blur(6px); color: #fff;
  border: 1px solid var(--line);
}
.card-badge.live { color: #fff; background: rgba(255, 60, 80, 0.85); border-color: transparent; }
.card-badge.live::before { content: "●"; margin-right: 5px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.card-badge.atmos { background: rgba(20, 14, 40, 0.8); color: #cbb6ff; }
.card-badge.hires { background: rgba(10, 30, 34, 0.8); color: #7fe3d2; }
.card-badge.pre { background: linear-gradient(90deg, #ff5c8a, #ff9d5c); color: #fff; border-color: transparent; }
.card-badge.ai { background: linear-gradient(90deg, #7b5cff, #ff5c8a); color: #fff; border-color: transparent; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #0b0b12;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45), 0 0 0 4px hsl(var(--hue) 90% 60% / 0.25);
  transition: all 0.18s ease;
}
.card:hover .card-play { transform: scale(1.07); }
.card-play svg, .card-play::before { content: "▶"; font-size: 15px; }

/* quick tiles (home) */
.quick {
  display: flex; align-items: center; gap: 12px;
  width: 264px; padding: 10px;
  border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  overflow: hidden; transition: background 0.15s ease;
}
.quick:hover { background: var(--panel-2); }
.quick img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.quick-ico { width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.quick-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-play {
  margin-left: auto; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--accent); color: #0b0b12; display: grid; place-items: center; font-size: 13px;
}
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

/* ---------- track list ---------- */
.tlist { display: flex; flex-direction: column; }
.trow {
  display: grid;
  grid-template-columns: 28px minmax(0, 5fr) minmax(0, 3fr) 70px 164px;
  align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 10px;
  transition: background 0.12s ease;
}
.trow:hover { background: var(--panel); }
.trow .t-idx { color: var(--text-3); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.trow .t-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trow img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.trow .t-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t-artist { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t-dur { color: var(--text-3); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.trow .t-q { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.trow .t-actions { display: flex; gap: 4px; justify-content: flex-end; }
.trow .t-actions .t-play { color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .trow .t-actions .t-more { opacity: 0; transition: opacity 0.15s ease; }
  .trow:hover .t-actions .t-more,
  .trow:focus-within .t-actions .t-more { opacity: 1; }
}
@media (hover: none) {
  .trow .t-actions .t-more { display: none; }
}
.trow.playing .t-name { color: var(--accent); }
.trow.playing .t-idx { color: var(--accent); }
.trow .eq-bars { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.trow.playing .eq-bars { display: inline-flex; }
.trow.playing .t-idx .num { display: none; }
.eq-bars i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq-bars i:nth-child(1) { height: 60%; animation-delay: 0s; }
.eq-bars i:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.eq-bars i:nth-child(3) { height: 45%; animation-delay: 0.4s; }
@keyframes eq { 50% { transform: scaleY(0.4); } }

/* ---------- pills / chips / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-2);
  transition: all 0.15s ease; white-space: nowrap;
}
.pill {
  font-family: var(--ext); font-size: 11px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.pill { transition: color var(--dur-med) var(--ease-std), background var(--dur-med) var(--ease-std), border-color var(--dur-med) var(--ease-std); }
.pill:hover { color: var(--text); background: var(--panel-2); }
.pill.active { background: var(--accent-soft); color: var(--accent); border-color: hsl(var(--hue) 90% 60% / 0.4); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.qtag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px;
  border: 1px solid hsl(var(--hue) 90% 60% / 0.35); color: var(--accent);
  background: var(--accent-soft);
}
.qtag.atmos { border-color: rgba(180, 150, 255, 0.4); color: #cbb6ff; background: rgba(120, 90, 255, 0.12); }
.qtag.hires { border-color: rgba(90, 220, 200, 0.4); color: #7fe3d2; background: rgba(40, 200, 180, 0.1); }
.qtag.video { border-color: rgba(255, 150, 100, 0.4); color: #ffb48a; background: rgba(255, 120, 60, 0.1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn { font-family: var(--ext); font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; }
.btn-primary { background: var(--grad); color: #0b0b12; box-shadow: 0 8px 24px hsl(var(--hue) 70% 50% / 0.3); }
.btn-primary:hover { box-shadow: 0 10px 30px hsl(var(--hue) 70% 50% / 0.45); }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }
.btn { transition: transform 0.2s ease, background var(--dur-med) var(--ease-std), color var(--dur-med) var(--ease-std), box-shadow var(--dur-med) var(--ease-std), border-color var(--dur-med) var(--ease-std); }
.btn-big { padding: 14px 26px; font-size: 15px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--text-2); transition: all 0.15s ease; flex: none;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.active { color: var(--accent); background: var(--accent-soft); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.ghost { color: var(--text-2); }
.icon-btn.big { width: 44px; height: 44px; }
.icon-btn .glyph, .icon-btn::before { content: attr(data-glyph); }

/* icons: inline SVG injected by ICONS map (data.js) */
.nav-ico svg, .topbar-search-ico svg { width: 18px; height: 18px; }
.tabbar .ico svg { width: 20px; height: 20px; }
.icon-btn svg { width: 19px; height: 19px; flex: none; }
.quick-ico svg { width: 22px; height: 22px; }
.install-ico svg { width: 18px; height: 18px; }
.chip-btn svg { width: 15px; height: 15px; }

/* ---------- sliders ---------- */
input[type="range"].slider {
  -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 4px; background: var(--track);
  outline: none; cursor: pointer;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.5);
  transition: transform 0.12s ease;
}
input[type="range"].slider:hover::-webkit-slider-thumb { transform: scale(1.2); }
input[type="range"].slider::-moz-range-thumb {
  width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff;
}
.slider.seek { width: 100%; }

/* ---------- switch ---------- */
.switch {
  -webkit-appearance: none; appearance: none;
  width: 40px; height: 22px; border-radius: 999px;
  background: var(--track); position: relative; cursor: pointer;
  transition: background 0.15s ease; flex: none;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: left 0.15s ease;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 21px; }

/* ---------- modal ---------- */
.modal-root {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 20px;
  background: var(--scrim); backdrop-filter: blur(8px);
  animation: fadeIn 0.16s ease;
}
.modal {
  width: min(520px, 100%); max-height: 84dvh; overflow-y: auto;
  background: #14141f; border: 1px solid var(--line);
  border-radius: 20px; padding: 24px;
  box-shadow: var(--shadow);
  animation: pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--text-2); font-size: 13.5px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(8px); } }

/* ---------- toasts ---------- */
.toast-root {
  position: fixed; bottom: calc(var(--pb-h) + 24px); left: 50%; transform: translateX(-50%);
  z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #1b1b28; border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-width: 86vw;
}
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.25s ease; }
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- install banner ---------- */
.install-banner {
  position: fixed; bottom: calc(var(--pb-h) + 18px); right: 18px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: #161624; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; box-shadow: var(--shadow);
  animation: pop 0.25s ease;
}
.install-text { display: flex; flex-direction: column; line-height: 1.25; }
.install-text b { font-size: 13.5px; }
.install-text small { color: var(--text-3); font-size: 11.5px; }
.install-banner button { background: var(--grad); color: #0b0b12; font-weight: 800; padding: 7px 14px; border-radius: 999px; font-size: 13px; }

/* ---------- tabbar (mobile) ---------- */
.tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12, 12, 18, 0.92); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  grid-auto-flow: column; grid-auto-columns: 1fr;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; color: var(--text-3);
}
.tabbar a .ico { font-size: 19px; line-height: 1; }
.tabbar a.active { color: var(--accent); }

/* ---------- misc ---------- */
.empty {
  padding: 60px 20px; text-align: center; color: var(--text-3);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.empty .e-ico { font-size: 40px; opacity: 0.5; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.mono { font-family: var(--mono); }
.dim { color: var(--text-2); }
.dim2 { color: var(--text-3); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.flex { display: flex; } .aic { align-items: center; } .jcb { justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: var(--sb-w) minmax(0, 1fr) 0px; }
  .queue-panel { display: none; }
}
@media (max-width: 900px) {
  :root { --pb-h: 76px; }
  .app { grid-template-columns: 0px minmax(0, 1fr); }
  .app .sidebar {
    position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; width: 280px;
    transform: translateX(-100%);
    background: #101018;
  }
  .app.sb-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .app.sb-open::after { content: ""; position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,0.5); }
  .topbar { padding: 10px 14px; }
  .view-inner { padding: 18px 16px 120px; }
  .tabbar { display: grid; }
  .trow { grid-template-columns: 24px minmax(0, 1fr) 56px; }
  .trow .t-dur { display: none; }
  .trow .t-q { display: none; }
  .topbar-actions .chip-btn span:not(.chip-dot) { display: none; }
  .topbar-kbd { display: none; }
}
@media (max-width: 560px) {
  .greeting { font-size: 24px; }
  .card { min-width: 148px; padding: 10px; }
  .quick { width: 100%; }
  .quick-grid { grid-template-columns: 1fr; }
}
