/* ============================================================
   Lyra · views: now playing, lyrics, visualizer, stats, settings
   ============================================================ */

/* ---------------------------------------------------------- view head */
.vh { display: flex; align-items: flex-end; gap: 18px; }
.vh-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
.vh-sub { color: var(--text-3); font-size: 13px; margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vh-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.vh-play {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(125deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  box-shadow: 0 10px 26px -8px color-mix(in oklab, var(--accent) 80%, transparent);
  transition: transform var(--d-2) var(--spring);
}
.vh-play:hover { transform: scale(1.06); }
.vh-play svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; padding: 2px; gap: 2px; }
.seg button { padding: 5px 12px; border-radius: 999px; font-size: 12px; color: var(--text-3); transition: all var(--d-1); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.section { margin: 30px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.section h2 { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: .01em; }
.section .more { margin-left: auto; font-size: 12px; color: var(--text-3); }
.section .more:hover { color: var(--accent); }

/* ---------------------------------------------------------- hero (home) */
.hero {
  position: relative; border-radius: var(--r-3); overflow: hidden; padding: 26px 28px; min-height: 208px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  background: var(--surface); border: 1px solid var(--hairline); margin-bottom: 8px;
}
.hero-art { position: absolute; inset: 0; background-size: cover; background-position: center 22%; filter: saturate(1.15); }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--bg-0) 78%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in oklab, var(--bg-0) 42%, transparent), transparent 26%, color-mix(in oklab, var(--bg-0) 76%) 100%);
}
/* the art layer must stay absolutely positioned; the text children only need a stacking context */
.hero > *:not(.hero-art) { position: relative; }
.hero-kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.hero-title { font-size: clamp(22px, 3vw, 34px); font-weight: 720; margin: 4px 0 2px; letter-spacing: -.02em; }
.hero-sub { font-size: 13px; color: var(--text-2); }
.hero-actions { display: flex; gap: 8px; margin-top: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile {
  position: relative;
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-2);
  background: linear-gradient(100deg, var(--surface), color-mix(in oklab, var(--accent) 8%, var(--surface)));
  border: 1px solid var(--hairline); cursor: pointer; transition: all var(--d-2) var(--ease); min-width: 0;
}
.tile:hover { transform: translateY(-2px); background: var(--surface-2); border-color: var(--hairline-2); }
.tile img, .tile .ph { width: 52px; height: 52px; border-radius: var(--r-1); object-fit: cover; background: var(--surface-3); flex: 0 0 auto; }
.tile .ph svg { width: 22px; height: 22px; }
.tile b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tile-acts {
  position: absolute; right: 8px; top: 50%; padding-left: 18px; border-radius: 999px;
  display: flex; gap: 6px; opacity: 0; pointer-events: none;
  transform: translateY(-50%) translateX(6px); transition: all var(--d-2) var(--ease);
  background: linear-gradient(to left, var(--surface-2) 58%, transparent);
}
.tile:hover .tile-acts, .tile:focus-within .tile-acts { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.tile-acts button {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; cursor: pointer;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--hairline-2); transition: all var(--d-1);
}
.tile-acts button:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tile-acts svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------- album detail */
.album-head { display: flex; gap: 24px; align-items: flex-end; margin-bottom: 22px; }
.album-cover {
  width: clamp(150px, 20vw, 232px); aspect-ratio: 1; border-radius: var(--r-2); background: var(--surface-3) center/cover;
  box-shadow: var(--shadow); flex: 0 0 auto; position: relative; overflow: hidden;
}
.album-cover .disc { position: absolute; inset: 12% 12%; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, #1a1a1a 0 1.5px, #232323 1.5px 3.5px); opacity: 0; transition: opacity var(--d-3); }
.album-info h1 { margin: 0 0 6px; font-size: clamp(22px, 3.2vw, 38px); font-weight: 730; letter-spacing: -.022em; line-height: 1.08; }
.album-info .line { font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.album-info .dotsep { color: var(--text-4); }
.album-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------- artist */
.artist-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 10px; }
.artist-face { width: 128px; height: 128px; border-radius: 50%; background: var(--surface-3) center/cover; box-shadow: var(--shadow-soft); }
.discography { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }

/* ---------------------------------------------------------- now playing overlay */
/* stop above the player bar: it carries the only transport, so immersive mode must not cover it */
.now-playing {
  position: fixed; inset: 0 0 var(--player-h) 0; z-index: 30; display: flex; flex-direction: column;
  background: var(--bg-0); overflow: hidden;
}
.now-playing[hidden] { display: none; }
.np-bg { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(78px) saturate(1.7) brightness(.7); transform: scale(1.15); transition: background-image var(--d-3) linear; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent, color-mix(in oklab, var(--bg-0) 82%, transparent) 75%); }
[data-theme="light"] .np-bg { filter: blur(80px) saturate(1.5) brightness(1.05); }
[data-theme="light"] .np-bg::after { background: radial-gradient(120% 90% at 50% 0%, transparent, color-mix(in oklab, var(--bg-0) 70%, transparent) 80%); }
.np-close { position: absolute; top: 18px; right: 22px; z-index: 3; }
.np-grid {
  position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px; padding: 40px clamp(28px, 5vw, 78px) 30px; align-items: center; min-height: 0;
}
.np-art { display: flex; flex-direction: column; align-items: center; gap: 26px; min-width: 0; }
.np-cover {
  width: min(42vh, 380px); aspect-ratio: 1; border-radius: var(--r-3); background: var(--surface-3) center/cover;
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, .75), 0 0 0 1px var(--hairline);
  position: relative; transition: transform var(--d-3) var(--ease), border-radius var(--d-3);
  animation: npIn var(--d-3) var(--ease);
}
@keyframes npIn { from { opacity: 0; transform: scale(.94) translateY(14px); } }
.np-cover.spin { border-radius: 50%; background-image: repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,.5) 0 2px, rgba(255,255,255,.02) 2px 4px), var(--cover-img, none); animation: npIn var(--d-3) var(--ease); }
.np-cover .hole { position: absolute; inset: 45%; border-radius: 50%; background: var(--bg-0); box-shadow: 0 0 0 4px rgba(255,255,255,.08); display: none; }
.np-cover.spin .hole { display: block; }
.np-meta { text-align: center; max-width: 460px; }
.np-meta h2 { margin: 0 0 6px; font-size: clamp(20px, 2.4vw, 28px); font-weight: 720; letter-spacing: -.02em; }
.np-meta p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.np-tags { display: flex; gap: 6px; justify-content: center; margin: 12px 0 4px; flex-wrap: wrap; }
.np-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.np-viz { width: 100%; height: 54px; opacity: .85; }

/* ---------------------------------------------------------- lyrics */
.np-lyrics { display: flex; flex-direction: column; min-height: 0; height: 100%; max-height: calc(100vh - var(--player-h) - 120px); }
.np-lyrics-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; }
.lyric-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lyric-tabs button { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline); color: var(--text-3); }
.lyric-tabs button.on { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.np-lyrics-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); }
.lyrics-scroll {
  flex: 1; overflow: hidden; position: relative; min-height: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 76%, transparent 96%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 76%, transparent 96%);
  cursor: ns-resize;
}
.lyrics-inner { padding: 0 4px 0 0; will-change: transform; transition: transform .1s linear; }
.lyric-line {
  padding: 9px 14px; border-radius: var(--r-2); font-size: var(--lyric-size, 25px); line-height: 1.32; font-weight: 650;
  letter-spacing: -.01em; color: color-mix(in oklab, var(--text) 30%, transparent);
  transition: color var(--d-2) var(--ease), transform var(--d-3) var(--ease), filter var(--d-3) var(--ease), opacity var(--d-2);
  transform-origin: left center; cursor: pointer; position: relative;
  filter: blur(.6px); text-wrap: balance;
}
.lyric-line:hover { color: color-mix(in oklab, var(--text) 62%, transparent); }
.lyric-line .trans { display: block; font-size: .54em; font-weight: 500; color: color-mix(in oklab, var(--text) 22%, transparent); margin-top: 4px; letter-spacing: .01em; }
.lyric-line.active {
  color: var(--text); filter: blur(0);
  text-shadow: 0 2px 26px color-mix(in oklab, var(--accent) 40%, transparent);
}
.lyric-line.active .trans { color: var(--text-2); }
.lyric-line.past { transform: translateY(0) scale(.985); }
.lyric-line.near { color: color-mix(in oklab, var(--text) 44%, transparent); filter: blur(.3px); }
.lyric-word { display: inline-block; position: relative; }
.lyric-word::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%);
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 85%, #fff), var(--accent-2));
  mix-blend-mode: screen; opacity: .95; border-radius: 2px;
}
.lyrics-none { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px 14px; color: var(--text-3); font-size: 13px; line-height: 1.8; }
.lyrics-none b { color: var(--text); font-size: 15px; font-weight: 600; }
/* inline lyrics strip on the player bar */
.mini-lyric {
  position: absolute; left: 0; right: 0; bottom: 100%; height: 34px; display: none; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-2); pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--bg-1) 70%, transparent));
  padding: 0 24px; overflow: hidden; white-space: nowrap;
}
body.mini-lyric-on .mini-lyric { display: flex; }
.mini-lyric span { transition: transform var(--d-2) var(--ease), opacity var(--d-2); }

/* ---------------------------------------------------------- visualizer */
.viz-bar {
  position: absolute; left: var(--sidebar-w); right: 0; bottom: 100%; height: 0; overflow: hidden;
  transition: height var(--d-2) var(--ease), right var(--d-2) var(--ease), left var(--d-2) var(--ease);
  pointer-events: none;
}
body.has-drawer .viz-bar { right: var(--drawer-w); }
body.viz-on .viz-bar { height: 42px; }
/* the immersive panel carries its own visualizer; a strip behind it only bleeds through the scrim */
body.viz-on:has(.now-playing:not([hidden])) .viz-bar { height: 0; }
.viz-bar canvas.strip { display: block; width: 100%; height: 42px; opacity: .85; }

/* ---------------------------------------------------------- queue drawer rows */
.q-row {
  display: grid; grid-template-columns: 26px 34px minmax(0, 1fr) 26px 22px; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--r-1); font-size: 12.5px; color: var(--text-2); cursor: pointer;
  transition: background var(--d-1);
}
.q-row:hover { background: var(--surface); color: var(--text); }
.q-row.playing { color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.q-row .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-row .t b { display: block; font-size: 12.5px; font-weight: 550; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .t span { display: block; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .art { width: 34px; height: 34px; border-radius: 7px; background: var(--surface-2) center/cover; }
.q-row .x { opacity: 0; font-size: 15px; color: var(--text-4); }
.q-row:hover .x { opacity: 1; }
.q-row .x:hover { color: var(--danger); }
.queue-now { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-3); }
.queue-now b { color: var(--text); font-size: 13px; }

/* ---------------------------------------------------------- stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 24px; }
.stat {
  padding: 16px 18px; border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 18%, transparent); filter: blur(18px); }
.stat b { font-size: 24px; font-weight: 720; letter-spacing: -.02em; }
.stat span { font-size: 11px; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.heat-wrap { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 8px; margin: 6px 0 8px; max-width: 640px; }
.heat { grid-column: 2; display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; }
.heat-days { grid-column: 1; display: grid; grid-template-rows: repeat(7, 1fr); align-items: center; gap: 3px; font-size: 10.5px; color: var(--text-4); text-align: right; }
.heat-hours { grid-column: 2; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: 10px; color: var(--text-4); }
.heat i { width: 100%; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); min-width: 9px; }
.heat i[data-v="1"] { background: color-mix(in oklab, var(--accent) 28%, var(--surface-2)); }
.heat i[data-v="2"] { background: color-mix(in oklab, var(--accent) 52%, var(--surface-2)); }
.heat i[data-v="3"] { background: color-mix(in oklab, var(--accent) 74%, var(--surface-2)); }
.heat i[data-v="4"] { background: var(--accent); box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 70%, transparent); }
.chart { display: flex; flex-direction: column; gap: 2px; }
.chart-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 62px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: var(--r-1); font-size: 12.5px; }
.chart-row:hover { background: var(--surface); }
.chart-row .bar { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .8; }
.chart-row .n { color: var(--text-4); font: 11px var(--font-mono); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; align-items: start; }

/* ---------------------------------------------------------- settings */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-2); padding: 18px 20px; }
.panel h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 660; }
.panel .hint { font-size: 11.5px; color: var(--text-3); margin: 0 0 14px; line-height: 1.6; }
.srow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.srow:first-of-type { border-top: 0; }
/* a wide control (swatch strip, segment group) must wrap below the label instead of
   squeezing the label down to one glyph per line */
.srow .label { flex: 1 1 150px; min-width: 132px; }
.srow > :last-child { flex: 0 1 auto; margin-left: auto; }
.srow .label small { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.switch { width: 40px; height: 23px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background var(--d-2); flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--text); transition: transform var(--d-2) var(--spring); }
.switch.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.switch.on::after { transform: translateX(17px); background: #fff; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; transition: transform var(--d-1); }
.swatch:hover { transform: scale(1.12); }
.swatch.on { border-color: var(--text); }
.lib-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 12.5px; }
.lib-row .p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
kbd { font: 11px var(--font-mono); background: var(--surface-2); border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--text-2); }
.kbd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; font-size: 12.5px; }
.kbd-list div { display: flex; gap: 8px; align-items: center; color: var(--text-2); }
.kbd-list span { margin-left: auto; display: flex; gap: 3px; }

/* ---------------------------------------------------------- EQ popover */
.eq-wrap { display: flex; gap: 10px; align-items: flex-end; padding: 6px 2px 10px; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 26px; }
.eq-band input[type="range"] { width: 62px; height: 4px; transform: rotate(-90deg); transform-origin: 50% 50%; margin: 26px -28px; background: var(--surface-3); }
.eq-band .hz { font: 9.5px var(--font-mono); color: var(--text-4); letter-spacing: -.02em; }
.eq-band .val { font: 9.5px var(--font-mono); color: var(--accent); min-height: 11px; }
.eq-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.eq-presets button { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline); color: var(--text-2); }
.eq-presets button.on { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.eq-curve { height: 46px; opacity: .85; margin-bottom: 4px; }
.eq-curve svg { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------- track info */
.info-table { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 12.5px; }
.info-table b { color: var(--text-3); font-weight: 500; }
.info-table span { font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.big-art { width: 100%; aspect-ratio: 1; border-radius: var(--r-2); background: var(--surface-3) center/cover; margin-bottom: 16px; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .row { grid-template-columns: 26px 38px minmax(0, 2.2fr) minmax(0, 1.5fr) 50px 96px; }
  .row-genre { display: none; }
  .rows-head { grid-template-columns: 26px 38px minmax(0, 2.2fr) minmax(0, 1.5fr) 50px 96px; }
  .rows-head > :nth-child(5) { display: none; }
  .np-grid { grid-template-columns: 1fr; gap: 22px; }
  .np-art { flex-direction: row; align-items: center; gap: 20px; }
  .np-cover { width: min(28vh, 240px); }
  .np-meta { text-align: left; }
  .np-tags, .np-actions { justify-content: flex-start; }
}
@media (max-width: 900px) {
  /* the phone keeps a two-row bar: meta on top, transport below, so playback stays reachable */
  :root { --sidebar-w: 0px; --player-h: 140px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: var(--player-h); width: 250px; z-index: 40; transform: translateX(-100%); transition: transform var(--d-2) var(--ease); }
  body.mobile-nav .sidebar { transform: none; box-shadow: var(--shadow); }
  .shell { grid-template-columns: 0 minmax(0, 1fr); grid-template-areas: "top top" "main main"; }
  body.has-drawer .drawer { position: fixed; right: 0; top: 0; bottom: var(--player-h); width: min(92vw, 340px); z-index: 41; background: color-mix(in oklab, var(--bg-1) 96%, transparent); }
  .player { grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-content: center; row-gap: 6px; padding: 8px 12px; }
  .player .cover { width: 44px; height: 44px; }
  .track-tags { display: none; }
  .player-center { grid-column: 1 / -1; order: 3; }
  .player-right { display: none; }
  .view, .view-head { padding-inline: 16px; }
  .np-grid { padding: 24px 18px calc(var(--player-h) + 18px); }
  .row { grid-template-columns: 24px 36px minmax(0, 1fr) 48px 72px; gap: 8px; }
  .row-album, .row-genre { display: none; }
  .row-act-queue { display: none; }
  .rows-head { grid-template-columns: 24px 36px minmax(0, 1fr) 48px 72px; gap: 8px; }
  .rows-head > :nth-child(4), .rows-head > :nth-child(5) { display: none; }
  .album-head { flex-direction: column; align-items: flex-start; gap: 14px; }
}
@media (hover: none) {
  /* touch screens never fire :hover, so keep the tile actions permanently visible */
  .tile-acts {
    position: static; opacity: 1; pointer-events: auto; transform: none;
    margin-left: auto; padding-left: 0; background: none;
  }
}

@media (max-width: 620px) {
  #clientBadgeText { display: none; }
  .np-grid { grid-template-rows: auto 1fr; }
  .np-art { flex-direction: column; }
  .np-viz { display: none; }
  .search-kbd { display: none; }
  .vh { flex-wrap: wrap; gap: 12px; }
  .vh > :first-child { flex: 1 1 100%; }
  .vh-actions { margin-left: 0; flex-wrap: wrap; }
}

/* ---------------------------------------------------------- pairing */
.pair-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pair-qr { background: #fff; padding: 8px; border-radius: 12px; line-height: 0; box-shadow: 0 4px 24px rgb(0 0 0 / .18); }
.pair-qr svg { width: min(62vw, 224px); height: auto; display: block; }
.pair-url { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); word-break: break-all; }
.pair-note { margin: 0; font-size: 11.5px; color: var(--text-3); line-height: 1.6; max-width: 34ch; }

/* ---------------------------------------------------------- bulk selection */
.row-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.row.selected { background: color-mix(in oklab, var(--accent) 12%, transparent); }
.row.selected .row-title { color: var(--text-1); }
.bulk-bar {
  position: sticky; bottom: calc(var(--player-h) + 14px); z-index: 6;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding: 10px 12px;
  border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--line));
  border-radius: var(--r-2);
  background: color-mix(in oklab, var(--bg-1) 92%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
}
.bulk-bar[hidden] { display: none; }
.bulk-count { font-size: 12.5px; font-weight: 600; color: var(--accent); min-width: 72px; }
.bulk-gap { flex: 1; }
.pair-note, .pair-url { user-select: all; }
@media (max-width: 620px) {
  .bulk-bar { bottom: calc(var(--player-h) + 8px); gap: 6px; padding: 8px; }
  .bulk-bar .mini-btn { font-size: 11px; padding: 5px 8px; }
  .bulk-gap { display: none; }
}

/* members & avatars (settings) */
.member-list { display: flex; flex-direction: column; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.member-row:last-child { border-bottom: none; }
.member-name { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-ops { margin-left: auto; display: flex; gap: 6px; flex: none; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 620px) {
  .member-row { gap: 9px; }
  .member-ops .mini-btn { font-size: 11px; padding: 5px 8px; }
}

/* open-license catalogs */
.cat-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.cat-q { flex: 1 1 220px; min-width: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 14px; color: var(--text); font-size: 13px; }
.cat-q:focus { outline: none; border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.cat-status { min-height: 20px; font-size: 12px; color: var(--text-3); line-height: 1.6; padding: 4px 2px 10px; }
.cat-status.busy { color: var(--accent); }
.cat-status.ok { color: var(--ok); }
.cat-status.err { color: var(--danger); }
.cat-batch { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.cat-batch .muted { font-size: 11.5px; color: var(--text-4); }
.cat-list { display: flex; flex-direction: column; margin-top: 4px; }
.cat-row {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--hairline); transition: background var(--d-1);
}
.cat-row:hover { background: var(--surface); }
.cat-row:first-child { border-radius: var(--r-1) var(--r-1) 0 0; }
.cat-row.seen { opacity: .58; }
.cat-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.cat-main { min-width: 0; }
.cat-title { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-meta { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.lic {
  flex: none; font: 10.5px var(--font-mono); letter-spacing: .03em; padding: 2px 7px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--text-4) 40%, transparent); color: var(--text-3); cursor: help; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.lic.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 45%, transparent); background: color-mix(in oklab, var(--ok) 10%, transparent); }
.lic.no { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 45%, transparent); background: color-mix(in oklab, var(--warn) 10%, transparent); }
.cat-sub { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.cat-sub-run { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.cat-sub-run:hover .cat-sub-label { color: var(--accent); }
.cat-sub-label { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cat-sub-run em { font-style: normal; font-size: 11px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cat .btn:disabled, .cat .mini-btn:disabled { opacity: .4; pointer-events: none; }
@media (max-width: 620px) {
  .cat-row { grid-template-columns: 18px minmax(0, 1fr) auto; row-gap: 4px; gap: 8px; padding: 9px 6px; }
  .cat-main { grid-column: 2; }
  .cat-row .lic { grid-column: 2; justify-self: start; }
  .cat-row a.mini-btn { display: none; }
  .cat-row button.mini-btn { grid-column: 3; grid-row: 1; }
  .cat-bar .btn { flex: 1 1 auto; }
}

/* pasted purchase links */
.pur-links {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 104px; margin: 6px 0 2px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-1); padding: 10px 12px;
  color: var(--text); font: 12px var(--font-mono); line-height: 1.75;
}
.pur-links:focus { outline: none; border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.pur-name { flex: 1 1 160px; min-width: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 14px; color: var(--text); font-size: 13px; }
.pur-name:focus { outline: none; border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.pur-list { display: flex; flex-direction: column; margin-top: 2px; }
.pur-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--hairline); }
.pur-row:first-child { border-radius: var(--r-1) var(--r-1) 0 0; }
.pur-mark { font-size: 13px; text-align: center; }
.pur-row.ok .pur-mark { color: var(--ok); }
.pur-row.no .pur-mark { color: var(--warn); }
.pur-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-3); line-height: 1.65; }
@media (max-width: 620px) { .pur-row { gap: 7px; padding: 8px 4px; } }

/* missing-file tombstones */
.miss-list { display: flex; flex-direction: column; margin-top: 2px; }
.miss-row {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 6px; border-bottom: 1px solid var(--hairline);
}
.miss-row:first-child { border-radius: var(--r-1) var(--r-1) 0 0; }
.miss-row .pur-mark { color: var(--text-3); }
.miss-row .lic { cursor: help; }

/* duplicate merge bar */
.merge-pick {
  font: inherit; font-size: 13px; color: var(--text-1); background: var(--surface-2);
  border: 1px solid var(--hairline); border-radius: var(--r-1); padding: 7px 9px; max-width: 320px;
}
.miss-row .btn { justify-self: end; }
@media (max-width: 620px) {
  .miss-row { grid-template-columns: 18px minmax(0, 1fr); row-gap: 4px; gap: 8px; padding: 8px 4px; }
  .miss-row .lic { grid-column: 2; justify-self: start; }
  .lyr-row .row-dur { grid-column: 2; justify-self: end; }
}

/* lyrics search hits — the whole row is the play button */
.lyr-row { cursor: pointer; transition: background var(--d-1); }
.lyr-row:hover { background: var(--surface); }
.lyr-row:focus-visible { outline: 2px solid color-mix(in oklab, var(--accent) 55%, transparent); outline-offset: -2px; }
.lyr-row .pur-mark { color: var(--accent); }
.lyr-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; color: var(--text-2); }
.lyr-when { margin-top: 2px; font-size: 11px; color: var(--text-4); }
.lyr-when.no { color: var(--warn, #f0b35e); }
.lyr-row:hover .lyr-when:not(.no) { color: var(--accent); }
