:root {
  --velvet: #1F1626;
  --surface: #2A1F33;
  --line: #3B2E46;
  --brass: #D4A94B;
  --brass-soft: rgba(212, 169, 75, 0.18);
  --ivory: #F1EADC;
  --muted: #A99BB5;
  --danger: #E59A8C;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Schibsted Grotesk', -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --velvet: #F2EFF5;
    --surface: #E6E0EC;
    --line: #D3CADC;
    --brass: #8A6516;
    --brass-soft: rgba(138, 101, 22, 0.14);
    --ivory: #24182C;
    --muted: #6A5A76;
    --danger: #A33A28;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--velvet);
  color: var(--ivory);
  font: 17px/1.55 var(--serif);
}
.app {
  max-width: 34rem;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), 12px) 16px max(env(safe-area-inset-bottom), 24px);
}
button {
  font: 500 14px/1 var(--sans);
  color: var(--ivory);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 40px;
  cursor: pointer;
}
button[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); color: var(--brass); }
button.primary { background: var(--brass); border-color: var(--brass); color: var(--velvet); }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 20px; }
.status { font: 500 13px/1.3 var(--sans); color: var(--muted); }
.status::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--muted); vertical-align: 1px; }
.status[data-state="synced"]::before { background: var(--brass); }
.status[data-state="error"]::before { background: var(--danger); }
.langs, .depth { display: flex; gap: 6px; }
.langs button { padding: 8px 12px; min-height: 36px; }

.track { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.art { display: block; width: 76px; height: 76px; border-radius: 6px; overflow: hidden; background: var(--surface); position: relative; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-fallback { position: absolute; inset: 0; display: grid; place-items: center; font: 600 30px/1 var(--serif); color: var(--brass); background: linear-gradient(135deg, var(--surface), var(--line)); }
.track-meta { min-width: 0; }
.work { font: 600 16px/1.3 var(--sans); margin: 0; overflow-wrap: anywhere; }
.performers { font: 400 14px/1.4 var(--sans); color: var(--muted); margin: 2px 0 0; }
.album { font: 400 13px/1.4 var(--sans); color: var(--muted); margin: 1px 0 0; opacity: 0.85; }

/* Whole-track timeline: ticks mark where moments begin; the band is the current moment. */
.timeline { margin: 0 0 12px; position: relative; }
.tl-bar { position: relative; height: 14px; cursor: pointer; touch-action: none; }
.tl-thumb { position: absolute; top: 0; width: 3px; height: 14px; margin-left: -1px; border-radius: 2px; background: var(--fg); pointer-events: none; }
.tl-scrub { position: absolute; top: -22px; transform: translateX(-50%); font: 600 12px/1 var(--sans); color: var(--fg); background: var(--panel, #1d1b18); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; pointer-events: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 2px; background: var(--line); }
.tl-moment { position: absolute; top: 3px; height: 8px; border-radius: 3px; background: var(--brass-soft); }
.tl-fill { position: absolute; left: 0; top: 5px; height: 4px; border-radius: 2px; background: var(--brass); }
.tl-ticks span { position: absolute; top: 1px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: var(--muted); opacity: 0.7; }
.tl-ticks span.passed { background: var(--brass); opacity: 1; }
.tl-times { display: flex; justify-content: space-between; font: 500 12px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 6px; }

.transport { display: grid; grid-template-columns: 44px 1fr 56px 1fr 44px; gap: 6px; align-items: center; margin-bottom: 6px; }
.transport button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; min-height: 44px; }
.transport svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.transport .jump svg { width: 16px; height: 16px; }
.transport .play { min-height: 56px; background: var(--brass); border-color: var(--brass); color: var(--velvet); }
.transport .play svg { width: 26px; height: 26px; }
.transport button:disabled { opacity: 0.35; cursor: default; }
.control-note { font: 400 13px/1.45 var(--sans); color: var(--muted); margin: 0 0 10px; min-height: 0; }
.control-note:empty { display: none; }
.control-note button { margin-left: 6px; min-height: 32px; padding: 6px 12px; font-size: 13px; }

/* Two segmented controls side by side: which moments (this / all) and how much text (short / full).
   One rounded track each; the chosen half is raised. */
.toggles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 2px 0 18px; }
.views, .toggles .depth { display: inline-flex; margin: 0; padding: 3px; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.views button, .toggles .depth button { border: 0; background: transparent; color: var(--muted); min-height: 30px; padding: 5px 13px; font: 500 13px/1 var(--sans); white-space: nowrap; }
.views button[aria-pressed="true"], .toggles .depth button[aria-pressed="true"] { background: var(--velvet); color: var(--ivory); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.25); }

/* All moments of the track at once; tap a row to jump there. */
.all ol { list-style: none; margin: 0 0 24px; padding: 0; }
.all li { border-bottom: 1px solid var(--line); }
.all .row { display: grid; grid-template-columns: 3.4em 1fr; gap: 10px; width: 100%; text-align: left; padding: 14px 4px; border: 0; border-radius: 0; background: none; min-height: 0; font: inherit; color: inherit; }
.all .row:disabled { cursor: default; }
.all .time { font: 500 14px/1.5 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.all .row h3 { font: 600 19px/1.25 var(--serif); margin: 0 0 4px; }
.all .row p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--muted); }
.all .row .more { margin-top: 8px; color: var(--ivory); }
.all li.past { opacity: 0.55; }
.all li.current .row { background: var(--brass-soft); border-radius: 8px; }
.all li.current .time { color: var(--brass); }

/* Section strip: one cell per section of the work, brass for the current one. */
.strip { list-style: none; display: flex; gap: 3px; padding: 0; margin: 4px 0 14px; height: 22px; align-items: flex-end; }
.strip li { flex: 1; height: 10px; border-radius: 2px; background: var(--line); }
.strip li.played { background: var(--muted); opacity: 0.55; }
.strip li.current { background: var(--brass); height: 22px; }
.strip:empty { display: none; }

.section-label { font: 500 14px/1.3 var(--sans); color: var(--muted); margin: 0 0 4px; }
.moment-title { font: 600 clamp(30px, 8.5vw, 40px)/1.1 var(--serif); letter-spacing: -0.01em; margin: 0 0 22px; text-wrap: balance; }

/* The one bold element: time until the screen moves to the next moment. */
.countdown { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; row-gap: 6px; margin-bottom: 16px; }
.countdown-time { font: 600 20px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--brass); }
.countdown-caption { font: 400 13px/1.3 var(--sans); color: var(--muted); }
.countdown-track { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.countdown-fill { height: 100%; width: 100%; background: var(--brass); transform-origin: left; }
.countdown[data-paused="true"] .countdown-time { color: var(--muted); }
.countdown[data-paused="true"] .countdown-fill { background: var(--muted); }

.summary { font-size: 21px; line-height: 1.45; margin: 0 0 18px; }
.depth { margin-bottom: 18px; }
.body { margin: 0 0 22px; max-width: 65ch; }

.listen { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 22px; }
.listen h2 { font: 600 15px/1.3 var(--sans); margin: 0 0 10px; }
.listen ol { margin: 0; padding: 0; list-style: none; counter-reset: lf; }
.listen li { counter-increment: lf; display: grid; grid-template-columns: 1.6em 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.listen li::before { content: counter(lf); font: 500 14px/1 var(--sans); color: var(--muted); }
.listen li button { padding: 8px 12px; min-height: 36px; font-size: 13px; }
.listen li .marked { font: 500 13px/1 var(--sans); color: var(--brass); font-variant-numeric: tabular-nums; }
.hint { font: 400 13px/1.45 var(--sans); color: var(--muted); margin: 10px 0 0; }

.next { font: 400 15px/1.4 var(--sans); color: var(--muted); margin: 0 0 28px; }
.next strong { color: var(--ivory); font-weight: 500; }

.empty h1 { font: 600 28px/1.15 var(--serif); margin: 8px 0 10px; }
.empty p { color: var(--muted); margin: 0 0 24px; }

.about, .setup { border-top: 1px solid var(--line); padding: 14px 0; }
.about summary, .setup summary { font: 500 15px/1.3 var(--sans); cursor: pointer; }
.about p { margin: 10px 0 0; }

.setup-body { font: 400 15px/1.5 var(--sans); }
.steps { padding-left: 1.2em; }
.steps li { margin: 6px 0; }
.redirect code { font-size: 13px; word-break: break-all; color: var(--brass); }
label { display: block; font: 500 14px/1.3 var(--sans); margin: 14px 0 6px; }
input { width: 100%; font: 16px/1.3 var(--sans); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ivory); }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.error { color: var(--danger); min-height: 1em; }

.note { font: 400 13px/1.45 var(--sans); color: var(--muted); margin: 0 0 10px; }

.sources { font: 400 12px/1.5 var(--sans); color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.sources a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .moment-title { transition: opacity 0.35s ease; }
  .moment.switching .moment-title { opacity: 0.2; }
}

.coming { font: 500 14px/1.4 var(--sans); color: var(--brass); margin: -14px 0 16px; }
.coming:empty { display: none; }
.cue { font: 500 15px/1.45 var(--sans); margin: -6px 0 18px; padding-left: 12px; border-left: 2px solid var(--brass); }
.layers { margin: 0 0 18px; }
.layers h2 { font: 600 14px/1.3 var(--sans); color: var(--brass); margin: 18px 0 4px; }
.layers p { margin: 0; max-width: 65ch; }
.notes { margin: 0 0 22px; }
.notes blockquote { margin: 0 0 12px; padding: 2px 0 2px 14px; border-left: 2px solid var(--line); font-style: italic; }
.notes cite { display: block; font: 400 12px/1.4 var(--sans); font-style: normal; color: var(--muted); margin-top: 4px; }
.notes cite a { color: var(--muted); }
.song h3 { font: 600 14px/1.3 var(--sans); color: var(--brass); margin: 16px 0 4px; }
.song p { margin: 8px 0 0; }
.song ul { margin: 6px 0 0; padding-left: 1.1em; font: 400 15px/1.5 var(--sans); }
.song .credit-role { color: var(--muted); }
.song .attr { font: 400 12px/1.4 var(--sans); color: var(--muted); margin-top: 12px; }
.song .attr a { color: var(--muted); }
.load-error { font: 500 16px/1.5 var(--sans); color: var(--danger); margin: 0 0 20px; }
.own-app { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.own-app summary { font: 500 14px/1.3 var(--sans); color: var(--muted); cursor: pointer; }
.layers h2.now::before { content: '● '; }
.all .row .eyebrow { display: block; font: 500 12px/1.3 var(--sans); color: var(--muted); margin-bottom: 2px; }

/* ---------- richness badge (stars + level + what it means) ---------- */
:root { --timed: #9DB8F2; --timed-soft: rgba(157, 184, 242, 0.14); }
@media (prefers-color-scheme: light) { :root { --timed: #2F55A4; --timed-soft: rgba(47, 85, 164, 0.10); } }
.rich { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -6px 0 14px; font: 400 12.5px/1.3 var(--sans); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font: 600 12px/1 var(--sans); white-space: nowrap; border: 1.2px solid transparent; }
.pill .stars { letter-spacing: 1px; font-size: 11px; }
.pill.t3 { background: var(--brass); color: var(--velvet); border-color: var(--brass); }
.pill.t2 { background: var(--timed-soft); color: var(--timed); border-color: var(--timed); }
.pill.t1 { background: transparent; color: var(--ivory); border: 1.2px dashed var(--muted); }
.pill.t0 { background: transparent; color: var(--muted); border-color: var(--line); }
.pill.sm { height: 21px; padding: 0 7px; font-size: 11px; }
.pill.sm .stars { font-size: 10px; }
.rich-detail { color: var(--muted); }

/* ---------- moment-rich album picker (dialog opened from the top bar) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bar .status { flex: 1; min-width: 0; }
.rich-open { display: inline-flex; align-items: center; gap: 6px; flex: none; border-color: var(--brass); color: var(--brass); background: var(--brass-soft); font-weight: 600; }
.rich-open .star { font-size: 14px; }
.picker-dialog { width: 100%; max-width: 34rem; height: 100%; max-height: 100%; margin: 0 auto; padding: max(env(safe-area-inset-top), 12px) 14px max(env(safe-area-inset-bottom), 16px); border: none; background: var(--velvet); color: var(--ivory); font-family: var(--sans); }
@media (min-width: 600px) { .picker-dialog { height: auto; max-height: 86vh; margin-top: 7vh; border-radius: 20px; border: 1px solid var(--line); } }
.picker-dialog::backdrop { background: rgba(10, 6, 14, 0.6); }
.pd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 12px; }
.pd-head h2 { margin: 0; font: 600 18px/1.3 var(--sans); }
.pd-head .icon { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.pd-head .icon svg { width: 20px; height: 20px; }
.pick-search { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ivory); font: 400 16px/1 var(--sans); margin-bottom: 10px; }
.pick-search::placeholder { color: var(--muted); }
.picker-intro { font: 400 13px/1.45 var(--sans); color: var(--muted); margin: 10px 6px; }
.rich-only { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border-radius: 14px; padding: 10px 14px; text-align: left; min-height: 52px; }
.rich-only[aria-pressed="true"] { color: var(--ivory); background: var(--surface); border-color: var(--line); }
.rich-only strong { display: block; font: 600 14px/1.3 var(--sans); }
.rich-only small { display: block; font: 400 12px/1.35 var(--sans); color: var(--muted); margin-top: 2px; }
.switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ivory); transition: left .15s; }
.rich-only[aria-pressed="true"] .switch { background: var(--brass); }
.rich-only[aria-pressed="true"] .switch::after { left: 21px; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick { border-top: 1px solid var(--line); }
.pick-empty { font: 400 13px/1.45 var(--sans); color: var(--muted); padding: 12px 6px; }
.pick > details > summary { display: flex; align-items: center; gap: 12px; padding: 12px 6px; cursor: pointer; list-style: none; }
.pick > details > summary::-webkit-details-marker { display: none; }
.pick-art { flex: none; width: 46px; height: 46px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; font: 600 18px/1 var(--serif); color: var(--muted); }
.pick-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-family: var(--sans); }
.pick-meta strong { font: 600 14.5px/1.25 var(--sans); }
.pick-meta small { font-size: 12px; color: var(--muted); }
.pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 3px; }
.dots { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.dot { width: 9px; height: 9px; border-radius: 3px; border: 1.2px solid var(--line); }
.dot.t3 { background: var(--brass); border-color: var(--brass); }
.dot.t2 { background: var(--timed); border-color: var(--timed); }
.dot.t1 { border-style: dashed; border-color: var(--muted); }
.pick-body { padding: 0 4px 12px; }
.pick-actions { display: flex; gap: 8px; }
.pick-actions button { flex: 1; min-height: 44px; border-radius: 12px; }
.pick-msg { font: 400 13px/1.4 var(--sans); color: var(--muted); margin: 8px 2px 0; }
.pick-msg:empty { display: none; }
.pick-tracks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pick-tracks button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border-radius: 12px; padding: 9px 10px; min-height: 52px; }
.pick-track { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pick-track-title { font: 600 13.5px/1.3 var(--sans); }
.pick-track .rich { margin: 0; font-size: 11.5px; }
.pick-play { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ivory); display: grid; place-items: center; }
.pick-play svg { width: 15px; height: 15px; fill: var(--velvet); }

/* ---------- refining "Heard it" marks ---------- */
.listen li.is-marked, .own-list li { grid-template-columns: 1.6em 1fr; }
.listen li.is-marked .mk, .own-list .mk { grid-column: 2 / -1; }
.mk { display: flex; flex-wrap: wrap; gap: 6px; }
.listen li .mk button, .own-list .mk button { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.mk .mk-time { color: var(--brass); border-color: var(--brass); background: var(--brass-soft); font-variant-numeric: tabular-nums; font-weight: 600; }
.own-list { list-style: none; margin: 8px 0 0; padding: 0; }
.own-list li { display: grid; gap: 8px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.own-list li::before { content: '+'; font: 600 14px/1 var(--sans); color: var(--brass); }
.own-mark { margin-top: 12px; font-family: var(--sans); }
.own-mark label { display: block; font: 500 13px/1.3 var(--sans); color: var(--muted); margin-bottom: 6px; }
.own-mark div { display: flex; gap: 8px; }
.own-mark input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ivory); font: 400 16px/1 var(--sans); }

.pick-search-wrap { position: relative; margin-bottom: 10px; }
.pick-search-wrap .pick-search { margin-bottom: 0; padding-right: 52px; }
.pick-search::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.pick-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--line); border: none; color: var(--ivory); }
.pick-clear svg { width: 16px; height: 16px; }

/* ---------- favourites ---------- */
.track { grid-template-columns: 76px 1fr auto; }
.icon.fav-toggle, .icon.fav-open { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; flex: none; }
.fav-toggle svg, .fav-open svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fav-toggle[aria-pressed="true"] svg { fill: var(--brass); stroke: var(--brass); }
.fav-toggle[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); }
.fav-open { color: var(--brass); border-color: var(--brass); background: var(--brass-soft); }
.fav-play-all { width: 100%; min-height: 46px; border-radius: 12px; margin-bottom: 4px; }
.fav-list { list-style: none; margin: 8px 0 0; padding: 0; }
.fav-list li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); }
.fav-art { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--surface); display: grid; place-items: center; font: 600 20px/1 var(--serif); color: var(--muted); }
.fav-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-family: var(--sans); }
.fav-meta strong { font: 600 14px/1.25 var(--sans); overflow-wrap: anywhere; }
.fav-meta small { font-size: 12px; color: var(--muted); }
.fav-meta .rich { margin: 2px 0 0; font-size: 11.5px; }
.fav-list .pick-play { border: none; cursor: pointer; width: 44px; height: 44px; min-height: 0; padding: 0; }
.fav-remove { width: 44px; height: 44px; min-height: 0; padding: 0; display: grid; place-items: center; }
.fav-remove svg { width: 18px; height: 18px; }
.fav-empty { font: 400 14px/1.5 var(--sans); color: var(--muted); padding: 16px 4px; border-top: none !important; display: block !important; }
/* Top bar: buttons on one row, the sync status on its own line below. */
.bar { flex-wrap: wrap; row-gap: 8px; justify-content: flex-end; }
.bar .status { order: 9; flex: 1 0 100%; }

.fav-list li.confirming { grid-template-columns: 52px 1fr; }
.fav-confirm { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; font: 500 13px/1.3 var(--sans); color: var(--ivory); }
.fav-confirm span { margin-right: auto; }
.fav-confirm button { min-height: 40px; }
button.danger { background: var(--danger); border-color: var(--danger); color: var(--velvet); }

img.pick-art { object-fit: cover; display: block; }

/* Owner review of drafts (?review) */
.review { display: grid; gap: 12px; min-width: 0; }
.review-title { font-size: 1.2rem; margin: 0; }
.review-msg { color: var(--muted, #888); }
.refresh { justify-self: start; }
.draft { border: 1px solid var(--line, #ccc); border-radius: 10px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.draft-title { margin: 0; font-size: 1rem; font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.draft-overview { margin: 0; }
.draft-moment { border-top: 1px solid var(--line, #ccc); padding-top: 8px; display: grid; gap: 4px; min-width: 0; }
.draft-time { font-variant-numeric: tabular-nums; color: var(--muted, #888); margin-right: 8px; }
.draft-listen { margin: 0; color: var(--muted, #888); font-size: 0.92em; }
.draft-sources { margin: 0; padding-left: 18px; font-size: 0.8em; word-break: break-all; }
.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.draft-status { color: var(--muted, #888); font-size: 0.9em; }
.draft-actions button.approve { font-weight: 600; }

/* Sources of owner-approved moments */
.moment-sources { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 0.8rem; min-width: 0; }
.moment-sources a { word-break: break-all; color: var(--muted, #888); }

/* Owner: ask for research on the song playing */
.research { margin: 6px 0 2px; font: inherit; font-size: 0.85rem; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line, #888); background: transparent; color: inherit; }
.research:disabled { opacity: 0.6; }
/* Owner: draft editor on the review page */
.editor { display: grid; gap: 8px; margin-top: 10px; min-width: 0; }
.editor-holder { min-width: 0; }
.field { display: grid; gap: 4px; font-size: 0.85rem; min-width: 0; }
.field input, .field textarea { font: inherit; width: 100%; box-sizing: border-box; min-width: 0; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line, #ccc); background: transparent; color: inherit; }
.editor-h { margin: 8px 0 0; font-size: 0.9rem; }
.editor .save, .editor .cancel { justify-self: start; }

/* Owner: research request button and its one-line message */
.icon.research { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; flex: none; margin-right: 8px; }
.icon.research svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon.research:disabled { opacity: 0.5; }
.research-msg { font-size: 0.85rem; color: var(--muted, #aaa); margin: 6px 0 0; }
.request-row { margin: 6px 0; font-size: 0.92rem; word-break: break-word; }
.requests { display: grid; gap: 8px; min-width: 0; }
.track-actions { display: flex; gap: 8px; align-items: center; flex: none; }

/* Review: each list level nested inside another steps in to the right. */
.review details details, .requests details details { margin-left: 14px; }
/* The text of a marked point is a button: tap to edit the wording. */
.listen li .mk-text, .own-list .mk-text { all: unset; cursor: pointer; font: inherit; color: inherit; text-decoration: underline dotted var(--muted); text-underline-offset: 4px; }
.listen li .mk-text:focus-visible, .own-list .mk-text:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.timings-save { margin-top: 14px; display: grid; gap: 6px; }
.timings-save button { justify-self: start; }
.field.check { display: flex; align-items: center; gap: 8px; }
.field.check input { width: auto; }

/* Confirmation before an owner action (request web research). */
.confirm-dialog { max-width: 26rem; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--velvet); color: var(--ivory); font-family: var(--sans); }
.confirm-dialog::backdrop { background: rgba(10, 6, 14, 0.6); }
.confirm-dialog h2 { font: 600 18px/1.3 var(--sans); margin: 0 0 10px; }
.confirm-dialog p { margin: 0 0 10px; line-height: 1.45; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Listen and mark: a panel that folds away. */
.listen-sum { list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; padding: 2px 0 8px; }
.listen-sum::-webkit-details-marker { display: none; }
.listen-sum h2 { margin: 0; }
.listen-sum h2::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
.listen:not([open]) .listen-sum h2::after { transform: rotate(-45deg); }
.listen-count { font: 500 13px/1.2 var(--sans); color: var(--brass); white-space: nowrap; }
.listen-order { font: 400 13px/1.45 var(--sans); color: var(--muted); margin: 0 0 6px; }

/* ---------- soundstage: where the band stands ---------- */
.stage { border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 12px; margin: 0 0 22px; background: linear-gradient(180deg, rgba(212, 169, 75, 0.07), transparent 70%); }
.stage-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stage-toggle { all: unset; cursor: pointer; font: 600 15px/1.25 var(--sans); color: var(--ivory); }
.stage-toggle .chev { display: inline-block; width: 7px; height: 7px; margin-left: 9px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg); vertical-align: 3px; transition: transform 0.15s; }
.stage-toggle[aria-expanded="false"] .chev { transform: rotate(-45deg); vertical-align: 1px; }
.stage-from { font: 500 12px/1.3 var(--sans); color: var(--muted); text-align: right; }
.stage-line { font: 500 13px/1.4 var(--sans); color: var(--muted); margin: 6px 0 0; }
.stage-body { margin-top: 10px; }
.floor { position: relative; height: 150px; border-radius: 12px; background: radial-gradient(120% 90% at 50% 0%, rgba(241, 234, 220, 0.06), transparent 70%); touch-action: none; user-select: none; -webkit-user-select: none; }
.stage.editing .floor { outline: 1px dashed var(--line); }
.floor.drop-ok { outline: 1px dashed var(--brass) !important; }
.spk { position: absolute; top: 6px; width: 22px; height: 30px; border: 1.5px solid var(--muted); border-radius: 5px; opacity: 0.7; }
.spk::after { content: ''; position: absolute; left: 5px; top: 11px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); }
.spk.l { left: 4px; } .spk.r { right: 4px; }
.lane { position: absolute; left: 34px; right: 34px; top: 22px; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
.sp { position: absolute; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; gap: 3px; font: 500 12px/1.15 var(--sans); text-align: center; white-space: nowrap; color: var(--ivory); }
.sp-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--brass-soft); border: 1.5px solid var(--brass); display: grid; place-items: center; font: 600 11px/1 var(--sans); color: var(--brass); }
.sp small { color: var(--muted); font-size: 11px; }
.stage.editing .sp { cursor: grab; touch-action: none; }
.sp.dragging { opacity: 0.25; }
.sp.ghost { position: fixed; z-index: 50; transform: translate(-50%, -50%); pointer-events: none; }
.sp.ghost.off .sp-dot { border-style: dashed; opacity: 0.6; }
.you { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font: 500 11px/1 var(--sans); color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.you i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: block; }
.stage-hint { font: 400 12.5px/1.4 var(--sans); color: var(--muted); margin: 8px 0 0; }
.stage-tray { display: flex; flex-wrap: wrap; gap: 14px 18px; padding: 12px 6px 4px; margin-top: 8px; border-top: 1px dashed var(--line); min-height: 64px; }
.stage-tray .sp { position: static; transform: none; }
.stage-add-player { display: flex; gap: 8px; margin-top: 10px; }
.stage-add-player input { flex: 1; min-width: 0; font: 15px/1.2 var(--sans); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ivory); }
.stage-why { font: 400 13.5px/1.45 var(--sans); color: var(--muted); margin: 10px 0 0; }
.stage-src { font: 500 11.5px/1.3 var(--sans); color: var(--muted); margin: 8px 0 0; opacity: 0.85; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stage-actions button { min-height: 34px; padding: 7px 14px; font-size: 13px; }
.stage-add { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--sans); color: var(--brass); background: transparent; border: 1px dashed var(--line); border-radius: 999px; padding: 9px 14px; min-height: 0; margin: 0 0 18px; }
.stage-tray::before { content: attr(data-label); flex-basis: 100%; font: 500 12px/1.3 var(--sans); color: var(--muted); }

/* Soundstage player details: name, instrument symbol (searchable), remove. */
.stage .sp-dot { width: 38px; height: 38px; }
.stage .sp-dot svg, .floor .sp-dot svg { width: 22px; height: 22px; }
.floor .sp-dot { width: 38px; height: 38px; }
.player-dialog .field { margin-bottom: 10px; }
.player-dialog .field span { font: 500 13px/1.3 var(--sans); color: var(--muted); }
.player-dialog input { font: 16px/1.2 var(--sans); padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ivory); width: 100%; }
.icon-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 210px; overflow-y: auto; margin: 0 0 12px; padding: 2px; }
.icon-pool button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; padding: 8px 4px; border-radius: 12px; font: 500 11px/1.15 var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line); white-space: normal; text-align: center; }
.icon-pool button svg { width: 24px; height: 24px; color: var(--brass); }
.icon-pool button[aria-selected="true"] { border-color: var(--brass); background: var(--brass-soft); color: var(--ivory); }
button.danger { color: var(--danger); border-color: var(--line); background: transparent; }
.stage-add-player { margin-top: 10px; font: 500 13px/1 var(--sans); color: var(--brass); background: transparent; border: 1px dashed var(--line); min-height: 34px; padding: 7px 14px; }

/* Fine placement: exact positions while editing, guides, live readout, sliders. */
.floor { height: 180px; }
.floor .sp { transform: translate(-50%, -19px); }
.guide { position: absolute; top: 34px; bottom: 26px; width: 0; border-left: 1px dashed var(--line); opacity: 0.8; }
.guide.c { left: 50%; } .guide.q1 { left: 28.5%; opacity: 0.45; } .guide.q3 { left: 71.5%; opacity: 0.45; }
.guide-t { position: absolute; font: 500 10px/1 var(--sans); color: var(--muted); opacity: 0.8; letter-spacing: 0.04em; text-transform: uppercase; }
.guide-t.l { left: 7%; bottom: 8px; } .guide-t.c { left: 50%; transform: translateX(-50%); top: 40px; } .guide-t.r { right: 7%; bottom: 8px; }
.guide-t.back { left: 7%; top: 42px; }
.guide-t.front { left: 7%; bottom: 10px; }
.stage-readout { font: 500 12.5px/1.3 var(--sans); color: var(--brass); margin: 6px 0 0; min-height: 1.3em; }
.pos-field { margin: 4px 0 10px; }
.pos-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.pos-row small { font: 500 11px/1 var(--sans); color: var(--muted); min-width: 34px; }
.pos-row small:last-child { text-align: right; }
.pos-row input[type="range"] { flex: 1; accent-color: var(--brass); }
/* Folded card: a thin line between the speakers with each musician's symbol. */
.stage-strip { all: unset; display: block; position: relative; height: 34px; margin: 10px 0 2px; cursor: pointer; width: 100%; }
.stage-strip .spk { top: 3px; transform: scale(0.8); }
.strip-line { position: absolute; left: 30px; right: 30px; top: 50%; height: 1px; background: var(--line); }
.strip-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--velvet); border: 1.5px solid var(--brass); color: var(--brass); }
.strip-dot svg { width: 15px; height: 15px; }
/* Review page playback. */
.review-play { display: flex; gap: 8px; margin: 10px 0 4px; }
.review-play button { min-height: 34px; padding: 7px 14px; font-size: 13px; }
.play-at { all: unset; cursor: pointer; font: 600 13px/1 var(--sans); color: var(--brass); padding: 4px 8px; border: 1px solid var(--brass); border-radius: 999px; margin-right: 8px; font-variant-numeric: tabular-nums; }
.play-msg:empty { display: none; }
.draft-moment .play-at { display: inline-flex; width: auto; justify-self: start; align-self: start; }
.play-msg { position: sticky; bottom: 8px; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
