: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-padding: 0 16px; scroll-snap-type: x proximity; scrollbar-width: none; }  /* scroll-padding: snapping lines the first card up with the page, not the screen edge */
.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, var(--accent), #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 color-mix(in srgb, var(--accent) 28%, transparent); 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-dur { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }  /* the song's length */
.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, color-mix(in srgb, var(--accent) 20%, var(--bg)), var(--bg-2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.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%, color-mix(in srgb, var(--accent) 22%, var(--bg)) 0%, var(--bg) 60%); }
#login img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 22px; box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 25%, transparent); }
#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; }
/* Albums tab: Cover Flow, after the iPod Classic app (black stage, tilted covers, mirrored reflections) */
.cf-stage { --cf: 220px; position: relative; height: calc(var(--cf) * 1.75); margin: 4px -16px 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #1d1d21 0%, #000 70%); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.cf-world { position: absolute; inset: 0; transform-style: preserve-3d; }
/* Black-to-clear fades at both edges: covers slide into the dark instead of popping out of view */
.cf-fade { position: absolute; top: 0; bottom: 0; width: 22%; z-index: 500; pointer-events: none; }
.cf-fade-l { left: 0; background: linear-gradient(to right, #000 0%, #000 25%, rgba(0,0,0,0) 100%); }
.cf-fade-r { right: 0; background: linear-gradient(to left, #000 0%, #000 25%, rgba(0,0,0,0) 100%); }
.cf-card { position: absolute; top: 45%; left: 50%; width: var(--cf); height: var(--cf); will-change: transform; transform-style: preserve-3d; }
.cf-face { position: absolute; inset: 0; background: #000; box-shadow: 0 10px 20px rgba(0,0,0,.5); }
.cf-face img, .cf-refl img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cf-face::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.cf-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.cf-refl { position: absolute; top: 100%; left: 0; width: 100%; height: 100%; margin-top: 1px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.4) 0%, transparent 40%); mask-image: linear-gradient(to bottom, rgba(0,0,0,.4) 0%, transparent 40%); }
.cf-refl img, .cf-refl .cf-blank { transform: scaleY(-1); }
.cf-blank { width: 100%; height: 100%; display: grid; place-items: center; background: #262626; color: #525252; }
.cf-caption { text-align: center; padding: 6px 12px 0; min-height: 76px; }
.cf-caption h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.cf-caption p { margin: 3px 0 0; color: var(--muted); font-size: 15px; }
.cf-caption p#cf-progress { color: var(--faint); font-size: 12.5px; }
.album-search { margin-bottom: 8px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 16px; }
.album-grid .item { min-width: 0; }
.btn.add-album, .section-head a.btn.add-album { gap: 6px; height: 36px; padding: 0 16px; font-size: 14px; flex: none; color: var(--accent-ink); font-weight: 750; }
.topbar .btn.add-album { margin-left: auto; }
.sort-chips { align-items: center; margin: -2px 0 10px; }
.sort-label { color: var(--muted); font-size: 13px; margin-right: 2px; }
.avatar-edit { position: relative; overflow: visible; flex: none; }
.avatar-edit img { border-radius: 50%; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text); border: 2px solid var(--bg); }
.avatar-actions { margin: -2px 0 6px 76px; font-size: 13.5px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
#others .item .btn.small { flex: none; }
@media (min-width: 900px) { .cf-stage { margin: 4px 0 0; border-radius: 12px; } }
.new-tag { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; vertical-align: 2px; }
.icon-btn.spin svg { animation: crate-spin 1s linear infinite; }
@keyframes crate-spin { to { transform: rotate(360deg); } }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.theme-card { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 10px; }
.theme-card.on { border-color: var(--accent); }
.theme-swatch { position: relative; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: #111; }
.theme-swatch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.theme-name { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-top: 10px; }
.theme-name svg { color: var(--accent); }
.theme-note { color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.up-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.up-card.saved { opacity: .75; }
.up-card.error .item-sub { color: var(--danger); }
.up-head { display: flex; align-items: center; gap: 12px; }
.up-head .cover { width: 52px; height: 52px; border-radius: 6px; flex: none; object-fit: cover; }
.up-head .item-text { flex: 1; min-width: 0; }
.up-head .item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-form { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.up-form label { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; }
.up-form label.half { flex: 1 1 calc(50% - 5px); }
.up-form label span { font-size: 12px; color: var(--muted); }
.up-form .field { height: 42px; }
.up-card.up-album { border-color: var(--accent); }
.attach-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--accent); }
.attach-pick select { height: 44px; }
/* Library: menus and actions */
.lib-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lib-actions .promo { width: 100%; text-align: left; }
.item .more { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); flex: none; border-radius: 50%; }
.item .more:hover { color: var(--text); background: var(--surface-2); }
[data-ctx-kind] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ctx-menu { position: fixed; z-index: 90; min-width: 230px; padding: 6px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.ctx-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 6px; font-size: 14px; text-align: left; }
.ctx-menu button:hover { background: var(--surface-3); }
.ctx-menu svg { color: var(--muted); flex: none; }
.sheet.add-songs { max-height: 85vh; display: flex; flex-direction: column; }
.sheet.add-songs .paste-form { flex: 1; min-height: 0; }
.add-results { overflow-y: auto; max-height: 60vh; margin: 0 -4px; padding: 0 4px; }
.add-results h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.add-row { min-height: 0; padding: 5px 0; }
.add-row .cover { width: 44px; height: 44px; }
@media (min-width: 900px) { .sheet.add-songs { left: 50%; right: auto; width: 560px; transform: translate(-50%, 100%); bottom: 0; }
  .sheet.add-songs.open { transform: translate(-50%, 0); } }
/* Lyrics (follow along) */
.lyrics-view { --ly-bg: #3a3a3a; position: fixed; inset: 0; z-index: 65; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, var(--ly-bg) 0%, color-mix(in srgb, var(--ly-bg) 50%, #000) 100%);
  padding: 0 24px calc(var(--safe-b) + 40px); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.lyrics-view.open { transform: none; }
.ly-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 0 -24px; padding: calc(var(--safe-t) + 10px) 24px 16px;
  background: linear-gradient(var(--ly-bg) 65%, color-mix(in srgb, var(--ly-bg) 0%, transparent)); }
.ly-title { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.ly-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-title span { font-size: 13px; color: rgba(255,255,255,.7); }
.ly-body { max-width: 780px; margin: 0 auto; }
.ly-lines { padding: 18vh 0 36vh; }
.ly-line { margin: 0 0 20px; font-size: clamp(22px, 4.6vw, 34px); font-weight: 800; line-height: 1.25; letter-spacing: -.01em;
  color: rgba(0,0,0,.55); cursor: pointer; transition: color .3s; }
.ly-line.past { color: rgba(255,255,255,.62); }
.ly-line.on { color: #fff; }
.ly-line:hover { color: rgba(255,255,255,.85); }
.ly-plain { white-space: pre-line; font-size: 20px; font-weight: 700; line-height: 1.55; padding: 12px 0; }
.ly-note { color: rgba(255,255,255,.65); font-size: 13px; }
.ly-empty { text-align: center; padding: 22vh 0 10vh; }
.ly-empty p { color: rgba(255,255,255,.7); }
.ly-foot { max-width: 780px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.65); font-size: 13px; }
@media (min-width: 900px) { .lyrics-view { bottom: 88px; border-radius: 0 0 12px 12px; } }
.side-link.desk-open { width: 100%; text-align: left; color: var(--accent); }
.side-link.desk-open:hover { color: var(--accent-2); }
.match-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.match-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.match-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.match-row span { display: flex; flex-direction: column; min-width: 0; }
.match-row b { font-size: 14.5px; }
.match-row small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-line .link + .link { margin-left: 10px; }
.up-form label .btn { height: 42px; width: 100%; padding: 0 10px; font-size: 14px; }
.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, color-mix(in srgb, var(--accent) 26%, var(--bg)), var(--bg-2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.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-bottom { padding: 6px 8px; }
  .side-lib h3 .side-add { margin-left: auto; width: 32px; height: 32px; color: var(--muted); }
  .side-lib h3 .side-add:hover { color: var(--text); background: var(--surface); }
  .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; scroll-padding: 0 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; }
}

/* Library drag-and-drop */
[data-ctx-kind][draggable="true"] { -webkit-user-drag: element; }
.item.dragging { opacity: .35; outline: 2px dashed var(--accent); outline-offset: -2px; border-radius: 6px; }

/* Black-and-white themes (Mono, PS3, Y2K Chrome): the accent is white like everything else, so shuffle/repeat glow when on and dim when off. */
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-shuffle"], :is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-repeat"],
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="shuffle"] { position: relative; }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-shuffle"]:not(.on), :is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-repeat"]:not(.on),
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="shuffle"]:not(.on) { color: #fff; opacity: .4; }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-shuffle"].on svg, :is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-repeat"].on svg,
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="shuffle"].on svg { filter: drop-shadow(0 0 4px rgba(255,255,255,.9)) drop-shadow(0 0 10px rgba(255,255,255,.6)); }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-shuffle"].on::after, :is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-repeat"].on::after,
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="shuffle"].on::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-autoplay"]:not(.on) { opacity: .45; }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="p-autoplay"].on svg { filter: drop-shadow(0 0 4px rgba(255,255,255,.9)) drop-shadow(0 0 10px rgba(255,255,255,.6)); }

/* Clickable artist and album names */
.sub-link { color: inherit; text-decoration: none; }
.sub-link:hover { text-decoration: underline; color: var(--text); }
.np-title .sub-link:hover, .np-artist .sub-link:hover { color: #fff; }
.sub-album { display: none; }
@media (min-width: 900px) { .sub-album { display: inline; } }
@media (pointer: coarse) { .track .sub-link { pointer-events: none; } }  /* phones: tapping a row plays it */
.np-head { display: flex; align-items: center; gap: 12px; }
.np-head-text { flex: 1; min-width: 0; }
.np-head .np-add { flex: none; color: inherit; }
.desk-now .desk-add { flex: none; margin-left: 4px; }

/* Arrow buttons on rows that scroll sideways (computers) */
.hs-wrap { position: relative; }
.hs-arrow { position: absolute; top: 50%; z-index: 3; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text); box-shadow: 0 4px 14px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .15s; }
.hs-arrow.left { left: -6px; }
.hs-arrow.right { right: -6px; }
.hs-wrap:hover.can-left .hs-arrow.left, .hs-wrap:hover.can-right .hs-arrow.right { opacity: 1; pointer-events: auto; }
.hs-arrow:hover { background: var(--accent); color: var(--accent-ink); }
.hs-wrap > .chips + .hs-arrow, .hs-wrap > .chips ~ .hs-arrow { width: 28px; height: 28px; margin-top: -21px; }

/* Albums page: search, options button, hidden albums */
.album-search { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 12px; height: 40px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.album-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 15px; }
.album-grid .item { position: relative; }
.album-grid .item .more { margin-left: auto; flex: none; }
.album-grid .item[hidden] { display: none; }
.hidden-albums { display: block; margin: 16px auto 0; color: var(--muted); }

/* Profile, privacy, friends, following */
.side-profile { margin-top: 4px; }
.side-profile .avatar { width: 28px; height: 28px; font-size: 12px; flex: none; }
.side-profile-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-h { margin: 26px 0 6px; font-size: 18px; }
.privacy-row { min-height: 64px; }
.privacy-row .switch { flex: none; margin-left: 12px; }
.friends-chips .chip { text-decoration: none; }
.friend-row { min-height: 68px; }
.friend-row .avatar, .friend-head .avatar { flex: none; }
.live-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 2px;
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.eq-mini { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-right: 2px; flex: none; }
.eq-mini i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq .9s ease-in-out infinite alternate; }
.eq-mini i:nth-child(2) { animation-delay: .3s; } .eq-mini i:nth-child(3) { animation-delay: .6s; }
.friend-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 8px; }
.friend-head h1 { margin: 2px 0 0; font-size: 30px; }
.now-card { background: var(--surface); border-radius: 8px; padding: 8px; }
.follow-btn { margin-top: 12px; background: transparent; border: 1px solid currentColor; color: var(--text); }
.follow-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Search: filters, loading rows, preview bar */
.search-chips { margin-bottom: 8px; }
.src-chips { margin-bottom: 14px; }
.src-chips .chip { font-size: 12.5px; padding: 6px 12px; }
.search-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 10px 0; font-size: 14px; }
.show-all { display: block; margin: 8px 0 0; color: var(--muted); font-weight: 700; }
.show-all:hover { color: var(--text); }
#preview-bar { position: fixed; z-index: 35; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + var(--safe-b) + var(--mini-h) + 12px); display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 10px; border-radius: 10px; background: var(--surface-3); box-shadow: 0 8px 24px rgba(0,0,0,.5); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
#preview-bar .cover { width: 40px; height: 40px; border-radius: 4px; flex: none; }
#preview-bar .mini-text { flex: 1; min-width: 0; }
#preview-bar .mini-sub { color: var(--muted); }
#preview-bar .btn.small { flex: none; }
body:not(.has-player) #preview-bar { bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); }
@media (min-width: 900px) { #preview-bar { left: auto; right: 16px; width: 460px; bottom: 100px; } body:not(.has-player) #preview-bar { bottom: 16px; } }

/* Friend requests, activity, confirm sheet, selection, Search for it rows */
.btn.ghost { background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 35%, transparent); }
.btn.danger { background: #e5484d; color: #fff; }
.confirm-sheet .paste-form h3 { margin-bottom: 6px; }
.confirm-msg { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns .btn { flex: 1; justify-content: center; }
.rel-tag { font-size: 12.5px; font-weight: 700; color: var(--muted); flex: none; }
.friend-row .btn.small { flex: none; }
.friend-row .icon-btn { flex: none; }
.my-handle { margin: -4px 0 12px; }
.handle-promo { margin: 0 0 14px; }
.profile-handle { margin: 10px 0 2px; }
.activity .act-item { margin-bottom: 4px; }
.act-who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.act-who a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.act-who .avatar { flex: none; }
.artist-results .item { gap: 10px; }
.artist-results .item-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; }
.artist-results .follow-btn { margin-top: 0; flex: none; }
.cover.round { border-radius: 50%; }
.pick-row { display: flex; align-items: center; gap: 12px; }
.pick-row .btn.small { flex: none; }
.pick-play { position: relative; flex: none; padding: 0; border-radius: 4px; overflow: hidden; }
.pick-play .cover { display: block; }
.pick-play-icon { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; }
.pick-play:hover .pick-play-icon { background: rgba(0,0,0,.25); color: var(--accent); }
.track.selected { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 6px; }
#sel-bar { position: fixed; z-index: 36; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + var(--safe-b) + var(--mini-h) + 12px); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--surface-3); box-shadow: 0 8px 24px rgba(0,0,0,.5); border: 1px solid var(--accent); }
#sel-bar .sel-count { flex: 1; min-width: 80px; }
body:not(.has-player) #sel-bar { bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); }
@media (min-width: 900px) { #sel-bar { left: auto; right: 16px; width: auto; max-width: 620px; bottom: 100px; } body:not(.has-player) #sel-bar { bottom: 16px; } }
.item.selected { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 6px; }

/* Theme colour picker (Default colours, PS3 colours) */
.colour-dots { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.colour-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; font-size: 12px; color: var(--muted); }
.colour-dot i { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.colour-dot.on i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.colour-dot.on span { color: var(--text); font-weight: 700; }

/* Storage page (admins) */
.store-row .item-text { display: flex; flex-direction: column; gap: 6px; }
.store-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.store-head b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.store-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--text) 10%, transparent); }
.store-bar i { display: block; height: 100%; }
.store-music { background: var(--accent); }
.store-shared { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.store-other { background: color-mix(in srgb, var(--text) 30%, transparent); }
.store-disk { margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.store-disk .store-bar { height: 12px; border-radius: 6px; }
.storage-page .item-sub > span { white-space: normal; }
.storage-page .stat b { font-size: 19px; }

/* Party queue: drag to reorder, × to take a song out */
.pq-list.editable .pq-item { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border-radius: 8px; }
.pq-list.editable .pq-item img { pointer-events: none; -webkit-user-drag: none; }
.pq-item.dragging { cursor: grabbing; position: relative; z-index: 2; background: var(--surface-2); box-shadow: 0 8px 24px rgba(0,0,0,.4); transform: scale(1.02); }
.pq-remove { flex: none; margin-left: auto; }
/* The party button lights up while you're in a party, like shuffle does */
[data-action="party-btn"] { position: relative; }
[data-action="party-btn"].on { color: var(--accent); opacity: 1; }
[data-action="party-btn"].on::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="party-btn"]:not(.on) { opacity: .45; }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="party-btn"].on svg { filter: drop-shadow(0 0 4px rgba(255,255,255,.9)) drop-shadow(0 0 10px rgba(255,255,255,.6)); }
:is(html[data-theme="mono"], html[data-theme="ps3"], html[data-theme="chrome"]) [data-action="party-btn"].on::after { box-shadow: 0 0 6px #fff; }
