:root {
  --bg: oklch(0.15 0.018 230);
  --bg-raised: oklch(0.2 0.022 230);
  --bg-hover: oklch(0.25 0.026 230);
  --line: oklch(0.32 0.03 220 / 0.6);
  --text: oklch(0.95 0.01 210);
  --muted: oklch(0.7 0.02 215);
  --faint: oklch(0.55 0.02 215);
  --accent: oklch(0.86 0.15 190);
  --accent-ink: oklch(0.18 0.04 210);
  --accent-glow: oklch(0.86 0.15 190 / 0.35);
  --fav: oklch(0.74 0.19 10);
  --danger: oklch(0.7 0.18 25);
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --gutter: 16px;
  --tabs-h: 58px;
  --mini-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, oklch(0.3 0.06 200 / 0.45), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; }
code, .mono { font-family: var(--mono); font-size: 0.85em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); }
.pad { padding: 0 var(--gutter); }

.icon { width: 24px; height: 24px; flex: none; }

#view {
  padding: var(--safe-t) 0 calc(var(--tabs-h) + var(--safe-b) + 24px);
  max-width: 980px;
  margin: 0 auto;
}
body.has-player #view { padding-bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 24px); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: calc(var(--safe-t) + 6px) var(--gutter) 6px;
  margin-top: calc(-1 * var(--safe-t));
  background: linear-gradient(var(--bg) 70%, transparent);
}
.topbar-title { flex: 1; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 4px; margin-left: auto; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  flex: none;
  transition: color .15s, background .15s, transform .1s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.small { width: 36px; height: 36px; color: var(--muted); }
.icon-btn.small .icon { width: 20px; height: 20px; }
.icon-btn.big .icon { width: 30px; height: 30px; }
.icon-btn.on { color: var(--accent); }
.fav-btn.on { color: var(--fav); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.btn-play {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: transform .1s, box-shadow .2s;
}
.btn-play:active { transform: scale(0.94); }
.btn-play .icon { width: 26px; height: 26px; }
.btn-play.huge { width: 72px; height: 72px; box-shadow: 0 0 32px -4px var(--accent-glow); }
.btn-play.huge .icon { width: 32px; height: 32px; }

/* ---------- Home ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px var(--gutter) 8px;
}
@media (min-width: 720px) { .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quick {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-raised);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background .15s;
}
.quick:active { background: var(--bg-hover); }
.quick > span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding-right: 8px; }
.quick-art { width: 56px; height: 56px; flex: none; object-fit: cover; display: grid; place-items: center; }
.quick-art.fav, .row-art.fav, .hero-cover.fav { background: linear-gradient(135deg, oklch(0.45 0.2 290), oklch(0.75 0.12 190)); color: white; }
.quick-art.mix { background: linear-gradient(135deg, oklch(0.5 0.14 160), oklch(0.3 0.08 230)); color: white; }

.shelf { margin-top: 22px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--gutter); margin-bottom: 10px; }
.shelf-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.shelf-head a { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.shelf-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 140px;
  gap: 14px;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: var(--gutter);
  scrollbar-width: none;
}
.shelf-row::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .shelf-row { grid-auto-columns: 168px; } }

.card { display: flex; flex-direction: column; gap: 3px; min-width: 0; scroll-snap-align: start; }
.card .cover, .card .mosaic { width: 100%; aspect-ratio: 1; border-radius: 6px; margin-bottom: 6px; box-shadow: 0 6px 18px -8px black; }
.card-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover { object-fit: cover; background: var(--bg-raised); }

.artist-card { align-items: center; text-align: center; }
.artist-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  margin-bottom: 6px;
  background: radial-gradient(circle at 30% 25%, oklch(0.42 0.1 200), oklch(0.22 0.05 230));
  border: 1px solid var(--line);
  font: 600 34px var(--mono);
  color: var(--accent);
}
.artist-avatar.small { width: 48px; height: 48px; font-size: 18px; margin: 0; flex: none; }
.artist-avatar.huge { width: 200px; font-size: 64px; margin: 0 auto; }

.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: var(--bg-raised); }
.mosaic .cover { width: 100%; height: 100%; aspect-ratio: 1; border-radius: 0; margin: 0; box-shadow: none; }
.mosaic.empty { display: grid; place-items: center; color: var(--faint); grid-template-columns: 1fr; }

.footnote { margin: 32px var(--gutter) 0; font: 11px var(--mono); color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }

/* ---------- Tracklisten ---------- */
.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 6px 4px 6px var(--gutter);
  cursor: pointer;
  transition: background .12s;
}
.track:active { background: var(--bg-hover); }
@media (hover: hover) { .track:hover { background: var(--bg-raised); } }
.track-cover { width: 46px; height: 46px; border-radius: 4px; flex: none; }
.track-no { width: 22px; flex: none; text-align: right; font: 13px var(--mono); color: var(--faint); }
.track-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-dur { font: 12px var(--mono); color: var(--faint); flex: none; }
.track.is-current .track-title { color: var(--accent); }
.track.is-current .track-no { color: var(--accent); }
.disc { margin: 18px var(--gutter) 4px; font: 600 12px var(--mono); letter-spacing: 0.1em; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 0 var(--gutter); text-align: center; }
.hero-art { display: flex; justify-content: center; margin-bottom: 18px; }
.hero-cover {
  width: min(62vw, 260px);
  aspect-ratio: 1;
  border-radius: 6px;
  box-shadow: 0 20px 50px -18px black, 0 0 0 1px var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.hero-cover .mosaic, .hero-cover > .cover { width: 100%; height: 100%; }
.hero-cover.fav .icon { width: 72px; height: 72px; }
.kicker { margin: 0 0 4px; font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.hero-title { margin: 0; font-size: clamp(24px, 6vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.hero-meta { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.hero-meta a { color: var(--text); font-weight: 600; }

.play-row { display: flex; align-items: center; gap: 8px; padding: 16px var(--gutter) 8px; }
.play-row .btn-play { order: 2; margin-left: auto; }


/* ---------- Bibliothek ---------- */
.chips { display: flex; gap: 8px; padding: 4px var(--gutter) 12px; overflow-x: auto; scrollbar-width: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.sort-row { display: flex; gap: 16px; padding: 0 var(--gutter) 14px; }
.sort { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.sort.active { color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px 14px;
  padding: 0 var(--gutter);
}
#sentinel { height: 1px; }

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 8px var(--gutter);
  text-align: left;
}
.row:active { background: var(--bg-hover); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-art { width: 56px; height: 56px; border-radius: 4px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--bg-raised); }
.row-art .cover, .row-art .mosaic { width: 100%; height: 100%; }
.row-art.add { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.row-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; color: var(--accent); border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Suche ---------- */
.search-bar { padding-bottom: 12px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--accent-ink);
}
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 500; }
.search-field input::placeholder { color: oklch(0.45 0.02 220); }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 var(--gutter); }
.genre {
  height: 84px;
  padding: 12px;
  border-radius: 8px;
  text-align: left;
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(135deg, oklch(0.5 0.14 var(--hue)), oklch(0.3 0.08 calc(var(--hue) + 40)));
  overflow: hidden;
}

/* ---------- Leere Zustaende / Panels ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px var(--gutter); text-align: center; color: var(--muted); }
.empty-state > .icon { width: 48px; height: 48px; color: var(--accent); opacity: 0.7; }
.empty-state h2 { margin: 0; color: var(--text); }
.empty-state p { margin: 0; max-width: 34ch; }
.bar { width: min(320px, 80%); height: 4px; border-radius: 2px; background: var(--bg-hover); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: width .4s; }
.scan-progress { font-family: var(--mono); }

.panel { margin: 0 var(--gutter) 16px; padding: 16px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); }
.panel h2 { margin: 0 0 12px; font: 600 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.panel p { margin: 0 0 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; word-break: break-all; }

/* ---------- Radio ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.pill .icon { width: 18px; height: 18px; color: var(--accent); }
.pill:active { background: var(--bg-hover); }
.radio-art { position: relative; display: block; }
.card .radio-art .mosaic, .card .radio-art > .cover { margin-bottom: 0; }
.card .radio-art { margin-bottom: 6px; }
.radio-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 16px -2px var(--accent-glow);
}
.radio-badge .icon { width: 20px; height: 20px; }
.radio-badge.small { width: 22px; height: 22px; right: 3px; bottom: 3px; }
.radio-badge.small .icon { width: 14px; height: 14px; }
.hero-cover.radio-art { display: grid; }
.retry-radio { margin-top: 10px; }
.radio-status { margin: 0; font-size: 13px; color: var(--muted); }
.radio-status.busy::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }
.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font: 600 9px/14px var(--mono);
  letter-spacing: 0.06em;
  color: var(--faint);
  vertical-align: 1px;
}
.tag.new { border-color: var(--accent); color: var(--accent); }
.track.pending { cursor: default; opacity: 0.6; }
.track-cover.ghost { display: grid; place-items: center; border: 1px dashed var(--line); color: var(--faint); }
.track-cover.ghost .icon { width: 18px; height: 18px; }
.item-bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--bg-hover); overflow: hidden; }
.item-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.icon-btn.add { color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- Einstellungen ---------- */
#source-form { display: flex; flex-direction: column; gap: 14px; }
#source-form h2 { margin-bottom: 0; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 40px; padding: 4px 8px; border-radius: 7px; font-size: 13px; font-weight: 600; text-align: center; color: var(--muted); cursor: pointer; }
.segmented input:checked + span { background: var(--accent); color: var(--accent-ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fields { display: flex; flex-direction: column; gap: 12px; }
.fields[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 16px;
  outline: none;
}
.field input:focus { border-color: var(--accent); }
.picker { display: flex; align-items: center; gap: 6px; }
.picker .icon-btn { width: 46px; height: 46px; border-radius: 8px; border: 1px solid var(--line); color: var(--accent); }
.browser { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 8px 0; }
.browser[hidden] { display: none; }
.browser .btn { margin: 8px 12px 4px; width: calc(100% - 24px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 4px 12px 8px; font: 12px var(--mono); color: var(--faint); border-bottom: 1px solid var(--line); }
.crumbs button { color: var(--accent); font: inherit; }
.browser-list { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto; }
.browser-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; text-align: left; }
.browser-list button:active { background: var(--bg-hover); }
.browser-list .icon { width: 20px; height: 20px; color: var(--muted); }
.browser-list .pad { padding: 10px 12px; }
.form-msg { margin: 0; font-size: 14px; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--accent); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.address { margin: 0 0 8px; font-size: 15px; color: var(--accent); user-select: all; }
.empty-state .btn { margin-top: 6px; }

/* ---------- Login ---------- */
body.locked #dock { display: none; }
.login { min-height: 90dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: var(--gutter); text-align: center; }
.login h1 { margin: 8px 0 0; font: 600 22px var(--mono); letter-spacing: 0.2em; }
.logo-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); box-shadow: 0 0 30px -6px var(--accent-glow); }
.login form { display: flex; flex-direction: column; gap: 12px; width: min(280px, 100%); margin-top: 16px; }
.login input, .prompt input {
  height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  font-size: 18px;
  text-align: center;
  outline: none;
}
.login input:focus, .prompt input:focus { border-color: var(--accent); }

/* ---------- Dock: Mini-Player + Tabs ---------- */
#dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding-bottom: var(--safe-b);
  background: linear-gradient(transparent, oklch(0.12 0.015 230 / 0.92) 30%, oklch(0.11 0.015 230));
}
#mini-player:empty { display: none; }
#mini-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--mini-h);
  margin: 0 8px;
  padding: 0 4px 0 6px;
  border-radius: 8px;
  background: oklch(0.27 0.035 215 / 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px -10px black;
  overflow: hidden;
}
.mini-progress { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: oklch(1 0 0 / 0.12); border-radius: 1px; }
.mini-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 1px; box-shadow: 0 0 6px var(--accent); }
.mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; height: 100%; }
.mini-cover { width: 46px; height: 46px; border-radius: 4px; flex: none; }
.mini-text { min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#tabs { display: flex; height: var(--tabs-h); max-width: 600px; margin: 0 auto; }
#tabs a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
#tabs a.active { color: var(--text); }
#tabs a.active .icon { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }

/* ---------- Now Playing ---------- */
#now-playing {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-t) + 4px) 20px calc(var(--safe-b) + 16px);
  background: var(--bg);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
#now-playing.open { transform: none; }
#now-playing[hidden], #sheet-root[hidden] { display: none; }
.np-bg {
  position: absolute;
  inset: -40px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(60px) saturate(1.4) brightness(0.45);
  opacity: 0.9;
}
.np-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 20%, var(--bg) 85%); }
.np-head { display: flex; align-items: center; gap: 8px; margin: 0 -12px; }
.np-context { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.np-context .kicker { margin: 0; font-size: 10px; color: var(--muted); }
.np-context a { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-art { flex: 1; min-height: 0; display: grid; place-items: center; padding: 20px 0; }
.np-cover {
  width: min(100%, 52dvh, 440px);
  aspect-ratio: 1;
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px black, 0 0 0 1px oklch(1 0 0 / 0.06);
}
.np-info { display: flex; align-items: center; gap: 12px; max-width: 520px; width: 100%; margin: 0 auto; }
.np-text { flex: 1; min-width: 0; }
.np-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist { display: block; font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-error { text-align: center; font-size: 13px; margin: 8px 0 0; }
.np-seek { max-width: 520px; width: 100%; margin: 18px auto 0; }
.np-times { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font: 11.5px var(--mono); color: var(--muted); }
.np-tech { color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-controls { display: flex; align-items: center; justify-content: space-between; max-width: 400px; width: 100%; margin: 10px auto 0; }
.np-foot { display: flex; justify-content: space-between; max-width: 520px; width: 100%; margin: 12px auto 0; }
.np-foot .icon-btn { color: var(--muted); }
body.np-visible { overflow: hidden; }

#seek {
  --fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
#seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--text) var(--fill), oklch(1 0 0 / 0.2) var(--fill));
}
#seek::-moz-range-track { height: 4px; border-radius: 2px; background: oklch(1 0 0 / 0.2); }
#seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--text); }
#seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 10px var(--accent-glow);
}
#seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--text); }

/* ---------- Sheets ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: oklch(0 0 0 / 0.6); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85dvh;
  max-width: 600px;
  margin: 0 auto;
  overflow-y: auto;
  padding: 8px 0 calc(var(--safe-b) + 12px);
  border-radius: 14px 14px 0 0;
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  transform: translateY(100%);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ''; display: block; width: 36px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: var(--line); }
.sheet.tall { height: 85dvh; }
#sheet-root.open .scrim { opacity: 1; }
#sheet-root.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 8px var(--gutter) 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sheet-cover { width: 52px; height: 52px; border-radius: 4px; }
.sheet-title { margin: 0; font-weight: 600; }
.sheet-sub { margin: 0; font-size: 13px; color: var(--muted); }
.sheet-heading { margin: 4px var(--gutter) 10px; font-size: 17px; font-weight: 700; }
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 0 var(--gutter); text-align: left; font-size: 15px; }
.sheet-item:active { background: var(--bg-hover); }
.sheet-item .icon { color: var(--muted); }
.sheet-item.danger, .sheet-item.danger .icon { color: var(--danger); }
.queue-label { margin: 14px var(--gutter) 6px; font: 600 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.queue-current { display: flex; align-items: center; gap: 12px; padding: 4px var(--gutter); }
.queue-current .track-title { color: var(--accent); }
.prompt { display: flex; flex-direction: column; gap: 14px; padding: 0 var(--gutter) 8px; }
.prompt .sheet-heading { margin: 4px 0 0; }
.prompt input { text-align: left; font-size: 16px; }
.prompt-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 18px);
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
