:root{color-scheme:dark;font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#fff;background:#000;--line:#282c32;--muted:#b0b4bb;--paper:#000;--orange:#fff;--ink:#fff;--mono:ui-monospace,SFMono-Regular,Consolas,monospace}
*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column}button,input,select{font:inherit;color:#fff}button{cursor:pointer;border:1px solid #3c4149;background:#000;border-radius:3px;padding:7px 10px}button:hover{background:#171b20}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #fff;outline-offset:2px}button,input{touch-action:manipulation}a{color:#fff;text-decoration:none}[hidden]{display:none!important}input[type=range],input[type=checkbox],progress{accent-color:#fff}input[type=range]{height:4px}input[type=checkbox]{width:16px;height:16px}select,input[type=number]{border:1px solid #414750;border-radius:2px;background:#000;padding:8px}small{font-size:11px}
.header{height:38px;flex:none;border-bottom:1px solid var(--line);padding:0 6px;display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{font-size:15px;font-weight:600;white-space:nowrap}.brand span{font-weight:400}.header nav,.header-right{display:flex;align-items:center;gap:8px}.nav-button{border:0;background:none}.count{font-size:11px;margin-left:4px}.header .icon-button{width:29px;height:29px;padding:0}main{padding:0;min-height:0;flex:1;display:flex}.workspace{border:0;flex:1;min-width:0;display:flex;flex-direction:column}
.stage{height:auto;flex:1;min-height:0;background:#000;position:relative;display:flex;flex-direction:column;overflow:hidden}.stage-top{display:flex;align-items:center;justify-content:flex-end;gap:15px;min-height:42px;padding:5px 8px;border-bottom:1px solid var(--line);background:#000;flex:none}.stage-status,.stage-tools{display:flex;align-items:center;gap:12px}.stage-status{font-size:11px;white-space:nowrap}.stage-tools{gap:5px;margin-left:auto}.stage-tool{font-size:11px;padding:5px 8px}.stage-tool.active{border-color:#fff;background:#1b2027}.photo-brightness{display:flex;gap:7px;align-items:center;font-size:11px;margin:0 8px;white-space:nowrap}.photo-brightness input{width:80px;margin:0}.photo-brightness output{font:10px var(--mono);min-width:31px}.stage canvas#scene{width:100%;flex:1;min-height:0;display:block;touch-action:none}.stage:fullscreen{flex:none;width:100vw;height:100dvh}#loading{position:absolute;inset:0;display:grid;place-items:center;background:#000;font-size:13px}#fps{color:#a4acb8;font-size:10px}
.chapter-strip{flex:none;display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.chapter{position:relative;border:0;border-right:1px solid var(--line);border-radius:0;display:flex;align-items:center;gap:12px;text-align:left;min-height:36px;padding:8px 12px}.chapter:last-child{border-right:0}.chapter.active{background:#181d24}.chapter b{font-weight:400;font-size:12px}.chapter.active b{font-weight:600}.chapter-bpm{margin-left:auto;font-size:10px;color:#b0b4bb}.chapter-bpm small{font-size:9px}.chapter-progress{position:absolute;bottom:0;left:0;height:2px;background:#fff;width:0}.chapter.active .chapter-progress{width:var(--progress,0%)}
.transport{flex:none;min-height:56px;display:flex;align-items:center;justify-content:space-between;padding:9px 10px;gap:16px}.play-controls,.audio-controls,.audience-control{display:flex;align-items:center;gap:8px}.play-button{min-width:57px}.icon-button{font-size:12px}.transport-time{font-size:10px;display:grid;gap:5px;margin-left:5px}.transport-time b{font-weight:400}.transport-time i{font-style:normal;margin:0 4px}.charge-status{font-size:11px;color:#b0b4bb;min-width:95px}.advance-button{position:relative;overflow:hidden;min-width:150px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #fff;font-size:12px}.button-key{font-size:9px;color:#b0b4bb}.advance-button #charge-fill{position:absolute;left:0;bottom:0;height:2px;background:#fff;width:0}.audio-controls input{width:64px}.settings-button{font-size:12px}footer{height:24px;display:flex;align-items:center;font-size:10px;color:#b0b4bb}
.drawer-backdrop{position:fixed;inset:0;background:#0008;z-index:20}.drawer{position:fixed;right:0;top:0;width:min(390px,100vw);height:100dvh;background:#000;border-left:1px solid #414750;z-index:21;display:flex;flex-direction:column}.drawer-header{padding:15px 18px;display:flex;justify-content:space-between;align-items:center}.drawer-header h2{font-size:19px;font-weight:500;margin:0}.drawer-header .icon-button{font-size:22px;padding:0;width:28px;height:28px;border:0}.drawer-tabs{display:flex;gap:14px;padding:0 18px;border-bottom:1px solid var(--line)}.drawer-tabs button{border:0;border-radius:0;padding:10px 0;font-size:12px}.drawer-tabs button.active{box-shadow:inset 0 -2px #fff}.drawer-body{overflow-y:auto;padding:16px 18px 30px;flex:1}.panel-intro{display:none}.setting-group{border-top:1px solid var(--line);padding-top:16px;margin-top:18px}h3{font-size:13px;font-weight:600;margin:0 0 12px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;margin:12px 0}.toggle-row small{display:none}.range-label{display:block;font-size:12px;margin:17px 0}.range-label output{float:right;font-size:11px;color:#b0b4bb}.range-label input{width:100%;display:block;margin:12px 0}.field-label{display:block;font-size:12px;margin:13px 0}.field-label select{display:block;width:100%;margin-top:8px}.hint{font-size:11px;line-height:1.5;color:#b0b4bb;margin:10px 0}.full{width:100%}.primary-button,.secondary-button{font-size:12px;padding:9px 12px}.primary-button{border-color:#fff}.text-button{font-size:11px;padding:9px 0;border:0;text-decoration:underline;text-underline-offset:2px}.button-row{display:flex;gap:10px}.button-row>*{flex:1}.three-fields{display:flex;gap:10px}.three-fields label{font-size:11px;flex:1;min-width:0}.three-fields input{width:100%;margin-top:7px}.sequence-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}.sequence-row>span{font-size:11px}.sequence-row b{font-size:12px;font-weight:400}.sequence-row small{font-size:10px;color:#b0b4bb}.sequence-row p{display:none}.sequence-row>button{padding:2px 7px}.sequence-row>input[type=color]{margin-left:auto;flex:none;width:34px;height:28px;padding:2px;border:1px solid #414750;border-radius:3px;background:#000;cursor:pointer}.sound-card{background:#000;border:1px solid var(--line);padding:12px;margin-bottom:12px}.sound-card canvas{width:100%;height:50px}.sound-card>div{display:flex;justify-content:space-between;font:9px var(--mono);color:#b0b4bb}
.projector-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.projector-bank h3{font-size:12px}.projector-bank>div{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.projector-card{padding:10px 7px;text-align:left}.projector-card.selected{border-color:#fff;background:#181d24}.projector-card b{color:#fff!important;font-size:14px;font-weight:400}.projector-card small{display:block;font-size:10px;margin-top:7px}.projector-card i{display:block;height:2px;background:#fff;margin-top:7px}.projector-card.over{border-color:#ff856a}.projector-card.over small{color:#ff856a}#zone-map{width:100%;height:auto;display:block;touch-action:none}.budget-row{display:flex;justify-content:space-between;font:10px var(--mono);margin:7px 0}.budget-row.over{color:#ff856a}.export-contents{display:flex;gap:15px;padding:12px 0;border-bottom:1px solid var(--line)}.export-contents>span{min-width:40px;font-size:11px}.export-contents b{font-size:12px;font-weight:400}.export-contents small{font-size:10px;color:#b0b4bb;display:block;margin-top:5px}progress{width:100%;margin-top:12px}.toast{position:fixed;bottom:15px;left:50%;transform:translateX(-50%);background:#000;color:#fff;border:1px solid #6e7580;padding:12px 18px;z-index:100;max-width:min(500px,90vw);font-size:12px;line-height:1.5}.toast.error{border-color:#ff856a}body.aligning .drawer{width:300px}body.aligning .drawer-backdrop{pointer-events:none;background:none}body.aligning .stage{cursor:crosshair}
@media(max-width:1100px){.header{height:auto;min-height:38px;flex-wrap:wrap;gap:5px}.header>.stage-tools{order:3;width:100%;justify-content:flex-end;padding-bottom:5px}.header-right{margin-left:auto}.stage-top{flex-wrap:wrap;gap:6px}.stage-status{font-size:10px}.chapter-bpm{display:none}.transport-time{display:none}.charge-status{min-width:0}.settings-button{font-size:11px}}
@media(max-width:700px){.header{height:auto;min-height:38px;padding:3px 4px;gap:5px;flex-wrap:wrap}.header nav{order:1}.header-right{order:2;margin-left:auto}.header>.stage-tools{order:3;width:100%;justify-content:flex-start;margin:0}.brand{font-size:13px}.brand span{display:none}.header nav,.header-right{gap:3px}.nav-button{padding:6px;font-size:11px}.header-right button{font-size:11px}main{padding:0}.stage{height:auto;min-height:180px;flex:1}.stage canvas#scene{flex:1;min-height:0;height:100%}.stage:fullscreen{height:100dvh}.stage:fullscreen canvas#scene{flex:1;height:auto}.stage-top{padding:6px;gap:7px}.stage-status{gap:10px}.stage-tools{flex-wrap:wrap;gap:4px;justify-content:flex-start}.stage-tool{font-size:10px;padding:4px 6px}.photo-brightness{font-size:10px;margin:0 2px;gap:4px}.photo-brightness input{width:55px}.photo-brightness output{font-size:9px}#fps{font-size:9px}.chapter{padding:9px 6px;min-height:35px}.chapter b{font-size:11px}.transport{padding:7px;gap:8px;flex-wrap:wrap;min-height:92px}.play-controls{order:1}.audio-controls{order:2}.audience-control{order:3;width:100%;justify-content:flex-end}.advance-button{min-width:150px;padding:7px 10px}.charge-status{margin-right:auto;font-size:10px}.audio-controls input{width:40px}.icon-button,.play-button,.settings-button{font-size:11px;padding:6px 7px}.play-button{min-width:47px}footer{height:auto;min-height:22px;line-height:1.5;font-size:9px}.drawer-tabs{gap:15px}body.aligning .drawer{width:230px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.field-label>input[type=number]{display:block;width:100%;margin-top:7px}.button-row>.field-label{min-width:0}

#model-view{position:absolute;inset:0}#model-view canvas{display:block;width:100%;height:100%;touch-action:none}
.model-tools{display:flex;gap:5px}.model-tools button{font-size:11px;background:#000}.model-tools button:hover{background:#202630}.model-tools button[aria-pressed=true]{border-color:#fff}
#model-loading{position:absolute;left:12px;top:12px;padding:7px 10px;background:#000c;color:#fff;font-size:12px;pointer-events:none}
.download-link{border:1px solid #3c4149;border-radius:3px;text-align:center}.download-link:hover{background:#171b20}

/* Settings and rehearsal shortcuts are opt-in through ?admin. */
html:not(.admin) [data-admin-only]{display:none!important}
html:not(.admin) .header{flex-wrap:nowrap}
html:not(.admin) .header>.stage-tools{order:2;width:auto;margin-left:auto;padding-bottom:0}

/* One row for view controls; a centered audience button below the stage. */
.transport{display:grid;grid-template-columns:1fr auto 1fr}
.transport button{min-height:34px}
.play-controls{justify-self:start}
.audio-controls{justify-self:end}
.audience-control{justify-self:center;position:relative}
.charge-status{white-space:nowrap}
#skip-level{white-space:nowrap}
@media(max-width:850px){.transport{grid-template-columns:1fr 1fr}.play-controls{grid-column:1;grid-row:1}.audio-controls{grid-column:2;grid-row:1}.audience-control{grid-column:1/-1;grid-row:2;flex-wrap:wrap;row-gap:4px}.charge-status{width:100%}.advance-button{flex:1}}

.advance-button{border-color:var(--level-color,#4488ff)}
.advance-button #charge-fill{background:var(--level-color,#4488ff)}
.advance-button.fault{border-color:var(--error-color,#ff3333);background:#ff333324}
.advance-button.fault #charge-fill{background:var(--error-color,#ff3333)}
