:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --surface: #18181b;
  --surface-2: #222226;
  --surface-3: #2c2c31;
  --line: #2a2a2f;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --faint: #78716c;
  --accent: #ff8a3d;
  --accent-2: #ffa766;
  --accent-ink: #1c0c02;
  --danger: #f87171;
  --radius: 8px;
  --tabs-h: 58px;
  --mini-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --page-bg: var(--bg);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; min-height: 100vh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { flex: none; }

/* ---------- shell ---------- */
#main { min-height: 100vh; padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); }
body.has-player #main { padding-bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 24px); }
#view { max-width: 1400px; margin: 0 auto; }
#sidebar { display: none; }

#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; justify-content: space-around; align-items: stretch;
  background: linear-gradient(to top, rgba(11,11,12,.98) 55%, rgba(11,11,12,.8));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; color: var(--muted); font-weight: 500; }
.tab.active { color: var(--text); }

/* ---------- page bits ---------- */
.page { padding: calc(var(--safe-t) + 14px) 16px 8px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.topbar h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.muted { color: var(--muted); }
.icon-btn.on { color: var(--accent); }

.section { margin: 26px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.section-head h2 { font-size: 20px; font-weight: 750; letter-spacing: -.015em; margin: 0; }
.section-head a, .link { color: var(--muted); font-size: 13px; font-weight: 600; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; }
.chip.active { background: var(--accent); color: var(--accent-ink); }

/* quick tiles */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 6px; overflow: hidden;
  height: 56px; padding-right: 8px; font-size: 13px; font-weight: 700; line-height: 1.2; }
.tile .cover { width: 56px; height: 56px; border-radius: 0; }
.tile span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile:active { background: var(--surface-2); }

/* horizontal cards */
.hscroll { display: flex; gap: 14px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.card { flex: none; width: 140px; scroll-snap-align: start; }
.card .cover { width: 140px; height: 140px; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.card.round .cover { border-radius: 50%; }
.card.round { text-align: center; }
.card-title { margin-top: 8px; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
.grid .card { width: auto; }
.grid .card .cover { width: 100%; height: auto; aspect-ratio: 1; }

.cover { background: var(--surface-2); object-fit: cover; }
.cover.ph { display: grid; place-items: center; color: var(--faint); }
.liked-art { background: linear-gradient(135deg, #ff8a3d, #b5179e 60%, #4c1d95); color: #fff; display: grid; place-items: center; }

/* list rows (library) */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 7px 0; min-height: 70px; }
.item .cover { width: 56px; height: 56px; border-radius: 4px; flex: none; }
.item.round .cover { border-radius: 50%; }
.item-text { flex: 1; min-width: 0; }
.item-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { margin-top: 3px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.item-sub > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item:active { opacity: .7; }

/* ---------- collection page ---------- */
.hero { position: relative; isolation: isolate; padding: calc(var(--safe-t) + 8px) 16px 0; }
.hero::before { content: ""; position: absolute; inset: 0 0 -120px; z-index: -1;
  background: linear-gradient(to bottom, var(--hero, #3a2a20) 0%, color-mix(in srgb, var(--hero, #3a2a20) 45%, var(--page-bg)) 55%, var(--page-bg) 100%); }
.hero ~ * { position: relative; }
.hero-nav { display: flex; justify-content: space-between; margin: 0 -8px 6px; }
.hero-art { width: min(62vw, 260px); aspect-ratio: 1; margin: 6px auto 20px; border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0,0,0,.55); overflow: hidden; }
.hero-art .cover, .hero-art .liked-art { width: 100%; height: 100%; }
.hero h1 { font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.hero .by { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.hero .meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.hero .desc { color: var(--muted); font-size: 13px; margin: 0 0 8px; line-height: 1.4; }

.actions { display: flex; align-items: center; gap: 6px; margin: 12px -8px 4px; }
.actions .spacer { flex: 1; }
.play-btn { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(255,138,61,.28); transition: transform .12s; }
.play-btn:active { transform: scale(.94); }
.play-btn[disabled] { background: var(--surface-3); color: var(--faint); box-shadow: none; }
.dl-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.dl-btn.done { color: var(--accent); }
.dl-btn.busy { color: var(--accent); }
.dl-btn .ring { position: absolute; inset: 6px; }

.status-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 6px 0 4px; border-radius: 10px;
  background: var(--surface); font-size: 13px; color: var(--muted); }
.status-line strong { color: var(--text); font-weight: 650; }
.status-line .link { margin-left: auto; color: var(--accent); }
.bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s; }

.notice { background: var(--surface); border-radius: 12px; padding: 14px; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin: 10px 0; }
.notice strong { color: var(--text); }

/* track rows */
.tracks { margin: 6px 0 0; padding: 0 16px; }
.track { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 4px 0; }
.track .num { width: 18px; text-align: center; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.track .cover { width: 46px; height: 46px; border-radius: 3px; flex: none; }
.track-text { flex: 1; min-width: 0; }
.track-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.playing .track-title { color: var(--accent); }
.track-sub { margin-top: 4px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; min-width: 0; }
.track-sub > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track[data-status="none"] .track-title, .track[data-status="failed"] .track-title { color: #d6d3d1; }
.track:active { opacity: .7; }
.track .more { width: 36px; height: 36px; color: var(--muted); display: grid; place-items: center; margin-right: -8px; }
.badge-e { flex: none; font-size: 9px; font-weight: 800; background: #a8a29e; color: var(--bg); border-radius: 2px;
  padding: 1px 4px; line-height: 1.2; }
.st { flex: none; display: inline-grid; place-items: center; width: 15px; height: 15px; }
.st.done { background: var(--accent); color: var(--accent-ink); border-radius: 50%; }
.st.failed { color: var(--danger); }
.st.queued { color: var(--muted); }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- search ---------- */
.searchbox { position: sticky; top: 0; z-index: 5; margin: 0 -16px 8px; padding: calc(var(--safe-t) + 10px) 16px 10px; background: var(--bg); }
.searchbox label { display: flex; align-items: center; gap: 10px; background: #f5f5f4; color: #1c1917; border-radius: 6px; padding: 0 12px; height: 46px; }
.searchbox input { flex: 1; border: 0; outline: 0; background: transparent; color: #1c1917; font-size: 16px; font-weight: 600; min-width: 0; }
.searchbox input::placeholder { color: #57534e; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 60px 24px; font-size: 14px; line-height: 1.5; }
.empty h3 { color: var(--text); font-size: 20px; margin: 0 0 8px; }

/* ---------- promo / buttons ---------- */
.promo { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px;
  background: linear-gradient(120deg, #3b1f10, #1d1414 70%); border: 1px solid #3b2a20; }
.promo .disc { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0 22%, #111 23% 100%); flex: none; }
.promo h3 { margin: 0 0 4px; font-size: 15px; }
.promo-wrap { position: relative; }
.promo-wrap .promo { padding-right: 44px; }
.promo-x { position: absolute; top: 4px; right: 4px; }
.promo p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 24px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 15px; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid #57534e; }
.btn.small { height: 34px; padding: 0 16px; font-size: 13.5px; }
.btn[disabled] { opacity: .45; }
.btn:active { transform: scale(.97); }

/* ---------- jobs ---------- */
.job { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.job .cover { width: 48px; height: 48px; border-radius: 4px; }
.job-text { flex: 1; min-width: 0; }
.job-title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 8px; }

/* ---------- import ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0 20px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 40px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--text); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.steps strong { color: var(--text); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; border: 1.5px dashed #57534e; border-radius: 14px;
  text-align: center; color: var(--muted); font-size: 13.5px; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #57534e; flex: none; display: grid; place-items: center; }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.item.off { opacity: .45; }
.sticky-cta { position: sticky; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); display: flex; justify-content: center; padding: 12px 0 4px; z-index: 4; }
body.has-player .sticky-cta { bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 14px); }
.sticky-cta .btn { box-shadow: 0 8px 24px rgba(0,0,0,.5); }

/* ---------- mini player ---------- */
#player { display: none; }
body.has-player #player { display: block; }
.mini { position: fixed; z-index: 29; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + var(--safe-b) + 4px); height: var(--mini-h);
  border-radius: 8px; background: var(--mini-bg, #3a2a20); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 8px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.mini .cover { width: 42px; height: 42px; border-radius: 4px; }
.mini-text { flex: 1; min-width: 0; }
.mini-title { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 12.5px; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mini-progress { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255,255,255,.2); border-radius: 2px; }
.mini-progress i { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; }
.desk-player { display: none; }

/* ---------- now playing ---------- */
.np { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 8px) 22px calc(var(--safe-b) + 18px);
  background: linear-gradient(to bottom, var(--np-bg, #3a2a20), color-mix(in srgb, var(--np-bg, #3a2a20) 30%, #050505) 70%);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.np.open { transform: none; }
.np-top { display: flex; align-items: center; justify-content: space-between; margin: 0 -10px; }
.np-context { text-align: center; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.np-context b { display: block; letter-spacing: 0; text-transform: none; font-size: 13px; color: #fff; margin-top: 2px; }
.np-art { flex: 1; display: grid; place-items: center; padding: 22px 0; min-height: 0; }
.np-art .cover { width: min(100%, 52vh); aspect-ratio: 1; height: auto; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.np-title { font-size: 22px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 15px; color: rgba(255,255,255,.72); margin-top: 4px; }
.seek { margin: 18px 0 2px; }
.seek input { width: 100%; }
.times { display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; }
.np-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.np-controls .big { width: 66px; height: 66px; border-radius: 50%; background: #fff; color: #0b0b0c; display: grid; place-items: center; }
.np-controls .ctl { width: 48px; height: 48px; display: grid; place-items: center; }
.ctl.on { color: var(--accent); position: relative; }
.ctl.on::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }

input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); outline: none;
  background-image: linear-gradient(#fff, #fff); background-size: var(--p, 0%) 100%; background-repeat: no-repeat; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }

/* ---------- action sheet & toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; background: #1f1f22; border-radius: 14px 14px 0 0;
  padding: 10px 0 calc(var(--safe-b) + 12px); transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); max-width: 560px; margin: 0 auto; }
.sheet.open { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 8px 18px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sheet-head .cover { width: 48px; height: 48px; border-radius: 4px; }
.sheet button.opt { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 20px; font-size: 15.5px; text-align: left; }
.sheet button.opt:active { background: var(--surface-2); }
.sheet .err { padding: 6px 20px 10px; color: var(--danger); font-size: 13px; }

#toast { position: fixed; z-index: 90; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px);
  display: flex; justify-content: center; pointer-events: none; }
body.has-player #toast { bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 14px); }
.toast { background: #f5f5f4; color: #1c1917; border-radius: 8px; padding: 12px 14px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.5); pointer-events: auto; max-width: 520px; width: 100%;
  animation: up .2s ease-out; }
.toast button { margin-left: auto; color: #c2410c; font-weight: 800; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

/* ---------- login ---------- */
#login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, #3b1f10 0%, var(--bg) 60%); }
#login img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 22px; box-shadow: 0 14px 40px rgba(255,138,61,.25); }
#login h1 { font-size: 34px; letter-spacing: -.03em; margin: 0 0 8px; }
#login p { color: var(--muted); margin: 0 0 30px; max-width: 320px; line-height: 1.5; }
#login .error { color: var(--danger); background: rgba(248,113,113,.1); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; max-width: 360px; }
.login-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.login-btns .btn { width: 100%; }
.login-yt { background: #f5f5f4; color: #1c1917; }
.login-form, .paste-form { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
.field { width: 100%; height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid #3f3f46; background: #18181b; color: var(--text); font-size: 16px; outline: none; }
.field:focus { border-color: var(--accent); }
.login-form .hint { color: var(--faint); font-size: 12.5px; line-height: 1.4; text-align: center; }
.login-btns .or { color: var(--faint); font-size: 13px; }
.paste-form { padding: 6px 20px 24px; }
.paste-form h3 { margin: 4px 0 0; font-size: 18px; }
.paste-form p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.paste-form .err { padding: 0; }
.paste-promo { display: flex; align-items: center; gap: 14px; color: var(--text); }
.paste-promo svg { color: var(--accent); flex: none; }
#login small { color: var(--faint); margin-top: 22px; max-width: 320px; line-height: 1.5; font-size: 12.5px; }

.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); }
.skeleton { background: var(--surface); border-radius: 6px; }


/* ---------- stats ---------- */
.seg { display: flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--muted); }
.seg button.active { background: var(--surface-3); color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.stat { background: var(--surface); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.big { grid-column: span 3; background: linear-gradient(120deg, #4a2412, #241614 70%); border: 1px solid #3b2a20; }
.stat.big b { font-size: 40px; color: var(--accent-2); }
.stat.wide { grid-column: span 3; flex-direction: row; align-items: center; gap: 14px; color: var(--accent); }
.stat.wide div { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.card { position: relative; }
.card .rank { position: absolute; top: 6px; left: 6px; z-index: 1; background: rgba(0,0,0,.65); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
.card.round .rank { left: 50%; transform: translateX(-50%); top: auto; bottom: 46px; }
.track-right { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 120px; padding: 0 2px; }
.clock i { display: block; background: linear-gradient(to top, var(--accent), var(--accent-2)); border-radius: 3px 3px 1px 1px; min-height: 3px; }
.clock-labels { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; }
.clock-note { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.clock-note b { color: var(--text); }
.board { gap: 12px; }
.board.me .item-title { color: var(--accent); }
.board-rank { width: 20px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-min { display: flex; flex-direction: column; align-items: flex-end; }
.board-min b { font-size: 17px; font-variant-numeric: tabular-nums; }
.board-min span { color: var(--muted); font-size: 11.5px; }
.switch { flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* ---------- parties & sharing ---------- */
.sheet-info { padding: 4px 20px 12px; color: var(--muted); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.avatars { display: flex; flex: none; }
.avatars .avatar { width: 34px; height: 34px; border: 2px solid var(--bg); margin-left: -10px; font-size: 13px; }
.avatars .avatar:first-child { margin-left: 0; }
.party-promo { margin-bottom: 8px; background: linear-gradient(120deg, #1c2a3f, #171b24 70%); border-color: #26344a; }
.party-promo .avatar { background: #3b82f6; color: #fff; }
.party-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 16px; margin-top: 4px;
  border-radius: 16px; background: radial-gradient(120% 100% at 50% 0%, #26344a, var(--surface) 70%); }
.party-hero .avatars .avatar { width: 52px; height: 52px; font-size: 20px; margin-left: -14px; border-width: 3px; border-color: var(--surface); }
.party-hero .avatars .avatar:first-child { margin-left: 0; }
.party-title { font-size: 20px; font-weight: 800; }
.party-sub { color: var(--muted); font-size: 13px; }
.party-sub b { color: var(--text); letter-spacing: .08em; }
.party-dot { color: #93c5fd; display: inline-flex; align-items: center; gap: 3px; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { from { height: 4px; } to { height: 16px; } }
.np-extra { display: flex; justify-content: space-between; align-items: center; margin: 14px -10px 0; }
.np-extra .icon-btn { width: auto; min-width: 44px; padding: 0 10px; gap: 6px; display: inline-flex; border-radius: 999px; }
.np-extra .icon-btn.on { color: var(--accent); }
.dev-label { font-size: 12px; font-weight: 700; color: var(--accent); }
.dev-label:empty { display: none; }
.np-context a { color: inherit; }

.remote-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: linear-gradient(120deg, #13301f, #141a16 70%); border: 1px solid #1f3d2b; margin-bottom: 16px; }
.remote-card .cover { width: 48px; height: 48px; border-radius: 4px; }
.remote-card .item-sub { color: #86efac; margin: 0 0 3px; }
.section:has(.remote-card) { margin-top: 0; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  :root { --tabs-h: 0px; --page-bg: var(--bg-2); }
  body { overflow: hidden; }
  #app { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: 1fr auto; height: 100vh; gap: 8px; padding: 8px; }
  #tabs { display: none; }
  #sidebar { display: flex; flex-direction: column; gap: 8px; grid-row: 1; min-height: 0; }
  #main { grid-row: 1; background: var(--bg-2); border-radius: 10px; overflow-y: auto; min-height: 0; padding-bottom: 24px !important; position: relative; }
  #player { grid-column: 1 / -1; }
  .side-nav, .side-lib { background: var(--bg-2); border-radius: 10px; padding: 10px 8px; }
  .side-lib { flex: 1; overflow-y: auto; min-height: 0; }
  .side-link { display: flex; align-items: center; gap: 16px; padding: 10px 14px; font-weight: 700; color: var(--muted); border-radius: 6px; }
  .side-link.active, .side-link:hover { color: var(--text); }
  .side-lib h3 { font-size: 15px; margin: 6px 14px 10px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
  .side-lib .item { padding: 6px; min-height: 0; border-radius: 6px; }
  .side-lib .item:hover { background: var(--surface); }
  .side-lib .item .cover { width: 46px; height: 46px; }
  .side-lib .item-title { font-size: 14px; }
  .page { padding: 20px 24px; }
  .chips, .hscroll { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .searchbox { margin: -20px -24px 8px; padding: 16px 24px; background: var(--bg-2); }
  .searchbox label { max-width: 420px; }
  .hero { padding: 20px 24px 0; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: end; }
  .hero::before { border-radius: 10px 10px 0 0; }
  .hero-nav { grid-column: 1 / -1; margin: 0 -8px; }
  .hero-art { width: 220px; margin: 0; }
  .hero h1 { font-size: clamp(32px, 4vw, 64px); }
  .hero .actions-wrap { grid-column: 1 / -1; }
  .tracks { padding: 0 24px; }
  .track:hover { background: rgba(255,255,255,.04); border-radius: 6px; }
  .card { width: 170px; }
  .card .cover { width: 170px; height: 170px; }
  .quick { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .tile { height: 64px; }
  .tile .cover { width: 64px; height: 64px; }
  .mini { display: none; }
  .desk-player { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 16px; height: 72px; padding: 0 8px; }
  .desk-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .desk-now .cover { width: 56px; height: 56px; border-radius: 4px; }
  .desk-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .desk-ctl { display: flex; align-items: center; gap: 14px; }
  .desk-ctl .big { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; }
  .desk-seek { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 620px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .desk-seek input { flex: 1; }
  .desk-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--muted); }
  .desk-right input { width: 110px; }
  #toast { bottom: 96px !important; }
  .sticky-cta { bottom: 12px !important; }
}
