:root{color-scheme:dark;--bg:#17191b;--panel:#1e2023;--raised:#27292d;--line:#323438;--text:#eceeea;--muted:#939792;--accent:#dfa275;--green:#a3bfab;--purple:#b6a6c9;--amber:#d9b079;--font:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:13px/1.65 var(--font);letter-spacing:.1px}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.4}button,a{touch-action:manipulation}button{background:none;border:0}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input:focus,textarea:focus,select:focus{outline:none;border-color:#9d7b60!important;box-shadow:0 0 0 2px #dfa27512}svg{flex-shrink:0;vertical-align:middle}h1,h2,h3,p{margin:0}h1{font-size:26px;font-weight:600;letter-spacing:1px;line-height:1.4}h2{font-size:16px;font-weight:600}h3{font-size:13px;font-weight:600}small{font-size:11px;color:var(--muted)}.shell{display:grid;grid-template-columns:68px 204px minmax(0,1fr);min-height:100vh}.rail{height:100vh;position:sticky;top:0;border-right:1px solid #ffffff08;background:#141618;display:flex;flex-direction:column;align-items:center;padding:22px 0;gap:19px}.mark{font-size:25px;font-weight:700;color:#ecc6a5;line-height:1;margin:1px 0 26px;letter-spacing:-5px}.mark span{font-size:30px;display:inline-block;color:var(--accent);transform:translate(2px,1px)}.rail-button{width:42px;height:42px;border-radius:10px;color:#757b79;display:grid;place-items:center;transition:.18s}.rail-button:hover{background:#ffffff08;color:#deded8}.rail-button.active{color:#edba92;background:#dfa27517}.rail-bottom{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:25px}.avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#535e56;color:#e4e8e1;font-size:11px}.sidebar{background:#1b1d1f;position:sticky;top:0;height:100vh;padding:24px 17px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{font-size:19px;font-weight:600;display:flex;align-items:center;gap:8px;letter-spacing:1px}.brand span{font-size:8px;font-weight:500;color:#b1b2a6;border:1px solid #606355;padding:0 4px;letter-spacing:1.2px;border-radius:3px}.space-label{font-size:10px;color:#7e857f;margin:39px 8px 12px;display:flex;justify-content:space-between;letter-spacing:1px}.space-label span{font-size:8px}.project-picker{border:1px solid #42413b;background:linear-gradient(110deg,#38332d80,#282a2a);border-radius:8px;width:100%;padding:12px 9px;display:flex;align-items:center;gap:10px;text-align:left}.project-icon{display:grid;place-items:center;color:#ddb38c;background:#b58a5726;border-radius:6px;width:32px;height:37px}.project-picker strong{font-size:12px;font-weight:500;display:block;width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-picker small{display:block;color:#9b9b90;font-size:9px;margin-top:2px}.project-picker>svg{margin-left:auto;color:#8d918b}.side-nav{display:flex;flex-direction:column;gap:7px;margin-top:30px}.side-nav>button{display:flex;gap:12px;align-items:center;padding:11px 11px;text-align:left;color:#999f99;border-radius:7px;font-size:12px}.side-nav>button:hover{background:#ffffff06;color:#dcded9}.side-nav>button.active{background:#dfa27512;color:#ebc3a4;box-shadow:inset 2px 0 #d8aa83}.side-nav b{font-size:10px;margin-left:auto;background:#dfa27522;padding:0 5px;border-radius:4px}.side-bottom{margin-top:auto;padding:23px 10px 0}.local-dot{font-size:9px;color:#939b90}.local-dot:before,.live-dot,.mini-dot{content:'';width:5px;height:5px;border-radius:50%;background:#9fbd9c;display:inline-block;margin-right:6px}.side-bottom p{font-size:12px;line-height:1.9;color:#696f69;margin:18px 0 19px}.side-bottom button{font-size:10px;color:#90968e}main{min-width:0}.topbar{height:64px;padding:0 30px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:#1a1c1d}.breadcrumbs{display:flex;gap:13px;align-items:center;font-size:11px;color:#7f8680}.breadcrumbs span{color:#c5c9c2}.top-actions{display:flex;gap:21px;align-items:center}.save-status{font-size:10px;display:flex;align-items:center;gap:6px;color:#9baf9b}.save-status.error{color:#e1ad82}.content{padding:30px 30px 26px;max-width:1860px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:20px}.eyebrow{font-size:8px;letter-spacing:1.8px;line-height:1.5;color:#888f85;margin-bottom:8px}.page-heading h1+p{color:#939a91;margin-top:7px;font-size:11px;letter-spacing:.5px}.heading-actions{display:flex;gap:9px}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 13px;border-radius:6px;font-size:11px;font-weight:500;line-height:1.5;white-space:nowrap;transition:background .15s}.button.primary{background:#ddb08b;color:#26231f;box-shadow:inset 0 1px 0 #ffffff20}.button.primary:hover:not(:disabled){background:#edc5a4}.button.subtle{background:#272a2b;border:1px solid #3b3f3d;color:#c9cec6}.button.subtle:hover:not(:disabled){background:#333737}.button.small{padding:6px 10px;font-size:10px}.button.full{width:100%;margin-top:10px}.text-button{font-size:11px;color:#a8afa6;display:inline-flex;gap:6px;align-items:center;padding:0}.text-button:hover{color:#e2c09f}.text-button.accent{color:#d4b08c}.icon-button{display:inline-flex;align-items:center;justify-content:center;color:#9ba298;width:26px;height:26px;border-radius:5px;padding:0}.icon-button:hover:not(:disabled){background:#ffffff09;color:#e1c1a4}.production-strip{border:1px solid var(--line);border-radius:7px 7px 0 0;padding:12px 16px;display:flex;justify-content:space-between;font-size:10px;color:#a0a79c;background:#202324;gap:15px}.production-strip>span{display:flex;align-items:center;gap:7px}.production-strip b{color:#4e554b;font-weight:400;margin:0 7px}.production-strip .live-dot{width:6px;height:6px;margin-right:3px;background:#c5a17f}.mini-dot{width:4px;height:4px;margin:0 0 0 13px}.mini-dot.violet{background:var(--purple)}.mini-dot.amber{background:var(--amber)}.board{display:grid;grid-template-columns:188px minmax(300px,1fr) 231px;border:1px solid var(--line);border-top:0;border-radius:0 0 9px 9px;overflow:hidden;min-height:750px;background:#1b1e1f}.shot-list{border-right:1px solid var(--line);background:#1b1e1e;padding:15px 11px;display:flex;flex-direction:column;min-width:0}.shot-list-head{display:flex;align-items:center;justify-content:space-between;padding:0 3px}.shot-list-head strong{font-weight:500;font-size:11px}.shot-list-head strong span{font-size:9px;color:#899184;background:#31362f;padding:1px 4px;border-radius:3px;margin-left:4px}.filters{display:flex;background:#121515;margin:15px 1px;padding:3px;border-radius:5px;gap:2px}.filters button{color:#939b8e;font-size:9px;padding:4px 5px;flex:1;border-radius:3px;white-space:nowrap}.filters button.active{background:#343a33;color:#d0d9c8}.filters button span{font-size:8px;margin-left:2px;color:#8f9c87}.shot-scroll{display:flex;flex-direction:column;gap:13px}.shot-card{text-align:left;padding:7px;width:100%;border:1px solid transparent;border-radius:6px;background:#222626}.shot-card.active{border-color:#c4a47e;background:#c8a1710c;box-shadow:0 0 0 1px #c4a47e10}.shot-thumb{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:3px;background:#292f2e}.shot-thumb img,.shot-thumb>.scene-art{width:100%;height:100%;object-fit:cover;display:block}.shot-thumb>.scene-art{opacity:.83}.shot-tag{position:absolute;top:6px;left:6px;font-size:8px;color:#d8dfd0;background:#151a16bd;padding:1px 4px;border-radius:2px;font-variant-numeric:tabular-nums}.duration{position:absolute;right:5px;bottom:5px;font-size:8px;color:#e6e9df;background:#10161399;padding:0 4px;border-radius:2px}.plan-label{position:absolute;left:7px;bottom:5px;font-size:7px;color:#ccd0c2;letter-spacing:1px;text-shadow:0 1px 3px black}.shot-card-title{font-size:10px;margin:9px 0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shot-card-meta{display:flex;align-items:center;justify-content:space-between;font-size:8px;color:#7f8a78}.status{display:inline-flex;align-items:center;font-size:9px;white-space:nowrap;gap:5px}.status:before{content:'';display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.status.muted{color:#9ba393}.status.good{color:#a9c2a0}.status.warn{color:#d4b081}.status.purple{color:#b7acc6}.add-shot{margin-top:17px;border:1px dashed #434b3f;border-radius:5px;padding:8px;font-size:10px;color:#9daa94;display:flex;align-items:center;justify-content:center;gap:4px}.shot-editor{padding:22px 22px 25px;min-width:0;background:#1e2122}.editor-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.editor-heading .eyebrow{font-size:8px;letter-spacing:1.5px;color:#b3a48b;margin-bottom:5px}.editor-heading h2{font-size:17px;letter-spacing:.5px;font-weight:500}.reorder{display:flex;gap:2px}.preview{position:relative;background:#121716;aspect-ratio:16/9;border-radius:5px;overflow:hidden;display:flex;align-items:center;justify-content:center;border:1px solid #3b4239}.preview:after{pointer-events:none;content:'';position:absolute;inset:0;box-shadow:inset 0 0 80px #0002}.preview>.scene-art{display:block;width:100%;height:100%}.preview>img,.preview>video{width:100%;height:100%;object-fit:contain;display:block;position:relative;z-index:1}.preview>audio{width:85%;z-index:1}.preview-caption{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;padding:8px 11px;background:linear-gradient(transparent,#121814b3);font-size:8px;color:#c0c9b7;pointer-events:none}.preview:has(video) .preview-caption{display:none}.candidate-section{margin:21px 0 20px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.section-title span{font-size:10px;color:#909b85}.section-title h3 span{font-size:9px;margin-left:5px;color:#7f8c74}.candidate-section .section-title{margin-bottom:10px}.candidate-section .text-button{font-size:10px}.candidates{display:flex;flex-wrap:wrap;gap:7px}.candidate-empty{border:1px dashed #3e4738;border-radius:5px;padding:12px;width:100%;font-size:10px;color:#8f9a83;line-height:1.8}.candidate{border:1px solid #414c3c;border-radius:5px;padding:8px 10px;display:flex;gap:7px;align-items:center;font-size:10px;color:#abb69f}.candidate.active{background:#414c3c50;border-color:#8b997b}.candidate b{font-size:8px;color:#a3bf90;display:flex;align-items:center;gap:3px}.candidate-controls{display:flex;align-items:center;justify-content:space-between;margin-top:12px}.candidate-controls>span{font-size:9px;color:#8f9a83}.editor-tabs{border-bottom:1px solid var(--line);display:flex;gap:25px;margin-top:25px}.editor-tabs button{font-size:11px;color:#949e8d;padding:0 0 11px;position:relative}.editor-tabs button.active{color:#e2c5a5}.editor-tabs button.active:after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#d0aa80}.editor-fields{padding-top:18px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;min-width:0}.field>span{font-size:10px;color:#a6af9e}.field input,.field textarea,.field select{background:#191d1d;border:1px solid #3b4239;border-radius:5px;color:#d3dacb;padding:9px 10px;width:100%;font-size:11px;line-height:1.8;transition:border .15s;resize:vertical}.field input{height:36px}.field textarea{min-height:62px}.field textarea::placeholder,.field input::placeholder{color:#687261}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:13px}.inspector{padding:24px 17px;background:#1c2020;border-left:1px solid var(--line);display:flex;flex-direction:column;min-width:0}.inspector>.section-title{margin-bottom:23px}.inspector .section-title h3{font-size:11px}.inspector-divider{height:1px;background:var(--line);margin:8px 0 19px}.hint{font-size:10px;line-height:1.9;color:#8f9b83}.references{display:flex;flex-direction:column;gap:6px;margin:12px 0 14px}.reference{display:flex;align-items:center;gap:9px;padding:7px;border-radius:5px;background:#282d28;font-size:10px;cursor:pointer}.reference.unavailable{background:#232824;opacity:.7;cursor:default}.reference input{appearance:none;border:1px solid #79896c;width:11px;height:11px;margin:0;border-radius:3px;cursor:inherit;flex-shrink:0}.reference input:checked{background:#bfa27c;border-color:#bfa27c;box-shadow:inset 0 0 0 2px #293024}.reference-avatar{width:30px;height:30px;background:#3a4235;border-radius:4px;display:grid;place-items:center;color:#b8c8a9;font-size:12px;overflow:hidden}.reference-avatar img{height:100%;width:100%;object-fit:cover}.reference small{display:block;font-size:8px;color:#839076;margin-top:1px}.generation-route{margin-top:2px}.generation-route>.eyebrow{font-size:8px;margin-bottom:9px}.generation-route strong{font-size:12px;letter-spacing:.3px}.generation-route p{font-size:10px;color:#8f9d83;margin:7px 0 15px;line-height:1.8}.generation-route .button{font-size:10px;padding:9px}.inspector-bottom{margin-top:auto;padding-top:26px;color:#718066;font-size:9px;display:flex;align-items:center;gap:5px}.panel{border:1px solid var(--line);background:#1f2322;border-radius:9px;padding:24px;min-width:0}.panel h2{font-size:15px}.panel+.panel{margin-top:20px}.panel-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.panel-footer>span{font-size:10px;color:#8b9881}.script-layout,.settings-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:20px}.script-layout>.panel+.panel,.settings-layout>.panel+.panel{margin-top:0;height:fit-content}.callout{background:#333c2e77;border:1px solid #48503e;border-radius:6px;padding:15px;margin:7px 0 20px}.callout strong{font-size:12px;color:#c6d2bb}.callout p{font-size:11px;line-height:1.9;color:#9fae92;margin:8px 0 13px}.callout p:last-child{margin-bottom:0}.section-title.mini{margin-top:29px}.revision-row{display:flex;align-items:center;gap:10px;width:100%;padding:15px 0;border-bottom:1px solid var(--line);text-align:left;font-size:11px;color:#c9d5bd}.revision-row span{flex:1}.revision-row small{display:block;font-size:9px;color:#8c9a7f;margin-top:3px}.revision-text{white-space:pre-wrap;color:#c5d2b8;line-height:2;font-family:inherit;font-size:12px;max-height:65vh;overflow:auto}.asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:21px}.asset-card{background:#202623;border:1px solid var(--line);border-radius:9px;overflow:hidden}.asset-preview{aspect-ratio:16/10;display:grid;place-items:center;background:linear-gradient(130deg,#454f4380,#242e29);position:relative}.asset-preview.character{background:radial-gradient(ellipse at 50% 90%,#5f67507a,transparent),#2a332c}.asset-preview.scene{background:linear-gradient(145deg,#4b514780,#26312f)}.asset-preview>img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.asset-preview audio{width:90%}.asset-symbol{color:#8d9b7f;display:flex;align-items:center;justify-content:center;font-size:38px;font-weight:200}.asset-symbol span{width:85px;height:85px;display:grid;place-items:center;border-radius:50%;background:#77856522;border:1px solid #a5b18d33}.asset-empty-label{position:absolute;bottom:16px;font-size:9px;letter-spacing:1px;color:#93a386}.asset-info{padding:20px}.asset-info .eyebrow{font-size:8px;letter-spacing:1.2px;color:#9dab8d}.asset-info h2{font-size:17px;margin:7px 0}.asset-info p{font-size:11px;color:#9cae8e;line-height:1.9;min-height:43px}.asset-actions{margin-top:18px;display:flex;justify-content:space-between;align-items:center}.overview-hero{display:grid;grid-template-columns:1fr 43%;background:#252c27;border:1px solid #4c5546;border-radius:9px;overflow:hidden;min-height:245px}.overview-hero>div:first-child{padding:32px}.overview-hero h2{font-size:30px;letter-spacing:2px;margin:12px 0 6px}.overview-hero p{font-size:11px;color:#a3b494;margin-bottom:23px}.pill{font-size:9px;color:#bfcab6;background:#ffffff08;border:1px solid #707b663b;padding:4px 7px;border-radius:4px}.hero-art{position:relative;overflow:hidden;min-height:245px}.hero-art svg{width:100%;height:100%;object-fit:cover}.hero-art>span{position:absolute;right:14px;bottom:10px;color:#a4b199;font-size:8px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:20px 0}.metric{border:1px solid var(--line);background:#222823;border-radius:8px;padding:18px 20px}.metric>span{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#9dae90}.metric strong{font-size:30px;font-weight:400;color:#d6dfcd;display:block;line-height:1.3;margin-top:13px;font-variant-numeric:tabular-nums}.metric small{font-size:10px;color:#8b9d7c;margin-left:9px}.progress-track{height:4px;background:#323d2b;border-radius:2px;overflow:hidden;margin:23px 0 10px}.progress-track span{display:block;height:100%;background:#a3b98b}.overview-shots>button{width:100%;display:flex;align-items:center;text-align:left;gap:19px;padding:20px 0;border-bottom:1px solid var(--line)}.overview-shots>button:last-child{border-bottom:0}.shot-number{font:12px ui-monospace,SFMono-Regular,monospace;color:#9eae8f}.overview-shots strong{font-size:12px;font-weight:400;display:block}.overview-shots small{font-size:9px;display:block;margin-top:4px}.overview-shots .status{margin-left:auto}.overview-shots>button>svg{margin-left:10px;color:#849775}.review-row{display:flex;align-items:center;gap:22px;padding:20px 0;border-bottom:1px solid var(--line)}.review-row:last-child{border:0}.review-shot{width:140px;aspect-ratio:16/9;position:relative;overflow:hidden;border-radius:4px}.review-shot svg{width:100%;height:100%}.review-shot>span{position:absolute;top:5px;left:6px;font-size:8px;background:#182017aa;border-radius:2px;padding:0 5px}.review-copy{flex:1}.review-copy h3{font-size:13px;font-weight:500}.review-copy p{font-size:10px;color:#b3c2a3;white-space:pre-wrap;margin:5px 0}.review-copy small{font-size:9px;color:#889e76}.review-row>.button{margin-left:15px}.export-layout{display:grid;grid-template-columns:1fr 300px;gap:20px}.export-layout>.panel+.panel{margin:0;height:fit-content}.export-row{display:flex;align-items:center;gap:18px;padding:19px 0;border-bottom:1px solid var(--line)}.export-row:last-child{border-bottom:0}.export-row>div{flex:1;min-width:0}.export-row strong{font-size:12px;font-weight:400;display:block}.export-row small{display:block;font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.export-row>span:nth-last-child(2){font-size:11px;color:#b5c4a4}.export-info{padding:26px}.export-info h2{font-size:18px;margin:0 0 12px}.export-info>p{font-size:11px;line-height:1.9;color:#a1b491}.export-info ul{list-style:none;padding:0;margin:25px 0;font-size:11px;color:#bcccae;line-height:2.8}.export-info li{display:flex;align-items:center;gap:9px}.export-info li svg{color:#9dbb87}.export-info>.hint{font-size:10px}.export-info .button{margin-top:8px}.issue-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;font-size:10px;color:#a0b18f}.issue{padding:17px 14px;background:#2d342c;border:1px solid #49523e;border-radius:5px;margin:12px 0}.issue.resolved{opacity:.6}.issue>div{display:flex;gap:12px;align-items:center}.issue-time{font-size:9px;color:#bfcaac;background:#79876822;border-radius:3px;padding:1px 6px}.issue p{font-size:11px;color:#ced7c4;margin:12px 0;white-space:pre-wrap}.issue footer{display:flex;justify-content:space-between;font-size:9px;color:#97a385}.issue .text-button{font-size:9px}.prompt-label{display:flex;justify-content:space-between;color:#a5b595;font-size:10px;gap:10px}.prompt-text{white-space:pre-wrap;font-family:var(--font);font-size:11px;line-height:2;color:#c3d1b6;background:#1b221b;border:1px solid #3b4932;border-radius:6px;padding:17px;max-height:550px;overflow:auto;margin:14px 0}.template-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:25px}.template-tabs>button{padding:5px 8px;border:1px solid #45513b;font-size:10px;border-radius:4px;color:#a3b794}.template-tabs>button.active{border-color:#bead85;background:#8a815c22;color:#dacdaf}.template-heading{display:flex;justify-content:space-between;margin-bottom:16px;align-items:center}.template-heading h3{font-weight:400;font-size:14px}.template-heading .text-button{font-size:10px}.field .template-editor{font-size:11px;line-height:2;min-height:440px}.connection-row{display:flex;justify-content:space-between;align-items:center;font-size:11px;padding:14px 0;border-bottom:1px solid var(--line);color:#bfceaf}.connection-row>span{font-size:9px;color:#899f78}.media-row{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid var(--line);font-size:11px;color:#bacaac}.media-row>span{flex:1;overflow:hidden;text-overflow:ellipsis}.media-row>small{font-size:9px;margin-right:20px}.empty{padding:25px 12px;color:#8fa17e;font-size:11px;line-height:2;text-align:center}.empty.large{padding:60px 20px}.empty.large>svg{margin:0 auto 20px;color:#768a66}.empty h3{font-weight:400;font-size:15px;color:#b7c8a7;margin:10px 0}.empty p{font-size:11px;line-height:2;margin:12px 0 22px}.loading{height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:24px;gap:18px}.loading span{font-size:13px;color:var(--muted)}dialog{background:#222823;border:1px solid #5b6950;border-radius:11px;color:var(--text);padding:28px;width:460px;max-width:calc(100vw - 32px);box-shadow:0 15px 100px #0007}dialog::backdrop{background:#0c140dcc;backdrop-filter:blur(5px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:27px}.dialog-heading h2{font-size:18px;letter-spacing:1px;font-weight:500}.dialog-actions{margin-top:24px;display:flex;justify-content:flex-end;gap:10px}.project-choice{display:flex;width:100%;align-items:center;gap:15px;padding:15px 8px;text-align:left;border-bottom:1px solid var(--line);font-size:13px}.project-choice>span{flex:1}.project-choice small{display:block;font-size:10px;margin-top:5px}.project-choice:hover{background:#ffffff06}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,12px);background:#dde4d5;color:#293025;font-size:12px;max-width:calc(100vw - 32px);box-shadow:0 6px 35px #0004;padding:12px 23px;border-radius:7px;z-index:100;pointer-events:none;opacity:0;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}*{scrollbar-width:thin;scrollbar-color:#4e5a43 transparent}
@media(min-width:1700px){.board{grid-template-columns:220px minmax(400px,1fr) 265px}.shot-editor{padding:26px 30px}.shot-card{padding:10px}.inspector{padding:27px 23px}.shot-card-title{font-size:12px}.shot-card-meta{font-size:9px}}
@media(max-width:1280px){.shell{grid-template-columns:60px 180px minmax(0,1fr)}.sidebar{padding:24px 12px}.brand{font-size:18px}.brand span{font-size:7px}.project-picker strong{width:75px}.content{padding:25px 21px}.topbar{padding:0 22px}.board{grid-template-columns:164px minmax(260px,1fr) 206px}.shot-editor{padding:19px 16px}.inspector{padding:22px 14px}.script-layout,.settings-layout{grid-template-columns:minmax(0,1fr) 250px}.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-tabs{gap:20px}.review-row{gap:13px}.review-shot{width:115px}}
@media(max-width:1100px){.shell{grid-template-columns:60px minmax(0,1fr)}.sidebar{display:none}.content{padding:25px 20px}.board{grid-template-columns:173px minmax(260px,1fr) 216px}.page-heading h1{font-size:24px}}
@media(max-width:850px){.shell{grid-template-columns:52px minmax(0,1fr)}.rail{padding:18px 0}.rail-button{width:36px}.mark{font-size:22px}.content{padding:22px 15px}.topbar{padding:0 15px}.breadcrumbs{font-size:10px;gap:8px}.top-actions{gap:8px}.save-status{font-size:9px}.top-actions .button{display:none}.page-heading{align-items:flex-start}.heading-actions .subtle{display:none}.page-heading h1{font-size:22px}.board{grid-template-columns:143px minmax(0,1fr)}.inspector{grid-column:2;border-top:1px solid var(--line);border-left:0;padding:23px}.shot-list{grid-row:span 2}.shot-editor{padding:19px 15px}.shot-card-meta{font-size:7px}.shot-card-title{font-size:9px}.production-strip{font-size:9px;padding:11px}.production-strip>span:last-child{gap:4px}.production-strip .mini-dot{margin-left:7px}.production-strip b{margin:0 2px}.inspector .references{display:grid;grid-template-columns:1fr 1fr}.inspector .generation-route .button{width:auto;display:inline-flex;margin-right:8px}.inspector-bottom{display:none}.two-col{grid-template-columns:1fr}.two-col .field:last-child{margin-top:-2px}.script-layout,.settings-layout,.export-layout{grid-template-columns:1fr}.script-layout>.panel+.panel,.settings-layout>.panel+.panel,.export-layout>.panel+.panel{margin-top:0}.metrics{gap:10px}.metric{padding:14px}.overview-hero{grid-template-columns:1fr 38%}.review-row{flex-wrap:wrap}.review-copy{min-width:120px}.review-row>.button{margin-left:auto}.review-shot{width:100px}.panel{padding:20px}.export-info h2{font-size:20px}}
@media(max-width:560px){.shell{grid-template-columns:1fr;grid-template-rows:53px minmax(0,1fr)}.rail{height:53px;position:sticky;z-index:20;flex-direction:row;width:100%;padding:0 16px;border-bottom:1px solid var(--line);gap:20px}.mark{font-size:22px;margin:0 auto 0 0}.mark span{font-size:24px}.rail-button{height:33px;width:32px}.rail-bottom{margin:0;display:flex;flex-direction:row;gap:15px}.avatar{width:25px;height:25px;font-size:9px}.topbar{height:45px}.content{padding:20px 12px}.page-heading{margin-bottom:20px;gap:10px}.page-heading h1+p{font-size:10px;max-width:210px;line-height:1.8}.eyebrow{font-size:7px;letter-spacing:1.5px}.heading-actions .button{padding:8px 10px;font-size:10px;margin-top:15px}.production-strip{flex-direction:column;gap:7px}.production-strip>span:last-child .mini-dot:first-child{margin-left:0}.board{display:flex;flex-direction:column;min-height:0}.shot-list{border-right:0;border-bottom:1px solid var(--line);padding:12px}.shot-list-head{padding:0 2px}.filters{position:absolute;right:25px;width:160px;margin:0}.shot-scroll{display:flex;flex-direction:row;overflow-x:auto;gap:10px;padding-top:14px}.shot-card{width:135px;flex-shrink:0}.shot-card-title{font-size:10px}.shot-card-meta{font-size:8px}.add-shot{display:none}.shot-editor{padding:21px 14px}.editor-heading h2{font-size:16px}.inspector{padding:20px 15px}.editor-tabs{gap:26px}.asset-grid{grid-template-columns:1fr;gap:15px}.overview-hero{grid-template-columns:1fr}.overview-hero>div:first-child{padding:26px}.hero-art{display:none}.overview-hero h2{font-size:28px}.metrics{grid-template-columns:1fr 1fr;gap:10px;margin:15px 0}.metric{padding:17px}.metric strong{font-size:28px}.overview-shots>button{gap:10px}.overview-shots strong{font-size:11px}.overview-shots .status{font-size:8px}.panel{padding:17px}.section-title{align-items:flex-start}.section-title>span{font-size:9px;text-align:right}.review-table .section-title>span{max-width:130px}.review-row{gap:13px}.review-shot{width:85px}.review-copy p{font-size:9px}.review-row>.status{margin-left:auto}.review-row>.button{margin-left:auto}.review-copy h3{font-size:12px}.panel-footer{flex-direction:column;align-items:flex-start}.media-row{flex-wrap:wrap}.media-row small{margin-right:0}.media-row>span{max-width:200px}.candidate-controls>span{font-size:8px}.candidate-controls .button{font-size:9px}.prompt-label{font-size:9px}.export-row{gap:12px}.template-tabs{gap:6px}.template-tabs>button{font-size:9px}.template-heading h3{font-size:12px}.template-heading .text-button{font-size:9px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.compact-nav{display:none}
@media(max-width:1100px){.compact-nav{display:flex;gap:7px;margin:0 0 20px;overflow:auto;padding-bottom:4px}.compact-nav>button{font-size:10px;padding:7px 10px;white-space:nowrap;border:1px solid #3d4637;border-radius:5px;color:#a3b496;display:flex;align-items:center;gap:6px}.compact-nav>button.active{color:#dec4a3;background:#b3a27c16;border-color:#8c856b}}

.blank-art{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;gap:14px;background:radial-gradient(ellipse at 50% 55%,#343f32,#242c26);color:#687b5d}.blank-art>span{font-size:10px;letter-spacing:1px}.shot-thumb .blank-art>span{font-size:8px}.shot-thumb .blank-art>svg{width:23px;height:23px}.shot-thumb .blank-art{gap:7px}
/* Production workspace features */
.episode-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 20px;padding:10px 14px;background:#1e2023;border:1px solid var(--line);border-radius:8px}.episode-switch,.episode-toolbar-right,.inline-actions{display:flex;align-items:center;gap:12px}.episode-switch>span{font-size:11px;color:var(--muted)}select,.search-input{background:#17191b;color:var(--text);border:1px solid var(--line);border-radius:6px;padding:8px 10px;max-width:100%}select{min-width:120px}.episode-switch select{min-width:130px}.episode-toolbar-right{font-size:12px}.batch-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 15px;padding:10px 13px;border:1px solid var(--line);border-radius:8px;background:#202226}.batch-toolbar>span{color:var(--muted);font-size:11px;margin-right:6px}.check-inline{display:flex;align-items:center;gap:7px}.check-inline input{accent-color:var(--accent);margin:0}.shot-card{position:relative}.shot-check{position:absolute;top:16px;left:16px;z-index:3;width:20px;height:20px;border:1px solid #ffffff77;border-radius:4px;background:#17191bbd;display:grid;place-items:center}.shot-check.checked{background:var(--accent);border-color:var(--accent);color:#1c1814}.shot-card .shot-tag{left:auto;right:8px}.shot-card .duration{left:8px;right:auto}.collection-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}.collection-toolbar .filters{padding:0;border:0;flex:1}.search-input{min-width:200px}.stack-actions{display:flex;flex-direction:column;gap:10px;margin:16px 0}.danger{color:#dca29a}.alias-tags{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}.alias-tags span{border:1px solid var(--line);color:var(--muted);font-size:10px;border-radius:4px;padding:1px 6px}.asset-preview video,.asset-preview audio{width:100%;max-height:100%}.asset-preview video{object-fit:contain}.asset-info p{white-space:pre-wrap}.asset-actions{gap:12px;flex-wrap:wrap}.catalog-row,.episode-manage-row,.asset-version{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.catalog-row>div,.asset-version>span{flex:1;min-width:0}.catalog-row small,.asset-version small{display:block;overflow-wrap:anywhere}.catalog-row strong{font-size:13px}.catalog-row>.text-button{white-space:nowrap}.episode-manage-row>.text-button:first-child{flex:1;text-align:left}.chapter-preview{max-height:320px;overflow:auto;padding:10px 0}.chapter-preview p{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line)}.revision-actions{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--line)}.revision-actions>.revision-row{flex:1;border:0}.revision-actions .text-button{white-space:nowrap}.inline-error{color:#e0aba3;white-space:pre-wrap;font-size:12px;margin:10px 0}.ref-order{border-top:1px solid var(--line);padding-top:15px;margin-top:12px}.ref-order h3{margin-bottom:10px}.ref-order>div{display:flex;align-items:center;gap:5px;margin:8px 0}.ref-order>div>span:nth-child(2){flex:1;min-width:0;font-size:11px}.ref-order small{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}.ref-slot{font-size:9px;color:var(--accent);border:1px solid #dfa27544;border-radius:3px;padding:1px 4px;white-space:nowrap}.ref-order>.text-button{font-size:10px;margin-top:7px}.compare-button{margin-bottom:15px}.wide-dialog{width:min(1120px,calc(100vw - 40px));max-width:1120px}.compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.compare-grid article{padding:14px;background:#17191b;border:1px solid var(--line);border-radius:8px}.compare-preview{height:260px;margin:12px 0;background:#111;display:flex;align-items:center;justify-content:center}.compare-preview img,.compare-preview video{max-width:100%;max-height:100%}.compiled-list{max-height:65vh;overflow:auto}.compiled-list article{padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:20px}.compiled-list .prompt-text{max-height:270px;overflow:auto;font-size:12px}.job-card{border:1px solid var(--line);border-radius:8px;padding:16px;margin:12px 0;background:#1b1d20}.job-top,.job-summary,.job-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.job-top>strong{flex:1;min-width:120px}.job-top>small{margin-left:auto}.job-summary{justify-content:space-between;color:var(--muted);font-size:11px;margin-top:12px}.job-actions{border-top:1px solid var(--line);padding-top:12px;margin-top:12px}.job-partial{max-height:110px;overflow:auto;white-space:pre-wrap;color:var(--muted);font-size:11px}.media-row{flex-wrap:wrap}.media-row>.text-button{font-size:11px;white-space:nowrap}.edit-shot{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid var(--line)}.edit-shot .export-row{border:0;padding-bottom:10px}.edit-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-left:40px}.edit-controls label{font-size:10px;color:var(--muted);display:flex;flex-direction:column;gap:4px}.edit-controls input,.edit-controls select{width:100%;padding:6px 8px;background:#17191b;border:1px solid var(--line);border-radius:5px;color:var(--text);min-width:0;font-size:12px}.export-info>.text-button{display:block;margin:12px 0}.sequence-media{height:min(55vh,550px);background:#111;display:flex;align-items:center;justify-content:center;flex-direction:column;margin:15px 0}.sequence-media video,.sequence-media img{max-width:100%;max-height:100%}.sequence-media audio{width:90%;margin-top:8px}.sequence-preview .section-title{flex-wrap:wrap}.sequence-preview .section-title span{max-width:75%;color:var(--muted)}.canvas-panel{background:#1b1d20;border:1px solid var(--line);border-radius:9px;overflow:hidden}.canvas-toolbar{padding:12px 15px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.canvas-toolbar .inline-actions{gap:10px}.canvas-toolbar span{font-size:11px;color:var(--muted)}.canvas-viewport{height:640px;min-height:50vh;position:relative;overflow:hidden;background-color:#181a1d;background-image:radial-gradient(#54575c77 1px,transparent 1px);background-size:22px 22px;touch-action:none;cursor:grab}.canvas-viewport.dragging{cursor:grabbing}.canvas-stage{position:absolute;left:0;top:0;width:6000px;height:4000px;transform-origin:0 0}.canvas-edges{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}.canvas-edge{fill:none;stroke:#aa8166;stroke-width:2.5;pointer-events:stroke;cursor:pointer}.canvas-edge:hover{stroke:#e2b190;stroke-width:5}.canvas-node{width:270px;position:absolute;background:#22252a;border:1px solid #43464d;border-radius:9px;box-shadow:0 8px 24px #0003;cursor:default;z-index:1}.canvas-node.selected{border-color:var(--accent);box-shadow:0 0 0 1px #dfa27544,0 8px 24px #0003}.canvas-node-header{height:47px;padding:0 13px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);cursor:grab;user-select:none}.canvas-node-header>span{font-size:12px;font-weight:600;display:flex;align-items:center;gap:8px;max-width:205px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.canvas-node-header svg{color:var(--accent)}.canvas-node-body{padding:12px}.canvas-node-body textarea{width:100%;resize:vertical;min-height:105px;background:#191b1e;color:var(--text);border:1px solid var(--line);border-radius:5px;padding:8px;font-size:12px;line-height:1.6;touch-action:auto}.canvas-node-body p{font-size:11px;color:var(--muted);max-height:100px;overflow:auto;white-space:pre-wrap}.canvas-node-empty{height:110px;display:flex;align-items:center;justify-content:center;background:#191b1e;color:var(--muted);font-size:11px}.canvas-node-media{height:150px;background:#111;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.canvas-node-media img,.canvas-node-media video{max-width:100%;max-height:100%;touch-action:auto}.canvas-node>footer{display:flex;align-items:center;justify-content:space-between;padding:0 12px 12px;font-size:10px;gap:7px}.node-port{position:absolute;width:13px;height:13px;border-radius:50%;border:2px solid #282b30;background:#d5a37d;top:36px;padding:0;z-index:3}.input-port{left:-7px}.output-port{right:-7px}.node-port.connecting{background:#b8d5bd;box-shadow:0 0 0 4px #b8d5bd33}.canvas-footer{padding:9px 15px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px;gap:15px}.canvas-empty{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);text-align:center;width:min(430px,80%);pointer-events:none}.canvas-empty h2{font-size:21px;color:#b9bbb7;margin-bottom:10px}.canvas-empty p{color:var(--muted);font-size:12px}.connection-row{margin-bottom:8px}
@media(min-width:1500px){.edit-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.canvas-viewport{height:700px}}
@media(max-width:1100px){.episode-toolbar{gap:10px;align-items:flex-start}.episode-toolbar-right{flex-wrap:wrap;justify-content:flex-end;gap:10px}.batch-toolbar{gap:9px}.inline-actions{gap:7px}.edit-controls{padding-left:0}.job-top>small{width:100%;margin:0}.canvas-toolbar{padding:10px}.canvas-toolbar .inline-actions{flex-wrap:wrap}.canvas-footer{align-items:flex-start}.canvas-footer>span:last-child{max-width:55%}}
@media(max-width:700px){.episode-toolbar{flex-wrap:wrap}.episode-switch{width:100%;gap:9px}.episode-toolbar-right{width:100%;justify-content:flex-start}.episode-switch select{flex:1}.batch-toolbar .text-button{font-size:11px}.compare-grid{grid-template-columns:1fr}.collection-toolbar{gap:10px}.search-input{width:100%;min-width:0}.catalog-row{gap:8px}.catalog-row small{font-size:10px}.inline-actions{flex-wrap:wrap}.canvas-viewport{height:570px}.canvas-footer{flex-wrap:wrap}.canvas-footer>span:last-child{max-width:none}.canvas-toolbar .button{padding:7px 10px}.job-top{gap:8px}.edit-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.wide-dialog{width:calc(100vw - 20px)}.sequence-preview .section-title span{max-width:100%}.collection-toolbar .filters{width:100%;flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
[hidden]{display:none!important}.ref-order .ref-role-select{font-size:9px;padding:2px 4px;min-width:0;width:100%;margin-top:3px}.candidate-extra-actions{display:flex;align-items:baseline;gap:18px;font-size:11px}.generation-compiled{max-height:330px;overflow:auto;padding:10px;border:1px solid var(--line);border-radius:6px;margin-top:12px}.generation-compiled article{border-bottom:1px solid var(--line);padding:10px 0}.generation-compiled .prompt-text{font-size:10px;line-height:1.7}
.stale-badge{color:var(--amber);font-size:9px;white-space:nowrap}.shot-card-meta{flex-wrap:wrap;gap:5px}.stale-notice{padding:12px;background:#dfa2750a;border:1px solid #dfa27544;border-radius:6px;margin-bottom:14px}.stale-notice strong{font-size:12px;color:var(--amber)}.stale-notice p,.edit-stale-notice{font-size:10px;color:var(--amber)}.stale-notice .text-button{font-size:10px;margin-top:7px}.edit-stale-notice{padding:8px 12px;background:#dfa2750a;border-radius:5px;margin:-8px 0 12px}
.compact-project-button{display:none}.project-list-actions{display:flex;gap:12px;margin-top:20px}.collection-toolbar .filters{position:static;width:auto;margin:0}@media(max-width:1100px){.compact-project-button{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:11px}.breadcrumbs{min-width:0;overflow:hidden;white-space:nowrap}.breadcrumbs>span{overflow:hidden;text-overflow:ellipsis}.top-actions{flex-shrink:0}}@media(max-width:560px){.topbar{padding:0 12px;gap:8px}.compact-project-button{font-size:10px}.top-actions .save-status{max-width:90px;overflow:hidden;white-space:nowrap}.project-list-actions{flex-wrap:wrap}}

.shot-thumb>video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}

/* v0.3 · readability, focus and entry points for budget, presets, memory, inserts and face checks */
.hint,.field>span,.section-title span,.panel-footer>span{font-size:11px}
.status{font-size:10.5px;padding:2px 8px 2px 7px;border-radius:999px;background:color-mix(in srgb,currentColor 11%,transparent)}
.button{font-size:12px;border-radius:7px}.button.small{font-size:11px}
.filters button{font-size:10.5px}
.field input:focus,.field textarea:focus,.field select:focus,.search-input:focus,.memory-card textarea:focus,.field-group textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #dfa27522}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.panel{background:linear-gradient(180deg,#212524,#1d2120);box-shadow:0 1px 0 #ffffff08 inset}
dialog{max-height:calc(100vh - 48px);overflow:auto;background:#202522;border-color:#4a5544}
.dialog-heading{position:sticky;top:-28px;margin:-28px -28px 18px;padding:22px 28px 14px;background:#202522ee;backdrop-filter:blur(6px);border-bottom:1px solid #343c31;z-index:2;display:flex;justify-content:space-between;align-items:center}
.dialog-actions{position:sticky;bottom:-28px;margin:20px -28px -28px;padding:14px 28px;background:#202522ee;backdrop-filter:blur(6px);border-top:1px solid #343c31;display:flex;justify-content:flex-end;gap:10px}
.three-col{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.four-col{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.preset-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}
.preset-chip{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:11px 12px;border:1px solid #3a4138;border-radius:8px;background:#1a1e1d;text-align:left;transition:border .15s,background .15s}
.preset-chip strong{font-size:12px;color:#dfe4da}.preset-chip small{font-size:10px;color:#7f8a77;word-break:break-all}
.preset-chip:hover{border-color:#566150}.preset-chip.active{border-color:var(--accent);background:#2b2521}.preset-chip.active strong{color:#f2c9a6}
.segmented{display:flex;gap:3px;padding:3px;margin:0 0 16px;background:#141817;border:1px solid #2f352d;border-radius:8px}
.segmented label{flex:1}.segmented input{position:absolute;opacity:0;pointer-events:none}
.segmented span{display:block;text-align:center;padding:7px 8px;border-radius:6px;font-size:11.5px;color:#9aa492;cursor:pointer;transition:background .15s,color .15s}
.segmented input:checked+span{background:#33392f;color:#eef2e8;box-shadow:0 1px 0 #ffffff10 inset}
.segmented input:focus-visible+span{outline:2px solid var(--accent)}
.episode-picks{display:flex;flex-wrap:wrap;gap:6px 14px;margin:-6px 0 16px;padding:10px 12px;border:1px dashed #3a4138;border-radius:7px}
.check-inline{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#c3cbbb}
fieldset.target-route{border:1px solid #3a4138;border-radius:8px;padding:12px 14px 2px;margin:0 0 16px}
fieldset.target-route legend{padding:0 6px;font-size:11px;color:var(--accent)}
details.advanced{margin:4px 0 14px;border-top:1px solid #2e342c;padding-top:10px}
details.advanced summary,.generation-compiled details summary{cursor:pointer;font-size:11.5px;color:#a7b09f;margin-bottom:10px}
.field-group{margin-top:18px;padding:14px 14px 4px;border:1px solid #30362e;border-radius:8px;background:#1a1e1d}
.field-group-title{font-size:11.5px;font-weight:600;color:#cfd6c7;margin-bottom:12px;display:flex;gap:8px;align-items:center}
.field-group textarea,.memory-card textarea{width:100%;background:#151918;border:1px solid #363d34;border-radius:6px;color:#d3dacb;padding:9px 10px;font:12px/1.8 var(--font);resize:vertical;margin-bottom:10px}
.inline-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.warn-text{color:var(--amber);font-weight:500}
.memory-card{margin-top:20px;padding:14px;border:1px solid #3a4434;border-radius:8px;background:#1b201c}.memory-card.stale{border-color:#6b5838;background:#221f19}
.preview-summary{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;margin:14px 0;padding:10px 14px;border-radius:7px;background:#171b1a;border:1px solid #30362e;font-size:11.5px;color:#aeb7a6}
.preview-summary b{color:#f0cfae;font-size:13px}
.generation-compiled article{border:1px solid #30362e;border-radius:8px;padding:12px 14px;margin-bottom:10px;background:#1a1e1d}
.generation-compiled article header{display:flex;gap:10px;align-items:center;margin-bottom:8px}.generation-compiled article header h3{font-size:12.5px;margin:0;flex:1}
.prompt-text.small{font-size:11px;max-height:180px;overflow:auto}
.confirm-banner{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0;padding:6px 10px;border-radius:8px;background:#2c2519;border:1px solid #6b5838;color:#ecd2ac;font-size:12px}
.confirm-banner span{display:inline-flex;gap:8px;align-items:center}
.confirm-row{display:flex;gap:12px;align-items:flex-start;padding:11px 12px;border:1px solid #33392f;border-radius:7px;margin-bottom:8px;cursor:pointer}
.confirm-row:has(input:checked){border-color:#6b5838;background:#231f19}.confirm-row span{display:flex;flex-direction:column;gap:2px}.confirm-row small{font-size:11px;color:#a59a86}
.budget-panel .budget-row{display:flex;align-items:center;gap:18px;margin-bottom:12px}
.budget-meter{flex:1;height:8px;border-radius:99px;background:#141817;overflow:hidden;border:1px solid #2c322a}
.budget-meter span{display:block;height:100%;background:linear-gradient(90deg,#a3bfab,#dfa275);border-radius:99px;transition:width .3s}
.budget-row strong{font-size:20px;font-weight:600;color:#f0e6da}.budget-row small{font-size:12px;color:#8f9b83;font-weight:400}
.field.compact{max-width:280px;margin:6px 0 0}
.face-panel{margin-top:12px;padding:11px 13px;border:1px solid #30362e;border-radius:8px;background:#191d1c}
.face-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.face-head small{font-size:11px;color:#8f9b83}.face-head .text-button{margin-left:auto}
.face-flags{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 2px}
.face-flag{padding:4px 9px;border-radius:99px;background:#2d2519;border:1px solid #6b5838;color:#ecd2ac;font-size:11px;display:inline-flex;gap:6px}
.face-flag small{color:#a59a86}.face-flag:hover{background:#3a3020}
.face-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--amber);margin-left:4px}
.issue-list{list-style:none;margin:8px 0;padding:0}.issue-list li{display:flex;gap:8px;align-items:flex-start;padding:6px 0;font-size:12px;color:#e2cba9;border-bottom:1px dashed #33392f}
.split-plan{display:grid;gap:6px;margin:8px 0}.split-plan div{display:flex;gap:12px;padding:8px 10px;border-radius:6px;background:#151918;font-size:11.5px}.split-plan b{color:var(--accent);white-space:nowrap}
.inline-ok{display:inline-flex;gap:6px;align-items:center;color:var(--green);font-size:12px;margin:10px 0}
.history-item{border:1px solid #30362e;border-radius:8px;padding:12px 14px;margin-bottom:10px}.history-item header{display:flex;gap:10px;align-items:center;margin-bottom:8px}.history-item header small{flex:1;color:#8f9b83;font-size:11px}
.asset-traits{display:grid;gap:6px;margin:12px 0}.asset-traits p{margin:0;font-size:12px;color:#c3cbbb;display:flex;gap:10px}.asset-traits b{color:#8f9b83;font-weight:500;min-width:36px}
@media(max-width:850px){.preset-grid,.three-col{grid-template-columns:1fr 1fr}.four-col{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.preset-grid,.three-col,.four-col{grid-template-columns:1fr}.confirm-banner{max-width:100%}}
.plan-label{background:#121514d9;padding:1px 6px;border-radius:4px;backdrop-filter:blur(3px)}
#dialog form>.hint:first-of-type{margin:0 0 16px}
.dialog-actions .button.full{width:auto;margin:0}
@media(max-width:560px){.four-col{grid-template-columns:1fr 1fr}.preset-grid{grid-template-columns:1fr 1fr}}
.memory-card .section-title.mini,.field-group .section-title.mini{margin-top:0;margin-bottom:6px}
/* Centralized LAN login */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at 30% 20%,#232a25 0,var(--bg) 60%)}
.auth-card{width:400px;max-width:100%;border:1px solid var(--line);background:#1f2322;border-radius:11px;padding:32px 30px;box-shadow:0 15px 80px #0006}
.auth-card .brand{margin-bottom:22px}
.auth-card h1{font-size:18px;font-weight:600;margin:0 0 18px}
.auth-card .hint{margin:0 0 14px}
.auth-form .button.full{margin-top:6px}
.auth-form .inline-error:empty{display:none}
.auth-dialog{width:400px}
.auth-dialog .inline-error:empty{display:none}
.user-chip{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);white-space:nowrap}
.user-chip strong{color:var(--text);font-weight:500}
.role-badge{font-size:9px;border:1px solid #606355;border-radius:3px;padding:0 4px;color:#b1b2a6}
.role-badge.admin{border-color:var(--accent);color:var(--accent)}
.admin-only-note{font-size:10px;color:var(--amber);margin:6px 0}
.conflict-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border:1px solid #6a4f3a;background:#2b231d;color:#ecd2bd;border-radius:8px;padding:12px 16px;margin:0 0 16px;font-size:12px}
.conflict-banner .stack-actions{display:flex;gap:8px;flex-wrap:wrap}
.job-owner{font-size:10px;color:var(--muted)}
@media (max-width:480px){.auth-card{padding:26px 20px}.user-chip span.name{display:none}}
.user-list{display:flex;flex-direction:column;gap:6px;margin:4px 0 14px;max-height:50vh;overflow:auto}
.user-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:6px;font-size:12px}
.user-row small{color:var(--muted)}
.checkline{display:flex;align-items:center;gap:8px;font-size:12px;margin:0 0 14px}
.admin-locked{opacity:.45;cursor:not-allowed}

/* Keep form errors inside the sticky footer, where the submit button stays visible. */
.dialog-actions .dialog-error{flex:1;min-width:0;margin:0 16px 0 0;align-self:center}

/* Review rows show the selected media, with an honest missing-file fallback. */
.review-thumb{position:relative;width:100%;aspect-ratio:16/9;border-radius:6px;overflow:hidden;background:#191d1d}
.review-thumb img,.review-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.review-thumb small{position:absolute;left:6px;bottom:4px;font-size:9px;padding:1px 5px;border-radius:3px;background:#0009;color:var(--text)}
.review-thumb .missing-note{display:none}
.review-thumb.missing{display:flex;align-items:center;justify-content:center}
.review-thumb.missing img,.review-thumb.missing video{display:none}
.review-thumb.missing .missing-note{display:block;font-size:11px;color:var(--amber)}

/* Settings panels need full editing width; the script sidebar keeps its layout. */
.settings-layout{grid-template-columns:minmax(0,1fr)}
.settings-layout .template-editor{width:100%;min-height:360px;resize:vertical;box-sizing:border-box}
.settings-layout .segmented label{white-space:nowrap}
.settings-layout .segmented{flex-wrap:wrap}

/* v0.4 · compact workspace: tighter grid, clearer hierarchy, soft motion */
:root{--radius:12px;--ease:cubic-bezier(.2,.8,.2,1);--glow:0 0 0 1px #dfa27555,0 6px 18px -6px #dfa27540}
@media(min-width:1101px){.shell{grid-template-columns:56px 176px minmax(0,1fr)}}
.rail{padding:14px 0;gap:8px}.mark{margin:0 0 14px;font-size:22px}.rail-button{width:38px;height:38px;border-radius:11px;transition:background .2s var(--ease),color .2s,transform .2s var(--ease)}.rail-button:hover{transform:translateY(-1px)}.rail-bottom{gap:12px}
.sidebar{padding:14px 10px}.brand{font-size:16px}.space-label{margin:16px 6px 8px}.project-picker{padding:8px;border-radius:10px;transition:border-color .2s}.project-picker:hover{border-color:#6b5f52}.project-icon{width:28px;height:30px}
.side-nav{margin-top:12px;gap:2px}.side-nav>button{padding:8px 10px;font-size:12.5px;border-radius:9px;transition:background .18s var(--ease),color .18s,padding .18s var(--ease)}.side-nav>button:hover{padding-left:13px}.side-nav>button.active{background:linear-gradient(90deg,#dfa27526,#dfa27508);box-shadow:inset 3px 0 #dfa275}
.side-bottom{padding:12px 6px 0}.side-bottom p{display:none}
.topbar{height:46px;padding:0 18px}.breadcrumbs{font-size:12px}.save-status{font-size:11px}
.content{padding:12px 16px 16px;max-width:none}
.page-heading{margin-bottom:10px;align-items:center}.page-heading .eyebrow{display:none}.page-heading h1{font-size:18px;letter-spacing:.5px}.page-heading h1+p{margin-top:1px;font-size:11.5px}
.button{padding:7px 12px;transition:background .18s,transform .18s var(--ease),box-shadow .18s}.button:active:not(:disabled){transform:scale(.97)}.button.primary{background:linear-gradient(135deg,#e8bb93,#d49f76);box-shadow:0 4px 14px -6px #dfa275aa}.button.primary:hover:not(:disabled){background:linear-gradient(135deg,#f1c9a6,#dfaa80)}
.production-strip{padding:7px 12px;font-size:11px;border-radius:var(--radius) var(--radius) 0 0}
.board{grid-template-columns:212px minmax(0,1fr) 300px;min-height:calc(100vh - 150px);border-radius:0 0 var(--radius) var(--radius)}
@media(min-width:1600px){.board{grid-template-columns:236px minmax(0,1fr) 360px}}
/* Keep the earlier narrow-screen board layouts: two columns up to 850px, stacked with no forced height up to 560px. */
@media(max-width:850px){.board{grid-template-columns:143px minmax(0,1fr)}}
@media(max-width:560px){.board{min-height:0}}
.shot-list{padding:10px 8px}.filters{margin:8px 0;border-radius:8px}.filters button{font-size:11px;padding:4px;border-radius:6px;transition:background .18s}
.shot-scroll{gap:4px;overflow:auto;max-height:calc(100vh - 290px)}
.shot-card{display:grid;grid-template-columns:72px minmax(0,1fr);column-gap:8px;align-items:center;padding:5px;border-radius:9px;background:transparent;transition:background .18s var(--ease),border-color .18s,box-shadow .2s}.shot-card:hover{background:#ffffff07}.shot-card.active{background:#dfa27512;box-shadow:var(--glow)}
.shot-thumb{grid-row:span 2;border-radius:6px}.shot-card-title{font-size:12px;margin:0 0 2px}.shot-card-meta{font-size:10.5px}.shot-card .shot-tag,.shot-card .duration,.plan-label{font-size:9px}.plan-label{display:none}
.shot-check{top:9px;left:9px;width:16px;height:16px}
.add-shot{margin-top:8px;border-radius:9px;font-size:11px;transition:border-color .18s,color .18s}.add-shot:hover{border-color:var(--accent);color:var(--accent)}
.shot-editor{padding:12px 14px}.editor-heading{margin-bottom:8px}.editor-heading .eyebrow{margin-bottom:0}.editor-heading h2{font-size:15px}
.preview{border-radius:10px;max-height:56vh}
.candidate-section{margin:10px 0}.candidate-section .section-title{margin-bottom:6px}.candidate{border-radius:8px;padding:6px 9px;font-size:11px;transition:border-color .18s,background .18s}.candidate:hover{border-color:#8b997b}.candidate-controls{margin-top:8px}
.editor-tabs{margin-top:10px;gap:18px}.editor-tabs button{font-size:12px;padding-bottom:8px;transition:color .18s}
.editor-fields{padding-top:10px}.field{gap:4px;margin-bottom:10px}.field input,.field textarea,.field select{padding:7px 9px;font-size:12px;line-height:1.6;border-radius:8px}.field input{height:32px}
.inspector{padding:12px}.inspector>.section-title{margin-bottom:10px}.inspector-divider{margin:4px 0 10px}.references{margin:8px 0}.reference{border-radius:8px;font-size:11px;transition:background .18s}.reference:hover{background:#313830}.inspector-bottom{display:none}
.section-title{margin-bottom:10px}.panel{padding:16px;border-radius:var(--radius)}.panel+.panel{margin-top:12px}
.script-layout,.export-layout{gap:12px}.asset-grid{gap:12px}.asset-card{border-radius:var(--radius);transition:transform .2s var(--ease),box-shadow .2s}.asset-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px #000a}.asset-info{padding:12px 14px}
.metrics{gap:10px;margin:12px 0}.metric{padding:12px 14px;border-radius:var(--radius)}.metric strong{font-size:24px;margin-top:4px}.overview-hero{min-height:180px;border-radius:var(--radius)}.overview-hero>div:first-child{padding:22px}.hero-art{min-height:180px}
.overview-shots>button,.review-row,.export-row{padding:10px 0}.episode-toolbar,.batch-toolbar{margin-bottom:10px;padding:7px 12px;border-radius:10px}
/* compact shot cards: checkbox top-left, labels along the bottom */
.shot-card{grid-template-columns:88px minmax(0,1fr)}
.shot-card .shot-check{top:8px;left:8px;width:13px;height:13px;border-radius:3px}
.shot-card .shot-tag{top:auto;bottom:2px;right:2px;left:auto;padding:0 3px;line-height:1.4}
.shot-card .duration{top:2px;right:2px;bottom:auto;left:auto;line-height:1.4}
/* keep candidates and design tabs above the fold */
.shot-editor .preview{width:min(100%,calc(36vh * 16 / 9));max-height:none;margin:0 auto}
/* overview: a short banner so episode progress stays in view */
.overview-hero{min-height:0;height:200px;grid-template-columns:1fr 38%}
.overview-hero>div:first-child{padding:20px 24px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.overview-hero h2{font-size:24px;margin:8px 0 4px}.overview-hero p{margin-bottom:14px}
.hero-art{min-height:0;height:200px}.hero-art svg{display:block;height:100%;width:100%}
/* smaller images (click to enlarge), clearer text */
.asset-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.asset-preview{aspect-ratio:auto;height:110px}
.asset-symbol span{width:52px;height:52px;font-size:22px}.asset-empty-label{bottom:8px}
.asset-info .eyebrow{font-size:10.5px;letter-spacing:.5px}
.asset-info h2{font-size:15px;margin:4px 0}.asset-info p{font-size:12.5px;line-height:1.7;color:#c6cfbe;min-height:0}
.asset-actions{margin-top:10px}
.shot-editor .preview{width:min(100%,calc(30vh * 16 / 9))}
.preview>img,.preview>.scene-art,.asset-preview>img,.review-thumb img{cursor:zoom-in}
.lightbox{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:32px;background:#0b0d0cdd;backdrop-filter:blur(6px);cursor:zoom-out;animation:lightbox-in .18s var(--ease)}
.lightbox>img,.lightbox>svg{max-width:min(1400px,100%);max-height:100%;width:auto;height:auto;border-radius:10px;box-shadow:0 20px 80px #000a;object-fit:contain}
.lightbox>svg{width:min(1400px,100%);aspect-ratio:16/9}
@keyframes lightbox-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}
/* empty image slots: plain surface, no placeholder art or labels */
.blank-art{background:#ffffff08;gap:0}
.blank-art>*,.plan-label,.hero-art>span,.asset-symbol,.asset-empty-label{display:none}
.asset-preview,.asset-preview.character,.asset-preview.scene{background:#ffffff08}
.overview-hero:has(.hero-art>.blank-art){grid-template-columns:1fr;height:auto}
.hero-art:has(>.blank-art){display:none}
.preview:has(>.blank-art){background:#ffffff06;border-style:dashed;border-color:#ffffff1a}
.preview:has(>.blank-art)>.preview-caption{display:none}
/* Apple-style layer: neutral graphite, frosted chrome, soft depth, spring motion */
:root{--bg:#161618;--panel:#1d1d20;--raised:#26262a;--line:#ffffff12;--text:#f2f2f4;--muted:#9a9aa2;--spring:cubic-bezier(.34,1.4,.64,1);--font:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Microsoft YaHei",sans-serif}
body{background:var(--bg);-webkit-font-smoothing:antialiased;letter-spacing:0}
.rail,.sidebar{background:#1c1c1fcc;backdrop-filter:saturate(180%) blur(20px);border-color:var(--line)}
.topbar{position:sticky;top:0;z-index:10;background:#161618b3;backdrop-filter:saturate(180%) blur(20px);border-color:var(--line)}
.page-heading h1{font-weight:700;letter-spacing:-.2px}
.panel,.board,.production-strip,.episode-toolbar,.batch-toolbar,.asset-card,.metric,.overview-hero,.canvas-panel,.job-card{background:var(--panel);border-color:var(--line);box-shadow:0 1px 2px #0003,0 8px 24px -12px #0006}
.panel{background:var(--panel)}
.board,.shot-list,.shot-editor,.inspector{background:var(--panel)}
.shot-list,.inspector{border-color:var(--line)}
.field input,.field textarea,.field select,select,.search-input{background:#ffffff0a;border-color:#ffffff14;border-radius:10px}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--accent);box-shadow:0 0 0 4px #dfa2752a}
.button{border-radius:10px;font-weight:600}.button.subtle{background:#ffffff0f;border-color:#ffffff14;color:var(--text)}.button.subtle:hover:not(:disabled){background:#ffffff1a}
.filters,.segmented{background:#ffffff0a;border-radius:10px}.filters button.active,.segmented input:checked+span{background:#ffffff1f;color:var(--text);box-shadow:0 1px 3px #0004}
.side-nav>button{color:#b4b4bb}.side-nav>button.active{background:#ffffff12;color:var(--text);box-shadow:none}
.side-nav>button.active svg{color:var(--accent)}
.shot-card{transition:background .25s var(--ease),box-shadow .35s var(--spring),transform .35s var(--spring)}
.shot-card:hover{transform:translateY(-1px)}.shot-card.active{background:#ffffff0d;box-shadow:0 0 0 1.5px var(--accent)}
.asset-card{transition:transform .4s var(--spring),box-shadow .3s var(--ease)}.asset-card:hover{transform:translateY(-3px);box-shadow:0 14px 34px -14px #000c}
.button,.rail-button,.candidate,.reference,.filters button{transition:transform .3s var(--spring),background .2s var(--ease),color .2s,box-shadow .2s}
.button:active:not(:disabled),.rail-button:active,.candidate:active{transform:scale(.96)}
.content>*{animation:page-in .45s var(--ease) both}.content>*:nth-child(2){animation-delay:.04s}.content>*:nth-child(3){animation-delay:.08s}.content>*:nth-child(n+4){animation-delay:.12s}
.content.preserve-view>*{animation:none}
@keyframes page-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.reference-avatar:not(:has(img)){font-size:0;background:#ffffff0d}
.status{background:color-mix(in srgb,currentColor 14%,transparent)}
@media(prefers-reduced-motion:reduce){.content>*{animation:none}}
/* neutral callouts and cards, long buttons wrap inside panels */
.callout,.memory-card,.field-group,.issue,.preset-chip,.history-item,.generation-compiled article{background:#ffffff08;border-color:#ffffff14}
.callout strong,.field-group-title{color:var(--text)}.callout p{color:#b4b4bb}
.memory-card.stale{background:#dfa2750d;border-color:#dfa27555}
.script-layout .button,.export-layout .button,.panel .button.full{white-space:normal;text-align:center;max-width:100%;height:auto;line-height:1.4}
.script-layout>.panel{min-width:0;overflow:hidden}
/* narrow screens: keep the work area high on the page */
@media(max-width:1100px){
.content{padding-top:10px}
.page-heading{margin-bottom:8px}.page-heading h1+p{display:none}
.episode-toolbar{margin-bottom:6px;padding:5px 10px}
.episode-toolbar select{padding:5px 8px}
.compact-nav{margin:0 0 8px;padding-bottom:2px;gap:5px}
.compact-nav>button{padding:5px 9px;border-radius:8px;border-color:#ffffff14}
.compact-nav>button.active{background:#ffffff14;border-color:var(--accent);color:var(--text)}
.production-strip{padding:5px 10px}
.production-strip+.batch-toolbar{padding:4px 10px}
}
.field>span{font-size:12px;color:#b9c2b1}
.field input,.field textarea,.field select{font-size:13px;color:#e1e7da}
.hint{font-size:12px;color:#a3ae98}
.shot-card-title{font-size:12.5px;color:#e4e8de}.shot-card-meta{font-size:11px}
.reference{font-size:12px}.reference small{font-size:10.5px}
.editor-heading h2{font-size:16px}
/* stats strip + batch bar + board read as one card */
.production-strip+.batch-toolbar{margin:0;border-radius:0;border-top:0;background:#1e2123}
.production-strip+.batch-toolbar+.board,.production-strip+.board{border-top:1px solid var(--line)}
/* script panel: keep the three extract buttons on one line */
.script-layout .three-col{gap:6px}
.script-layout .three-col .button{white-space:nowrap;padding:7px 4px;font-size:12px;min-width:0}
/* storyboard right panel: references -> generate -> shot info */
.inspector>*{order:3}
.inspector>.stale-notice{order:0}
.inspector>.section-title:has(+.hint),.inspector>.hint,.inspector>.references,.inspector>.ref-order{order:1}
.inspector>.generation-route{order:2;margin:6px 0 14px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.inspector>.inspector-divider,.inspector>.inspector-bottom{display:none}
.generation-route>.eyebrow,.generation-route>strong{display:none}
.generation-route>p{font-size:11.5px;color:var(--muted);margin:0 0 8px}
.ref-order .text-button{display:block;font-size:12px;margin-top:6px;color:#c9c9cf}
.ref-order .text-button:hover{color:var(--accent)}
/* collapsible shot key points */
.shot-points>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:10px}
.shot-points>summary::-webkit-details-marker{display:none}
.shot-points>summary::before{content:"›";display:inline-block;transition:transform .2s var(--ease)}
.shot-points[open]>summary::before{transform:rotate(90deg)}
.shot-points:not([open]){padding-bottom:12px}
/* missing assets card */
.missing-assets{margin-top:14px}
.missing-list{list-style:none;margin:6px 0 10px;padding:0;display:flex;flex-direction:column;gap:6px}
.missing-list li{display:grid;grid-template-columns:auto 1fr;gap:2px 8px;align-items:center;padding:8px 10px;border-radius:10px;background:#ffffff08;font-size:12.5px}
.missing-list small{grid-column:2;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* batch bar: workflow buttons first, edit tools grouped */
.batch-sep{margin-left:auto;padding-left:12px;border-left:1px solid var(--line);font-size:11px;color:var(--muted)}
.batch-hint{font-size:11.5px;color:var(--amber)}

/* Shared generation catalog: compact controls and readable capability cards. */
.plugin-center{max-width:1320px;margin:0 auto}
.plugin-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:4px 0 18px}
.plugin-toolbar strong{font-size:14px}.plugin-toolbar p{font-size:12px;color:var(--muted);margin:5px 0 0}
.plugin-filterbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.plugin-filters{display:flex;flex-wrap:wrap;gap:4px}
.plugin-filters button{padding:7px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);font-size:12px}
.plugin-filters button:hover{background:#ffffff08;color:var(--text)}
.plugin-filters button.active{background:#dfa27518;border-color:#dfa27555;color:var(--accent)}
.plugin-filterbar .search-input{width:230px;min-width:0;padding:8px 10px;font-size:12px}
.plugin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:12px}
.plugin-card{display:flex;flex-direction:column;min-width:0;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.plugin-card header{display:flex;gap:10px;align-items:center}.plugin-card header>div{min-width:0;flex:1}
.plugin-card-icon{width:38px;height:38px;display:grid;place-items:center;flex-shrink:0;border:1px solid #ffffff12;border-radius:10px;color:var(--accent);background:#ffffff06}
.plugin-category{font-size:10.5px;color:var(--muted)}
.plugin-card h2{font-size:15px;line-height:1.5;margin:2px 0 0;overflow-wrap:anywhere}
.plugin-card header>.status{flex-shrink:0;font-size:10px}
.plugin-description{font-size:12px;line-height:1.7;color:#b4b4bb;overflow-wrap:anywhere;margin:14px 0 10px}
.plugin-capabilities{display:flex;flex-wrap:wrap;gap:5px}
.plugin-capabilities>span{padding:3px 7px;border-radius:5px;background:#ffffff08;color:#d4d4d9;font-size:11px}
.plugin-connection-note{overflow-wrap:anywhere;margin:10px 0 12px}.plugin-check{margin:0 0 12px;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.plugin-card footer{margin-top:auto;padding-top:12px;border-top:1px solid var(--line);display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.plugin-card footer .text-button{font-size:12px}.plugin-use{margin-left:auto}
.plugin-footnote{margin:18px 0}.plugin-footnote .text-button{font-size:inherit;padding:0 4px;color:var(--accent)}
.plugin-empty{text-align:center;padding:52px 20px;border:1px dashed #ffffff20;border-radius:12px}
.plugin-empty h2{font-size:17px}.plugin-empty p{font-size:13px;color:var(--muted);margin:10px 0 20px}
.plugin-add-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.plugin-add-list>button{display:flex;align-items:center;gap:10px;min-width:0;text-align:left;padding:14px;border:1px solid var(--line);background:#ffffff05;color:var(--text);border-radius:10px}
.plugin-add-list>button:hover{border-color:var(--accent);background:#dfa2750a}.plugin-add-list>button>span:nth-child(2){flex:1;min-width:0}
.plugin-add-list strong{font-size:13px}.plugin-add-list small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}
.plugin-kind-picker{display:flex;flex-wrap:wrap;gap:20px;border:1px solid var(--line);border-radius:10px;padding:12px;margin:12px 0}
.plugin-kind-picker legend{font-size:12px;color:var(--muted);padding:0 6px}
.plugin-param-row{display:grid;grid-template-columns:minmax(0,1fr) 90px minmax(0,1.5fr) auto;align-items:center;gap:8px;margin-bottom:8px}
.plugin-param-row>input,.plugin-param-row>select{min-width:0;width:100%;padding:8px;border:1px solid var(--line);border-radius:8px;background:#ffffff08;color:var(--text);font-size:12px}
.plugin-param-row .check-inline{white-space:nowrap;font-size:11px}
.plugin-center button:focus-visible,.plugin-add-list button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:620px){
 .plugin-toolbar{align-items:flex-start;flex-wrap:wrap;gap:10px;margin-bottom:12px}.plugin-toolbar .inline-actions{margin-left:auto}
 .plugin-filterbar{align-items:stretch;flex-direction:column;gap:10px}.plugin-filterbar .search-input{width:100%}
 .plugin-filters button{min-height:40px;padding:7px 10px}.plugin-card{padding:14px}.plugin-card footer button{min-height:40px}
 .plugin-add-list{grid-template-columns:1fr}.plugin-param-row{grid-template-columns:minmax(0,1fr) 82px}.plugin-param-row .check-inline{justify-self:end}
}

/* Document import: show destination, editable source, then the actual result. */
.import-destination{padding:14px 16px;background:var(--surface,#282e29);border:1px solid var(--line);border-radius:8px;margin-bottom:12px}
.import-destination strong{font-size:14px}.import-destination p{margin:6px 0 0;font-size:13px;line-height:1.7}
.import-file-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:18px 0 8px}
#import-file-name{overflow-wrap:anywhere}#import-text{width:100%;min-height:100px;resize:vertical}
.import-shot-preview{max-height:360px;overflow:auto;border:1px solid var(--line);border-radius:8px;margin-top:12px}
.import-shot-preview details{padding:12px 16px;border-bottom:1px solid var(--line)}.import-shot-preview details:last-child{border:0}
.import-shot-preview summary{cursor:pointer;font-size:13px}.import-shot-preview summary span{float:right;color:var(--muted)}
.import-shot-number{display:inline-block;min-width:28px;margin-right:8px;color:var(--accent);font-variant-numeric:tabular-nums;font-weight:500}
.import-shot-preview dl{margin:14px 0 4px;font-size:12px}.import-shot-preview dt{color:var(--muted);margin-top:12px}
.import-shot-preview dd{margin:4px 0;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
#import-result{margin-top:12px}.import-shot-preview .hint{white-space:pre-wrap}

#import-source{margin:12px 0}#import-source>summary{cursor:pointer;font-size:12px;color:var(--muted);padding:8px 0}#import-source[open]>summary{margin-bottom:8px}

.import-metadata{margin:16px 0;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.import-metadata h3{font-size:14px;margin:0 0 6px}.import-metadata-grid{display:grid;grid-template-columns:2fr 1fr 2fr;gap:14px;margin-top:12px}
.import-metadata-grid .field{margin:0;min-width:0}.import-metadata-grid input,.import-metadata-grid textarea{width:100%;min-width:0}.import-metadata-grid small{font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
#import-metadata-status{margin:10px 0 0;color:var(--accent)}
@media(max-width:700px){.import-metadata-grid{grid-template-columns:1fr;gap:12px}}

/* Script workspaces keep episode navigation and source material distinct. */
.episode-workspace{display:grid;grid-template-columns:264px minmax(0,1fr);gap:20px;align-items:start}.episode-side{position:sticky;top:20px;min-width:0}.episode-mobile-directory>summary{display:none}.episode-directory{background:var(--panel,#242729);border:1px solid var(--line,#393d40);border-radius:10px;overflow:hidden}.episode-directory header{display:flex;align-items:center;justify-content:space-between;padding:18px 16px 12px}.episode-directory h2{font-size:17px;margin:4px 0}.episode-directory h2 span{color:var(--muted,#92989d);font-size:13px;margin-left:6px}.episode-selection{display:flex;align-items:center;justify-content:space-between;padding:0 16px 12px;color:#959ba0;font-size:12px}.episode-directory-list{max-height:64vh;overflow:auto}.episode-row{padding:12px 10px;border-top:1px solid #ffffff0b;border-left:3px solid transparent}.episode-row.active{background:#b5a68d10;border-left-color:var(--accent,#c9bba7)}.episode-row-main{display:flex;align-items:center;gap:7px}.episode-check input{accent-color:var(--accent,#c9bba7);width:14px;height:14px}.episode-open{display:flex;gap:10px;align-items:flex-start;min-width:0;background:none;border:0;color:inherit;text-align:left;padding:3px 0;flex:1}.episode-open strong{font-size:13px;display:block;overflow-wrap:anywhere;font-weight:600}.episode-open small{display:block;font-size:11px;color:#969da2;margin-top:4px}.episode-index{font-size:11px;color:#969da2;padding-top:2px;font-variant-numeric:tabular-nums}.episode-row-bottom{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:9px;padding-left:21px}.episode-state{font-size:11px;color:#aaaeb1;white-space:nowrap}.episode-row-actions{display:flex}.episode-row-actions .icon-button{width:25px;height:27px;min-width:25px;padding:4px}.episode-directory footer{border-top:1px solid #ffffff10;padding:12px;display:flex;flex-wrap:wrap;gap:12px}.episode-list-empty{padding:30px 18px;text-align:center;color:#bec3c6;line-height:1.8}.episode-list-empty small{color:#899097}.episode-content{min-width:0;display:grid;gap:14px}.episode-project-settings,.episode-material{padding:14px 18px!important;margin:0!important;min-width:0}.episode-project-settings>summary,.episode-material>summary{cursor:pointer;display:flex;align-items:center;gap:14px;justify-content:space-between;font-size:13px}.episode-project-settings small,.episode-material small{font-size:11px;color:#9da3a7;overflow-wrap:anywhere}.episode-project-fields{display:grid;grid-template-columns:2fr 1fr 2fr;gap:16px;margin-top:18px}.episode-material summary span{display:flex;align-items:center;gap:8px}.source-record{margin-top:16px}.source-record summary{font-size:13px;cursor:pointer}.source-record pre{max-height:320px;overflow:auto}.episode-script-layout{grid-template-columns:minmax(0,1fr) 245px!important;gap:16px!important}.episode-editor,.episode-next{margin:0!important;min-width:0}.episode-editor h2{font-size:20px}.episode-editor textarea{min-height:320px;line-height:1.8;resize:vertical}.episode-editor .panel-footer{flex-wrap:wrap;gap:8px}.episode-editor-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.episode-plan-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 0;border-top:1px solid #ffffff10;font-size:12px}.episode-plan-bar select{max-width:100%;min-width:150px}.episode-plan-bar .hint{font-size:11px;margin:0}.episode-empty{min-height:410px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.episode-empty-icon{color:var(--accent,#c9bba7);margin-bottom:12px}.episode-empty h2{font-size:23px;margin:8px 0}.episode-empty p{color:#959da2;font-size:14px;line-height:1.9}.episode-empty .inline-actions{margin-top:18px;justify-content:center;flex-wrap:wrap}.episode-rename{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.episode-rename input{width:100%;min-width:0}.episode-manager-dialog{max-width:650px}.episode-manager-dialog .episode-directory-list{max-height:55vh}.episode-manager-dialog .episode-row-actions .icon-button{width:32px}.episode-import-structure{padding:16px 0}.episode-import-structure h3{margin:0 0 12px}.episode-import-parts{display:grid;gap:10px;margin-top:14px}.episode-import-part{padding:12px;border:1px solid #ffffff12;border-radius:7px}.episode-import-part>label{display:flex;gap:10px;align-items:center}.episode-import-part input[type=text]{min-width:0;width:100%}.episode-import-part small{display:block;color:#9ba2a8;font-size:11px;margin:7px 0 7px 26px}.episode-import-part summary{font-size:12px;color:#afb6bb;cursor:pointer}.episode-import-part pre{max-height:220px;overflow:auto}.episode-import-part input[type=checkbox]{accent-color:var(--accent,#c9bba7)}
@media(max-width:1400px){.episode-workspace{grid-template-columns:245px minmax(0,1fr);gap:14px}.episode-script-layout{grid-template-columns:minmax(0,1fr)!important}.episode-next .stack-actions{display:grid;grid-template-columns:1fr 1fr}.episode-next .revision-actions{display:inline-flex;max-width:100%;margin-right:16px}}
@media(max-width:800px){.episode-workspace{display:block}.episode-side{position:static;margin-bottom:14px}.episode-mobile-directory>summary{display:block;padding:12px 0;font-size:14px;cursor:pointer}.episode-directory-list{max-height:320px}.episode-row-actions .icon-button{width:40px;height:40px;min-width:40px}.episode-project-fields{grid-template-columns:1fr}.episode-project-settings>summary,.episode-material>summary{align-items:flex-start;gap:8px;flex-wrap:wrap}.episode-editor{padding:16px!important}.episode-editor .section-title{align-items:flex-start;gap:8px;flex-wrap:wrap}.episode-next .stack-actions{display:flex}.episode-empty{padding:24px 16px!important}.episode-rename .text-button{min-height:40px}.episode-import-structure .segmented{flex-wrap:wrap}.episode-plan-bar{gap:8px}.episode-directory footer .text-button{min-height:36px}}
.episode-adoption-part{margin-top:14px;border-top:1px solid #ffffff12;padding-top:14px}.episode-adoption-part summary{cursor:pointer;font-size:14px}.episode-adoption-shot{padding:12px 0;border-bottom:1px solid #ffffff08}.episode-adoption-shot strong{font-size:13px}.episode-adoption-shot p{white-space:pre-wrap;font-size:13px;line-height:1.7;margin:6px 0}
.migration-choice{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff12;align-items:center}.migration-choice strong,.migration-choice small{display:block}.migration-choice small{color:#9ba2a8;font-size:12px;margin-top:5px}

/* Capability setup: task-first catalog and a continuous import flow. */
.plugin-view-tabs{display:flex;align-items:center;gap:22px;align-self:stretch}
.plugin-view-tabs>button{border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);padding:12px 0;font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px}
.plugin-view-tabs>button.active{border-bottom-color:var(--accent);color:var(--text)}
.plugin-view-tabs>button>span{font-size:11px;padding:1px 6px;border-radius:5px;background:#ffffff09;color:var(--muted)}
.plugin-toolbar{border-bottom:1px solid var(--line);padding-bottom:0;margin-bottom:20px}
.plugin-summary{font-size:11px;color:var(--muted);margin:-4px 0 15px}
.plugin-card header{align-items:flex-start;flex-wrap:wrap}.plugin-card header>div{min-width:120px}.plugin-card header>.status{margin-top:3px}
.plugin-readiness{font-size:12px;line-height:1.7;margin:14px 0 18px;overflow-wrap:anywhere}.plugin-attention{color:#dfb68f;font-size:12px;line-height:1.7}
.plugin-more{margin-left:auto}.plugin-use+.plugin-more{margin-left:0}.plugin-manage{font-size:11px;color:var(--muted);margin-top:22px}
.plugin-import-banner{display:flex;align-items:center;gap:18px;padding:24px;border:1px solid #b9966d40;border-radius:10px;background:#caaa7808;margin-bottom:30px}
.plugin-import-banner>div{flex:1;min-width:0}.plugin-import-banner h2{font-size:16px;margin:0 0 7px}.plugin-import-banner p{font-size:12px;color:var(--muted);line-height:1.7;margin:0}.plugin-import-banner>.button{flex-shrink:0}
.plugin-section-heading{display:flex;justify-content:space-between;margin:22px 0 16px}.plugin-section-heading h2{font-size:15px;margin:0 0 6px}.plugin-section-heading h3{font-size:14px;margin:0 0 6px}.plugin-section-heading p{font-size:12px;color:var(--muted);line-height:1.7;margin:0}
.plugin-preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.plugin-preset{display:flex;flex-direction:column;min-width:0;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.plugin-preset-top{display:flex;align-items:center;justify-content:space-between}.plugin-kind-label{font-size:11px;color:var(--muted)}
.plugin-preset h3{font-size:15px;margin:17px 0 0}.plugin-preset .plugin-description{margin:9px 0 18px;min-height:42px}
.plugin-preset dl{margin:0 0 20px}.plugin-preset dt{font-size:10px;color:var(--muted);margin-bottom:4px}.plugin-preset dd{font-size:12px;line-height:1.7;margin:0 0 12px;color:var(--text)}.plugin-preset dd:last-child{margin-bottom:0}.plugin-preset>.button{margin-top:auto;justify-content:space-between;display:flex}
.plugin-advanced-entry{padding:18px 0;margin-top:12px;border-bottom:1px solid var(--line)}.plugin-advanced-entry>summary{cursor:pointer;font-size:12px;color:var(--muted)}.plugin-advanced-entry .text-button{font-size:12px}
.plugin-dialog{width:min(700px,calc(100vw - 32px));max-width:700px}.plugin-dialog form{min-width:0}
.plugin-dialog .field{margin:16px 0}.plugin-dialog .field>span{font-size:12px}.plugin-dialog .advanced{margin:14px 0}.plugin-dialog .advanced>summary{font-size:12px;cursor:pointer;color:var(--muted)}
.plugin-config-intro{padding:16px 18px;background:#ffffff04;border-left:2px solid var(--accent);margin:18px 0 22px}.plugin-config-intro strong{font-size:14px}.plugin-config-intro p{font-size:12px;color:var(--muted);line-height:1.7;margin:8px 0}.plugin-config-intro small{font-size:11px;color:var(--muted)}
.plugin-status-box{padding:15px 18px;background:#ffffff04;border:1px solid var(--line);border-radius:8px;margin:18px 0}.plugin-status-box strong{font-size:13px}.plugin-status-box p{font-size:12px;color:var(--muted);line-height:1.7;margin:6px 0 0}
.plugin-detail-list{display:grid;grid-template-columns:85px 1fr;gap:10px;font-size:12px;margin:22px 0}.plugin-detail-list dt{color:var(--muted)}.plugin-detail-list dd{margin:0;overflow-wrap:anywhere}
.plugin-use-options{display:flex;flex-direction:column;gap:10px;margin:20px 0}.plugin-choice{display:grid;grid-template-columns:1fr auto;gap:6px;text-align:left;padding:15px 18px;border:1px solid var(--line);border-radius:8px;background:#ffffff03;color:var(--text)}.plugin-choice strong{font-size:13px}.plugin-choice small{grid-column:1;font-size:12px;color:var(--muted)}.plugin-choice svg{grid-column:2;grid-row:1/3;align-self:center}.plugin-choice:hover{border-color:var(--accent)}
.plugin-steps{display:flex;list-style:none;padding:0;margin:22px 0 26px;gap:0}.plugin-steps li{display:flex;align-items:center;gap:7px;flex:1;font-size:12px;color:var(--muted);position:relative}.plugin-steps li:not(:last-child):after{content:'';height:1px;background:var(--line);flex:1;margin:0 12px}.plugin-steps li>span{width:23px;height:23px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;font-size:11px;flex-shrink:0}.plugin-steps li.active{color:var(--text)}.plugin-steps li.active>span{background:var(--accent);color:#191b19;border-color:var(--accent)}.plugin-steps li.complete>span{color:var(--accent);border-color:#b9966d60}
.plugin-file-zone{padding:28px 22px;border:1px dashed #ffffff2c;border-radius:10px;background:#ffffff02;text-align:center}.plugin-file-zone>.plugin-card-icon{margin:0 auto 18px;width:48px;height:48px}.plugin-file-zone h3{font-size:16px}.plugin-file-zone p{font-size:12px;line-height:1.7;color:var(--muted);margin:10px 0 22px}.plugin-file-zone .field{text-align:left}.plugin-file-zone input{font-size:12px;max-width:100%}.plugin-file-zone.dragover{border-color:var(--accent);background:#caaa780b}
.plugin-import-summary{padding:18px;border:1px solid var(--line);background:#ffffff03;border-radius:8px;margin:8px 0 20px}.plugin-import-summary h3{font-size:17px;margin:10px 0}.plugin-import-summary p{font-size:12px;line-height:1.7;color:var(--muted)}.plugin-import-summary small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.plugin-back{margin-top:16px;font-size:12px}.plugin-complete{text-align:center;padding:22px 6px 8px}.plugin-complete-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 20px;border-radius:50%;background:#b5cfb112;color:#b5cfb1}.plugin-complete h3{font-size:18px;margin:12px 0}.plugin-complete p{font-size:12px;color:var(--muted);line-height:1.8}
.plugin-mapping-list{max-height:330px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:6px 12px}.plugin-mapping-row{display:grid;grid-template-columns:minmax(0,1fr) 160px 55px;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.plugin-mapping-row:last-child{border:0}.plugin-mapping-row label{font-size:11px;overflow-wrap:anywhere}.plugin-mapping-row small{display:block;font-size:10px;color:var(--muted);line-height:1.6;margin-top:3px}.plugin-mapping-row select,.plugin-mapping-row input{min-width:0;width:100%;padding:7px;font-size:11px;color:var(--text);background:#ffffff05;border:1px solid var(--line);border-radius:5px}
.plugin-center button:focus-visible,.plugin-dialog button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:1180px){.plugin-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.plugin-view-tabs{gap:20px}.plugin-toolbar{align-items:center}.plugin-toolbar>.inline-actions{margin:0;gap:12px}.plugin-import-banner{flex-wrap:wrap;padding:18px;gap:12px}.plugin-import-banner>div{min-width:180px}.plugin-import-banner>.button{width:100%;justify-content:center}.plugin-preset-grid{grid-template-columns:1fr}.plugin-preset .plugin-description{min-height:0}.plugin-dialog{width:calc(100vw - 20px)}.plugin-steps li{font-size:10px;gap:5px}.plugin-steps li:not(:last-child):after{margin:0 7px}.plugin-steps li>span{width:20px;height:20px}.plugin-file-zone{padding:20px 14px}.plugin-mapping-row{grid-template-columns:minmax(0,1fr) 52px}.plugin-mapping-row label{grid-column:1/-1}.plugin-center button,.plugin-dialog .button,.plugin-dialog .text-button,.plugin-dialog select{min-height:42px}.plugin-card footer{gap:10px}}
.plugin-preset-another{font-size:11px;color:var(--muted);margin-top:12px;text-align:center}.plugin-mapping-row input[hidden]{display:none}

.plugin-connection-field{margin:14px 0 0;min-width:0}.plugin-connection-field>span{font-size:11px;color:var(--muted)}.plugin-connection-field select{width:100%;min-width:0;font-size:12px;min-height:36px}
.capability-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:2px 0 28px}
.capability-heading h1{font-size:24px;letter-spacing:-.5px;margin:8px 0}
.capability-heading p{color:var(--muted);margin:0;font-size:13px;line-height:1.7}
.capability-heading .eyebrow{font-size:11px;color:var(--accent,#b9cf9a);letter-spacing:2px}
.capability-bottom{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:24px 0}
.capability-bottom p{flex:1;min-width:240px}
.builtin-card h2{line-height:1.5}.builtin-card .plugin-category{color:var(--accent,#b9cf9a)}
.comfy-server{border:1px solid var(--line);border-radius:10px;padding:16px;margin:14px 0;min-width:0}
.comfy-server legend{font-size:12px;padding:0 8px;color:var(--muted)}
.computer-connect{padding:26px 0 24px;border-bottom:1px solid var(--line)}
.computer-connect-heading{display:flex;align-items:center;justify-content:space-between;gap:24px}
.computer-center h2{font-size:17px;margin:0 0 9px}
.computer-connect-heading p{color:var(--muted);margin:0;font-size:13px;line-height:1.7}
.computer-connect-heading>.button{flex-shrink:0}
.computer-steps{list-style:none;padding:0;margin:30px 0 22px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.computer-steps li{display:flex;gap:12px;align-items:flex-start}
.computer-steps li>span{border:1px solid var(--line);border-radius:50%;width:26px;height:26px;display:grid;place-items:center;color:var(--accent);flex-shrink:0;font-size:12px}
.computer-steps strong{font-size:13px;font-weight:500}
.computer-steps p{font-size:12px;line-height:1.7;color:var(--muted);margin:6px 0 0}
.computer-help,.computer-more{font-size:13px;color:var(--muted)}
.computer-help summary,.computer-more>summary{cursor:pointer;padding:10px 0;width:fit-content}
.computer-help p{max-width:760px;line-height:1.8;margin:10px 0}
.computer-help a{color:var(--accent);display:inline-flex;align-items:center;gap:6px}
.computer-more{margin-top:14px}
.computer-more-actions{display:flex;align-items:center;flex-wrap:wrap;gap:18px;padding:18px 0}
.computer-ready{padding:24px 0 10px}
.computer-check{padding:14px 0;font-size:13px;line-height:1.8;overflow-wrap:anywhere}
@media(max-width:700px){.computer-connect-heading{align-items:flex-start;flex-direction:column;gap:18px}.computer-connect-heading>.button{width:100%}.computer-steps{grid-template-columns:1fr;gap:20px;margin:24px 0 16px}.computer-steps p{margin-top:3px}}
.workflow-generation{border-top:1px solid var(--line);padding-top:16px;margin-top:8px}
.workflow-generation h3{font-size:14px;margin:0 0 16px}
#builtin-probe-result{overflow-wrap:anywhere;font-size:12px}#builtin-probe-result:empty{display:none}
@media(max-width:650px){.capability-heading{align-items:flex-start;flex-direction:column;gap:16px}.capability-heading h1{font-size:21px}.capability-heading .button{width:100%}.capability-bottom{gap:10px}.comfy-server{padding:12px}.comfy-server .two-col{grid-template-columns:1fr}}

.page-heading[hidden]{display:none}

/* Route selection belongs to the storyboard workspace, beside generation controls. */
.storyboard-generation{display:block;gap:12px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;margin:16px 0 8px;background:var(--panel,#1c1e1d)}
.storyboard-generation .field{margin:0;min-width:0;gap:6px}
.storyboard-generation .field>span{font-size:11px;color:var(--muted)}
.storyboard-generation select{width:100%;min-width:0;height:38px;font-size:12px}
.storyboard-route-main>.button{white-space:nowrap}
.storyboard-route-status{margin:8px 0 0;font-size:12px}
.generation-route-summary{display:flex;flex-direction:column;gap:7px;border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin-bottom:16px}
.generation-route-summary>span{font-size:11px;color:var(--muted)}
.generation-route-summary>strong{font-size:13px;line-height:1.6}
#dialog .field[hidden]{display:none}
@media(max-width:650px){.storyboard-generation{padding:12px}.storyboard-generation select{height:44px}}

/* Project lifecycle: separate opening a project from its destructive action. */
.project-choice-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}
.project-choice-row .project-choice{flex:1;min-width:0;border-bottom:0}.project-choice-row .project-choice>span{min-width:0;overflow-wrap:anywhere}
.project-delete{flex-shrink:0;padding:10px 4px}.project-delete-summary{line-height:1.8}.project-delete-summary>strong{display:block;font-size:17px;overflow-wrap:anywhere}.project-delete-summary p{color:var(--muted)}
.project-delete-summary .danger,.danger{color:var(--danger,#df8e87)}.button.destructive{background:#a93d37;border-color:#a93d37;color:#fff}.button.destructive:hover{background:#bf4942}
.workspace-empty{min-height:100vh;padding:40px 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px}.workspace-empty .panel{width:min(520px,100%);padding:40px;text-align:center}.workspace-empty .inline-actions{justify-content:center;flex-wrap:wrap}.workspace-empty p{color:var(--muted);margin-bottom:24px}.project-empty-icon{color:var(--accent);margin:12px 0 20px}.workspace-empty h1{font-size:25px}
.workspace-empty .user-chip{justify-content:center;flex-wrap:wrap;white-space:normal}.workspace-empty .top-actions .button{display:inline-flex}
@media(max-width:560px){.project-choice-row{gap:6px}.project-choice-row .project-choice{padding-left:0;padding-right:0}.project-delete{font-size:11px}.workspace-empty .panel{padding:28px 18px}}
/* Welcome screen (no projects yet) */
/* The project home is separate from the focused production workspace. */
.project-home{min-height:100vh;padding:28px 40px 0;background:radial-gradient(900px 450px at 40% 0,#dfa2750c,transparent 70%),var(--bg)}
.project-home-top,.project-home-content{width:100%;max-width:1200px;margin:0 auto}
.project-home-top{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:42px}
.project-home-top .brand{font-size:18px;white-space:nowrap}
.project-home-top .top-actions{flex-wrap:wrap;justify-content:flex-end}
.project-home-top .top-actions .button{display:inline-flex}
.project-home-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px 0 24px}
.project-home-heading .eyebrow{color:var(--accent);margin:0 0 12px;letter-spacing:2px}
.project-home-heading h1{font-size:32px;font-weight:600;letter-spacing:.5px;margin:0 0 12px;line-height:1.3}
.project-home-heading p{color:var(--muted);margin:0;font-size:14px}
.project-count{white-space:nowrap;color:var(--muted);font-size:12px;padding-bottom:2px}
.story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.story-card,.story-new-card{position:relative;min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--panel);transition:border-color .18s,background .18s}
.story-card:hover{border-color:#dfa27570}
.story-card-open{display:block;width:100%;padding:0;text-align:left;border:0;border-radius:14px;background:transparent;color:var(--text);overflow:hidden;cursor:pointer}
.story-cover{position:relative;aspect-ratio:16/9;overflow:hidden;background:linear-gradient(135deg,#303033,#232326);display:grid;place-items:center}
.story-cover-title{font-size:32px;line-height:1.4;letter-spacing:4px;text-align:center;color:#d8c3b4;padding:40px 32px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.story-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.story-cover img[hidden]{display:none}
.story-cover-label{position:absolute;left:14px;top:14px;padding:4px 8px;border-radius:5px;font-size:10px;letter-spacing:1px;background:#18181bc9;color:#eee6df;backdrop-filter:blur(5px)}
.story-card-content{padding:18px 20px}
.story-card-content h2{font-size:17px;font-weight:600;line-height:1.4;margin:0 0 7px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.story-card-content p{font-size:12px;color:var(--muted);margin:0 0 22px}
.story-card-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted)}
.story-continue{display:inline-flex;align-items:center;gap:5px;color:var(--accent);white-space:nowrap}
.story-new-card{min-height:300px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:36px 24px;background:#dfa27508;border:1px dashed #dfa27555;cursor:pointer;color:var(--text);text-align:center}
.story-new-card:hover{background:#dfa27512;border-color:var(--accent)}
.story-new-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:14px;background:#dfa27518;color:var(--accent);margin-bottom:20px}
.story-new-card strong{font-size:18px;font-weight:600;margin-bottom:12px}
.story-new-card>span:not(.story-new-icon){font-size:13px;color:var(--muted)}
.story-new-card small{font-size:11px;color:var(--muted);margin-top:6px}
.story-card-menu{position:absolute;top:8px;right:8px;z-index:2}
.story-card-menu summary{width:36px;height:36px;display:grid;place-items:center;list-style:none;cursor:pointer;border-radius:8px;color:#fff;background:#18181bcc}
.story-card-menu summary::-webkit-details-marker{display:none}
.story-card-menu[open]{z-index:3}
.story-card-menu>div{position:absolute;right:0;top:42px;width:148px;padding:5px;background:var(--panel);border:1px solid var(--line);border-radius:9px;box-shadow:0 10px 30px #0004}
.story-card-menu button{display:block;width:100%;padding:12px 10px;text-align:left;background:transparent;border:0;border-radius:5px;font-size:12px;color:var(--text)}
.story-card-menu button.danger{color:var(--danger,#e8928a)}
.story-card-menu button:hover{background:#ffffff09}
.archived-projects{margin-top:36px}
.archived-projects>summary{display:flex;align-items:center;gap:8px;width:fit-content;list-style:none;font-size:13px;color:var(--muted);cursor:pointer;padding:12px 0}
.archived-projects>summary::-webkit-details-marker{display:none}
.archived-projects .story-grid{margin-top:12px}
.project-home-footer{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);margin-top:48px;padding:22px 0;font-size:11px;color:var(--muted)}
.story-card-open:focus-visible,.story-new-card:focus-visible,.story-card-menu summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:1000px){.story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-home{padding:24px 28px 0}}
@media(max-width:640px){.project-home{padding:20px 18px 0}.project-home-top{flex-wrap:wrap;gap:16px}.project-home-top .top-actions{gap:8px}.project-home-heading{padding:40px 0 24px}.project-home-heading h1{font-size:26px}.project-home-heading p{font-size:13px}.project-count{display:none}.story-grid{grid-template-columns:1fr;gap:18px}.story-new-card{min-height:230px}.story-card-menu summary{width:44px;height:44px}.project-home-footer{flex-wrap:wrap;gap:10px}.project-home-top .user-chip{flex-wrap:wrap;max-width:100%;justify-content:flex-start}}
@media(prefers-reduced-motion:reduce){.story-card,.story-new-card{transition:none}}


/* Workflow selection leads; account setup stays in a separate dialog. */
.service-center{max-width:1120px}
.service-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:4px 0 22px}
.service-heading h1{font-size:23px;line-height:1.3;margin:0 0 7px;letter-spacing:-.5px}
.service-heading p{font-size:12px;color:var(--muted);line-height:1.6;margin:0}
.service-tabs{display:flex;gap:28px;border-bottom:1px solid var(--line)}
.service-tabs button{display:flex;align-items:center;gap:9px;border:0;border-bottom:2px solid transparent;background:none;padding:12px 0;color:var(--muted);font-size:14px}
.service-tabs button.active{color:var(--text);border-bottom-color:var(--accent)}
.service-tabs small{font-size:10px;font-weight:400;opacity:.7}
.service-connection-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;color:var(--muted);font-size:11px}
.service-connection-bar>span{display:flex;align-items:center;gap:8px;min-width:0}
.service-connection-bar>span>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service-connection-bar>button{display:flex;align-items:center;gap:5px;flex-shrink:0;font-size:11px}
.service-filterbar{margin:12px 0 22px}
.service-filterbar .search-input{background:transparent;width:240px}
.service-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
.service-section-title h2{font-size:13px;font-weight:600;margin:0}
.service-section-title>span{font-size:10px;color:var(--muted)}
.service-quick{margin-bottom:28px}
.service-list{min-width:0}
.service-quick-list{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--panel)}
.service-row{display:flex;align-items:center;gap:12px;padding:15px 16px;min-width:0}
.service-row+.service-row{border-top:1px solid var(--line)}
.service-row:hover{background:#ffffff03}
.service-row-copy{flex:1;min-width:0}
.service-row-copy h3{font-size:13px;font-weight:500;line-height:1.5;margin:0 0 3px;overflow-wrap:anywhere}
.service-row-copy p{font-size:11px;line-height:1.5;color:var(--muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service-models{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;margin:3px 0 5px;min-width:0}
.service-model{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 0;border:0;background:transparent;color:var(--text);font:inherit;font-size:12px;text-align:left;cursor:pointer}
.service-model span,.service-model-account{font-size:11px;color:var(--muted);flex-shrink:0}
.service-model strong{font-weight:500;overflow-wrap:anywhere;min-width:0}
.service-model svg{flex-shrink:0;color:var(--muted)}
.service-model:hover strong{text-decoration:underline;text-underline-offset:3px}
.service-model:focus-visible{outline:1px solid var(--accent);outline-offset:3px;border-radius:3px}
.service-current{padding:14px 16px;margin:0 0 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.service-current>strong{font-size:12px;font-weight:500}
.service-current>div{display:flex;flex-wrap:wrap;gap:8px 20px;margin:9px 0;font-size:12px;color:var(--muted)}
.service-current b{font-weight:400;color:var(--text);overflow-wrap:anywhere}
.service-current p{font-size:11px;line-height:1.6;color:var(--muted);margin:0}
.service-selections{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.service-selection{display:inline-flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:6px;padding:5px 9px;font-size:11px;color:var(--muted)}
.service-selection.selected{color:var(--green);border-color:color-mix(in srgb,var(--green) 30%,transparent);background:color-mix(in srgb,var(--green) 6%,transparent)}
.service-selection .text-button{font-size:11px;padding:2px;color:var(--text)}
.service-selection .text-button:disabled{opacity:.4;cursor:not-allowed}
.service-row-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.service-row-actions>.text-button{font-size:11px;color:var(--muted)}
.service-row-actions>.button{min-width:56px;justify-content:center;white-space:nowrap}
.service-row-state{font-size:10px;color:var(--muted);white-space:nowrap}
.service-popularity{font-size:10px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.service-heat-status{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;margin-top:18px;font-size:10px;color:var(--muted)}
.service-heat-status a{color:inherit;text-underline-offset:3px}
.service-heat-status .text-button{font-size:10px}
.service-favorite{display:grid;place-items:center;flex-shrink:0;width:32px;height:36px;padding:0;background:transparent;color:var(--muted);border:0;border-radius:6px}
.service-favorite:hover{color:var(--accent);background:#ffffff06}
.service-favorite[aria-pressed="true"]{color:var(--accent)}
.service-purpose{border-bottom:1px solid var(--line)}
.service-purpose:first-of-type{border-top:1px solid var(--line)}
.service-purpose>summary{display:flex;align-items:center;gap:16px;min-height:58px;padding:12px 4px;cursor:pointer;list-style:none}
.service-purpose>summary::-webkit-details-marker{display:none}
.service-purpose-title{display:flex;align-items:center;gap:10px;min-width:175px;font-size:13px;font-weight:500}
.service-purpose-title small{font-size:10px;font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums}
.service-purpose-description{font-size:11px;color:var(--muted);flex:1}
.service-purpose>summary>svg{flex-shrink:0;color:var(--muted);margin-left:auto}
.service-purpose[open]>summary>svg{transform:rotate(90deg)}
.service-purpose[open]>summary{color:var(--accent)}
.service-purpose>.service-list{border-top:1px solid var(--line);padding:0 0 8px}
.service-purpose .service-row{padding-left:4px;padding-right:4px}
.service-purpose .service-row+.service-row{border-top-color:#ffffff04}
.service-empty,.service-empty-note{color:var(--muted);font-size:12px;line-height:1.7;padding:14px 0;margin:0}
.service-footer{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-top:22px;color:var(--muted);font-size:10px}
.service-footer>span{flex:1}
.service-footer>.text-button,.service-footer summary{font-size:10px;cursor:pointer}
.service-footer details{position:relative}
.service-footer details>div{position:absolute;right:0;bottom:24px;z-index:5;width:200px;display:grid;gap:5px;padding:10px;background:var(--panel);border:1px solid var(--line);border-radius:8px}
.service-footer details button{text-align:left;min-height:36px}
.service-account{display:flex;align-items:center;gap:14px;padding:17px 0;border-bottom:1px solid var(--line)}
.service-account>div{flex:1;min-width:0}
.service-account strong{font-size:14px;font-weight:500}
.service-account p{font-size:11px;color:var(--muted);line-height:1.6;margin:5px 0 0;overflow-wrap:anywhere}
.service-accounts{margin:4px 0 18px}
@media(max-width:650px){
 .service-heading{gap:12px}.service-heading h1{font-size:21px}.service-heading>.button{font-size:11px;flex-shrink:0}
 .service-tabs{gap:25px}.service-tabs button{min-height:44px}.service-tabs small{display:none}
 .service-connection-bar{padding:8px 0}.service-filterbar{flex-direction:row;flex-wrap:wrap;gap:10px;margin-bottom:20px}
 .service-filterbar .search-input{width:100%}.service-section-title>span{font-size:9px}
 .service-row{gap:8px;flex-wrap:wrap;padding:12px}
 .service-row-copy{flex-basis:calc(100% - 44px)}.service-row-copy p{white-space:normal}
 .service-row-actions{margin-left:auto;gap:18px}.service-row-state{margin-left:40px}
 .service-row>.service-popularity{margin-left:40px}
 .service-purpose>summary{flex-wrap:wrap;gap:4px 12px;position:relative;padding:14px 28px 14px 2px}
 .service-purpose-title{min-width:0;flex-basis:100%}.service-purpose-description{font-size:10px}
 .service-purpose>summary>svg{position:absolute;right:2px;top:24px}
 .service-footer{gap:8px 16px}.service-footer>span{flex-basis:100%;line-height:1.6}
 .service-account{gap:10px;flex-wrap:wrap}.service-account>div{flex-basis:60%}
}
.wb-audio-panel { margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.wb-audio-panel audio { width: 100%; max-width: 360px; }

/* System prompts: browse once, distinguish the displayed version from generation use. */
.prompt-module-page{width:100%;min-width:0}
.template-main{min-width:0}
.template-reference{margin-top:16px;padding:16px 20px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.template-reference .template-about{margin-top:0}
.template-reference .template-options{padding:12px 0 0;border-top:1px solid var(--line);margin-top:12px}
.prompt-module-page .template-mobile-nav{display:none}
.template-config{padding:16px 20px;margin-bottom:18px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.template-config-fields{display:grid;grid-template-columns:minmax(200px,1fr) minmax(240px,1.4fr);gap:20px;max-width:860px}
.template-config .field{margin:0;gap:6px;min-width:0}.template-config .field>span{font-size:11px;color:var(--muted)}
.template-config .field>small{font-size:11px;line-height:1.7;color:var(--muted)}
.template-config select{height:38px;font-size:13px}.template-config>p{margin:10px 0 0;font-size:11px;line-height:1.7;color:var(--muted)}
.template-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);border:1px solid var(--line);border-radius:10px;background:var(--panel);overflow:hidden}
.template-nav{padding:18px 12px;border-right:1px solid var(--line);min-width:0;background:#ffffff01}
.template-nav-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px 14px;font-size:12px;color:var(--text)}
.template-nav-heading>span{font-size:10px;color:var(--muted)}
.template-nav-group+ .template-nav-group{margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
.template-nav-group>h3{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.5;color:var(--text);font-weight:700;margin:0 0 4px;padding:4px 10px}
.template-nav-group>h3::before{content:"";width:3px;height:12px;flex:none;border-radius:2px;background:var(--accent)}
body:has([data-template-browse].select-menu-open) .select-menu-group{color:var(--text);font-size:13px;font-weight:700}
.template-nav-group>button{display:flex;align-items:center;gap:8px;width:100%;min-height:38px;padding:9px 10px;border:1px solid transparent;border-radius:6px;text-align:left;color:var(--muted);font-size:12px;line-height:1.5}
.template-nav-group>button>span{flex:1;min-width:0}.template-nav-group>button>small{font-size:9px;color:var(--accent);white-space:nowrap}
.template-nav-group>button:hover{background:#ffffff05;color:var(--text)}
.template-nav-group>button[aria-current]{border-color:color-mix(in srgb,var(--accent) 30%,transparent);background:color-mix(in srgb,var(--accent) 8%,transparent);color:var(--text)}
.template-nav-group>button[aria-current]>span{font-weight:600}
.template-document{min-width:0;padding:22px 24px}.template-document-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.template-document-heading h2{font-size:17px;font-weight:600;margin:0;line-height:1.5}.template-document-heading>span{font-size:10px;color:var(--muted);white-space:nowrap}
.template-usage{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;margin-bottom:14px;border:1px solid var(--line);border-radius:7px;background:var(--bg)}
.template-usage>div:first-child{min-width:0}.template-usage strong{display:block;font-size:12px;font-weight:500;line-height:1.7;color:var(--text)}
.template-usage small{display:block;font-size:11px;line-height:1.7;color:var(--muted);margin-top:3px}.template-usage.is-used{border-left:3px solid var(--accent)}
.template-usage-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:10px;flex-shrink:0}.template-usage-actions .text-button{font-size:11px}.template-usage-actions .button{white-space:nowrap}
.template-editor-info{display:flex;flex-direction:column;gap:3px;font-size:11px;line-height:1.7;color:var(--muted);margin-bottom:14px}.template-source{color:var(--text)}
.template-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:12px}
.template-editor-toolbar>label>span{font-size:11px;color:var(--muted)}.template-editor-toolbar>div{display:flex;align-items:center;gap:16px}.template-editor-toolbar .text-button{display:inline-flex;align-items:center;gap:5px;font-size:11px;min-height:32px}
.template-document .template-body{margin:0}.template-document .template-editor{font-family:var(--font);font-size:13px;line-height:1.85;min-height:360px;height:52vh;padding:16px 18px;resize:vertical;tab-size:2;color:var(--text);background:var(--bg);border-color:var(--line)}
.template-about{margin-top:12px}.template-about summary,.template-options summary{cursor:pointer;font-size:11px;color:var(--muted);width:fit-content;min-height:28px;line-height:28px}
.template-about p,.template-options p{font-size:11px;color:var(--muted);line-height:1.8;margin:6px 0;overflow-wrap:anywhere}
.template-options{padding:12px 2px}.template-options .field{max-width:300px;margin:10px 0}.template-options input{font-size:12px}
.template-load-error{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:7px 10px;margin-bottom:8px;border:1px solid var(--danger);border-radius:8px;font-size:12px;line-height:1.8;color:var(--danger);overflow-wrap:anywhere}
.prompt-module-page button:focus-visible,.prompt-module-page summary:focus-visible,.prompt-module-page select:focus-visible,.prompt-module-page textarea:focus-visible,.prompt-module-page input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.prompt-module-page button:disabled{opacity:.45;cursor:default}
@media(min-width:1500px){
 .template-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto 1fr;gap:16px;align-items:start}
 .template-main{grid-column:1;grid-row:1 / span 2}
 .template-config{grid-column:2;grid-row:1;margin-bottom:0;padding:18px}
 .template-config-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .template-reference{grid-column:2;grid-row:2;margin-top:0;padding:14px 18px}
 .template-document .template-editor{height:calc(100vh - 360px);min-height:440px}
}
@media(max-width:1100px){.template-workspace{grid-template-columns:195px minmax(0,1fr)}.template-document{padding:18px}.template-usage{align-items:flex-start;flex-wrap:wrap}.template-usage-actions{justify-content:flex-start}.template-editor-toolbar{flex-wrap:wrap}}
@media(max-width:720px){
 .template-reference{padding:12px 14px}.template-document-heading{flex-wrap:wrap;gap:6px}
 .template-config{padding:14px}.template-config-fields{grid-template-columns:1fr;gap:12px}.template-config select{height:44px;font-size:12px}
 .template-workspace{grid-template-columns:1fr}.template-nav{display:none}
 .prompt-module-page .template-mobile-nav{display:flex;margin:0 0 14px}.template-mobile-nav select{height:44px;font-size:12px}
 .template-document{padding:16px 12px}.template-document-heading h2{font-size:16px}.template-usage{padding:10px}.template-editor-toolbar>div{gap:18px}
 .template-document .template-editor{font-size:13px;padding:12px;min-height:320px}.template-editor-toolbar .text-button,.template-usage-actions button{min-height:44px}
 .template-about summary,.template-options summary{min-height:44px;line-height:44px}
}


/* UI consolidation: collapsible inspection lists, task results and asset actions */
.export-scope{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-size:11px;color:var(--muted);margin:0 0 9px}
.export-scope strong{font-size:14px;color:var(--text);font-weight:500}
.export-check-list{border:1px solid var(--line);border-radius:7px;padding:8px 11px;margin:8px 0;background:#ffffff03}
.export-check-list>summary{cursor:pointer;font-size:11px;color:#a8afa6;list-style:none;display:flex;align-items:center;gap:7px;min-height:22px}
.export-check-list>summary::-webkit-details-marker{display:none}
.export-check-list>summary:before{content:'▸';font-size:9px;color:#7f8680}
.export-check-list[open]>summary:before{content:'▾'}
.export-check-items{display:flex;flex-wrap:wrap;gap:5px 14px;margin-top:7px}
.export-check-items .text-button{font-size:10px}
.job-result{border:1px solid var(--line);border-radius:7px;padding:8px 11px;margin:9px 0;background:#ffffff03}
.job-result>summary{cursor:pointer;font-size:11px;color:#a8afa6;list-style:none;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;min-height:22px}
.job-result>summary::-webkit-details-marker{display:none}
.job-result>summary span{font-size:10px;color:var(--muted)}
.job-result[open]>summary{color:#e2c09f}
.job-result>.job-partial{max-height:280px;margin:7px 0 0}
.asset-more{margin-top:8px;border-top:1px solid var(--line);padding-top:2px}
.asset-more>summary{cursor:pointer;font-size:10px;color:#8f9b83;list-style:none;display:flex;gap:9px;align-items:center;min-height:24px}
.asset-more>summary::-webkit-details-marker{display:none}
.asset-more>summary:before{content:'···';letter-spacing:1px;font-size:11px}
.asset-more>summary span{color:#6f7a68;font-size:9px}
.asset-more[open]>summary{color:#d4b08c}
.asset-more-actions{display:flex;flex-wrap:wrap;gap:5px 14px;padding:2px 0 5px}
.asset-more-actions .text-button{font-size:10px}
@media(max-width:560px){.export-scope{padding:0}.job-result>summary{flex-direction:column;gap:2px}}


/* Asset cards: primary path first (image -> generate/import -> prompt -> voice) */
button.asset-preview{display:block;width:100%;padding:0;border:0;text-align:left;cursor:pointer}
button.asset-preview:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.asset-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:2px}
.asset-meta .eyebrow{margin:0}
.asset-version-link{font-size:10px;color:#c9ad8b;background:none;border:0;padding:0;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.asset-version-link:hover{color:#edc5a4}
.asset-version-link.none{color:#7c8774;text-decoration:none}
.asset-audio-state{font-size:10px;color:#8f9b83}
.asset-desc{font-size:12px;line-height:1.7;color:#c6cfbe;margin:4px 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.asset-prompt{margin:8px 0 2px;padding:8px 10px;background:#17191b;border:1px solid var(--line);border-radius:7px}
.asset-prompt-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;color:#9dab8d;margin-bottom:3px}
.asset-prompt-head>div{display:flex;gap:10px;flex-shrink:0}
.asset-prompt-head .text-button{font-size:10px}
.asset-prompt-text{font-size:11px;line-height:1.7;color:#b9c6ad;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
.asset-prompt-text.expanded{display:block;-webkit-line-clamp:unset;max-height:260px;overflow:auto;cursor:zoom-out}
.asset-prompt-text.empty{color:#717d68;cursor:default}
.asset-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}
.asset-primary-actions>.button{width:100%;justify-content:center;padding-left:6px;padding-right:6px}
.asset-primary-actions>.button:only-child{grid-column:1/-1}
.asset-primary-actions:has(>.button:nth-child(3))>.button:first-child{grid-column:1/-1}
.asset-primary-actions>.asset-voice-link{grid-column:1/-1;font-size:9px;color:#8f9b83}
@media(max-width:1280px){.asset-prompt-text{-webkit-line-clamp:3}}

/* The first screen is the writing workspace, with file import beside the editor. */
.script-start-hint{padding:18px 0 20px;border-bottom:1px solid var(--line);margin-bottom:18px}
.script-start-hint strong{font-size:17px}.script-start-hint p{color:var(--muted);line-height:1.7;margin:8px 0 14px}
.computer-mappings{padding-left:20px;overflow-wrap:anywhere;font-size:12px;line-height:1.9;color:var(--muted)}

.runninghub-panel{padding:24px 0;border-bottom:1px solid var(--line)}
.runninghub-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}
.runninghub-heading h2{font-size:17px;margin:0 0 6px}.runninghub-heading p{margin:0;color:var(--muted);font-size:13px}
.runninghub-picker{display:flex;align-items:flex-end;gap:14px;margin-top:18px}.runninghub-picker .field{flex:1;margin:0;min-width:0}.runninghub-picker>.hint{flex:1;margin:0}.runninghub-picker>.button,.runninghub-picker>.text-button{flex-shrink:0;margin-bottom:2px}
@media(max-width:700px){.runninghub-heading{align-items:flex-start}.runninghub-picker{flex-wrap:wrap}.runninghub-picker .field{flex-basis:100%}.runninghub-heading>.button{font-size:12px;padding:9px 12px}}

.cloud-site-picker{max-width:360px;margin:24px 0 4px}.cloud-site-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:22px 0}.cloud-site-heading h1{font-size:20px;margin:0 0 8px}.cloud-site-heading p{margin:0;color:var(--muted);font-size:13px}.cloud-site-center .runninghub-panel{border-bottom:0}.cloud-site-center .service-footer{margin-top:24px}.cloud-site-center .computer-more{margin-top:14px}
@media(max-width:700px){.cloud-site-picker{max-width:none}.cloud-site-heading{align-items:flex-start}.cloud-site-heading p{line-height:1.6}}

.cloud-site-controls{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin:24px 0 4px}.cloud-site-controls .cloud-site-picker{flex:1;min-width:220px;margin:0}.cloud-site-controls>button{margin-bottom:0}.custom-api-models{margin:12px 0}.plugin-dialog .custom-api-models .field{margin:0}
@media(max-width:700px){.cloud-site-controls .cloud-site-picker{max-width:none}.cloud-site-controls>button{width:100%}}

/* Compact secondary pages, preserving meaningful state and recovery controls. */
.settings-panel{width:100%}.settings-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;padding:12px 0;border-bottom:1px solid var(--line)}
.settings-row:first-child{padding-top:0}.settings-row:last-child{padding-bottom:0;border:0}.settings-row h2{font-size:13px;min-width:90px;margin:0}.settings-row .inline-actions{flex-wrap:wrap}
.task-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-bottom:12px}
.task-toolbar>.section-title{order:2;margin:0 0 0 auto}.task-toolbar>.collection-toolbar{margin:0;gap:8px;flex-wrap:wrap}
.task-panel .job-card{padding:12px;margin:8px 0}.task-panel .job-summary{justify-content:flex-start;gap:4px 16px;margin-top:6px}
.task-panel .job-owner{margin:0}.task-panel .job-footer{display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;margin-top:6px;min-width:0}.task-panel .job-footer>.job-actions{margin:0;padding:0;border:0}.task-panel .job-footer>.job-progress{flex:1 1 260px;min-width:0;margin:0;gap:4px 12px}
.task-panel .job-card[data-job-running="false"] .job-progress [data-progress-field="activity"]{display:none}
.template-editor-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin-bottom:8px}
.template-editor-meta .template-editor-info{flex-direction:row;flex-wrap:wrap;gap:4px 12px;margin:0}
.template-editor-meta .template-editor-toolbar{margin:0;flex-wrap:wrap;gap:8px}
.template-document-heading{margin-bottom:10px}.template-usage{padding:8px 10px;margin-bottom:8px}
.service-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;border-bottom:1px solid var(--line);padding-bottom:10px}
.service-toolbar .service-tabs{border:0;margin:0;padding:0}.service-toolbar .cloud-site-controls{margin:0;align-items:center;flex:1;gap:12px}
.service-toolbar .cloud-site-picker{display:flex;flex-direction:row;align-items:center;gap:10px;max-width:360px;min-width:200px}.service-toolbar .cloud-site-picker>span{margin:0;white-space:nowrap}
.service-toolbar .cloud-site-picker select{min-width:0;flex:1}.service-tabs button{display:flex;align-items:center;gap:6px}.service-tabs button small{margin:0}
.runninghub-panel{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;padding:16px 0}
.runninghub-heading{margin:0;gap:16px}.runninghub-picker{margin:0;align-items:center;flex:1;gap:12px;min-width:0}
.runninghub-picker>.field{display:flex;flex-direction:row;align-items:center;gap:10px;margin:0;min-width:0}.runninghub-picker>.field>span{white-space:nowrap;margin:0}.runninghub-picker select{min-width:0}
.cloud-site-heading{padding:16px 0}.cloud-site-heading h1{margin:0;font-size:18px}.cloud-site-center .service-footer{margin-top:14px}
.computer-guide>summary{font-size:12px;color:var(--muted);cursor:pointer;margin:12px 0}.computer-steps{margin:12px 0}
.metrics .metric{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px}.metrics .metric>span{gap:12px}.metrics .metric strong{margin:0}
.budget-panel{display:flex;align-items:center;flex-wrap:wrap;gap:10px 20px}.budget-panel .section-title{margin:0;gap:12px;flex-wrap:wrap}.budget-panel .section-title span{font-size:10px}
.budget-panel .budget-row{flex:1 1 180px;margin:0;min-width:150px}.budget-panel>.hint{margin:0}.budget-panel>.field{display:flex;flex-direction:row;align-items:center;gap:10px;margin:0}.budget-panel>.field>span{margin:0}.budget-panel input{width:120px}
@media(max-width:700px){.task-toolbar>.section-title{margin-left:0}.task-toolbar select{max-width:100%}.task-panel .job-top>small{order:1;flex:1 1 100%;margin:0}.service-toolbar .cloud-site-controls{flex-basis:100%}.service-toolbar .cloud-site-controls>button{width:auto}.runninghub-heading{width:100%}.runninghub-picker{flex-wrap:wrap}.runninghub-picker>.field{flex:1 1 100%}.template-editor-meta{align-items:flex-start}.template-editor-toolbar>div{flex-wrap:wrap}.metrics .metric{gap:6px;flex-wrap:wrap}.budget-panel>.field{flex-wrap:wrap}.settings-row{gap:10px}.settings-row .inline-actions{gap:8px}}

.template-config .field{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;gap:6px 10px}.template-config .field>small{grid-column:1/-1}
.prompt-module-page .template-mobile-nav{flex-direction:row;align-items:center;gap:10px}.template-mobile-nav>span{white-space:nowrap}.template-mobile-nav select{flex:1;min-width:0}
:root .template-library-tabs{display:flex;gap:8px;margin-bottom:16px}
.custom-template-library{display:grid;grid-template-columns:minmax(0,2fr) minmax(250px,1fr);gap:20px;align-items:start}
.custom-template-library .panel{min-width:0}
.custom-template-list{display:grid;gap:14px;margin-top:18px}
.custom-template-card{border:1px solid var(--line,#ddd);border-radius:12px;padding:16px;min-width:0}
.custom-template-card h3{margin:0;overflow-wrap:anywhere}
.custom-template-card .inline-actions{flex-wrap:wrap;margin-top:12px}
.custom-template-card pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto}
.custom-template-assignments{display:grid;gap:8px;margin:14px 0}
.custom-template-assignment{display:flex;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid var(--line,#ddd)}
.custom-template-assignment small{display:block;margin-top:4px;overflow-wrap:anywhere;color:var(--muted,#777)}
@media(max-width:900px){.custom-template-library{grid-template-columns:minmax(0,1fr)}}

/* Episode navigation keeps editing tools out of the reading path. */
.episode-directory-actions{display:flex;align-items:center;gap:8px}.episode-row-menu{margin-top:6px}.episode-row-menu>summary{display:flex;align-items:center;justify-content:flex-end;gap:5px;cursor:pointer;list-style:none;color:var(--muted);font-size:11px;min-height:28px}.episode-row-menu>summary::-webkit-details-marker{display:none}.episode-row-menu>div{display:flex;flex-wrap:wrap;gap:6px 14px;padding:6px 0 2px}.episode-row-menu .text-button{min-height:30px}.episode-row-menu button:disabled{opacity:.4}.episode-directory .episode-open{min-height:40px}.episode-directory .episode-selection{padding-top:3px}.episode-directory header{padding-top:12px}.episode-directory .episode-check input{width:16px;height:16px}
@media(max-width:800px){.episode-row-menu>summary,.episode-row-menu .text-button,.episode-directory-actions button{min-height:40px}}

@media(max-width:640px){.project-home-top .top-actions{width:100%;min-width:0;justify-content:flex-start}.project-home-top .user-chip{flex:1 1 100%;min-width:0;white-space:normal}.project-home-top .user-chip .name{overflow-wrap:anywhere;min-width:0}}

.media-metadata{display:grid;grid-template-columns:auto 1fr;gap:10px 24px}.media-metadata dt{color:var(--muted)}.media-metadata dd{margin:0;overflow-wrap:anywhere}
.dialog-actions{flex-wrap:wrap}.dialog-actions .dialog-error{flex:1 1 100%;order:-1;margin:0;overflow-wrap:anywhere}.dialog-actions>button{flex-shrink:0}

html,body{overscroll-behavior:none}

#download-notices{position:fixed;z-index:95;right:12px;bottom:12px;width:min(350px,calc(100% - 24px));max-height:45dvh;overflow:auto}
#download-notices:empty{display:none}
.download-notice{margin:5px 0;padding:12px;overflow-wrap:anywhere}
.download-notice p{margin:4px 0 9px;color:var(--muted)}
