/* Rich gradient skins, navy first, rounded covers and pills, with amber as the one accent. A theme only sets the colours below. */
:root {
  --g1: #17386f; --g2: #0f2650; --g3: #081631; --bg: #081631; --bg2: #132a55; --raise: #1b3768; --bar: #0c1d3f; --line: rgba(255,255,255,.14); --line2: rgba(255,255,255,.28);
  --text: #fff; --dim: rgba(255,255,255,.82); --faint: rgba(255,255,255,.68); --panel: rgba(255,255,255,.09);
  --accent: #ffb648; --good: #5fcf9f; --bad: #ff7a70;
  --side: 76px; --mini: 68px; --pad: 32px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
:root[data-theme="ocean"] { --g1: #1b6fa8; --g2: #0f4a7c; --g3: #082a4e; --bg: #082a4e; --bg2: #123f6b; --raise: #1a4f83; --bar: #0b3459; }
:root[data-theme="berry"] { --g1: #d42a7f; --g2: #8c1458; --g3: #470a33; --bg: #470a33; --bg2: #6e1148; --raise: #861a5a; --bar: #560c3d; }
:root[data-theme="sunset"] { --g1: #d9832e; --g2: #9a5424; --g3: #4d2a18; --bg: #4d2a18; --bg2: #72401f; --raise: #8a5028; --bar: #5c331c; --accent: #ffe08a; }
:root[data-theme="graphite"] { --g1: #4a4f5c; --g2: #33363f; --g3: #1f2127; --bg: #1f2127; --bg2: #33363f; --raise: #40444f; --bar: #292b32; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
@property --amb { syntax: '<color>'; inherits: true; initial-value: #081631; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(165deg, var(--g1) 0, var(--g2) 45%, var(--g3) 100%); }
html { background: var(--bg); }
body { background: transparent; min-height: 100vh; overflow-x: hidden; padding-left: var(--side); }
body.has-mini { padding-bottom: var(--mini); }
* { scrollbar-color: #5a6378 transparent; scrollbar-width: thin; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; margin: 0; }
img { display: block; }
[hidden] { display: none !important; }
audio { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- side bar (bottom tab bar on phones) ---------- */
.side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: var(--side); display: flex; flex-direction: column; align-items: center; padding: 20px 0 12px; background: var(--bar); border-right: 1px solid var(--line); }
.brand img { width: 26px; height: 26px; margin-bottom: 22px; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; width: 100%; }
#nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 0 9px; color: var(--dim); transition: color .15s; }
#nav a svg { width: 21px; height: 21px; fill: currentColor; }
#nav a span { font-size: 10px; font-weight: 500; }
#nav a:hover { color: var(--text); }
#nav a.on { color: var(--accent); }
#nav a.on::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: var(--accent); }
#nav a[data-v="settings"] { margin-top: auto; }
#nav a .short { display: none; }
.eps .lrow.ep { grid-template-columns: 40px minmax(0, 1fr) auto; position: relative; }
.lrow.ep .icon-btn { width: 40px; height: 40px; }
.lrow.ep .epacts { display: flex; align-items: center; }
/* not played yet: a bold title behind an accent dot. Played: the whole row steps back, with a green tick */
.lrow.ep .ti { font-weight: 650; }
.lrow.ep:not(.played) .ti::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.lrow.ep.played .ti, .lrow.ep.played .cov, .lrow.ep.played > [data-play] { opacity: .45; }
.lrow.ep.played .ti { font-weight: 400; }
.lrow.ep.played .su { color: color-mix(in srgb, var(--dim) 60%, transparent); }
.lrow.ep .pl { color: var(--good); font-weight: 650; white-space: nowrap; }
.lrow.ep .pl svg { width: 13px; height: 13px; fill: currentColor; vertical-align: -2px; margin-right: 3px; }
.lrow.ep .bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.lrow.ep .bar b { display: block; height: 100%; background: var(--accent); }
.about.notes { white-space: pre-line; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-btn { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 650; padding: 0; cursor: pointer; filter: brightness(.7); }
pre.code { white-space: pre-wrap; word-break: break-all; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.3); font-size: 12px; user-select: all; }
.lrow.pod:has(.rank) { grid-template-columns: 26px 40px minmax(0, 1fr) auto; }
.lrow.pod .rank { color: var(--dim); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
body.has-mini #nav a[data-v="settings"] { margin-bottom: var(--mini); }

main { padding: 0 0 56px; }
.page { padding: 30px var(--pad) 0; animation: fade .18s ease; max-width: 1500px; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: 22px; }
.spacer { flex: 1; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }

/* ---------- buttons, tabs, inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.14); font-weight: 500; font-size: 13px; transition: background .12s, border-color .12s; }
.btn:hover { background: rgba(255,255,255,.22); }
.btn svg { width: 15px; height: 15px; fill: currentColor; }
.btn.primary { background: linear-gradient(90deg, #ffc23d, #ff9d2e); border-color: transparent; color: #2a1605; font-weight: 700; }
.btn.primary:hover { background: #ffc266; border-color: #ffc266; }
.btn.small { padding: 6px 13px; font-size: 12px; }
.btn.big { padding: 9px 18px; font-size: 13px; }
.btn.ghost { border-color: transparent; color: var(--dim); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 6px; border: 0; background: transparent; display: inline-grid; place-items: center; flex: none; color: var(--dim); transition: color .12s; }
.icon-btn:hover { color: var(--text); }
.icon-btn.on { color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.chips { display: flex; gap: 2px 18px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.chip { padding: 8px 0; margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--faint); font-weight: 600; font-size: 15px; white-space: nowrap; transition: color .12s; }
.chip:hover { color: var(--text); }
.chip.on { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.chips + .chips { border-bottom: 0; margin-top: -10px; }
.chips + .chips .chip { font-size: 12px; padding: 4px 0; }
.chips + .chips .chip.on { color: var(--accent); border-bottom-color: transparent; }
.chips + .chips { margin-bottom: 14px; }
.hero .meta #gn { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.field { width: 100%; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.14); outline: 0; }
.field::placeholder { color: var(--faint); }
textarea.field { border-radius: 14px; }
select.field option { color: #111; }
.field:focus { border-color: var(--accent); }
select.field { width: auto; }

.genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.genres a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.genres a:hover span:first-child { color: var(--accent); }
.genres a span:last-child { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }

.filter { max-width: 420px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; display: block; }
.homesearch { margin-bottom: 26px; max-width: 640px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sorts { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.sort { border: 0; background: transparent; padding: 4px 0; color: var(--dim); font-size: 12px; font-weight: 500; white-space: nowrap; }
.sort:hover { color: var(--text); }
.sort.on { color: var(--accent); }
.views { display: flex; flex: none; }
.views .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.views .icon-btn.on { color: var(--text); }
.views .icon-btn svg { width: 18px; height: 18px; }
.lrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: 4px; }
.lrow:hover { background: rgba(255,255,255,.045); }
.lrow .cov { width: 40px; border-radius: 10px; }
.lrow .cov.round { border-radius: 50%; }
.lrow .cov i { font-size: 0; }
.lrow .ti { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .su, .lrow .d { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- covers ---------- */
.cov { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--raise); }
.cov.round { border-radius: 50%; }
.cov.mosaic { display: grid; grid-template: 1fr 1fr / 1fr 1fr; }
.cov.mosaic img { position: static; min-width: 0; min-height: 0; }
.cov i { position: absolute; inset: 0; display: grid; place-items: center; padding: 12%; text-align: center; font: 500 12px/1.25 Inter, sans-serif; color: var(--faint); font-style: normal; overflow: hidden; }
.cov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cov .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.6); z-index: 2; }
.cov .bar b { display: block; height: 100%; background: var(--accent); }
.cov .done { position: absolute; left: 0; bottom: 0; right: 0; z-index: 2; padding: 3px 7px; background: rgba(0,0,0,.72); color: var(--good); font-size: 10px; font-weight: 600; }

.card { display: block; min-width: 0; cursor: pointer; }
.card .cov img { transition: opacity .12s; }
.card:hover .cov img { opacity: .82; }
.card .t { margin-top: 8px; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.center { text-align: center; }

.section { margin: 0 0 18px; padding: 14px 0 12px; background: var(--panel); border-radius: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; color: #fff; }
.section-head a { color: var(--accent); font-size: 13px; font-weight: 600; }
.section-head a:hover { color: var(--text); }
.rail { display: flex; gap: 16px; overflow-x: auto; padding: 0 18px 4px; scroll-padding-inline: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > .card { flex: 0 0 148px; }
.rail-wrap { position: relative; }
.rail-arr { display: none; position: absolute; top: 74px; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(8,22,49,.9); color: var(--text); place-items: center; opacity: 0; transition: opacity .12s, background .12s; }
.rail-arr svg { width: 22px; height: 22px; fill: currentColor; }
.rail-arr:hover { background: var(--text); color: var(--bg); }
.rail-arr.l { left: 10px; } .rail-arr.l svg { transform: rotate(180deg); }
.rail-arr.r { right: 10px; }
@media (hover: hover) and (pointer: fine) {
  .rail-arr { display: grid; }
  .rail-wrap:hover .rail-arr, .rail-arr:focus-visible { opacity: 1; }
  .rail-wrap.at-start .rail-arr.l, .rail-wrap.at-end .rail-arr.r { opacity: 0; pointer-events: none; }
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 22px 16px; }

/* ---------- detail head ---------- */
.hero { display: flex; gap: 24px; align-items: flex-end; margin-bottom: 24px; position: relative; }
.hero .cov { width: 192px; flex: none; }
.hero h1 { font-size: clamp(24px, 3.2vw, 38px); font-weight: 650; line-height: 1.08; letter-spacing: -.025em; margin-bottom: 8px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.hero .meta a { color: var(--text); }
.hero .meta a:hover { color: var(--accent); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fan { position: relative; margin: -30px calc(-1 * var(--pad)) 24px; min-height: 300px; display: flex; align-items: flex-end; padding: 24px var(--pad); background-size: cover; background-position: center 25%; }
.fan::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0, rgba(8,22,49,.55) 50%, rgba(8,22,49,.25) 100%); }
.fan .hero { z-index: 1; margin: 0; }
.fan .hero .cov { width: 112px; }
.about { color: var(--dim); max-width: 720px; margin: 0 0 24px; white-space: pre-line; }
.about.fold { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.page h2 { font-size: 15px; }

/* ---------- song rows ---------- */
.rows { display: flex; flex-direction: column; margin-bottom: 26px; }
.tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: 4px; cursor: pointer; min-height: 46px; }
.tr:hover { background: rgba(255,255,255,.045); }
.tr.on .ti, .tr.on .n { color: var(--accent); }
.tr .n { color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; font-size: 12px; }
.tr .ti { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .su { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .d { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tr .mid { min-width: 0; }
.tr .acts { display: flex; align-items: center; }
.tr .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.tr .icon-btn.on { color: var(--accent); }
.tr .icon-btn svg { width: 16px; height: 16px; }
@media (hover: hover) { .tr .acts .icon-btn:not(.on) { opacity: 0; } .tr:hover .acts .icon-btn { opacity: 1; } }
@media (hover: none) { .tr, .card, .lrow, .qrow, .cov, img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } img { -webkit-user-drag: none; } }
.card { position: relative; }
.card-more { display: none; position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 50%; background: rgba(8,10,16,.72); color: #fff; cursor: pointer; }
.card-more svg { width: 100%; height: 100%; fill: currentColor; }
@media (hover: hover) { .card:hover .card-more, .card-more:focus-visible { display: block; } }
.artist-link { cursor: pointer; }
@media (hover: hover) { .artist-link:hover { color: var(--text); text-decoration: underline; } }
.pick-open { display: block; margin: 0 0 6px auto; }
.picking .tr { position: relative; padding-left: 38px; }
.picking .tr::before { content: ''; position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; box-sizing: border-box; border: 2px solid var(--faint); border-radius: 4px; color: #fff; font-size: 12px; line-height: 14px; text-align: center; }
.picking .tr.picked::before { content: '✓'; background: var(--accent); border-color: var(--accent); }
.picking .tr.picked { background: rgba(255,255,255,.07); }
.picking .acts { display: none; }
.pickbar { position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 8px; padding: 12px var(--pad); background: var(--bg2); border-top: 1px solid var(--line2); }
.pickbar .ti { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; }
.pickbar button:disabled { opacity: .4; cursor: default; }
body.has-mini .pickbar { bottom: var(--mini); }
.tr .cov { width: 34px; border-radius: 10px; }
.tr .cov i { font-size: 0; }
.disc { color: var(--faint); font-weight: 500; font-size: 12px; margin: 14px 0 4px; }

.acts2 { display: inline-flex; gap: 6px; align-items: center; }
.tr.chart .tag { font-size: 11px; color: var(--faint); white-space: nowrap; }
.tr.chart .tag.no { color: var(--accent); }
.tr.chart.missing { cursor: default; }
.tr.chart.missing:hover { background: transparent; }
.tr.chart.missing .ti { color: var(--dim); }
.tr.chart.missing .cov img { opacity: .7; }

.tr:has(.popm) { grid-template-columns: 30px minmax(0, 1fr) auto auto auto; }
.tr:has(.cov):has(.popm) { grid-template-columns: 34px minmax(0, 1fr) auto auto auto; }
.popm { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.popm i { width: 3px; background: rgba(255,255,255,.14); border-radius: 1px; }
.popm i:nth-child(1) { height: 5px; } .popm i:nth-child(2) { height: 7px; } .popm i:nth-child(3) { height: 9px; } .popm i:nth-child(4) { height: 11px; } .popm i:nth-child(5) { height: 14px; }
.popm i.on { background: var(--accent); }

.dupg .su { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.log-s { font-size: 13px; font-weight: 500; }
.log-done .log-s { color: var(--dim); }
.log-working .log-s { color: var(--accent); }
.log-failed .log-s { color: #ff7b72; }
.dupg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.dupc { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 3px 0; }
.dupc .su { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.dupc .d { color: var(--dim); font-size: 12px; white-space: nowrap; }
.dupc .tag { color: var(--good); font-size: 11px; }

/* ---------- mini player ---------- */
.mini { position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 40; height: var(--mini); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 0 var(--pad) 0 14px; background: var(--raise); border-top: 1px solid var(--line); }
.mini { cursor: pointer; }
.mini .who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mini .cov { width: 44px; flex: none; border-radius: 3px; }
.mini .cov i { font-size: 0; }
.mini .ti { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .su { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .ctl { display: flex; align-items: center; gap: 4px; justify-content: center; }
.mini .ctl .icon-btn { color: var(--text); }
.mini .right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.mini .mpos { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; max-width: 460px; cursor: default; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.mini .mpos .seek { margin: 0; flex: 1; min-width: 60px; }
.mini .mpos span { flex: none; min-width: 34px; text-align: right; }
.mini .mpos span:last-child { text-align: left; min-width: 40px; }
.mini:has(.mpos) .line { display: none; }
.pp, .icon-btn.pp, .mini .ctl .pp { background: var(--text); color: var(--bg); border-radius: 50%; }
.icon-btn.pp:hover { background: #fff; color: var(--bg); }
.mini .line { position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: transparent; pointer-events: none; }
.mini .line b { display: block; height: 100%; background: var(--accent); width: 0; }

/* ---------- now playing: the cover across the top fading into its own colour, the queue right underneath ---------- */
.now { position: fixed; inset: 0; z-index: 60; overflow: hidden; touch-action: pan-y; background: var(--bg2); animation: fade .16s ease; }
.now { --peekbar: 38px; --peek: calc(var(--peekbar) + 192px + env(safe-area-inset-bottom)); } /* the bar, and three songs */
.now .col { position: relative; height: 100%; display: flex; flex-direction: column; }
.now .art { position: relative; flex: 1; min-height: 0; background: #000; }
.now .art::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent); }
.now .art .cov { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: var(--g2); }
.now .art .cov img { object-fit: contain; }
.now .top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 12px 0; }
.now .top .icon-btn { color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.65)); width: 44px; height: 44px; }
.now .top .icon-btn svg { width: 26px; height: 26px; }
/* the song and its controls sit on their own solid panel, so no cover can make them hard to see */
.now .body { flex: none; position: relative; display: flex; flex-direction: column; margin-bottom: var(--peek); padding: 14px max(22px, calc(50% - 258px)) 12px; background: var(--bg2); border-top: 1px solid var(--line2); }
.now .body > * { flex: none; }
/* the queue waits at the bottom of the screen and comes up over the picture */
.now .sheet { position: absolute; z-index: 3; left: 50%; bottom: 0; width: min(100%, 560px); height: 86%; margin-left: max(-50%, -280px); display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: var(--bar); box-shadow: 0 -8px 24px rgba(0,0,0,.28); transform: translateY(calc(100% - var(--peek))); transition: transform .24s var(--ease); }
.now.q-open .sheet { transform: none; }
.peek { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; height: var(--peekbar); padding: 8px 22px 0; border: 0; background: transparent; color: var(--dim); font-size: 13px; font-weight: 600; }
.peek .next { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .qhead { flex: none; padding: 8px 22px 0; }
.now:not(.q-open) .qhead, .now:not(.q-open) [data-drag] { display: none; }
.now:not(.q-open) .sheet { cursor: pointer; }
.now:not(.q-open) .qrow .mid { width: fit-content; max-width: 100%; }
.now:not(.q-open) #nL { flex: none; height: 192px; padding-bottom: 192px; overflow-y: auto; scrollbar-width: none; } /* room to scroll even a short queue so the next song comes first; the finger scrolls on down the queue from there */
.now:not(.q-open) #nL::-webkit-scrollbar { display: none; }
.now #nL { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 22px calc(16px + env(safe-area-inset-bottom)); }
.nowhead { display: flex; align-items: center; gap: 8px; }
.nowtext { flex: 1; min-width: 0; }
.nowstar { flex: none; width: 48px; height: 48px; margin-right: -8px; color: #fff; }
.nowstar svg { width: 30px; height: 30px; fill: currentColor; }
.nowstar.on { color: var(--accent); }
.now .name { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.now .name h1 { font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.now .name svg { width: 22px; height: 22px; fill: rgba(255,255,255,.8); flex: none; }
.now .by { color: rgba(255,255,255,.88); margin-top: 1px; font-size: 14px; }
.now .chap { color: rgba(255,255,255,.72); font-size: 13px; margin-top: 2px; min-height: 0; }
.grab { flex: none; width: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4); }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.qhead .muted { color: rgba(255,255,255,.6); font-size: 12px; }
.qhead .src { font-weight: 600; font-size: 14px; }
.pillbtn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 500; font-size: 13px; }
.pillbtn:hover { background: rgba(255,255,255,.18); }
.pillbtn svg { width: 19px; height: 19px; fill: currentColor; }
.qrow { display: grid; grid-template-columns: 50px minmax(0, 1fr) 44px; gap: 13px; align-items: center; padding: 7px 0; cursor: pointer; background: transparent; touch-action: pan-y; transition: transform .12s; }
.qrow .ti { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .su { color: rgba(255,255,255,.6); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .cov { width: 50px; border-radius: 3px; }
.qrow .cov i { font-size: 0; }
.qrow.cur .ti { color: var(--accent); }
.qrow.past { opacity: .5; }
.qrow.past:hover { opacity: .8; }
.qrow .icon-btn { color: rgba(255,255,255,.85); touch-action: none; cursor: grab; width: 44px; height: 44px; }
.qrow.drag { background: rgba(255,255,255,.1); border-radius: 4px; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; margin: 12px 0 0; touch-action: none; cursor: pointer; display: block; }
.seek::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.34) var(--p, 0%)); }
.seek::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.34) var(--p, 0%)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; margin-top: -5.5px; }
.seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }
.times { display: flex; justify-content: space-between; gap: 10px; color: rgba(255,255,255,.85); font-size: 12px; font-variant-numeric: tabular-nums; }
.bigctl { display: flex; align-items: center; justify-content: space-between; margin: 10px -4px 6px; }
.bigctl .icon-btn { width: 48px; height: 48px; position: relative; color: #fff; }
.bigctl .icon-btn.on { color: var(--accent); }
.bigctl .icon-btn svg { width: 28px; height: 28px; }
.bigctl .icon-btn.pp { width: 72px; height: 72px; background: #fff; color: #120d08; }
.bigctl .pp svg { width: 32px; height: 32px; }
.bigctl .skip b { position: absolute; font-size: 8px; font-weight: 700; top: 19px; left: 0; right: 0; text-align: center; }
.now .sim { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; font-weight: 600; padding-inline: 16px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.tabs { display: flex; gap: 18px; }
.chrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 4px; cursor: pointer; min-height: 38px; }
.chrow:hover { background: rgba(255,255,255,.045); }
.chrow.on { color: var(--accent); }
.chrow .d { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.chrow .ti { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chrow .icon-btn { width: 26px; height: 26px; }
.chrow .icon-btn svg { width: 14px; height: 14px; }

/* ---------- equalizer ---------- */
.normrow { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.normrow p { margin: 2px 0 0; font-size: 12px; }
.normrow .chip { flex: none; }
.eqh { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.eq { display: flex; flex-direction: column; gap: 8px; }
.eq label { display: grid; grid-template-columns: 76px 1fr 56px; gap: 10px; align-items: center; font-size: 12px; color: var(--dim); }
.eq b { text-align: right; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.eq input { width: 100%; accent-color: var(--accent); }

/* ---------- pop-up menu ---------- */
.pop { position: fixed; inset: 0; z-index: 80; background: rgba(4,6,10,.62); display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.pop .box { width: min(380px, 100%); max-height: 80vh; overflow-y: auto; padding: 14px; border-radius: 20px; background: var(--raise); border: 1px solid var(--line); }
.pop h3 { font-size: 13px; color: var(--dim); font-weight: 500; padding: 4px 10px 8px; }
.pop .opt { display: block; width: 100%; padding: 10px; border: 0; border-radius: 4px; background: transparent; text-align: left; font-weight: 500; }
.pop .opt:hover { background: rgba(255,255,255,.06); }
.pop .opt.on { color: var(--accent); }
.pop .opt.danger { color: var(--bad); }
.pop h3.big { font-size: 16px; color: var(--text); font-weight: 600; padding: 4px 6px 6px; }
.pop .note { margin: 0 6px 14px; color: var(--dim); font-size: 13px; }
.pop .row { display: flex; justify-content: flex-end; gap: 8px; padding: 0 6px 6px; }
.btn.dangerb { background: var(--bad); border-color: var(--bad); color: #1a0705; font-weight: 600; }
.btn.dangerb:hover { background: #ff8f86; border-color: #ff8f86; }

/* ---------- settings, sign-in ---------- */
.homerow { display: flex; align-items: center; gap: 6px; }
.homerow .check { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.formf { display: block; margin-bottom: 10px; }
.formf span { display: block; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 2px solid transparent; background: rgba(255,255,255,.1); font-weight: 600; font-size: 13px; }
.swatch i { width: 26px; height: 26px; border-radius: 50%; }
.swatch.on { border-color: #fff; }
.covername { white-space: normal !important; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.tag.ready { color: var(--good) !important; font-weight: 600; }
.spares { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; max-height: 46vh; overflow-y: auto; }
.spare { padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: transparent; aspect-ratio: 1; }
.spare img { width: 100%; height: 100%; object-fit: cover; }
.big-code { font-size: 28px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.panel { padding: 18px 0; border-top: 1px solid var(--line); max-width: 680px; }
.panel h2 { font-size: 14px; margin-bottom: 6px; }
.panel p { color: var(--dim); font-size: 13px; margin: 0 0 12px; }
.panel .btn { margin: 0 8px 8px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin-bottom: 12px; font-size: 13px; }
.kv b { color: var(--dim); font-weight: 400; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 20px; margin-left: calc(-1 * var(--side)); }
.signin .box { width: min(320px, 100%); }
.signin img { width: 34px; height: 34px; margin-bottom: 16px; }
.signin h1 { font-size: 20px; margin-bottom: 16px; }
.signin .field { margin-bottom: 8px; }
.signin .err { color: var(--bad); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.empty { color: var(--faint); padding: 40px 0; text-align: center; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--mini) + 14px); z-index: 90; padding: 9px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 500; max-width: 90vw; }
.more { height: 1px; }

/* ---------- phones: the side bar becomes a tab bar, with the mini player just above it ---------- */
@media (max-width: 760px) {
  :root { --tabs: calc(64px + env(safe-area-inset-bottom)); --mini: 62px; --pad: 16px; --cover: 216px; }
  :root[data-covers="medium"] { --cover: 192px; }
  :root[data-covers="small"] { --cover: 168px; }
  body { padding-left: 0; padding-bottom: calc(var(--tabs) + 6px); }
  body.has-mini { padding-bottom: calc(var(--tabs) + var(--mini) + 12px); }
  .side { top: auto; right: 0; width: auto; height: var(--tabs); flex-direction: row; padding: 0 0 env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--line); background: var(--bar); }
  .side .brand { display: none; }
  #nav { flex-direction: row; gap: 0; }
  #nav a { flex: 1; min-width: 0; justify-content: center; padding: 0; color: var(--dim); }
  #nav a svg { width: 25px; height: 25px; }
  #nav a span { font-size: 10px; white-space: nowrap; letter-spacing: -.1px; }
  #nav a.on::before { display: none; }
  #nav a .long { display: none; }
  #nav a .short { display: inline; }
  #nav a[data-v="settings"], body.has-mini #nav a[data-v="settings"] { margin: 0; }
  .page { padding-top: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips.wrap { flex-wrap: wrap; }
  .chips + .chips { flex-wrap: wrap; gap: 0 14px; }
  .rail { gap: 10px; padding: 0 12px 2px; scroll-padding-inline: 12px; }
  .rail > .card { flex-basis: var(--cover); }
  .card .t { margin-top: 5px; font-size: 12px; line-height: 15px; }
  .card .s { font-size: 11px; line-height: 13px; }
  .section { margin: 0 -8px 8px; padding: 8px 0 6px; border-radius: 16px; }
  .section-head { margin-bottom: 5px; padding: 0 12px; }
  .section-head h2 { font-size: 18px; line-height: 22px; }
  .homesearch { margin-bottom: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(var(--cover), 160px), 1fr)); gap: 14px 10px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero .cov { width: min(190px, 52vw); }
  .fan { margin-top: -20px; min-height: 240px; padding: 16px; }
  .fan .hero .cov { width: 84px; }
  .pickbar { left: 0; bottom: var(--tabs); padding: 10px 16px; flex-wrap: wrap; }
  .pickbar .ti { flex-basis: 100%; }
  body.has-mini .pickbar { bottom: calc(var(--tabs) + var(--mini)); }
  .mini { left: 8px; right: 8px; bottom: calc(var(--tabs) + 4px); grid-template-columns: minmax(0, 1fr) auto; padding: 0 8px; gap: 4px; border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
  .mini .line, .mini:has(.mpos) .line { display: block; height: 2px; top: 0; background: rgba(255,255,255,.08); }
  .mini .cov { width: 42px; }
  .mini .ctl .pv, .mini .right { display: none; }
  .signin { margin-left: 0; }
  .toast { bottom: calc(var(--tabs) + var(--mini) + 10px); }
  .tr { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; }
  .tr:has(.cov) { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .tr { min-height: 58px; }
  .tr .cov { width: 48px; }
  .tr .ti { font-size: 15px; }
  .tr .icon-btn { width: 40px; height: 40px; }
  .tr .icon-btn svg { width: 20px; height: 20px; }
  .lrow { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .lrow .cov { width: 48px; }
  .tr .d { display: none; }
  .dupc { grid-template-columns: minmax(0, 1fr) auto; }
  .dupc .mid { grid-column: 1 / -1; }
  .tr:has(.popm) { grid-template-columns: 24px minmax(0, 1fr) auto auto; }
  .tr:has(.cov):has(.popm) { grid-template-columns: 48px minmax(0, 1fr) auto auto; }
  .tr.chart .tag { font-size: 10px; }
}
/* where a song came from: YouTube copies are lossy, worth replacing later */
.su .src { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .02em; padding: 1px 5px; margin-right: 6px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); vertical-align: 1px; }
/* Discover: a section's Play button stays on one line beside its title */
.fy-acts { display: flex; gap: 8px; flex: none; }
.fy-acts .btn { white-space: nowrap; }
#like .section-head h2 { flex: 1; }
/* Home: song lists six long, two columns when there's room; the rows of covers smaller than elsewhere */
.hl .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--r, 3), auto); grid-auto-flow: column; column-gap: 28px; padding: 0 18px; margin: 0; }
.hl .tr .su { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hrows .rail > .card { flex-basis: 132px; }
@media (max-width: 760px) {
  .hl .rows { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; padding: 0 12px; }
  #hrows .rail > .card { flex-basis: calc(var(--cover) * .6); }
}
@media (max-width: 760px) {
  .section-head:has(.fy-acts) { flex-wrap: wrap; }
  .section-head .fy-acts { width: 100%; }
}
/* Favorites in My order: a handle to drag a song elsewhere */
.tr .drag { cursor: grab; touch-action: none; color: var(--faint); }
.tr.dragging { background: var(--panel2, rgba(255,255,255,.08)); opacity: .9; }
.tr.dragging .drag { cursor: grabbing; }
/* the song an album was opened from */
.tr.focus { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
/* a song this person hid: still there, dimmed */
.tr.hid .ti, .tr.hid .cov { opacity: .45; }
.su .hidtag { background: rgba(255,255,255,.08); color: var(--dim); }
/* Settings: one line per thing, grouped; a line opens to its controls, or goes to its own page */
.settings { max-width: 680px; }
.setg { margin: 22px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.set { display: block; background: var(--panel); border-radius: 12px; margin-bottom: 6px; color: var(--text); }
.set > summary, .set.go { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; list-style: none; }
.set > summary::-webkit-details-marker { display: none; }
.set .st { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; }
.set .sv { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.set svg { width: 16px; height: 16px; fill: var(--faint); flex: none; transition: transform .15s; }
.set[open] > summary svg { transform: rotate(90deg); }
.set .sb { padding: 2px 16px 16px; }
.set .sb p { color: var(--dim); font-size: 13px; margin: 0 0 12px; }
.set .sb #ytl > h2 { display: none; }
.set.go:hover, .set > summary:hover { background: rgba(255,255,255,.03); border-radius: 12px; }
/* the first-sign-in guide: the page shows through, the card sits low, a ring marks where it is in the bar */
.guide { position: fixed; inset: 0; z-index: 85; background: rgba(4,6,10,.5); animation: fade .15s ease; }
.guide .g-ring { position: fixed; border-radius: 12px; box-shadow: 0 0 0 2px var(--accent), 0 0 18px 2px rgba(255,182,72,.45); pointer-events: none; transition: all .22s var(--ease); }
.guide .g-card { position: fixed; left: 50%; bottom: calc(var(--mini) + 22px); width: min(440px, calc(100% - 32px)); transform: translateX(calc(-50% + var(--side, 0px) / 2)); padding: 18px 18px 14px; border-radius: 20px; background: var(--raise); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.4); animation: fade .18s ease; }
.guide .g-n { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .2px; }
.guide h2 { margin: 4px 0 6px; font-size: 19px; }
.guide p { margin: 0 0 14px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.guide .g-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.guide .g-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: all .2s; }
.guide .g-dots i.on { width: 18px; background: var(--accent); }
.guide .g-row { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .guide .g-card { transform: translateX(-50%); bottom: calc(var(--tabs) + var(--mini) + 14px); } }
