/* =========================================================
   B Music Entertainment
   Dark by default; light mode via the sun/moon button.
   ========================================================= */
:root {
  --bg: #0e1016;
  --bg-2: #12141b;
  --surface: #181b24;
  --surface-2: #20242f;
  --elev: #262a36;
  --player-bg: #0a0b10;
  --text: #f4f6fb;
  --muted: #a2a9b9;
  --faint: #6f7687;
  --line: rgba(255, 255, 255, 0.08);
  --hover: rgba(255, 255, 255, 0.07);
  --press: rgba(255, 255, 255, 0.12);
  --accent: #46a8ee;
  --accent-2: #4cc3c9;
  --on-accent: #04121f;
  --track: rgba(255, 255, 255, 0.22);
  --cover-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --tint-a: 1;
  --art: 34 58 92;
  --topbar-solid: rgba(14, 16, 22, 0.86);
  --side-w: 280px;
  --player-h: 88px;
  --tab-h: 58px;
  --card-w: 192px;
  --pad: 32px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6f9;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eceef3;
  --elev: #ffffff;
  --player-bg: #ffffff;
  --text: #11131a;
  --muted: #596071;
  --faint: #8a90a0;
  --line: rgba(0, 0, 0, 0.09);
  --hover: rgba(0, 0, 0, 0.05);
  --press: rgba(0, 0, 0, 0.09);
  --accent: #2b84d0;
  --on-accent: #ffffff;
  --track: rgba(0, 0, 0, 0.16);
  --cover-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  --tint-a: 0.42;
  --topbar-solid: rgba(245, 246, 249, 0.88);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; overscroll-behavior-y: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: var(--player-h);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img { display: block; }
h1, h2, h3, h4 { margin: 0; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
i[data-icon] { display: inline-grid; place-items: center; font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.u-link:hover, a.u:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ---------- App layout ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) auto; min-height: calc(100vh - var(--player-h)); }

.sidebar {
  position: sticky; top: 0; height: calc(100vh - var(--player-h));
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 12px 12px; background: var(--bg-2); border-right: 1px solid var(--line);
  overflow: hidden;
}
.brand { display: block; color: var(--text); padding: 0 12px 10px; }
.brand .logo { height: 44px; width: auto; overflow: visible; }
.brand .logo-mini { display: none; width: 34px; height: 34px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-install {
  display: flex; align-items: center; gap: 16px; padding: 10px 12px; border-radius: 8px;
  font-weight: 700; color: var(--muted); transition: color .15s, background .15s;
}
.side-nav a .ic { width: 24px; height: 24px; }
.side-nav a:hover, .side-install:hover { color: var(--text); }
.side-nav a.on { color: var(--text); background: var(--hover); }
.side-lib {
  flex: 1; min-height: 0; overflow-y: auto; margin-top: 8px; padding-top: 12px;
  border-top: 1px solid var(--line); scrollbar-width: thin;
}
.side-label { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin: 14px 12px 6px; }
.side-tile { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; }
.side-tile:hover { background: var(--hover); }
.side-tile.on { background: var(--press); }
.side-tile .cover, .tile-art { width: 48px; height: 48px; flex-shrink: 0; border-radius: 6px; box-shadow: none; }
.tile-art { display: grid; place-items: center; }
.tile-fav { background: linear-gradient(135deg, #3d5ee0, #8fb8f5); color: #fff; }
.tile-fav .ic { width: 22px; height: 22px; }
.tile-text { min-width: 0; display: flex; flex-direction: column; }
.tile-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-text small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-tile.playing .tile-text b { color: var(--accent); }
.side-install { width: 100%; margin-top: 6px; border: 1px solid var(--line); justify-content: center; font-size: 14px; }
.side-install[hidden] { display: none; }

.main-col { position: relative; min-width: 0; }
.tint {
  position: absolute; left: 0; right: 0; top: 0; height: 480px; pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--art) / var(--tint-a)) 0%, rgb(var(--art) / calc(var(--tint-a) * .45)) 50%, transparent 100%);
  transition: opacity .4s ease;
}
.tint.soft { height: 300px; opacity: .6; }

.topbar {
  position: sticky; top: 0; z-index: 6; height: 64px;
  display: flex; align-items: center; gap: 12px; padding: 0 var(--pad);
  transition: background .25s, box-shadow .25s;
}
.topbar.solid { background: var(--topbar-solid); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); box-shadow: 0 1px 0 var(--line); }
.nav-arrows { display: flex; gap: 8px; }
.m-brand { display: none; }
.round-btn {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(0, 0, 0, .38); color: var(--text); transition: background .15s, transform .1s;
}
:root[data-theme="light"] .round-btn { background: rgba(255, 255, 255, .7); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.round-btn .ic { width: 18px; height: 18px; }
.round-btn:hover { background: rgba(0, 0, 0, .6); }
:root[data-theme="light"] .round-btn:hover { background: #fff; }
.round-btn:active { transform: scale(.95); }
.round-btn[disabled] { opacity: .45; cursor: default; }
.round-btn.on-dark { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.round-btn.on-dark:hover { background: rgba(255,255,255,.2); }

.search {
  display: flex; align-items: center; gap: 10px; height: 46px; width: min(420px, 100%);
  background: var(--surface-2); border: 1px solid transparent; border-radius: 999px; padding: 0 18px;
  color: var(--muted); transition: border-color .15s, background .15s;
}
.search:hover { border-color: var(--line); background: var(--elev); }
.search:focus-within { border-color: var(--text); color: var(--text); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); cursor: pointer; }
.top-search { margin-left: 8px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }

.main { position: relative; z-index: 1; padding: 8px var(--pad) 40px; outline: none; min-height: 60vh; }
.page { animation: page-in .28s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cover art ---------- */
.cover {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); box-shadow: var(--cover-shadow); display: grid; place-items: center;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .cover-note { width: 38%; height: 38%; color: rgba(255,255,255,.85); }
.cover.round { border-radius: 50%; }
.cover .initials { font-size: 42px; font-weight: 900; color: #fff; letter-spacing: -0.02em; }

/* ---------- Hi-Res badge ---------- */
.hr-badge {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; line-height: 1;
  padding: 4px 7px; border-radius: 4px; border: 1px solid currentColor; color: var(--muted); white-space: nowrap;
}
.hr-badge .ic { width: 12px; height: 12px; }
.hr-badge[hidden] { display: none; }
.hr-badge.on-dark { color: rgba(255,255,255,.75); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.08); transform: scale(1.02); }
.btn .ic { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--faint); }
.btn-ghost:hover { border-color: var(--text); filter: none; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; filter: none; }

.icon-btn {
  position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); transition: color .15s, transform .1s;
}
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn[disabled]:hover { color: var(--muted); }
.toggle[aria-pressed="true"] { color: var(--accent); }
.toggle[aria-pressed="true"]::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor;
}
.fav-btn.on, .fav-btn.on:hover { color: var(--accent); }

.play-xl {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px rgba(0,0,0,.3);
  transition: transform .12s, filter .15s;
}
.play-xl .ic { width: 24px; height: 24px; }
.play-xl:hover { transform: scale(1.05); filter: brightness(1.08); }
.play-xl:active { transform: scale(.97); }
.play-xl[disabled] { opacity: .45; cursor: default; transform: none; }

.actions { display: flex; align-items: center; gap: 14px; margin: 6px 0 28px; }
.actions .icon-btn { width: 44px; height: 44px; }
.actions .icon-btn .ic { width: 28px; height: 28px; }
.actions .btn-ghost { padding: 8px 16px; font-size: 14px; }

/* ---------- Release / page header ---------- */
.rh { display: flex; align-items: flex-end; gap: 28px; padding: 20px 0 28px; }
.rh-art { width: clamp(170px, 20vw, 240px); flex-shrink: 0; }
.rh-art .cover { box-shadow: 0 12px 48px rgba(0,0,0,.5); }
.rh-text { min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 700; }
.rh h1 {
  font-size: clamp(36px, 6.4vw, 92px); font-weight: 900; letter-spacing: -0.045em; line-height: 1;
  margin: 6px 0 14px; overflow-wrap: anywhere;
}
.rh h1.long { font-size: clamp(32px, 4.6vw, 64px); }
.rh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; color: var(--muted); }
.rh-meta b, .rh-meta a.artist { color: var(--text); font-weight: 700; }
.rh-meta a.artist:hover { text-decoration: underline; }
.rh-meta .dot::before { content: "•"; margin: 0 2px; }
.rh-meta .hr-badge { margin-left: 6px; }
.mini-avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.mini-avatar .cover { border-radius: 50%; box-shadow: none; }
.mini-avatar .initials { font-size: 10px; }
.rh-desc { color: var(--muted); margin: 10px 0 0; max-width: 64ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.artist-hero { padding: 64px 0 28px; display: flex; align-items: flex-end; gap: 28px; }
.artist-hero .rh-art { width: clamp(150px, 16vw, 220px); }
.artist-hero .cover { border-radius: 50%; }
.artist-hero h1 { font-size: clamp(40px, 8vw, 104px); font-weight: 900; letter-spacing: -0.05em; line-height: 1; margin: 6px 0 14px; overflow-wrap: anywhere; }
.verified { display: inline-flex; align-items: center; gap: 6px; }
.verified .ic { width: 22px; height: 22px; color: var(--accent); }

/* ---------- Shelves (horizontal rows) ---------- */
.shelf { margin: 10px 0 30px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.shelf-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.shelf-head h2 a:hover { text-decoration: underline; }
.shelf-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.shelf-tools { display: flex; align-items: center; gap: 8px; }
.see-all { color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; }
.see-all:hover { color: var(--text); text-decoration: underline; }
.shelf-tools .round-btn { width: 30px; height: 30px; }
.shelf-row {
  display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  margin: 0 -12px; padding: 0 0 4px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > * { flex: 0 0 var(--card-w); scroll-snap-align: start; }

/* ---------- Cards ---------- */
.card { display: block; padding: 12px; border-radius: 10px; min-width: 0; transition: background .2s; cursor: pointer; }
.card:hover { background: var(--hover); }
.card-art { position: relative; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 16px rgba(0,0,0,.4); opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.card-play .ic { width: 22px; height: 22px; }
.card-play:hover { transform: scale(1.06); }
.card:hover .card-play, .card:focus-within .card-play, .card.playing .card-play { opacity: 1; transform: none; }
.card-title { display: block; font-weight: 700; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.playing .card-title { color: var(--accent); }
.card-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.artist .cover { border-radius: 50%; }
.card.soon .cover::after { content: "Coming soon"; position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
@media (hover: none) { .card-play { display: none; } .card:hover { background: none; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 4px; margin: 0 -12px; }

/* ---------- Song lists ---------- */
.songs { margin: 0 0 28px; }
.song-head, .song-row {
  display: grid; align-items: center; gap: 16px; padding: 0 16px;
  grid-template-columns: 32px minmax(0, 4fr) minmax(0, 2.2fr) minmax(0, 1.5fr) 132px;
}
.songs.compact .song-head, .songs.compact .song-row { grid-template-columns: 32px minmax(0, 1fr) minmax(90px, .5fr) 132px; }
.songs.compact .sr-album, .songs.compact .h-album { display: none; }
.sr-plays, .h-plays { text-align: right; font-variant-numeric: tabular-nums; }
.m-plays { display: none; }
.dotted:not(:empty)::before { content: "•"; margin: 0 6px 0 4px; }
.rh-meta .dotted:not(:empty)::before { margin: 0 6px 0 2px; }
.total-plays { color: var(--text); font-weight: 700; }
.total-plays:empty + .dotted::before { display: none; }
.song-head { height: 36px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.song-head .h-time { justify-self: end; margin-right: 46px; }
.song-head .h-time .ic { width: 16px; height: 16px; }
.song-row { height: 58px; border-radius: 6px; cursor: pointer; transition: background .12s; }
.song-row:hover, .song-row:focus-within { background: var(--hover); }
.sr-num { position: relative; display: grid; place-items: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.sr-num .sr-play { position: absolute; inset: -6px; display: none; place-items: center; color: var(--text); }
.sr-num .sr-play .ic { width: 16px; height: 16px; }
.song-row:hover .sr-num .n, .song-row:hover .sr-num .eq { display: none; }
.song-row:hover .sr-play { display: grid; }
.sr-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sr-main .cover { width: 42px; flex-shrink: 0; border-radius: 4px; box-shadow: none; }
.sr-text { min-width: 0; display: flex; flex-direction: column; }
.sr-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-title:hover { text-decoration: underline; }
.sr-sub { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub a:hover { color: var(--text); text-decoration: underline; }
.song-row.playing .sr-title { color: var(--accent); }
.sr-album, .sr-plays { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-album a:hover { color: var(--text); text-decoration: underline; }
.sr-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); }
.sr-end .time { font-size: 14px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.sr-end .icon-btn { width: 30px; height: 30px; }
.sr-end .icon-btn .ic { width: 18px; height: 18px; }
.sr-end .fav-btn:not(.on), .sr-end .more-btn { opacity: 0; }
.song-row:hover .sr-end .fav-btn, .song-row:hover .sr-end .more-btn,
.song-row:focus-within .sr-end .fav-btn, .song-row:focus-within .sr-end .more-btn { opacity: 1; }
.song-row.soon { cursor: default; opacity: .6; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.paused .eq i { animation-play-state: paused; }

/* ---------- Home / sections ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.panel { background: var(--surface); border-radius: 12px; padding: 20px; }
:root[data-theme="light"] .panel { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; }
.panel p { margin: 0 0 12px; color: var(--muted); }
.lyr-preview { background: linear-gradient(160deg, rgb(var(--art) / 1), rgb(var(--art) / .7)); color: #fff; border-radius: 12px; padding: 20px; }
.lyr-preview h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.lyr-preview p { margin: 0 0 4px; font-size: 20px; font-weight: 800; line-height: 1.35; color: rgba(255,255,255,.92); }
.lyr-preview .btn { margin-top: 14px; background: #fff; color: #111; }
.credits { margin: 0; }
.credits div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.credits div:last-child { border-bottom: 0; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; font-weight: 600; text-align: right; }
.copyline { color: var(--muted); font-size: 13px; margin: -10px 0 30px; }
.copyline p { margin: 2px 0; }

.page-title { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -0.035em; margin: 16px 0 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 22px; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 7px 15px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s; }
.chip:hover { background: var(--elev); }
.chip.on { background: var(--text); color: var(--bg); }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state .ic { width: 48px; height: 48px; margin: 0 auto 14px; color: var(--faint); }
.empty-state h3 { color: var(--text); font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.empty-state p { margin: 0 auto 18px; max-width: 42ch; }

/* Search */
.m-search { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tile {
  position: relative; overflow: hidden; aspect-ratio: 1.55; border-radius: 10px; padding: 16px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: #fff; background: var(--c);
  transition: transform .15s;
}
.tile:hover { transform: scale(1.02); }
.tile .tile-img { position: absolute; right: -14px; bottom: -8px; width: 45%; transform: rotate(25deg); border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.tile .tile-img .cover { box-shadow: none; border-radius: 6px; }
.tile .tile-icon { position: absolute; right: 14px; bottom: 14px; width: 56px; height: 56px; opacity: .85; transform: rotate(18deg); }
.results-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; margin-bottom: 28px; }
.results-top h2, .section-h { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.top-result { position: relative; display: block; background: var(--surface); border-radius: 12px; padding: 20px; transition: background .2s; }
:root[data-theme="light"] .top-result { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.top-result:hover { background: var(--surface-2); }
.top-result .cover { width: 96px; margin-bottom: 18px; }
.top-result .tr-title { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-result .tr-sub { color: var(--muted); font-size: 14px; }
.top-result .tr-sub b { color: var(--text); background: var(--press); padding: 3px 10px; border-radius: 999px; margin-right: 6px; font-size: 13px; }
.top-result .card-play { right: 20px; bottom: 20px; }
.top-result:hover .card-play, .top-result:focus-within .card-play { opacity: 1; transform: none; }
.results-top .songs { margin: 0; }

/* Text pages */
.prose { max-width: 70ch; font-size: 16px; line-height: 1.65; }
.prose h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 28px 0 8px; }
.prose p { margin: 0 0 12px; color: var(--muted); }
.prose a { color: var(--accent); }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.social a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: 14px; }
.social a:hover { background: var(--elev); }
.social a .ic { width: 18px; height: 18px; }

/* Footer */
.footer { margin-top: 48px; padding: 32px 0 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer h4 { color: var(--text); font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--text); text-decoration: underline; }
.foot-social { display: flex; gap: 10px; }
.foot-social a { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--text); }
.foot-social a:hover { background: var(--elev); text-decoration: none; }
.foot-social .ic { width: 18px; height: 18px; }
.copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }

/* Loading placeholders */
.sk { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-hero { display: flex; gap: 28px; align-items: flex-end; padding: 20px 0 36px; }
.sk-art { width: clamp(170px, 20vw, 240px); aspect-ratio: 1; flex-shrink: 0; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.sk-line { height: 14px; border-radius: 999px; margin-bottom: 14px; }
.sk-lines .sk-line { margin: 0; }
.sk-line.tall { height: 56px; border-radius: 10px; }
.w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w60 { width: 60%; }
.skel-row { display: flex; gap: 20px; overflow: hidden; }
.sk-card { flex: 0 0 calc(var(--card-w) - 24px); aspect-ratio: 1; }

/* ---------- Queue ---------- */
.queue {
  position: sticky; top: 0; width: 340px; height: calc(100vh - var(--player-h));
  display: flex; flex-direction: column; background: var(--bg-2); border-left: 1px solid var(--line);
}
.queue[hidden] { display: none; }
.queue-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px 20px; }
.queue-head h2 { font-size: 18px; font-weight: 800; }
.queue-head .round-btn { background: transparent; box-shadow: none; }
.queue-head .round-btn:hover { background: var(--hover); }
.queue-body { flex: 1; overflow-y: auto; padding: 0 8px 24px; }
.q-label { font-size: 15px; font-weight: 800; margin: 16px 12px 6px; }
.q-label small { color: var(--muted); font-weight: 600; display: block; font-size: 13px; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; width: 100%; text-align: left; cursor: pointer; }
.q-item:hover { background: var(--hover); }
.q-item .cover { width: 46px; flex-shrink: 0; border-radius: 4px; box-shadow: none; }
.q-item .tile-text b { font-weight: 600; }
.q-item.now .tile-text b { color: var(--accent); }
.q-item .tile-text { flex: 1; }
.q-item .icon-btn { opacity: 0; }
.q-item:hover .icon-btn, .q-item:focus-within .icon-btn { opacity: 1; }
.q-empty { color: var(--muted); font-size: 14px; margin: 4px 12px; }

/* ---------- Player bar ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; height: var(--player-h);
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.6fr) minmax(180px, 1fr); align-items: center; gap: 16px;
  padding: 0 16px; background: var(--player-bg); border-top: 1px solid var(--line);
}
.pl-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-cover { width: 58px; height: 58px; flex-shrink: 0; }
.pl-cover .cover { border-radius: 6px; box-shadow: none; }
.pl-cover:empty { display: none; }
.pl-meta { min-width: 0; display: flex; flex-direction: column; }
.pl-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-artist { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.pl-title:hover, a.pl-artist:hover { text-decoration: underline; color: var(--text); }
.pl-fav[hidden] { display: none; }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pl-controls { display: flex; align-items: center; gap: 14px; }
.pl-controls .icon-btn .ic { width: 20px; height: 20px; }
.play-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: var(--bg); transition: transform .1s;
}
.play-btn .ic { width: 18px; height: 18px; }
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(.96); }
.pl-progress { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 640px; }
.time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; }
#cur { text-align: right; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.pl-right .hr-badge { margin-right: 6px; }
.pl-right .vol { width: 110px; }
.mini-play, .mini-progress { display: none; }

/* Sliders (seek + volume) */
.slider {
  --pct: 0%; --fill: var(--text);
  -webkit-appearance: none; appearance: none; flex: 1; width: 100%; height: 16px; margin: 0; cursor: pointer; background: transparent;
  background-image: linear-gradient(var(--fill), var(--fill)), linear-gradient(var(--track), var(--track));
  background-size: var(--pct) 4px, 100% 4px; background-position: 0 50%, 0 50%; background-repeat: no-repeat;
}
.slider:hover, .slider:focus-visible, .slider:active { --fill: var(--accent); }
.slider:focus-visible { outline-offset: 0; }
.slider::-webkit-slider-runnable-track { height: 16px; background: transparent; }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; margin-top: 2px; border-radius: 50%; border: 0;
  background: var(--text); box-shadow: 0 2px 4px rgba(0,0,0,.4); opacity: 0; transition: opacity .15s;
}
.slider::-moz-range-track { height: 4px; background: transparent; }
.slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 0; background: var(--text); box-shadow: 0 2px 4px rgba(0,0,0,.4); opacity: 0; transition: opacity .15s; }
.slider:hover::-webkit-slider-thumb, .slider:focus-visible::-webkit-slider-thumb, .slider:active::-webkit-slider-thumb { opacity: 1; }
.slider:hover::-moz-range-thumb, .slider:focus-visible::-moz-range-thumb, .slider:active::-moz-range-thumb { opacity: 1; }
.slider.on-dark { --fill: #fff; --track: rgba(255,255,255,.28); }
.slider.on-dark:hover, .slider.on-dark:active { --fill: #fff; }
.slider.on-dark::-webkit-slider-thumb { background: #fff; opacity: 1; }
.slider.on-dark::-moz-range-thumb { background: #fff; opacity: 1; }

/* ---------- Tab bar (phones) ---------- */
.tabbar { display: none; }

/* ---------- Lyrics ---------- */
.lyrics {
  position: fixed; left: 0; right: 0; top: 0; bottom: var(--player-h); z-index: 9;
  overflow: hidden; color: #fff; background: rgb(var(--art)); animation: ly-in .25s ease;
}
@keyframes ly-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.lyrics[hidden] { display: none; }
.ly-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(50px) saturate(1.3); opacity: .45; transform: scale(1.1); }
.lyrics::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45)); pointer-events: none; }
.ly-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; max-width: 920px; margin: 0 auto; padding: 24px 24px 0; }
.ly-head { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.ly-cover { width: 64px; flex-shrink: 0; }
.ly-cover .cover { border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.ly-meta { min-width: 0; flex: 1; }
.ly-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.ly-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.ly-artist { color: rgba(255,255,255,.7); font-size: 14px; }
.ly-lines {
  position: relative; flex: 1; overflow-y: auto; padding: 8vh 0 30vh; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 80%, transparent 100%);
}
.ly-lines::-webkit-scrollbar { display: none; }
.ly-line { font-size: clamp(24px, 3.6vw, 40px); font-weight: 800; line-height: 1.25; margin: 0 0 16px; letter-spacing: -0.015em; color: rgba(255,255,255,.95); transition: color .3s, opacity .3s, transform .3s; transform-origin: left center; }
.ly-backing { font-weight: 600; font-style: italic; font-size: clamp(18px, 2.6vw, 26px); color: rgba(255,255,255,.65); }
.ly-gap { height: 28px; }
.ly-note { color: rgba(255,255,255,.6); font-size: 14px; margin-top: 30px; }
.ly-lines.is-synced .ly-line { color: rgba(255,255,255,.34); cursor: pointer; }
.ly-lines.is-synced .ly-line.past { color: rgba(255,255,255,.55); }
.ly-lines.is-synced .ly-line.active { color: #fff; transform: scale(1.02); }
.ly-lines.is-synced .ly-line:hover { color: rgba(255,255,255,.8); }
.ly-sync { flex-shrink: 0; margin-top: 16px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 14px 18px; font-size: 14px; }
.ly-sync ol { margin: 8px 0 12px; padding-left: 20px; }
.ly-sync li { margin-bottom: 4px; }
.ly-sync kbd { background: rgba(255,255,255,.15); border-radius: 4px; padding: 1px 6px; font-family: inherit; font-size: 12px; }
.ly-sync .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.ly-sync textarea { width: 100%; font: 12px/1.4 ui-monospace, Consolas, monospace; background: rgba(0,0,0,.4); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 8px; }
.sync-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.sync-status { color: #cfe6fb; font-weight: 600; }
.cue-sample { background: var(--accent); color: #fff; border-radius: 4px; padding: 0 5px; }
.ly-line.cue { color: #fff; background: rgba(61, 143, 214, .45); border-radius: 10px; padding: 2px 10px; margin-left: -10px; }
.ly-line.done { color: rgba(255,255,255,.4); }

/* ---------- Full-screen Now Playing (phones) ---------- */
.np {
  position: fixed; inset: 0; z-index: 25; height: 100vh; height: 100dvh;
  overflow: hidden; color: #fff; background: rgb(var(--art));
  animation: np-in .34s cubic-bezier(.2, .8, .2, 1); touch-action: pan-y;
}
.np[hidden] { display: none; }
@keyframes np-in { from { transform: translateY(100%); } to { transform: none; } }
.np-bg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(60px) saturate(1.4); opacity: .55; transform: scale(1.15); }
.np::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.3) 50%, rgba(0,0,0,.6)); pointer-events: none; }
.np-inner {
  position: relative; z-index: 1; height: 100%; width: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(8px + env(safe-area-inset-top)) 24px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
}
.np-inner::-webkit-scrollbar { display: none; }
.np-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; flex-shrink: 0; }
.np-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.np-icon .ic { width: 24px; height: 24px; }
.np-icon:active { background: rgba(255,255,255,.12); }
.np-head-text { min-width: 0; }
.np-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.np-album { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-art { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 22px 0; min-height: 0; }
.np-art-inner { width: min(100%, 46vh); will-change: transform; }
.np-art-inner .cover { box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.np-info { flex-shrink: 0; display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-text { flex: 1; min-width: 0; }
.np-title { font-size: 23px; font-weight: 800; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { display: block; color: rgba(255,255,255,.72); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-fav.on { color: var(--accent-2); }
.np-progress { flex-shrink: 0; margin-top: 14px; }
.np-times { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,.72); font-variant-numeric: tabular-nums; margin-top: 2px; min-height: 22px; }
.np-controls { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.np-btn { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.np-btn .ic { width: 34px; height: 34px; }
.np-btn.sm .ic { width: 24px; height: 24px; }
.np-btn.sm[aria-pressed="false"] { color: rgba(255,255,255,.8); }
.np-btn.toggle[aria-pressed="true"] { color: var(--accent-2); }
.np-btn:active { background: rgba(255,255,255,.12); }
.np-play { width: 72px; height: 72px; background: #fff; color: #111; }
.np-play .ic { width: 30px; height: 30px; }
.np-play:active { background: #fff; transform: scale(.95); }
.np-extra { flex-shrink: 0; display: flex; justify-content: space-between; margin-top: 8px; }
.np-extra .np-icon .ic { width: 20px; height: 20px; }
.np-lyrics {
  flex-shrink: 0; margin-top: 14px; width: 100%; text-align: left; color: #fff;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(0,0,0,.22); border-radius: 14px; padding: 16px;
}
.np-lyrics[hidden] { display: none; }
.np-lyrics-label { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.np-lyrics-line { font-size: 20px; font-weight: 800; line-height: 1.3; min-height: 1.3em; }
.np-lyrics-next { font-size: 20px; font-weight: 800; line-height: 1.3; color: rgba(255,255,255,.45); min-height: 1.3em; }
body.np-open { overflow: hidden; }
body.np-open .lyrics { z-index: 35; bottom: 0; }
body.np-open .ly-inner { padding-top: calc(16px + env(safe-area-inset-top)); }

/* ---------- "..." menu ---------- */
.menu-backdrop { position: fixed; inset: 0; z-index: 40; }
.menu-backdrop[hidden], .menu[hidden] { display: none; }
.menu {
  position: fixed; z-index: 41; width: 250px; padding: 4px; max-height: calc(100vh - 16px); overflow-y: auto;
  background: var(--elev); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: menu-in .14s ease;
}
@keyframes menu-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.menu .menu-head, .menu .menu-cancel { display: none; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 4px; text-align: left; font-size: 14px; font-weight: 500; }
.menu-item .ic { width: 18px; height: 18px; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); }
.menu-item.on .ic { color: var(--accent); }
.menu-item[hidden] { display: none; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- Credits pop-up ---------- */
.info {
  border: 0; padding: 22px; border-radius: 14px; width: min(400px, calc(100vw - 32px));
  background: var(--elev); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.info::backdrop { background: rgba(0,0,0,.6); }
.info-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.info-head .cover { width: 64px; flex-shrink: 0; border-radius: 6px; }
.info-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.info-artist { color: var(--muted); }
.info-list { margin: 0; border-top: 1px solid var(--line); }
.info-list div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; text-align: right; }
.info-desc { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.info-done { width: 100%; margin-top: 18px; }

/* ---------- Toast + pull to refresh ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.ptr {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; z-index: 15; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; transform: translate(-50%, -80px); opacity: 0; pointer-events: none;
  background: var(--elev); color: var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.ptr .ic { width: 20px; height: 20px; transition: transform .2s ease; }
.ptr.ready { background: var(--accent); color: var(--on-accent); }
.ptr.loading .ic { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   Medium screens: icon-only sidebar
   ========================================================= */
@media (max-width: 1180px) and (min-width: 769px) {
  :root { --side-w: 84px; --card-w: 176px; --pad: 24px; }
  .sidebar { padding: 18px 10px 12px; align-items: center; }
  .brand { padding: 0 0 10px; }
  .brand .logo { display: none; }
  .brand .logo-mini { display: block; }
  .side-nav a { justify-content: center; padding: 12px; }
  .side-nav a span, .tile-text, .side-label, .side-install span { display: none; }
  .side-lib { width: 100%; }
  .side-tile { justify-content: center; padding: 6px; }
  .side-install { padding: 10px; border: 0; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .song-head, .song-row { grid-template-columns: 32px minmax(0, 3fr) minmax(0, 2fr) 132px; }
  .sr-album, .song-head .h-album { display: none; }
  .queue { position: fixed; right: 0; top: 0; bottom: var(--player-h); height: auto; z-index: 11; box-shadow: -12px 0 40px rgba(0,0,0,.35); }
}

/* =========================================================
   Phones
   ========================================================= */
@media (max-width: 768px) {
  :root { --card-w: 150px; --pad: 16px; --mini-h: 58px; }
  body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }
  body.has-track { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--mini-h) + 20px); }
  .app { display: block; }
  .sidebar { display: none; }

  .topbar { height: auto; min-height: 56px; padding: calc(8px + env(safe-area-inset-top)) var(--pad) 8px; }
  .nav-arrows, .top-search { display: none; }
  body:not(.is-root) .nav-arrows { display: flex; margin-right: 2px; }
  body:not(.is-root) .nav-arrows [data-action="forward"] { display: none; }
  .pl-meta { flex: 1; }
  .m-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; min-width: 0; }
  .m-brand svg { width: 30px; height: 30px; flex-shrink: 0; }
  .m-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .round-btn { background: transparent; box-shadow: none; }
  .tint { height: 420px; }

  .main { padding: 4px var(--pad) 24px; }
  .rh, .artist-hero { flex-direction: column; align-items: stretch; gap: 18px; padding: 8px 0 18px; }
  .rh-art { width: min(66vw, 280px); margin: 0 auto; }
  .artist-hero { padding-top: 24px; }
  .artist-hero .rh-art { width: min(52vw, 220px); }
  .rh h1 { font-size: clamp(28px, 8vw, 40px); letter-spacing: -0.03em; margin: 2px 0 10px; }
  .rh h1.long { font-size: 26px; }
  .artist-hero h1 { font-size: clamp(36px, 11vw, 52px); }
  .eyebrow { font-size: 12px; color: var(--muted); }
  .actions { margin: 0 0 18px; gap: 10px; }
  .actions .play-xl { margin-left: auto; order: 9; }
  .actions .icon-btn { width: 40px; height: 40px; }
  .actions .icon-btn .ic { width: 26px; height: 26px; }

  .shelf-head h2 { font-size: 21px; }
  .shelf-tools .round-btn { display: none; }
  .shelf-row { margin: 0 calc(var(--pad) * -1); padding: 0 calc(var(--pad) - 12px); scroll-padding: 0 calc(var(--pad) - 12px); }
  .card { padding: 8px 6px; }
  .card-title { font-size: 14px; }
  .card-sub { font-size: 13px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -6px; }

  .song-head { display: none; }
  .song-row, .songs.compact .song-row { grid-template-columns: minmax(0, 1fr) auto; height: 62px; padding: 0 4px 0 0; gap: 8px; }
  .song-row:hover { background: none; }
  .song-row:active { background: var(--hover); }
  .sr-num, .sr-album, .sr-plays, .sr-end .time { display: none; }
  .m-plays { display: inline; }
  .songs.numbered .sr-num { display: grid; }
  .songs.numbered .song-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .songs.numbered .sr-main .cover { display: none; }
  .song-row:hover .sr-num .n, .song-row:hover .sr-num .eq { display: initial; }
  .song-row:hover .sr-play { display: none; }
  .sr-main .cover { width: 50px; }
  .sr-end .more-btn, .sr-end .fav-btn.on { opacity: 1; }
  .sr-end .fav-btn:not(.on) { display: none; }

  .two-col { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .page-title { margin: 8px 0 14px; }
  .m-search { display: flex; width: 100%; height: 48px; border-radius: 8px; background: var(--text); color: #333; margin-bottom: 22px; }
  .m-search input { color: #111; }
  .m-search input::placeholder { color: #555; }
  .m-search:focus-within { border-color: transparent; color: #111; }
  :root[data-theme="light"] .m-search { background: var(--surface-2); color: var(--muted); }
  :root[data-theme="light"] .m-search input { color: var(--text); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { font-size: 16px; padding: 12px; }
  .tile .tile-icon { width: 40px; height: 40px; }
  .results-top { grid-template-columns: minmax(0, 1fr); }
  .top-result .card-play { display: none; }

  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Queue becomes a full-screen sheet */
  .queue { position: fixed; inset: 0; z-index: 30; width: auto; height: 100dvh; border: 0; padding-top: env(safe-area-inset-top); animation: np-in .3s cubic-bezier(.2,.8,.2,1); }

  /* Floating mini player */
  .player {
    left: 8px; right: 8px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 6px);
    height: var(--mini-h); padding: 0 6px 0 8px; gap: 4px; border: 0; border-radius: 10px; overflow: hidden;
    grid-template-columns: minmax(0, 1fr) auto auto; color: #fff;
    background: rgb(var(--mini-art, 40 58 88)); box-shadow: 0 8px 28px rgba(0,0,0,.35);
    transition: background .4s;
  }
  body:not(.has-track) .player { display: none; }
  .pl-center, .pl-right { display: none; }
  .pl-cover { width: 42px; height: 42px; pointer-events: none; }
  .pl-cover .cover { border-radius: 5px; }
  .pl-meta { pointer-events: none; }
  .pl-title { font-size: 14px; color: #fff; }
  .pl-artist { color: rgba(255,255,255,.75); font-size: 13px; }
  .pl-now { cursor: pointer; }
  .pl-fav { color: rgba(255,255,255,.85); width: 40px; height: 40px; }
  .pl-fav:hover { color: #fff; }
  .pl-fav.on { color: var(--accent-2); }
  .mini-play { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; }
  .mini-play .ic { width: 26px; height: 26px; }
  .mini-progress { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255,255,255,.25); border-radius: 2px; overflow: hidden; }
  .mini-progress i { display: block; height: 100%; width: 0; background: #fff; }

  /* Tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 13;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(180deg, transparent, var(--bg) 42%);
  }
  :root[data-theme="dark"] .tabbar { background: linear-gradient(180deg, rgba(14,16,22,.2), rgba(14,16,22,.96) 40%); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a .ic { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--text); }
  .tabbar a:active { transform: scale(.95); }

  .lyrics { bottom: 0; z-index: 35; }
  .ly-inner { padding: calc(14px + env(safe-area-inset-top)) 18px 0; }
  .ly-cover { width: 48px; }
  .ly-title { font-size: 18px; }
  .ly-line { font-size: 26px; }

  .toast { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--mini-h) + 18px); }

  /* Phone action sheet */
  .menu-backdrop { background: rgba(0,0,0,.55); animation: fade-in .2s ease; }
  .menu {
    left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto; padding: 8px; border-radius: 16px; max-height: 80vh; animation: sheet-in .26s cubic-bezier(.2,.8,.2,1);
  }
  .menu .menu-head { display: flex; align-items: center; gap: 12px; padding: 6px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .menu-head .cover { width: 48px; flex-shrink: 0; border-radius: 4px; }
  .menu-title { font-weight: 700; }
  .menu-sub { color: var(--muted); font-size: 13px; }
  .menu-item { padding: 13px 12px; font-size: 16px; }
  .menu-item .ic { width: 22px; height: 22px; }
  .menu .menu-cancel { display: block; text-align: center; font-weight: 700; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
}
@media (min-width: 769px) { .np { display: none !important; } }
@keyframes sheet-in { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* iPhone/Android app installed to the home screen */
@media (display-mode: standalone) { .side-install { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .shelf-row { scroll-behavior: auto; }
}

/* =========================================================
   November 2026 additions
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Desktop player bar picks up the color of the song's cover art */
@media (min-width: 769px) {
  body.has-track .player { background: linear-gradient(90deg, rgb(var(--mini-art, 34 58 92) / .42), rgb(var(--mini-art, 34 58 92) / .12) 38%, var(--player-bg) 70%); transition: background .5s; }
  :root[data-theme="light"] body.has-track .player { background: linear-gradient(90deg, rgb(var(--mini-art, 34 58 92) / .16), var(--player-bg) 55%); }
}
.player .pl-now { will-change: transform; }

/* Credits */
.credits-sub { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 4px; }

/* Lyrics translation buttons */
.ly-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; flex-shrink: 0; }
.ly-opts[hidden] { display: none; }
.ly-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); transition: background .15s; }
.ly-chip .ic { width: 16px; height: 16px; }
.ly-chip:hover { background: rgba(255,255,255,.22); }
.ly-chip[aria-pressed="true"] { background: #fff; color: #111; border-color: #fff; }
.ly-tr { display: block; font-size: .56em; font-weight: 600; font-style: normal; letter-spacing: 0; line-height: 1.35; margin-top: 4px; opacity: .85; }

/* Email sign-up */
.signup {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin: 36px 0 8px; padding: 26px 28px; border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, rgb(var(--art) / 1), rgb(var(--art) / .55)), linear-gradient(120deg, #1b3b66, #0f6f78);
}
.signup-text { flex: 1 1 280px; min-width: 0; }
.signup h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 4px; }
.signup p { margin: 0; color: rgba(255,255,255,.82); font-size: 15px; }
.signup-form { display: flex; gap: 10px; flex: 1 1 340px; }
.signup-form input[type="email"] {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.25); color: #fff; font: inherit; font-size: 15px;
}
.signup-form input[type="email"]::placeholder { color: rgba(255,255,255,.65); }
.signup-form input[type="email"]:focus { outline: 2px solid #fff; outline-offset: 1px; }
.signup-form .btn { background: #fff; color: #111; height: 46px; white-space: nowrap; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-msg { flex-basis: 100%; min-height: 0; font-weight: 600; }
.signup-msg:empty { display: none; }

/* Keyboard shortcuts */
.kb-icon { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.kb-icon .ic { width: 32px; height: 32px; }
.info-list kbd { display: inline-block; font: 600 13px/1 Inter, system-ui, sans-serif; padding: 5px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.info-list dd:has(kbd) { font-weight: 400; }
@media (hover: none), (max-width: 768px) { .kb-link { display: none; } }

@media (max-width: 768px) {
  .signup { padding: 20px; gap: 16px; margin-top: 28px; }
  .signup h3 { font-size: 19px; }
  .signup-form { flex-direction: column; flex-basis: 100%; }
  .signup-form input[type="email"] { flex: none; width: 100%; }
  .signup-form .btn { width: 100%; justify-content: center; }
  .ly-chip { font-size: 13px; padding: 6px 12px; }
}
