/* Equal work areas fill the desktop viewport; controls keep a readable size. */
html body.studio-secondary-image .image-app {width:100%;max-width:none;padding:14px 16px;display:flex;flex-direction:column;gap:0}
html body.studio-secondary-image .image-topbar {padding:14px 18px;gap:16px;flex:none}
html body.studio-secondary-image .image-topbar h1 {font-size:26px}
html body.studio-secondary-image .image-layout {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px;align-items:stretch}
html body.studio-secondary-image .image-layout>.panel {padding:18px;min-width:0}
html body.studio-secondary-image .panel-heading {margin-bottom:12px;min-height:30px;flex:none}
html body.studio-secondary-image .panel-heading h2 {font-size:18px}
html body.studio-secondary-image .field {gap:7px;min-width:0;font-size:14px;flex-shrink:0}
html body.studio-secondary-image .prompt-field {margin-bottom:12px}
html body.studio-secondary-image .prompt-field textarea {padding:12px 14px 26px;line-height:1.65;font-size:15px}
html body.studio-secondary-image .reference-field {margin-bottom:12px}
html body.studio-secondary-image .reference-field>span {font-size:14px}
html body.studio-secondary-image .reference-picker {padding:10px 12px;gap:12px}
html body.studio-secondary-image .reference-picker img {width:64px;height:64px}
html body.studio-secondary-image .reference-actions :is(label.button,button) {min-height:38px;padding:7px 12px;font-size:14px}
html body.studio-secondary-image .reference-field small {font-size:12px;line-height:1.5}
html body.studio-secondary-image .controls-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px;flex:none}
html body.studio-secondary-image .controls-grid>.field {grid-column:auto!important}
html body.studio-secondary-image .controls-grid select {min-width:0;height:44px;padding:0 10px;font-size:14px}
html body.studio-secondary-image #imageResolutionHint {margin:5px 0 0;font-size:12px;line-height:1.5;flex:none}
html body.studio-secondary-image .cost-note {margin:10px 0 8px;line-height:1.5;font-size:12px;flex:none}
html body.studio-secondary-image .generate-button {height:46px;min-height:46px;font-size:15px;flex:none}
html body.studio-secondary-image #imageStatus {margin-top:7px;min-height:18px;overflow-wrap:anywhere;flex:none}
.image-batch-disclosure {border:1px solid var(--studio-line-strong);border-radius:10px;background:var(--studio-inset);flex:none}
.image-batch-disclosure>summary {padding:10px 12px;font-size:13px;font-weight:650;cursor:pointer;color:var(--studio-text)}
.image-batch-disclosure>summary small {margin-left:6px;font-size:12px;font-weight:400;color:var(--studio-muted)}
.image-batch-disclosure>summary:focus-visible {outline:2px solid var(--studio-accent);outline-offset:2px;border-radius:8px}
.image-batch-disclosure>.batch-field {padding:0 12px 12px}
@media(min-width:901px) {
  html body.studio-secondary-image .image-app {height:100dvh;min-height:0}
  html body.studio-secondary-image .image-layout {flex:1;min-height:0}
  html body.studio-secondary-image .image-layout>.panel {height:100%;min-height:0;overflow:auto}
  html body.studio-secondary-image .generator-panel>.prompt-field {flex:1;min-height:150px}
  html body.studio-secondary-image .prompt-field textarea {flex:1;height:0;min-height:118px}
  html body.studio-secondary-image .results-panel #imageResults {flex:1;min-height:0;overflow:auto;align-content:start}
  html body.studio-secondary-image .results-panel #imageResults.empty {align-content:center}
}
@media(min-width:901px) and (max-height:760px) {
  html body.studio-secondary-image .image-app {padding:10px 12px}
  html body.studio-secondary-image .image-topbar {padding:10px 16px}
  html body.studio-secondary-image .image-layout {margin-top:10px;gap:12px}
  html body.studio-secondary-image .image-layout>.panel {padding:12px}
  html body.studio-secondary-image .panel-heading {margin-bottom:6px}
  html body.studio-secondary-image .generator-panel .field {gap:5px}
  html body.studio-secondary-image .reference-field {margin-bottom:6px}
  html body.studio-secondary-image .reference-picker {padding:6px 10px}
  html body.studio-secondary-image .generator-panel>.prompt-field {min-height:122px;margin-bottom:8px}
  html body.studio-secondary-image .prompt-field textarea {min-height:94px}
  html body.studio-secondary-image .controls-grid {margin-top:8px}
  html body.studio-secondary-image .controls-grid select {height:40px}
  html body.studio-secondary-image .cost-note {margin:6px 0}
  html body.studio-secondary-image .generate-button {height:42px;min-height:42px}
  html body.studio-secondary-image #imageStatus {margin-top:5px}
  html body.studio-secondary-image .image-batch-disclosure>summary {padding-block:8px}
}
@media(max-width:900px) {
  html body.studio-secondary-image .image-layout {grid-template-columns:minmax(0,1fr)}
  html body.studio-secondary-image .prompt-field textarea {height:180px;min-height:140px}
  html body.studio-secondary-image .results-panel {min-height:340px}
}
@media(max-width:560px) {
  html body.studio-secondary-image .image-app {padding:10px}
  html body.studio-secondary-image .image-layout>.panel {padding:14px}
  html body.studio-secondary-image .controls-grid {gap:7px}
  html body.studio-secondary-image .controls-grid select {font-size:12px;padding:0 5px}
}
