#demo-types{display:flex;flex-wrap:wrap;gap:1rem}#demo-types label,#demo-actions label{display:flex;align-items:center;gap:.5rem;margin:0}#demo-types input,#demo-actions input{width:auto}.demo-config-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.demo-config-grid fieldset{display:grid;align-content:start;gap:.4rem;border:1px solid var(--line);border-radius:12px;padding:16px}.demo-config-grid label{margin:0}.demo-config-grid input[type=number]{max-width:9rem}#demo-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.demo-preview{width:100%;aspect-ratio:16/9;overflow:hidden;position:relative;background:#00170d}.demo-preview iframe{width:1920px;height:1080px;border:0;transform-origin:top left}#demo-results article{display:flex;gap:1rem;flex-wrap:wrap;margin:1rem 0}#demo-results a{padding:.6rem 1rem;border:1px solid #446b54;border-radius:.5rem}#demo-status{overflow-wrap:anywhere}@media(max-width:720px){.demo-config-grid{grid-template-columns:1fr}#demo-actions{grid-template-columns:1fr}}

#demo-player-names{width:100%;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);font:inherit}.demo-phone-preview{position:fixed;left:-10000px;top:0;pointer-events:none}.demo-phone-preview iframe{border:0}#demo-retained{display:flex;flex-wrap:wrap;gap:12px}#demo-retained a{padding:10px;border:1px solid var(--line);border-radius:8px}.demo-config-grid select{width:100%;max-width:100%}
.demo-inspect-phone{width:418px;max-width:100%;padding:12px;border:3px solid #7b877e;border-radius:32px;background:#080d0a;overflow:hidden;justify-self:center}.demo-inspect-phone iframe{width:390px;max-width:100%;height:844px;border:0;border-radius:22px}.demo-inspect-match{width:100%;padding:12px;margin:4px 0;background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:7px;text-align:start;cursor:pointer}

#demo-results article{display:block;border-top:1px solid var(--line);padding:18px 0}#demo-results video{display:block;width:100%;max-height:70vh;background:#031b10;border-radius:10px}#demo-results .toolbar{margin-top:14px}#demo-results h3{margin-top:0}

.demo-config-grid input[type=checkbox]{width:auto;margin-inline-end:8px}

/* The studio uses the same controls and spacing as the scoring app. */
.demo-brand{display:flex;align-items:center;gap:10px;min-width:0}.demo-brand img{width:42px;height:42px;object-fit:contain}.demo-brand span{white-space:normal;line-height:1.15}
#demo-form{gap:22px}#demo-types{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));padding:16px;border:1px solid var(--line);border-radius:12px;gap:10px}
#demo-types label{padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--card-2);min-height:48px}
#demo-form input[type=checkbox]{width:20px;height:20px;min-height:20px;padding:0;margin:0;flex:0 0 20px;accent-color:var(--yellow)}
#demo-form label:has(input[type=checkbox]){display:flex;align-items:center;gap:10px;line-height:1.35}
.demo-simple-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.demo-simple-grid label{margin:0}.demo-simple-grid select{width:100%}
.demo-players{margin:0;border:1px solid var(--line);border-radius:12px;padding:16px}.demo-count{display:flex;align-items:center;justify-content:space-between;gap:16px}.demo-count input{width:100px}
#demo-roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 32px;padding-inline-start:28px;margin:16px 0;max-height:340px;overflow:auto}#demo-roster li{padding-inline-start:4px;min-width:0}#demo-roster input{width:100%;min-width:0;padding:8px}
.demo-story-plan{padding:16px;background:var(--card-2);border-radius:12px}.demo-story-plan h2{margin-top:0}#demo-story-preview{padding-inline-start:24px;display:grid;gap:12px;margin-bottom:0}#demo-story-preview strong{display:block}#demo-story-preview small{display:block;color:var(--muted);line-height:1.45}
.demo-advanced summary,#demo-roster-editor summary{cursor:pointer;font-weight:700;color:var(--yellow);padding:8px 0}.demo-advanced .demo-config-grid{margin-top:16px}.demo-advanced label{border:1px solid var(--line);padding:12px;border-radius:10px;min-width:0}.demo-advanced input:not([type=checkbox]){width:100%}
#demo-legacy-controls[hidden]{display:none!important}#demo-start:disabled,#demo-stop:disabled{cursor:default}.demo-preview:has(iframe:not([src])){display:none}
.demo-preview:has(canvas){display:block;aspect-ratio:auto;max-height:75vh}.demo-preview canvas{display:block;width:100%;height:75vh;object-fit:contain}.demo-preview:has(canvas) iframe{position:absolute;left:-10000px;visibility:hidden}#demo-results code{display:block;overflow-wrap:anywhere;font-size:12px;color:var(--muted);margin-top:12px}
@media(max-width:700px){.demo-simple-grid{grid-template-columns:1fr}#demo-roster{grid-template-columns:1fr 1fr}header{padding:10px 16px}header>a{font-size:1.1rem}}
@media(max-width:420px){#demo-types{grid-template-columns:1fr}#demo-roster{grid-template-columns:1fr}.demo-brand img{width:34px;height:34px}}

.demo-access{border:2px solid var(--yellow)}.demo-access[hidden]{display:none}#demo-launcher{display:block;overflow-wrap:anywhere;user-select:all;font-size:13px}#demo-library{scroll-margin-top:16px}#demo-library-title:focus{outline:none}

.demo-script-editor{min-width:0}.scene-mode{display:flex;gap:10px;align-items:center}.scene-table-scroll{overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:10px}.scene-table-scroll table{width:100%;border-collapse:collapse;table-layout:fixed;min-width:1100px}.scene-table-scroll th,.scene-table-scroll td{text-align:start;vertical-align:top;padding:9px;border-bottom:1px solid var(--line)}.scene-table-scroll th:nth-child(1){width:120px}.scene-table-scroll th:nth-child(2){width:175px}.scene-table-scroll th:nth-child(3){width:260px}.scene-table-scroll th:nth-child(4),.scene-table-scroll th:nth-child(5){width:95px}.scene-table-scroll th:nth-child(6){width:190px}.scene-table-scroll th:nth-child(7){width:105px}.scene-table-scroll label{margin:0;display:block}.scene-table-scroll input:not([type=checkbox]),.scene-table-scroll textarea,.scene-table-scroll select{width:100%;min-width:0;max-width:100%;padding:8px;box-sizing:border-box;font:inherit}.scene-table-scroll textarea{resize:vertical;min-height:76px}.scene-mobile-label{display:none}.scene-options{display:grid;gap:6px}.scene-options>label>.scene-mobile-label{display:block;font-size:11px;color:var(--muted)}.scene-row-actions button{padding:5px 8px;min-width:28px}.scene-import{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.scene-import input{display:none}#demo-progress-panel{position:sticky;bottom:0;background:var(--card);border:1px solid var(--yellow);border-radius:10px;padding:12px;z-index:4}#demo-progress-panel[hidden]{display:none}#demo-progress{width:100%;accent-color:var(--yellow)}#demo-progress-stage{font-weight:700;margin:6px 0}#demo-progress-detail{margin:0;font-size:13px}

body:has(#demo-script-editor) main{max-width:none;width:calc(100% - 48px)}@media(max-width:700px){body:has(#demo-script-editor) main{width:calc(100% - 24px)}}

.scene-table-scroll textarea{background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:8px}

.demo-preset-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:14px 0}.demo-preset-toolbar label{flex:1;min-width:220px;max-width:430px}.demo-preset-toolbar select{width:100%;padding:10px;font:inherit}.demo-preset-toolbar button{min-height:43px}#demo-preset-duration{padding:12px 0}@media(max-width:650px){.demo-preset-toolbar label{flex-basis:100%;max-width:none}}
.video-library-filters{display:flex;gap:12px;margin:16px 0}.video-library-filters input{flex:1;min-width:100px}.video-library-filters select{min-width:150px}.video-library-scroll{overflow:auto;max-width:100%}.video-library-table{width:100%;min-width:1100px;border-collapse:collapse}.video-library-table th,.video-library-table td{text-align:start;vertical-align:middle;padding:8px 10px;border-bottom:1px solid var(--line)}.video-library-table td small{display:block;font-size:11px;color:var(--muted);margin-top:6px;overflow-wrap:anywhere}.video-library-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}.video-library-actions button,.video-library-actions a{display:inline-flex!important;align-items:center;justify-content:center;padding:7px 9px!important;font-size:12px!important;margin:0}.video-library-player{margin-top:24px}.video-library-player video{display:block;width:min(100%,1100px);max-height:75vh;background:#000;pointer-events:auto;position:relative;z-index:1}.video-playback-controls{display:flex;gap:12px;align-items:center;max-width:1100px;margin-top:12px}.video-playback-controls input{flex:1;min-width:60px;accent-color:var(--yellow)}.video-playback-controls output{white-space:nowrap;font-variant-numeric:tabular-nums}.video-playback-controls button{white-space:nowrap}@media(max-width:650px){.video-library-filters{flex-wrap:wrap}.video-playback-controls{flex-wrap:wrap}.video-playback-controls input{order:3;flex-basis:100%}}
.video-library-player{margin:auto;width:min(1150px,calc(100% - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--text);overflow:auto}.video-library-player::backdrop{background:#000b}.video-player-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.video-library-player video{max-height:65vh}.video-playback-controls{width:100%}
.video-library-table{table-layout:fixed}.video-library-table th,.video-library-table td{white-space:normal;overflow-wrap:anywhere}.video-library-table th:nth-child(1){width:12%}.video-library-table th:nth-child(2){width:10%}.video-library-table th:nth-child(3){width:15%}.video-library-table th:nth-child(4){width:25%}.video-library-table th:nth-child(5){width:7%}.video-library-table th:nth-child(6){width:10%}.video-library-table th:nth-child(7){width:10%}.demo-generate-toolbar{margin:0 0 4px}#demo-save-storyboard[data-dirty="1"]{box-shadow:0 0 0 3px #ffcc1640}
.demo-story-latest{min-height:52px!important;padding:11px 22px!important;background:var(--yellow)!important;color:#111!important;font-weight:800}#demo-story-folder{min-height:52px!important}.demo-story-path{all:unset;box-sizing:border-box;flex:1 1 100%;max-width:100%;cursor:pointer;color:var(--muted);text-decoration:underline;text-underline-offset:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.demo-story-path:hover{color:var(--yellow)}.video-library-history{margin:22px 0;border:1px solid var(--line);border-radius:12px;padding:0 14px}.video-library-history>summary{cursor:pointer;padding:15px 2px;font-weight:800}.video-library-history[open]>summary{border-bottom:1px solid var(--line);margin-bottom:10px}.video-sort{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:6px;width:100%;cursor:pointer;font-weight:800}.video-sort::after{content:'↕';opacity:.45}.video-sort.active[data-direction="asc"]::after{content:'↑';opacity:1;color:var(--yellow)}.video-sort.active[data-direction="desc"]::after{content:'↓';opacity:1;color:var(--yellow)}

#demo-video-style{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#demo-video-style legend{grid-column:1/-1}#demo-video-style label{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:14px;border:1px solid var(--line);border-radius:10px}#demo-video-style label:has(input:checked){border-color:var(--yellow);background:#ffcc1612}#demo-video-style small{grid-column:2;color:var(--muted);line-height:1.4}.video-library-filters{flex-wrap:wrap}.video-library-filters input{flex-basis:220px}.video-library-filters select{min-width:100px;flex:1}.video-library-filters button{flex:none}@media(max-width:650px){#demo-video-style{grid-template-columns:1fr}.video-library-filters select{width:100%;flex-basis:100%}}

@media(max-width:650px){.video-library-table{min-width:0;display:block}.video-library-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.video-library-table tbody{display:block}.video-library-table tbody tr{display:block;border:1px solid var(--line);border-radius:10px;margin:12px 0;padding:8px}.video-library-table td{display:grid;grid-template-columns:95px minmax(0,1fr);gap:5px 10px;padding:8px;border-bottom:0;min-width:0!important}.video-library-table td::before{content:attr(data-label);font-weight:bold;color:var(--muted)}.video-library-table td small{grid-column:2}.video-library-actions{display:flex!important;grid-template-columns:none!important;flex-wrap:wrap}.video-library-actions::before{width:95px}.video-library-actions>*{grid-column:auto!important}}

.demo-catalog{min-width:0}.demo-catalog h2{margin-bottom:4px}.demo-catalog-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:12px}.demo-catalog table{width:100%;min-width:1680px;border-collapse:collapse;table-layout:fixed}.demo-catalog th,.demo-catalog td{padding:8px;border-bottom:1px solid var(--line);border-inline-end:1px solid color-mix(in srgb,var(--line) 65%,transparent);vertical-align:top;text-align:start}.demo-catalog th{position:sticky;top:0;z-index:2;background:var(--card);font-size:12px}.demo-catalog th:nth-child(1){width:40px}.demo-catalog th:nth-child(2){width:105px}.demo-catalog th:nth-child(3){width:130px}.demo-catalog th:nth-child(n+4):nth-child(-n+7){width:118px}.demo-catalog th:nth-child(8){width:155px}.demo-catalog th:nth-child(9),.demo-catalog th:nth-child(10),.demo-catalog th:nth-child(11){width:86px}.demo-catalog th:nth-child(12){width:155px}.demo-catalog th:nth-child(13){width:120px}.demo-catalog input[type=number]{width:68px;min-height:36px;padding:5px}.demo-style-choice label{display:grid!important;grid-template-columns:20px 1fr;align-items:start!important;font-size:12px}.demo-style-choice span{line-height:1.3}.demo-style-choice:has(input:checked){background:#ffcc1615}.demo-future-row{opacity:.62}.demo-disabled-option{display:inline-block;padding:8px;color:var(--muted)}.demo-local-path{display:block;max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.demo-latest-date{display:block;min-height:30px;margin-bottom:5px;color:var(--muted);font-size:11px}.demo-round-lengths summary{cursor:pointer;color:var(--yellow);font-weight:700}.demo-round-lengths label{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:7px 0;font-size:12px}.demo-round-lengths input{width:62px!important}.demo-players .demo-count{display:none}#demo-editor-context{margin-inline-start:auto;color:var(--yellow)}#demo-complete-dialog{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:1000;width:min(480px,calc(100vw - 32px));max-width:480px;border:1px solid var(--yellow);border-radius:14px;background:var(--card);color:var(--text);padding:24px;box-sizing:border-box;box-shadow:0 20px 70px #000b}#demo-complete-dialog::backdrop{background:#000a}
#demo-library>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;font-weight:800;font-size:1.2rem;list-style-position:inside}#demo-library>summary::marker{color:var(--yellow)}#demo-library[open]>summary{padding-bottom:12px;border-bottom:1px solid var(--line)}#demo-library-status{font-size:13px;font-weight:400;color:var(--muted)}
#demo-progress-panel[data-phase=encoding],#demo-progress-panel[data-phase=saving]{box-shadow:0 0 0 2px #ffcc1630,0 8px 28px #0006}#demo-progress-panel[data-phase=encoding] #demo-progress-stage,#demo-progress-panel[data-phase=saving] #demo-progress-stage{color:var(--yellow);animation:demo-finalizing 1.2s ease-in-out infinite alternate}@keyframes demo-finalizing{from{opacity:.68}to{opacity:1}}
.demo-catalog th,.demo-catalog td{white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){.demo-catalog table{min-width:1680px}.demo-local-path{max-width:118px}#demo-editor-context{width:100%;margin-inline-start:0}}

/* Four focused Studio workspaces keep the large planning tables readable. */
body>header{min-height:58px;padding:7px 18px}
.demo-brand{margin-inline-start:0}.demo-brand img{width:92px;height:39px}.demo-brand span{font-size:1rem;font-weight:850}
.demo-admin-link{margin-inline-start:auto;color:var(--yellow);font-weight:800;text-decoration:none}
.demo-processing-note{margin:8px 0 10px}
.demo-studio-tabs{display:grid!important;position:sticky;top:0;z-index:20;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 14px;padding:6px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--card) 96%,transparent);box-shadow:0 5px 18px #0003;backdrop-filter:blur(8px)}
.demo-studio-panel.hidden{display:none!important}
[data-demo-tab-panel="generate"],[data-demo-tab-panel="storyboard"]{display:grid;gap:18px}
[data-demo-tab-panel="saved"],[data-demo-tab-panel="gallery"]{margin-top:0}
#demo-form{padding:16px}
#demo-stop[hidden]{display:none!important}
#demo-stop{min-width:110px;background:#8b2635;color:#fff}
.demo-generate-toolbar{position:sticky;top:62px;z-index:18;padding:7px;background:color-mix(in srgb,var(--card) 96%,transparent);border:1px solid var(--line);border-radius:10px;box-shadow:0 5px 16px #0002}
#demo-start{flex:1;min-width:0}
.demo-plan-filters{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:10px;margin:12px 0}
.demo-plan-filters select{width:100%;min-height:42px}
.demo-catalog-scroll{max-height:calc(100vh - 190px);overflow:auto}
.demo-catalog thead th{top:0;box-shadow:0 1px 0 var(--line)}
.demo-catalog table{min-width:1500px}
.demo-catalog th:nth-child(12){width:118px}.demo-catalog th:nth-child(13){width:90px}.demo-catalog th:nth-child(14){width:125px}
.demo-latest-date{min-height:0;margin:0;font-variant-numeric:tabular-nums}
.demo-script-editor>h2,.demo-script-editor>p,.demo-script-editor>.muted{display:none}
.demo-preset-toolbar{align-items:end}.demo-preset-toolbar label{flex:0 1 360px;width:360px;min-width:260px;max-width:360px}.demo-preset-toolbar select{width:100%}
#demo-preset-duration{flex-basis:100%;padding:0 2px}
#demo-story-latest-info{flex-basis:100%;margin:0;padding:0 2px}
#demo-editor-context:empty{display:none}
.demo-story-table-actions{position:sticky;top:62px;z-index:8;margin:0;padding:7px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:var(--card)}
.demo-story-save-actions{position:sticky;bottom:calc(var(--demo-progress-height,0px) + 8px);z-index:30;justify-content:flex-end;margin-top:10px;padding:10px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--card) 97%,transparent);box-shadow:0 -6px 22px #0007;backdrop-filter:blur(8px)}
.demo-advanced:has(#demo-advanced-fields:empty){display:none}
.scene-table-scroll{border-radius:0 0 10px 10px}
.scene-table-scroll table{min-width:1180px}
.demo-gallery-frame{display:block;width:100%;height:calc(100vh - 155px);min-height:760px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
#demo-library{margin:0}
@media(min-width:2200px){.demo-catalog table,.scene-table-scroll table{min-width:0}.demo-catalog-scroll,.scene-table-scroll{overflow-x:hidden}}
@media(max-width:700px){.demo-studio-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.demo-plan-filters{grid-template-columns:1fr}.demo-preset-toolbar label{width:100%;max-width:none}.demo-gallery-frame{min-height:620px}}
.demo-studio-tabs button{width:100%;min-height:44px;border:0;border-bottom:3px solid transparent;border-radius:7px;background:transparent;color:var(--muted);box-shadow:none;font-weight:700}.demo-studio-tabs button:hover{background:#ffffff08;color:var(--text)}.demo-studio-tabs button.active{border-bottom-color:var(--yellow);background:#ffcc1610;color:var(--yellow)}
.demo-catalog-scroll{max-height:none!important;overflow:visible!important}.demo-catalog table{min-width:0!important;table-layout:auto}.demo-catalog th,.demo-catalog td{padding:7px 6px}.demo-catalog th:nth-child(1){width:38px}.demo-catalog th:nth-child(2){width:12%}.demo-catalog th:nth-child(3){width:22%}.demo-catalog th:nth-child(n+4):nth-child(-n+7){width:8%}.demo-catalog th:nth-child(8){width:10%}.demo-catalog th:nth-child(9),.demo-catalog th:nth-child(10){width:9%}.demo-sort{display:flex;width:100%;align-items:center;justify-content:space-between;padding:0;border:0;background:transparent;color:inherit;text-align:start}.demo-sort[data-direction="up"]::after{content:'▲';color:var(--yellow)}.demo-sort[data-direction="down"]::after{content:'▼';color:var(--yellow)}
.demo-preview{display:none}.demo-preview.demo-active{display:block}.demo-players{order:-1}.demo-players legend{display:none}.demo-latest-date{min-height:0;margin:0}.demo-local-path{max-width:150px}

.demo-scene-interactions{min-width:240px;padding:8px;display:grid;gap:8px}.demo-action-line{display:flex;gap:4px}.demo-action-line select{min-width:0;flex:1}.demo-action-line button{padding:4px 8px}.demo-scene-interactions small{white-space:normal}

/* Recording belongs to the local service; every tab shares one compact footer. */
body>.demo-preview{position:fixed!important;left:-10000px!important;top:0!important;width:1920px!important;height:1080px!important;max-height:none!important;opacity:0;pointer-events:none;display:block!important}
body>#demo-progress-panel{position:fixed;inset:auto 12px 10px;z-index:1000;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;padding:10px 14px;max-height:32vh;overflow:auto;box-shadow:0 -6px 24px #0008}
body>#demo-progress-panel[hidden]{display:none!important}#demo-progress-panel progress{grid-column:1/-1;height:8px}#demo-progress-stage,#demo-progress-detail,#demo-status{margin:0;grid-column:1}#demo-progress-stage{font-size:14px}#demo-progress-detail,#demo-status{font-size:12px}.demo-job-controls{grid-column:2;grid-row:2/5;display:flex;align-items:center;gap:8px}.demo-job-controls button{padding:8px 12px;font-size:13px}#demo-progress-panel [hidden]{display:none!important}
@media(max-width:600px){body>#demo-progress-panel{inset:auto 4px 4px;gap:4px 8px;max-height:36vh}.demo-job-controls{flex-wrap:wrap;max-width:100px}}

#demo-script-rows small{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;max-width:100%}#demo-script-rows td{vertical-align:top}#demo-script-rows td label>div{min-width:0}

/* Keep controls inside their own cells at every desktop width. */
.scene-table-scroll table{min-width:1440px;table-layout:fixed}.scene-table-scroll th:nth-child(1){width:110px}.scene-table-scroll th:nth-child(2){width:210px}.scene-table-scroll th:nth-child(3){width:280px}.scene-table-scroll th:nth-child(4){width:180px}.scene-table-scroll th:nth-child(5){width:95px}.scene-table-scroll th:nth-child(6){width:320px}.scene-table-scroll th:nth-child(7){width:100px}
.scene-table-scroll td,.scene-table-scroll label,.scene-stack,.scene-options,.scene-action-cue{min-width:0;overflow-wrap:anywhere}.scene-stack{display:grid;gap:8px}.scene-table-scroll td label>div{display:grid;gap:8px}.scene-table-scroll select,.scene-table-scroll input,.scene-table-scroll textarea{min-width:0!important;width:100%;max-width:100%;box-sizing:border-box}.demo-scene-interactions{min-width:0;margin:0}.demo-action-line{min-width:0}.demo-action-line select{width:0;flex:1}.scene-action-cue{display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:8px;margin-bottom:8px}.scene-action-cue .scene-mobile-label,.scene-stack .scene-mobile-label{display:block;font-size:11px;color:var(--muted)}.scene-action-cue textarea{min-height:54px}.scene-start-settings{min-width:0}.scene-start-settings summary{cursor:pointer;color:var(--yellow)}

.scene-table-scroll th:nth-child(1){width:44px}.scene-table-scroll th:nth-child(2){width:150px}.scene-table-scroll th:nth-child(3){width:220px}.scene-table-scroll th:nth-child(4){width:250px}.scene-table-scroll th:nth-child(5),.scene-table-scroll th:nth-child(6){width:110px}.scene-table-scroll th:nth-child(7){width:360px}.scene-table-scroll th:nth-child(8){width:100px}.scene-step-number{font-weight:700;color:var(--yellow)}#demo-editor-context{white-space:normal;max-width:36em}

.demo-story-voice{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 0}.demo-story-voice label{max-width:100%;min-width:260px}.demo-story-voice .scene-mobile-label{display:block}.demo-story-voice small{max-width:48em;color:var(--muted)}.scene-chapter{border-top:1px solid var(--line);padding-top:8px}.scene-chapter>label:first-child{display:flex;align-items:center;gap:8px}.scene-chapter input[type=checkbox]{width:auto!important;flex:none}.scene-chapter .scene-mobile-label{display:block}.scene-chapter [hidden]{display:none!important}
.demo-story-settings{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:12px;margin:14px 0;padding:16px;border:1px solid var(--line);border-radius:12px}.demo-story-settings legend{font-weight:800}.demo-story-settings label{display:grid;gap:6px}.demo-story-settings small{grid-column:1/-1;color:var(--muted)}@media(max-width:850px){.demo-story-settings{grid-template-columns:repeat(2,minmax(0,1fr))}}
.demo-save-notice{position:fixed;top:76px;inset-inline:20%;z-index:10000;background:var(--card);color:var(--yellow);border:2px solid var(--yellow);border-radius:12px;padding:16px;text-align:center;box-shadow:0 6px 24px #0008;font-weight:700}.demo-save-notice[hidden]{display:none}.demo-refresh{margin-inline-start:16px;padding:8px 16px}.demo-refresh-dialog{max-width:min(540px,90vw);background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:24px}.demo-refresh-dialog::backdrop{background:#0009}.demo-refresh-dialog .toolbar{flex-wrap:wrap}.demo-refresh-dialog button{min-height:44px}@media(max-width:600px){.demo-save-notice{inset-inline:12px}header{flex-wrap:wrap}}

.demo-story-voice label{min-width:0;flex:0 1 360px}.demo-story-voice select{width:100%;max-width:100%;min-width:0;box-sizing:border-box}.demo-story-voice small{min-width:0;overflow-wrap:anywhere}

.video-library-table th:nth-child(8){width:11%}.video-library-table td.video-library-actions{display:table-cell}.video-library-table td:nth-child(5),.video-library-table td:nth-child(6){font-variant-numeric:tabular-nums;white-space:nowrap}

/* Sticky headers use the page scroll, with no nested vertical scroll trap. */
@media(min-width:1000px){.scene-table-scroll,.demo-catalog-scroll{overflow:visible!important}#demo-script-table-wrap,#demo-catalog{overflow:visible!important}.scene-table-scroll thead th,.demo-catalog-scroll thead th{position:sticky;top:var(--demo-table-top,64px);z-index:12;background:#123627}}
.scene-table-scroll thead th:first-child{width:68px}.scene-play{display:block;width:100%;box-sizing:border-box;margin:8px 0;padding:6px 3px;white-space:normal;font-size:12px;overflow-wrap:anywhere}.scene-stack input[hidden]{display:none!important}
.demo-loading{position:fixed;inset:0;z-index:20000;display:grid;place-content:center;justify-items:center;gap:14px;background:#00170dcc;color:var(--yellow);backdrop-filter:blur(3px)}.demo-loading[hidden]{display:none!important}.demo-loading-spinner{width:44px;height:44px;border:5px solid #ffffff24;border-top-color:var(--yellow);border-radius:50%;animation:demo-spin .8s linear infinite}@keyframes demo-spin{to{transform:rotate(360deg)}}
#demo-editor-context{display:inline-flex;align-items:center;max-width:100%;padding:8px 12px;border:1px solid var(--yellow);border-radius:999px;background:#ffcc1612;color:var(--yellow);white-space:normal}#demo-editor-context[hidden]{display:none!important}.scene-link-status{display:block;margin:7px 0 4px;padding:4px 6px;border:1px solid var(--line);border-radius:6px;font-size:10px;font-weight:800;line-height:1.25}.scene-link-status[data-mode="shared"]{border-color:#4da875;background:#1e6d4430;color:#9de0b8}.scene-link-status[data-mode="independent"]{border-color:#d49a42;background:#7a4c1d30;color:#ffd38a}.scene-link-control{padding:8px;border:1px solid var(--line);border-radius:8px;background:#ffffff05}.scene-link-control>div{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:8px}.scene-link-control input{width:auto!important}
