/* Product system for the creator studio — loaded last in index.html.

   Layering (earlier files keep their component rules; tokens are decided here):
   styles.css / modern.css      base reset, legacy --ui-* tokens
   workspace.css / studio.css   shared studio layout
   creator-studio.css           studio components (previously navy palette)
   creator-experience.css …     feature-specific components
   account-navigation.css       a previous light-theme token patch
   rich-content.css             result reading (text, tables, JSON, files)
   product-system.css           ← single source of color/type/spacing tokens,
                                  control states and the product workspace.
   The palette matches the Windows client: warm white with deep green, and a
   deep green-charcoal night theme. The embedded client CSS
   (html.factory-client-embedded) is injected later with the same palette. */

html body.simple-workspace.creator-studio[data-theme] {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius-s: 8px; --radius-m: 12px; --radius-l: 16px;
  --text-xs: 11px; --text-s: 12px; --text-m: 14px; --text-l: 16px; --text-xl: 20px;
  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
  --sidebar-width: 240px;
}
html body.simple-workspace.creator-studio[data-theme="light"] {
  color-scheme: light;
  --canvas: #f8f9f5;
  --paper: #ffffff;
  --soft: #f1f4ee;
  --leaf-paper: #f5f7f2;
  --ink: #142c26;
  --ink-soft: #56675e;
  --line: #e1e7de;
  --branch: #cbd6c9;
  --accent: #0b6e5c;
  --accent-hover: #08574a;
  --accent-ink: #ffffff;
  --accent-soft: #e4f1e9;
  --studio-gold: #0b6e5c;
  --status-ready: #2d6693;
  --danger: #a8402f;
  --studio-shadow: 0 1px 2px #1d3a2f0d, 0 4px 14px #1d3a2f0a;
  --ui-bg: var(--canvas); --ui-surface: var(--paper); --ui-surface-soft: var(--soft);
  --ui-ink: var(--ink); --ui-muted: var(--ink-soft); --ui-subtle: var(--ink-soft);
  --ui-line: var(--line); --ui-line-strong: #c9cfc3; --ui-accent: var(--accent);
  --ui-accent-soft: var(--accent-soft); --ui-danger: var(--danger);
}
html body.simple-workspace.creator-studio[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111614;
  --paper: #171e1b;
  --soft: #212a26;
  --leaf-paper: #1a221f;
  --ink: #e8eee9;
  --ink-soft: #a3b0a9;
  --line: #2c3833;
  --branch: #3b4a43;
  --accent: #6ccfb0;
  --accent-hover: #8fe0c6;
  --accent-ink: #0d1f19;
  --accent-soft: #1b3a30;
  --studio-gold: #6ccfb0;
  --status-ready: #8fbfe6;
  --danger: #ef8f7c;
  --studio-shadow: 0 1px 2px #0006, 0 8px 24px #0004;
  --ui-bg: var(--canvas); --ui-surface: var(--paper); --ui-surface-soft: var(--soft);
  --ui-ink: var(--ink); --ui-muted: var(--ink-soft); --ui-subtle: var(--ink-soft);
  --ui-line: var(--line); --ui-line-strong: #46564f; --ui-accent: var(--accent);
  --ui-accent-soft: var(--accent-soft); --ui-danger: var(--danger);
}
body.simple-workspace.creator-studio { background: var(--canvas); color: var(--ink); }

/* ---------- Controls ---------- */
.creator-studio :where(button, a, input, textarea, select, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-s); }
.creator-studio .button { min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-s); font-size: var(--text-m); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.creator-studio .button.button-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.creator-studio .button.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); box-shadow: none; }
.creator-studio .button.button-secondary { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.creator-studio .button.button-secondary:hover:not(:disabled) { border-color: var(--branch); background: var(--soft); }
.creator-studio .button:disabled { opacity: .55; cursor: not-allowed; }
.creator-studio .text-button { color: var(--accent); background: none; border: 0; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: var(--text-s); cursor: pointer; text-decoration: none; }
.creator-studio .text-button:hover:not(:disabled) { background: var(--accent-soft); }
.creator-studio .text-button:disabled { color: var(--ink-soft); opacity: .7; cursor: not-allowed; }
.creator-studio .quiet-caption { color: var(--ink-soft); font-size: var(--text-s); line-height: 1.7; }

/* ---------- Dialogs ---------- */
.creator-studio .studio-dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: 0 24px 80px #0b1a1440; }
.creator-studio .studio-dialog::backdrop, .creator-studio .file-viewer::backdrop { background: #0b1712a6; backdrop-filter: blur(4px); }
.creator-studio .studio-dialog > header { align-items: center; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--line); }
.creator-studio .studio-dialog > header .studio-kicker { color: var(--accent); letter-spacing: .08em; font-size: var(--text-xs); margin: 0; }
.creator-studio .studio-dialog > header h2 { font-size: 17px; font-weight: 600; margin: 2px 0 0; }

/* ---------- Product workspace (completed product) ---------- */
.creator-studio .studio-dialog.is-product-workspace { width: min(1400px, calc(100vw - 32px)); max-width: none; height: calc(100dvh - 32px); max-height: none; }
.creator-studio .studio-dialog.is-product-workspace .studio-dialog-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-detail-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
.product-detail-tabs { display: none; }
.product-detail-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.product-detail-aside { min-width: 0; overflow: auto; overscroll-behavior: contain; padding: var(--space-5) var(--space-5) var(--space-6); background: var(--leaf-paper); display: flex; flex-direction: column; gap: var(--space-5); }
.product-detail-aside > * { margin: 0 !important; }
.product-detail-aside .product-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--text-xs); color: var(--ink-soft); }
.product-detail-aside .product-detail-meta span { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.product-detail-aside .product-overview { display: flex; flex-direction: column; gap: var(--space-3); border: 0; padding: 0; background: none; }
.product-detail-aside .product-overview > p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--ink); white-space: normal; }
.product-detail-aside .product-ready-badge { align-self: flex-start; font-size: var(--text-s); color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.product-detail-aside .friendly-files { margin: 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.product-detail-aside .friendly-files h3, .product-detail-aside .product-feedback-composer label, .product-detail-aside .delivery-data-help h3 { margin: 0 0 var(--space-2); font-size: 13px; font-weight: 600; color: var(--ink); }
.product-detail-aside .friendly-files > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) 0; border-top: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.product-detail-aside .friendly-files > h3 + div { border-top: 0; }
.dialog-loading-elapsed { color: var(--ink-soft); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
/* COZE native import package: the primary download of a COZE version. */
.coze-import { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); margin: var(--space-3) 0; padding: var(--space-4); border: 1px solid var(--accent); border-radius: var(--radius-m); background: var(--paper); }
.coze-import header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--space-2); }
.coze-import h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.coze-import header small, .coze-import .quiet-caption { margin: 0; font-size: var(--text-xs); color: var(--ink-soft); }
.coze-import-file { margin: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.coze-import-guides { display: flex; flex-direction: column; gap: 4px; width: 100%; padding-top: var(--space-2); border-top: 1px solid var(--line); font-size: 13px; }
.coze-import-guides > span:first-child { font-size: var(--text-xs); color: var(--ink-soft); }
.coze-import-guide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.coze-import-guide b { font-weight: 500; }
.product-flow-details { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.product-flow-details > summary { cursor: pointer; padding: var(--space-3) var(--space-4); font-size: 13px; font-weight: 600; }
.product-flow-details[open] > summary { border-bottom: 1px solid var(--line); }
.product-flow-details .diagram-wrap { margin: var(--space-3); max-height: 420px; overflow: auto; }
.product-detail-aside .product-feedback-composer { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.product-detail-aside .product-feedback-history { display: flex; flex-direction: column; gap: var(--space-3); }

/* Trial workspace */
.trial-workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-4); background: var(--paper); border: 0; }
.trial-workspace .product-trial-heading { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin: 0; }
.trial-workspace .product-trial-heading h3 { margin: 0 auto 0 0; font-size: var(--text-l); font-weight: 600; line-height: 1.4; color: var(--ink); }
.trial-workspace .product-trial-heading h3 + button { order: 2; }
.trial-workspace .trial-improve { order: 1; }
.trial-workspace .trial-description { margin: 0; }
.trial-history-error { margin: 0; font-size: var(--text-s); color: var(--danger); }
.trial-thread { position: relative; flex: 1; min-height: 160px; display: flex; flex-direction: column; }
.trial-workspace .product-trial-messages { flex: 1; min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-3) var(--space-1) var(--space-4); scroll-padding-bottom: 24px; }
.production-scroll .trial-workspace .product-trial-messages { max-height: 62vh; }
.trial-workspace .product-message { margin: 0; padding: 0; border: 0; background: none; max-width: min(920px, 100%); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.trial-workspace .product-message.user, .trial-workspace .product-message.teacher { align-self: flex-end; max-width: min(720px, 86%); padding: var(--space-3) var(--space-4); border-radius: var(--radius-m) var(--radius-m) 4px var(--radius-m); background: var(--accent-soft); }
.trial-workspace .product-message.assistant { align-self: stretch; }
.trial-message-head { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--ink-soft); }
.trial-message-head > span { font-weight: 600; letter-spacing: .02em; }
.product-message.assistant .trial-message-head > span { color: var(--accent); }
.studio-dialog .product-message > .trial-message-body, .trial-message-body { white-space: normal; font-size: var(--text-m); line-height: 1.8; color: var(--ink); min-width: 0; }
.trial-delivery { font-size: var(--text-xs); color: var(--ink-soft); }
.trial-delivery.is-verifying { color: #8a5a12; }
[data-theme="dark"] .trial-delivery.is-verifying { color: #f0c27f; }
.trial-workspace .trial-failed { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 13px; }
.trial-workspace .acceptance-caption { font-size: var(--text-xs); color: var(--ink-soft); }
.trial-workspace .trial-empty { margin: auto; max-width: 420px; text-align: center; color: var(--ink-soft); padding: var(--space-6) var(--space-4); }
.trial-workspace .trial-empty span { font-size: 22px; color: var(--accent); }
.trial-workspace .trial-empty h4 { margin: var(--space-2) 0 var(--space-1); font-size: 15px; color: var(--ink); font-weight: 600; }
.trial-workspace .trial-empty p { margin: 0; font-size: 13px; line-height: 1.7; }
.trial-jump { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: var(--text-s); box-shadow: var(--studio-shadow); cursor: pointer; }
.trial-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); background: var(--soft); font-size: 13px; color: var(--ink); }
.trial-status-text { flex: 1; min-width: 0; }
.trial-status-time { flex-basis: 100%; padding-left: calc(8px + var(--space-2)); font-size: var(--text-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.trial-status-note { flex-basis: 100%; padding-left: calc(8px + var(--space-2)); font-size: 11px; color: var(--ink-soft); }
.trial-status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: trial-pulse 1.6s ease-in-out infinite; }
.trial-status[data-phase="verifying"] .trial-status-dot, .trial-status[data-phase="reconnecting"] .trial-status-dot { background: #c98a2b; }
@keyframes trial-pulse { 50% { opacity: .35; } }
.trial-notice { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--danger); font-size: 13px; line-height: 1.6; }
.trial-composer { margin: 0; }
.trial-composer .chat-input-shell { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); padding: var(--space-2) var(--space-3); }
.trial-composer .chat-input-shell:focus-within { border-color: var(--accent); }
.trial-composer textarea { width: 100%; min-height: 52px; max-height: 220px; border: 0 !important; outline: none; box-shadow: none !important; background: transparent; resize: none; font: inherit; font-size: var(--text-m); line-height: 1.7; color: var(--ink); padding: 4px 2px; }
.trial-composer textarea:read-only { color: var(--ink-soft); }
.trial-composer[data-trial-state="sending"] .attachment-drafts { opacity: .6; }
.trial-composer .product-composer-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.trial-composer-hint { flex: 1; font-size: var(--text-xs); color: var(--ink-soft); }

@media (max-width: 1000px) {
  .creator-studio .studio-dialog.is-product-workspace { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .product-detail-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .product-detail-tabs { display: flex; gap: 4px; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--line); background: var(--paper); }
  .product-detail-tabs button { flex: 1; border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 13px; padding: 8px; border-radius: var(--radius-s); cursor: pointer; }
  .product-detail-tabs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .product-detail-main { border-right: 0; }
  .product-detail-layout[data-detail-pane="trial"] .product-detail-aside,
  .product-detail-layout[data-detail-pane="info"] .product-detail-main { display: none; }
  .trial-workspace { padding: var(--space-3) var(--space-4); }
  .trial-composer-hint { display: none; }
}
@media (min-width: 1001px) {
  .creator-studio .studio-dialog.is-product-workspace .product-trial-jump { display: none; }
}
@media (max-width: 520px) {
  .trial-workspace .product-message.user { max-width: 94%; }
  .creator-studio .studio-dialog > header { padding: 10px 10px 10px 16px; }
}

/* The trial used to be a boxed card inside the product dialog
   (creator-studio.css .studio-dialog .product-trial, creator-experience.css
   .product-workspace .product-trial, lifecycle.css #testChatForm). Those rules
   are more specific than the component rules above, so the workspace states
   its own box model at matching specificity here rather than with !important. */
.simple-workspace.creator-studio .trial-workspace.product-trial { position: static; height: auto; min-height: 0; margin: 0; padding: var(--space-4) var(--space-5); border: 0; border-radius: 0; background: var(--paper); overflow: visible; }
.simple-workspace.creator-studio .production-scroll .trial-workspace.product-trial { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.simple-workspace.creator-studio .trial-workspace .product-trial-heading h3 { margin: 0 auto 0 0; font-size: var(--text-l); font-weight: 600; }
.simple-workspace.creator-studio .trial-workspace .quiet-caption { margin: 0; font-size: var(--text-s); }
.simple-workspace.creator-studio .trial-workspace .product-message { margin: 0; padding: 0; border: 0; background: none; }
.simple-workspace.creator-studio .trial-workspace .product-message:is(.user, .teacher) { margin-left: 0; padding: var(--space-3) var(--space-4); background: var(--accent-soft); }
.simple-workspace.creator-studio .trial-workspace .product-message > div { font-size: var(--text-m); line-height: 1.8; white-space: normal; }
.simple-workspace.creator-studio .trial-workspace .acceptance-message { padding: var(--space-3) var(--space-4); border: 1px dashed var(--line); border-radius: var(--radius-m); }
.simple-workspace.creator-studio #testChatForm.trial-composer { display: block; margin: 0; padding-top: var(--space-2); }
.simple-workspace.creator-studio #testChatForm.trial-composer textarea { min-height: 52px; max-height: 220px; font-size: var(--text-m); resize: none; }
.simple-workspace.creator-studio #testChatForm.trial-composer .button { min-height: 38px; font-size: 13px; }

/* Embedded in the Windows client: the client shell supplies the brand and
   height; keep the workspace dialog inside the visible area. */
html.factory-client-embedded .creator-studio .studio-dialog.is-product-workspace { height: calc(100dvh - 24px); }

@media (prefers-reduced-motion: reduce) {
  .trial-status-dot { animation: none; }
  .creator-studio .product-trial-messages { scroll-behavior: auto; }
}

/* Requirement page: the newest usable product leads; history is folded. */
.studio-output .latest-product{display:grid;gap:var(--space-2);padding:var(--space-4);border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:var(--radius-m);background:color-mix(in srgb,var(--accent-soft) 45%,var(--paper))}
.latest-product-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:30px;position:relative}
.latest-product-heading .item-menu-trigger{opacity:1;position:static}
.latest-product-kicker{font-size:var(--text-xs);font-weight:600;letter-spacing:.06em;color:var(--accent)}
.latest-product-name{margin:0;font-size:var(--text-l);line-height:1.5;color:var(--ink);overflow-wrap:anywhere}
.latest-product-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0;font-size:var(--text-s);color:var(--ink-soft)}
.latest-product-description{margin:0;font-size:13px;line-height:1.75;color:var(--ink-soft)}
.latest-product-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2) var(--space-3);margin-top:var(--space-2)}
.latest-product-platforms{margin-top:var(--space-4)}
.latest-product-platforms h3,.studio-output .latest-product-history>summary{margin:0 0 var(--space-2);font-size:13px;font-weight:600;color:var(--ink)}
.latest-platform-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) 0;border-top:1px solid var(--line)}
.simple-workspace .latest-platform-open{display:grid;gap:2px;min-width:0;padding:4px 0;border:0;background:transparent;color:var(--ink);text-align:left;cursor:pointer;font:inherit}
.latest-platform-open strong{font-size:13px}
.latest-platform-open small{font-size:var(--text-xs);color:var(--ink-soft)}
.latest-platform-open:hover strong{color:var(--accent)}
.latest-platform-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px 10px;flex-shrink:0;font-size:var(--text-s)}
.studio-output .latest-product-history{margin-top:var(--space-4);padding-top:var(--space-3);border-top:1px solid var(--line)}
.studio-output .latest-product-history>summary{cursor:pointer;margin:0}
.latest-product-history>summary span{margin-left:6px;font-weight:400;color:var(--ink-soft)}
.latest-product-history .release-history-list{margin-top:var(--space-2)}
.simple-workspace.creator-studio .session-status.paused{color:var(--status-paused)}
.simple-workspace.creator-studio .session-status.failed{color:var(--danger)}

/* The website and desktop shell share one navigation hierarchy. */
body.simple-workspace.creator-studio { --sidebar-width: 240px; font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.simple-workspace.creator-studio .sidebar-primary-navigation { display: block; flex: 0 0 auto; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.simple-workspace.creator-studio .sidebar-primary-navigation .studio-nav { display: grid; gap: 4px; }
.simple-workspace.creator-studio .sidebar-primary-navigation .studio-nav > :is(button,.account-nav-link) { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; border: 0; border-radius: 8px; padding: 10px; font-size: 13px; text-align: left; }
.simple-workspace.creator-studio .sidebar-primary-navigation .studio-nav > :is(button,.account-nav-link) > :is(span[aria-hidden],svg) { flex: 0 0 17px; width: 17px; height: 17px; }
.simple-workspace.creator-studio .sidebar-primary-navigation .studio-nav > button:first-child { border-right: 0; }
.simple-workspace.creator-studio .sidebar-primary-navigation .account-nav-divider { display: none; }
body.simple-workspace.creator-studio .sidebar-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 8px; }
.simple-workspace.creator-studio .sidebar-head h2 { font-size: 12px; letter-spacing: 0; }
body.simple-workspace.creator-studio #newRequirementButton { width: 28px; min-width: 28px; height: 28px; padding: 0; justify-content: center; border: 0; background: transparent; color: var(--ink-soft); }
#newRequirementButton > span { display: none; }
.simple-workspace.creator-studio .sidebar .conversation-search { margin-bottom: 12px; }
.simple-workspace.creator-studio .sidebar .requirement-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.simple-workspace.creator-studio .sidebar-account { flex: 0 0 auto; border-top: 1px solid var(--line); margin-top: auto; padding-top: 12px; }
.simple-workspace.creator-studio .sidebar-account .settings-dock { width: 100%; max-width: none; }
.simple-workspace.creator-studio .settings-menu { top: auto; right: auto; left: 12px; bottom: 82px; width: 228px; max-height: calc(100dvh - 110px); overflow-y: auto; }
body.simple-workspace.creator-studio .main-content { container-type: inline-size; }
.simple-workspace.creator-studio .studio-project { display: flex; flex-direction: column; height: 100%; min-height: 0; max-width: none; overflow: hidden; }
.simple-workspace.creator-studio .studio-project-header { flex: 0 0 auto; padding-bottom: 14px; }
.simple-workspace.creator-studio .studio-project-header h1 { font-size: 21px; }
.simple-workspace.creator-studio .creator-journey { flex: 0 0 auto; padding-bottom: 16px; }
.simple-workspace.creator-studio .studio-creation-grid { flex: 1; min-height: 0; height: auto; display: grid; grid-template-columns: minmax(320px,.85fr) minmax(360px,1.15fr); gap: 20px; overflow: hidden; }
.simple-workspace.creator-studio .studio-chat { position: static; display: flex; min-height: 0; height: 100%; max-height: none; overflow: hidden; width: 100%; align-self: stretch; }
.simple-workspace.creator-studio .studio-output { display: flex; height: 100%; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; width: 100%; align-self: stretch; }
.simple-workspace.creator-studio .studio-output > * { flex-shrink: 0; }
.simple-workspace.creator-studio .studio-creation-grid > :is(.studio-chat,.studio-output) { height: 100%; min-height: 0; max-height: none; align-self: stretch; }
.simple-workspace.creator-studio .studio-output.plan-scroll { height: 100%; overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
.simple-workspace.creator-studio .studio-creation-grid { --studio-pane-height: 100%; }
@media (min-width: 761px) { body.simple-workspace.creator-studio .workspace { grid-template-columns: 240px minmax(0,1fr); } }
@media (max-width: 760px) {
  body.simple-workspace.creator-studio .topbar { height: 64px; min-height: 64px; flex-basis: 64px; flex-wrap: nowrap; }
  body.simple-workspace.creator-studio .workspace { height: calc(100dvh - 64px); }
  body.simple-workspace.creator-studio .sidebar,
  .simple-workspace.creator-studio.creator-menu-open .creator-menu-backdrop { top: 64px; }
}
.simple-workspace.creator-studio .studio-project .workbench-tabs { display: none; }
.simple-workspace.creator-studio .studio-chat .conversation-scroll { min-height: 0; flex: 1 1 auto; }
.simple-workspace.creator-studio .studio-chat .message { max-width: 800px; }
.simple-workspace.creator-studio .studio-flow-canvas .diagram-viewport { height: clamp(320px,44dvh,680px); }
@container (min-width: 841px) {
  .simple-workspace.creator-studio .studio-project[data-mobile-pane] .studio-chat,
  .simple-workspace.creator-studio .studio-project[data-mobile-pane] .studio-output { display: flex; }
}
@container (max-width: 840px) {
  .simple-workspace.creator-studio .studio-creation-grid { display: flex; flex-direction: column; align-items: stretch; }
  .simple-workspace.creator-studio .studio-project .workbench-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; background: var(--soft); border-radius: 8px; flex-shrink: 0; }
  .simple-workspace.creator-studio .studio-project .workbench-tabs button { flex: 1; min-height: 36px; background: transparent; border: 0; border-radius: 6px; color: var(--ink-soft); font-size: 13px; }
  .simple-workspace.creator-studio .studio-project .workbench-tabs button[aria-pressed="true"] { color: var(--ink); background: var(--paper); }
  .simple-workspace.creator-studio .studio-project[data-mobile-pane="conversation"] .studio-output,
  .simple-workspace.creator-studio .studio-project[data-mobile-pane="plan"] .studio-chat { display: none; }
  .simple-workspace.creator-studio .studio-project[data-mobile-pane="conversation"] .studio-chat,
  .simple-workspace.creator-studio .studio-project[data-mobile-pane="plan"] .studio-output { display: flex; flex: 1; }
  .simple-workspace.creator-studio .creator-journey { gap: 10px; overflow-x: auto; white-space: nowrap; }
  .simple-workspace.creator-studio .creator-journey li + li::before { margin-right: 0; }
  .simple-workspace.creator-studio .studio-project-header h1 { font-size: 17px; }
  .simple-workspace.creator-studio #answerForm .chat-input-shell > textarea { min-height: 80px; max-height: 160px; }
}
