/* Line Runner — the look of a good theatre programme: soft grey stock, charcoal ink,
   a deep claret accent and a champagne mark for the actor's own lines.
   Layout: one centred column; the player sits on a dark "stage" bar above the script. */
:root {
  --paper: #f3f2f4;
  --card: #ffffff;
  --ink: #1d1a21;
  --muted: #6b6570;
  --rule: #e4e1e6;
  --accent: #7b2d45;
  --accent-soft: #f4e9ed;
  --brass: #a8834a;
  --mine-bg: #f6efe2;
  --mine-ink: #1d1a21;
  --stage: #1d1a21;
  --stage-ink: #f3f2f4;
  --stage-muted: #a39fa8;
  --stage-line: rgba(255, 255, 255, .16);
  --stage-btn: rgba(255, 255, 255, .08);
  --good: #2f6f57;
  --bad: #a3333d;
  --shadow: 0 1px 2px rgba(29, 26, 33, .04), 0 10px 30px rgba(29, 26, 33, .05);
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131116; --card: #1b1820; --ink: #ece9ef; --muted: #9d97a3; --rule: #2c2832;
    --accent: #d199ab; --accent-soft: #2a1d23; --brass: #cfaa6c; --mine-bg: #2a2419; --mine-ink: #f1e6d2;
    --stage: #0c0a0e; --stage-ink: #ece9ef; --stage-muted: #9d97a3; --stage-line: rgba(255,255,255,.12); --stage-btn: rgba(255,255,255,.06);
    --good: #7cc3a2; --bad: #ef8a91; --shadow: 0 1px 2px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131116; --card: #1b1820; --ink: #ece9ef; --muted: #9d97a3; --rule: #2c2832;
  --accent: #d199ab; --accent-soft: #2a1d23; --brass: #cfaa6c; --mine-bg: #2a2419; --mine-ink: #f1e6d2;
  --stage: #0c0a0e; --stage-ink: #ece9ef; --stage-muted: #9d97a3; --stage-line: rgba(255,255,255,.12); --stage-btn: rgba(255,255,255,.06);
  --good: #7cc3a2; --bad: #ef8a91; --shadow: 0 1px 2px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16.5px/1.55 var(--body);
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2rem, 5.2vw, 3rem); font-weight: 300; letter-spacing: -.01em; }
h2 { font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
h3 { font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin-top: 1rem; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Header */
/* Header and menu: stays at the top while the page scrolls */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  margin-inline: -16px; padding-inline: 16px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .top { background: var(--paper); } }
.topbar {
  max-width: 880px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 12px 10px;
}
.tabs { max-width: 880px; margin: 0 auto; }
.navshow {
  font: 400 1rem/1.2 var(--display); color: var(--ink); text-align: right;
  min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand { flex: none; }
.tablist { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-inline: -8px; }
.tablist::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 11px 8px 10px; font: 500 .7rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 440px) {
  .brandname { letter-spacing: .2em; }
  .navshow { font-size: .92rem; }
  .tab { letter-spacing: .08em; padding-inline: 7px; }
}
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; cursor: pointer; }
.mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--brass); color: var(--brass); font: 500 12px/1 var(--display); letter-spacing: .08em;
}
.brandname { font: 500 .92rem/1 var(--display); letter-spacing: .26em; text-transform: uppercase; color: var(--ink); }
.homewho { display: flex; align-items: center; gap: 12px; margin-top: 4px; color: var(--muted); font: 500 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .18em; }
.homewho input {
  width: 9rem; border: 0; border-bottom: 1px solid var(--rule); background: transparent; border-radius: 0;
  padding: 6px 2px; text-transform: none; letter-spacing: 0; font: 500 1rem/1.2 var(--body); color: var(--ink);
}
.homewho input:focus { border-bottom-color: var(--accent); outline: none; }

main { max-width: 880px; margin: 0 auto; padding-block: 18px 90px; }
.view { display: flex; flex-direction: column; gap: 20px; }

/* Home */
.hero { padding-block: 26px 10px; display: flex; flex-direction: column; gap: 14px; }
.hl { color: var(--accent); font-style: italic; font-weight: 300; }
.lede { max-width: 58ch; color: var(--muted); margin: 0; font-size: 1.05rem; }

.panel {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); min-width: 0;
}
.hint { color: var(--muted); font-size: .92rem; margin: 0; }
.msg { margin: 0; min-height: 1.4em; font-weight: 500; }
.msg.err, .warn { color: var(--bad); }
.warn { margin: 0; font-weight: 500; }
.empty { color: var(--muted); margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.field { display: flex; flex-direction: column; gap: 8px; font: 500 .72rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); min-width: 0; }
.field input[type=text], .field select {
  border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; padding: 11px 12px;
  font: 400 1rem/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); width: 100%;
}
.field input[type=text]:focus, .field select:focus { border-color: var(--accent); outline: none; }
.field.compact { flex: 1 1 200px; }
.field input[type=range] { width: 100%; accent-color: var(--accent); }
.check1 { display: flex; gap: 10px; align-items: center; font-size: .95rem; flex: 1 1 200px; }
.check1 input { width: 18px; height: 18px; accent-color: var(--accent); }

.drop {
  border: 1px dashed var(--muted); border-radius: 8px; padding: 26px 16px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; text-align: center; cursor: pointer; background: var(--paper); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropbig { font: 400 1.15rem/1.2 var(--display); color: var(--ink); }
.dropsmall { color: var(--muted); font-size: .9rem; }

.btn {
  border: 1px solid transparent; border-radius: 6px; padding: 11px 22px; cursor: pointer; min-height: 46px;
  font: 500 .78rem/1 var(--display); text-transform: uppercase; letter-spacing: .14em;
  transition: background .15s, color .15s, border-color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.big { width: 100%; font-size: .85rem; min-height: 56px; }
.btn.danger { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: 500 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .16em; cursor: pointer; }
.link:hover { color: var(--accent); }

.shows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.shows li { display: flex; align-items: center; gap: 12px; padding-block: 16px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.shows li:first-child { border-top: 0; padding-top: 4px; }
.shows .sinfo { flex: 1 1 220px; min-width: 0; }
.shows .sname { font: 400 1.25rem/1.25 var(--display); }
.shows .smeta { color: var(--muted); font-size: .9rem; }
.score-pill {
  font: 500 .72rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 7px 11px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums;
}

/* Setup */
.crumbs { padding-top: 2px; }
.showtitle { font-size: clamp(1.8rem, 4.6vw, 2.6rem); font-weight: 300; }
.stats { color: var(--muted); margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--rule); background: transparent; border-radius: 6px; padding: 10px 16px; cursor: pointer;
  font: 500 .8rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.cast, .ignored, .history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cast li { display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap; padding-block: 16px; border-top: 1px solid var(--rule); }
.cast li:first-child { border-top: 0; padding-top: 4px; }
.cname { font: 500 .85rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; flex: 1 1 140px; min-width: 0; }
.cname small { display: block; font: 400 .85rem/1.4 var(--body); color: var(--muted); letter-spacing: 0; text-transform: none; margin-top: 2px; }
.cname .you { background: var(--mine-bg); color: var(--mine-ink); border: 1px solid var(--brass); padding: 2px 7px; border-radius: 4px; font: 500 .62rem/1.4 var(--display); margin-left: 8px; letter-spacing: .14em; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 9px 13px; cursor: pointer; font: 500 .72rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; min-height: 38px; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.seg.unsure { border-color: var(--bad); }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; cursor: pointer;
  display: grid; place-items: center; font-size: .78rem; color: var(--ink);
}
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.tiny { font-size: .82rem; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.ignored li { display: flex; justify-content: space-between; align-items: center; padding-block: 6px; font: 500 .82rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; }

.vpick { flex: 1 1 100%; display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.vsel { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; min-width: 0; font: 500 .68rem/1 var(--display); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.vsel select { flex: 1; min-width: 0; border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; padding: 9px 10px; font: 400 .92rem/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); }
.pitch { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.pitch button { border: 0; background: transparent; padding: 9px 12px; cursor: pointer; font: 500 .68rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; min-height: 38px; }
.pitch span { min-width: 4.6em; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; border-inline: 1px solid var(--rule); padding: 9px 4px; }

details.check summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
details.check summary::-webkit-details-marker { display: none; }
details.check summary h2::after { content: "  +"; color: var(--brass); }
details.check[open] summary h2::after { content: "  –"; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.checklist li strong { font: 500 .78rem/1.6 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.checklist li.d { color: var(--muted); font-style: italic; padding-left: 28px; }
.checklist li.s { font: 500 .75rem/1.4 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding-top: 10px; }
.checklist input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.checklist .pg { color: var(--muted); font-size: .78rem; flex: none; width: 3.2em; padding-top: 2px; font-variant-numeric: tabular-nums; }

.history li { display: flex; justify-content: space-between; gap: 10px; padding-block: 10px; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.history li:first-child { border-top: 0; }
.history strong { font: 400 1.05rem/1.2 var(--display); color: var(--accent); }

.stickyfoot { position: sticky; bottom: 0; padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--paper) 35%); }

/* Rehearsal */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode {
  text-align: left; border: 1px solid var(--rule); background: var(--card); border-radius: 10px; padding: 18px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: border-color .15s;
}
.mode strong { font: 400 1.15rem/1.25 var(--display); color: var(--ink); }
.mode span { color: var(--muted); font-size: .9rem; }
.mode:hover { border-color: var(--muted); }
.mode[aria-selected=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mode:disabled { opacity: .5; cursor: default; }
@media (max-width: 480px) { .modes { grid-template-columns: 1fr; } }
.controls { gap: 16px; }
.ctlrow { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.recnote { flex: 1 1 200px; align-self: center; }

.deck {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--navh, 0px) + 8px); z-index: 5; background: var(--stage); color: var(--stage-ink);
  border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 12px 34px rgba(12, 10, 14, .22);
}
.nowbox { display: flow-root; }
.deckhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.deckhead .now { font: 500 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .22em; color: var(--brass); }
.nowline { font: 400 1.2rem/1.5 var(--body); max-height: 9.5em; overflow: auto; color: var(--stage-ink); }
.nowline.mine { background: var(--mine-bg); color: var(--mine-ink); border-radius: 6px; padding: 8px 12px; box-shadow: inset 2px 0 0 var(--brass); }
.cam { float: right; width: 92px; max-width: 30%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; margin: 0 0 8px 14px; transform: scaleX(-1); background: #000; }
.recbadge { font: 500 .68rem/1 var(--display); letter-spacing: .14em; color: #fff; background: #b8323c; padding: 6px 10px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.listen { display: flex; flex-direction: column; gap: 12px; }
.heard { margin: 0; font-size: .95rem; color: var(--stage-muted); min-height: 1.5em; }
.deck .btn.primary { background: var(--brass); color: #1d1a21; }
.deck .btn.primary:hover { background: var(--stage-ink); }
.deck .btn.ghost { color: var(--stage-ink); border-color: var(--stage-line); }
.deck .btn.ghost:hover { border-color: var(--stage-ink); }
.mic { display: flex; gap: 4px; align-items: flex-end; height: 20px; }
.mic span { width: 3px; background: var(--brass); border-radius: 2px; animation: bar 1s ease-in-out infinite; height: 40%; }
.mic span:nth-child(2) { animation-delay: .15s; } .mic span:nth-child(3) { animation-delay: .3s; }
@keyframes bar { 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .mic span { animation: none; height: 70%; } }
.transport { display: flex; justify-content: center; align-items: center; gap: 18px; padding-top: 4px; border-top: 1px solid var(--stage-line); padding-block: 14px 0; }
.tbtn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--stage-line); background: var(--stage-btn); color: var(--stage-ink); font-size: .95rem; cursor: pointer;
}
.tbtn:hover { border-color: var(--stage-ink); }
.tbtn.play { width: 62px; height: 62px; background: var(--brass); border-color: var(--brass); color: #1d1a21; font-size: 1.2rem; }
.tbtn.play:hover { background: var(--stage-ink); border-color: var(--stage-ink); }
.tbtn:disabled { opacity: .5; }

.script { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.script li { padding: 10px 14px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.script li:hover { background: var(--card); }
.script .who { font: 500 .72rem/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.script .txt { font-size: 1.02rem; line-height: 1.6; overflow-wrap: anywhere; }
.script li.dir .txt { font-style: italic; color: var(--muted); font-size: .95rem; }
.script li.scene { font: 400 1.35rem/1.25 var(--display); padding-top: 28px; color: var(--accent); cursor: default; }
.script li.scene:hover { background: none; }
.script li.pagebreak { font: 500 .66rem/1 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .22em; padding: 18px 14px 4px; cursor: default; border-top: 1px solid var(--rule); border-radius: 0; margin-top: 8px; }
.script li.pagebreak:hover { background: none; }
.script li.mine { background: var(--mine-bg); box-shadow: inset 2px 0 0 var(--brass); }
.script li.mine .txt { color: var(--mine-ink); }
.script li.mine .who { color: var(--brass); }
.script li.mine .who::after { content: "  ·  You"; }
.script li.off { opacity: .4; text-decoration: line-through; }
.script li.now { background: var(--card); box-shadow: inset 2px 0 0 var(--accent), var(--shadow); }
.script li.mine.now { background: var(--mine-bg); box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }

/* Results */
.scorecard { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding-block: 8px; }
.ring {
  --p: 0; width: 136px; height: 136px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--rule) 0);
}
.ring span {
  width: 128px; height: 128px; border-radius: 50%; background: var(--paper); display: grid; place-items: center;
  font: 300 2.3rem/1 var(--display); font-variant-numeric: tabular-nums;
}
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lines li { padding-block: 14px; border-top: 1px solid var(--rule); display: flex; gap: 16px; align-items: flex-start; }
.lines li:first-child { border-top: 0; padding-top: 4px; }
.lines .pct { font: 400 1.05rem/1.5 var(--display); width: 3.4em; flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.lines .pct.full { color: var(--good); }
.lines .body { min-width: 0; overflow-wrap: anywhere; line-height: 1.6; }
.lines .meta { font: 500 .66rem/1.6 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lines .said { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.miss { color: var(--bad); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#recVideo { width: 100%; max-height: 70vh; border-radius: 8px; background: #000; }
#recAudio { width: 100%; }
.panelhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: .68rem; }
.titlerow { display: flex; align-items: center; gap: 14px; min-width: 0; }
.titlerow .showtitle { min-width: 0; overflow-wrap: anywhere; }
.editbtn { flex: none; color: var(--muted); }
.titleform { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.titleform input {
  flex: 1 1 260px; min-width: 0; border: 0; border-bottom: 1px solid var(--accent); background: transparent; border-radius: 0;
  padding: 4px 2px; font: 300 clamp(1.6rem, 4.4vw, 2.4rem)/1.2 var(--display); color: var(--ink);
}
.titleform input:focus { outline: none; border-bottom-width: 2px; }
.cueline { margin: 0 0 12px; font-size: .92rem; color: var(--stage-muted); border-bottom: 1px solid var(--stage-line); padding-bottom: 10px; }
.cueline b { font: 500 .66rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--stage-muted); margin-right: 6px; }
#recBtn { color: #b8323c; font-size: 1.5rem; }
.tbtn.play.recording { background: #b8323c; border-color: #b8323c; color: #fff; font-size: 1.1rem; }
.recactions { justify-content: center; }
.meter { height: 4px; background: var(--stage-line); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.meter span { display: block; height: 100%; width: 0; background: var(--stage-muted); transition: width .05s linear; }
.meter span.loud { background: var(--brass); }
#recModeSeg { align-self: flex-start; }
.script li.has-clip .who::after { content: "  ·  Recorded"; color: var(--good); }
.script li.mine.has-clip .who::after { content: "  ·  You  ·  Recorded"; }
.chip small { font: 400 .72rem/1 var(--body); letter-spacing: 0; text-transform: none; opacity: .75; margin-left: 6px; }
.howto { margin-top: -6px; }
.howto summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 500; list-style: none; padding-left: 12px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "  +"; color: var(--brass); }
.howto[open] summary::after { content: "  –"; }
.howto dl { margin: 10px 0 0 12px; display: grid; gap: 4px 0; font-size: .9rem; }
.howto dt { font: 500 .68rem/1.4 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.howto dd { margin: 0; line-height: 1.5; max-width: 62ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.msg.good { color: var(--good); }
.msg:empty { display: none; }
.emailbox { margin-top: 4px; }
.emailwrap { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.field textarea {
  border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; padding: 11px 12px; width: 100%; resize: vertical;
  font: 400 .92rem/1.5 var(--body); text-transform: none; letter-spacing: 0; color: var(--ink);
}
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.nextrow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }
.scorebody { display: flex; flex-direction: column; gap: 20px; }
.scorehead { font: 300 clamp(1.7rem, 4.6vw, 2.4rem)/1.15 var(--display); text-transform: none; letter-spacing: -.01em; color: var(--ink); }
.more .morewrap { display: flex; flex-direction: column; gap: 14px; margin: 12px 0 0 12px; }
.more summary { padding-left: 0; }
#useClipsWrap { margin-top: -8px; }
.navshow { margin-left: auto; }
.themebtn { flex: none; width: 36px; height: 36px; color: var(--muted); }
.themebtn:hover { color: var(--ink); border-color: var(--ink); }

/* Big screen: always the dark stage colours, readable from across a room or on a projector */
.bigstage {
  position: fixed; inset: 0; z-index: 100; background: var(--stage); color: var(--stage-ink);
  display: flex; flex-direction: column; gap: 2vh;
  padding: calc(env(safe-area-inset-top, 0px) + 2.5vh) 4vw calc(env(safe-area-inset-bottom, 0px) + 2.5vh);
}
.bigstage:fullscreen { background: var(--stage); }
body.bigopen { overflow: hidden; }
.bstop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bsmeta { font: 500 clamp(.7rem, 1.4vw, 1rem)/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--stage-muted); }
.bsclose {
  margin-left: auto; background: transparent; color: var(--stage-ink); border: 1px solid var(--stage-line); border-radius: 6px;
  padding: 10px 16px; cursor: pointer; font: 500 .72rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
}
.bsclose:hover { border-color: var(--stage-ink); }
.bswho {
  font: 500 clamp(1.6rem, 6vw, 5.5rem)/1.05 var(--display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass); overflow-wrap: anywhere;
}
.bswho.done::after { content: "  ✓"; color: var(--good); font-size: .6em; vertical-align: middle; }
.bsbody { flex: 1; min-height: 0; display: flex; align-items: center; overflow: hidden; }
.bsline { width: 100%; font-family: var(--body); font-weight: 400; line-height: 1.22; overflow-wrap: anywhere; text-wrap: pretty; }
.bscue { font-size: clamp(.9rem, 1.8vw, 1.3rem); line-height: 1.4; color: var(--stage-muted); max-height: 3em; overflow: hidden; }
.bsdir { font-style: italic; font-size: .55em; color: var(--stage-muted); }
.bsline.mine { color: var(--mine-ink); background: var(--mine-bg); border-radius: .2em; padding: .15em .35em; box-shadow: inset .08em 0 0 var(--brass); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.bsline.mine .bsdir { color: inherit; opacity: .7; }
.bslisten { justify-content: center; }
.bigstage .btn.primary { background: var(--brass); color: #1d1a21; }
.bigstage .btn.ghost { color: var(--stage-ink); border-color: var(--stage-line); }
.bigstage .btn { min-height: 52px; font-size: .82rem; padding-inline: 26px; }
.bscue:empty { display: none; }
.bsfoot { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--stage-line); padding-top: 1.6vh; }
.bsstatus { margin: 0; text-align: center; color: var(--stage-muted); font-size: clamp(.85rem, 1.6vw, 1.1rem); min-height: 1.4em; }
.bsfoot .transport { border-top: 0; padding: 0; }
.steps { margin: 10px 0 0 12px; padding-left: 1.2em; display: grid; gap: 8px; font-size: .92rem; line-height: 1.5; max-width: 62ch; }
.ratenote { flex: 1 1 100%; margin: 0; font-size: .86rem; line-height: 1.45; color: var(--muted); border-left: 2px solid var(--brass); padding: 2px 0 2px 10px; }

/* Sign in */
.gate { display: none; }
.locked .gate {
  display: flex; min-height: 100vh; min-height: 100dvh; align-items: center; justify-content: center;
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom, 0px));
}
.locked .top, .locked main { display: none; }
.gatecard { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.gatecard form, .gatecard [data-step] { display: flex; flex-direction: column; gap: 16px; }
.gatecard [hidden] { display: none; }
.gatebrand { cursor: default; margin-bottom: 18px; }
.field input[type=email] {
  border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; padding: 11px 12px;
  font: 400 1rem/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); width: 100%;
}
.field input[type=email]:focus { border-color: var(--accent); outline: none; }
#gateCode { font-size: 1.4rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.gatecard .tiny { align-self: flex-start; }

/* Groups button in the top bar */
.topnav {
  flex: none; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; padding: 8px 2px 6px;
  font: 500 .7rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.topnav:hover { color: var(--ink); }
.topnav[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.navshow[hidden] + .topnav { margin-left: auto; }

/* Groups */
.rolebadge {
  display: inline-block; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--rule);
  font: 500 .6rem/1.4 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); vertical-align: 1px;
}
.rolebadge.director { border-color: var(--brass); color: var(--brass); }
.you { background: var(--mine-bg); color: var(--mine-ink); border: 1px solid var(--brass); padding: 1px 6px; border-radius: 4px; font: 500 .58rem/1.4 var(--display); margin-left: 6px; letter-spacing: .14em; text-transform: uppercase; vertical-align: 2px; }
.grphero { gap: 10px; }
.back { align-self: flex-start; padding-left: 0; }
.titlerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.titlerow .iconbtn { width: 34px; height: 34px; color: var(--muted); }
.play { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel > h2 + .play { border-top: 0; padding-top: 4px; }
.playhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.playhead h3 { margin: 0; font: 400 1.35rem/1.2 var(--display); text-transform: none; letter-spacing: 0; color: var(--ink); }
.mypart { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.mypart h4 { margin: 0; font: 500 .68rem/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.mypart .field input[type=text] { background: var(--card); }
.tablewrap { overflow-x: auto; }
.casttable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.casttable th { text-align: left; font: 500 .62rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 8px 0; border-bottom: 1px solid var(--rule); }
.casttable td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.casttable tr:last-child td { border-bottom: 0; }
.charin { width: 100%; min-width: 8em; border: 1px solid var(--rule); background: var(--paper); border-radius: 5px; padding: 6px 8px; font: 400 .9rem/1.2 var(--body); color: var(--ink); }
.charin:focus { border-color: var(--accent); outline: none; }
.pstatus { color: var(--muted); white-space: nowrap; }
.pstatus.done { color: var(--good); font-weight: 500; }
.pstatus a { color: inherit; }
.editplay { display: flex; flex-direction: column; gap: 12px; border: 1px dashed var(--rule); border-radius: 8px; padding: 14px; }
.editplay[hidden] { display: none; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.people li { display: flex; align-items: center; gap: 10px; padding-block: 12px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.people li:first-child { border-top: 0; padding-top: 0; }
.people .sinfo { flex: 1 1 220px; min-width: 0; }
.people .pname { font: 400 1.05rem/1.3 var(--display); }
.people .smeta { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.addpeople, .invite { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--rule); padding-top: 16px; }
.addpeople h3, .invite h3 { margin-top: 0; }

/* Recording progress chart */
.progress { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ptop { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ppct { font: 300 1.9rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.psum { color: var(--muted); font-size: .9rem; }
.pbar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.pseg { flex: 1 1 0; min-width: 3px; background: var(--rule); }
.pseg.done { background: var(--good); }
.pkey { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--rule); margin-left: 4px; }
.key:first-child { margin-left: 0; }
.key.done { background: var(--good); }
.alldone { border: 1px solid var(--good); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.alldone h4 { margin: 0; font: 400 1.1rem/1.3 var(--display); color: var(--good); }