/* Colours come from sheen (sheen.css), so the page follows the phone's light or dark setting like the Flutter app. */
:root {
  --sheen-accent: #D92D45; --sheen-accent-text: #D92D45;
  --bg: var(--sheen-background);
  --surface: var(--sheen-surface-muted);
  --surface-2: var(--sheen-track);
  --surface-3: color-mix(in srgb, var(--sheen-track) 82%, var(--sheen-text));
  --text: var(--sheen-text);
  --muted: var(--sheen-text-secondary);
  --accent: var(--sheen-accent);
  --accent-text: var(--sheen-on-accent);
  --line: var(--sheen-separator);
  --chart: #f04656; /* validated for the dark surface: L 0.48–0.67, ≥3:1 */
  --ok: var(--sheen-success);
  --danger: var(--sheen-danger);
  --elev: var(--sheen-surface); /* a raised control on --surface */
  --radius: 12px;
  --mini-h: 60px;
  --tab-h: 70px; /* the dock: 62 high, 8 above the safe area */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sheen-accent: #FF4D63; --sheen-accent-text: #FF6B7E; --elev: var(--sheen-track); } }
:root[data-theme="dark"] { --sheen-accent: #FF4D63; --sheen-accent-text: #FF6B7E; --elev: var(--sheen-track); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
  overflow-x: hidden;
}
body.has-mini { padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 34px); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
/* The Flutter app's SheenPage: a fixed bar (glass back button, a small title once scrolled, one glass button at the
   end) over a fading top edge, and a large title at the top of the content. */
.top {
  position: fixed; top: 0; inset-inline: 0; z-index: 5; pointer-events: none;
  height: calc(var(--safe-t) + 66px); padding: calc(var(--safe-t) + 7px) 16px 0;
  display: flex; align-items: flex-start; gap: 8px;
  background: linear-gradient(var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 55%, transparent);
}
.top:not(.collapsed) { background: none; }
.top > * { pointer-events: auto; }
.top-title { position: absolute; top: calc(var(--safe-t) + 7px); inset-inline: 68px; height: 44px; display: grid; place-items: center;
  font-size: 17px; font-weight: 600; letter-spacing: -0.026em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .2s; pointer-events: none; }
.top.collapsed .top-title { opacity: 1; }
.top-end { margin-inline-start: auto; }
.top-end:empty { display: none; }
.glass-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
.glass-btn svg { width: 21px; height: 21px; }
.glass-btn:active svg { transform: scale(.9); }
.large-head { padding: calc(var(--safe-t) + 64px) 4px 16px; }
.large-head h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.008em; overflow-wrap: anywhere; }
.page-sub { margin: 4px 0 0; font-size: 15px; line-height: 1.3; color: var(--muted); }

main { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- bottom dock (sheen) ---------- */
.tabbar .sheen-dock-tabs.no-lens .sheen-dock-lens { opacity: 0; }
.tabbar.sheen-dock { z-index: 9; } /* under the mini player, the full player and sheets */

/* ---------- common ---------- */
.status { color: var(--muted); margin: 12px 0; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin: 16px 0; }
.link { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.link svg { width: 18px; height: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 6px; flex-wrap: wrap; }
.section-head h3, .section-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.greeting { font-size: 17px; color: var(--muted); margin: 0 0 14px; }

.seg { display: inline-flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; min-height: 36px; }
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.seg.wide { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; gap: 0; padding: 3px; border-radius: 999px; background: var(--surface); }
.seg.wide button { justify-content: center; background: none; font-weight: 500; white-space: nowrap; padding-inline: 6px; }
.seg.wide button[aria-checked="true"], .seg.wide button[aria-selected="true"] { background: var(--elev); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 0 0 .5px var(--line); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 12px; min-height: 40px;
  border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 15px; white-space: nowrap; }
.pill svg { width: 20px; height: 20px; }
.pill.ghost { background: var(--surface); color: var(--text); }
.pill.small { min-height: 36px; padding: 6px 14px 6px 10px; font-size: 14px; font-weight: 500; }
.pill[disabled] { opacity: .4; }
.lib-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions { margin: 4px 0 12px; }

/* ---------- search ---------- */
.search { position: relative; margin-top: 4px; }
.search-icon { position: absolute; left: 14px; top: 24px; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 44px;
  border-radius: 14px; border: 1px solid transparent;
  background: var(--surface); color: var(--text); font-size: 17px; /* ≥16px: no iOS zoom */
}
.search input:focus { outline: none; border-color: var(--accent); }
.search input::placeholder { color: var(--muted); }
.suggest {
  position: absolute; left: 0; right: 0; top: 52px; z-index: 6; list-style: none; margin: 0; padding: 6px 0;
  background: var(--elev); border-radius: 14px; box-shadow: inset 0 0 0 .5px var(--line), 0 12px 30px rgba(0,0,0,.18);
}
.suggest-item { padding: 10px 16px; cursor: pointer; font-size: 16px; }
.suggest-item[aria-selected="true"], .suggest-item:hover { background: var(--sheen-tonal); }
.history-row .play svg { color: var(--muted); margin: 0 4px 0 6px; }

/* ---------- song rows ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 2px; border-radius: var(--radius); background: var(--bg); transition: transform .12s ease; }
.row .play {
  flex: 1; min-width: 0; min-height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 6px 4px; text-align: left; border-radius: var(--radius);
}
.row .play:active { background: var(--sheen-tonal); }
.row img, .row .ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface); flex: none; box-shadow: inset 0 0 0 .5px var(--line); }
.ph { display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.round { border-radius: 50% !important; }
.row.video img { width: 64px; height: 36px; margin: 6px 0; }
.meta { display: flex; flex-direction: column; min-width: 0; }
.meta.grow { flex: 1; padding: 12px 4px; }
.meta .t, .meta .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .t { font-size: 17px; line-height: 1.3; }
.meta .s { color: var(--muted); font-size: 15px; line-height: 1.35; }
.row.current .t { color: var(--sheen-accent-text); }
.row .num { width: 28px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.row .dev { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--ok); }
.row.unavailable { opacity: .38; }
.row.unavailable .play { pointer-events: none; }
.grip { width: 32px; height: 44px; display: grid; place-items: center; color: var(--muted); touch-action: none; cursor: grab; flex: none; }
.row.dragging { position: relative; z-index: 3; background: var(--surface-2); box-shadow: 0 8px 20px rgba(0,0,0,.5); transition: none; }

.icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; flex: none; color: var(--text); }
.icon:active { background: var(--sheen-tonal); }
.icon.save, .icon.more { color: var(--muted); position: relative; }
.row .icon svg { width: 20px; height: 20px; }
.icon.save.saved { color: var(--ok); }
/* kept on this phone: a filled green circle with a check, the same mark as the Flutter app */
.row .icon.save.saved svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--ok); color: var(--bg); stroke-width: 3; }
.icon.save .ring { position: absolute; inset: 10px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--surface-3) 0);
  -webkit-mask: radial-gradient(circle, transparent 55%, #000 57%); mask: radial-gradient(circle, transparent 55%, #000 57%); }

/* ---------- shelves and cards ---------- */
.shelf { margin: 28px 0 6px; }
.shelf-title { font-size: 22px; line-height: 1.2; font-weight: 700; margin: 22px 0 12px; letter-spacing: -0.015em; }
.shelf .section-head { margin: 0 0 6px; }
.shelf .section-head .shelf-title { margin: 0; }
.shelf-scroll { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 16px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
.shelf-scroll::-webkit-scrollbar { display: none; }
.card { flex: none; width: 150px; text-align: left; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.card img, .card .ph { width: 150px; height: 150px; border-radius: 14px; object-fit: cover; background: var(--surface); box-shadow: inset 0 0 0 .5px var(--line); }
.card:active img { transform: scale(.97); }
.card.round img, .card.round .ph { border-radius: 50%; }
.card.round { text-align: center; align-items: center; }
.card .t { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .s { margin-top: -6px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-tile { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--surface); font-weight: 600; font-size: 16px; text-align: left; min-height: 64px; }
.quick-tile svg { color: var(--accent); }
.wave-tile { background: linear-gradient(135deg, var(--accent), #7b2cff); color: #fff; }
.wave-tile svg { color: #fff; }

.lib-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.lib-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px 16px; border-radius: 20px; background: var(--surface); text-align: left; }
.lib-tile svg { grid-row: span 2; color: var(--accent); }
.lib-tile span { font-weight: 600; }
.lib-tile small { color: var(--muted); font-size: 13px; }
.hidden-link { margin: 4px 0 8px; }

/* ---------- pages ---------- */
.page-head { display: flex; gap: 16px; align-items: flex-end; margin: 8px 0 16px; }
.page-head img, .page-head .ph.big { width: 136px; height: 136px; border-radius: 8px; object-fit: cover; background: var(--surface); flex: none; }
.page-head > div { min-width: 0; }
.page-head h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.artist-link { color: var(--text); font-size: inherit; min-height: 0; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); text-underline-offset: 3px; }
.about p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- my wave ---------- */
.wave-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 0 4px; gap: 4px; }
/* Moves with transform and opacity only: the glow is a fixed blurred layer whose opacity breathes. */
.wave-orb {
  position: relative; isolation: isolate;
  width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 30%, #ff8a7a, var(--accent) 45%, #7b2cff 100%);
}
.wave-orb::before { content: ""; position: absolute; inset: 10px -6px -22px; z-index: -1; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7b2cff); filter: blur(28px); opacity: .45; }
.wave-orb svg { width: 56px; height: 56px; }
.wave-orb:active { transform: scale(.96); }
.wave-orb.on { animation: breathe 3.2s ease-in-out infinite; }
.wave-orb.on::before { animation: glow 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05); } }
@keyframes glow { 50% { opacity: .75; } }
.wave-hero h2 { margin: 20px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.wave-hero .status { max-width: 320px; margin: 0 0 8px; }
.chips-label { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 8px 14px; min-height: 38px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 15px; }
.chips button[aria-checked="true"] { background: var(--text); color: var(--bg); }

/* ---------- offline / device ---------- */
.offline-banner {
  position: sticky; top: calc(var(--safe-t) + 56px); z-index: 4; margin: 0 16px 8px; padding: 8px 12px;
  border-radius: 10px; background: color-mix(in srgb, var(--sheen-warning) 16%, var(--bg)); color: var(--sheen-warning); font-size: 14px; text-align: center;
}
.device-card { background: var(--surface); border-radius: 20px; padding: 16px; margin: 24px 0 8px; }
.device-card .pill.ghost, .account-card .pill.ghost { background: var(--elev); box-shadow: inset 0 0 0 .5px var(--line); }
.device-head { display: flex; gap: 12px; align-items: center; }
.device-head svg { color: var(--ok); }
.device-head h3 { margin: 0; font-size: 16px; }
.device-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.device-progress { margin: 10px 0 0; font-size: 14px; }
.switch { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; min-height: 44px; font-size: 15px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.device-actions { display: flex; gap: 8px; margin-top: 4px; }
.device-card .hint { margin: 10px 0 0; }

/* ---------- mini player (sheen, floats above the dock) ---------- */
.mini { position: fixed; inset-inline: 16px; bottom: calc(var(--safe-b) + 8px + 62px + 10px); z-index: 10; max-width: 560px; margin: 0 auto; width: auto; }
.mini .mini-open { flex: 1; width: auto; height: 44px; min-width: 0; justify-content: flex-start; gap: 12px; text-align: start; border-radius: 12px; }

/* ---------- full player ---------- */
.player { position: fixed; inset: 0; z-index: 20; background: var(--bg); isolation: isolate; overflow: hidden; }
.player-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--safe-t) + 6px) 24px calc(var(--safe-b) + 32px); max-width: 520px; margin: 0 auto; }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -10px; }
.p-context { flex: 1; text-align: center; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; margin: 8px 0 24px; background: var(--surface); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.p-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p-meta > div:first-child { min-width: 0; }
.p-meta h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta .artist-link { color: var(--muted); text-decoration: none; font-size: 17px; display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.p-actions { display: flex; align-items: center; flex: none; margin-right: -8px; }
.icon.like[aria-pressed="true"] { color: var(--sheen-accent-text); }
.icon.dislike, .icon.like { color: var(--muted); }
/* sheen seek bar over a native range: the range takes touches and keys, the bar draws (transform only) */
.p-seek { margin: 18px 0 2px; }
.p-seek input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.p-seek:has(input:focus-visible) { outline: 2px solid var(--sheen-accent-text); outline-offset: 4px; border-radius: 6px; }
.controls { margin: 12px -6px 8px; }
.controls .sheen-transport-small.on { color: var(--sheen-accent-text) !important; }
.p-tools { display: flex; justify-content: center; margin: 4px 0 14px; }
.tool { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; min-height: 40px; padding: 0 12px; border-radius: 999px; }
.tool svg { width: 20px; height: 20px; }
.tool.on { color: var(--sheen-accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.p-tabs { margin: 0 0 8px; }
.list.compact .row img { width: 40px; height: 40px; }
.player .row { background: transparent; } /* the glow shows through the queue */

/* lyrics */
.lyrics { padding: 6px 0 40vh; }
.lyric { display: block; width: 100%; text-align: left; font-size: 22px; font-weight: 700; line-height: 1.35; padding: 6px 0; color: color-mix(in srgb, var(--text) 35%, transparent); transition: color .2s ease; }
.lyric.active { color: var(--text); }
.lyrics-plain { font-size: 18px; line-height: 1.6; color: var(--text); }
.lyrics-source { color: var(--muted); font-size: 12px; margin-top: 24px; }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.sheet-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--sheen-sheet); border-radius: 38px 38px 0 0; padding: 8px 10px calc(var(--safe-b) + 12px);
}
.sheet-panel::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; gap: 12px; align-items: center; padding: 4px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sheet-head img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.sheet-head > div { min-width: 0; }
.sheet-head h2 { margin: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 50px; border-radius: 14px; text-align: left; font-size: 17px; }
.sheet-item:active, .sheet-item:hover { background: var(--sheen-tonal); }
.sheet-item svg { color: var(--muted); width: 22px; height: 22px; }
.sheet-item.danger, .sheet-item.danger svg { color: var(--danger); }
.sheet-cancel { width: 100%; margin-top: 8px; padding: 12px; min-height: 50px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 17px; }

/* ---------- stats ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 6px; }
.stat-tile { background: var(--surface); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; }
.stat-tile .v { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-tile .l { color: var(--muted); font-size: 13px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bar-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 1fr 5.5em; align-items: center; gap: 10px; padding: 8px 4px; min-height: 40px; text-align: left; border-radius: 8px; }
.bar-row:hover { background: var(--surface); }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.bar-value { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.hours { margin: 0; }
.hours-plot { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 120px; border-bottom: 1px solid var(--line); }
.hour { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.hour-fill { display: block; width: 100%; background: var(--chart); border-radius: 4px 4px 0 0; }
.hour:hover .hour-fill { filter: brightness(1.2); }
.hours-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 20px);
  max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
/* a song that will not play: the reason, Other versions, and Skip with a countdown */
.toast.fail { z-index: 60; width: min(420px, calc(100% - 32px)); border-radius: 22px; padding: 14px 16px; display: grid; gap: 12px; }
.toast.fail[hidden] { display: none; }
.toast.fail p { margin: 0; font-weight: 600; }
.fail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fail-actions .pill { flex: 1; justify-content: center; }
.fail-actions .pill:not(.ghost) { background: var(--accent); color: var(--accent-text); }
.fail-actions .pill.ghost { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .wave-orb.on, .wave-orb.on::before { animation: none; }
  .row, .lyric { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .player:not([hidden]) { animation: up .22s ease-out; }
  .sheet:not([hidden]) .sheet-panel { animation: sheet-in .34s cubic-bezier(.2,.9,.3,1); }
  .sheet:not([hidden]) .sheet-backdrop { animation: fade-in .34s ease-out; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- sound panel ---------- */
.p-tools { gap: 8px; }
.sheet-content { padding: 4px 12px 8px; }
.sound-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; margin: 10px 0; font-size: 15px; }
.sound-row output { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.sound-row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 28px; }
.sound .chips button { font-size: 14px; }
.sound .hint { margin: 4px 0 8px; }

/* ---------- sign in ---------- */
.auth { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; display: grid; place-items: center; padding: calc(var(--safe-t) + 24px) 16px calc(var(--safe-b) + 24px); }
.auth-card { width: 100%; max-width: 380px; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 28px; }
.auth h1 { font-size: 24px; margin: 0 0 6px; }
.auth .hint { margin: 0 0 18px; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.field input { height: 48px; padding: 0 14px; border-radius: var(--radius); border: 1px solid transparent; background: var(--surface); color: var(--text); font-size: 17px; }
.field input:focus { outline: none; border-color: var(--accent); }
.auth-error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.auth-submit { width: 100%; justify-content: center; min-height: 50px; font-size: 16px; padding: 0 16px; }
.auth-switch { display: block; margin: 16px auto 0; }
.wl-points { margin: 0 0 20px; padding-left: 20px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.wl-points li + li { margin-top: 6px; }
/* the honeypot: out of sight and out of the tab order, but still in the form for bots */
.wl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wl-done p { margin: 0 0 12px; font-size: 16px; }
.wl-done .hint { font-size: 14px; }
.wl-link-row { display: flex; gap: 8px; align-items: center; }
.wl-link { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: var(--radius); border: 0; background: var(--surface); color: var(--text); font-size: 13px; }
.admin-limits { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.admin-limits .field input { height: 40px; font-size: 16px; }
.admin-limits button { grid-column: 1 / -1; justify-self: start; margin-bottom: 6px; }
@media (max-width: 380px) { .admin-limits { grid-template-columns: 1fr; } }
.account-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 20px; padding: 10px 6px 10px 16px; margin: 4px 0 12px; }
.account-card > svg { color: var(--muted); }
.account-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.account-who small { color: var(--muted); font-size: 12px; }
.account-who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* admin */
.admin-row .meta { flex: 1; padding: 10px 4px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); margin-left: 6px; vertical-align: 1px; }
.badge.warn { background: color-mix(in srgb, var(--sheen-warning) 16%, var(--bg)); color: var(--sheen-warning); }
.invite-row .meta .t { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }

/* Shown by boot.js when the app cannot start */
.boot-error { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; padding: 24px; background: var(--bg, #0b0b0f); text-align: center; }
.boot-error[hidden] { display: none; }
.boot-error p { max-width: 32ch; color: var(--text, #fff); font-size: 17px; line-height: 1.4; }

/* Other versions sheet: who uploaded it is what tells versions apart */
.p-tools { flex-wrap: wrap; }
.v-hint { margin: 6px 12px 10px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.v-list { list-style: none; margin: 0; padding: 0; }
.v-item { border-radius: var(--radius); }
.v-item.is-current { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.v-item.picked { background: var(--sheen-tonal); }
.v-main { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 60px; text-align: left; border-radius: var(--radius); }
.v-main:active { background: var(--sheen-tonal); }
.v-main img, .v-main .ph { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface); }
.v-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v-src { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-item.picked .v-src { color: var(--accent); }
.v-kind { flex: none; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.v-kind.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.v-use { display: flex; justify-content: center; width: calc(100% - 24px); margin: 0 12px 10px; }
.v-use[hidden] { display: none; }

/* Volume: shown only where a web page can set it (not iOS) */
.volume { display: flex; align-items: center; gap: 6px; }
.volume[hidden] { display: none; }
.vol-mute { color: var(--muted); flex: none; }
.vol-range { flex: 1; min-width: 0; height: 28px; accent-color: var(--text); }
.mini-volume { display: none; width: 150px; flex: none; margin-right: 4px; }
@media (min-width: 720px) and (hover: hover) { .mini-volume:not([hidden]) { display: flex; } }
.vol-pop-wrap { position: relative; }
.vol-pop-wrap[hidden] { display: none; }
.vol-icon.on { color: var(--text); }
.vol-pop { position: absolute; right: -4px; bottom: calc(100% + 10px); z-index: 5; width: 260px; padding: 6px 12px 6px 6px;
  background: var(--elev); border-radius: 14px; box-shadow: inset 0 0 0 .5px var(--line), 0 10px 30px rgba(0,0,0,.2); }
.vol-pop[hidden] { display: none; }
.vol-num { width: 28px; flex: none; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Admin: YouTube account */
.yt-status { margin: 0 0 10px; font-size: 15px; }
.yt-status.ok { color: var(--ok); }
.yt-status.failed { color: var(--danger); }
.yt-status.off, .yt-status.waiting { color: var(--muted); }
.yt-steps { padding-left: 20px; line-height: 1.5; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }

/* Search kinds: one scrolling row on narrow phones instead of wrapping */
.seg.kinds { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg.kinds::-webkit-scrollbar { display: none; }
.seg.kinds button { flex: none; }

/* ======================================================================================================
   The Flutter app's look, screen by screen (measured from tunes_mobile and the sheen widgets).
   Glass that only covers the plain page uses the glass look without the blur (.flat): the same picture,
   no per-frame cost. Real blur stays on the dock, the mini player, the top bar buttons and the play button.
   ====================================================================================================== */
.flat, .sheen-glass.flat { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* SheenListGroup and SheenListRow */
.group { background: var(--sheen-surface); border-radius: 20px; padding: 0 2px; overflow: hidden; margin: 0 0 8px; }
.group > * + * { border-top: .5px solid var(--line); }
.group-row { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 6px 14px; text-align: start;
  font-size: 17px; line-height: 1.3; letter-spacing: -0.026em; color: var(--text); cursor: pointer; }
.group-row:active { background: color-mix(in srgb, var(--text) 6%, transparent); }
.gi { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--c, var(--accent)); color: #fff; }
.gi svg { width: 18px; height: 18px; }
.gt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#device .gt { white-space: normal; } /* settings sentences wrap, as in the app */
.gv { flex: none; max-width: 45%; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.group-row .chev { width: 16px; height: 16px; flex: none; color: var(--sheen-text-tertiary); }
.group-row:disabled { opacity: .4; }
.section-label { margin: 20px 4px 8px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-row .section-label { margin-top: 24px; }
.text-link { color: var(--sheen-accent-text); font-size: 15px; font-weight: 600; min-height: 36px; }
.section-note { margin: 8px 4px 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.lib-footer { margin: 24px 0 0; text-align: center; font-size: 13px; color: var(--sheen-text-tertiary); }
.device-summary { margin: -8px 4px 16px; font-size: 15px; color: var(--muted); }
.notice { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); font-size: 15px; }
/* SheenSwitch */
.switch-input { appearance: none; -webkit-appearance: none; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 16px;
  background: var(--surface-2); position: relative; cursor: pointer; transition: background .2s; }
.switch-input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s; }
.switch-input:checked { background: var(--sheen-success); }
.switch-input:checked::after { transform: translateX(20px); }
label.group-row { cursor: pointer; }

/* Home: QuickTile (glass, 18 corner, accent icon) */
.quick { gap: 10px; }
.quick-tile, .wave-tile { position: relative; isolation: isolate; min-height: 0; padding: 14px; gap: 10px; border-radius: 18px; font-size: 17px; font-weight: 600;
  letter-spacing: -0.026em; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)), rgba(28,31,38,.62);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.18), 0 10px 28px rgba(0,0,0,.42), 0 1px 2px rgba(0,0,0,.3); }
.quick-tile svg, .wave-tile svg { width: 22px; height: 22px; color: var(--sheen-accent-text); }
:root[data-theme="light"] .quick-tile { background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.5) 50%, rgba(255,255,255,.64));
  box-shadow: inset 0 1px .5px #fff, inset 0 0 0 .5px rgba(0,0,0,.05), 0 10px 30px rgba(16,20,30,.14), 0 1px 3px rgba(16,20,30,.08); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .quick-tile { background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.5) 50%, rgba(255,255,255,.64));
  box-shadow: inset 0 1px .5px #fff, inset 0 0 0 .5px rgba(0,0,0,.05), 0 10px 30px rgba(16,20,30,.14), 0 1px 3px rgba(16,20,30,.08); } }
.quick-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Shelves and titles (SheenShelf: 22 bold headings, 150 covers, 14 corners) */
.shelf-title, .section-head h2, .section-head h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.022em; }
.shelf { margin: 24px 0 6px; }
.card .t { -webkit-line-clamp: 1; font-size: 15px; font-weight: 600; }

/* Chips (SheenChip: 36 high, glass, 14/600; the chosen one solid) */
.chips button, .seg.kinds button { min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 600;
  background: var(--sheen-surface); color: var(--text); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--text) 16%, transparent), inset 0 .5px 0 rgba(255,255,255,.14); }
.chips button[aria-checked="true"], .seg.kinds button[aria-checked="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.chips { gap: 10px 8px; }
.chips-label { margin: 24px 4px 8px; font-size: 13px; letter-spacing: .04em; }

/* SheenSegmentedControl: a glass capsule with a lens on the chosen part */
.seg.wide { padding: 3px; background: var(--sheen-surface); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--text) 16%, transparent); min-height: 40px; }
.seg.wide button { min-height: 34px; font-size: 15px; font-weight: 600; color: var(--muted); }
.seg.wide button[aria-checked="true"], .seg.wide button[aria-selected="true"] { background: var(--elev); color: var(--text);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.14), 0 1px 4px rgba(0,0,0,.12); }

/* Buttons: SheenPrimaryButton (accent, a soft glow) and SheenSecondaryButton (glass) */
.pill { min-height: 50px; padding: 0 22px; border-radius: 25px; font-size: 17px; font-weight: 600; letter-spacing: -0.026em; justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 60%), var(--accent); color: var(--accent-text);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.3), 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.pill.ghost { background: var(--sheen-surface); color: var(--text); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--text) 12%, transparent); }
.pill.small { min-height: 36px; padding: 0 14px; font-size: 15px; }
.pill svg { width: 18px; height: 18px; }
.play-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 8px; }
.page-actions { margin: 0 0 8px; }

/* Wave: a 148 glass circle on an accent glow, the waveform and "Play My Wave" */
.wave-hero { padding: 8px 0 4px; }
.wave-orb { width: 188px; height: 188px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent); color: var(--text); }
.wave-orb::before { display: none; }
.wave-orb .orb-glass { width: 148px; height: 148px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.wave-orb .orb-glass svg { width: 40px; height: 40px; color: var(--sheen-accent-text); }
.wave-orb .orb-label { font-size: 17px; font-weight: 600; letter-spacing: -0.026em; padding: 0 12px; text-align: center; }
.wave-hero h2, .wave-hero > .status { display: none; }
.wave-orb.on { animation: none; }

/* Search: SheenSearchField (glass capsule, 44 high) and SheenEmptyState */
.search-icon { top: 22px; left: 14px; width: 18px; height: 18px; }
.search input { height: 44px; border-radius: 22px; padding: 0 14px 0 40px; font-size: 16px; font-weight: 600; border: 0;
  background: var(--sheen-surface); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--text) 16%, transparent), inset 0 .5px 0 rgba(255,255,255,.12); }
.search input::placeholder { font-weight: 400; }
.search input:focus { box-shadow: inset 0 0 0 1px var(--sheen-accent-text); }
.suggest { top: 50px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; text-align: center; }
.empty-state .es-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--sheen-surface);
  box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--text) 16%, transparent), inset 0 .5px 0 rgba(255,255,255,.14); }
.empty-state .es-icon svg { width: 24px; height: 24px; }
.empty-state .es-title { font-size: 15px; font-weight: 700; color: var(--text); max-width: 32ch; }

/* Song rows: SheenTrackRow (17/15, 48 cover, 8 corner) */
.row .play { padding-inline: 4px 0; }
.meta .t { letter-spacing: -0.026em; }
.orb-bars { width: 34px; height: 34px; gap: 4px; }
.empty-state:has(.es-title:empty) { display: none; }
.empty-state .es-title { margin: 0; }
.empty-state.notice { flex-direction: row; text-align: start; gap: 12px; padding: 12px 14px; margin: 4px 0 8px; border-radius: 16px; background: var(--sheen-surface); }
.empty-state.notice .es-icon { width: 32px; height: 32px; flex: none; }
.empty-state.notice .es-icon svg { width: 16px; height: 16px; }
.empty-state.notice .es-title { font-size: 14px; font-weight: 500; color: var(--muted); max-width: none; }

/* Full player (the Flutter PlayerScreen): one screen, no scrolling. Top bar, the cover as large as fits (or Up next,
   or Lyrics in its place), the song with a heart, the seek bar, the transport and a row of five glass tools. */
.player-body { height: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 4px) 20px calc(var(--safe-b) + 12px); }
.p-top { display: flex; align-items: center; gap: 8px; margin: 0; flex: none; }
.p-from { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.p-from-label { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.p-from .p-context { font-size: 13px; font-weight: 600; color: var(--text); max-width: 100%; }
.player .player-scroll { height: auto; padding: 0; max-width: none; margin: 8px 0 0; }
.p-panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.p-panel:has(.p-cover[hidden]) { -webkit-mask-image: linear-gradient(transparent, #000 6%, #000 90%, transparent); mask-image: linear-gradient(transparent, #000 6%, #000 90%, transparent); }
.p-cover { flex: 1; min-height: 120px; container-type: size; display: grid; place-items: center; }
.player .p-cover .art { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); max-width: 520px; max-height: 520px; margin: 0; aspect-ratio: 1;
  border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.p-queue-title { margin: 6px 0 4px; font-size: 17px; font-weight: 600; }
.lyrics { padding: 24px 4px; }
.p-meta { flex: none; margin-top: 16px; align-items: center; }
.p-meta h2 { font-size: 22px; letter-spacing: -0.022em; }
.p-meta .artist-link { font-size: 17px; }
.p-actions { margin: 0; gap: 8px; }
.glass-btn.like { color: var(--text); }
.glass-btn.like[aria-pressed="true"] { color: var(--sheen-accent-text); }
.p-seek { margin: 10px 0 0; flex: none; }
.sheen-seek-times { flex: none; }
.controls { margin: 6px -6px 0; flex: none; }
.p-tools { flex: none; display: flex; justify-content: space-between; gap: 0; margin: 10px 0 0; flex-wrap: nowrap; }
.p-tools .tool { display: grid; place-items: center; gap: 0; min-height: 0; padding: 0; color: var(--muted); }
.p-tools .tool[aria-pressed="true"], .p-tools .tool.on { color: var(--sheen-accent-text); background: var(--sheen-surface); }
.p-tools .tool:not([aria-pressed="true"]):not(.on) { background: rgba(255,255,255,.1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.player .sheen-artwork-glow > img { opacity: .85; }

/* Sheets (the Flutter bottom sheets): grabber, a glass close button, a centred title, grouped rows. */
.sheet-panel { padding: 8px 16px calc(var(--safe-b) + 16px); }
.sheet-head { position: relative; display: block; min-height: 44px; padding: 0 52px 14px; border: 0; margin: 0; text-align: center; }
.sheet-head > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; }
.sheet-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.026em; max-width: 100%; }
.sheet-head p { font-size: 15px; margin: 2px 0 0; max-width: 100%; }
.sheet-head p:empty { display: none; }
.sheet-head #sheet-art { display: none; }
.sheet-x { position: absolute; top: 0; inset-inline-start: 0; }
.sheet-list .group { background: var(--sheen-surface-muted); margin: 0 0 12px; }
.sheet-item.danger .gi { --c: var(--danger); }
.sheet-item.danger, .sheet-item.danger svg { color: var(--text); }
.sheet-item.danger .gi svg { color: #fff; }
.sheet-item .gi svg { color: #fff; width: 18px; height: 18px; }
.sheet-item.active .gt { color: var(--sheen-accent-text); }
.sheet-content { padding: 0; }

/* Album and artist pages (the Flutter AlbumScreen and ArtistScreen) */
.page-glow { position: fixed; inset: 0; z-index: 0; }
#view-page > :not(.page-glow), .large-head { position: relative; z-index: 1; }
.album-head, .artist-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; margin: 0 0 16px; }
.album-cover { width: clamp(180px, 62vw, 300px); height: clamp(180px, 62vw, 300px); border-radius: 16px; object-fit: cover; background: var(--surface);
  box-shadow: 0 20px 50px rgba(0,0,0,.35), inset 0 0 0 .5px var(--line); }
.album-artist { margin-top: 14px; font-size: 17px; min-height: 0; }
.album-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.save-all { display: flex; margin: 0 auto 8px; }
.save-all svg { display: none; }
.artist-photo { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.artist-head + .page-actions { justify-content: center; }
/* Up next in the player: cover, song and the drag handle at the end (SheenReorderList) */
.player .row .icon.save, .player .row .icon.more { display: none; }
.player .row .grip { order: 3; }
/* The player's glass buttons sit on the glow, which is already a still blur: the same look without a second blur
   (nine blurred buttons cost frames while Up next scrolled). */
.player .sheen-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* The glow is a 10×10 canvas stretched over the page (see paintGlow): no CSS blur. */
.sheen-artwork-glow > canvas { position: absolute; inset: -10%; width: 120%; height: 120%; opacity: .7; }
.player .sheen-artwork-glow > canvas { opacity: .85; }
:root[data-theme="light"] .sheen-artwork-glow > canvas { opacity: .45; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .sheen-artwork-glow > canvas { opacity: .45; } }
.list-filter { margin: 0 0 12px; }
.p-actions .glass-btn.save { color: var(--text); }
.p-actions .glass-btn.save.saved { color: var(--ok); }
.p-actions .glass-btn.save .ring { inset: 12px; }

/* ---------- friends and chats (widgets from sheen.css) ---------- */
.dock-icon { position: relative; display: inline-flex; }
.friends-btn { position: relative; }
.friends-btn .sheen-unread { position: absolute; top: -3px; inset-inline-end: -5px; min-width: 18px; height: 18px; font-size: 11px; box-shadow: 0 0 0 2px var(--bg); }
.dock-icon .sheen-unread { position: absolute; top: -6px; inset-inline-end: -12px; min-width: 18px; height: 18px; font-size: 11px; box-shadow: 0 0 0 2px var(--bg); }
.friends-strip { margin-inline: -16px; }
.friends-requests { display: flex; flex-direction: column; gap: 8px; }
#friends-body > .page-actions { margin-top: 24px; }
.friends-chats { display: flex; flex-direction: column; margin-inline: -16px; }
.friends-empty { max-width: 46ch; margin-inline: auto; text-align: center; }
.share-box { display: flex; flex-direction: column; gap: 16px; padding-block: 4px 8px; }
.share-box .chat-field, .friend-search input { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: var(--sheen-radius-field); background: var(--surface); color: var(--text); font: inherit; }
.friend-search { display: flex; flex-direction: column; gap: 10px; }
.friend-search .group-row .sheen-avatar, .sheet .group-row .sheen-avatar { margin-inline-end: 12px; }
.pill.wide { width: 100%; justify-content: center; }
.share-open { position: absolute; inset: 0; border-radius: inherit; }
.sheen-share-card.sheen-compact { position: relative; }
.sheen-share-card.sheen-compact .sheen-share-card-note { position: relative; z-index: 1; padding: 0; }
.older { align-self: center; margin-block: 8px; }
.seen { align-self: flex-end; }
.reaction-pop { position: fixed; z-index: 40; }
.chat-jam:empty { display: none; }
#view-page > .chat-jam { position: sticky; top: calc(var(--safe-t) + 56px); z-index: 3; padding-block: 8px; background: var(--bg); }
/* A chat page hides the dock; the composer sits at the bottom and the mini player just above it, so a song played
   from a card shows what plays (and that it loads) without leaving the chat. */
body.chat-open .tabbar { display: none; }
body.chat-open #mini { bottom: calc(var(--safe-b) + 70px); }
body.chat-open { padding-bottom: calc(var(--safe-b) + 80px); }
body.chat-open.has-mini { padding-bottom: calc(var(--safe-b) + 80px + var(--mini-h) + 14px); }
#view-page > .chat-composer { position: fixed; inset-inline: 0; bottom: 0; z-index: 8; padding-bottom: calc(var(--safe-b) + 8px); max-width: 720px; margin: 0 auto; }
#view-page .sheen-thread { padding-inline: 0; }
.sheen-share-card-art.no-art { display: grid; place-items: center; color: var(--muted); }
.sheen-share-card:not(.sheen-compact) .sheen-share-card-art.no-art { aspect-ratio: auto; height: 96px; }
.sheen-share-card-art.no-art > svg { width: 28px; height: 28px; }

/* A loading ring, in the colour of the button it sits in (the play buttons, the chat cards). */
.spin { width: 1.1em; height: 1.1em; display: inline-block; border-radius: 50%; border: 2.2px solid currentColor; border-inline-end-color: transparent;
  animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* Audiobooks: book covers (3:4 with a spine), tags, the book page, Continue listening, the player's book mode. */
.book-cover { width: 42px; height: 56px; border-radius: 4px 8px 8px 4px; object-fit: cover; background: var(--surface); flex: none;
  box-shadow: inset 0 0 0 .5px var(--line); }
.row .book-cover { width: 48px; height: 64px; margin-block: 4px; border-radius: 4px 8px 8px 4px; }
.book-cover.big { width: min(58vw, 220px); height: auto; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 6px 14px 14px 6px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28), inset 0 0 0 .5px var(--line); }
.book-row .meta { min-width: 0; }
.book-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.book-tag { font-size: 11.5px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.book-tag.ok { background: color-mix(in srgb, var(--sheen-success) 16%, var(--bg)); color: var(--sheen-success); }
.book-tag.warn { background: color-mix(in srgb, var(--sheen-warning) 16%, var(--bg)); color: var(--sheen-warning); }
.book-head { display: grid; justify-items: center; gap: 12px; margin: 8px 0 16px; text-align: center; }
.book-info { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.book-info .book-tags { justify-content: center; }
.book-by { margin: 0; color: var(--muted); font-size: 14px; }
.book-head + .resume-card, .book-head + .page-actions { margin-top: 4px; }
.page-actions .pill { flex: 1 1 140px; }
.book-remove { display: block; margin: 12px auto 0; color: var(--muted); font-size: 15px; }
.book-chapters .group + .section-label { margin-top: 16px; }
.group-row.chapter .gt { min-width: 0; display: grid; gap: 1px; }
.group-row.chapter .ct { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-row.chapter .cf { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-row.chapter .gv { font-variant-numeric: tabular-nums; }
.group-row.chapter.active .ct { color: var(--sheen-accent-text); font-weight: 600; }
.resume-card { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-radius: 20px; margin: 4px 0 12px; }
.resume-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: start; color: var(--text); }
.resume-open .meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.resume-open .label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.resume-open .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-open .s { font-size: 13px; color: var(--muted); }
.resume-bar { height: 4px; border-radius: 2px; margin-top: 6px; background: linear-gradient(to right, var(--sheen-accent) calc(var(--p) * 100%), var(--surface-2) 0); }
.resume-play { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.resume-play svg { width: 22px; height: 22px; }
.also-book { list-style: none; }
.also-book .section-label { margin-top: 12px; }
.books-note .link { font-weight: 600; color: var(--sheen-accent-text); }
.book-sheet .seg.speeds { margin: 0 0 4px; }

/* The player playing a book: back 15 / forward 30 in place of previous / next, speed and chapters in place of the
   song tools; liking, saving, shuffle, repeat and lyrics are for songs. */
.book-only { display: none !important; }
.book-mode .book-only { display: inline-flex !important; }
.book-mode .p-tools .book-only { display: grid !important; }
.book-mode #p-prev, .book-mode #p-next, .book-mode #p-like, .book-mode #p-save, .book-mode #p-dislike,
.book-mode #p-tab-lyrics, .book-mode #p-more { display: none !important; }
.book-mode #p-shuffle, .book-mode #p-repeat { visibility: hidden; }
.skip-n { position: relative; place-items: center; justify-content: center; align-items: center; }
.skip-n > span { position: absolute; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed-tool { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
