:root{color-scheme:dark;--bg:#08090d;--panel:#10141c;--panel2:#141923;--line:#252c38;--line2:#343e51;--text:#f2f4fb;--soft:#a3afc2;--dim:#747e91;--accent:#b9c6ff;--success:#88dbb4;--danger:#ff9aa8}*{box-sizing:border-box}html{scrollbar-gutter:stable}body{margin:0;background:radial-gradient(850px 410px at 45% -170px,#202d46 0,transparent 88%),var(--bg);color:var(--text);font:13px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}button,select,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed;filter:grayscale(.24)}a{color:inherit}p{margin:0}.hidden{display:none!important}.app-shell{max-width:1700px;margin:auto;padding:0 clamp(18px,2vw,34px)}.topbar{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #222833}.brand{display:flex;align-items:center;gap:11px}.brand img{object-fit:contain;flex:none}.brand b{display:block;font-size:17px;letter-spacing:.135em;font-weight:950}.brand b span{font-size:10px;letter-spacing:.17em;color:var(--accent);vertical-align:middle;margin-left:5px}.brand small{display:block;color:var(--dim);font-weight:750;letter-spacing:.16em;font-size:8px;margin-top:1px}.topnav{display:flex;align-items:center;gap:15px;color:var(--dim);font-size:10px;font-weight:800;letter-spacing:.075em}.top-tag{display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #2a3a38;border-radius:999px;color:#aed9c3;background:#10201d}.online{width:6px;height:6px;border-radius:50%;background:var(--success);box-shadow:0 0 8px #70d5aa70}.page-title{display:flex;justify-content:space-between;align-items:end;gap:16px;padding:27px 0 24px}.eyebrow{font-size:10px;font-weight:850;letter-spacing:.12em;color:var(--accent)}.separator{color:#5a667e;padding:0 6px}h1{font-size:clamp(26px,2.2vw,33px);letter-spacing:-.042em;font-weight:900;line-height:1.18;margin:5px 0 5px}.page-title p{font-size:12px;color:var(--soft)}.workflow{display:flex;gap:5px;flex-wrap:wrap}.workflow span{font-size:10px;white-space:nowrap;color:#778397;border:1px solid transparent;padding:7px 9px;border-radius:9px;font-weight:770}.workflow em{font-style:normal;color:#788297;margin-right:4px}.workflow .current{border-color:#394763;background:#182134;color:#e4e9ff}.workflow .current em{color:#b6c4ff}.studio-layout{display:grid;grid-template-columns:minmax(260px,298px) minmax(400px,1fr) minmax(270px,316px);gap:17px;align-items:start;min-width:0}.left-pane,.center-pane,.right-pane{min-width:0;display:grid;gap:15px}.card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:linear-gradient(152deg,#131821,#0e1219 70%);padding:19px;box-shadow:0 12px 38px #00000010}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px;min-width:0}.step{font-weight:950;font-size:10px;letter-spacing:.115em;color:#c7d0f5;white-space:nowrap}.step span{color:#747f93}.head-trail{font-size:9px;color:#657184;font-weight:850;letter-spacing:.13em}.card h2{font-size:17px;line-height:1.27;font-weight:850;letter-spacing:-.025em;margin:0 0 8px}.hint{color:#9ba6b7;font-size:11.5px;line-height:1.55;margin-bottom:17px}.card label:not(.file-label):not(.check-row){display:block;color:#a8b3c5;font-weight:800;font-size:11px;margin:13px 0 7px}.card input[type=number],select,textarea{width:100%;background:#0d1119;color:#eff2fc;border:1px solid #313a4b;border-radius:10px;min-width:0;min-height:40px;outline:none;padding:0 11px;transition:border-color .15s,box-shadow .15s}select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2396a4b9' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:calc(100% - 12px) center;padding-right:28px}option{background:#151b26}input:focus,select:focus,textarea:focus{border-color:#899ce7;box-shadow:0 0 0 3px #8199e31c}.inline-controls{display:grid;grid-template-columns:minmax(0,1fr) 82px;gap:8px}.btn{border-radius:10px;min-height:40px;display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:9px 14px;white-space:nowrap;border:1px solid transparent;font-weight:820;font-size:11px;transition:background .15s,border-color .15s,transform .11s}.btn:active:not(:disabled){transform:translateY(1px)}.btn-primary{background:#c3ceff;color:#0d1322}.btn-primary:hover:not(:disabled){background:#dbe1ff}.btn-subtle{background:#1b2230;color:#d3dcf0;border-color:#303d51}.btn-subtle:hover:not(:disabled){background:#242e41}.btn-wide{width:100%}.file-row{display:flex;justify-content:space-between;align-items:center;gap:5px;margin-top:14px}.file-label{color:#c6d3fb!important;cursor:pointer;font-size:11px;font-weight:800}.file-label span{margin-left:3px}.secondary-hint{color:#778395;font-size:10px}.alert{margin-top:15px;border-radius:9px;padding:11px 12px;font-size:11px;line-height:1.5;overflow-wrap:anywhere}.alert.info{background:#172034;border:1px solid #303d5b;color:#aebde4}.alert.good{background:#10231e;border:1px solid #2b5a4c;color:#a8e3c8}.alert.error{background:#2a181e;border:1px solid #613741;color:#ffb5c0}.format-select{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.format{border:1px solid #30394a;background:#0d121b;min-width:0;padding:9px 4px;border-radius:10px;color:#b8c2d3;min-height:61px}.format b{display:block;font-size:14px;letter-spacing:-.02em}.format small{display:block;color:#7c879a;font-size:9px;white-space:nowrap;margin-top:1px}.format.selected{border-color:#94a9f4;background:#1e2840;color:#e4e9ff;box-shadow:inset 0 0 0 1px #7b8ed740}.format.selected small{color:#b5c3e8}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px;min-width:0}.option-note{font-size:10px;color:#7f8b9f;margin-top:9px;line-height:1.5}.small-card{padding:16px 18px}.idea{display:flex;gap:9px;color:#9da8bb;font-size:11px}.idea-mark{color:var(--accent);font-size:18px;line-height:1}.preview-card{padding:0;overflow:hidden}.preview-top{padding:17px 20px 13px;display:flex;justify-content:space-between;gap:10px;align-items:center}.preview-top .step{margin-bottom:3px}.muted-small{color:#758295;font-size:10px}.resolution{border:1px solid #293342;border-radius:7px;color:#a8b3c7;padding:6px 8px;font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums}.preview-stage{min-height:625px;background:radial-gradient(350px 350px at center,#1b2540 0,transparent 80%),#090d14;display:grid;place-items:center;border-top:1px solid #252d39;border-bottom:1px solid #252d39;padding:22px 20px;position:relative}.preview-surface{position:relative;height:min(585px,60vh);width:100%;display:grid;place-items:center;min-height:430px;min-width:0}.player-canvas,.exported-video{height:100%;width:100%;max-width:100%;object-fit:contain;display:block;filter:drop-shadow(0 15px 26px #0009)}.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:8px;color:var(--text);background:radial-gradient(280px 300px at center,#131d2d 0,#0b1018 82%)}.empty-icon{width:64px;height:64px;display:grid;place-items:center;border-radius:20px;border:1px solid #3c4c66;background:#1d2840;color:#bac6f4;font-size:29px;margin-bottom:10px}.empty-state b{font-size:15px}.empty-state p{max-width:240px;color:#8694ad;font-size:11px;line-height:1.6}.preview-foot{padding:14px 20px 17px}.player-row{display:flex;align-items:center;gap:8px;margin-bottom:11px}.btn-icon{border:1px solid #2e394c;color:#c0c9dd;background:#19212e;height:34px;width:34px;border-radius:10px;flex:none;font-size:18px;display:grid;place-items:center}.btn-icon:hover:not(:disabled){background:#273248}.btn-play{min-height:34px;background:#c3ceff;color:#101726;min-width:95px}.btn-play:hover:not(:disabled){background:#e1e5ff}.timecode{margin-left:auto;color:#dde4f3;white-space:nowrap;font-size:11px;font-variant-numeric:tabular-nums}.timecode i{font-style:normal;color:#647188;margin:0 3px}.full-toggle{margin-left:2px}input[type=range]{width:100%;height:7px;display:block;accent-color:#afbdff;cursor:pointer;margin:0}input[type=range]:disabled{cursor:not-allowed}.timeline-labels{display:flex;justify-content:space-between;color:#737f93;font-size:9px;letter-spacing:.1em;font-weight:850;margin-top:9px}.preview-notice{margin-top:17px;padding:9px 11px;border:1px solid #2e3a51;background:#131d2d;color:#a9b9d8;border-radius:9px;font-size:10.5px}.encoded-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:13px;color:var(--success);font-size:11px}.link-btn{border:none;background:transparent;color:#bfcbff;text-decoration:underline;cursor:pointer;font-size:11px}.placeholder-text{color:#8190a7;padding:8px 0 4px;font-size:11px;line-height:1.6}.state-pill{font-size:9px;border:1px solid #354055;color:#8c9cb4;padding:5px 7px;border-radius:999px;white-space:nowrap;font-weight:800}.state-pill.good{color:var(--success);border-color:#34664e;background:#12231e}.stat-list{border:1px solid #2c3545;border-radius:10px;background:#101722;padding:0 11px}.stat-list>div{display:flex;justify-content:space-between;align-items:center;gap:9px;min-height:34px;border-bottom:1px solid #283040}.stat-list>div:last-child{border-bottom:0}.stat-list span{font-size:10px;color:#9ca8bd}.stat-list strong{font-size:10px;text-align:right;color:#e2e8fc;white-space:nowrap}.mini-caption{font-size:9px;color:#7f8da3;letter-spacing:.09em;font-weight:850;margin:16px 0 9px}.target-row{display:flex;gap:6px;min-width:0}.target-row>div{display:flex;flex-direction:column;flex:1;min-width:0;gap:4px}.target-row span{color:#bfcbff;font-size:11px;font-weight:950}.target-row select{font-size:11px;padding:0 20px 0 6px;background-position:calc(100% - 5px) center;min-height:36px}.target-row+.btn{margin-top:10px}.answer-box{border:1px solid #384962;background:#171f2f;border-radius:10px;padding:11px 12px;margin-top:15px;display:grid;gap:3px}.answer-box span{color:#9aabc9;font-size:9px;font-weight:820;letter-spacing:.025em}.answer-box strong{font-size:24px;letter-spacing:.065em;font-variant-numeric:tabular-nums}.text-link{display:inline-block;margin-top:14px;text-decoration:none;color:#c4d0ff;font-size:11px;font-weight:800}.text-link:hover{text-decoration:underline}.export-card .hint{margin-bottom:12px}.export-button{min-height:46px;font-size:12px;justify-content:space-between;padding-left:16px;padding-right:15px}.status-minor{font-size:10.5px;color:#9eacc3;margin-top:10px;line-height:1.5;overflow-wrap:anywhere}.minispec{border-top:1px solid #252f3d;margin-top:14px;padding-top:12px;color:#768499;font-size:9.5px}.check-row{display:flex;align-items:start;gap:8px;font-size:10px;color:#a6b5cd;line-height:1.4;margin:10px 0 14px}.check-row input{margin-top:2px;accent-color:#b8c5ff}.progress-wrap{position:relative;margin-top:13px;padding-bottom:12px;font-size:10px;color:#b5c2d9}.progress-wrap .bar{height:5px;background:#242d3d;border-radius:100px;overflow:hidden;margin-bottom:8px}.progress-wrap .bar div{background:#b8c5ff;height:100%;width:0%;transition:width .12s}.progress-wrap b{float:right}.btn-download{background:#182e27;color:#bcf2d6;border:1px solid #315d49;text-decoration:none;margin-top:11px}.btn-download:hover{background:#203d31}.export-card #reviewMp4{margin-top:8px}.publish-card textarea{resize:vertical;min-height:114px;padding:11px;line-height:1.48;color:#c9d4e8;overflow-wrap:anywhere}.publish-card .btn{margin-top:10px}.trustnote{color:#7d8b9e;font-size:10px;margin-top:13px;line-height:1.6}.footer{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:24px 0 26px;color:#6c798b;font-size:10px}.preview-stage:fullscreen{padding:20px;background:#08090d}.preview-stage:fullscreen .preview-surface{height:100%;max-height:none;min-height:0}.preview-stage:fullscreen .player-canvas,.preview-stage:fullscreen video{max-height:95vh}@media(min-width:1450px){.preview-stage{min-height:700px}.preview-surface{height:650px}}@media(max-width:1260px){.studio-layout{grid-template-columns:minmax(255px,295px) minmax(0,1fr)}.center-pane{grid-column:2;grid-row:1/3}.right-pane{grid-column:1;grid-row:2}.preview-stage{min-height:610px}}@media(max-width:830px){.studio-layout{display:flex;flex-direction:column}.center-pane{order:0;width:100%}.left-pane{order:1;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.right-pane{order:2;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.left-pane .small-card{grid-column:1/-1}.page-title{align-items:start;flex-direction:column}.workflow{width:100%}.preview-surface{height:540px}.preview-stage{min-height:565px}}@media(max-width:560px){.app-shell{padding:0 13px}.topbar{min-height:65px}.brand b{font-size:14px}.brand b span{font-size:8px}.brand img{width:36px;height:36px}.version{display:none}.page-title{padding:19px 0 15px}.workflow span{padding:5px;font-size:9px}.left-pane,.right-pane{display:flex;flex-direction:column}.left-pane>.card,.right-pane>.card{width:100%}.preview-top{padding:14px}.preview-stage{padding:12px 8px;min-height:505px}.preview-surface{min-height:0;height:470px}.preview-foot{padding:12px 14px}.timeline-labels{font-size:8px}.footer{line-height:1.55}.card{padding:16px}.timecode{font-size:10px}.preview-top .muted-small{font-size:9px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* V2.1: loading, fault-isolation and visible import feedback */
.utility-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:12px}
.utility-actions .btn{white-space:normal;min-height:38px;font-size:10px;line-height:1.25;padding:8px 9px}
.diagnostic-details{font-size:10px;line-height:1.55;color:#9eacc4;margin-top:10px;overflow-wrap:anywhere}
.stage-message{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:12px;padding:22px;background:radial-gradient(280px 320px at center,#151f31 0,#0b1018 85%);color:#e9edff}
.stage-message>b{font-size:15px;line-height:1.4}
.stage-message>p{font-size:11px;line-height:1.6;color:#a9b8d1;max-width:330px;overflow-wrap:anywhere}
.stage-message .btn{margin-top:4px}
.loading-spinner{width:40px;height:40px;border-radius:50%;border:3px solid #394762;border-top-color:#bdcaff;animation:studio-spin .85s linear infinite}
@keyframes studio-spin{to{transform:rotate(360deg)}}
.error-icon{height:44px;width:44px;border-radius:50%;border:1px solid #85535a;display:grid;place-items:center;background:#371e26;color:#ffb0b9;font-size:27px;font-weight:900}
.stage-error{background:radial-gradient(320px 380px at center,#221924 0,#0b1018 85%)}
@media(max-width:350px){.utility-actions{grid-template-columns:1fr}}
/* V2 bugfix: intrinsic canvas aspect ratio must never escape its player surface. */
.preview-surface>.player-canvas,.preview-surface>.exported-video{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain}

/* V2.2: no dead-end loading, clear source actions */
.source-tip{margin:10px 0 0;color:#899ab6;font-size:10px;line-height:1.55}
#cancelLoad{margin-top:9px;border-color:#6b4952;color:#ffc6cd;background:#281a22}
#cancelLoad:not(.hidden):hover{background:#3b232e}
#load.busy{position:relative;background:#a7b4ee}
#load.busy::after{content:"";width:12px;height:12px;border:2px solid #141b2b;border-left-color:transparent;border-radius:50%;animation:studio-spin .65s linear infinite}

.diagnostic-details{white-space:pre-line}
