/* Loaded-image correction only. The approved empty Upscaler hero, model
   choices and paid workflow are untouched. 2026-10-27 */
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) .pv-upscale-workspace-intro{
  order:-6!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body>.pv-upscale-source-control{
  order:-5!important;
  grid-column:1/-1!important;
  display:flex!important;
  gap:5px!important;
  margin:0 0 5px!important;
  padding:0!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) #pv-upscale-source-upload{
  min-height:50px!important;
  max-height:none!important;
  padding:7px 10px!important;
  gap:9px!important;
  border:1px solid #303235!important;
  border-radius:8px!important;
  background:#141618!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) #pv-upscale-source-upload .pv-upscale-source-icon{
  display:grid!important;
  place-items:center!important;
  flex:none!important;
  width:32px!important;
  height:32px!important;
  overflow:hidden!important;
  border:1px solid #555a61!important;
  border-radius:6px!important;
  background:#141518!important;
}
#app.upscale-studio-active #pv-upscale-source-thumb:not([hidden]){
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:5px!important;
}
#app.upscale-studio-active #pv-upscale-source-upload .pv-upscale-source-icon:has(#pv-upscale-source-thumb:not([hidden])) svg{
  display:none!important;
}
#app.upscale-studio-active #pv-upscale-source-upload .pv-upscale-source-copy{
  min-width:0!important;
  flex:1!important;
}
#app.upscale-studio-active #pv-upscale-source-filename{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  max-width:100%!important;
  color:#a7a8ac!important;
}
#app.upscale-studio-active.pv-upscale-source-ready #pv-upscale-source-state{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  padding:0!important;
  margin:-1px!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
}
/* Restore the same generous full-width photographic stage used by the empty
   deck. Previous V5 loaded override capped it at 620px and was later in the
   stylesheet cascade than the earlier containment fix. */
@media(min-width:781px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-canvas:has(> #preview:not([hidden])){
    height:clamp(680px,calc(100dvh - 104px),980px)!important;
    min-height:680px!important;
    max-height:980px!important;
    overflow:hidden!important;
    background:#09090b!important;
  }
}
@media(max-width:780px){
  #app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-canvas:has(> #preview:not([hidden])){
    height:clamp(360px,72dvh,740px)!important;
    min-height:360px!important;
    max-height:740px!important;
    overflow:hidden!important;
    background:#09090b!important;
  }
}

/* Consistent Image controls before and after choosing a photo, using the Video deck's
   matte fields, consistent corner radius and adjacent output selectors. */
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active)>.workspace>.controls>.controls-body{
  gap:8px!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .pv-upscale-workspace-intro{
  margin:0!important;
  padding:0 0 8px!important;
}
#app.upscale-studio-active:not(.video-upscale-active) .pv-upscale-workspace-intro :is(.pv-upscale-kicker,p){
  display:none!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .pv-upscale-workspace-intro h2{
  font-size:26px!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .pv-upscale-model-card{
  grid-template-columns:28px minmax(0,1fr) 16px!important;
  min-height:46px!important;
  padding:7px 9px!important;
  border-radius:8px!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .pv-upscale-model-card[aria-checked="false"]:not(:hover){
  background:#141618!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .pv-upscale-model-art{
  width:28px!important;
  height:28px!important;
}
#app.upscale-studio-active:not(.video-upscale-active) .pv-upscale-precision-options{
  gap:5px;
  padding:0 9px 8px;
}
#app.upscale-studio-active:not(.video-upscale-active) .pv-upscale-version-pills{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
#app.upscale-studio-active:not(.video-upscale-active) .pv-upscale-version-pill{
  padding:5px 6px;
  border-radius:8px;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body>.parameter-grid{
  grid-column:1!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body>#format-control{
  grid-column:2!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body :is(#upscale-scale-control,#format-control):not([hidden]){
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body :is(#upscale-scale-control,#format-control)>.label{
  flex:none!important;
  margin:0!important;
}
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body :is(#upscale-scale,#output-format){
  flex:none!important;
  width:100%!important;
  max-width:none!important;
  height:38px!important;
  min-height:38px!important;
  border-radius:8px!important;
  border-color:#303235!important;
  background-color:#141618!important;
}
#app.upscale-studio-active:not(.assets-active):not(.fashion-studio-active) #upscale-canvas:has(> #preview:not([hidden])) > img#preview:not([hidden]){
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
}
/* The loaded Video frame previously generated a second "Replace image" label
   via ::after while still showing "Choose image". Keep one actual label. */
#app.video-studio-active.pv-video-state-ready.pv-video-mode-start #drop.has-frame .video-frame-label::after,
#app.video-studio-active.pv-video-state-ready.pv-video-mode-start #last-drop.has-frame .video-frame-label::after{
  content:none!important;
  display:none!important;
}
#app.video-studio-active.pv-video-state-ready.pv-video-mode-start #drop.has-frame .video-frame-label,
#app.video-studio-active.pv-video-state-ready.pv-video-mode-start #last-drop.has-frame .video-frame-label{
  font-size:10px!important;
  line-height:1.2!important;
}

/* One source slot and one compact inspector in both Image states.
   Natural page scroll keeps every setting reachable in short windows. */
#app.upscale-studio-active:not(.video-upscale-active):not(.assets-active):not(.fashion-studio-active) .controls-body>.pv-upscale-source-control{
  order:-5!important;grid-column:1/-1!important;display:flex!important;
  gap:5px!important;margin:0 0 5px!important;padding:0!important;
}
#app.upscale-studio-active:not(.video-upscale-active) #pv-upscale-source-state{display:none!important}
