/* ShemenMusic app. Tokens follow the site (public/style.css, VISUAL-STYLE.md): dark by default, blue frame,
   colour beyond blue only from the covers. One stage per screen; nothing decorative. */
@font-face { font-family: "InterApp"; src: url(fonts/Inter-400.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "InterApp"; src: url(fonts/Inter-700.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "InterApp", "Segoe UI", Roboto, sans-serif;
  --paper: #0A1420; --raise: #101C2A; --mist: #13202F; --mist-2: #1A2A3C; --rule: #223447;
  --ink: #EAF1F7; --slate: #93A8BB; --dim: #5F7488; --blue: #2B78B4; --blue-d: #3A8AC8; --link: #7DB8E6; --sky: #17344F; --on-sky: #CFE4F5;
  --brand: #185A8C; --danger: #F08A7E;
  --r-thumb: 8px; --r-card: 12px; --r-panel: 20px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --tabs-h: 56px; --mini-h: 64px; --lib-w: 380px;
  --stage: #0A1420; --ly-size: 34px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #FFFFFF; --raise: #F6F9FC; --mist: #EEF3F8; --mist-2: #E3ECF4; --rule: #D5E1EB;
  --ink: #0B1A2B; --slate: #4E6579; --dim: #8A9DAE; --blue: #185A8C; --blue-d: #0F4370; --link: #185A8C; --sky: #DDEAF4; --on-sky: #0F4370;
  --danger: #B3402F;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.45 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-user-select: none; user-select: none; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.1; }
img { display: block; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- frame ---------- */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr; }
.lib { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--paper); }
.lib-head { flex: none; padding: calc(var(--safe-t) + 14px) calc(16px + var(--safe-r)) 10px calc(16px + var(--safe-l)); background: var(--paper); z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; height: 40px; }
.brand-s { width: 30px; height: 30px; }
:root[data-theme="light"] .brand-s { filter: invert(27%) sepia(53%) saturate(1200%) hue-rotate(181deg) brightness(88%); }
.brand-w { font-weight: 700; font-size: 21px; letter-spacing: -0.03em; }
.lib-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 calc(16px + var(--safe-r)) calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 24px) calc(16px + var(--safe-l)); }

/* segmented control (iPad library tabs, version toggle, filters) */
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--mist); }
.seg button { flex: 1; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--slate); white-space: nowrap; transition: background-color .15s, color .15s; }
.seg button[aria-selected="true"], .seg button.on { background: var(--mist-2); color: var(--ink); }
:root[data-theme="light"] .seg button[aria-selected="true"], :root[data-theme="light"] .seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(11,26,43,.12); }
.lib-tabs { display: none; margin-top: 12px; }

/* phone tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; height: calc(var(--tabs-h) + var(--safe-b));
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); background: var(--raise); box-shadow: 0 -1px 0 var(--rule); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button.on { color: var(--link); }

/* ---------- library pieces ---------- */
.h1 { font-size: 30px; font-weight: 700; margin: 6px 0 14px; }
.search { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; margin: 0 0 10px;
  border-radius: 12px; background: var(--mist); color: var(--slate); box-shadow: 0 0 0 8px var(--paper); }
.search::before { content: ""; position: absolute; inset: -14px -16px auto; height: 14px; background: var(--paper); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 17px; color: var(--ink); }
.search input::placeholder { color: var(--slate); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--slate); }
.search svg { width: 20px; height: 20px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 6px; padding: 0 16px 6px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--mist); color: var(--slate); font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ink); color: var(--paper); }

.sec-h { position: sticky; top: 50px; z-index: 1; padding: 14px 0 6px; background: var(--paper); color: var(--slate); font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.count { color: var(--slate); font-size: 14px; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }

.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 6px 0; text-align: left; border-radius: 10px; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--rule); opacity: .7; }
.row:active { background: var(--mist); }
.row.now .r-title { color: var(--link); }
.row.off { opacity: .42; }
.thumb { width: 44px; height: 44px; flex: none; border-radius: var(--r-thumb); object-fit: cover; background: var(--mist-2); }
.tile { display: grid; place-items: center; overflow: hidden; background: #0B1A2B; color: #EAF1F7; font-weight: 700; letter-spacing: -0.02em; text-align: center; line-height: 1.05; }
.thumb.tile { font-size: 18px; }
.r-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.r-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub { font-size: 14px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-end { display: flex; align-items: center; gap: 6px; color: var(--slate); font-size: 14px; font-variant-numeric: tabular-nums; }
.r-end .ok { width: 18px; height: 18px; color: var(--link); }
.r-end .fav { width: 16px; height: 16px; color: var(--slate); }
.r-more { display: grid; place-items: center; width: 36px; height: 44px; margin-right: -8px; color: var(--slate); border-radius: 10px; }
.r-more svg { width: 20px; height: 20px; }
.row .bars { display: none; }
.row.now.playing .bars { display: flex; }

/* the "now playing" equaliser is a static three-step mark, not an animation */
.bars { gap: 2px; align-items: flex-end; height: 14px; }
.bars i { width: 3px; border-radius: 1px; background: var(--link); }
.bars i:nth-child(1) { height: 8px; } .bars i:nth-child(2) { height: 14px; } .bars i:nth-child(3) { height: 10px; }

.empty { padding: 48px 8px; text-align: center; color: var(--slate); }
.empty b { display: block; color: var(--ink); font-size: 19px; margin-bottom: 6px; }

/* album grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 20px 14px; padding-top: 4px; }
.card { text-align: left; min-width: 0; }
.card img, .card .tile { width: 100%; aspect-ratio: 1; border-radius: var(--r-card); object-fit: cover; background: var(--mist-2); }
.card .tile { font-size: 20px; padding: 12px; }
.c-title { margin-top: 8px; font-size: 15px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-sub { font-size: 13px; color: var(--slate); display: flex; align-items: center; gap: 5px; }
.c-sub svg { width: 14px; height: 14px; color: var(--link); }

/* detail pages (album, setlist) */
.back { display: inline-flex; align-items: center; gap: 2px; height: 40px; margin: 0 0 4px -8px; padding-right: 10px; color: var(--link); font-size: 17px; font-weight: 500; }
.back svg { width: 24px; height: 24px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 4px 0 18px; }
.hero-art { width: min(240px, 64vw); aspect-ratio: 1; border-radius: 16px; object-fit: cover; margin-bottom: 14px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.6); }
.hero h2 { font-size: 24px; font-weight: 700; }
.hero p { color: var(--slate); font-size: 15px; }
.actions { display: flex; gap: 10px; margin: 14px 0 6px; width: 100%; }
.btn { position: relative; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px;
  font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; background: var(--mist); color: var(--ink); }
.btn svg { width: 20px; height: 20px; position: relative; }
.btn span { position: relative; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.sm { flex: none; height: 36px; padding: 0 14px; font-size: 14px; }
.btn.sm svg { width: 18px; height: 18px; }
/* a save in progress fills the button from the left */
.btn .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sky); transition: width .3s; }
.btn.is-saved { color: var(--link); }

/* offline page */
.panel { background: var(--mist); border-radius: var(--r-panel); padding: 18px; margin-bottom: 14px; }
.status { display: flex; align-items: center; gap: 12px; }
.status .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sky); color: var(--on-sky); }
.status .dot svg { width: 20px; height: 20px; }
.status.ready .dot { background: #1D4A33; color: #8FE0B0; }
:root[data-theme="light"] .status.ready .dot { background: #D9F2E3; color: #1C6B3D; }
.status b { display: block; font-size: 17px; }
.status span { color: var(--slate); font-size: 14px; }
.meter { position: relative; height: 10px; border-radius: 5px; background: var(--mist-2); overflow: hidden; margin: 14px 0 8px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 5px; }
.meter-l { display: flex; justify-content: space-between; color: var(--slate); font-size: 14px; font-variant-numeric: tabular-nums; }
.panel p.note { color: var(--slate); font-size: 14px; margin-top: 10px; }
.big-save { width: 100%; margin-top: 14px; flex: none; }
.orow { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.orow + .orow { box-shadow: 0 -1px 0 var(--rule); }
.orow .r-t { gap: 1px; }
.pbar { height: 6px; border-radius: 3px; background: var(--mist-2); overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; transition: width .3s; }
.o-act { flex: none; display: grid; place-items: center; min-width: 44px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--mist-2); color: var(--link); font-size: 14px; font-weight: 600; }
.o-act svg { width: 20px; height: 20px; }
.o-act.done { background: none; padding: 0; color: var(--link); }
.linkish { color: var(--link); font-weight: 600; font-size: 15px; padding: 8px 0; }

/* ---------- stage (the player) ----------
   Lifted from the site's Stage v2 (Joel): the song's own colour with its cover blurred behind, big centred
   lines, the live line yellow like Prompter, count-in dots, soft blurred bars, a word under every button. */
.stage { position: fixed; inset: 0; z-index: 40; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  background: var(--stage); color: #fff; transform: translateY(100%); visibility: hidden;
  transition: transform .38s cubic-bezier(.2,.8,.2,1), visibility 0s .38s, background-color .6s; }
.app.stage-open .stage { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2,.8,.2,1), background-color .6s; }
.st-bg { position: absolute; inset: -140px; z-index: -1; background-size: cover; background-position: center; opacity: 0;
  filter: blur(60px) saturate(1.3) brightness(.45); transition: opacity .6s; }
.st-bg.on { opacity: 1; }
.stage-empty { margin: auto; text-align: center; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255,255,255,.7); }
.stage-empty img { opacity: .9; margin-bottom: 8px; }
.se-title { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.03em; }
.se-sub { font-size: 16px; max-width: 26ch; }
.stage-in { position: relative; flex: 1; min-height: 0; }

/* soft bars: the song's colour, see-through, with the lyrics blurring away beneath them */
.bar { position: absolute; left: 0; right: 0; z-index: 3; background: color-mix(in srgb, var(--stage) 38%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); transition: opacity .3s; }
.st-top { top: 0; padding: calc(var(--safe-t) + 6px) calc(10px + var(--safe-r)) 10px calc(10px + var(--safe-l)); }
.st-bot { bottom: 0; padding: 4px calc(18px + var(--safe-r)) calc(var(--safe-b) + 10px) calc(18px + var(--safe-l)); }
.st-row { display: flex; align-items: center; gap: 6px; }
.st-meta { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.st-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: rgba(255,255,255,.1); }
.st-titles { min-width: 0; }
.st-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sub { font-size: 14px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* every control: an icon with its word underneath (Joel: "I see them, but I don't know what they do") */
.ctl { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 56px; color: #fff; flex: none; }
.ctl .ib { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); }
.ctl:active .ib, .aa-btn:active { background: rgba(255,255,255,.26); }
.ctl .ib svg { width: 22px; height: 22px; }
.lab { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.78); letter-spacing: .01em; white-space: nowrap; }
.ctl .ib.tp-play { width: 64px; height: 64px; background: #fff; color: #0B1A2B; }
.ctl .ib.tp-play svg { width: 28px; height: 28px; }
.ctl.dim { opacity: .4; }
.sizes-in { display: flex; gap: 6px; }
.aa-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; }
.aa { font-weight: 800; font-size: 21px; line-height: 1; } .aa.sm { font-size: 13px; }

/* With BVs / No BVs: the one choice that matters on stage, right under the title */
.st-ver { display: flex; justify-content: center; padding-top: 8px; }
.st-ver:empty { display: none; }
.st-ver .seg { width: min(340px, 100%); background: rgba(255,255,255,.14); }
.st-ver .seg button { height: 36px; font-size: 15px; color: rgba(255,255,255,.8); }
.st-ver .seg button.on { background: #fff; color: #0B1A2B; box-shadow: none; }

.lyr { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: 0;
  padding: calc(var(--top-h, 120px) + 26vh) calc(22px + var(--safe-r)) calc(var(--bot-h, 170px) + 40vh) calc(22px + var(--safe-l));
  text-align: center; -webkit-user-select: text; user-select: text; }
.lyr::-webkit-scrollbar { display: none; }
.ln { font-size: var(--ly-size); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; margin: 0 auto .3em; max-width: 22ch;
  color: rgba(255,255,255,.3); transition: color .3s; overflow-wrap: anywhere; text-wrap: balance; }
.lyr.timed .ln { cursor: pointer; }
.lyr.timed .ln.past { color: rgba(255,255,255,.22); }
.lyr.timed .ln.next { color: rgba(255,255,255,.62); }
.lyr.timed .ln.cur { color: #F2C94C; }
.lyr.plain .ln { color: #fff; }
.ln.sec { font-size: max(13px, calc(var(--ly-size) * .36)); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 1.4em auto .6em; }
.lyr.timed .ln.sec.cur { color: rgba(255,255,255,.85); }
.gap { height: calc(var(--ly-size) * .5); }
.ly-none { margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding-top: 2vh; }
.lyr.none { padding-top: calc(var(--top-h, 120px) + 4vh); }
.ly-none img, .ly-none .tile { width: min(300px, 60vw); aspect-ratio: 1; border-radius: 16px; object-fit: cover; box-shadow: 0 24px 60px -20px rgba(0,0,0,.45); }
.ly-none .tile { font-size: 34px; padding: 22px; }
.ly-none p { color: rgba(255,255,255,.7); font-size: 17px; }

/* count-in: a fixed slot above lines that start after a break, dots lighting one per second */
.cue { display: flex; justify-content: center; gap: 14px; height: 14px; margin: .2em auto .5em; }
.cue i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.18); opacity: 0; transition: background-color .2s, transform .2s, opacity .2s; }
.cue.on i { opacity: 1; }
.cue i.lit { background: #F2C94C; transform: scale(1.15); }
.stage.sun .cue i { background: rgba(11,26,43,.15); }
.stage.sun .cue i.lit { background: #C98A00; }

.scrub { padding: 8px 0 0; touch-action: none; cursor: pointer; }
.scrub-track { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); }
.scrub-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: rgba(255,255,255,.92); }
.scrub-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.scrub.drag .scrub-knob, .scrub:hover .scrub-knob { transform: scale(1); }
.scrub-times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; }
.transport { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; max-width: 520px; margin: 4px auto 0; }
.transport .ctl:nth-child(3) { margin-top: -10px; }

/* lyrics only: the bars step back until the screen is touched */
.stage.focus .bar { opacity: 0; pointer-events: none; }

/* bright stage for singing outdoors in sunlight */
.stage.sun { --stage: #FFFFFF !important; color: #0B1A2B; }
.stage.sun .st-bg { display: none; }
.stage.sun .bar { background: rgba(255,255,255,.72); }
.stage.sun .ln { color: rgba(11,26,43,.3); }
.stage.sun .lyr.timed .ln.past { color: rgba(11,26,43,.25); }
.stage.sun .lyr.timed .ln.next { color: rgba(11,26,43,.6); }
.stage.sun .lyr.timed .ln.cur, .stage.sun .lyr.plain .ln { color: #000; }
.stage.sun .ln.sec, .stage.sun .st-sub, .stage.sun .scrub-times, .stage.sun .lab { color: rgba(11,26,43,.62); }
.stage.sun .ctl, .stage.sun .aa-btn { color: #0B1A2B; }
.stage.sun .ctl .ib, .stage.sun .aa-btn { background: rgba(11,26,43,.08); }
.stage.sun .ctl .ib.tp-play { background: #0B1A2B; color: #fff; }
.stage.sun .scrub-track { background: rgba(11,26,43,.15); }
.stage.sun .scrub-fill, .stage.sun .scrub-knob { background: #0B1A2B; }
.stage.sun .st-ver .seg { background: rgba(11,26,43,.08); }
.stage.sun .st-ver .seg button { color: rgba(11,26,43,.7); }
.stage.sun .st-ver .seg button.on { background: #0B1A2B; color: #fff; }
.stage.sun .count i.lit { background: #C98A00; }

/* ---------- mini player (phone) ---------- */
.mini { position: fixed; z-index: 21; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(var(--tabs-h) + var(--safe-b) + 8px);
  display: flex; align-items: center; gap: 12px; height: var(--mini-h); padding: 0 8px 0 8px; border-radius: 16px; overflow: hidden; text-align: left;
  background: var(--mist-2); color: var(--ink); box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); }
.mini-art { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--mist); }
.mini-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-line { font-size: 14px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-play { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; flex: none; }
.mini-play svg { width: 28px; height: 28px; }
.mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.mini-bar span { display: block; height: 100%; width: 0; background: var(--link); }

/* ---------- sheets, toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(3,8,14,.55); }
.sheet { width: min(520px, 100%); max-height: 86vh; overflow-y: auto; background: var(--raise); color: var(--ink); border-radius: 20px 20px 0 0;
  padding: 10px calc(16px + var(--safe-r)) calc(var(--safe-b) + 16px) calc(16px + var(--safe-l)); animation: up .26s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--rule); margin: 0 auto 12px; }
.sh-head { display: flex; align-items: center; gap: 12px; padding: 0 0 12px; margin-bottom: 6px; box-shadow: 0 1px 0 var(--rule); }
.sh-head .thumb { width: 52px; height: 52px; }
.sh-head b { display: block; font-size: 17px; }
.sh-head span { color: var(--slate); font-size: 14px; }
.sh-title { font-size: 20px; font-weight: 700; padding: 2px 0 12px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; text-align: left; font-size: 17px; border-radius: 10px; }
.opt svg { color: var(--link); }
.opt.danger, .opt.danger svg { color: var(--danger); }
.opt small { margin-left: auto; color: var(--slate); font-size: 14px; }
.opt.on::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--link); }
.field { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 0; outline: 0; background: var(--mist); font-size: 17px; margin-bottom: 12px; }
.field:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.sizes { display: flex; align-items: center; gap: 10px; padding: 6px 0 12px; }
.sizes .btn { flex: none; width: 56px; padding: 0; }
.sizes .lv { flex: 1; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps { padding-left: 20px; margin: 0 0 8px; color: var(--slate); }
.steps li { margin: 6px 0; }
.steps b { color: var(--ink); }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 24px); transform: translate(-50%, 20px); opacity: 0;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px;
  pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.drag-row { display: flex; align-items: center; gap: 4px; }
.drag-row .handle { display: grid; place-items: center; width: 40px; height: 52px; color: var(--dim); touch-action: none; cursor: grab; flex: none; }
.drag-row.lifted { background: var(--mist); border-radius: 12px; position: relative; z-index: 2; }
.drag-row .row { flex: 1; min-width: 0; }

/* ---------- iPad and wider: library on the left, the stage always on the right ---------- */
@media (min-width: 760px) {
  :root { --ly-size: 46px; }
  .app { grid-template-columns: var(--lib-w) 1fr; grid-template-rows: minmax(0, 1fr); }
  .stage { min-height: 0; }
  .lib { box-shadow: 1px 0 0 var(--rule); }
  .lib-tabs { display: flex; }
  .tabs, .mini { display: none !important; }
  .lib-body { padding-bottom: calc(var(--safe-b) + 24px); padding-right: 16px; }
  .stage { position: relative; inset: auto; transform: none; visibility: visible; transition: background-color .6s; z-index: 1; }
  .st-close { display: none; }
  .st-top { padding-left: 24px; padding-right: calc(16px + var(--safe-r)); padding-top: calc(var(--safe-t) + 12px); }
  .lyr { padding-left: 40px; padding-right: calc(40px + var(--safe-r)); }
  .st-bot { padding-left: 40px; padding-right: calc(40px + var(--safe-r)); }
  .toast { bottom: calc(var(--safe-b) + 28px); left: calc(var(--lib-w) / 2); }
  .h1 { font-size: 28px; }
}
@media (min-width: 1100px) { :root { --ly-size: 56px; --lib-w: 400px; } }
@media (max-width: 759px) and (orientation: landscape) and (max-height: 500px) {
  :root { --ly-size: 30px; }
  .st-ver { padding-top: 2px; }
  .lyr { padding-top: calc(var(--top-h, 100px) + 6vh); }
  .ctl .ib.tp-play { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation: none !important; } }
.sh-sub { margin: 14px 0 2px; color: var(--slate); font-size: 13px; font-weight: 600; }
.aa-btn:disabled { opacity: .35; }

/* a record's page wears its own colours: cover colour, cover blurred behind (the site's cover band) */
.band { position: relative; isolation: isolate; overflow: hidden; margin: 0 -16px 8px; padding: 6px 16px 4px; background: var(--c); color: #fff; border-radius: 0 0 24px 24px; }
.band-bg { position: absolute; inset: -80px; z-index: -1; background-size: cover; background-position: center; filter: blur(48px) saturate(1.3) brightness(.5); }
.band .back { color: #fff; }
.band .hero p { color: rgba(255,255,255,.75); }
.band .btn { background: rgba(255,255,255,.16); color: #fff; }
.band .btn.primary { background: #fff; color: #0B1A2B; }
.band .btn .fill { background: rgba(255,255,255,.25); }
.band .btn.is-saved { color: #fff; }
.sel-note { max-width: 40ch; font-size: 15px; line-height: 1.45; margin-top: 6px; }
.sel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-bottom: 12px; }
.sel { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 14px; border-radius: 18px; background: var(--c); color: #fff; text-align: left; min-width: 0; }
.sel-art { width: 100%; aspect-ratio: 1; border-radius: 12px; object-fit: cover; margin-bottom: 6px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.55); }
.sel-art.tile { font-size: 22px; padding: 10px; }
.sel-t { font-weight: 700; font-size: 16px; line-height: 1.25; letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sel-s { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 500; }
.sel-s svg { width: 14px; height: 14px; }

/* ---------- Listen: lyrics for whatever's playing in the room ---------- */
/* Live Listen wears Prompter's branding: black, the orb */
.brand .listen-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px;
  background: #000; color: #fff; font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.listen-btn img { width: 26px; height: 26px; mix-blend-mode: screen; }
.listen-btn.on { box-shadow: inset 0 0 0 1.5px #7DB8E6; }
.ls-only { display: none !important; }
.stage.listening .ls-only { display: flex !important; }
.stage.listening .scrub, .stage.listening #tp-prev, .stage.listening #tp-play, .stage.listening #tp-next, .stage.listening .st-ver { display: none !important; }
.ls-state { justify-content: center; align-items: center; gap: 10px; padding-top: 8px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); }
.ls-orb { width: 34px; height: 34px; mix-blend-mode: screen; transition: transform .12s; }
.ls-state > span { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.ls-state b { font-size: 14px; color: #fff; }
.ls-state #ls-text { font-size: 13px; color: rgba(255,255,255,.7); font-weight: 500; }
/* while listening the whole stage is Prompter's: black */
.stage.listening { --stage: #000 !important; }
.stage.listening .st-bg { display: none; }
.transport .ctl.ls-only { margin-top: -10px; }
.stage.listening .transport { justify-content: space-around; padding-top: 10px; }
.dl-bar { height: 10px; border-radius: 5px; background: var(--mist-2); overflow: hidden; margin: 6px 0 14px; }
.dl-bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .3s; }

/* ---------- plain words on every control (Joel: "write things out") ---------- */
.r-word { display: inline-flex; align-items: center; justify-content: center; gap: 2px; height: 32px; padding: 0 9px; border-radius: 999px; flex: none;
  background: var(--mist); color: var(--ink); font-size: 14px; font-weight: 600; }
.r-word svg { width: 16px; height: 16px; margin-left: -3px; }
.r-word.add { background: var(--sky); color: var(--on-sky); }
.row .r-word + .r-word { margin-left: -6px; }
.row { gap: 10px; }
@media (max-width: 759px) { .r-dur { display: none; } }
.hint { display: flex; align-items: center; gap: 4px; color: var(--slate); font-size: 14px; margin: 4px 0 6px; }
.hint svg { width: 16px; height: 16px; }
.pill-demo { display: inline-flex; align-items: center; gap: 2px; padding: 2px 9px 2px 6px; border-radius: 999px; background: var(--sky); color: var(--on-sky); font-weight: 600; font-size: 14px; vertical-align: 1px; }
.pill-demo svg { width: 14px; height: 14px; }
.badge:empty, .mine-n:empty { display: none; }
.tabs button { position: relative; }
.tabs .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.lib-tabs .mine-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; }
.ctl .ib { position: relative; }
.ctl .badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: #0B1A2B; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mini-play { width: auto; flex-direction: column; gap: 0; padding: 0 6px; }
.mini-play .mp-i { display: grid; place-items: center; }
.mini-play .mp-i svg { width: 24px; height: 24px; }
.mp-l { font-size: 11px; font-weight: 600; color: var(--slate); }
.o-act { gap: 4px; }
.o-act.done { padding: 0 8px; font-size: 14px; }
.ctl:disabled { opacity: .35; }
.lib-tabs button { padding: 0 8px; }
.search .s-lab { font-weight: 600; color: var(--ink); font-size: 16px; margin-right: -2px; }
.st-ver .seg button { font-size: 14px; padding: 0 8px; }
.st-ver .seg { width: min(420px, 100%); }
.bv-help { text-align: center; font-size: 12px; color: rgba(255,255,255,.7); margin-top: 6px; }
.stage.sun .bv-help { color: rgba(11,26,43,.6); }
.st-ver { flex-direction: column; align-items: center; }

.brand-logo { height: 26px; width: auto; display: block; }
.light-only { display: none; }
:root[data-theme="light"] .light-only { display: block; } :root[data-theme="light"] .dark-only { display: none; }
.r-word.add { white-space: normal; text-align: center; line-height: 1.12; max-width: 74px; height: auto; min-height: 34px; padding: 4px 9px; font-size: 13px; }
.lane-seg { margin: 0 0 12px; }
.lane-seg button { height: 38px; font-size: 15px; }
.install-card { display: grid; grid-template-columns: 56px 1fr; gap: 12px 14px; align-items: center; padding: 16px; margin-bottom: 14px; border-radius: var(--r-panel); background: var(--mist); }
.install-card img { border-radius: 13px; }
.install-card b { display: block; font-size: 18px; letter-spacing: -0.02em; }
.install-card .r-t > span { color: var(--slate); font-size: 14px; white-space: normal; }
.install-card .install-go { grid-column: 1 / -1; flex: none; }
.steps.big { font-size: 17px; padding-left: 22px; }
.steps.big li { margin: 10px 0; color: var(--ink); }
.share-ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--mist-2); vertical-align: -8px; margin: 0 2px; }
.share-ico svg { width: 18px; height: 18px; color: var(--link); }
.ios-arrow { display: grid; place-items: center; color: var(--link); margin-top: 4px; }
.ios-arrow svg { width: 30px; height: 30px; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }
