:root {
  /* surfaces */
  --bg: #0a0b0f;
  --bg-2: #0d0f14;
  --panel: #12141a;
  --panel-2: #1a1d25;
  --panel-3: #22262f;
  --line: #ffffff12;
  --line-2: #ffffff22;
  /* text */
  --text: #f3f4f7;
  --muted: #8f96a7;
  --faint: #5f6677;
  /* colour */
  --accent: #8ea2ff;
  --accent-2: #b58cff;
  --accent-ink: #0a0b12;
  --accent-soft: #8ea2ff1f;
  --good: #4ade80;
  --warn: #fbbf24;
  --danger: #ff6b6b;
  /* shape and depth */
  --r-sm: 8px;
  --radius: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px #0006, 0 4px 12px #0004;
  --shadow-2: 0 8px 24px #0007, 0 2px 6px #0005;
  --shadow-3: 0 24px 60px #000a;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 160ms;
  --player-h: 92px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; }
::selection { background: #8ea2ff55; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, .mono { font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace; font-size: 12.5px; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
h1 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -0.035em; line-height: 1.15; }
h2 { margin: 0 0 6px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3 { margin: 32px 0 12px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
svg { width: 20px; height: 20px; fill: currentColor; display: block; }

/* thin, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: #ffffff1f transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #ffffff1a; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #ffffff30; }
::-webkit-scrollbar-track { background: transparent; }

input:not([type=range]):not([type=checkbox]):not([type=radio]), select, textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; outline: none; min-width: 0;
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
input:not([type=range]):not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: #ffffff33; }
input:focus, select:focus, textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select {
  -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238f96a7'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 18px;
}
select option { background: var(--panel-2); }
input[type=search] {
  padding-left: 40px !important;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6677'%3E%3Cpath d='M15.5 14h-.8l-.3-.3A6.5 6.5 0 1 0 14 15.5l.3.3v.8l5 5 1.5-1.5zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9z'/%3E%3C/svg%3E") no-repeat 14px center / 17px !important;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
textarea { width: 100%; resize: vertical; font-family: ui-monospace, Consolas, monospace; }

input[type=range] {
  -webkit-appearance: none; appearance: none; background: transparent; height: 18px; cursor: pointer; --p: 50%; --fill: var(--text);
}
input[type=range]:hover { --fill: var(--accent); }
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px; background: linear-gradient(var(--fill), var(--fill)) 0 / var(--p) 100% no-repeat, #ffffff1f;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px;
  box-shadow: 0 1px 4px #0008; transform: scale(0); transition: transform var(--fast) var(--ease);
}
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { transform: scale(1); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: #ffffff1f; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--fill); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0008; }
input[type=range]:disabled { opacity: 0.4; cursor: default; }
@media (hover: none) { input[type=range]::-webkit-slider-thumb { transform: scale(1); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; text-decoration: none !important; color: var(--text); white-space: nowrap;
  font-weight: 500; letter-spacing: -0.005em; line-height: 1.3;
  transition: background var(--fast), border-color var(--fast), transform var(--fast) var(--ease), box-shadow var(--fast), color var(--fast);
}
.btn:hover { background: var(--panel-3); border-color: #ffffff33; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, #a3b3ff, var(--accent)); border-color: transparent; color: var(--accent-ink); font-weight: 600;
  box-shadow: 0 1px 0 #ffffff55 inset, 0 6px 18px #8ea2ff33;
}
.btn.primary:hover { background: linear-gradient(180deg, #b4c1ff, #9badff); box-shadow: 0 1px 0 #ffffff66 inset, 0 8px 24px #8ea2ff4d; }
.btn.warn-btn { border-color: #fbbf2466; color: var(--warn); background: #fbbf240f; }
.btn.warn-btn:hover { background: #fbbf241f; border-color: var(--warn); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.btn.big { padding: 14px 28px; font-size: 16px; }
.btn.on { background: var(--warn); color: #111; border-color: var(--warn); }
.btn svg { width: 16px; height: 16px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; margin-bottom: 18px; font-weight: 500; transition: color var(--fast); }
.link:hover { color: var(--text); }
.icon {
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 50%; display: grid; place-items: center;
  transition: color var(--fast), background var(--fast), transform var(--fast) var(--ease);
}
.icon:hover:not(:disabled) { color: var(--text); background: #ffffff10; }
.icon:active:not(:disabled) { transform: scale(0.92); }
.icon:disabled { opacity: 0.25; cursor: default; }
.icon.sm { padding: 6px; }
.icon.sm svg { width: 16px; height: 16px; }
.icon.on { color: var(--accent); }
.icon-spacer { width: 36px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- layout ---------- */

.app {
  display: grid; height: 100dvh;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) var(--player-h);
  grid-template-areas: 'side main' 'player player';
}
.sidebar { grid-area: side; background: linear-gradient(180deg, #0c0d12, #090a0d); border-right: 1px solid var(--line); padding: 22px 14px; overflow-y: auto; }
.content {
  grid-area: main; overflow-y: auto; overflow-x: hidden; padding: 32px 40px 56px;
  background: radial-gradient(1200px 420px at 20% -10%, #8ea2ff0f, transparent 60%), radial-gradient(900px 360px at 100% 0%, #b58cff0a, transparent 60%), var(--bg);
}
.content.view-enter > * { animation: view-in 280ms var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.player { grid-area: player; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; padding: 0 8px 24px; letter-spacing: -0.025em; }
/* The logo's ribbon C, with a soft glow in its own colours. */
.brand-mark { width: 34px; height: 34px; flex: none; object-fit: contain; filter: drop-shadow(0 0 10px #8a6cff55) drop-shadow(0 0 4px #ffb37a33); }
/* The name picks up the logo's colours: white into lilac into peach. */
.brand-word {
  background: linear-gradient(95deg, #ffffff 0%, #ece4ff 40%, #ffd9b8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: grid; gap: 2px; }
.nav button, .zone-item {
  background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--muted);
  font-weight: 500; transition: background var(--fast), color var(--fast);
}
.nav button { display: flex; align-items: center; gap: 12px; position: relative; }
.nav button svg { width: 18px; height: 18px; opacity: 0.8; flex: none; }
.nav button:hover, .zone-item:hover { background: #ffffff0a; color: var(--text); }
.nav button.active { background: linear-gradient(90deg, #8ea2ff1f, #8ea2ff08); color: var(--text); font-weight: 600; }
.nav button.active svg { color: var(--accent); opacity: 1; }
.nav button.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.zones-head { margin: 28px 12px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); }
.zone-list { display: grid; gap: 2px; }
.zone-item { display: flex; gap: 10px; align-items: center; width: 100%; }
.zone-item.active { background: #ffffff0d; color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.zone-name { display: grid; min-width: 0; }
.zone-name small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3a4150; flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px #4ade8026, 0 0 10px #4ade8066; }

.view-head { display: flex; align-items: center; gap: 14px 16px; flex-wrap: wrap; margin-bottom: 24px; }
.view-head h1 { margin-right: auto; }
.view-head input[type=search] { width: 280px; border-radius: 999px; }
.lib-status { color: var(--muted); font-size: 12px; margin: 10px 0 18px; }
.view-head + .lib-status { margin-top: -16px; } /* (right under a page title) */
.lib-status:empty { display: none; }
.seg {
  display: inline-flex; background: #ffffff08; border: 1px solid var(--line); border-radius: 999px; padding: 3px; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  background: none; border: 0; padding: 6px 15px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap;
  transition: background var(--fast), color var(--fast);
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 3px #0006, 0 0 0 1px #ffffff14 inset; }
.empty { text-align: center; padding: 88px 20px; color: var(--muted); max-width: 520px; margin: 0 auto; }
.empty h2 { color: var(--text); font-size: 22px; }

/* ---------- art ---------- */

/* Missing covers: a soft two-tone gradient with a light sheen and the initials, so they sit well beside real art. */
.art {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; flex: none;
  background:
    radial-gradient(120% 90% at 15% 10%, hsl(var(--h) 70% 72% / 0.35), transparent 55%),
    radial-gradient(100% 100% at 100% 100%, hsl(calc(var(--h) + 60) 60% 30% / 0.6), transparent 60%),
    linear-gradient(140deg, hsl(var(--h) 38% 30%), hsl(calc(var(--h) + 35) 42% 14%));
  display: grid; place-items: center; box-shadow: 0 0 0 1px #ffffff14 inset;
}
.art::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1px #ffffff12 inset; pointer-events: none; }
.art span { font-weight: 700; font-size: 1.25em; color: #ffffffd9; text-transform: uppercase; letter-spacing: 0.02em; text-shadow: 0 2px 12px #0005; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art.xs { width: 36px; font-size: 11px; border-radius: 6px; }
.art.sm { width: 52px; font-size: 13px; border-radius: 8px; }
.art.lg { width: 100%; font-size: 34px; }
.art.xl { width: 220px; font-size: 60px; border-radius: 16px; box-shadow: var(--shadow-3), 0 0 0 1px #ffffff14 inset; }
.art.round { border-radius: 50%; width: 100%; max-width: 148px; font-size: 34px; }
img.art.sm { height: 52px; object-fit: cover; }

/* ---------- library ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 22px; }
.card {
  background: none; border: 0; padding: 10px; margin: -10px; border-radius: var(--radius); text-align: left; cursor: pointer; min-width: 0; color: var(--text);
  transition: background var(--fast);
}
.card .art { box-shadow: var(--shadow-1), 0 0 0 1px #ffffff12 inset; transition: transform 240ms var(--ease), box-shadow 240ms var(--ease); }
.card:hover { background: #ffffff08; }
.card:hover .art { transform: translateY(-3px); box-shadow: var(--shadow-2), 0 0 0 1px #ffffff1a inset; }
.card-title { margin-top: 12px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Album covers as record sleeves: a light sheen and a fine edge; on hover the cover lifts, glows
   in its own colours, and its record slides out from behind it. */
.card { position: relative; }
.card:hover { z-index: 1; }
.cover { position: relative; isolation: isolate; }
.cover .art { z-index: 2; border-radius: 10px; }
.card .cover .art::after {
  background: linear-gradient(135deg, #ffffff26 0%, #ffffff0a 28%, transparent 45%, transparent 80%, #0000002e 100%);
  box-shadow: 0 0 0 1px #ffffff1c inset, 0 1px 0 #ffffff26 inset;
}
.cover::before {
  content: ''; position: absolute; inset: 8% -6% -14%; z-index: 0; border-radius: 30px; display: none;
  background: var(--img, hsl(var(--h) 60% 45%)) center / cover; filter: blur(26px) saturate(1.8) brightness(1.15); opacity: 0.85;
}
.card:hover .cover::before { display: block; animation: cover-glow 360ms var(--ease) both; }
@keyframes cover-glow { from { opacity: 0; transform: scale(0.85); } to { opacity: 0.85; transform: translateY(6px) scale(1); } }
.cover-disc {
  position: absolute; z-index: 1; top: 3%; left: 3%; width: 94%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, #0b0b0d 0 2.2%, hsl(var(--h) 70% 60%) 2.6% 17%, #0e0e10 17.5% 18.5%, transparent 19%),
    conic-gradient(from 30deg, transparent 0 8%, #ffffff30 13%, transparent 19% 58%, #ffffff26 63%, transparent 69%),
    repeating-radial-gradient(circle, #1d1d21 0 1.3px, #2c2c31 1.5px 2.6px), #18181b;
  box-shadow: 0 10px 24px #000b, 0 0 0 1px #ffffff22 inset, 0 0 0 2px #00000080;
  transition: transform 420ms var(--ease);
}
.card:hover .cover-disc { transform: translateX(30%) rotate(50deg); }
.card:hover .cover .art { transform: translateY(-4px) translateX(-2%); box-shadow: 0 18px 34px #0009, 0 0 0 1px #ffffff1f inset; }
@media (hover: none) { .cover-disc { display: none; } }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.artist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.artist {
  background: none; border: 0; cursor: pointer; display: grid; justify-items: center; align-content: start; gap: 12px; padding: 14px 10px 12px;
  border-radius: var(--radius); text-align: center; color: var(--text); min-width: 0; transition: background var(--fast);
}
.artist .art { box-shadow: var(--shadow-1), 0 0 0 1px #ffffff14 inset; transition: transform 240ms var(--ease), box-shadow 240ms var(--ease); }
.artist span { font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.artist .art span { font-size: 1em; font-weight: 700; display: block; -webkit-line-clamp: none; letter-spacing: 0.02em; color: #ffffffd9; }
.artist:hover { background: #ffffff08; }
.artist:hover .art { transform: scale(1.04); box-shadow: var(--shadow-2), 0 0 0 1px #ffffff1f inset; }
/* Artists as portraits: A–Z headings; a fine ring and a sheen; on hover a glow in the photo's own
   colours and a ring in the brand colours. An album cover standing in for a missing photo is
   shown a little softer. */
.artist-letter {
  grid-column: 1 / -1; margin: 18px 0 -4px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.artist-letter:first-child { margin-top: 4px; }
.artist { gap: 10px; }
.artist .face { position: relative; width: 100%; max-width: 148px; isolation: isolate; }
.artist .face .art { max-width: none; z-index: 2; box-shadow: 0 10px 24px #0007, 0 0 0 1px #ffffff1c inset; }
.artist .face .art::after { background: radial-gradient(120% 80% at 30% 10%, #ffffff22, transparent 45%); box-shadow: 0 0 0 1px #ffffff1c inset; }
.artist .face::before {
  content: ''; position: absolute; inset: 4%; z-index: 0; border-radius: 50%; display: none;
  background: var(--img, hsl(var(--h) 60% 45%)) center / cover; filter: blur(22px) saturate(1.8) brightness(1.1); opacity: 0.8;
}
.artist .face::after {
  content: ''; position: absolute; inset: -5px; z-index: 1; border-radius: 50%; opacity: 0; transition: opacity 260ms var(--ease);
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2, #c9b6ff), #ff8fd6, var(--accent));
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2.5px)); mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2.5px));
}
.artist:hover .face::before { display: block; animation: cover-glow 360ms var(--ease) both; }
.artist:hover .face::after { opacity: 1; }
.artist:hover .face .art { transform: scale(1.04); }
.artist.from-album .face .art img { filter: saturate(0.85) brightness(0.92); }
.artist small { margin-top: -6px; font-size: 12px; color: var(--muted); }
@media (hover: none) { .artist .face::after, .artist .face::before { display: none; } }

.album-hero {
  display: flex; gap: 32px; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; padding: 24px; border-radius: var(--r-lg);
  background: radial-gradient(120% 140% at 0% 0%, hsl(var(--h, 230) 60% 50% / 0.12), transparent 60%), linear-gradient(180deg, #ffffff08, #ffffff02);
  border: 1px solid var(--line);
}
.album-hero > div:last-child { min-width: 0; flex: 1 1 260px; }
.album-hero h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin: 6px 0 10px; overflow-wrap: anywhere; }
.album-hero .row { margin-top: 16px; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

.tracks { display: grid; }
.track { display: flex; align-items: center; gap: 2px; border-radius: 10px; padding-right: 6px; transition: background var(--fast); }
.track + .track { box-shadow: 0 -1px 0 #ffffff08; }
.track:hover { background: #ffffff0a; box-shadow: none; }
.track:hover + .track { box-shadow: none; }
.track.current { background: var(--accent-soft); }
.track.current .t-title { color: var(--accent); font-weight: 600; }
.track.bad { opacity: 0.45; }
.t-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; background: none; border: 0; padding: 9px 10px; cursor: pointer; text-align: left; color: var(--text); }
.t-no { width: 24px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; font-size: 13px; }
.t-text { display: grid; min-width: 0; flex: 1; }
.t-title, .t-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-title { font-weight: 500; }
.t-sub { color: var(--muted); font-size: 12.5px; }
.t-fmt { color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.t-dur { color: var(--muted); font-variant-numeric: tabular-nums; width: 48px; text-align: right; font-size: 13px; }
.track .icon { opacity: 0; }
.track:hover .icon, .track .icon:focus-visible { opacity: 1; }
/* Premium song rows: a slim column header, covers with a shadow and ▶ on hover (track numbers
   turn into ▶ in an album), a soft colour wash sliding in on hover, and tidy format badges. */
.tracks-head {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; padding: 0 106px 8px 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line); color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.tracks.in-album .tracks-head { grid-template-columns: 24px 1fr auto; }
.track { position: relative; border-radius: 12px; }
.track::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 220ms var(--ease);
  background: linear-gradient(90deg, var(--accent-soft), #ffffff08 45%, transparent);
}
.track:hover { background: none; }
.track:hover::before { opacity: 1; }
.t-main { gap: 16px; padding: 8px 10px; }
.t-cover { position: relative; flex: none; display: grid; }
.t-cover .art.xs { width: 44px; border-radius: 8px; box-shadow: 0 6px 14px #0007, 0 0 0 1px #ffffff14 inset; }
.t-cover::after, .t-no::after {
  content: ''; position: absolute; opacity: 0; transition: opacity var(--fast);
  background: #fff; clip-path: polygon(30% 20%, 30% 80%, 80% 50%);
}
.t-cover::after { inset: 13px; border-radius: 0; z-index: 3; }
.t-cover::before { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 8px; background: #0008; opacity: 0; transition: opacity var(--fast); }
.track:hover .t-cover::after, .track:hover .t-cover::before { opacity: 1; }
.t-no { position: relative; }
.t-no::after { width: 14px; height: 14px; right: 2px; top: 50%; translate: 0 -50%; background: var(--text); }
.track:hover .t-no { color: transparent; }
.track:hover .t-no::after { opacity: 1; }
.track:hover .t-title { color: #fff; }
.t-title { font-weight: 600; letter-spacing: -0.005em; }
.t-fmt { border: 0; background: #ffffff0f; color: var(--muted); border-radius: 999px; padding: 2px 8px; }
.t-dur { font-size: 13px; }
@media (max-width: 520px) {
  .t-main { gap: 10px; padding: 7px 4px 7px 6px; }
  .t-cover .art.xs { width: 40px; }
  .t-cover::after { inset: 12px; }
  .t-dur { width: 36px; font-size: 12px; }
  .track { gap: 0; padding-right: 0; }
  .track .icon.sm { width: 28px; height: 28px; }
  .tracks-head { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 0 88px 8px 6px; }
  .tracks.in-album .tracks-head { grid-template-columns: 24px 1fr auto; }
}

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; border-radius: 2px; background: var(--accent); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ---------- radio ---------- */

.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.station { display: flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding-right: 6px; min-width: 0; }
.station-main { flex: 1; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 10px; cursor: pointer; text-align: left; min-width: 0; }
.station-main span { display: grid; min-width: 0; }
.station-main b, .station-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-main small { color: var(--muted); }
.station:hover { border-color: #3a4150; }
form.row input { flex: 1; min-width: 160px; }

/* ---------- rooms ---------- */

.callout { background: linear-gradient(135deg, #7c9cff14, #a78bfa14); border: 1px solid #7c9cff33; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dj-weather { gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 0; }
.dj-weather input { width: 200px; }
.dj-weather > span { flex-basis: 100%; } /* the label (and the weather now) above the town box */
.import-form { display: flex; flex-direction: column; gap: 8px; max-width: 34em; }
.import-form > label:not(.check) { display: flex; flex-direction: column; gap: 4px; }
.import-form input:not([type]) { width: 100%; }
.dj-sounds { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0 0; }
.dj-sounds label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.dj-sounds label:has(select) { flex: 0 0 auto; }
.dj-sounds input { width: 100%; }
.taste-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.listener { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.person { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.person input { width: 160px; }
.person span { flex: 1; }
.pair-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0 0 18px; }
/* alarms and sleep */
.alarm { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.alarm.off { opacity: 0.55; }
.alarm-time { font-size: 18px; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.alarm > span { flex: 1 1 220px; font-size: 13px; }
.alarm-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.alarm-days { display: inline-flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.alarm-days label { display: inline-flex; gap: 3px; align-items: center; }
#btn-sleep.on { color: var(--accent, #7c9cff); }
#sleep-menu { right: 120px; }
.ask-menu { right: 150px; width: min(380px, 90vw); }
.ask-form { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.ask-form input { flex: 1; min-width: 0; }
/* Backups: where they're saved */
.backup-folder { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 6px 0; }
.backup-folder label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); flex: 1 1 320px; }
.backup-folder input { width: 100%; box-sizing: border-box; }
/* Raspberry Pi panel and a Pi's setup on its row */
.pi-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 10px 0; }
.pi-opts label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.pi-opts label.pi-check { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: inherit; }
.pi-cmd { display: flex; gap: 8px; align-items: flex-start; }
.pi-cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pi-panel .row { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pi-setup { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pi-setup label { display: inline-flex; gap: 6px; align-items: center; }
/* a speaker's touch screen settings: easy to spot */
.touch-line { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(124, 156, 255, 0.1); border: 1px solid rgba(124, 156, 255, 0.4); }
.touch-line > b { color: #c9d6ff; margin-right: 4px; }
/* Pi card */
.picard { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; width: 100%; }
.picard label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.picard .row { grid-column: 1 / -1; }
.picard-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
/* speaker tuning */
.tune { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tune-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; width: 100%; flex-wrap: wrap; }
.tune-head > div { flex: 1 1 280px; }
.tune-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tune-bar i { display: block; height: 100%; background: var(--accent, #7c9cff); transition: width 0.3s; }
.tune-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tune-table th, .tune-table td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tune-table th { color: var(--muted); font-weight: 500; }
.tune .warn { color: var(--warn); }
@media (max-width: 600px) { .tune-table th:nth-child(3), .tune-table td:nth-child(3) { display: none; } }
.callout code.cmd { flex-basis: 100%; display: block; padding: 8px 10px; overflow-x: auto; white-space: nowrap; user-select: all; }
.room { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.room-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.room-name { font-weight: 700; font-size: 16px; background: transparent !important; border-color: transparent !important; padding-left: 0 !important; width: 200px; }
.room-name:focus { border-color: var(--accent) !important; padding-left: 8px !important; }
.room-head .vol-inline { margin-left: auto; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); text-transform: capitalize; }
.pill.playing { background: #4ade8022; color: var(--good); }
.pill.grouped { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); text-transform: none; }
.room.grouped { border-left: 3px solid var(--accent); }
.group-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.group-row .vol-inline { margin-left: 0; }
.vol-inline { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.vol-inline input { width: 120px; }
.receivers { display: flex; gap: 18px; flex-wrap: wrap; padding: 2px 0 10px; }
.rx { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.rx input { accent-color: var(--accent); }
.rx-status { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.rx-status.ready { color: var(--good); }
.rx-status.casting { background: #4ade8022; color: var(--good); }
.rx-status.missing, .rx-status.error { color: var(--warn); }
.rx-setting { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rx-setting label { display: flex; gap: 10px; align-items: center; }
.rx-setting input { width: 320px; max-width: 100%; }
.speaker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.speaker.offline { opacity: 0.55; }
.spk-name { width: 170px; }
.trim { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.trim input { width: 72px; }
.spk-stat { flex-basis: 100%; padding-left: 18px; }
.spk-sw { flex-basis: 100%; padding-left: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spk-sw.warn { color: var(--warn, #e0a040); }

/* ---------- settings ---------- */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 18px; margin-bottom: 16px; }
.panel textarea { margin-bottom: 10px; }
.panel #lead { width: 100px; }
.input-form { display: grid; grid-template-columns: 1fr 2fr 2fr auto; gap: 8px; margin: 10px 0; }
.input-row { padding: 6px 0; }
details summary { cursor: pointer; color: var(--muted); }

/* Settings: a list of sections on the left, the chosen one on the right; chips on a phone. */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-tabs { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 12px; min-width: 0; }
.settings-body { min-width: 0; }
.settings-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 10px 12px; color: var(--text); cursor: pointer; }
.settings-tabs button small { color: var(--muted); font-size: 12px; }
.settings-tabs button:hover { background: var(--panel); }
.settings-tabs button.active { background: var(--panel); border-color: var(--line); }
.settings-tabs button.active b { color: var(--accent, var(--text)); }
@media (max-width: 760px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .settings-tabs { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; scrollbar-width: none; }
  .settings-tabs button { flex: none; border-radius: 999px; padding: 6px 14px; border-color: var(--line); }
  .settings-tabs button small { display: none; }
}

/* ---------- player ---------- */

.player {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center;
  padding: 0 20px; background: #0b0d11; border-top: 1px solid var(--line);
}
.np { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-text { min-width: 0; }
.np-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-live { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; }
.np-live[hidden] { display: none; }
.np-live .live-dot { color: #ff5a5a; font-weight: 700; letter-spacing: 0.06em; }
.np-live .live-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5a5a; margin-right: 5px; vertical-align: 1px; }
.np-live .behind { color: var(--muted); }
.np-live .btn.sm { padding: 1px 8px; font-size: 11px; }
.transport { display: grid; gap: 4px; justify-items: center; }
.buttons { display: flex; gap: 6px; align-items: center; }
.icon.play { background: var(--text); color: #0b0d12; padding: 9px; }
.icon.play:hover { background: #fff !important; color: #0b0d12 !important; transform: scale(1.04); }
.icon.play svg { width: 22px; height: 22px; }
.progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.progress input { flex: 1; }
.progress span { width: 40px; }
.progress span:first-child { text-align: right; }
.player.live #seek { visibility: hidden; }
.vol { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.vol select { max-width: 150px; min-width: 96px; flex-shrink: 0; }
.vol input { width: 120px; min-width: 60px; flex-shrink: 1; }
.vol .icon.sm { flex-shrink: 0; }

.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 16px); transform: translateX(-50%); background: var(--text); color: #111; padding: 9px 16px; border-radius: 999px; font-weight: 500; box-shadow: 0 10px 30px #0008; z-index: 10; }

/* ---------- speaker page ---------- */

.speaker-page { display: grid; place-items: center; min-height: 100dvh; padding: 16px; }
.speaker-card { text-align: center; max-width: 440px; display: grid; justify-items: center; gap: 4px; }
.speaker-card h1 { font-size: 30px; margin-top: 20px; }
.speaker-card .btn { margin: 18px 0 6px; }
.speaker-ring { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #8a6cff33, transparent 70%); border: 1px solid #8ea2ff33; }
/* The app icon (also allowed on the sign-in pages away from home). */
.speaker-dot { width: 76px; height: 76px; border-radius: 24%; background: url(/icon-192.png) center / cover; box-shadow: 0 10px 30px #6a4cff40, 0 0 0 1px #ffffff1a inset; }
.speaker-card .live { color: var(--good); font-weight: 600; margin: 18px 0 6px; }

/* ---------- AI DJ ---------- */

.dj-deck { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 22px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, #7c9cff22, transparent 60%), var(--panel); }
.dj-onair h2 { margin: 4px 0 6px; font-size: 24px; }
.dj-onair p { margin: 0; }
.dj-controls { display: grid; gap: 10px; justify-items: end; }
.dj-controls label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.dj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dj-card { position: relative; border-radius: var(--radius); border: 1px solid var(--line); min-width: 0;
  background: linear-gradient(160deg, hsl(var(--h) 55% 30% / 0.55), hsl(calc(var(--h) + 40) 50% 18% / 0.35) 70%), var(--panel); }
.dj-card:hover { border-color: #3a4150; }
.dj-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dj-play { display: grid; gap: 4px; width: 100%; background: none; border: 0; padding: 16px; text-align: left; cursor: pointer; color: inherit; min-width: 0; }
.dj-play:disabled { opacity: 0.5; cursor: default; }
.dj-play b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 28px; }
.dj-play small { color: var(--text); opacity: 0.75; min-height: 2.6em; }
.dj-meta { color: var(--muted); font-size: 12px; }
.dj-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #ffffff1a; margin-bottom: 6px; }
.dj-icon svg { width: 18px; height: 18px; }
.dj-del { position: absolute; top: 8px; right: 8px; }
.player.dj .np-sub { color: var(--accent); }
.np-thumbs { display: flex; gap: 0; flex: none; }
.np-thumbs .icon.on { color: var(--accent); }
.np-thumbs #btn-down.on { color: var(--warn); }
.vol { position: relative; }
.play-in { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.play-in select { font-weight: 600; }
.send-menu[hidden], .phone-tap[hidden] { display: none; }
/* Listen-only devices: hide what they aren't allowed to do (the server refuses it anyway). */
body.listen-only :is([data-view=rooms], [data-view=suggest], [data-act=send], [data-seed-track], [data-save-result],
  [data-learn-result], [data-del-station], [data-del-input], .admin-only, .zones-head) { display: none !important; }
.send-menu { position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 20; min-width: 240px; display: grid; gap: 2px; padding: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px #0008; }
.send-menu button { text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.send-menu button:hover { background: var(--panel-2); }
.send-menu small { color: var(--muted); }
.send-menu .eyebrow { padding: 2px 10px 6px; }
.phone-tap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--player-h) + 14px); z-index: 30; box-shadow: 0 10px 30px #0008; }
.devices { display: grid; gap: 6px; margin: 8px 0 12px; }
.device { display: flex; align-items: center; gap: 12px; background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
.device span { flex: 1; min-width: 0; }
.device small { color: var(--muted); display: block; }
.away-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 6px; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 10px; }
.away-link code { overflow-wrap: anywhere; min-width: 0; }
.proxy { display: grid; gap: 6px; margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.proxy p { margin: 0; }
.warn-box { border: 1px solid var(--warn); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pair-code { font-size: 32px; letter-spacing: 0.25em; font-variant-numeric: tabular-nums; font-weight: 700; }
.crowd-head { align-items: center; gap: 14px; flex-wrap: wrap; }
.crowd-head b { color: var(--text); }
.crowd-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; }
.crowd-station { position: relative; display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 40px 10px 12px; min-width: 0; }
.crowd-station small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crowd-station .icon { position: absolute; top: 6px; right: 6px; }
.crowd-station .warn { color: var(--warn); }
.pill { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.suggests { display: grid; gap: 6px; }
.suggest { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 8px 10px; min-width: 0; }
.suggest-text { flex: 1; display: grid; min-width: 0; }
.suggest-text b, .suggest-text span, .suggest-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-text span { color: var(--muted); font-size: 13px; }
.suggest-text small { color: var(--muted); font-size: 12px; }
@media (max-width: 800px) {
  .suggest-text small { white-space: normal; }
  .suggest { flex-wrap: wrap; }
  .suggest-text { flex-basis: calc(100% - 80px); }
}
.taste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--muted); }
.taste b { color: var(--text); font-size: 18px; margin-right: 4px; }
.taste span { display: inline-flex; align-items: center; gap: 2px; }
.taste svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- a room's sound ---------- */

.sound-row { margin: 8px 0; }
.sound-toggle { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-grid { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.sound-grid label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sound-grid input[type=range] { width: 160px; max-width: 50vw; }
.quiet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; }
.eq-box { display: grid; gap: 6px; }
.eq-curve { width: 100%; max-width: 420px; height: auto; display: block; }
.eq-curve text { font-size: 8px; fill: var(--muted); }
.eq-curve .axis { stroke: var(--line); }
.eq-curve polyline { fill: none; stroke-width: 2; stroke-linejoin: round; }
.eq-curve .before, .key.before { stroke: var(--muted); background: var(--muted); }
.eq-curve .after, .key.after { stroke: var(--accent); background: var(--accent); }
.key { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin: 0 4px 0 8px; border-radius: 2px; }

/* ---------- podcasts and audiobooks ---------- */

.pod-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 8px; }
.pod-head h3 { margin: 0; }
.pod-head img, .pod-head .ph, .pod-results img, .pod-results .ph, .books img, .books .ph { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--line); display: block; }
.pod-results, .books, .eps, .backups { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pod-results li, .books li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.pod-results img, .pod-results .ph { width: 48px; height: 48px; }
.ep { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ep.done .ep-title { color: var(--muted); }
.ep-main { min-width: 0; }
.ep-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar { display: inline-block; width: 60px; height: 4px; border-radius: 2px; background: var(--line); vertical-align: middle; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--accent); }
.backups li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border-top: 1px solid var(--line); }

/* ---------- suggestions: stores and shopping list ---------- */

.store-links { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.store-links a { color: var(--accent); }
.import-recent { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }

/* ---------- duplicate albums ---------- */

.dupe-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.dupe-head h3 { margin: 0; }
.dupe-version { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.dupe-version.is-hidden { opacity: 0.55; }
.dupe-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dupe-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dupe-folder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
@media (max-width: 800px) { .dupe-version { flex-wrap: wrap; } .dupe-text { flex-basis: calc(100% - 60px); } }

.pct-bar { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pct-bar .tune-bar { flex: 1; margin: 0; }
.pct-bar b { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
/* Example songs: a quiet card list, the song name first, folders below. */
.tidy-examples {
  list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px;
  background: #ffffff04; overflow: hidden; font-size: 12.5px; max-height: 420px; overflow-y: auto;
}
.tidy-examples li { display: grid; gap: 3px; padding: 10px 14px; min-width: 0; }
.tidy-examples li + li { border-top: 1px solid var(--line); }
.tidy-examples li:hover { background: #ffffff06; }
.ex-name { color: var(--text); font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.ex-path { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; color: var(--muted); line-height: 1.45; }
.ex-path i { font-style: normal; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding-top: 2px; }
.ex-path > span { overflow-wrap: anywhere; }
.ex-path b { font-weight: 400; color: var(--faint); margin: 0 6px; }
details.small > summary { color: var(--text); font-weight: 500; padding: 6px 0; }
details.small { margin: 8px 0; }
details.small ul:not(.tidy-examples) { color: var(--muted); padding-left: 20px; margin: 6px 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .tidy-examples { max-height: none; }
  .ex-path { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ex-path i { padding-top: 4px; }
}

/* ---------- in-page "are you sure?" ---------- */

.ask-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: #000a; }
.ask-card { max-width: 460px; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 20px 60px #000c; }
.ask-card p { margin: 0 0 14px; line-height: 1.45; }
.ask-card .row { justify-content: flex-end; }
.ask-card .ask-input { display: block; width: 100%; box-sizing: border-box; margin: 0 0 16px; font: inherit; font-size: 16px; }

/* ---------- promos ---------- */

.promo-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.promo { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.promo-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-edit input[type=date] { width: 9.5em; }
.promo-folder { color: var(--accent); }
.promo-stations { position: relative; }
.promo-stations summary { cursor: pointer; list-style: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; white-space: nowrap; }
.promo-stations summary::-webkit-details-marker { display: none; }
.promo-stations summary::marker { content: ''; }
.promo-stations summary::after { content: ' ▾'; color: var(--muted); }
.promo-stations summary::before { content: none; } /* (the page's other dropdowns have an arrow in front) */
.promo-stations[open] summary { border-color: var(--accent); }
.promo-stations-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: grid; gap: 4px; padding: 10px 12px; min-width: 200px; max-height: 280px; overflow: auto;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow-3); }
@media (max-width: 800px) { .promo-stations-list { position: static; margin-top: 6px; box-shadow: none; } }
.pill.warn { color: var(--warn); }

/* ---------- mobile ---------- */

@media (max-width: 800px) {
  :root { --player-h: 128px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr var(--player-h); grid-template-areas: 'side' 'main' 'player'; }
  .sidebar { padding: 10px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { padding: 4px 0 8px; font-size: 16px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; scrollbar-width: none; }
  .nav button { white-space: nowrap; padding: 6px 12px; }
  .zones-head, .zone-list { display: none; }
  .content { padding: 18px 16px 32px; }
  .view-head input[type=search] { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
  .sidebar { min-width: 0; }
  .player { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 12px; padding: 10px 16px; }
  .np { grid-column: 1; }
  .vol { grid-column: 2; grid-row: 1; }
  .vol input { display: none; }
  .transport { grid-column: 1 / -1; }
  .t-fmt { display: none; }
  .track .icon { opacity: 1; }
  .art.xl { width: 140px; }
  .input-form { grid-template-columns: 1fr; }
  .room-head .vol-inline { margin-left: 0; }
  .dj-deck { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .dj-controls { justify-items: start; }
  .dj-controls label { flex-wrap: wrap; }
  .pod-head { grid-template-columns: 48px minmax(0, 1fr); }
  .pod-head .row { grid-column: 1 / -1; }
  .pod-head img, .pod-head .ph { width: 48px; height: 48px; }
  .ep { grid-template-columns: auto minmax(0, 1fr); }
  .ep > .btn { grid-column: 2; justify-self: start; }
  .books li, .pod-results li { grid-template-columns: 48px minmax(0, 1fr); }
  .books li > .btn, .pod-results li > .btn, .pod-results li > .pill { grid-column: 2; justify-self: start; }
  .books img, .books .ph { width: 48px; height: 48px; }
}

/* ---------- covers & photos status (Library) ---------- */
.art-status { margin-bottom: 14px; }
.art-status summary { cursor: pointer; }
.art-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 0; }
.art-bars > div { display: flex; flex-direction: column; gap: 4px; }
.art-recent { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 2px; }
.art-recent figure { margin: 0; width: 72px; flex: none; text-align: center; }
.art-recent .art { width: 64px; height: 64px; margin: 0 auto; }
.art-recent figcaption { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dupe-section { margin-top: 28px; }

/* =====================================================================
   Finish: one surface language for every view (panels, rows, menus,
   player). Later rules here refine the section rules above.
   ===================================================================== */

/* Surfaces: panels, rooms, cards and boxes share one look. */
.panel, .room, .tune, .callout, .sound-grid, .ask-card, .send-menu, .station, .suggest, .crowd-station, .dj-card {
  border-radius: var(--radius);
}
.panel, .room, .tune {
  background: linear-gradient(180deg, #ffffff07, #ffffff02), var(--panel);
  border: 1px solid var(--line); box-shadow: 0 1px 0 #ffffff08 inset, var(--shadow-1);
}
.panel { padding: 6px 22px 22px; margin-bottom: 18px; }
.panel > h3:first-child, .panel > .dupe-head:first-child, .panel > .taste-head:first-child { margin-top: 18px; }
.panel > summary, details.panel > summary { padding: 14px 0 4px; }
details.panel:not([open]) { padding-bottom: 10px; }
details summary { cursor: pointer; color: var(--muted); list-style: none; transition: color var(--fast); }
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: ''; width: 7px; height: 7px; flex: none; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  display: inline-block; vertical-align: 2px; transform: rotate(-45deg); transition: transform var(--fast) var(--ease); margin-right: 10px;
}
details[open] > summary::before { transform: rotate(45deg); }
details summary:hover { color: var(--text); }
.room, .tune { padding: 18px 20px; }
.room { margin-bottom: 16px; transition: border-color var(--fast); }
.room:hover { border-color: var(--line-2); }
.room.grouped { border-left: 3px solid var(--accent); }
.room-name { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.room-name:focus { background: var(--bg-2) !important; }
.tune { margin-bottom: 20px; }
.tune-bar { height: 6px; border-radius: 6px; background: #ffffff14; }
.tune-bar i { border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tune-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--faint); }
.tune-table th, .tune-table td { border-bottom-color: var(--line); padding: 9px 10px 9px 0; }
.callout {
  background: radial-gradient(120% 160% at 0% 0%, #8ea2ff1c, transparent 60%), radial-gradient(120% 160% at 100% 100%, #b58cff14, transparent 60%), var(--panel);
  border: 1px solid #8ea2ff2e; padding: 16px 18px; gap: 12px; box-shadow: var(--shadow-1);
}
.warn-box { border: 1px solid #fbbf2455; background: #fbbf240a; border-radius: var(--radius); padding: 12px 14px; }
.tune.warn-box { border-color: #fbbf2455; }
.away-link { border: 1px dashed #8ea2ff66; background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; }

/* Lists inside panels: hairline dividers, comfortable rows. */
.person, .alarm, .speaker, .ep, .dupe-version, .promo, .backups li { border-top-color: var(--line); }
.speaker { padding: 12px 0; }
.alarm-time { font-weight: 700; letter-spacing: -0.02em; }

/* Pills: one definition (the file had two). */
.pill {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; line-height: 1.6; padding: 1px 9px; border-radius: 999px;
  background: #ffffff0d; color: var(--muted); border: 1px solid var(--line); text-transform: none; letter-spacing: 0.01em; white-space: nowrap;
  justify-self: start; width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; /* (never stretched by a grid) */
}
.pill.playing { background: #4ade801a; color: var(--good); border-color: #4ade8033; }
.pill.grouped { background: var(--accent-soft); color: var(--accent); border-color: #8ea2ff33; }
.pill.warn { color: var(--warn); border-color: #fbbf2440; background: #fbbf2410; }
.rx-status { font-weight: 600; border: 1px solid var(--line); background: #ffffff0a; }
.rx-status.casting { border-color: #4ade8033; }

/* Station, input and suggestion rows. */
.stations { gap: 10px; }
.station, .suggest, .crowd-station {
  background: linear-gradient(180deg, #ffffff06, transparent), var(--panel); border: 1px solid var(--line);
  transition: border-color var(--fast), background var(--fast), transform var(--fast) var(--ease);
}
.station:hover, .suggest:hover, .crowd-station:hover { border-color: var(--line-2); background: linear-gradient(180deg, #ffffff0a, #ffffff02), var(--panel); }
.station-main { color: var(--text); padding: 10px 12px; }
.station-main b { font-weight: 600; }
.station-main small { font-size: 12.5px; }
.suggests { gap: 8px; }
.suggest { padding: 10px 10px 10px 12px; }
.suggest-text b { font-weight: 600; }
.store-links a { font-weight: 500; }

/* AI DJ */
.dj-deck {
  border-radius: var(--r-lg); border: 1px solid #8ea2ff2e; padding: 26px 28px; box-shadow: var(--shadow-2);
  background: radial-gradient(120% 160% at 0% 0%, #8ea2ff2a, transparent 55%), radial-gradient(100% 140% at 100% 100%, #b58cff1f, transparent 60%), var(--panel);
}
.dj-onair h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
/* Station tiles about the size of an album in a music app: several to a row. */
.dj-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.dj-card {
  overflow: hidden; box-shadow: var(--shadow-1);
  background: radial-gradient(130% 120% at 0% 0%, hsl(var(--h) 65% 55% / 0.32), transparent 60%), linear-gradient(160deg, hsl(var(--h) 45% 24% / 0.6), hsl(calc(var(--h) + 40) 45% 14% / 0.4) 70%), var(--panel);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color var(--fast);
}
.dj-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #ffffff26; }
.dj-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 10px 30px #8ea2ff26; }
.dj-play { padding: 18px; }
.dj-play b { font-size: 16.5px; letter-spacing: -0.015em; }
.dj-icon { width: 38px; height: 38px; background: #ffffff1f; box-shadow: 0 0 0 1px #ffffff1a inset; backdrop-filter: blur(6px); }
/* A station with its own logo shows it as a bigger tile; the playing bars sit on top of it. */
/* (Full width, like an album cover; the playing bars sit in its corner.) */
.dj-icon.has-logo {
  position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #0006;
  box-shadow: var(--shadow-2), 0 0 0 1px #ffffff1f inset; margin-bottom: 12px; transition: transform 240ms var(--ease);
}
.dj-card:hover .dj-icon.has-logo { transform: scale(1.015); }
.dj-icon.has-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dj-icon.has-logo .eq { position: absolute; left: 10px; bottom: 10px; padding: 7px 8px; border-radius: 9px; background: #000b; height: auto; box-sizing: content-box; }
.dj-play:has(.has-logo) { padding: 10px 10px 12px; }
.dj-play:has(.has-logo) b { padding-right: 0; font-size: 14.5px; }
.dj-play:has(.has-logo) small { font-size: 12px; }
.dj-icon.has-logo { margin-bottom: 9px; border-radius: 10px; }
/* With a logo, the card's buttons sit in its bottom corner, off the picture. */
.dj-card:has(.has-logo) .dj-tools { top: auto; bottom: 8px; right: 6px; }
.dj-play:has(.has-logo) .dj-meta { padding-right: 34px; }
.dj-card:has(.dj-del) .dj-play:has(.has-logo) .dj-meta { padding-right: 66px; }
.dj-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
.dj-tools .dj-del { position: static; }
.dj-tools .icon { opacity: 0.55; transition: opacity var(--fast), background var(--fast), color var(--fast); }
.dj-card:hover .dj-tools .icon, .dj-tools .icon:focus-visible { opacity: 1; }
@media (hover: none) { .dj-tools .icon { opacity: 0.8; } }
/* The logo window */
.logo-card { max-width: 420px; text-align: center; }
.logo-card h2 { font-size: 22px; margin: 4px 0 8px; overflow-wrap: anywhere; }
.logo-card .row { justify-content: center; margin-top: 18px; }
.logo-card .spacer { flex: 1 1 0; }
.logo-preview {
  width: 160px; height: 160px; margin: 4px auto 18px; border-radius: 28px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(130% 120% at 0% 0%, hsl(var(--h) 65% 55% / 0.4), transparent 60%), linear-gradient(160deg, hsl(var(--h) 45% 26%), hsl(calc(var(--h) + 40) 45% 14%));
  box-shadow: var(--shadow-2), 0 0 0 1px #ffffff1f inset;
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-preview svg { width: 56px; height: 56px; opacity: 0.8; }
@media (max-width: 480px) { .logo-card .spacer { display: none; } .logo-card .row .btn { flex: 1 1 auto; } }

/* Settings tabs */
.settings { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
.settings-tabs { gap: 2px; top: 0; }
.settings-tabs button { border-radius: 12px; padding: 11px 14px; transition: background var(--fast), border-color var(--fast); }
.settings-tabs button b { font-weight: 600; }
.settings-tabs button:hover { background: #ffffff08; }
.settings-tabs button.active { background: linear-gradient(90deg, #8ea2ff1c, #8ea2ff06); border-color: #8ea2ff33; }

/* Titles of a podcast or a duplicate album read as names, not section labels. */
.pod-head h3, .dupe-head h3 { text-transform: none; letter-spacing: -0.01em; font-size: 16px; font-weight: 700; color: var(--text); }

/* Podcasts and books */
.pod-head img, .pod-head .ph, .pod-results img, .pod-results .ph, .books img, .books .ph { border-radius: 10px; box-shadow: var(--shadow-1), 0 0 0 1px #ffffff12; background: linear-gradient(140deg, #2a3040, #151821); }
.pbar { background: #ffffff1a; }
.pbar i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Library status and covers panel */
.art-status summary b, .art-status summary strong { color: var(--text); }
.art-recent figure .art { box-shadow: var(--shadow-1); }

/* Floating menus, dialog, toast */
.send-menu {
  background: #171a22f2; border: 1px solid var(--line-2); box-shadow: var(--shadow-3), 0 1px 0 #ffffff0d inset; padding: 8px;
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); animation: pop-in 180ms var(--ease) both; transform-origin: bottom right;
}
.send-menu button { border-radius: 10px; padding: 10px 12px; transition: background var(--fast); }
.send-menu button:hover { background: #ffffff0f; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.ask-dialog { background: #000000a6; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in 160ms ease both; }
.ask-card { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-3); animation: pop-in 200ms var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.toast {
  background: #f3f4f7; color: #0b0c10; padding: 10px 18px; font-weight: 600; box-shadow: var(--shadow-3); animation: toast-in 240ms var(--ease) both;
  max-width: calc(100vw - 32px); text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.phone-tap { box-shadow: 0 10px 30px #8ea2ff40, var(--shadow-2); }

/* ---------- now-playing bar ---------- */

.player {
  background: linear-gradient(180deg, #12141bf0, #0b0c10f5); border-top: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 -10px 30px #0006; position: relative; z-index: 5; padding: 0 22px;
}
.player::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #8ea2ff55, #b58cff44, transparent); pointer-events: none; }
#np-art .art.sm { width: 58px; border-radius: 10px; box-shadow: var(--shadow-2), 0 0 0 1px #ffffff14 inset; }
.np { gap: 14px; }
.np-title { font-weight: 600; letter-spacing: -0.01em; }
.np-sub { font-size: 12.5px; }
.icon.play { background: #fff; color: #0b0c10; padding: 10px; box-shadow: 0 4px 14px #0008; }
.icon.play:hover:not(:disabled) { background: #fff !important; color: #0b0c10 !important; transform: scale(1.06); }
.icon.play:active:not(:disabled) { transform: scale(0.96); }
.progress { font-size: 11px; color: var(--faint); }
.vol select { border-radius: 999px; padding-top: 6px; padding-bottom: 6px; background-color: #ffffff0a; }

/* ---------- small screens (the iPhone) ---------- */

@media (max-width: 800px) {
  :root { --player-h: calc(148px + env(safe-area-inset-bottom)); }
  h1 { font-size: 26px; }
  h3 { margin-top: 26px; }
  .sidebar {
    padding: calc(10px + env(safe-area-inset-top)) 0 0; border-bottom: 1px solid var(--line);
    background: #0a0b0fe6; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  }
  .brand { padding: 2px 16px 10px; font-size: 17px; }
  .brand-mark { width: 28px; height: 28px; }
  .nav { padding: 0 16px 10px; gap: 6px; }
  .nav button { padding: 6px 12px; gap: 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
  .nav button svg { width: 15px; height: 15px; }
  .nav button.active { background: var(--text); color: var(--bg); border-color: transparent; }
  .nav button.active svg { color: var(--bg); }
  .nav button.active::before { display: none; }
  .content { padding: 20px 16px 36px; }
  .view-head { gap: 12px; margin-bottom: 18px; }
  .view-head .seg { order: 3; }
  .view-head input[type=search] { order: 4; width: 100%; }
  .view-head + .lib-status { margin-top: -8px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; }
  .artist-list { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px 6px; }
  .artist { padding: 8px 4px; gap: 9px; }
  .artist span { font-size: 12.5px; }
  .art.round { font-size: 24px; }
  .album-hero { padding: 18px; gap: 18px; }
  .album-hero h2 { font-size: 28px; }
  .panel { padding: 4px 16px 16px; }
  .room, .tune { padding: 14px 16px; }
  .room-name { width: 100%; }
  .settings { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .settings-tabs button { border-color: var(--line); padding: 7px 14px; }
  .settings-tabs button.active { background: var(--text); border-color: transparent; }
  .settings-tabs button.active b { color: var(--bg); }
  .dj-deck { padding: 18px; }
  .dj-onair h2 { font-size: 22px; }
  /* Album-cover sized: two side by side on a phone, more on a wider screen. */
  .dj-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .dj-play { padding: 12px; }
  .dj-play b { font-size: 14.5px; }
  .dj-play small { font-size: 12px; min-height: 0; }
  .dj-meta { font-size: 11px; }
  .stations, .crowd-stations { grid-template-columns: minmax(0, 1fr); }
  /* Phone player: song on top, then the progress line, then buttons and the room. */
  .player {
    padding: 10px 16px calc(8px + env(safe-area-inset-bottom)); gap: 4px 8px;
    grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; grid-template-areas: 'np np' 'prog prog' 'btns vol';
  }
  .transport { display: contents; }
  .np { grid-area: np; }
  .progress { grid-area: prog; max-width: none; }
  .buttons { grid-area: btns; gap: 2px; }
  .vol { grid-area: vol; gap: 2px; }
  .icon-spacer { display: none; }
  #np-art .art.sm { width: 46px; }
  .vol select { max-width: 116px; min-width: 0; margin-left: 4px; }
  .send-menu, #sleep-menu, .ask-menu { right: 0; max-width: calc(100vw - 32px); }
  .toast { bottom: calc(var(--player-h) + 12px); }
}

.t-fmt:empty { display: none; }

/* Radio: genre buttons under the station search */
.genre-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.genre-chips .chip { appearance: none; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.genre-chips .chip:hover { border-color: var(--accent); background: var(--panel-3); }
.genre-chips .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* Rooms: "Add a speaker to this room" picker, and the labelled room choice on each speaker */
.add-spk { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; padding: 8px 12px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.add-spk svg { width: 18px; height: 18px; flex: none; }
.add-spk select { flex: 1; min-width: 0; font-weight: 600; }
.add-spk-none { margin: 8px 0 12px; }
.spk-room { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }

/* Rooms: another Chorus on the network */
.other-chorus { display: block !important; margin: 0 0 14px; line-height: 1.7; }
.other-chorus > * { display: inline; }
.other-chorus > b:first-child { display: block; margin-bottom: 4px; }
.other-chorus .btn { margin: 0 4px; }

