/* Image studios: scoped presentation layer; original business controls stay in place. */
html.lg-shell #app-view .studio-workspace {
  --is-bg:#f5f6f8;--is-panel:#fff;--is-inspector:#fbfbfd;--is-text:#252a32;
  --is-secondary:#687180;--is-line:#e0e3e9;--is-soft:#eceef2;--is-blue:#0069df;--is-tint:#eaf2ff;
  display:flex;flex-direction:column;min-width:0;min-height:0;padding:0!important;gap:0!important;overflow:hidden!important;
  background:var(--is-bg)!important;color:var(--is-text);position:relative;
}
html.lg-shell.lg-dark #app-view .studio-workspace {
  --is-bg:#1e2229;--is-panel:#292e37;--is-inspector:#252a32;--is-text:#edf0f6;
  --is-secondary:#a6aebb;--is-line:#3b424e;--is-soft:#323944;--is-blue:#86baff;--is-tint:#283f5f;
}
html.lg-shell #app-view .studio-workspace.hidden {display:none!important}
html.lg-shell #app-view .studio-header {
  display:flex;align-items:center;gap:14px;flex:0 0 auto;padding:20px 26px!important;
  min-height:88px;border:0;border-bottom:1px solid var(--is-line);background:var(--is-bg)!important;
}
.studio-workspace .studio-symbol {display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;color:#1674dc;background:linear-gradient(145deg,#f5faff,#dcecff);box-shadow:inset 0 1px 0 #fff,0 2px 6px #3265ab12}
.studio-workspace .studio-symbol svg {width:25px;height:25px}
html.lg-dark .studio-workspace .studio-symbol {background:linear-gradient(145deg,#3b5472,#2a3d57);color:#a4ccff;box-shadow:inset 0 1px 0 #b4d2ff26}
.studio-workspace .studio-heading {flex:1;min-width:0}
html.lg-shell #app-view .studio-heading h2 {font-size:22px;line-height:1.25;font-weight:650;letter-spacing:-.6px;margin:0 0 5px;color:var(--is-text)}
html.lg-shell #app-view .studio-heading p {font-size:11px;line-height:1.65;margin:0;color:var(--is-secondary);max-width:620px}
.studio-workspace .batch-eyebrow,.studio-workspace .batch-step {display:none!important}
.studio-workspace .studio-body {display:grid;grid-template-columns:minmax(0,1fr) 292px;flex:1 1 0;min-height:0;min-width:0;overflow:hidden}
html.lg-shell #app-view .studio-workspace .studio-body > * {grid-row:1;grid-column:auto;}
html.lg-shell #app-view .studio-workspace .studio-canvas {padding:22px 24px!important;overflow:auto;min-width:0;min-height:0;background:transparent;gap:22px;align-content:start;display:flex;flex-direction:column;scrollbar-width:thin}
html.lg-shell #app-view .studio-workspace :is(.studio-inspector,.studio-composer) {margin:0!important;width:auto;max-width:none;min-width:0;min-height:0;padding:22px 20px!important;overflow:auto;border:0;border-left:1px solid var(--is-line)!important;border-radius:0!important;box-shadow:none!important;background:var(--is-inspector)!important;display:flex;flex-direction:column;gap:22px;align-self:stretch}
html.lg-shell #app-view .studio-workspace .studio-inspector-title {font-size:12px;line-height:1.4;font-weight:650;letter-spacing:.2px;color:var(--is-text);margin:0 0 2px}
.studio-workspace .studio-inspector-note {font-size:11px;line-height:1.8;color:var(--is-secondary);margin:0}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-card,.resolution-card,.order-automation-card,.logo-picker-panel) {border:1px solid var(--is-line);border-radius:14px;background:var(--is-panel)!important;box-shadow:0 3px 12px #15284305;padding:18px;min-width:0}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-card-heading,.resolution-card-heading,.order-automation-section-heading) {margin:0 0 14px;gap:12px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-card-heading,.resolution-card-heading,.order-automation-section-heading) h3 {font-size:13px;font-weight:600;line-height:1.4;margin:0;color:var(--is-text)}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-card,.resolution-card)>p {margin:0 0 12px;font-size:11px;line-height:1.7;color:var(--is-secondary)}
.studio-workspace .batch-upload-summary {font-size:10px;color:var(--is-secondary);white-space:normal}
html.lg-shell #app-view .studio-workspace :is(.batch-secondary-action,.logo-add-reset,.creative-main-cancel,.creative-main-save) {min-height:31px;padding:6px 11px;border:1px solid var(--is-line);border-radius:8px;background:var(--is-panel);color:var(--is-text);font-size:11px;font-weight:500;line-height:1.5;white-space:nowrap;box-shadow:0 1px 2px #00000005}
html.lg-shell #app-view .studio-workspace :is(.resolution-start-button,.creative-variation-send,.creative-main-send) {min-height:36px;padding:8px 18px;border:0;border-radius:9px;background:#007aff!important;color:white!important;box-shadow:0 2px 5px #007aff1f;font-size:12px;font-weight:550;line-height:1.5;white-space:normal}
html.lg-shell #app-view .studio-workspace button:disabled {opacity:.44;cursor:not-allowed;box-shadow:none}
html.lg-shell #app-view .studio-workspace button.is-stop {background:#c74640!important;color:white!important}
html.lg-shell #app-view .studio-workspace :is(.order-danger-action,.creative-main-cancel) {color:#cf514d}
html.lg-shell #app-view .studio-workspace .studio-commandbar {display:flex;align-items:center;gap:12px;flex:0 0 auto;margin:0;padding:14px 24px!important;min-height:64px;border:0;border-top:1px solid var(--is-line);background:var(--is-inspector)!important;box-shadow:none;border-radius:0}
.studio-workspace .studio-commandbar > :is(span,p) {order:-1;flex:1;margin:0;color:var(--is-secondary);font-size:11px;line-height:1.6;min-width:0}
.studio-workspace .studio-commandbar > button {flex:0 0 auto}
html.lg-shell #app-view .studio-workspace .studio-commandbar {flex-direction:row;flex-wrap:nowrap;position:relative;bottom:auto}
html.lg-shell #app-view .studio-workspace .studio-commandbar > button {width:auto;min-width:92px;max-width:55%;flex:0 0 auto}
html.lg-shell #app-view .studio-workspace .studio-commandbar > :is(span,p) {text-align:left;min-width:100px;white-space:normal}
html.lg-shell #app-view .studio-workspace .studio-canvas > :is(.main-aspect-card,.resolution-reset-grid) {flex:0 0 auto;overflow:visible}
html.lg-shell #app-view .studio-workspace :is(.batch-output-empty,.resolution-output-empty,.creative-variation-empty,.creative-main-empty) {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:210px;padding:30px 18px;border:0;background:transparent!important;box-shadow:none;text-align:center;color:var(--is-secondary)}
html.lg-shell #app-view .studio-workspace :is(.batch-output-empty,.resolution-output-empty,.creative-variation-empty,.creative-main-empty)>span {display:grid;place-items:center;width:58px;height:58px;border:0;border-radius:17px;background:var(--is-soft)!important;color:var(--is-secondary);font-size:26px;font-weight:300;margin-bottom:6px}
html.lg-shell #app-view .studio-workspace :is(.batch-output-empty,.resolution-output-empty,.creative-variation-empty,.creative-main-empty)>strong {font-size:14px;font-weight:550;color:var(--is-text)}
html.lg-shell #app-view .studio-workspace :is(.batch-output-empty,.resolution-output-empty,.creative-variation-empty,.creative-main-empty)>p {font-size:11px;line-height:1.7;margin:0;max-width:300px;color:var(--is-secondary)}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-upload-grid,.main-aspect-output-grid) {display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;min-height:0}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-upload-grid,.main-aspect-output-grid) {background:transparent;border:0;border-radius:0;padding:0;}
.studio-workspace :is(.main-aspect-output-grid,.creative-variation-output-grid)>.batch-output-empty {grid-column:1/-1}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-add-tile,.resolution-upload-zone,.logo-upload-zone,.creative-rewrite-add,.creative-main-add) {border:1px dashed var(--is-line);border-radius:12px;background:var(--is-bg)!important;color:var(--is-blue);box-shadow:none}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-add-tile,.creative-rewrite-add,.creative-main-add):hover {border-color:var(--is-blue);background:var(--is-tint)!important}
.studio-workspace .main-aspect-add-tile {min-height:142px;height:100%}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-upload-item,.main-aspect-output-item,.creative-variation-output-item) {border:1px solid var(--is-line);border-radius:10px;background:var(--is-bg);color:var(--is-text);min-width:0;box-shadow:none}
.studio-workspace .main-aspect-upload-item img {height:132px;object-fit:contain;background:var(--is-bg)}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-upload-item,.main-aspect-output-item) small {color:var(--is-secondary)}
/* Settings use compact macOS-style segmented controls. */
.studio-workspace :is(.image-generation-options,.product-white-settings-layout,.upscale-header-controls) {display:flex;flex-direction:column;gap:22px;margin:0;width:100%}
html.lg-shell #app-view .studio-workspace .image-generation-options {padding:0;border:0;border-radius:0;background:transparent}
html.lg-shell #app-view .studio-workspace :is(.tryon-segment-control,.local-image-transport) {width:100%;display:flex;flex-direction:column;align-items:stretch;gap:9px;padding:0;border:0;background:transparent;box-shadow:none}
html.lg-shell #app-view .studio-workspace :is(.tryon-segment-control,.local-image-transport)>span {font-size:11px;font-weight:600;color:var(--is-text)}
html.lg-shell #app-view .studio-workspace :is(.tryon-segment-control,.local-image-transport)>div,
html.lg-shell #app-view .studio-workspace #creative-rewrite-mode-switch {display:flex;padding:3px!important;border:1px solid var(--is-line)!important;border-radius:9px!important;background:var(--is-soft)!important;gap:2px;width:100%}
html.lg-shell #app-view .studio-workspace :is(.tryon-segment-control,.local-image-transport)>div>button,
html.lg-shell #app-view .studio-workspace #creative-rewrite-mode-switch>button {flex:1;min-width:0;min-height:29px;padding:6px 4px;font-size:10px!important;line-height:1.4;color:var(--is-secondary)!important;border:0;background:transparent!important;border-radius:6px;box-shadow:none!important}
html.lg-shell #app-view .studio-workspace :is(.tryon-segment-control,.local-image-transport)>div>button:is(.active,[aria-checked=true],[aria-pressed=true]),
html.lg-shell #app-view .studio-workspace #creative-rewrite-mode-switch>button[aria-checked=true] {background:var(--is-panel)!important;color:var(--is-text)!important;box-shadow:0 1px 4px #00000015!important}
.studio-workspace .quality-speed-switch::before {display:none}
.studio-workspace .is-auto-channel::before {font-size:8px;top:-17px;background:var(--is-tint);color:var(--is-blue);border:0;animation:none}
.studio-workspace .is-auto-channel::after {display:none}
html.lg-shell #app-view .studio-workspace :is(.tryon-segment-control,.local-image-transport)>small {font-size:10px;line-height:1.6;color:var(--is-secondary)}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-ratio-control,.main-aspect-resolution-option,.product-white-mode-panel,.product-white-sample-panel,.resolution-settings) {margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;min-width:0}
.studio-workspace .main-aspect-ratio-control {display:grid;gap:8px;position:relative}
html.lg-shell #app-view .studio-workspace .main-aspect-ratio-control>span {font-size:11px;color:var(--is-text)}
html.lg-shell #app-view .studio-workspace #main-aspect-ratio-toggle {width:100%;background:var(--is-panel);border:1px solid var(--is-line);border-radius:9px;color:var(--is-text);padding:10px 12px;min-height:38px}
.studio-workspace #main-aspect-ratio-toggle small {color:var(--is-secondary)}
html.lg-shell #app-view .studio-workspace .main-aspect-ratio-menu {z-index:20;inset:100% 0 auto;max-width:100%;background:var(--is-panel);border:1px solid var(--is-line);padding:6px;border-radius:10px;box-shadow:0 12px 30px #00000024}
.studio-workspace .main-aspect-ratio-menu button {color:var(--is-text);background:transparent}
.studio-workspace .main-aspect-ratio-menu button.active {background:var(--is-tint);color:var(--is-blue)}
html.lg-shell #app-view .studio-workspace :is(.main-aspect-resolution-heading,.product-white-sample-heading) strong {font-size:11px;color:var(--is-text)}
.studio-workspace :is(.main-aspect-resolution-heading,.product-white-sample-heading) small {color:var(--is-secondary);font-size:10px;line-height:1.6}
html.lg-shell #app-view .studio-workspace .resolution-target-grid {display:grid;grid-template-columns:1fr;gap:9px;margin:14px 0 0}
html.lg-shell #app-view .studio-workspace .resolution-dimension-field {border:1px solid var(--is-line);background:var(--is-panel);border-radius:9px;padding:11px;min-width:0;color:var(--is-text);box-shadow:none}
.studio-workspace .resolution-dimension-field strong {color:var(--is-text);font-size:11px}
.studio-workspace .resolution-dimension-field small,.studio-workspace .resolution-dimension-field em {color:var(--is-secondary);font-size:10px}
html.lg-shell #app-view .studio-workspace .resolution-dimension-field input {width:100%;min-width:0;color:var(--is-text);background:transparent;border-color:var(--is-line);font-size:20px;height:36px;box-shadow:none}
.studio-workspace :is(.resolution-target-summary,.product-presentation-advice,.product-white-background-mask-reminder) {font-size:10px;line-height:1.7;color:var(--is-secondary);background:transparent;border:0;padding:0}
.studio-workspace .product-white-mode-row {color:var(--is-text);justify-content:space-between;font-size:11px}
.studio-workspace .product-white-mode-row>span {color:var(--is-text);font-weight:500}
.studio-workspace .product-background-switch span {background:var(--is-soft);border-color:var(--is-line)}
.studio-workspace .product-background-switch input:checked+span {background:#007aff;border-color:#007aff}
.studio-workspace .product-background-switch input:focus-visible+span {box-shadow:0 0 0 3px #007aff40}
.studio-workspace .product-white-mode-panel {display:grid;gap:18px}
.studio-workspace .product-white-presentation-row {margin:0}
html.lg-shell #app-view .studio-workspace .product-white-sample-panel {border-top:1px solid var(--is-line);padding-top:18px}
html.lg-shell #app-view .studio-workspace .product-white-sample-panel {border:0!important;border-top:1px solid var(--is-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.studio-workspace .product-white-sample-body>small {font-size:10px;color:var(--is-secondary)}
.studio-workspace .product-white-sample-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.studio-workspace .product-white-sample-item {background:var(--is-panel);border-color:var(--is-line)}
/* Resizing uses two image previews and an independent inspector. */
.studio-workspace .resolution-reset-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
html.lg-shell #app-view .studio-workspace :is(.resolution-upload-zone,.resolution-output-zone) {min-height:250px;height:clamp(250px,36vh,420px);border-radius:10px;background:var(--is-bg);overflow:hidden}
.studio-workspace :is(.resolution-upload-zone,.resolution-output-zone) img {object-fit:contain;max-height:100%;max-width:100%}
.studio-workspace .resolution-upload-placeholder>strong {color:var(--is-text);font-size:12px}
.studio-workspace .resolution-upload-placeholder>small {color:var(--is-secondary);font-size:10px}
.studio-workspace .resolution-original-grid>div {background:var(--is-soft);border:0;border-radius:8px;color:var(--is-text)}
.studio-workspace .resolution-original-grid span {font-size:10px;color:var(--is-secondary)}
.studio-workspace .resolution-output-meta {color:var(--is-text);background:transparent;border-color:var(--is-line);font-size:11px}
html.lg-shell #app-view .studio-workspace .resolution-output-progress {background:var(--is-panel);color:var(--is-text)}
.studio-workspace .resolution-output-progress p {color:var(--is-secondary)}
/* Creative pages keep their original forms and delegated upload handlers. */
.studio-workspace .studio-reference-upload {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:110px;border:1px dashed var(--is-line);border-radius:12px;background:var(--is-bg);color:var(--is-blue);cursor:pointer;flex:0 0 auto}
.studio-workspace .studio-reference-upload>span {font-size:24px;font-weight:300}
.studio-workspace .studio-reference-upload strong {font-size:12px;color:var(--is-text)}
.studio-workspace .studio-reference-upload small {font-size:10px;color:var(--is-secondary)}
.studio-workspace .studio-reference-upload input {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.studio-workspace .studio-reference-upload:focus-within {outline:2px solid #007aff;outline-offset:3px}
.studio-workspace.is-session-open .studio-reference-upload {display:none}
html.lg-shell #app-view .studio-workspace .studio-composer {gap:16px;position:relative;bottom:auto;max-height:none;flex:none;border:0!important;border-left:1px solid var(--is-line)!important}
.studio-workspace .creative-variation-history {width:100%;max-width:none;min-height:100%;margin:0}
html.lg-shell #app-view .studio-workspace .creative-main-stage {border:0;border-radius:0;box-shadow:none}
.studio-workspace :is(.creative-variation-empty,.creative-main-empty) {flex:1;margin:auto;min-height:380px!important}
html.lg-shell #app-view .studio-workspace :is(.creative-variation-upload-row,.creative-main-upload-row) {display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:0}
.studio-workspace :is(.creative-variation-images,.creative-main-images) {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:240px;overflow:auto;width:100%}
.studio-workspace :is(.creative-variation-image,.creative-main-image,.creative-variation-add) {width:100%;min-width:0;height:76px;margin:0;border-radius:8px;border-color:var(--is-line);background:var(--is-soft)}
.studio-workspace :is(.creative-variation-image,.creative-main-image)>img {width:100%;height:100%;object-fit:cover}
.studio-workspace :is(.creative-variation-upload-row,.creative-main-upload-row)>span {font-size:10px;color:var(--is-secondary);text-align:left}
html.lg-shell #app-view .studio-workspace :is(.creative-variation-prompt,.creative-main-prompt) {flex:0 0 auto;min-height:140px;max-height:240px;border:1px solid var(--is-line);border-radius:10px;padding:13px;font-size:12px;line-height:1.8;background:var(--is-panel);color:var(--is-text);overflow:auto;box-shadow:none;margin:0}
.studio-workspace [contenteditable]:focus {outline:2px solid #007aff55;outline-offset:1px}
.studio-workspace [contenteditable]:empty::before {color:var(--is-secondary);font-size:11px}
.studio-workspace :is(.creative-variation-footer,.creative-main-footer) {display:flex;flex-direction:column;align-items:stretch;gap:16px;margin-top:auto}
.studio-workspace :is(.creative-variation-drop-hint,.creative-main-drop-hint) {font-size:10px;color:var(--is-secondary);line-height:1.6}
.studio-workspace :is(.creative-variation-actions,.creative-main-actions) {display:flex;flex-direction:column;align-items:stretch;gap:10px;width:100%}
.studio-workspace :is(.creative-variation-channel,.creative-rewrite-channel) {width:100%;min-width:0}
html.lg-shell #app-view .studio-workspace #creative-variation-channel-trigger {width:100%;display:flex;align-items:center;justify-content:space-between;border:1px solid var(--is-line);background:var(--is-panel);color:var(--is-text);border-radius:8px;min-height:36px;padding:8px 10px;font-size:11px}
.studio-workspace #creative-variation-channel-trigger small {color:var(--is-secondary);font-size:10px}
html.lg-shell #app-view .studio-workspace :is(.creative-variation-channel-menu,.creative-rewrite-element-menu) {z-index:40;width:100%;min-width:0;left:0;right:0;background:var(--is-panel);border:1px solid var(--is-line);box-shadow:0 12px 32px #00000024;border-radius:10px;color:var(--is-text)}
.studio-workspace :is(.creative-variation-channel-menu,.creative-rewrite-element-menu) button {color:var(--is-text);background:transparent}
.studio-workspace .creative-variation-channel-menu small {color:var(--is-secondary)}
.studio-workspace :is(.creative-variation-channel-menu,.creative-rewrite-element-menu,.main-aspect-ratio-menu) button:hover {background:var(--is-tint);color:var(--is-blue)}
.studio-workspace :is(.creative-variation-status,.creative-main-status) {font-size:10px;line-height:1.8;margin:0;color:var(--is-secondary);min-height:0;padding:0;white-space:normal}
.studio-workspace :is(.creative-variation-status,.creative-main-status)[data-state=error] {color:#d85b52}
html.lg-shell #app-view .studio-workspace :is(.creative-rewrite-add,.creative-main-add) {width:100%;min-height:110px;padding:15px;flex-shrink:0;gap:7px}
.studio-workspace :is(.creative-rewrite-add,.creative-main-add) strong {font-size:12px;color:var(--is-text)}
.studio-workspace :is(.creative-rewrite-add,.creative-main-add) small {font-size:10px;color:var(--is-secondary)}
.studio-workspace .creative-rewrite-element-row {border:1px solid var(--is-line);border-radius:10px;padding:10px;gap:8px;flex-wrap:wrap;background:var(--is-panel)}
.studio-workspace .creative-rewrite-element-picker {flex:0 0 30px}
html.lg-shell #app-view .studio-workspace .creative-rewrite-element-trigger {background:var(--is-tint);border:0;color:var(--is-blue);border-radius:7px;width:30px;height:30px}
.studio-workspace .creative-rewrite-element-menu {width:200px!important;right:auto!important}
.studio-workspace .creative-rewrite-elements {min-width:0;flex:1}
.studio-workspace .creative-rewrite-elements-empty {font-size:10px;line-height:1.7;color:var(--is-secondary)}
.studio-workspace .creative-rewrite-element-chip {background:var(--is-tint);color:var(--is-blue);border:0;font-size:10px}
.studio-workspace :is(.creative-variation-group,.creative-main-job) {margin:0 0 20px;padding:18px;border:1px solid var(--is-line);border-radius:14px;background:var(--is-panel);color:var(--is-text);box-shadow:none}
.studio-workspace :is(.creative-variation-group-header,.creative-main-job>header) {border-color:var(--is-line);color:var(--is-text);gap:10px;flex-wrap:wrap}
.studio-workspace :is(.creative-variation-group-header,.creative-main-job>header) strong {font-size:12px;color:var(--is-text)}
.studio-workspace :is(.creative-variation-group-header,.creative-main-job>header) span {font-size:10px;color:var(--is-secondary)}
.studio-workspace .creative-variation-output-grid {grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.studio-workspace :is(.creative-main-policy,.order-automation-policy) {display:flex;align-items:center;gap:6px;border:1px solid var(--is-line);border-radius:20px;padding:7px 10px;background:var(--is-panel);color:var(--is-secondary);min-width:0}
.studio-workspace :is(.creative-main-policy,.order-automation-policy) strong {font-size:10px;font-weight:500;color:var(--is-secondary)}
.studio-workspace :is(.creative-main-live-log,.order-automation-live-log) {background:var(--is-bg);border:0;border-radius:10px;padding:16px;color:var(--is-text);font-size:12px;line-height:1.8;max-height:380px}
.studio-workspace :is(.creative-main-live-log,.order-automation-live-log) p {color:var(--is-secondary);overflow-wrap:anywhere}
/* Order production: source on the left, live work on the right, actions always reachable. */
html.lg-shell #app-view .studio-workspace .studio-order-body {display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;padding:22px 24px!important;flex:1;min-height:0;overflow:auto;align-items:start}
.studio-workspace .order-automation-dropzone {min-height:225px;border:1px dashed var(--is-line);border-radius:10px;background:var(--is-bg);color:var(--is-text);padding:20px;gap:12px}
.studio-workspace .order-automation-upload-mark {background:var(--is-soft);color:var(--is-blue);border-radius:12px;width:48px;height:48px;font-size:21px}
.studio-workspace .order-automation-dropzone strong {font-size:12px;color:var(--is-text)}
.studio-workspace .order-automation-dropzone small,.studio-workspace .order-automation-upload-actions small {font-size:10px;line-height:1.7;color:var(--is-secondary);overflow-wrap:anywhere}
.studio-workspace :is(.order-automation-live-panel,.order-automation-worker,.order-automation-empty) {background:transparent;border-color:var(--is-line);border-radius:10px;color:var(--is-secondary);font-size:11px}
.studio-workspace .order-automation-live-heading {font-size:11px;color:var(--is-text);gap:8px;flex-wrap:wrap}
html.lg-shell #app-view .studio-workspace :is(.order-automation-live-heading,.order-automation-worker) {background:transparent;border-color:var(--is-line);color:var(--is-text)}
.studio-workspace .order-automation-worker strong {color:var(--is-text);font-size:11px}
.studio-workspace .order-automation-worker small {color:var(--is-secondary);font-size:10px}
html.lg-shell #app-view .studio-workspace :is(.order-worker-card,.order-task-group) {background:var(--is-bg);border:1px solid var(--is-line);border-radius:10px;color:var(--is-text);box-shadow:none}
.studio-workspace :is(.order-worker-card,.order-task-group) strong,.studio-workspace .order-automation-live-heading strong {color:var(--is-text);font-size:12px}
.studio-workspace :is(.order-worker-card,.order-task-group) :is(small,span),.studio-workspace .order-automation-live-heading>span {color:var(--is-secondary);font-size:10px}
.studio-workspace .order-task-group em {color:var(--is-blue);font-size:11px}
.studio-workspace :is(.order-automation-progress,.creative-main-progress) {background:var(--is-soft);height:5px;border-radius:8px}
.studio-workspace :is(.order-automation-progress,.creative-main-progress)>i {background:#007aff;border-radius:8px}
.studio-workspace :is(.order-automation-status,#order-automation-progress-label) {font-size:10px;color:var(--is-secondary);background:var(--is-soft);border:0;border-radius:6px;padding:5px 7px}
/* Logo workspaces preserve canvas geometry and pointer interactions. */
html.lg-shell #app-view .studio-workspace .studio-toolstrip {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 26px;border-bottom:1px solid var(--is-line)}
.studio-workspace .studio-toolstrip .local-image-transport {max-width:260px}
.studio-workspace .studio-toolstrip .local-image-transport>span {display:none!important}
.studio-workspace .studio-toolstrip .local-image-transport>small {margin-top:2px}
.studio-workspace .logo-capability-badge {border:0;background:transparent;color:var(--is-secondary);font-size:10px}
.studio-workspace .studio-runtime-description {display:none}
html.lg-shell #app-view .studio-workspace .logo-remove-shell {flex:1;min-height:0;padding:22px 24px;overflow:auto;display:flex;flex-direction:column;gap:20px}
.studio-workspace .logo-remove-dropzone {min-height:220px;flex-shrink:0;gap:10px;padding:25px}
.studio-workspace:has(#logo-remove-comparison:not(.hidden)) .logo-remove-dropzone {min-height:95px;padding:14px}
.studio-workspace:has(#logo-remove-comparison:not(.hidden)) .logo-remove-dropzone .logo-upload-mark {display:none}
.studio-workspace .logo-upload-mark {font-size:25px;color:var(--is-blue);background:var(--is-tint);border-radius:13px;width:50px;height:50px}
.studio-workspace .logo-upload-zone strong {font-size:13px;color:var(--is-text)}
.studio-workspace .logo-upload-zone small {font-size:11px;color:var(--is-secondary)}
.studio-workspace .logo-remove-lane-heading {color:var(--is-text);font-size:12px;padding:0 0 12px}
.studio-workspace .logo-remove-lane-heading span {font-size:10px;color:var(--is-secondary)}
.studio-workspace .logo-remove-scroll {border:1px solid var(--is-line);border-radius:12px;background:var(--is-panel);padding:12px}
.studio-workspace .logo-remove-card {border-color:var(--is-line);border-radius:10px;background:var(--is-bg);color:var(--is-text)}
html.lg-shell #app-view .studio-workspace .logo-remove-editor {z-index:60;background:var(--is-bg);border:0;border-radius:0;color:var(--is-text)}
.studio-workspace .logo-remove-editor>header {background:var(--is-inspector);border-color:var(--is-line);padding:16px 20px;color:var(--is-text);flex-wrap:wrap;gap:12px}
.studio-workspace .logo-remove-editor>header small {color:var(--is-secondary);font-size:10px}
.studio-workspace .logo-remove-stage {background:var(--is-soft);min-height:0;height:0;padding:20px;flex:1 1 0;grid-template: minmax(0,1fr) / minmax(0,1fr)}
.studio-workspace .logo-remove-editor-actions {flex-wrap:wrap;max-width:100%}
.studio-workspace .logo-remove-editor-actions label {color:var(--is-secondary);font-size:11px;white-space:nowrap;flex:0 0 auto}
.studio-workspace .logo-remove-editor-actions input {accent-color:#007aff}
.studio-workspace .logo-remove-stage canvas {max-width:100%;max-height:100%;object-fit:contain}
.studio-workspace .logo-remove-busy {background:#182332ad;color:#fff;backdrop-filter:blur(4px)}
html.lg-shell #app-view .studio-workspace .logo-add-intro {min-height:0;overflow:auto;flex:1;padding:24px;display:flex;flex-direction:column;align-items:center;gap:20px}
.studio-workspace #logo-add-dropzone {width:100%;min-height:230px;max-width:640px;gap:12px;padding:25px}
.studio-workspace #logo-add-start {min-width:150px}
.studio-workspace .logo-add-intro-grid {width:100%;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
html.lg-shell #app-view .studio-workspace .logo-add-editor {flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:0;padding:0;overflow:hidden}
.studio-workspace .logo-compose-panel {display:flex;flex-direction:column;min-width:0;min-height:0;background:transparent;padding:20px;gap:16px;border:0;border-radius:0}
.studio-workspace .logo-compose-toolbar {display:flex;background:transparent;border:0;padding:0;flex-wrap:wrap;gap:10px;color:var(--is-secondary);font-size:11px}
.studio-workspace .logo-compose-toolbar>span {flex:1;text-align:center}
html.lg-shell #app-view .studio-workspace .logo-compose-toolbar button {width:auto;min-width:70px;flex:0 0 auto}
html.lg-shell #app-view .studio-workspace #logo-add-save-current {background:var(--is-panel)!important;color:var(--is-text)!important;border:1px solid var(--is-line);box-shadow:none}
.studio-workspace .logo-compose-navigator {flex:1;min-height:0;background:var(--is-soft);border:1px solid var(--is-line);border-radius:12px;padding:14px;overflow:hidden;container-type:size;grid-template-rows:minmax(0,1fr)}
html.lg-shell #app-view .studio-workspace .logo-compose-stage {width:min(calc(100cqw - 120px),calc((100cqh - 28px) * var(--logo-image-ratio)))!important;height:auto!important;max-height:none;max-width:100%;aspect-ratio:var(--logo-image-ratio)}
.studio-workspace .logo-compose-navigator>button {background:var(--is-panel);border:1px solid var(--is-line);color:var(--is-text)}
html.lg-shell #app-view .studio-workspace .logo-picker-panel {border:0;border-left:1px solid var(--is-line);border-radius:0!important;background:var(--is-inspector)!important;padding:20px;overflow:auto;min-height:0}
.studio-workspace .logo-picker-list {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.studio-workspace .logo-custom-upload {margin:18px 0 15px;border:1px dashed var(--is-line);border-radius:10px;background:var(--is-panel);color:var(--is-blue);padding:12px;font-size:11px}
.studio-workspace .logo-picker-item {border-color:var(--is-line);border-radius:8px;background:var(--is-panel);color:var(--is-text)}
.studio-workspace .logo-add-status {font-size:10px;line-height:1.6;color:var(--is-secondary);margin:0}
.studio-workspace .logo-compose-layer.selected {outline-color:#007aff}
.studio-workspace .logo-compose-layer>i {background:#007aff}
html.lg-shell.lg-dark #app-view .studio-workspace :is(.main-aspect-output-item,.main-aspect-upload-item,.creative-variation-output-item,.logo-remove-card,.logo-remove-result,.logo-picker-item) {background:var(--is-panel)!important;border-color:var(--is-line)!important;color:var(--is-text)}
html.lg-shell.lg-dark #app-view .studio-workspace :is(.main-aspect-output-item,.creative-variation-output-item,.logo-remove-card,.logo-remove-result,.logo-picker-item) :is(strong,small,figcaption) {color:var(--is-secondary)}
html.lg-shell #app-view .studio-workspace .creative-variation-output-item>div {background:var(--is-panel);color:var(--is-secondary);border-color:var(--is-line)}
html.lg-shell #app-view .studio-workspace .creative-variation-output-item .inline-image-download {background:transparent;color:var(--is-blue)}
html.lg-shell #app-view .studio-workspace button:focus-visible {outline:2px solid #007aff;outline-offset:3px}
/* Lower window sizes keep controls reachable without horizontal overflow. */
html.lg-shell .workspace:has(>.studio-workspace:not(.hidden))>.lg-page-modes {background:#eceef2;border:1px solid #e0e3e9;border-radius:9px}
html.lg-shell .workspace:has(>.studio-workspace:not(.hidden))>.lg-page-modes button {color:#687180;background:transparent;border-radius:6px}
html.lg-shell .workspace:has(>.studio-workspace:not(.hidden))>.lg-page-modes button.active {color:#252a32;background:#fff;box-shadow:0 1px 4px #00000016}
html.lg-shell.lg-dark .workspace:has(>.studio-workspace:not(.hidden))>.lg-page-modes {background:#323944;border-color:#3b424e}
html.lg-shell.lg-dark .workspace:has(>.studio-workspace:not(.hidden))>.lg-page-modes button {color:#a6aebb}
html.lg-shell.lg-dark .workspace:has(>.studio-workspace:not(.hidden))>.lg-page-modes button.active {color:#edf0f6;background:#495261}
html.lg-shell #app-view .studio-workspace #logo-add-start {width:auto;align-self:flex-end;min-width:150px}
@media(max-width:1200px) {
 .studio-workspace .studio-body {grid-template-columns:minmax(0,1fr) 260px}
 html.lg-shell #app-view .studio-header {padding:16px 20px!important;gap:11px;min-height:78px}
 html.lg-shell #app-view .studio-workspace .studio-canvas {padding:18px!important;gap:18px}
 html.lg-shell #app-view .studio-workspace :is(.studio-inspector,.studio-composer) {padding:18px 16px!important}
 .studio-workspace .resolution-reset-grid {grid-template-columns:1fr}
 html.lg-shell #app-view .studio-workspace .studio-order-body {grid-template-columns:240px minmax(0,1fr);padding:18px!important;gap:16px}
 .studio-workspace .studio-header :is(.creative-main-policy,.order-automation-policy) {display:none}
 .studio-workspace .logo-add-editor {grid-template-columns:minmax(0,1fr) 200px!important}
}
@media(max-height:780px) {
 html.lg-shell #app-view .studio-header {padding-top:13px!important;padding-bottom:13px!important;min-height:72px}
 html.lg-shell #app-view .studio-workspace .studio-commandbar {padding-top:10px!important;padding-bottom:10px!important;min-height:56px}
 .studio-workspace :is(.creative-variation-images,.creative-main-images) {max-height:155px}
 html.lg-shell #app-view .studio-workspace :is(.creative-variation-prompt,.creative-main-prompt) {min-height:100px}
}

/* Free variation references must not shrink underneath the upload tile. */
html.lg-shell #app-view #creative-variation-workspace .creative-variation-dropzone {display:flex;flex-direction:column;gap:10px;flex:0 0 auto;min-height:0;border-radius:12px;position:relative}
html.lg-shell #app-view #creative-variation-workspace .creative-variation-upload-row {flex:0 0 auto;min-height:0;position:relative}
html.lg-shell #app-view #creative-variation-workspace .creative-variation-images {flex:0 0 auto;min-height:0;grid-auto-rows:76px;align-content:start;padding:2px;position:relative}
#creative-variation-workspace .creative-variation-images:empty {display:none}
#creative-variation-workspace .creative-variation-image {display:block;flex:none;position:relative}
#creative-variation-workspace .creative-variation-image>img {display:block;object-fit:contain}
html.lg-shell #app-view #creative-variation-workspace .creative-variation-image>button {position:absolute;z-index:2;top:3px;right:3px;width:22px;height:22px;min-height:0;padding:0;display:grid;place-items:center;line-height:1;border:0;border-radius:50%;color:#fff!important;background:#263446e6!important;cursor:pointer}
#creative-variation-workspace .creative-variation-dropzone.drag-active {outline:2px solid var(--is-blue);outline-offset:4px;background:var(--is-tint)}
html.lg-shell #app-view #creative-variation-workspace .creative-variation-dropzone.drag-active .studio-reference-upload {border-color:var(--is-blue);background:var(--is-tint)}

/* Main-image reframing supplements share the studio's light/dark palette. */
#main-aspect-workspace .main-aspect-prompt-setting {display:flex;flex-direction:column;gap:10px;min-width:0}
#main-aspect-prompt-title {font-size:12px;font-weight:600;color:var(--is-text)}
#main-aspect-workspace #main-aspect-prompt {box-sizing:border-box;width:100%;min-height:146px;max-height:360px;resize:vertical;padding:12px;border:1px solid var(--is-line);border-radius:10px;background:var(--is-panel);color:var(--is-text);font:inherit;font-size:12px;line-height:1.7;outline:none;transition:border-color .18s,box-shadow .18s}
#main-aspect-workspace #main-aspect-prompt::placeholder {color:var(--is-secondary)}
#main-aspect-workspace #main-aspect-prompt:focus {border-color:var(--is-blue);box-shadow:0 0 0 3px var(--is-tint)}
#main-aspect-workspace #main-aspect-prompt:disabled {opacity:.55;cursor:not-allowed}
#main-aspect-prompt-help {margin:0;color:var(--is-secondary);font-size:11px;line-height:1.7}
@media (prefers-reduced-motion:reduce) {#main-aspect-workspace #main-aspect-prompt {transition:none}}

/* Main image resize bounds: a placeholder is guidance, never a submitted value. */
#main-aspect-resolution-settings .resolution-dimension-field {position:relative;overflow:visible}
#main-aspect-resolution-settings .resolution-dimension-field input::placeholder {color:#949eac;font-size:14px;font-weight:400;opacity:1}
#main-aspect-resolution-settings .resolution-dimension-field.is-over-limit {margin-bottom:12px}
html.lg-shell #app-view #main-aspect-resolution-settings .resolution-dimension-field.is-over-limit input {color:#c93045!important;border-color:#dd6b7b!important}
#main-aspect-resolution-settings .main-aspect-resolution-limit {position:absolute;right:11px;top:calc(100% - 7px);z-index:3;display:block;padding:4px 9px;border:1px solid #e896a1;border-radius:8px;background:#fff0f3;color:#b5213a;font-size:11px;font-weight:600;line-height:1.5;white-space:nowrap;pointer-events:none;box-shadow:0 3px 8px #84213716;animation:main-aspect-limit-pop .18s ease-out}
#main-aspect-resolution-settings .main-aspect-resolution-limit::before {content:"";position:absolute;right:14px;top:-4px;width:6px;height:6px;background:inherit;border-top:1px solid #e896a1;border-left:1px solid #e896a1;transform:rotate(45deg)}
#main-aspect-resolution-settings .main-aspect-resolution-limit[hidden] {display:none!important}
html.lg-dark #main-aspect-resolution-settings .resolution-dimension-field input::placeholder {color:#96a3b7}
html.lg-dark #app-view #main-aspect-resolution-settings .resolution-dimension-field.is-over-limit input {color:#ff9dab!important}
html.lg-dark #main-aspect-resolution-settings .main-aspect-resolution-limit {color:#ffadba;background:#42242a;border-color:#b9546b}
@keyframes main-aspect-limit-pop {from{opacity:0;transform:translateY(-5px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce) {#main-aspect-resolution-settings .main-aspect-resolution-limit {animation:none}}
