*{box-sizing:border-box} :root{color-scheme:dark;--bg:#121511;--surface:#1b2019;--border:#353c31;--text:#f8f9ef;--muted:#b9c2b4;--lime:#d8f886;--dim:#292f25;font-family:system-ui,sans-serif;font-size:16px} body{margin:0;background:var(--bg);color:var(--text);min-height:100dvh} button,select,input,textarea{font:inherit} button,.file,select{color:var(--text);background:var(--dim);border:1px solid var(--border);border-radius:9px;padding:.62rem .85rem;cursor:pointer} button:hover,.file:hover{background:#394333} button:disabled{opacity:.42;cursor:default} [hidden]{display:none!important} :focus-visible{outline:2px solid var(--lime);outline-offset:3px} .mast{height:66px;padding:0 clamp(14px,4vw,54px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);gap:12px} .brand{color:var(--text);font-size:1.16rem;font-weight:750;text-decoration:none;white-space:nowrap}.mark{display:inline-grid;place-items:center;width:31px;height:31px;margin-right:6px;border-radius:8px;background:var(--lime);color:#152006;font-size:1rem}.mast-tools,.steps,.reading-tools{display:flex;align-items:center;gap:8px}.quiet{background:transparent}.primary{background:var(--lime);color:#152006;border-color:var(--lime);font-weight:750}.primary:hover{background:#edffb7}
.shell{height:calc(100dvh - 66px);display:grid;grid-template-columns:minmax(214px,260px) minmax(0,1fr);max-width:1660px;margin:auto;padding:22px clamp(14px,3.6vw,46px);gap:22px}.shell aside,.reader{min-height:0;border:1px solid var(--border);border-radius:15px;background:var(--surface)} aside{padding:16px;overflow:auto} aside label,.type-size,.reading-tools label{color:var(--muted);font-size:.88rem} select{display:block;width:100%;margin:6px 0 20px}.outline-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.outline-head h2{font-size:1rem;margin:0}.outline-head span{color:var(--muted);font-size:.88rem} progress{display:block;width:100%;height:8px;border:0;margin:9px 0 14px;accent-color:var(--lime);border-radius:20px;overflow:hidden} progress::-webkit-progress-bar{background:#383e35}progress::-webkit-progress-value{background:var(--lime)}ol{list-style:none;padding:0;margin:0;display:grid;gap:7px}.section-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px;background:#232920;border:1px solid transparent;border-radius:9px}.section-row.active{border-color:#7d9653;background:#303b25}.section-row button{background:transparent;border:0;text-align:left;border-radius:7px}.section-row .check{width:42px;text-align:center;color:var(--lime);font-weight:bold}.section-row button:hover{background:#415037}
.reader{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:#0b0e0a}.reader-head,.reader-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--surface);padding:14px clamp(12px,3vw,26px)}.reader-head{border-bottom:1px solid var(--border)} .reader-head h1{font-size:clamp(1.15rem,2vw,1.55rem);margin:0}.reader-head p{color:var(--lime);font-size:.86rem;margin:0 0 3px}.type-size,.reading-tools label{display:flex;align-items:center;gap:7px;white-space:nowrap} input[type=range]{accent-color:var(--lime);width:80px}.reader-tools{border-top:1px solid var(--border);flex-wrap:wrap}.reader-tools button{white-space:nowrap}#auto[aria-pressed=true]{border-color:var(--lime);color:var(--lime)} #viewport{overflow:auto;overscroll-behavior:contain;padding:clamp(20px,6vh,62px) clamp(16px,6vw,76px) 20px;scrollbar-color:#647454 #141813} #script-text{max-width:30ch;margin:0 auto;white-space:pre-wrap;overflow-wrap:anywhere;font-weight:620;font-size:var(--reading-size,44px);line-height:1.46;letter-spacing:.006em;color:#fffdf5}#end-marker{height:10vh} .focused .shell{grid-template-columns:minmax(0,1fr);max-width:1260px}.focused aside{display:none}
dialog{width:min(720px,calc(100% - 24px));max-height:90dvh;padding:22px;border:1px solid #55614d;border-radius:14px;background:#1b2019;color:var(--text)}dialog::backdrop{background:#090b08ca}dialog header,dialog footer{display:flex;justify-content:space-between;align-items:center;gap:14px}dialog h2,dialog p{margin:0 0 6px}dialog p{color:var(--muted)}dialog input:not([type=file]),dialog textarea{width:100%;display:block;background:#10140e;color:var(--text);border:1px solid #505b48;border-radius:7px;padding:8px 11px;margin:6px 0 14px}dialog textarea{resize:vertical;min-height:110px}.file{position:relative}.file input{position:absolute;opacity:0;inset:0;width:100%;cursor:pointer}.file:focus-within{outline:2px solid var(--lime);outline-offset:3px}#edit-error{margin-top:8px;color:#ffd796}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:740px){.mast{height:auto;min-height:61px;padding:8px 12px;flex-wrap:wrap}.mast-tools button{padding:.42rem .55rem}.shell{display:flex;flex-direction:column;height:auto;padding:10px;gap:10px}.shell aside{max-height:210px;flex:none}.reader{height:min(690px,77dvh);min-height:380px}.reader-tools{gap:8px}.reading-tools,.steps{flex-wrap:wrap}.reader-tools button{font-size:.89rem;padding:.48rem .56rem}.reader-head{padding:10px}.type-size input{width:53px}#viewport{padding-top:22px} .focused .reader{height:calc(100dvh - 90px)}}
/* Teleprompter */
:root{--bg:#101315;--surface:#191e21;--border:#374448;--text:#f8fbf7;--muted:#bbcac8;--lime:#d5fa91;--dim:#283233}
body{background:radial-gradient(ellipse at 75% 0,#23302d 0,#101315 51%)}.mast{background:#101517}.reader{grid-template-rows:auto minmax(0,1fr) auto auto;box-shadow:0 20px 55px #0005;background:#060809}.reader-head,.reader-tools{background:#181e21}.reader-head h1{letter-spacing:-.025em}.stage{position:relative;min-height:0}.stage #viewport{height:100%;padding-top:clamp(24px,8vh,80px);padding-bottom:26vh;scroll-behavior:auto;scrollbar-gutter:stable}.read-guide{position:absolute;pointer-events:none;top:31%;left:0;right:0;border-top:1px solid #d5fa9133;z-index:2}.read-guide:before,.read-guide:after{content:"";position:absolute;top:-4px;width:8px;height:8px;background:#d5fa91;border-radius:50%}.read-guide:before{left:10px}.read-guide:after{right:10px}#script-text{max-width:32ch;letter-spacing:-.022em;line-height:1.43;font-weight:720;color:#fff}.voice-read{color:#9eae9b}.voice-next{color:var(--lime);background:#d5fa9124;border-radius:4px}.voice-strip{display:flex;align-items:center;gap:11px;padding:9px clamp(12px,3vw,26px);border-top:1px solid var(--border);background:#12181a}.voice-strip strong,.voice-strip small{display:block}.voice-strip small{color:var(--muted);font-size:.79rem}.voice-strip strong{font-size:.91rem}.voice-strip button{white-space:nowrap}#mic[aria-pressed=true]{border-color:var(--lime);color:var(--lime)}.focused .shell{max-width:1440px}.focused #script-text{max-width:35ch}.mast-tools{flex-wrap:wrap}@media(max-width:740px){.voice-strip small{font-size:.73rem}.voice-strip button{white-space:normal}.stage #viewport{padding-top:20px}.reader{min-height:490px}.mast-tools .file{padding:.42rem .55rem}}


/* Use the available display for the script. */
.shell,.focused .shell{max-width:none;padding-inline:clamp(8px,1.7vw,26px);gap:14px}.shell{grid-template-columns:minmax(175px,205px) minmax(0,1fr)}
.stage #viewport{padding-inline:clamp(14px,3.7vw,55px)}
#script-text,.focused #script-text{max-width:min(100%,52ch);font-weight:690}
.mast{padding-inline:clamp(10px,1.8vw,30px)}
#mic-meter{width:64px;height:9px;flex:0 0 64px;accent-color:var(--lime);border:0}#mic-meter::-webkit-meter-optimum-value{background:#c2ee78}#mic-meter::-webkit-meter-bar{background:#2c3934;border:0}
@media(max-width:740px){.shell,.focused .shell{padding-inline:5px}.stage #viewport{padding-inline:12px}.voice-strip{gap:7px}#mic-meter{flex-basis:30px;width:30px}}

/* Compact, persistent topic rail. */
.shell{grid-template-columns:clamp(142px,14vw,192px) minmax(0,1fr);gap:10px}
.shell aside{padding:10px}
aside select{padding:.42rem .47rem;margin:4px 0 12px;font-size:.88rem;text-overflow:ellipsis}
.outline-head{gap:4px}.outline-head span{font-size:.74rem;white-space:nowrap}
#sections{gap:4px}.section-row{grid-template-columns:minmax(0,1fr) 34px}
.section-row button{padding:.42rem .46rem;font-size:.87rem;line-height:1.22;overflow-wrap:anywhere}
.section-row .check{width:34px;padding-inline:0}
.stage #viewport{padding-inline:clamp(12px,2.4vw,38px)}
#script-text,.focused #script-text{max-width:min(100%,60ch)}
@media(max-width:740px){.shell aside{max-height:155px}.shell #sections{grid-template-columns:1fr 1fr}}
.voice-controls{display:flex;flex-wrap:wrap;gap:5px;align-items:center}.voice-controls select{width:auto;max-width:175px;margin:0;padding:.35rem;font-size:.8rem}.voice-controls button{font-size:.86rem;padding:.39rem .55rem}.voice-strip>div:nth-child(2){flex:1;min-width:105px}
