/* app.css — shared styles for Booth (control/teleprompter) and Stage (program). */

:root {
  --bg: #0e0f13;
  --panel: #171922;
  --panel-2: #1f2230;
  --ink: #e9ecf4;
  --muted: #99a0b4;
  --line: #2a2e3d;
  --accent: #5b8cff;
  --danger: #ff3b5c;
  --danger-dim: #3a1622;
  --safe: #1fd17b;
  --safe-dim: #0f2a1e;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* must beat .present{display:flex} etc. */
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button, select, input, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.active { border-color: var(--accent); background: #2a3556; }
button:disabled { opacity: .45; cursor: not-allowed; }
input[type="number"], select, textarea, input[type="text"] {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px;
}
a { color: var(--accent); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
kbd {
  background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; font-size: 12px;
}

/* ---------- Booth ---------- */
body.booth::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--danger);
}
.privatetag {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1001;
  padding: 4px 8px;
  border: 1px solid rgba(255,59,92,.58);
  border-radius: 6px;
  background: rgba(14,15,19,.88);
  color: #ffd5dd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 20px; }
.booth .wrap { padding-top: 46px; }
header.app h1 { font-size: 20px; margin: 0; }
header.app .sub { color: var(--muted); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.card h2 { font-size: 15px; margin: 0 0 10px; }
.step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; margin-right: 8px; }

.greenroom {
  background: linear-gradient(180deg, #151720, #101116);
  border-color: rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
}
.resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: rgba(91,140,255,.35);
  background: rgba(91,140,255,.1);
}
.wells {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.well {
  min-height: 120px;
  padding: 14px;
  border: 1px dashed rgba(153,160,180,.42);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.well:hover, .well.drag {
  border-color: rgba(91,140,255,.85);
  background: rgba(91,140,255,.08);
}
.well.ready {
  border-style: solid;
  border-color: rgba(31,209,123,.48);
  box-shadow: inset 0 0 0 1px rgba(31,209,123,.12);
}
.well-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}
.well textarea {
  display: block;
  width: 100%;
  min-height: 86px;
  margin: 8px 0;
  resize: vertical;
  background: rgba(8,9,12,.68);
}
.ghostrow { margin: 13px 0; }
.ghostrow a {
  color: #b7cbff;
  font-weight: 700;
  text-decoration: none;
}
.ghostrow a:hover { color: #fff; }
.alignline {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(0,0,0,.16);
}
.alignline details summary {
  width: max-content;
  cursor: pointer;
  color: #b7cbff;
  font-weight: 800;
}
.alignline details .row { margin-top: 10px; }
.stagerow {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.stagerow .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 3px rgba(153,160,180,.08);
}
.stagerow .dot.ok {
  background: var(--safe);
  box-shadow: 0 0 0 3px rgba(31,209,123,.14);
}
.confirmrow {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.confirmrow.required { color: #ffe39a; }
.gorow {
  margin-top: 12px;
  align-items: center;
}
.gorow button { white-space: nowrap; }
.pwa-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(91,140,255,.08);
  color: var(--muted);
  font-size: 13px;
}
.pwa-row span { flex: 1; min-width: 180px; }
.pwa-row button { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.pwa-row .dismiss {
  width: 28px;
  height: 28px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

@media (max-width: 820px) {
  .wells { grid-template-columns: 1fr; }
  .resume { align-items: stretch; flex-direction: column; }
}

.green-room { max-width: 1040px; }
.setup-card {
  margin: 16px 0 28px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: linear-gradient(180deg, #151720, #101116);
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
}
.setup-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.resume-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(91,140,255,.26);
  border-radius: 8px;
  background: rgba(91,140,255,.1);
}
.resume-hero h2 { margin: 3px 0 0; font-size: 18px; line-height: 1.25; }
.start-new-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: 13px;
}
.setup-card.resume-collapsed .drop-grid { display: none; }
.drop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.drop-well {
  min-height: 238px;
  padding: 14px;
  border: 1px dashed rgba(153,160,180,.42);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.drop-well:hover, .drop-well:focus-visible, .drop-well.dragging {
  border-color: rgba(91,140,255,.85);
  background: rgba(91,140,255,.08);
  outline: none;
}
.drop-well.ready {
  border-style: solid;
  border-color: rgba(31,209,123,.48);
  box-shadow: inset 0 0 0 1px rgba(31,209,123,.12);
}
.well-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.well-status {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.drop-well.ready .well-status { color: #b8f5d6; }
.well-title { margin-bottom: 6px; font-size: 20px; font-weight: 750; }
.well-copy { color: var(--muted); font-size: 13px; line-height: 1.45; }
.file-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.script-well { display: flex; flex-direction: column; }
.script-well textarea {
  min-height: 128px;
  resize: vertical;
  margin-top: 2px;
  width: 100%;
  flex: 1;
  background: rgba(8,9,12,.68);
}
.script-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.sample-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 0;
  flex-wrap: wrap;
}
.ghost-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b7cbff;
  font-weight: 700;
}
.ghost-link:hover { color: #fff; border-color: transparent; }
.align-summary {
  margin: 12px 0;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(0,0,0,.16);
}
.align-summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.align-summary summary::-webkit-details-marker { display: none; }
.fine-tune { color: #b7cbff; font-weight: 800; }
.align-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 10px;
  flex-wrap: wrap;
}
.stage-go-row {
  display: grid;
  grid-template-columns: auto minmax(130px, auto) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.stage-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.stage-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 3px rgba(153,160,180,.08);
}
.stage-dot.ready {
  background: var(--safe);
  box-shadow: 0 0 0 3px rgba(31,209,123,.14);
}
.confirm-capture {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.confirm-capture.required { color: #ffe39a; }
.split-actions {
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-end;
  border-radius: 8px;
  overflow: hidden;
}
.split-actions button {
  border-radius: 0;
  white-space: nowrap;
}
.split-actions button + button { border-left: 0; }

.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.thumbs img { height: 64px; border: 1px solid var(--line); border-radius: 6px; background: #000; }

.align-list { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.align-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.align-row .slidepick { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.align-row p { margin: 0; font-size: 13px; color: var(--ink); }

@media (max-width: 820px) {
  .drop-grid, .stage-go-row { grid-template-columns: 1fr; }
  .resume-hero, .start-new-row { align-items: stretch; flex-direction: column; }
  .split-actions { width: 100%; }
  .split-actions button { flex: 1; }
}

/* Teleprompter present mode */
.present { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; --line-tint: rgba(153,160,180,.58); }
.present.unfocused::after {
  content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255,190,80,.9);
}
.rail {
  position: absolute; left: 50%; bottom: 20px; z-index: 12; display: flex; align-items: center; gap: 8px;
  transform: translateX(-50%); padding: 7px; background: rgba(10,11,15,.72); border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px; box-shadow: 0 12px 38px rgba(0,0,0,.48); backdrop-filter: blur(16px);
}
.rail .chip, .rail .statebtn { transition: opacity .28s ease, border-color .18s ease, background .18s ease; }
.rail.resting .chip { opacity: .15; }
.rail.resting .statebtn { opacity: .55; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  border-radius: 999px; background: rgba(25,27,36,.82); white-space: nowrap;
}
.chip img { width: 54px; height: 30px; object-fit: cover; border-radius: 5px; background: #050609; border: 1px solid rgba(255,255,255,.12); }
.chip.flash, .statebtn.flash { animation: softFlash .62s ease; }
#stageChip { min-width: 58px; font-size: 18px; }
#camBadge { margin-left: -4px; font-size: 13px; color: #ffc7cf; }
.statebtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px;
  min-height: 44px; padding: 8px 16px; border-radius: 999px; font-weight: 700; background: rgba(25,27,36,.9);
}
.statebtn .ring { width: 13px; height: 13px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(153,160,180,.14); }
.statebtn[data-state="listening"] .ring { background: #58a6ff; animation: pulseBlue 1.1s ease-in-out infinite; }
.statebtn[data-state="following"] .ring { background: var(--safe); animation: breatheGreen 1.8s ease-in-out infinite; }
.statebtn[data-state="parked"] .ring { background: #ffbf4d; box-shadow: 0 0 0 3px rgba(255,191,77,.2); }
.statebtn[data-state="rolling"] .ring { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.statebtn[data-state="mictrouble"] .ring { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,59,92,.22); }
.statebtn.focus-override .ring { background: #7c8294; box-shadow: 0 0 0 3px rgba(124,130,148,.15); }
.hudtoast {
  position: absolute; left: 50%; top: 18px; z-index: 22; transform: translateX(-50%);
  padding: 7px 12px; border-radius: 999px; background: rgba(12,13,17,.82); color: #fff;
  border: 1px solid rgba(255,255,255,.12); font-weight: 700; font-size: 13px; backdrop-filter: blur(14px);
}
.hudtoast.ok { color: #c7f8dc; border-color: rgba(31,209,123,.45); }
.filmstrip {
  position: absolute; left: 50%; bottom: 82px; z-index: 18; transform: translateX(-50%);
  max-width: min(92vw, 980px); display: flex; gap: 8px; overflow-x: auto; padding: 10px;
  background: rgba(10,11,15,.78); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; backdrop-filter: blur(16px);
}
.filmstrip button { flex: 0 0 auto; width: 112px; padding: 5px; border-radius: 8px; background: rgba(25,27,36,.82); }
.filmstrip button.cur { border-color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset; }
.filmstrip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: #050609; display: block; }
.filmstrip span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.stagepop {
  position: absolute; right: calc(50% - 92px); bottom: 82px; z-index: 19; min-width: 220px;
  padding: 8px; background: rgba(10,11,15,.84); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; backdrop-filter: blur(16px); box-shadow: 0 14px 40px rgba(0,0,0,.45);
}
.stagepop button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 10px; background: transparent; border-color: transparent; text-align: left;
}
.stagepop button:hover, .stagepop button.cur { background: rgba(91,140,255,.16); border-color: rgba(91,140,255,.35); }
.stagepop .divider { height: 1px; margin: 6px 2px; background: rgba(255,255,255,.12); }
.sheet {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 21; width: min(360px, 94vw);
  background: rgba(14,15,19,.88); border-left: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(18px);
  box-shadow: -18px 0 50px rgba(0,0,0,.42); overflow-y: auto;
}
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: rgba(14,15,19,.92); border-bottom: 1px solid rgba(255,255,255,.1); }
.sheet-head button { width: 34px; height: 34px; padding: 0; font-size: 22px; }
.sheet-body { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.sheet-label { margin: 0 0 7px; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.22); }
.segmented button { border-color: transparent; background: transparent; }
.segmented button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.sheet-row { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.sheet-row input[type="range"] { width: 100%; }
.sheet-row.dim { opacity: .45; }
.toggle-row { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 13px; }
.voice-commands { display: flex; flex-direction: column; gap: 8px; }
.prefix { color: var(--muted); font-size: 12px; }
.command-list { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.command-list li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; color: var(--muted); font-size: 12px; }
.command-list li.disabled { opacity: .45; text-decoration: line-through; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-row button.armed { border-color: var(--danger); color: #ffd5dd; }
.hotkeys { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; color: var(--muted); font-size: 12px; }
.sheet-footer { color: var(--muted); font-size: 12px; line-height: 1.35; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }

.prompter { position: relative; flex: 1; overflow: hidden; --lens-w: 32%; --bg-opacity: 1; }
/* the slide, superimposed behind the script and dimmed so text stays legible */
.prompter .stagebg { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.prompter .stagebg img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: var(--bg-opacity); }
.prompter.nobg .stagebg img { display: none; }
/* thin, centered, lens-width script overlay flowing over a FULL-screen slide;
   its own dark band (only behind the strip) keeps text legible without dimming the slide */
.prompter .promptcol { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: var(--lens-w); min-width: 240px; backdrop-filter: blur(3px);
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.5) 8%, rgba(0,0,0,.84) 30%, rgba(0,0,0,.84) 70%, rgba(0,0,0,.5) 92%, rgba(0,0,0,0)); }
.prompter .scroller { position: absolute; inset: 0; overflow: hidden; }
.prompter .reading { padding: 40vh .7em 60vh; text-align: center; font-weight: 500;
  text-shadow: 0 2px 12px rgba(0,0,0,.92); }
.prompter .slidegrp { margin: 0 0 1.2em; opacity: .72; transition: opacity .25s; }
.prompter .slidegrp.cur { opacity: 1; }
.prompter .slidegrp .lbl { font-size: .4em; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; }
.prompter .slidegrp p { margin: .25em 0; line-height: 1.35; }
/* typed script blocks: narration is read; cues/sections/notes are guidance only */
.prompter .blk { margin: .42em 0; line-height: 1.3; }
.prompter .blk.speak { color: #fff; font-weight: 600; }
.prompter .blk.cue { font-size: .44em; color: var(--safe); font-style: italic; opacity: .92; font-weight: 500; }
.prompter .blk.section { font-size: .4em; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; margin-top: .7em; }
.prompter .blk.note { font-size: .46em; color: var(--muted); font-style: italic; }
.prompter .blk.empty { font-size: .44em; color: var(--muted); font-style: italic; }
/* alignment-list row types */
.align-row .tag { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.align-row.cue p, .align-row.section p, .align-row.note p { color: var(--muted); font-style: italic; }
.align-row.cue { border-color: rgba(31,209,123,.35); }
.prompter .centerline { position: absolute; left: 0; right: 0; top: 40vh; height: 2px;
  background: linear-gradient(90deg, transparent, var(--line-tint), transparent); pointer-events: none; }
.prompter .starthint { position: absolute; left: 0; right: 0; top: calc(40vh + 18px); text-align: center;
  color: var(--muted); font-size: 14px; pointer-events: none; z-index: 3; }
.prompter .parkhint { position: absolute; left: 0; right: 0; top: calc(40vh + 22px); text-align: center;
  color: #ffe0a3; font-size: 13px; pointer-events: none; z-index: 3; opacity: .92; }
.prompter.parked .reading { filter: saturate(.8); opacity: .88; }
/* voice-following: current-word highlight */
.prompter .w { border-radius: 3px; transition: background .1s ease, color .1s ease; }
.prompter .w.cur { background: rgba(91,140,255,.30); color: #fff; }
.voicenotice { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0,0,0,.62); }
.voicenotice .vn-card { max-width: 460px; margin: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.voicenotice h3 { margin: 0 0 8px; font-size: 16px; }
.voicenotice p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.recwarn {
  position: absolute; top: 8px; left: 50%; z-index: 16; transform: translateX(-50%);
  max-width: min(760px, calc(100vw - 24px)); background: rgba(58,46,16,.88); color: #ffe39a;
  border: 1px solid rgba(255,227,154,.28); border-radius: 999px; padding: 6px 12px; font-size: 12px; text-align: center;
}
.recwarn button { padding: 3px 9px; font-size: 12px; margin: 0 3px; }

/* practice seek bar (Booth only — never on the recorded Stage) */
.seekbar {
  position: absolute; left: 50%; bottom: 78px; z-index: 11; display: flex; align-items: center; gap: 12px;
  width: min(760px, calc(100vw - 32px)); padding: 8px 12px; transform: translateX(-50%);
  background: rgba(12,13,17,.72); border: 1px solid rgba(255,255,255,.1); border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease; backdrop-filter: blur(14px);
}
.seekbar.visible { opacity: 1; pointer-events: auto; }
.seek-track { position: relative; flex: 1; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek-track::before { content: ""; position: absolute; left: 0; right: 0; height: 5px; background: var(--panel-2); border-radius: 3px; }
.seek-fill { position: absolute; left: 0; height: 5px; background: var(--accent); border-radius: 3px; width: 0; pointer-events: none; }
.seek-ticks { position: absolute; inset: 0; }
.seek-ticks .tick { position: absolute; top: 1px; width: 2px; height: 14px; background: rgba(153,160,180,.7); transform: translateX(-1px); cursor: pointer; border-radius: 1px; }
.seek-ticks .tick:hover { background: var(--accent); height: 16px; top: 0; }
.seek-ticks .tick.cur { background: #fff; }
.seek-thumb { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; transform: translateX(-7px); pointer-events: none; box-shadow: 0 0 0 3px rgba(91,140,255,.35); }
.seek-label { font-size: 12px; color: var(--muted); min-width: 96px; text-align: right; white-space: nowrap; }
.progress-hair { position: absolute; left: 0; right: 0; bottom: 0; z-index: 13; height: 2px; background: rgba(255,255,255,.13); pointer-events: none; }
.progress-hair #progressHairFill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--line-tint); }
.progress-hair #progressHairTicks { position: absolute; inset: 0; }
.progress-hair .tick { position: absolute; top: 0; width: 1px; height: 2px; background: rgba(255,255,255,.5); }

/* full-screen / immersive prompter mode (maximises the script area on tablets) */
.fs-exit { position: absolute; top: 10px; right: 12px; z-index: 7; display: none;
  width: 40px; height: 40px; border-radius: 8px; font-size: 18px; opacity: .55; background: rgba(0,0,0,.45); }
.fs-exit:hover { opacity: 1; }
.present.fs .recwarn { display: none; }
.present.fs .fs-exit { display: block; }

@keyframes softFlash {
  0% { box-shadow: 0 0 0 0 rgba(91,140,255,0); }
  25% { box-shadow: 0 0 0 5px rgba(91,140,255,.26); }
  100% { box-shadow: 0 0 0 0 rgba(91,140,255,0); }
}
@keyframes pulseBlue {
  0%, 100% { box-shadow: 0 0 0 3px rgba(88,166,255,.15), 0 0 0 0 rgba(88,166,255,.32); }
  50% { box-shadow: 0 0 0 3px rgba(88,166,255,.16), 0 0 0 8px rgba(88,166,255,0); }
}
@keyframes breatheGreen {
  0%, 100% { box-shadow: 0 0 0 3px rgba(31,209,123,.16); }
  50% { box-shadow: 0 0 0 7px rgba(31,209,123,.05); }
}

/* ---------- Stage ---------- */
.stage { position: fixed; inset: 0; background: #000; overflow: hidden; }
.stage .slide { position: absolute; inset: 0; display: grid; place-items: center; }
.stage .slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.stage video.cam { position: absolute; background: #000; object-fit: cover; transform: scaleX(-1); }
/* layout: presentation */
.stage[data-layout="presentation"] video.cam { display: none; }
/* layout: talking_head — slide full, camera PiP bottom-right */
.stage[data-layout="talking_head"] video.cam {
  right: 3%; bottom: 4%; width: 24%; aspect-ratio: 16/9; border-radius: 10px;
  box-shadow: 0 6px 30px rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.15);
}
/* layout: full_head — camera fills, slide hidden */
.stage[data-layout="full_head"] .slide { display: none; }
.stage[data-layout="full_head"] video.cam { inset: 0; width: 100%; height: 100%; }

.stage .badge {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  background: var(--safe-dim); color: #b8f5d6; border: 1px solid var(--safe);
  border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.stage .hint { position: absolute; bottom: 12px; left: 12px; z-index: 5; color: var(--muted); font-size: 12px; }
.stage.clean .badge, .stage.clean .hint { display: none; }

.stage .waiting {
  position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; text-align: center;
  background: #000; color: var(--muted); gap: 8px;
}
.stage .waiting h2 { color: var(--ink); margin: 0; }
.stage.ready .waiting { display: none; }
