:root{color-scheme:dark;--bg:#101310;--panel:#171e1a;--stage:#000;--line:#2c3830;--text:#fff;--muted:#aab6ad;--accent:#b7f3cb;--accent-dark:#203b2a;--font:48px;--leading:1.55}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit}
button{cursor:pointer;border:1px solid var(--line);border-radius:9px;color:var(--text);background:#1c251f;min-height:40px;padding:9px 13px;transition:background .15s,border-color .15s}
button:hover{background:#2c3a30;border-color:#6c8574}
button:disabled{opacity:.5;cursor:not-allowed}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible,#reader:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
button.primary{background:var(--accent);color:#112217;font-weight:700;border-color:var(--accent)}
button.primary:hover{background:#d1ffdf}
button.secondary{background:var(--accent-dark);color:#d4f8df}
button.quiet{background:transparent;border-color:transparent}
button.square{width:45px;padding:0;font-size:25px;flex-shrink:0}
.full-width{width:100%;margin-top:8px}
[hidden]{display:none!important}
.masthead{height:76px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:12px;font-size:29px;font-weight:750;letter-spacing:-1.3px}
.brand-mark{display:grid;place-items:center;background:var(--accent);color:#14281b;width:32px;height:34px;border-radius:9px;font-size:38px;line-height:24px;padding-bottom:4px}
.brand-dot{color:var(--accent)}
.brand-caption{margin-left:16px;color:var(--muted);font-size:10px;font-weight:500;letter-spacing:2px}
.header-actions{display:flex;align-items:center;gap:22px}
.header-actions button{font-size:12px}
.header-actions button span{margin-left:5px;color:var(--muted)}
.local-badge{font-size:12px;color:var(--muted)}
.local-badge i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:8px}
.workspace{display:grid;grid-template-columns:314px minmax(0,1fr);gap:24px;padding:24px 28px;height:calc(100dvh - 76px);max-width:1800px;margin:auto}
.sidebar{overflow-y:auto;scrollbar-width:thin;padding:8px 8px 18px 4px}
.project-heading{padding:0 0 24px}
.eyebrow{font-size:10px;letter-spacing:1.6px;color:var(--muted);font-weight:600}
h1{font-weight:550;font-size:34px;line-height:1.12;letter-spacing:-1.4px;margin:12px 0}
h1 span{color:var(--accent)}
.project-heading p{font-size:11px;color:var(--muted);margin:0}
.project-heading p span{padding:0 4px;color:#64766a}
h2{font-size:13px;font-weight:600;margin:0}
.control-block{border-top:1px solid var(--line);padding:18px 0}
.label-row{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:12px;gap:10px}
.label-row>span,.label-row label span{color:var(--muted);font-size:11px}
.label-row label span{margin-left:5px}
.mode-tabs{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;gap:3px;border:1px solid var(--line);border-radius:12px;background:#0f1511}
.mode-tabs button{border:0;background:none;font-size:12px;padding:8px 4px;color:var(--muted);border-radius:8px}
.mode-tabs button small{display:block;font-weight:400;font-size:10px;margin-top:3px}
.mode-tabs button[aria-pressed=true]{background:#2d4033;color:#e4f9eb}
.hint{font-size:11px;line-height:1.65;color:var(--muted);margin:10px 0}
.hint span{font-size:11px}
.play-row{display:flex;gap:8px;margin-top:14px}
.play-row .primary{flex:1;min-height:45px}
.state-line{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.6;margin-top:12px;min-height:18px;color:var(--muted)}
.state-dot{width:6px;height:6px;flex-shrink:0;margin-top:6px;border-radius:50%;background:#6b7d70}
.state-dot.active{background:var(--accent);box-shadow:0 0 0 4px #b7f3cb12}
.state-dot.warning{background:#f3c785}
.field-label{display:block;font-size:11px;margin:14px 0 8px}
select{width:100%;background:#111a14;border:1px solid var(--line);border-radius:8px;color:var(--text);padding:9px;min-height:40px;font-size:11px}
.consent{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.6;color:#e0d5b9;margin:10px 0}
.consent input{margin:4px 0;accent-color:var(--accent);flex-shrink:0}
.consent span span{color:var(--muted)}
input[type=range]{display:block;width:100%;height:5px;accent-color:var(--accent);cursor:pointer;margin:10px 0 14px}
output{color:var(--accent);font:11px ui-monospace,SFMono-Regular,monospace}
.speed-label{margin-top:24px}
.adjustments .hint{margin-bottom:0}
.parts{border-top:1px solid var(--line);padding-top:18px}
#partButtons{display:grid;grid-template-columns:1fr 1fr;gap:5px}
#partButtons button{display:flex;align-items:center;text-align:left;gap:9px;background:none;border:1px solid transparent;font-size:11px;min-height:34px;padding:7px 9px}
#partButtons button span{font:10px ui-monospace,monospace;color:#90a196}
#partButtons button[aria-current=true]{background:#213529;border-color:#3e5d48;color:#c7f7d6}
.performance-note{margin-top:20px;padding:13px 15px;border-left:2px solid var(--accent);background:#1c2820;border-radius:0 7px 7px 0}
.performance-note .eyebrow{font-size:9px;letter-spacing:.9px}
.performance-note p{font-size:12px;line-height:1.8;margin:7px 0 0;color:#d8e5db}
.private-note{font-size:10px;line-height:1.8;color:#97a59b;margin:20px 0 0}
.stage{min-height:0;background:var(--stage);border:1px solid var(--line);border-radius:18px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 14px 40px #0002}
.stage-toolbar{padding:14px 22px;min-height:65px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.stage-toolbar>div{display:flex;align-items:center;gap:14px}
.part-number{color:var(--accent);font:10px ui-monospace,monospace;letter-spacing:1px}
.stage-toolbar strong{font-size:12px;font-weight:500}
.stage-actions #elapsed{color:var(--muted);font:12px ui-monospace,monospace}
.stage-actions button{font-size:11px;padding:7px 8px;min-height:32px}
kbd{display:inline-block;font-family:inherit;color:var(--muted);font-size:10px;border:1px solid #3b493e;padding:2px 5px;border-radius:4px;line-height:1.3}
.stage-actions kbd{margin-left:4px}
.camera-guide{text-align:center;color:#a4b5aa;font-size:10px;border-top:1px solid #243128;border-bottom:1px solid #243128;padding:10px 12px;background:#111b14;letter-spacing:.1px}
.camera-guide>span:first-child{color:var(--accent);padding-right:6px}
.reader-wrap{position:relative;min-height:0;flex:1}
.read-marker{position:absolute;left:16px;top:64px;font-size:30px;line-height:1;color:var(--accent);z-index:1;pointer-events:none}
#reader{height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#3b5142 transparent;outline-offset:-3px;scroll-behavior:auto}
#scriptContent{max-width:880px;margin:0 auto;padding:52px 52px 0;position:relative}
.script-part{margin:0 0 1.1em;font-size:var(--font);line-height:var(--leading);font-weight:500;letter-spacing:-.5px;overflow-wrap:break-word}
.part-label{display:block;font-size:11px;letter-spacing:2px;line-height:1.5;color:#8ea397;margin-bottom:22px;font-weight:500}
.sentence{cursor:pointer;border-radius:4px}
.sentence:hover{background:#b7f3cb09}
.word{border-radius:4px}
.sentence.active-line{background:#1b241e;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.word.read{color:#89918b}
.word.current{background:var(--accent);color:#102318;box-shadow:3px 0 var(--accent),-3px 0 var(--accent)}
.end-card{padding:12px 52px 60vh;max-width:880px;margin:auto}
.end-card p{font-size:24px;margin:12px 0}
.end-card>span{font-size:14px;color:var(--muted)}
.stage-bottom{background:#121a15;border-top:1px solid var(--line);padding:16px 24px 10px;flex-shrink:0}
.focus-status{font-size:11px;line-height:1.6;color:#c3d8ca;margin-bottom:8px}
.progress-label{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.progress-label #progressPercent{color:var(--accent)}
input.progress-range{margin:12px 0 7px;height:4px}
.transport{display:flex;align-items:center;justify-content:space-between;gap:8px}
.transport>div{display:flex;gap:3px}
.transport button{font-size:11px;min-height:32px;padding:6px 9px}
.shortcut-hint{color:#a4b5a9;font-size:10px}
.shortcut-hint>span{padding:0 6px}
.shortcut-hint kbd{margin-right:3px}
.heard-panel{display:flex;gap:14px;padding:0 0 15px;font-size:11px;line-height:1.6;color:var(--muted)}
.heard-panel .eyebrow{white-space:nowrap;flex-shrink:0;font-size:9px;line-height:1.9}
#heard{max-height:50px;overflow:auto;overflow-wrap:anywhere}
body.focus .masthead,body.focus .sidebar{display:none}
body.focus .workspace{display:block;height:100dvh;padding:0;max-width:none}
body.focus .stage{height:100%;border:0;border-radius:0}
body.focus .stage-toolbar{min-height:42px;padding:5px 22px}
body.focus .camera-guide{padding:6px}
body.focus #scriptContent{max-width:740px;padding-top:42px}
body.focus .read-marker{top:54px;left:max(18px,calc(50% - 370px + 14px))}
body.focus[data-camera=left] #scriptContent,body.focus[data-camera=left] .end-card{margin-left:0;margin-right:auto}
body.focus[data-camera=right] #scriptContent,body.focus[data-camera=right] .end-card{margin-right:0;margin-left:auto}
body.focus[data-camera=left] .read-marker{left:18px}
body.focus[data-camera=right] .read-marker{left:max(18px,calc(100% - 740px + 14px))}
body.focus .stage-bottom{padding:10px max(24px,calc(50% - 400px)) 8px}
body.focus .end-card{max-width:850px}
.time-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.time-summary button{font-size:11px;min-height:30px;padding:4px 8px}
.script-downloads{display:grid;gap:10px;margin:22px 0;font-size:12px}
.practice-target{padding-bottom:12px}
.adjustments #lineSpacing{margin-bottom:20px}
body.focus .camera-guide{background:#000}
body.focus .stage-toolbar{background:#000}
@media(max-width:700px){.practice-target,.script-downloads{grid-column:1/-1}.stage-toolbar{flex-wrap:wrap}.stage-toolbar>div{flex-wrap:wrap}.stage-actions{margin-left:auto}.time-summary{font-size:9px}.stage-actions button{padding:5px}.stage-actions kbd{display:none}body.focus #scriptContent{padding-left:32px;padding-right:24px}body.focus .read-marker{left:8px!important}}
dialog{background:#1a231d;color:var(--text);border:1px solid #4c6353;border-radius:20px;padding:28px;max-width:760px;width:calc(100% - 32px);max-height:88dvh;box-shadow:0 30px 100px #0008}
dialog::backdrop{background:#020804b8;backdrop-filter:blur(6px)}
.dialog-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}
.dialog-heading h2{font-size:28px;letter-spacing:-.8px;margin-top:10px;font-weight:500}
.quick-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:24px}
.quick-steps b{color:var(--accent);font:11px ui-monospace,monospace}
.quick-steps h3{font-size:13px;font-weight:600}
.quick-steps p{font-size:12px;line-height:1.9;color:var(--muted)}
details{border-top:1px solid #34493a;padding:15px 0}
summary{cursor:pointer;font-size:13px;color:#e0f0e5;font-weight:500}
details p{font-size:12px;line-height:1.85;color:#b8c9bd}
.key-list{display:grid;grid-template-columns:140px 1fr;gap:12px;font-size:12px;color:var(--muted)}
.key-list dt{color:var(--accent)}
.key-list dd{margin:0}
.source-note,.source-links{font-size:10px;line-height:1.8;color:var(--muted)}
a{color:var(--accent)}
.capability{padding:10px;border:1px solid #405b49;border-radius:6px}
.no-script{position:fixed;inset:20%;background:#1c2820;padding:30px;border:2px solid var(--accent)}
@media(min-width:1450px){.workspace{grid-template-columns:330px minmax(0,1fr);gap:36px;padding:30px 40px}}
@media(max-width:1000px){.workspace{grid-template-columns:270px minmax(0,1fr);gap:16px;padding:16px}.brand-caption{display:none}.masthead{height:62px;padding:0 22px}.workspace{height:calc(100dvh - 62px)}#scriptContent{padding-left:35px;padding-right:30px}.read-marker{left:8px}.stage-toolbar{padding:12px}.stage-toolbar>div{gap:7px}.stage-actions #elapsed{display:none}.shortcut-hint{display:none}.camera-guide span[lang]{display:none}}
@media(max-width:700px){body{height:auto}.masthead{padding:0 16px}.local-badge{display:none}.workspace{display:flex;flex-direction:column;height:auto;padding:12px;gap:14px}.sidebar{overflow:visible;display:grid;grid-template-columns:1fr 1fr;gap:0 16px;padding:4px}.project-heading{grid-column:1/-1;padding:8px 0 18px}h1{font-size:29px}h1 br{display:none}h1 br:after{content:" "}.control-block{padding:14px 0}.parts,.performance-note,.private-note{display:none}.stage{height:75dvh;min-height:440px}.stage-toolbar{min-height:50px}#scriptContent{padding:38px 32px 0}.script-part{font-size:calc(var(--font)*.8)}.read-marker{top:50px}.camera-guide{font-size:9px}.stage-bottom{padding:12px 15px 8px}.quick-steps{grid-template-columns:1fr;gap:10px}.quick-steps h3{display:inline-block;margin:0 0 0 8px}.quick-steps p{margin:6px 0}.header-actions{gap:0}.key-list{grid-template-columns:100px 1fr}.dialog-heading h2{font-size:24px}dialog{padding:22px}.label-row{font-size:11px}.label-row>span{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
