*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:#1b2b43;font-family:"Microsoft YaHei","Segoe UI",sans-serif;font-size:14px;line-height:1.6}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#fff;border:1px solid #cbd7e8;color:#315174;border-radius:8px;padding:9px 14px;transition:background .15s,border .15s}button:hover{background:#edf4ff;border-color:#679cec}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #97c0ff;outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.48}input,select,textarea{width:100%;border:1px solid #ccd7e7;border-radius:7px;background:#fff;padding:9px 11px;color:#20334e;min-height:42px}input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:#2463d7}input[type=color]{width:45px;min-width:45px;padding:4px;cursor:pointer}textarea{resize:vertical;min-height:75px}h1,h2,p{margin-top:0}h1{font-size:25px;line-height:1.4;margin-bottom:0;letter-spacing:.5px}h2{font-size:16px;margin-bottom:14px}small{font-size:12px}label{display:block}.topbar{height:76px;border-bottom:1px solid #dae3f0;background:#fff;display:flex;align-items:center;padding:0 30px;gap:22px;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px;margin-right:auto}.brandmark{width:38px;height:38px;background:#2463d7;color:#fff;display:grid;place-items:center;border-radius:12px}.brand strong{display:block;font-size:18px}.brand small{display:block;color:#8290a3;letter-spacing:2px}.shell{display:grid;grid-template-columns:170px minmax(0,1fr);max-width:1600px;margin:auto}.steps{padding:32px 14px;display:flex;flex-direction:column;gap:12px;position:sticky;top:76px;height:calc(100vh - 76px)}.steps button{display:flex;align-items:center;gap:10px;border-color:transparent;background:transparent;text-align:left;padding:12px}.steps b{font-size:13px;color:#7a91b1}.steps .selected{background:#e5efff;color:#1d5cc7;border-color:#c7dbfc}.steps .selected b{color:#2463d7}.local-note{font-size:11px;color:#8593a8;margin-top:auto;padding:15px}.page{padding:30px;max-width:1330px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.eyebrow{font-size:11px;letter-spacing:2px;color:#718bad;margin-bottom:4px}.workspace{display:grid;grid-template-columns:minmax(0,1.23fr) minmax(290px,.77fr);gap:22px;align-items:start}.editor-column,.preview-column{display:flex;flex-direction:column;gap:18px}.card{background:#fff;border:1px solid #dfe7f1;border-radius:12px;padding:22px;box-shadow:0 3px 12px #19355d04}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.section-title h2{margin:0;display:flex;align-items:center;gap:9px}.section-title h2>span{width:23px;height:23px;border-radius:6px;background:#edf4ff;display:inline-grid;place-items:center;font-size:12px;color:#2463d7}.required{color:#d85353;font-size:12px}.button-row{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:12px 0}.primary{background:#2463d7;border-color:#2463d7;color:#fff}.primary:hover{background:#194fac;border-color:#194fac}.quiet{border-color:transparent;background:transparent}.large{padding:12px 26px;font-weight:600;margin-left:15px}.badge{font-size:11px;border-radius:20px;background:#e9f5ef;color:#2a7d56;padding:5px 10px;white-space:nowrap}.subtle{background:#f0f4fa;color:#788aa3}.success{background:#e4f4eb;color:#278353}.field-label{font-size:12px;color:#657b98;margin:14px 0 5px}.muted{font-size:12px;color:#7f8ea4;line-height:1.7;margin:9px 0 0}.notice{font-size:12px;padding:11px 13px;background:#fff6e5;border:1px solid #f4dfb2;border-radius:7px;color:#926b30;margin:12px 0}.duration-options{display:flex;gap:8px}.duration-options button{flex:1;padding:9px 7px}.duration-options button.selected{background:#edf4ff;color:#2463d7;border-color:#598ce0;font-weight:600}.inline-fields{display:flex;align-items:flex-end;gap:12px;margin-top:15px}.inline-fields label{font-size:12px;flex:1;color:#789}.inline-fields select{margin-top:4px}.spec{white-space:nowrap;color:#768ca8;font-size:12px;padding:10px 0}.text-input-row{display:flex;gap:8px;align-items:center}.text-input-row>input:first-child{flex:1;min-width:80px}.text-input-row button{white-space:nowrap}.setting-row{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:16px 0;border-bottom:1px solid #eef2f7}.setting-row:last-child{border-bottom:0;padding-bottom:0}.setting-row small{display:block;color:#8694a7;margin-top:3px}.toggle{display:flex;align-items:center;gap:9px}.small{font-size:12px;color:#6e819c;margin-top:16px}.preview-card{padding:18px}.preview-stage{background:#122139;border-radius:8px;min-height:330px;height:440px;overflow:hidden;display:flex;align-items:center;justify-content:center}.preview-stage video,.preview-stage img{width:100%;height:100%;object-fit:contain}.empty-state{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:200px;color:#8fa1bb;text-align:center}.empty-state>span{font-size:35px;color:#527095;margin-bottom:15px}.empty-state p{margin:8px}.summary-list{font-size:13px;margin:16px 0}.summary-list>div{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #f1f4f8;gap:15px}.summary-list strong{font-weight:500;color:#385985}.asset-strip{display:flex;overflow:auto;gap:8px;margin-top:12px}.asset-chip{min-width:100px;width:100px;padding:6px;font-size:11px;text-align:left}.asset-chip img{width:86px;height:55px;object-fit:cover;border-radius:4px}.asset-chip span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.asset-chip.selected{border-color:#2463d7;background:#edf4ff}.editor-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;position:sticky;bottom:0;background:#f4f7fbef;padding:20px 0 15px;margin-top:10px;z-index:10}.editor-footer>div{display:flex;align-items:center}.editor-footer span{color:#8797ae;font-size:12px}.mode{display:flex;gap:0;background:#edf1f7;border-radius:8px;padding:4px;font-size:12px;white-space:nowrap}.mode span{padding:7px 12px;color:#8b9bb3}.mode .active{background:#fff;color:#2463d7;border-radius:5px;box-shadow:0 1px 4px #24435e10}.login-card{max-width:430px;margin:50px auto}.login-card label{margin-bottom:20px;color:#607893}.login-card input{margin-top:8px}.result-layout{display:grid;grid-template-columns:minmax(290px,1fr) minmax(260px,.75fr);gap:24px;margin-bottom:24px}.result-layout video{width:100%;max-height:65vh;background:#122139;border-radius:6px;display:block}.result-layout .button-row button{flex:1}.job-dock{position:fixed;bottom:20px;right:24px;width:390px;padding:18px 20px;border:1px solid #bdd2ee;background:#fff;border-radius:12px;box-shadow:0 10px 40px #234b7c25;z-index:80}.job-dock>div{display:flex;align-items:center;gap:8px}.job-dock>div:first-child{justify-content:space-between}.job-dock>div:first-child span{font-size:11px;color:#8192aa}.job-dock>div:nth-of-type(2)>span{margin-right:auto;color:#2463d7}.job-dock button{font-size:12px;padding:5px 9px}.job-dock progress{width:100%;height:9px;accent-color:#2463d7;margin:12px 0}.error-text{color:#b63c45;font-size:12px;max-height:130px;overflow:auto;white-space:pre-wrap;word-break:break-word;margin:12px 0 0}#toast{position:fixed;top:85px;left:50%;transform:translateX(-50%);background:#223a5e;color:#fff;max-width:85vw;padding:12px 22px;border-radius:8px;z-index:200;box-shadow:0 4px 20px #15315333;font-size:13px}dialog{border:1px solid #d5e1ef;border-radius:12px;color:#233c5c;padding:0;box-shadow:0 20px 80px #11294833}dialog::backdrop{background:#172b4660}.drawer{width:min(980px,95vw);max-height:92vh}.drawer>header,.capture-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #e2eaf4}.drawer header h2,.capture-dialog header h2{font-size:19px;margin:0}.icon-button{font-size:24px;line-height:1;padding:7px 12px;border-color:transparent}.drawer #drawerBody{padding:20px 24px;max-height:calc(92vh - 165px);overflow:auto}.drawer>footer{padding:14px 24px;display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #e2eaf4}.field-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end}.field-grid label{font-size:11px;color:#7187a5}.field-grid input,.field-grid select{margin-top:4px}.config-row{border:1px solid #e0e8f2;padding:14px;border-radius:8px;margin:12px 0;background:#fcfdff}.config-row .row-title{display:flex;align-items:center;justify-content:space-between;font-weight:600;margin-bottom:10px}.config-row .row-title button{font-size:11px;padding:3px 8px;color:#a46a71}.config-row>label{font-size:12px;margin:9px 0 4px;color:#6f829f}.config-row audio{width:100%;height:36px;margin-top:10px}.wide{grid-column:span 2}.preset-row{display:flex;gap:8px;align-items:center;margin:12px 0;flex-wrap:wrap}.preset-row select{flex:1;min-width:150px}.preset-row input{width:180px}.two-panels{display:grid;grid-template-columns:1fr 220px;gap:20px}.position-preview{position:relative;background:#172d4b;aspect-ratio:9/16;overflow:hidden;border-radius:8px}.position-preview img{position:absolute;width:100%;height:100%;object-fit:contain;opacity:.7}.preview-word{position:absolute;white-space:pre-wrap;word-break:break-all;line-height:1.25;text-shadow:1px 1px 2px #000;max-width:100%;pointer-events:none}.library-row{display:grid;grid-template-columns:72px minmax(100px,1fr) 120px;gap:12px;align-items:center;border-bottom:1px solid #edf2f8;padding:12px 0}.library-row img{width:72px;height:90px;object-fit:cover;border-radius:5px;background:#e8eef8}.library-row .audio-icon{width:72px;height:65px;display:grid;place-items:center;background:#eef4fd;font-size:25px;border-radius:5px}.library-row strong{font-size:12px;word-break:break-all}.library-row select{font-size:12px}.replace-row{display:grid;grid-template-columns:70px 1fr auto auto auto;gap:7px;align-items:center;margin:12px 0}.replace-row button{font-size:11px;padding:8px}.replace-row select{font-size:12px}.capture-dialog{width:min(600px,95vw);padding-bottom:20px}.capture-dialog p,.capture-dialog>.button-row{margin:15px 22px}.capture-dialog video{width:calc(100% - 44px);max-height:50vh;object-fit:contain;background:#132b48;margin:0 22px}.capture-dialog audio{width:calc(100% - 44px);margin:0 22px}.info-dialog{max-width:560px;padding:25px;font-size:13px;line-height:1.9}.history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf1f6;padding:10px 0}.history-row strong{font-size:12px;word-break:break-all}.history-row small{display:block;color:#8092aa}.history-row button{white-space:nowrap;font-size:12px}[hidden]{display:none!important}@media(max-width:1100px){.shell{grid-template-columns:125px 1fr}.page{padding:24px 18px}.workspace{grid-template-columns:minmax(0,1fr) 290px;gap:15px}.card{padding:16px}.mode{font-size:11px}.mode span{padding:5px 7px}.text-input-row{flex-wrap:wrap}.text-input-row button{width:100%}.editor-footer span{display:none}}@media(max-width:850px){.topbar{height:65px;padding:0 16px;gap:10px}.topbar>.badge{display:none}.shell{display:block}.steps{position:sticky;top:65px;z-index:15;height:auto;flex-direction:row;padding:8px 12px;background:#f4f7fb;justify-content:center}.steps button{padding:7px 12px}.local-note{display:none}.page{padding:20px 16px}.workspace{display:flex;flex-direction:column}.editor-column,.preview-column{width:100%}.preview-column{order:-1}.preview-column>.card:last-child{display:none}.preview-stage{height:290px;min-height:0}.page-heading{align-items:flex-start}.page-heading .mode{flex-direction:column}.result-layout{grid-template-columns:1fr}.job-dock{right:10px;bottom:10px;width:calc(100vw - 20px);max-width:400px}.two-panels{grid-template-columns:1fr}.two-panels>aside{display:none}.field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.replace-row{grid-template-columns:60px 1fr auto}.replace-row button{font-size:11px}.replace-row .source-extra{grid-column:span 1}.library-row{grid-template-columns:55px minmax(80px,1fr) 100px}.library-row img{width:55px;height:65px}.drawer #drawerBody{padding:15px}.editor-footer{gap:4px}.editor-footer>.quiet{font-size:12px}.large{margin-left:0}}

.default-settings{margin-bottom:20px}.default-settings h2{margin-bottom:3px}.default-settings .button-row{margin:10px 0}

.capture-dialog #captureImage{width:100%;max-height:360px;object-fit:contain}

/* 为实际进度卡高度预留操作空间，避免遮挡再次生成或修改后的操作。 */
.editor-footer{bottom:var(--job-dock-offset,0px)}

.region-create{display:flex;gap:8px}.region-create input{min-width:0}.region-create button{white-space:nowrap}#regionBoard{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-top:14px;max-height:520px;overflow:auto}.region-dropzone{border:1px dashed #b9cbe4;background:#f8fbff;border-radius:8px;padding:10px;min-height:115px}.region-dropzone h3{font-size:13px;margin:0 0 8px;overflow-wrap:anywhere}.region-dropzone h3 span{display:block;font-size:11px;color:#8193ab;font-weight:normal}.region-dropzone.is-over{background:#deeeff;border-color:#2463d7;outline:2px solid #8ab9f1}.region-drop-hint{font-size:11px;color:#8596ad;margin:8px 0}.region-asset{border:1px solid #d9e4f2;background:#fff;padding:9px;border-radius:6px;margin:7px 0;cursor:grab}.region-asset strong{display:block;font-size:11px;overflow-wrap:anywhere}.region-asset small{display:block;font-size:10px;color:#8a9ab1;margin:3px 0}.region-asset select{font-size:11px;min-height:32px;padding:5px}

.batch-body{padding:24px;overflow:auto}.batch-body progress{width:100%;height:16px}.batch-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e2e8f0;padding:12px 0}.batch-item small{display:block;overflow-wrap:anywhere}.batch-body details label{display:block;margin:12px 0}.batch-body details select{width:100%}.batch-body h2{margin-top:24px}

.caption-dialog{width:min(1100px,96vw);max-height:94vh;padding:0}.caption-dialog>header{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:18px 24px;border-bottom:1px solid #dde6f2}.caption-dialog h2{margin:0}.caption-body{padding:22px;overflow:auto;max-height:calc(94vh - 100px)}.caption-layout{display:grid;grid-template-columns:minmax(240px,360px) minmax(280px,1fr);gap:24px}.caption-body label{display:block;margin:10px 0}.caption-body label input:not([type=checkbox]),.caption-body label select{width:100%}.caption-surface{position:relative;width:min(100%,320px);aspect-ratio:9/16;margin:10px auto;background:#111;overflow:hidden}.caption-surface video,.caption-surface svg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.caption-surface svg{touch-action:none;cursor:crosshair}.caption-body progress{width:100%}.caption-body #captionComparison{width:100%;max-height:65vh;background:#111}.caption-body details img{display:block;width:100%;max-height:60vh;object-fit:contain}.caption-body #captionPreviewResult{border-top:1px solid #dce5f1;padding-top:18px;margin-top:18px}.caption-body .field-grid label{margin:5px 0}@media(max-width:760px){.caption-layout{grid-template-columns:1fr}.caption-body{padding:14px}.caption-dialog>header{padding:14px}.caption-surface{width:min(100%,280px)}}

.region-candidates{border:1px solid #e8d49d;background:#fff9e9;padding:8px;margin-top:7px;border-radius:6px}.region-candidates>div{border-top:1px solid #ecdfba;margin-top:7px;padding-top:7px}.region-candidates button{font-size:11px;padding:6px;white-space:normal;text-align:left}.region-candidates small{color:#786238}

/* Multiline text editor and complete batch-template controls. */
.config-row textarea{width:100%;font:inherit;resize:vertical;min-height:68px;border:1px solid #d8e0ed;border-radius:8px;padding:10px;box-sizing:border-box}.batch-template-card{margin-bottom:20px}.batch-template-card .preset-row{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.batch-template-card select,.batch-template-card input{min-width:180px;flex:1}

/* Ordered local-trial flow; no authentication or new visual theme. */
body[data-view="account"] .shell{grid-template-columns:minmax(0,1fr)}body[data-view="account"] main{width:100%}body[data-view="account"] #accountPage{max-width:760px}.steps{gap:5px;overflow:auto}.steps button{flex-shrink:0}.steps #leaveTrial{margin-top:12px;border-top:1px solid #dce5f1;border-radius:0}.login-card{max-width:500px;margin:32px auto}.page-heading h1:focus{outline:none}@media(max-width:850px){.steps{flex-wrap:wrap;justify-content:flex-start}.steps button{padding:6px 9px;font-size:12px}.steps #leaveTrial{margin-top:0;border-top:0}.topbar #trialIndicator{font-size:10px}.login-card{margin:20px auto}}

/* PPT main-page hierarchy: original input/preview, then ordered feature rows. */
.shell{display:block;max-width:1100px}.steps{position:static;display:flex;flex-direction:row;height:auto;padding:14px 28px 0;gap:8px}.steps button{padding:9px 16px}.steps #leaveTrial{margin-top:0;border-top:0;border-radius:8px;margin-left:auto}main{padding-top:20px}.page-heading{margin-bottom:18px}.page-heading h1{font-size:24px}.ppt-source-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:stretch;margin-bottom:18px}.ppt-source-grid>.card{min-width:0}.ppt-source-grid .preview-stage{height:220px;min-height:0}.ppt-source-grid .preview-stage video,.ppt-source-grid .preview-stage img{max-height:220px}.compact-note{font-size:12px;margin:15px 0 0}.ppt-options{padding:4px 22px}.ppt-option{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;min-height:72px;border-bottom:1px solid #eef2f7}.ppt-option:last-child{border-bottom:0}.ppt-option h2,.ppt-option>label{margin:0;font-size:15px;font-weight:600}.ppt-option>label:not(.toggle){min-width:125px}.ppt-option .duration-options{flex:1;max-width:620px}.ppt-option .text-input-row{flex:1;min-width:0}.ppt-option small{display:block;color:#718199;font-size:12px;margin-top:5px;overflow-wrap:anywhere}.ppt-option>button{flex-shrink:0}.editor-footer{justify-content:space-between;gap:14px}.editor-footer span{display:block}.advanced-body{padding:18px 24px;max-height:calc(92vh - 165px);overflow:auto}.advanced-body>details{border-bottom:1px solid #e2eaf4;padding:14px 0}.advanced-body>details>summary{font-weight:600;cursor:pointer;min-height:30px}.advanced-body .card{margin:12px 0;border:0;box-shadow:none;padding:12px 0}.advanced-section{display:grid;gap:16px;padding:14px 0}.advanced-dialog footer{flex-wrap:wrap}.text-section-divider{border:0;border-top:2px solid #dce5f1;margin:26px 0}.cover-source-warning{font-size:13px}
@media(max-width:850px){.shell{display:block}.steps{padding:8px 16px;flex-wrap:nowrap;justify-content:flex-start;overflow:auto}.steps button{font-size:13px;padding:8px 12px}.steps #leaveTrial{margin-left:auto}.ppt-source-grid{gap:12px}.ppt-source-grid .preview-stage{height:190px}.ppt-source-grid .preview-stage video,.ppt-source-grid .preview-stage img{max-height:190px}.ppt-options{padding:3px 16px}.ppt-option{gap:12px}.page-heading h1{font-size:22px}.editor-footer{position:sticky;bottom:var(--job-dock-offset,0px)}}
@media(max-width:580px){.topbar{padding:0 12px}.topbar #connection{display:none}.topbar{gap:8px}.topbar #capabilitiesButton{margin-left:auto;font-size:12px;padding:8px}.brand small{display:none}main{padding:18px 12px}.page-heading{gap:10px}.page-heading h1{font-size:20px}.page-heading>button{font-size:13px}.ppt-source-grid{grid-template-columns:1fr}.ppt-source-grid .preview-stage{height:180px}.ppt-source-grid .preview-stage video,.ppt-source-grid .preview-stage img{max-height:180px}.ppt-option{align-items:flex-start;flex-wrap:wrap;gap:10px}.ppt-option[data-ppt-option="duration"],.ppt-option[data-ppt-option="text"]{display:block}.ppt-option .duration-options{margin-top:12px}.ppt-option .duration-options button{font-size:13px;padding:9px 3px;min-width:0}.ppt-option .text-input-row{margin-top:10px;display:grid;grid-template-columns:minmax(0,1fr) 42px}.ppt-option .text-input-row button{grid-column:1 / -1;justify-self:end}.ppt-option>div:first-child{flex:1;min-width:0}.ppt-option>button{font-size:13px}.advanced-body{padding:14px}.advanced-body .preset-row{flex-wrap:wrap}.advanced-body .preset-row>*{min-width:0;max-width:100%}.editor-footer span{font-size:11px}.steps{padding-left:12px;padding-right:12px}.steps button{font-size:12px;padding:8px 9px}}

/* Keep generation after every option; never obscure a settings row. */
#editorPage>.editor-footer{position:static;bottom:auto;background:transparent;padding:18px 0;margin-top:0}

/* Trial status remains visible on narrow screens. */
.topbar #trialIndicator{display:inline-flex}@media(max-width:580px){.topbar{height:auto;min-height:65px;flex-wrap:wrap;padding:10px 12px;gap:6px}.topbar #trialIndicator{order:3;width:100%;background:transparent;padding:0;font-size:11px}}

#resultCover{display:block;max-width:100%;max-height:340px;margin:12px auto} [data-legacy-cover]{margin:6px 8px 6px 0}

.history-error{font-size:12px;line-height:1.5;overflow-wrap:anywhere;margin:8px 0 0}.history-row>div{min-width:0}.history-row>button{flex-shrink:0}

/* Video cover selection stays inside the existing source settings. */
.cover-frame-picker{margin:12px 0 22px}.cover-frame-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.cover-frame-grid video{display:block;width:100%;max-height:300px;background:#101d30}.cover-frame-grid input[type=range]{display:block;width:100%;padding:0}.cover-picked-image{display:block;max-width:100%;max-height:300px;margin:8px auto}.cover-frame-grid button{margin-top:8px}@media(max-width:640px){.cover-frame-grid{grid-template-columns:1fr}}

/* Keep the normal template path visible in the existing editor. */
.workflow-card{margin-bottom:18px}.workflow-card .preset-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:14px 0}.workflow-card .preset-row select,.workflow-card .preset-row input{flex:1;min-width:160px}.workflow-card details{margin-top:14px}.opening-title-option>div:last-child{flex:1;max-width:620px}.opening-title-option details{margin-top:10px}.opening-title-option input[type=number]{max-width:160px}@media(max-width:580px){.workflow-card .section-title{align-items:flex-start;gap:8px}.workflow-card .preset-row>*{max-width:100%;min-width:0}.workflow-card .preset-row label{flex-basis:100%}.opening-title-option{display:block}.opening-title-option>div:last-child{margin-top:12px}.editor-footer{flex-wrap:wrap}}

/* Material rows reuse the right-hand video preview; templates have visual cards. */
.material-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}.compact-materials{max-height:330px;overflow:auto;margin-top:14px;grid-template-columns:1fr}.material-row,.template-card,.builtin-template-card{border:1px solid var(--border,#d9dee8);border-radius:12px;background:var(--surface,#fff);overflow:hidden}.material-row.selected,.template-card.selected{border:2px solid #3563e9;box-shadow:0 0 0 2px #3563e918}.material-card-body{display:grid;gap:9px;padding:12px;min-width:0}.material-card-body>strong,.asset-file-details p{overflow-wrap:anywhere}.material-card-body small{color:#657087}.selection-badge{color:#2255d8!important;font-weight:700}.asset-file-details{font-size:12px;color:#657087}.asset-file-details summary{cursor:pointer}.material-card-body .button-row{gap:6px;flex-wrap:wrap}.material-card-body button{font-size:13px;padding:7px 10px}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:14px;margin:16px 0}.template-thumbnail{position:relative;aspect-ratio:16/9;background:#edf0f6;display:grid;place-items:center;overflow:hidden}.template-thumbnail video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#151922;z-index:1}.template-thumbnail video[hidden]{display:none}.thumb-fallback{padding:16px;text-align:center;color:#657087}.builtin-template-card{max-width:360px;margin:14px 0;padding-bottom:12px}.builtin-template-card>strong,.builtin-template-card>p,.builtin-template-card>.button-row{margin-left:12px;margin-right:12px}.builtin-template-card .template-thumbnail{aspect-ratio:3/1}.removed-materials,#removedTemplates{margin:14px 0}.template-card a{align-self:center;font-size:13px}.material-card-body .asset-title-editor{min-width:0}.material-card-body input,.material-card-body select{max-width:100%;width:100%}@media(max-width:600px){.template-grid{grid-template-columns:1fr 1fr}.template-card .button-row{display:grid}.material-grid{grid-template-columns:1fr}.template-card .material-card-body{padding:9px}}

/* Status hooks have no idle explanatory copy. */
p:empty,small:empty{display:none}

/* Original specification: inputs and preview, then the six setting rows. */
[hidden]{display:none!important}
#editorPage .workflow-card>summary{font-weight:600;cursor:pointer}
#editorPage .workflow-card:not([open]){padding:14px 18px;margin-bottom:14px}
#editorPage .workflow-card .builtin-template-card{margin-top:12px}
#editorPage .input-material-row{display:grid;grid-template-columns:18px minmax(0,1fr);grid-template-rows:minmax(28px,1fr) auto;align-items:center;column-gap:8px;padding:4px 8px;border:1px solid #dbe4f1;border-radius:9px;background:#f8faff;min-width:0}
#editorPage .input-material-row input{width:18px;height:18px;margin:0;cursor:pointer}
#editorPage .material-preview{min-width:0;min-height:28px;padding:0;border:0;background:transparent;font-size:13px;font-weight:600;text-align:left;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#editorPage .material-preview:hover{color:#2255b8}
#editorPage .material-preview:focus-visible{outline:2px solid #2255b8;outline-offset:1px}
#editorPage .input-material-row:has([aria-current=true]){background:#edf4ff;border-color:#729ae1}
#editorPage .material-preview[aria-current=true]{color:#2255b8}
#editorPage .ppt-options{margin-bottom:0}
#editorPage .ppt-option{padding-top:12px;padding-bottom:12px}
#settingsDialog .optional-setting{margin:16px 0;padding:12px 0;border-top:1px solid #e4e9f2}
#settingsDialog details>summary{cursor:pointer}
#settingsDialog details[open]>summary{margin-bottom:12px}
#settingsDialog #openingTitleControls,#settingsDialog #narrationDurationControls{display:block}
#settingsDialog #openingTitleControls .field-grid{margin-top:10px}

/* Composer: compact source list, larger preview, and grouped actions. */
#editorPage .page-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
#editorPage .page-actions [data-editor-clear]{color:#9a5961;border-color:#e5d5d8}
#editorPage .ppt-source-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-auto-rows:clamp(400px,50vh,520px);gap:20px;align-items:stretch;margin-bottom:14px}
#editorPage .input-card,#editorPage .preview-card{padding:18px;min-width:0}
#editorPage .input-card{display:flex;flex-direction:column;gap:10px}
#editorPage .ppt-source-grid .section-title{margin:0;min-height:26px}
#editorPage .source-import-actions,#editorPage .source-remove-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0;flex-shrink:0}
#editorPage .source-import-actions button,#editorPage .source-remove-actions button{min-width:0;padding:8px 9px;min-height:40px}
.material-import-status{margin:8px 0;color:#243b63;font-weight:600}
.material-import-status:empty{display:none}
#editorPage #materialImportStatus,#editorPage .material-selection-actions{margin:0}
#shareHint:empty{display:none}
#drawerImportStatus{margin-inline:24px}
#editorPage .source-remove-actions button{font-size:12px;color:#9a5961;border-color:#e5d5d8}
#editorPage .source-select .field-label{margin:0 0 5px}
#editorPage .source-select select{min-height:40px;font-size:13px}
#editorPage #sourceInfo{margin:0;font-size:11px;flex-shrink:0}
#editorPage .compact-materials{flex:1;min-height:0;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:54px;gap:8px;margin:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#editorPage .material-list-empty{grid-column:1/-1;margin:8px 0;color:#657087}
#editorPage #templateWorkflowNotice:empty,#editorPage #sampleWarning:empty{display:none}
#editorPage .preview-card{display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px}
#editorPage .preview-card h2{flex-shrink:0}
#editorPage .preview-stage{height:100%;min-height:0;min-width:0;border-radius:9px}
#editorPage .preview-stage video,#editorPage .preview-stage img{display:block;width:100%;height:100%;max-height:none;object-fit:contain}
#editorPage .editor-recovery{padding:12px 18px;margin-bottom:18px}
#editorPage .editor-recovery>summary{cursor:pointer}
#editorPage .editor-recovery #editorRecovery:not(:empty){margin-top:12px}
#editorPage .workflow-card .section-title{flex-wrap:wrap}
#editorPage .template-management-actions{margin:0;gap:8px}
#editorPage .builtin-template-card{max-width:none;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0;padding:12px 14px;background:#f8faff}
#editorPage .builtin-template-card .template-thumbnail{display:none}
#editorPage .builtin-template-card>strong,#editorPage .builtin-template-card>.button-row{margin:0}
#editorPage .template-card .button-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:4px 0 0}
#editorPage .template-card .button-row>*{min-width:0;text-align:center;font-size:12px;padding:7px 8px}
#editorPage .template-card [data-template-action=load]{order:1;background:#edf4ff;border-color:#b8cff0}
#editorPage .template-card .button-row>a{order:2;border:1px solid #cbd7e8;border-radius:8px;text-decoration:none}
#editorPage .template-card [data-template-action=rename]{order:3}
#editorPage .template-card [data-template-action=remove],#editorPage .template-card [data-template-action=restore]{order:4}
#editorPage .ppt-option>button{min-width:148px;min-height:40px}
#editorPage>.editor-footer{justify-content:flex-end;gap:12px;padding:18px 0}
#editorPage #generateHint:empty{display:none}
#editorPage #generateHint:not(:empty){order:0;margin-right:auto}
#editorPage #openBatch,#editorPage #generateButton{height:44px;min-height:44px;line-height:20px;padding:10px 16px}
#editorPage #openBatch{order:1}
#editorPage #generateButton{order:2;min-width:168px;margin-left:0}
#settingsDialog #drawerBody>.button-row:first-child{justify-content:flex-end;margin-top:0}
html:has(dialog:modal){overflow:hidden;overscroll-behavior:none}
dialog:modal,
.drawer #drawerBody,
.advanced-body,
.batch-body,
.caption-body{overscroll-behavior-y:contain}
@media(max-width:760px){
 #editorPage .ppt-source-grid{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto}
 #editorPage .compact-materials{flex:0 1 auto;max-height:302px}
 #editorPage .preview-card{height:320px}
 #editorPage .page-heading{align-items:center;flex-wrap:wrap}
 #editorPage .page-actions{gap:8px}
 #editorPage .template-management-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
 #editorPage .template-management-actions button{padding:8px;font-size:12px}
 #editorPage .builtin-template-card{flex-wrap:wrap;gap:10px}
 #editorPage .builtin-template-card>.button-row{width:100%}
 #editorPage .builtin-template-card button{width:100%}
}
@media(max-width:480px){
 #editorPage .template-grid{grid-template-columns:minmax(0,1fr)}
 #editorPage .page-actions{display:grid;width:100%;grid-template-columns:1fr 1fr}
 #editorPage .page-actions button{font-size:12px;padding:8px}
 #editorPage .input-card,#editorPage .preview-card{padding:14px}
 #editorPage .preview-card{height:260px}
 #editorPage .ppt-option>button{min-width:138px}
 #editorPage>.editor-footer{display:grid;grid-template-columns:1fr}
 #editorPage #generateButton{min-width:0;padding:10px}
 #editorPage #openBatch{padding:10px;font-size:12px}
 #editorPage #generateHint:not(:empty){grid-column:1 / -1}
}
#editorPage .input-material-row .title-feedback{grid-column:2;display:flex;align-items:center;gap:4px;min-width:0;color:#53617a;font-size:12px;line-height:16px}
#editorPage .input-material-row .title-feedback[title="标题识别完成"]{display:none}
#editorPage .input-material-row .title-feedback progress{min-width:12px}
#editorPage .input-material-row [data-title-message]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.title-feedback progress{width:70px;height:5px}
.title-feedback[hidden],.title-feedback progress[hidden]{display:none!important}

.title-edit-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,250px);gap:20px;align-items:start}
.title-edit-controls{grid-column:1;grid-row:1;min-width:0}
.title-preview-panel{grid-column:2;grid-row:1;position:sticky;top:0;z-index:2;background:#fff;padding:6px 0 10px}
.title-preview-modes{display:flex;justify-content:center;gap:6px;margin-bottom:6px}
.title-preview-modes button{padding:5px 12px;min-height:32px}
.title-preview-modes button[aria-pressed=true]{background:#e3eeff;color:#114898}
.title-preview-frame{position:relative;overflow:hidden;background:#000;border-radius:6px;aspect-ratio:9/16;width:min(100%,min(32vh,210px));margin:auto;isolation:isolate}
.title-preview-frame[data-orientation=landscape]{aspect-ratio:16/9;width:100%}
.title-preview-frame>img,.title-preview-targets{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.title-preview-frame>img[hidden]{display:none}
.title-preview-word{position:absolute;white-space:pre-wrap;line-height:1.12;overflow-wrap:anywhere;text-align:center;pointer-events:auto;touch-action:none;user-select:none;cursor:grab;paint-order:stroke fill}
.title-preview-word:active{cursor:grabbing}
.title-preview-targets.exact .title-preview-word{opacity:0}
.title-preview-status{position:absolute;bottom:3px;left:0;right:0;text-align:center;color:white;background:#000a;font-size:12px;pointer-events:none}
.title-preview-status:empty{display:none}
@media(max-width:720px){
  .title-edit-layout{display:block}
  .title-preview-panel{margin:-6px -4px 10px;padding:6px 4px;background:#fff}
  .title-preview-frame{width:min(100%,25vh)}
  .title-preview-frame[data-orientation=landscape]{width:min(100%,67vh)}
}
