:root{--bg:#f5f5f1;--surface:#fff;--ink:#222823;--muted:#81867e;--line:#e6e8df;--lime:#d6f57e;--green:#477a42;--sidebar:#202820;--soft:#edf0e7;--danger:#a7483c;font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:14px;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-color:#739e4d}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;display:block;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}button svg{flex-shrink:0}button{border:0;background:none;color:inherit}input,select,textarea{background:#fff;border:1px solid #dfe3d9;border-radius:8px;color:var(--ink);padding:10px 12px;max-width:100%}textarea{resize:vertical;line-height:1.65;width:100%}input[type=checkbox]{accent-color:#4c7344;width:16px;height:16px;cursor:pointer}label{font-weight:500}h1,h2,h3,h4,p{margin-top:0}h1{font-size:29px;letter-spacing:-.8px;font-weight:650;margin-bottom:9px}h2{font-size:23px;letter-spacing:-.6px;margin-bottom:10px}h3{font-size:16px;line-height:1.5;margin-bottom:5px}h4{font-size:14px;margin-bottom:12px}.muted{color:var(--muted);font-size:12px;line-height:1.7}.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.8px;color:var(--green);display:block;margin-bottom:9px}.sidebar{position:fixed;inset:0 auto 0 0;width:224px;background:var(--sidebar);color:#e7eade;z-index:20;padding:30px 18px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;margin:0 11px 41px;font-size:26px;letter-spacing:-.7px;font-weight:620}.brand-mark{width:41px;height:43px;border-radius:12px;background:var(--lime);color:#263022;display:flex;align-items:center;padding-left:11px;font-size:38px;font-weight:750;line-height:1;position:relative}.brand-mark>span{font-size:22px;position:absolute;right:5px;top:6px}.brand-sub{font-size:8px;letter-spacing:2px;color:#9ea797;display:block;line-height:1.9;font-weight:500}.workspace-label{font-size:10px;color:#929e8d;letter-spacing:.5px;margin:0 12px 17px;display:flex;align-items:center;justify-content:space-between}.workspace-label span{font-size:8px;border:1px solid #46503f;padding:2px 4px;border-radius:3px}.nav-item{display:flex;align-items:center;gap:12px;width:100%;border-radius:8px;padding:13px 12px;margin-bottom:6px;text-align:left;font-size:13px;color:#b8c2b2}.nav-item:hover{background:#30392e}.nav-item.active{background:#d6f57e;color:#243020;font-weight:650}.nav-count{margin-left:auto;font-size:11px;background:#bddb6d;border-radius:5px;min-width:22px;padding:2px;text-align:center}.sidebar-guide{margin:47px 13px;color:#c9d3c0}.tiny-label{font-size:8px;letter-spacing:1.4px;color:#88977c}.sidebar-guide p{font-size:22px;line-height:1.65;letter-spacing:1px;font-weight:300;margin:16px 0 19px}.sidebar-guide small{color:#88977c;font-size:10px}.loop-art{display:flex;align-items:center;margin-bottom:14px}.loop-art span{font-size:10px;width:28px;height:28px;border:1px solid #53604a;border-radius:50%;display:grid;place-items:center}.loop-art i{height:1px;background:#53604a;width:24px}.sidebar-bottom{margin-top:auto;padding:16px 9px 0;border-top:1px solid #3b4634;display:flex;gap:11px;align-items:center;font-size:11px}.sidebar-bottom small{display:block;color:#92a086;font-size:9px;margin-top:5px}.connection-dot,.local-pill i{width:7px;height:7px;border-radius:50%;background:#b4d777;display:inline-block;flex-shrink:0}.app-shell{margin-left:224px}.topbar{height:72px;background:#fafbf7;border-bottom:1px solid var(--line);padding:0 40px;display:flex;align-items:center;justify-content:space-between}.breadcrumb{font-size:11px;color:#93998d}.breadcrumb span{margin:0 13px;color:#c2c6ba}.breadcrumb b{color:#555f50;font-weight:500}.topbar-right{display:flex;align-items:center;gap:21px}.local-pill{font-size:10px;color:#748169;display:flex;gap:7px;align-items:center}.local-pill i{background:#78a65c;width:5px;height:5px}.avatar{width:30px;height:30px;border:1px solid #dbe0d3;border-radius:50%;background:#ecf0e6;display:grid;place-items:center;font-size:11px;color:#596a4d}main{max-width:1680px;margin:auto;padding:36px 40px 50px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px;gap:20px}.page-heading p{color:#848b7c;font-size:12px;margin-bottom:0}.heading-actions{display:flex;align-items:center;gap:12px}.button{border:1px solid #dce2d3;border-radius:8px;background:#fff;padding:10px 15px;font-size:12px;font-weight:550;display:inline-flex;justify-content:center;align-items:center;gap:9px;white-space:nowrap;line-height:1.45}.button:hover{background:#f0f4e9;border-color:#bbc9ac}.button.primary{background:var(--sidebar);border-color:var(--sidebar);color:#f2f7e7}.button.primary:hover{background:#394a30}.button.lime{background:var(--lime);color:#304126;border-color:#d0ea98}.button.small{padding:7px 11px;font-size:11px}.button.ghost{background:transparent;border-color:transparent;color:#717d65;padding:8px}.button.danger{color:var(--danger)}.button svg{width:15px;height:15px}.icon-button{font-size:26px;width:32px;height:32px;color:#748267;border-radius:7px}.icon-button:hover{background:#eef2e7}.hero{border:1px solid #dfe6d4;border-radius:12px;background:linear-gradient(105deg,#eef3e4 0%,#f5f7ee 54%,#e4edcf 100%);padding:25px 29px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:27px;overflow:hidden;position:relative}.hero h2{font-size:21px;font-weight:520;margin:0 0 9px;letter-spacing:.1px}.hero p{font-size:11px;color:#81916b;margin:0}.hero-flow{display:flex;align-items:center;gap:13px;color:#748565;min-width:335px}.hero-flow .stage{background:#fbfcf8b3;border:1px solid #dbe4cc;border-radius:9px;min-width:83px;padding:12px 16px;transform:rotate(-3deg);box-shadow:0 3px 7px #53633305}.hero-flow .stage:nth-of-type(3){transform:rotate(3deg);background:#d8eeaf}.hero-flow b{font-size:10px;display:block;font-weight:550;margin-top:7px}.hero-flow svg{width:24px;height:24px}.hero-flow>span{font-size:17px;color:#a9b79b}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:29px}.stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px 21px;display:flex;justify-content:space-between;align-items:center}.stat-label{font-size:10px;color:#858e7b}.stat-number{display:block;font-size:27px;font-weight:550;margin-top:8px;letter-spacing:-1px}.stat-icon{width:38px;height:38px;background:#f3f5ee;border-radius:10px;display:grid;place-items:center;color:#91a181}.stat-icon svg{width:18px;height:18px}.list-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 17px}.filters{display:flex;gap:5px;align-items:center}.filter{padding:8px 12px;border-radius:6px;font-size:11px;color:#86917d}.filter.active{background:#e5eadb;color:#4c603e;font-weight:550}.search-wrap{position:relative;max-width:245px;width:100%}.search-wrap svg{position:absolute;top:10px;left:11px;width:14px;height:14px;color:#a3ac99}.search{padding:9px 12px 9px 33px;font-size:11px;width:100%;background:#fafbf7}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.job-card{border:1px solid var(--line);border-radius:11px;background:white;overflow:hidden;transition:box-shadow .2s,border-color .2s;position:relative;cursor:pointer}.job-card:hover{border-color:#b7c4a8;box-shadow:0 7px 18px #31411d09}.job-card.selected{outline:2px solid #9db968}.card-preview{height:178px;background:#e9ece1;position:relative;overflow:hidden}.card-preview>img{width:100%;height:100%;object-fit:cover;object-position:50% 32%;filter:brightness(.92)}.card-preview:after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 60%,#14240a33)}.card-placeholder{height:100%;display:flex;justify-content:center;align-items:center;background:repeating-linear-gradient(120deg,#e9eddf,#e9eddf 30px,#e3e9d8 30px,#e3e9d8 60px);color:#8a9a75}.card-placeholder svg{width:39px;height:39px}.card-selection{position:absolute;left:11px;top:10px;z-index:3;display:grid;place-items:center;width:24px;height:24px;background:#fffdf6d9;border-radius:6px}.card-selection input{margin:0}.card-version{position:absolute;right:12px;top:12px;z-index:3;font-size:9px;background:#f8fbf0e8;color:#4a5b3d;border-radius:5px;padding:4px 7px}.duration-badge{position:absolute;right:12px;bottom:12px;z-index:3;font-size:9px;border-radius:4px;padding:4px 6px;color:white;background:#1e271acc}.card-body{padding:17px 18px 14px}.card-topline{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;gap:10px}.status{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:500;padding:4px 7px;border-radius:4px;background:#f0f3e9;color:#77846b;white-space:nowrap}.status:before{content:"";width:4px;height:4px;border-radius:50%;background:currentColor}.status.completed{color:#477646;background:#edf5e9}.status.error{color:#ac5545;background:#fff0e9}.status.analyzing,.status.generating,.status.making_images,.status.queued,.status.planning{color:#857623;background:#f8f3d9}.status.analysis_review,.status.reference_review{color:#547864;background:#edf5ee}.card-time{font-size:9px;color:#a4ac9c}.card-body h3{font-size:12px;font-weight:580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:7px}.card-sub{font-size:10px;color:#929b89;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:15px}.card-progress{display:flex;gap:4px;margin-bottom:11px}.card-progress i{height:3px;flex:1;border-radius:2px;background:#edf0e7}.card-progress i.done{background:#98b86c}.card-foot{font-size:9px;color:#8e9982;display:flex;justify-content:space-between;gap:10px;border-top:1px solid #f0f2ea;padding-top:11px}.card-foot span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-foot b{color:#6b7f57;font-weight:500;white-space:nowrap}.batch-bar{background:#eaf0de;border:1px solid #d6e3c5;display:flex;align-items:center;gap:9px;padding:10px 13px;border-radius:9px;margin-bottom:16px}.batch-bar .selection-count{font-size:11px;margin-right:auto}.empty{border:1px dashed #cfd8c0;border-radius:12px;padding:70px 20px;text-align:center;background:#fafbf7;color:#81926c}.empty svg{margin:0 auto 15px;width:36px;height:36px}.empty h3{color:#526445;margin-bottom:9px}.empty p{font-size:12px}.detail-heading{display:flex;align-items:center;gap:15px;margin-bottom:25px}.detail-heading h1{font-size:20px;margin:0 0 6px;overflow-wrap:anywhere}.detail-heading p{font-size:10px;color:#89947f;margin:0}.back-button{width:36px;height:36px;border:1px solid #dce2d2;border-radius:9px;background:#fff;display:grid;place-items:center;flex-shrink:0}.detail-heading .status{margin-left:auto}.detail-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:24px}.source-column{align-self:start;position:sticky;top:20px}.panel{background:#fff;border:1px solid var(--line);border-radius:11px;padding:20px;margin-bottom:18px}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.panel-head h3{font-size:13px;margin:0}.tag{font-size:9px;padding:4px 6px;background:#f0f3e8;color:#849371;border-radius:4px}.source-player{width:100%;max-height:310px;background:#181e16;border-radius:7px;display:block}.source-meta{display:flex;justify-content:space-between;margin-top:12px;color:#8a957f;font-size:10px}.source-name{font-size:9px;color:#a3ac9a;margin:10px 0 0;overflow-wrap:anywhere}.field{display:block;font-size:11px;margin-bottom:13px}.field>input,.field>textarea,.field>select{display:block;width:100%;margin-top:7px;font-size:12px}.fields-row{display:grid;grid-template-columns:1fr 82px;gap:10px}.character-area{font-size:11px!important;min-height:106px}.steps{display:flex;background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px;margin-bottom:19px;gap:4px}.step-tab{flex:1;padding:12px 7px;border-radius:6px;font-size:11px;color:#929b87;white-space:nowrap;display:flex;gap:7px;align-items:center;justify-content:center}.step-tab .step-number{border:1px solid #dce3d0;border-radius:50%;width:19px;height:19px;display:grid;place-items:center;font-size:9px}.step-tab.active{background:#eef3e3;color:#476235;font-weight:600}.step-tab.active .step-number{border-color:#b8cc9b;background:#daedbe}.review-content>.panel{padding:23px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:19px}.section-title h2{font-size:18px;margin:0 0 6px}.section-title p{margin:0;font-size:11px;color:#8a947d}.section-title .actions{display:flex;gap:7px}.cut-box{display:flex;align-items:center;justify-content:space-between;background:#f4f7ed;border:1px solid #e2e9d6;padding:15px 18px;border-radius:8px;gap:15px;margin-bottom:17px}.cut-box label{font-size:12px}.cut-box small{display:block;color:#8b987a;font-size:10px;margin-top:7px}.cut-box input{width:87px;font-size:18px;padding:7px 10px;text-align:right}.cut-value{display:flex;align-items:center;gap:7px}.cut-value span{font-size:11px;color:#849071}.subheading{display:flex;justify-content:space-between;align-items:center;margin:26px 0 13px}.subheading h3{font-size:13px}.subheading span{font-size:10px;color:#98a189}.time-row{display:grid;grid-template-columns:70px 70px minmax(0,1fr) 27px;gap:8px;align-items:start;border-bottom:1px solid #eef1e8;padding:12px 0}.time-row input{width:100%;font-size:11px;padding:8px}.time-row textarea{font-size:11px;padding:8px;min-height:57px}.time-row .row-content{min-width:0}.time-row .row-content input{margin-bottom:5px}.time-labels{display:grid;grid-template-columns:70px 70px 1fr;gap:8px;color:#9ba58f;font-size:9px}.remove-row{font-size:20px;line-height:34px;color:#b3bba8}.remove-row:hover{color:var(--danger)}.element-row{border:1px solid #e6ecdd;border-radius:8px;margin-bottom:10px;padding:12px;background:#fcfdf9}.element-heading{display:flex;gap:9px;align-items:center;font-size:11px;margin-bottom:10px}.element-heading input[type=text]{width:120px;font-size:10px;padding:6px}.element-heading .exclude-label{margin-left:auto;font-size:10px;color:#8a947d;display:flex;align-items:center;gap:6px}.element-heading .remove-row{line-height:20px}.element-grid{display:grid;grid-template-columns:64px 64px minmax(0,1fr);gap:7px}.element-grid input{padding:7px;width:100%;font-size:10px}.element-row textarea{font-size:11px;padding:7px;margin-top:7px;min-height:40px}.element-extra{display:grid;grid-template-columns:1fr 1fr;gap:7px}.summary-text{font-size:12px;min-height:72px}.notice{font-size:11px;line-height:1.7;background:#f4f6ee;border:1px solid #e7ecdb;color:#7c8c67;border-radius:7px;padding:11px 13px;margin:13px 0}.notice.error{color:#9c5a42;background:#fff6ee;border-color:#f0d9c8;overflow-wrap:anywhere}.notice.warning{color:#8d7939;background:#faf6e5;border-color:#ece0b9}.busy-notice{display:flex;align-items:center;gap:12px;background:#eff4e5;border:1px solid #dfe8cc;border-radius:8px;padding:13px 16px;margin-bottom:18px;color:#71845c;font-size:11px}.spinner{width:16px;height:16px;border:2px solid #d4ddc6;border-top-color:#708e4a;border-radius:50%;animation:spin 1s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.dirty-notice{color:#9b793e;font-size:10px}.segment-heading{display:flex;align-items:center;gap:8px;margin-bottom:15px}.segment-heading strong{font-size:12px}.segment-heading .tag{margin-left:auto}.image-pair{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:18px}.image-label{font-size:10px;color:#8b977e;display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.grid-image-box{height:280px;border-radius:7px;overflow:hidden;background:#eeeee8;border:1px solid #e4e6dd;display:grid;place-items:center;position:relative}.grid-image-box img{width:100%;height:100%;object-fit:contain;cursor:zoom-in;background:#1d221a}.grid-placeholder{text-align:center;color:#9aa78b;padding:20px;font-size:10px;line-height:1.8}.grid-placeholder svg{margin:0 auto 8px;width:26px;height:26px}.upload-ref{display:flex;align-items:center;justify-content:center;border:1px dashed #cbd6ba;border-radius:6px;margin-top:9px;padding:9px;font-size:10px;color:#7a8f60;cursor:pointer}.upload-ref input{display:none}.prompt-area{font-size:11px;line-height:1.8;min-height:180px;background:#fbfcf8}.prompt-area.video{min-height:350px}.prompt-label{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin-bottom:8px}.prompt-label small{color:#98a38b;font-size:9px}.panel-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;align-items:center}.panel-footer .muted{margin-right:auto}.segment-ref-strip{display:flex;gap:15px;align-items:center;margin-bottom:18px;background:#f4f6ee;border-radius:7px;padding:10px}.segment-ref-strip img{width:80px;height:65px;object-fit:contain;cursor:zoom-in;border-radius:4px;background:#1a2016}.segment-ref-strip p{font-size:11px;line-height:1.7;margin:0;color:#859375}.result-player{width:100%;max-height:540px;border-radius:9px;background:#192016;display:block}.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.result-grid video{width:100%;max-height:330px;background:#1b2117;border-radius:7px}.result-item p{font-size:10px;margin:9px 0;color:#8d987f}.result-item .button{font-size:10px}.history-label{color:#ad8540!important}.activity{margin-top:20px}.activity summary{font-size:11px;color:#88987a;cursor:pointer}.event{display:flex;gap:13px;font-size:10px;color:#899780;margin-top:13px;line-height:1.7}.event time{white-space:nowrap;color:#a8b09f}.settings-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:22px}.setting-row{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid #edf0e5;gap:15px}.setting-row strong{display:block;font-size:12px;margin-bottom:6px}.setting-row small{font-size:10px;color:#919e83}.ready{font-size:10px;color:#608347;display:flex;align-items:center;gap:7px}.ready:before{content:"";width:5px;height:5px;background:#87ac66;border-radius:50%}dialog{border:1px solid #dbe2d0;border-radius:15px;box-shadow:0 30px 100px #111f1350;width:590px;max-width:calc(100vw - 30px);padding:28px;color:var(--ink);background:#fff}dialog::backdrop{background:#17230f6b;backdrop-filter:blur(4px)}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between}.dialog-head h2{font-size:22px}.dialog-head .eyebrow{font-size:8px}.dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px dashed #b5c69d;border-radius:10px;background:#f6f9ef;padding:28px 15px;gap:10px;margin:20px 0 13px;cursor:pointer}.dropzone.drag{background:#e9f3d6;border-color:#719a46}.dropzone input{position:absolute;width:1px;height:1px;opacity:0}.dropzone strong{font-size:13px;font-weight:500}.dropzone>span:last-child{font-size:9px;color:#93a080}.upload-symbol{width:42px;height:42px;background:#e8f0da;border-radius:10px;display:grid;place-items:center;color:#7d985b;margin-bottom:3px}.upload-symbol svg{width:21px;height:21px}.file-item{display:flex;align-items:center;justify-content:space-between;font-size:10px;padding:8px 10px;background:#f6f8f1;border-radius:5px;margin-bottom:5px;gap:10px}.file-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item small{color:#9ba78c;flex-shrink:0}.form-row{display:flex;gap:20px;align-items:center;margin:21px 0}.form-row label{font-size:11px;flex:1}.form-row select{display:block;width:100%;margin-top:7px;font-size:11px}.form-hint{font-size:10px;line-height:1.8;color:#98a58a;flex:1;margin-top:18px}.optional{color:#a9b09f;font-size:10px;margin-left:4px}.check-label{display:flex;align-items:center;gap:8px;font-size:11px;margin-top:17px}.check-label .muted{margin-left:auto;font-size:10px}.dialog-footer{display:flex;align-items:center;justify-content:space-between;margin-top:24px}.dialog-footer .muted{font-size:10px}.image-dialog{width:fit-content;height:fit-content;max-width:calc(100vw - 32px);padding:44px 16px 16px;background:#1e251b;border:0}.image-dialog img{display:block;max-width:calc(100vw - 64px);max-height:calc(100dvh - 96px);width:auto;height:auto;object-fit:contain}.image-close{position:absolute;right:8px;top:8px;background:#fffdf4e6;border-radius:50%;width:32px;height:32px;font-size:23px;z-index:2}#toast{position:fixed;bottom:26px;left:calc(50% + 100px);transform:translateX(-50%) translateY(90px);background:#263220;color:#f3f7ec;padding:12px 20px;border-radius:9px;box-shadow:0 6px 24px #111b0933;font-size:12px;z-index:100;transition:transform .2s;max-width:650px;line-height:1.7}#toast.show{transform:translateX(-50%) translateY(0)}#toast.error{background:#743f31}#upload-progress progress{width:100%;height:6px;accent-color:#7d9c4f}#upload-progress span{font-size:10px;color:#82906d}.page-foot{display:flex;justify-content:space-between;margin-top:26px;font-size:9px;color:#a2ad94}.helper-row{display:flex;align-items:center;gap:9px;font-size:10px;color:#92a080}.helper-row select{font-size:10px;padding:6px 7px}.save-strip{position:sticky;bottom:15px;background:#fcfff7ee;backdrop-filter:blur(8px);padding:12px 14px;border:1px solid #d5e1c2;border-radius:9px;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:10;box-shadow:0 5px 20px #53693810;margin-top:20px}.save-strip p{font-size:10px;color:#8b997b;margin:0}.save-strip .actions{display:flex;gap:8px}.hide{display:none!important}
@media(min-width:1600px){.cards{grid-template-columns:repeat(4,minmax(0,1fr))}.card-preview{height:190px}.detail-layout{grid-template-columns:300px minmax(0,1fr)}}
@media(max-width:1200px){.sidebar{width:190px;padding-left:12px;padding-right:12px}.app-shell{margin-left:190px}main{padding:28px}.topbar{padding:0 28px}.hero-flow{min-width:280px;gap:9px}.hero-flow .stage{min-width:70px;padding:10px}.detail-layout{grid-template-columns:230px minmax(0,1fr);gap:17px}.grid-image-box{height:225px}.step-tab{font-size:10px;gap:4px}.cards{gap:14px}.card-body{padding:14px}.card-preview{height:157px}}
@media(max-width:980px){.sidebar{width:76px;padding:26px 10px}.brand{margin:0 auto 39px;justify-content:center}.brand>span:last-child,.workspace-label,.nav-item>span.nav-count,.sidebar-guide,.sidebar-bottom,.nav-item{font-size:0}.nav-item{justify-content:center;padding:13px 10px;gap:0}.nav-item svg{width:21px;height:21px}.brand-mark{font-size:38px}.app-shell{margin-left:76px}.detail-layout{grid-template-columns:220px minmax(0,1fr);gap:15px}.hero-flow{display:none}.stats{gap:10px}.stat{padding:15px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-icon{display:none}.image-pair{grid-template-columns:1fr}.source-column{position:static}.review-content>.panel{padding:17px}.section-title{flex-wrap:wrap}.steps{gap:1px}.step-tab .step-number{display:none}}
@media(max-width:700px){main{padding:22px 15px}.topbar{height:58px;padding:0 17px}.page-heading{align-items:flex-start}.page-heading h1{font-size:23px}.heading-actions .helper-row{display:none}.stats{grid-template-columns:repeat(2,1fr)}.cards{grid-template-columns:1fr}.card-preview{height:205px}.list-tools{flex-wrap:wrap}.search-wrap{max-width:none}.hero{padding:22px}.hero h2{font-size:18px}.detail-layout{grid-template-columns:1fr}.source-column{display:grid;grid-template-columns:1fr 1fr;gap:12px}.source-player{max-height:220px}.panel{padding:15px}.fields-row{grid-template-columns:1fr}.character-area{min-height:75px}.settings-grid{grid-template-columns:1fr}.batch-bar{flex-wrap:wrap}.batch-bar .selection-count{width:100%}.detail-heading{gap:10px}.detail-heading h1{font-size:16px}.detail-heading .status{display:none}.result-grid{grid-template-columns:1fr}.page-foot{display:none}.sidebar-guide{display:none}#toast{left:50%;width:85vw}.image-pair{grid-template-columns:1fr 1fr}.grid-image-box{height:190px}}
body{overflow-x:hidden}.card-preview>img{object-position:center top}.filters{overflow-x:auto;max-width:100%}.filter{flex-shrink:0}#toast{visibility:hidden;transform:translateX(-50%) translateY(20px);pointer-events:none}#toast.show{visibility:visible;transform:translateX(-50%) translateY(0)}
.grid-image-box{display:flex;align-items:center;justify-content:center}.grid-image-box img{min-height:0;min-width:0;max-height:100%;max-width:100%;display:block;object-fit:contain;flex:0 1 auto}
@media(max-width:980px){.brand>span:last-child,.workspace-label,.sidebar-guide,.sidebar-bottom,.nav-count{display:none}}
@media(max-width:520px){.sidebar{width:60px;padding:24px 8px}.app-shell{margin-left:60px}.brand-mark{width:38px;height:40px}.nav-item{padding:12px 8px}.source-column{grid-template-columns:1fr}.source-player{max-height:280px}.image-pair{grid-template-columns:1fr}.grid-image-box{height:300px}.save-strip{flex-wrap:wrap}.save-strip .actions{flex-wrap:wrap}.step-tab{white-space:normal}.time-row{grid-template-columns:55px 55px minmax(0,1fr) 22px}.time-row .row-content{grid-column:1/4}.time-row .remove-row{grid-column:4}.time-labels{grid-template-columns:55px 55px 1fr}.page-heading{flex-wrap:wrap}.element-heading{flex-wrap:wrap}.element-grid{grid-template-columns:54px 54px 1fr}.element-extra{grid-template-columns:1fr}.element-grid input{padding:6px}.section-title .actions{flex-wrap:wrap}}

.steps{flex-wrap:wrap}.brand-previews video{width:100%;max-height:210px;background:#182015;border-radius:8px}.brand-previews p{font-size:11px;color:#7c896d}.cta-preview-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.logo-choices{display:flex;flex-wrap:wrap;gap:12px}.logo-choices label{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid #dce5cf;border-radius:8px;max-width:100%;font-size:10px}.logo-choices img{width:48px;height:48px;object-fit:contain}.logo-choices span{max-width:150px;overflow:hidden;text-overflow:ellipsis}.corner-options{display:flex;gap:20px;flex-wrap:wrap;font-size:12px}.corner-options label{display:flex;gap:6px;align-items:center}

.character-switcher{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-bottom:14px}.character-switch-item{position:relative;display:flex;border:1px solid #dbe2d0;border-radius:9px;background:#fff;max-width:100%;overflow:hidden}.character-switch-item .character-open{border:0;background:transparent;padding-right:34px;text-align:left;white-space:normal}.character-delete{position:absolute;right:5px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:26px;height:26px;border:0;border-radius:6px;background:transparent;color:#ad4c3c;opacity:0;pointer-events:none;cursor:pointer;transition:opacity .12s}.character-delete svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.character-switch-item:hover .character-delete,.character-switch-item:focus-within .character-delete{opacity:1;pointer-events:auto}.character-delete:hover{background:#fff0eb}.character-delete:disabled{cursor:not-allowed;color:#a9a9a2}.character-switch-item:hover .character-delete:disabled,.character-switch-item:focus-within .character-delete:disabled{opacity:.35}.character-create{flex-shrink:0}#delete-character-error{color:#ad4c3c;font-size:12px;line-height:1.7}@media(hover:none){.character-delete{opacity:1;pointer-events:auto}}.character-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}.character-description{font-size:11px;line-height:1.7;color:#6e7a65}.character-assets{display:flex;gap:8px;overflow:auto;margin:14px 0}.character-assets img{height:160px;max-width:160px;object-fit:contain;border-radius:7px;background:#1c2319}.character-card details{font-size:11px;margin-top:12px}.cast-create-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.image-model-row{display:flex;align-items:center;gap:20px}.image-model-row .field{min-width:210px;margin:0}.image-model-row p{font-size:11px;line-height:1.6}.step-tab{min-width:95px}
@media(max-width:700px){.character-gallery,.cast-create-grid{grid-template-columns:1fr}.image-model-row{display:block}.image-model-row p{margin-top:12px}}
.continue-bar{position:sticky;bottom:12px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 20px;margin-top:20px;background:#f7faef;border:1px solid #c7d8af;border-radius:12px;box-shadow:0 6px 24px #26391620}.continue-bar strong{font-size:12px}.continue-bar p{font-size:11px;color:#617052;line-height:1.6;margin:5px 0 0}.continue-bar .button{white-space:normal;min-width:190px;flex-shrink:0}.secondary-actions{font-size:11px;color:#667557}.secondary-actions summary,.cast-creator summary,.persona-editor summary{cursor:pointer}.secondary-actions button{margin-top:10px}.cast-creator>summary,.persona-editor>summary{font-weight:700;font-size:14px}.cast-creator[open]>summary,.persona-editor[open]>summary{margin-bottom:16px}.cast-creator>p{font-size:12px;line-height:1.8}.selected-character{background:#e5eed6;border-color:#8ca763}.prompt-optimization{font-size:11px;padding:10px 12px;background:#f0f5e6;margin-bottom:10px;border-radius:7px}.prompt-optimization pre{white-space:pre-wrap;max-height:240px;overflow:auto;line-height:1.6}.segment-ref-strip video{width:150px;max-height:240px}.character-card{border:1px solid #dce5cf}.character-card:has(.selected-character){border-color:#8ca763}
@media(max-width:700px){.continue-bar{flex-direction:column;align-items:stretch;bottom:6px;padding:14px}.continue-bar .button{min-width:0;width:100%}}
.character-card.is-current{border:2px solid #8ca763}
.text-render-guide p,.text-render-guide small{font-size:11px;line-height:1.8;color:#617052}.text-render-guide small{display:block;margin-top:10px}
.replacement-row{display:grid;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr) 22px;align-items:center;gap:7px;margin:10px 0}.replacement-row input{width:100%;min-width:0}.text-replacement-panel p{font-size:11px;line-height:1.8}.text-replacement-panel button{margin-top:10px}.text-replacement-panel{grid-column:1/-1}
@media(max-width:520px){.replacement-row{grid-template-columns:minmax(0,1fr) 22px}.replacement-row span{display:none}.replacement-row input[data-replacement-to]{grid-row:2}.replacement-row .remove-row{grid-column:2;grid-row:1/3}}
.continue-bar{position:fixed;left:254px;right:30px;bottom:14px;margin:0;z-index:15}.detail-layout{padding-bottom:145px}
@media(max-width:1200px){.continue-bar{left:218px;right:28px}}
@media(max-width:980px){.continue-bar{left:104px;right:28px}}
@media(max-width:700px){.continue-bar{left:91px;right:15px;bottom:8px}.continue-bar>div strong{display:none}.continue-bar p{font-size:10px;line-height:1.5;margin:0}.continue-bar{gap:8px}.detail-layout{padding-bottom:170px}}
@media(max-width:520px){.continue-bar{left:75px;right:15px}}
.detail-layout>*{min-width:0}.source-column>*{min-width:0}.source-name{overflow-wrap:anywhere}
@media(max-width:700px){.detail-layout{grid-template-columns:minmax(0,1fr)}.source-column{grid-template-columns:repeat(2,minmax(0,1fr))}.image-model-row .field{min-width:0;width:100%}.image-model-row select{width:100%}.segment-ref-strip{flex-wrap:wrap}}
@media(max-width:520px){.source-column{grid-template-columns:minmax(0,1fr)}.character-gallery{grid-template-columns:minmax(0,1fr)}.image-model-row select{font-size:11px;padding:9px 8px}}
.library-tools{display:flex;align-items:center;gap:20px;justify-content:space-between;margin-bottom:18px}.library-tools .search-wrap{flex:1;max-width:520px}.library-sort{display:flex;align-items:center;gap:10px;white-space:nowrap;font-size:12px}.video-library-list{list-style:none;padding:0;margin:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.library-row{display:grid;grid-template-columns:48px minmax(0,1fr) 165px auto;align-items:center;gap:20px;padding:18px 22px;border-bottom:1px solid var(--line)}.library-row:last-child{border-bottom:0}.library-play{background:#eff4e7;border-radius:9px;width:46px;height:56px;display:grid;place-items:center;color:#506a3c}.library-video-info strong{font-size:14px;margin-right:10px}.library-video-info p{font-size:11px;line-height:1.6;color:var(--muted);margin:7px 0 3px;overflow-wrap:anywhere}.library-video-info small,.library-row time{font-size:11px;color:var(--muted);line-height:1.7}.library-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.library-task-link{font-size:11px;color:#597347;white-space:nowrap}.library-preview-dialog{max-width:700px;width:calc(100vw - 32px)}.library-preview-dialog video{display:block;max-width:100%;width:100%;height:60vh;background:#12180f;object-fit:contain;margin:15px 0}.library-preview-dialog h2{font-size:18px}.library-preview-dialog p{overflow-wrap:anywhere}
@media(max-width:1200px){.library-row{grid-template-columns:42px minmax(0,1fr) auto;gap:14px;padding:16px}.library-row time{grid-column:2}.library-actions{grid-column:3;grid-row:1/3;max-width:140px}}
@media(max-width:700px){.library-tools{align-items:stretch;flex-direction:column;gap:12px}.library-tools .search-wrap{max-width:none}.library-sort{justify-content:space-between}.library-row{grid-template-columns:36px minmax(0,1fr);padding:14px;gap:12px}.library-play{width:36px;height:48px}.library-actions{grid-column:1/3;grid-row:auto;max-width:none;justify-content:flex-end}.library-row time{grid-column:2}.library-video-info .tag{display:inline-block;margin-top:5px}.library-preview-dialog{padding:14px}}

/* Source covers and output first-frame previews preserve the full video framing. */
.card-preview{background:#20251d}.card-preview>img,.card-preview>video{width:100%;height:100%;object-fit:contain;object-position:center;filter:none}.card-preview:after{pointer-events:none}
.library-row{grid-template-columns:80px minmax(0,1fr) 165px auto}.library-play{width:80px;height:112px;background:#20251d;position:relative;overflow:hidden;padding:0}.library-play>img,.library-play>video{width:100%;height:100%;object-fit:contain}.library-play-overlay{position:absolute;inset:0;display:grid;place-items:center;color:white;background:linear-gradient(transparent 40%,#0006)}.library-play-overlay svg{width:26px;height:26px;filter:drop-shadow(0 1px 3px #000);background:#17201270;border-radius:50%;padding:4px}.library-play:hover .library-play-overlay{background:#0002}
@media(max-width:1200px){.library-row{grid-template-columns:72px minmax(0,1fr) auto}.library-play{width:72px;height:102px}}
@media(max-width:700px){.library-row{grid-template-columns:64px minmax(0,1fr)}.library-play{width:64px;height:92px}}

.cast-member-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.cast-identity-sheet,.cast-sidebar-person img{display:block;width:100%;height:auto;border-radius:8px;background:#e7e7e3}.cast-sidebar-person{margin:14px 0}.cast-sidebar-person strong,.cast-sidebar-person small{display:block}.cast-sidebar-person small{color:var(--muted);font-size:10px;margin:5px 0 9px}.portrait-empty{display:grid;place-items:center;border:1px dashed #bdc8b0;border-radius:8px;padding:22px 12px;color:#7c8b6d;background:#f5f8ef;font-size:11px;text-align:center}.portrait-empty p{margin:8px 0 0}.cast-member .upload-ref{display:block;margin-top:12px}.prompt-video-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:18px;max-height:620px;overflow:auto;padding:4px}.prompt-video-gallery video{width:100%;height:260px;object-fit:contain;background:#1c2119;border-radius:8px}.prompt-video-gallery p{font-size:11px;line-height:1.6;margin:8px 0}.prompt-video-history .section-title{gap:16px}.cast-sidebar .tag{white-space:normal;text-align:right}.cast-member{min-width:0}.cast-member .fields-row{grid-template-columns:minmax(0,1fr) 90px}
@media(max-width:700px){.cast-member-grid,.prompt-video-gallery{grid-template-columns:minmax(0,1fr)}.prompt-video-gallery video{height:280px}.cast-member .fields-row{grid-template-columns:minmax(0,1fr) 75px}}
.generation-inputs{padding:16px;margin:16px 0;background:#f5f7ef;border:1px solid var(--line);border-radius:10px}
.generation-inputs>p{font-size:12px;color:var(--muted);margin:8px 0}
.identity-input-list{display:flex;gap:14px;flex-wrap:wrap}
.identity-input-list>div{display:flex;align-items:center;gap:10px;min-width:160px}
.identity-input-list img{width:84px;height:112px;object-fit:contain;background:#fff;border-radius:6px;cursor:zoom-in}
.identity-input-list small{display:block;color:var(--muted);margin-top:5px}
.grid-history{margin:16px 0}.grid-history-list{display:flex;flex-wrap:wrap;gap:14px;padding-top:12px}
.grid-history-list>div{width:140px}.grid-history-list img{width:140px;height:170px;object-fit:contain;cursor:zoom-in;background:#f4f6ef;border-radius:8px}
.grid-history-list small{display:block;margin-top:6px;color:var(--muted)}
.stage-generation{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:16px 0}.button.danger{color:#9b4036;border-color:#d5b6b0;background:#fff7f5}.button.danger:hover{background:#fae6e1}.deleted-character-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #e6eadf;padding:16px 0}.deleted-character-row>div{min-width:0}.deleted-character-row p{font-size:11px;overflow-wrap:anywhere}.deleted-character-row small{color:#8b977e}.deleted-character-row button{flex-shrink:0}#deleted-character-list{max-height:65vh;overflow:auto}
.portrait-history{margin:18px 0}.portrait-version-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}.portrait-version{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}.portrait-version.selected{border-color:var(--green);background:var(--soft)}.portrait-select{display:block;width:100%;padding:0;border:0;background:transparent;cursor:pointer;text-align:left;color:inherit}.portrait-select img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:var(--surface)}.portrait-select span{display:block;font-size:11px;font-weight:600;padding:10px 12px}.portrait-select:focus-visible{outline:3px solid #91b65b;outline-offset:-3px}.portrait-select:disabled{cursor:default}.portrait-version-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px 10px}.portrait-version-caption small{font-size:10px;color:var(--muted)}[data-zoom]{cursor:zoom-in}

.character-progress{font-size:10px;color:#66764f;margin-left:5px}.step-tab.state-done{background:#edf5e0;color:#476c27}.step-tab.state-done .step-number{background:#d5e8b9;border-color:#a0bc78}.step-tab.state-pending{background:#f7f8f5;color:#909889}.step-tab.state-running{background:#fff7d8;color:#9b7621}.step-tab.state-error{background:#fff0eb;color:#b24c38}.step-tab.state-error .step-number{border-color:#d88270;color:#b24c38}.step-tab.active{outline:2px solid #829f5a;outline-offset:-2px}.step-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:10px;color:#819070;margin:10px 0 18px}.step-legend span:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;background:#cbd0c3}.step-legend .done:before{background:#8cba5e}.step-legend .running:before{background:#dcba52}.step-legend .error:before{background:#dc7d66}.step-error{position:relative;padding-right:42px}.step-error p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:160px;overflow:auto;margin:9px 0;font-size:12px}.message-close{position:absolute;right:10px;top:10px;background:none;border:0;color:inherit;font-size:20px;cursor:pointer}.error-reopen{margin-bottom:15px;color:#ac5948}.task-drawer{position:fixed;right:0;top:0;bottom:0;width:330px;max-width:90vw;background:#fcfdf9;border-left:1px solid #dde4d4;box-shadow:-8px 0 30px #28361c18;z-index:35;display:flex;flex-direction:column;padding:20px 16px}.task-drawer[hidden]{display:none}.task-drawer-head{display:flex;justify-content:space-between;align-items:center}.task-drawer-head h2{font-size:18px;margin:0}.task-drawer-head button{font-size:22px}#task-summary{display:flex;flex-direction:column;gap:7px;padding:17px 0;font-size:13px}#task-summary span{color:#879479;font-size:11px}.task-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}.task-filters button{border:1px solid #dde4d4;background:#fff;border-radius:7px;padding:7px 9px;font-size:11px;cursor:pointer}.task-filters .selected{background:#e5efcf;border-color:#acc483}.task-list{flex:1;overflow:auto;min-height:0}.task-row{display:block;width:100%;text-align:left;padding:12px;margin-bottom:9px;border:1px solid #e1e7d9;border-radius:9px;background:#fff;cursor:pointer}.task-row:hover{border-color:#a9c381;background:#f8fbf2}.task-row>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.task-row strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-row>span{display:block;font-size:11px;margin:8px 0}.task-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#91a082}.task-row footer{display:flex;justify-content:space-between;margin-top:10px;font-size:9px;color:#91a082}.task-status{border-radius:4px;padding:3px 5px;background:#eef1e7;font-size:10px;flex-shrink:0}.task-status.running,.task-status.queued{background:#fff6d5;color:#967725}.task-status.failed,.task-status.interrupted{background:#ffebe5;color:#b15541}.task-status.completed{background:#e9f3dc;color:#688940}.task-empty{font-size:12px;text-align:center;padding:20px}.topbar-right{gap:12px}#toast-close{position:fixed;bottom:35px;left:calc(50% + 180px);z-index:51;background:#25361b;color:white;border:0;border-radius:50%;width:24px;height:24px;cursor:pointer}.task-drawer-open .continue-bar{z-index:20}
@media(min-width:1500px){.task-drawer-open .app-shell{margin-right:330px}.task-drawer-open .continue-bar{right:365px}}

/* Modal coordinates belong to the viewport, independently of document length. */
html.dialog-open{overflow:hidden;scrollbar-gutter:stable}
dialog{position:fixed;inset:0;margin:auto;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.image-dialog[open]{display:grid;place-items:center;overflow:hidden}
.library-preview-dialog[open]{display:flex;flex-direction:column}
.library-preview-dialog .dialog-head,.library-preview-dialog>a{flex-shrink:0}
.library-preview-dialog .dialog-head h2{overflow-wrap:anywhere;min-width:0}
.library-preview-dialog .dialog-head button{flex-shrink:0}
.library-preview-dialog p{max-height:60px;overflow:auto;margin:4px 0;flex-shrink:0}
.library-preview-dialog video{height:min(60vh,calc(100dvh - 190px));min-height:0;flex-shrink:1;margin:10px 0}
@media(max-height:500px){dialog{padding:16px}.image-dialog{padding:40px 12px 12px}.image-dialog img{max-height:calc(100dvh - 88px)}.library-preview-dialog .dialog-head h2{margin-bottom:4px}}
.speaker-voice{border-top:1px solid var(--line);padding:18px 0}.speaker-voice>.tag{margin-left:10px}.voice-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.speaker-voice select{max-width:220px}[id^="segment-message-"],[id^="reference-approval-"]{scroll-margin-top:90px}.row-content>label{display:inline-flex;align-items:center;gap:6px;font-size:12px;margin:6px 10px 6px 0}.row-content>label select{max-width:200px}@media(max-width:720px){.voice-fields{grid-template-columns:1fr}}

.character-prompt-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.random-character-prompt{padding:6px 9px;min-width:34px}.image-model-row .field{flex:1}
.field textarea.prompt-generating:disabled{background:#edf0e8;color:#8a9382;border-color:#d6decf;opacity:.75;cursor:wait;user-select:none}.random-prompt-status{display:block;margin-top:7px;color:var(--green);font-size:12px;font-weight:400}.random-prompt-status[hidden]{display:none}.random-character-prompt .spinner{width:15px;height:15px}

.segment-video-results{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}.segment-video-results h3{margin:0;font-size:14px}.segment-video-results>.muted{font-size:12px}.segment-video-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px;margin-top:16px}.segment-video-version{min-width:0}.segment-video-version p{font-size:11px;line-height:1.7;margin:10px 0}.segment-video-preview{position:relative;display:block;width:100%;padding:0;border-radius:9px;overflow:hidden;background:#182015}.segment-video-preview img,.segment-video-preview video{display:block;width:100%;height:240px;object-fit:contain}.segment-video-preview>span{position:absolute;inset:auto 0 0;display:flex;align-items:center;justify-content:center;gap:7px;padding:12px;color:#fff;background:linear-gradient(transparent,#000b);font-size:12px}.segment-video-preview:hover>span{background:#0009}.segment-video-preview:focus-visible{outline:3px solid #8ca763;outline-offset:3px}.notice .segment-video-preview{max-width:180px;margin-top:12px}.notice .segment-video-preview img,.notice .segment-video-preview video{height:180px}@media(max-width:600px){.segment-video-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.segment-video-preview img,.segment-video-preview video{height:190px}}

.task-state{display:flex;align-items:center;gap:7px;flex-shrink:0}.task-error-indicator{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border:1px solid #c46950;border-radius:50%;color:#b15541;background:#fff3eb;font-weight:700;font-size:11px;cursor:help}.task-error-indicator:focus-visible{outline:2px solid #b15541;outline-offset:2px}.task-row .task-model{white-space:normal;overflow-wrap:anywhere;color:#64764f;font-size:10px;margin:0 0 5px;line-height:1.5}

/* Assembly uses compact covers; playback belongs to the viewport modal. */
.assembly-workspace,.assembly-workspace .panel,.assembly-clip-details{min-width:0}
.assembly-workspace>.section-title{margin:8px 0 20px}.assembly-workspace .panel{padding:22px}
.assembly-segment{display:grid;grid-template-columns:100px minmax(0,1fr);gap:18px;align-items:center;padding:16px 0;border-top:1px solid var(--line)}
.assembly-clip-preview .segment-video-preview img,.assembly-clip-preview .segment-video-preview video{height:150px}
.assembly-clip-preview .segment-video-preview>span{font-size:10px;gap:3px;padding:10px 4px}.assembly-clip-preview .segment-video-preview svg{width:13px;height:13px}
.assembly-clip-details .field{display:flex;flex-direction:column;gap:9px;margin:0}.assembly-clip-details select{width:100%;min-width:0;text-overflow:ellipsis}.assembly-version-caption{margin:9px 0 5px;overflow-wrap:anywhere}.assembly-readiness{margin:12px 0 0;color:#aa703f}
.assembly-empty{height:150px;background:#edf0e7;border:1px dashed #c4cfb8;border-radius:9px;display:grid;place-items:center;text-align:center;font-size:11px;color:#7b8870;padding:12px}
.assembly-cta-select{display:flex;align-items:center;gap:16px;margin:16px 0}.assembly-cta-select select{flex:1;max-width:440px}.assembly-tail-option{min-width:0}.assembly-tail-choice{display:flex;gap:8px;align-items:flex-start;margin-top:10px;font-size:12px;overflow-wrap:anywhere;cursor:pointer}.assembly-tail-choice input{flex-shrink:0;margin-top:2px}.assembly-tail-option p{font-size:10px}.default-clips-panel .default-clip-category{border-top:1px solid var(--line);padding-top:20px;margin:20px 0}.clip-upload-error{color:#ad4c3c;font-size:12px;line-height:1.7}.default-clips-panel .segment-video-preview img{height:150px;object-fit:contain}.default-clips-panel .assembly-tail-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;max-height:430px;overflow:auto}.assembly-tail .assembly-tail-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));max-height:500px;overflow:auto}
.assembly-tail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.assembly-tail-grid .segment-video-preview img,.assembly-tail-grid .segment-video-preview video{height:180px}.assembly-tail-grid h4{margin:10px 0 4px}.assembly-tail-grid p{margin:0;overflow-wrap:anywhere}
.assembly-brand .subheading{margin:18px 0 12px}.assembly-brand .subheading:first-child{margin-top:0}.assembly-brand .logo-choices{margin-bottom:12px}.assembly-brand .form-row{margin:18px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.assembly-brand .field{min-width:0}.assembly-brand .field input{width:100%}.assembly-brand .panel-footer{align-items:center;gap:16px;flex-wrap:wrap;margin-top:22px}.assembly-brand .panel-footer p{margin:0;max-width:380px}.assembly-brand .panel-footer .button{margin-left:auto}
.assembly-export-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:20px}.assembly-export-grid .segment-video-preview img,.assembly-export-grid .segment-video-preview video{height:200px}.assembly-export-grid .result-item{min-width:0}.assembly-export-grid .result-item p{font-size:11px;line-height:1.7;overflow-wrap:anywhere}
@media(max-width:1000px){.assembly-workspace .panel{padding:18px}.assembly-tail-grid{gap:10px}.assembly-tail-grid .segment-video-preview img,.assembly-tail-grid .segment-video-preview video{height:155px}.assembly-segment{gap:12px;grid-template-columns:85px minmax(0,1fr)}}
@media(max-width:600px){.assembly-segment{grid-template-columns:80px minmax(0,1fr)}.assembly-clip-preview .segment-video-preview img,.assembly-clip-preview .segment-video-preview video{height:125px}.assembly-tail-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.assembly-tail-grid .segment-video-preview img,.assembly-tail-grid .segment-video-preview video{height:130px}.assembly-tail-grid .segment-video-preview>span{font-size:10px;padding:8px 3px;gap:2px}.assembly-tail-grid .segment-video-preview svg{width:12px;height:12px}.assembly-cta-select{flex-direction:column;align-items:stretch;gap:8px}.assembly-cta-select select{max-width:none}.assembly-brand .form-row{grid-template-columns:1fr}.assembly-brand .panel-footer .button{width:100%}.assembly-clip-details .field{font-size:12px}}

/* Workbench: bounded pages and lightweight identity thumbnails. */
.dashboard-tools{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:15px}
.dashboard-search-tools{display:flex;align-items:center;gap:10px;flex:1;max-width:390px;min-width:230px}.dashboard-search-tools .search-wrap{flex:1;max-width:none}
.dashboard-legend{display:flex;align-items:center;gap:15px;flex-wrap:wrap;color:#87907e;font-size:10px;margin-bottom:18px}.dashboard-legend span:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--character-state);margin-right:5px}.dashboard-legend small{margin-left:auto;font-size:10px}
.dashboard-legend .error,.project-character.state-error,.character-switch-item.state-error{--character-state:#d87368;--character-soft:#fff6f3}.dashboard-legend .running,.project-character.state-running,.character-switch-item.state-running{--character-state:#df9b3d;--character-soft:#fff9ef}.dashboard-legend .review,.project-character.state-review{--character-state:#6b9ed7;--character-soft:#f3f8ff}.dashboard-legend .complete,.project-character.state-complete,.character-switch-item.state-complete{--character-state:#76a45f;--character-soft:#f5faf0}.project-character.state-pending,.character-switch-item.state-pending{--character-state:#c5cbbe;--character-soft:#f8f9f5}
.character-switch-item{background:var(--character-soft);border-color:var(--character-state)}.character-switch-item.selected-character{outline:2px solid #394332;outline-offset:2px}.character-switch-item .character-open:hover{background:transparent}.character-switch-item .character-progress{color:var(--character-state)}
.project-card{cursor:default;align-self:start}.project-card .card-body{min-width:0;padding:16px}.project-card .card-body h3{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 10px}.project-count-caption{font-size:10px;color:#7c8c70}.project-state-summary{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:14px}.project-status-count{border-radius:4px;padding:3px 5px;background:#f3f5ef;font-size:9px;color:#7f8a74}.project-status-count.working{color:#a87630;background:#fff3df}.project-status-count.error{color:#b16053;background:#fff0ea}.project-status-count.review{color:#5e82af;background:#edf4fe}.project-status-count.done{color:#6b8a50;background:#ecf4e3}
.project-character-list{display:flex;flex-direction:column;gap:8px}.project-character{display:flex;align-items:center;gap:9px;width:100%;min-width:0;border:1.5px solid var(--character-state);border-radius:8px;padding:7px;background:var(--character-soft);text-align:left;color:#394332}.project-character:hover{box-shadow:0 2px 6px #27381812}.project-character:focus-visible{outline:2px solid var(--character-state);outline-offset:2px}
.character-miniatures{display:flex;align-items:center;gap:3px;flex-shrink:0}.character-miniatures img,.character-miniature-empty{display:block;width:36px;height:48px;border-radius:5px;background:#e9ece4;object-fit:cover}.character-miniature-empty{display:grid;place-items:center;color:#839372;font-size:14px}.character-mini-info{flex:1;min-width:0}.character-mini-info strong{display:block;font-size:11px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.character-mini-info small{display:flex;align-items:center;gap:4px;font-size:9px;color:#7b8972;margin-top:5px}.character-mini-info i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--character-state);flex-shrink:0}.mini-progress{font-size:10px;font-weight:500;color:#65745a;flex-shrink:0;white-space:nowrap}
.show-more-characters{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;margin:10px 0 0;padding:8px;border:1px dashed #d7dfcc;border-radius:7px;color:#77886a;font-size:10px}.show-more-characters svg{width:12px;height:12px}.matched-characters-note{font-size:9px;color:#89977b;margin:9px 0 0}.project-card .card-foot{margin-top:15px;align-items:center}.project-open{padding:2px;font-size:10px;color:#557340;white-space:nowrap}
.dashboard-pagination{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px;margin-top:22px;color:#88957c;font-size:11px}.dashboard-pagination>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.dashboard-page-size{display:flex;align-items:center;gap:8px}.dashboard-page-size select{padding:7px 9px;font-size:11px}#dashboard-empty[hidden]{display:none}
.project-card .character-miniatures{max-width:80px;flex-wrap:wrap}.project-list-view .character-miniatures{max-width:70px}
.project-list-view{display:flex;flex-direction:column;gap:12px}.project-list-view .project-card{display:grid;grid-template-columns:110px minmax(0,1fr);width:100%;align-self:stretch}.project-list-view .card-preview{height:100%;min-height:156px}.project-list-view .card-version,.project-list-view .duration-badge{display:none}.project-list-view .card-selection{left:6px;top:6px;width:22px;height:22px}.project-list-view .card-body{padding:12px 16px}.project-list-view .card-topline{margin-bottom:5px}.project-list-view .project-state-summary{margin-bottom:9px}.project-list-view .project-character-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.project-list-view .project-character{padding:5px 7px}.project-list-view .character-miniatures img,.project-list-view .character-miniature-empty{width:30px;height:35px}.project-list-view .card-foot{margin-top:10px;padding-top:7px}
@media(max-width:1000px){.project-list-view .project-character-list{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-search-tools{max-width:none}.dashboard-tools .filters{flex-wrap:wrap}.dashboard-legend small{width:100%;margin-left:0}}
@media(max-width:600px){.dashboard-search-tools{min-width:0;width:100%;max-width:none}.project-list-view .project-card{grid-template-columns:75px minmax(0,1fr)}.project-list-view .card-body{padding:10px}.project-list-view .project-character-list{grid-template-columns:minmax(0,1fr)}.project-list-view .card-preview{min-height:180px}.dashboard-legend{gap:10px}.dashboard-pagination{flex-wrap:wrap}.character-miniatures img,.character-miniature-empty{width:30px;height:36px}}

.batch-bar{flex-wrap:wrap}.batch-hint{width:100%;font-size:10px;color:#7c8d6b}.default-model-panel .field{margin-top:16px}.default-model-panel select{width:100%}.model-queue-row{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:14px;align-items:start}.model-queue-row .field{min-width:0}.queue-limit-field input{width:100%}.auto-run-notice{display:flex;align-items:center;justify-content:space-between;gap:12px}

.result-grid,.assembly-export-grid{align-items:start}.result-grid .result-item,.assembly-export-grid .result-item{margin-top:0;min-width:0}.results-history .segment-video-preview img,.results-history .segment-video-preview video{height:260px}.results-current .segment-video-preview img,.results-current .segment-video-preview video{height:360px}.results-generation-note{margin:15px 0 0}

.model-default-hint{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px;font-size:10px;line-height:1.6;color:#879579;flex-wrap:wrap}.default-model-panel .field small{display:block;margin-top:6px}
.ethnicity-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px;margin:18px 0}.ethnicity-checks label{display:flex;align-items:center;gap:8px;font-size:13px}.ethnicity-checks input{width:16px;height:16px;accent-color:#87a851}.ethnicity-settings p{line-height:1.7}.ethnicity-settings #ethnicity-save-status{font-size:12px}
.image-model-row{flex-wrap:wrap;gap:10px 20px}.image-model-row>.field{flex:0 1 280px}.image-model-row>p{flex:1 1 240px;margin:0}.image-model-row>.model-default-hint{order:1;flex-basis:100%;margin:0}
.step-error-context{margin-top:8px;font-size:11px;line-height:1.6}.step-error-next{padding:8px 10px;border-left:2px solid currentColor;background:#fff9f2;border-radius:3px;font-size:12px}

.direct-source-input{max-width:260px;margin:18px 0}.direct-source-input h4{margin:0 0 10px}.direct-source-input .segment-video-preview{max-height:270px}
.wardrobe-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.wardrobe-edit{flex-shrink:0;padding:7px}.wardrobe-edit svg{width:16px;height:16px}.wardrobe-editor[hidden]{display:none}.wardrobe-editor textarea{width:100%;box-sizing:border-box;resize:vertical}.wardrobe-actions{display:flex;gap:8px;margin:12px 0}.wardrobe-editor .field{margin-top:12px}
.cast-variables{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cast-variables .field{min-width:0}.cast-variables select{width:100%}.cast-variables .custom-ethnicity{grid-column:1/-1}.cast-variables .custom-ethnicity[hidden]{display:none}.ethnicity-current{display:block;color:#7b8972;line-height:1.6;margin:0 0 12px}.wardrobe-actions{flex-wrap:wrap}@media(max-width:600px){.cast-variables{grid-template-columns:1fr}}

.custom-video-images{margin:18px 0 24px;padding:18px;border:1px solid #dfe5d6;border-radius:12px}.custom-video-images h4{margin:0}.custom-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:12px;max-height:420px;overflow:auto;margin:14px 0}.custom-image-card{position:relative;min-width:0;padding-bottom:8px}.custom-image-card>img{display:block;width:100%;height:140px;object-fit:contain;background:#f2f3ec;border-radius:8px;cursor:zoom-in}.custom-image-card>strong,.custom-image-card>small{display:block;margin-top:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.custom-image-card>small{color:#7c8d6b;font-size:11px}.custom-image-delete{position:absolute;top:6px;right:6px;background:#fff;border:1px solid #ebcdc5;border-radius:7px;padding:6px;cursor:pointer;color:#b64c3b}.custom-image-delete svg{width:16px;height:16px;display:block}.custom-image-delete:hover{background:#fff1ec}.custom-image-error{color:#b64c3b;font-size:13px}

.portrait-upload-area{position:relative;cursor:pointer;min-height:86px;box-sizing:border-box}.portrait-upload-area input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.portrait-upload-area p{margin:0}.portrait-upload-area:hover,.portrait-upload-area:focus-within{background:#edf4e1;border-color:#8fad5e}.portrait-upload-area:focus-within{outline:2px solid #8fad5e;outline-offset:2px}.portrait-upload-area[aria-disabled="true"],.portrait-upload-area input:disabled{cursor:default}.portrait-upload-area[aria-disabled="true"]{opacity:.65}
.cast-current-portrait{position:relative}.portrait-upload-icon{position:absolute;right:12px;bottom:12px;display:grid;place-items:center;width:44px;height:44px;border:1px solid #b6c69f;border-radius:10px;background:#f6faef;color:#496b37;box-shadow:0 2px 9px #18241125;cursor:pointer;overflow:hidden}.portrait-upload-icon>svg{width:22px;height:22px}.portrait-upload-icon>input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.portrait-upload-icon:hover,.portrait-upload-icon:focus-within{background:#dff1ba;border-color:#779e4d}.portrait-upload-icon:focus-within{outline:2px solid #779e4d;outline-offset:2px}.portrait-upload-icon[aria-disabled="true"]{opacity:.5}.portrait-upload-icon[aria-disabled="true"]>input{cursor:not-allowed}.portrait-upload-progress{display:none}.portrait-upload-icon.is-uploading>svg{display:none}.portrait-upload-icon.is-uploading>.portrait-upload-progress{display:block;width:20px;height:20px}.portrait-upload-icon.is-uploading,.portrait-upload-icon.is-uploading>input{cursor:wait}

.source-upload-panel{margin:24px 40px 0;padding:18px 22px;border:1px solid #d5dfc6;border-radius:12px;background:#f3f7ec;overflow-wrap:anywhere}.source-upload-panel[hidden]{display:none}.source-upload-panel p{margin:8px 0;font-size:13px}.source-upload-panel progress{width:100%;height:10px;accent-color:#87a851}.source-upload-panel details{margin:12px 0;color:#b64c3b;font-size:13px}.source-upload-panel li{margin:6px 0}.source-upload-panel .panel-head{margin-bottom:0}#variants{width:100%;box-sizing:border-box}#variants-hint{display:block;margin-top:7px;color:var(--muted)}@media(max-width:700px){.source-upload-panel{margin:16px 16px 0;padding:16px}}

/* Every workflow step shares the title-level status and error area. */
.detail-heading{scroll-margin-top:24px}
.detail-heading{margin-bottom:14px}.detail-status{margin:0 0 24px;min-width:0;scroll-margin-top:20px}.step-status-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;margin-bottom:10px}.step-status-summary strong{font-weight:550}.step-state-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:6px;font-size:11px;background:#eef0eb;color:#85907d}.step-state-pill:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.step-state-pill.state-done{color:#4e7c42;background:#ecf4e4}.step-state-pill.state-running{color:#987323;background:#fff4d9}.step-state-pill.state-error{color:#bb5948;background:#fff0e9}.step-status-detail{font-size:12px;color:var(--muted);line-height:1.7;margin:0}.detail-status .busy-notice,.detail-status .notice{margin:10px 0 0}.detail-status .busy-notice>span:last-of-type{min-width:0;overflow-wrap:anywhere}.detail-status .step-error>p{max-height:180px;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap}.detail-status .step-error .secondary-actions{margin-top:10px}.detail-status .busy-notice .button{margin-left:auto;flex-shrink:0}.cast-member,[id^="video-segment-"]{scroll-margin-top:20px}@media(max-width:700px){.detail-status{margin-left:0}.detail-status .busy-notice{flex-wrap:wrap}.step-status-summary{font-size:12px}}

.dashboard-selection{margin:0 0 12px;font-size:12px;color:var(--muted)}.dashboard-selection label{display:inline-flex;align-items:center;gap:7px;cursor:pointer}.dashboard-selection input{width:16px;height:16px;accent-color:#53754b}.task-status.review{background:#edf3ff;color:#5989c8}
.project-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.card-foot .project-delete{display:inline-flex;align-items:center;gap:5px;color:var(--danger);border-radius:5px;padding:4px}.project-delete svg{width:14px;height:14px}.project-delete:hover,.project-delete:focus-visible{background:#fff0e9}#delete-project-name{overflow-wrap:anywhere}#delete-project-members{max-height:140px;overflow:auto;overflow-wrap:anywhere}@media(max-width:700px){.project-card .card-foot{flex-wrap:wrap;gap:8px}.project-actions{margin-left:auto;gap:10px}}

/* Navigation and project heading are outside the content scroll area. */
:root{--page-gutter:40px}
html,body{height:100%;overflow:hidden}
.app-shell{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.topbar{position:relative;flex-shrink:0;z-index:30}
.detail-header{position:relative;flex-shrink:0;background:var(--bg);border-bottom:1px solid var(--line);z-index:29}
.detail-header[hidden]{display:none}
.detail-heading{max-width:1680px;width:100%;margin:0 auto;padding:16px var(--page-gutter)}
.detail-heading>div{min-width:0}
.detail-heading h1{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
main{flex:1;min-height:0;width:100%;overflow-y:auto;overscroll-behavior:contain;scroll-padding-top:16px;padding-top:24px}
.source-column{top:16px}
.source-upload-panel{flex-shrink:0;max-height:30vh;overflow-y:auto}
@media(max-width:1200px){:root{--page-gutter:28px}}
@media(max-width:700px){:root{--page-gutter:15px}.detail-heading{padding-top:12px;padding-bottom:12px}main{padding-top:18px}}
.project-character-toolbar{display:flex;align-items:center;margin:0 0 9px}.project-character-toolbar .button{display:inline-flex;align-items:center;gap:5px}.project-character-toolbar svg{width:14px;height:14px}.project-character-toolbar+.project-character-list{width:100%}#create-characters-count{width:100%;margin-top:8px}#create-characters-error{color:#ad4c3c;font-size:12px;line-height:1.7}

/* Keep batch actions reachable while selecting projects deep in the list. */
.dashboard-back-top{position:fixed;right:24px;bottom:28px;z-index:25;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #a8c379;border-radius:50%;background:var(--lime);color:#263022;box-shadow:0 4px 16px #26391626}
.dashboard-back-top[hidden]{display:none}
.videolab-login-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.videolab-login-panel [hidden]{display:none}
.videolab-login-panel #videolab-remote-login{margin-top:16px}
.dashboard-back-top:hover{background:#c8eb6b;box-shadow:0 6px 20px #26391633}
.dashboard-back-top:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.task-drawer-open .dashboard-back-top{right:354px}
@media(max-width:700px){.dashboard-back-top{right:16px;bottom:20px}.task-drawer-open .dashboard-back-top{visibility:hidden}}
#dashboard-batch-bar{position:sticky;top:-24px;z-index:20;box-shadow:0 5px 16px rgba(32,43,29,.12)}
#dashboard-batch-bar[hidden]{display:none}
@media(max-width:700px){#dashboard-batch-bar{top:-18px}}
.enhancement-choice{display:flex;align-items:center;gap:10px;cursor:pointer}
.enhancement-choice input{width:18px;height:18px;accent-color:var(--accent,#91b15a)}
.character-enhancement-preview img{display:block;width:min(100%,280px);height:auto;max-height:360px;object-fit:contain;border-radius:8px;cursor:zoom-in;margin:12px 0}
.project-character-open{display:flex;align-items:center;gap:9px;flex:1;min-width:0;padding:0;text-align:left;border-radius:4px}.character-selection{display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;padding:3px}.character-selection input{margin:0;width:15px;height:15px}.project-character.is-selected{outline:2px solid #8cab61;outline-offset:1px}.project-character-open:focus-visible{outline:2px solid var(--character-state);outline-offset:2px}
.character-video-preview{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;padding:0;border:1px solid var(--character-state);border-radius:6px;color:#394332;background:#ffffff99;cursor:pointer}.character-video-preview svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.character-video-preview:hover{background:#fff}.character-video-preview:focus-visible{outline:2px solid var(--character-state);outline-offset:2px}
.card-source-preview{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:transparent;cursor:pointer}.card-source-preview>img{width:100%;height:100%;object-fit:contain;object-position:center}.card-source-preview:focus-visible{outline:3px solid var(--lime);outline-offset:-3px}.source-preview-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#0009;color:#fff;opacity:0;pointer-events:none}.source-preview-play svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}.card-source-preview:hover .source-preview-play,.card-source-preview:focus-visible .source-preview-play{opacity:1}
.library-selection-bar{position:sticky;top:-24px;z-index:20;box-shadow:0 5px 16px rgba(32,43,29,.12)}.library-select-all{display:flex;align-items:center;gap:8px;font-size:12px}.library-video-selection{display:flex;align-items:center;justify-content:center;cursor:pointer}.library-video-selection input{margin:0}.library-row{grid-template-columns:22px 80px minmax(0,1fr) 165px auto}.library-row.is-selected{background:#f3f8eb}.library-selection-bar .selection-count{margin-right:auto}
@media(max-width:1200px){.library-row{grid-template-columns:22px 72px minmax(0,1fr) auto}.library-row time{grid-column:3}.library-actions{grid-column:4;grid-row:1/3}.library-video-selection{grid-column:1;grid-row:1/3}}
@media(max-width:700px){.library-selection-bar{top:-18px}.library-row{grid-template-columns:22px 64px minmax(0,1fr)}.library-row time{grid-column:3}.library-actions{grid-column:2/4;grid-row:auto}.library-selection-bar .selection-count{width:auto}}

.portrait-history>summary{font-size:12px;font-weight:600;cursor:pointer;margin-bottom:10px}
.character-enhancement-preview .enhancement-controls{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px;margin:16px 0}
.enhancement-controls .enhancement-fallback{display:flex;align-items:center;gap:8px;min-height:36px;font-size:11px;line-height:1.5;margin:0}
.enhancement-fallback input{margin:0;flex-shrink:0}
.enhancement-prompt-editor .actions{justify-content:flex-end;margin:8px 0 16px}
.enhancement-result{margin:16px 0}
.enhancement-result>small{display:block;color:var(--muted);font-size:11px}
.enhancement-result details{margin-top:10px;font-size:11px}
.enhancement-footer{border-top:1px solid var(--line);padding-top:12px;margin-top:16px}
.enhancement-footer>p{margin:0 0 10px}

/* Keep the editable prompt next to its generated reference image. */
.character-enhancement-preview{container-type:inline-size}
.character-enhancement-preview:has(>.enhancement-result){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.8fr);column-gap:24px;align-items:start}
.character-enhancement-preview:has(>.enhancement-result)>*{grid-column:1/-1;min-width:0}
.character-enhancement-preview:has(>.enhancement-result)>.enhancement-prompt-editor{grid-column:1}
.character-enhancement-preview:has(>.enhancement-result)>.enhancement-result{grid-column:2;margin:0}
.character-enhancement-preview:has(>.enhancement-result)>.enhancement-prompt-editor textarea{min-height:340px}
.character-enhancement-preview .enhancement-result>img{width:100%;max-height:440px;margin-top:0}
@container(max-width:580px){
  .character-enhancement-preview:has(>.enhancement-result)>.enhancement-prompt-editor,
  .character-enhancement-preview:has(>.enhancement-result)>.enhancement-result{grid-column:1/-1}
  .character-enhancement-preview:has(>.enhancement-result)>.enhancement-prompt-editor textarea{min-height:220px}
  .character-enhancement-preview .enhancement-result>img{max-width:360px}
}
.logo-replacement-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,1fr);gap:16px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line,#dfe5d8)}
.logo-replacement-row small{display:block;margin-top:5px}
.assembly-logo-replacement>.field{margin-top:16px}
@media(max-width:700px){.logo-replacement-row{grid-template-columns:1fr}}

/* Video routes share the workbench's form and panel vocabulary. */
.video-route-tabs{display:flex;gap:8px;margin-bottom:18px}
.video-route-tabs button{border:1px solid var(--border,#d8dece);border-radius:10px;padding:12px 24px;background:#fff;color:inherit;font:inherit;cursor:pointer}
.video-route-tabs button[aria-selected="true"]{background:var(--accent,#d9f58b);border-color:#829d54;font-weight:600}
.batch-video-route{width:auto;min-width:110px;cursor:pointer}
.rebuild-steps{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.rebuild-steps span{padding:7px 12px;background:#f1f5e9;border-radius:8px;font-size:13px}
.rebuild-pair{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:12px 0}.rebuild-pair img{width:100%;max-height:640px;object-fit:contain;background:#f6f7f1;border-radius:10px;margin-top:8px}
.rebuild-grid{border-top:1px solid #e2e6da;margin-top:16px;padding-top:12px}.rebuild-grid pre{white-space:pre-wrap;word-break:break-word;font-size:13px;max-height:360px;overflow:auto}
.empty-grid{padding:24px;background:#f6f7f1;border-radius:10px;margin:16px 0;color:#6c785e}
@media(max-width:700px){.rebuild-pair{grid-template-columns:1fr}.video-route-tabs button{flex:1;padding:12px}.rebuild-pair img{max-height:520px}}

/* Account entry and scoped settings use the existing form components. */
.auth-page{display:flex;align-items:flex-start;justify-content:center;height:100vh;min-height:100vh;overflow-y:auto;padding:32px;background:#f6f7f2}
.auth-card{flex:none;width:min(460px,100%);height:auto;padding:32px;margin:0}.auth-card h1{font-size:26px;margin-top:30px}.auth-card form{display:grid;gap:18px}.auth-card [hidden]{display:none}.auth-tabs,.settings-tabs{display:flex;gap:10px;margin:22px 0}.auth-footer{font-size:12px;margin:24px 0 0}.auth-card .field input{width:100%;box-sizing:border-box}.auth-card #auth-submit{width:100%;justify-content:center}
.account-menu{display:flex;gap:12px;align-items:center}.account-menu>span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.account-menu small{display:block;color:#79836e;font-size:11px}.user-management-panel{grid-column:1/-1}.user-management-list{display:grid;gap:12px}.user-management-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(140px,190px) 80px 64px;gap:20px;align-items:center;border-top:1px solid #e4e8df;padding:16px 0}.user-management-row>div small{display:block;color:#7d8972;overflow-wrap:anywhere}.user-management-row .field{margin:0}
@media(max-width:720px){.user-management-row{grid-template-columns:1fr 1fr;gap:12px}.account-menu>span{max-width:100px}.auth-page{padding:16px}.auth-card{padding:24px}}
.platform-update-panel{grid-column:1/-1}
.platform-update-panel .inline-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.update-log{border-top:1px solid var(--border,#dfe4d8);padding:14px 0;overflow-wrap:anywhere}
.update-log summary{cursor:pointer;font-weight:600}
.update-events{margin-top:12px}
.update-log li{margin:8px 0}
.app-version{font-size:12px;color:var(--muted,#788171);white-space:nowrap;font-variant-numeric:tabular-nums}
