:root {
  --bg: #e9e9ee;
  --panel: #ffffff;
  --raised: #f2f2f5;
  --raised-2: #e8e8ed;
  --hover: rgba(0, 0, 0, 0.045);
  --press: rgba(0, 0, 0, 0.08);
  --text: #1d1d1f;
  --muted: #626267;
  --faint: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.16);
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 91, 234, 0.1);
  --ok: #1f8a47;
  --amber: #9a5800;
  --amber-soft: rgba(255, 159, 10, 0.14);
  --red: #c4302b;
  --red-soft: rgba(196, 48, 43, 0.1);
  --shadow-pop: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.16);
  --lib-w: 320px;
  --side-w: 360px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101012;
  --panel: #1c1c1e;
  --raised: #262628;
  --raised-2: #303033;
  --hover: rgba(255, 255, 255, 0.06);
  --press: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --accent: #7d97ff;
  --accent-ink: #0d1430;
  --accent-soft: rgba(125, 151, 255, 0.16);
  --ok: #4cd07d;
  --amber: #ffb340;
  --amber-soft: rgba(255, 179, 64, 0.14);
  --red: #ff6961;
  --red-soft: rgba(255, 105, 97, 0.13);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
@media (max-width: 1599px) { :root { --lib-w: 280px; --side-w: 320px; } }
@media (max-width: 1359px) { :root { --lib-w: 256px; --side-w: 300px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Roboto, system-ui, sans-serif; font-size: 14px; line-height: 1.4; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.f { fill: currentColor; stroke: none; }
.mono { font-family: "Roboto Mono", monospace; font-size: 12px; }
.muted { color: var(--muted); }
.link:hover { text-decoration: underline; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.app { height: 100vh; min-height: 640px; display: grid; grid-template-columns: var(--lib-w) minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) 88px; gap: 8px; padding: 8px; }
.app.side-open { grid-template-columns: var(--lib-w) minmax(0, 1fr) var(--side-w); }

/* top bar */
.top { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 8px; }
.top-l { display: flex; align-items: center; gap: 4px; }
.brand { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; margin-right: 16px; border-radius: 4px; }
.nav-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--panel); }
.nav-btn:hover:not(:disabled) { color: var(--text); }
.nav-btn:disabled { opacity: .45; cursor: default; }
.nav-btn svg { width: 18px; height: 18px; }
.mid { display: flex; gap: 8px; align-items: center; }
.round { width: 48px; height: 48px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; color: var(--muted); }
.round:hover, .round.on { color: var(--text); }
.round.on { color: var(--accent); }
.find { width: 480px; height: 48px; border-radius: 24px; background: var(--panel); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; color: var(--muted); }
.find:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.find:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.find input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font-size: 15px; outline: none; }
.find input::placeholder { color: var(--muted); }
.find input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; }
.find .browse { height: 36px; display: grid; place-items: center; padding: 0 10px 0 12px; border-left: 1px solid var(--line); border-radius: 0 18px 18px 0; }
.find .browse:hover, .find .browse.on { color: var(--text); }
.me { justify-self: end; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover, .icon-btn.on { color: var(--text); background: var(--hover); }
.acct { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 999px; margin-left: 6px; }
.acct:hover { background: var(--hover); color: var(--text); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #8ecae6, #2f5bea); color: #fff; display: grid; place-items: center; font-weight: 500; }

/* chips, buttons */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--raised); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { background: var(--raised-2); }
.chip.on { background: var(--text); color: var(--panel); }
.chip svg { width: 14px; height: 14px; }
.btn { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 500; font-size: 13px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--raised-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--red); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }

/* library sidebar */
.lib { background: var(--panel); border-radius: 12px; padding: 14px 8px 0; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: hidden; }
.lib-head { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.lib-head h2 { font-size: 16px; font-weight: 500; }
.lib-head h2 a { display: flex; align-items: center; gap: 10px; color: var(--muted); border-radius: 4px; }
.lib-head h2 a:hover, .lib-head h2 a.on { color: var(--text); }
.lib-head .add { margin-left: auto; height: 32px; display: flex; gap: 6px; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--raised); font-size: 13px; font-weight: 500; }
.lib-head .add:hover { background: var(--raised-2); }
.lib-head .add svg { width: 16px; height: 16px; }
.lib .chips { padding: 0 8px; flex-wrap: nowrap; }
.lib-tools { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 0 2px; color: var(--muted); font-size: 13px; }
.lib-tools .icon-btn { width: 32px; height: 32px; }
.lib-tools .icon-btn svg { width: 18px; height: 18px; }
.lib-filter { flex: 1; margin: 0 8px 0 2px; height: 32px; border: 0; border-radius: 6px; background: var(--raised); padding: 0 10px; font-size: 13px; color: var(--text); }
.lib-filter:focus-visible { outline-offset: 0; }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.sort-btn:hover { color: var(--text); }
.sort-btn svg { width: 14px; height: 14px; }
.lib-list { flex: 1; overflow-y: auto; margin: 0 -8px; padding: 0 8px 8px; scrollbar-width: thin; }
.li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.li:hover { background: var(--hover); }
.li.on { background: var(--press); }
.li:focus-visible { outline-offset: -2px; }
.li .art { width: 48px; height: 48px; border-radius: 6px; }
.li .art.round-art { border-radius: 50%; }
.li b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li.on b, .li.playing b { color: var(--accent); }
.li span { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .pin { color: var(--accent); width: 16px; height: 16px; }
.li .art.mix > span { display: none; }
.li span.eq { display: flex; color: var(--accent); }
.liked { background: linear-gradient(135deg, #2f5bea, #9db4ff); display: grid; place-items: center; color: #fff; }
.liked svg { width: 40%; height: 40%; }

/* main */
.main { background: var(--panel); border-radius: 12px; overflow: hidden; position: relative; container: main / inline-size; min-width: 0; }
.scroll { height: 100%; overflow-y: auto; scrollbar-width: thin; }
.view { padding: 20px 28px 48px; }
h1:focus { outline: none; }
.page-title { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 20px; }
.filters { display: flex; gap: 8px; margin-bottom: 20px; }

.shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@container main (max-width: 900px) { .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sc { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; height: 64px; padding-right: 12px; border-radius: 8px; background: var(--raised); overflow: hidden; font-weight: 500; }
.sc:hover { background: var(--raised-2); }
.sc:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.sc a::after { content: ""; position: absolute; inset: 0; }
.sc a:focus-visible { outline: none; }
.sc .art { width: 64px; height: 64px; border-radius: 0; }
.sc .art.mix > span { display: none; }
.sc .mini-play { position: absolute; right: 12px; top: 14px; z-index: 1; opacity: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.sc:hover .mini-play, .sc:focus-within .mini-play, .sc .mini-play.is-playing { opacity: 1; }

.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 32px 0 12px; }
.row-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.row-head a, .row-head button { font-size: 13px; color: var(--muted); font-weight: 500; border-radius: 4px; }
.row-head a:hover, .row-head button:hover { color: var(--text); text-decoration: underline; }

/* cards: one row per shelf, column count follows the main panel width */
.cards { --n: 7; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; margin: 0 -10px; }
.shelf .card:nth-child(n+8) { display: none; }
@container main (max-width: 1400px) { .cards { --n: 6; } .shelf .card:nth-child(n+7) { display: none; } }
@container main (max-width: 1100px) { .cards { --n: 5; } .shelf .card:nth-child(n+6) { display: none; } }
@container main (max-width: 860px) { .cards { --n: 4; } .shelf .card:nth-child(n+5) { display: none; } }
@container main (max-width: 640px) { .cards { --n: 3; } .shelf .card:nth-child(n+4) { display: none; } }
.cards.wrap { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.card { position: relative; padding: 10px; border-radius: 10px; min-width: 0; }
.card:hover { background: var(--hover); }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.card .art-wrap { position: relative; }
.card .art { aspect-ratio: 1; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.card .art.round-art { border-radius: 50%; }
.card a.title { display: block; font-weight: 500; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card a.title::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.card a.title:focus-visible { outline: none; }
.card small { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; line-height: 1.35; }
.card .play-fab { position: absolute; right: 8px; bottom: 8px; z-index: 1; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.card:hover .play-fab, .card:focus-within .play-fab, .card .play-fab.is-playing { opacity: 1; transform: none; }

.play-fab, .big-play { border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(20, 40, 120, .3); }
.play-fab { width: 48px; height: 48px; }
.play-fab svg { width: 20px; height: 20px; }
.play-fab:hover, .big-play:hover { transform: scale(1.04); filter: brightness(1.06); }
.big-play { width: 56px; height: 56px; }
.big-play svg { width: 24px; height: 24px; }
.mini-play { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.mini-play svg { width: 16px; height: 16px; }

/* page header for playlist / album / artist */
.hero { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; align-items: end; padding: 64px 28px 24px; background: linear-gradient(180deg, rgba(var(--tint), .42), rgba(var(--tint), .12) 70%, transparent); }
.hero .art { width: 232px; height: 232px; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
.hero .art.round-art { border-radius: 50%; }
.hero .kind { font-size: 13px; font-weight: 500; }
.hero h1 { font-size: 72px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; margin: 6px 0 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 2px; }
.hero h1.long { font-size: 48px; }
.hero h1.xlong { font-size: 36px; }
.hero .desc { color: var(--muted); margin-bottom: 8px; max-width: 70ch; }
.hero .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 14px; }
.hero .meta b { font-weight: 500; }
.hero .meta .sep::before { content: "\00b7"; color: var(--muted); }
.hero .meta .muted { color: var(--muted); }
.hero .owner { display: inline-flex; align-items: center; gap: 6px; }
.hero .owner .avatar { width: 22px; height: 22px; font-size: 11px; }
@container main (max-width: 1000px) { .hero { grid-template-columns: 192px minmax(0, 1fr); gap: 24px; } .hero .art { width: 192px; height: 192px; } .hero h1 { font-size: 56px; } .hero h1.long { font-size: 40px; } .hero h1.xlong { font-size: 30px; } }
@container main (max-width: 760px) { .hero { grid-template-columns: 160px minmax(0, 1fr); padding-top: 40px; } .hero .art { width: 160px; height: 160px; } .hero h1 { font-size: 44px; } .hero h1.long { font-size: 32px; } .hero h1.xlong { font-size: 26px; } }

.artist-hero { padding: clamp(56px, 11vh, 120px) 28px 28px; background: linear-gradient(180deg, rgba(var(--tint), .55), rgba(var(--tint), .15) 75%, transparent); position: relative; }
.artist-hero .verified { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.artist-hero h1 { font-size: 88px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin: 8px 0 14px; }
.artist-hero .art { position: absolute; right: 28px; bottom: 28px; width: 160px; height: 160px; border-radius: 50%; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
@container main (max-width: 900px) { .artist-hero h1 { font-size: 60px; } .artist-hero .art { width: 120px; height: 120px; } }

.status-line { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.status-line span { display: inline-flex; align-items: center; gap: 6px; }
.status-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status-line .s-fetch i { background: var(--amber); }
.status-line .s-lossy i { background: none; box-shadow: inset 0 0 0 1.5px var(--muted); }
.status-line .s-missing i { background: var(--faint); }
.status-line button { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; border-radius: 3px; font-size: 13px; }
.status-line button:hover { color: var(--text); }

.pl-bar { display: flex; align-items: center; gap: 16px; padding: 8px 28px 16px; }
.pl-bar .ghost { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; }
.pl-bar .ghost:hover { color: var(--text); }
.pl-bar .ghost.on { color: var(--accent); }
.pl-bar .ghost svg { width: 26px; height: 26px; }
.pl-bar .follow { height: 32px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 500; }
.pl-bar .follow:hover { box-shadow: inset 0 0 0 1px var(--text); }
.pl-bar .spacer { flex: 1; }
.pl-bar .view-tog { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }

/* track rows */
.tracks { padding: 0 20px 40px; }
.tr { display: grid; grid-template-columns: 36px minmax(0, 1.6fr) minmax(0, 1fr) 128px 84px; gap: 16px; align-items: center; height: 56px; padding: 0 12px 0 8px; border-radius: 6px; position: relative; }
.tracks.no-album .tr { grid-template-columns: 36px minmax(0, 1fr) 84px; }
.tracks.no-album .tr .al, .tracks.no-album .tr .da { display: none; }
.tr:not(.h):hover { background: var(--hover); }
.tr.sel { background: var(--press); }
.tr:focus-visible { outline-offset: -2px; }
.tr.h { height: 36px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 8px; position: sticky; top: 0; background: var(--panel); z-index: 2; }
.tr.h .d svg { width: 16px; height: 16px; }
.tr .n { display: grid; place-items: center end; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr .n .pi { display: none; width: 16px; height: 16px; color: var(--text); }
.tr:not(.h):hover .n .num, .tr:focus-visible .n .num, .tr.sel .n .num { display: none; }
.tr:not(.h):hover .n .pi, .tr:focus-visible .n .pi, .tr.sel .n .pi { display: block; }
.tr.now .n .num { display: none; }
.tr.now .n .eq { display: flex; }
.tr.now:hover .n .eq, .tr.now:focus-visible .n .eq, .tr.now.sel .n .eq { display: none; }
.tr .n .eq { display: none; }
.tr .t { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; }
.tracks.no-art .tr .t { grid-template-columns: minmax(0, 1fr); }
.tr .t .art { width: 40px; height: 40px; border-radius: 4px; }
.tr .t .tt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tr .t .tt b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tr .t .by { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tr .t .by a:hover, .tr .al a:hover { color: var(--text); text-decoration: underline; }
.tr .al, .tr .da { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .d { display: flex; justify-content: flex-end; align-items: center; gap: 12px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.tr .d .heart-btn { opacity: 0; }
.tr:hover .d .heart-btn, .tr:focus-within .d .heart-btn, .tr.sel .d .heart-btn { opacity: 1; }
.heart-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.heart-btn:hover { color: var(--text); }
.heart-btn.on { color: var(--accent); }
.heart-btn svg { width: 18px; height: 18px; }
.tr.now .tt b { color: var(--accent); }
.tr.missing .tt b, .tr.missing .al, .tr.missing .by, .tr.missing .d > span { color: var(--faint); }
.tr.missing .art { opacity: .5; }
@container main (max-width: 900px) { .tr { grid-template-columns: 36px minmax(0, 1.5fr) minmax(0, 1fr) 84px; } .tr .da { display: none; } }
@container main (max-width: 640px) { .tr { grid-template-columns: 36px minmax(0, 1fr) 84px; } .tr .al { display: none; } }

.eq { width: 14px; height: 14px; display: flex; align-items: flex-end; gap: 2px; color: var(--accent); }
.eq i { flex: 1; background: currentColor; border-radius: 1px; height: 40%; animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; height: 100%; }
.eq i:nth-child(3) { animation-delay: -.6s; height: 65%; }
.eq.paused i { animation-play-state: paused; }
@keyframes eq { from { height: 25%; } to { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; } .card .play-fab { transition: none; } }

/* exception markers: ordinary lossless tracks get none */
.mark { display: inline-flex; align-items: center; gap: 4px; height: 18px; font-size: 11px; font-weight: 500; line-height: 1; padding: 0 6px; border-radius: 4px; flex: none; white-space: nowrap; }
.mark svg { width: 12px; height: 12px; }
.mark.fetch { color: var(--amber); background: var(--amber-soft); font-variant-numeric: tabular-nums; }
.mark.lossy { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.mark.flag { color: var(--red); background: var(--red-soft); }
.mark.miss { color: var(--muted); background: var(--raised); }
.ring { width: 12px; height: 12px; border-radius: 50%; flex: none; background: conic-gradient(currentColor var(--p), rgba(128, 128, 128, .3) 0); -webkit-mask: radial-gradient(circle 3.5px, transparent 98%, #000); mask: radial-gradient(circle 3.5px, transparent 98%, #000); }

.album-foot { padding: 0 28px 48px; font-size: 13px; color: var(--muted); }
.album-foot p + p { margin-top: 2px; font-size: 12px; }

/* artist page */
.artist-body { padding: 0 28px 48px; }
.artist-body .tracks { padding: 0; margin: 0 -8px; max-width: 1040px; }
.popular .tr { grid-template-columns: 36px minmax(0, 1fr) 140px 84px; }
.popular .tr .plays { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
@container main (max-width: 640px) { .popular .tr { grid-template-columns: 36px minmax(0, 1fr) 84px; } .popular .tr .plays { display: none; } }
.about { display: grid; grid-template-columns: 1fr; max-width: 760px; border-radius: 12px; overflow: hidden; background: var(--raised); margin-top: 8px; }
.about .art { height: 220px; border-radius: 0; }
.about div { padding: 18px 20px; }
.about b { font-size: 16px; font-weight: 500; display: block; margin-bottom: 6px; }
.about p { color: var(--muted); max-width: 70ch; }

/* search */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.cat { position: relative; aspect-ratio: 1.6; border-radius: 10px; overflow: hidden; padding: 16px; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; display: block; }
.cat .art { position: absolute; right: -14px; bottom: -8px; width: 40%; aspect-ratio: 1; border-radius: 6px; transform: rotate(24deg); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.cat:hover { filter: brightness(1.06); }
.cat span { position: relative; z-index: 1; display: block; max-width: 72%; line-height: 1.15; }
.recent { display: flex; gap: 8px; flex-wrap: wrap; }
.recent a { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 0; border-radius: 6px; background: var(--raised); font-weight: 500; overflow: hidden; }
.recent a:hover { background: var(--raised-2); }
.recent .art { width: 48px; height: 48px; }
.recent .art.round-art { border-radius: 50%; }
.res-top { display: grid; grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr); gap: 24px; }
@container main (max-width: 900px) { .res-top { grid-template-columns: 1fr; } }
.top-card { position: relative; padding: 20px; border-radius: 10px; background: var(--raised); min-height: 236px; display: flex; flex-direction: column; gap: 14px; }
.top-card:hover { background: var(--raised-2); }
.top-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.top-card .art { width: 100px; height: 100px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.top-card .art.round-art { border-radius: 50%; }
.top-card a.title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-card a.title::after { content: ""; position: absolute; inset: 0; }
.top-card a.title:focus-visible { outline: none; }
.top-card small { color: var(--muted); font-size: 14px; }
.top-card small b { color: var(--text); font-weight: 500; }
.top-card .play-fab { position: absolute; right: 20px; bottom: 20px; z-index: 1; }
.res-songs .tracks { padding: 0; margin: 0 -8px; }
.res-songs .tr { height: 56px; grid-template-columns: minmax(0, 1fr) 84px; }
.res-songs .tr .n, .res-songs .tr .al, .res-songs .tr .da { display: none; }
.empty { padding: 80px 0; text-align: center; color: var(--muted); }
.empty b { display: block; font-size: 20px; color: var(--text); font-weight: 700; margin-bottom: 6px; }

/* library page */
.lib-page-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.lib-page-bar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--raised); border-radius: 999px; padding: 3px; }
.seg button { width: 34px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.select { height: 32px; border: 0; border-radius: 999px; background: var(--raised); padding: 0 30px 0 14px; font-size: 13px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: right 15px top 14px, right 10px top 14px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.select:hover { background-color: var(--raised-2); }
.text-in { height: 32px; border: 0; border-radius: 999px; background: var(--raised); padding: 0 14px; font-size: 13px; width: 220px; }
.text-in::placeholder { color: var(--muted); }
.lib-table .row { display: grid; grid-template-columns: 48px minmax(0, 2fr) minmax(0, 1fr) 140px 120px; gap: 16px; align-items: center; height: 64px; padding: 0 12px 0 8px; border-radius: 8px; position: relative; }
.lib-table .row:not(.h):hover { background: var(--hover); }
.lib-table .row.h { height: 36px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 8px; }
.lib-table .row .art { width: 48px; height: 48px; border-radius: 6px; }
.lib-table .row .art.round-art { border-radius: 50%; }
.lib-table .row .art.mix > span { display: none; }
.lib-table .row a.title { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-table .row a.title::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.lib-table .row a.title:focus-visible { outline: none; }
.lib-table .row:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.lib-table .row span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-table .row .ready { display: flex; align-items: center; gap: 6px; }
@container main (max-width: 900px) { .lib-table .row { grid-template-columns: 48px minmax(0, 2fr) minmax(0, 1fr) 120px; } .lib-table .row .c-date { display: none; } }

/* lyrics */
.lyrics { min-height: 100%; padding: 48px 56px 80px; background: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, .42)), rgb(var(--tint)); color: #fff; }
.lyrics .note { font-size: 13px; opacity: .8; margin-bottom: 28px; display: flex; align-items: center; gap: 8px; }
.lyrics p { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; color: rgba(255, 255, 255, .55); max-width: 24ch; }
.lyrics p.cur { color: #fff; }
.lyrics p.past { color: rgba(255, 255, 255, .78); }
.lyrics .src { margin-top: 40px; font-size: 13px; opacity: .8; }

/* settings */
.settings { max-width: 820px; }
.set-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.set-sec { padding: 28px 0 8px; border-bottom: 1px solid var(--line); }
.set-sec:last-child { border-bottom: 0; }
.set-sec > h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 4px; }
.set-sec > p { color: var(--muted); margin-bottom: 14px; max-width: 70ch; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 14px 0; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row label, .set-row .lbl { font-weight: 500; display: block; }
.set-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.set-row .select { min-width: 200px; }
.acct-card { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px; background: var(--raised); }
.acct-card .avatar { width: 56px; height: 56px; font-size: 22px; }
.acct-card .who { flex: 1; min-width: 0; }
.acct-card .who b { font-size: 16px; font-weight: 500; display: block; }
.acct-card .who > span { color: var(--muted); font-size: 13px; display: block; }
.acct-card .acts { display: flex; gap: 8px; }
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc { display: grid; grid-template-columns: 24px 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px 12px 8px; border-radius: 12px; background: var(--raised); }
.svc .handle { color: var(--faint); display: grid; place-items: center; height: 40px; border-radius: 6px; }
.svc .handle svg { width: 18px; height: 18px; stroke-width: 3; }
.svc .logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.svc .nm { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.svc .nm .prio { font-size: 11px; color: var(--muted); font-weight: 500; padding: 2px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-2); }
.svc .sub { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 2px; }
.svc .acts { display: flex; gap: 8px; align-items: center; }
.svc .key { font-family: "Roboto Mono", monospace; font-size: 12px; color: var(--muted); margin-right: 8px; }
@container main (max-width: 760px) { .svc .key { display: none; } }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--amber); }
.pill.warn i { background: var(--amber); }
.pill.off { color: var(--muted); }
.pill.off i { background: var(--faint); }
.src-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 150px auto; gap: 16px; align-items: center; padding: 12px 0; }
.src-row + .src-row { border-top: 1px solid var(--line); }
.src-row .nm { font-weight: 500; }
.src-row .text-in { width: 100%; border-radius: 8px; font-family: "Roboto Mono", monospace; font-size: 12px; }
.src-row .text-in:disabled { color: var(--muted); }
.out-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 20px; padding: 16px; border-radius: 12px; background: var(--raised); font-size: 13px; }
.out-grid dt { color: var(--muted); }
.out-grid dd b { font-weight: 500; }
.rates { display: flex; flex-wrap: wrap; gap: 6px; }
.rates span { font-family: "Roboto Mono", monospace; font-size: 11px; padding: 2px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.rates span.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.radios { display: flex; gap: 8px; }

/* switch */
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--raised-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); box-shadow: none; }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch span, .switch span::after { transition: none; } }

/* right panel */
.side { background: var(--panel); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.side-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 10px 8px 16px; }
.side-top b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-top .icon-btn { width: 32px; height: 32px; flex: none; }
.side-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.side .cover { width: 100%; aspect-ratio: 1; border-radius: 10px; flex: none; }
.side.dbg-open .cover { width: 160px; align-self: center; }
.side .np-title { display: flex; align-items: flex-start; gap: 8px; }
.side .np-title > div { flex: 1; min-width: 0; }
.side h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.side h3 a:hover, .side .by a:hover { text-decoration: underline; }
.side .by { color: var(--muted); margin-top: 2px; }
.side .np-title .heart-btn { margin-top: 2px; }
.side .np-title .heart-btn svg { width: 22px; height: 22px; }
.side-card { border-radius: 10px; background: var(--raised); padding: 14px; }
.side-card h4 { font-size: 13px; font-weight: 500; margin-bottom: 10px; display: flex; justify-content: space-between; }
.side-card h4 a, .side-card h4 button { color: var(--muted); font-size: 12px; font-weight: 500; border-radius: 4px; }
.side-card h4 a:hover, .side-card h4 button:hover { color: var(--text); text-decoration: underline; }
.qi { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 4px; margin: 0 -4px; border-radius: 6px; width: calc(100% + 8px); text-align: left; }
.qi:hover { background: var(--hover); }
.qi:focus-visible { outline-offset: -2px; }
.qi .art { width: 40px; height: 40px; border-radius: 4px; }
.qi .art.mix > span { display: none; }
.qi b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi.now b { color: var(--accent); }
.qi span.by { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-h { font-size: 15px; font-weight: 700; margin: 6px 0 2px; }
.queue-h small { font-weight: 400; color: var(--muted); font-size: 13px; }
.artist-card { border-radius: 10px; background: var(--raised); overflow: hidden; }
.artist-card .art { height: 140px; border-radius: 0; }
.artist-card div.txt { padding: 12px 14px 14px; }
.artist-card b { font-weight: 500; display: block; }
.artist-card span { color: var(--muted); font-size: 13px; }

details.debug { border-radius: 10px; background: var(--raised); flex: none; }
details.debug summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px; cursor: pointer; font-weight: 500; border-radius: 10px; }
details.debug summary:hover { background: var(--hover); }
details.debug summary:focus-visible { outline-offset: -2px; }
details.debug summary::-webkit-details-marker { display: none; }
details.debug summary .ic { width: 18px; height: 18px; color: var(--muted); }
details.debug summary .sum-fmt { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
details.debug summary .chev { transition: transform .15s; width: 16px; height: 16px; color: var(--muted); }
details.debug[open] summary .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { details.debug summary .chev { transition: none; } }
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 9px 12px; padding: 4px 14px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv dd small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; font-family: Roboto, system-ui, sans-serif; }
.kv dd.mono small { font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.dot.amber { background: var(--amber); }
.dot.red { background: var(--red); }
.dot.grey { background: var(--faint); }
.radio-row { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; cursor: pointer; }
.radio-row input { appearance: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--faint); flex: none; margin: 0; cursor: pointer; background: var(--panel); }
.radio-row input:checked { box-shadow: inset 0 0 0 5px var(--accent); }
.radio-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tag { font-size: 10px; font-weight: 500; padding: 1px 5px; border-radius: 3px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); text-transform: uppercase; letter-spacing: .03em; }
.searching { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 8px; }

/* player bar */
.player { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 36vw, 640px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 0 12px 0 8px; }
.np { display: flex; gap: 14px; align-items: center; min-width: 0; }
.np .art { width: 60px; height: 60px; border-radius: 6px; flex: none; }
.np .art.mix > span { display: none; }
.np .meta { min-width: 0; }
.np b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np b a:hover, .np .by a:hover { text-decoration: underline; }
.np .by { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ctrl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ctrl .btns2 { display: flex; gap: 14px; align-items: center; color: var(--muted); }
.ctrl .cb { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); position: relative; }
.ctrl .cb:hover { color: var(--text); }
.ctrl .cb.main-btn { color: var(--text); }
.ctrl .cb.on { color: var(--accent); }
.ctrl .cb.on::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.ctrl .pp { width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--panel); display: grid; place-items: center; }
.ctrl .pp:hover { transform: scale(1.05); }
.ctrl .pp svg { width: 18px; height: 18px; }
.scrub { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; align-items: center; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrub span:first-child { text-align: right; }
.range { --v: 0%; appearance: none; width: 100%; height: 16px; background: none; cursor: pointer; margin: 0; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--text) var(--v), var(--line-2) var(--v)); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--text) var(--v), var(--line-2) var(--v)); }
.range::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: var(--text); opacity: 0; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); opacity: 0; }
.range:hover::-webkit-slider-runnable-track, .range:focus-visible::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--v), var(--line-2) var(--v)); }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb, .range:focus-visible::-moz-range-thumb { opacity: 1; }
.range:focus-visible { outline-offset: 1px; border-radius: 4px; }
.range.waiting::-webkit-slider-runnable-track { background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 10px); }
.right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; color: var(--muted); min-width: 0; }
.right .icon-btn { width: 32px; height: 32px; flex: none; }
.right .icon-btn.on { color: var(--accent); background: none; }
.right .icon-btn.on::after { content: ""; position: absolute; }
.right .device { color: var(--accent); }
.vol { width: 96px; flex: none; }
.vol .range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--muted) var(--v), var(--line-2) var(--v)); }
@media (max-width: 1359px) { .vol { width: 72px; } }
.q { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin-right: 6px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.q:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.q > i:not(.ring) { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.q.lossy > i:not(.ring) { background: var(--amber); }
.q.flag svg { color: var(--red); }
.q.fetch { color: var(--amber); }
.q.open { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.q svg { width: 12px; height: 12px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 108px; transform: translate(-50%, 12px); background: var(--text); color: var(--panel); padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; box-shadow: var(--shadow-pop); max-width: 520px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* menu (sort) */
.menu { position: fixed; z-index: 10; min-width: 200px; padding: 6px; border-radius: 10px; background: var(--panel); box-shadow: var(--shadow-pop); }
.menu h5 { font-size: 11px; font-weight: 500; color: var(--muted); padding: 6px 10px 4px; }
.menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 34px; padding: 0 10px; border-radius: 6px; font-size: 13px; text-align: left; }
.menu button:hover { background: var(--hover); }
.menu button:focus-visible { outline-offset: -2px; }
.menu button.on { color: var(--accent); }
.menu button svg { width: 16px; height: 16px; }

/* artwork */
.art { background-color: var(--raised); flex: none; }
:root[data-theme="dark"] .art { outline: 1px solid rgba(255, 255, 255, .08); outline-offset: -1px; }
.a1 { background: radial-gradient(circle at 30% 30%, #ffe08a, transparent 40%), radial-gradient(circle at 70% 60%, #f26b3a, transparent 45%), linear-gradient(135deg, #2b1840, #0d0b1e); }
.a2 { background: linear-gradient(160deg, #1b1b1b 0 45%, #c9a227 45% 47%, #1b1b1b 47%); }
.a3 { background: radial-gradient(circle at 50% 50%, #e8e2d5 0 18%, #8a7f6a 19% 20%, #e8e2d5 21% 34%, #3b3a36 35%); }
.a4 { background: conic-gradient(from 210deg, #ff4d6d, #ffb703, #8ecae6, #219ebc, #ff4d6d); }
.a5 { background: linear-gradient(180deg, #9fc5d6 0 55%, #3d6b5a 55% 70%, #23392f 70%); }
.a6 { background: repeating-linear-gradient(90deg, #111 0 6px, #e63946 6px 9px, #111 9px 18px); }
.a7 { background: radial-gradient(circle at 50% 120%, #f7c873, #d1495b 45%, #2e1f47 80%); }
.a8 { background: linear-gradient(135deg, #e0e0e0, #8d99ae 50%, #2b2d42); }
.a9 { background: radial-gradient(ellipse at 20% 80%, #b7e4c7, transparent 50%), linear-gradient(200deg, #1b4332, #081c15); }
.a10 { background: linear-gradient(90deg, #f1faee 0 33%, #a8dadc 33% 66%, #457b9d 66%); }
.a11 { background: radial-gradient(circle at 60% 40%, #ffd6a5 0 12%, transparent 13%), linear-gradient(170deg, #ff9b71, #6d214f); }
.a12 { background: linear-gradient(0deg, #0b090a, #3d0c11 60%, #a4161a); }
.a13 { background: radial-gradient(circle at 50% 45%, #f8f9fa 0 22%, transparent 23%), linear-gradient(135deg, #343a40, #000); }
.a14 { background: repeating-radial-gradient(circle at 50% 50%, #ffd166 0 6px, #ef476f 6px 12px, #073b4c 12px 18px); }
.a15 { background: radial-gradient(circle at 50% 50%, #ffffff 0 4%, #9db4ff 5% 14%, transparent 15%), radial-gradient(circle at 50% 50%, #304a9e, #0b1230 70%); }
.a16 { background: linear-gradient(180deg, #efe6cf 0 62%, #a0967a 62% 64%, #efe6cf 64%); }
.a17 { background: linear-gradient(135deg, #ff5f8f 0 25%, #ffb36b 25% 50%, #7bd6c8 50% 75%, #6b7bff 75%); }
.a18 { background: radial-gradient(circle at 70% 30%, #fff3d6 0 14%, transparent 15%), linear-gradient(180deg, #c4a06e, #6e5537); }
.a19 { background: radial-gradient(circle at 35% 40%, #8ec5ff, transparent 35%), radial-gradient(circle at 65% 60%, #ff8fb1, transparent 38%), #1d2a4a; }
.a20 { background: repeating-linear-gradient(45deg, #c8783c 0 10px, #e9b97a 10px 20px); }
.a21 { background: radial-gradient(circle at 50% 50%, #e7d7f2 0 30%, #b496c8 31% 46%, #3a2d48 47%); }
.a22 { background: linear-gradient(180deg, #3c3c46 0 50%, #1c1c22 50%), #222; }
.a23 { background: radial-gradient(circle at 70% 30%, #e8e8f0 0 7%, transparent 8%), linear-gradient(180deg, #0e1430, #28325a); }
.a24 { background: linear-gradient(90deg, #c8aa5a 0 50%, #8b5d2e 50%); }
.a25 { background: radial-gradient(circle at 50% 60%, #ffd2a8, #d7784f 50%, #5a2e2a); }
.a26 { background: linear-gradient(135deg, #78aa8c, #e2efe0 50%, #78aa8c); }
.p1 { background: radial-gradient(circle at 40% 35%, #f4d6c6 0 20%, #b56576 21% 45%, #355070 46%); }
.p2 { background: radial-gradient(circle at 50% 40%, #e9c46a 0 22%, #2a9d8f 23% 50%, #264653 51%); }
.p3 { background: radial-gradient(circle at 55% 35%, #cdb4db 0 22%, #6d597a 23% 50%, #1d1a2f 51%); }
.p4 { background: radial-gradient(circle at 45% 40%, #ffd6a5 0 22%, #e76f51 23% 50%, #3d2c2e 51%); }
.art.mix { container-type: inline-size; position: relative; overflow: hidden; display: flex; align-items: flex-end; color: #fff; }
.art.mix > span { padding: 0 9cqw 9cqw; font-size: 13cqw; font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; white-space: pre-line; text-shadow: 0 1px 8px rgba(0, 0, 0, .2); }
.art.mix::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5cqw; background: rgba(255, 255, 255, .85); }
.mx-dw { background: radial-gradient(circle at 70% 25%, #9db4ff 0 18%, transparent 19%), linear-gradient(160deg, #3a59c9, #19225a); }
.mx-rr { background: radial-gradient(circle at 75% 28%, transparent 0 12%, rgba(255,255,255,.35) 12.5% 13.5%, transparent 14% 22%, rgba(255,255,255,.25) 22.5% 23.5%, transparent 24%), linear-gradient(160deg, #e0824f, #8a2f3c); }
.mx-1 { background: radial-gradient(circle at 70% 30%, #cdb4db 0 16%, transparent 17%), linear-gradient(160deg, #5a5f73, #1f2130); }
.mx-2 { background: radial-gradient(circle at 70% 30%, #f4d6c6 0 16%, transparent 17%), linear-gradient(160deg, #3d7a5c, #12291e); }
.mx-3 { background: radial-gradient(circle at 70% 30%, #ffd6a5 0 16%, transparent 17%), linear-gradient(160deg, #e2724a, #6d214f); }
.mx-4 { background: radial-gradient(circle at 70% 30%, #e8e2d5 0 16%, transparent 17%), linear-gradient(160deg, #9a8e74, #3b3a36); }
.mx-or { background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.9) 0 6%, transparent 7%), linear-gradient(160deg, #d1495b, #2e1f47); }

/* real data */
.art.img { background-size: cover; background-position: center; }
.tracks.no-date .tr { grid-template-columns: 36px minmax(0, 1.6fr) minmax(0, 1fr) 84px; }
.tracks.no-date .tr .da { display: none; }
@container main (max-width: 640px) { .tracks.no-date .tr { grid-template-columns: 36px minmax(0, 1fr) 84px; } }
.player.idle .ctrl, .player.idle .right { opacity: .45; pointer-events: none; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.loading b { display: block; font-size: 20px; color: var(--text); font-weight: 700; margin-bottom: 6px; }

/* ---- signed out: the welcome screen fills the window */
body.signed-out .top, body.signed-out .lib, body.signed-out .side, body.signed-out .player, body.signed-out .tabbar { display: none !important; }
body.signed-out .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body.signed-out .main { grid-column: 1 / -1; }
.welcome { min-height: 100%; display: grid; place-items: center; padding: 48px 24px; background: radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 60%); }
.welcome-in { width: 100%; max-width: 440px; text-align: center; }
.welcome-mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(47, 91, 234, .35); }
.welcome-mark svg { width: 30px; height: 30px; margin-left: 3px; }
.welcome h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.welcome .lede { color: var(--muted); font-size: 16px; margin: 10px auto 28px; max-width: 34ch; }
.welcome-err { color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 10px 14px; margin: -8px 0 20px; font-size: 13px; text-align: left; }
.welcome-btns { display: grid; gap: 10px; }
.btn.big { height: 52px; font-size: 15px; font-weight: 500; gap: 10px; }
.btn.qobuz { background: var(--text); color: var(--panel); }
.btn.qobuz:hover { filter: brightness(1.15); }
.btn.spotify { background: #1ed760; color: #000; }
.btn.spotify:hover { filter: brightness(1.06); }
.btn.disabled { opacity: .45; cursor: not-allowed; }
.logo-q { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--text); font-weight: 700; font-size: 13px; }
.logo-s { width: 22px; height: 22px; border-radius: 50%; background: #000; position: relative; }
.logo-s::before, .logo-s::after { content: ""; position: absolute; left: 5px; right: 5px; height: 2px; border-radius: 2px; background: #1ed760; top: 7px; transform: rotate(-6deg); }
.logo-s::after { top: 12px; left: 6px; right: 6px; }
.welcome-how { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; text-align: left; margin-top: 32px; padding: 18px; border-radius: 14px; background: var(--panel); font-size: 13px; }
.welcome-how dt { font-weight: 500; }
.welcome-how dd { color: var(--muted); }

/* ---- banners on the home page */
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 16px; border-radius: 12px; background: var(--accent-soft); }
.banner.warn { background: var(--amber-soft); }
.banner > div { flex: 1; min-width: 0; }
.banner b { display: block; font-weight: 500; }
.banner span:not(.spin) { color: var(--muted); font-size: 13px; }
.banner > svg { color: var(--amber); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

.mark.hires { color: var(--accent); background: var(--accent-soft); }
.chip-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--line-2); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.radios.col { flex-direction: column; gap: 2px; padding-bottom: 12px; }
.checks { display: grid; gap: 8px; margin-bottom: 14px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.checks li svg { margin-top: 1px; }
.checks li.ok svg { color: var(--ok); }
.checks li.bad svg { color: var(--red); }
.checks b { display: block; font-weight: 500; }
.checks span { color: var(--muted); }
.mini-prog { display: none; }
.tabbar { display: none; }
.lib-page .chips { margin-bottom: 12px; }
.lib-page .lib-list { margin: 0; padding: 0; overflow: visible; }

/* ---- phones: a tab bar, a floating mini player, and now playing full screen */
@media (max-width: 760px) {
  body { overflow: hidden; }
  .app { height: 100dvh; min-height: 0; padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto minmax(0, 1fr); padding-top: env(safe-area-inset-top); }
  .top { grid-template-columns: minmax(0, 1fr); padding: 8px 12px; gap: 8px; }
  .top-l, .me, .round, .find .browse { display: none; }
  .mid { width: 100%; }
  .find { width: 100%; height: 44px; }
  body:not(.on-search) .top { display: none; }
  .lib { display: none; }
  .main { border-radius: 0; grid-column: 1; }
  .scroll { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
  .view { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; padding-top: 24px; }
  .hero .art { width: min(60vw, 240px); height: min(60vw, 240px); }
  .hero h1, .hero h1.long, .hero h1.xlong { font-size: 26px; }
  .hero .meta, .hero .status-line { justify-content: center; }
  .cards { --n: 2 !important; }
  .shelf .card:nth-child(n+3) { display: none; }
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tr { grid-template-columns: minmax(0, 1fr) 56px !important; }
  .tr .n, .tr .al, .tr .da, .tr.h { display: none !important; }
  .set-row { grid-template-columns: 1fr; gap: 10px; }
  .row-btns { justify-content: flex-start; }
  .out-grid { grid-template-columns: 1fr 1fr; }

  .tabbar { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--muted); padding: 4px 0; border-radius: 12px; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--accent); }

  /* the player bar becomes a pill above the tabs */
  .player { position: fixed; z-index: 31; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); height: 60px; display: flex; gap: 10px; padding: 0 6px 0 8px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-pop); overflow: hidden; }
  .player.empty { display: none; }
  .player .np { flex: 1; min-width: 0; }
  .player .np .art { width: 44px; height: 44px; }
  .player .ctrl { flex: none; }
  .player .btns2 .cb, .player .scrub, .player .right > :not(.q) { display: none; }
  .player .right { flex: none; }
  .player .right .q { margin: 0; }
  .player .pp { width: 40px; height: 40px; }
  .mini-prog { display: block; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--line); border-radius: 1px; }
  .mini-prog i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 1px; }
  .toast { bottom: calc(136px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }

  /* now playing and the queue cover the screen */
  .side { position: fixed; z-index: 40; inset: 0; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  body.side-full .player { z-index: 41; bottom: calc(12px + env(safe-area-inset-bottom)); height: auto; flex-direction: column; align-items: stretch; padding: 12px 16px; background: transparent; box-shadow: none; }
  body.side-full .player .np { display: none; }
  body.side-full .player .ctrl { width: 100%; }
  body.side-full .player .btns2 .cb, body.side-full .player .scrub { display: flex; }
  body.side-full .player .btns2 { justify-content: space-between; }
  body.side-full .player .right { display: flex; justify-content: center; }
  body.side-full .player .right > :not(.q):not(#queueBtn):not(#npvBtn) { display: none; }
  body.side-full .player .right > #queueBtn, body.side-full .player .right > #npvBtn { display: grid; }
  body.side-full .mini-prog { display: none; }
  body.side-full .side-body { padding-bottom: 200px; }
  body.side-full .tabbar { display: none; }
}

.svc.no-handle { grid-template-columns: 40px minmax(0, 1fr) auto; padding-left: 16px; }
.svc .logo.qobuz { background: var(--text); color: var(--panel); }
.svc .logo.spotify { background: #1ed760; }
.svc .logo .logo-s { width: 24px; height: 24px; }
.settings .set-nav { position: sticky; top: -20px; z-index: 2; background: var(--panel); padding: 8px 0; margin: -8px 0 0; }
@media (max-width: 760px) { .svc.no-handle { grid-template-columns: 40px minmax(0, 1fr); } .svc .acts { grid-column: 2; } .acct-card { flex-wrap: wrap; } }

.m-avatar { display: none !important; }
@media (max-width: 760px) {
  .m-avatar { display: grid !important; width: 32px; height: 32px; font-size: 14px; }
  .filters.chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; }
  /* home shelves scroll sideways, as in Spotify's app */
  .home .cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; gap: 12px; margin: 0 -16px; padding: 0 16px; }
  .home .cards::-webkit-scrollbar { display: none; }
  .home .cards .card { flex: 0 0 38vw; scroll-snap-align: start; padding: 0; display: block !important; }
  .home .cards .card:hover { background: none; }
  .home .row-head { margin-top: 24px; }
  .home .row-head h2 { font-size: 20px; }
}

.pl-bar .dl.on { color: var(--accent); }
.dl-prog { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* hearts and the more button on songs, as in Spotify: shown on hover, a saved heart always */
.tr .d { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.tr .heart, .tr .more { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); opacity: 0; flex: none; }
.tr .heart svg, .tr .more svg { width: 18px; height: 18px; }
.tr:hover .heart, .tr:hover .more, .tr:focus-within .heart, .tr:focus-within .more, .tr .heart.on { opacity: 1; }
.heart.on { color: var(--accent) !important; }
.tr .heart:hover, .tr .more:hover { color: var(--text); }
.pl-bar .heart { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; }
.pl-bar .heart svg { width: 28px; height: 28px; }
.pl-bar .heart:hover { color: var(--text); }
.np { position: relative; }
#npHeart .heart { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }
#npHeart .heart svg { width: 18px; height: 18px; }
.btn.follow { height: 32px; padding: 0 16px; margin-top: 10px; }
.btn.follow.on { box-shadow: inset 0 0 0 1px var(--text); }
.menu button svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.menu button { display: flex; align-items: center; gap: 10px; }
.popular.short .tr:nth-child(n+6) { display: none; }
.see-more { color: var(--muted); font-weight: 500; font-size: 13px; padding: 8px 16px; }
.see-more:hover { color: var(--text); }
.view-sec { padding: 0 28px; }
.hero.artist .art { border-radius: 50%; }
@media (pointer: coarse) { .tr .more { opacity: 1; } }
@media (max-width: 760px) { .view-sec { padding: 0 16px; } #npHeart { display: none; } }
.menu button[data-mi] { justify-content: flex-start; }
.pl-bar .btn.follow { width: auto; height: 32px; padding: 0 16px; margin: 0 4px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.pl-bar .btn.follow.on { box-shadow: inset 0 0 0 1px var(--text); }

.dj-card { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin: 4px 0 16px; border-radius: 14px; background: linear-gradient(120deg, rgba(47, 91, 234, .18), rgba(209, 73, 91, .18)); }
.dj-card > div:nth-child(2) { flex: 1; min-width: 0; }
.dj-card b { display: block; font-size: 18px; font-weight: 700; }
.dj-card span { color: var(--muted); font-size: 13px; }
.dj-art { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2f5bea, #d1495b); flex: none; }
.dj-card .big-play { width: 48px; height: 48px; }
.dj-line p { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 6px; }

.art.dj { background: linear-gradient(135deg, #2f5bea, #d1495b); display: grid; place-items: center; color: #fff; font-weight: 700; container-type: inline-size; }
.art.dj span { font-size: 34cqw; letter-spacing: -0.02em; }
