/* Misdir — playbill: one dark house in layers. Bone type, vermilion for every action, gold for every moment that is marked. */
:root {
  /* one dark house, in layers: the page, the shell (top bar, band, proscenium), panels, raised things, fields */
  --stage: #121010;
  --shell: #181515;
  --surface: #1e1b1a;
  --raised: #2b2625;
  --field: #0d0b0b;
  --paper: var(--stage);
  --white: var(--surface);
  --hover: rgba(239, 233, 220, 0.06);
  --ink: #efe8da;
  --ink-soft: #d8d0c1;
  --muted: #b3aa9b;
  --dim: #8a8275;
  --line: rgba(239, 233, 220, 0.14);
  --line-strong: rgba(239, 233, 220, 0.38);
  --stage-surface: var(--surface);
  --stage-raised: var(--raised);
  --stage-ink: var(--ink);
  --stage-muted: var(--muted);
  --stage-dim: var(--dim);
  --stage-line: var(--line);
  --stage-line-strong: var(--line-strong);
  /* accents */
  --vermilion: #e34a2f;
  --vermilion-deep: #c43d25;
  --gold: #d9b15c;
  --gold-ink: #e2c070;
  --gold-tint: rgba(217, 177, 92, 0.16);
  --velvet: var(--gold);
  --velvet-deep: var(--gold-ink);
  --velvet-tint: var(--gold-tint);
  --danger: #e34a2f;
  --radius: 2px;
  --radius-sm: 2px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 36px rgba(0, 0, 0, 0.4);
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --narrow: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
a.link, button.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a.link:hover, button.link:hover { text-decoration-color: var(--gold-ink); color: var(--gold-ink); }
main { max-width: 820px; margin: 0 auto; padding: 36px 20px 96px; }
body.wide main { max-width: 1000px; }
h1 { font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 8px; }
/* Bodoni hairlines vanish at large optical sizes on a screen: titles in the app use the text cut, the landing keeps the display cut */
h1, h2, .spaces .name, .subspaces li .title, .audio-title { font-optical-sizing: none; font-variation-settings: "opsz" 24; }
.hero h1 { font-optical-sizing: auto; font-variation-settings: normal; }
/* the band: the page title sits on the stage under the top bar; the paper begins under a gold rule.
   On a material page the band stays open and the proscenium (stage + bar) continues it to full width. */
.band { background: var(--shell); color: var(--stage-ink); border-bottom: 2px solid var(--gold); }
.band.open { border-bottom: 0; }
.band-inner { max-width: 820px; margin: 0 auto; padding: 30px 20px 28px; }
body.wide .band-inner { max-width: 1000px; }
.band .eyebrow { color: var(--gold); }
.band h1 { margin: 0; color: var(--stage-ink); }
.band .lead { margin: 10px 0 0; color: var(--stage-muted); max-width: 640px; font-size: 1.02rem; line-height: 1.5; }
.band-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.band-text { min-width: 0; }
.band-actions { display: flex; gap: 10px; align-items: center; }
.band-actions .button.secondary, .band-actions button.secondary { background: transparent; color: var(--stage-ink); border-color: var(--stage-line-strong); }
.band-actions .button.secondary:hover, .band-actions button.secondary:hover { background: var(--stage-raised); border-color: var(--stage-ink); }
.band .crumbs { color: var(--stage-muted); margin: 0 0 12px; }
.band .crumbs a { color: var(--stage-muted); }
.band .crumbs a:hover { color: var(--gold); }
.band .crumbs .sep { color: var(--stage-dim); }
.band .back { color: var(--stage-muted); margin-bottom: 10px; }
.band .back:hover { color: var(--gold); }
.band .muted { color: var(--stage-muted); }
body.work main { padding-top: 0; }
.proscenium { position: relative; z-index: 0; padding-bottom: 12px; }
.proscenium::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; background: var(--shell); border-bottom: 2px solid var(--gold); z-index: -1; }
.proscenium .stage { border-radius: 0; box-shadow: none; }
.proscenium .bar { background: transparent; border: 0; border-top: 1px solid var(--stage-line); border-radius: 0; box-shadow: none; padding: 12px 0 2px; }
/* the top bar is the first dark band: the mark, the wordmark, the person */
.top { display: flex; justify-content: space-between; align-items: center; height: 60px; padding: 0 24px; background: var(--shell); color: var(--stage-ink); border-bottom: 1px solid var(--stage-line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--stage-ink); }
.brand svg { flex: none; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1; letter-spacing: -0.035em; }
.stage-badge { margin-left: 10px; font-family: var(--narrow); font-stretch: 75%; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--stage); background: var(--gold); padding: 2px 7px; border-radius: 999px; }
.top nav { display: flex; gap: 20px; align-items: center; font-size: 0.9rem; color: var(--stage-muted); }
.top button.link, .top a.link { color: var(--stage-ink); text-decoration-color: var(--stage-line-strong); }
.top button.link:hover, .top a.link:hover { color: var(--gold); text-decoration-color: var(--gold); }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--stage-ink); }
.inline { display: inline; }
.avatar { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--stage); font-weight: 600; font-size: 0.78rem; align-items: center; justify-content: center; flex: none; }
.eyebrow { margin: 0 0 8px; font-family: var(--narrow); font-stretch: 75%; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 500; }
.dev a { word-break: break-all; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.panel.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.panel-head h1 { margin-bottom: 0; }
.panel-head p.muted { margin: 6px 0 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
input, textarea { width: 100%; padding: 11px 13px; background: var(--field); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
:is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
select { color: var(--ink); background: var(--field); }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: var(--vermilion); color: #fff; border: 1px solid var(--vermilion); border-radius: var(--radius-sm); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
button:hover, .button:hover { background: var(--vermilion-deep); border-color: var(--vermilion-deep); }
button:active, .button:active { transform: translateY(1px); }
button.link { background: none; border: 0; color: var(--ink); padding: 0; font-weight: 400; }
button.link:hover { background: none; }
button.link.danger { color: var(--danger); text-decoration-color: rgba(196, 61, 37, 0.4); }
button:disabled { opacity: 0.45; cursor: default; }
ul, ol { list-style: none; padding: 0; margin: 0; }
.ico { flex: none; }
/* spaces as cards */
.spaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.spaces li a { display: flex; flex-direction: column; gap: 6px; height: 184px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; overflow: hidden; transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.spaces li a:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--raised); box-shadow: var(--shadow); }
.spaces .name { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spaces .desc { color: var(--muted); font-size: 0.9rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spaces .open { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; font-family: var(--narrow); font-stretch: 75%; font-size: 0.82rem; color: var(--dim); }
.spaces .open b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--gold-ink); }
.spaces li.new a { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); background: transparent; }
.spaces li.new a:hover { color: var(--gold-ink); border-color: var(--gold-ink); background: var(--hover); }
/* materials */
.materials li { display: flex; gap: 14px; align-items: center; padding: 13px 10px; margin: 0 -10px; border-top: 1px solid var(--line); border-radius: var(--radius-sm); }
.materials li:first-child { border-top: 0; }
.materials li:hover { background: var(--hover); }
.materials li[data-status="uploading"], .materials li[data-status="processing"] { opacity: 0.55; }
.materials .cell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.materials .title { font-weight: 500; text-decoration: none; }
.materials a.title:hover { color: var(--gold-ink); }
.materials .meta { color: var(--muted); font-size: 0.84rem; }
.tag { font-family: var(--narrow); font-stretch: 75%; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; padding: 4px 8px; border-radius: 999px; flex: none; background: var(--raised); color: var(--ink-soft); border: 1px solid var(--line-strong); }
.tag.video { color: var(--gold-ink); }
.tag.pdf { color: var(--ink); }
.tag.epub { color: var(--ink-soft); }
.tag.audio { color: var(--vermilion-deep); }
.tag.text { color: var(--muted); }
.dropzone { margin-top: 22px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--paper); transition: border-color 0.15s, background 0.15s; }
.dropzone.over { border-color: var(--gold-ink); background: var(--gold-tint); }
.uploads li { padding: 10px 0; border-top: 1px solid var(--line); }
.uploads .row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.uploads progress { width: 100%; height: 6px; accent-color: var(--gold-ink); margin-top: 6px; }
.uploads .err { color: var(--danger); }
/* work page: the stage and its bar are the dark instrument on the page */
.work-head { margin-bottom: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back:hover { color: var(--gold-ink); }
.stage { position: relative; background: #000; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; box-shadow: var(--shadow); }
.stage-video { aspect-ratio: 16 / 9; }
.stage-video video { width: 100%; height: 100%; display: block; background: #000; }
.bigplay { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: var(--vermilion); color: #fff; border: 0; padding: 0 0 0 3px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.bigplay:hover { background: var(--vermilion-deep); }
.bigplay.hidden { display: none; }
.stage-pdf { background: #0d0b0b; height: min(68vh, 820px); overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 18px; touch-action: pan-x pan-y; }
.stage-pdf canvas { background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); max-width: 100%; }
.stage-epub { background: var(--white); height: min(68vh, 820px); }
#epub-view { height: 100%; }
.bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--stage-surface); color: var(--stage-ink); border: 1px solid var(--stage-line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.ctl { padding: 6px 10px; min-width: 36px; height: 36px; background: transparent; color: var(--ink); border-color: var(--line-strong); font-size: 0.9rem; font-weight: 500; }
.ctl:hover { background: var(--raised); border-color: var(--ink); }
a.ctl { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; height: 36px; box-sizing: border-box; }
.pdf-search .ctl { background: var(--stage-surface); color: var(--stage-ink); border-color: var(--stage-line); }
.pdf-search .ctl:hover { background: var(--stage-raised); border-color: var(--stage-line-strong); }
.bar .ctl { background: transparent; color: var(--stage-ink); border-color: transparent; }
.bar .ctl:hover { background: var(--stage-raised); border-color: transparent; }
.bar #play { width: 38px; min-width: 38px; height: 38px; padding: 0 0 0 2px; border-radius: 50%; background: var(--vermilion); border-color: var(--vermilion); color: #fff; }
.bar #play.playing { padding: 0; }
.bar #play:hover { background: var(--vermilion-deep); border-color: var(--vermilion-deep); }
.bar .ctl-wrap, .bar #loop { border: 1px solid var(--stage-line-strong); border-radius: 999px; padding: 0 12px; }
.bar .ctl-wrap { padding: 0 10px 0 0; }
.bar .ctl-wrap select { padding-left: 12px; }
.bar #loop.on { background: var(--gold); border-color: var(--gold); color: var(--stage); }
.bar #loop.on .key { background: rgba(18, 16, 16, 0.12); color: var(--stage); border-color: rgba(18, 16, 16, 0.3); }
.bar #help, .bar #fs, .bar a.ctl { color: var(--stage-muted); }
.bar #help:hover, .bar #fs:hover, .bar a.ctl:hover { color: var(--stage-ink); }
.bar .ctl .key { background: transparent; border-color: var(--stage-line); }
.bar [data-skip] { font-family: var(--narrow); font-stretch: 75%; }
#play .i-pause, #play.playing .i-play { display: none; }
#play.playing .i-pause { display: block; }
.time { font-family: var(--narrow); font-stretch: 75%; font-variant-numeric: tabular-nums; font-size: 0.84rem; color: var(--stage-muted); white-space: nowrap; min-width: 84px; }
.tl { position: relative; flex: 1; height: 46px; cursor: pointer; touch-action: none; outline: none; }
.tl:focus-visible .tl-track { box-shadow: 0 0 0 3px var(--gold-tint); }
.tl-track { position: absolute; left: 0; right: 0; top: 25px; height: 6px; background: var(--stage-line-strong); border-radius: 3px; overflow: hidden; }
.tl-fill { height: 100%; width: 0; background: var(--gold); }
.tl-head { position: absolute; top: 21px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--stage-surface); border: 3px solid var(--gold); left: 0; pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.tl-markers { position: absolute; left: 0; right: 0; top: 0; height: 22px; }
.mk { position: absolute; top: 0; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--gold); color: var(--stage); font-size: 0.68rem; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid var(--stage-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); cursor: pointer; transition: transform 0.12s; }
.mk:hover, .mk.active { transform: scale(1.2); z-index: 2; }
.mk.private { background: var(--stage-surface); color: var(--gold); border-color: var(--gold); }
.mk .tip { display: none; position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); min-width: 190px; max-width: 280px; padding: 9px 11px; background: var(--ink); color: var(--stage); font-size: 0.8rem; font-weight: 400; line-height: 1.4; border-radius: var(--radius-sm); white-space: normal; pointer-events: none; z-index: 5; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.mk .tip b { color: var(--vermilion-deep); font-weight: 600; }
.mk:hover .tip { display: block; }
.composer { display: flex; gap: 10px; align-items: center; margin: 20px 0 10px; }
.composer input[name="body"] { flex: 1; }
.composer .lock { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
.composer .lock input { width: 15px; height: 15px; accent-color: var(--gold-ink); margin: 0; }
.composer .lock input:checked + span { color: var(--gold-ink); font-weight: 600; }
.composer-hint { margin: 20px 0 10px; }
.notes { margin-top: 6px; }
.notes li { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 12px; align-items: start; padding: 13px 10px; margin: 0 -10px; border-top: 1px solid var(--line); border-radius: var(--radius-sm); transition: background 0.2s; }
.notes li.active { background: var(--gold-tint); }
.notes li.muted, .notes li.error { display: block; }
.notes .head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 0.84rem; color: var(--muted); }
.notes .head .name { color: var(--ink); font-weight: 600; }
.notes .jump { font-family: var(--narrow); font-stretch: 75%; color: var(--gold-ink); background: var(--gold-tint); padding: 1px 7px; border-radius: 999px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.notes .jump:hover { background: var(--gold); color: var(--stage); }
.notes .body { grid-column: 2; margin: 0; white-space: pre-wrap; color: var(--ink-soft); }
.notes .del { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 0.85rem; }
.notes .only-me { font-family: var(--narrow); font-stretch: 75%; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: 999px; }
@media (max-width: 640px) {
  .top { padding: 0 16px; }
  .top nav { gap: 14px; }
  .band-inner { padding: 22px 16px 20px; }
  .wordmark, .who-name { display: none; }
  main { padding-top: 24px; }
  h1 { font-size: 1.75rem; }
  .panel { padding: 20px; }
  .time { min-width: 0; }
  .bar { flex-wrap: wrap; }
  .tl { flex-basis: 100%; order: 10; }
  .composer { flex-wrap: wrap; }
  .composer input[name="body"] { flex-basis: 100%; order: -1; }
  .notes li { grid-template-columns: 28px 1fr; }
  .notes .del { grid-column: 2; grid-row: auto; justify-self: start; }
}

/* ---- full screen on the reader: film or page alone, or with the notes column (.with-notes) */
.fs-label { margin-left: 2px; }
.reader-notes { margin-top: 6px; }
.fs-hud, .fs-zone { display: none; }
.reader:fullscreen, .reader.is-full { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; height: 100dvh; margin: 0; background: #0b0a09; display: flex; overflow: hidden; }
.reader:fullscreen .reader-main, .reader.is-full .reader-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.reader:fullscreen .proscenium, .reader.is-full .proscenium { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0; }
.reader:fullscreen .proscenium::before, .reader.is-full .proscenium::before { display: none; }
.reader:fullscreen .stage, .reader.is-full .stage { flex: 1; min-height: 0; height: auto; max-height: none; border: 0; border-radius: 0; margin: 0; box-shadow: none; }
.reader:fullscreen .stage-video, .reader.is-full .stage-video { background: #000; aspect-ratio: auto; }
.reader:fullscreen .stage-video video, .reader.is-full .stage-video video { width: 100%; height: 100%; object-fit: contain; }
.reader:fullscreen .stage-video .bigplay, .reader.is-full .stage-video .bigplay { display: none; }
.reader:fullscreen .stage-pdf, .reader.is-full .stage-pdf { background: #0b0a09; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); align-items: center; }
.reader:fullscreen .stage-epub, .reader.is-full .stage-epub, .reader:fullscreen .stage-text, .reader.is-full .stage-text { background: var(--white); }
.reader:fullscreen .stage-text, .reader.is-full .stage-text { padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); }
/* pure mode: only the picture */
.reader:fullscreen:not(.with-notes) .bar, .reader.is-full:not(.with-notes) .bar,
.reader:fullscreen:not(.with-notes) .composer, .reader.is-full:not(.with-notes) .composer,
.reader:fullscreen:not(.with-notes) .reader-notes, .reader.is-full:not(.with-notes) .reader-notes { display: none; }
/* with notes: picture about 70%, notes on the right */
.reader:fullscreen.with-notes, .reader.is-full.with-notes { background: var(--paper); }
.reader:fullscreen.with-notes .reader-main, .reader.is-full.with-notes .reader-main { flex: 1 1 70%; padding: 12px 0 10px 12px; }
.reader:fullscreen.with-notes .stage, .reader.is-full.with-notes .stage { border-radius: var(--radius) var(--radius) 0 0; }
.reader:fullscreen.with-notes .stage-video .bigplay, .reader.is-full.with-notes .stage-video .bigplay { display: inline-flex; }
.reader:fullscreen.with-notes .bar, .reader.is-full.with-notes .bar { display: flex; background: var(--stage-surface); padding: 10px 14px; border-top: 0; }
.reader:fullscreen.with-notes .composer, .reader.is-full.with-notes .composer { display: flex; margin: 10px 0 0; }
.reader:fullscreen.with-notes .reader-notes, .reader.is-full.with-notes .reader-notes { display: block; flex: 0 0 min(440px, 32%); margin: 0; overflow: auto; padding: 14px 18px; border-left: 1px solid var(--line); background: var(--surface); }
.reader:fullscreen.with-notes .notes li, .reader.is-full.with-notes .notes li { margin: 0; padding: 12px 4px; }
/* overlay bits inside the stage */
.reader:fullscreen .fs-zone, .reader.is-full .fs-zone { display: block; position: absolute; top: 0; bottom: 0; width: 28%; z-index: 2; cursor: pointer; }
.reader:fullscreen .fs-prev, .reader.is-full .fs-prev { left: 0; }
.reader:fullscreen .fs-next, .reader.is-full .fs-next { right: 0; }
.reader:fullscreen .fs-hud, .reader.is-full .fs-hud { display: flex; position: absolute; top: max(10px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 3; justify-content: space-between; align-items: center; padding: 0 14px; opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.reader:fullscreen .fs-hud.show, .reader.is-full .fs-hud.show, .reader:fullscreen.with-notes .fs-hud, .reader.is-full.with-notes .fs-hud { opacity: 1; pointer-events: auto; }
.fs-hud-right { display: flex; gap: 8px; align-items: center; }
.fs-status { background: rgba(18, 16, 16, 0.78); border: 1px solid var(--stage-line); color: var(--stage-ink); font-family: var(--narrow); font-stretch: 75%; font-size: 0.85rem; padding: 5px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.fs-status:empty { display: none; }
.fs-exit { width: 38px; height: 38px; border-radius: 50%; background: rgba(18, 16, 16, 0.78); color: var(--stage-ink); border: 1px solid var(--stage-line); padding: 0; justify-content: center; }
.fs-notes { height: 38px; border-radius: 999px; background: rgba(18, 16, 16, 0.78); color: var(--stage-ink); border: 1px solid var(--stage-line); padding: 0 14px; font-size: 0.85rem; }
.fs-notes.on { background: var(--gold); color: var(--stage); border-color: var(--gold); }
.fs-exit:hover, .fs-notes:hover { background: var(--vermilion); border-color: var(--vermilion); color: #fff; }
@media (max-width: 760px) {
  .fs-label { display: none; }
  .reader:fullscreen.with-notes, .reader.is-full.with-notes { flex-direction: column; }
  .reader:fullscreen.with-notes .reader-main, .reader.is-full.with-notes .reader-main { flex: 1 1 60%; padding: 8px 8px 0; }
  .reader:fullscreen.with-notes .reader-notes, .reader.is-full.with-notes .reader-notes { flex: 0 0 40%; border-left: 0; border-top: 1px solid var(--line); }
}
/* ---- landing: a dark poster band, then the paper */
body.plain main { max-width: 960px; }
.band.hero .band-inner { padding: 72px 20px 64px; max-width: 960px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(2.9rem, 7.5vw, 5.6rem); line-height: 0.95; margin: 14px 0 26px; letter-spacing: -0.03em; }
.hero .lead { font-size: 1.2rem; line-height: 1.5; max-width: 620px; color: var(--stage-muted); margin: 0 0 28px; }
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 0; }
.hero-actions .muted { color: var(--stage-muted); }
.pillars-wrap { padding: 48px 0 0; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-bottom: 36px; }
.pillars li { border-top: 1px solid var(--line-strong); padding: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.pillars b { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.05; letter-spacing: -0.02em; }
.pillars span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.fine { color: var(--dim); font-size: 0.85rem; }
@media (max-width: 700px) { .pillars { grid-template-columns: 1fr; gap: 20px; } .band.hero .band-inner { padding: 40px 16px 44px; } }
/* ---- shared bits */
.navlink { text-decoration: none; color: var(--stage-muted); }
.navlink:hover { color: var(--stage-ink); }
.button.secondary, button.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); font-weight: 500; }
.button.secondary:hover, button.secondary:hover { background: var(--raised); border-color: var(--ink); }
.flash { background: var(--gold-tint); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; }
.quote { margin: 0 0 14px; padding: 0 0 0 14px; border-left: 3px solid var(--gold); font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--ink-soft); }
.plain-list { margin: 0 0 18px; padding-left: 18px; list-style: disc; }
.chip { font-family: var(--narrow); font-stretch: 75%; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: 999px; color: var(--muted); vertical-align: middle; }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.015em; margin: 0 0 14px; }
h3 { font-family: var(--narrow); font-stretch: 75%; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
/* ---- manage block on a space */
.manage { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.manage summary { cursor: pointer; padding: 10px 14px; color: var(--muted); font-size: 0.92rem; }
.manage-body { padding: 4px 14px 14px; font-size: 0.92rem; }
.copyable { display: inline-block; background: var(--field); border: 1px solid var(--line); padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.82rem; margin: 6px 6px 6px 0; user-select: all; }
/* ---- people */
.invite .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.invite .row input { flex: 1; min-width: 200px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 10px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; cursor: pointer; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--gold-ink); }
.check.all { flex-basis: 100%; }
.invite textarea { margin-bottom: 10px; }
.rows li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rows li:first-child { border-top: 0; }
.rows .cell { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
.rows .meta { color: var(--muted); font-size: 0.84rem; }
.table-wrap { overflow: auto; }
.grid { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.grid th { text-align: center; font-family: var(--narrow); font-stretch: 75%; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); font-size: 0.7rem; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid th:first-child { text-align: left; }
.grid td { text-align: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.grid td.person { text-align: left; display: flex; gap: 10px; align-items: center; }
.grid td.person .meta { display: block; color: var(--muted); font-size: 0.82rem; }
.grid input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--gold-ink); margin: 0; }

/* ---- material rows: reorder and rename */
.materials .handle { color: var(--dim); cursor: grab; display: inline-flex; user-select: none; }
.materials .actions .link { color: var(--muted); }
.materials li:hover .actions .link { color: var(--ink); }
.materials li:hover .actions .link.danger { color: var(--danger); }
.materials li:hover .handle { color: var(--muted); }
.materials li.dragging { opacity: 0.4; }
.materials li.moved { background: var(--gold-tint); }
.materials .actions { display: flex; gap: 10px; align-items: center; flex: none; }
.ctl.mini { min-width: 28px; height: 28px; padding: 2px 6px; font-size: 0.8rem; color: var(--muted); border-color: var(--line); }
.materials .rename { padding: 6px 8px; font-weight: 500; max-width: 420px; }
@media (max-width: 640px) { .materials li { flex-wrap: wrap; } .materials .actions { flex-basis: 100%; justify-content: flex-end; } }

/* ---- nested spaces */
.crumbs { margin: 0 0 8px; font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: var(--radius-sm); }
.crumbs a:hover { color: var(--gold-ink); text-decoration: underline; }
.crumbs .sep { display: inline-flex; color: var(--dim); }
.subspaces { margin-bottom: 6px; }
.subspaces .folder { color: var(--gold-ink); display: inline-flex; flex: none; }
.subspaces li .title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.drop-over { background: var(--gold-tint) !important; outline: 2px dashed var(--gold-ink); outline-offset: -2px; border-radius: var(--radius-sm); }
.materials li.moved-away { opacity: 0.5; }
.move-select { padding: 4px 6px; font-size: 0.85rem; max-width: 260px; }
.inline-label { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-label select { padding: 6px 8px; font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--field); color: var(--ink); }

/* ---- the bell and the activity page */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: var(--stage-muted); text-decoration: none; }
.bell:hover { background: var(--stage-raised); color: var(--stage-ink); }
.bell.has-new { color: var(--stage-ink); }
.bell .badge { position: absolute; top: 1px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--vermilion); color: #fff; font-size: 0.68rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--shell); }
.activity li { border-top: 1px solid var(--line); }
.activity li:first-child { border-top: 0; }
.activity li a { display: flex; gap: 12px; padding: 14px 10px; margin: 0 -10px; text-decoration: none; border-radius: var(--radius-sm); }
.activity li a:hover { background: var(--hover); }
.activity li.fresh a { background: var(--gold-tint); }
.activity li.fresh a:hover { background: rgba(217, 177, 92, 0.32); }
.act-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.act-head { font-size: 0.86rem; display: flex; gap: 8px; align-items: baseline; }
.act-text { color: var(--ink); }
.act-where { font-size: 0.84rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.act-where .jump { font-family: var(--narrow); font-stretch: 75%; color: var(--gold-ink); background: var(--white); border: 1px solid var(--line); padding: 0 6px; border-radius: 999px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.new { background: var(--vermilion); color: #fff; border-color: var(--vermilion); }

.row-actions { display: flex; gap: 14px; align-items: center; }

/* ---- audio and text stages */
.stage-audio { background: linear-gradient(135deg, #1b1817, #2a1d1a); min-height: 260px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 22px 24px; gap: 14px; }
.audio-art { display: flex; flex-direction: row; align-items: baseline; gap: 12px; color: var(--stage-ink); padding: 0; }
.audio-icon { font-size: 3rem; color: var(--gold); }
.audio-title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.015em; }
.stage-audio .muted { color: var(--stage-muted); }
.stage-audio .bigplay { position: static; align-self: center; margin-top: 4px; width: 64px; height: 64px; }
.stage-text { background: var(--white); height: min(68vh, 820px); overflow: auto; padding: 32px 40px; }
.text-view { margin: 0 auto; max-width: 720px; white-space: pre-wrap; word-wrap: break-word; font: 105%/1.7 Georgia, "Times New Roman", serif; color: var(--ink); }
#viewer:fullscreen .stage-text, #viewer.is-full .stage-text { height: auto; }
#viewer:fullscreen .stage-audio, #viewer.is-full .stage-audio { min-height: 0; }

/* ---- loop range, speed select, help */
.tl-loop { position: absolute; top: 0; height: 100%; background: rgba(217, 177, 92, 0.3); display: none; }
/* ---- learnable controls: the key on each button, a flash over the picture, a first-visit line of advice */
.ctl .key { margin-left: 6px; font-family: var(--narrow); font-stretch: 75%; font-size: 0.68rem; line-height: 1.3; color: var(--stage-muted); background: var(--stage); border: 1px solid var(--stage-line); border-radius: 3px; padding: 1px 5px; vertical-align: 1px; }
#loop.on .key { background: var(--stage); color: var(--gold); border-color: var(--gold); }
.ctl-wrap { display: inline-flex; align-items: center; height: 36px; padding: 0 8px 0 0; border: 1px solid var(--stage-line); border-radius: var(--radius-sm); }
.ctl-wrap select { border: 0; background: transparent; padding: 6px 2px 6px 10px; font: inherit; font-size: 0.9rem; color: var(--stage-ink); appearance: none; -webkit-appearance: none; cursor: pointer; }
.ctl-wrap select option { color: var(--ink); background: var(--white); }
.ctl-wrap select:focus { outline: none; }
.ctl-wrap:focus-within { border-color: var(--stage-line-strong); }
.ctl .ico { flex: none; }
.touch-only { display: none; }
@media (hover: none) and (pointer: coarse) {
  .keys-only, .ctl .key { display: none; }
  .touch-only { display: revert; }
}
@media (max-width: 760px) { .ctl .key { display: none; } }
.stage-video video { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.flash { position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 6px); z-index: 4; max-width: 86%; padding: 7px 14px; border-radius: 999px; background: rgba(18, 16, 16, 0.82); border: 1px solid var(--stage-line); color: var(--stage-ink); font-size: 0.88rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.18s, transform 0.18s; pointer-events: none; }
.flash.show { opacity: 1; transform: translate(-50%, 0); }
/* the audio stage keeps its play button at the bottom, so the flash goes to the top right corner */
.stage-audio .flash { left: auto; right: 14px; bottom: auto; top: 14px; transform: translate(0, -6px); max-width: 60%; }
.stage-audio .flash.show { transform: translate(0, 0); }
.reader:fullscreen .flash, .reader.is-full .flash { bottom: 72px; }
.coach { display: flex; gap: 10px; align-items: baseline; margin: 12px 0 0; padding: 10px 14px; background: var(--gold-tint); border-radius: var(--radius-sm); font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); }
.coach[hidden] { display: none; }
.coach b { color: var(--gold-ink); font-weight: 600; }
.coach kbd { font-family: var(--narrow); font-stretch: 75%; font-size: 0.74rem; background: var(--field); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.coach button { margin-left: auto; white-space: nowrap; font-size: 0.85rem; }
.reader:fullscreen .coach, .reader.is-full .coach { display: none; }
.help-box section + section { margin-top: 0; }
@media (max-width: 640px) { .coach { flex-wrap: wrap; } .coach button { margin-left: 0; } }
#loop.on { background: var(--gold-tint); border-color: var(--gold); color: var(--gold); }
.help { position: fixed; inset: 0; z-index: 80; background: rgba(18, 16, 16, 0.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.help[hidden] { display: none; }
.help-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.help-box dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 18px; }
.help-box dt { font-family: var(--narrow); font-stretch: 75%; font-size: 0.82rem; background: var(--field); border: 1px solid var(--line-strong); border-radius: 3px; padding: 2px 8px; text-align: center; white-space: nowrap; }
.help-box dd { margin: 0; align-self: center; color: var(--ink-soft); }

/* ---- resume chip and toast */
.materials .resume { color: var(--gold-ink); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--stage); padding: 10px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; opacity: 0; transition: opacity 0.3s, transform 0.3s; z-index: 90; box-shadow: var(--shadow); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- pdf text layer, search, pinch */
.pdf-wrap { position: relative; flex: none; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
.pdf-wrap canvas { display: block; box-shadow: none; }
.textLayer { position: absolute; inset: 0; overflow: hidden; line-height: 1; text-align: initial; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; z-index: 1; }
.textLayer span, .textLayer br { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: -1; cursor: default; user-select: none; }
.textLayer ::selection { background: rgba(227, 74, 47, 0.35); color: transparent; }
.textLayer span.hit { background: rgba(217, 177, 92, 0.6); border-radius: 2px; }
.pdf-search { position: absolute; top: 10px; right: 10px; z-index: 4; display: flex; gap: 6px; align-items: center; background: var(--stage-surface); border: 1px solid var(--stage-line); border-radius: var(--radius-sm); padding: 6px 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); color: var(--stage-ink); }
.pdf-search[hidden] { display: none; }
.pdf-search input { width: 200px; padding: 6px 9px; background: var(--field); color: var(--stage-ink); border-color: var(--stage-line); }
.pdf-search input:focus { border-color: var(--gold); }
.pdf-search .muted { color: var(--stage-muted); }
.pdf-search .ctl { min-width: 30px; height: 30px; padding: 4px 6px; }
@media (max-width: 640px) { .pdf-search { left: 10px; right: 10px; } .pdf-search input { width: auto; flex: 1; min-width: 0; } }

/* ---- waveform and scrub preview */
.wave { position: relative; min-height: 110px; }
.wave-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: var(--stage-muted); }
.tl-preview { position: absolute; bottom: 48px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 6; }
.tl-preview[hidden] { display: none; }
.tl-preview img { width: 160px; height: 90px; object-fit: cover; border-radius: var(--radius); background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); border: 2px solid var(--stage-ink); }
.tl-preview.no-image img { display: none; }
.tl-preview span { background: var(--stage-ink); color: var(--stage); font-family: var(--narrow); font-stretch: 75%; font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }

/* ---- notes header with sort toggle */
.notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0 2px; font-size: 0.84rem; }
.notes-head .sort { display: inline-flex; gap: 8px; align-items: baseline; }
.notes-head button.link { font-size: 0.84rem; color: var(--muted); text-decoration: none; }
.notes-head button.link.on { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- stats */
.grid.stats th { text-align: left; }
.grid.stats td { text-align: left; vertical-align: middle; }
.grid.stats td.person { display: flex; }
a.plain { text-decoration: none; }
a.plain:hover { text-decoration: underline; }
.chip.private { background: var(--paper); border-color: var(--line-strong); color: var(--ink-soft); }
.activity li.private a { border-left: 3px solid var(--line-strong); }

/* ---- space trees and the access panel */
.picker { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 6px 0 10px; background: var(--paper); }
.picker-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.picker-head .check.all { flex: 1; }
.tree-search, .list-search { max-width: 240px; padding: 7px 10px; font-size: 0.9rem; }
.tree, .tree-children { list-style: none; margin: 0; padding: 0; }
.tree-children { margin-left: 22px; border-left: 1px solid var(--line-strong); padding-left: 6px; }
.tree-row { display: flex; align-items: center; gap: 6px; padding: 4px 4px; border-radius: var(--radius-sm); }
.tree-row:hover { background: var(--hover); }
.tree-row.on { background: var(--gold-tint); }
.tree-row .check { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.tree-row .meta { color: var(--muted); font-size: 0.8rem; }
.tree-note { font-size: 0.78rem; }
.tw, .tw-empty { width: 20px; height: 20px; flex: none; }
.tw { background: none; border: 0; color: var(--muted); padding: 0; font-size: 0.85rem; cursor: pointer; justify-content: center; }
.tw:hover { color: var(--ink); background: none; }
.picker.all-on .tree { opacity: 0.45; pointer-events: none; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--field); }
.seg-btn { background: transparent; color: var(--muted); border: 0; padding: 6px 14px; font-size: 0.85rem; font-weight: 500; }
.seg-btn.on { background: var(--ink); color: var(--stage); }
.seg-btn:hover { background: var(--paper); color: var(--ink); }
.seg-btn.on:hover { background: var(--ink); color: var(--stage); }
.access { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 18px; align-items: start; }
.access-left { border-right: 1px solid var(--line); padding-right: 14px; }
.pick-list { margin-top: 8px; max-height: 520px; overflow: auto; }
.pick { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 400; }
.pick:hover { background: var(--hover); }
.pick.on { background: var(--gold-tint); }
.pick-text { display: flex; flex-direction: column; min-width: 0; }
.pick-text .meta { color: var(--muted); font-size: 0.8rem; }
.people-rows li { padding: 8px 0; }
.people-rows .check { display: inline-flex; align-items: center; gap: 8px; }
.people-rows input[type=checkbox] { accent-color: var(--gold-ink); }
#space-pick .tree-name { cursor: pointer; }
#space-pick .tree-name:hover { text-decoration: underline; }
@media (max-width: 760px) { .access { grid-template-columns: 1fr; } .access-left { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; } }

/* ---- products: the buyer's gate and page, the creator's panel */
.gate .step { margin: 0 0 6px; font-family: var(--narrow); font-stretch: 75%; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-weight: 600; }
.gate h2 { margin-bottom: 6px; }
.powered { margin: 22px 0 0; display: flex; align-items: center; gap: 6px; }
.wordmark-small { font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: -0.03em; color: var(--muted); }
.continue { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; color: var(--gold); }
.continue-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.continue-text .muted { font-size: 0.88rem; }
.sections li a { display: grid; grid-template-columns: 22px 1fr auto 16px; gap: 4px 14px; align-items: center; padding: 16px 18px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--gold-ink); transition: background 0.15s, border-color 0.15s; }
.sections li a:hover { background: var(--raised); border-color: var(--line-strong); }
.sections .cell { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.sections .title { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.015em; font-optical-sizing: none; font-variation-settings: "opsz" 24; }
.sections .meta { color: var(--muted); font-size: 0.88rem; }
.sections .count { font-family: var(--narrow); font-stretch: 75%; font-size: 0.8rem; color: var(--dim); white-space: nowrap; }
.sections li a > svg:last-child { color: var(--dim); }
.group { margin: 6px 0 0; }
.chip.status-live { background: var(--gold); color: var(--stage); border-color: var(--gold); }
.chip.status-draft { color: var(--ink-soft); }
.chip.status-archived { color: var(--dim); }
.band-actions .chip { margin-right: 4px; }
.form-labels label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.form-labels label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.form-labels input, .form-labels textarea, .form-labels select { font-size: 1rem; color: var(--ink); }
.form-labels select { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; }
.spaces.products .name { color: var(--ink); }

/* ---- chapters: the list under the player, ticks on the bar */
.chapters { margin: 18px 0 0; }
.chapters[hidden] { display: none; }
.chapters-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chapters-head h3 { margin: 0; }
.chapters-tools { display: inline-flex; gap: 12px; align-items: center; font-size: 0.85rem; }
.chapter-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chapter-form[hidden] { display: none; }
.chapter-form input { flex: 1 1 240px; }
.chapter-form textarea { flex-basis: 100%; width: 100%; font-family: var(--narrow); font-size: 0.9rem; }
.chapter-list { margin: 8px 0 0; display: flex; flex-direction: column; }
.chapter-list li { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.chapter-list li:first-child { border-top: 0; }
.chapter-list li.empty { padding: 8px 0; border: 0; display: block; }
.chapter-go { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; background: none; border: 0; padding: 10px 8px; margin: 0 -8px; border-radius: var(--radius-sm); color: var(--ink); text-align: left; font-weight: 400; }
.chapter-go:hover { background: var(--hover); }
.chapter-list li.on .chapter-go { background: var(--gold-tint); }
.chapter-go .num { font-family: var(--narrow); font-stretch: 75%; font-size: 0.8rem; color: var(--dim); font-weight: 600; }
.chapter-list li.on .num { color: var(--gold); }
.chapter-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-at { font-family: var(--narrow); font-stretch: 75%; font-size: 0.82rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chapter-tools { display: inline-flex; gap: 10px; font-size: 0.82rem; flex: none; }
.tl-chapters { position: absolute; left: 0; right: 0; top: 22px; height: 12px; pointer-events: none; }
.tl-chapters .tick { position: absolute; top: 0; width: 2px; height: 12px; margin-left: -1px; background: var(--ink); opacity: 0.55; border-radius: 1px; }
.reader:fullscreen .chapters, .reader.is-full .chapters { display: none; }
@media (max-width: 640px) { .chapter-go { grid-template-columns: 24px 1fr; } .chapter-go .chapter-at { grid-column: 2; } .chapter-list li { flex-wrap: wrap; } .chapter-tools { flex-basis: 100%; padding: 0 0 8px 32px; } }
.chapter-list li.empty code { font-family: var(--narrow); font-stretch: 75%; background: var(--field); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }
.chapters-tools .ctl { height: 32px; font-size: 0.85rem; }
