/* Aux. Layout: single phone-width column, horizontal "your playlists" rail on top, people below,
   a mini player docked above the tab bar that expands into a full sheet. */
:root {
  --bg: #0B0D12; --surface: #14171F; --surface-2: #1C2029; --line: #262B36;
  --text: #ECEEF2; --muted: #8A90A0; --accent: #F2A65A; --on-accent: #1A1206;
  --good: #57C38A; --bad: #EF6B6B;
  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --r-sm: 10px;
  --tab-h: 64px; --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
:root[data-theme="graphite"] { --bg:#0E0E0E; --surface:#171717; --surface-2:#212121; --line:#2B2B2B; --text:#EDEDED; --muted:#8F8F8F; --accent:#5CC8B5; --on-accent:#06201B; color-scheme: dark; }
:root[data-theme="wine"]     { --bg:#120B0E; --surface:#1C1216; --surface-2:#27191F; --line:#35222B; --text:#F3E9EC; --muted:#A38D95; --accent:#E8707E; --on-accent:#2A0A10; color-scheme: dark; }
:root[data-theme="paper"]    { --bg:#F5F4F1; --surface:#FFFFFF; --surface-2:#ECEAE5; --line:#E0DDD6; --text:#17171B; --muted:#67666D; --accent:#C94E22; --on-accent:#FFFFFF; --good:#23854F; --bad:#C53B3B; color-scheme: light; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100%; padding: calc(var(--safe-t) + 0px) 0 calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 24px); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; display: inline-flex; align-items: baseline; gap: 2px; }
.wordmark .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.credits { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--muted); }
.credits-n { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Avatars: initial on a tint derived from the handle */
.avatar { --h: 30; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 600; font-size: 15px; background: hsl(var(--h) 45% 30%); color: hsl(var(--h) 70% 88%); position: relative; text-transform: uppercase; }
:root[data-theme="paper"] .avatar { background: hsl(var(--h) 55% 86%); color: hsl(var(--h) 55% 28%); }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; font-family: var(--font-display); }
.avatar.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2px solid var(--bg); }

/* Sections */
main { padding: 4px 0 0; outline: none; }
.section { padding: 0 16px; margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: 14px; }

/* Rail of your playlists */
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-card { flex: 0 0 136px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.rail-card .cover { width: 136px; height: 136px; }
.rail-card .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-card .s { font-size: 12px; color: var(--muted); }
.new-card .cover { display: grid; place-items: center; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); }

/* Cover mosaic from song thumbnails */
.cover { border-radius: var(--r); overflow: hidden; background: var(--surface-2); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.one img { grid-column: 1 / -1; grid-row: 1 / -1; }
.cover .empty { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-items: center; color: var(--muted); font-family: var(--font-display); font-size: 34px; }

/* People's playlists */
.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; }
.feed-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feed-card .meta { display: flex; gap: 8px; align-items: center; min-width: 0; }
.feed-card .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-card .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-card .text { min-width: 0; }
.slots { display: flex; gap: 3px; margin-top: 2px; }
.slots i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.slots i.on { background: var(--accent); }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 500; vertical-align: 1px; }

/* Buttons */
.btn { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.98); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--text); }
.icon-btn.lg svg { width: 28px; height: 28px; }
.icon-btn.ghost { visibility: hidden; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Playlist page */
.pl-head { padding: 8px 16px 0; display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: end; }
.pl-head .cover { width: 132px; }
.pl-head h1 { font-size: 26px; margin-top: 4px; overflow-wrap: anywhere; }
.pl-owner { display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); padding: 4px 16px 0 10px; font-size: 14px; background: none; border: 0; }
.btn.icon-only { width: 44px; padding: 0; }
.back svg { width: 20px; height: 20px; }
.songs { list-style: none; margin: 0; padding: 0; }
.song { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 16px; border-radius: var(--r-sm); }
.song:active { background: var(--surface); }
.song.now .st { color: var(--accent); }
.song .thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: block; }
.thumb-wrap { position: relative; display: block; cursor: pointer; }

/* Now-playing bars over the cover of whatever is playing; they rest when paused. */
.eq { display: none; position: absolute; inset: 0; border-radius: 8px; background: rgb(0 0 0 / .45); align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 30%; }
.now .eq { display: flex; }
.eq i { width: 4px; height: 30%; border-radius: 2px; background: var(--accent); transform-origin: bottom; }
.is-playing .eq i { animation: eq .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 { transform: scaleY(.35); } to { transform: scaleY(1.4); } }

/* Discover row */
.disc-card { flex: 0 0 132px; scroll-snap-align: start; position: relative; min-width: 0; }
.disc-art { display: block; position: relative; width: 132px; height: 132px; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.disc-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.disc-art:active img { transform: scale(.97); }
.disc-art .eq { border-radius: 0; }
.disc-save { position: absolute; top: 96px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgb(0 0 0 / .6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.disc-save svg { width: 18px; height: 18px; }
.disc-card .t { font-weight: 600; font-size: 14px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-card .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-card.now .t { color: var(--accent); }

/* Save-to-playlist picker */
.pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pick-list button { width: 100%; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 6px; border: 0; border-radius: 12px; background: none; text-align: left; }
.pick-list button:active:not(:disabled) { background: var(--surface-2); }
.pick-list button:disabled { opacity: .45; cursor: default; }
.pick-list .cover { width: 52px; border-radius: 8px; }
.pick-list .cover.new { display: grid; place-items: center; border: 1.5px dashed var(--line); background: none; color: var(--muted); }
.pick-list .pk { display: flex; flex-direction: column; min-width: 0; }
.pick-list .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-list .s { font-size: 13px; color: var(--muted); }
.song .st { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .sa { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .txt { min-width: 0; cursor: pointer; }
.added-by { color: var(--accent); }
.empty-state { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }

/* Lists of people */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.person .who { flex: 1; min-width: 0; }
.person .n { font-weight: 600; }
.person .h { font-size: 13px; color: var(--muted); }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 16px; width: 100%; }
.input:focus { outline: none; border-color: var(--accent); }
.input-wrap { position: relative; }
.input-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-wrap .input { padding-left: 32px; }
.error { color: var(--bad); font-size: 13px; min-height: 18px; }

/* Onboarding */
.onboard { min-height: 100%; padding: calc(var(--safe-t) + 48px) 20px 40px; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.onboard h1 { font-size: 40px; }
.onboard .lede { color: var(--muted); font-size: 16px; max-width: 34ch; }
.how { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 12px; counter-reset: s; }
.how li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; color: var(--muted); font-size: 14px; }
.how li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px; }
.how b { color: var(--text); font-weight: 600; }

/* Sync page */
.g-btn { min-height: 44px; display: flex; justify-content: center; }
.sync-card {background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--good); text-transform: uppercase; letter-spacing: .06em; }
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.stack { display: flex; }
.stack .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }
.pending { opacity: .55; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input-wrap { flex: 1; }

/* Theme picker */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatch { border: 1.5px solid var(--line); border-radius: 14px; padding: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; align-items: stretch; font-size: 12px; font-weight: 600; }
.swatch .sw { height: 46px; border-radius: 9px; position: relative; overflow: hidden; }
.swatch .sw::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--a); }
.swatch[aria-pressed="true"] { border-color: var(--accent); }

/* Player */
.player { position: fixed; left: 0; right: 0; z-index: 20; margin: 0 auto; max-width: 560px; background: var(--surface); }
.player.mini { bottom: calc(var(--tab-h) + var(--safe-b) + 8px); left: 8px; right: 8px; max-width: 544px; height: var(--mini-h); border-radius: 14px; border: 1px solid var(--line); display: grid; grid-template-columns: 96px 1fr; align-items: center; overflow: hidden; box-shadow: 0 10px 30px -12px rgb(0 0 0 / .5); }
.player.mini .player-sheet-head, .player.mini .player-full { display: none; }
.player.mini .video-wrap { width: 96px; height: var(--mini-h); border-radius: 0; }
.player.mini .player-meta { padding: 0 6px 0 12px; cursor: pointer; }
.player.full { top: 0; bottom: 0; overflow-y: auto; padding: calc(var(--safe-t) + 6px) 16px calc(var(--safe-b) + 24px); background: var(--bg); }
.player.full .pm-mini-controls { display: none; }
/* The song's cover, blurred, tints the full player. */
.player.full::before { content: ""; position: fixed; inset: -60px; z-index: -1; background: var(--art, none) center / cover no-repeat; filter: blur(60px) saturate(1.5); opacity: .38; pointer-events: none; transition: background-image .4s; }
:root[data-theme="paper"] .player.full::before { opacity: .22; }
.pm-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 10px; min-height: 36px; }
.pm-actions .btn { height: 36px; padding: 0 14px; margin-left: auto; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.player.full .video-wrap { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); }
.player.full .player-meta { padding: 18px 0 8px; }
.player.full .pm-title { font-family: var(--font-display); font-size: 22px; white-space: normal; }
.player.full .pm-sub { font-size: 15px; }
.player-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.video-wrap { position: relative; overflow: hidden; background: #000; }
.video-wrap iframe, #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Audius songs: the cover replaces the (stopped) video, and the full player goes square like an album. */
.art-big { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-wrap.audio .art-big { display: block; }
.video-wrap.audio #yt { visibility: hidden; }
.video-wrap.audio { cursor: pointer; }
.player.full .video-wrap.audio { aspect-ratio: 1; max-width: 340px; margin: 0 auto; }

/* Two-way switch (song source) */
.seg { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.seg button { height: 36px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line); }

.tap-audio { pointer-events: none; display: grid; place-items: center; text-align: center; position: absolute; inset: 0; z-index: 2; background: rgb(0 0 0 / .6); color: #fff; border: 0; font-weight: 600; font-size: 13px; padding: 4px; }
.player-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pm-text { flex: 1; min-width: 0; }
.pm-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-mini-controls { display: flex; }
.progress input { width: 100%; accent-color: var(--accent); height: 24px; margin: 0; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.controls { display: flex; justify-content: center; align-items: center; gap: 28px; margin: 14px 0 20px; }
.play-btn { width: 68px; height: 68px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.play-btn svg { width: 30px; height: 30px; }
.sync-strip:empty { display: none; }
.sync-strip { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: 22px 44px 1fr; gap: 12px; align-items: center; padding: 7px 0; cursor: pointer; }
.queue li .n { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.queue li img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.queue li.cur .qt { color: var(--accent); }
.queue .qt { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue .qa { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tab bar */
.tabbar { position: fixed; z-index: 15; bottom: 0; left: 0; right: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; justify-content: center; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); position: relative; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { color: var(--accent); }
.badge { position: absolute; top: 9px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%; background: var(--good); border: 2px solid var(--bg); }
.no-tabs .tabbar, .no-tabs .topbar { display: none; }

/* Toasts + modals */
.toasts { position: fixed; z-index: 60; top: calc(var(--safe-t) + 12px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: 420px; box-shadow: 0 8px 24px -8px rgb(0 0 0 / .4); animation: drop .25s ease-out; }
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } }
.modal-root:empty { display: none; }
.modal-root { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 18px calc(var(--safe-b) + 22px); max-height: 88%; overflow-y: auto; animation: up .25s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 14px; }
.sheet::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.sheet .sheet-top { display: flex; justify-content: space-between; align-items: center; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.invite { align-items: center; text-align: center; padding-top: 18px; }
.invite .avatar { margin: 6px auto 0; }
.invite .row-actions { width: 100%; }
.invite .row-actions .btn { flex: 1; }
.preview { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.preview img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.results { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.results li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.results img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }

/* Live lyrics */
.pm-actions .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.lyrics { --ly-h: clamp(190px, 36dvh, 380px); margin: -4px 0 20px; }
/* Fixed height with half-height padding, so the first and last lines can sit in the middle too.
   position: relative makes line offsets measure from the list itself, which the centring relies on. */
.lyrics ol { position: relative; list-style: none; margin: 0; height: var(--ly-h); padding: calc(var(--ly-h) / 2 - 22px) 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.lyrics ol::-webkit-scrollbar { display: none; }
.lyrics li { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; padding: 7px 0; color: var(--muted); opacity: .55; transition: color .3s, opacity .3s, transform .3s; transform-origin: left center; text-wrap: balance; }
.lyrics li.tap { cursor: pointer; }
.lyrics li.past { opacity: .35; }
.lyrics li.on { color: var(--text); opacity: 1; transform: scale(1.03); }
.lyrics ol.plain { padding: 8px 0; height: auto; max-height: var(--ly-h); }
.lyrics ol.plain li { font-family: var(--font-body); font-weight: 500; font-size: 17px; opacity: .9; color: var(--text); padding: 2px 0; }
.lyrics li.ly-msg { font-family: var(--font-body); font-size: 15px; font-weight: 500; opacity: 1; text-align: center; padding: 24px 0; }
.ly-credit { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.ly-credit a { text-decoration: underline; }

/* Party chat */
.strip-top { display: flex; align-items: center; gap: 12px; }
.chat { list-style: none; margin: 12px 0; padding: 4px 2px; display: flex; flex-direction: column; gap: 10px; max-height: 46vh; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; }
.chat li { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.chat li.mine { align-self: flex-end; }
.chat .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 7px 11px; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.chat .mine .bubble { background: var(--accent); color: var(--on-accent); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.chat .bubble .who { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 1px; }
.chat .bubble time { display: block; font-size: 10.5px; opacity: .6; margin-top: 2px; text-align: right; }
.chat li.system { align-self: center; max-width: 100%; font-size: 12px; color: var(--muted); }
.chat-form .input { flex: 1; }
.badge.chat { background: var(--accent); }

/* Reactions: icons, never emoji, in the app's own UI */
.reacts { display: flex; gap: 8px; }
.react-btn { flex: 1; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.react-btn svg { width: 22px; height: 22px; }
.react-btn.pop svg { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 40% { transform: scale(1.35); } }
.r-love { color: #EF6B8A; } .r-fire { color: #F2894A; } .r-star { color: #F2C94C; } .r-energy { color: #5CC8B5; }
.react-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.float-react { position: absolute; bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 24px); display: flex; flex-direction: column; align-items: center; gap: 2px; animation: rise 2.5s cubic-bezier(.2,.7,.3,1) forwards; }
.float-react svg { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .35)); }
.float-react span { font-size: 11px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 1px 6px; border-radius: 999px; }
@keyframes rise {
  0% { transform: translateY(20px) scale(.6); opacity: 0; }
  15% { transform: translateY(0) scale(1.1); opacity: 1; }
  100% { transform: translateY(-46vh) translateX(-24px) scale(.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* No travel: the reaction appears briefly in place. */
  .float-react { animation: fade 1.6s ease forwards !important; }
  @keyframes fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
}

/* Privacy and terms pages */
.doc { max-width: 680px; margin: 0 auto; padding: calc(var(--safe-t) + 28px) 20px 64px; }
.doc .wordmark { margin-bottom: 28px; }
.doc h1 { font-size: 34px; margin-bottom: 6px; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); max-width: 65ch; }
.doc ul { padding-left: 20px; display: grid; gap: 6px; }
.doc a:not(.wordmark) { color: var(--accent); text-decoration: underline; }

/* Photos in avatars */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

/* Inbox bell */
.bell { position: relative; color: var(--muted); width: 36px; height: 36px; }
.bell .dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.inbox { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.inbox a { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inbox .txt { font-size: 14px; }
.inbox .unread .txt { font-weight: 600; }
.inbox .unread a { position: relative; }
.inbox .unread a::after { content: ""; position: absolute; right: 0; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Likes */
.song { grid-template-columns: 56px 1fr auto auto; gap: 6px 10px; }
.icon-btn.like { width: auto; min-width: 40px; padding: 0 6px; gap: 3px; display: inline-flex; align-items: center; color: var(--muted); border-radius: 999px; }
.icon-btn.like svg { width: 20px; height: 20px; fill: none; transition: transform .15s ease; }
.icon-btn.like[aria-pressed="true"] { color: var(--accent); }
.icon-btn.like[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn.like:active svg { transform: scale(.85); }
.icon-btn.like .n { font-size: 12px; font-variant-numeric: tabular-nums; }
.tag.pick { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }

/* Picking several songs */
.sheet-foot { position: sticky; bottom: calc(-1 * (var(--safe-b) + 22px)); margin: 0 -18px calc(-1 * (var(--safe-b) + 22px)); padding: 12px 18px calc(var(--safe-b) + 16px); background: var(--surface); border-top: 1px solid var(--line); }
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0 8px; }
.results li.pickable { grid-template-columns: 48px 1fr 28px; cursor: pointer; border-radius: 10px; padding: 6px; margin: 0 -6px; }
.results li.pickable:focus-visible { outline: 2px solid var(--accent); }
.results li.pickable[aria-disabled="true"] { opacity: .45; cursor: default; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.check svg { width: 16px; height: 16px; }
[aria-checked="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* You page */
.profile { margin-top: 8px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.profile h1 { font-size: 26px; overflow-wrap: anywhere; }
.profile .bio { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.profile .btn { height: 36px; padding: 0 14px; align-self: start; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.setting-row .n { font-weight: 600; }
.toggle { flex: none; width: 50px; height: 30px; border-radius: 999px; border: 0; padding: 3px; background: var(--line); display: flex; transition: background .2s; }
.toggle span { width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"] span { transform: translateX(20px); }
.toggle:disabled { opacity: .5; }
.checkbox { width: 22px; height: 22px; accent-color: var(--accent); }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.textarea { height: auto; padding: 12px 14px; resize: vertical; font: inherit; line-height: 1.4; }
.dev-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; }
.legal a { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 600px) { .feed { grid-template-columns: 1fr 1fr 1fr; } }
