@charset "UTF-8";
:root{font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:#232629;background:#f5f6f8;font-synthesis:none;--green:#425063;--line:#e1e4e9;--muted:#878b91;--soft:#f0f2f6}*{box-sizing:border-box}body{margin:0;font-size:14px}button,input,textarea,select{font:inherit}button,a,summary,select{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.55}button,a,select,textarea{outline-offset:4px}a{color:inherit;text-decoration:none}button{color:inherit}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--green)}[hidden]{display:none!important}.sidebar{width:222px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:34px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:0 8px;font-size:24px;font-weight:700;letter-spacing:3px}.brand-mark{background:#323c4b;color:#fff;font-size:24px;width:43px;height:46px;display:grid;place-items:center;letter-spacing:0;border-radius:13px 13px 13px 3px}.brand small{display:block;letter-spacing:2px;font-size:8px;font-weight:600;margin-top:4px;color:#7e838b}.workspace{display:flex;align-items:center;gap:10px;background:#f6f7f9;border:1px solid var(--line);border-radius:9px;padding:12px 10px;margin:32px 0;font-size:12px;font-weight:600}.workspace-icon{width:28px;height:28px;background:#dfe5ed;border-radius:7px;display:grid;place-items:center;color:#526074}.workspace small{display:block;color:var(--muted);font-weight:400;font-size:10px;margin-top:4px}.workspace-dot{margin-left:auto;width:5px;height:5px;border-radius:50%;background:#758396}.nav-label{font-size:10px;color:#9ca1a7;padding:0 13px;margin-bottom:12px;letter-spacing:1px}.nav{border:0;background:transparent;display:flex;width:100%;align-items:center;gap:11px;padding:13px;border-radius:7px;margin-bottom:6px;color:#6f747c;text-align:left;font-size:12px}.nav>span{font-size:20px;line-height:20px}.nav.active{background:#e4e9f0;color:#3b4b62;font-weight:600}.nav b{font-size:10px;margin-left:auto;background:#dde2ea;padding:2px 5px;border-radius:4px;font-weight:500}.sidebar-bottom{margin-top:auto}.connection{font-size:11px;display:flex;align-items:center;gap:7px;padding:0 9px}.connection i,.live-tag i{width:5px;height:5px;background:#7185a2;border-radius:50%}.connection i.off{background:#c78d4f}.sidebar-bottom>p{font-size:9px;color:#9ba0a7;margin:10px 9px 24px}.profile{border-top:1px solid var(--line);padding:20px 8px 0;display:flex;gap:10px;align-items:center;font-size:11px}.profile>span{display:grid;place-items:center;background:#eee9de;width:31px;height:31px;border-radius:50%;color:#8b7b59;font-size:11px}.profile small{display:block;color:var(--muted);margin-top:4px;font-size:9px}main{margin-left:222px;padding:0 38px;max-width:1900px}header{height:79px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.breadcrumb{font-size:11px;color:#8a919b;display:flex;gap:15px}.breadcrumb strong{font-weight:500;color:#515861}.version{font-size:9px;letter-spacing:2px;color:#868f9b}.version i{font-style:normal;margin-left:12px;border:1px solid #d5dbe3;padding:5px 6px;border-radius:5px;font-size:10px}.intro{display:flex;align-items:center;justify-content:space-between;padding:35px 5px 32px}.eyebrow{font-size:9px;font-weight:600;letter-spacing:2px;color:#7d8897;margin-bottom:14px}h1{font-weight:500;font-size:26px;letter-spacing:-.8px;margin:0 0 12px}h1 em{font-style:normal;color:#627185}.intro p{font-size:11px;color:#888e96;margin:0}.intro-symbol{font-size:66px;font-weight:100;color:#bdc7d5;line-height:1;transform:rotate(12deg);margin-right:15px}.studio-grid{display:grid;grid-template-columns:365px minmax(0,1fr);gap:21px;align-items:stretch}.panel{border:1px solid var(--line);border-radius:12px;background:white;overflow:hidden;box-shadow:0 3px 10px #222b3803}.panel-heading{padding:21px 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ebeef1;height:65px}h2{font-size:13px;font-weight:600;margin:0}.panel-heading>span{font-size:8px;color:#98a0aa;letter-spacing:1px}.composer form{padding:22px}.composer label{font-size:11px;display:block;font-weight:550;margin-bottom:10px}.label-note{float:right;color:#9099a5;font-size:9px;font-weight:400}select{width:100%;background:#f8f9fb;color:#454c56;border:1px solid #dbe0e6;border-radius:6px;padding:11px 12px;font-size:11px;min-height:40px;cursor:pointer}select:focus,textarea:focus{outline:1px solid #8e9caf;border-color:#8e9caf}.model-description{font-size:9px;color:#9ba2ab;margin:9px 0 23px}.label-row{display:flex;align-items:center;justify-content:space-between;margin-top:20px}.label-row label{margin-bottom:10px}.label-row>span{font-size:9px;color:#9099a5;margin-bottom:10px}textarea{width:100%;resize:vertical;line-height:1.9;font-size:11px;border:1px solid #dbe0e6;border-radius:7px;padding:13px;background:#f8f9fb;color:#3e434b;min-height:70px}textarea::placeholder{color:#9ea5ae}.prompt-suggestions{display:flex;align-items:center;gap:6px;margin-top:10px;font-size:9px;color:#9198a3;flex-wrap:wrap}.prompt-suggestions button{font-size:9px;border:1px solid #e1e6ec;background:#fff;color:#6a7686;border-radius:4px;padding:4px 6px}.prompt-suggestions button:hover{background:#e9eef5}.ratios{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.ratio{height:47px;border:1px solid #dfe4ea;background:white;border-radius:5px;display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;font-size:8px;color:#848e9b}.ratio .shape{display:block;border:1px solid #909aa9;width:15px;height:15px;border-radius:2px}.ratio[data-ratio="2:3"] .shape,.ratio[data-ratio="3:4"] .shape{width:11px;height:16px}.ratio[data-ratio="3:2"] .shape,.ratio[data-ratio="4:3"] .shape{width:18px;height:12px}.ratio[data-ratio="16:9"] .shape{width:20px;height:11px}.ratio[data-ratio="9:16"] .shape{width:10px;height:18px}.ratio[data-ratio="21:9"] .shape{width:22px;height:9px}.ratio.selected{border-color:#7a8ba3;background:#ebeff5;color:#3e506a}.ratio.selected .shape{border-color:#586b85}.field-grid{display:flex;gap:12px;margin-top:20px}.field-grid>div{flex:1;min-width:0}.references{margin-top:20px;border:1px dashed #d2d9e2;padding:12px;border-radius:6px;font-size:10px}.references summary{cursor:pointer;color:#6c7685;list-style:none}.references summary span{float:right;color:#97a0ad;font-size:9px}.references textarea{margin-top:12px;font-size:10px}.references p{font-size:9px;color:#828c99;line-height:1.6;margin-bottom:0}.generate{width:100%;background:#3e4e65;border:0;color:#fff;border-radius:7px;padding:13px;margin-top:22px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;box-shadow:0 3px 8px #37496315}.generate:hover{background:#334258}.generate span:first-child{font-size:19px}.generate span:last-child{margin-left:auto;font-size:17px}.generate span:first-child{margin-right:auto}.cost-note{text-align:center;color:#99a1ad;font-size:8px;margin:11px 0 0;line-height:1.7}.live-tag{display:flex;align-items:center;gap:6px;font-size:9px;color:#7b889a}.results{display:flex;flex-direction:column;min-height:650px}.result-toolbar{display:flex;align-items:center;justify-content:space-between;padding:16px 22px}.tabs{display:flex;gap:5px}.tabs button{font-size:10px;background:transparent;color:#8f98a4;border:0;padding:6px 11px;border-radius:5px}.tabs button.selected{background:#e9eef4;color:#536681}.refresh{border:1px solid #dfe4eb;background:#fff;border-radius:5px;color:#7f8a9a;font-size:17px;width:29px;height:27px}.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:45px 20px 85px;text-align:center}.empty-art{position:relative;width:160px;height:140px;margin-bottom:28px}.art-card{position:absolute;width:108px;height:115px;border:1px solid #d3dae4;border-radius:10px}.art-card.back{left:20px;top:9px;transform:rotate(-12deg);background:#eef1f5}.art-card.front{left:43px;top:20px;transform:rotate(8deg);background:linear-gradient(145deg,#f9fbfd,#e5eaf2);overflow:hidden}.art-sun{position:absolute;top:24px;right:21px;width:21px;height:21px;border-radius:50%;background:#bfcbdc}.art-mountain{position:absolute;bottom:-9px;left:9px;width:85px;height:65px;background:#d3dbe7;clip-path:polygon(0 100%,0 68%,35% 8%,62% 55%,77% 35%,100% 63%,100% 100%)}.art-star{position:absolute;top:12px;left:11px;color:#94a2b5;font-size:16px}.art-plus{position:absolute;left:8px;bottom:4px;background:#fff;border:1px solid #d8dfe8;border-radius:50%;width:31px;height:31px;display:grid;place-items:center;font-size:20px;color:#73859f;box-shadow:0 3px 10px #485b7509}.empty-state h3{font-size:14px;font-weight:500;color:#6a7789;margin:0 0 14px}.empty-state p{font-size:10px;line-height:2;color:#9ba3af;margin:0}.empty-features{display:flex;gap:20px;font-size:9px;color:#99a2af;margin-top:32px}.results-footer{display:flex;justify-content:space-between;gap:10px;padding:15px 20px;background:#f9fbfd;border-top:1px solid #e7ebf1;font-size:8px;color:#9aa2ae;margin-top:auto}.page-footer{display:flex;justify-content:space-between;padding:24px 2px 28px;color:#a0a6af;font-size:8px;letter-spacing:.4px}.job-list{padding:0 20px 20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;align-content:start}.job-list:empty{display:none}.job{border:1px solid var(--line);border-radius:8px;overflow:hidden;min-width:0;align-self:start}.job-visual{background:#eef1f5;min-height:160px;display:flex;align-items:center;justify-content:center;position:relative;flex-direction:column;gap:12px;color:#7f8da0;font-size:11px}.job-visual img{display:block;width:100%;height:230px;object-fit:contain;cursor:zoom-in}.job-visual .status-icon{font-size:31px}.job-content{padding:13px}.job-title{font-size:11px;line-height:1.8;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.job-meta{font-size:8px;color:#8f97a3;display:flex;gap:7px;flex-wrap:wrap;align-items:center}.status{border-radius:4px;font-size:8px;padding:3px 5px;background:#e9edf3;color:#60728c}.status.FAILED,.status.REVIEW{background:#fbf0e6;color:#b18d66}.job-actions{display:flex;gap:6px;margin-top:13px;flex-wrap:wrap}.job-actions button,.download{background:#f2f5f9;border:1px solid #d9dfe8;border-radius:4px;color:#627590;font-size:9px;padding:5px 8px;cursor:pointer}.job-message{font-size:9px;line-height:1.7;color:#a98964;word-break:break-word}.subtle{font-size:10px;font-weight:400;color:#8f97a2;margin-left:8px}.error{color:#aa5d49;background:#fff5f1;padding:10px;border-radius:5px;font-size:11px;line-height:1.7;margin-top:14px}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#2d394a;color:#fff;padding:12px 22px;font-size:12px;border-radius:8px;box-shadow:0 6px 20px #1d273520;z-index:10}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}dialog{padding:22px;border:1px solid var(--line);border-radius:12px;max-width:90vw;background:#f8f9fb}dialog::backdrop{background:#1a1f25c9}dialog img{display:block;max-width:80vw;max-height:78vh;margin-bottom:20px}#close-preview{position:absolute;right:4px;top:1px;background:white;border:0;border-radius:50%;font-size:22px;width:27px;height:27px;color:#596370}.spin{animation:turn 2s linear infinite}@keyframes turn{to{transform:rotate(360deg)}}@media(min-width:1500px){.studio-grid{grid-template-columns:405px minmax(0,1fr)}main{padding:0 55px}.composer form{padding:25px}.intro{padding:40px 5px}.results{min-height:720px}}@media(max-width:1150px){.sidebar{width:190px;padding:28px 14px}main{margin-left:190px;padding:0 24px}.studio-grid{grid-template-columns:325px minmax(0,1fr);gap:16px}.composer form{padding:18px}.empty-features{gap:10px;font-size:8px}h1{font-size:23px}.results-footer span:last-child{display:none}.empty-state h3{font-size:12px}}@media(max-width:900px){.sidebar{width:74px;padding:24px 12px}.brand{padding:0}.brand>span:last-child,.workspace,.nav-label,.nav b,.sidebar-bottom,.nav{display:none}.brand-mark{width:44px;height:46px}.sidebar nav{margin-top:38px}.sidebar .nav{display:flex;font-size:0;justify-content:center;padding:12px 4px}.nav>span{font-size:23px}main{margin-left:74px;padding:0 20px}.studio-grid{grid-template-columns:310px minmax(0,1fr)}.intro-symbol{font-size:48px;margin:0}.empty-features{flex-direction:column;gap:12px}.results-footer{font-size:8px;line-height:1.7}.job-list{padding:0 12px 12px}.panel-heading{padding:18px 16px}.result-toolbar{padding:15px 12px}.tabs button{padding:6px 8px}.version{display:none}}@media(max-width:720px){.sidebar{position:static;width:100%;height:67px;padding:12px 20px;flex-direction:row;align-items:center;border-right:0;border-bottom:1px solid var(--line)}.brand-mark{width:32px;height:35px;font-size:19px;border-radius:9px}.brand{gap:9px;font-size:19px}.brand>span:last-child{display:block}.brand small{font-size:6px;margin-top:2px}.sidebar nav{display:flex;margin:0 0 0 auto;gap:4px}.sidebar .nav{padding:8px;width:35px;margin:0}.nav>span{font-size:20px}main{margin:0;padding:0 16px}header{height:48px}.intro{padding:26px 0}.intro h1{font-size:22px;line-height:1.6}.eyebrow{font-size:8px;margin-bottom:8px}.intro p{font-size:10px;line-height:1.8}.intro-symbol{display:none}.studio-grid{grid-template-columns:1fr}.composer form{padding:20px}.ratios{grid-template-columns:repeat(5,1fr)}.results{min-height:450px}.empty-state{padding:35px 15px 50px}.empty-features{flex-direction:row;gap:20px}.page-footer span:last-child{display:none}.job-list{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.version{display:block;font-size:7px}.version i{margin-left:5px}.results-footer{justify-content:center}}@media(prefers-reduced-motion:reduce){.spin{animation:none}}

.reference-file{display:flex;align-items:center;gap:8px;margin:10px 0}.reference-file img{width:48px;height:48px;object-fit:cover;border-radius:6px}.reference-file span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:11px}.references button{border:1px solid var(--line);border-radius:6px;background:var(--soft);padding:8px;font-size:11px}#reference-files{max-width:100%;font-size:11px}#upload-status{line-height:1.7}

.reference-dropzone{border:2px dashed #cdd5e1;border-radius:9px;padding:12px;margin:12px 0;background:#f8f9fb}.reference-dropzone.drag-target{border-color:var(--green);background:#e5ebf3}.reference-list-heading{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#69727f;margin-top:14px}.reference-file{padding:8px 0;border-top:1px solid var(--line);cursor:grab;flex-wrap:wrap}.reference-file.dragging{opacity:.4}.reference-file.drag-target{outline:2px solid var(--green);border-radius:6px}.reference-file .reference-order{flex:0 0 16px;font-weight:600;color:var(--green)}.reference-info{flex:1;min-width:60px;overflow-wrap:anywhere}.reference-info small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.reference-file .reference-placeholder{flex:0 0 40px;text-align:center;font-size:24px;color:#74849b}.reference-file button{padding:5px;font-size:10px}.reference-dropzone[aria-disabled=true]{opacity:.65}

.reference-handle{touch-action:none;user-select:none;cursor:grab;color:#6c7889;flex:0 0 14px!important;font-size:20px!important}

#reference-files-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:10px}.reference-file{position:relative;display:block;aspect-ratio:1;margin:0;padding:0;border:1px solid var(--line);border-radius:8px;background:#e7ebf1;touch-action:none;user-select:none;overflow:visible}.reference-file img{width:100%;height:100%;object-fit:cover;border-radius:8px;pointer-events:none}.reference-file .reference-order{position:absolute;top:5px;left:5px;z-index:1;background:#fffE;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-size:11px}.reference-file .reference-placeholder{display:grid;place-items:center;height:100%;font-size:32px}.reference-file .reference-status{position:absolute;bottom:4px;left:4px;background:#fffD;border-radius:4px;padding:2px 4px;font-size:9px;color:#4a5564}.reference-file .reference-remove{position:absolute;top:3px;right:3px;width:21px;height:21px;padding:0;border-radius:50%;background:#fffE;font-size:16px;line-height:18px}.reference-file.dragging{opacity:.85;z-index:20;pointer-events:none;box-shadow:0 8px 20px #0003;cursor:grabbing}.reference-file.drag-target{outline:2px solid var(--green);background:#cfdaea}.reference-dropzone>label{cursor:pointer;padding:16px 4px;text-align:center;border-radius:6px}.reference-dropzone>label:hover{background:#e5ebf3}

.reference-file img{object-fit:contain}.reference-file{background:#eff2f5}

#compare{width:min(960px,94vw);padding:18px;background:#16181a;color:white}.compare-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}#close-compare{border:0;background:transparent;color:white;font-size:26px;cursor:pointer}#compare-stage{--split:50%;position:relative;height:min(70vh,720px);width:100%;background:#090a0b;overflow:hidden;touch-action:none;cursor:ew-resize}#compare-stage img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:contain;pointer-events:none}#compare-before-layer{position:absolute;inset:0;background:#090a0b;clip-path:inset(0 calc(100% - var(--split)) 0 0)}#compare-divider{position:absolute;left:var(--split);top:0;bottom:0;width:2px;background:white;transform:translateX(-50%);pointer-events:none}#compare-divider span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:62px;height:28px;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #ffffff9c;border-radius:999px;background:#f7f9fce8;box-shadow:0 4px 14px #0004,0 1px 2px #0003;color:#4d5868;backdrop-filter:blur(8px)}#compare-divider .compare-chevron{width:8px;height:12px;display:block;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;fill:none}#compare-divider .compare-handle i{display:block;width:1px;height:14px;background:#8b95a3;border-radius:1px}.compare-label{position:absolute;top:12px;padding:5px 9px;border-radius:5px;background:#0009;font-size:11px;pointer-events:none}.compare-label.before{left:12px}.compare-label.after{right:12px}#compare-slider{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:ew-resize}#compare-stage:focus-within{outline:2px solid #9fb1ca;outline-offset:-2px}.compare-help{font-size:11px;color:#b1b6bd;text-align:center;margin-bottom:0}

.job-list{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}.job.thumbnail-only{border:0;background:transparent}.thumbnail-only .job-visual{background:transparent;min-height:0}.thumbnail-only .job-visual img{height:250px;object-fit:contain;border-radius:8px}.thumbnail-only .job-visual img:hover{opacity:.94}

.compare-heading{justify-content:flex-end;margin-bottom:6px}#compare-download,#preview-download{display:table;margin:12px 0 0 auto}

#compare{width:min(1160px,94vw);max-width:94vw;background:#f3f5f8;color:#2b3038;padding:20px;border-radius:18px}#close-compare{position:absolute;right:10px;top:6px;z-index:3;color:#495361}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:24px;padding-top:18px}.detail-visual{min-width:0;align-self:center}#compare-stage{height:74vh;max-height:760px;border-radius:12px}.detail-info{display:flex;flex-direction:column;min-width:0;max-height:76vh;overflow:auto;padding:8px 4px}.detail-info dl{margin:0}.detail-info dt{font-size:11px;color:#89909b;margin-bottom:6px}.detail-info dd{margin:0 0 20px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.detail-prompt-heading{font-size:12px;margin:6px 0 10px}.detail-prompt-heading span{float:right;color:#89909b;font-size:10px}#detail-prompt{text-align:left;background:#e8ecf1;border:0;border-radius:9px;padding:13px;color:#3a4451;font-size:12px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;min-height:90px;max-height:240px;flex-shrink:0}#detail-copy-status{font-size:11px;color:#5d6d83;min-height:16px}.detail-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:auto;padding-top:22px}#detail-refill,#compare-download{padding:10px 14px;border-radius:7px;border:1px solid #d1d9e4;font-size:12px;margin:0;background:#fff;color:#485567}#detail-refill{background:#425063;color:#fff}@media(max-width:720px){.detail-layout{grid-template-columns:1fr;gap:14px}#compare-stage{height:48vh}.detail-info{max-height:none}.detail-info dl{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}.detail-info dt{grid-column:1}.detail-info dd{grid-column:2;margin-bottom:12px}#compare{max-height:94vh}.detail-actions{margin-top:0}}

.history-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.history-filters input{flex:2;min-width:180px;border:1px solid var(--line);padding:11px;border-radius:7px;background:white}.history-filters select{flex:1;min-width:140px;width:auto}.history-summary{color:#818a96;font-size:12px;margin:20px 0}.history-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px}.history-thumbnail{border:0;padding:0;background:transparent;cursor:zoom-in}.history-thumbnail img{width:100%;height:250px;object-fit:contain;border-radius:9px}.history-pending{padding:18px;border:1px solid var(--line);border-radius:9px;font-size:12px;overflow-wrap:anywhere}.history-pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin:28px 0}

#compare-stage.result-only{cursor:default}


#compare-stage,#compare-stage.result-only{cursor:grab;user-select:none}#compare-stage.panning{cursor:grabbing}#compare-stage img{transform-origin:center center}#compare-slider{inset:auto;left:var(--split);top:0;bottom:0;width:44px;height:100%;transform:translateX(-50%);cursor:ew-resize}

/* Full workspace with a centered bottom composer. */
body:has(.studio-grid:not([hidden])) main{max-width:none}
.studio-grid{height:calc(100dvh - 95px);min-height:540px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(160px,1fr) auto;gap:14px;padding-bottom:14px}
.studio-grid .results{grid-row:1;grid-column:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.studio-grid .results .panel-heading{height:50px;min-height:50px;padding:14px 22px}
.studio-grid .results .result-toolbar{padding:10px 22px}
.studio-grid .results-footer{display:none}
.studio-grid .empty-state{padding:20px;min-height:180px}
.studio-grid .empty-art{display:none}
.studio-grid .empty-features{display:none}
.studio-grid .composer{grid-row:2;grid-column:1;width:min(900px,100%);justify-self:center;border-radius:18px;box-shadow:0 8px 32px #222b3812;max-height:55dvh;overflow:auto}
.studio-grid .composer form{padding:16px 20px;display:grid;grid-template-columns:minmax(150px,1.5fr) minmax(85px,.65fr) minmax(130px,1fr) auto;gap:10px 12px;align-items:end}
.composer .label-row{grid-row:1;grid-column:1/-1;margin:0}
.composer .label-row label,.composer .label-row>span{margin:0}
.composer #prompt{grid-row:2;grid-column:1/-1;min-height:60px;max-height:140px;padding:9px 12px;font-size:13px;line-height:1.7}
.composer .dock-model{grid-row:3;grid-column:1;min-width:0}
.composer .dock-ratio{grid-row:3;grid-column:2;min-width:0}
.composer .field-grid{grid-row:3;grid-column:3;margin:0;gap:8px}
.composer label{margin-bottom:5px;font-size:10px}
.composer .label-note,.composer #model-description{display:none}
.composer select{min-height:36px;padding:8px;font-size:11px}
.composer #generate-button{grid-row:3;grid-column:4;margin:0;width:auto;min-width:120px;height:36px;padding:8px 14px;white-space:nowrap}
.composer .references{grid-row:4;grid-column:1/-1;margin:0;padding:9px 12px}
.composer .quote-box{grid-row:5;grid-column:1/-1;margin:0;padding:0;background:none;justify-content:flex-end;gap:8px;font-size:10px}
.composer .quote-box strong{font-size:12px}
.composer .cost-note{display:none}
.composer #form-error{grid-row:6;grid-column:1/-1;margin:0}
body:has(.studio-grid:not([hidden])) .page-footer{display:none}
@media(max-width:1100px){.studio-grid .composer form{grid-template-columns:minmax(120px,1.2fr) minmax(75px,.7fr) minmax(110px,1fr)}.composer #generate-button{grid-row:5;grid-column:3}.composer .quote-box{grid-column:1/3;justify-content:flex-start}}
@media(max-width:720px){.studio-grid{height:calc(100dvh - 130px);min-height:560px;gap:10px}.studio-grid .composer form{padding:12px;gap:8px;grid-template-columns:minmax(100px,1fr) minmax(70px,.65fr) minmax(100px,1fr)}.studio-grid .composer{max-height:60dvh;border-radius:12px}.composer .field-grid{flex-wrap:wrap}.studio-grid .results .panel-heading{padding:12px}.studio-grid .results .result-toolbar{padding:8px 12px}}
.studio-grid{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;padding:0 20px 20px;gap:12px}
.studio-grid .results{border:0;border-radius:0;box-shadow:none;background:transparent;margin:0 -20px}
.studio-grid .composer{border-color:#d3dae4;box-shadow:0 6px 28px #222b3816}
@media(max-width:720px){.studio-grid{padding:0 10px 12px}.studio-grid .results{margin:0 -10px}}
/* Floating composer overlays the independently scrolling gallery. */
.studio-grid{position:relative;display:block;padding:0;min-height:400px;isolation:isolate}
.studio-grid .results{height:100%;width:100%;margin:0;padding-bottom:calc(var(--composer-height,250px) + 52px);scroll-padding-bottom:calc(var(--composer-height,250px) + 52px)}
.studio-grid .composer{position:absolute;z-index:2;left:50%;bottom:20px;transform:translateX(-50%);width:min(940px,calc(100% - 48px));max-height:60%;background:rgba(249,251,246,.92);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid #d1d9e4;border-radius:22px;box-shadow:0 14px 48px #242e3b26,0 2px 8px #242e3b10;overscroll-behavior:contain}
.studio-grid .composer form{padding:16px 18px;gap:10px 12px}
.composer .label-row{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.composer #prompt{grid-row:1;min-height:72px;border:0;background:transparent;font-size:14px;padding:6px;box-shadow:none;resize:vertical}
.composer .dock-model,.composer .dock-ratio,.composer .field-grid{grid-row:2}
.composer #generate-button{grid-row:2}
.composer .dock-model>label,.composer .dock-ratio>label,.composer .field-grid label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.composer select{background:#ffffffb3;border-color:#d5dbe4;border-radius:9px}
.composer .references{grid-row:3;background:#ffffff70;border-radius:9px}
.composer .quote-box{grid-row:4}
.composer #form-error{grid-row:5}
@media(max-width:1100px){.composer #generate-button{grid-row:4;grid-column:3}.composer .quote-box{grid-row:4;grid-column:1/3}}
@media(max-width:720px){.studio-grid{height:calc(100dvh - 125px);min-height:400px;padding:0}.studio-grid .results{margin:0}.studio-grid .composer{width:calc(100% - 20px);bottom:10px;border-radius:16px;max-height:65%}.studio-grid .composer form{padding:12px;gap:8px}.composer #prompt{font-size:13px;min-height:64px}}
/* Compact two-row floating prompt bar. */
.studio-grid .composer{background:rgba(28,30,27,.94);border-color:#ffffff0d;color:#ddd;overflow:auto;border-radius:22px}
.studio-grid .composer form{grid-template-columns:62px minmax(130px,1fr) 90px 90px minmax(80px,auto) 48px;grid-template-rows:auto auto;gap:12px 8px;padding:16px}
.composer #reference-toggle{grid-row:1;grid-column:1;width:52px;height:64px;border:1px dashed #5c6168;border-radius:8px;background:#24272a;color:#bdc3cb;font-size:24px;align-self:start}
.composer #prompt{grid-row:1;grid-column:2/-1;color:#eee;min-height:86px;font-size:14px;background:transparent;resize:vertical}
.composer #prompt::placeholder{color:#8d929a}
.composer .dock-model{grid-row:2;grid-column:1/3;max-width:250px}
.composer .field-grid{grid-row:2;grid-column:3;margin:0;display:flex;flex-wrap:wrap}
.composer .dock-ratio{grid-row:2;grid-column:4}
.composer select{background:#0f1012;color:#dcdddf;border:0;border-radius:7px;min-height:38px;padding:8px;font-size:12px}
.composer .quote-box{grid-row:2;grid-column:5;justify-content:flex-end;color:#aaa;gap:4px;align-self:center;white-space:nowrap}
.composer .quote-box strong{color:#ddd}
.composer #generate-button{grid-row:2;grid-column:6;border-radius:50%;width:44px;min-width:44px;height:44px;background:#fff;color:#131517;font-size:28px;padding:0;box-shadow:none}
.composer #generate-button:hover{background:#d8dfe9}
.composer .references{display:none;grid-row:3;grid-column:1/-1;background:#f8f9fb;color:#3b4450;margin:0}
.composer .references[open]{display:block}
.composer .references summary{display:none}
.composer #form-error{grid-row:4;grid-column:1/-1}
@media(max-width:720px){.studio-grid .composer form{grid-template-columns:48px minmax(90px,1fr) 65px 65px 44px;padding:12px;gap:8px}.composer #reference-toggle{width:40px;height:54px}.composer #prompt{min-height:72px;font-size:12px}.composer .dock-model{grid-column:1/3}.composer .field-grid{grid-column:3}.composer .dock-ratio{grid-column:4}.composer #generate-button{grid-column:5}.composer .quote-box{grid-row:3;grid-column:1/-1}.composer .references{grid-row:4}.composer #form-error{grid-row:5}}
/* Minimal reference strip: drop anywhere on the floating composer. */
.composer .references,.composer .references[open]{display:block;background:transparent;border:0;padding:0;margin:0}
.composer .references:not(:has(.reference-file)):not(:has(#upload-status:not(:empty))){display:none}
.composer #reference-files-list{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:3px}
.composer .reference-file{flex:0 0 64px;width:64px;height:64px;aspect-ratio:1;border:1px solid #4f5661;border-radius:7px;background:#17191c}
.composer .reference-file img{width:100%;height:100%;object-fit:contain;border-radius:6px}
.composer .reference-file .reference-order{width:15px;height:15px;top:2px;left:2px;font-size:9px}
.composer .reference-file .reference-remove{width:17px;height:17px;top:-4px;right:-4px;font-size:13px;line-height:15px}
.composer .reference-file .reference-status{font-size:8px;padding:1px 3px;bottom:2px;left:2px}
.composer #upload-status{margin:4px 0 0;color:#adb8c7;font-size:10px}
.composer #upload-status:empty{display:none}
.studio-grid .composer.drag-target{border-color:#9ab4d8;box-shadow:0 0 0 2px #708eb9,0 14px 48px #242e3b26}
/* Reference thumbnails float separately above the prompt dock. */
.studio-grid .floating-references{position:absolute;z-index:3;left:50%;transform:translateX(-50%);bottom:calc(var(--composer-height,180px) + 32px);width:min(940px,calc(100% - 48px));margin:0;padding:10px 12px;border:1px solid #ffffff14;border-radius:14px;background:#222529ed;backdrop-filter:blur(18px);box-shadow:0 8px 28px #242e3b20;max-height:150px;overflow:auto}
.floating-references #reference-files-list{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:3px}
.floating-references .reference-file{flex:0 0 64px;width:64px;height:64px;margin:0;padding:0;border:1px solid #4f5661;border-radius:7px;background:#17191c}
.floating-references .reference-file img{width:100%;height:100%;object-fit:contain;border-radius:6px}
.floating-references .reference-file .reference-order{width:15px;height:15px;top:2px;left:2px;font-size:9px}
.floating-references .reference-file .reference-remove{width:17px;height:17px;top:-4px;right:-4px;padding:0;font-size:13px;line-height:15px}
.floating-references #upload-status{margin:4px 0 0;color:#adb8c7;font-size:10px}
.floating-references #upload-status:empty{display:none}
.studio-grid .results{padding-bottom:calc(var(--composer-height,180px) + var(--references-height,0px) + 64px);scroll-padding-bottom:calc(var(--composer-height,180px) + var(--references-height,0px) + 64px)}
@media(max-width:720px){.studio-grid .floating-references{width:calc(100% - 20px);bottom:calc(var(--composer-height,180px) + 20px);max-height:115px}}
/* Unframed floating references, with hover-only controls. */
.studio-grid .floating-references{background:transparent;border:0;box-shadow:none;backdrop-filter:none;padding:8px 12px}
.floating-references .reference-file{border:0;background:transparent;transition:scale .16s ease;scale:1}
.floating-references .reference-file .reference-order{display:none}
.floating-references .reference-file .reference-remove{opacity:0;pointer-events:none;transition:opacity .16s ease}
.floating-references .reference-file:hover,.floating-references .reference-file:focus-within{scale:1.07;z-index:2}
.floating-references .reference-file:hover .reference-remove,.floating-references .reference-file:focus-within .reference-remove{opacity:1;pointer-events:auto}
.floating-references .reference-file.dragging{scale:1;transition:none}
.floating-references #upload-status{color:#636e7d}
@media(hover:none){.floating-references .reference-file .reference-remove{opacity:1;pointer-events:auto}}
@media(prefers-reduced-motion:reduce){.floating-references .reference-file,.floating-references .reference-file .reference-remove{transition:none}}
/* Soft depth beneath reference thumbnails. */
.floating-references .reference-file img{filter:drop-shadow(0 5px 5px rgba(20,28,17,.22));transition:filter .16s ease}
.floating-references .reference-file:hover img{filter:drop-shadow(0 7px 7px rgba(20,28,17,.28))}
@media(prefers-reduced-motion:reduce){.floating-references .reference-file img{transition:none}}
/* Rounded thumbnails with a clearer, consistent shadow. */
.thumbnail-only .job-visual img,.history-thumbnail img,.material-preview img,.floating-references .reference-file img{border-radius:12px;filter:drop-shadow(0 7px 7px rgba(24,34,20,.3));transition:filter .16s ease}
.thumbnail-only .job-visual img:hover,.history-thumbnail:hover img,.material-preview:hover img,.floating-references .reference-file:hover img{filter:drop-shadow(0 10px 9px rgba(24,34,20,.38))}
.job.thumbnail-only,.thumbnail-only .job-visual{overflow:visible}
.floating-references #reference-files-list{padding:8px 6px 14px;gap:14px}
@media(prefers-reduced-motion:reduce){.thumbnail-only .job-visual img,.history-thumbnail img,.material-preview img,.floating-references .reference-file img{transition:none}}
/* Apply rounding to the actual image bounds, not contain letterboxing. */
.thumbnail-only .job-visual img{width:auto;height:auto;max-width:100%;max-height:250px}
.history-thumbnail img{width:auto;height:auto;max-width:100%;max-height:250px;margin:auto}
.material-preview{display:flex;align-items:center;justify-content:center}
.material-preview img{width:auto;height:auto;max-width:100%;max-height:100%}
.floating-references .reference-file img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:auto;height:auto;max-width:100%;max-height:100%;border-radius:10px}
/* Keep model, resolution and ratio grouped together on the left. */
.studio-grid .composer form{grid-template-columns:62px minmax(120px,180px) 90px 90px minmax(80px,1fr) 48px}
@media(max-width:720px){.studio-grid .composer form{grid-template-columns:48px minmax(90px,1fr) 65px 65px 44px}}
/* Larger reference previews above the composer. */
.floating-references .reference-file{flex-basis:88px;width:88px;height:104px;aspect-ratio:auto}
.studio-grid .floating-references{max-height:190px}
.floating-references #reference-files-list{gap:16px;padding:8px 6px 16px}
@media(max-width:720px){.floating-references .reference-file{flex-basis:72px;width:72px;height:88px}.studio-grid .floating-references{max-height:150px}}
/* Separate images from the background with a fine border, not shadows. */
.thumbnail-only .job-visual img,.history-thumbnail img,.material-preview img,.floating-references .reference-file img,
.thumbnail-only .job-visual img:hover,.history-thumbnail:hover img,.material-preview:hover img,.floating-references .reference-file:hover img{filter:none;box-shadow:none;border:1px solid #c8cdd3}
.floating-references .reference-file.dragging{box-shadow:none}
/* Tighter reference spacing, close to the prompt dock. */
.studio-grid .floating-references{bottom:calc(var(--composer-height,180px) + 26px);padding:4px 12px}
.floating-references #reference-files-list{gap:6px;padding:4px 2px}
@media(max-width:720px){.studio-grid .floating-references{bottom:calc(var(--composer-height,180px) + 16px)}}
/* Extra compact reference strip. */
.studio-grid .floating-references{bottom:calc(var(--composer-height,180px) + 22px);padding:2px 12px}
.floating-references #reference-files-list{gap:2px;padding:3px 0}
.floating-references .reference-file{flex-basis:72px;width:72px}
@media(max-width:720px){.studio-grid .floating-references{bottom:calc(var(--composer-height,180px) + 12px)}.floating-references .reference-file{flex-basis:62px;width:62px}}
/* Compact navigation rail with outward labels. */
@media(min-width:721px){
.sidebar{width:56px;padding:22px 8px;z-index:5;overflow:visible}
body>main{margin-left:56px}
.sidebar .brand-mark{width:36px;height:39px;font-size:21px;border-radius:11px 11px 11px 3px}
.sidebar .brand{padding:0;justify-content:center}
.sidebar .brand>span:last-child,.sidebar .workspace,.sidebar .nav-label,.sidebar .sidebar-bottom{display:none}
.sidebar nav{margin-top:32px}
.sidebar .nav{position:relative;display:flex;width:38px;height:40px;padding:0;margin:0 0 10px;justify-content:center;gap:0;font-size:0;border-radius:10px;overflow:visible;transition:background .18s ease,box-shadow .18s ease}
.sidebar .nav>span:first-child{font-size:22px;line-height:1;transition:transform .18s ease}
.sidebar .nav b{display:none}
.sidebar .nav:hover,.sidebar .nav:focus-visible{background:#dfe6ef;box-shadow:0 3px 10px #29384d12}
.sidebar .nav:hover>span:first-child,.sidebar .nav:focus-visible>span:first-child{transform:scale(1.14) translateY(-1px)}
.sidebar .nav .nav-tooltip{position:absolute;left:calc(100% + 13px);top:50%;transform:translate(-6px,-50%);display:block;width:max-content;padding:10px 14px;border-radius:8px;background:#2d3848;color:#fff;box-shadow:0 5px 18px #1e283524;font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,transform .18s ease,visibility .18s ease}
.sidebar .nav .nav-tooltip::before{content:'';position:absolute;right:100%;top:50%;margin-top:-5px;border:5px solid transparent;border-right-color:#2d3848}
.sidebar .nav:hover .nav-tooltip,.sidebar .nav:focus-visible .nav-tooltip{opacity:1;visibility:visible;transform:translate(0,-50%)}
}
@media(max-width:720px){.sidebar .nav .nav-tooltip{display:none}}
@media(prefers-reduced-motion:reduce){.sidebar .nav,.sidebar .nav>span:first-child,.sidebar .nav .nav-tooltip{transition:none}}
/* Clean submit icon and no native textarea resize grip. */
.composer #prompt{resize:none;overflow-y:auto}
.composer #generate-button{display:grid;place-items:center;transition:background .16s ease,transform .16s ease}
.composer #generate-button .generate-icon{display:block;transition:transform .16s ease}
.composer #generate-button:hover:not(:disabled) .generate-icon{transform:translateY(-2px)}
.composer #generate-button:active:not(:disabled){transform:scale(.95)}
@media(prefers-reduced-motion:reduce){.composer #generate-button,.composer #generate-button .generate-icon{transition:none}}
/* Smaller generate control. */
.composer #generate-button{width:36px;min-width:36px;height:36px;justify-self:end}
.composer #generate-button .generate-icon{width:18px;height:18px}
/* Quantity selector joins the compact parameter controls. */
.studio-grid .composer form{grid-template-columns:62px minmax(120px,180px) 80px 80px 70px minmax(70px,1fr) 44px}
.composer .dock-count{grid-row:2;grid-column:5;min-width:0}
.composer .quote-box{grid-column:6}
.composer #generate-button{grid-column:7}
@media(max-width:1100px){
.studio-grid .composer form{grid-template-columns:52px minmax(85px,1fr) 75px 85px 75px 44px}
.composer .dock-count{grid-row:3;grid-column:1/3}
.composer .quote-box{grid-row:3;grid-column:3/6}
.composer #generate-button{grid-row:2;grid-column:6}
.composer #form-error{grid-row:4}
}
@media(max-width:720px){
.studio-grid .composer form{grid-template-columns:48px minmax(75px,1fr) 70px 80px 40px}
.composer #generate-button{grid-column:5}
.composer .dock-count{grid-row:3;grid-column:1/3}
.composer .quote-box{grid-row:4;grid-column:1/-1}
.composer .dock-count{grid-row:3;grid-column:3/5}
.composer #form-error{grid-row:5}
}
.breadcrumb-logo{font-size:20px;font-weight:600;letter-spacing:.08em;line-height:1;color:#49698f}.breadcrumb-separator,#current-view{display:none}
@media(max-width:720px){.breadcrumb-logo{font-size:16px;letter-spacing:.05em}}
/* Dark workspace and translucent floating composer. */
body:not(.signed-out){background:#151617;color:#d7dce2;--line:#31353a;--soft:#212429;--muted:#98a0aa;color-scheme:dark}
body:not(.signed-out) .sidebar{background:#181a1e;border-color:#2e333b}
body:not(.signed-out) header{border-color:#2e3238}
body:not(.signed-out) .breadcrumb,body:not(.signed-out) .breadcrumb strong{color:#a2aab6}
body:not(.signed-out) .nav{color:#909cae}
body:not(.signed-out) .nav.active,body:not(.signed-out) .nav:hover,body:not(.signed-out) .nav:focus-visible{background:#27313e;color:#bccde5}
body:not(.signed-out) .studio-grid{background:#181a1c;border-color:#2f343b}
body:not(.signed-out) .results{color:#d5dbe3}
body:not(.signed-out) .results .panel-heading{border-color:#2b3036}
body:not(.signed-out) .tabs button{color:#a3abb7}
body:not(.signed-out) .tabs button.selected{background:#26303d;color:#c0d0e6}
body:not(.signed-out) .refresh,body:not(.signed-out) #logout{background:#20252d;border-color:#363f4c;color:#bcc8d8}
.studio-grid .composer{background:rgba(45,51,40,.65);border-color:#ffffff24;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);box-shadow:0 12px 36px #0004}
.composer select{background:#0d1015b3;color:#dce1e8}
.composer #prompt::placeholder{color:#98a0ac}
.composer #reference-toggle{background:#20273066;border-color:#76869c66}
.floating-references #upload-status{color:#b0bccd}
body:not(.signed-out) .empty-state h3{color:#b1bccb}
body:not(.signed-out) .empty-state p{color:#8e98a7}
body:not(.signed-out) .job:not(.thumbnail-only),body:not(.signed-out) .job:not(.thumbnail-only) .job-visual{background:#21252b;color:#b1bccb}
body:not(.signed-out) .manage-panel,body:not(.signed-out) .stat-card,body:not(.signed-out) .material-card{background:#1c2026;border-color:#313842;color:#cad3df}
body:not(.signed-out) .manage-intro h1{color:#d4dce6}
body:not(.signed-out) .management-table th,body:not(.signed-out) .management-table td{border-color:#313842}
body:not(.signed-out) .management-table th{background:#222932;color:#aab8cb}
body:not(.signed-out) #platform-view input,body:not(.signed-out) #platform-view select,body:not(.signed-out) #platform-view textarea{background:#161a1f;border-color:#37404c;color:#cbd5e2}
body:not(.signed-out) #platform-view label,body:not(.signed-out) .video-field{color:#b1bdcd}
body:not(.signed-out) .material-preview,body:not(.signed-out) .material-drop{background:#20252d;border-color:#475262;color:#b9c4d3}
body:not(.signed-out) .small-button{background:#262f3b;border-color:#3b4554;color:#c4cfdf}
body:not(.signed-out) #compare,body:not(.signed-out) #preview{background:#1c2025;border-color:#3c444e;color:#ccd5e2}
body:not(.signed-out) #detail-prompt{background:#252c35;color:#c8d2df}
body:not(.signed-out) #close-compare{color:#b8c4d4}
body:not(.signed-out) #detail-save-material,body:not(.signed-out) #compare-download{background:#262f3b;color:#c4cfdf;border-color:#3d4756}
body:not(.signed-out) .thumbnail-only .job-visual img,body:not(.signed-out) .history-thumbnail img,body:not(.signed-out) .material-preview img,body:not(.signed-out) .floating-references .reference-file img{border-color:#575f6b}
/* Neutral charcoal palette. */
body:not(.signed-out){background:#141414;color:#e2e2e2;--green:#777;--line:#363636;--soft:#272727;--muted:#a5a5a5}
body:not(.signed-out) .sidebar{background:#191919;border-color:#333}
body:not(.signed-out) header{border-color:#333}
body:not(.signed-out) .brand-mark{background:#363636;color:#f5f5f5}
body:not(.signed-out) .breadcrumb,body:not(.signed-out) .breadcrumb strong,body:not(.signed-out) #wallet-pill{color:#aaa}
body:not(.signed-out) .nav{color:#aaa}
body:not(.signed-out) .nav.active,body:not(.signed-out) .nav:hover,body:not(.signed-out) .nav:focus-visible{background:#333;color:#eee}
body:not(.signed-out) .sidebar .nav .nav-tooltip{background:#3a3a3a;color:#fff}
body:not(.signed-out) .sidebar .nav .nav-tooltip::before{border-right-color:#3a3a3a}
body:not(.signed-out) .studio-grid{background:#1b1b1b;border-color:#353535}
body:not(.signed-out) .results{color:#ddd}
body:not(.signed-out) .results .panel-heading{border-color:#303030}
body:not(.signed-out) .tabs button{color:#aaa}
body:not(.signed-out) .tabs button.selected{background:#353535;color:#eee}
body:not(.signed-out) .refresh,body:not(.signed-out) #logout{background:#292929;border-color:#454545;color:#ccc}
.studio-grid .composer{background:rgba(45,45,45,.65)}
.composer select{background:#111111b3;color:#e2e2e2}
.composer #prompt::placeholder{color:#999}
.composer #reference-toggle{background:#29292966;border-color:#8888;color:#ccc}
.composer #generate-button:hover{background:#ddd}
.floating-references #upload-status{color:#bbb}
body:not(.signed-out) .empty-state h3,body:not(.signed-out) .empty-state p{color:#aaa}
body:not(.signed-out) .job:not(.thumbnail-only),body:not(.signed-out) .job:not(.thumbnail-only) .job-visual{background:#292929;color:#bbb}
body:not(.signed-out) .manage-panel,body:not(.signed-out) .stat-card,body:not(.signed-out) .material-card{background:#232323;border-color:#3c3c3c;color:#ddd}
body:not(.signed-out) .manage-intro h1{color:#ddd}
body:not(.signed-out) .management-table th,body:not(.signed-out) .management-table td{border-color:#3c3c3c}
body:not(.signed-out) .management-table th{background:#2c2c2c;color:#bbb}
body:not(.signed-out) #platform-view input,body:not(.signed-out) #platform-view select,body:not(.signed-out) #platform-view textarea{background:#1c1c1c;border-color:#444;color:#ddd}
body:not(.signed-out) #platform-view label,body:not(.signed-out) .video-field{color:#bbb}
body:not(.signed-out) .material-preview,body:not(.signed-out) .material-drop{background:#292929;border-color:#555;color:#ccc}
body:not(.signed-out) .small-button,body:not(.signed-out) #detail-refill{background:#3a3a3a;border-color:#555;color:#eee}
body:not(.signed-out) #compare,body:not(.signed-out) #preview{background:#232323;border-color:#484848;color:#ddd}
body:not(.signed-out) #compare-stage,body:not(.signed-out) #compare-before-layer{background:#101010}
body:not(.signed-out) #detail-prompt{background:#303030;color:#ddd}
body:not(.signed-out) #close-compare{color:#ccc}
body:not(.signed-out) #detail-save-material,body:not(.signed-out) #compare-download{background:#353535;color:#ddd;border-color:#505050}
body:not(.signed-out) .thumbnail-only .job-visual img,body:not(.signed-out) .history-thumbnail img,body:not(.signed-out) .material-preview img,body:not(.signed-out) .floating-references .reference-file img{border-color:#626262}
dialog::backdrop{background:#000b}
body:not(.signed-out) .live-tag,body:not(.signed-out) .subtle{color:#999}
body:not(.signed-out) .live-tag i{background:#aaa}
/* Subtle cool-blue technology theme. */
body:not(.signed-out){background:#101319;color:#e1e8f2;--line:#2c3441;--soft:#202733;--green:#8db9ef}
body:not(.signed-out) .breadcrumb-logo{color:#e7f1ff}
body:not(.signed-out) .sidebar{background:linear-gradient(180deg,#171d27,#12161e);border-right:1px solid #7eaff020}
body:not(.signed-out) .brand-mark{background:linear-gradient(145deg,#3b506d,#222d3d);border:1px solid #98c8ff38;box-shadow:inset 0 1px 0 #ffffff14}
body:not(.signed-out) header{border-color:#799fd21a}
body:not(.signed-out) .studio-grid{background-color:#151a22;background-image:radial-gradient(ellipse at 50% 100%,#31548118,transparent 65%),linear-gradient(#93bafa04 1px,transparent 1px),linear-gradient(90deg,#93bafa04 1px,transparent 1px);background-size:auto,32px 32px,32px 32px;border:1px solid #8baed526;border-radius:18px}
body:not(.signed-out) .results .panel-heading{border-color:#8baed518}
body:not(.signed-out) .nav.active,body:not(.signed-out) .nav:hover,body:not(.signed-out) .nav:focus-visible{background:#77b2ff15;color:#b5d7ff;box-shadow:inset 0 0 0 1px #89baff30,0 0 18px #448cff0a}
body:not(.signed-out) .nav.active::before{content:'';position:absolute;left:-12px;top:14px;width:2px;height:18px;border-radius:2px;background:#a3ceff;box-shadow:0 0 9px #79b3ff99}
body:not(.signed-out) .sidebar .nav .nav-tooltip{background:#263448;border:1px solid #91bff433;color:#d5e8ff}
body:not(.signed-out) .sidebar .nav .nav-tooltip::before{border-right-color:#263448}
body:not(.signed-out) .tabs button.selected{background:#7dafff14;color:#c3deff;box-shadow:inset 0 0 0 1px #95c2ff22}
body:not(.signed-out) .refresh,body:not(.signed-out) #logout{background:#202938;border-color:#829bc333;color:#c4d5ec}
.studio-grid .composer{background:linear-gradient(125deg,#34445d99,#252d3c99);border:1px solid #b9d9ff40;box-shadow:0 16px 40px #0005,inset 0 1px 0 #e5f3ff20,0 0 30px #629ffc0a;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.composer select{background:#0d141eb3;color:#d7e2f2;border:1px solid #9abbe51c}
.composer select:focus,.composer #prompt:focus{outline:1px solid #93bded88}
.composer #reference-toggle{background:#849fc00a;border-color:#a0c8f555;color:#bfd8f5}
.composer #reference-toggle:hover{background:#94c4ff18;border-color:#a0c8f599}
.composer #generate-button{background:linear-gradient(145deg,#fff,#dbeaff);color:#213b5c;box-shadow:0 0 15px #99c5ff20}
.composer #generate-button:hover:not(:disabled){background:#f1f7ff;box-shadow:0 0 20px #99c5ff45}
body:not(.signed-out) .live-tag i{background:#9ac9ff;box-shadow:0 0 6px #8bc0ff70}
body:not(.signed-out) .thumbnail-only .job-visual img,body:not(.signed-out) .history-thumbnail img,body:not(.signed-out) .material-preview img,body:not(.signed-out) .floating-references .reference-file img{border-color:#93b1d344;box-shadow:none;filter:none}
body:not(.signed-out) .small-button:hover,body:not(.signed-out) #detail-refill:hover{background:#33445a;color:#e2efff}
/* Crafted brand lockup: a light board-and-pencil mark with restrained cool accents. */
.breadcrumb-logo{position:relative;top:5px;margin-left:19px;isolation:isolate;display:inline-flex;align-items:flex-end;gap:9px;font-size:40px;font-weight:520;letter-spacing:-.045em;line-height:1;color:#385b83;white-space:nowrap}
.breadcrumb-logo-cn::before{content:"";position:absolute;inset:-.06em -.08em;z-index:-1;border-radius:50%;background:linear-gradient(120deg,#65cfff 5%,#746dff 38%,#f4777d 68%,#65cfff 95%);background-size:250% 250%;filter:blur(.2em);opacity:.6;pointer-events:none;animation:breadcrumb-logo-glow 5s ease-in-out infinite}
.breadcrumb-logo-cn,.breadcrumb-logo-name,.breadcrumb-logo-prefix,.breadcrumb-logo-rest{position:relative;z-index:1;font-size:1em;line-height:1}
.breadcrumb-logo-cn{isolation:isolate;font-weight:800;letter-spacing:.08em;background:linear-gradient(145deg,#65cfff 10%,#746dff 52%,#f4777d 92%);-webkit-background-clip:text;background-clip:text;color:transparent}
.breadcrumb-logo-name{transform:translateX(-7px);display:inline-flex;align-items:flex-end;gap:6px;font-size:30px;color:#fff}
.breadcrumb-logo-prefix{font-size:35px;font-weight:760;letter-spacing:-.08em;color:#fff}
.breadcrumb-logo-rest{font-weight:600;letter-spacing:-.055em;color:#fff}
body:not(.signed-out) .breadcrumb-logo{color:#e7f1ff}
body:not(.signed-out) .breadcrumb-logo-cn{background:linear-gradient(145deg,#8bddff 8%,#a18aff 52%,#ff9d8c 92%);-webkit-background-clip:text;background-clip:text;color:transparent}
body:not(.signed-out) .breadcrumb-logo-prefix{color:#fff}
body:not(.signed-out) .breadcrumb-logo-rest{color:#fff}
@keyframes breadcrumb-logo-glow{0%,100%{background-position:0% 50%;transform:scale(.96)}50%{background-position:100% 50%;transform:scale(1.04)}}
@media(max-width:720px){.breadcrumb-logo{gap:7px}.breadcrumb-logo-cn{letter-spacing:.05em}.breadcrumb-logo-name{gap:4px}}
/* Avoid a duplicate rule immediately above the canvas border. */
body:not(.signed-out):has(.studio-grid:not([hidden])) main>header{border-bottom:0}
/* Uniform result frames keep mixed image ratios aligned without cropping. */
#job-list .job.thumbnail-only{border:1px solid #93b1d344;border-radius:12px;background:#10172080;overflow:hidden;box-shadow:none}
#job-list .thumbnail-only .job-visual{height:250px;min-height:0;padding:10px;overflow:hidden;background:transparent}
#job-list .thumbnail-only .job-visual img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;border:0;border-radius:6px;box-shadow:none;filter:none}
#job-list .job.thumbnail-only:hover{border-color:#a8cfff77;background:#1b263580}
/* Image details share the workspace's cool-blue surfaces and controls. */
body:not(.signed-out) #compare,body:not(.signed-out) #preview{background:linear-gradient(135deg,#1c2532f5,#141b25fa);border:1px solid #93b1d344;color:#e1e8f2;box-shadow:0 24px 80px #0008;backdrop-filter:blur(20px)}
#compare::backdrop,#preview::backdrop{background:#060b14b8;backdrop-filter:blur(5px)}
body:not(.signed-out) #compare-stage,body:not(.signed-out) #compare-before-layer{background:#0c1119}
body:not(.signed-out) #compare-stage{border:1px solid #93b1d32b}
body:not(.signed-out) #compare-stage:focus-within{outline-color:#93bded88}
#compare .detail-info{scrollbar-width:thin;scrollbar-color:#435570 transparent}
#compare .detail-info dt,#compare .detail-prompt-heading span{color:#8fA3bd}
#compare .detail-info dd{color:#e1e8f2}
#compare .detail-prompt-heading{color:#c6d7ec}
body:not(.signed-out) #detail-prompt{background:#0e172380;border:1px solid #93b1d32e;color:#d5e1f0;border-radius:12px;transition:background .16s,border-color .16s}
body:not(.signed-out) #detail-prompt:hover{background:#23324880;border-color:#93b1d366}
#compare #detail-copy-status{color:#a7ccf7}
body:not(.signed-out) #close-compare{width:30px;height:30px;display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:8px;color:#a9bed8;font-size:23px;transition:background .16s}
body:not(.signed-out) #close-compare:hover{background:#8db9ef18;border-color:#93b1d333;color:#edf5ff}
body:not(.signed-out) #close-compare{line-height:1}
#close-compare svg{display:block;flex-shrink:0;pointer-events:none}
#compare .detail-actions{gap:8px}
body:not(.signed-out) #detail-refill,body:not(.signed-out) #detail-save-material,body:not(.signed-out) #compare-download{display:inline-flex;justify-content:center;align-items:center;min-height:38px;margin:0;padding:9px 12px;border-radius:9px;border:1px solid #93b1d33d;background:#233044;color:#cfdef1;font-size:12px;line-height:1.4;transition:background .16s,border-color .16s}
body:not(.signed-out) #detail-refill{background:#91bff022;border-color:#9ac9ff66;color:#d9eaff}
body:not(.signed-out) #detail-refill:hover,body:not(.signed-out) #detail-save-material:hover,body:not(.signed-out) #compare-download:hover{background:#334965;border-color:#a8cfff88;color:#f1f7ff}
#compare-divider{background:#d4e7ffb3;width:1px}
#compare-divider .compare-handle{width:42px;height:28px;background:#f7f9fce8;border:1px solid #ffffff9c;color:#4d5868;font-size:initial}
/* Content-sized controls wrap naturally at any window or zoom size. */
.studio-grid .composer form{display:flex;flex-wrap:wrap;align-items:center;gap:10px 8px}
.composer #reference-toggle{order:0;flex:0 0 54px;width:54px;height:72px;aspect-ratio:3/4;align-self:stretch}
.composer #prompt{order:1;flex:1 1 calc(100% - 62px);width:calc(100% - 62px);min-width:0;height:72px;min-height:72px;margin:0}
.composer #clear-composer{order:2;flex:0 0 auto}
.composer .dock-model{order:2;flex:1 1 180px;min-width:150px;max-width:250px}
.composer .field-grid{order:3;display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:8px;margin:0}
.composer .field-grid>div{flex:0 0 76px;width:76px;min-width:76px}
.composer .field-grid #quality-field{flex-basis:92px;width:92px;min-width:92px}
.composer .dock-ratio{order:4;flex:0 0 80px;min-width:0}
.composer .dock-count{order:5;flex:0 0 72px;min-width:0}
.composer .dock-submit{order:6;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-left:auto;flex:0 0 auto}
.composer .dock-submit .quote-box{margin:0;padding:0;display:flex;gap:4px;background:transparent;white-space:nowrap}
.composer .dock-submit #generate-button{margin:0;flex:0 0 36px}
.composer #form-error{order:7;flex:1 0 100%;margin:0}
@media(max-width:720px){.studio-grid .composer form{padding:12px;gap:8px}.composer .dock-model{flex:1 1 100%;max-width:none}.composer .dock-submit{gap:8px}.composer select{min-height:36px}.composer #reference-toggle{flex-basis:45px;width:45px;height:60px}.composer #prompt{height:60px;min-height:60px}.composer .field-grid>div{flex-basis:66px;width:66px;min-width:66px}.composer .dock-ratio{flex-basis:70px}.composer .dock-count{flex-basis:64px}}
/* Keep the model selector compact rather than consuming spare row width. */
.studio-grid .composer .dock-model{flex:0 1 180px;width:180px;min-width:150px;max-width:180px}
@media(max-width:720px){.studio-grid .composer .dock-model{flex:0 1 170px;width:170px;min-width:150px;max-width:170px}}
.composer #batch-mode-button{flex:0 0 auto;min-height:38px;padding:8px 12px;border:1px solid #93b1d344;border-radius:9px;background:#182333;color:#c9dcf4;font-size:12px;white-space:nowrap;transition:background .16s,border-color .16s}
.composer #batch-mode-button:hover{background:#2b405b;border-color:#a8cfff88}
.composer #batch-mode-button:focus-visible{outline:2px solid #91bff0;outline-offset:3px}
.composer #batch-mode-button[aria-pressed="true"]{background:#365a85;border-color:#9ac9ff;color:#edf5ff}
.composer .model-select-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.model-select-menu{position:fixed;z-index:1000;max-height:320px;overflow-y:auto;padding:5px;border:1px solid #93b1d366;border-radius:8px;background:#162231;box-shadow:0 14px 30px #0008}.model-select-option{display:block;width:100%;min-height:30px;padding:7px 9px;border:0;border-radius:5px;background:transparent;color:#c8d8eb;font:inherit;font-size:11px;line-height:1.35;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.model-select-option:hover,.model-select-option:focus-visible,.model-select-option[aria-selected="true"]{background:#294462;color:#f1f7ff;outline:0}.model-select-option:disabled{color:#75879e;cursor:not-allowed}
.composer #batch-hint{order:7;flex:1 0 100%;margin:0;color:#a9c5e8;font-size:11px;line-height:1.6}
.batch-reference-label{position:absolute;left:3px;bottom:3px;z-index:1;padding:2px 6px;border-radius:5px;background:#172c46e8;color:#dcecff;font-size:11px;pointer-events:none}
.sidebar .nav>span:first-child{display:grid;place-items:center}
.sidebar .nav .nav-icon{display:block;width:22px;height:22px}
/* Consistent 3:4 reference frames with uncropped, centered images. */
.studio-grid .floating-references .reference-file{flex:0 0 78px;width:78px;height:104px;aspect-ratio:3/4;border:1px solid #93b1d344;border-radius:10px;background:#101925;box-shadow:none}
body:not(.signed-out) .floating-references .reference-file img{width:calc(100% - 6px);height:calc(100% - 6px);max-width:none;max-height:none;object-fit:contain;border:0;border-radius:7px;filter:none;box-shadow:none}
.floating-references .reference-file:hover,.floating-references .reference-file:focus-within{border-color:#a8cfff88}
@media(max-width:720px){.studio-grid .floating-references .reference-file{flex-basis:66px;width:66px;height:88px}}
/* Inset delete control stays fully visible within the thumbnail strip. */
.floating-references .reference-file .reference-remove{top:4px;right:4px;width:20px;height:20px;min-width:20px;padding:0;border:1px solid #ffb4b4;border-radius:50%;background:#dc3545;color:#fff;z-index:5;font-size:0;line-height:1;display:grid;place-items:center;box-shadow:none}
.floating-references .reference-file .reference-remove::before,.floating-references .reference-file .reference-remove::after{content:'';position:absolute;width:10px;height:2px;border-radius:1px;background:#fff;left:50%;top:50%;transform:translate(-50%,-50%) rotate(45deg)}
.floating-references .reference-file .reference-remove::after{transform:translate(-50%,-50%) rotate(-45deg)}
.floating-references .reference-file .reference-remove:hover{background:#bd2130}
/* Let the delete badge straddle the frame corner without clipping. */
.floating-references .reference-file .reference-remove{top:-7px;right:-7px}
.floating-references #reference-files-list{padding:10px 8px 5px}
.floating-references .reference-file{overflow:visible}
/* Round the actual image edges, including contain-fit portrait/landscape images. */
body:not(.signed-out) .floating-references .reference-file img{width:auto;height:auto;max-width:calc(100% - 6px);max-height:calc(100% - 6px);border-radius:8px;object-fit:contain}
/* Round the image itself instead of the contain-fit element's empty area. */
#job-list .thumbnail-only .job-visual img{width:auto;height:auto;max-width:100%;max-height:100%;border-radius:8px;object-fit:contain}
/* Library shortcuts sit beside the reference thumbnails above the composer. */
.studio-grid #reference-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:14px}
#reference-toolbar #reference-dropzone{min-width:0}
#reference-toolbar .library-shortcuts{display:flex;align-items:center;gap:10px;padding:5px 0}
.library-shortcuts button{min-height:38px;padding:9px 15px;border:1px solid #93b1d344;border-radius:9px;background:#182333e8;color:#c9dcf4;font-size:12px;white-space:nowrap}
.library-shortcuts button:hover{background:#2b405b;border-color:#a8cfff88}
#reference-toolbar #upload-status,#reference-toolbar #retry-references{grid-column:1/-1}
@media(max-width:720px){.studio-grid #reference-toolbar{column-gap:8px}.library-shortcuts button{padding:8px 10px}.studio-grid #reference-toolbar:has(.reference-file){grid-template-columns:1fr}.studio-grid #reference-toolbar:has(.reference-file) .library-shortcuts{justify-self:end}}

/* Keep the prompt focus ring inside its bounds, aligned with the upload card. */
.composer #prompt{outline-offset:-1px}

/* Compact generation controls. */
.composer select{height:30px;min-height:30px;padding:5px 8px;font-size:11px;border-radius:7px}
.studio-grid .composer .dock-model{flex-basis:160px;width:160px;min-width:140px;max-width:160px}
.composer .field-grid>div{flex-basis:64px;width:64px;min-width:64px}
.composer .field-grid #quality-field{flex-basis:80px;width:80px;min-width:80px}
.composer .dock-ratio{flex-basis:68px}
.composer .dock-count{flex-basis:60px}
.composer .dock-model{position:relative}.composer #model.model-native-select{position:absolute!important;width:1px!important;height:1px!important;min-height:1px!important;padding:0!important;margin:-1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}.composer .model-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:30px;min-height:30px;padding:5px 9px;border:1px solid #93b1d355;border-radius:7px;background:#101925;color:#dce7f6;font:inherit;font-size:11px;text-align:left;white-space:nowrap;overflow:hidden}.composer .model-select-trigger::after{content:'⌄';flex:0 0 auto;color:#9fc4ef;font-size:13px;line-height:1;transform:translateY(-1px)}.composer .model-select-trigger:disabled{opacity:.55;cursor:not-allowed}.composer .model-select-trigger:focus-visible{outline:2px solid #91bff088;outline-offset:2px}.composer .model-select-menu{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 6px);max-height:min(320px,40vh);overflow-y:auto;padding:5px;border:1px solid #93b1d366;border-radius:8px;background:#162231;box-shadow:0 14px 30px #0008}.composer .model-select-open-up .model-select-menu{top:auto;bottom:calc(100% + 6px)}.composer .model-select-option{display:block;width:100%;min-height:30px;padding:7px 9px;border:0;border-radius:5px;background:transparent;color:#c8d8eb;font:inherit;font-size:11px;line-height:1.35;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.composer .model-select-option:hover,.composer .model-select-option:focus-visible,.composer .model-select-option[aria-selected="true"]{background:#294462;color:#f1f7ff;outline:0}.composer .model-select-option:disabled{color:#75879e;cursor:not-allowed}
.composer #batch-mode-button{height:30px;min-height:30px;padding:5px 9px;font-size:11px;border-radius:7px}
.composer .dock-submit{gap:10px}
.composer .dock-submit #generate-button{flex-basis:30px;width:30px;min-width:30px;height:30px;min-height:30px;padding:0;font-size:18px}

/* Add 20px of vertical breathing room to the composer. */
.studio-grid .composer form{padding-top:26px;padding-bottom:26px}
@media(max-width:720px){.studio-grid .composer form{padding-top:22px;padding-bottom:22px}}

/* Give the prompt more room while keeping the controls near the bottom. */
.studio-grid .composer form{padding-top:16px;padding-bottom:10px}
.composer #reference-toggle{flex-basis:81px;width:81px;height:108px}
.composer #prompt{flex-basis:calc(100% - 89px);width:calc(100% - 89px);height:108px;min-height:108px}
@media(max-width:720px){.studio-grid .composer form{padding-top:12px;padding-bottom:8px}.composer #reference-toggle{flex-basis:69px;width:69px;height:92px}.composer #prompt{flex-basis:calc(100% - 77px);width:calc(100% - 77px);height:92px;min-height:92px}}

/* Keep the prompt outline visible even when it is not focused. */
.composer #prompt{outline:1px solid #93bded88;outline-offset:-1px}

.composer #batch-group-size{flex:0 0 100px;width:100px}
.batch-preview-group{flex:0 0 auto;padding:8px;border:0;border-radius:0;background:transparent}
.batch-preview-group>small{display:block;color:#a9c5e8;margin-bottom:6px}
.batch-preview-images{display:flex;gap:6px}
#reference-files-list:has(.batch-preview-group){display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:4px;gap:10px}

/* Stack image preview above its details and actions. */
#compare{width:min(1000px,94vw);max-height:94dvh;overflow-y:auto}
#compare .detail-layout{grid-template-columns:minmax(0,1fr);gap:20px}
#compare #compare-stage{height:56dvh;max-height:680px}
#compare .detail-info{max-height:none;overflow:visible;padding:0 4px}
#compare .detail-info dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 20px}
#compare .detail-info dt{grid-row:1;grid-column:auto}
#compare .detail-info dd{grid-row:2;grid-column:auto;margin:0 0 12px}
#compare #detail-prompt{min-height:64px;max-height:180px}
#compare .detail-actions{justify-content:flex-end;flex-wrap:wrap;margin-top:0;padding-top:8px}
#compare .detail-actions{justify-content:flex-start}
#compare #detail-delete-image{order:-1;margin-right:auto}
@media(max-width:720px){#compare #compare-stage{height:45dvh}#compare .detail-info dl{grid-template-columns:100px minmax(0,1fr)}#compare .detail-info dt{grid-row:auto;grid-column:1}#compare .detail-info dd{grid-row:auto;grid-column:2}}

/* The entire detail dialog uses a 2:3 portrait frame. */
#compare{position:relative;width:min(calc(100vw - 120px),62.666667dvh);height:min(141vw,94dvh);max-height:94dvh;aspect-ratio:2/3;box-sizing:border-box;overflow:visible}
#compare .detail-layout{height:100%;min-height:0;overflow:auto;grid-template-rows:minmax(0,1fr) auto;gap:16px;box-sizing:border-box}
#compare .detail-visual{align-self:stretch;min-height:0}
#compare #compare-stage{width:100%;height:100%;min-height:160px;max-height:none;aspect-ratio:auto;margin:0}
#compare .detail-info dl{gap:6px 12px}
@media(max-width:720px){#compare{width:min(calc(100vw - 120px),62.666667dvh)}#compare .detail-layout{min-height:0}#compare #compare-stage{height:38dvh}#compare .detail-info dl{grid-template-columns:100px minmax(0,1fr)}}

.material-preview-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:12px;padding-top:16px}
.material-preview-actions .material-delete-button{background:#b83246;color:#fff;border:1px solid #dc6172;border-radius:8px;padding:8px 14px}
.material-preview-actions [role="status"]{margin-right:auto;font-size:13px}

.material-toolbar .material-delete-button{background:#b83246;color:#fff;border-color:#dc6172}

.prompt-library-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-top:24px}
.prompt-library-card{padding:22px;border:1px solid #93b1d344;border-radius:14px;background:#1b2532;min-width:0}
.prompt-library-card p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;line-height:1.7}
#platform-view .management-form>textarea{display:block;width:100%;min-height:140px;margin:12px 0;padding:12px}

/* Video studio follows the image studio's result canvas and bottom composer. */
.video-studio-page .video-grid{display:flex;flex-direction:column;min-height:calc(100dvh - 140px);gap:20px;position:relative;background:transparent;border:0;border-radius:0;padding:0}
.video-studio-page .video-results{flex:1;min-height:280px;border:0;background:transparent;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;align-content:start}
.video-results>h2,.video-results>.video-note{grid-column:1/-1}
.video-studio-page .video-composer{position:sticky;bottom:20px;z-index:2;width:min(940px,100%);margin:30px auto -30px;background:linear-gradient(110deg,#273446,#202833);border:1px solid #93b1d355;border-radius:24px;padding:16px 16px 10px;box-shadow:0 1px 0 #adcdf344 inset}
.video-input-row{display:flex;gap:8px;align-items:stretch}
.video-input-row .video-upload-card{flex:0 0 81px;width:81px;height:108px;padding:0;background:#849fc00a;border:1px dashed #a0c8f555;border-radius:8px;color:#bfd8f5;font-size:24px}
.video-composer .video-input-row textarea{flex:1;min-width:0;width:100%;height:108px;min-height:108px;margin:0;padding:8px;background:transparent;color:#eee;border:1px solid #93bded88;border-radius:9px;resize:none;outline-offset:-1px}
.video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.video-controls .video-field{display:block;margin:0;font-size:0;flex:0 1 auto;min-width:0}
.video-controls select,.video-controls input{height:30px;min-height:30px;width:auto;max-width:170px;margin:0;padding:4px 8px;font-size:11px;border-radius:7px}
.video-controls input{width:64px}.video-controls .video-field>label{display:none}
.video-submit-row{display:flex;align-items:center;gap:10px;margin-left:auto}.video-submit-row .video-note{margin:0;max-width:240px;font-size:11px}
.video-submit-row .generate{width:auto;min-height:30px;margin:0;padding:5px 12px;font-size:11px;border-radius:8px}
.video-advanced{margin-top:10px;font-size:11px;color:#a9c5e8}.video-advanced summary{cursor:pointer}.video-advanced .video-field{margin:12px 0}
.video-composer .video-references{display:flex;gap:8px;overflow-x:auto;margin-bottom:10px}.video-references:empty{display:none}
@media(max-width:720px){.video-studio-page .video-grid{padding:0}.video-studio-page .video-composer{bottom:10px;padding:12px;border-radius:16px}.video-input-row .video-upload-card{width:69px;flex-basis:69px;height:92px}.video-composer .video-input-row textarea{height:92px;min-height:92px}.video-submit-row{flex-wrap:wrap}.video-controls select{max-width:150px}}

/* Override legacy field font inheritance after hiding visual labels. */
.video-studio-page .video-controls .video-field select,.video-studio-page .video-controls .video-field input{font:11px/1.4 Inter,"Segoe UI","Microsoft YaHei",sans-serif;height:30px;min-height:30px;margin:0;padding:4px 8px;width:auto;color:#dce7f5;background:#131e2b;border:1px solid #93b1d333}
.video-studio-page .video-controls .video-field:first-child select{width:170px}
.video-studio-page .video-controls .video-field input{width:64px}
.video-studio-page .video-composer .video-input-row textarea{font:14px/1.7 Inter,"Segoe UI","Microsoft YaHei",sans-serif;padding:8px;background:transparent;resize:none;color:#eee}
.video-studio-page .video-grid>.video-results{background:transparent;border:0;box-shadow:none}
.video-studio-page .video-controls .video-field.duration-field{display:flex;align-items:center;gap:8px;width:180px;height:30px;min-width:180px;font-size:0}
.video-studio-page .video-controls .video-field.duration-field input[type="range"]{flex:1 1 auto;width:100%;max-width:none;height:30px;min-height:30px;margin:0;padding:0;border:0;background:transparent}
.video-studio-page .video-controls .video-field.duration-field output{flex:0 0 auto;width:42px;margin:0;color:#bdd9ff;font-size:13px;line-height:30px;white-space:nowrap}

.video-composer .video-controls{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.video-parameter-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
.video-studio-page .video-parameter-row .video-field select{max-width:220px}
.video-studio-page .video-parameter-row:first-child .video-field:first-child select{width:170px}
.video-studio-page .video-parameter-row:last-child .video-field:first-child select{width:auto}

#detail-save-status{margin:8px 0 0;font-size:13px;line-height:1.6;color:#adc9e8}
#detail-save-status:empty{display:none}
#detail-save-status[data-state="success"]{color:#7edba6}
#detail-save-status[data-state="error"]{color:#ff9caa}

#compare:has(#detail-save-status[data-state="success"]) #detail-save-material:disabled{cursor:default;opacity:1}

.model-drag-handle{cursor:grab;touch-action:none;user-select:none;padding:6px 10px;border:1px solid #93b1d344;border-radius:7px;background:#24354a;color:#bcd6f2}
.model-dragging{outline:2px solid #91bff0;opacity:.8}.model-dragging .model-drag-handle{cursor:grabbing}

.model-drag-ghost{position:fixed;z-index:9999;pointer-events:none;margin:0;opacity:.95;box-shadow:0 18px 50px #0008;outline:2px solid #91bff0}.model-card.model-dragging{opacity:.25}

#compare .detail-info dl{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:720px){#compare .detail-info dl{grid-template-columns:100px minmax(0,1fr)}}

.job.pending-thumbnail .job-visual{height:100%;min-height:0;aspect-ratio:3/4;display:flex;flex-direction:column;justify-content:center;align-items:center}

.studio-grid .floating-references .batch-preview-group .reference-file{border:0;background:#101925;box-shadow:none}

.batch-preview-group{width:96px;height:128px;aspect-ratio:3/4;padding:8px;box-sizing:border-box}
.batch-preview-group>small{display:none}
.batch-preview-group .batch-preview-images{height:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:4px}
.studio-grid .floating-references .batch-preview-group .reference-file{width:100%;height:100%;min-width:0;aspect-ratio:auto;margin:0}
.batch-preview-group:has(.reference-file:nth-child(2)) .batch-preview-images{grid-template-columns:repeat(2,minmax(0,1fr))}
.batch-preview-group:has(.reference-file:nth-child(3)) .batch-preview-images{grid-template-rows:repeat(2,minmax(0,1fr))}
.batch-preview-group .batch-reference-label{max-width:100%;padding:2px 3px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Upload feedback applies to each reference, including individual batch images. */
.studio-grid .floating-references .reference-file[data-upload-state="success"]{box-shadow:0 0 9px 2px #65adff30,inset 0 0 0 1px #86bdff55}
.studio-grid .floating-references .reference-file[data-upload-state="failed"]{border:1px solid #ef5b68;box-shadow:inset 0 0 0 1px #ef5b6844}
.studio-grid .floating-references .reference-file[data-upload-state="failed"] .reference-status{background:#852d38;color:#fff}

/* Failed/review cards keep their actions without a full image placeholder. */
.job.compact-status{border-radius:12px;aspect-ratio:3/4;display:flex;flex-direction:column;overflow:auto}
.job.compact-status .job-content{flex:1;min-height:0}
.job.compact-status .job-visual{flex-shrink:0}
.job.compact-status .job-visual{height:44px;min-height:0;padding:10px 12px 0;flex-direction:row;justify-content:flex-start;gap:8px}
.job.compact-status .job-visual .status-icon{font-size:20px}
.job.compact-status .job-content{padding:10px 12px 12px}
.job.compact-status .job-title{margin-bottom:6px;-webkit-line-clamp:1}
.job.compact-status .job-message{margin:7px 0;line-height:1.5}
.job.compact-status .job-actions{margin-top:8px}

/* All result states share the same outer 3:4 frame. */
#job-list .job{aspect-ratio:3/4;min-height:0;position:relative;overflow:hidden}
#job-list .job.thumbnail-only .job-visual{position:absolute;inset:0;width:100%;height:100%;min-height:0;aspect-ratio:auto}
#job-list .job.compact-status .job-content{overflow:auto}

#job-list .card-download{position:absolute;right:10px;bottom:10px;z-index:2;display:grid;place-items:center;width:30px;height:30px;border:1px solid #9cbde15c;border-radius:9px;background:#152333e8;color:#e5efff;font-size:21px;line-height:1;box-shadow:0 2px 8px #0003}
#job-list .card-download:hover{background:#365272;border-color:#b8d6ff}
#job-list .job.compact-status{background:linear-gradient(150deg,#202832,#151c25);border-color:#93b1d344}
#job-list .job.compact-status .job-visual{height:49px;padding:14px 14px 8px;background:transparent;color:#edc5a8;gap:8px;font-size:12px}
#job-list .job-elapsed{margin:0;color:#91a7be;font-variant-numeric:tabular-nums;font-size:12px;letter-spacing:.2px;text-align:center}
#job-list .job.compact-status .job-content{padding:6px 14px 10px;display:flex;flex-direction:column;gap:8px}
#job-list .job.compact-status .job-title{font-size:11px;line-height:1.7;margin:0;-webkit-line-clamp:2;flex-shrink:0;color:#dce5ef}
#job-list .job.compact-status .job-meta{font-size:9px;line-height:1.5;margin:0;color:#94a5b9;gap:6px}
#job-list .job.compact-status .job-message{font-size:10px;line-height:1.65;margin:2px 0 0;padding:8px 9px;border-radius:6px;background:#d9a3650b;border:1px solid #d9a36520;color:#cbb398}
#job-list .job.compact-status>.job-actions{flex-shrink:0;margin:0;padding:10px 12px 12px;border-top:1px solid #93b1d31c;gap:6px;display:flex;flex-wrap:wrap}
#job-list .job.compact-status>.job-actions button{padding:7px 8px;border-radius:6px;font-size:10px;flex:1;white-space:nowrap}
#job-list .job.compact-status .regenerate-button{background:#344e6d;border-color:#809fc1;color:#edf5ff}
#job-list .job.compact-status .regenerate-button:disabled{cursor:default}

#job-list .card-download{width:28px;height:28px;right:9px;bottom:9px;border:1px solid #c9dcf21a;border-radius:50%;background:#182433b3;color:#c8d7e7;box-shadow:none;backdrop-filter:blur(8px);transition:background .15s,color .15s,border-color .15s}
#job-list .card-download svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#job-list .card-download:hover,#job-list .card-download:focus-visible{background:#31465ee6;color:#fff;border-color:#c9dcf25c}
#job-list .card-refill{right:45px;padding:0;cursor:pointer}
@media(prefers-reduced-motion:reduce){#job-list .card-download{transition:none}}
@media(prefers-reduced-motion:reduce){.breadcrumb-logo-cn::before{animation:none}}

/* Keep all result-card controls below the floating composer and reference dock. */
.studio-grid .results{isolation:isolate;z-index:0}

.composer .dock-batch{order:5;display:flex;align-items:center;gap:8px;flex:0 0 auto}
.composer #clear-composer{height:30px;min-height:30px;padding:5px 10px;border:1px solid #dc6269;border-radius:7px;background:#be3945;color:#fff;font-size:11px;white-space:nowrap}
.composer #clear-composer:hover{background:#d04753}
.composer #clear-composer:focus-visible{outline:2px solid #ffadb4;outline-offset:2px}

.studio-grid .results>.panel-heading{justify-content:flex-start;gap:16px}
#remove-failed-jobs{height:28px;padding:4px 10px;border:1px solid #dc6269;border-radius:6px;background:#be3945;color:#fff;font-size:11px;white-space:nowrap;letter-spacing:0}
#remove-failed-jobs:hover:not(:disabled){background:#d04753}
#remove-failed-jobs:disabled{cursor:default;opacity:.45}
#remove-failed-jobs:focus-visible{outline:2px solid #ffadb4;outline-offset:2px}
#job-list{padding-top:14px;grid-template-columns:repeat(auto-fill,250px);grid-auto-rows:calc(250px * 4 / 3)}
#select-images,#delete-images,#batch-download-images{border:1px solid #93b1d355;border-radius:6px;background:#233247;color:#e5efff;padding:7px 12px;font-size:11px}
#remove-failed-jobs,#select-images,#delete-images,#batch-download-images{box-sizing:border-box;height:30px;min-height:30px;padding-top:0;padding-bottom:0;display:inline-flex;align-items:center;justify-content:center;line-height:1;white-space:nowrap}
#delete-images{background:#be3945;border-color:#dc6269;color:#fff}
#select-images[aria-pressed="true"]{background:#365575;border-color:#91bff0}
.results>.panel-heading{flex-wrap:wrap;height:auto;min-height:65px;gap:10px}
#job-list .image-selectable{cursor:pointer}
#job-list .compact-status.image-selectable .job-visual{padding-left:42px}
#job-list .image-selectable img{cursor:pointer}
#job-list .image-selected{border-color:#91bff0;box-shadow:inset 0 0 0 2px #91bff0;background:#24364b}
.image-selection-mark{position:absolute;top:10px;left:10px;z-index:1;width:20px;height:20px;display:grid;place-items:center;border:1px solid #8eabc8;border-radius:5px;background:#142031;pointer-events:none}
.image-selected .image-selection-mark{background:#5288bb;border-color:#99c5ee}
.image-selected .image-selection-mark::after{content:'';width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.image-selection-box{position:fixed;z-index:6;pointer-events:none;border:1px solid #91bff0;background:#79b4ff22;border-radius:3px}
#job-list:has(.image-selectable){user-select:none}
/* Multi task composer tabs. */
.composer-tabs{display:flex;align-items:center;gap:5px;overflow-x:auto;padding:7px 12px 0;background:#202d42;border-bottom:1px solid #3e526f;scrollbar-width:thin}
.composer-tab-wrap{display:flex;align-items:center;flex:0 0 auto;position:relative;overflow:hidden;border:1px solid #526986;border-bottom:0;border-radius:9px 9px 0 0;background:#2a3b55;color:#c3d0e2}
.composer-tab-wrap:has(.composer-tab.active){background:#526f98;border-color:#7f9bc2;color:#fff}
.composer-tab{border:0;background:transparent;color:inherit;padding:7px 9px;font-size:10px;max-width:128px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer-tab-remove{border:0;background:transparent;color:inherit;padding:5px 7px;font-size:13px;line-height:1;opacity:.7}
.composer-tab-remove:hover{opacity:1}
.composer-tab-add{flex:0 0 auto;border:1px dashed #8da7ca;background:#263851;color:#d3e0f3;border-radius:8px;padding:6px 10px;font-size:12px}
/* Tabs share the composer's frosted surface and use rounded rectangles. */
.composer-tabs{background:transparent;border-bottom:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.composer-tab-wrap{border-color:#ffffff1c;border-bottom-width:1px;border-radius:8px;background:#ffffff08;color:#c7cbd1}
.composer-tab-wrap:has(.composer-tab.active){background:#ffffff1c;border-color:#ffffff38;color:#fff}
.composer-tab{padding:9px 13px;font-size:12px}
.composer-tab-remove{padding:8px 10px;font-size:14px}
.composer-tab-add{min-height:36px;padding:8px 12px;background:#ffffff08;border-color:#ffffff38;color:#d9dde2}
.composer-tabs{margin:0;padding:4px 16px 0;gap:6px}
.studio-grid .composer:has(#composer-tabs) form{padding-top:6px}
@media(max-width:720px){.composer-tabs{padding-left:12px;padding-right:12px}}
.composer-tab-wrap:has(.composer-tab.active){background:#fff;border-color:#b9d4f2;color:#2869ad}
.composer-tab-wrap.dragging{opacity:.62;cursor:grabbing;z-index:2}
.composer-tab-wrap{will-change:transform;transition:transform 180ms cubic-bezier(.22,.7,.28,1)}
.composer-tab-wrap.dragging{transition:none}
.composer-tab-wrap.dragging .composer-tab{cursor:grabbing}
.composer-tab-wrap:not(.dragging) .composer-tab{cursor:grab}
.composer-tab-wrap.composer-tab-drop-target{border-color:#4d9bea;box-shadow:inset 3px 0 0 #4d9bea}
.composer-tab-wrap:has(.composer-tab.active) .composer-tab-remove{color:#2869ad;opacity:.9}
.composer-tab-wrap.running{border-color:#6e9fd4;box-shadow:none}
.composer-tab-light{display:none;position:absolute;z-index:0;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none}
.composer-tab-light rect{stroke-linecap:round;stroke-linejoin:round;will-change:stroke-dashoffset}
.composer-tab-light-trail,.composer-tab-light-glow{pointer-events:none}
.composer-tab-light-segment{stroke:rgb(var(--composer-tab-light-normal-color));stroke-width:var(--composer-tab-light-stroke-width,1.45);opacity:calc(var(--composer-tab-light-base-opacity,1) * var(--composer-tab-light-strength,1));stroke-dasharray:.62 99.38;stroke-dashoffset:var(--composer-tab-light-start);animation:composer-tab-light-travel 1.35s linear infinite}
.composer-tab-light-glow{opacity:var(--composer-tab-light-glow-opacity,.2);filter:blur(1.8px)}
.composer-tab-light-trail{opacity:1}
.composer-tab-wrap.running:has(.composer-tab.active){--composer-tab-light-stroke-width:1.7;--composer-tab-light-strength:1.15;--composer-tab-light-glow-opacity:.34}
.composer-tab-wrap.running:has(.composer-tab.active) .composer-tab-light-segment{stroke:rgb(var(--composer-tab-light-active-color))}
.composer-tab-wrap:not(.running) .composer-tab-light-segment{animation:none}
.composer-tab-wrap.running .composer-tab-light{display:block}
.composer-tab-wrap.running>.composer-tab,.composer-tab-wrap.running>.composer-tab-remove{position:relative;z-index:1}
@keyframes composer-tab-light-travel{from{stroke-dashoffset:var(--composer-tab-light-start)}to{stroke-dashoffset:calc(var(--composer-tab-light-start) - 100px)}}
@media(prefers-reduced-motion:reduce){.composer-tab-light-segment{animation:none}.composer-tab-light-glow{opacity:.08}}
@media(prefers-reduced-motion:reduce){.composer-tab-wrap{transition:none!important}}
.composer-tab-remove-dialog{width:min(390px,calc(100vw - 32px));border:1px solid #c7d4e3;border-radius:14px;padding:24px;background:#fff;color:#263447;box-shadow:0 18px 60px #16283b40}
.composer-tab-remove-dialog::backdrop{background:#16283b66}
.composer-tab-remove-dialog form{display:grid;gap:12px}
.composer-tab-remove-dialog h2{margin:0;font-size:18px}
.composer-tab-remove-dialog p{margin:0;line-height:1.6}
.composer-tab-remove-dialog .dialog-note{font-size:12px;color:#667589}
.composer-tab-remove-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
.composer-tab-remove-dialog button{border:1px solid #c4d0de;border-radius:7px;padding:8px 14px;background:#f5f8fb;color:#33465d;cursor:pointer}
.composer-tab-remove-dialog button.danger{border-color:#c85c67;background:#be3945;color:#fff}

/* Keep the tab row, prompt row, and parameter row on one shared inner grid. */
.studio-grid .composer{display:flex;flex-direction:column;gap:10px;padding:16px}
.studio-grid .composer-tabs{padding:0;gap:10px;justify-content:flex-start}
.studio-grid .composer form,.studio-grid .composer:has(#composer-tabs) form{padding:0;gap:10px;justify-content:flex-start}
.studio-grid .composer #prompt{flex-basis:calc(100% - 91px);width:calc(100% - 91px)}
.studio-grid .composer .dock-submit{margin-left:auto}
@media(max-width:720px){.studio-grid .composer{padding:12px}.studio-grid .composer form,.studio-grid .composer:has(#composer-tabs) form{padding:0;gap:10px}}
@media(max-width:720px){.studio-grid .composer #prompt{flex-basis:calc(100% - 79px);width:calc(100% - 79px)}}
/* Keep the library shortcuts beside the task tabs inside the composer. */
.studio-grid .composer-tab-row{display:flex;align-items:center;gap:10px;min-width:0}
.studio-grid .composer-tab-row .composer-tabs{flex:1;min-width:0}
.studio-grid .composer-tab-row .library-shortcuts{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:0}
.studio-grid .composer-tab-row .library-shortcuts button{white-space:nowrap}
@media(max-width:480px){.studio-grid .composer-tab-row{gap:6px}.studio-grid .composer-tab-row .library-shortcuts{gap:4px}.studio-grid .composer-tab-row .library-shortcuts button{padding:7px 6px;font-size:9px}.studio-grid .composer-tab-row .composer-tabs{gap:4px}.studio-grid .composer-tab-row .composer-tab{max-width:92px;padding-left:8px;padding-right:8px}.studio-grid .composer-tab-row .composer-tab-remove{padding-left:6px;padding-right:6px}}
/* Detail image removal action. */
#detail-delete-image{padding:10px 14px;border-radius:7px;border:1px solid #d58a91;font-size:12px;margin:0;background:#fff;color:#a23d49}
body:not(.signed-out) #detail-delete-image{display:inline-flex;justify-content:center;align-items:center;min-height:38px;padding:9px 12px;border-radius:9px;background:#3a2529;color:#ffb9bf;border-color:#b9646d}
body:not(.signed-out) #detail-delete-image:hover,body:not(.signed-out) #detail-delete-image:focus-visible{background:#583139;border-color:#df818b;color:#ffe4e7}

/* Duration scale follows the model range; preset durations use a select. */
.video-studio-page .video-controls .video-field.duration-field{position:relative;height:42px;padding-bottom:12px;box-sizing:border-box}
.video-duration-ticks{position:absolute;left:8px;right:58px;bottom:0;height:14px;pointer-events:none}
.video-duration-tick{position:absolute;top:0;transform:translateX(-50%);padding-top:5px;color:#9eb2cb;font-size:9px;line-height:9px}
.video-duration-tick::before{content:"";position:absolute;top:0;left:50%;width:1px;height:3px;background:#7890ac}
.video-studio-page .video-controls .video-field.duration-compact{width:auto;min-width:0;height:30px;padding-bottom:0}
.video-studio-page .video-controls .duration-field [hidden]{display:none!important}

/* Image gallery navigation remains separate from image pan / comparison gestures. */
#compare .detail-visual{position:relative}
#compare #compare-status{position:absolute;top:10px;left:50%;z-index:2;width:max-content;max-width:calc(100% - 24px);margin:0;padding:4px 8px;border:1px solid #ffffff40;border-radius:6px;background:#1d2734d9;color:#fff;font-size:11px;line-height:1.4;text-align:center;overflow-wrap:anywhere;transform:translateX(-50%);pointer-events:none}
/* Keep gallery navigation in the dialog's top layer, outside the comparison surface. */
#compare{overflow:visible}
#compare .detail-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:38px;height:52px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid #b4d5ff80;border-radius:14px;background:#246bd1a6;color:#fff;line-height:1;box-shadow:0 3px 14px #123d7426,inset 0 1px 0 #ffffff33;backdrop-filter:blur(14px) saturate(140%);transition:background .18s,box-shadow .18s,color .18s}
#compare .detail-nav-prev{left:-54px}
#compare .detail-nav-next{right:-54px}
#compare .detail-nav svg{width:21px;height:21px;pointer-events:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#compare .detail-nav:hover:not(:disabled){background:#246bd1cc;color:#fff;box-shadow:0 4px 16px #123d7440}
#compare .detail-nav:active:not(:disabled){background:#1958b9d9}
#compare .detail-nav:disabled{opacity:.25;cursor:default}
@media(max-width:720px){#compare .detail-nav{width:32px;height:44px;border-radius:12px}#compare .detail-nav-prev{left:-48px}#compare .detail-nav-next{right:-48px}}

.history-restorable{display:flex;flex-direction:column;gap:8px;min-width:0}
.history-restorable .history-thumbnail{width:100%}
.history-restorable .history-restore{width:100%;font-size:11px;padding:8px 4px}
.composer-tab-remove-dialog button.primary{background:#2869ad;border-color:#2869ad;color:#fff}

/* Continuous, windowed image history. */
.studio-grid .results>.panel-heading{position:sticky;top:0;z-index:6;flex:0 0 auto;height:auto;min-height:64px;overflow:visible;background:#17212ff5;border-bottom:1px solid #809dc43b;box-shadow:0 5px 18px #0003;backdrop-filter:blur(14px);gap:10px;padding:12px 20px}
.gallery-search{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-wrap:wrap}
.gallery-search input,.gallery-search button,.gallery-date-picker summary,.gallery-feed-tools button,#gallery-load-more{border:1px solid #829eb644;border-radius:7px;background:#1f3045;color:#dce8f6;padding:7px 10px;font-size:11px;min-height:32px}
.gallery-search input[type=search]{width:190px;background:#101a28}
.gallery-date-picker{position:relative;font-size:11px}
.gallery-date-picker summary{cursor:pointer;list-style:none;white-space:nowrap}
.gallery-date-popover{position:absolute;right:0;top:calc(100% + 10px);width:290px;max-width:calc(100vw - 90px);padding:16px;border:1px solid #647e9e;border-radius:12px;background:#1b2839;box-shadow:0 12px 32px #0008}
.gallery-date-popover label{display:block;margin-bottom:10px;color:#b8cee8;font-size:11px}
.gallery-date-add{display:flex;gap:6px}.gallery-date-add input{min-width:0;flex:1}
#gallery-dates{display:flex;flex-wrap:wrap;gap:6px;max-height:190px;overflow:auto;margin:12px 0}
.gallery-feed-tools{display:flex;align-items:center;gap:10px;flex-basis:100%;font-size:11px;color:#9eb1c9;flex-wrap:wrap}
.gallery-feed-tools button{padding:3px 8px;min-height:25px;font-size:10px}.gallery-order-hint{margin-left:auto;font-size:10px}
#job-list{grid-auto-rows:auto;align-items:start;overflow-anchor:none;flex:0 0 auto}
#job-list>.job{height:calc(250px * 4 / 3);contain:layout style}
#job-list>.gallery-spacer{grid-column:1/-1;pointer-events:none;width:100%;min-height:0}
#job-list .job[draggable=true]{cursor:grab}#job-list .job.gallery-dragging{opacity:.45}#job-list .job.gallery-drop-target{border-color:#a6cbff;box-shadow:inset 0 0 0 2px #85b5fb}
#gallery-load-more{align-self:center;flex-shrink:0;margin:16px auto 28px;min-width:200px}
@media(max-width:900px){.gallery-search{flex-basis:100%;justify-content:flex-start;margin-left:0}.gallery-search input[type=search]{flex:1;min-width:100px}.gallery-order-hint{display:none}.studio-grid .results>.panel-heading{padding:10px 12px}.gallery-date-popover{right:-60px}}
.studio-grid .results{overflow-anchor:none}

/* Keep the result scrollbar below the sticky toolbar so its thumb never
   covers the toolbar. Chromium applies the track margin to the thumb area
   as well, while hiding the top arrow avoids a second control above it. */
.studio-grid .results{--results-toolbar-height:64px}
.studio-grid .results::-webkit-scrollbar{width:8px;background:linear-gradient(to bottom,#17212f 0 var(--results-toolbar-height),transparent var(--results-toolbar-height) 100%)}
.studio-grid .results::-webkit-scrollbar-track{margin-top:calc(var(--results-toolbar-height) + 8px);margin-bottom:10px;background:transparent;border-radius:4px}
.studio-grid .results::-webkit-scrollbar-thumb{background:#64758a80;border:2px solid transparent;background-clip:padding-box;border-radius:4px}
.studio-grid .results::-webkit-scrollbar-thumb:hover{background:#92a6bd;background-clip:padding-box}
.studio-grid .results::-webkit-scrollbar-button:start:decrement,
.studio-grid .results::-webkit-scrollbar-button:end:increment{display:none;height:0}

/* Compact gallery filtering: the date picker is the only visible filter control. */
.studio-grid .results>.panel-heading{flex-wrap:nowrap;overflow:visible;min-width:0}
.gallery-toolbar{display:flex;align-items:center;gap:7px;margin-left:0;position:relative;flex:0 0 auto}
.gallery-date-trigger,.gallery-order-reset{border:1px solid #829eb644;border-radius:7px;background:#1f3045;color:#dce8f6;min-height:32px;padding:7px 10px;font-size:11px;white-space:nowrap}
.gallery-date-trigger[aria-expanded="true"]{border-color:#91bff0;background:#294a6d}
.gallery-order-reset{width:30px;padding:5px;color:#9eb1c9;font-size:16px;line-height:1}
.gallery-order-reset:hover,.gallery-order-reset:focus-visible{color:#e5efff;border-color:#829eb6}
.gallery-date-popover{position:absolute;z-index:20;left:0;right:auto;top:calc(100% + 10px);width:292px;max-width:min(292px,calc(100vw - 32px));padding:14px;border:1px solid #647e9e;border-radius:12px;background:#1b2839;color:#dce8f6;box-shadow:0 12px 32px #0008}
.gallery-date-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.gallery-date-heading strong{font-size:12px;font-weight:600;color:#e7f0fb}
.gallery-date-nav{display:flex;align-items:center;gap:4px}.gallery-date-nav button{border:1px solid #829eb644;border-radius:6px;background:#22364d;color:#dce8f6;min-width:28px;height:27px;padding:3px 7px;font-size:11px}.gallery-date-nav button:first-child,.gallery-date-nav button:last-child{font-size:19px;line-height:17px}.gallery-date-nav button:hover,.gallery-date-nav button:focus-visible{border-color:#91bff0;background:#2a4b6d}
.gallery-date-hint,#gallery-date-hint{margin:0 0 11px;color:#a9bdd5;font-size:10px;line-height:1.55}
.gallery-calendar-weekdays,.gallery-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.gallery-calendar-weekdays{margin-bottom:3px;color:#829ab6;font-size:10px}.gallery-calendar-days{margin-bottom:12px}

/* Compensate for the native select font baseline so glyphs appear vertically centered. */
.video-studio-page .video-controls .video-field select{box-sizing:border-box;padding:0 8px 4px;line-height:normal;text-align:left;text-align-last:auto}
.gallery-calendar-day{min-width:0;height:30px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:#dce8f6;font-size:11px;user-select:none}.gallery-calendar-day:hover,.gallery-calendar-day:focus-visible{border-color:#91bff0;background:#294a6d}.gallery-calendar-day.today{box-shadow:inset 0 0 0 1px #7eb5e9}.gallery-calendar-day.selected{border-color:#8ec5ff;background:#4c83bc;color:#fff;font-weight:600}.gallery-calendar-empty{height:30px}
.gallery-dates{display:flex;flex-wrap:wrap;gap:5px;max-height:72px;overflow:auto;margin:0 0 10px}.gallery-date-chip{border:1px solid #6f9ec8;border-radius:12px;background:#294a6d;color:#e7f3ff;padding:4px 7px;font-size:10px}.gallery-date-chip:hover,.gallery-date-chip:focus-visible{border-color:#afd5ff;background:#37648d}.gallery-clear-dates{width:100%;border:1px solid #829eb644;border-radius:6px;background:#22364d;color:#bed2e8;padding:6px 8px;font-size:10px}.gallery-clear-dates:hover,.gallery-clear-dates:focus-visible{border-color:#91bff0;color:#fff}
.gallery-date-popover button:focus-visible{outline:2px solid #b5dbff;outline-offset:2px}
.gallery-feed-tools{display:none}
@media(max-width:900px){.studio-grid .results>.panel-heading{padding:10px 12px}.gallery-toolbar{gap:5px}.gallery-date-popover{right:-10px}}

.video-input-row .video-upload-card.drag-over{background:#294563;border-color:#a8cfff;box-shadow:0 0 0 3px #82b8ff22}

.video-results>.video-results-heading{grid-column:1/-1;display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:4px}
.video-results-heading h2{margin:0}
.video-results-heading .video-remove-failed{padding:8px 12px;border:1px solid #96515b;border-radius:8px;background:#62303c;color:#ffdce2;font-size:13px}
.video-results-heading .video-remove-failed:hover:not(:disabled){background:#80404d}
.video-results-heading .video-remove-failed:disabled{opacity:.4;cursor:default}
.video-studio-page .video-job{box-sizing:border-box;aspect-ratio:3/4;min-width:0;padding:20px;border:1px solid #93b1d333;border-radius:18px;background:#111c28;display:flex;flex-direction:column;gap:12px;overflow:auto}
.video-job>p{margin:0;line-height:1.6}
.video-job>p:first-child{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;flex-shrink:0}
.video-job>small{color:#98acc3}
.video-job-failed{box-shadow:inset 0 3px 0 #96515b55}
.video-job-failed>p:last-child{color:#d7a9b2;font-size:14px}
.video-studio-page .video-job video{flex:1;min-height:0;object-fit:contain;margin:0;border-radius:10px}
.video-job>a{margin-top:auto;align-self:flex-start}

.video-studio-page .video-grid>.video-results{padding:0 24px 24px;border:1px solid #93b1d322;border-radius:22px;background:#111820;overflow:visible}
.video-results>.video-results-heading{margin:0 -24px 0;padding:20px 24px;gap:12px;min-height:80px;border-bottom:1px solid #93b1d322;border-radius:22px 22px 0 0;background:#18232f}
.video-results-heading h2{display:flex;align-items:center;gap:12px;font-size:16px}
.video-result-count{font-size:12px;font-weight:400;color:#98a5b4}
.video-results-heading>button,.video-date-filter>summary{height:38px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #93b1d344;border-radius:8px;background:#203247;color:#e0eafa;font-size:13px;cursor:pointer}
.video-results-heading>.video-remove-failed{background:#62303c;border-color:#96515b;color:#ffdce2}
.video-date-filter{position:relative}.video-date-filter>summary{list-style:none}.video-date-filter>summary::-webkit-details-marker{display:none}
.video-date-panel{position:absolute;z-index:5;top:46px;left:0;padding:12px;display:grid;gap:10px;min-width:220px;background:#18232f;border:1px solid #93b1d344;border-radius:10px;box-shadow:0 12px 24px #0005}
.video-date-panel input{color-scheme:dark}.video-job.selected{outline:2px solid #86baff;outline-offset:-2px}.video-job>input[type=checkbox]{align-self:flex-start;width:18px;height:18px;flex-shrink:0}
@media(max-width:720px){.video-studio-page .video-grid>.video-results{padding:0 12px 12px}.video-results>.video-results-heading{margin:0 -12px;padding:14px 12px;gap:8px}.video-date-panel{left:auto;right:0}}

.video-studio-page .video-results-heading>h2{margin:0;padding:0;min-height:38px;display:flex;align-items:center;line-height:1;align-self:center}
.video-studio-page .video-results-heading>button,.video-studio-page .video-results-heading>.video-date-filter{margin:0;align-self:center;flex-shrink:0}
.video-studio-page .video-results-heading>button,.video-studio-page .video-date-filter>summary{height:38px;min-height:38px;padding:0 14px;line-height:1;display:inline-flex;align-items:center;justify-content:center}
.video-studio-page .video-result-count{line-height:1;margin:0}

/* Video gallery uses the image gallery's dimensions and palette. */
.video-studio-page .video-grid>.video-results{padding:0 20px 20px;grid-template-columns:repeat(auto-fill,250px);gap:14px;border-color:#809dc43b;border-radius:18px;background:#121a22}
.video-results>.video-results-heading{margin:0 -20px;padding:12px 20px;min-height:64px;gap:10px;background:#17212ff5;border-bottom:1px solid #809dc43b;box-shadow:0 5px 18px #0003;backdrop-filter:blur(14px);border-radius:18px 18px 0 0;flex-wrap:nowrap;z-index:6}
.video-studio-page .video-results-heading>h2{font-size:13px;font-weight:600;gap:12px;min-height:30px;white-space:nowrap}
.video-studio-page .video-result-count{font-size:10px;font-weight:400;color:#98a0aa}
.video-studio-page .video-results-heading>button{height:30px;min-height:30px;border:1px solid #93b1d355;border-radius:6px;background:#233247;color:#e5efff;padding:0 12px;font-size:11px}
.video-studio-page .video-results-heading>.video-remove-failed{padding:0 10px;border-color:#dc6269;background:#be3945;color:#fff}
.video-studio-page .video-results-heading>.video-remove-failed:disabled{opacity:.45}
.video-studio-page .video-results-heading>.video-remove-failed:hover:not(:disabled){background:#d04753}
.video-studio-page .video-results-heading>button[aria-pressed=true]{background:#365575;border-color:#91bff0}
.video-studio-page .video-job{width:250px;height:calc(250px * 4 / 3);border:1px solid #93b1d333;border-radius:12px;background:#121a22;padding:10px;gap:10px;font-size:11px}
@media(max-width:900px){.video-studio-page .video-grid>.video-results{padding:0 12px 12px}.video-results>.video-results-heading{margin:0 -12px;padding:10px 12px}}

.video-studio-page .video-job{background:#10172080;border-color:#93b1d344}.video-studio-page .video-job:hover{border-color:#a8cfff77;background:#1b263580}.video-studio-page .video-result-count{color:#8f97a2}

.video-studio-page .video-grid>.video-results{display:flex;flex-wrap:wrap;align-content:flex-start;align-items:flex-start}.video-results>.video-results-heading{flex:0 0 calc(100% + 40px)}.video-results>.video-note{flex-basis:100%}.video-studio-page .video-job{flex:0 0 250px}@media(max-width:900px){.video-results>.video-results-heading{flex-basis:calc(100% + 24px)}}

.video-studio-page .video-job.video-completed{position:relative;padding:10px;overflow:hidden}
.video-preview-button{position:absolute;inset:10px;border:0;padding:0;background:transparent;border-radius:8px;overflow:hidden;cursor:pointer}
.video-studio-page .video-preview-button video{width:100%;height:100%;object-fit:contain;pointer-events:none;background:transparent}
.video-play-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#101720a8;color:white;pointer-events:none}
.video-job .video-card-action{position:absolute;bottom:9px;right:9px;z-index:2;width:28px;height:28px;display:grid;place-items:center;margin:0;padding:0;border:1px solid #c9dcf21a;border-radius:50%;background:#182433b3;color:#c8d7e7;box-shadow:none;backdrop-filter:blur(8px);transition:background .15s,color .15s,border-color .15s}.video-job .video-card-action svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.video-job .video-card-action:hover,.video-job .video-card-action:focus-visible{background:#31465ee6;color:#fff;border-color:#c9dcf25c}.video-completed>input{position:relative;z-index:2}
@media(prefers-reduced-motion:reduce){.video-job .video-card-action{transition:none}}
.video-job .video-restore-button{left:auto;right:45px}
.video-detail-dialog{width:min(1120px,94vw);max-width:94vw;max-height:94dvh;padding:38px 24px 24px;border:1px solid #93b1d344;border-radius:20px;background:linear-gradient(140deg,#1d2734,#151d27);color:#dce8f6;overflow:auto}
.video-detail-dialog::backdrop{background:#050a12cf;backdrop-filter:blur(8px)}
.video-detail-close{position:absolute;right:14px;top:8px;width:28px;height:28px;border:0;background:transparent;color:#adc2d9;font-size:25px;padding:0;display:grid;place-items:center}
.video-detail-stage{height:min(66dvh,760px);background:#0b1119;border:1px solid #93b1d322;border-radius:12px;overflow:hidden}.video-detail-stage video{width:100%;height:100%;object-fit:contain}
.video-detail-meta{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:18px 0}.video-detail-meta dt{color:#849bb5;font-size:11px}.video-detail-meta dd{margin:10px 0 0;overflow-wrap:anywhere;font-size:12px}
.video-detail-prompt-label{font-size:12px;color:#a9bdd5}.video-detail-prompt{width:100%;text-align:left;white-space:pre-wrap;border:1px solid #93b1d333;border-radius:12px;background:#101923;color:#dce8f6;padding:16px;line-height:1.7;font-size:12px}
.video-detail-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}.video-detail-actions button{min-width:36px;background:#233247;border:1px solid #93b1d355;border-radius:8px;color:#dce8f6}
@media(max-width:600px){.video-detail-dialog{padding:38px 14px 14px}.video-detail-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.video-detail-stage{height:50dvh}}

.video-studio-page .video-controls .video-timing-row .duration-field{width: min(520px,calc(100% - 120px));min-width:220px;flex:0 1 520px}
@media(max-width:600px){.video-studio-page .video-parameter-row .video-submit-row{width:100%;justify-content:flex-end}.video-studio-page .video-controls .video-timing-row .duration-field{flex:1 1 220px;min-width:180px}}

.video-controls .video-clear-button{height:30px;padding:4px 10px;border:1px solid #ef6470;border-radius:7px;background:#bd3544;color:#fff;font-size:11px;white-space:nowrap}.video-controls .video-clear-button:hover:not(:disabled){background:#d13d4e}.video-controls .video-clear-button:disabled{opacity:.5;cursor:not-allowed}

.composer #clear-composer{box-sizing:border-box;width:81px;flex:0 0 81px;padding-inline:0}@media(max-width:720px){.composer #clear-composer{width:69px;flex-basis:69px}}

.studio-grid .composer-tab-wrap{box-sizing:border-box;width:81px;flex:0 0 81px}.studio-grid .composer-tab-wrap .composer-tab{box-sizing:border-box;width:100%;max-width:none;padding-inline:6px}@media(max-width:720px){.studio-grid .composer-tab-wrap{width:69px;flex-basis:69px}}

.video-results>.video-pagination{flex:0 0 100%;display:flex;justify-content:center;padding:12px 0}.video-load-more{padding:10px 28px;border:1px solid #93b1d355;border-radius:8px;background:#233247;color:#e5efff;cursor:pointer}.video-load-more:disabled{opacity:.5;cursor:wait}.video-load-more[hidden]{display:none}

/* Match the toolbar and the reserved scrollbar corner without alpha blending. */
.studio-grid .results>.panel-heading{background:#17212f}

.composer-tab-rename-dialog label{display:block;font-size:13px}.composer-tab-rename-dialog input{display:block;box-sizing:border-box;width:100%;margin-top:8px;padding:10px 12px;border:1px solid #7188a4;border-radius:6px;font:inherit;background:#fff;color:#172b43}.composer-tab-rename-dialog input:focus{outline:2px solid #4385ed;outline-offset:2px}
