/* Studio v2: a quiet, full-width three-workspace interface.
   Overrides the legacy component sheet without changing workflow logic. */
:root {
  --studio-bg: #f5f6f3;
  --studio-surface: #fff;
  --studio-ink: #243a34;
  --studio-muted: #697870;
  --studio-line: #e1e7e1;
  --studio-accent: #216653;
  --studio-tint: #edf4ef;
  --studio-radius: 16px;
}
body[data-ui-version] {
  background: var(--studio-bg); color: var(--studio-ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px; -webkit-font-smoothing: antialiased;
  --product-blue: var(--studio-accent); --product-teal: var(--studio-accent);
  --product-ink: var(--studio-ink); --product-subtle: var(--studio-muted);
  --product-line: var(--studio-line);
}
body[data-ui-version] .app-shell { display: block; width: 100%; max-width: none; min-height: 100vh; overflow: visible; }
body[data-ui-version] svg { width: 22px; height: 22px; flex-shrink: 0; }
body[data-ui-version] button, body[data-ui-version] input, body[data-ui-version] textarea, body[data-ui-version] select { font-family: inherit; }
body[data-ui-version] button { -webkit-tap-highlight-color: transparent; }
body[data-ui-version] button:focus-visible,
body[data-ui-version] a:focus-visible,
body[data-ui-version] summary:focus-visible,
body[data-ui-version] [tabindex]:focus-visible { outline: 3px solid #42856d; outline-offset: 3px; }
body[data-ui-version] button:disabled { cursor: not-allowed; opacity: .6; }
body[data-ui-version] [hidden] { display: none !important; }

/* Persistent top navigation. No sidebar or constrained content pane. */
.workbench-header {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; height: 78px; padding: 0 36px;
  border-bottom: 1px solid var(--studio-line); background: #fffffffa;
}
.workbench-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.workbench-logo { display: grid; place-items: center; width: 38px; height: 42px; border-radius: 11px; background: #254d40; color: #fff; }
body[data-ui-version] .workbench-logo svg { width: 28px; height: 28px; }
.workbench-brand strong { display: block; color: #263d33; font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.workbench-brand div > span { display: block; margin-top: 4px; color: #6f8377; font-size: 9px; letter-spacing: 2.6px; }
.workbench-local { display: flex; align-items: center; gap: 8px; color: var(--studio-muted); font-size: 12px; white-space: nowrap; }
.workbench-local i { width: 6px; height: 6px; border-radius: 50%; background: #87998c; }
.workbench-balance {
  display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; row-gap: 1px;
  min-width: 148px; min-height: 44px; padding: 7px 8px 7px 15px; border: 1px solid var(--studio-line);
  border-radius: 999px; color: var(--studio-ink); background: var(--studio-surface); text-align: left;
}
.workbench-balance > span { grid-column: 1; color: var(--studio-muted); font-size: 10px; line-height: 1.1; }
.workbench-balance > strong { grid-column: 1; font-size: 14px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.workbench-balance > em {
  grid-column: 2; grid-row: 1 / span 2; align-self: stretch; display: grid; place-items: center;
  min-width: 49px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 700;
}
body[data-ui-version] .workspace-tabs {
  display: flex; gap: 4px; width: auto; margin: 0; padding: 4px;
  border: 1px solid #e8ece6; border-radius: 12px; background: #f3f5f1; box-shadow: none;
}
body[data-ui-version] .workspace-tabs button {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 40px; width: auto; padding: 0 22px; border: 1px solid transparent;
  border-radius: 9px; background: transparent; color: #69786f; font-size: 14px;
  font-weight: 600; text-align: center; box-shadow: none; transform: none;
  transition: background .15s, color .15s;
}
body[data-ui-version] .workspace-tabs svg { width: 18px; height: 18px; }
body[data-ui-version] .workspace-tabs button::before,
body[data-ui-version] .workspace-tabs button::after { display: none; }
body[data-ui-version] .workspace-tabs button:hover { background: #e7ede7; color: var(--studio-accent); }
body[data-ui-version] .workspace-tabs button.active { color: var(--studio-accent); background: white; border-color: #dde6dd; box-shadow: 0 2px 4px #203e2810; }
body[data-ui-version] .main { width: 100%; max-width: none; margin: 0; padding: 30px 36px 64px; overflow: visible; }
body[data-ui-version] .main::before { display: none; }
body[data-ui-version] .topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 0; padding: 0 0 26px; margin: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
body[data-ui-version] .topbar::before, body[data-ui-version] .topbar::after { display: none; }
body[data-ui-version] .topbar .eyebrow { margin: 0 0 8px; color: #768577; font-size: 10px; font-weight: 600; letter-spacing: 2.3px; }
body[data-ui-version] #accountTitle { margin: 0; color: #20382f; font-size: 29px; line-height: 1.4; font-weight: 700; letter-spacing: -.6px; }
body[data-ui-version] .topbar .subtitle { margin: 8px 0 0; color: var(--studio-muted); line-height: 1.7; font-size: 13px; max-width: 800px; }
.workspace-section-label { color: #7c8a7d; font-size: 12px; white-space: nowrap; padding-left: 15px; border-left: 2px solid #bdccbc; }
body[data-ui-version] .workspace-view { width: 100%; min-width: 0; max-width: none; gap: 22px; }
body[data-ui-version] .workspace-view.active { animation: none; }
body[data-ui-version] .workspace-view > .detail-card {
  width: 100%; min-width: 0; max-width: none; margin: 0; padding: 26px;
  border: 1px solid var(--studio-line); border-radius: var(--studio-radius);
  background: white; box-shadow: 0 3px 12px #253c2403;
}
body[data-ui-version] .workspace-view > .detail-card::before,
body[data-ui-version] .workspace-view > .detail-card::after { display: none; }
body[data-ui-version] .panel-heading { margin-bottom: 18px; align-items: center; }
body[data-ui-version] .panel-heading h3 { margin: 0; color: var(--studio-ink); font-size: 18px; font-weight: 650; }
body[data-ui-version] .section-caption { margin: 7px 0 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body[data-ui-version] .publish-note { color: var(--studio-muted); font-size: 12px; line-height: 1.8; }
body[data-ui-version] .ghost-button { border: 1px solid var(--studio-line); border-radius: 8px; color: #52675c; background: white; box-shadow: none; min-height: 36px; padding: 0 16px; font-size: 13px; }

/* Form elements share a consistent scale and a single accent color. */
body[data-ui-version] .product-field-card { min-width: 0; gap: 9px; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
body[data-ui-version] .product-field-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body[data-ui-version] .product-field-label b { color: #35483f; font-size: 14px; font-weight: 600; }
body[data-ui-version] .product-field-label em { color: #708174; background: #f0f4ef; border-radius: 5px; padding: 2px 6px; font-size: 11px; font-style: normal; font-weight: 500; }
body[data-ui-version] .product-field-card input,
body[data-ui-version] .product-field-card textarea,
body[data-ui-version] .product-field-card select,
body[data-ui-version] #commissionExtraInput {
  width: 100%; min-width: 0; margin: 0; padding: 11px 13px; min-height: 46px;
  color: #33463d; font-size: 14px; font-weight: 400; line-height: 1.65;
  border: 1px solid #dce4db; border-radius: 9px; background: #fcfdfb; box-shadow: none;
}
body[data-ui-version] input::placeholder, body[data-ui-version] textarea::placeholder { color: #8b978c; font-size: 13px; opacity: 1; }
body[data-ui-version] input:focus, body[data-ui-version] textarea:focus, body[data-ui-version] select:focus { outline: 0; border-color: #5d957f; box-shadow: 0 0 0 3px #21665312; background: white; }
body[data-ui-version] .product-field-card small { color: var(--studio-muted); font-size: 12px; line-height: 1.65; font-weight: 400; }
body[data-ui-version] .product-more-options { padding-top: 16px; margin: 0; border-top: 1px solid #e9eee6; }
body[data-ui-version] .product-more-options > summary { min-height: 26px; width: 100%; gap: 8px; color: #52665a; font-size: 13px; line-height: 1.6; font-weight: 500; }
body[data-ui-version] .product-more-options > summary::before { width: 20px; height: 20px; border-radius: 5px; background: #eef3eb; color: #58705f; font-weight: 600; flex-shrink: 0; }
body[data-ui-version] .product-more-options > summary span { margin-left: auto; color: #7e8d80; font-size: 11px; font-weight: 400; text-align: right; }
body[data-ui-version] .product-more-options > .product-field-card,
body[data-ui-version] .product-more-options > .product-optional-assets { margin-top: 16px; }
body[data-ui-version] .product-image-upload,
body[data-ui-version] .product-benchmark-upload,
body[data-ui-version] .commission-reference-picker {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-width: 0; min-height: 176px; padding: 24px 18px; border: 1px dashed #c7d7c8;
  border-radius: 12px; background: #f8faf6; box-shadow: none; text-align: center;
  transition: border-color .15s, background .15s;
}
body[data-ui-version] .product-image-upload:hover,
body[data-ui-version] .product-benchmark-upload:hover,
body[data-ui-version] .commission-reference-picker:hover { background: #edf5ec; border-color: #6d9b7d; box-shadow: none; transform: none; }
body[data-ui-version] .product-image-upload::before,
body[data-ui-version] .product-benchmark-upload::before { display: none; }
body[data-ui-version] .product-upload-icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: #eaf1e6; color: #54795c; box-shadow: none; }
body[data-ui-version] .product-upload-copy { color: #778675; font-size: 12px; font-weight: 400; line-height: 1.65; max-width: 340px; }
body[data-ui-version] .video-field small { color: #849080; font-size: 11px; font-weight: 400; }
body[data-ui-version] .primary-button, body[data-ui-version] #productH3OmniButton {
  display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 46px;
  padding: 0 24px; border: 1px solid #216653; border-radius: 9px;
  color: white; background: #216653; font-size: 14px; font-weight: 600;
  box-shadow: 0 3px 6px #173f2710; transition: background .15s;
}
body[data-ui-version] .primary-button:hover, body[data-ui-version] #productH3OmniButton:hover { background: #184f40; border-color: #184f40; transform: none; box-shadow: none; }

/* Discover: concise guidance, clear mode choice, reusable reference assets. */
body[data-ui-version] .collection-guide { margin: -3px 0 24px; color: var(--studio-muted); font-size: 12px; line-height: 1.8; }
body[data-ui-version] .collection-guide summary { width: fit-content; cursor: pointer; color: #657769; }
body[data-ui-version] .collection-guide p { max-width: 900px; margin: 10px 0 0; padding: 12px 16px; border-left: 2px solid #bbd0bd; background: #f8faf5; }
body[data-ui-version] #commissionFinderForm { display: grid; grid-template-columns: 1fr auto; gap: 22px; max-width: none; padding: 0; border: 0; border-radius: 0; background: none; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; grid-column: 1/-1; border: 0; padding: 0; margin: 0; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-picker legend { margin-bottom: 12px; padding: 0; color: #35483f; font-size: 13px; font-weight: 600; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-option { display: flex; align-items: center; gap: 13px; min-height: 75px; padding: 17px 20px; border: 1px solid var(--studio-line); border-radius: 11px; background: #fff; box-shadow: none; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-option:has(input:checked) { border-color: #99b99e; background: #f2f7ee; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-option input { accent-color: #216653; width: 16px; height: 16px; box-shadow: none; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-option strong { color: #3c5142; font-size: 14px; font-weight: 600; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-option small { color: #72806e; font-size: 12px; font-weight: 400; }
body[data-ui-version] #commissionFinderForm .benchmark-reference-uploads { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; grid-column: 1/-1; }
body[data-ui-version] #commissionFinderForm > label { display: grid; gap: 10px; grid-column: 1/-1; color: #506449; font-size: 13px; font-weight: 500; }
body[data-ui-version] #commissionExtraInput { min-height: 76px; resize: vertical; }
body[data-ui-version] #commissionFinderButton { justify-self: start; min-width: 220px; }
body[data-ui-version] .publish-automation-status { padding: 15px 18px; margin-top: 20px; border: 1px solid #e1e9dc; border-radius: 10px; background: #f6f9f2; box-shadow: none; color: #67795f; font-size: 12px; line-height: 1.7; }
body[data-ui-version] .publish-automation-status strong { font-size: 13px; color: #425d42; }
body[data-ui-version] .publish-automation-status p { font-size: 12px; line-height: 1.7; }

/* Create: two focused panels, one clear action, no nested-card maze. */
body[data-ui-version] #workspace-product > .detail-card { padding: 0; background: none; border: 0; box-shadow: none; }
body[data-ui-version] .product-studio-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 28px; padding: 0; margin: 0 0 15px; border: 0; border-radius: 0; background: none; box-shadow: none; }
body[data-ui-version] .product-studio-intro > strong { font-size: 16px; font-weight: 650; color: #3b5043; }
.studio-format { display: flex; align-items: center; gap: 9px; color: #76836f; font-size: 11px; }
.studio-format i { width: 3px; height: 3px; background: #9ba694; border-radius: 50%; }
body[data-ui-version] #productH3OmniForm { display: grid; grid-template-columns: minmax(310px,.8fr) minmax(0,1.35fr); gap: 20px; padding: 0; margin: 0; background: none; border: 0; border-radius: 0; align-items: start; }
body[data-ui-version] .product-form-step { display: grid; align-content: start; gap: 24px; padding: 26px; height: auto; border: 1px solid var(--studio-line); border-radius: var(--studio-radius); background: white; box-shadow: 0 3px 12px #253c2403; }
body[data-ui-version] .product-step-heading { gap: 12px; }
body[data-ui-version] .product-step-heading > b { width: 29px; height: 29px; border-radius: 9px; background: #edf3e7; color: #63804e; font-size: 12px; font-weight: 600; }
body[data-ui-version] .product-step-heading strong { color: var(--studio-ink); font-size: 16px; font-weight: 600; }
body[data-ui-version] .product-step-heading span { margin-top: 2px; color: #7b8774; font-size: 12px; line-height: 1.6; font-weight: 400; }
body[data-ui-version] .product-essential-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
body[data-ui-version] [data-workspace-view="product"] .product-essential-fields input { height: 46px; }
body[data-ui-version] [data-workspace-view="product"] .product-essential-fields textarea { height: 104px; min-height: 104px; resize: vertical; }
body[data-ui-version] .product-required-assets, body[data-ui-version] .product-optional-assets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
body[data-ui-version] [data-workspace-view="product"] .product-required-assets .video-field { min-height: 211px; }
body[data-ui-version] [data-workspace-view="product"] .product-optional-assets .video-field { min-height: 152px; padding: 18px 12px; }
body[data-ui-version] .product-h3-mode-card { align-content: start; min-height: 0; }
body[data-ui-version] .product-h3-flow-summary { grid-column: 1/-1; grid-row: 3; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; padding: 0 6px; }
body[data-ui-version] .product-h3-flow-summary > div { display: grid; grid-template-columns: 27px 1fr; align-content: start; min-height: 0; gap: 3px 10px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
body[data-ui-version] .product-h3-flow-summary b { color: #81916f; font-size: 11px; line-height: 21px; font-weight: 500; }
body[data-ui-version] .product-h3-flow-summary strong { color: #5c6e53; font-size: 12px; font-weight: 500; }
body[data-ui-version] .product-h3-flow-summary span { color: #86907c; font-size: 11px; line-height: 1.6; }
body[data-ui-version] .product-generation-actions { grid-column: 1/-1; grid-row: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0; padding: 21px 26px; border: 1px solid #dce6d8; border-radius: 12px; background: #eaf1e5; box-shadow: none; }
body[data-ui-version] .product-generation-actions > div { display: grid; gap: 5px; }
body[data-ui-version] .product-generation-actions strong { color: #3b573c; font-size: 14px; font-weight: 600; }
body[data-ui-version] .product-generation-actions > div > span { color: #718569; font-size: 12px; line-height: 1.6; }
body[data-ui-version] #productH3OmniButton { min-width: 206px; }
body[data-ui-version] .product-live-status { margin: 20px 0; }

/* Results and history: readable status, restrained feedback, accessible actions. */
body[data-ui-version] .product-task-center-head { border: 0; background: none; box-shadow: none; padding: 20px 0 12px; }
body[data-ui-version] .product-task-center-head > div:first-child > span { color: #7b8a70; font-size: 10px; font-weight: 500; letter-spacing: 1.3px; }
body[data-ui-version] .product-task-center-head > div:first-child > strong { color: var(--studio-ink); font-size: 20px; font-weight: 650; }
body[data-ui-version] .product-task-center-counts span, body[data-ui-version] .product-task-center-counts em { min-height: 29px; border: 1px solid #e4e9df; background: white; color: #72836b; font-size: 11px; font-weight: 500; }
body[data-ui-version] .product-task-center-counts .running, body[data-ui-version] .product-task-center-counts .done { color: #42734e; background: #edf4e9; border-color: #dce9d4; }
body[data-ui-version] .product-task-center-counts .failed { color: #a85449; background: #fbf2ef; border-color: #f1dfd9; }
body[data-ui-version] .product-task-center-toolbar { flex-wrap: wrap; gap: 12px; padding: 9px 0; margin: 0 0 18px; border: 0; border-radius: 0; background: none; }
body[data-ui-version] .product-task-filters { gap: 7px; }
body[data-ui-version] .product-task-filters button, body[data-ui-version] .product-task-show-more { min-height: 36px; padding: 0 15px; border: 1px solid #dfe6da; border-radius: 8px; color: #72816a; background: white; font-size: 12px; font-weight: 500; }
body[data-ui-version] .product-task-filters button.is-active { border-color: #a6bca0; background: #e9f0e3; color: #47693c; }
body[data-ui-version] .product-task-toolbar-actions > span { color: #7d8b76; font-size: 11px; font-weight: 400; }
body[data-ui-version] .product-task-toolbar-actions button { min-height: 34px; font-size: 12px; font-weight: 500; border-radius: 8px; background: #fff; border-color: #e8ded8; color: #9a6860; }
body[data-ui-version] .product-task-window-grid { gap: 20px; }
body[data-ui-version] .product-task-window, body[data-ui-version] .product-task-window.is-history { padding: 22px; gap: 16px; background: white; border: 1px solid var(--studio-line); border-radius: var(--studio-radius); box-shadow: none; }
body[data-ui-version] .product-task-window.error { border-color: #eacdc3; }
body[data-ui-version] .product-task-window.success { border-color: #d6e5d3; }
body[data-ui-version] .product-task-window-head, body[data-ui-version] .product-task-window.is-history .product-task-window-head { min-height: 0; padding: 0; border-radius: 0; background: none; gap: 16px; }
body[data-ui-version] .product-task-window-head strong, body[data-ui-version] .product-task-window.is-history .product-task-window-head strong { font-size: 17px; line-height: 1.6; font-weight: 650; }
body[data-ui-version] .product-task-window-head p { font-size: 13px; line-height: 1.8; font-weight: 400; }
body[data-ui-version] .product-result-status { color: #7b8973; font-size: 11px; font-weight: 500; }
body[data-ui-version] .product-result-status i { background: #699873; box-shadow: none; }
body[data-ui-version] .product-task-window.error .product-result-status i { background: #bb7161; }
body[data-ui-version] .product-task-window-tools { gap: 8px; }
body[data-ui-version] .product-task-window-tools button, body[data-ui-version] .product-task-window-tools a { min-height: 36px; border-radius: 8px; padding: 0 13px; font-size: 12px; font-weight: 500; }
body[data-ui-version] .product-task-window-tools .is-retry,
body[data-ui-version] .product-task-window-tools .is-shot-preview,
body[data-ui-version] .product-task-window-tools .is-shot-preview.is-open,
body[data-ui-version] .product-task-window-tools a { color: #43704a; background: #f0f6eb; border-color: #d9e5d0; }
body[data-ui-version] .product-task-window-tools .is-delete { background: white; color: #89917f; border-color: #e5e9df; }
body[data-ui-version] .product-task-summary { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; background: #f8faf5; border: 1px solid #eaf0e3; border-radius: 9px; overflow: hidden; }
body[data-ui-version] .product-task-summary > div, body[data-ui-version] .product-task-window.is-history .product-task-summary > div { padding: 13px; min-height: 64px; border: 0; border-radius: 0; background: none; }
body[data-ui-version] .product-task-summary span { color: #829075; font-size: 11px; }
body[data-ui-version] .product-task-summary strong { color: #4e6242; font-size: 13px; font-weight: 500; }
body[data-ui-version] .product-task-details { border: 1px solid #e5ebde; background: white; border-radius: 9px; font-size: 12px; }
body[data-ui-version] .product-task-details summary { font-size: 12px; color: #667957; font-weight: 500; padding: 12px 14px; }
body[data-ui-version] .product-task-details p { line-height: 1.8; }
body[data-ui-version] .product-task-failure { border-color: #efddd5; border-radius: 9px; background: #fcf6f2; }
body[data-ui-version] .product-task-failure summary { color: #9b6150; font-weight: 600; }
body[data-ui-version] .product-task-failure summary span { font-size: 11px; font-weight: 400; color: #aa8b7b; }
body[data-ui-version] .product-task-failure p { max-height: 200px; overflow-y: auto; font-size: 12px; font-weight: 400; color: #936051; line-height: 1.8; }
body[data-ui-version] .product-task-window .product-oral-progress { border: 0; background: none; padding: 0; border-radius: 0; gap: 15px; }
body[data-ui-version] .product-generation-visual:not(.has-video) { min-height: 96px; border: 1px solid #e3ecd8; border-radius: 10px; background: #f1f6e9; box-shadow: none; }
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-canvas,
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-aura,
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-scan,
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-core { display: none; }
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-visual-copy { bottom: 22px; text-shadow: none; }
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-visual-copy small { color: #80936d; font-size: 9px; }
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-visual-copy strong { color: #52703b; font-size: 14px; font-weight: 500; }
body[data-ui-version] .product-generation-visual:not(.has-video) .product-generation-visual-copy em { color: #738b5d; font-size: 12px; }
body[data-ui-version] [data-workspace-view="product"] .product-oral-progress-track i { background: #699756; }
body[data-ui-version] [data-workspace-view="product"] .product-oral-progress-steps span { font-size: 11px; color: #8b977f; background: #f5f7f0; }
body[data-ui-version] [data-workspace-view="product"] .product-oral-progress-steps span.done { color: #557c43; background: #eef5e6; border-color: #dce9ce; }
body[data-ui-version] .product-task-empty { padding: 42px 20px; color: #859176; background: #fafcf7; border-color: #dae4cd; font-size: 13px; }
body[data-ui-version] .product-finished-compact { background: #f6f8f1; border-color: #e5ecd9; border-radius: 10px; }
body[data-ui-version] .product-shot-preview-item strong { font-size: 12px; }
body[data-ui-version] .product-shot-preview-item a { color: #447146; font-size: 11px; }

/* Library: stable image frames that preserve the full reference. */
body[data-ui-version] .reference-space-grid { grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 20px; margin-top: 22px; }
body[data-ui-version] .material-library-grid { grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 20px; }
body[data-ui-version] .reference-space-item, body[data-ui-version] .material-library-card { min-width: 0; border: 1px solid #e4e9dd; border-radius: 12px; background: white; box-shadow: none; overflow: hidden; }
body[data-ui-version] .reference-space-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #f7f8f4; }
body[data-ui-version] .reference-space-item > div { padding: 12px 14px; gap: 5px; }
body[data-ui-version] .reference-space-item span { color: #8a967d; font-size: 11px; font-weight: 400; }
body[data-ui-version] .reference-space-item strong { color: #4b6040; font-size: 13px; font-weight: 500; }
body[data-ui-version] .reference-space-item button { min-width: 40px; min-height: 30px; border: 1px solid #e4e8db; border-radius: 7px; background: #fffffff2; color: #748465; font-size: 11px; }
body[data-ui-version] .material-library-empty { grid-column: 1/-1; padding: 54px 24px; text-align: center; border: 1px dashed #dce5d3; border-radius: 12px; background: #fafcf7; color: #859375; font-size: 13px; }

/* Modal pickers: fixed header and footer, one scrollable results region. */
body[data-ui-version] .product-benchmark-picker { padding: 24px; }
body[data-ui-version] .product-benchmark-picker-backdrop { background: #15271d70; backdrop-filter: blur(4px); }
body[data-ui-version] .product-benchmark-picker-dialog { display: flex; flex-direction: column; gap: 0; width: min(940px,calc(100vw - 48px)); max-height: calc(100vh - 64px); overflow: hidden; padding: 26px; border: 1px solid #e4eadc; border-radius: 20px; background: #fff; box-shadow: 0 24px 100px #15271d40; }
body[data-ui-version] .product-benchmark-library-head { flex: 0 0 auto; margin-bottom: 22px; align-items: start; gap: 20px; }
body[data-ui-version] .product-benchmark-library-head strong { color: #304630; font-size: 20px; font-weight: 650; }
body[data-ui-version] .product-benchmark-library-head span { color: #7e8b70; font-size: 12px; line-height: 1.7; margin-top: 5px; }
body[data-ui-version] .product-benchmark-picker-close { width: 38px; height: 38px; font-size: 24px; border-radius: 10px; border-color: #e3e9db; color: #76876a; background: #f8faf5; }
body[data-ui-version] .product-benchmark-local-button { flex: 0 0 auto; padding: 18px; border: 1px dashed #c4d8b8; border-radius: 11px; background: #f8fbf3; gap: 4px 14px; }
body[data-ui-version] .product-benchmark-local-button > span { background: #eaf2e0; color: #5b8050; font-weight: 400; }
body[data-ui-version] .product-benchmark-local-button strong { color: #4c6940; font-size: 14px; font-weight: 600; }
body[data-ui-version] .product-benchmark-local-button small { color: #83956f; font-size: 12px; }
body[data-ui-version] .product-benchmark-picker-divider { flex: 0 0 auto; margin: 20px 0 15px; color: #819270; font-size: 12px; font-weight: 500; }
body[data-ui-version] .product-benchmark-picker-divider::before,
body[data-ui-version] .product-benchmark-picker-divider::after { background: #e7eddf; }
body[data-ui-version] .reference-asset-picker-grid,
body[data-ui-version] .product-benchmark-library-list { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 4px; margin: -4px; scrollbar-width: thin; scrollbar-color: #c5d4bb transparent; }
body[data-ui-version] .product-benchmark-group-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
body[data-ui-version] .reference-asset-picker-item,
body[data-ui-version] .product-benchmark-library-item { gap: 8px; padding: 9px; border: 1px solid #e0e8d8; border-radius: 11px; background: white; box-shadow: none; color: #526746; }
body[data-ui-version] .reference-asset-picker-item:hover,
body[data-ui-version] .product-benchmark-library-item:hover { border-color: #93b381; background: #fcfef8; transform: none; box-shadow: none; }
body[data-ui-version] .reference-asset-picker-item.is-selected,
body[data-ui-version] .product-benchmark-library-item.is-selected { border-color: #62834d; box-shadow: 0 0 0 2px #6b8b4e20; background: #f7fcef; }
body[data-ui-version] .reference-asset-picker-item img { object-fit: contain; background: #f7f9f2; }
body[data-ui-version] .reference-asset-picker-item strong,
body[data-ui-version] .product-benchmark-library-item strong { font-size: 13px; font-weight: 500; line-height: 1.5; }
body[data-ui-version] .reference-asset-picker-item small,
body[data-ui-version] .product-benchmark-library-item small { font-size: 11px; color: #879672; font-weight: 400; }
body[data-ui-version] .reference-asset-picker-item i { background: #547943; color: white; font-size: 11px; }
body[data-ui-version] .reference-asset-confirm { flex: 0 0 auto; margin: 20px 0 0; padding: 13px 20px; min-height: 46px; border: 1px solid #216653; border-radius: 9px; color: white; background: #216653; font-size: 14px; font-weight: 500; box-shadow: none; }
body[data-ui-version] .reference-asset-confirm:disabled { opacity: .5; }
body[data-ui-version] .product-benchmark-library-select { min-height: 36px; color: #53733f; background: #eff6e7; border: 1px solid #dbe8cd; font-size: 12px; font-weight: 500; }
body[data-ui-version] .product-benchmark-library-empty { padding: 28px 16px; color: #829370; border-color: #dce7cf; background: #fafdf6; font-size: 13px; line-height: 1.8; }

/* Account recharge is global, independent of the active workspace. */
body.recharge-modal-open { overflow: hidden; }
.recharge-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.recharge-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; cursor: default; }
.recharge-dialog {
  position: relative; z-index: 1; width: min(920px, calc(100vw - 48px)); max-height: calc(100vh - 48px);
  overflow: auto; padding: 28px; border: 1px solid var(--studio-line); border-radius: 24px;
}
.recharge-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.recharge-heading h2 { margin: 5px 0 7px; font-size: 28px; line-height: 1.2; }
.recharge-heading p { max-width: 620px; margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.65; }
.recharge-kicker { color: var(--studio-muted); font-size: 9px; font-weight: 700; letter-spacing: 2.5px; }
.recharge-close { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border-radius: 999px; font-size: 24px; line-height: 1; }
.recharge-layout { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(320px, 1.18fr); gap: 20px; }
.recharge-qr-card, .recharge-order-card { min-width: 0; padding: 20px; border: 1px solid var(--studio-line); border-radius: 18px; }
.recharge-qr-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.recharge-qr-card img { display: block; width: min(100%, 310px); height: auto; max-height: 440px; object-fit: contain; border-radius: 14px; background: #fff; }
.recharge-dialog[data-billing-ready="false"] .recharge-qr-card img { filter: blur(12px); opacity: .12; pointer-events: none; user-select: none; }
.recharge-dialog[data-billing-ready="false"] .recharge-qr-card::after {
  content: "充值服务未连接\A暂时不要付款"; white-space: pre; position: absolute; left: 24px; right: 24px; top: 42%;
  padding: 14px; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1.7;
}
.recharge-qr-card strong { margin-top: 15px; font-size: 15px; }
.recharge-qr-card span { margin-top: 6px; color: var(--studio-muted); font-size: 11px; line-height: 1.55; }
.recharge-order-card { display: flex; flex-direction: column; gap: 18px; }
.credit-rule { padding: 18px; border-radius: 14px; }
.credit-rule > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.credit-rule span { color: var(--studio-muted); font-size: 11px; }
.credit-rule strong { font-size: 17px; }
.credit-rule p { margin: 10px 0 0; color: var(--studio-muted); font-size: 11px; line-height: 1.65; }
#rechargeClaimForm { display: grid; gap: 14px; }
#rechargeClaimForm label { display: grid; gap: 7px; }
#rechargeClaimForm label > span { color: var(--studio-muted); font-size: 11px; }
#rechargeClaimForm input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--studio-line); border-radius: 12px; font-size: 14px; }
.recharge-submit { min-height: 46px; padding: 0 18px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.recharge-status { display: grid; gap: 5px; min-height: 66px; padding: 14px 16px; border: 1px solid var(--studio-line); border-radius: 13px; }
.recharge-status strong { font-size: 12px; }
.recharge-status span { color: var(--studio-muted); font-size: 11px; line-height: 1.55; }

/* Smaller windows keep full page navigation and readable controls. */
/* Neutralize high-specificity styles from the previous desktop theme. */
body[data-ui-version] #commissionFinderForm .benchmark-mode-option > span,
body[data-ui-version] #commissionFinderForm .benchmark-mode-option input:checked + span { flex: 1; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
body[data-ui-version] #commissionFinderForm .benchmark-mode-option input { position: static; flex-shrink: 0; opacity: 1; pointer-events: auto; min-height: 16px; margin: 0; }
body[data-ui-version] [data-workspace-view] button.video-field { display: flex; text-align: center; border-color: #c7d7c8; background: #f8faf6; }
body[data-ui-version] [data-workspace-view] button.video-field:hover { border-color: #6d9b7d; background: #edf5ec; transform: none; }
body[data-ui-version] [data-workspace-view] .video-field.is-primary .product-upload-icon { color: #54795c; background: #eaf1e6; }
body[data-ui-version] .reference-space-item small { color: #87967c; font-size: 11px; }
@media (min-width: 1700px) {
  body[data-ui-version] .main { padding-left: 48px; padding-right: 48px; }
  .workbench-header { padding-left: 48px; padding-right: 48px; }
}
@media (min-width: 1101px) {
  .workbench-brand { flex: 1 1 0; }
  .workbench-balance { flex: 0 0 auto; justify-self: end; }
}
@media (max-width: 1100px) {
  .workbench-header { padding: 0 24px; }
  .workbench-local { display: none; }
  body[data-ui-version] .main { padding: 26px 24px 48px; }
  .workspace-section-label { display: none; }
  body[data-ui-version] #productH3OmniForm { grid-template-columns: minmax(0,1fr); }
  body[data-ui-version] .product-h3-flow-summary { grid-row: auto; }
  body[data-ui-version] .product-generation-actions { grid-row: auto; }
  body[data-ui-version] .product-essential-fields { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
  body[data-ui-version] .product-form-step { padding: 24px; }
}
@media (max-width: 860px) {
  .workbench-header { height: auto; flex-wrap: wrap; padding-top: 16px; padding-bottom: 14px; }
  body[data-ui-version] .workspace-tabs { order: 3; width: 100%; }
  .recharge-dialog { width: min(620px, calc(100vw - 32px)); }
  .recharge-layout { grid-template-columns: minmax(0, 1fr); }
  .recharge-qr-card img { width: min(100%, 280px); max-height: 380px; }
}
@media (max-width: 700px) {
  .workbench-header { position: static; height: auto; flex-wrap: wrap; gap: 18px; padding: 20px 16px 16px; }
  body[data-ui-version] .workspace-tabs { width: 100%; }
  body[data-ui-version] .workspace-tabs button { flex: 1; padding: 0 9px; font-size: 12px; gap: 6px; }
  body[data-ui-version] .workspace-tabs svg { width: 16px; height: 16px; }
  body[data-ui-version] .main { padding: 24px 16px 40px; }
  body[data-ui-version] #accountTitle { font-size: 26px; }
  body[data-ui-version] .topbar { padding-bottom: 22px; }
  body[data-ui-version] .workspace-view > .detail-card { padding: 20px 16px; border-radius: 12px; }
  body[data-ui-version] .product-form-step { padding: 20px 16px; border-radius: 12px; gap: 20px; }
  body[data-ui-version] .product-essential-fields, body[data-ui-version] .product-optional-assets { grid-template-columns: minmax(0,1fr); }
  body[data-ui-version] .product-required-assets { gap: 12px; }
  body[data-ui-version] [data-workspace-view="product"] .product-required-assets .video-field { min-height: 185px; padding: 18px 10px; }
  body[data-ui-version] .product-upload-copy { font-size: 11px; }
  body[data-ui-version] .product-more-options > summary { flex-wrap: wrap; }
  body[data-ui-version] .product-more-options > summary span { margin-left: 28px; text-align: left; }
  body[data-ui-version] .product-generation-actions { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
  body[data-ui-version] #productH3OmniButton { width: 100%; }
  body[data-ui-version] .product-h3-flow-summary { grid-template-columns: minmax(0,1fr); gap: 14px; }
  body[data-ui-version] #commissionFinderForm { gap: 18px; grid-template-columns: minmax(0,1fr); }
  body[data-ui-version] #commissionFinderForm .benchmark-mode-picker { grid-template-columns: minmax(0,1fr); gap: 10px; }
  body[data-ui-version] #commissionFinderForm .benchmark-reference-uploads { gap: 12px; }
  body[data-ui-version] #commissionFinderForm .commission-reference-picker { padding: 18px 10px; min-height: 180px; }
  body[data-ui-version] #commissionFinderButton { width: 100%; }
  body[data-ui-version] .reference-space-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body[data-ui-version] .reference-space-item > div { padding: 10px; }
  body[data-ui-version] .product-task-window-grid { grid-template-columns: minmax(0,1fr); }
  body[data-ui-version] .product-task-center-head { align-items: start; flex-direction: column; }
  body[data-ui-version] .product-task-center-counts { justify-content: start; }
  body[data-ui-version] .product-task-window, body[data-ui-version] .product-task-window.is-history { padding: 16px; }
  body[data-ui-version] .product-task-window-head, body[data-ui-version] .product-task-window.is-history .product-task-window-head { flex-direction: column; gap: 12px; }
  body[data-ui-version] .product-task-window-tools { display: flex; flex-wrap: wrap; justify-content: start; }
  body[data-ui-version] .product-task-summary { grid-template-columns: minmax(0,1fr); }
  body[data-ui-version] .product-benchmark-picker { padding: 12px; }
  body[data-ui-version] .product-benchmark-picker-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; padding: 18px; }
  body[data-ui-version] .product-benchmark-library-head { margin-bottom: 16px; }
  body[data-ui-version] .product-benchmark-library-head strong { font-size: 18px; }
  body[data-ui-version] .reference-asset-picker-grid,
  body[data-ui-version] .product-benchmark-library-list,
  body[data-ui-version] .product-benchmark-group-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .workbench-balance { min-width: 128px; padding-left: 12px; }
  .recharge-modal { padding: 12px; }
  .recharge-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); padding: 20px 16px; border-radius: 18px; }
  .recharge-heading h2 { font-size: 24px; }
  .recharge-layout { gap: 14px; }
  .recharge-qr-card, .recharge-order-card { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-ui-version] *, body[data-ui-version] *::before, body[data-ui-version] *::after { scroll-behavior: auto; transition: none; }
  body[data-ui-version] .product-completed-player { animation: none; opacity: 1; transform: none; }
  body[data-ui-version] .product-generation-visual.has-video .product-generation-canvas,
  body[data-ui-version] .product-generation-visual.has-video .product-generation-visual-copy { display: none; }
}
