:root {
  --bg: #121212; --surface: #1e1e1e; --surface-2: #2a2a2a; --text: #f2f2f2; --muted: #a0a0a0;
  --accent: #1db954; --danger: #e5534b; --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f6f6; --surface: #fff; --surface-2: #ececec; --text: #111; --muted: #666; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100dvh; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: var(--surface-2); border-radius: 999px; padding: .55rem 1rem; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); color: #000; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
.center { min-height: 100dvh; display: grid; place-content: center; gap: 1rem; text-align: center; padding: 2rem; }
.center h1 { margin: 0; }
.center p { color: var(--muted); margin: 0; }
.layout { max-width: 1100px; margin: 0 auto; padding: 1rem; padding-bottom: 8rem; display: grid; gap: 1.25rem;
  grid-template-columns: 1fr; }
@media (min-width: 800px) { .layout { grid-template-columns: 300px 1fr; align-items: start; padding-bottom: 6rem; } .side { position: sticky; top: 1rem; } }
header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
header h1 { font-size: 1.25rem; margin: 0; }
header .who { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .9rem; }
header img { width: 32px; height: 32px; border-radius: 50%; }
section { background: var(--surface); border-radius: var(--radius); padding: 1rem; }
section h2 { margin: 0 0 .75rem; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
section h2 button { padding: .25rem .7rem; font-size: .85rem; }
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.device { width: 100%; text-align: left; border-radius: 10px; display: flex; gap: .6rem; align-items: center; justify-content: space-between; }
.device.active { outline: 2px solid var(--accent); }
.device small { color: var(--muted); }
.playlists { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.card { width: 100%; height: 100%; text-align: left; border-radius: 12px; padding: .6rem; display: grid; gap: .5rem; align-content: start; }
.card.active { outline: 2px solid var(--accent); }
.card .art { aspect-ratio: 1; width: 100%; border-radius: 8px; object-fit: cover; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: 2rem; }
.card .name { font-weight: 600; font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card small { color: var(--muted); }
input[type=search] { width: 100%; padding: .65rem 1rem; border-radius: 999px; border: 1px solid var(--surface-2); background: var(--bg); color: var(--text); font: inherit; margin-bottom: .75rem; }
.empty { color: var(--muted); font-size: .9rem; }
.now { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--surface-2);
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .75rem; justify-content: space-between; }
.now .info { min-width: 0; display: flex; gap: .75rem; align-items: center; }
.now img { width: 44px; height: 44px; border-radius: 6px; }
.now .t { min-width: 0; }
.now .t b, .now .t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now small { color: var(--muted); }
.toast { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 10; max-width: 90vw; }
