/* A calm library view, with account organization separate from generation. */
/* Upscaler keeps its own filtered results beneath the editing controls. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive{
  max-width:1200px;margin:0 auto 40px;padding-top:0;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead h2{
  font-family:'DM Sans',Arial,sans-serif!important;font-size:20px;letter-spacing:-.02em;
}

#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;padding:0;border:0}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead p{display:none}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead>div:last-child{margin:0}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .card{display:block;position:relative;aspect-ratio:4/3;min-width:0;overflow:hidden;background:#1c1d20;border:0;border-radius:6px}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .card>.history-media{position:absolute;inset:0;margin:0}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .card>.history-media img{width:100%;height:100%;object-fit:contain;cursor:pointer}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .cardbody,#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history figcaption{display:none}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .history-no-result{height:100%;display:flex;flex-direction:column;justify-content:center;padding:18px;font-size:12px}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .history-no-result span{display:none}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .history-select-box{position:absolute;top:9px;left:9px;z-index:20}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #emptyarchive{padding:40px 12px;text-align:center;color:#92969e}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #more{margin-top:20px}

header .actions #identity,.tool-status .tool-caption{display:none!important}
.account-menu{position:relative}
.account-menu>summary{cursor:pointer;list-style:none;padding:9px 13px;border:1px solid #303236;border-radius:8px;font-size:12px}
.account-menu .account-options{position:absolute;right:0;top:calc(100% + 8px);display:grid;gap:6px;padding:8px;background:#18191c;border:1px solid #333;border-radius:10px;min-width:150px;z-index:200}
#tool-assets{margin-left:8px}
#app.assets-active>.workspace,#app.assets-active>.image-studio,#app.assets-active>.soul-launch{display:none!important}
#assets-workspace{display:grid;grid-template-columns:210px minmax(0,1fr);gap:24px;align-items:start;padding-top:20px}
#assets-workspace[hidden]{display:none}
.assets-sidebar{position:sticky;top:85px;display:grid;gap:6px;min-width:0;padding:8px;border:1px solid #282a2e;border-radius:12px;background:#121315}
.assets-sidebar button{text-align:left;border:0;background:transparent;padding:12px;border-radius:7px;font-size:13px;color:#c4c4c8;min-width:0;overflow-wrap:anywhere}
.assets-sidebar button.active,.assets-sidebar button:hover{background:#232427;color:#fff}
.assets-sidebar .folders-label{display:flex;justify-content:space-between;align-items:center;padding:20px 10px 4px;color:#888;font-size:11px;text-transform:uppercase;letter-spacing:.1em}
.assets-sidebar .folders-label button{font-size:20px;padding:0 5px;color:#ddd}
#assets-folders{display:grid;gap:3px}
.asset-folder{display:flex;justify-content:space-between;gap:8px}
.asset-folder span{color:#777;font-size:11px}
#assets-gallery{min-width:0}
#assets-gallery .archive{margin:0;padding:0;border:0;background:transparent}
#assets-gallery .archivehead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;padding:0}
#assets-gallery .archivehead h2{font-size:22px;margin:0}
#assets-gallery .archivehead .eyebrow,#assets-gallery .archivehead p{display:none}
#assets-gallery #history{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#assets-gallery #history .card{display:block;position:relative;aspect-ratio:4/3;min-width:0;overflow:hidden;background:#1c1d20;border:0;border-radius:6px}
#assets-gallery .card>.history-media{position:absolute;inset:0;margin:0}
#assets-gallery .card>.history-media img{width:100%;height:100%;object-fit:cover}
#assets-gallery .card .cardbody{display:none}
#assets-gallery .history-no-result{height:100%;display:flex;flex-direction:column;justify-content:center;padding:18px;font-size:12px}
#assets-gallery .history-no-result span{display:none}
#assets-gallery #emptyarchive{padding:60px 20px;text-align:center;color:#888}
#assets-gallery .history-selection{position:sticky;top:70px;z-index:25;display:flex;flex-wrap:wrap;gap:8px;padding:10px;margin-bottom:12px;background:#202125;border:1px solid #414247;border-radius:10px}
#assets-gallery .history-selection[hidden]{display:none}
#history .asset-heart{position:absolute;top:9px;right:9px;z-index:12;display:grid;place-items:center;width:32px;height:32px;min-height:0;padding:0;border:1px solid #ffffff25;border-radius:50%;background:#141414a6;color:white;font-size:23px;line-height:1;opacity:0;transition:opacity .15s}
#history .card:hover .asset-heart,#history .card:focus-within .asset-heart,#history .asset-heart.is-favorite{opacity:1}
#history .asset-heart.is-favorite{color:#e6ad78}
#history.is-selecting .asset-heart{display:none}
#history .asset-video-badge{position:absolute;bottom:10px;left:10px;z-index:4;background:#101010a6;padding:4px 8px;border-radius:5px;color:#eee;font-size:10px;pointer-events:none}
#assets-gallery .card.is-selected{outline:3px solid #e6ad78;outline-offset:-3px}
#assets-gallery .history-select-box{position:absolute;top:9px;left:9px;z-index:20}
#assets-gallery #more{margin-top:20px}
#assets-kind{max-width:125px;background:#18191c;border:1px solid #35363a;border-radius:8px;color:#ddd;padding:8px;font-size:12px}
body:not(:has(#app.assets-active)) #assets-kind{display:none}
#asset-folder-dialog{width:min(440px,calc(100vw - 32px));padding:24px;background:#18191c;border:1px solid #393a3e;border-radius:16px;color:#eee}
#asset-folder-dialog .folder-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}
#asset-folder-dialog h2{margin:0;font-size:21px}
#asset-folder-choices{display:grid;gap:5px;max-height:35vh;overflow:auto;margin-bottom:20px}
#asset-folder-choices button{text-align:left;background:#242529;border:0;padding:12px;border-radius:8px;overflow-wrap:anywhere}
#asset-folder-form label{display:block;color:#aaa;font-size:12px;margin-bottom:8px}
#asset-folder-form .folder-create-row{display:flex;gap:8px}
#asset-folder-name{min-width:0;flex:1;background:#101113;border:1px solid #393a3e;border-radius:8px;color:#fff;padding:10px}
#asset-folder-create{background:#e4ae7e;color:#17120d;border:0;border-radius:8px;padding:10px 14px}
#asset-folder-error{color:#efb29e;font-size:12px}
@media(hover:none){#history .asset-heart{opacity:1}}
@media(max-width:1000px){#assets-workspace{grid-template-columns:170px minmax(0,1fr);gap:15px}#assets-gallery #history{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){#assets-workspace{grid-template-columns:1fr;gap:14px}.assets-sidebar{position:static;grid-template-columns:1fr 1fr;padding:6px}.assets-sidebar .folders-label{padding:8px 10px;grid-column:1/-1}#assets-folders{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));max-height:140px;overflow:auto}#assets-gallery #history{grid-template-columns:repeat(2,minmax(0,1fr))}#assets-gallery .archivehead{flex-wrap:wrap;gap:10px}.history-head-actions{flex-wrap:wrap}#assets-gallery .history-selection{top:8px}.tool-switch{gap:8px}#tool-assets{margin-left:0}#history .asset-heart{width:29px;height:29px;font-size:21px}}
#tool-assets{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:82px;min-height:35px;height:35px;padding:7px 17px;border:1px solid transparent;border-radius:7px;background:transparent;color:#a9aaac;font-size:13px;font-weight:530;line-height:1;box-shadow:none}
#tool-assets:hover{background:#ffffff0a;color:#fff}
#tool-assets.active{background:#22252b;color:#f3f4f6;border-color:#3c3f47;box-shadow:inset 0 -1px #c0c3ca}
#assets-gallery .history-media figcaption{display:none}
#assets-gallery .history-media.is-result img{cursor:pointer}
@media(max-width:640px){#tool-assets{min-width:0;padding:8px 13px;font-size:11px}#app .tool-switch{height:auto;min-height:55px;padding:7px 0;row-gap:8px}.tool-group{flex-wrap:wrap}}

#assets-gallery .archivehead>div:last-child{margin:0;min-width:0;text-align:right}
#assets-gallery .history-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px}
#assets-gallery .history-head-actions button{white-space:nowrap}
@media(max-width:640px){#assets-gallery .archivehead{display:flex;align-items:center}#assets-gallery .archivehead>div:last-child{flex:1 1 100%}#assets-gallery .history-head-actions{justify-content:flex-start}#assets-gallery #assets-kind{margin-right:auto}#assets-gallery .archivehead h2{font-size:21px}}

#asset-video-dialog{width:min(1100px,calc(100vw - 32px));max-height:92vh;background:#111214;border:1px solid #3b3d41;border-radius:12px;padding:12px;color:white}
#asset-video-player{display:block;width:100%;max-height:78vh;background:#080808}
.asset-video-actions{display:flex;justify-content:flex-end;gap:8px;padding-bottom:10px}

/* Queue lives beside Account, outside the creative-tool navigation. */
header .queue-popover{
  position:relative;display:block;min-width:0;max-width:min(390px,90vw);
  padding:0;margin:0;background:transparent;border:0;box-shadow:none;
  color:#dee1e8;
}
header .queue-popover[hidden]{display:none!important}
header .queue-popover>summary {
  list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:7px;
  min-height:34px;padding:7px 11px;
  border:1px solid #41454e;border-radius:9px;
  background:#22242a;color:#d7dae2;font-size:11px;font-weight:560;
  white-space:nowrap;
  transition:background .15s ease,border-color .15s ease;
}
header .queue-popover>summary::-webkit-details-marker{display:none}
header .queue-popover>summary:hover,
header .queue-popover[open]>summary{
  background:#2c2f36;border-color:#747984;color:#f4f5f8;
}
header .queue-popover .queue-status-dot{
  width:6px;height:6px;flex:0 0 6px;
  background:#88939e;border-radius:50%;
}
header .queue-popover.has-uncertain .queue-status-dot{background:#d3ab88}
header .queue-popover.has-uncertain>summary{border-color:#766353}
header .queue-popover #queue-count{color:#aeb2bb;font-size:10px;font-weight:520}
header .queue-popover.has-uncertain #queue-count{color:#ddbea4}
header .queue-popover .queue-summary-chevron{color:#9298a3;font-size:13px;line-height:1}
header .queue-popover[open] .queue-summary-chevron{transform:rotate(180deg)}
header .queue-popover-panel {
  position:absolute;top:calc(100% + 9px);right:0;z-index:110;
  display:flex;flex-direction:column;gap:10px;
  width:min(420px,calc(100vw - 26px));
  max-height:min(480px,68dvh);min-width:260px;overflow-y:auto;
  padding:16px;border:1px solid #4b5059;border-radius:14px;
  background:rgba(31,33,39,.97);
  box-shadow:0 20px 58px rgba(0,0,0,.62);
  backdrop-filter:blur(20px);
  scrollbar-width:thin;scrollbar-color:#5c6069 transparent;
}
header .queue-popover-heading{
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  border-bottom:1px solid #393d46;padding-bottom:11px;
}
header .queue-popover-heading strong{
  color:#eff0f4;font-size:13px;font-weight:610;letter-spacing:0;
}
header .queue-popover-heading span{
  color:#888d97;font-size:10px;white-space:nowrap;
}
header .queue-popover #active-status {
  margin:0;color:#cdd1da;font-size:11px;line-height:1.6;overflow-wrap:anywhere;
}
header .queue-popover #active-detail {
  margin:0;min-width:0;color:#aeb3bf;font-size:11px;line-height:1.7;
  overflow-wrap:anywhere;white-space:pre-line;
}
header .queue-popover #resolve {
  align-self:stretch;margin-top:4px;min-height:39px;
  padding:9px 12px;border:1px solid #665a56;border-radius:9px;
  background:#353038;color:#e8d5ca;font-size:11px;font-weight:590;
}
header .queue-popover #resolve:hover{background:#42373d;border-color:#a38775}
header .queue-popover #resolve[hidden]{display:none!important}
header .queue-popover .queue-support-link{
  display:block;align-self:stretch;margin-top:4px;min-height:39px;
  padding:10px 12px;border:1px solid #545962;border-radius:9px;
  background:#2e3036;color:#e2e4e9;font-size:11px;font-weight:590;
  text-align:center;text-decoration:none;
}
header .queue-popover .queue-support-link:hover{background:#393d45;border-color:#87909c}
header .queue-popover .queue-support-link[hidden]{display:none!important}


body:has(#app[hidden]) header #active{display:none!important}
header .queue-popover>summary{min-height:35px;padding:8px 11px;background:transparent;border-color:#303236;font-size:12px;font-weight:500;gap:6px}
header .queue-popover.has-uncertain>summary{border-color:#303236}
header .queue-popover .queue-summary-chevron{display:none}
header .queue-popover-panel{z-index:210}
@media(max-width:640px){header .queue-popover>summary{padding:8px;font-size:11px}header .queue-popover-panel{position:fixed;top:64px;right:12px;width:calc(100vw - 24px);min-width:0;max-height:65dvh}.top{gap:8px}header .account-menu>summary{padding:9px 10px;font-size:11px}}

/* Edge-to-edge image canvas and proportion-aware rows. */
body:has(#app.image-studio-active) #main.wrap,
body:has(#app.assets-active) #main.wrap{max-width:none;padding-inline:0}
header .wrap.top{max-width:none;padding-inline:16px;min-height:48px}
#app .tool-switch{height:42px;min-height:42px;padding:3px 16px;margin:0}
#app .image-studio .archive{padding-top:0}
#app .image-studio .archivehead{padding:3px 16px 6px;min-height:40px;gap:10px}
#app .image-gallery-host .archive h2{font-size:14px}
#app .image-studio .history-head-actions .text-button{min-height:29px;padding:5px 10px}
#app .image-studio .archivehead>div:last-child{margin-top:0}
#app #history.justified-gallery{display:flex;flex-wrap:wrap;align-items:flex-start;gap:2px;margin:0;padding:0;grid-template-columns:none}
#app #history.justified-gallery .card{flex:none;aspect-ratio:auto;min-height:0;min-width:0;max-width:100%;border:0!important;border-radius:0!important;transform:none!important}
/* The media must fill the dimensions assigned to its card, including while loading. */
#app #history.justified-gallery .card>.history-media{position:absolute;inset:0;width:100%;height:100%;margin:0;min-width:0;min-height:0}
#app #history.justified-gallery .card>.history-media img{display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;aspect-ratio:auto;object-fit:contain;background:#17181b}
#app .image-studio .history-selection{margin-inline:12px}
#assets-workspace{gap:16px;padding-top:6px}
#assets-workspace .assets-sidebar{margin-left:12px}
#assets-gallery .archivehead{margin-bottom:8px;padding-right:12px;gap:8px}
#assets-gallery .archivehead h2{font-size:17px}
@media(max-width:640px){
  header .wrap.top{padding-inline:10px;gap:6px}
  header .brand{gap:6px}header .brand-wordmark{width:100px}
  #app .tool-switch{height:40px;min-height:40px;padding:2px 8px}
  #app .image-studio .archivehead{padding-inline:10px;display:flex}
  #app .image-studio .archivehead>div:last-child{margin:0}
  #assets-workspace .assets-sidebar{margin-inline:8px}
  #assets-gallery .archivehead{padding-inline:10px}
}

/* Provider marks replace placeholder initials in the model menu and dock. */
#image-composer .composer-model-symbol{display:inline-flex;align-items:center;justify-content:center;background:none;width:22px;height:22px;font-size:0}
#image-composer .composer-model-symbol img,.composer-model-icon img{display:block;width:21px;height:21px;object-fit:contain}
#image-composer .composer-model-pill{font-size:14px}
.composer-model-option .composer-model-info strong{font-size:14px;line-height:1.35}
.composer-model-option .composer-model-info small{font-size:12px;line-height:1.4}

/* A tighter dock: quiet controls and one clear generation action. */
#image-composer{background:linear-gradient(110deg,#151719,#252729);border-color:#45484b;box-shadow:0 12px 38px #0006,inset 0 1px #ffffff08}
#image-composer .composer-model-pill,#image-composer .composer-settings-pill,#image-composer .composer-select-pill{border-radius:9px;border-color:#383a37;background:#232523;box-shadow:none}
#image-composer .composer-add{border-radius:9px;background:#232523;border-color:#383a37;box-shadow:none}
/* One entry point for device photos and saved reference packs. */
#image-composer .composer-add-wrap{position:relative;flex:0 0 41px;width:41px;min-width:41px;height:41px}
#image-composer .composer-add-wrap>.composer-add{display:grid;place-items:center;width:100%;height:100%;min-height:0}
#image-composer .composer-add[aria-expanded="true"]{background:#353835;border-color:#858b83;color:#fff}
#image-composer .composer-add-menu{
  position:absolute;left:0;bottom:calc(100% + 12px);z-index:135;
  box-sizing:border-box;width:min(305px,calc(100vw - 36px));
  padding:7px;border:1px solid #4b4e49;border-radius:15px;
  background:#1c1e1d;box-shadow:0 18px 50px rgba(0,0,0,.7);
}
#image-composer .composer-add-action{
  display:flex;align-items:center;gap:12px;width:100%;min-height:62px;
  padding:10px;border:0;border-radius:9px;background:transparent;
  color:#f0f1ee;text-align:left;transition:background .16s ease;
}
#image-composer .composer-add-action+.composer-add-action{border-top:1px solid #363936;border-radius:0 0 9px 9px}
#image-composer .composer-add-action:hover,#image-composer .composer-add-action:focus-visible{background:#2b2e2b}
#image-composer .composer-add-icon{
  display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;
  border:1px solid #3a3e3b;border-radius:10px;background:#272a28;color:#e6e8e2;
}
#image-composer .composer-add-icon svg{display:block;width:19px;height:19px}
#image-composer .composer-add-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
#image-composer .composer-add-copy strong{font-size:12px;font-weight:650;line-height:1.25}
#image-composer .composer-add-copy small{font-size:10.5px;line-height:1.35;color:#a5aaa4}
#image-composer .composer-add-chevron{flex:0 0 14px;width:14px;height:14px;color:#a4a9a3}
@media(max-width:650px){
  #image-composer .composer-add-wrap{flex-basis:38px;width:38px;min-width:38px;height:38px}
  #image-composer .composer-add-menu{width:min(290px,calc(100vw - 36px))}
}
@media(prefers-reduced-motion:reduce){#image-composer .composer-add-action{transition:none}}
#image-composer .composer-generate{border-radius:13px;font-weight:600;box-shadow:none!important}
#image-composer .composer-select-pill select{font-size:13px;font-weight:550}
@media(min-width:900px){
 #image-composer:not(.is-pv-soul){display:grid;grid-template-columns:minmax(0,1fr) 44px 144px;grid-template-rows:minmax(38px,auto) minmax(40px,auto);gap:8px 12px;padding:22px 24px;border-radius:25px}
 #image-composer:not(.is-pv-soul) .image-composer-top{grid-column:1/3;grid-row:1;gap:8px}
 #image-composer:not(.is-pv-soul) .image-composer-toolbar{display:contents}
 #image-composer:not(.is-pv-soul) .composer-controls{display:flex;align-items:center;flex-wrap:wrap;gap:7px;grid-column:1;grid-row:2;min-width:0}
 #image-composer:not(.is-pv-soul) .composer-flex{display:none}
 #image-composer:not(.is-pv-soul) #composer-character{grid-column:2;grid-row:2;width:40px;height:40px;min-height:40px;border-radius:9px;align-self:center}
 #image-composer:not(.is-pv-soul) #composer-character-name{display:none}
 #image-composer:not(.is-pv-soul) #composer-character-photo{font-size:20px}
 #image-composer:not(.is-pv-soul) .composer-generate{grid-column:3;grid-row:1/3;align-self:stretch;min-width:0;width:144px;min-height:84px;font-size:15px}
 #image-composer:not(.is-pv-soul) #composer-generation-block,#image-composer:not(.is-pv-soul) #image-composer-status{grid-column:1/-1}
 #image-composer:not(.is-pv-soul) #image-composer-prompt{min-height:38px;padding:3px 0}
 /* Remove unused 44px character column when the picker lives in the left +. */
 #image-composer:not(.is-pv-soul):not(.has-character-picker){grid-template-columns:minmax(0,1fr) 144px}
 #image-composer:not(.is-pv-soul):not(.has-character-picker) .image-composer-top{grid-column:1}
 #image-composer:not(.is-pv-soul):not(.has-character-picker) .composer-generate{grid-column:2}
 #image-composer.is-pv-soul{padding:20px 24px;border-radius:25px;grid-template-columns:minmax(0,1fr) 80px 96px 144px;gap:8px 12px}
 #image-composer.is-pv-soul #composer-character,#image-composer.is-pv-soul .hf-source-card{border-radius:12px}
}

/* Soul tiles: compact photo cards, with the add affordance in the corner. */
#image-composer.is-pv-soul #composer-character,
#image-composer.is-pv-soul .hf-source-card{height:84px;min-height:84px;align-self:end;border:0;background:linear-gradient(160deg,#202223,#393c3b);box-shadow:none;border-radius:11px}
#image-composer.is-pv-soul #composer-character-photo{background:transparent}
#image-composer.is-pv-soul #composer-character-photo:not(:has(img)){font-size:0}
#image-composer.is-pv-soul #composer-character-photo:not(:has(img)):before{content:'+';position:absolute;top:7px;left:7px;width:23px;height:23px;display:grid;place-items:center;background:#ffffff08;border-radius:6px;font-size:20px;color:#a6aaa7;font-weight:400}
#image-composer.is-pv-soul .hf-source-plus{position:absolute;top:7px;left:7px;width:23px;height:23px;display:grid;place-items:center;background:#ffffff08;border-radius:6px;font-size:20px}
#image-composer.is-pv-soul .has-photo .hf-source-plus{display:none}
#image-composer.is-pv-soul #composer-character-name,#image-composer.is-pv-soul .hf-source-label{font-size:10px!important;font-weight:650;line-height:1.15;text-align:left;padding:20px 8px 8px;background:linear-gradient(transparent,#0005)}
#image-composer.is-pv-soul .composer-generate{align-self:end;height:84px;min-height:84px;border-radius:12px}
#image-composer.is-pv-soul .composer-select-pill:has(#hf-bar-ratio):before{content:'';position:absolute;left:12px;top:50%;width:13px;height:8px;transform:translateY(-50%);border:1px solid #c3c6c2;border-radius:2px;pointer-events:none}
#image-composer.is-pv-soul .composer-select-pill:has(#hf-bar-resolution):before{content:'';position:absolute;left:13px;top:50%;width:9px;height:9px;transform:translateY(-50%) rotate(45deg);border:1px solid #c3c6c2;border-radius:2px;pointer-events:none}
#image-composer.is-pv-soul .hf-bar-control select{padding-left:33px}
@media(min-width:1000px){
 #image-composer.is-pv-soul{grid-template-columns:minmax(0,1fr) 84px 144px 144px;grid-template-rows:minmax(34px,auto) auto;gap:6px 12px;padding:20px 24px}
 #image-composer.is-pv-soul #composer-character{width:84px}
 #image-composer.is-pv-soul .composer-controls{gap:6px}
}
@media(max-width:650px){#image-composer.is-pv-soul #composer-character,#image-composer.is-pv-soul .hf-source-card,#image-composer.is-pv-soul .composer-generate{height:72px;min-height:72px}}

/* Stable Generate geometry, independent of the reference tray height. */
#image-composer:not(.is-pv-soul) .composer-generate{align-self:end;height:84px;min-height:84px;max-height:84px}
#image-composer #composer-library.is-character-library{padding:0;background:linear-gradient(125deg,#1d1f20,#151617);border-color:#373a3a;border-radius:20px}
#image-composer .is-character-library .composer-panel-head{padding:28px 30px 26px;align-items:flex-start;margin:0;border:0}
#image-composer .is-character-library #composer-library-title{display:block;font-size:27px;line-height:1.12;font-weight:800;letter-spacing:-.8px;color:#f2f2ef}
#image-composer .is-character-library #composer-library-note{max-width:480px;margin:12px 0 22px;font-size:14px;line-height:1.5;color:#a0a3a2}
#image-composer #composer-character-create{display:inline-flex;align-items:center;justify-content:center;gap:22px;width:auto;min-width:190px;height:46px;padding:0 22px;white-space:nowrap;border:1px solid #efb951;border-radius:11px;background:#efb951;color:#171309;font-size:14px;font-weight:700;box-shadow:none;cursor:pointer}
#image-composer #composer-character-create:hover{background:#facb6b;border-color:#facb6b}
#image-composer #composer-character-create span{font-size:19px}
#image-composer .is-character-library #composer-library-close{flex-shrink:0;width:32px;height:32px;border:0;border-radius:50%;background:#ffffff08;color:#c7c9c6}
#image-composer .is-character-library .composer-library-cards{display:flex;flex-wrap:wrap;align-items:flex-start;gap:18px;padding:20px 30px;background:#ffffff04;overflow:visible}
#image-composer .is-character-library .composer-library-card:not(:has(.composer-library-photo)){width:auto;flex:0 0 auto;padding:10px 14px;border:1px solid #454846;border-radius:9px;font-size:12px;background:#242625}
#image-composer .is-character-library .composer-library-card[aria-pressed=true]:not(:has(.composer-library-photo)){border-color:#efb951}
#image-composer .is-character-library .character-library-empty{align-self:center;margin:8px 0;color:#919691;font-size:13px;line-height:1.5;flex:1 1 200px}
#image-composer .is-character-library .composer-library-actions{padding:12px 30px 18px;border:0;background:#ffffff04}
#image-composer .is-character-library #composer-library-manage{background:transparent;border:0;padding:0;color:#a1a6a1;font-size:12px}
@media(max-width:650px){
 #image-composer:not(.is-pv-soul) .composer-generate{height:72px;min-height:72px;max-height:72px}
 #image-composer .is-character-library .composer-panel-head{padding:20px}
 #image-composer .is-character-library #composer-library-title{font-size:22px;letter-spacing:-.5px}
 #image-composer .is-character-library #composer-library-note{font-size:13px;margin:10px 0 16px}
 #image-composer .is-character-library .composer-library-cards{padding:16px 20px}
 #image-composer .is-character-library .composer-library-actions{padding:10px 20px 18px}
}

#image-composer #composer-character-create[hidden]{display:none!important}

/* Model changes share the compact baseline; attached photos add a reference row. */
#image-composer.is-pv-soul .image-composer-top{min-height:0;flex-direction:column;align-items:stretch;gap:8px}
#image-composer.is-pv-soul .composer-controls{min-height:0;height:auto}
#image-composer.is-pv-soul .image-composer-references{flex:initial;width:100%;max-width:none;flex-wrap:wrap;overflow:visible;padding:2px 5px 4px;gap:10px}
#image-composer.is-pv-soul .composer-reference-tile{flex-basis:58px;width:58px;height:62px;overflow:visible}
#image-composer.is-seedream #composer-character{display:none!important}
@media(min-width:900px){
 /* The empty Soul dock must match the Seedream compact baseline (5px vertical gap). */
 #image-composer.is-pv-soul{padding:22px 24px 27px;grid-template-rows:minmax(38px,auto) minmax(40px,auto);gap:8px 12px}
 #image-composer.is-pv-soul #image-composer-prompt{padding:3px 0;box-sizing:border-box}
 #image-composer.is-seedream{grid-template-columns:minmax(0,1fr) 144px}
 #image-composer.is-seedream .image-composer-top{grid-column:1}
 #image-composer.is-seedream .composer-generate{grid-column:2}
 #image-composer.is-pv-soul.has-soul-source{grid-template-columns:minmax(0,1fr) 84px 144px}
 #image-composer.is-pv-soul.has-soul-source .composer-generate{grid-column:3}
}

/* Selection actions share the studio's contemporary typography. */
#app .history-selection{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 16px;border:1px solid #303136;border-radius:12px;background:#191a1d}
#app .history-selection[hidden]{display:none}
#app .history-selection,#app .history-selection button,#app #history-selection-count{font-family:'DM Sans',sans-serif;font-size:14px;font-weight:500;line-height:1.4;letter-spacing:0;text-transform:none}
#app #history-selection-count{margin-right:auto;color:#dedee2;padding:8px 0}
#app .history-selection button{min-height:38px;padding:8px 12px;border-radius:8px}
#app .history-selection button:hover:not(:disabled){background:#303136;color:#fff}
#app .history-selection button:disabled{opacity:.4}
/* Upscaler: a centered canvas and compact settings, without the legacy sidebar. */
#app.upscale-studio-active>.workspace{display:flex;flex-direction:column;gap:16px;max-width:1060px;margin:24px auto 40px;padding:0 20px}
#app.upscale-studio-active .stage{order:0;width:100%;min-width:0;border:0;background:transparent;box-shadow:none}
#app.upscale-studio-active .stagehead,#app.upscale-studio-active .stagefoot{padding:10px 2px;background:transparent;border:0;font-family:'DM Sans',sans-serif;font-size:13px;letter-spacing:0;text-transform:none}
#app.upscale-studio-active .stagehead .eyebrow{font:500 13px 'DM Sans',sans-serif;letter-spacing:0;text-transform:none;color:#95959e}
#app.upscale-studio-active .canvas{position:relative;min-height:420px;height:clamp(420px,52vh,660px);aspect-ratio:auto;border:1px dashed #3c3d42;border-radius:18px;background:#151518;overflow:hidden}
#app.upscale-studio-active .canvas.drag{border-color:#eab256;background:#22201a}
#app.upscale-studio-active .canvas>img,#app.upscale-studio-active .canvas>video{width:100%;height:100%;max-height:100%;object-fit:contain}
#app.upscale-studio-active .empty{width:100%;height:100%;min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:transparent}
#app.upscale-studio-active .empty[hidden]{display:none}
#app.upscale-studio-active .empty:before{content:'↗';display:grid;place-items:center;width:72px;height:72px;margin-bottom:24px;border:1px solid #42434a;border-radius:20px;background:#24252a;color:#e5e5ec;font:36px 'DM Sans',sans-serif}
#app.upscale-studio-active .empty-title{font:600 36px/1.15 'DM Sans',sans-serif;letter-spacing:-1px;margin:0 0 12px;text-transform:none;color:#f5f5f7}
#app.upscale-studio-active .empty-description{font:400 15px/1.6 'DM Sans',sans-serif;letter-spacing:0;max-width:390px;color:#a6a6af;text-transform:none}
#app.upscale-studio-active .empty-actions{margin-top:24px}
#app.upscale-studio-active #canvas-import{padding:12px 24px;min-height:46px;border:0;border-radius:10px;background:#f0f0f3;color:#17171b;font:600 14px 'DM Sans',sans-serif;letter-spacing:0;text-transform:none}
#app.upscale-studio-active .controls{order:1;position:static;width:100%;max-width:none;min-width:0;padding:18px;border:1px solid #303136;border-radius:16px;background:#1b1b1f;box-shadow:none;overflow:visible}
#app.upscale-studio-active .controls-body{display:flex;flex-wrap:wrap;align-items:flex-end;gap:14px;padding:0;overflow:visible;max-height:none}
#app.upscale-studio-active .controls-body>.mode,#app.upscale-studio-active #start-mode .upload-heading,#app.upscale-studio-active #filemeta,#app.upscale-studio-active #generation-help{display:none}
#app.upscale-studio-active #upscale-model-control{flex:2 1 280px;display:flex;gap:12px}
#app.upscale-studio-active #upscale-model-control>label{flex:1;min-width:0}
#app.upscale-studio-active .parameter-grid{display:flex;gap:12px;flex:1 1 150px;margin:0}
#app.upscale-studio-active .parameter-grid>label{flex:1;min-width:0}
#app.upscale-studio-active #format-control{flex:0 1 110px}
#app.upscale-studio-active #upscale-info{order:9;flex:1 0 100%;margin:0;padding:10px 0 0;border:0;background:transparent;color:#9999a3;font:400 13px/1.6 'DM Sans',sans-serif;letter-spacing:0}
#app.upscale-studio-active #upscale-info summary{cursor:pointer;font-weight:500;color:#bbbbc4}
#app.upscale-studio-active #upscale-info>strong{display:block;margin-top:12px}
#app.upscale-studio-active .label{font:500 12px/1.5 'DM Sans',sans-serif;letter-spacing:0;text-transform:none;color:#a6a6af;margin-bottom:6px}
#app.upscale-studio-active select{height:42px;width:100%;min-width:0;background:#27272d;border:1px solid #3b3b42;border-radius:9px;font:500 13px 'DM Sans',sans-serif;color:#eeeeef;letter-spacing:0;text-transform:none}
#app.upscale-studio-active #start-mode{flex:1 0 100%;order:8}
#app.upscale-studio-active #start-mode .frame-pair{display:block}
#app.upscale-studio-active #drop{min-height:0;display:flex;align-items:center;justify-content:center;padding:10px;border:1px solid #3b3b42;border-radius:9px;background:transparent;font:500 13px 'DM Sans',sans-serif}
#app.upscale-studio-active #drop small{display:none}
#app.upscale-studio-active:not(:has(#preview:not([hidden]))) #start-mode{display:none}
#app.upscale-studio-active .controls>.generate-zone{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px 0 0;margin-top:14px;border-top:1px solid #33333a;background:transparent}
#app.upscale-studio-active #upscale-price{flex:1 1 260px;border:0;padding:0;margin:0;background:transparent}
#app.upscale-studio-active #upscale-price .fine{font:400 12px/1.5 'DM Sans',sans-serif;letter-spacing:0;text-transform:none}
#app.upscale-studio-active #generate{flex:0 0 180px;width:180px;min-height:46px;height:46px;margin:0;border-radius:10px;font:600 15px 'DM Sans',sans-serif;letter-spacing:0;text-transform:none;background:#ecb252;color:#151515}
#app.upscale-studio-active #save{flex:1 0 100%;font:500 13px 'DM Sans',sans-serif;letter-spacing:0;text-transform:none}
#app.upscale-studio-active #save:disabled{display:none}
@media(max-width:640px){#app.upscale-studio-active>.workspace{padding:0 12px;margin-top:12px;gap:8px}#app.upscale-studio-active .canvas{height:390px;min-height:390px}#app.upscale-studio-active .empty{min-height:390px}#app.upscale-studio-active .controls{padding:14px}#app.upscale-studio-active #upscale-model-control{flex-basis:100%;flex-wrap:wrap}#app.upscale-studio-active #generate{flex:1 0 100%;width:100%}#app .history-selection{padding:10px;gap:4px}#app #history-selection-count{flex:1 0 100%}#app .history-selection button{font-size:13px;padding:8px 10px}}
#app.upscale-studio-active [hidden]{display:none!important}
/* Reset the old sticky sidebar geometry for the new vertical workspace. */
#app.upscale-studio-active>.workspace{border:0;background:transparent;box-shadow:none;min-height:0}
#app.upscale-studio-active .stage{position:relative;top:auto;display:flex;flex-direction:column;height:auto;min-height:0;overflow:visible;border-radius:0}
#app.upscale-studio-active .canvas{flex:none;padding:0}
#app.upscale-studio-active .stagehead,#app.upscale-studio-active .stagefoot{flex:none;min-height:38px}
#app.upscale-studio-active .controls>.generate-zone{position:static;bottom:auto;box-shadow:none;border-radius:0}
#app.upscale-studio-active #upscale-model-control,#app.upscale-studio-active #format-control{margin:0}

/* Workspace gutters stay independent of the shared header. */
body #main.wrap{
  --studio-inset:clamp(16px,2.3vw,42px);
  max-width:none;padding-inline:var(--studio-inset);
}
body:has(#app.image-studio-active) #main.wrap,
body:has(#app.assets-active) #main.wrap{--studio-inset:0px}
body #main.wrap:has(>#app.video-studio-active){--studio-inset:12px}
@media(max-width:820px){body #main.wrap:has(>#app.video-studio-active){--studio-inset:10px}}
@media(max-width:760px){body #main.wrap{--studio-inset:18px}}
@media(max-width:640px){body #main.wrap{--studio-inset:12px}}

/* One media loading treatment for Image, Video, Upscaler and Assets. */
#app #history .history-media{position:relative}
#app #history .history-media img.history-asset-loading{
  opacity:0!important;visibility:hidden;
}
#app #history .history-media:not(.has-image)::before{
  content:"";position:absolute;inset:0;z-index:0;
  background:#17181b;pointer-events:none;
}
#app #history .history-media:not(.has-image)::after{
  content:"";position:absolute;top:50%;left:50%;z-index:1;
  width:40px;height:40px;transform:translate(-50%,-50%);
  background:url('./branding/pv-mark.png') center/contain no-repeat;
  opacity:.3;pointer-events:none;animation:pv-preview-pulse 1.8s ease-in-out infinite alternate;
}
#app #history .history-media.is-unavailable::after{
  animation:none;opacity:.25;transform:translate(-50%,calc(-50% - 12px));
}
#app #history .history-preview-unavailable{
  position:absolute;inset:calc(50% + 18px) 8px auto;z-index:2;
  display:block;padding:0;background:transparent;color:#92969e;
  font:400 11px/1.4 'DM Sans',Arial,sans-serif;text-align:center;pointer-events:none;
}
@keyframes pv-preview-pulse{from{opacity:.16}to{opacity:.38}}
@media(prefers-reduced-motion:reduce){
  #app #history .history-media:not(.has-image)::after{animation:none;opacity:.28}
}

/* Fashion shares the studio shell and keeps its editorial workbench inside it. */
body:has(#app.fashion-studio-active) #main.wrap{--studio-inset:0px}
#app.fashion-studio-active{display:block;height:auto}
#app.fashion-studio-active > :not(.tool-switch):not(#fashion-studio){display:none!important}
body:has(#app.fashion-studio-active)>footer{display:none}
#fashion-studio{min-width:0;min-height:calc(100svh - 100px)}
.fashion-loading{display:flex;align-items:center;justify-content:center;gap:14px;min-height:320px;color:#a4a8b0;font:400 12px 'DM Sans',Arial,sans-serif}
.fashion-loading img{opacity:.3;animation:pv-preview-pulse 1.8s ease-in-out infinite alternate}
@media(prefers-reduced-motion:reduce){.fashion-loading img{animation:none}}


/* One editorial masthead for every studio. Navigation never moves with content.
   Satin graphite finish, with just enough depth to separate the work area. */
:root{--studio-header-height:70px}
body>#studio-header{
  position:sticky;top:0;z-index:60;height:var(--studio-header-height);
  background:
    linear-gradient(180deg,rgba(255,255,255,.047),rgba(255,255,255,.014) 29%,transparent 54%),
    linear-gradient(180deg,#191a1e 0%,#121317 70%,#0d0e11 100%);
  border-bottom:1px solid rgba(203,207,215,.2);
  box-shadow:inset 0 1px rgba(255,255,255,.065),0 4px 18px rgba(0,0,0,.2);
  backdrop-filter:none;
}
body>#studio-header .wrap.top{
  display:flex;align-items:center;justify-content:flex-start;
  height:100%;min-height:0;max-width:none;
  padding:0 24px;gap:clamp(24px,3vw,48px);
}
#studio-header .brand{gap:8px}
#studio-header .brand-icon{width:26px;height:26px}
#studio-header .brand-wordmark{width:112px;height:28px}
#studio-header .brand .brand-lab{
  display:block;margin:0 0 0 2px;padding:0;border:0;
  color:#a5a5a8;font-size:9px;font-weight:500;letter-spacing:.16em;
}
body>#studio-header .tool-switch{
  display:flex;flex:1 1 auto;align-self:stretch;align-items:stretch;
  width:auto;min-width:0;height:auto;min-height:0;margin:0;padding:0;
  border:0;background:transparent;box-shadow:none;overflow:visible;
}
#studio-header .tool-switch>.tool-group{
  display:flex;flex-wrap:nowrap;align-items:stretch;
  gap:clamp(20px,2.2vw,34px);width:max-content;min-width:0;
}
#studio-header .tool-switch>.tool-group>button{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  flex:none;width:auto;min-width:0;height:100%;min-height:44px;
  margin:0;padding:0 1px;border:0;border-radius:0;background:transparent;
  box-shadow:none;color:#b0b2b7;font-size:14px;font-weight:500;line-height:1;
  letter-spacing:0;white-space:nowrap;transition:color .18s ease;
}
#studio-header .tool-switch>.tool-group>button::after{
  content:"";position:absolute;bottom:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,#a2a5ad,#f4f5f7 50%,#a5a8b0);
  box-shadow:0 -2px 8px rgba(220,223,229,.12);opacity:0;
  transition:opacity .18s ease;
}
#studio-header .tool-switch>.tool-group>button[aria-pressed="true"]{color:#f4f5f8}
#studio-header .tool-switch>.tool-group>button[aria-pressed="true"]::after{opacity:1}
#studio-header .tool-switch>.tool-group>button:hover:not(:disabled){color:#fff;background:transparent}
#studio-header .tool-switch>.tool-group>button:focus-visible{outline:1px solid #c4c1ba;outline-offset:-5px}
#studio-header .actions{margin-left:auto;gap:22px;flex:none;min-width:144px;justify-content:flex-end}
#studio-header .actions>details>summary{
  display:flex;align-items:center;justify-content:center;gap:7px;
  min-height:40px;margin:0;padding:0;list-style:none;border:0;border-radius:0;
  background:transparent;box-shadow:none;color:#b3b5bb;
  font-size:12px;font-weight:450;line-height:1;letter-spacing:0;
  cursor:pointer;transition:color .15s ease;
}
#studio-header .actions>details>summary::-webkit-details-marker{display:none}
#studio-header .actions>details>summary::marker{content:""}
#studio-header .actions>details>summary:hover,
#studio-header .actions>details[open]>summary{background:transparent;border:0;color:#f0eee8}
#studio-header .account-menu>summary::after{
  content:"";width:5px;height:5px;margin-left:2px;margin-top:-3px;
  border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg);
}
#studio-header .account-menu[open]>summary::after{margin-top:3px;transform:rotate(225deg)}
#studio-header .queue-popover .queue-status-dot{width:4px;height:4px;flex-basis:4px}
#studio-header .account-menu .account-options,
#studio-header .queue-popover-panel{
  top:calc(100% + 12px);border-color:#333438;border-radius:8px;
  background:#17181b;box-shadow:0 12px 35px #0005;
}
body:has(#app[hidden])>#studio-header .tool-switch{display:none}
#fashion-studio{min-height:calc(100svh - var(--studio-header-height))}
@media(min-width:821px){
  body:has(#app.video-studio-active:not([hidden]))>main#main{
    height:calc(100dvh - var(--studio-header-height));
  }
}
@media(max-width:899px){
  :root{--studio-header-height:100px}
  body>#studio-header .wrap.top{
    display:grid;grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:56px 43px;gap:0 16px;padding:0 18px;
  }
  #studio-header .brand{grid-column:1;grid-row:1;justify-self:start}
  #studio-header .actions{grid-column:2;grid-row:1;gap:20px}
  body>#studio-header .tool-switch{grid-column:1/-1;grid-row:2;width:100%}
  #studio-header .tool-switch>.tool-group{width:100%;justify-content:space-between;gap:14px}
  #studio-header .tool-switch>.tool-group>button{min-height:43px;font-size:13px}
  body:has(#app[hidden])>#studio-header{height:56px}
  body:has(#app[hidden])>#studio-header .wrap.top{grid-template-rows:55px}
}
@media(max-width:480px){
  body>#studio-header .wrap.top{padding-inline:14px;column-gap:12px}
  #studio-header .brand{gap:6px}
  #studio-header .brand-icon{width:23px;height:23px}
  #studio-header .brand-wordmark{width:96px;height:25px}
  #studio-header .brand .brand-lab{font-size:8px;letter-spacing:.1em}
  #studio-header .actions{gap:14px;min-width:118px}
  #studio-header .actions>details>summary{font-size:11px;gap:5px}
  #studio-header .tool-switch>.tool-group{gap:10px}
  #studio-header .tool-switch>.tool-group>button{font-size:12px}
  #studio-header .queue-popover-panel{
    position:fixed;top:56px;right:12px;width:calc(100vw - 24px);min-width:0;
  }
}
@media(prefers-reduced-motion:reduce){
  #studio-header .tool-switch>.tool-group>button,
  #studio-header .actions>details>summary{transition:none}
}

/* Keep the preview clear while the full-resolution file loads. */
#image-lightbox-stage{position:relative}
#image-lightbox-stage[aria-busy="true"]{cursor:progress}

/* Immediate local feedback, before the provider has accepted a generation. */
#app #history .submission-card{background:#1c1d20;cursor:default}
#app #history .submission-progress{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:18px;text-align:center;font-family:'DM Sans',Arial,sans-serif}
#app #history .submission-mark{width:28px;height:28px;background:url('./branding/pv-mark.png') center/contain no-repeat;opacity:.35;animation:pv-preview-pulse 1.8s ease-in-out infinite alternate}
#app #history .submission-title{font-size:15px;font-weight:500;line-height:1.25;letter-spacing:0}
#app #history .submission-detail{display:block;color:#999da5;font-size:12px;line-height:1.45;max-width:32ch;overflow-wrap:anywhere;max-height:4.35em;overflow:auto}
#app #history .submission-dismiss{padding:4px 8px;background:transparent;border:0;color:#bfc1c6;font:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px}
#app #history .submission-card[aria-busy="false"] .submission-mark{display:none;animation:none}
@media(prefers-reduced-motion:reduce){#app #history .submission-mark{animation:none}}


/* Upscaler deck V2. Only Upscale changes. Reuses existing form controls and paid quote logic. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.72fr) minmax(175px,.9fr);
  column-gap:12px;row-gap:9px;align-items:end;padding:12px 14px;border-radius:13px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls>.controls-body,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls>.generate-zone{
  display:contents!important;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-control{
  display:none!important;
}
#app.upscale-studio-active #upscale-model-control>label{min-width:0}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body>.parameter-grid{
  order:0;grid-column:1;display:flex;width:100%;min-width:0;gap:0;margin:0;
}
#app.upscale-studio-active .controls-body>.parameter-grid>label:not([hidden]){flex:1 1 auto;min-width:0}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control{
  order:0;grid-column:2;min-width:0;width:100%;margin:0;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate{
  order:0;grid-column:3;width:100%;min-width:0;min-height:42px;height:42px;max-height:42px;
  margin:0;font-size:13px;line-height:1.2;border-radius:9px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-notice-slot{
  order:1;grid-column:1/-1;min-width:0;width:100%;margin:1px 0 0;
}
#app.upscale-studio-active #upscale-notice-slot #notice{padding:8px 11px;border-radius:8px}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info{
  order:2;grid-column:1/-1;width:100%;min-width:0;margin:0;padding:1px 0 0;border:0;
  background:transparent;font:400 11px/1.5 'DM Sans',sans-serif;
}
#app.upscale-studio-active #upscale-info summary{
  display:inline-flex;align-items:center;min-height:20px;padding:0;
  font-size:11px;line-height:1.5;color:#a6a9b3;
}
#app.upscale-studio-active #upscale-info[open]{padding:8px 0 3px;border-top:1px solid #33363e}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-price{
  order:3;grid-column:1/-1;display:none!important;width:100%;min-width:0;
  margin:0;padding:9px 0 0;border-top:1px solid #33363e;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls:has(#upscale-info[open]) #upscale-price:not([hidden]){
  display:flex!important;align-items:center;flex-wrap:wrap;gap:8px 12px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #save{
  order:4;grid-column:1/-1;display:none!important;width:100%;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls:has(#upscale-info[open]) #save:not(:disabled){
  display:block!important;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generation-help,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #start-mode{display:none!important}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls .label{
  margin-bottom:5px;font-size:11px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls select{
  height:42px;min-height:42px;
}
@media(max-width:890px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px 11px;
  }
    #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body>.parameter-grid{grid-column:1}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control{grid-column:2}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate{grid-column:1/-1}
}


/* Upscaler Workdeck V3: improve density and visual hierarchy without moving any
   existing source, price, history or generation controls. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace{
  max-width:1120px;margin:12px auto 18px;gap:7px;
}
/* Restore a little space below the large preview, without changing its size. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.stage{margin-bottom:14px}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .stagehead,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .stagefoot{
  min-height:28px;height:28px;padding:0 2px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .stagehead .eyebrow{
  font-size:11px;font-weight:540;color:#a9a9b1;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .stagefoot{
  font-size:10px;color:#9499a3;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .canvas{
  height:clamp(420px,52vh,660px);min-height:420px;
  border-radius:13px;border-color:#41434b;
  background:radial-gradient(ellipse 50% 80% at 50% 45%,#1e1f24 0%,#16171b 78%);
  transition:border-color .15s ease;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .canvas:hover{
  border-color:#61656f;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty{
  min-height:0;height:100%;padding:15px 20px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty::before{
  width:55px;height:55px;margin-bottom:16px;border-radius:15px;
  font-size:28px;background:#25262d;border-color:#474951;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-title{
  font-size:30px;line-height:1.13;letter-spacing:-.035em;margin:0 0 8px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-description{
  font-size:13px;line-height:1.5;max-width:360px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-actions{
  margin-top:17px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #canvas-import{
  min-height:40px;padding:9px 20px;border-radius:9px;font-size:12px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active):has(#preview:not([hidden])) .canvas{
  height:clamp(420px,52vh,660px);min-height:420px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
  padding:14px 12px 12px;column-gap:11px;row-gap:3px;
  background:#1d1e23;border:1px solid #373a43;border-radius:12px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls .label{
  font-size:10px;color:#aeb1bb;letter-spacing:.015em;margin-bottom:4px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls select{
  height:39px;min-height:39px;border:1px solid #3c3e47;background:#282a30;
  border-radius:8px;font-size:12px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate{
  height:39px;min-height:39px;max-height:39px;
  border-radius:8px;font-size:13px;font-weight:650;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info{
  padding:0;min-height:25px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info summary{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;
  width:max-content;min-height:25px;margin-left:auto;padding:4px 7px;
  border:1px solid transparent;border-radius:7px;
  list-style:none;font-size:11px;font-weight:560;color:#aeb2bd;
  line-height:1.4;cursor:pointer;
}
#app.upscale-studio-active #upscale-info summary::-webkit-details-marker{display:none}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info summary::after{
  content:"";width:6px;height:6px;display:inline-block;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translate(-1px,-1px);
  transition:transform .12s ease;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info[open] summary::after{
  transform:rotate(225deg) translate(-1px,-1px);
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info summary:hover{
  color:#f2f2f5;background:#292b32;border-color:#3c3e46;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info summary:focus-visible,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls select:focus-visible,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate:focus-visible{
  outline:2px solid #d5d9df;outline-offset:2px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-notice-slot #notice{
  padding:8px 11px;font-size:11px;line-height:1.5;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info[open]{
  padding-top:8px;
}
@media(max-width:640px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace{
    margin-top:8px;gap:5px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .canvas{
    height:390px;min-height:390px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active):has(#preview:not([hidden])) .canvas{
    height:390px;min-height:390px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty::before{
    width:46px;height:46px;margin-bottom:12px;font-size:24px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-title{
    font-size:26px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-description{
    font-size:12px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-actions{
    margin-top:12px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
    padding:14px 12px 12px;gap:7px 9px;
  }
}
@media(prefers-reduced-motion:reduce){
  #app.upscale-studio-active .canvas,
  #app.upscale-studio-active #upscale-info summary::after{transition:none}
}


/* PV Lab reference setup: compact, optional and attached to the working deck. */
#image-composer .reference-intent-toggle[hidden],
#image-composer .composer-reference-intent[hidden],
#image-composer #image-reference-mode-wrap[hidden]{display:none!important}
#image-composer .reference-intent-toggle{letter-spacing:0}
#image-composer .composer-reference-intent{
  position:absolute;left:0;bottom:calc(100% + 12px);z-index:150;
  display:flex;flex-direction:column;gap:12px;box-sizing:border-box;
  width:min(440px,calc(100vw - 40px));max-height:min(72dvh,560px);
  padding:18px;border:1px solid #535250;border-radius:17px;
  background:linear-gradient(145deg,#242525,#191a1b);
  box-shadow:0 22px 88px #000c;color:#f3f1ed;overflow:auto;
  scrollbar-width:thin;scrollbar-color:#66615b transparent;
}
#image-composer .reference-intent-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
#image-composer .reference-intent-heading>div{min-width:0}
#image-composer .reference-intent-kicker{display:block;font-size:9px;font-weight:600;letter-spacing:.14em;color:#a4a49f}
#image-composer .reference-intent-heading strong{display:block;margin:6px 0 5px;font-size:17px;line-height:1.2;font-weight:590;letter-spacing:-.035em;color:#f5f3f0}
#image-composer .reference-intent-heading p{margin:0;color:#a9aaa5;font-size:11px;line-height:1.45}
#image-composer #composer-reference-intent-close{
  flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;
  border:1px solid #454643;border-radius:50%;background:#303130;
  color:#c9cac6;font-size:19px;line-height:1
}
#image-composer #composer-reference-intent-close:hover{background:#424340}
#image-composer .reference-intent-choices{display:grid;grid-template-columns:1fr;gap:7px}
#image-composer .reference-intent-choice{
  display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:4px;
  min-height:0;padding:12px 14px;border:1px solid #454541;border-radius:10px;
  background:#232424;color:#eee;text-align:left;box-shadow:none;
  transition:border-color .16s ease,background .16s ease
}
#image-composer .reference-intent-choice:hover{border-color:#aaa49b;background:#2d2e2c}
#image-composer .reference-intent-choice[aria-pressed="true"]{border-color:#c5a47b;background:#322c26}
#image-composer .reference-intent-number{font-size:9px;font-weight:650;letter-spacing:.12em;color:#afafa9}
#image-composer .reference-intent-choice[aria-pressed="true"] .reference-intent-number{color:#d2b58b}
#image-composer .reference-intent-choice strong{font-size:13px;line-height:1.25;font-weight:620;color:#f3f1ed}
#image-composer .reference-intent-choice small{font-size:11px;line-height:1.45;color:#aaa9a3}
#image-composer .reference-intent-choice:disabled{opacity:.43;cursor:not-allowed}
#image-composer .reference-same-person{
  display:flex;align-items:center;gap:11px;width:100%;min-height:61px;
  padding:10px 13px;border:1px solid #454541;border-radius:10px;
  background:#202122;text-align:left;color:#f3f1ed;
}
#image-composer .reference-same-person:hover:not(:disabled){border-color:#8c8b87;background:#2a2b29}
#image-composer .reference-same-person[aria-pressed="true"]{border-color:#c5a47b;background:#302b25}
#image-composer .reference-same-person:disabled{opacity:.45;cursor:not-allowed}
#image-composer .reference-same-person-mark{font-size:22px;line-height:1;color:#c8c3b9}
#image-composer .reference-same-person strong,
#image-composer .reference-same-person small{display:block}
#image-composer .reference-same-person strong{font-size:12px;font-weight:650}
#image-composer .reference-same-person small{margin-top:4px;color:#a9aaa5;font-size:10px;line-height:1.4}
#image-composer .reference-intent-help{margin:0;color:#a9aaa5;font-size:10.5px;line-height:1.4}
#image-composer .reference-intent-advanced{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 2px;border:0;background:transparent;color:#d8d7d3;text-align:left;font-size:11px;font-weight:600}
#image-composer .reference-intent-advanced:hover{color:#fff;text-decoration:underline;text-underline-offset:3px}
#image-composer .reference-intent-advanced span{font-size:15px}
#image-composer .composer-role-preview{padding-top:8px;border-top:1px solid #454541}
#image-composer .composer-role-preview summary{cursor:pointer;color:#d4d2ce;font-size:11px}
#image-composer .composer-role-preview span{display:block;margin:9px 0 5px;color:#9c9c96;font-size:10px}
#image-composer .composer-role-preview pre{max-height:138px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 9px;padding:10px;background:#141515;border-radius:8px;color:#bbb;font:10px/1.55 ui-monospace,monospace}
#image-composer .composer-role-preview p{color:#efc28b;font-size:11px}
#image-composer .composer-role-preview small{color:#999;font-size:10px;line-height:1.4}
@media(max-width:710px){
  #image-composer .composer-reference-intent{width:calc(100vw - 32px);left:50%;transform:translateX(-50%);padding:15px;max-height:min(65dvh,560px)}
  #image-composer .reference-intent-heading strong{font-size:16px}
}

/* Upscaler gallery V4. Keep the large preview and existing working deck geometry. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #settings-summary{
  display:none!important;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .stagefoot:has(#download[hidden]){
  display:none!important;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .stagefoot{
  justify-content:flex-end;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .upscale-technical-summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:12px 0 9px;padding:9px 11px;border:1px solid #343740;border-radius:8px;
  background:#23252a;color:#b1b5be;font:400 11px/1.4 'DM Sans',sans-serif;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .upscale-technical-summary span:first-child{
  flex:0 0 auto;color:#c1c5ce;font-weight:600;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-technical-summary{
  text-align:right;overflow-wrap:anywhere;color:#d9dae1;
}
/* Loading actual owner thumbnails is visually distinct from missing results. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .history-media[aria-busy="true"]:not(.has-image):not(.is-unavailable)::before{
  background:linear-gradient(108deg,#1a1c20 10%,#2b2e36 46%,#1a1c20 82%);
  background-size:230% 100%;
  animation:pv-upscale-image-shimmer 1.8s ease-in-out infinite;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .history-media[aria-busy="true"]:not(.has-image):not(.is-unavailable)::after{
  width:27px;height:27px;opacity:.23;
}
@keyframes pv-upscale-image-shimmer{
  0%{background-position:100% 0}
  100%{background-position:-105% 0}
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #emptyarchive:not([hidden]){
  display:block;max-width:500px;margin:0 auto;padding:33px 16px 48px;
  text-align:center;color:#a6abb6;font:500 13px/1.6 'DM Sans',sans-serif;
}
/* Refine results header without shifting the workspace or shrinking the canvas. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace{
  margin-bottom:13px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead{
  margin-bottom:9px;gap:12px;min-height:32px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead h2{
  font-size:18px!important;line-height:1.25;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .history-head-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:7px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .history-head-actions button{
  min-height:30px;padding:5px 9px;border-radius:7px;
  color:#b7bac3;font-size:11px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .history-head-actions button:hover{
  color:#f0f1f3;background:#292b32;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info summary{
  min-height:28px;padding:5px 9px;
}
@media(max-width:640px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .upscale-technical-summary{
    flex-direction:column;align-items:flex-start;gap:3px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-technical-summary{
    text-align:left;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive .archivehead h2{
    font-size:17px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #app.upscale-studio-active #history .history-media[aria-busy="true"]:not(.has-image):not(.is-unavailable)::before{
    animation:none;background:#22242a;
  }
}


/* Discreet PV Lab image input notice. Floating outside the deck; controls never shift. */
#image-composer #image-composer-status[hidden]{display:none!important}
#image-composer #image-composer-status.is-import-error{
  position:absolute;right:0;bottom:calc(100% + 12px);z-index:165;
  display:grid;grid-template-columns:21px minmax(0,1fr) 24px;align-items:start;gap:11px;
  box-sizing:border-box;width:min(440px,calc(100vw - 40px));max-width:100%;
  margin:0;padding:15px 16px 14px;
  border:1px solid #505050;border-left:2px solid #b69e7f;border-radius:13px;
  background:linear-gradient(125deg,#232425,#1b1c1d);
  color:#ecebe8;box-shadow:0 18px 55px #000b,inset 0 1px #ffffff09;
  font-family:'DM Sans',sans-serif;text-align:left;font-size:12px;
  font-weight:450;line-height:1.45;overflow-wrap:normal;
}
#image-composer #image-composer-status .import-toast-icon{
  display:grid;place-items:center;width:21px;height:21px;box-sizing:border-box;
  margin-top:2px;border:1px solid #88745d;border-radius:50%;
  background:#cbb08a10;color:#d6bc98;font-size:12px;font-weight:700;
}
#image-composer #image-composer-status .import-toast-copy{
  display:flex;flex-direction:column;align-items:stretch;gap:4px;
  min-width:0;
}
#image-composer #image-composer-status .import-toast-kicker{
  display:block;font-size:9px;font-weight:630;letter-spacing:.12em;color:#989c9b;
}
#image-composer #image-composer-status .import-toast-title{
  display:block;color:#f5f5f2;font-size:15px;font-weight:650;line-height:1.3;
  letter-spacing:-.018em;
}
#image-composer #image-composer-status .import-toast-file{
  display:flex;align-items:center;gap:8px;min-width:0;margin:1px 0 2px;
}
#image-composer #image-composer-status .import-toast-filename{
  display:block;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;color:#ddd9d3;font-size:11px;font-weight:500;
}
#image-composer #image-composer-status .import-toast-measure{
  flex:none;display:inline-flex;align-items:center;padding:3px 6px;
  border:1px solid #55514b;border-radius:5px;background:#ffffff07;
  color:#e4d0b4;font-size:10px;font-weight:600;line-height:1.1;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
#image-composer #image-composer-status .import-toast-detail{
  display:block;margin-top:1px;color:#b5b7b8;font-size:11px;line-height:1.5;
}
#image-composer #image-composer-status .import-toast-limits{
  display:flex;align-items:center;gap:7px 11px;flex-wrap:wrap;
  min-width:0;margin-top:6px;padding-top:9px;
  border-top:1px solid #ffffff18;
}
#image-composer #image-composer-status .import-toast-limit{
  color:#969b9e;font-size:9px;font-weight:640;letter-spacing:.045em;
  line-height:1.3;white-space:nowrap;
}
#image-composer #image-composer-status .import-toast-dismiss{
  width:24px;height:24px;min-height:24px;display:grid;place-items:center;
  padding:0;margin:-5px -6px 0 0;
  border:1px solid transparent;border-radius:6px;background:transparent;
  color:#919495;font-size:19px;line-height:1;
}
#image-composer #image-composer-status .import-toast-dismiss:hover{
  background:#ffffff10;border-color:#ffffff18;color:#f8f8f6;
}
@media(max-width:650px){
  #image-composer #image-composer-status.is-import-error{
    right:0;left:0;width:100%;padding:12px 12px 13px;
    grid-template-columns:19px minmax(0,1fr) 23px;gap:9px;
  }
  #image-composer #image-composer-status .import-toast-title{font-size:14px}
  #image-composer #image-composer-status .import-toast-limit{font-size:8.5px}
}


/* PV Lab mood removal + compact Nano: controls remain on a single row. */
#image-composer .composer-mood-control{position:relative;display:inline-flex;align-items:center;flex:0 1 auto;max-width:165px;min-width:0}
#image-composer .composer-mood-control #image-composer-moods{display:inline-flex;justify-content:flex-start;width:100%;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#image-composer .composer-mood-control #image-composer-moods.is-mood-selected{padding-right:30px}
#image-composer #image-composer-moods-clear{position:absolute;z-index:2;top:50%;right:5px;transform:translateY(-50%);display:grid;place-items:center;width:22px;height:24px;min-height:24px;padding:0;border:0;border-radius:5px;background:transparent;color:#e0f27c;font-size:19px;line-height:1}
#image-composer #image-composer-moods-clear[hidden]{display:none!important}
#image-composer #image-composer-moods-clear:hover:not(:disabled){background:#d6ff0024;color:#fff}
#image-composer #image-composer-moods-clear:focus-visible{outline:2px solid #d6ff00!important;outline-offset:1px}
@media(min-width:1120px) and (max-width:1440px){
 #image-composer.is-gemini .composer-controls{flex-wrap:nowrap!important;gap:5px!important;min-width:0}
 #image-composer.is-gemini .composer-controls>.composer-model-wrap{flex:0 1 141px;min-width:0}
 #image-composer.is-gemini .composer-model-pill{max-width:100%;width:100%;min-width:0;padding-inline:7px;gap:4px}
 #image-composer.is-gemini #image-composer-model-label{max-width:105px;min-width:0;font-size:11px}
 #image-composer.is-gemini .composer-controls>.composer-settings-pill{flex:0 0 auto;padding-inline:6px;font-size:11px;gap:4px}
 #image-composer.is-gemini .composer-mood-control{flex:0 1 126px;max-width:126px}
 #image-composer.is-gemini .composer-mood-control #image-composer-moods{padding-left:7px;font-size:11px;gap:4px}
 #image-composer.is-gemini .composer-controls>.composer-add{flex-basis:37px;width:37px}
 #image-composer.is-gemini .composer-controls>.composer-select-pill{padding-inline:3px;min-width:0}
 #image-composer.is-gemini .composer-controls>.composer-select-pill select{min-width:36px;max-width:83px;padding:6px 15px 6px 4px;font-size:11px}
 #image-composer.is-gemini .composer-controls>.reference-intent-toggle{max-width:98px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* Assets shortcut in the right masthead. Mood Creator is a text tab after Fashion. */
#studio-header .actions>.studio-assets-icon{
  position:relative;display:inline-grid;place-items:center;flex:0 0 40px;
  width:40px;height:40px;min-width:40px;min-height:40px;margin:0;padding:0;
  border:1px solid #51565c;border-radius:10px;
  background:linear-gradient(145deg,#27292d,#1b1d21);
  color:#d9dddf;box-shadow:inset 0 1px rgba(255,255,255,.065);
  text-decoration:none;cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
#studio-header .studio-assets-icon svg{display:block;width:21px;height:21px;flex:none}
#studio-header .studio-assets-icon .studio-assets-spark{opacity:.85;transition:opacity .16s ease}
#studio-header .actions>.studio-assets-icon:hover{
  background:linear-gradient(145deg,#31343a,#25282b);
  border-color:#979da1;color:#f7f8f6;
  box-shadow:inset 0 1px rgba(255,255,255,.09),0 0 0 1px rgba(211,220,210,.04);
  transform:translateY(-1px);
}
#studio-header .studio-assets-icon:hover .studio-assets-spark{opacity:1}
#studio-header .actions>.studio-assets-icon:active{transform:none}
#studio-header .actions>.studio-assets-icon:focus-visible{
  outline:2px solid #d2d9c9;outline-offset:3px;
  border-color:#bfc7b8;
}
/* The icon is silent by default; its label appears only on hover/focus. */
#studio-header .studio-assets-icon::after{
  content:attr(data-tooltip);position:absolute;z-index:150;
  top:calc(100% + 10px);left:50%;
  transform:translate(-50%,-4px);
  padding:7px 10px;border:1px solid #51565c;border-radius:7px;
  background:#222429;color:#edeff0;box-shadow:0 9px 25px #0008;
  font:550 11px/1.2 'DM Sans',Arial,sans-serif;
  white-space:nowrap;pointer-events:none;
  opacity:0;visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s;
}
#studio-header .studio-assets-icon:is(:hover,:focus-visible)::after{
  opacity:1;visibility:visible;transform:translate(-50%,0);
}
/* Like the Image/Video/Fashion tabs, the private studio shortcut is not
   presented while the authenticated workspace is still gated. */
body:has(#app[hidden])>#studio-header .studio-assets-icon{display:none!important}
@media(min-width:900px) and (max-width:1300px){
  #studio-header .tool-switch>.tool-group{gap:clamp(12px,1.35vw,20px)}
  #studio-header .tool-switch>.tool-group>button{font-size:12px}
  body>#studio-header .wrap.top{gap:20px;padding-inline:18px}
  #studio-header .actions{gap:14px;min-width:0}
}
@media(max-width:899px){
  /* A touch tap follows the shortcut immediately. Do not let the desktop
     hover label obscure the second navigation row. Keyboard focus remains. */
  #studio-header .studio-assets-icon::after{
    display:none!important;
  }
  body>#studio-header .tool-switch{
    overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  }
  body>#studio-header .tool-switch::-webkit-scrollbar{display:none}
  #studio-header .tool-switch>.tool-group{
    flex:0 0 auto;width:max-content;min-width:100%;justify-content:flex-start;
    gap:clamp(17px,3vw,25px);
  }
  #studio-header .actions{gap:14px;min-width:0}
}
@media(max-width:480px){
  #studio-header .tool-switch>.tool-group{gap:19px}
  #studio-header .actions{gap:8px;min-width:0}
  #studio-header .actions>.studio-assets-icon{
    width:35px;height:35px;min-width:35px;min-height:35px;flex-basis:35px;
    border-radius:9px;
  }
  #studio-header .studio-assets-icon svg{width:20px;height:20px}
  #studio-header .studio-assets-icon::after{left:auto;right:0;transform:translateY(-4px)}
  #studio-header .studio-assets-icon:is(:hover,:focus-visible)::after{transform:translateY(0)}
}
@media(max-width:360px){
  body>#studio-header .wrap.top{padding-inline:9px;column-gap:6px}
  #studio-header .brand{gap:4px}
  #studio-header .brand-icon{width:21px;height:21px}
  #studio-header .brand-wordmark{width:78px;height:auto}
  #studio-header .brand .brand-lab{display:none}
  #studio-header .actions{gap:7px}
  #studio-header .actions>.studio-assets-icon{
    width:33px;height:33px;min-width:33px;min-height:33px;flex-basis:33px;
  }
  #studio-header .queue-popover>summary{padding-inline:3px}
  #studio-header .account-menu>summary{padding-inline:2px}
}
@media(prefers-reduced-motion:reduce){
  #studio-header .studio-assets-icon,
  #studio-header .studio-assets-icon::after,
  #studio-header .studio-assets-icon .studio-assets-spark{transition:none}
  #studio-header .actions>.studio-assets-icon:hover{transform:none}
}



#studio-header .actions>#tool-assets.studio-assets-icon{display:inline-grid;align-items:center;justify-content:center;min-width:40px;min-height:40px;width:40px;height:40px;padding:0;margin:0;border:1px solid #51565c;border-radius:10px;background:linear-gradient(145deg,#27292d,#1b1d21);color:#d9dddf;box-shadow:inset 0 1px rgba(255,255,255,.065)}
#studio-header .actions>#tool-assets.studio-assets-icon:hover{background:linear-gradient(145deg,#31343a,#25282b);border-color:#979da1;color:#f7f8f6}
#studio-header .actions>#tool-assets.studio-assets-icon[aria-pressed="true"]{border-color:#b2baa8;color:#eff4e8}
@media(max-width:480px){#studio-header .actions>#tool-assets.studio-assets-icon{width:35px;height:35px;min-width:35px;min-height:35px}}
@media(max-width:360px){#studio-header .actions>#tool-assets.studio-assets-icon{width:33px;height:33px;min-width:33px;min-height:33px}}
/* Discover and Create are first-class Studio destinations, not more settings.
   Existing sticky masthead and floating generation deck retain their geometry. */
#studio-header .tool-switch>.tool-group>a.tool-link{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  flex:none;min-width:0;width:auto;height:100%;min-height:44px;
  margin:0;padding:0 1px;color:#c5d0c2;
  font:500 14px/1 'DM Sans',Arial,sans-serif;text-decoration:none;white-space:nowrap;
}
#studio-header .tool-switch>.tool-group>a.tool-link:after{
  content:"";position:absolute;bottom:0;left:0;right:0;height:2px;
  background:#b7d4a9;opacity:0;transition:opacity .16s;
}
#studio-header .tool-switch>.tool-group>a.tool-link:hover{color:#fff}
#studio-header .tool-switch>.tool-group>a.tool-link:hover:after{opacity:1}
#studio-header .tool-switch>.tool-group>a.tool-link:focus-visible{outline:2px solid #d8fa70;outline-offset:-5px}
@media(max-width:1220px){
  #studio-header .tool-switch>.tool-group{gap:clamp(10px,1.5vw,20px)}
  #studio-header .tool-switch>.tool-group>button{font-size:12px}
  #studio-header .tool-switch>.tool-group>a.tool-link{font-size:12px}
  #studio-header .actions{gap:13px}
}
@media(max-width:899px){
  body>#studio-header .tool-switch{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain}
  body>#studio-header .tool-switch::-webkit-scrollbar{display:none}
  #studio-header .tool-switch>.tool-group{width:max-content;min-width:max-content;justify-content:flex-start;gap:22px}
  #studio-header .tool-switch>.tool-group>a.tool-link{font-size:13px}
}
@media(max-width:480px){
  #studio-header .tool-switch>.tool-group{gap:18px}
  #studio-header .tool-switch>.tool-group>a.tool-link{font-size:12px}
}

/* At intermediate laptop widths, navigation scrolls inside its own allotted row.
   The Queue, Account and image composer never move or create page overflow. */
@media(min-width:900px) and (max-width:1250px){
  body>#studio-header .tool-switch{
    overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;
  }
  body>#studio-header .tool-switch::-webkit-scrollbar{display:none}
  #studio-header .tool-switch>.tool-group{width:max-content;min-width:max-content;justify-content:flex-start}
}


/* PV LAB / MOODS: dark idle control with citron lettering.
   Solid citron is reserved for a selected Mood, never for the idle entry. */
#image-composer .composer-mood-control #image-composer-moods{
  min-height:40px;min-width:94px;max-width:100%;
  padding:8px 12px;
  border:1px solid #383a37;border-radius:9px;
  background:#232523;
  color:#d6ff00;
  font-family:inherit;font-size:12px;font-weight:740;letter-spacing:-.015em;
  text-shadow:none;
  box-shadow:none;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
#image-composer .composer-mood-control #image-composer-moods:hover:not(:disabled){
  border-color:#545951;
  background:#2d302c;
  color:#e6ff56;
  box-shadow:none;
  transform:translateY(-1px);
}
#image-composer .composer-mood-control #image-composer-moods:active:not(:disabled){
  transform:translateY(0);
  box-shadow:inset 0 1px 4px rgba(0,0,0,.22);
}
#image-composer .composer-mood-control #image-composer-moods.is-mood-selected{
  border-radius:10px;
  border-color:#cfff19;
  background:linear-gradient(160deg,#e0ff47 0%,#d1f900 100%);
  color:#18220e;
  box-shadow:inset 0 0 0 1px rgba(40,58,0,.2),inset 0 1px rgba(255,255,255,.34);
}
#image-composer .composer-mood-control #image-composer-moods.is-mood-selected:hover:not(:disabled){
  border-color:#eaff80;
  color:#18220e;
  background:linear-gradient(160deg,#efff94 0%,#e0ff28 54%,#cff600 100%);
  box-shadow:inset 0 0 0 1px rgba(40,58,0,.13),0 3px 12px rgba(214,255,0,.14);
}
#image-composer .composer-mood-control #image-composer-moods.is-mood-selected[aria-expanded="true"]{
  box-shadow:inset 0 0 0 1px rgba(40,58,0,.2),0 0 0 2px rgba(214,255,0,.13);
}
#image-composer .composer-mood-control #image-composer-moods:focus-visible{
  outline:2px solid #f8ffdd!important;outline-offset:3px;
}
#image-composer .composer-mood-control #image-composer-moods:disabled{
  opacity:.5;cursor:not-allowed;transform:none;
}
#image-composer .composer-mood-control #image-composer-moods-clear{
  color:#1b2a09;
  background:rgba(28,42,7,.1);
  border-radius:6px;
}
#image-composer .composer-mood-control #image-composer-moods-clear:hover:not(:disabled){
  color:#0e1805;background:rgba(28,42,7,.2);
}
#image-composer .composer-mood-control #image-composer-moods-clear:focus-visible{
  outline:2px solid #16240b!important;outline-offset:2px;
}
@media(max-width:740px){
  #image-composer .composer-mood-control #image-composer-moods{
    min-height:35px;min-width:0;padding:6px 9px;font-size:11px;
  }
}
@media(prefers-reduced-motion:reduce){
  #image-composer .composer-mood-control #image-composer-moods{
    transition:none;
  }
}


/* Mobile Image deck: the primary action occupies its own aligned column,
   instead of wrapping after an unpredictable number of setting chips.
   Preserve PV Soul's separate media composer. */
@media(max-width:650px){
  #image-composer:not(.is-pv-soul) .image-composer-toolbar{
    display:grid;grid-template-columns:minmax(0,1fr) 100px;
    gap:8px;align-items:center;width:100%;min-width:0;
  }
  #image-composer:not(.is-pv-soul) .composer-controls{
    display:flex;flex-wrap:wrap;align-content:center;align-items:center;
    gap:6px;min-width:0;
    grid-column:1;grid-row:1;
  }
  #image-composer:not(.is-pv-soul) .composer-flex{display:none}
  #image-composer:not(.is-pv-soul) .composer-generate{
    grid-column:2;grid-row:1;align-self:center;
    box-sizing:border-box;width:100%;min-width:0;
    height:82px;min-height:82px;max-height:82px;
    padding:9px 8px;font-size:13px;
  }
  #image-composer:not(.is-pv-soul) .composer-controls>.composer-select-pill{
    padding-inline:3px;
  }
  #image-composer:not(.is-pv-soul) .composer-controls>.composer-select-pill select{
    min-width:0;max-width:93px;padding-left:5px;padding-right:15px;
    font-size:11px;
  }
}
@media(max-width:360px){
  #image-composer:not(.is-pv-soul) .image-composer-toolbar{
    grid-template-columns:minmax(0,1fr) 90px;gap:6px;
  }
  #image-composer:not(.is-pv-soul) .composer-controls{gap:5px}
  #image-composer:not(.is-pv-soul) .composer-generate{
    height:78px;min-height:78px;max-height:78px;font-size:12px;
  }
}

/* Image gallery: full-resolution download appears on hover, focus, or touch. */
#app #history .history-hover-download{
  position:absolute;top:49px;right:9px;z-index:13;
  display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;
  border:1px solid #ffffff46;border-radius:50%;background:#151719d9;color:#f3f2ed;
  backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);
  opacity:0;transform:translateY(-4px);pointer-events:none;cursor:pointer;
  transition:opacity .16s ease,transform .16s ease,background .16s ease;
}
#app #history .history-hover-download svg{display:block;width:19px;height:19px}
#app #history .card:hover .history-hover-download,
#app #history .card:focus-within .history-hover-download,
#app #history .history-hover-download:focus-visible{
  opacity:1;transform:translateY(0);pointer-events:auto;
}
#app #history .history-hover-download:hover{background:#393c3e}
#app #history .history-hover-download:focus-visible{outline:2px solid #f0eee8;outline-offset:2px}
#app #history.is-selecting .history-hover-download{display:none!important}
@media(hover:none){
  #app #history .history-hover-download{opacity:1;transform:none;pointer-events:auto;width:42px;height:42px;min-width:42px;min-height:42px}
}
@media(prefers-reduced-motion:reduce){#app #history .history-hover-download{transition:none}}

/* Natural, photo-first Image deck dimensions: keep the original compact
   idle composer, adding the reference row only when photos are attached. */
/* Preserved images never appear while a text-only engine is selected. */
#image-composer.is-text-only .image-composer-references{display:none!important}


/* Upscaler: keep the tool name neutral and put the real engine in the model control.
   Scope these refinements to the Upscaler, without changing other creative tools. */
#app .upscale-model-display,
#app .upscale-empty-kicker,
#app .upscale-drop-hint{display:none}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace{
  max-width:1160px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace .canvas{
  border:1px solid #33353b;
  border-radius:11px;
  background:linear-gradient(160deg,#151619 0%,#111216 100%);
  box-shadow:inset 0 1px 0 #ffffff08;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace .canvas:hover{
  border-color:#575961;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty::before{display:none}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty .upscale-empty-kicker{
  display:block;margin:0 0 22px;
  color:#8f949d;font:600 10px/1.4 'DM Sans',sans-serif;
  letter-spacing:.16em;text-transform:uppercase;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-title{
  margin:0 0 14px;font:600 clamp(32px,3.1vw,40px)/1.12 'DM Sans',sans-serif;
  letter-spacing:-.052em;color:#f2f1f0;text-transform:none;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-description{
  max-width:330px;color:#a6a8ae;
  font:400 13px/1.65 'DM Sans',sans-serif;letter-spacing:0;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-actions{margin-top:25px}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #canvas-import{
  min-height:45px;padding:11px 23px;border:1px solid #dedfdf;border-radius:7px;
  background:#e7e7e5;color:#151619;box-shadow:none;
  font:600 12px/1.25 'DM Sans',sans-serif;letter-spacing:.005em;
  transition:background .15s,border-color .15s;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #canvas-import:hover{
  background:#fff;border-color:#fff;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty .upscale-drop-hint{
  display:block;margin-top:16px;color:#747984;
  font:500 9px/1.5 'DM Sans',sans-serif;letter-spacing:.085em;text-transform:uppercase;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
  grid-template-columns:minmax(210px,1.45fr) minmax(145px,.83fr) minmax(110px,.7fr) minmax(165px,.9fr);
  align-items:end;column-gap:12px;row-gap:4px;
  padding:17px 17px 12px;
  border:1px solid #32343a;border-radius:11px;
  background:#191a1e;box-shadow:inset 0 1px 0 #ffffff06;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-display{
  order:0;grid-column:1;min-width:0;
  display:flex;flex-direction:column;gap:4px;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-display .label{margin:0}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .upscale-model-readout{
  min-height:46px;display:flex;align-items:center;gap:12px;
  padding:0 14px;min-width:0;border:1px solid #31343a;border-radius:7px;
  background:#202126;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .upscale-model-brand{
  color:#ececf0;font:600 13px/1.2 'DM Sans',sans-serif;
  letter-spacing:-.01em;white-space:nowrap;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .upscale-model-id{
  margin-left:auto;color:#a6aab2;font:500 12px/1.2 'DM Sans',sans-serif;
  white-space:nowrap;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body>.parameter-grid{grid-column:2}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control{grid-column:3}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate{
  grid-column:4;min-height:46px;height:46px;max-height:46px;
  border-radius:7px;font-size:13px;font-weight:650;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls .label{
  color:#a6a9b2;font-size:10px;font-weight:600;letter-spacing:.045em;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body .parameter-grid>label,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control>label{position:relative}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body .parameter-grid>label::after,
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control>label::after{
  content:'';position:absolute;right:17px;bottom:19px;pointer-events:none;
  width:6px;height:6px;border-right:1.5px solid #babcc1;border-bottom:1.5px solid #babcc1;
  transform:rotate(45deg);
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls select{
  appearance:none;-webkit-appearance:none;
  height:46px;min-height:46px;padding:0 34px 0 14px;
  border-radius:7px;border-color:#34373f;background:#202126;
  color:#edeef0;font-size:12px;font-weight:550;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate:not(:disabled){
  background:#e4e4e2;color:#171819;border-color:#e4e4e2;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate:not(:disabled):hover{
  background:#fff;border-color:#fff;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-info summary{color:#999ea7}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.archive{max-width:1160px}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #history .card{
  border:1px solid #303238;border-radius:8px;
}
@media(max-width:940px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 12px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-display{grid-column:1}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body>.parameter-grid{grid-column:2}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control{grid-column:1}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate{grid-column:2}
}
@media(max-width:640px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active)>.workspace>.controls{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:14px 12px 12px;gap:9px;
  }
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-display{grid-column:1/-1}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .controls-body>.parameter-grid{grid-column:1}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #format-control{grid-column:2}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #generate{grid-column:1/-1}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty .upscale-empty-kicker{margin-bottom:16px}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-title{font-size:31px}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty-description{max-width:295px;font-size:12px}
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .empty .upscale-drop-hint{font-size:8px;max-width:300px}
}
@media(prefers-reduced-motion:reduce){#app.upscale-studio-active #canvas-import{transition:none}}

/* Real interactive Upscaler models: ByteDance Premium, Topaz Precision and Wonder. */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-display{position:relative;z-index:20}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-trigger{
  box-sizing:border-box;width:100%;margin:0;cursor:pointer;text-align:left;
  font-family:'DM Sans',sans-serif;transition:border-color .15s,background .15s
}
#app.upscale-studio-active #upscale-model-trigger:disabled{cursor:default;opacity:.6}
#app.upscale-studio-active #upscale-model-trigger:hover:not(:disabled),
#app.upscale-studio-active #upscale-model-trigger[aria-expanded="true"]{border-color:#626773;background:#292b31}
#app.upscale-studio-active .upscale-model-chevron{
  flex:none;width:16px;height:16px;margin-left:1px;fill:none;stroke:#a6a8b0;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s
}
#app.upscale-studio-active #upscale-model-trigger[aria-expanded="true"] .upscale-model-chevron{transform:rotate(180deg)}
#app #upscale-model-menu[hidden]{display:none!important}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-menu{
  position:absolute;z-index:140;top:calc(100% + 8px);left:0;box-sizing:border-box;
  width:100%;min-width:min(330px,calc(100vw - 34px));max-width:calc(100vw - 34px);
  display:flex;flex-direction:column;gap:3px;padding:6px;
  border:1px solid #494b55;border-radius:10px;background:#202126;
  box-shadow:0 18px 48px #000b,inset 0 1px #ffffff10
}
#app.upscale-studio-active .upscale-model-option{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:62px;width:100%;min-width:0;padding:11px 12px;
  text-align:left;border:1px solid transparent;border-radius:7px;
  background:transparent;color:#f0f0f2;cursor:pointer;font-family:'DM Sans',sans-serif
}
#app.upscale-studio-active .upscale-model-option>span:first-child{display:flex;flex-direction:column;gap:5px;min-width:0}
#app.upscale-studio-active .upscale-model-option strong{font:600 12px/1.2 'DM Sans',sans-serif}
#app.upscale-studio-active .upscale-model-option small{font:400 10px/1.35 'DM Sans',sans-serif;color:#a3a7af}
#app.upscale-studio-active .upscale-model-option[aria-checked="true"]{background:#2b2d34;border-color:#454850}
#app.upscale-studio-active .upscale-model-option:hover{background:#32343b;border-color:#4c505b}
#app.upscale-studio-active #upscale-model-trigger:focus-visible,
#app.upscale-studio-active .upscale-model-option:focus-visible{outline:2px solid #e0e1e4;outline-offset:2px}
#app.upscale-studio-active .upscale-model-selected{visibility:hidden;flex:none;font-size:15px;color:#f0f1f2}
#app.upscale-studio-active .upscale-model-option[aria-checked="true"] .upscale-model-selected{visibility:visible}
#app.upscale-studio-active #upscale-topaz-control[hidden]{display:none!important}
#app.upscale-studio-active #upscale-info #upscale-topaz-control:not([hidden]){
  display:flex;flex-direction:column;gap:6px;max-width:250px;margin:10px 0 12px
}
#app.upscale-studio-active #upscale-info #upscale-topaz-model{width:100%}
@media(max-width:640px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-model-menu{
    min-width:0;max-width:100%
  }
}
@media(prefers-reduced-motion:reduce){
  #app.upscale-studio-active .upscale-model-chevron,
  #app.upscale-studio-active #upscale-model-trigger{transition:none}
}
