/* G / warm ivory and ink green. Scoped to the user application and help page. */
body.g-system {
  --studio-green: var(--g-primary); --studio-green-hover: var(--g-primary-hover);
  --studio-sage: var(--g-primary-soft); --studio-page: var(--g-bg); --studio-line: var(--g-border); --studio-muted: var(--g-muted);
  --cp-paper: var(--g-bg); --cp-ink: var(--g-text); --cp-line: var(--g-border); --cp-radius: 4px;
  --ui56-bg: var(--g-bg); --ui56-ink: var(--g-text); --ui56-line: var(--g-border); --ui56-purple: var(--g-primary);
  background: var(--g-bg) !important; color: var(--g-text) !important; font: 14px/1.6 var(--g-font-body) !important;
}
body.g-system *, body.g-system *::before, body.g-system *::after { box-sizing: border-box; }
body.g-system :is(h1,h2,h3) { font-family: var(--g-font-display) !important; color: var(--g-primary); letter-spacing: .025em !important; font-weight: 600; }
body.g-system :is(h1,h2) { line-height: 1.4; }
body.g-system h3 { font-size: 20px; }
body.g-system :is(button,input,select,textarea,a) { -webkit-tap-highlight-color: transparent; }
body.studio-ui.g-system :is(.button,button.button,.reference-remix-submit,.agent-send-button,.agent-sidebar-new-task) { min-height: 40px; border-radius: 4px !important; font-size: 13px; font-weight: 500; padding: 8px 16px; box-shadow: none !important; }
body.studio-ui.g-system .button.secondary { background: transparent !important; border-color: var(--g-border) !important; }
body.studio-ui.g-system .button.secondary:hover { background: var(--g-subtle) !important; }
body.g-system :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) { min-height: 40px; border: 1px solid var(--g-border) !important; border-radius: 4px !important; font: 13px/1.5 var(--g-font-body); background: #fff !important; color: var(--g-text) !important; padding: 9px 12px; max-width: 100%; }
body.g-system textarea { resize: vertical; }
body.g-system :is(input,select,textarea):focus { border-color: var(--g-focus) !important; }
body.g-system :focus-visible { outline: 2px solid var(--g-focus) !important; outline-offset: 3px; }
body.g-system :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color: var(--g-primary); }
body.g-system :is(.card,.subcard,.workspace-page-active,.template-square-card,.result-preview,.empty-state,.notice,.stat,.online-batch-panel,.reference-remix-step) { border-radius: 4px !important; box-shadow: none !important; border-color: var(--g-border) !important; }
body.g-system :is(.field-hint,.auth-only-note,.empty-state,.section-title p) { color: var(--g-muted); font-size: 12px; line-height: 1.6; }
body.g-system .compact-form { gap: 16px; }
body.g-system .compact-form label { gap: 6px; font-size: 13px; font-weight: 500; }
body.g-system :is(.section-title,.reference-remix-heading) { margin: 0 0 24px !important; padding: 0 !important; }
body.studio-ui.g-system.app-route :is(.section-title h2,.reference-remix-heading h1,#generation .smart-generation-heading h2) { font-size: 28px !important; font-family: var(--g-font-display) !important; }
body.g-system :is(.section-title,.reference-remix-heading) :is(.eyebrow,[class$=-kicker]) { display: none; }
body.g-system .section-title p { margin: 6px 0 0; }
body.g-system :is(.generation-layout,.translation-layout,.remix-layout,.brand-manager-layout,.slicer-layout,.online-batch-layout) { gap: 16px !important; align-items: start; }
body.g-system .subcard { padding: 20px; }
body.g-system :is(.empty-state,.result-preview):not(:has(img)):not(:has(canvas)) { background: var(--g-bg) !important; border: 1px dashed var(--g-border); color: var(--g-muted); }
body.g-system .status:empty { display: none; }
body.studio-ui.g-system.app-route #remixModeOptions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
body.studio-ui.g-system.app-route #remixModeOptions .remix-mode-card { min-width: 0; border-radius: 4px !important; padding: 12px !important; font-size: 12px; align-items: start; }
body.studio-ui.g-system.app-route #remixModeOptions .remix-mode-card:has(input:checked) { border-color: var(--g-primary) !important; background: var(--g-primary-soft) !important; color: var(--g-primary) !important; }
body.g-system .status.error { color: var(--g-danger); background: var(--g-danger-bg); }
body.g-system .status.success { color: var(--g-success); background: var(--g-success-bg); }
body.g-system :is(.pill,.badge) { border-radius: 4px; font-size: 11px; }
body.g-system .g-model-field { display: grid; gap: 6px; min-width: 150px; font-size: 12px; color: var(--g-text); }
body.g-system .g-model-field select { width: 100%; }
body.studio-ui.g-system.app-route .g-model-select[hidden] { display: none !important; }
body.studio-ui.g-system.app-route .g-model-trigger {
  display: flex !important; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-width: 0; min-height: 40px; padding: 9px 12px !important;
  border: 1px solid var(--g-border) !important; border-radius: 4px !important;
  background: white !important; color: var(--g-text) !important;
  font: 14px/20px var(--g-font-body) !important; text-align: left; box-shadow: none !important;
  cursor: pointer;
}
body.studio-ui.g-system.app-route .g-model-trigger::after { content: ''; width: 7px; height: 7px; flex: 0 0 7px; margin: -4px 2px 0 0; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
body.studio-ui.g-system.app-route .g-model-trigger:is(:focus-visible,[aria-expanded="true"]) { outline: none !important; border-color: var(--g-focus) !important; box-shadow: 0 0 0 1px var(--g-focus) !important; }
body.studio-ui.g-system.app-route .g-model-trigger:disabled { color: var(--g-muted) !important; cursor: not-allowed; }
body.studio-ui.g-system.app-route .g-model-popup {
  position: fixed; z-index: 10000; padding: 4px; overflow: auto; box-sizing: border-box;
  border: 1px solid var(--g-border); border-radius: 4px; background: white;
  color: var(--g-text); box-shadow: 0 8px 24px #163e3514;
  font: 14px/20px var(--g-font-body); text-align: left;
}
body.studio-ui.g-system.app-route .g-model-popup[hidden] { display: none !important; }
body.studio-ui.g-system.app-route .g-model-option { position: relative; min-height: 40px; padding: 10px 34px 10px 12px; border-radius: 2px; cursor: pointer; }
body.studio-ui.g-system.app-route .g-model-option[aria-selected="true"] { background: var(--g-primary-soft); color: var(--g-primary); }
body.studio-ui.g-system.app-route .g-model-option[aria-selected="true"]::after { content: '✓'; position: absolute; right: 12px; }
body.studio-ui.g-system.app-route .g-model-option:is(:hover,.is-active):not([aria-disabled="true"]) { background: var(--g-primary-soft); color: var(--g-primary); outline: 1px solid var(--g-border); outline-offset: -1px; }
body.studio-ui.g-system.app-route .g-model-option[aria-disabled="true"] { color: var(--g-muted); cursor: not-allowed; opacity: .65; }
body.g-system .g-quick-create .g-model-trigger { flex: 1; }
@media(max-width:600px) {
  body.studio-ui.g-system.app-route :is(.g-model-trigger,.g-model-option) { min-height: 44px; }
}
body.g-system .g-model-note { color: var(--g-muted); font-size: 11px; font-weight: 400; }
body.g-system .g-brand { display: flex; align-items: center; gap: 8px; color: var(--g-primary); text-decoration: none; }
body.g-system .g-brand svg { width: 27px; height: 32px; color: var(--g-brass); }
body.g-system .g-brand strong { font: 600 25px/1.2 var(--g-font-display); letter-spacing: .1em; }
body.g-system .g-side-brand { display: grid; gap: 6px; padding: 20px 16px 28px; }
body.g-system .g-side-brand small { font-size: 9px; letter-spacing: .15em; color: var(--g-muted); }
body.g-system .g-sidebar-nav { display: grid; gap: 4px; }
body.g-system .g-sidebar-nav a,.g-sidebar-nav summary { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 9px 16px; color: var(--g-muted); text-decoration: none; cursor: pointer; font-size: 13px; border-left: 2px solid transparent; }
body.g-system .g-sidebar-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
body.g-system .g-sidebar-nav a[aria-current=page],body.g-system .g-sidebar-nav summary.g-active { background: var(--g-subtle); color: var(--g-primary); border-left-color: var(--g-primary); }
body.g-system .g-sidebar-nav details a { padding: 7px 12px 7px 44px; font-size: 12px; min-height: 34px; }
body.g-system .g-sidebar-nav summary { list-style: none; }
body.studio-ui.g-system .g-sidebar-nav summary { border-radius: 0 !important; box-shadow: none !important; font-weight: 500 !important; }
body.studio-ui.g-system .g-sidebar-nav a { border-radius: 0 !important; }
body.g-system .g-sidebar-nav summary::after { content: '⌄'; margin-left: auto; }
body.g-system .g-side-note { padding: 20px; margin-top: auto; color: var(--g-muted); font: 12px/1.9 var(--g-font-display); letter-spacing: .16em; }
body.g-system .g-side-note::before { content: ''; display: block; width: 24px; border-top: 1px solid var(--g-brass); margin-bottom: 16px; }
body.g-system .g-side-note small { display: block; font: 8px/2.5 var(--g-font-body); letter-spacing: .25em; margin-top: 14px; }
body.studio-ui.g-system.app-route .shell { display: block !important; padding: 0 !important; }
body.studio-ui.g-system.app-route .reference-sidebar { position: fixed !important; top: 0 !important; bottom: 0; left: 0; width: 206px !important; height: 100dvh !important; padding: 0 0 16px !important; background: #f7f6f2 !important; display: flex !important; flex-direction: column; overflow-y: auto; z-index: 51; }
body.g-system .reference-sidebar > .sidebar-stack { display: none !important; }
body.g-system .g-new-work { margin: 0 18px 24px; }
body.studio-ui.g-system.app-route .topbar { position: fixed !important; left: 206px !important; top: 0 !important; right: 0; width: auto !important; height: 56px !important; min-height: 56px !important; padding: 0 28px !important; background: var(--g-bg) !important; display: flex !important; gap: 16px; z-index: 50; }
body.g-system.app-route .topbar > :is(.brand,.landing-nav,.nav-actions) { display: none !important; }
body.g-system .g-breadcrumb { display: none; font-size: 12px; color: var(--g-muted); margin-right: auto; }
body.g-system.app-route .g-breadcrumb { display: block; }
body.studio-ui.g-system.app-route .topbar .app-topbar-status { margin-left: auto !important; }
body.g-system.app-route .topbar .topbar-help { display: none !important; }
body.studio-ui.g-system.app-route #appView { display: block; margin: 56px 0 0 206px !important; width: calc(100% - 206px) !important; min-height: calc(100dvh - 56px); padding: 32px 32px 64px !important; border: 0 !important; border-radius: 0 !important; background: var(--g-bg) !important; }
body.studio-ui.g-system.app-route #appView > section { max-width: 1600px; width: 100% !important; }
body.studio-ui.g-system.app-route #appView > :is(.subcard,.workspace-page-active) { background: transparent !important; padding: 0 !important; border: 0 !important; }
body.g-system #workspacePersonaContext,body.g-system .dashboard-top-stepper { display: none !important; }
body.g-system .g-bottom-nav { display: none; }
body.g-system .g-mode-switch { display: flex; gap: 0; border: 1px solid var(--g-border); border-radius: 4px; overflow: hidden; }
body.g-system .g-mode-switch button { border: 0; background: transparent; padding: 7px 16px; color: var(--g-muted); cursor: pointer; min-height: 34px; }
body.g-system .g-mode-switch button[aria-pressed=true] { background: var(--g-primary); color: white; }
/* Approved workspace: editorial banner, inline creation, 4x2 tools, photography. */
body.studio-ui.g-system.app-route #schemeAHome { gap: 24px; }
body.g-system #schemeAHome .scheme-a-home-header { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner { order: 0; min-height: 330px; height: 330px; padding: 24px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
body.g-system #schemeAHome .scheme-a-hero-banner > div { width: 40%; }
body.g-system #schemeAHome .studio-hero-photo { width: 65%; height: 100%; object-fit: cover; object-position: center 65%; mask-image: none; }
body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner h2 { font-size: 46px !important; margin: 14px 0 8px; line-height: 1.35 !important; }
body.g-system #schemeAHome .studio-eyebrow { font-size: 9px; letter-spacing: .22em; }
body.g-system #schemeAHome #workspacePersonaGoal { font-size: 14px; }
body.g-system #schemeAHome #workspacePersonaPain { display: none; }
body.g-system #schemeAHome .saas-primary-actions { margin-top: 24px; gap: 16px; }
body.g-system #schemeAHome #uploadOwnImageEntry { display: none; }
body.g-system #schemeAHome .g-quick-create { order: 1; }
body.g-system .g-quick-create { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid var(--g-border); background: #fff; }
body.g-system .g-quick-create .g-model-field { display: flex; align-items: center; gap: 16px; flex: 0 0 250px; }
body.g-system .g-quick-create .g-model-field select { width: 158px; }
body.g-system .g-quick-create .g-model-note { display: none; }
body.g-system .g-quick-create input { flex: 1; min-width: 60px; }
body.g-system #schemeAHome #workspaceAnnouncement { order: 7; }
body.studio-ui.g-system.app-route #schemeAHome .scheme-a-quick { order: 2; }
body.g-system .scheme-a-section-head { margin-bottom: 12px; }
body.g-system .scheme-a-section-head h2 { font-size: 20px !important; font-weight: 600; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-grid { gap: 10px !important; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card { display: grid !important; grid-template-columns: 34px 1fr !important; gap: 0 12px; min-height: 72px !important; padding: 14px 16px !important; border-radius: 4px !important; align-content: center; }
body.g-system #schemeAHome .mobile-action-card::after { display: none; }
body.g-system #schemeAHome .mobile-action-card .mobile-action-icon { grid-row: 1/3 !important; grid-column: 1 !important; background: transparent !important; margin: 0 !important; color: var(--g-primary) !important; align-self: center; }
body.g-system #schemeAHome .mobile-action-card strong { font-size: 13px; }
body.g-system #schemeAHome .mobile-action-card > span { font-size: 11px; grid-column: 2; }
body.g-system #schemeAHome .studio-inspiration { order: 3; }
body.g-system .studio-inspiration-card { border: 0; border-radius: 0; background: transparent; }
body.g-system .studio-inspiration-card > img { aspect-ratio: 2.3; object-fit: cover; }
body.g-system .studio-inspiration-card > span { padding: 10px 0; border-bottom: 1px solid var(--g-border); display: flex; justify-content: space-between; }
body.g-system .studio-inspiration-card :is(small,b) { display: none; }
body.g-system #schemeAHome > :is(.scheme-a-tip-card,.workspace-persona-home) { display: none !important; }
body.g-system #schemeAHome .newcomer-demo { order: 6; }
body.g-system .g-extra-home { order: 5; }
/* Creation: single column of inputs next to a broad result surface. */
body.g-system #generation :is(.start-generation-brief,.smart-generation-steps,.smart-card-title h3,.smart-card-title p,.smart-quota-card) { display: none !important; }
body.g-system #generation .generation-mode-tabs { margin-bottom: 20px; border-bottom: 1px solid var(--g-border); }
body.g-system #generation .generation-mode-tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 18px; background: transparent; color: var(--g-muted); }
body.g-system #generation .generation-mode-tab.active { border-color: var(--g-primary); color: var(--g-primary); }
body.studio-ui.g-system.app-route #generation .smart-generation-layout { display: grid !important; grid-template-columns: minmax(350px,.9fr) minmax(0,1.2fr) !important; gap: 16px !important; }
body.g-system #generation .g-generation-inputs { padding: 20px; border: 1px solid var(--g-border); background: #fff; }
body.studio-ui.g-system.app-route #generation .g-generation-inputs :is(.generation-upload-panel,.smart-compose-panel,.smart-generation-form) { padding: 0 !important; border: 0 !important; border-radius: 0 !important; }
body.g-system #generation .generation-upload-panel { margin-bottom: 18px; }
body.g-system #generation .smart-upload-dropzone { min-height: 110px !important; margin-top: 8px; border: 1px dashed var(--g-input-border) !important; border-radius: 4px !important; }
body.g-system #generation .smart-upload-dropzone .generation-upload-icon { font-size: 22px; }
body.g-system #generation .generation-source-preview:has(img) { margin-top: 10px; min-height: 90px !important; max-height: 160px; }
body.g-system #generation .smart-source-preview img { max-height: 130px; object-fit: contain; }
body.g-system #generation .smart-compose-panel { display: flex; flex-direction: column; gap: 8px; }
body.g-system #generation .smart-intent-tabs { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 6px !important; }
body.g-system #generation .smart-intent-button { min-height: 34px !important; padding: 6px !important; border-radius: 4px !important; border: 1px solid var(--g-border); background: white; }
body.g-system #generation .smart-intent-button strong { font-size: 12px; }
body.g-system #generation .smart-intent-button small { display: none; }
body.g-system #generation .smart-intent-button.active { background: var(--g-primary) !important; color: white !important; }
body.g-system #generation .smart-recommend-action { margin: 0; }
body.g-system #generation .smart-recommend-action p { display: none; }
body.g-system #generation .smart-recommend-button { background: transparent !important; border: 0 !important; padding: 0 !important; color: var(--g-primary) !important; min-height: 30px; font-size: 12px; }
body.g-system #generation .smart-more-settings { border: 1px solid var(--g-border); padding: 8px 12px; border-radius: 4px; }
body.g-system #generation .smart-recommend-result:not(:has(button)) { display: none; }
body.g-system #generation .smart-generation-advanced { grid-column: 1/-1; padding-top: 16px; }
body.g-system #generation .g-generation-inputs textarea { min-height: 100px !important; }
body.studio-ui.g-system #generation .smart-result-panel { padding: 20px !important; border-radius: 4px !important; min-height: 560px; }
body.g-system #generation .smart-result-panel > div:first-child p,body.g-system #generation .smart-result-panel > div:first-child .pill { display: none; }
body.g-system #generation .smart-result-panel h3 { font: 600 16px/1.5 var(--g-font-body) !important; }
body.g-system #generationResultPreview { min-height: 390px; }
body.g-system #generationResultPreview img { max-height: 570px; object-fit: contain; }
body.g-system .g-generation-inputs .g-model-field { margin-block: 6px; }
body.g-system .listing-suite-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
body.g-system .listing-suite-grid > aside:first-child { grid-column: 1; }
body.g-system .listing-suite-grid > section { grid-column: 1; }
body.g-system .listing-suite-grid > aside:last-child { grid-column: 2; grid-row: 1/3; min-height: 500px; }
body.g-system #listingSuitePanel > .section-title h3 { font-size: 24px; }
body.g-system .listing-suite-preview-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
body.g-system #image-edit .generation-layout { display: grid !important; grid-template-columns: minmax(270px,.72fr) minmax(360px,1.25fr) minmax(210px,.7fr) !important; }
body.g-system #image-edit .g-edit-settings { display: grid; gap: 16px; }
body.g-system #image-edit .g-edit-settings > .subcard { padding: 16px; }
body.g-system #image-edit #gptForm { display: flex; flex-direction: column; gap: 12px; }
body.g-system #image-edit #gptForm > label:has(#gptPrompt) { order: -2; }
body.g-system #image-edit #gptForm .prompt-optimize-actions { order: -1; }
body.g-system #image-edit #gptForm .field-hint { font-size: 11px; }
body.g-system #image-edit .gpt-mode-unified { display: none; }
body.g-system #image-edit #gptSourcePreview { min-height: 100px; max-height: 150px; }
body.g-system #image-edit #gptSourcePreview img { max-height: 110px; }
body.studio-ui.g-system.app-route #gptSourcePreview:has(> .field-hint:only-child) { display: none !important; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings { gap: 0; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings > .subcard { border: 0 !important; background: transparent !important; }
body.studio-ui.g-system.app-route #image-edit .result-stack .result-actions { display: flex !important; flex-wrap: wrap; gap: 8px; }
body.studio-ui.g-system.app-route #image-edit .result-stack .result-actions .button { flex: 1 1 120px; min-height: 40px !important; white-space: nowrap; padding: 8px 12px !important; }
body.studio-ui.g-system.app-route #image-edit #gptResultPreview:not(:has(img)) { display: grid !important; place-items: center !important; align-content: center !important; padding: 24px !important; text-align: center; }
body.studio-ui.g-system.app-route #gptResultPreview > .field-hint:only-child { align-self: center !important; justify-self: center !important; min-height: 0 !important; height: auto !important; display: block !important; margin: 0 !important; }
body.g-system .g-edit-canvas { border: 1px solid var(--g-border); min-height: 660px; padding: 16px; background: #fff; display: flex; flex-direction: column; }
body.g-system .g-edit-canvas > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; }
body.g-system .g-edit-canvas-stage { display: grid; place-items: center; flex: 1; overflow: auto; background: var(--g-subtle); min-height: 460px; }
body.g-system .g-edit-canvas-stage img { width: 100%; height: 100%; object-fit: contain; max-height: 620px; }
body.g-system .g-edit-canvas footer { display: flex; justify-content: flex-end; padding-top: 12px; gap: 8px; }
body.g-system #image-edit .result-preview img { max-height: 480px; }
body.g-system .online-batch-flow { display: none; }
body.g-system .online-batch-layout { display: grid !important; grid-template-columns: minmax(300px,.65fr) minmax(0,1.35fr) !important; }
body.g-system .online-batch-layout .online-source-panel { grid-column: 1; grid-row: 1; }
body.g-system .online-batch-layout .online-settings-panel { grid-column: 1; grid-row: 2; }
body.g-system .online-batch-layout > :last-child { grid-column: 2; grid-row: 1/3; }
body.g-system .online-batch-layout .online-result-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.g-system :is(.translation-layout,.remix-layout) { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
body.g-system #translation :is(.translation-layer-tools,.translation-canvas-editor-head p) { display: none; }
body.g-system #translation .translation-stack > div:first-child p { font-size: 12px; }
body.g-system .g-workflow-steps { display: flex; justify-content: center; margin-bottom: 24px; gap: 48px; color: var(--g-muted); font-size: 12px; }
body.g-system .g-workflow-steps span::first-letter { color: var(--g-primary); }
body.g-system #image-audit .image-audit-layout { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
body.g-system #image-audit .g-audit-inputs { display: grid; gap: 16px; }
body.g-system .slicer-layout { display: grid !important; grid-template-columns: 150px 260px minmax(0,1fr) !important; }
body.g-system #slicerPreviewGrid { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.g-system .brand-manager-layout { display: grid !important; grid-template-columns: 210px minmax(320px,1fr) minmax(300px,1fr) !important; }
body.g-system #brandsTitle { max-width: none; }
body.g-system .g-brand-preview { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 16px; }
body.g-system #batch .batch-layout { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(0,1.2fr); gap: 20px; }
body.g-system #batch textarea { min-height: 200px; }
/* Assets and account pages. */
body.studio-ui.g-system.app-route #template-square { --template-paper: var(--g-bg); --template-soft: var(--g-subtle); --template-line: var(--g-border); }
body.studio-ui.g-system.app-route #template-square .template-square-hero { padding: 0 0 20px !important; background: transparent !important; border: 0 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-hero h2 { font-size: 28px !important; }
body.g-system #template-square .template-square-grid { gap: 20px; grid-template-columns: repeat(3,minmax(0,1fr)); }
body.studio-ui.g-system.app-route #template-square .template-square-card { border-radius: 4px !important; }
body.g-system .template-square-card-body { padding: 14px !important; }
body.g-system .template-square-card-body h3 { font-size: 18px !important; }
body.g-system .template-square-card .button { min-height: 34px; }
body.g-system .template-square-modal-card { border-radius: 8px !important; box-shadow: var(--g-shadow-floating); }
body.g-system #communityTemplateModal .template-square-modal-card { max-width: 520px; margin: 0 0 0 auto; min-height: 100dvh; border-radius: 0 !important; }
body.g-system #history .history-filter-details { border: 0; padding: 0; margin-bottom: 20px; }
body.g-system #history .history-filter-details > summary { display: none; }
body.g-system #history .history-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
body.g-system #history .history-filters label { flex: 1 1 115px; min-width: 0; }
body.g-system #history .history-list { gap: 20px; }
body.g-system #history :is(.history-item,.history-result-item,.history-result-card) { border-color: var(--g-border); border-radius: 4px !important; box-shadow: none; }
body.g-system .history-preview-modal { place-items: center; padding: 20px; z-index: 1100; }
body.g-system .history-preview-modal-card { margin: 0; width: min(1480px,100%); height: calc(100dvh - 40px); max-height: none; grid-template-rows: auto minmax(0,1fr) auto; gap: 12px; border-radius: 8px; padding: 20px; }
body.g-system #closeHistoryPreview { min-width: 90px; min-height: 44px; flex: 0 0 auto; white-space: nowrap; }
body.g-system #historyPreviewFrame { min-height: 0; max-height: none; display: flex; flex-direction: column; gap: 12px; overflow: hidden; border: 0; background: none; border-radius: 0; }
body.g-system .history-preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
body.g-system :is(.history-preview-pagination,.history-preview-zoom) { display: flex; align-items: center; gap: 6px; }
body.g-system .history-preview-toolbar .button { min-height: 40px; padding: 8px 12px; white-space: nowrap; }
body.g-system .history-preview-toolbar [aria-pressed=true] { background: var(--g-subtle) !important; border-color: var(--g-primary) !important; }
body.g-system [data-preview-counter],body.g-system [data-preview-scale] { min-width: 52px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
body.g-system .history-preview-stage { flex: 1; min-height: 0; width: 100%; overflow: auto; display: flex; background: #e8e8e3; border: 1px solid var(--g-border); border-radius: 4px; padding: 16px; overscroll-behavior: contain; }
body.g-system .history-preview-stage > img { display: block; flex: 0 0 auto; max-width: none !important; max-height: none !important; margin: auto; object-fit: contain; box-shadow: 0 4px 24px #172a221a; }
body.g-system .history-preview-stage > :is(.history-preview-loading,.empty-state) { margin: auto; }
body.g-system .history-preview-stage .empty-state { display: grid; gap: 16px; justify-items: center; }
body.g-system .history-preview-strip { display: flex; gap: 8px; flex-shrink: 0; overflow-x: auto; padding: 2px; }
body.g-system .history-preview-strip[hidden] { display: none; }
body.g-system .history-preview-strip button { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; flex: 0 0 auto; border: 1px solid var(--g-border); border-radius: 4px; background: white; cursor: pointer; color: var(--g-muted); }
body.g-system .history-preview-strip img { width: 42px; height: 42px; object-fit: contain; background: var(--g-subtle); }
body.g-system .history-preview-strip [aria-pressed=true] { border-color: var(--g-primary); outline: 1px solid var(--g-primary); color: var(--g-primary); background: var(--g-subtle); }
body.g-system #historyPreviewStatus { min-height: 0; margin: 0; font-size: 12px; }
body.studio-ui.g-system.app-route .topbar > .g-logout { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 40px; padding: 8px 14px; white-space: nowrap; color: #954637 !important; border: 1px solid #d9bcb4 !important; background: #fff8f5 !important; }
body.g-system:not(.app-route) .topbar > .g-logout { display: none !important; }
body.g-system .referral-code-box { display: grid; grid-template-columns: 1fr; align-items: center; gap: 14px; background: var(--g-subtle); border-color: var(--g-border); }
body.g-system .referral-code-box strong { color: var(--g-primary); font-size: clamp(18px,2.2vw,28px); letter-spacing: .08em; white-space: nowrap; user-select: all; }
body.g-system #copyReferralCode { justify-self: start; }
body.g-system .referral-code-box > span { grid-column: 1 / -1; }
body.g-system #referralRateText { max-width: 560px; line-height: 1.8; }
@media (max-width: 700px) {
  body.g-system .history-preview-modal { padding: 0; }
  body.g-system .history-preview-modal-card { width: 100%; height: 100dvh; border-radius: 0; padding: 12px; gap: 8px; }
  body.g-system .history-preview-modal-head p { display: none; }
  body.g-system .history-preview-toolbar { gap: 8px; }
  body.g-system .history-preview-zoom { order: 3; width: 100%; justify-content: center; }
  body.g-system .history-preview-toolbar .button { min-height: 44px; }
  body.g-system .history-preview-stage { padding: 8px; }
  body.g-system .history-preview-strip img { width: 34px; height: 34px; }
  body.g-system #historyPreviewStatus { font-size: 11px; line-height: 1.5; }
  body.studio-ui.g-system.app-route .topbar > .g-logout { min-height: 36px; padding: 6px 10px; font-size: 12px; }
}
body.g-system .profile-layout { display: grid !important; grid-template-columns: minmax(0,1fr) 300px !important; gap: 20px; }
body.g-system .profile-layout > .profile-card { grid-column: 1; }
body.g-system .profile-main { grid-column: 1; }
body.g-system .profile-side { grid-column: 2; grid-row: 1/3; }
body.g-system .profile-account-head { border-bottom: 1px solid var(--g-border); padding-bottom: 20px; }
body.g-system .profile-stat-grid { gap: 12px; }
body.g-system .stat { background: var(--g-bg); border: 1px solid var(--g-border); padding: 16px; }
body.g-system .g-page-banner { position: relative; min-height: 180px; display: flex; align-items: center; margin-bottom: 24px !important; overflow: hidden; }
body.g-system .g-page-banner > div { position: relative; z-index: 1; }
body.g-system .g-page-banner::after { content: ''; position: absolute; inset: 0 0 0 48%; background: linear-gradient(90deg,var(--g-bg),transparent 45%), url('/assets/home-products/g-still-life-20260912.webp') center 63%/cover; }
body.g-system .team-workspace-grid,body.g-system .referral-record-grid { gap: 20px; }
body.g-system #cdk .pricing-grid { gap: 16px; }
body.g-system :is(.pricing-card,.package-card,.team-identity-card,.team-stat-card,.referral-card) { border: 1px solid var(--g-border) !important; border-radius: 4px !important; background: #fff !important; box-shadow: none !important; }
body.g-system :is(.pricing-card,.package-card) :is(h3,strong) { color: var(--g-primary); }
body.g-system .g-account-links { display: grid; gap: 0; }
body.g-system .g-account-links a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 12px 16px; border-bottom: 1px solid var(--g-border); text-decoration: none; color: var(--g-text); }
/* Agent: preserve staged workflow while giving setup and confirmation broad editorial space. */
body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) #appView { padding: 32px !important; }
body.g-system #nextWorkspaceHome { --agent-page: var(--g-bg); --agent-panel: #fff; --agent-text: var(--g-text); --agent-accent: var(--g-primary); --agent-accent-soft: var(--g-primary-soft); display: grid; grid-template-columns: minmax(0,1fr) 270px; height: auto !important; min-height: calc(100dvh - 152px); background: transparent; gap: 20px; }
body.g-system #nextWorkspaceHome .agent-conversation-pane { width: 100%; min-width: 0; border: 0; background: transparent; overflow: visible; }
body.g-system .agent-task-header { padding: 0 0 24px; background: transparent; border: 0; }
body.g-system .agent-task-header h1 { font-size: 28px; }
body.g-system .agent-task-kicker { display: none; }
body.g-system .agent-thread { padding: 0; overflow: visible; }
body.g-system .agent-start-message { padding: 0; }
body.g-system .agent-message > .agent-avatar { display: none; }
body.g-system .agent-start-card { border: 1px solid var(--g-border); border-radius: 4px; padding: 20px; max-width: none; width: 100%; background: white; }
body.g-system .agent-preset-panel { border: 0; padding: 24px 0 0; background: transparent; }
body.g-system .agent-preset-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.g-system .agent-preset-card { border-radius: 4px; }
body.g-system #agentPlanCard > div { border: 1px solid var(--g-border); border-radius: 4px; padding: 24px; }
body.g-system .agent-canvas-pane { border: 1px solid var(--g-border); border-radius: 4px; background: white; min-height: 550px; }
body.g-system .agent-approval-actions { gap: 8px; flex-wrap: wrap; }
/* Public pages and authentication. */
body.g-system:not(.app-route):not(.auth-route) .topbar { height: 64px !important; min-height: 64px !important; padding: 0 48px !important; background: var(--g-bg) !important; }
body.g-system .topbar .brand-mark { display: none; }
body.g-system .brand-text-main > span { font: 600 25px/1.2 var(--g-font-display) !important; letter-spacing: .08em !important; }
body.g-system .landing-nav { display: flex !important; gap: 28px; }
body.g-system .landing-nav a { font-size: 13px; }
body.g-system .landing-v2 { max-width: 1440px !important; margin: 0 auto; padding: 0 32px !important; }
body.g-system .landing-v2-hero { display: grid; grid-template-columns: 1fr 1.4fr !important; padding: 32px 0 !important; gap: 32px !important; min-height: 370px; }
body.g-system .landing-v2-copy h1 { font-size: 40px !important; line-height: 1.4 !important; }
body.g-system .landing-v2-kicker { background: none !important; border: 0 !important; padding: 0; font-size: 9px; letter-spacing: .2em; }
body.g-system .landing-v2-copy > p { font-size: 14px; max-width: 460px; }
body.g-system .landing-v2-collage { display: none !important; }
body.g-system .g-landing-photography { display: grid; grid-template-columns: .7fr 22px repeat(3,1fr); align-items: center; gap: 10px; min-width: 0; }
body.g-system .g-landing-photography figure { margin: 0; min-width: 0; }
body.g-system .g-landing-photography img { width: 100%; height: 270px; object-fit: cover; }
body.g-system .g-landing-photography figure:first-child img { height: 175px; }
body.g-system .g-landing-photography figcaption { margin-top: 8px; color: var(--g-muted); font-size: 10px; }
body.g-system .landing-v2-stats { display: none !important; }
body.g-system .g-public-steps { border-block: 1px solid var(--g-border); padding: 24px 0; margin-bottom: 24px; }
body.g-system .g-public-steps h2 { font-size: 20px; }
body.g-system .g-public-steps > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
body.g-system .g-public-steps article { border: 1px solid var(--g-border); padding: 20px; display: flex; gap: 20px; }
body.g-system .g-public-steps b { font-weight: 500; color: var(--g-brass); }
body.g-system .g-public-steps p { margin: 4px 0 0; color: var(--g-muted); font-size: 12px; }
body.g-system .landing-v2-case-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 20px; }
body.g-system .landing-v2-case-grid article { border: 0 !important; border-radius: 0 !important; background: transparent !important; }
body.g-system .landing-v2-case-grid article img { height: 225px; object-fit: cover; }
body.g-system .landing-v2-case-grid article strong { padding: 8px 0 0; font-family: var(--g-font-display); }
body.g-system .landing-v2-case-grid article span { padding-inline: 0; font-size: 11px; }
body.g-system .g-public-view { max-width: 1400px; margin: 32px auto; padding: 0 32px 48px; }
body.g-system .g-public-view h1 { font-size: 40px; margin: 0 0 8px; }
body.g-system .g-public-view .g-public-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin: 24px 0; }
body.g-system .g-public-filter { display: flex; gap: 8px; flex-wrap: wrap; }
body.g-system .g-public-filter button { border: 1px solid var(--g-border); border-radius: 4px; color: var(--g-text); background: #fff; min-height: 40px; padding: 8px 24px; cursor: pointer; }
body.g-system .g-public-filter button[aria-pressed=true] { color: white; background: var(--g-primary); }
body.g-system .g-public-gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px 20px; }
body.g-system .g-public-gallery-grid figure { margin: 0; }
body.g-system .g-public-gallery-grid img { width: 100%; aspect-ratio: 1.7; object-fit: cover; }
body.g-system .g-public-gallery-grid figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--g-border); }
body.g-system .g-public-gallery-grid a { color: var(--g-primary); font-size: 12px; }
body.g-system .g-pricing-layout { display: grid; grid-template-columns: minmax(0,1fr) 28%; gap: 24px; }
body.g-system .g-pricing-layout > img { width: 100%; height: 100%; max-height: 540px; object-fit: cover; }
body.g-system .g-pricing-layout .pricing-section { margin: 0; padding: 0; }
body.g-system .g-pricing-layout .pricing-section > :is(.section-title,.package-note) { display: none; }
body.g-system .g-public-faq { margin-top: 28px; }
body.g-system .g-public-faq details { border-bottom: 1px solid var(--g-border); padding: 14px 0; }
body.g-system .g-public-faq summary { cursor: pointer; }
body.g-system .g-public-faq p { color: var(--g-muted); font-size: 13px; }
body.g-system[data-g-public=gallery] #landingView,body.g-system[data-g-public=pricing] #landingView { display: none !important; }
body.studio-ui.g-system.auth-route .topbar { display: none !important; }
body.studio-ui.g-system.auth-route #landingView { display: grid !important; grid-template-columns: 1fr 42%; width: min(1080px,100%); min-height: 760px; margin: 48px auto !important; padding: 0 !important; background: var(--g-bg); }
body.studio-ui.g-system.auth-route #authPanel { grid-column: 1; grid-row: 1; width: auto !important; max-width: none !important; margin: 0 !important; padding: 60px 72px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; align-self: center; }
body.studio-ui.g-system.auth-route .auth-showcase-v2 { display: block !important; grid-column: 2; grid-row: 1; min-height: 760px; padding: 0 !important; border: 0 !important; background: url('/assets/home-products/g-still-life-20260912.webp') 41% center/cover !important; border-radius: 0 !important; }
body.g-system .auth-showcase-v2 > * { display: none !important; }
body.studio-ui.g-system.auth-route #authPanel #authTitle { font-family: var(--g-font-display) !important; font-weight: 600 !important; color: var(--g-primary); }
body.studio-ui.g-system.auth-route #authPanel .auth-account-tabs { background: transparent !important; border-bottom: 1px solid var(--g-border); border-radius: 0 !important; }
body.studio-ui.g-system.auth-route #authPanel .auth-account-tabs button { border-radius: 0 !important; box-shadow: none !important; }
body.g-system #authPanel .g-brand { margin-bottom: 48px; }
body.g-system #authPanel h2 { font-size: 34px !important; }
body.g-system #authPanel .auth-email-kicker { display: none; }
body.g-system #authPanel .auth-account-tabs { background: transparent; border-bottom: 1px solid var(--g-border); margin-bottom: 24px; }
body.g-system #authPanel .auth-account-tabs button { border-radius: 0; background: transparent; }
body.g-system #authPanel .auth-account-tabs .active { color: var(--g-primary); border-bottom: 2px solid var(--g-primary); }
/* Help keeps its original real documentation and navigation. */
body.g-system.help-route .help-center { max-width: 1400px; padding: 32px; margin: 0 auto; }
body.g-system.help-route .help-hero { padding: 0 0 24px; background: transparent; border: 0; border-radius: 0; }
body.g-system.help-route .help-hero h1 { font-size: 36px; }
body.g-system.help-route .help-hero :is(.help-kicker,.help-version,.help-hero-actions) { display: none; }
body.g-system.help-route .help-layout { display: grid; grid-template-columns: 170px minmax(0,1fr) 220px; gap: 20px; }
body.g-system.help-route .help-toc { border: 0; background: transparent; padding: 0; }
body.g-system.help-route .help-toc a { border-radius: 0; min-height: 40px; padding: 10px 12px; }
body.g-system.help-route .help-section { padding: 24px; border: 1px solid var(--g-border); border-radius: 4px; background: white; }
body.g-system.help-route .help-section-heading h2 { font-size: 22px; }
body.g-system.help-route .help-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.g-system .g-help-search { display: flex; gap: 0; margin-top: 24px; max-width: 1000px; }
body.g-system .g-help-search input { flex: 1; }
body.g-system .g-help-aside { border: 1px solid var(--g-border); padding: 20px; background: white; align-self: start; }
body.g-system .g-help-aside .button { width: 100%; margin-top: 12px; }
body.g-system .g-help-aside h3 { font-size: 20px; margin-top: 0; }
body.g-system .g-help-aside p { color: var(--g-muted); font-size: 12px; }
@media (max-width: 1200px) and (min-width: 981px) {
  body.studio-ui.g-system.app-route #appView { padding: 24px !important; }
  body.g-system #image-edit .generation-layout { grid-template-columns: 280px minmax(0,1fr) !important; }
  body.g-system #image-edit .generation-layout > .result-stack { grid-column: 2; }
  body.g-system .brand-manager-layout { grid-template-columns: 170px minmax(0,1fr) !important; }
  body.g-system .brand-manager-layout > :last-child { grid-column: 2; }
  body.g-system .g-quick-create { flex-wrap: wrap; }
  body.g-system .g-quick-create .g-model-field { flex-basis: 230px; }
}
@media (max-width: 980px) {
  body.studio-ui.g-system.app-route .reference-sidebar { display: none !important; }
  body.studio-ui.g-system.app-route .topbar { left: 0 !important; padding: 0 16px !important; }
  body.g-system.app-route .topbar > .brand { display: flex !important; }
  body.g-system.app-route .g-breadcrumb { display: none; }
  body.g-system.app-route .brand-text-main small { display: none; }
  body.studio-ui.g-system.app-route #appView { margin: 56px 0 0 !important; width: 100% !important; padding: 24px 20px 110px !important; }
  body.g-system .g-bottom-nav { display: none; }
  body.g-system.app-route .g-bottom-nav { display: grid; grid-template-columns: repeat(4,1fr); position: fixed; bottom: 0; inset-inline: 0; padding: 6px 8px max(8px,env(safe-area-inset-bottom)); min-height: 66px; border-top: 1px solid var(--g-border); background: var(--g-bg); z-index: 70; }
  body.g-system .g-bottom-nav a { display: grid; justify-items: center; gap: 2px; align-content: center; min-height: 44px; color: var(--g-muted); font-size: 10px; text-decoration: none; }
  body.g-system .g-bottom-nav a[aria-current=page] { color: var(--g-primary); font-weight: 600; }
  body.g-system .g-bottom-nav svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  body.g-system.app-route :is(.mobile-bottom-nav,.mobile-bottom-tabs,.mobile-workspace-nav,.mobile-app-nav) { display: none !important; }
  body.g-system #nextWorkspaceHome { grid-template-columns: minmax(0,1fr); }
  body.g-system .profile-layout { grid-template-columns: minmax(0,1fr) !important; }
  body.g-system :is(.profile-main,.profile-side,.profile-layout > .profile-card) { grid-column: 1; grid-row: auto; }
  body.g-system .g-edit-canvas { min-height: 450px; }
  body.g-system.help-route .help-layout { grid-template-columns: 150px minmax(0,1fr); }
  body.g-system.help-route .g-help-aside { grid-column: 2; }
}
@media (max-width: 640px) {
  body.g-system :is(.button,button,input,select) { min-height: 44px !important; }
  body.studio-ui.g-system.app-route #appView,body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) #appView { padding: 20px 16px 104px !important; }
  body.g-system.app-route .topbar .app-topbar-status { gap: 6px; }
  body.g-system.app-route .topbar :is(.topbar-balance,.topbar-bell) { display: none !important; }
  body.g-system .g-mode-switch { margin-left: auto; }
  body.g-system .g-mode-switch button { padding-inline: 8px; font-size: 11px; }
  body.g-system.app-route .topbar .g-mode-switch { display: none; }
  body.g-system .section-title { align-items: start; flex-wrap: wrap; gap: 12px !important; }
  body.studio-ui.g-system.app-route :is(.section-title h2,.reference-remix-heading h1,#generation .smart-generation-heading h2) { font-size: 27px !important; }
  body.g-system .section-title > .button { min-height: 36px !important; padding: 6px 10px; font-size: 12px; }
  body.studio-ui.g-system.app-route #schemeAHome { gap: 20px; }
  body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner { height: 280px; min-height: 280px; padding: 16px 12px !important; align-items: center; margin: -20px -16px 0; width: calc(100% + 32px) !important; }
  body.g-system #schemeAHome .scheme-a-hero-banner > div { width: 58%; }
  body.g-system #schemeAHome .studio-hero-photo { width: 58%; height: 100%; top: 0; object-position: 38% 65%; mask-image: linear-gradient(90deg,transparent,#000 18%); }
  body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner h2 { font-size: 32px !important; margin: 10px 0; }
  body.g-system #schemeAHome .studio-eyebrow { font-size: 7px; letter-spacing: .12em; }
  body.g-system #schemeAHome #workspacePersonaGoal { font-size: 12px; max-width: 170px; }
  body.g-system #schemeAHome .saas-primary-actions { margin-top: 16px; }
  body.g-system #schemeAHome .saas-primary-actions .studio-text-link { display: none; }
  body.g-system #schemeAHome .g-quick-create { display: none; }
  body.studio-ui.g-system.app-route #schemeAHome .mobile-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
  body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card { min-height: 68px !important; padding: 10px 8px !important; grid-template-columns: 25px minmax(0,1fr) !important; gap: 0 7px; }
  body.g-system #schemeAHome .mobile-action-card strong { font-size: 12px; }
  body.g-system #schemeAHome .mobile-action-card > span { font-size: 9px; line-height: 1.4 !important; }
  body.g-system #schemeAHome .studio-inspiration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.g-system #schemeAHome .studio-inspiration-card > img { aspect-ratio: 1.2; }
  body.g-system #schemeAHome .studio-inspiration-card strong { font-size: 12px; }
  body.g-system #schemeAHome .newcomer-demo { padding: 16px !important; }
  body.g-system .g-extra-home { font-size: 12px; }
  body.studio-ui.g-system.app-route #generation .smart-generation-layout,
  body.g-system #image-edit .generation-layout,
  body.g-system :is(.online-batch-layout,.translation-layout,.remix-layout,.slicer-layout,.brand-manager-layout,.reference-remix-layout,.listing-suite-grid,#batch .batch-layout,#image-audit .audit-layout) { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 16px !important; }
  body.g-system :is(.online-batch-layout,.listing-suite-grid,.brand-manager-layout) > * { grid-column: 1 !important; grid-row: auto !important; }
  body.g-system .subcard,body.g-system #generation .g-generation-inputs { padding: 16px; }
  body.g-system #generation .smart-result-panel { min-height: 200px; }
  body.g-system #generationResultPreview { min-height: 220px; }
  body.g-system #generation .smart-generate-submit { position: sticky; bottom: 78px; z-index: 5; box-shadow: 0 4px 12px #163e3520 !important; }
  body.g-system .g-edit-canvas { min-height: 360px; }
  body.g-system .g-edit-canvas-stage { min-height: 270px; }
  body.g-system :is(.online-results-grid,.online-result-grid,.history-results,.history-result-grid) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.g-system .g-workflow-steps { gap: 16px; font-size: 11px; }
  body.g-system #template-square .template-square-grid { grid-template-columns: minmax(0,1fr) !important; }
  body.g-system #history .history-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  body.g-system #history .history-filter-details > summary { display: block; }
  body.g-system .g-page-banner { min-height: 155px; }
  body.g-system .g-page-banner h2 { max-width: 65%; }
  body.g-system .g-page-banner p { max-width: 65%; font-size: 12px; }
  body.g-system #nextWorkspaceHome .agent-canvas-pane { min-height: 360px; }
  body.g-system .agent-start-card { padding: 16px; }
  body.g-system .agent-preset-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.g-system .g-landing-photography { gap: 6px; }
  body.g-system .g-landing-photography img { height: 170px; }
  body.g-system .g-landing-photography figure:first-child img { height: 110px; }
  body.g-system:not(.app-route):not(.auth-route) .topbar { padding: 0 16px !important; height: 56px !important; }
  body.g-system .landing-nav { display: none !important; }
  body.g-system .landing-v2 { padding: 0 16px !important; }
  body.g-system .landing-v2-hero { grid-template-columns: minmax(0,1fr) !important; padding: 24px 0 !important; gap: 24px !important; }
  body.g-system .landing-v2-copy h1 { font-size: 32px !important; }
  body.g-system .landing-v2-case-grid { grid-template-columns: minmax(0,1fr) !important; }
  body.g-system .g-public-steps > div { grid-template-columns: minmax(0,1fr); gap: 10px; }
  body.g-system .g-public-steps article { padding: 14px; }
  body.g-system .g-public-view { padding: 0 16px 32px; margin-top: 24px; }
  body.g-system .g-public-view h1 { font-size: 30px; }
  body.g-system .g-public-view .g-public-toolbar { align-items: stretch; flex-direction: column; }
  body.g-system .g-public-filter button { padding-inline: 14px; }
  body.g-system .g-public-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 10px; }
  body.g-system .g-public-gallery-grid img { aspect-ratio: 1; }
  body.g-system .g-public-gallery-grid figcaption { font-size: 12px; flex-direction: column; }
  body.g-system .g-pricing-layout { grid-template-columns: minmax(0,1fr); }
  body.g-system .g-pricing-layout > img { max-height: 200px; }
  body.studio-ui.g-system.auth-route #landingView { grid-template-columns: minmax(0,1fr); margin: 0 !important; min-height: 100dvh; }
  body.studio-ui.g-system.auth-route #authPanel { padding: 36px 28px !important; align-self: start; }
  body.studio-ui.g-system.auth-route .auth-showcase-v2 { display: none !important; }
  body.g-system #authPanel .g-brand { margin-bottom: 40px; }
  body.g-system.help-route .help-center { padding: 24px 16px; }
  body.g-system.help-route .help-layout { grid-template-columns: minmax(0,1fr); }
  body.g-system.help-route .help-toc { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
  body.g-system.help-route .help-toc a { flex: 0 0 auto; }
  body.g-system.help-route .help-toc > strong { display: none; }
  body.g-system.help-route .help-section { padding: 16px; }
  body.g-system.help-route .help-steps { grid-template-columns: minmax(0,1fr); }
  body.g-system.help-route .g-help-aside { grid-column: 1; }
  body.g-system.app-route :is(.customer-service-fab,.feedback-fab) { display: none !important; }
  body.g-system .g-mobile-help-link { display: block; }
}
@media (prefers-reduced-motion: reduce) { body.g-system *,body.g-system *::before,body.g-system *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Reflow existing functional panels without hiding their controls. */
body.studio-ui.g-system.app-route #online-batch .online-batch-layout { grid-template-columns: minmax(340px,.8fr) minmax(0,1.2fr) !important; }
body.studio-ui.g-system.app-route #online-batch .online-results-panel { grid-column: 2 !important; grid-row: 1/3 !important; min-width: 0; }
body.studio-ui.g-system.app-route #online-batch .online-param-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
body.studio-ui.g-system.app-route #online-batch .online-prompt-tip { display: block; padding: 8px; font-size: 11px; }
body.studio-ui.g-system.app-route #online-batch .online-prompt-tip strong { display: block; }
body.studio-ui.g-system.app-route #online-batch .online-global-prompt textarea { min-height: 100px; }
body.studio-ui.g-system.app-route #online-batch .online-source-tabs { gap: 4px; }
body.studio-ui.g-system.app-route #online-batch .online-mode-button { padding: 8px; border-radius: 4px; }
body.studio-ui.g-system.app-route #image-audit .image-audit-layout { display: grid !important; grid-template-columns: minmax(340px,.8fr) minmax(0,1.2fr) !important; gap: 20px; align-items: start; }
body.studio-ui.g-system.app-route #image-audit .image-audit-layout > * { min-width: 0; }
body.studio-ui.g-system.app-route #image-audit .g-audit-inputs { display: grid; gap: 16px; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-layout { display: grid !important; grid-template-columns: minmax(330px,.85fr) minmax(240px,1fr) minmax(260px,1fr) !important; align-items: start; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-form { min-width: 0; }
body.g-system .g-reference-canvas,body.g-system .g-reference-results { padding: 20px; border: 1px solid var(--g-border); background: white; min-height: 600px; min-width: 0; }
body.g-system .g-reference-canvas h3,body.g-system .g-reference-results h3 { font: 600 15px/1.5 var(--g-font-body) !important; margin: 0 0 16px; }
body.g-system .g-reference-canvas #referenceRemixReferencePreview { min-height: 450px; display: grid; grid-template-columns: 1fr; align-content: start; }
body.g-system .g-reference-canvas .reference-remix-preview-item img { max-height: 450px; object-fit: contain; }
body.g-system .g-reference-results:has(#referenceRemixProgress:not(.hidden)) .g-reference-empty { display: none; }
body.g-system .g-reference-results #referenceRemixProgress { margin: 0; padding: 0; border: 0; }
body.g-system .g-reference-results #referenceRemixJobList { display: grid; grid-template-columns: 1fr; }
body.g-system .g-reference-results #referenceRemixProgress > header { display: block; font-size: 11px; }
body.g-system .g-reference-guide-details { margin-top: 24px; font-size: 12px; }
body.g-system .g-reference-guide-details .reference-remix-guide { padding: 12px 0; border: 0; position: static; }
body.g-system .g-reference-guide-details h2 { font-size: 16px !important; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-upload-actions { flex-wrap: wrap; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-upload-actions input[type=url] { flex-basis: 100%; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-choice-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-mode-grid { grid-template-columns: 1fr; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-mode-grid small { font-size: 11px; }
body.studio-ui.g-system.app-route #image-slicer .slicer-layout { grid-template-columns: minmax(230px,.8fr) minmax(310px,1fr) minmax(0,1.3fr) !important; }
body.studio-ui.g-system.app-route #image-slicer .slicer-layout > * { min-width: 0; }
body.studio-ui.g-system.app-route #profile .profile-main-stack { grid-column: 1; grid-row: 2; }
body.studio-ui.g-system.app-route #profile .profile-side-stack { grid-column: 2; grid-row: 1/3; }
body.studio-ui.g-system.app-route #template-square .template-square-hero { min-height: 0 !important; height: auto !important; padding: 0 0 24px !important; }
body.studio-ui.g-system.app-route #template-square .template-square-switcher { margin: 0 0 20px; }
body.studio-ui.g-system.app-route #template-square :is(#templateSquareDiscoverPanel,#templateSquareMinePanel) { padding: 0 !important; }
body.studio-ui.g-system:not(.app-route):not(.auth-route) .shell { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
body.studio-ui.g-system:not(.app-route):not(.auth-route) #landingView { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
body.studio-ui.g-system:not(.app-route) .g-mode-switch,body.studio-ui.g-system:not(.app-route) .app-topbar-status { display: none !important; }
body.studio-ui.g-system .landing-v2 { width: min(1280px,100%) !important; max-width: 100% !important; margin: auto !important; }
body.studio-ui.g-system .landing-v2-hero { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr) !important; }
body.studio-ui.g-system[data-g-public=pricing] #pricingPlans { display: block !important; }
body.studio-ui.g-system[data-g-public=pricing] #pricingPlans .section-title { display: none; }
body.studio-ui.g-system[data-g-public=pricing] .pricing-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
body.g-system .g-public-toolbar .g-public-filter { display: flex; width: auto; flex-wrap: wrap; flex: 1; gap: 0; }
body.g-system .g-public-toolbar .g-public-filter button { width: auto; min-height: 40px; }
body.g-system .g-public-toolbar > input { flex: 0 0 280px; width: 280px; }
body.g-system .g-public-toolbar .g-public-filter button { flex: 0 0 auto; white-space: nowrap; }
body.studio-ui.g-system.app-route #appView .compact-form label:has(input[type=file]) { border-radius: 4px; background: var(--g-bg); border-color: var(--g-border); }
body.studio-ui.g-system.app-route #appView .compact-form label:has(input[type=file])::after { background: var(--g-primary); border-radius: 4px; box-shadow: none; }
body.studio-ui.g-system.app-route .profile-avatar { background: var(--g-primary); box-shadow: none; border-radius: 4px; }
body.studio-ui.g-system.app-route #image-audit .audit-template-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
body.studio-ui.g-system.app-route #image-audit .audit-template-header { display: block; }
body.studio-ui.g-system.app-route #image-audit :is(.audit-platform-tabs,.audit-check-grid,.audit-form-grid) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
body.studio-ui.g-system.app-route #image-audit .audit-stack * { min-width: 0; }
body.g-system #nextWorkspaceHome .agent-canvas-actions { display: flex; flex-wrap: wrap; }
body.g-system #nextWorkspaceHome .agent-canvas-actions > * { min-width: 0; }
body.g-system.help-route .help-hero::after { display: none; }
body.g-system.help-route .help-steps li { display: block; min-width: 0; padding: 16px; }
body.g-system.help-route .help-steps li::before { display: block; position: static; margin-bottom: 12px; }
body.g-system.help-route .help-steps li strong,body.g-system.help-route .help-steps li span { display: block; width: auto; margin: 0; }
body.g-system.help-route .help-steps li span { margin-top: 8px; font-size: 12px; line-height: 1.8; }
body.g-system.help-route .help-content { grid-template-columns: minmax(0,1fr); }
body.g-system.help-route .help-section { min-width: 0; }
body.g-system.help-route .help-steps li::before { text-align: center; line-height: 30px; }
body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) .shell { display: block !important; height: auto !important; overflow: visible; }
body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) .reference-sidebar { position: fixed !important; display: flex !important; width: 206px !important; padding: 0 0 16px !important; background: #f7f6f2 !important; }
body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) .topbar { display: flex !important; }
body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) #appView { width: calc(100% - 206px) !important; height: auto !important; margin: 56px 0 0 206px !important; overflow: visible !important; }
body.studio-ui.g-system.workspace-ui-next.app-route #nextWorkspaceHome { width: 100% !important; min-width: 0; grid-template-columns: minmax(0,1fr) 270px !important; }
body.g-system #nextWorkspaceHome .agent-message,body.g-system #nextWorkspaceHome .agent-message > div { min-width: 0; max-width: 100%; }
body.g-system #nextWorkspaceHome .agent-message:not(.hidden) { display: block; width: 100%; }
body.g-system #nextWorkspaceHome .agent-message > div { width: 100%; }
body.g-system #nextWorkspaceHome #agentCanvasGrid.is-empty { display: grid; grid-template-columns: minmax(0,1fr) !important; padding: 16px; }
body.g-system #nextWorkspaceHome #agentCanvasGrid.is-empty > * { width: 100%; min-width: 0; max-width: 100%; }
body.g-system #nextWorkspaceHome .agent-canvas-progress { padding: 16px; border-radius: 4px; box-shadow: none; }
body.g-system #nextWorkspaceHome .agent-canvas-progress strong { font-size: 18px; }
body.g-system #nextWorkspaceHome .agent-canvas-progress ol { display: grid; grid-template-columns: 1fr; gap: 8px; }
body.g-system #nextWorkspaceHome .agent-canvas-slots { display: grid; grid-template-columns: minmax(0,1fr); }
body.g-system #nextWorkspaceHome #agentApproveButton { background: var(--g-primary) !important; }
body.studio-ui.g-system.workspace-ui-next.app-route #nextWorkspaceHome:is([data-stage=generating],[data-stage=results],[data-stage=editing]) { grid-template-columns: minmax(320px,.75fr) minmax(0,1.25fr) !important; }
body.g-system #nextWorkspaceHome .agent-conversation-pane { grid-column: 1 !important; }
body.g-system #nextWorkspaceHome .agent-canvas-pane { grid-column: 2 !important; display: block !important; }
body.g-system #nextWorkspaceHome .agent-preset-list { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; overflow: visible; }
body.g-system #nextWorkspaceHome .agent-preset-card { width: auto; min-width: 0; }
@media(max-width:1100px) {
 body.studio-ui.g-system.app-route #reference-remix .reference-remix-layout { grid-template-columns: minmax(300px,1fr) minmax(0,1fr) !important; }
 body.g-system .g-reference-results { grid-column: 2; }
 body.studio-ui.g-system.app-route #image-slicer .slicer-layout { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
 body.studio-ui.g-system.app-route #image-slicer .slicer-layout > :last-child { grid-column: 1/-1; }
}
@media(min-width:641px) and (max-width:980px) {
 body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) .reference-sidebar { display: none !important; }
 body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) #appView { width: 100% !important; margin: 56px 0 0 !important; }
 body.studio-ui.g-system.app-route #profile :is(.profile-main-stack,.profile-side-stack) { grid-column: 1; grid-row: auto; }
}
@media(max-width:640px) {
 body.studio-ui.g-system.workspace-ui-next.app-route #nextWorkspaceHome:is([data-stage=generating],[data-stage=results],[data-stage=editing]) { grid-template-columns: minmax(0,1fr) !important; }
 body.g-system .g-page-banner { align-content: center; }
 body.g-system .g-page-banner > div { width: 60%; }
 body.g-system .g-page-banner h2 { max-width: 100%; font-size: 25px !important; }
 body.g-system .g-page-banner > .button { width: auto; position: relative; z-index: 1; }
 body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner > div { margin: 0 !important; text-align: left; width: 62%; }
 body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner { flex-direction: row !important; justify-content: flex-start !important; }
 body.g-system #schemeAHome .saas-primary-actions { display: flex !important; width: auto; }
 body.g-system #schemeAHome .saas-primary-actions .button { width: auto !important; }
 body.studio-ui.g-system.app-route #online-batch .online-source-tabs { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); }
 body.g-system #online-batch .online-mode-button small { display: none; }
 body.g-system .profile-stat-grid,body.g-system .team-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
 body.g-system .g-public-toolbar > input { flex: 0 0 auto; width: 100%; }
 body.studio-ui.g-system.app-route #online-batch .online-batch-layout,body.studio-ui.g-system.app-route #image-audit .image-audit-layout,body.studio-ui.g-system.app-route #reference-remix .reference-remix-layout,body.studio-ui.g-system.app-route #image-slicer .slicer-layout { grid-template-columns: minmax(0,1fr) !important; }
 body.studio-ui.g-system.app-route #online-batch .online-batch-layout > *,body.g-system .g-reference-results,body.studio-ui.g-system.app-route #profile :is(.profile-main-stack,.profile-side-stack) { grid-column: 1 !important; grid-row: auto !important; }
 body.g-system .g-reference-canvas,body.g-system .g-reference-results { min-height: 250px; }
 body.g-system .g-reference-canvas #referenceRemixReferencePreview { min-height: 220px; }
 body.studio-ui.g-system .landing-v2-hero { grid-template-columns: minmax(0,1fr) !important; }
 body.studio-ui.g-system[data-g-public=pricing] .pricing-grid { grid-template-columns: minmax(0,1fr); }
 body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) .reference-sidebar { display: none !important; }
 body.studio-ui.g-system.workspace-ui-next.app-route:has(.agent-workspace:not([hidden])) #appView { width: 100% !important; margin: 56px 0 0 !important; padding: 20px 16px 100px !important; }
 body.studio-ui.g-system.workspace-ui-next.app-route #nextWorkspaceHome { grid-template-columns: minmax(0,1fr) !important; }
 body.g-system #nextWorkspaceHome .agent-canvas-pane { grid-column: 1 !important; display: none !important; }
 body.g-system #nextWorkspaceHome[data-mobile-pane=results] .agent-canvas-pane { display: block !important; }
 body.g-system #nextWorkspaceHome .agent-preset-list { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

/* Reset legacy positional rules on the reflowed DOM, including old !important grids. */
body.studio-ui.g-system.app-route #generation #generationForm { display: flex !important; flex-direction: column; gap: 12px !important; margin: 0 !important; }
body.studio-ui.g-system.app-route #generation #generationForm > * { grid-column: auto !important; grid-row: auto !important; order: 0 !important; width: 100%; min-width: 0; }
body.studio-ui.g-system.app-route #generation #generationForm .g-model-field { padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; }
body.studio-ui.g-system.app-route #generation .smart-recommend-action { padding: 0 !important; display: block !important; margin: 4px 0 !important; }
body.studio-ui.g-system.app-route #generation .smart-recommend-button { min-height: 30px !important; height: 30px !important; }
body.studio-ui.g-system.app-route #generation #generationFields .field-hint { display: none; }
body.studio-ui.g-system.app-route #generation .unified-create-options .field-hint { display: none; }
body.studio-ui.g-system.app-route #generation #generationEstimatedTime { height: auto; min-height: 0; padding: 0; font-size: 11px; background: transparent; }
body.studio-ui.g-system.app-route #generation .smart-more-settings { min-height: 0 !important; padding: 8px 12px !important; }
body.studio-ui.g-system.app-route #generation .smart-more-settings > summary { padding: 0 !important; min-height: 24px; }
body.studio-ui.g-system.app-route #generation .smart-generation-layout > .g-generation-inputs { grid-column: 1 !important; grid-row: 1 !important; }
body.studio-ui.g-system.app-route #generation .smart-generation-layout > aside.smart-result-panel { grid-column: 2 !important; grid-row: 1 !important; }
body.studio-ui.g-system.app-route #generation .g-generation-inputs :is(.generation-upload-panel,.smart-compose-panel) { min-height: 0 !important; height: auto !important; display: block; }
body.studio-ui.g-system.app-route #generation .generation-source-preview:not(:has(img)) { display: none !important; }
body.studio-ui.g-system.app-route #generation .generation-upload-dropzone { min-height: 116px !important; padding: 14px !important; gap: 4px !important; }
body.studio-ui.g-system.app-route #generation .generation-upload-dropzone strong { font-size: 13px !important; }
body.studio-ui.g-system.app-route #generation .generation-upload-dropzone small { font-size: 10px !important; }
body.studio-ui.g-system.app-route #generation .generation-upload-icon { background: transparent !important; color: var(--g-primary) !important; width: 24px !important; height: 24px !important; font-size: 22px !important; }
body.studio-ui.g-system.app-route #generation .smart-intent-button { min-height: 32px !important; border-radius: 4px !important; padding: 6px !important; }
body.studio-ui.g-system.app-route #generation .smart-intent-button.active { color: #fff !important; background: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #generation .smart-intent-button.active strong { color: #fff !important; }
body.studio-ui.g-system.app-route #generation .smart-product-info-box textarea { min-height: 104px !important; }
body.studio-ui.g-system.app-route #generation .generation-mode-tabs { padding: 0 !important; background: transparent !important; border-radius: 0 !important; }
body.studio-ui.g-system.app-route #generation .generation-mode-tab { border-radius: 0 !important; }
body.studio-ui.g-system.app-route #generation :is(.smart-output-count,.unified-output-size) { padding: 0 !important; border: 0 !important; background: transparent !important; }
body.studio-ui.g-system.app-route #generation .unified-create-options { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px; }
body.studio-ui.g-system.app-route #appView .section-title { background: transparent !important; }
body.studio-ui.g-system.app-route #appView :is(.subcard,.result-preview,.empty-state,.reference-remix-form,.reference-remix-guide,.reference-remix-step,.reference-remix-preview-grid,.reference-remix-mode-grid label,.reference-remix-choice-row label,.online-source-panel,.online-settings-panel) { border-radius: 4px !important; box-shadow: none !important; border-color: var(--g-border) !important; }
body.studio-ui.g-system.app-route #appView :is(.field-hint,.auth-only-note,.empty-state) { font-size: 12px !important; line-height: 1.6 !important; font-weight: 400 !important; }
body.studio-ui.g-system.app-route #appView .result-preview > span { border: 0 !important; border-radius: 0 !important; background: none !important; }
body.studio-ui.g-system.app-route #appView :is(input[type=file],.gpt-file-proxy,.gpt-upload-trigger) { border-color: var(--g-border) !important; background: var(--g-bg) !important; }
body.studio-ui.g-system.app-route #appView input[type=file]::file-selector-button { background: var(--g-primary) !important; color: white !important; border: 0; border-radius: 4px; }
body.studio-ui.g-system.app-route #image-edit .online-param-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; width: 100% !important; }
body.studio-ui.g-system.app-route #image-edit .online-param-grid label { min-width: 0; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings .field-hint { font-size: 11px !important; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings #gptPrompt { min-height: 110px; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings :is(.prompt-optimize-actions,.gpt-mode-unified) .field-hint { display: none; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings #gptForm > label:has(#gptPrompt) .field-hint { max-height: none; overflow: visible; }
body.studio-ui.g-system.app-route #image-edit .g-team-template-options { font-size: 12px; border: 1px solid var(--g-border); padding: 8px 10px; }
body.studio-ui.g-system.app-route #image-edit .g-team-template-options .subcard { border: 0; padding: 12px 0; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-step { padding: 14px 16px !important; background: white !important; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-step-title { gap: 10px; margin-bottom: 10px; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-step-title b { width: 24px; height: 24px; background: var(--g-primary); }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-step-title h2 { font: 600 14px/1.5 var(--g-font-body) !important; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-step-title p { font-size: 11px; margin: 2px 0 0; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-mode-grid label:has(:checked),body.studio-ui.g-system.app-route #reference-remix .reference-remix-choice-row label:has(:checked) { border-color: var(--g-primary) !important; background: var(--g-primary-soft) !important; box-shadow: none; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-guide { background: white; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-heading > div > span { display: none; }
body.studio-ui.g-system.app-route #reference-remix .reference-remix-more,body.studio-ui.g-system.app-route #reference-remix .g-model-field { margin: 12px 16px; }
@media (max-width:640px) {
 body.studio-ui.g-system.app-route #generation .smart-generation-layout > :is(.g-generation-inputs,aside.smart-result-panel) { grid-column: 1 !important; grid-row: auto !important; }
 body.studio-ui.g-system.app-route #image-edit .online-param-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

/* Page audit: reset legacy intrinsic widths and component states on the G surface. */
body.studio-ui.g-system.app-route #appView #schemeAHome { align-items: stretch !important; }
body.studio-ui.g-system.app-route #schemeAHome > :is(.scheme-a-hero-banner,.g-quick-create,.scheme-a-quick,.studio-inspiration,.g-extra-home) { width: 100% !important; max-width: none !important; flex-shrink: 0; }
body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner { display: flex !important; align-items: center !important; justify-content: flex-start !important; }
body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner > div { width: 43%; flex: 0 0 43%; margin: 0 !important; text-align: left; z-index: 1; }
body.studio-ui.g-system.app-route #schemeAHome .studio-hero-photo { right: 0; top: 0; width: 57%; }
body.studio-ui.g-system.app-route #schemeAHome .saas-primary-actions { display: flex !important; flex-wrap: wrap; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-grid { width: 100%; grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
body.studio-ui.g-system.app-route #appView :is(.smart-card-title .pill,.online-panel-number,.slicer-step-index,.purchase-flow-step > span) { background: var(--g-primary) !important; color: white !important; border-radius: 4px !important; }
body.studio-ui.g-system.app-route #generation .smart-card-title .pill { background: none !important; color: var(--g-primary) !important; border: 0 !important; padding: 0 !important; font-size: 14px !important; }
body.studio-ui.g-system.app-route #appView :is(.audit-tab,.slicer-choice-card,.purchase-target-option,.reference-remix-choice-row label,.reference-remix-mode-grid label,.remix-mode-option) { border: 1px solid var(--g-border) !important; border-radius: 4px !important; background: white !important; color: var(--g-text) !important; box-shadow: none !important; }
body.studio-ui.g-system.app-route #appView :is(.audit-tab,.slicer-choice-card,.purchase-target-option,.reference-remix-choice-row label,.reference-remix-mode-grid label,.remix-mode-option):has(input:checked) { border-color: var(--g-primary) !important; background: var(--g-primary-soft) !important; color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #appView :is(.audit-tab,.slicer-choice-card,.purchase-target-option,.reference-remix-choice-row label,.reference-remix-mode-grid label):has(input:checked) :is(strong,span,small) { color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #appView :is(.package-card,.purchase-target-card,.purchase-flow-step,.team-member-card,.slicer-step-card,.audit-template-card,.online-batch-hero,.translation-canvas-editor) { border-radius: 4px !important; box-shadow: none !important; border-color: var(--g-border) !important; background: white !important; }
body.studio-ui.g-system.app-route #appView .package-card.featured { border-color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #appView .purchase-flow > li { border-radius: 4px !important; border-color: var(--g-border) !important; background: white !important; }
body.studio-ui.g-system.app-route #appView .purchase-flow > li > b { border-radius: 4px !important; background: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #appView .package-card strong { color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #appView :is(.package-card-badge,.team-period-filter button,.online-source-tab,.agent-preset-category-button) { border-radius: 4px !important; box-shadow: none !important; }
body.studio-ui.g-system.app-route #appView .team-period-filter button.active { background: var(--g-primary) !important; color: white !important; }
body.studio-ui.g-system.app-route #appView .status { border-radius: 4px !important; padding: 8px 12px; font-size: 12px; line-height: 1.6; }
body.studio-ui.g-system.app-route #appView .status:empty { display: none !important; }
body.studio-ui.g-system.app-route #appView .status.success { background: var(--g-primary-soft) !important; color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #online-batch .online-result-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
body.studio-ui.g-system.app-route #image-audit .image-audit-layout { grid-template-columns: minmax(340px,.85fr) minmax(0,1.15fr) !important; gap: 16px; align-items: start; }
body.studio-ui.g-system.app-route #image-audit .audit-platform-tabs { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
body.studio-ui.g-system.app-route #image-audit .audit-result-panel { margin-top: 0; min-height: 480px; }
body.studio-ui.g-system.app-route #reference-remix #referenceRemixReferencePreview { display: grid; align-content: center; }
body.studio-ui.g-system.app-route #appView #historyList > .empty-state { min-height: 260px; display: grid; place-items: center; }
body.studio-ui.g-system.app-route #appView #generation[data-generation-mode=suite] :is(.smart-generation-layout,.smart-generation-steps,.smart-generation-advanced) { display: none !important; }
body.studio-ui.g-system.app-route #history #historyList,body.studio-ui.g-system.app-route #history .history-batch-grid { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 16px !important; align-items: start; }
body.studio-ui.g-system.app-route #history :is(.history-date-heading,.history-batch-group,#historyList > .empty-state) { grid-column: 1/-1; }
body.studio-ui.g-system.app-route #history .history-batch-group:not(:has(.history-row:nth-child(2))) { grid-column: auto; }
body.studio-ui.g-system.app-route #history .history-batch-group:not(:has(.history-row:nth-child(2))) .history-batch-grid { grid-template-columns: minmax(0,1fr) !important; }
body.studio-ui.g-system.app-route #history .history-batch-group { padding: 0 !important; border: 0 !important; background: transparent !important; }
body.studio-ui.g-system.app-route #history .history-batch-group > summary { padding: 8px 0 12px; }
body.studio-ui.g-system.app-route #history .history-row { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 12px; padding: 0 0 16px !important; border: 1px solid var(--g-border) !important; border-radius: 4px !important; background: white !important; box-shadow: none !important; min-width: 0; overflow: hidden; }
body.studio-ui.g-system.app-route #history .history-preview { width: 100% !important; height: auto !important; min-height: 0 !important; aspect-ratio: 1.4; border: 0 !important; border-radius: 0 !important; background: var(--g-subtle); }
body.studio-ui.g-system.app-route #history .history-preview img { width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain; border-radius: 0 !important; }
body.studio-ui.g-system.app-route #history .history-preview:not(.history-preview-multi) { position: relative; }
body.studio-ui.g-system.app-route #history .history-preview:not(.history-preview-multi) img { position: absolute; inset: 0; }
body.studio-ui.g-system.app-route #history .history-row > div:not(.history-preview) { width: 100%; padding: 0 16px; min-width: 0; }
body.studio-ui.g-system.app-route #history .history-row h3 { margin: 0 0 6px; font-size: 18px !important; overflow-wrap: anywhere; }
body.studio-ui.g-system.app-route #history .history-meta { gap: 4px; flex-wrap: wrap; }
body.studio-ui.g-system.app-route #history .history-meta .pill { border: 0 !important; border-radius: 4px !important; background: var(--g-subtle) !important; padding: 2px 6px; font-size: 11px; }
body.studio-ui.g-system.app-route #history .history-actions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: auto; }
body.studio-ui.g-system.app-route #history .history-actions .button { min-width: 0 !important; width: 100%; padding: 8px !important; }
body.studio-ui.g-system.app-route #history :is(.g-history-more,.history-safe-continue,.history-preview-select-row) { grid-column: 1/-1; }
body.studio-ui.g-system.app-route #history :is(.g-history-info,.g-history-more) { font-size: 12px; color: var(--g-muted); }
body.studio-ui.g-system.app-route #appView #history .history-actions .g-history-more { display: block !important; }
body.studio-ui.g-system.app-route #appView #history .history-row > div > p.field-hint { display: block !important; line-height: 1.6; overflow-wrap: anywhere; }
body.studio-ui.g-system.app-route #history :is(.g-history-info,.g-history-more) > summary { cursor: pointer; padding: 6px 0; }
body.studio-ui.g-system.app-route #history .g-history-more > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 8px; }
body.studio-ui.g-system.app-route #history .g-history-more :is(.history-appeal,.history-appeal-result,.export-status) { grid-column: 1/-1; }

/* Compact gallery; the existing detail dialog retains instructions and parameters. */
body.studio-ui.g-system.app-route #template-square .template-square-hero { display: flex !important; align-items: start; gap: 24px; padding-bottom: 20px !important; }
body.studio-ui.g-system.app-route #template-square .template-square-hero-copy { flex: 1; min-width: 0; }
body.studio-ui.g-system.app-route #template-square .template-square-hero-copy > :is(.eyebrow,.template-square-stats) { display: none; }
body.studio-ui.g-system.app-route #template-square .template-square-hero-copy h2 { margin: 0 0 8px !important; }
body.studio-ui.g-system.app-route #template-square .template-square-hero-copy p { font-size: 12px; line-height: 1.7; margin: 0; max-width: 520px; }
body.studio-ui.g-system.app-route #template-square .template-square-toolbar { display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 10px; width: min(440px,45%); align-items: end; }
body.studio-ui.g-system.app-route #template-square .template-square-search-row { grid-column: 1/-1; width: 100%; margin: 0 !important; gap: 8px; }
body.studio-ui.g-system.app-route #template-square .template-square-search { padding: 0 !important; border: 0 !important; background: none !important; }
body.studio-ui.g-system.app-route #template-square .g-model-field { display: flex; align-items: center; gap: 10px; font-size: 12px; }
body.studio-ui.g-system.app-route #template-square .g-model-label { white-space: nowrap; }
body.studio-ui.g-system.app-route #template-square .g-model-trigger { width: 160px; flex: 1; }
body.studio-ui.g-system.app-route #template-square :is(.button,.template-square-tab,.template-square-category) { border-radius: 4px !important; box-shadow: none !important; }
body.studio-ui.g-system.app-route #template-square .button:not(.secondary) { background: var(--g-primary) !important; color: white !important; }
body.studio-ui.g-system.app-route #template-square .template-square-switcher { width: 100%; background: none !important; border: 0 !important; border-bottom: 1px solid var(--g-border) !important; border-radius: 0 !important; padding: 0 !important; margin-bottom: 16px !important; gap: 24px; }
body.studio-ui.g-system.app-route #template-square .template-square-tab { padding: 10px 0 !important; border: 0 !important; border-bottom: 2px solid transparent !important; background: none !important; color: var(--g-muted) !important; border-radius: 0 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-tab.is-active { border-bottom-color: var(--g-primary) !important; color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #template-square .template-square-categories { gap: 8px; margin: 0 0 12px !important; }
body.studio-ui.g-system.app-route #template-square .template-square-categories button { min-height: 36px; padding: 6px 14px !important; border-radius: 4px !important; background: transparent !important; color: var(--g-muted) !important; box-shadow: none !important; }
body.studio-ui.g-system.app-route #template-square .template-square-categories button.is-active { background: var(--g-primary-soft) !important; color: var(--g-primary) !important; border-color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #template-square .template-square-summary { margin: 0 0 12px !important; min-height: 0; }
body.studio-ui.g-system.app-route #template-square #templateSquareModeHint { font-size: 12px; padding: 0; background: none; border: 0; }
body.studio-ui.g-system.app-route #template-square .template-square-cover { height: auto !important; aspect-ratio: 1.55 !important; min-height: 0 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body { padding: 16px !important; gap: 8px !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body h3 { font-size: 18px !important; line-height: 1.5; margin: 0 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body > p { font-size: 12px !important; line-height: 1.6; min-height: 0 !important; margin: 0 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body > :is(.template-square-actions,.template-square-io) { display: none; }
body.studio-ui.g-system.app-route #template-square .template-square-card-footer { padding-top: 8px !important; gap: 10px; }
body.studio-ui.g-system.app-route #template-square .template-square-uploader { font-size: 11px; }
body.studio-ui.g-system.app-route #template-square:has([data-template-square-view=mine][aria-selected=true]) .template-square-search-row { display: none; }
@media (max-width:1100px) and (min-width:641px) {
 body.studio-ui.g-system.app-route #history #historyList,body.studio-ui.g-system.app-route #history .history-batch-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
 body.studio-ui.g-system.app-route #appView :is(.translation-layout,.remix-layout) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
 body.studio-ui.g-system.app-route #appView :is(.translation-layout,.remix-layout) > :last-child { grid-column: 1/-1; }
}
@media (max-width:640px) {
 body.studio-ui.g-system.app-route #history #historyList,body.studio-ui.g-system.app-route #history .history-batch-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
 body.studio-ui.g-system.app-route #history .history-row > div:not(.history-preview) { padding: 0 10px; }
 body.studio-ui.g-system.app-route #history .history-row h3 { font-size: 15px !important; }
 body.studio-ui.g-system.app-route #history .history-actions { grid-template-columns: minmax(0,1fr); }
 body.studio-ui.g-system.app-route #history .history-actions :is(.button,summary) { min-height: 44px !important; }
 body.studio-ui.g-system.app-route #history .g-history-more > div { grid-template-columns: minmax(0,1fr); }
 body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner { width: calc(100% + 32px) !important; }
 body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner > div { width: 62%; flex-basis: 62%; }
 body.studio-ui.g-system.app-route #schemeAHome .studio-hero-photo { width: 58%; }
 body.studio-ui.g-system.app-route #schemeAHome .mobile-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
 body.studio-ui.g-system.app-route #appView :is(.smart-generation-layout,.generation-layout,.translation-layout,.remix-layout,.brand-manager-layout,.image-audit-layout,.listing-suite-grid,.batch-layout) { grid-template-columns: minmax(0,1fr) !important; }
 body.studio-ui.g-system.app-route #appView :is(.listing-suite-grid,.translation-layout,.remix-layout,.brand-manager-layout) > * { grid-column: 1 !important; grid-row: auto !important; }
 body.studio-ui.g-system.app-route #template-square .template-square-hero { display: grid !important; gap: 16px; }
 body.studio-ui.g-system.app-route #template-square .template-square-toolbar { width: 100%; }
 body.studio-ui.g-system.app-route #template-square .template-square-search-row { display: flex !important; }
 body.studio-ui.g-system.app-route #template-square .template-square-search-row > .button { width: auto !important; flex: 0 0 64px; }
 body.studio-ui.g-system.app-route #template-square .template-square-search-row > label { flex: 1; min-width: 0; }
 body.studio-ui.g-system.app-route #template-square .template-square-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px; padding: 0 !important; }
 body.studio-ui.g-system.app-route #template-square .template-square-cover { aspect-ratio: 1 !important; }
 body.studio-ui.g-system.app-route #template-square .template-square-switcher { gap: 18px; }
 body.studio-ui.g-system.app-route #template-square .template-square-card-body { padding: 10px !important; }
 body.studio-ui.g-system.app-route #template-square .template-square-card-body h3 { font-size: 15px !important; }
 body.studio-ui.g-system.app-route #template-square .template-square-card-footer { flex-direction: column; align-items: stretch; }
 body.studio-ui.g-system.app-route #template-square .template-square-card-footer .button { width: 100%; padding: 8px !important; }
 body.studio-ui.g-system.app-route #template-square #templateSquareModeHint { display: none; }
 body.studio-ui.g-system.app-route #appView .g-workflow-steps { gap: 16px; }
 body.studio-ui.g-system.app-route #online-batch .online-result-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
 body.studio-ui.g-system.app-route #appView :is(button.button,a.button,input,select) { min-height: 44px; }
 body.studio-ui.g-system.app-route #appView :is(.g-edit-canvas,.smart-result-panel) { min-height: 360px; }
 body.studio-ui.g-system.app-route #appView .g-edit-canvas-stage { min-height: 260px; }
 body.studio-ui.g-system.app-route #appView .section-title:not(.g-page-banner) { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px !important; }
 body.studio-ui.g-system.app-route #appView .section-title:not(.g-page-banner) h2 { font-size: 24px !important; }
 body.studio-ui.g-system.app-route #appView .section-title:not(.g-page-banner) > .button { width: auto !important; margin: 0; }
 body.studio-ui.g-system.app-route #appView .g-page-banner { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: center !important; gap: 12px; padding: 16px !important; }
 body.studio-ui.g-system.app-route #appView .g-page-banner > div { margin: 0 !important; width: 65%; }
 body.studio-ui.g-system.app-route #appView .g-page-banner > .button { margin: 0 !important; width: auto !important; }
}

/* Common details: remove olive legacy focus/status treatments and heavy control type. */
body.studio-ui.g-system.app-route .workspace-page-active { scroll-margin-top: 80px; }
body.studio-ui.g-system :is(button.button,.button,.template-square-tab,.template-square-category,.g-brand strong) { font-weight: 500 !important; }
body.studio-ui.g-system :is(input,select,textarea):focus { box-shadow: none !important; border-color: var(--g-focus) !important; }
body.studio-ui.g-system :is(input,textarea)::placeholder { color: #7c8781 !important; opacity: 1; }
body.studio-ui.g-system .status:not(:empty) { border-radius: 4px !important; background: var(--g-subtle) !important; color: var(--g-muted) !important; padding: 10px 12px !important; line-height: 1.6; }
body.studio-ui.g-system .status.success:not(:empty) { background: var(--g-success-bg) !important; color: var(--g-success) !important; border-color: var(--g-border) !important; }
body.studio-ui.g-system .status.error:not(:empty) { background: var(--g-danger-bg) !important; color: var(--g-danger) !important; }
body.studio-ui.g-system.app-route :is(.section-title h2,.reference-remix-heading h1,#generation .smart-generation-heading h2) { font-size: 32px !important; font-weight: 500 !important; }
body.studio-ui.g-system.app-route #template-square :is(.template-square-card-body h3,.template-square-tab) { font-weight: 500 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body > p { font-size: 13px !important; }
@media(max-width:600px) {
  body.studio-ui.g-system.app-route :is(.section-title h2,.reference-remix-heading h1,#generation .smart-generation-heading h2) { font-size: 26px !important; }
  body.studio-ui.g-system.app-route #template-square .g-model-field { min-width: 0; }
}

/* User workspace polish: readable type, balanced surfaces, and clear actions. */
body.studio-ui.g-system.app-route .topbar { box-shadow: none !important; }
body.studio-ui.g-system.app-route .g-sidebar-nav :is(a,summary) { font-size: 14px; }
body.studio-ui.g-system.app-route .g-side-brand small { font-size: 10px; letter-spacing: .08em; }
body.studio-ui.g-system.app-route #appView :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.button) { font-size: 14px; }
body.studio-ui.g-system.app-route #appView label { font-size: 13px !important; font-weight: 500 !important; line-height: 1.6; }
body.studio-ui.g-system.app-route #appView :is(button,a).button:disabled { opacity: 1 !important; background: #f2f1ed !important; color: #8b938e !important; border-color: var(--g-border) !important; cursor: not-allowed; }
body.studio-ui.g-system.app-route #appView .section-title { justify-content: space-between; }
body.studio-ui.g-system.app-route #appView .section-title > div { min-width: 0; }
body.studio-ui.g-system.app-route #appView .section-title > .button { flex-shrink: 0; }
body.studio-ui.g-system.app-route #appView :is(.smart-generation-heading,#image-edit > .section-title) p { display: block !important; color: var(--g-muted) !important; font-size: 14px !important; line-height: 1.65; max-width: 760px; }
body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner h2 { font-size: clamp(42px,4vw,58px) !important; line-height: 1.22 !important; font-weight: 500 !important; margin: 16px 0 !important; }
body.studio-ui.g-system.app-route #schemeAHome .g-home-subtitle { font-size: 16px !important; line-height: 1.7; color: var(--g-muted); }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card { min-height: 84px !important; gap: 4px 12px; background: white !important; transition: border-color .16s,background-color .16s; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card strong { font: 500 15px/1.5 var(--g-font-body) !important; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card > span:not(.mobile-action-icon) { font-size: 12px !important; line-height: 1.6; color: var(--g-muted) !important; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-icon svg { width: 24px !important; height: 24px !important; }
body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card:is(:hover,:focus-visible) { border-color: var(--g-primary) !important; background: #f7f9f5 !important; transform: none !important; }
body.studio-ui.g-system.app-route .g-quick-create { gap: 12px; border-radius: 4px; padding: 16px; }
body.studio-ui.g-system.app-route .g-quick-create .g-model-field { flex-basis: 246px; gap: 12px; }
body.studio-ui.g-system.app-route .g-quick-create .button { white-space: nowrap; }
body.studio-ui.g-system.app-route #schemeAHome :is(.scheme-a-section-head h2,.studio-section-heading h2) { font-size: 22px !important; font-weight: 500 !important; }
body.studio-ui.g-system.app-route #generation .g-generation-inputs { border-radius: 4px !important; }
body.studio-ui.g-system.app-route #generation .generation-upload-dropzone { background: var(--g-bg) !important; border-color: #c4cdc4 !important; }
body.studio-ui.g-system.app-route #generation .generation-upload-dropzone :is(strong,span) { font-weight: 500 !important; }
body.studio-ui.g-system.app-route #generation .generation-mode-tabs { width: 100%; gap: 24px; padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--g-border) !important; background: transparent !important; }
body.studio-ui.g-system.app-route #generation .generation-mode-tab { padding: 10px 0 !important; background: transparent !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; font-weight: 500 !important; }
body.studio-ui.g-system.app-route #generation .generation-mode-tab.active { border-bottom-color: var(--g-primary) !important; }
body.studio-ui.g-system.app-route #generation .smart-intent-button { min-height: 40px !important; justify-content: center; text-align: center; }
body.studio-ui.g-system.app-route #generation .smart-intent-button strong { font: 500 13px/1.5 var(--g-font-body) !important; }
body.studio-ui.g-system.app-route #generation .smart-more-settings { background: white !important; border-color: var(--g-border) !important; }
body.studio-ui.g-system.app-route #generation .smart-more-settings summary { font-weight: 500 !important; }
body.studio-ui.g-system.app-route #generationResultPreview:has(> .field-hint:only-child) { display: grid !important; grid-template-columns: 1fr !important; grid-auto-flow: row !important; place-content: center !important; place-items: center !important; gap: 16px; text-align: center; background: var(--g-bg) !important; }
body.studio-ui.g-system.app-route #generationResultPreview > .field-hint:only-child { display: block !important; height: auto !important; min-height: 0 !important; margin: 0 !important; font-size: 14px !important; color: var(--g-muted) !important; }
body.studio-ui.g-system.app-route #generationResultPreview:has(> .field-hint:only-child)::before { content: ''; width: 44px; height: 44px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%2398a59a' stroke-width='1.3'%3E%3Crect x='6' y='6' width='36' height='36' rx='4'/%3E%3Ccircle cx='17' cy='17' r='3'/%3E%3Cpath d='m7 35 10-10 8 7 6-12 11 15'/%3E%3C/svg%3E") center/contain no-repeat; }
body.studio-ui.g-system.app-route #generation .smart-result-actions { display: flex !important; gap: 8px; flex-wrap: wrap; }
body.studio-ui.g-system.app-route #generation .smart-result-actions .button { flex: 1 1 120px; white-space: nowrap; }
body.studio-ui.g-system.app-route #appView :is(#generationJobSummary,#gptJobSummary,#gptSourceSummary) { background: transparent !important; border: 0 !important; padding: 8px 0 !important; color: var(--g-muted) !important; font-size: 12px !important; line-height: 1.65; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings { border-radius: 4px !important; }
body.studio-ui.g-system.app-route #image-edit :is(.g-edit-canvas,.g-edit-settings,.result-stack) { border-color: var(--g-border) !important; border-radius: 4px !important; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings > .subcard { padding: 16px !important; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings > .subcard + .subcard { padding-top: 0 !important; }
body.studio-ui.g-system.app-route #image-edit #gptUploadForm label { background: var(--g-bg) !important; border: 1px dashed #c4cdc4 !important; border-radius: 4px !important; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings .field-hint { font-size: 12px !important; line-height: 1.65; font-weight: 400 !important; }
body.studio-ui.g-system.app-route #image-edit .g-edit-settings #gptPrompt { min-height: 120px !important; }
body.studio-ui.g-system.app-route #image-edit .online-param-grid { align-items: start; }
body.studio-ui.g-system.app-route #image-edit .g-edit-canvas footer { align-items: center; }
body.studio-ui.g-system.app-route #template-square .template-square-hero { gap: 24px !important; align-items: start !important; }
body.studio-ui.g-system.app-route #template-square .template-square-hero-copy { flex: 1; min-width: 0; }
body.studio-ui.g-system.app-route #template-square .template-square-hero-copy p { font-size: 14px !important; line-height: 1.7; max-width: 600px; }
body.studio-ui.g-system.app-route #template-square .template-square-grid { align-items: stretch !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card { display: flex !important; flex-direction: column; min-width: 0; overflow: hidden; transition: border-color .16s; }
body.studio-ui.g-system.app-route #template-square .template-square-card:hover { border-color: #a6b8aa !important; transform: none !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body { flex: 1; display: flex !important; flex-direction: column; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body h3 { line-height: 1.55 !important; min-height: 0; }
body.studio-ui.g-system.app-route #template-square .template-square-card-body > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: 2lh !important; line-height: 1.65 !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-footer { margin-top: auto; padding-top: 16px !important; }
body.studio-ui.g-system.app-route #template-square .template-square-card-footer .button { white-space: nowrap; }
@media(min-width:981px) {
  body.studio-ui.g-system.app-route #image-edit .generation-layout { grid-template-columns: minmax(290px,.85fr) minmax(300px,1.35fr) minmax(230px,.8fr) !important; }
}
@media(max-width:1100px) and (min-width:641px) {
  body.studio-ui.g-system.app-route #schemeAHome .mobile-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.studio-ui.g-system.app-route #template-square .template-square-hero { flex-direction: column !important; }
  body.studio-ui.g-system.app-route #template-square .template-square-toolbar { width: 100%; }
}
@media(max-width:640px) {
  body.studio-ui.g-system.app-route #appView :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) { font-size: 16px !important; }
  body.studio-ui.g-system.app-route #appView :is(.button,.smart-intent-button,.template-square-category,.template-square-tab) { min-height: 44px !important; }
  body.studio-ui.g-system.app-route #schemeAHome .scheme-a-hero-banner h2 { font-size: 36px !important; line-height: 1.3 !important; }
  body.studio-ui.g-system.app-route #schemeAHome .g-home-subtitle { font-size: 13px !important; }
  body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card { min-height: 96px !important; padding: 14px 12px !important; grid-template-columns: 26px 1fr !important; gap: 4px 8px; }
  body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card strong { font-size: 14px !important; }
  body.studio-ui.g-system.app-route #schemeAHome .mobile-action-card > span:not(.mobile-action-icon) { font-size: 12px !important; white-space: normal !important; }
  body.studio-ui.g-system.app-route #appView :is(.smart-generation-heading,#image-edit > .section-title) p { font-size: 13px !important; }
  body.studio-ui.g-system.app-route #template-square .template-square-card-body h3 { font-size: 15px !important; }
  body.studio-ui.g-system.app-route #template-square .template-square-card-footer .button { font-size: 12px; padding-inline: 6px !important; }
  body.studio-ui.g-system.app-route #template-square .template-square-uploader { max-width: 100%; }
}
@media(prefers-reduced-motion:reduce) {
  body.studio-ui.g-system.app-route :is(.mobile-action-card,.template-square-card) { transition: none !important; }
}

body.studio-ui.g-system.app-route #generation > .section-title::after { content: none !important; display: none !important; }

@media(min-width:641px) and (max-width:1100px) {
  body.studio-ui.g-system.app-route #appView #image-edit .generation-layout { grid-template-columns: minmax(270px,.85fr) minmax(0,1.15fr) !important; align-items: start; }
  body.studio-ui.g-system.app-route #image-edit .g-edit-settings { grid-column: 1; grid-row: 1 / span 2; }
  body.studio-ui.g-system.app-route #image-edit .g-edit-canvas { grid-column: 2; grid-row: 1; min-height: 380px !important; }
  body.studio-ui.g-system.app-route #image-edit .g-edit-canvas-stage { min-height: 260px !important; }
  body.studio-ui.g-system.app-route #image-edit .generation-layout > .result-stack { grid-column: 2; grid-row: 2; }
}
@media(max-width:640px) {
  body.studio-ui.g-system.app-route #appView :is(#generation,#image-edit,#template-square) :is(.button,.smart-intent-button,.template-square-tab,.template-square-category) { min-height: 44px !important; }
  body.studio-ui.g-system.app-route #appView input[type=file]::file-selector-button { min-height: 44px; }
}
