:root {
  --bg: #121212; --panel: #1c1c1c; --panel-2: #262626; --line: #333;
  --text: #f2f2f2; --muted: #a0a0a0; --accent: #1ed760; --accent-ink: #062b14;
  --danger: #ff6b6b;
  --mine: #b892ff; --mine-bg: rgba(184, 146, 255, .12);  /* the guest's own requests */
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.grid > * { min-width: 0; }
input, select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; font: inherit; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button, .button { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer; white-space: nowrap; text-decoration: none; }
button:hover, .button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.danger:hover { border-color: var(--danger); color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
button.danger.armed { background: var(--danger); border-color: var(--danger); color: #2b0606; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > input, .row > select { flex: 1; }
ul.tracks { list-style: none; margin: 0; padding: 0; }
ul.tracks li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
ul.tracks li:first-child { border-top: 0; }
ul.tracks img { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--panel-2); flex: none; }
.meta { flex: 1; min-width: 0; }
.meta .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h3 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { padding: 5px 12px; font-size: 13px; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
ul.results img { width: 52px; height: 52px; }
ul.results li.artist-row img { border-radius: 50%; }
li.nav-row { cursor: pointer; }
li.nav-row:hover .t, li.nav-row:focus-visible .t { text-decoration: underline; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; padding: 0 4px; }
.search-note { font-size: 13px; color: var(--muted); padding: 2px 0 6px; }
.search-note span { color: var(--text); font-weight: 600; }
.search-note button.link { color: var(--accent); text-decoration: none; }
.detail-head { padding: 4px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.detail-head .t { font-size: 17px; font-weight: 600; margin-top: 6px; }
.detail-head button.link { color: var(--accent); text-decoration: none; }
ul.results .meta .a { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.explicit { display: inline-block; margin-left: 6px; padding: 0 4px; font-size: 10px; line-height: 15px; font-weight: 700;
  border-radius: 3px; background: var(--muted); color: var(--bg); vertical-align: 2px; }
button.link { background: none; border: 0; padding: 0; border-radius: 0; color: inherit; font: inherit;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; cursor: pointer; }
button.link:hover { color: var(--text); text-decoration-color: var(--muted); }
.no-results button.link { color: var(--accent); }
.meta .by { color: var(--accent); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .by:empty { display: none; }
ul.tracks li.mine { background: var(--mine-bg); box-shadow: inset 3px 0 0 var(--mine); padding-left: 10px; padding-right: 6px; border-radius: 6px; }
li.mine .t, .now-panel.mine .t { color: var(--mine); }
li.mine .by, .now-panel.mine .by { color: var(--mine); font-weight: 600; }
.now-panel.mine { background: var(--mine-bg); border-color: var(--mine); }
.now-panel { margin-bottom: 16px; }
.now-panel .now { margin-bottom: 0; }
li.playing .t { color: var(--accent); font-weight: 600; }
.now { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.now img { width: 64px; height: 64px; border-radius: 6px; background: var(--panel-2); flex: none; }
.bar { height: 4px; background: var(--panel-2); border-radius: 2px; overflow: hidden; margin-top: 6px; }
ul.events { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; font-size: 13px; }
ul.events li { padding: 4px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
ul.events li:first-child { border-top: 0; }
.np-time { font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .5s linear; }
#log { font-size: 12px; color: var(--muted); max-height: 120px; overflow: auto; margin-top: 12px; }
#status { min-height: 1.4em; }
.error { color: var(--danger); }
.hidden { display: none !important; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.settings-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.qr-box { display: inline-block; background: #fff; padding: 12px; border-radius: 8px; line-height: 0; }
.qr-box img, .qr-box canvas { max-width: 100%; height: auto; }
.qr-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px; cursor: pointer; z-index: 10; padding: 16px; }
.qr-overlay .qr-box { padding: 24px; }
.qr-caption { font-size: clamp(24px, 5vw, 48px); font-weight: 600; text-align: center; }
.qr-link { font-size: clamp(16px, 2.5vw, 28px); color: var(--muted); text-align: center; overflow-wrap: anywhere; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
