:root {
  --bg: #1e1f22;
  --panel: #2b2d31;
  --panel-2: #313338;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --accent: #8b5cf6;
  --ok: #23a55a;
  --off: #80848e;
  --danger: #f23f43;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { display: flex; justify-content: center; overflow-y: auto; }
#app { width: 100%; max-width: 560px; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 18px; }

.top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--off); }
.dot.on { background: var(--ok); }
.dot.paused { background: #f0b232; }
.badge { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--panel-2); font-size: 13px; }
.badge:empty { display: none; }

.now { display: flex; gap: 16px; align-items: center; background: var(--panel); padding: 16px; border-radius: 12px; }
.cover {
  flex: none; width: 88px; height: 88px; border-radius: 10px; display: grid; place-items: center; font-size: 40px;
  background: linear-gradient(135deg, var(--accent), #312e81);
}
.meta { min-width: 0; }
.label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
h1 { margin: 4px 0; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }

.controls { display: flex; gap: 10px; }
button {
  font: inherit; color: var(--text); background: var(--panel-2); border: 0; border-radius: 8px;
  padding: 10px 16px; cursor: pointer; transition: filter .15s;
}
button:hover:not(:disabled) { filter: brightness(1.2); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); }
.controls button { flex: 1; font-size: 16px; }
button.small { padding: 4px 12px; }

.volume { display: flex; align-items: center; gap: 10px; background: var(--panel); padding: 12px 16px; border-radius: 12px; }
.volume label { color: var(--muted); }
.volume input { flex: 1; accent-color: var(--accent); }
#volume-value { width: 48px; text-align: right; font-variant-numeric: tabular-nums; }

.section-title { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border-radius: 999px; padding: 6px 14px; }
.chips button.active { background: var(--accent); }
.chips button.active:disabled { opacity: 1; cursor: default; }

.listeners ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.listeners li { display: flex; align-items: center; gap: 8px; background: var(--panel); padding: 6px 12px 6px 6px; border-radius: 999px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--panel-2); }
.listeners li.me .avatar { background: var(--accent); }

footer { color: var(--muted); font-size: 13px; min-height: 1em; }
#toast {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: 90%;
  background: var(--danger); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px;
}
