/* The Live screen (docs/06-redesign.md, "Live"): a big monitor, read from a couple of metres away. */
:root {
  --bg: #0f0e1a; --panel: #17162a; --card: #1e1c36; --line: #2e2b52; --text: #ecebff;
  --muted: #9a97c4; --accent: #38e1ff; --accent2: #7a5cff; --stop: #ff3b4e; --ok: #4cff8f; --warn: #ffb23f; --bad: #ff6b78;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 20px/1.35 "Segoe UI", system-ui, sans-serif; overflow: hidden; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd { font: 600 .7em/1 ui-monospace, Consolas, monospace; padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); vertical-align: middle; }
.muted, .sub { color: var(--muted); font-weight: 500; }
.sub { font-size: .75em; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
h2 { font-size: 22px; margin: 0 0 10px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
h2 .sub { text-transform: none; letter-spacing: 0; margin-left: 8px; }
h3 { font-size: 18px; margin: 16px 0 6px; color: var(--muted); }

/* ---- sign-in */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #241f4a, var(--bg) 70%); z-index: 30; }
.login-card { width: min(400px, 90vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.login-card p { margin: 0; }
.login-card label { display: flex; flex-direction: column; gap: 6px; }
.login-card input { background: #13122a; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.login-card .primary { border: 0; border-radius: 10px; padding: 12px; font-weight: 800; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; }
.err { color: var(--bad); min-height: 1em; }
.brand { font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand.big { font-size: 26px; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; font-weight: 900; font-size: 17px; }

/* ---- layout */
.live { height: 100vh; display: flex; flex-direction: column; }
.grid { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 18px 22px; }
.left { display: flex; flex-direction: column; gap: 12px; min-height: 0; align-items: center; }
.right { display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow-y: auto; padding-right: 4px; }

/* ---- status strip */
.strip { position: relative; z-index: 13; display: flex; align-items: center; gap: 18px; padding: 12px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.air { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; white-space: nowrap; }
.air i { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.air.is-stopped { color: var(--stop); }
.air.is-stopped i { background: var(--stop); box-shadow: 0 0 12px var(--stop); }
.lights { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; flex: 1; min-width: 0; }
.lights li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 17px; white-space: nowrap; }
.lights li i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.lights li.warn { border-color: #6b5220; } .lights li.warn i { background: var(--warn); }
.lights li.bad { border-color: #7a2531; background: #2a1420; } .lights li.bad i { background: var(--stop); box-shadow: 0 0 8px var(--stop); }
.lights li a { color: inherit; }
.dial-wrap { display: flex; align-items: center; gap: 8px; }
.dial-label { color: var(--muted); font-size: 16px; }
.dial { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.dial button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; color: var(--muted); font-size: 17px; }
.dial button.on { background: var(--accent2); color: #fff; font-weight: 700; }
.dial-custom { font-size: 14px; color: var(--warn); }
.pill { border-radius: 99px; padding: 6px 12px; border: 1px solid #6b5220; background: #2a2210; font-size: 16px; }
.menu { position: relative; }
.menu-btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 5px 12px; font-size: 17px; white-space: nowrap; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; width: 360px; font-size: 17px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.menu-pop a { color: var(--accent); }
.mic-pick { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.mic-pick select { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--text); }
.stop { border: 0; border-radius: 12px; padding: 12px 26px; font-size: 26px; font-weight: 900; background: var(--stop); color: #fff; box-shadow: 0 0 0 3px rgba(255, 59, 78, .25); white-space: nowrap; }
.stop:hover { filter: brightness(1.1); }

/* ---- mirror and cast */
.pose-now { font-size: 20px; font-weight: 700; padding: 6px 14px; border-radius: 99px; background: #2b2148; border: 1px solid var(--accent2); }
.mirror-box { flex: 1; min-height: 0; display: grid; place-items: center; }
.mirror-frame { position: relative; overflow: hidden; border-radius: 14px; background: radial-gradient(circle at 35% 40%, #3a2a6e, #1c1338 60%, #0e0a1f); box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgba(0, 0, 0, .45); }
.mirror-frame iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; color-scheme: normal; /* as the overlay page: a mismatch makes Chrome paint the frame white */ }
.cam { position: absolute; border: 2px dashed rgba(255, 255, 255, .35); border-radius: 6px; display: grid; place-items: center; pointer-events: none; }
.cam span { font-size: 13px; color: rgba(255, 255, 255, .5); }
.cast { display: flex; gap: 12px; }
/* Hear him here: the mirror's sound, for testing (off by default: OBS has the sound). */
.hear { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-size: 16px; }
.hear[aria-pressed="true"] { border-color: var(--accent2); background: #2b2148; font-weight: 700; }
.who { position: relative; display: flex; flex-direction: column; align-items: center; width: 132px; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.who > button.face { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.who img { height: 92px; object-fit: contain; }
.who b { font-size: 18px; }
.who .state { font-size: 14px; color: var(--muted); }
.who.out { border-color: var(--ok); }
.who.away { border-color: var(--warn); }
.who-menu { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 15; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; width: 210px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.who-menu button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 8px; font-size: 17px; }

/* ---- talking */
.talk-row { display: flex; align-items: center; gap: 16px; }
.talk-btn { border: 2px solid var(--accent2); background: #1f1a40; border-radius: 14px; padding: 12px 22px; font-size: 22px; font-weight: 700; touch-action: none; user-select: none; }
.talk-btn.rec { background: var(--accent2); }
.talk-note { color: var(--muted); font-size: 18px; }
.talk-note.bad { color: var(--bad); }
.next-row { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.next-btn { border: 2px solid var(--accent); background: #10304a; border-radius: 12px; padding: 10px 20px; font-size: 22px; font-weight: 800; white-space: nowrap; }
.next-btn:disabled { border-color: var(--line); background: #1a1930; color: var(--muted); cursor: default; }
.next-what { display: flex; flex-direction: column; min-width: 0; }
.next-what b { font-size: 21px; }
.next-what .next-story { color: var(--muted); font-size: 16px; }
.next-row.none .next-what b { color: var(--muted); font-weight: 500; font-size: 18px; }
.listening { display: flex; align-items: center; gap: 26px; padding: 26px 30px; border-radius: 18px; background: linear-gradient(135deg, #2b1f66, #11304a); border: 2px solid var(--accent); }
.listening b { font-size: 54px; line-height: 1.05; }
.listening p { margin: 6px 0 0; color: var(--muted); font-size: 20px; }
.mic-dot { font-size: 64px; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: rgba(56, 225, 255, .12); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(56, 225, 255, 0); background: rgba(56, 225, 255, .25); } 0%, 100% { box-shadow: 0 0 0 0 rgba(56, 225, 255, .35); } }
.meter { width: min(520px, 40vw); height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--accent)); transition: width .08s linear; }

/* ---- heard → doing → on air */
.feed { display: flex; flex-direction: column; gap: 8px; }
.turn { border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 16px 20px; }
.turn .heard { font-size: 30px; font-weight: 700; }
.turn .heard.wait { color: var(--muted); font-weight: 500; }
.turn .steps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 22px; }
.turn .steps .arrow { color: var(--muted); }
.turn .on-air { color: var(--ok); font-weight: 800; }
.turn .bad { color: var(--bad); }
.turn .cancel { margin-left: auto; border: 1px solid var(--line); background: #2a1420; border-radius: 10px; padding: 6px 16px; font-size: 20px; }
.turn.old { padding: 8px 16px; opacity: .65; }
.turn.old .heard { font-size: 19px; }
.turn.old .steps { font-size: 17px; margin-top: 2px; }
.turn.done { border-color: #1f4d36; }
.turn.failed { border-color: #7a2531; }
.also { list-style: none; margin: 0; padding: 0; font-size: 17px; color: var(--muted); }
.also li { padding: 2px 0; }
.also li i { font-style: normal; color: var(--accent); margin-right: 8px; }

/* ---- up next */
.upnext .empty { color: var(--muted); margin: 0; font-size: 18px; }
.item { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 6px 16px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.item:first-child { border-color: var(--accent); }
.item .emoji { font-size: 36px; grid-row: span 2; }
.item .title { font-size: 22px; font-weight: 700; }
.item .title .sub { margin-left: 8px; }
.item q { font-size: 22px; grid-column: 2; }
.item .acts { grid-row: 1 / span 2; grid-column: 3; display: flex; gap: 8px; align-items: center; }
.item .acts button { border: 1px solid var(--line); background: #252248; border-radius: 10px; padding: 8px 16px; font-size: 19px; white-space: nowrap; }
.item .acts .play { background: var(--accent2); border-color: var(--accent2); color: #fff; font-weight: 700; }
.item .time { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: 0 0; animation: drain linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }

/* ---- try saying */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 9px 18px; font-size: 21px; }
.chip:hover { border-color: var(--accent); }

/* ---- drawers */
.drawers { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }
.drawers > details { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.drawers > details > summary { cursor: pointer; padding: 12px 18px; font-size: 21px; font-weight: 700; }
.drawer-body { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.pinned { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinned button, .results button { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 19px; }
.pinned button kbd { margin-left: auto; }
.results { display: flex; flex-wrap: wrap; gap: 8px; }
/* Episodes: full-screen shorts. Their own row, so a 2-minute takeover is never a stray pinned key. */
.episodes { display: flex; flex-direction: column; gap: 8px; }
.episodes:empty { display: none; }
.episodes button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--accent2); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 19px; }
.episodes .ep-n { font-weight: 800; min-width: 2.2em; }
.episodes .ep-len { margin-left: auto; opacity: .7; font-variant-numeric: tabular-nums; }
.results:empty { display: none; }
.results { max-height: 46vh; overflow-y: auto; }
.results[data-none]:not([data-none=""]) { display: block; }
.results[data-none]:not([data-none=""])::before { content: attr(data-none); opacity: .7; font-size: 17px; }
.btn-row { display: flex; gap: 10px; }
.big-btn { border: 1px solid var(--accent2); background: #241c4f; border-radius: 12px; padding: 10px 18px; font-size: 20px; font-weight: 700; white-space: nowrap; }
a.big-btn { display: inline-block; color: inherit; text-decoration: none; }
a.big-btn[hidden] { display: none; }
.btn-row input, .line-form input { flex: 1; background: #13122a; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.line-form { display: flex; gap: 10px; }
.line-form button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 16px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--accent2); color: #fff; }
.convo-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 20px; height: 20px; }
.convo { margin: 0; padding-left: 0; list-style: none; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.convo li.host b { color: var(--accent); }
.convo li.cast { padding-left: 18px; color: #d8d6ff; }
.stats, .world { margin: 0; padding-left: 20px; font-size: 18px; }
.world li { margin-bottom: 4px; }
.world select { margin-left: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 16px; }
.timeline-box summary { cursor: pointer; font-size: 18px; color: var(--muted); }
.timeline, .log { margin: 6px 0 0; padding: 0; list-style: none; font-size: 17px; max-height: 300px; overflow-y: auto; }
.timeline li, .log li { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.timeline time, .log time { color: var(--muted); min-width: 5.5em; }
.timeline .link { margin-left: auto; font-size: 15px; }
.log li.bad { color: var(--bad); }
.log li i { font-style: normal; color: var(--accent); min-width: 6.5em; }

/* ---- the vault (Bjorn's marathon) */
.vault-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 19px; }
.vault-head b { font-size: 22px; }
.vault-head:empty { display: none; }
.who-got { display: flex; flex-direction: column; gap: 10px; }
.who-got:empty { display: none; }
.who-got section { border: 1px solid var(--warn); background: #2a2210; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.who-got h4 { margin: 0; font-size: 20px; }
.who-got .buyers { display: flex; flex-wrap: wrap; gap: 8px; }
.who-got .buyers button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-size: 18px; }
.who-got .buyers button:hover { border-color: var(--accent); }
.vault-sets { margin: 0; padding: 0; list-style: none; font-size: 17px; max-height: 420px; overflow-y: auto; }
.vault-sets li { display: grid; grid-template-columns: 2.4em 1fr auto; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.vault-sets .n { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.vault-sets .what { min-width: 0; }
.vault-sets .what span { display: block; color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-sets li.live { background: rgba(56, 225, 255, .07); }
.vault-sets li.live .n { color: var(--accent); }
.vault-sets li.won .n { color: #f5c542; }
.vault-sets select { background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 15px; max-width: 9em; }
.vault-btns { gap: 22px; }
.cams-row { align-items: center; flex-wrap: wrap; }
.log li.undone span { text-decoration: line-through; opacity: .6; }
.log li .link { margin-left: auto; font-size: 15px; }

/* ---- toast and stopped */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 25; max-width: min(900px, 90vw); padding: 14px 22px; border-radius: 14px; background: #2a1420; border: 1px solid #7a2531; font-size: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.toast.ok { background: #13281f; border-color: #1f4d36; }
.stopped { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(40, 6, 12, .82); backdrop-filter: blur(3px); }
.stopped-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 760px; }
.stopped-card b { font-size: 88px; color: var(--stop); line-height: 1; }
.stopped-card p { margin: 0; font-size: 24px; }
.stopped-card button { border: 0; border-radius: 16px; padding: 18px 40px; font-size: 34px; font-weight: 800; background: var(--ok); color: #082414; }

@media (max-width: 1300px) {
  body { font-size: 17px; }
  .strip { flex-wrap: wrap; gap: 10px; }
  .listening b { font-size: 40px; }
}

/* ---- opening night (the Vault drawer) */
.vault-night { display: flex; flex-direction: column; gap: 10px; }
.vault-night[hidden], .opening-now[hidden] { display: none; }
.vault-night h4 { margin: 4px 0 0; font-size: 18px; }
.opening-now { border: 1px solid #f5c542; background: #2a2210; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.opening-now h4 { font-size: 20px; margin: 0; }
.hit-form { display: flex; flex-wrap: wrap; gap: 8px; }
.hit-form input { background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 18px; padding: 8px 10px; }
#hitText { flex: 1 1 16em; min-width: 0; }
#hitValue { width: 7em; }
.big-btn.giant { border-color: #f5c542; background: #4a3510; }
.hit-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.hit-list:empty { display: none; }
.hit-list li { display: flex; gap: 10px; align-items: baseline; }
.hit-list li.giant b { color: #f5c542; }
.next-boxes { display: flex; flex-wrap: wrap; gap: 8px; }
.next-boxes button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-size: 17px; }
.next-boxes button:hover { border-color: var(--accent); }
.next-boxes button.opened { opacity: .55; }

/* The show (docs/09-set-constructor.md): what's on now, the plan, its questions. */
.segment-row { align-items: center; }
.segment-row button.on { background: var(--accent2); color: #fff; border-color: var(--accent2); }
.plan-head { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }

/* The show plan, conducted: the act, what's next, a button for each beat that waits for the owner's word. */
.conductor h2 .sub { font-weight: 600; }
.cond-next { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.cond-next li { display: flex; gap: 8px; align-items: baseline; }
.cond-next .when { color: var(--muted); font-size: 15px; }
.cond-next li.set b { color: var(--accent2); }

/* Which station this is (src/web/station-mark.ts): a testing station's TEST, and the admin's strip. */
.st-test { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #f5b400; color: #1a1400; font-size: 11px; font-weight: 800; letter-spacing: .08em; vertical-align: middle; }
.st-admin { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 14px; background: #2b2540; color: #ece9f5; font: 13px/1.4 system-ui, sans-serif; border-bottom: 1px solid #4a3f6b; }
.st-admin-test { background: #3d3100; border-bottom-color: #f5b400; }
.st-admin a { color: inherit; }
.st-admin button { flex: none; background: none; border: 1px solid currentColor; color: inherit; border-radius: 6px; padding: 2px 10px; font: inherit; cursor: pointer; }
