@charset "UTF-8";
:root {
  color-scheme: dark;
  --background: #121212;
  --surface: #1d1d1d;
  --ink: #f2f2f2;
  --muted: #b1b1b1;
  --border: #414141;
  --record: #df5555;
  --reference-purple: #b093ff;
  --take-cyan: #67e5ff;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); }
body { min-height: 100vh; min-height: 100svh; margin: 0; color: var(--ink); background: var(--background); font: 17px/1.5 system-ui, sans-serif; }
button, input { font: inherit; }
button { min-height: 60px; padding: 14px 22px; border: 1px solid #626262; border-radius: 5px; color: var(--ink); background: var(--surface); font-size: 15px; font-weight: 650; letter-spacing: .06em; cursor: pointer; touch-action: manipulation; }
button:hover:not(:disabled) { background: #303030; border-color: #a1a1a1; }
button:active:not(:disabled) { background: #3c3c3c; }
button:disabled { color: #939393; border-color: #353535; background: #191919; cursor: default; }
button.record-button { color: #151515; border-color: var(--ink); background: var(--ink); }
button.record-button:hover:not(:disabled) { background: #d4d4d4; border-color: #d4d4d4; }
button.record-button[aria-pressed="true"] { color: #fff; border-color: #b94242; background: #a83232; }
button.record-button:disabled { color: #939393; border-color: #353535; background: #191919; }
:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
input { width: 100%; min-height: 56px; padding: 12px 15px; border: 1px solid #737373; border-radius: 5px; color: var(--ink); background: var(--surface); }
label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 15px; }
[hidden] { display: none !important; }
h1, h2, p { margin-top: 0; }
.skip-link { position: absolute; z-index: 10; top: -100px; left: 16px; padding: 12px 16px; color: #121212; background: #fff; }
.skip-link:focus { top: 12px; }
.stage { width: min(1360px, calc(100% - 64px)); min-height: 100vh; min-height: 100svh; margin: auto; padding: 20px 0 24px; }
.stage-header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; min-height: 32px; margin-bottom: 14px; }
h1 { min-width: 0; margin-bottom: 0; color: var(--muted); font-size: 17px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.line-number { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
h2 { margin-bottom: 22px; font-size: clamp(28px, 4vw, 42px); font-weight: 550; line-height: 1.2; }
.notice { width: min(760px, 100%); margin: 0 auto 16px; padding: 12px 16px; border: 1px solid #a45050; border-radius: 5px; color: #f5dddd; background: #322020; font-size: 15px; }
.quiet-screen { width: min(700px, 100%); min-height: 75vh; min-height: 75svh; margin: auto; padding: 48px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.quiet-screen p { max-width: 560px; margin-bottom: 12px; color: var(--muted); font-size: 18px; }
.join-form { width: min(360px, 100%); margin: 8px auto 0; text-align: left; }
.join-form button { width: 100%; margin-top: 16px; }
.assigned-characters { max-width: 100%; margin: 0 0 36px; padding: 0; list-style: none; }
.assigned-characters li { padding: 6px 0; font-size: clamp(21px, 3vw, 28px); font-weight: 550; overflow-wrap: anywhere; }
.roles-screen { width: min(820px, 100%); min-height: 75svh; margin: auto; padding: 42px 0; display: flex; flex-direction: column; align-items: stretch; }
.line-setup-summary { width: min(620px,100%); margin: 16px auto; padding: 16px 18px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.line-setup-summary strong { display: block; font-size: 20px; }
.line-setup-summary p { margin: 5px 0 0; }
.line-navigation { width: min(1050px,100%); margin: 0 auto 16px; padding: 12px 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px 14px; border-bottom: 1px solid var(--border); }
.line-navigation label { margin: 0; }
.line-navigation select { width: 100%; min-width: 0; min-height: 48px; padding: 9px 12px; border: 1px solid #737373; border-radius: 5px; color: var(--ink); background: var(--surface); font: inherit; }
.line-navigation p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.line-navigation button { min-height: 48px; padding: 9px 14px; font-size: 13px; }
.section-intro { text-align: center; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.role-counts { min-height: 1.5em; color: var(--muted); }
.character-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 12px 0 20px; }
.character-option { min-width: 0; padding: 13px 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.character-option strong, .character-option small { min-width: 0; overflow-wrap: anywhere; }
.character-option small { grid-column: 1; color: var(--muted); }
.character-option button { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; padding: 8px 12px; font-size: 13px; }
.character-option.is-mine { border-color: #5a8f83; }
.my-role-line { padding: 12px 0; display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--border); }
.my-role-line > span { flex: 0 0 auto; color: var(--muted); font-size: 14px; }
.assigned-characters { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; }
.assigned-characters li { padding: 0; font-size: 16px; }
.mic-gain-control { width: min(520px,100%); margin: 16px auto 10px; display: grid; gap: 5px; color: var(--muted); font-size: 14px; }
.mic-gain-control span { display: flex; justify-content: space-between; gap: 14px; }
.mic-gain-control output { color: var(--ink); font-variant-numeric: tabular-nums; }
.mic-gain-control input[type=range] { width: 100%; min-height: 32px; padding: 0; accent-color: var(--take-cyan); background: transparent; }
.microphone-meter-wrap { width: min(520px,100%); margin: 7px auto; display: grid; grid-template-columns: auto minmax(80px,1fr); align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.microphone-meter-wrap canvas { width: 100%; height: 14px; border-radius: 7px; background: #303030; }
.microphone-status { min-height: 22px; margin: 0 auto 14px; color: var(--muted); font-size: 13px; text-align: center; }
.keyboard-help { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
#ready { min-width: min(260px, 100%); }
.video-frame { position: relative; width: 100%; overflow: hidden; background: #000; }
#line-video { display: block; width: 100%; height: min(58vh, 765px); height: min(58svh, 765px); min-height: 240px; background: #000; object-fit: contain; }
.countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: #0009; font-size: clamp(96px, 16vw, 180px); font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.line-content { width: min(1050px, 100%); margin: 22px auto 0; text-align: center; }
#line-character { margin-bottom: 9px; color: var(--muted); font-size: clamp(17px, 2vw, 22px); font-weight: 600; letter-spacing: .05em; }
.caption { min-height: 1.4em; margin-bottom: 0; color: var(--ink); font-size: clamp(22px, 2.5vw, 34px); line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: balance; }
.waveform { display: block; width: min(800px, 100%); height: 60px; margin: 12px auto 14px; }
.waveform-legend { width: min(800px,100%); margin: 14px auto -8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 18px; color: var(--muted); font-size: 13px; }
.waveform-legend span { display: inline-flex; align-items: center; gap: 6px; }
.waveform-legend i { width: 11px; height: 11px; display: inline-block; border-radius: 2px; }
.reference-swatch { background: var(--reference-purple); }
.take-swatch { background: var(--take-cyan); }
.recording-gain { margin: 8px auto; }
.recording-progress { display: block; width: min(800px, 100%); height: 4px; margin: -8px auto 14px; border: 0; accent-color: var(--record); }
.recording-progress::-webkit-progress-bar { background: #303030; }
.recording-progress::-webkit-progress-value { background: var(--record); }
.recording-progress::-moz-progress-bar { background: var(--record); }
.recording-controls { width: min(900px, 100%); margin: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; }
.recording-controls button { min-width: 0; min-height: 64px; padding: 12px 10px; white-space: nowrap; }
.record-action { min-width: 0; display: grid; grid-template-rows: 44px 1fr; gap: 6px; }
.record-action button { width: 100%; }
.skip-countdown { min-width: 0; min-height: 44px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; white-space: nowrap; }
.skip-countdown input { appearance: none; flex: 0 0 18px; width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; display: grid; place-items: center; border: 1px solid #999; border-radius: 3px; color: #121212; background: var(--surface); cursor: pointer; }
.skip-countdown input:checked { border-color: var(--ink); background: var(--ink); }
.skip-countdown input:checked::after { content: '✓'; font-size: 13px; font-weight: 800; line-height: 1; }
.skip-countdown input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.skip-countdown input:disabled { cursor: default; }
.skip-countdown:has(input:disabled) { cursor: default; opacity: .6; }
.effect-row { width: min(100%, 1000px); margin: 16px auto 0; padding: 0 4px 6px; display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #777 var(--surface); }
.effect-label { position: sticky; left: 0; z-index: 1; flex: 0 0 auto; padding-right: 8px; color: var(--muted); background: var(--background); font-size: 14px; margin-right: 4px; }
.effect-row button { min-height: 44px; padding: 8px 12px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; font-size: 14px; letter-spacing: 0; white-space: nowrap; }
.effect-row button svg { flex: 0 0 auto; }
.effect-row button[aria-pressed="true"] { border-color: var(--ink); background: #373737; box-shadow: inset 0 -2px var(--ink); }
.custom-effect-options { width: min(100%, 940px); margin: 10px auto; padding: 0 6px; }
.custom-effect-options label { display: block; margin-bottom: 6px; font-size: 14px; }
.custom-effect-options input { display: block; width: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 10px 12px; }
.custom-effect-options .help { margin: 8px 0; font-size: 12px; }
.recorder-status { min-height: 21px; margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.final-screen { width: 100%; margin: 0 auto; }
#playback-root video { display: block; width: 100%; max-height: 78vh; max-height: 78svh; background: #000; object-fit: contain; }
#playback-root .actions { display: flex; justify-content: center; margin: 20px auto 0; }
#playback-root button { min-width: min(200px, 100%); }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .stage { width: calc(100% - 28px); padding: max(14px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom)); }
  .stage-header { gap: 14px; min-height: 28px; margin-bottom: 12px; }
  h1 { font-size: 15px; }
  .line-number { font-size: 11px; }
  .quiet-screen { min-height: 76svh; padding: 32px 0; }
  .roles-screen { min-height: 76svh; padding: 26px 0; }
  .character-options { grid-template-columns: 1fr; gap: 7px; }
  .character-option { padding: 11px 12px; }
  .my-role-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .line-navigation { grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; }
  .line-navigation label { grid-column: 1 / -1; }
  .line-navigation select { grid-column: 1 / -1; }
  .line-navigation button { grid-column: 1 / -1; }
  .quiet-screen p { font-size: 17px; }
  #line-video { height: min(46svh, 480px); min-height: 180px; }
  .line-content { margin-top: 18px; }
  #line-character { font-size: 16px; }
  .caption { font-size: clamp(21px, 5.4vw, 28px); }
  .waveform { height: 50px; margin: 9px auto 12px; }
  .waveform-legend { justify-content: flex-start; font-size: 12px; }
  .recording-controls { gap: 8px; }
  .recording-controls button { min-height: 56px; padding: 12px 5px; font-size: 12px; letter-spacing: .02em; }
  .recorder-status { font-size: 13px; }
  #playback-root video { max-height: 72svh; }
}
@media (max-width: 540px) {
  .recording-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recording-controls button { min-height: 60px; font-size: 14px; }
}
@media (max-height: 780px) and (min-width: 701px) {
  .stage { padding-top: 12px; }
  .stage-header { margin-bottom: 10px; }
  #line-video { height: 53svh; }
  .line-content { margin-top: 14px; }
  .caption { font-size: clamp(22px, 2.4vw, 29px); }
  .waveform { height: 44px; margin: 8px auto 10px; }
  .recording-controls button { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.soundpad-import { display: flex; justify-content: center; margin: 12px auto 4px; }
.soundpad-import button { min-height: 43px; padding: 8px 20px; font-size: 13px; white-space: nowrap; }
.soundpad-help { text-align: center; margin: 0 auto 14px; font-size: 12px; max-width: 620px; }

.profile-fieldset { margin: 14px 0; padding: 0; border: 0; }
.profile-fieldset legend { padding: 0; font-weight: 650; }
.profile-panel { margin: 0 0 18px; }
.profile-me { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.profile-me button { min-height: 44px; padding: 8px 14px; }
.roster { display: flex; flex-wrap: wrap; gap: 8px; }
.roster .player-chip.offline { opacity: .5; }
.recording-panel { border-top: 4px solid var(--chip, transparent); padding-top: 10px; }

.exports-section { margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: 6px; }
.exports-section h3 { margin: 0 0 10px; font-size: 17px; }
.exports-section .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.exports-section button, .exports-section .button-link { min-height: 48px; padding: 8px 14px; }
.button-link { display: inline-flex; align-items: center; border: 1px solid #626262; border-radius: 5px; color: var(--ink); background: var(--surface); font-size: 15px; font-weight: 650; text-decoration: none; letter-spacing: .04em; }
.export-jobs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.export-job { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.export-job progress { flex: 1 1 120px; }
.job-error { color: #ff8f8f; }

.reveal-panel { margin: 18px 0; }
.reveal-list { display: grid; gap: 14px; }
.reveal-item { padding: 14px; border: 1px solid var(--border); border-radius: 6px; }
.reveal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.reveal-item .caption { margin: 8px 0; }
.reveal-audio { display: grid; gap: 8px; }
.reveal-audio label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.reveal-audio audio { width: 100%; }
.scene-blind .video-frame video { visibility: hidden; }
.scene-blind .video-frame { min-height: 96px; }
.scene-blind .video-frame::before { content: "Scene hidden: listen for your timing"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; color: var(--muted); font-size: 14px; text-align: center; }

/* Modes, cards, speed rounds. */
.mode-badges { margin: -6px 0 14px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.quiet-screen.compact { min-height: 0; padding: 24px 0; }
.card-panel { width: min(820px, 100%); margin: 0 auto 16px; border: 1px solid #7a6a2d; border-radius: 8px; background: #231f12; }
.card-panel > summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; min-height: 48px; }
.card-panel > summary::-webkit-details-marker { display: none; }
.card-panel > summary::before { content: "▸"; color: #d8c26a; transition: transform .15s; }
.card-panel[open] > summary::before { transform: rotate(90deg); }
.card-summary { color: #f2e6b0; font-weight: 650; overflow-wrap: anywhere; }
.card-body { display: grid; gap: 10px; padding: 0 16px 16px; }
.card-face { padding: 14px 16px; border: 1px solid #8f7e3a; border-radius: 8px; background: #2d2713; }
.card-face h3 { margin: 6px 0 4px; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.2; color: #fff3c4; overflow-wrap: anywhere; }
.card-face-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: #d8c26a; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.card-text { margin: 0 0 6px; color: #f2f2f2; font-size: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card-face.card-effect { border-color: #8a68c8; background: #231b33; }
.card-face.card-effect .card-face-head { color: #c9b0f5; }
.card-face.card-constraint { border-color: #c98a4a; background: #2e2114; }
.card-face.is-vetoed { opacity: .55; }
.speed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 12px; padding: 12px 16px; border: 1px solid #626262; border-radius: 6px; background: var(--surface); }
.speed-bar button { min-width: 140px; }
.speed-timer { flex: 1 1 220px; color: var(--muted); font-size: 17px; font-variant-numeric: tabular-nums; }
.speed-bar.is-running { border-color: #e0b44a; }
.speed-bar.is-running .speed-timer { color: #ffe08a; font-size: 24px; font-weight: 700; }
.speed-bar.is-expired { border-color: #a45050; }
.speed-bar.is-expired .speed-timer { color: #f5b5b5; }
.reveal-cards { margin: 0 0 22px; }
.reveal-cards h3 { margin: 16px 0 8px; }
.guess-block { display: grid; gap: 8px; margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.guess-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.guess-option { display: grid; gap: 3px; align-content: start; min-height: 64px; padding: 10px 12px; text-align: left; letter-spacing: 0; font-weight: 500; }
.guess-option strong { font-size: 16px; overflow-wrap: anywhere; }
.guess-option small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.guess-option.is-picked { border-color: var(--take-cyan); background: #12323a; }
.card-results { display: grid; gap: 10px; }
.card-result { display: grid; gap: 8px; }
.card-result-who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.badge-ok, .badge-miss { padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-ok { color: #06281a; background: #75e3a6; }
.badge-miss { color: #ddd; background: #3b3b3b; }
.score-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.score-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; }
.score-list li.is-me { border-color: var(--take-cyan); }

/* Pack votes. */
.pack-vote-panel { width: min(1050px, 100%); margin: 18px auto; }
.pack-vote-panel h2 { margin-bottom: 8px; font-size: clamp(22px, 3vw, 30px); }
.pack-vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.pack-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.pack-tile.has-votes { border-color: #b7893c; }
.pack-tile.is-mine { border-color: var(--take-cyan); box-shadow: 0 0 0 1px var(--take-cyan); }
.pack-tile.is-chosen::before { content: "THE HOST PICKED THIS"; color: #75e3a6; font-size: 11px; font-weight: 750; letter-spacing: .1em; }
.pack-art { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; background: #2b2b2b; color: var(--muted); font-size: 28px; font-weight: 800; }
.pack-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pack-tile strong { overflow-wrap: anywhere; }
.pack-meta { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.pack-voters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 0; }
.pack-vote-count { color: #ffe08a; font-size: 13px; font-weight: 700; }
.pack-vote-button { min-height: 48px; margin-top: auto; padding: 8px 12px; font-size: 13px; }
button.pack-vote-button[aria-pressed="true"], button.pack-vote-button[aria-pressed="true"]:hover:not(:disabled) { color: #05222a; border-color: var(--take-cyan); background: var(--take-cyan); }
