:root {
  --bg: #0e0d10;
  --panel: #17151b;
  --line: #2a2730;
  --text: #f4f1f6;
  --muted: #9a94a3;
  --accent: #ff6a3d;
  --accent-ink: #1a0c06;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.app { max-width: 560px; margin: 0 auto; }

.now {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg);
  padding: calc(env(safe-area-inset-top) + 16px) 16px 12px;
  border-bottom: 1px solid var(--line);
}
.head { display: flex; align-items: center; gap: 12px; }
.cover { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.head-text { min-width: 0; }
h1 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; min-height: 1.4em; margin-top: 8px; }

.now-title {
  font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
  margin: 20px 0 4px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.now-index { font-size: 14px; }

.seek {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 32px; margin: 12px 0 0; background: transparent;
  --p: 0%;
}
.seek::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--p), var(--line) var(--p));
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px;
  border-radius: 50%; background: var(--text);
}
.seek::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.seek::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.seek::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); }
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 10px 0 14px; }
.ctl { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.ctl svg { width: 34px; height: 34px; fill: currentColor; }
.ctl:active { background: var(--panel); }
.ctl.play { width: 84px; height: 84px; background: var(--accent); color: var(--accent-ink); }
.ctl.play svg { width: 42px; height: 42px; }
.ctl.play:active { transform: scale(0.96); background: var(--accent); }

.toggles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }
.chip.busy { color: var(--text); }
.status-ok { color: #7bd88f; }

.list { list-style: none; margin: 0; padding: 4px 0 calc(env(safe-area-inset-bottom) + 24px); }
.row {
  width: 100%; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 16px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.row:active { background: var(--panel); }
.num { color: var(--muted); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #7bd88f; display: none; }
.row.cached .dot { display: inline-block; }
.row.current .name, .row.current .num { color: var(--accent); font-weight: 600; }
.row.unavailable { opacity: 0.4; }
