/* Vincent's original photograph and grain remain the foundation of the studio. */
:root {
  color-scheme: light;
  --ink: #283c3a;
  --muted: #71827f;
  --line: #cddbd660;
  --line-dark: #c7d5cf;
  --accent: #e1f0e8;
  --accent-deep: #187b6b;
  --dark: #176e60;
  --paper: #f7faf7;
  --panel: #f9fcf8d9;
  --danger: #ad5048;
  --product-header-height: 78px;
  --studio-top-space: 28px;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  font-size: 14px;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #d4e0d9; isolation: isolate; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: -60px; z-index: -2; pointer-events: none; background: linear-gradient(#e8efe583, #e5eee975), url('/assets/studio-flow-background.webp') center / cover no-repeat; filter: blur(36px) saturate(.62); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, label, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, a, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-deep); }
a { color: inherit; }
svg { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.65; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.product-header { min-height: var(--product-header-height); padding: 0 30px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid #ffffffa3; background: #fafdf6ad; backdrop-filter: blur(22px); position: sticky; top: 0; z-index: 20; }
.product-brand { flex: 0 0 180px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 47px; flex-shrink: 0; }
.brand-mark img { display: block; width: 40px; height: 43px; object-fit: contain; mix-blend-mode: multiply; }
.brand strong { display: block; font-size: 26px; line-height: 1.08; font-weight: 750; }
.brand-dot { color: var(--accent-deep); }
.brand small { display: block; font-size: 10px; color: #72827b; margin-top: 5px; }
.primary-nav { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; align-self: stretch; gap: 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-padding-inline: 8px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #a8c3b14d transparent; }
.primary-nav::-webkit-scrollbar { height: 3px; }
.primary-nav::-webkit-scrollbar-thumb { background: #a8c3b170; border-radius: 3px; }
.nav-item { position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 42px; gap: 7px; padding: 10px 12px; border: 0; border-radius: 6px; margin: 10px 0; background: transparent; font-size: 14px; color: #687b73; white-space: nowrap; transition: background .15s, color .15s; scroll-margin-inline: 8px; }
.nav-item:hover { background: #ffffff7d; color: var(--dark); }
.nav-item.active { color: var(--dark); background: #dcebe180; font-weight: 650; }
.nav-item.active::after { content: ""; position: absolute; height: 2px; left: 12px; right: 12px; bottom: 0; background: var(--accent-deep); }
.nav-item svg { width: 16px; height: 16px; }
.nav-divider { height: 18px; width: 1px; flex: 0 0 1px; background: var(--line-dark); margin: 0 7px; }
.nav-count { font-size: 10px; min-width: 17px; text-align: center; padding: 0 4px; border-radius: 3px; background: #6d8e7010; }
.product-actions { display: flex; flex: 0 0 auto; min-width: 0; align-items: center; gap: 18px; margin-left: auto; }
.help-button { border: 0; padding: 8px 0; background: transparent; font-size: 12px; color: #75847b; white-space: nowrap; }
.help-button span { margin-left: 4px; }
.help-button:hover { color: var(--dark); }
.product-actions .topbar-account-actions { display: flex; flex-direction: row; align-items: center; gap: 20px; width: auto; margin: 0; }
.account-controls { min-width: 0; flex-wrap: nowrap; gap: 10px; }
.account-beta-badge { display: none; }
.account-header-balance { max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
.account-header-button { margin: 0; padding: 9px 14px; border-radius: 6px; border-color: #2d76624d; color: var(--dark); background: #fafff961; font-size: 12px; white-space: nowrap; }
.account-header-button:hover { background: #ffffffd9; border-color: var(--dark); }
.account-user-button { max-width: 116px; }
.api-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #a9b3aa; flex: 0 0 auto; }
.api-status[data-state=ready] .status-dot { background: #5b9b74; box-shadow: 0 0 0 3px #5b9b7412; }
.api-status[data-state=missing] { color: #a36f47; }
.api-status[data-state=missing] .status-dot { background: #b88950; }
.app-shell { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 34px; max-width: 1760px; margin: 0 auto; padding: 28px 30px 0; align-items: start; }
.editor-column { position: sticky; top: calc(var(--product-header-height) + var(--studio-top-space)); max-height: calc(100dvh - var(--product-header-height) - var(--studio-top-space) - 20px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b4c9bc transparent; background: #fbfdf9c9; border: 1px solid #ffffffa6; border-radius: 8px; backdrop-filter: blur(16px); }
.editor-heading { display: flex; align-items: center; gap: 11px; padding: 21px 23px 18px; border-bottom: 1px solid var(--line); }
.editor-heading-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--dark); background: #e2ede3; border-radius: 6px; }
.editor-heading h2 { margin: 0; font-size: 15px; font-weight: 650; }
.editor-heading p { margin: 3px 0 0; font-size: 12px; color: #6d8077; }
.editor-step { margin-left: auto; font-size: 11px; color: #9aa8a0; font-variant-numeric: tabular-nums; }
.control-panel { padding: 22px 23px 0; }
.control-section { margin-bottom: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.section-heading > div { display: flex; align-items: center; }
.section-heading h2 { font-size: 13px; font-weight: 650; margin: 0; }
.step, .studio-intro, .canvas-index, .settings-hint { display: none; }
.optional, .char-count { font-size: 11px; color: #708278; }
.general-modes, .generation-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 6px; background: #e6ece578; }
.general-modes button, .generation-modes button { min-height: 34px; padding: 6px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #697c71; font-size: 13px; }
.general-modes button[aria-pressed=true], .generation-modes button[aria-pressed=true] { color: var(--dark); background: #fffffff2; border-color: #d3dfd499; box-shadow: 0 1px 3px #213f2310; font-weight: 600; }
.prompt-wrap { position: relative; }
.prompt-wrap textarea { width: 100%; min-height: 186px; display: block; resize: vertical; padding: 13px 29px 13px 13px; border: 1px solid #cddad0; border-radius: 6px; background: #ffffffb8; line-height: 1.9; font-size: 14px; transition: border-color .15s; }
.prompt-wrap textarea:focus { border-color: #6b9d87; outline: 2px solid #a6c7b43d; outline-offset: 0; background: #ffffffeb; }
.prompt-wrap textarea::placeholder { color: #7d8d82; }
.icon-button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px; display: inline-grid; place-items: center; background: transparent; color: #79877e; flex: 0 0 auto; }
.icon-button:hover { background: #4a715a0c; color: var(--ink); }
.icon-button svg { width: 16px; height: 16px; }
.prompt-clear { position: absolute; top: 5px; right: 4px; width: 24px; height: 24px; opacity: 0; visibility: hidden; }
.prompt-wrap.has-content .prompt-clear { opacity: 1; visibility: visible; }
.prompt-presets { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.prompt-presets button { padding: 4px 8px; min-height: 26px; background: #f7fbf575; border: 1px solid #d6e0d58a; border-radius: 4px; font-size: 11px; color: #697e70; }
.prompt-presets button:hover { border-color: #8db5a0; color: var(--dark); }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; min-height: 35px; border: 1px solid #ccdacfa8; border-radius: 5px; color: #5f776b; background: #ffffffa1; font-size: 12px; text-decoration: none; }
.secondary-button:hover { background: #fff; color: var(--dark); border-color: #8cac95; }
.secondary-button svg { width: 15px; height: 15px; }
.prompt-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.favorite-prompt-trigger { width: 100%; min-height: 33px; padding: 5px; font-size: 12px; background: transparent; }
.prompt-history-button { width: 100%; min-height: 33px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #ccdacfa8; border-radius: 5px; background: transparent; font-size: 12px; color: #5f776b; }
.prompt-history-button:hover { background: #fff; border-color: #8cac95; }
.prompt-history-button > svg { width: 12px; height: 12px; }
.prompt-history-button .history-chevron { display: none; }
.history-count { min-width: 15px; text-align: center; background: #dde7db78; border-radius: 3px; font-size: 10px; padding: 0 3px; }
.settings-section { border-top: 1px solid var(--line); padding-top: 19px; margin-bottom: 22px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-row + .setting-row { margin-top: 17px; }
.setting-label, .field-label { font-size: 12px; color: #687c6e; }
.ratio-options { display: flex; gap: 6px; }
.ratio-options label { position: relative; cursor: pointer; }
.ratio-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ratio-options label > span { min-width: 57px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #d4dfd3; border-radius: 5px; color: #7a8a7e; background: #ffffff60; }
.ratio-options input:checked + span { color: var(--dark); border-color: #5a9a7b; background: #e5efe2; }
.ratio-options input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.ratio-options b { font-size: 11px; font-weight: 500; }
.ratio-shape { border: 1px solid currentColor; display: block; }
.ratio-shape.square { width: 11px; height: 11px; }
.ratio-shape.portrait { width: 9px; height: 12px; }
.ratio-shape.landscape { width: 13px; height: 10px; }
.split-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label { display: grid; gap: 7px; }
.model-setting > .field-label { width: 100%; min-width: 0; }
.select-wrap { display: block; position: relative; }
.select-wrap select { width: 100%; height: 35px; appearance: none; padding: 0 29px 0 10px; border: 1px solid #d4dfd3; border-radius: 5px; background: #ffffffa1; font-size: 13px; }
.select-wrap select:disabled { cursor: not-allowed; color: var(--muted); background: #eef3eba1; }
.select-wrap svg { position: absolute; right: 10px; top: 11px; width: 12px; height: 12px; transform: rotate(90deg); pointer-events: none; color: #829484; }
.model-selection-status { margin: 11px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.model-selection-status:empty { display: none; }
.model-selection-status[data-state=error] { color: var(--danger); }
#retryModelCatalog { margin-top: 6px; }
.generate-dock { position: sticky; bottom: 0; background: #f6faf3f2; backdrop-filter: blur(14px); padding: 13px 23px 17px; margin: 0 -23px; border-top: 1px solid #d6e0d580; z-index: 3; }
.generation-cost { margin: 0 0 10px; font-size: 12px; color: #697d70; }
.generate-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #1a6a54; border-radius: 6px; background: var(--dark); color: #fff; padding: 10px 15px; box-shadow: 0 3px 6px #26564313; }
.generate-button:hover { background: #105c50; }
.button-copy strong { font-size: 14px; font-weight: 550; }
.button-icon { display: flex; }
.button-icon svg { width: 17px; height: 17px; }
.button-arrow { width: 14px; height: 14px; margin-left: auto; opacity: .65; }
.button-icon { margin-right: auto; }
.form-message { margin: 8px 0 0; color: var(--danger); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }
.design-task { min-width: 0; min-height: 63px; text-align: left; padding: 10px; border: 1px solid #d3ded1; border-radius: 5px; background: #ffffff6e; }
.design-task strong { display: block; font-size: 13px; font-weight: 550; }
.design-task small { display: block; margin-top: 4px; font-size: 11px; color: #75856f; line-height: 1.5; }
.design-task[aria-pressed=true] { border-color: #6d9a79; background: #e5eee0; color: var(--dark); }
.design-task:hover { border-color: #87ab90; }
.brief-heading { margin-top: 23px; }
.text-link { background: transparent; border: 0; padding: 3px 0; color: var(--dark); font-size: 11px; }
.design-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.design-field { min-width: 0; display: grid; gap: 7px; color: #697c68; font-size: 12px; }
.design-field input { min-width: 0; width: 100%; padding: 9px 10px; background: #ffffffa1; border: 1px solid #d3ded1; border-radius: 5px; font-size: 12px; }
.design-field input::placeholder { color: #a0aa9d; }
.design-note { color: #6e8068; font-size: 11px; line-height: 1.8; margin: 12px 0 0; }
.prompt-preview { margin: -7px 0 20px; font-size: 11px; color: var(--muted); }
.prompt-preview summary { cursor: pointer; }
.prompt-preview pre { padding: 12px; border-left: 2px solid #b6c9b1; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.8; max-height: 280px; overflow-y: auto; }
.drop-zone { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 127px; padding: 17px 8px; gap: 7px; border: 1px dashed #b7cbb6; background: #f6faf490; border-radius: 6px; cursor: pointer; text-align: center; }
.drop-zone:hover, .drop-zone.dragging { background: #eaf3e6; border-color: var(--accent-deep); }
.drop-zone:focus-within { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; place-items: center; color: #7f9c7f; margin-bottom: 4px; }
.drop-zone strong { font-size: 12px; font-weight: 500; }
.drop-zone small { font-size: 10px; color: #8b9b86; }
.reference-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.reference-list:empty { display: none; }
.reference-item { position: relative; min-width: 0; aspect-ratio: 1; border: 1px solid var(--line); background: #fff; border-radius: 5px; overflow: hidden; }
.reference-item img { width: 100%; height: 100%; object-fit: contain; }
.reference-item button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: #264b43db; color: #fff; font-size: 16px; }
.main { min-width: 0; padding-top: 6px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 8px; color: #718877; font-size: 9px; font-weight: 600; }
.workspace-heading h1 { margin: 0; font-size: 27px; font-weight: 650; line-height: 1.3; }
.page-subtitle { margin: 9px 0 0; font-size: 13px; color: #5c786c; }
.workspace-edition { font-size: 10px; color: #799183; white-space: nowrap; }
.workspace-edition span { margin-left: 6px; display: inline-block; border: 1px solid #a4beab70; border-radius: 4px; background: #e9f2e747; padding: 2px 5px; font-size: 9px; }
.result-panel { background: #fcfdf9c7; border: 1px solid #ffffff9c; border-radius: 8px; min-height: calc(100dvh - 278px); backdrop-filter: blur(16px); }
.workspace-tabs { display: flex; gap: 24px; padding: 0 26px; border-bottom: 1px solid #d2dfcd70; }
.workspace-tabs button { position: relative; min-height: 56px; display: flex; align-items: center; gap: 7px; background: transparent; border: 0; padding: 0 2px; color: #6b8273; font-size: 13px; white-space: nowrap; }
.workspace-tabs svg { width: 15px; height: 15px; }
.workspace-tabs button[aria-selected=true] { color: var(--dark); font-weight: 600; }
.workspace-tabs button[aria-selected=true]::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; bottom: -1px; background: var(--dark); }
.workspace-tabs button:hover { color: var(--dark); }
.result-toolbar { min-height: 56px; padding: 14px 26px 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-toolbar h2 { display: none; }
.result-toolbar p { margin: 0; font-size: 12px; color: #6b8271; }
.result-toolbar .secondary-button { min-height: 31px; padding: 5px 10px; font-size: 12px; }
.result-panel:not([data-section=results]) > .result-toolbar, .result-panel:not([data-section=results]) > .canvas { display: none; }
.result-panel:not([data-section=favorites]) > .prompt-favorites { display: none; }
.result-panel:not([data-section=history]) > #inlineHistoryPanel { display: none; }
.canvas { padding: 0 24px 24px; min-width: 0; }
.empty-state { min-height: 457px; padding: 24px 16px 39px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-art { width: 205px; height: 176px; position: relative; margin: 0 0 22px; }
.art-ring { position: absolute; inset: 10px 0 0; border: 1px solid #b9d0a750; border-radius: 50%; transform: rotate(-22deg); }
.art-sheet { position: absolute; width: 110px; height: 132px; top: 14px; border: 1px solid #d3dfc6; border-radius: 3px; }
.sheet-back { left: 35px; top: 18px; transform: rotate(-15deg); background: #e5eddb; }
.sheet-front { left: 67px; transform: rotate(9deg); background: #fffff9; box-shadow: 0 12px 25px #3b633513; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; }
.sheet-front img { width: 60px; height: 66px; object-fit: contain; mix-blend-mode: multiply; opacity: .82; }
.sheet-front span { color: #8fa182; font-size: 7px; }
.art-spark { position: absolute; top: 1px; right: 0; font-size: 26px; color: #93ab7d; }
.empty-kicker { font-size: 8px; color: #8fa281; font-weight: 500; margin-bottom: 12px; }
.empty-state h2 { font-size: 22px; font-weight: 550; line-height: 1.55; margin: 0 0 10px; color: #355d50; }
.empty-state > p { color: #6f8473; font-size: 13px; line-height: 1.9; margin: 0; }
.starter-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 25px 0 13px; }
.starter-prompts button { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 12px; font-size: 12px; border: 1px solid #cbdac19c; border-radius: 5px; color: #5c7965; background: #ffffff80; }
.starter-prompts button svg { width: 14px; height: 14px; }
.starter-prompts button span { margin-left: 8px; color: #a0b28f; }
.starter-prompts button:hover { background: #fff; border-color: #8caa78; }
.starter-note { font-size: 11px; color: #7d917e; }
.studio-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; color: #667f70; font-size: 11px; }
.footer-help { border: 0; padding: 4px 0; font-size: 11px; color: inherit; background: transparent; }
.footer-help:hover { color: var(--dark); text-decoration: underline; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.results-grid:empty { display: none; }
.gallery-card { min-width: 0; border: 1px solid #d3dfceaa; border-radius: 6px; background: #fffffff2; overflow: hidden; cursor: zoom-in; }
.gallery-card > img { width: 100%; display: block; height: 280px; object-fit: contain; background: #eef1e9; }
.results-grid > .result-card:only-child { grid-column: 1 / -1; width: 100%; }
.results-grid > .result-card:only-child > img { height: min(52dvh, 560px); min-height: 220px; }
.card-caption { padding: 11px 12px 0; }
.card-caption strong { display: block; font-size: 12px; font-weight: 600; }
.card-caption small { display: block; color: #708168; font-size: 12px; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-caption .work-model-meta { display: block; margin: 6px 0 0; color: #687c6e; font-size: 11px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 12px; cursor: default; }
.card-actions button { padding: 6px 10px; min-height: 32px; border: 1px solid #d9e3d280; border-radius: 4px; background: #f2f7ed7d; color: #617c58; font-size: 12px; }
.card-actions button:last-child { margin-left: auto; }
.card-actions button:hover { background: #e6efdd; border-color: #a5ba96; color: var(--dark); }
.task-panel { display: grid; gap: 8px; margin: 10px 24px 18px; }
.task-card { min-width: 0; padding: 12px 14px; border-left: 2px solid #98bda0; border-radius: 0; background: #e7f0e280; }
.task-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.task-title strong { font-weight: 600; }
.task-title span { color: #8a9f7e; font-size: 10px; }
.task-card p { margin: 6px 0; font-size: 11px; line-height: 1.6; color: #718b68; }
.task-card small { font-size: 10px; line-height: 1.6; color: #899d7c; }
.task-card .task-model-meta { display: block; margin-top: 6px; color: #687c6e; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.task-card[data-state=running], .task-card[data-state=queued] { border-color: #568e68; }
.task-card[data-state=needs_review], .task-card[data-state=failed] { border-color: #b89459; background: #f5ebdbb0; }
.task-card .secondary-button { margin-top: 10px; }
.task-summary { color: #769467; font-size: 11px; }
.inline-history { padding: 26px; }
.inline-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.inline-history-heading h2 { font-size: 15px; font-weight: 600; margin: 0; }
.inline-history-heading p { font-size: 11px; color: #8a9c81; margin: 6px 0 0; }
.inline-history-heading .secondary-button { flex-shrink: 0; }
.inline-history-empty { min-height: 240px; display: grid; place-items: center; text-align: center; color: #8c9e84; font-size: 12px; line-height: 1.9; margin: 0; padding: 40px 20px; }
.history-prompt { width: 100%; display: block; text-align: left; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); color: #607955; background: transparent; line-height: 1.85; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
button.history-prompt:hover { color: var(--dark); background: #d6e4c927; }
.favorite-prompt-copy { margin: 0; }
.favorite-prompt-actions { display: flex; gap: 8px; margin-top: 10px; }
.favorite-prompt-actions .secondary-button { min-height: 29px; padding: 5px 10px; font-size: 11px; }
.favorite-prompt-message { font-size: 11px; color: var(--dark); }
.favorite-prompt-message[data-state=error] { color: var(--danger); }
body[data-view=assets] .editor-column { display: none; }
body[data-view=assets] .app-shell { display: block; max-width: 1440px; }
body[data-view=assets] .main { min-height: calc(100dvh - 106px); }
.gallery-view { min-height: calc(100dvh - 282px); background: #fbfdf8c7; padding: 24px; border: 1px solid #ffffffb8; border-radius: 8px; }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.gallery-heading .eyebrow { display: none; }
.gallery-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.work-search { width: 100%; max-width: 360px; display: flex; align-items: center; gap: 9px; border: 1px solid #d1ddc9; border-radius: 5px; padding: 0 12px; background: #ffffffb0; color: #8ca17b; }
.work-search input { min-width: 0; width: 100%; padding: 10px 0; border: 0; background: transparent; font-size: 12px; outline: 0; }
.work-search:focus-within { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.work-search input::placeholder { color: #92a282; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 19px 0 24px; }
.gallery-filters button { min-height: 31px; padding: 7px 12px; border: 1px solid transparent; border-radius: 4px; color: #8a9c7a; background: transparent; font-size: 11px; }
.gallery-filters button[aria-pressed=true] { background: #e0ecd5; color: var(--dark); border-color: #c6d8b5; }
.gallery-filters button:hover { color: var(--dark); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gallery-grid .gallery-card > img { aspect-ratio: 1; height: auto; object-fit: contain; }
.gallery-grid .card-actions { gap: 4px; padding: 10px; }
.gallery-grid .card-actions button { padding: 4px 6px; }
.gallery-empty { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #91a581; }
.gallery-empty > svg { width: 32px; height: 32px; margin-bottom: 12px; }
.gallery-empty h3 { font-size: 17px; font-weight: 500; color: #607b51; margin: 0; }
.gallery-empty p { font-size: 12px; }
.loading-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.loading-state h2 { font-size: 18px; font-weight: 500; }
.loading-state p { font-size: 12px; }
.progress-track { width: 180px; height: 3px; margin: 24px auto; background: #d7e5cd; overflow: hidden; }
.progress-track span { display: block; width: 45%; height: 100%; background: var(--dark); animation: progress 1.8s ease-in-out infinite; }
.studio-help, .history-dialog { width: min(590px, calc(100vw - 32px)); padding: 0; border: 1px solid #ffffffcc; border-radius: 8px; color: var(--ink); background: #f7faf4; box-shadow: 0 24px 90px #26433130; }
dialog::backdrop { background: #17322b66; backdrop-filter: blur(5px); }
.studio-help { max-height: calc(100dvh - 48px); overflow: auto; }
.studio-help > header { padding: 25px 28px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.studio-help h2 { font-size: 21px; font-weight: 600; margin: 0; }
.studio-help .icon-button { font-size: 23px; }
.help-steps { padding: 8px 28px; }
.help-steps > div { position: relative; padding: 20px 0 20px 43px; border-bottom: 1px solid var(--line); }
.help-steps > div:last-child { border: 0; }
.help-steps > div > span { position: absolute; top: 20px; left: 0; color: #88a178; font-size: 12px; }
.help-steps h3 { font-size: 13px; font-weight: 600; margin: 0 0 7px; }
.help-steps p, .help-note p { font-size: 12px; color: #7b9070; line-height: 1.85; margin: 0; }
.help-note { border-top: 1px solid var(--line); padding: 21px 28px 25px; background: #e9f0e28c; }
.help-note strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.history-dialog { max-height: min(80dvh, 760px); overflow: hidden; }
.history-dialog[open] { display: flex; flex-direction: column; }
.history-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 23px; border-bottom: 1px solid var(--line); }
.history-dialog-header h2 { margin: 0; font-size: 21px; font-weight: 600; }
.history-list { overflow-y: auto; padding: 0 23px; }
.history-dialog-footer { padding: 14px 23px; display: flex; justify-content: flex-end; border-top: 1px solid var(--line); }
.history-empty { min-height: 230px; display: grid; place-content: center; justify-items: center; color: var(--muted); font-size: 12px; }
.preview-dialog { width: min(1160px, calc(100vw - 48px)); height: min(86dvh, 840px); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid #ffffffb3; border-radius: 8px; background: #f5f8f0; color: var(--ink); }
.preview-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr) 270px; }
.dialog-close { position: absolute; z-index: 1; right: 14px; top: 14px; background: #f0f6e8e0; }
.preview-media { display: grid; place-items: center; min-width: 0; min-height: 0; padding: 20px; background: #e4ebe0; }
.preview-media img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.preview-info { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 15px; padding: 68px 22px 23px; }
.preview-info > span { font-size: 11px; color: #7b9468; }
.preview-info p { font-size: 12px; line-height: 1.85; overflow-y: auto; margin: 0; }
.preview-info .secondary-button { margin-top: auto; flex-shrink: 0; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 12px); opacity: 0; z-index: 100; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 9px; padding: 12px 17px; border-radius: 6px; background: #285746f2; color: white; font-size: 12px; pointer-events: none; transition: transform .18s, opacity .18s; box-shadow: 0 8px 30px #274c4026; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.alert { background: #985b46f2; }
.toast svg { width: 15px; height: 15px; }
.account-dialog { border-radius: 8px; background: #f7faf4; backdrop-filter: none; }
.account-eyebrow { letter-spacing: 0; font-size: 10px; }
.account-dialog-header h2 { font-size: 22px; font-weight: 600; }
.account-close, .account-auth-tabs button, .account-field input, .account-primary, .account-secondary, .account-balances > div, .account-ledger-scroll { border-radius: 6px; }
.account-balances { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); gap: 0; padding: 12px 0; }
.account-balances > div, .account-balances > div:first-child { border: 0; border-radius: 0; background: transparent; }
.account-balances > div + div { border-left: 1px solid var(--line); }
.account-dialog-header, .account-dialog-body { padding-left: 26px; padding-right: 26px; }
@keyframes progress { from { transform: translateX(-110%); } to { transform: translateX(340%); } }
@media (min-width: 1600px) {
  :root { --studio-top-space: 34px; }
  .app-shell { grid-template-columns: 380px minmax(0, 1fr); gap: 40px; padding-top: 34px; }
  .empty-state { min-height: 530px; }
}
@media (max-width: 1599px) {
  :root { --product-header-height: 120px; }
  .product-header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 24px; }
  .product-brand { grid-column: 1; grid-row: 1; display: flex; align-items: center; min-height: 69px; }
  .product-actions { grid-column: 2; grid-row: 1; justify-self: end; max-width: 100%; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 50px; }
  .nav-item { min-height: 39px; margin: 3px 0 7px; padding: 8px 15px; }
}
@media (max-width: 1350px) {
  .product-header { gap: 0 18px; padding: 0 24px; }
  .product-brand { flex-basis: 180px; }
  .nav-item { padding-left: 10px; padding-right: 10px; }
  .product-actions { gap: 15px; }
  .product-actions .topbar-account-actions { gap: 12px; }
  .status-text { display: none; }
  .api-status[data-state=missing] .status-text { display: inline; font-size: 10px; }
  .app-shell { gap: 26px; padding-left: 24px; padding-right: 24px; grid-template-columns: 336px minmax(0, 1fr); }
  .editor-heading { padding-left: 19px; padding-right: 19px; }
  .control-panel { padding-left: 19px; padding-right: 19px; }
  .generate-dock { padding-left: 19px; padding-right: 19px; margin-left: -19px; margin-right: -19px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  :root { --studio-top-space: 22px; }
  .product-header { gap: 0 18px; }
  .brand strong { font-size: 23px; }
  .brand small { font-size: 9px; }
  .brand-mark, .brand-mark img { width: 34px; height: 36px; }
  .nav-item { padding-left: 13px; padding-right: 13px; }
  .product-actions { align-self: center; }
  .status-text { display: inline; }
  .app-shell { grid-template-columns: 310px minmax(0, 1fr); gap: 20px; padding-top: 22px; }
  .workspace-heading { min-height: 83px; margin-bottom: 19px; }
  .workspace-heading h1 { font-size: 24px; }
  .workspace-edition { display: none; }
  .workspace-tabs { gap: 17px; padding: 0 18px; }
  .workspace-tabs button { font-size: 11px; gap: 5px; }
  .workspace-tabs svg { width: 13px; height: 13px; }
  .canvas { padding: 0 16px 16px; }
  .empty-state { padding-left: 0; padding-right: 0; min-height: 457px; }
  .empty-state h2 { font-size: 18px; }
  .starter-prompts { gap: 6px; }
  .starter-prompts button { padding: 7px 9px; }
  .starter-prompts button span { display: none; }
  .results-grid { grid-template-columns: 1fr; }
  .result-toolbar { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 760px) {
  .product-header { position: relative; padding: 13px 18px 0; min-height: 116px; gap: 0 12px; }
  .product-brand { min-height: 46px; }
  .product-actions { gap: 12px; }
  .help-button { font-size: 11px; }
  .product-actions .topbar-account-actions { gap: 8px; }
  .status-text, .api-status[data-state=missing] .status-text { display: none; }
  .account-header-button { font-size: 11px; padding: 8px 10px; }
  .account-controls { gap: 7px; }
  .account-header-balance { max-width: 95px; font-size: 10px; }
  .account-user-button { max-width: 94px; }
  .primary-nav { margin-top: 8px; gap: 4px; justify-content: flex-start; min-height: 48px; }
  .nav-item { gap: 6px; font-size: 12px; padding: 8px 12px; margin: 0 0 7px; min-height: 39px; }
  .nav-item svg { width: 14px; height: 14px; }
  .nav-divider { margin: 0 5px 7px; }
  .nav-count { display: none; }
  .app-shell { display: flex; flex-direction: column; padding: 22px 18px 0; gap: 24px; }
  .editor-column { width: 100%; max-height: none; overflow: visible; position: static; }
  .editor-heading { padding: 18px 20px; }
  .control-panel { padding: 20px 20px 0; }
  .control-section { margin-bottom: 22px; }
  .section-heading h2 { font-size: 13px; }
  .general-modes button, .generation-modes button { font-size: 13px; min-height: 37px; }
  .prompt-wrap textarea { font-size: 14px; min-height: 165px; }
  .prompt-presets button { font-size: 11px; min-height: 30px; }
  .favorite-prompt-trigger, .prompt-history-button { font-size: 12px; min-height: 36px; }
  .setting-label, .field-label { font-size: 12px; }
  .ratio-options label > span { min-width: 60px; height: 38px; }
  .select-wrap select { height: 39px; font-size: 13px; }
  .select-wrap svg { top: 14px; }
  .generate-dock { position: static; margin: 0 -20px; padding: 16px 20px 20px; border-radius: 0 0 8px 8px; }
  .generation-cost { font-size: 12px; }
  .generate-button { min-height: 47px; }
  .button-copy strong { font-size: 14px; }
  .main { display: contents; width: 100%; padding-top: 0; }
  body[data-view=assets] .main { display: block; }
  .workspace-heading { order: -1; width: 100%; margin: 0; min-height: 80px; }
  body[data-view=assets] .workspace-heading { margin-bottom: 20px; }
  .workspace, .gallery-view, .studio-footer { width: 100%; }
  .workspace-heading h1 { font-size: 24px; }
  .page-subtitle { font-size: 12px; }
  .workspace-tabs { justify-content: space-between; gap: 10px; padding: 0 17px; }
  .workspace-tabs button { font-size: 12px; min-height: 52px; }
  .result-panel { min-height: 0; }
  .empty-state { min-height: 450px; padding: 23px 0 30px; }
  .empty-art { transform: scale(.9); margin-bottom: 10px; }
  .empty-state h2 { font-size: 17px; }
  .empty-state > p { font-size: 12px; }
  .starter-prompts { gap: 6px; margin-top: 22px; }
  .starter-prompts button { padding: 8px 9px; font-size: 11px; }
  .starter-prompts button svg { width: 12px; height: 12px; }
  .studio-footer { padding: 0 0 24px; font-size: 10px; }
  .gallery-view { padding: 17px; min-height: 65dvh; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gallery-filters { gap: 3px; }
  .gallery-filters button { font-size: 10px; padding: 6px 8px; }
  .gallery-grid .card-actions { padding: 8px; }
  .gallery-grid .card-actions button { min-height: 29px; font-size: 10px; }
  .inline-history { padding: 18px; }
  .inline-history-heading h2 { font-size: 14px; }
  .inline-history-heading p { font-size: 11px; }
  .inline-history-heading .secondary-button { font-size: 10px; padding: 7px 8px; }
  .task-panel { margin: 9px 16px 16px; }
  .preview-dialog { width: calc(100vw - 24px); height: calc(100dvh - 40px); }
  .preview-dialog[open] { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .preview-info { padding: 17px; gap: 9px; }
  .preview-info p { max-height: 90px; }
  .preview-media { padding: 14px; }
  .preview-info .secondary-button { margin: 0; }
  .account-dialog { border-radius: 8px; }
  .account-dialog-header, .account-dialog-body { padding-left: 20px; padding-right: 20px; }
  .studio-help > header, .help-note { padding-left: 21px; padding-right: 21px; }
  .help-steps { padding-left: 21px; padding-right: 21px; }
}
@media (max-width: 420px) {
  .product-header { padding-left: 14px; padding-right: 14px; }
  .help-button { display: none; }
  .brand strong { font-size: 23px; }
  .brand small { font-size: 9px; }
  .brand { gap: 7px; }
  .brand-mark, .brand-mark img { width: 30px; height: 34px; }
  .account-header-button { padding: 8px; }
  .product-actions .api-status { display: none; }
  .nav-item { font-size: 12px; padding: 8px 11px; gap: 5px; }
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .workspace-tabs { gap: 9px; padding-left: 13px; padding-right: 13px; }
  .workspace-tabs button { font-size: 12px; }
  .starter-prompts { gap: 5px; }
  .starter-prompts button { gap: 4px; padding: 8px; }
  .empty-state h2 { font-size: 16px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .gallery-card > img { max-height: 350px; }
}
@media (max-width: 350px) {
  .account-user-button { max-width: 76px; }
  .account-header-balance { max-width: 72px; }
  .workspace-tabs button { font-size: 11px; }
  .workspace-tabs button svg { display: none; }
  .starter-prompts button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
