/* Creation workspace layout; the original site palette and components stay in use. */
.studio-heading{gap:20px;align-items:flex-start;margin-bottom:24px}
.studio-heading p{max-width:620px}
.studio-progress{display:flex;gap:24px;flex-wrap:wrap;margin-bottom:22px;font-size:13px;color:var(--muted)}
.workspace.studio-workspace{--studio-preview-height:430px;display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr);gap:24px;align-items:start}
.studio-workspace .studio-input-column,.studio-workspace .studio-preview-column{min-width:0}
.studio-workspace .panel{padding:22px;margin-bottom:20px}
.studio-workspace .paneltitle{gap:12px;margin-bottom:16px}
.studio-workspace .paneltitle h2{font-size:18px}
.studio-workspace .paneltitle button{flex-shrink:0}
.studio-workspace .note{font-size:13px;line-height:1.7}
.studio-workspace .gown-upload-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(100px,1fr);gap:12px;align-items:stretch}
.studio-workspace .gown-main-slot,.studio-workspace .gown-detail-slot{min-width:0}
.studio-workspace .gown-main-slot{display:flex;flex-direction:column}
.studio-workspace .gown-main-slot .upload{min-height:266px;height:auto;flex:1;padding:14px;text-align:center}
.studio-workspace .gown-main-slot .upload img{width:100%;height:100%;object-fit:contain;display:block}
.studio-workspace .gown-main-slot .upload:has(img){padding:7px}
.studio-workspace .gown-main-slot .upload:has(img)>img{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px)}
.studio-workspace .upload .muted{font-size:13px}
.studio-workspace .upload input,.studio-workspace .detail input{position:absolute;inset:0;width:100%;height:100%;margin:0}
.studio-workspace .gown-detail-list{display:grid;gap:9px}
.studio-workspace .gown-detail-slot .detail{display:flex;align-items:center;justify-content:center;width:100%;height:auto;aspect-ratio:4/3;padding:0;background:#fbfaf8;cursor:pointer}
.studio-workspace .gown-detail-slot .detail img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.studio-workspace .image-slot-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:24px;margin-top:4px;font-size:12px;color:var(--muted)}
.studio-workspace .image-slot-meta>span:first-child{white-space:nowrap}
.studio-workspace .image-slot-meta>div{display:flex;align-items:center;gap:2px;flex-wrap:wrap;justify-content:flex-end}
.studio-workspace .image-slot-meta button{padding:2px 4px;font-size:12px;line-height:1.5;min-height:24px;background:transparent;border-color:transparent;color:var(--accent)}
.studio-workspace .image-slot-meta button:hover{background:#f6f0eb;border-color:var(--line)}
.studio-workspace .studio-settings .subheading:first-child{margin-top:0}
.studio-workspace .subheading{gap:10px;margin:20px 0 10px}
.studio-workspace .subheading h3{font-size:15px}
.studio-workspace .subheading .muted{font-size:12px;text-align:right}
.studio-workspace .choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.studio-workspace .choice{border-width:1px;border-color:var(--line)}
.studio-workspace .choice.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.studio-workspace .choice .caption{padding:9px 8px;font-size:13px;line-height:1.45}
.studio-workspace .choice .caption small{margin-top:4px;font-size:12px;line-height:1.5}
.studio-workspace .model-choices .choice img{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:contain;object-position:center;background:#eeeae5}
.studio-workspace .scene-choices .choice img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;object-position:center}
.studio-workspace .ratio-options{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.studio-workspace .ratio-option{padding:9px 2px;min-height:40px;justify-content:center}
.studio-workspace .ratio-option strong{font-size:13px;font-weight:500;white-space:nowrap}
.studio-workspace .ratio-option .ratio-icon-wrap,.studio-workspace .ratio-option small{display:none}
.studio-workspace .preview-tools{display:flex;align-items:center;gap:6px;margin:0 0 14px;flex-wrap:wrap}
.studio-workspace .preview-tools button{padding:7px 10px;font-size:13px;line-height:1.5}
.studio-workspace .preview-tools button.active{background:#eee7e0;color:#79533e;border-color:#c8b4a5}
.studio-workspace .preview-tools button:last-child{margin-left:auto}
.studio-workspace .studio-preview-panel{padding:20px}
.studio-workspace .studio-preview-panel .paneltitle{margin-bottom:12px}
.studio-workspace .studio-preview-panel .preview-tools{margin-bottom:10px}
.studio-workspace .image-stage{position:relative;width:100%;min-height:0;border:1px solid var(--line);background:#f3f0ec;overflow:hidden;margin:0 auto;border-radius:7px}
.studio-workspace .image-stage.full-view{display:flex;align-items:center;justify-content:center;aspect-ratio:auto;height:var(--studio-preview-height);max-height:none;padding:12px}
.studio-workspace .image-stage.full-view>img{position:static;inset:auto;display:block;width:auto;height:auto;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center}
.studio-workspace .image-stage.output-view{width:min(100%,calc(var(--studio-preview-height) * var(--image-ratio)));aspect-ratio:var(--image-ratio);height:auto;max-height:var(--studio-preview-height);padding:0;border:0}
.studio-workspace .image-stage.output-view>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;object-position:center}
.studio-workspace .image-stage .progress{padding:20px;text-align:center}
.studio-workspace .image-stage .progress h2{font-size:19px;margin:0}
.studio-workspace .image-stage .progress span{font-size:13px}
.studio-workspace .preview-meta{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;padding-top:12px}
.studio-workspace .preview-meta h3{font-size:16px;margin:0 0 3px}
.studio-workspace .preview-meta p{font-size:13px;color:var(--muted);margin:2px 0}
.studio-workspace .preview-meta>.tag{flex-shrink:0}
.studio-workspace .studio-preview-panel>.note{padding-top:9px;border-top:1px solid var(--line);margin-top:9px;font-size:12px;line-height:1.6}
.studio-workspace .studio-generation{padding:16px 20px}
.studio-workspace .studio-generation .selection-summary{display:flex;flex-wrap:wrap;gap:7px 14px;font-size:13px;color:var(--muted);line-height:1.7}
.studio-workspace .studio-generation .generate{gap:16px;margin-top:10px;padding-top:10px;align-items:center}
.studio-workspace .studio-generation .generate>div{min-width:0}
.studio-workspace .studio-generation .generate strong{font-size:23px}
.studio-workspace .studio-generation .generate button{min-width:0;flex:1;max-width:250px;padding:13px 16px;white-space:nowrap}
.studio-workspace .studio-generation .note{margin-top:8px;font-size:12px}
.studio-workspace .studio-generation .demo-options{border-top:1px solid var(--line);margin-top:10px;padding-top:8px;font-size:12px;color:var(--muted)}
.studio-workspace .studio-generation .demo-options summary{cursor:pointer;width:fit-content}
.studio-workspace .studio-generation .demo-options label{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:13px}
.studio-workspace button:focus-visible,.studio-workspace summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.studio-workspace .upload:focus-within,.studio-workspace .detail:focus-within{outline:2px solid var(--accent);outline-offset:3px}
@media(min-width:1450px){
  .workspace.studio-workspace{--studio-preview-height:500px;gap:28px;grid-template-columns:minmax(0,1fr) minmax(0,1.22fr)}
  .studio-workspace .panel{padding:26px}
  .studio-workspace .gown-main-slot .upload{min-height:296px}
}
@media(min-width:1101px) and (min-height:1250px){
  .studio-workspace .studio-preview-column{position:sticky;top:24px}
}
@media(max-width:1150px) and (min-width:1001px){
  .workspace.studio-workspace{gap:18px;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
  .studio-workspace .panel{padding:18px}
  .studio-workspace .gown-upload-grid{grid-template-columns:minmax(0,1fr)}
  .studio-workspace .gown-main-slot .upload{height:200px;min-height:200px;flex:auto}
  .studio-workspace .gown-detail-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .studio-workspace .image-slot-meta{flex-wrap:wrap}
}

/* Enlarged studio images use the same restrained dialog treatment. */
dialog.image-dialog{width:min(980px,90vw);max-width:90vw;max-height:90vh;padding:22px;overflow:auto}
dialog.image-dialog .paneltitle{gap:16px;align-items:center;margin-bottom:14px}
dialog.image-dialog .paneltitle h2{margin:0;font-size:20px}
dialog.image-dialog .image-lightbox{display:flex;align-items:center;justify-content:center;width:100%;height:min(70vh,760px);min-height:220px;background:#f3f0ec;border:1px solid var(--line);border-radius:7px;overflow:hidden;padding:12px;margin:0 auto}
dialog.image-dialog .image-lightbox img{display:block;width:auto;height:auto;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain}
dialog.image-dialog .image-lightbox.output-view{position:relative;width:min(100%,calc(70vh * var(--image-ratio)));height:auto;min-height:0;max-height:70vh;aspect-ratio:var(--image-ratio);padding:0;border:0}
dialog.image-dialog .image-lightbox.output-view img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;object-position:center}
dialog.image-dialog .note{font-size:13px;line-height:1.6}
dialog.image-dialog button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:650px){
  dialog.image-dialog{width:94vw;max-width:94vw;padding:16px}
  dialog.image-dialog .image-lightbox{height:65vh;padding:8px}
  dialog.image-dialog .image-lightbox.output-view{height:auto;max-height:65vh;width:min(100%,calc(65vh * var(--image-ratio)))}
}
@media(max-width:1000px){
  .workspace.studio-workspace{--studio-preview-height:560px;display:grid;grid-template-columns:minmax(0,1fr);gap:0}
  .studio-workspace .studio-preview-column{position:static}
  .studio-workspace .gown-upload-grid{grid-template-columns:minmax(0,2fr) minmax(120px,1fr)}
  .studio-workspace .choices{gap:12px}
  .studio-workspace .model-choices .choice img{max-height:230px}
  .studio-workspace .scene-choices .choice img{max-height:145px}
  .studio-workspace .studio-generation .generate button{max-width:320px}
}
@media(max-width:650px){
  .workspace.studio-workspace{--studio-preview-height:480px}
  .studio-heading{margin-bottom:20px;gap:10px}
  .studio-progress{gap:10px 18px;font-size:12px;margin-bottom:18px}
  .studio-workspace .panel{padding:18px;margin-bottom:16px}
  .studio-workspace .gown-upload-grid{grid-template-columns:minmax(0,1fr)}
  .studio-workspace .gown-main-slot .upload{height:240px;min-height:240px;flex:auto}
  .studio-workspace .gown-detail-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
  .studio-workspace .image-slot-meta{gap:2px;flex-wrap:wrap;font-size:12px;align-content:start}
  .studio-workspace .image-slot-meta>div{justify-content:flex-start}
  .studio-workspace .choices{gap:8px}
  .studio-workspace .choice .caption{padding:8px 6px;font-size:13px}
  .studio-workspace .choice .caption small{font-size:12px}
  .studio-workspace .choice.selected:after{top:5px;right:5px;width:18px;height:18px;line-height:18px}
  .studio-workspace .ratio-options{gap:5px}
  .studio-workspace .image-stage.full-view{padding:8px}
  .studio-workspace .preview-tools button{padding:7px 9px}
  .studio-workspace .studio-generation .generate{flex-wrap:wrap;gap:12px}
  .studio-workspace .studio-generation .generate>div{flex:1}
  .studio-workspace .studio-generation .generate button{flex-basis:100%;max-width:none;min-height:48px}
}
@media(max-width:380px){
  .workspace.studio-workspace{--studio-preview-height:420px}
  .studio-workspace .panel{padding:14px}
  .studio-workspace .ratio-options{grid-template-columns:repeat(3,minmax(0,1fr))}
  .studio-workspace .preview-tools button{font-size:12px;padding:7px}
}
