/* ========================================================================== 
   NOIR — audio-only player
   A monochrome, glassmorphic interface built for late nights.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #050505;
  --bg-soft: #0b0b0b;
  --ink: #f5f3ed;
  --ink-soft: #dedbd3;
  --muted: #a09f99;
  --muted-2: #70706b;
  --muted-3: #4d4d49;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --danger: #ff9f9f;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --player-h: 94px;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 72% -10%, rgba(255, 255, 255, 0.07), transparent 58%),
    radial-gradient(900px 700px at -10% 100%, rgba(255, 255, 255, 0.045), transparent 60%),
    linear-gradient(180deg, #080808 0%, #040404 100%);
}

[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.38; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(255, 255, 255, 0.85); color: #050505; }

:focus-visible {
  outline: 1.5px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-solid {
  fill: currentColor;
  stroke: none;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-bottom-color: rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Ambient backdrop
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.orb-a {
  width: 44vw;
  height: 44vw;
  top: -18vw;
  right: -8vw;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-b {
  width: 30vw;
  height: 30vw;
  left: -14vw;
  bottom: -10vw;
  opacity: 0.26;
  background: rgba(255, 255, 255, 0.16);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.orb-c {
  width: 18vw;
  height: 18vw;
  left: 44%;
  top: 32%;
  opacity: 0.11;
  filter: blur(80px);
  animation: drift-c 22s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: -40%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  animation: grain-shift 0.8s steps(2) infinite;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-5vw, 5vh, 0) scale(1.08); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(5vw, -4vh, 0) scale(1.12); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.9); }
  to { transform: translate3d(3vw, -5vh, 0) scale(1.1); }
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -1%); }
  50% { transform: translate(-1%, 2%); }
  75% { transform: translate(1%, 1%); }
  100% { transform: translate(-2%, -1%); }
}

/* --------------------------------------------------------------------------
   App frame
   -------------------------------------------------------------------------- */

.app {
  position: relative;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 338px;
  grid-template-rows: minmax(0, 1fr) var(--player-h);
  gap: 12px;
  width: 100%;
  max-width: 2200px;
  height: 100dvh;
  margin: 0 auto;
  padding: 14px;
}

.glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.078) 0%, rgba(255, 255, 255, 0.025) 42%, rgba(255, 255, 255, 0.055) 100%);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(255, 255, 255, 0.025);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  backdrop-filter: blur(28px) saturate(125%);
}

/* --------------------------------------------------------------------------
   Shared components
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.display {
  margin-top: 7px;
  font-size: clamp(32px, 3.4vw, 50px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.display em,
h1 em,
h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 180ms var(--ease), background 180ms var(--ease), transform 180ms var(--ease), border-color 180ms var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.075);
}

.icon-btn:active { transform: scale(0.94); }

.icon-btn.bordered {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.icon-btn.is-active {
  color: #080808;
  background: var(--ink);
}

.icon-btn.large { width: 46px; height: 46px; }

#refreshDiscover.is-busy .icon { animation: spin 1s linear infinite; }
#refreshDiscover.is-busy { color: var(--ink); }

.media-card.is-current .cover {
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 42px rgba(0, 0, 0, 0.42);
}

[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 90;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(12, 12, 12, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

[data-tip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 450ms;
}

.primary-btn,
.outline-btn,
.ghost-action,
.chip,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.primary-btn {
  min-height: 42px;
  padding: 0 20px;
  background: var(--ink);
  color: #080808;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.1);
}

.primary-btn .icon { width: 15px; height: 15px; }
.primary-btn:hover { background: #fff; transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0) scale(0.985); }

.outline-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.03em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.outline-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.outline-btn.compact { min-height: 34px; padding: 0 14px; font-size: 10px; }
.outline-btn.full { width: 100%; margin-top: 10px; }
.outline-btn .icon { width: 14px; height: 14px; }

.ghost-action {
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ghost-action .icon { width: 14px; height: 14px; }
.ghost-action:hover { color: var(--ink); background: rgba(255, 255, 255, 0.055); }

.link-btn {
  padding: 6px 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.link-btn .icon { width: 13px; height: 13px; transition: transform 180ms var(--ease); }
.link-btn:hover { color: var(--ink); }
.link-btn:hover .icon { transform: translateX(2px); }

.chip {
  min-height: 31px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chip:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.065); }
.chip.is-active { color: #070707; background: var(--ink); border-color: var(--ink); }

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--muted-2);
  transition: background 160ms ease, color 160ms ease;
}

.mini-btn .icon { width: 14px; height: 14px; }
.mini-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }

.mobile-only { display: none; }

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 16px 16px;
  border-radius: var(--r-xl);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  user-select: none;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  width: 28px;
  height: 28px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.brand-mark span {
  width: 2px;
  border-radius: 2px;
  background: var(--ink);
  animation: brand-bar 1.6s ease-in-out infinite alternate;
}
.brand-mark span:nth-child(1) { height: 6px; animation-delay: -0.2s; }
.brand-mark span:nth-child(2) { height: 13px; animation-delay: -0.6s; }
.brand-mark span:nth-child(3) { height: 9px; animation-delay: -1s; }
.brand-mark span:nth-child(4) { height: 16px; animation-delay: -0.4s; }
.brand-mark span:nth-child(5) { height: 7px; animation-delay: -0.8s; }

@keyframes brand-bar {
  from { transform: scaleY(0.55); opacity: 0.65; }
  to { transform: scaleY(1); opacity: 1; }
}

.brand-type {
  font-size: 17px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-type span {
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 34px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
  text-align: left;
  transition: color 170ms ease, background 170ms ease;
}

.nav-item .icon { width: 17px; height: 17px; opacity: 0.8; }
.nav-item:hover { color: var(--ink-soft); background: rgba(255, 255, 255, 0.045); }
.nav-item.is-active { color: var(--ink); background: rgba(255, 255, 255, 0.075); }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateY(-50%);
}
.nav-item.is-active .icon { opacity: 1; }

.nav-count {
  min-width: 19px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 30px;
  flex: 1;
}

.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 8px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.playlist-nav {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.playlist-nav::-webkit-scrollbar { width: 3px; }
.playlist-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 3px; }

.playlist-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  transition: color 160ms ease, background 160ms ease;
}

.playlist-link:hover, .playlist-link.is-active { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.playlist-link .pl-dot {
  width: 6px;
  height: 6px;
  border: 1px solid var(--muted-2);
  border-radius: 50%;
  flex: 0 0 auto;
}
.playlist-link span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-link small { margin-left: auto; color: var(--muted-3); font-size: 9px; }

.sidebar-empty {
  padding: 1px 10px;
  color: var(--muted-3);
  font-size: 10.5px;
}

.sidebar-bottom {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.import-btn {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-align: left;
  transition: background 170ms ease, border-color 170ms ease, color 170ms ease;
}

.import-btn:hover { background: rgba(255, 255, 255, 0.065); border-color: var(--line-strong); color: var(--ink); }
.import-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.import-icon .icon { width: 15px; height: 15px; }
.import-btn strong { display: block; font-size: 10.5px; font-weight: 560; }
.import-btn small { display: block; margin-top: 1px; color: var(--muted-3); font-size: 8.5px; }
.import-arrow { width: 13px; height: 13px; color: var(--muted-3); }

.engine-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0 4px;
  color: var(--muted-3);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.engine-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.035);
  transition: background 200ms ease;
}
.engine-dot.is-live { background: var(--ink); }
.engine-dot.is-error { background: var(--danger); }
.engine-sep { width: 1px; height: 8px; background: var(--line); }

.sidebar-tools {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}
.sidebar-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-3);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.sidebar-tool .icon { width: 12px; height: 12px; }
.sidebar-tool:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.045); }

.sidebar-note {
  margin: 10px 4px 0;
  color: var(--muted-3);
  font-size: 8.5px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Main column + top bar
   -------------------------------------------------------------------------- */

.main {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 2px 4px 8px;
}

.page-label {
  flex: 0 0 96px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(580px, 100%);
  height: 42px;
  margin-right: auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.search-box:focus-within {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.035), 0 16px 40px rgba(0, 0, 0, 0.3);
}

.search-icon { color: var(--muted-2); width: 16px; height: 16px; }
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.005em;
}
.search-box input::placeholder { color: var(--muted-3); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box kbd { margin-left: 3px; }

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--muted-2);
}
.search-clear .icon { width: 12px; height: 12px; }
.search-clear:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  transition: border-color 180ms ease, transform 180ms ease;
}
.avatar:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-1px); }

.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 10px 4px 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scroll-behavior: smooth;
}

.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 6px; }
.content::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

.view { display: none; animation: view-in 420ms var(--ease) both; }
.view.is-active { display: block; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 4px 22px;
}

.home-head .display { margin-top: 6px; }

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: clamp(320px, 41vh, 410px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(circle at 72% 40%, #262626, #0a0a0a 60%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(1) contrast(1.1) brightness(0.62);
  transform: scale(1.05);
  opacity: 0.75;
  transition: transform 8s ease;
}

.hero:hover .hero-media img { transform: scale(1.09); }

.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 45%, rgba(255, 255, 255, 0.18), transparent 45%),
    repeating-radial-gradient(circle at 75% 50%, transparent 0 38px, rgba(255, 255, 255, 0.035) 39px 40px);
  opacity: 0.8;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 4, 4, 0.96) 0%, rgba(4, 4, 4, 0.84) 36%, rgba(4, 4, 4, 0.22) 70%, rgba(4, 4, 4, 0.5) 100%),
    linear-gradient(0deg, rgba(4, 4, 4, 0.9) 0%, transparent 55%),
    linear-gradient(180deg, rgba(4, 4, 4, 0.22), transparent 30%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(57%, 560px);
  min-height: inherit;
  padding: 38px 0 32px 42px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.025); }
}

.hero-copy h2 {
  margin-top: 16px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 0.93;
  letter-spacing: -0.055em;
}

.hero-copy h2 em {
  font-size: 1.04em;
  color: #fff;
}

.hero-copy p {
  max-width: 410px;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11.5px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 23px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 21px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9.5px;
  letter-spacing: 0.045em;
}

.hero-meta .dot { width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.hero-meta strong { color: rgba(255, 255, 255, 0.68); font-weight: 500; }

.hero-disc {
  position: absolute;
  right: 6.5%;
  bottom: -52px;
  width: clamp(210px, 24vw, 300px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, transparent 0 3px, rgba(255, 255, 255, 0.045) 4px 5px),
    radial-gradient(circle at 35% 30%, #1b1b1b, #080808 60%, #020202);
  box-shadow: -20px 30px 70px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(255, 255, 255, 0.035);
  animation: disc-spin 22s linear infinite;
  animation-play-state: paused;
}

body.is-playing .hero-disc { animation-play-state: running; }

@keyframes disc-spin {
  to { transform: rotate(360deg); }
}

.hero-disc::before {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero-disc::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d0d0d;
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.disc-rings {
  position: absolute;
  inset: 15%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-disc img {
  position: absolute;
  z-index: 2;
  left: 34%;
  top: 34%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.disc-label {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
}

.hero-wave {
  position: absolute;
  right: 7%;
  bottom: 26px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  opacity: 0.32;
  z-index: 2;
}

.hero-wave span {
  width: 2px;
  height: 30%;
  border-radius: 2px;
  background: #fff;
  animation: wave 1.5s ease-in-out infinite alternate;
}

.hero-wave span:nth-child(3n) { height: 80%; animation-duration: 1.1s; }
.hero-wave span:nth-child(3n + 1) { height: 50%; animation-duration: 1.9s; }
.hero-wave span:nth-child(5n) { height: 100%; animation-duration: 0.9s; }
.hero-wave span:nth-child(7n) { height: 65%; animation-duration: 1.35s; }
.hero-wave span:nth-child(2n) { animation-delay: -0.3s; }
.hero-wave span:nth-child(4n) { animation-delay: -0.7s; }
.hero-wave span:nth-child(5n + 2) { animation-delay: -1.1s; }

@keyframes wave {
  from { transform: scaleY(0.35); opacity: 0.45; }
  to { transform: scaleY(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Home — sections, moods, cards, lists
   -------------------------------------------------------------------------- */

.section-block { margin-top: 38px; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.mood-card {
  position: relative;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b0b;
  text-align: left;
  isolation: isolate;
  transition: transform 300ms var(--ease), border-color 300ms ease;
}

.mood-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.26); }
.mood-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 10%, rgba(0, 0, 0, 0.75) 100%);
}

.mood-art { position: absolute; inset: 0; z-index: -2; opacity: 0.85; }
.mood-art i { position: absolute; display: block; border-radius: 50%; }

.mood-a { background: radial-gradient(circle at 78% 20%, #343434, #0a0a0a 64%); }
.mood-a .mood-art i:nth-child(1) { width: 150px; height: 150px; right: -30px; top: -64px; border: 1px solid rgba(255, 255, 255, 0.24); }
.mood-a .mood-art i:nth-child(2) { width: 100px; height: 100px; right: 3px; top: -20px; border: 1px solid rgba(255, 255, 255, 0.12); }
.mood-a .mood-art i:nth-child(3) { width: 190px; height: 190px; right: -80px; top: -90px; background: rgba(255, 255, 255, 0.05); filter: blur(4px); }

.mood-b { background: linear-gradient(135deg, #171717 0%, #0a0a0a 70%); }
.mood-b .mood-art i:nth-child(1) { width: 2px; height: 150%; left: 68%; top: -20%; background: rgba(255, 255, 255, 0.17); transform: rotate(23deg); border-radius: 0; }
.mood-b .mood-art i:nth-child(2) { width: 2px; height: 150%; left: 79%; top: -20%; background: rgba(255, 255, 255, 0.08); transform: rotate(23deg); border-radius: 0; }
.mood-b .mood-art i:nth-child(3) { width: 100px; height: 100px; right: 8%; top: 22%; border: 1px solid rgba(255, 255, 255, 0.1); background: transparent; }

.mood-c { background: radial-gradient(circle at 20% 20%, #2d2d2d, #080808 68%); }
.mood-c .mood-art i:nth-child(1) { width: 170px; height: 45px; right: -40px; bottom: 14px; border-radius: 50%; border-top: 1px solid rgba(255, 255, 255, 0.24); transform: rotate(-16deg); }
.mood-c .mood-art i:nth-child(2) { width: 130px; height: 32px; right: -12px; bottom: 31px; border-radius: 50%; border-top: 1px solid rgba(255, 255, 255, 0.14); transform: rotate(-16deg); }
.mood-c .mood-art i:nth-child(3) { width: 250px; height: 100px; right: -80px; bottom: -40px; background: rgba(255, 255, 255, 0.06); filter: blur(12px); }

.mood-d { background: linear-gradient(160deg, #262626 0%, #0a0a0a 58%); }
.mood-d .mood-art i:nth-child(1) { width: 120px; height: 120px; left: -30px; bottom: -50px; border: 1px solid rgba(255, 255, 255, 0.13); }
.mood-d .mood-art i:nth-child(2) { width: 75px; height: 75px; left: -10px; bottom: -28px; border: 1px solid rgba(255, 255, 255, 0.09); }
.mood-d .mood-art i:nth-child(3) { width: 140px; height: 140px; right: -40px; top: -54px; background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 65%); }

.mood-copy {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mood-copy strong { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.mood-copy small { color: rgba(255, 255, 255, 0.43); font-size: 8.5px; letter-spacing: 0.035em; }
.mood-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}
.mood-arrow .icon { width: 12px; height: 12px; }
.mood-card:hover .mood-arrow { background: var(--ink); color: #080808; transform: rotate(45deg); }

.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(155px, 1fr);
  gap: 13px;
  overflow-x: auto;
  padding: 2px 4px 10px;
  scrollbar-width: none;
}
.card-row::-webkit-scrollbar { display: none; }

.media-card {
  min-width: 0;
  text-align: left;
  cursor: pointer;
}

.media-card .cover {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
  background: #111;
  transition: transform 320ms var(--ease), border-color 320ms ease, box-shadow 320ms ease;
}

.media-card:hover .cover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
}

.media-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.82);
  transition: transform 700ms var(--ease), filter 400ms ease, opacity 300ms;
}

.media-card:hover .cover img { transform: scale(1.055); filter: grayscale(1) contrast(1.05) brightness(0.95); }

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.62));
  opacity: 0.8;
}

.cover-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: #080808;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  transition: opacity 220ms ease, transform 220ms var(--ease), background 180ms ease;
}
.cover-play .icon { width: 15px; height: 15px; margin-left: 1px; }
.media-card:hover .cover-play { opacity: 1; transform: translateY(0) scale(1); }
.cover-play:hover { background: #fff; transform: scale(1.05) !important; }

.cover-index {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
  letter-spacing: 0.1em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.media-card h3 {
  margin: 10px 1px 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-card p {
  margin: 2px 1px 0;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-skeleton {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 20%, rgba(255, 255, 255, 0.075) 38%, rgba(255, 255, 255, 0.035) 56%);
  background-size: 300% 100%;
  animation: shimmer 1.8s linear infinite;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -80% 0; }
}

.track-list { display: flex; flex-direction: column; gap: 2px; }

.track-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 46px minmax(0, 1fr) 46px 66px;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.track-row:hover { background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.055); }
.track-row.is-current { background: rgba(255, 255, 255, 0.065); border-color: rgba(255, 255, 255, 0.1); }

.track-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: var(--muted-3);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.track-index .idx-play {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}
.track-index .idx-play .icon { width: 11px; height: 11px; margin-left: 1px; }
.track-row:hover .track-index .idx-num { display: none; }
.track-row:hover .track-index .idx-play { display: flex; }

.track-index .playing-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.playing-bars i {
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: var(--ink);
  animation: mini-bars 0.9s ease-in-out infinite alternate;
}
.playing-bars i:nth-child(2) { height: 60%; animation-delay: -0.3s; }
.playing-bars i:nth-child(3) { height: 80%; animation-delay: -0.6s; }
.track-row.is-current .track-index .idx-num,
.track-row.is-current .track-index .idx-play { display: none; }
.track-row.is-current.is-playing-row .track-index .playing-bars { display: flex; }
.track-row.is-current:not(.is-playing-row) .playing-bars { display: none; }
.track-row.is-current:not(.is-playing-row) .idx-num { display: block; color: var(--muted); }
.track-row.is-current:not(.is-playing-row) .idx-play { display: none; }

@keyframes mini-bars {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

.track-art {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.13), transparent 60%),
    #111;
  flex: 0 0 auto;
}

.track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.85);
}

.track-art .art-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.22);
}
.art-fallback .icon { width: 15px; height: 15px; }

.track-text { min-width: 0; }
.track-title {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-row.is-current .track-title { color: #fff; }
.track-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}
.track-sub .artist {
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-sub .source-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-3);
  flex: 0 0 auto;
}
.track-sub .source {
  color: var(--muted-3);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-duration {
  color: var(--muted-3);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.track-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  opacity: 0;
  transition: opacity 160ms ease;
}
.track-row:hover .track-actions,
.track-row.is-current .track-actions,
.track-actions:focus-within { opacity: 1; }
.track-actions .icon-btn { width: 30px; height: 30px; }
.track-actions .icon-btn .icon { width: 14px; height: 14px; }
.track-actions .like-btn.is-liked { color: var(--ink); }
.track-actions .like-btn.is-liked .icon { fill: currentColor; }
.track-actions .like-btn.is-liked:hover { color: var(--ink); }

.row-skeleton {
  height: 64px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.025) 20%, rgba(255, 255, 255, 0.06) 38%, rgba(255, 255, 255, 0.025) 56%);
  background-size: 300% 100%;
  animation: shimmer 1.8s linear infinite;
}

.recent-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 4px 8px;
}
.recent-row::-webkit-scrollbar { display: none; }

.recent-card {
  flex: 0 0 168px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.028);
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}
.recent-card:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); transform: translateY(-2px); }
.recent-card .track-art { width: 38px; height: 38px; border-radius: 8px; }
.recent-card .recent-text { min-width: 0; }
.recent-card strong { display: block; overflow: hidden; font-size: 10.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.recent-card span { display: block; margin-top: 2px; overflow: hidden; color: var(--muted-2); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }

.empty-inline {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 22px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.018);
}
.empty-orbit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
}
.empty-inline strong { display: block; font-size: 11px; font-weight: 500; }
.empty-inline span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; }

.home-footer {
  margin-top: 46px;
  padding: 22px 4px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-3);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */

.page-head { padding: 10px 4px 24px; }
.page-head .display { margin-top: 8px; }
.page-sub { max-width: 540px; margin-top: 11px; color: var(--muted-2); font-size: 11.5px; line-height: 1.6; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 4px 12px;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  padding: 30px;
  text-align: center;
}

.empty-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}
.empty-stage > .icon { width: 28px; height: 28px; opacity: 0.65; }
.empty-stage-rings { position: absolute; inset: 0; animation: orbit 22s linear infinite; }
.empty-stage-rings span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.empty-stage-rings span:nth-child(1) { top: -2px; left: 50%; }
.empty-stage-rings span:nth-child(2) { bottom: 16px; left: 8px; opacity: 0.4; }
.empty-stage-rings span:nth-child(3) { top: 18px; right: 6px; opacity: 0.25; }
@keyframes orbit { to { transform: rotate(360deg); } }

.search-empty h2 { font-family: var(--serif); font-size: 31px; font-style: italic; font-weight: 400; }
.search-empty p { max-width: 340px; margin-top: 8px; color: var(--muted-2); font-size: 10.5px; line-height: 1.65; }

.recent-searches { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 18px; }

.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 4px 14px;
}
.results-head h2 { margin-top: 3px; font-size: 18px; font-weight: 400; letter-spacing: -0.02em; }
.results-actions { display: flex; align-items: center; gap: 6px; }

.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
}
.results-loading p { margin-bottom: 10px; color: var(--muted-2); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.results-loading .row-skeleton { width: 100%; }

.loader-orbit {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: orbit 3s linear infinite;
}
.loader-orbit span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}
.loader-orbit span:nth-child(1) { top: -2px; left: 50%; }
.loader-orbit span:nth-child(2) { right: 2px; bottom: 6px; opacity: 0.5; }
.loader-orbit span:nth-child(3) { left: 4px; bottom: 4px; opacity: 0.25; }

.error-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 4px;
  padding: 20px;
  border: 1px solid rgba(255, 159, 159, 0.18);
  border-radius: 16px;
  background: rgba(255, 159, 159, 0.035);
}
.error-card > .icon { width: 24px; height: 24px; color: var(--danger); }
.error-card strong { display: block; font-size: 11.5px; font-weight: 500; }
.error-card p { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.error-card .outline-btn { margin-left: auto; }

/* --------------------------------------------------------------------------
   Library / collections
   -------------------------------------------------------------------------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 4px;
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}
button.stat-card:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); transform: translateY(-2px); }
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.stat-icon .icon { width: 13px; height: 13px; }
.stat-card strong { margin-top: 12px; font-size: 23px; font-weight: 300; line-height: 1; letter-spacing: -0.04em; }
.stat-card > span:last-of-type { margin-top: 5px; color: var(--muted-2); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.stat-arrow { position: absolute; top: 14px; right: 14px; width: 13px; height: 13px; color: var(--muted-3); }

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  padding: 0 4px;
}

.playlist-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
  text-align: left;
}
.playlist-cover {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.14), transparent 55%),
    #101010;
  transition: transform 300ms var(--ease), border-color 300ms ease;
}
.playlist-card:hover .playlist-cover { transform: translateY(-4px); border-color: var(--line-strong); }
.playlist-cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.8); }
.playlist-cover .cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  color: rgba(255, 255, 255, 0.18);
}
.playlist-cover .cover-empty .icon { width: 34px; height: 34px; }
.playlist-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 180ms ease;
}
.playlist-card:hover .playlist-overlay { opacity: 1; }
.playlist-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #080808;
}
.playlist-card h3 { margin: 9px 1px 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card p { margin: 2px 1px 0; color: var(--muted-3); font-size: 9px; }

.playlist-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted-2);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.playlist-empty-card:hover { background: rgba(255, 255, 255, 0.035); border-color: rgba(255, 255, 255, 0.3); color: var(--ink); }
.playlist-empty-card .icon { width: 20px; height: 20px; }
.playlist-empty-card span { margin-top: 9px; font-size: 9.5px; }
.playlist-empty-label { margin-top: 9px; color: var(--muted-2); font-size: 10px; }

.collection-hero {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 16px 8px 30px;
}

.collection-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(150px, 20vw, 210px);
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 50%),
    repeating-radial-gradient(circle at 70% 70%, transparent 0 22px, rgba(255, 255, 255, 0.035) 23px 24px),
    #0e0e0e;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  flex: 0 0 auto;
}
.collection-art .icon { width: 38px; height: 38px; color: rgba(255, 255, 255, 0.4); }
.collection-art.liked-art { background: linear-gradient(145deg, #f0eee8, #a9a8a3); }
.collection-art.liked-art .icon { width: 70px; height: 70px; color: #101010; fill: #101010; stroke-width: 0.6; }
.collection-art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(0.85); }

.collection-copy { min-width: 0; padding-bottom: 2px; }
.collection-copy h1 { margin-top: 7px; font-size: clamp(36px, 4.8vw, 58px); font-weight: 300; line-height: 0.98; letter-spacing: -0.045em; }
.collection-copy p { max-width: 520px; margin-top: 10px; color: var(--muted-2); font-size: 10.5px; line-height: 1.6; }
.collection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 18px; }

/* --------------------------------------------------------------------------
   Local files
   -------------------------------------------------------------------------- */

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 170px;
  margin: 0 4px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  transition: border-color 200ms ease, background 200ms ease;
}
.drop-zone:hover, .drop-zone.is-over { border-color: rgba(255, 255, 255, 0.38); background: rgba(255, 255, 255, 0.045); }
.drop-zone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}
.drop-zone strong { font-size: 11.5px; font-weight: 500; }
.drop-zone > span { color: var(--muted-3); font-size: 9.5px; }

/* --------------------------------------------------------------------------
   Now playing panel
   -------------------------------------------------------------------------- */

.now-panel {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 18px 12px;
  border-radius: var(--r-xl);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
}

.panel-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted-3);
  font-size: 8.5px;
  letter-spacing: 0.045em;
}

.now-art-wrap {
  position: relative;
  width: 100%;
  max-width: clamp(180px, 29vh, 292px);
  margin: 11px auto 0;
  flex: 0 0 auto;
}

.now-art {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.11), transparent 58%),
    #0d0d0d;
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.now-art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(0.88); }
.art-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45)); pointer-events: none; }

.art-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.22);
}
.art-empty .icon { width: 42px; height: 42px; stroke-width: 1; }
.art-empty-rings { position: absolute; inset: 18%; border: 1px solid rgba(255, 255, 255, 0.075); border-radius: 50%; }
.art-empty-rings span { position: absolute; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 50%; }
.art-empty-rings span:nth-child(1) { inset: 12%; }
.art-empty-rings span:nth-child(2) { inset: 27%; }
.art-empty-rings span:nth-child(3) { inset: 42%; background: rgba(255, 255, 255, 0.04); }

.art-badge {
  position: absolute;
  left: 11px;
  bottom: 11px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.55);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.viz-wrap {
  position: relative;
  height: 38px;
  margin: 6px 2px 0;
}
.viz-wrap canvas { width: 100%; height: 100%; opacity: 0.72; }
.viz-label {
  position: absolute;
  right: 3px;
  top: -1px;
  color: var(--muted-3);
  font-size: 6.5px;
  letter-spacing: 0.18em;
}
.viz-label.is-live { color: var(--muted); }

.now-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  flex: 0 0 auto;
}
.now-text { min-width: 0; }
.now-text h2 {
  overflow: hidden;
  font-size: 17px;
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.now-text p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.now-actions { display: flex; align-items: center; gap: 0; flex: 0 0 auto; }
.now-actions .icon-btn { width: 29px; height: 29px; }
.now-actions .icon-btn .icon { width: 14px; height: 14px; }
.now-actions .is-liked { color: var(--ink); }
.now-actions .is-liked .icon { fill: currentColor; }

.panel-tabs {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  flex: 0 0 auto;
}
.panel-tab {
  position: relative;
  padding: 0 0 9px;
  color: var(--muted-3);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: color 160ms ease;
}
.panel-tab:hover { color: var(--ink-soft); }
.panel-tab.is-active { color: var(--ink); }
.panel-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
}
.panel-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  margin-left: 3px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-3);
  font-size: 7.5px;
}

.panel-body {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 7px;
  overflow: hidden;
}
.panel-pane {
  display: none;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.panel-pane.is-active { display: block; }
.panel-pane::-webkit-scrollbar { width: 3px; }
.panel-pane::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 3px; }

.queue-list { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 10px; }
.queue-section-label {
  padding: 8px 5px 4px;
  color: var(--muted-3);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.queue-item {
  display: grid;
  grid-template-columns: 14px 32px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.queue-item:hover { background: rgba(255, 255, 255, 0.05); }
.queue-item.is-current { background: rgba(255, 255, 255, 0.065); border-color: rgba(255, 255, 255, 0.09); }
.queue-item.dragging { opacity: 0.35; }
.queue-item.drag-over { border-color: rgba(255, 255, 255, 0.35); }
.queue-handle { display: flex; align-items: center; justify-content: center; color: var(--muted-3); cursor: grab; }
.queue-handle .icon { width: 11px; height: 11px; }
.queue-item .track-art { width: 30px; height: 30px; border-radius: 6px; }
.queue-item .track-art .icon { width: 11px; height: 11px; }
.queue-info { min-width: 0; }
.queue-info strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-info span {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--muted-3);
  opacity: 0;
  transition: opacity 150ms ease, color 150ms ease, background 150ms ease;
}
.queue-item:hover .queue-remove { opacity: 1; }
.queue-remove:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.queue-remove .icon { width: 11px; height: 11px; }
.queue-current-mark { color: var(--muted-2); font-size: 6.5px; letter-spacing: 0.12em; }
.queue-current-mark .playing-bars { display: flex; height: 10px; }
.queue-item.is-current:not(.is-playing) .playing-bars { animation-play-state: paused; opacity: 0.35; }
.queue-item.is-current:not(.is-playing) .playing-bars i { animation-play-state: paused; }

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  padding: 24px;
  color: var(--muted-3);
  text-align: center;
}
.panel-empty .icon { width: 22px; height: 22px; opacity: 0.6; }
.panel-empty p { font-size: 9px; line-height: 1.65; }

.lyrics-wrap { padding: 8px 6px 26px; }
.lyrics-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 2px 13px; }
.lyrics-source { color: var(--muted-3); font-size: 7.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.lyrics-loading { display: flex; align-items: center; gap: 8px; padding: 30px 4px; color: var(--muted-2); font-size: 9px; }
.lyrics-loading .loader-orbit { width: 18px; height: 18px; }
.lyrics-loading .loader-orbit span { width: 2px; height: 2px; }

.lyric-line {
  display: block;
  width: 100%;
  padding: 5px 3px;
  border: 0;
  background: none;
  color: var(--muted-3);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  transition: color 200ms ease, transform 200ms ease, opacity 200ms ease;
}
.lyric-line:hover { color: var(--muted); }
.lyric-line.is-active { color: var(--ink); transform: translateX(3px); }
.lyric-line.is-past { color: var(--muted-2); opacity: 0.55; }
.lyrics-plain {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.lyrics-attribution { margin-top: 18px; color: var(--muted-3); font-size: 7.5px; letter-spacing: 0.06em; }
.lyrics-attribution a { color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }

.info-list { display: flex; flex-direction: column; padding: 4px 2px 20px; }
.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 9px;
}
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted-3); letter-spacing: 0.04em; text-transform: uppercase; font-size: 7.5px; }
.info-row strong { max-width: 62%; color: var(--muted); font-weight: 450; text-align: right; word-break: break-word; font-size: 9px; }
.info-actions { display: flex; gap: 6px; margin-top: 12px; }
.info-actions .outline-btn { flex: 1; min-height: 32px; font-size: 9px; }

/* --------------------------------------------------------------------------
   Player bar
   -------------------------------------------------------------------------- */

.player {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.45fr) minmax(240px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: var(--player-h);
  padding: 0 17px;
  border-radius: var(--r-xl);
  overflow: hidden;
}

.player::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.player-track {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.player-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 60%),
    #101010;
  flex: 0 0 auto;
  transition: transform 180ms var(--ease), border-color 180ms ease;
}
.player-art:hover { transform: scale(1.04); border-color: rgba(255, 255, 255, 0.35); }
.player-art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.88); }
.player-art-empty { display: flex; color: rgba(255, 255, 255, 0.24); }
.player-art-empty .icon { width: 18px; height: 18px; }
.art-playing {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body.is-playing .art-playing { display: flex; }
.art-playing i { width: 2px; height: 100%; background: #fff; animation: mini-bars 0.8s ease-in-out infinite alternate; }
.art-playing i:nth-child(2) { height: 55%; animation-delay: -0.3s; }
.art-playing i:nth-child(3) { height: 75%; animation-delay: -0.55s; }

.player-meta { min-width: 0; flex: 1; }
.player-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-artist {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-like, .player-add { width: 29px; height: 29px; flex: 0 0 auto; }
.player-like .icon, .player-add .icon { width: 14px; height: 14px; }
.player-like.is-liked { color: var(--ink); }
.player-like.is-liked .icon { fill: currentColor; }
.player-add { display: none; }
@media (min-width: 1500px) { .player-add { display: inline-flex; } }

.player-center {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.transport .icon-btn { width: 31px; height: 31px; }
.transport .icon-btn .icon { width: 15px; height: 15px; }
.transport .icon-btn.is-active { color: var(--ink); background: none; }
.transport .icon-btn.is-active::before {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink);
}
.transport #repeatBtn.is-active .repeat-one { display: inline; }
.transport .repeat-one {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  color: var(--ink);
  font-size: 7px;
  font-weight: 700;
}

.play-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #080808;
  box-shadow: 0 7px 22px rgba(255, 255, 255, 0.1);
  transition: transform 180ms var(--ease), background 180ms ease, box-shadow 180ms ease;
}
.play-main .icon { width: 16px; height: 16px; margin-left: 1px; }
.play-main:hover { background: #fff; transform: scale(1.055); box-shadow: 0 8px 30px rgba(255, 255, 255, 0.16); }
.play-main:active { transform: scale(0.97); }
.play-main.is-paused .icon { margin-left: 2px; }
.play-loading {
  width: 15px;
  height: 15px;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  border-top-color: #080808;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.timeline {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
}
.time {
  flex: 0 0 31px;
  color: var(--muted-3);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.time:last-child { text-align: right; }

.seek-shell {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  height: 16px;
  min-width: 50px;
  cursor: pointer;
}
.seek-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  transition: height 160ms ease;
}
.seek-buffer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(255, 255, 255, 0.16);
}
.seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--ink);
  border-radius: 4px;
}
.seek-shell:hover .seek-track { height: 5px; }
.seek-shell input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.player-extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
}

.audio-only-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted-3);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.audio-only-badge span { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

.player-extras .icon-btn { width: 31px; height: 31px; }
.player-extras .icon-btn .icon { width: 15px; height: 15px; }
.queue-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  background: var(--ink);
  color: #080808;
  font-size: 6.5px;
  font-weight: 700;
  line-height: 11px;
  text-align: center;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 3px;
}
#volume {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 3px;
  margin: 0;
  border-radius: 3px;
  background: linear-gradient(to right, var(--ink) 0%, var(--ink) var(--vol, 80%), rgba(255, 255, 255, 0.13) var(--vol, 80%), rgba(255, 255, 255, 0.13) 100%);
  cursor: pointer;
}
#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 160ms ease;
}
#volume:hover::-webkit-slider-thumb, #volume:focus-visible::-webkit-slider-thumb { opacity: 1; }
#volume::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--ink); }

/* --------------------------------------------------------------------------
   Stage
   -------------------------------------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 24px clamp(24px, 4vw, 66px) 30px;
  background: #050505;
  overflow: hidden;
  isolation: isolate;
  animation: stage-in 500ms var(--ease) both;
}
.stage[hidden] { display: none; }
@keyframes stage-in {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

.stage-bg {
  position: absolute;
  inset: -8%;
  z-index: -2;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: grayscale(1) blur(70px) brightness(0.3) contrast(1.05);
  opacity: 0.65;
  transform: scale(1.1);
}
.stage-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 30% 45%, rgba(0, 0, 0, 0.1), rgba(2, 2, 2, 0.7) 70%),
    linear-gradient(90deg, rgba(3, 3, 3, 0.55), transparent 55%, rgba(3, 3, 3, 0.5));
}

.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: 0 0 auto; }
.stage-brand { padding: 0; }
.stage-top-actions { display: flex; align-items: center; gap: 14px; }
.stage-audio {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.stage-audio span { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); animation: live-pulse 2s infinite; }

.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 7vw, 120px);
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

.stage-art-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.stage-art {
  position: relative;
  width: min(48vh, 100%);
  max-width: 510px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  overflow: hidden;
  background: #101010;
  box-shadow: 0 50px 110px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: rotate(-1.4deg);
}
.stage-art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(0.9); }
.stage-art-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.2); }
.stage-art-empty .icon { width: 64px; height: 64px; stroke-width: 0.8; }
.stage-art-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.14), transparent 32%, transparent 70%, rgba(255, 255, 255, 0.035));
  pointer-events: none;
}

.stage-vinyl {
  position: absolute;
  z-index: -1;
  width: min(46vh, 96%);
  aspect-ratio: 1;
  max-width: 490px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, transparent 0 3px, rgba(255, 255, 255, 0.05) 4px 5px),
    radial-gradient(circle at 35% 30%, #222, #070707 65%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translate(16%, 6%);
  box-shadow: 20px 30px 70px rgba(0, 0, 0, 0.6);
  animation: disc-spin 24s linear infinite;
  animation-play-state: paused;
}
body.is-playing .stage-vinyl { animation-play-state: running; }

.stage-info { min-width: 0; }
.stage-info .eyebrow { color: rgba(255, 255, 255, 0.38); }
.stage-info h2 {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(40px, 5.2vw, 76px);
  font-style: italic;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.stage-info h2.is-long { font-size: clamp(32px, 4vw, 58px); line-height: 1.02; }
.stage-info > p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
  letter-spacing: 0.02em;
}
#stageViz { width: 100%; height: 62px; margin: 26px 0 5px; opacity: 0.65; }
.stage-timeline { display: flex; align-items: center; gap: 12px; width: 100%; }
.stage-timeline span { flex: 0 0 36px; color: rgba(255, 255, 255, 0.3); font-size: 9px; font-variant-numeric: tabular-nums; }
.stage-timeline span:last-child { text-align: right; }
.stage-timeline .seek-track { height: 2px; background: rgba(255, 255, 255, 0.15); }
.stage-timeline .seek-shell:hover .seek-track { height: 4px; }

.stage-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 22px);
  margin-top: 22px;
}
.stage-controls .icon-btn { color: rgba(255, 255, 255, 0.45); }
.stage-controls .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.stage-controls .play-main.xl { width: 60px; height: 60px; }
.stage-controls .play-main.xl .icon { width: 21px; height: 21px; }
.stage-controls .is-liked { color: var(--ink); }
.stage-controls .is-liked .icon { fill: currentColor; }

.stage-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 8px;
  letter-spacing: 0.04em;
}
.stage-foot kbd { height: 18px; min-width: 18px; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.36); font-size: 8px; }
#stageQuality { margin-left: auto; color: rgba(255, 255, 255, 0.32); letter-spacing: 0.12em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Dialogs / context menu / toasts
   -------------------------------------------------------------------------- */

.modal {
  width: min(560px, calc(100vw - 30px));
  max-height: min(780px, calc(100dvh - 40px));
  margin: auto;
  padding: 24px;
  border-radius: 24px;
  color: var(--ink);
  overflow-y: auto;
  background:
    linear-gradient(150deg, rgba(28, 28, 28, 0.97), rgba(9, 9, 9, 0.98)),
    #0b0b0b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: modal-in 260ms var(--ease) both;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.modal-head h2 { margin-top: 5px; font-size: 25px; font-weight: 300; letter-spacing: -0.035em; }
.modal-close { margin: -4px -4px 0 0; }
.modal-sub { margin-top: -6px; margin-bottom: 14px; color: var(--muted-2); font-size: 10px; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-3);
  font-size: 8px;
  letter-spacing: 0.04em;
}
.modal-brand { color: var(--muted-2); font-size: 7.5px; font-weight: 600; letter-spacing: 0.16em; }

.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 26px; }
.shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}
.shortcut span { color: var(--muted); font-size: 10px; }
.shortcut kbd { color: var(--muted); }

.modal-form label { display: block; margin-bottom: 6px; color: var(--muted-2); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.modal-form input[type="text"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 12px;
  transition: border-color 180ms ease, background 180ms ease;
}
.modal-form input[type="text"]:focus { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.07); }
.form-hint { margin-top: 8px; color: var(--muted-3); font-size: 9px; }
.modal-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

.lab-section { margin-top: 20px; }
.lab-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 9.5px; letter-spacing: 0.03em; }
.lab-label span:last-child { color: var(--muted-2); }
.eq-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.eq-presets .chip { min-height: 27px; padding: 0 11px; font-size: 9.5px; }
.eq-bands { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 8px 8px 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.02); }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 20%; }
.eq-band output { color: var(--muted-2); font-size: 8px; font-variant-numeric: tabular-nums; }
.eq-band input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  margin: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  accent-color: var(--ink);
}
.eq-band input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.eq-band span { color: var(--muted-3); font-size: 7.5px; letter-spacing: 0.04em; }
.lab-hint { margin-top: 9px; color: var(--muted-3); font-size: 8px; }
.speed-row { display: flex; gap: 6px; }
.speed-row .chip { flex: 1; }
.settings-list { margin-top: 20px; border-top: 1px solid var(--line); }
.switch-row, .sleep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.switch-row strong, .sleep-row strong { display: block; font-size: 10.5px; font-weight: 500; }
.switch-row small, .sleep-row small { display: block; margin-top: 2px; color: var(--muted-3); font-size: 8.5px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i {
  position: relative;
  width: 34px;
  height: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
  transition: background 180ms ease, border-color 180ms ease;
}
.switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 200ms var(--ease), background 180ms ease;
}
.switch-row input:checked + i { background: var(--ink); border-color: var(--ink); }
.switch-row input:checked + i::after { transform: translateX(15px); background: #080808; }
.switch-row input:focus-visible + i { outline: 1.5px solid #fff; outline-offset: 3px; }
.sleep-row { flex-wrap: wrap; padding: 11px 0; }
.sleep-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.sleep-actions .chip { min-height: 26px; padding: 0 9px; font-size: 8.5px; }

.select-list { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; }
.select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 6px 9px;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
}
.select-row:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.select-row .select-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-2);
}
.select-row .select-icon .icon { width: 13px; height: 13px; }
.select-row strong { display: block; font-size: 10.5px; font-weight: 500; }
.select-row small { display: block; margin-top: 1px; color: var(--muted-3); font-size: 8.5px; }
.select-row .icon:last-child { margin-left: auto; width: 13px; height: 13px; color: var(--muted-3); }

.account-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
}
.account-card strong { display: block; font-size: 11.5px; font-weight: 500; }
.account-card span { display: block; margin-top: 2px; color: var(--muted-3); font-size: 8.5px; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.account-stats div { padding: 13px; background: #0d0d0d; text-align: center; }
.account-stats strong { display: block; font-size: 19px; font-weight: 300; letter-spacing: -0.03em; }
.account-stats span { display: block; margin-top: 2px; color: var(--muted-3); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.account-action {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-align: left;
}
.account-action:hover { color: var(--ink); }
.account-action > .icon { width: 16px; height: 16px; color: var(--muted-2); }
.account-action > .icon:last-child { margin-left: auto; width: 13px; height: 13px; color: var(--muted-3); }
.account-action strong { display: block; font-size: 10.5px; font-weight: 500; }
.account-action small { display: block; margin-top: 2px; color: var(--muted-3); font-size: 8.5px; }
.account-action.danger:hover { color: var(--danger); }

.context-menu {
  position: fixed;
  z-index: 100;
  min-width: 218px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(13, 13, 13, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  animation: menu-in 140ms var(--ease) both;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 9.5px;
  text-align: left;
}
.menu-item .icon { width: 14px; height: 14px; color: var(--muted-2); }
.menu-item:hover { background: rgba(255, 255, 255, 0.075); color: var(--ink); }
.menu-item.danger:hover { color: var(--danger); }
.menu-sep { height: 1px; margin: 5px 7px; background: rgba(255, 255, 255, 0.075); }
.menu-label { padding: 7px 9px 4px; color: var(--muted-3); font-size: 7px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: calc(var(--player-h) + 26px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 340px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  background: rgba(14, 14, 14, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.35;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: toast-in 260ms var(--ease) both;
}
.toast::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); flex: 0 0 auto; }
.toast.is-error::before { background: var(--danger); }
.toast .icon { width: 13px; height: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.is-out { animation: toast-out 220ms ease both; }
@keyframes toast-out { to { opacity: 0; transform: translateY(4px); } }

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 2, 2, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: none;
}
.drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: min(430px, calc(100vw - 30px));
  padding: 46px 30px;
  border-radius: 26px;
  text-align: center;
  border-style: dashed;
}
.drop-card .drop-zone-icon { width: 58px; height: 58px; margin-bottom: 12px; }
.drop-card h2 { font-family: var(--serif); font-size: 32px; font-style: italic; font-weight: 400; }
.drop-card p { color: var(--muted-2); font-size: 10px; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 200;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
  color: var(--ink);
  text-align: center;
}

.playing-bars i:nth-child(1) { animation-delay: -0.15s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1500px) {
  .app { grid-template-columns: 224px minmax(0, 1fr) 316px; }
  .hero-disc { right: 4%; width: clamp(200px, 23vw, 275px); }
  .hero-copy { padding-left: 34px; width: 59%; }
  .card-row { grid-auto-columns: minmax(145px, 1fr); }
}

@media (max-width: 1280px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .now-panel {
    position: fixed;
    top: 14px;
    right: 14px;
    bottom: calc(var(--player-h) + 26px);
    z-index: 50;
    width: min(350px, calc(100vw - 28px));
    transform: translateX(calc(100% + 34px));
    opacity: 0;
    pointer-events: none;
    transition: transform 420ms var(--ease), opacity 300ms ease;
    background:
      linear-gradient(150deg, rgba(27, 27, 27, 0.92), rgba(8, 8, 8, 0.96)),
      var(--bg);
  }
  .now-panel.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
  .now-panel #closePanel { display: inline-flex; }
  .player { grid-template-columns: minmax(200px, 1fr) minmax(300px, 1.4fr) minmax(210px, 1fr); }
  .player-extras .audio-only-badge { display: none; }
}

@media (max-width: 1100px) {
  .hero-copy { width: 64%; }
  .hero-disc { width: 220px; right: 1%; opacity: 0.72; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .playlist-grid { grid-template-columns: repeat(3, 1fr); }
  .page-label { display: none; }
}

@media (max-width: 900px) {
  :root { --player-h: 90px; }
  .app { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; }
  .main { grid-column: 1; }
  .player { grid-column: 1; }
  .sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: calc(var(--player-h) + 20px);
    z-index: 55;
    width: min(286px, calc(100vw - 36px));
    transform: translateX(calc(-100% - 22px));
    opacity: 0;
    pointer-events: none;
    transition: transform 380ms var(--ease), opacity 260ms ease;
    background:
      linear-gradient(150deg, rgba(28, 28, 28, 0.94), rgba(7, 7, 7, 0.97)),
      var(--bg);
  }
  .sidebar.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
  .mobile-only { display: inline-flex; }
  .topbar { gap: 8px; min-height: 58px; }
  .search-box { height: 40px; }
  .top-actions .icon-btn:first-child { display: none; }
  .hero-copy { width: 72%; padding-left: 28px; }
  .hero-disc { right: -4%; opacity: 0.55; }
  .collection-hero { gap: 20px; }
  .now-panel { bottom: calc(var(--player-h) + 22px); }
}

@media (max-width: 760px) {
  .hero { min-height: 380px; }
  .hero-copy { width: 100%; padding: 30px 24px; }
  .hero-copy p { max-width: 330px; }
  .hero-disc { right: -46px; bottom: -90px; opacity: 0.34; width: 230px; }
  .hero-wave { display: none; }
  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .mood-card { min-height: 115px; }
  .playlist-grid { grid-template-columns: repeat(2, 1fr); }
  .card-row { grid-auto-columns: minmax(136px, 1fr); }
  .collection-art { width: 130px; border-radius: 18px; }
  .collection-copy h1 { font-size: 36px; }
  .page-head-row { flex-direction: column; align-items: flex-start; }
  .page-head-row .primary-btn { align-self: flex-start; }
  .shortcut-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-wrap: wrap; }
}

@media (max-width: 680px) {
  :root { --player-h: 124px; }
  .app { padding: 8px; gap: 8px; }
  .topbar { min-height: 52px; padding: 0 2px 6px; }
  .search-box { height: 38px; border-radius: 11px; }
  .search-box kbd { display: none; }
  .top-actions .icon-btn { width: 34px; height: 34px; }
  .avatar { width: 30px; height: 30px; font-size: 13px; margin-left: 2px; }
  .content { padding: 6px 2px 26px; }
  .home-head { padding: 0 2px 16px; }
  .home-head .ghost-action span { display: none; }
  .display { font-size: 33px; }
  .hero { min-height: 360px; border-radius: 23px; }
  .hero-copy { padding: 27px 21px; justify-content: flex-end; }
  .hero-copy h2 { font-size: 43px; }
  .hero-copy p { font-size: 10.5px; margin-top: 12px; }
  .hero-actions { margin-top: 18px; }
  .hero-meta { margin-top: 16px; font-size: 8.5px; }
  .section-block { margin-top: 30px; }
  .section-heading h2 { font-size: 18px; }
  .mood-grid { gap: 8px; }
  .mood-card { border-radius: 15px; }
  .mood-copy { left: 12px; bottom: 11px; }
  .card-row { gap: 9px; padding-left: 2px; padding-right: 2px; grid-auto-columns: minmax(134px, 1fr); }
  .track-row { grid-template-columns: 20px 40px minmax(0, 1fr) 38px 32px; gap: 8px; min-height: 58px; padding: 7px 5px; }
  .track-art { width: 38px; height: 38px; border-radius: 8px; }
  .track-title { font-size: 11px; }
  .track-sub { font-size: 8.5px; }
  .track-actions .like-btn { display: none; }
  .track-actions .icon-btn { width: 27px; height: 27px; }
  .track-actions { opacity: 1; }
  .track-duration { font-size: 9px; }
  .section-heading { margin-bottom: 10px; }
  .section-heading .eyebrow { font-size: 8px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .stat-card { min-height: 100px; padding: 12px; }
  .stat-card strong { font-size: 21px; }
  .playlist-grid { gap: 9px; }
  .collection-hero { align-items: center; gap: 15px; padding: 8px 2px 22px; }
  .collection-art { width: 102px; border-radius: 15px; }
  .collection-art .icon { width: 26px; height: 26px; }
  .collection-copy h1 { font-size: 30px; }
  .collection-copy p { font-size: 9px; margin-top: 6px; }
  .collection-actions { margin-top: 12px; gap: 5px; }
  .collection-actions .primary-btn, .collection-actions .outline-btn { min-height: 34px; padding: 0 13px; font-size: 9.5px; }
  .collection-actions .icon-btn { width: 32px; height: 32px; }
  .search-empty { min-height: 330px; padding: 20px 10px; }
  .results-head { align-items: center; }
  .results-actions .outline-btn span { display: none; }
  .results-actions .outline-btn { padding: 0 10px; }
  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    min-height: var(--player-h);
    padding: 9px 13px 8px;
    border-radius: 24px;
  }
  .player-track { grid-column: 1; grid-row: 1; gap: 9px; }
  .player-art { width: 41px; height: 41px; border-radius: 9px; }
  .player-title { font-size: 10.5px; }
  .player-artist { font-size: 8.5px; margin-top: 2px; }
  .player-like { width: 27px; height: 27px; }
  .player-center { grid-column: 1 / -1; grid-row: 2; gap: 1px; }
  .player-extras { grid-column: 2; grid-row: 1; gap: 0; }
  .player-extras .volume-wrap,
  .player-extras #lyricsBtn,
  .player-extras .audio-only-badge { display: none; }
  .player-extras .icon-btn { width: 29px; height: 29px; }
  .transport { gap: 7px; }
  .transport .icon-btn { width: 28px; height: 28px; }
  .play-main { width: 38px; height: 38px; }
  .play-main .icon { width: 14px; height: 14px; }
  .timeline { gap: 6px; }
  .time { flex-basis: 26px; font-size: 7.5px; }
  .seek-shell { height: 14px; }
  .toast-stack { right: 12px; bottom: calc(var(--player-h) + 18px); left: 12px; align-items: stretch; }
  .toast { max-width: none; }
  .now-panel { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); border-radius: 24px; padding: 16px; }
  .sidebar { top: 8px; left: 8px; bottom: 8px; border-radius: 24px; }
  .modal { padding: 20px; border-radius: 20px; }
  .stage { padding: 18px 18px 22px; }
  .stage-grid { grid-template-columns: 1fr; gap: 18px; align-content: center; }
  .stage-art { width: min(36vh, 280px); border-radius: 20px; }
  .stage-vinyl { width: min(34vh, 270px); }
  .stage-info h2 { font-size: 36px; margin-top: 8px; }
  .stage-info > p { font-size: 10px; }
  #stageViz { height: 34px; margin: 10px 0 2px; }
  .stage-controls { margin-top: 12px; gap: 10px; }
  .stage-controls .play-main.xl { width: 48px; height: 48px; }
  .stage-controls .icon-btn.large { width: 38px; height: 38px; }
  .stage-foot { display: none; }
  .stage-audio { display: none; }
  .stage-top .brand-type { font-size: 14px; }
  .stage-top .brand-mark { width: 24px; height: 24px; }
  .stage-art-wrap { order: 1; }
  .stage-info { order: 2; }
  .stage-timeline { margin-top: 2px; }
  #stageViz { display: none; }
  .account-stats div { padding: 10px 6px; }
}

@media (max-width: 430px) {
  .home-head .display { font-size: 30px; }
  .top-actions #labBtn { display: none; }
  .hero-copy h2 { font-size: 38px; }
  .hero-meta span:nth-child(3) { display: none; }
  .mood-grid { grid-template-columns: 1fr 1fr; }
  .mood-card { min-height: 108px; }
  .mood-copy strong { font-size: 11.5px; }
  .mood-copy small { font-size: 7.5px; }
  .track-row { grid-template-columns: 18px 36px minmax(0, 1fr) 34px 28px; gap: 7px; }
  .track-art { width: 35px; height: 35px; }
  .track-duration { display: none; }
  .track-row { grid-template-columns: 18px 36px minmax(0, 1fr) 32px; }
  .player-extras .stage-btn { display: none; }
  .collection-art { width: 84px; }
  .collection-copy h1 { font-size: 26px; }
  .collection-actions .outline-btn { display: none; }
}

/* --------------------------------------------------------------------------
   Calm mode + reduced motion
   -------------------------------------------------------------------------- */

body.reduce-motion .orb,
body.reduce-motion .grain,
body.reduce-motion .hero-wave span,
body.reduce-motion .brand-mark span,
body.reduce-motion .art-playing i,
body.reduce-motion .playing-bars i,
body.reduce-motion .hero-disc,
body.reduce-motion .stage-vinyl,
body.reduce-motion .empty-stage-rings,
body.reduce-motion .loader-orbit {
  animation: none !important;
}

body.reduce-motion .view { animation: none; }
body.reduce-motion * { scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
