/* ChatGPT-inspired product surface: quiet neutrals, one workspace, one clear action. */
:root {
  --taste-bg: #f5f6f8;
  --taste-sidebar: #fbfbfc;
  --taste-surface: #ffffff;
  --taste-soft: #f1f3f6;
  --taste-line: #dfe3e8;
  --taste-text: #17181a;
  --taste-muted: #707782;
  --taste-accent: #0b8f73;
  --taste-blue: #1677ff;
  --taste-radius: 8px;
  --taste-sidebar-width: 210px;
  --taste-header-height: 72px;
}

html, body { background: var(--taste-bg) !important; color: var(--taste-text) !important; }
body { background-image: none !important; }
.app-shell { min-height: 100dvh; padding-top: 0 !important; background: var(--taste-bg) !important; }
.app-shell > section, .app-shell > main, .app-shell > footer { width: calc(100% - var(--taste-sidebar-width)) !important; margin-left: var(--taste-sidebar-width) !important; }

.report-nav.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--taste-sidebar-width); height: 100dvh; padding: 18px 10px 14px;
  gap: 22px; border-right: 1px solid var(--taste-line); background: var(--taste-sidebar) !important;
  box-shadow: 8px 0 28px rgba(25,32,45,.035); backdrop-filter: blur(18px); color: var(--taste-text);
}
.account-brand { padding: 3px 12px 22px; border-bottom: 1px solid var(--taste-line); }
.fixed-avatar { width: 28px; height: 28px; border-radius: 7px; color: #fff; background: #202123; box-shadow: none; }
.fixed-avatar svg { width: 16px; height: 16px; }
.brand-copy strong { color: var(--taste-text); font-size: 15px; font-weight: 650; }
.brand-copy small { color: #8e8ea0; font-size: 9px; }
.nav-links { gap: 2px; }
.nav-links a { height: 46px; padding: 0 12px; gap: 11px; border: 0; border-radius: 10px; color: #555d68; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-links a > svg { width: 18px; height: 18px; color: #747487; }
.nav-links a strong { font-size: 13px; font-weight: 500; }
.nav-links a small { color: #9898a7; font-size: 9px; }
.nav-links a:hover { background: #eef1f5; color: var(--taste-text); transform: translateX(1px); }
.nav-links a.active { color: var(--taste-text); background: #e9eef6; box-shadow: inset 3px 0 var(--taste-blue); }
.nav-links a.active svg { color: var(--taste-blue); }
.nav-links a.active small { color: #777787; }
.nav-actions { gap: 6px; }
.download-button { height: 40px; color: #555568; border-color: var(--taste-line); background: transparent; box-shadow: none; }
.download-button:hover { color: var(--taste-text); background: #ececef; }

.command-bar {
  position: sticky; top: 0; left: auto; z-index: 20; height: var(--taste-header-height); margin-left: var(--taste-sidebar-width); padding: 0 30px;
  display: grid; grid-template-columns: 1fr minmax(300px, 500px) 1fr 40px; align-items: center; gap: 18px;
  border-bottom: 1px solid var(--taste-line); background: rgba(245,246,248,.9); box-shadow: 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(18px);
}
.command-context { display: flex; align-items: center; gap: 14px; }
.command-context span { display: none; }
.command-context strong { color: var(--taste-text); font-size: 14px; font-weight: 600; }
.command-search { height: 40px; border: 1px solid #d7dce3; border-radius: 11px; background: rgba(255,255,255,.82); box-shadow: 0 2px 8px rgba(26,35,48,.035); }
.command-search input { color: var(--taste-text); }
.command-search input::placeholder { color: #9696a1; }
.command-status { justify-self: end; color: #6e6e80; font-size: 11px; }
.api-live-dot, .api-live-dot.offline { background: var(--taste-accent); box-shadow: none; }
.api-live-dot.offline { background: #b7b7c0; }
.icon-command { border-color: transparent; color: #555568; background: transparent; }
.icon-command:hover { color: var(--taste-text); border-color: var(--taste-line); background: var(--taste-soft); }

.entry-panel, .workbench-page, .morning-generator-page, .skill-page, .report-page { color: var(--taste-text) !important; background: var(--taste-bg) !important; }
.entry-panel { min-height: calc(100dvh - var(--taste-header-height)); padding: 88px 9vw 120px; place-content: start center; text-align: left; }
.entry-copy { width: min(760px,100%); }
.entry-panel h1 { color: var(--taste-text); font-size: 48px; line-height: 1.12; font-weight: 650; letter-spacing: -.035em; }
.entry-panel h1 em { color: var(--taste-text); }
.entry-copy p, .workbench-intro p, .skill-page-head p { color: var(--taste-muted); }
.entry-form { width: min(760px,100%); padding: 0; border: 1px solid var(--taste-line); border-radius: 12px; background: var(--taste-surface); box-shadow: 0 12px 32px rgba(34,43,56,.07); }
.entry-form input { height: 52px; border-color: transparent; background: transparent; }
.entry-form button, .primary-action, .skill-primary { color: #fff; background: #202123; border-color: #202123; border-radius: var(--taste-radius); box-shadow: none; }
.entry-form button:hover, .primary-action:hover, .skill-primary:hover { color: #fff; background: #000; }

.workbench-page, .morning-generator-page, .skill-page { min-height: calc(100dvh - var(--taste-header-height)); padding: 28px 24px 72px; }
.workbench-intro, .skill-page-head { width: min(1225px,100%); margin: 0 auto 18px; }
.workbench-intro h1, .skill-page-head h1 { color: var(--taste-text); font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.skill-kicker, .micro-label { color: var(--taste-muted); font-size: 11px; }
.skill-badge { color: var(--taste-blue) !important; background: #eff4ff !important; box-shadow: none; }
.skill-workspace { width: min(1225px,100%); grid-template-columns: minmax(360px, 1fr) minmax(0, 1.35fr); gap: 18px; }
.skill-form, .skill-output, .creator-card, .workflow-card, .workbench-result, .mode-switch, .generator-frame {
  border: 1px solid var(--taste-line); border-radius: 12px; background: rgba(255,255,255,.88); box-shadow: 0 10px 32px rgba(34,43,56,.055); backdrop-filter: blur(12px);
}
.skill-form { padding: 22px; position: sticky; top: 86px; }
.skill-output { min-height: 650px; padding: 24px; }
.form-section-title { border-bottom: 1px solid var(--taste-line); padding-bottom: 14px; }
.form-section-title > span { color: var(--taste-blue); background: #eff4ff; }
.form-section-title strong, .output-empty h2, .output-head h2, .result-section-title strong { color: var(--taste-text); }
.form-section-title small, .output-empty p, .output-head p, .result-section-title span { color: var(--taste-muted); }
.skill-form > label, .skill-form .field-grid label, .creator-card > label { color: #6e6e80; }
.skill-form textarea, .skill-form input, .skill-form select, .creator-card textarea, .creator-card select, .result-editor, #article-editor {
  color: var(--taste-text); border-color: #d9d9df; background: #fff; box-shadow: none;
}
.skill-form input:focus, .skill-form select:focus, .skill-form textarea:focus { border-color: var(--taste-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.output-empty > span { color: #777787; background: var(--taste-soft); }
.output-head, .result-section, .workflow-step, .topic-item, .editor-wrap { border-color: var(--taste-line); }
.title-option, .creator-output-card, .suggestion-list article { color: var(--taste-text); border-color: var(--taste-line); background: #fff; box-shadow: 0 3px 12px rgba(34,43,56,.035); }
.title-option.selected, .workflow-step.active { border-color: rgba(37,99,235,.35); background: #f5f8ff; }
.creator-card-copy p, .creator-card-copy small, .muted-copy { color: var(--taste-muted); }
.result-meta-grid > div, .plan-summary > div, .ledger-list > div { background: var(--taste-soft); }
.card-image-slot { color: #9999a5; background: #f7f7f8; }
.mode-option { color: var(--taste-muted); }
.mode-option.active { color: var(--taste-text); background: #e9eef6; box-shadow: inset 0 0 0 1px #cbd9ee; }
.status-pill, .result-status { color: #267a62; background: #eaf7f2; }
.secondary-action, .text-action, .copy-result { color: #555568; border-color: var(--taste-line); background: #fff; }
.secondary-action:hover, .text-action:hover { color: var(--taste-text); background: var(--taste-soft); }
.generation-progress { border-color: #d8e7ff; background: #f5f8ff; }
.progress-track { background: #e5e7eb; }
.progress-track i { background: var(--taste-blue); }

.morning-generator-page { padding: 18px 12px 18px; }
.morning-generator-page .workbench-intro { display: none; }
.generator-frame { min-height: calc(100dvh - 88px); }
.api-settings-modal { background: rgba(32,33,35,.28); backdrop-filter: blur(12px); }
.api-settings-card { color: var(--taste-text); border-color: var(--taste-line); border-radius: 10px; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.18); }
.api-config-group { border-color: var(--taste-line); background: #fff; }
.api-settings-head h2, .config-group-head h3 { color: var(--taste-text); }
.api-settings-head p, .config-group-head p, .api-config-group > label:not(.api-check), .api-settings-note { color: var(--taste-muted); }
.api-config-group input[type="password"], .api-config-group input[type="url"], .api-config-group input[type="text"] { color: var(--taste-text); border-color: #d9d9df; background: #fff; }
.config-icon { color: #fff; background: var(--taste-blue); }
.config-icon.image { background: var(--taste-accent); }
.connection-status.ready { color: #267a62; background: #eaf7f2; }
.test-provider { color: #555568; border-color: var(--taste-line); background: var(--taste-soft); }
.settings-menu { color: var(--taste-text); border-color: var(--taste-line); background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.settings-menu button { color: var(--taste-text); }
.app-toast { color: #fff; background: rgba(32,33,35,.96); }

.report-hero, .signal-grid > article, .profile-strip, .lens-card, .content-evidence, .route-panel, .benchmark-list, .takeaway-column {
  color: var(--taste-text); border-color: var(--taste-line); background: #fff; box-shadow: none;
}
.report-hero { border-bottom: 1px solid var(--taste-line); }
.signal-section { background: var(--taste-soft); }
.section-title span, .profile-strip span, .evidence-footnote { color: var(--taste-muted); }
footer { color: #9999a5; border-color: var(--taste-line); background: #fff; }

@media (max-width: 760px) {
  .app-shell > section, .app-shell > main, .app-shell > footer { width: 100% !important; margin-left: 0 !important; }
  .report-nav.app-sidebar { width: 100%; height: 58px; padding: 10px 12px; flex-direction: row; gap: 10px; border-right: 0; border-bottom: 1px solid var(--taste-line); }
  .account-brand { padding: 0; border-bottom: 0; }
  .brand-copy strong { max-width: 128px; color: var(--taste-text); }
  .nav-links { position: fixed; left: 0; right: 0; bottom: 0; height: 66px; padding: 5px 6px env(safe-area-inset-bottom); grid-template-columns: repeat(6,minmax(54px,1fr)); border-top: 1px solid var(--taste-line); background: rgba(247,247,248,.97); backdrop-filter: blur(18px); }
  .nav-links a { color: #555568; }
  .nav-links a.active { color: var(--taste-blue); background: transparent; box-shadow: none; }
  .nav-links a.active svg { color: var(--taste-blue); }
  .command-bar { position: sticky; left: 0; margin-left: 0; height: 52px; padding: 0 14px; grid-template-columns: 1fr auto 38px; }
  .command-search { display: none; }
  .command-context strong { font-size: 13px; }
  .command-status span:last-child { display: none; }
  .entry-panel { min-height: calc(100dvh - 58px); padding: 64px 18px 110px; }
  .entry-panel h1 { font-size: 38px; }
  .workbench-page, .skill-page { padding: 32px 14px 100px; }
  .morning-generator-page { padding: 52px 8px 78px; }
  .skill-workspace { grid-template-columns: 1fr; gap: 14px; }
  .skill-form { position: static; }
  .skill-output { min-height: 480px; }
  .api-settings-card { max-height: calc(100dvh - 24px); }
}

/* Workbench interaction-mode decision surface */
.workbench-decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 20px 0 4px;
  padding: 16px 18px;
  border: 1px solid #d9e4f4;
  border-radius: 14px;
  background: linear-gradient(112deg, #f8fbff 0%, #ffffff 55%, #f5f9ff 100%);
}
.decision-step { display: grid; gap: 4px; min-width: 78px; }
.decision-step span, .decision-impact > span { color: #728096; font-size: 11px; }
.decision-step strong { color: #1d5fa9; font-size: 13px; }
.decision-copy h3 { margin: 0 0 5px; color: #202b3a; font-size: 15px; line-height: 1.4; }
.decision-copy p { margin: 0; color: #69778b; font-size: 12px; line-height: 1.65; }
.decision-impact { display: grid; gap: 4px; min-width: 112px; padding-left: 16px; border-left: 1px solid #dce6f2; }
.decision-impact strong { color: #334860; font-size: 12px; line-height: 1.45; }
.result-actions .primary-action[hidden], .result-actions .secondary-action[hidden], .workbench-result .text-action[hidden] { display: none !important; }
.workbench-result .topic-item span:last-child { color: #286fc1; font-size: 12px; font-weight: 650; white-space: nowrap; }

@media (max-width: 760px) {
  .workbench-decision { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .decision-step { grid-template-columns: auto 1fr; align-items: center; }
  .decision-step span { grid-row: 1 / span 2; }
  .decision-impact { padding: 10px 0 0; border-top: 1px solid #dce6f2; border-left: 0; grid-template-columns: auto 1fr; align-items: center; }
  .result-actions { gap: 8px; }
  .result-actions .primary-action, .result-actions .secondary-action { flex: 1 1 auto; }
}

/* Final responsive authority for account surfaces. Keep the modal usable before auth. */
.account-modal { box-sizing: border-box; width: 100%; max-width: 100vw; }
.auth-card, .wallet-card { box-sizing: border-box; max-width: calc(100vw - 40px); }
.auth-copy p, .wallet-head p, .wallet-total small { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .account-modal { padding: 10px !important; place-items: end center; grid-template-columns: minmax(0, 1fr); }
  .auth-card, .wallet-card { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important; min-width: 0 !important; overflow-x: hidden; }
  .auth-card { padding: 22px 18px !important; }
  .auth-copy h1 { font-size: 27px !important; line-height: 1.18; overflow-wrap: anywhere; }
  .auth-copy p { max-width: 100%; white-space: normal; }
}

/* Product redesign pass: Swiss utility with Apple-like restraint. */
:root {
  --ux-bg: #f7f8fa;
  --ux-sidebar: #fbfbfc;
  --ux-surface: #ffffff;
  --ux-surface-subtle: #f1f3f6;
  --ux-ink: #16181d;
  --ux-muted: #69717d;
  --ux-faint: #9aa1ab;
  --ux-rule: #e1e5ea;
  --ux-blue: #1677ff;
  --ux-blue-soft: #edf4ff;
  --ux-green: #198754;
  --ux-radius: 10px;
  --ux-shadow: 0 14px 35px rgba(28, 36, 48, .055);
}

html, body { background: var(--ux-bg) !important; color: var(--ux-ink) !important; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif !important; }
button, input, select, textarea { font-family: inherit !important; }
::selection { color: #fff; background: var(--ux-blue); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: #cbd1d9; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.app-shell { background: var(--ux-bg) !important; }
.report-nav.app-sidebar { width: 216px; padding: 22px 12px 16px; background: rgba(251,251,252,.94) !important; border-right: 1px solid var(--ux-rule); box-shadow: 5px 0 20px rgba(28,36,48,.025); }
.app-shell > section, .app-shell > main, .app-shell > footer { width: calc(100% - 216px) !important; margin-left: 216px !important; }
.account-brand { min-height: 42px; padding: 0 10px 24px; border-bottom: 1px solid var(--ux-rule); }
.fixed-avatar { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--ux-ink); }
.brand-copy strong { color: var(--ux-ink); font-size: 15px; letter-spacing: -.015em; }
.brand-copy small { color: var(--ux-faint); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.nav-links { gap: 3px; padding-top: 18px; }
.nav-links a { height: 44px; border-radius: 8px; color: #626a76; }
.nav-links a strong { font-size: 13px; font-weight: 520; }
.nav-links a small { color: #a0a6af; font-size: 9px; }
.nav-links a:hover { color: var(--ux-ink); background: #f0f2f5; transform: none; }
.nav-links a.active { color: var(--ux-ink); background: #eaf1fb; box-shadow: inset 2px 0 var(--ux-blue); }
.nav-links a.active svg { color: var(--ux-blue); }
.nav-links a.active small { color: #7d8793; }
.nav-actions { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--ux-rule); }
.download-button { height: 38px; border: 0; border-radius: 8px; color: #626a76; background: transparent; }
.download-button:hover { color: var(--ux-ink); background: #f0f2f5; }

.command-bar { height: 72px; margin-left: 216px; padding: 0 34px; grid-template-columns: 1fr minmax(360px, 520px) 1fr 38px; background: rgba(247,248,250,.88); border-bottom: 1px solid var(--ux-rule); box-shadow: none; }
.command-context strong { color: var(--ux-ink); font-size: 14px; font-weight: 600; }
.command-search { height: 40px; border: 1px solid #d8dde4; border-radius: 9px; background: rgba(255,255,255,.9); box-shadow: 0 2px 7px rgba(28,36,48,.025); }
.command-search:focus-within { border-color: #a9c9fa; box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.command-status { color: var(--ux-muted); }
.api-live-dot, .api-live-dot.offline { width: 6px; height: 6px; background: var(--ux-green); }
.api-live-dot.offline { background: #b6bdc7; }
.icon-command { width: 34px; height: 34px; border: 0; color: var(--ux-muted); background: transparent; }
.icon-command:hover { color: var(--ux-ink); background: var(--ux-surface-subtle); }

.entry-panel, .workbench-page, .skill-page, .morning-generator-page, .report-page { background: var(--ux-bg) !important; }
.entry-panel { min-height: calc(100dvh - 72px); padding: 90px 9vw 120px; }
.entry-panel h1 { max-width: 720px; color: var(--ux-ink); font-size: clamp(42px, 5vw, 64px); letter-spacing: -.04em; line-height: 1.08; }
.entry-copy p, .workbench-intro p, .skill-page-head p { color: var(--ux-muted); }
.entry-form { border: 1px solid var(--ux-rule); border-radius: 10px; background: var(--ux-surface); box-shadow: var(--ux-shadow); }
.entry-form input { border: 0; box-shadow: none; }
.entry-form button, .primary-action, .skill-primary { border: 0; border-radius: 8px; color: #fff; background: var(--ux-ink); box-shadow: none; transition: transform .18s ease, background .18s ease; }
.entry-form button:hover, .primary-action:hover, .skill-primary:hover { color: #fff; background: #000; transform: translateY(-1px); }

.workbench-page, .skill-page { min-height: calc(100dvh - 72px); padding: 34px 28px 76px; }
.workbench-intro, .skill-page-head { width: min(1240px, 100%); margin: 0 auto 22px; }
.workbench-intro h1, .skill-page-head h1 { color: var(--ux-ink); font-size: 30px; line-height: 1.16; letter-spacing: -.03em; }
.skill-workspace { width: min(1240px,100%); grid-template-columns: minmax(360px, 1fr) minmax(0, 1.42fr); gap: 18px; }
.skill-form, .skill-output, .creator-card, .workflow-card, .workbench-result, .mode-switch, .generator-frame { border: 1px solid var(--ux-rule); border-radius: var(--ux-radius); background: var(--ux-surface); box-shadow: var(--ux-shadow); backdrop-filter: none; }
.skill-form { padding: 24px; }
.skill-output { min-height: 660px; padding: 24px; }
.form-section-title { padding-bottom: 16px; border-bottom: 1px solid var(--ux-rule); }
.form-section-title > span { color: var(--ux-blue); background: var(--ux-blue-soft); }
.skill-form textarea, .skill-form input, .skill-form select, .creator-card textarea, .creator-card select, .result-editor, #article-editor { border-color: #d8dde4; border-radius: 8px; color: var(--ux-ink); background: #fff; }
.skill-form textarea:focus, .skill-form input:focus, .skill-form select:focus, .creator-card textarea:focus, .creator-card select:focus { border-color: #8db9f7; box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.title-option, .creator-output-card, .suggestion-list article { border-color: var(--ux-rule); background: #fff; box-shadow: none; }
.title-option.selected, .workflow-step.active { border-color: #9fc4f7; background: var(--ux-blue-soft); }
.mode-option { color: var(--ux-muted); }
.mode-option.active { color: var(--ux-ink); background: #eef2f7; box-shadow: inset 0 0 0 1px #d5deea; }
.secondary-action, .text-action, .copy-result { border-color: var(--ux-rule); color: var(--ux-ink); background: #fff; }
.secondary-action:hover, .text-action:hover { background: var(--ux-surface-subtle); }
.status-pill, .result-status { color: var(--ux-green); background: #e9f7f0; }
.generation-progress { border-color: #cfe0f8; background: var(--ux-blue-soft); }
.progress-track { background: #dfe5ed; }
.progress-track i { background: var(--ux-blue); }
.morning-generator-page { padding: 20px 14px 20px; }
.generator-frame { min-height: calc(100dvh - 104px); }

.api-settings-modal { background: rgba(22,24,29,.24); }
.api-settings-card { border: 1px solid var(--ux-rule); border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(22,24,29,.18); }
.api-config-group { border-color: var(--ux-rule); background: #fff; }
.api-config-group input[type="password"], .api-config-group input[type="url"], .api-config-group input[type="text"] { border-color: #d8dde4; border-radius: 8px; background: #fff; }
.config-icon { background: var(--ux-blue); }
.config-icon.image { background: var(--ux-green); }
.settings-menu { border-color: var(--ux-rule); border-radius: 9px; background: #fff; box-shadow: 0 14px 32px rgba(22,24,29,.14); }
.account-modal { width: 100%; max-width: 100vw; overflow: auto; }
.auth-card, .wallet-card { box-sizing: border-box; max-width: min(680px, calc(100vw - 24px)); }
.auth-copy p, .wallet-head p, .wallet-total small { overflow-wrap: anywhere; }
.auth-form input, .admin-recharge input, .admin-recharge select { min-width: 0; }

@media (max-width: 760px) {
  .app-shell > section, .app-shell > main, .app-shell > footer { width: 100% !important; margin-left: 0 !important; }
  .report-nav.app-sidebar { width: 100%; padding: 10px 12px; box-shadow: none; }
  .command-bar { margin-left: 0; height: 54px; }
  .entry-panel { min-height: calc(100dvh - 58px); padding: 64px 18px 110px; }
  .workbench-page, .skill-page { padding: 26px 14px 100px; }
  .skill-workspace { grid-template-columns: 1fr; }
  .skill-form { position: static; }
  .skill-output { min-height: 480px; }
  .auth-card, .wallet-card { width: 100%; max-width: calc(100vw - 20px); }
  .auth-card { padding: 22px 18px; }
  .auth-copy h1 { font-size: 27px; line-height: 1.18; overflow-wrap: anywhere; }
}

/* Account, wallet, and admin recharge */
.wallet-chip { border: 0; cursor: pointer; font: inherit; }
.wallet-chip strong { color: var(--taste-text); font-weight: 650; }
.account-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(24,25,28,.34); backdrop-filter: blur(14px); }
.account-modal[hidden] { display: none; }
.auth-card, .wallet-card { width: min(440px,100%); max-height: calc(100dvh - 40px); overflow: auto; border: 1px solid rgba(255,255,255,.72); border-radius: 16px; color: var(--taste-text); background: rgba(255,255,255,.97); box-shadow: 0 26px 90px rgba(18,24,34,.22); }
.auth-card { padding: 30px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--taste-text); }
.auth-brand svg { width: 19px; height: 19px; }
.auth-brand div { display: grid; gap: 1px; }
.auth-brand strong { font-size: 13px; }
.auth-brand small { color: var(--taste-muted); font-size: 10px; letter-spacing: .12em; }
.auth-copy { padding: 34px 0 22px; }
.auth-copy h1 { margin: 8px 0 9px; font-size: 27px; letter-spacing: -.035em; }
.auth-copy p { margin: 0; color: var(--taste-muted); font-size: 13px; line-height: 1.75; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 9px; background: var(--taste-soft); }
.auth-tabs button { height: 36px; border: 0; border-radius: 7px; color: var(--taste-muted); background: transparent; cursor: pointer; }
.auth-tabs button.active { color: var(--taste-text); background: #fff; box-shadow: 0 1px 4px rgba(20,30,45,.1); }
.auth-form { padding-top: 18px; display: grid; gap: 13px; }
.auth-form label, .admin-recharge label { display: grid; gap: 7px; color: #666675; font-size: 12px; }
.auth-form input, .admin-recharge input, .admin-recharge select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #d9d9df; border-radius: 8px; color: var(--taste-text); background: #fff; outline: 0; }
.auth-form input:focus, .admin-recharge input:focus, .admin-recharge select:focus { border-color: var(--taste-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.auth-form .primary-action { width: 100%; height: 44px; margin-top: 5px; }
.auth-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; color: #a32929; background: #fff1f1; font-size: 12px; }
.wallet-card { width: min(680px,100%); padding: 26px; }
.wallet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.wallet-head h2 { margin: 6px 0 3px; font-size: 24px; }
.wallet-head p { margin: 0; color: var(--taste-muted); font-size: 12px; }
.wallet-total { margin-top: 22px; padding: 22px; display: grid; gap: 5px; border-radius: 12px; color: #fff; background: #202123; }
.wallet-total span, .wallet-total small { color: rgba(255,255,255,.64); font-size: 11px; }
.wallet-total strong { font-size: 18px; }
.wallet-total b { font-size: 36px; letter-spacing: -.05em; }
.wallet-buckets { margin-top: 10px; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.wallet-buckets > div { padding: 14px; display: grid; gap: 5px; border: 1px solid var(--taste-line); border-radius: 9px; background: var(--taste-soft); }
.wallet-buckets span { color: var(--taste-muted); font-size: 11px; }
.wallet-buckets strong { font-size: 17px; }
.wallet-history, .admin-recharge { margin-top: 24px; }
.wallet-section-title { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-section-title strong { font-size: 13px; }
.wallet-section-title span { color: var(--taste-muted); font-size: 10px; }
.wallet-section-title button { border: 0; color: var(--taste-blue); background: transparent; cursor: pointer; font-size: 11px; }
.wallet-transactions { max-height: 250px; overflow: auto; border-top: 1px solid var(--taste-line); }
.wallet-transactions > p, .admin-user-results > p { color: var(--taste-muted); font-size: 12px; }
.wallet-transactions article { min-height: 58px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--taste-line); }
.transaction-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; }
.transaction-icon svg { width: 14px; height: 14px; }
.transaction-icon.in { color: #267a62; background: #eaf7f2; }
.transaction-icon.out { color: #765a24; background: #faf1df; }
.wallet-transactions article div { min-width: 0; display: grid; gap: 3px; }
.wallet-transactions article strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.wallet-transactions article small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--taste-muted); font-size: 10px; }
.wallet-transactions article > b { font-size: 12px; }
.wallet-transactions b.in { color: #267a62; }
.wallet-transactions b.out { color: #765a24; }
.admin-recharge { padding-top: 22px; border-top: 1px solid var(--taste-line); }
.admin-user-results { margin-top: 8px; max-height: 145px; overflow: auto; display: grid; gap: 5px; }
.admin-user-results button { min-height: 46px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--taste-line); border-radius: 8px; color: var(--taste-text); background: #fff; cursor: pointer; text-align: left; }
.admin-user-results button:hover { border-color: var(--taste-blue); background: #f7f9ff; }
.admin-user-results span { display: grid; gap: 2px; }
.admin-user-results strong, .admin-user-results b { font-size: 11px; }
.admin-user-results small { color: var(--taste-muted); font-size: 10px; }
#admin-recharge-form { margin-top: 12px; padding: 14px; display: grid; gap: 10px; border-radius: 9px; background: var(--taste-soft); }
#admin-recharge-form[hidden] { display: none; }
#admin-recharge-form > p { margin: 0; font-size: 11px; }
#admin-recharge-form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
#admin-recharge-form button { justify-self: start; }

@media (max-width: 760px) {
  .account-modal { padding: 10px; place-items: end center; }
  .auth-card, .wallet-card { max-height: calc(100dvh - 20px); border-radius: 16px 16px 12px 12px; }
  .auth-card { padding: 24px 20px; }
  .wallet-card { padding: 20px 16px; }
  .wallet-chip { padding: 0 8px; }
  .wallet-buckets { gap: 5px; }
  .wallet-buckets > div { padding: 10px; }
}

/* Final authority for account surfaces on narrow screens. */
.account-modal { box-sizing: border-box; width: 100%; max-width: 100vw; }
.auth-card, .wallet-card { box-sizing: border-box; max-width: calc(100vw - 40px); }
.auth-copy p, .wallet-head p, .wallet-total small { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 760px) {
  .account-modal { padding: 10px !important; place-items: end center; }
  .auth-card, .wallet-card { width: 100% !important; max-width: calc(100vw - 20px) !important; overflow-x: hidden; }
  .auth-card { padding: 22px 18px !important; }
  .auth-copy h1 { font-size: 27px !important; line-height: 1.18; overflow-wrap: anywhere; }
}

/* Conversational creator studio: the current article is always the center of gravity. */
.article-workspace.workbench-page {
  min-height: calc(100dvh - 72px);
  padding: 24px 28px 34px;
  overflow: visible;
  background: #f7f5f1 !important;
}
.conversation-workbench-head { width: min(1440px, 100%); margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.conversation-workbench-head h1 { margin: 5px 0 3px; color: #202124; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
.conversation-workbench-head p { margin: 0; color: #7b746e; font-size: 13px; }
.new-chat-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid #e6dfd7; border-radius: 9px; color: #49433d; background: #fffdfa; cursor: pointer; font: 600 12px inherit; }
.new-chat-button:hover { background: #fff7f0; border-color: #d9b99d; }
.new-chat-button svg { width: 15px; }
.article-workspace .workflow-rail { display: none; }
.conversation-workbench-layout { width: min(1440px, 100%); min-height: calc(100dvh - 168px); margin: 0 auto; display: grid; grid-template-columns: minmax(300px, .68fr) minmax(520px, 1.35fr) minmax(245px, .48fr); border: 1px solid #e5dfd7; border-radius: 14px; overflow: hidden; background: #fffdfa; box-shadow: 0 16px 36px rgba(87, 70, 52, .06); }
.conversation-panel { min-width: 0; display: flex; flex-direction: column; background: #fffdfa; border-right: 1px solid #ece6df; }
.conversation-panel-head { min-height: 68px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee8e1; }
.conversation-panel-head strong { color: #312c28; font-size: 14px; }
.work-status { color: #8b705d; font-size: 11px; }
.chat-thread { min-height: 200px; flex: 1 1 auto; padding: 18px 18px 8px; overflow: auto; }
.chat-message { margin: 0 0 18px; }
.chat-message > span { display: block; margin-bottom: 6px; color: #8b837b; font-size: 11px; font-weight: 650; }
.chat-message p { margin: 0; padding: 12px 13px; color: #443e38; background: #f5f1eb; border-radius: 4px 12px 12px 12px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.chat-message.from-user { display: grid; justify-items: end; }
.chat-message.from-user p { color: #fff; background: #c65a2d; border-radius: 12px 4px 12px 12px; }
.chat-message.from-user > span { display: none; }
.chat-choice-list { padding: 0 18px 12px; }
.chat-choice-head { margin: 0 0 9px; display: grid; gap: 3px; }
.chat-choice-head strong { color: #362e27; font-size: 13px; }.chat-choice-head span { color: #948981; font-size: 11px; }
.chat-choice { margin-bottom: 9px; padding: 11px; display: grid; grid-template-columns: 24px 1fr; gap: 8px; border: 1px solid #eee6de; border-radius: 10px; background: #fff; }
.chat-choice > span { color: #c65a2d; font-size: 11px; font-weight: 700; }
.chat-choice strong { display: block; color: #38312b; font-size: 12px; line-height: 1.45; }.chat-choice p { margin: 4px 0; color: #837972; font-size: 11px; line-height: 1.5; }.chat-choice small { color: #a18a78; font-size: 10px; }
.chat-choice footer { grid-column: 2; display: flex; gap: 8px; }.chat-choice button { padding: 5px 8px; border: 1px solid #ead6c8; border-radius: 7px; color: #a44722; background: #fff8f3; cursor: pointer; font: 600 10px inherit; }.chat-choice .regenerate-topic { color: #756a61; border-color: #e7e1da; background: #fff; }
.composer-shell { margin: auto 15px 15px; padding: 11px; border: 1px solid #ded6ce; border-radius: 12px; background: #fff; box-shadow: 0 5px 14px rgba(70, 54, 38, .05); }
.composer-shell textarea { width: 100%; min-height: 61px; box-sizing: border-box; resize: vertical; border: 0; outline: 0; color: #37312d; background: transparent; font: 13px/1.55 inherit; }.composer-shell textarea::placeholder { color: #aaa097; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }.composer-text-action { border: 0; color: #8b7c70; background: transparent; cursor: pointer; font: 11px inherit; }.composer-send { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 9px; color: #fff; background: #c65a2d; cursor: pointer; }.composer-send:hover { background: #ae481e; }.composer-send svg { width: 15px; }
.article-canvas { min-width: 0; display: flex; flex-direction: column; background: #fff; }
.article-canvas-head { min-height: 93px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #f0ebe5; }.article-canvas-head h2 { max-width: 680px; margin: 0; color: #22211f; font-size: 22px; line-height: 1.3; letter-spacing: -.025em; }.article-canvas-head p { margin: 6px 0 0; display: flex; align-items: center; gap: 6px; color: #89817a; font-size: 11px; }.article-canvas-head p i { width: 6px; height: 6px; border-radius: 50%; background: #42a779; }.canvas-actions { display: flex; gap: 7px; }.icon-action { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #ece7e2; border-radius: 9px; color: #6b625b; background: #fff; cursor: pointer; }.icon-action:hover { color: #9c3f1d; border-color: #dfbda9; }.icon-action svg { width: 15px; }
.version-strip { min-height: 42px; padding: 0 28px; display: flex; align-items: center; gap: 8px; color: #958a80; border-bottom: 1px solid #f0ebe5; background: #fdfcfa; font-size: 11px; }.version-strip span:first-child { color: #5c5148; font-weight: 650; }
.current-work-card { margin: 18px 28px 0; padding: 12px 14px; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; border: 1px solid #efe4d8; border-radius: 10px; color: #7d6755; background: #fff9f3; }.current-work-card span { color: #b5572e; font-size: 10px; font-weight: 700; }.current-work-card strong { color: #382f28; font-size: 12px; }.current-work-card p { margin: 0; color: #81756a; font-size: 11px; }
.article-canvas .editor-wrap { margin: 16px 28px 0; flex: 1 1 auto; display: flex; flex-direction: column; border: 0; border-radius: 0; overflow: visible; }.article-canvas .editor-head { padding: 0 0 10px; color: #8f877f; background: transparent; border-bottom: 1px solid #eee8e2; }.article-canvas .editor-head span:first-child { color: #5b514a; font-weight: 650; }.article-canvas #article-editor { min-height: 480px; padding: 23px 2px 8px; color: #302c29; background: transparent; font: 16px/2.02 Georgia, "Songti SC", "Noto Serif SC", serif; }.selection-actions { padding: 10px 0 18px; display: flex; gap: 8px; border-bottom: 1px solid #eee8e2; }.selection-actions button { border: 1px solid #e8ded4; border-radius: 8px; padding: 7px 9px; color: #725d4d; background: #fffaf6; cursor: pointer; font: 11px inherit; }.selection-actions button:hover { color: #a24420; border-color: #e1baa2; }
.article-canvas-foot { padding: 13px 28px 18px; display: flex; justify-content: space-between; color: #9b938c; font-size: 11px; }.article-canvas-foot span:last-child { color: #48a078; }
.outcome-panel { min-width: 0; padding: 21px 18px; border-left: 1px solid #ece6df; background: #fffdfa; }.outcome-panel > header { display: flex; align-items: center; justify-content: space-between; color: #352f2a; }.outcome-panel > header strong { font-size: 14px; }.outcome-panel > header svg { width: 15px; color: #998e85; }.outcome-panel section { padding: 23px 0; border-bottom: 1px solid #eee8e2; }.outcome-panel h3 { margin: 0 0 13px; color: #766c64; font-size: 11px; font-weight: 650; }.outline-list { margin: 0; padding: 0; list-style: none; }.outline-list li { display: grid; grid-template-columns: 26px 1fr; gap: 7px; margin: 0 0 10px; }.outline-list span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #eaded3; border-radius: 6px; color: #8a6c57; font-size: 10px; }.outline-list p { margin: 2px 0 0; color: #4e463f; font-size: 12px; line-height: 1.45; }.version-history { min-height: 195px; }.version-item { width: 100%; margin: 0 0 8px; padding: 9px; display: grid; grid-template-columns: 34px 1fr; gap: 7px; border: 1px solid transparent; border-radius: 9px; color: #665d56; background: transparent; text-align: left; cursor: pointer; }.version-item:hover, .version-item.current { border-color: #f0ddd0; background: #fff6ef; }.version-item strong { color: #a54b24; font-size: 11px; }.version-item span { overflow: hidden; color: #80766d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.outcome-actions { padding-top: 19px; display: grid; gap: 10px; }.generate-next, .outline-action { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; cursor: pointer; font: 600 12px inherit; text-decoration: none; }.generate-next { border: 0; color: #fff; background: #25282d; }.generate-next:hover { background: #15171a; }.outline-action { border: 1px solid #e9e2dc; color: #5c534c; background: #fff; }.outline-action:hover { background: #fff8f3; }.generate-next svg, .outline-action svg { width: 15px; }
.article-workspace .generated-images { margin: 16px 28px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 1100px) { .conversation-workbench-layout { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); }.outcome-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; border-top: 1px solid #ece6df; border-left: 0; }.outcome-panel section { padding: 0; border: 0; }.outcome-actions { padding: 0; align-content: start; min-width: 190px; }.version-history { min-height: 0; } }
@media (max-width: 760px) { .article-workspace.workbench-page { padding: 14px; }.conversation-workbench-head { align-items: flex-start; }.conversation-workbench-head h1 { font-size: 20px; }.conversation-workbench-head p { display: none; }.conversation-workbench-layout { min-height: auto; grid-template-columns: 1fr; }.conversation-panel { min-height: 470px; border-right: 0; border-bottom: 1px solid #ece6df; }.article-canvas-head { padding: 16px; align-items: flex-start; }.article-canvas-head h2 { font-size: 19px; }.version-strip, .article-canvas-foot { padding-left: 16px; padding-right: 16px; }.current-work-card, .article-canvas .editor-wrap, .article-workspace .generated-images { margin-left: 16px; margin-right: 16px; }.current-work-card { grid-template-columns: auto 1fr; }.current-work-card p { grid-column: 1 / -1; }.article-canvas #article-editor { min-height: 390px; font-size: 15px; }.outcome-panel { display: block; }.outcome-panel section { padding: 18px 0; border-bottom: 1px solid #eee8e2; }.outcome-actions { padding-top: 18px; }.new-chat-button { padding: 0 9px; }.new-chat-button svg { margin: 0; }.new-chat-button { font-size: 0; }.new-chat-button svg { width: 17px; } }

/* Workbench direction: light liquid glass, quiet hierarchy, high signal. */
.workbench-page {
  position: relative;
  min-height: calc(100dvh - 72px);
  padding: 28px clamp(16px, 3vw, 42px) 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 6%, rgba(255,255,255,.94), transparent 26%),
    linear-gradient(135deg, #f5f7fa 0%, #eef2f6 48%, #f8f9fb 100%) !important;
}
.workbench-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.42), transparent 38%, rgba(255,255,255,.3));
}
.workbench-intro,
.workbench-grid,
.workbench-result { position: relative; z-index: 1; }
.workbench-intro {
  width: min(1240px, 100%);
  margin: 0 auto 16px;
}
.workbench-intro .micro-label { color: #707987; }
.workbench-intro h1 {
  margin: 6px 0 8px;
  color: #161a21;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.workbench-intro p { max-width: 720px; margin: 0; color: #737d8b; font-size: 13px; line-height: 1.7; }
.mode-switch {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid rgba(200,208,219,.9);
  border-radius: 12px;
  background: rgba(255,255,255,.5);
  box-shadow: 0 8px 20px rgba(74,87,104,.05), inset 0 1px rgba(255,255,255,.85);
  backdrop-filter: blur(18px) saturate(135%);
}
.mode-option {
  min-height: 44px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  color: #76808d;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.mode-option strong { color: inherit; font-size: 12px; font-weight: 650; }
.mode-option small { color: inherit; font-size: 11px; }
.mode-option.active { color: #20252d; background: rgba(255,255,255,.9); box-shadow: 0 3px 10px rgba(56,68,84,.1); }
.workbench-grid {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, .86fr) minmax(0, 1.14fr);
  gap: 14px;
  align-items: stretch;
}
.creator-card,
.preview-card {
  min-width: 0;
  border: 1px solid rgba(196,205,216,.95);
  border-radius: 15px;
  background: rgba(255,255,255,.6);
  box-shadow: 0 20px 45px rgba(74,87,104,.08), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(20px) saturate(125%);
}
.creator-card {
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
}
.card-topline,
.preview-card-head,
.workflow-divider { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-label { color: #303844; font-size: 13px; font-weight: 700; }
.creator-card > label { margin: 25px 0 8px; color: #252b34; font-size: 14px; font-weight: 650; }
.creator-card textarea {
  min-height: 140px;
  resize: vertical;
  padding: 15px;
  border: 1px solid #d7dde5;
  border-radius: 10px;
  color: #1d232c;
  background: rgba(255,255,255,.72);
  line-height: 1.65;
}
.creator-card textarea::placeholder { color: #9aa3ae; }
.creator-options { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.creator-options label { display: grid; gap: 7px; color: #737d8b; font-size: 11px; }
.creator-card select { min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #d7dde5; border-radius: 9px; color: #252b34; background: rgba(255,255,255,.78); }
.creator-card .primary-action { width: 100%; min-height: 46px; margin-top: auto; border-radius: 9px; color: #fff; background: #20242a; box-shadow: 0 8px 16px rgba(32,36,42,.15); }
.creator-card .primary-action:hover { background: #0f1114; }
.helper-copy { margin: 10px 0 0; color: #8a939f; font-size: 11px; line-height: 1.5; text-align: center; }
.preview-card { padding: 20px; display: flex; flex-direction: column; }
.preview-card-head { padding-bottom: 16px; border-bottom: 1px solid rgba(214,220,228,.8); }
.preview-card-head > div { display: flex; align-items: baseline; gap: 10px; }
.preview-subtitle { color: #8a939f; font-size: 11px; }
.status-pill { white-space: nowrap; }
.status-pill svg { width: 13px; height: 13px; vertical-align: -2px; }
.workbench-preview {
  margin-top: 14px;
  padding: clamp(20px, 3vw, 34px);
  min-height: 390px;
  border: 1px solid #e0e4e9;
  border-radius: 11px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 24px rgba(60,71,85,.05);
}
.workbench-preview h2 { margin: 0; color: #20242a; font-size: clamp(20px, 2vw, 28px); line-height: 1.25; letter-spacing: -.025em; }
.preview-rule { height: 1px; margin: 17px 0 18px; background: #d8dde3; }
.workbench-preview > p:not(.preview-rule) { margin: 0 0 22px; color: #4f5864; font-size: 13px; line-height: 1.8; }
.preview-images { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 24px 0 20px; }
.preview-images img { width: 100%; aspect-ratio: 1 / 1.16; display: block; object-fit: cover; border-radius: 5px; background: #edf0f3; }
.workflow-divider { margin-top: 18px; padding: 14px 0 10px; border-top: 1px solid rgba(214,220,228,.8); color: #697381; font-size: 11px; }
.workflow-divider span:first-child { color: #303844; font-size: 12px; font-weight: 650; }
.preview-card .workflow-steps { max-height: 148px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.preview-card .workflow-note { margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(214,220,228,.7); }
.workbench-result { width: min(1240px, 100%); margin: 14px auto 0; }

@media (max-width: 900px) {
  .workbench-grid { grid-template-columns: 1fr; }
  .creator-card { min-height: 0; }
  .creator-card .primary-action { margin-top: 22px; }
  .preview-card { order: 2; }
}
@media (max-width: 600px) {
  .workbench-page { padding: 22px 12px 54px; }
  .workbench-intro h1 { font-size: 25px; }
  .workbench-intro p { font-size: 12px; }
  .mode-switch { grid-template-columns: 1fr; }
  .mode-option { min-height: 38px; }
  .mode-option small { display: none; }
  .creator-card, .preview-card { padding: 17px; border-radius: 12px; }
  .creator-options { grid-template-columns: 1fr; }
  .workbench-preview { padding: 18px; min-height: 0; }
  .preview-images { gap: 5px; }
  .preview-card .workflow-steps { grid-template-columns: 1fr; }
}

/* Final reference alignment for the creator landing surface. */
.workbench-page > .workbench-intro {
  width: min(1240px, 100%);
  padding: 4px 4px 10px;
  text-align: left;
}
.workbench-page > .workbench-intro h1 { font-size: 23px; letter-spacing: -.025em; }
.workbench-page > .workbench-intro p { color: #89929e; font-size: 12px; }
.workbench-page > .mode-switch { margin-bottom: 12px; }
.workbench-page .creator-card,
.workbench-page .preview-card { min-height: 650px; }
.workbench-page .preview-card { padding: 18px 20px 16px; }
.workbench-page .workbench-preview { min-height: 330px; }
.workbench-page .workflow-divider { margin-top: auto; }
@media (max-width: 900px) {
  .workbench-page .creator-card,
  .workbench-page .preview-card { min-height: 0; }
  .workbench-page .workflow-divider { margin-top: 18px; }
}

/* Site-wide refinement pass: one quiet material system across every route. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --surface-glass: rgba(255,255,255,.64);
  --surface-glass-strong: rgba(255,255,255,.82);
  --border-glass: rgba(190,201,214,.82);
  --shadow-glass: 0 18px 48px rgba(72,84,101,.075), inset 0 1px rgba(255,255,255,.92);
}
.app-sidebar,
.command-bar,
.settings-menu,
.api-settings-card,
.account-modal .auth-card,
.account-modal .wallet-card {
  backdrop-filter: blur(18px) saturate(125%);
}
.report-nav.app-sidebar { background: rgba(251,252,253,.78) !important; }
.command-bar { background: rgba(247,248,250,.72); }
.skill-page,
.entry-panel,
.report-page,
.morning-generator-page { position: relative; }
.skill-page::before,
.entry-panel::before,
.report-page::before,
.morning-generator-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 88% 4%, rgba(255,255,255,.78), transparent 28%);
}
.skill-page > *,
.entry-panel > *,
.report-page > *,
.morning-generator-page > * { position: relative; z-index: 1; }
.skill-form,
.skill-output,
.entry-form,
.report-hero,
.report-section,
.generator-frame,
.workbench-result {
  border-color: var(--border-glass) !important;
  background: var(--surface-glass) !important;
  box-shadow: var(--shadow-glass) !important;
  backdrop-filter: blur(16px) saturate(120%);
}
.skill-form,
.skill-output { border-radius: 14px; }
.skill-output { background: rgba(255,255,255,.52) !important; }
.skill-page-head { margin-bottom: 24px; }
.skill-page-head h1 { letter-spacing: -.04em; }
.skill-page-head p { max-width: 760px; }
.skill-badge { border: 1px solid rgba(190,201,214,.68); box-shadow: 0 8px 20px rgba(67,80,98,.08); }
.form-section-title { border-color: #e0e5eb; }
.skill-form label,
.creator-card > label,
.api-config-group label,
.auth-form label { letter-spacing: .005em; }
.skill-form input,
.skill-form select,
.skill-form textarea,
.entry-form input,
.creator-card input,
.creator-card select,
.creator-card textarea,
.api-config-group input,
.auth-form input,
.admin-recharge input,
.admin-recharge select {
  border-color: #d3dbe4 !important;
  background: rgba(255,255,255,.78) !important;
  box-shadow: inset 0 1px 2px rgba(39,51,66,.025);
}
.skill-form input:focus,
.skill-form select:focus,
.skill-form textarea:focus,
.entry-form input:focus,
.creator-card input:focus,
.creator-card select:focus,
.creator-card textarea:focus,
.api-config-group input:focus,
.auth-form input:focus {
  border-color: #8ab7f5 !important;
  box-shadow: 0 0 0 3px rgba(22,119,255,.1), inset 0 1px 2px rgba(39,51,66,.025) !important;
}
.primary-action,
.entry-form button,
.skill-primary { min-height: 44px; font-weight: 650; letter-spacing: .005em; }
.secondary-action,
.text-action,
.test-provider,
.download-button { transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.secondary-action:hover,
.text-action:hover,
.test-provider:hover { transform: translateY(-1px); }
.output-empty { min-height: 420px; }
.output-empty h2 { color: #202630; letter-spacing: -.02em; }
.output-empty p { max-width: 360px; margin-right: auto; margin-left: auto; line-height: 1.7; }
.report-hero { border-radius: 15px; }
.metric-card,
.judgment-card,
.positioning,
.signal-section,
.benchmark-section,
.route-panel,
.takeaways-section {
  border-color: rgba(205,213,222,.82) !important;
  background: rgba(255,255,255,.58) !important;
  box-shadow: none !important;
}
.metric-card:hover,
.judgment-card:hover { box-shadow: 0 10px 24px rgba(72,84,101,.06) !important; }
.settings-menu { background: rgba(255,255,255,.88); }
.api-settings-modal,
.account-modal { background: rgba(31,39,50,.18); }
.api-settings-card { background: rgba(255,255,255,.9); box-shadow: var(--shadow-glass); }
.api-config-group { background: rgba(248,250,252,.72); border-color: rgba(205,213,222,.86); }
.generator-frame { background: rgba(255,255,255,.58) !important; }

@media (max-width: 760px) {
  .skill-page-head { margin-bottom: 18px; }
  .skill-page-head h1 { font-size: 26px; }
  .skill-form, .skill-output { border-radius: 12px; }
  .output-empty { min-height: 320px; }
}
