/* 视觉语言参考 docs/web template/（Luma 风格静态模板）：浅色暖灰工作区、
   浮动圆角侧边栏、柔和面板阴影、蓝紫光晕点缀。主题变量与模板 theme-luma.css 对齐。 */
:root {
  color-scheme: light;
  --workspace: #f1f0ed; --panel: rgba(255,255,253,.96); --panel-solid: #fffefa;
  --soft: #f7f6f3; --muted-surface: #ecebe7; --hover: #f2f1ed; --selected: #111111;
  --ink: #171716; --muted: #6f6e69; --faint: #9a9891;
  --line: #e3e1dc; --line-strong: #d1cec6;
  --focus-ring: rgba(31,78,121,.24);
  --glow-blue: rgba(157,202,255,.34); --glow-violet: rgba(205,188,255,.22);
  --red: #a33b35; --red-soft: #f8eeec; --green: #457253; --green-soft: #e8f1eb;
  --radius-control: 12px; --radius-button: 999px; --radius-card: 20px;
  --radius-panel: 26px; --radius-shell: 30px;
  --shadow-panel: 0 1px 0 rgba(26,24,20,.03), 0 10px 30px rgba(34,31,25,.035);
  --shadow-float: 0 18px 48px rgba(31,29,24,.13), 0 2px 8px rgba(31,29,24,.05);
  --shadow-focus: 0 0 0 4px var(--focus-ring);
  --sidebar: 264px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--workspace); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: radial-gradient(circle at 56% -10%, rgba(255,255,255,.74), transparent 36%), var(--workspace); font-family: var(--sans); font-size: 13px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { border: 0; }
svg { display: block; }
::selection { background: rgba(157,202,255,.45); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.icon-button { width: 34px; height: 34px; flex: 0 0 auto; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 50%; padding: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { color: var(--ink); background: var(--hover); }
.icon-button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.icon-button:disabled { opacity: .38; cursor: default; transform: none; }
.icon-button:active { transform: scale(.96); }
.primary-icon-action { position: relative; width: 44px; height: 44px; border-color: transparent; color: #fff; background: var(--selected); box-shadow: var(--shadow-panel); }
.primary-icon-action:hover { color: #fff; background: #2a2927; transform: translateY(-1px); box-shadow: var(--shadow-float); }
.primary-icon-action.is-loading svg { opacity: 0; }
.primary-icon-action.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }

.login-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); background: var(--workspace); }
.login-intro { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.login-intro::before { content: ""; position: absolute; z-index: -1; top: -90px; left: -80px; width: 360px; height: 300px; border-radius: 50%; background: radial-gradient(ellipse at 40% 50%, var(--glow-blue), transparent 62%); filter: blur(30px); pointer-events: none; }
.login-intro::after { content: ""; position: absolute; z-index: -1; right: -110px; bottom: -130px; width: 380px; height: 320px; border-radius: 50%; background: radial-gradient(ellipse at 60% 45%, var(--glow-violet), transparent 62%); filter: blur(30px); pointer-events: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(70,66,58,.08); border-radius: 13px; background: var(--panel-solid); box-shadow: var(--shadow-panel); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; }
.login-intro h1 { margin: 24px 0 10px; font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 570; line-height: 1.08; letter-spacing: -.042em; }
.login-note { margin: 0; max-width: 420px; color: var(--muted); font-size: 15px; }
.login-form-panel { display: grid; place-items: center; padding: 48px; border-left: 1px solid var(--line); background: var(--panel-solid); }
.login-form-wrap { width: min(100%, 380px); }
.login-form-wrap h2 { margin: 0 0 32px; font-family: var(--display); font-size: 24px; font-weight: 570; letter-spacing: -.03em; }
.login-form { display: grid; gap: 20px; }

.field { display: grid; gap: 8px; }
.field > span { display: flex; justify-content: space-between; color: #3f3e3a; font-size: 13px; font-weight: 600; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: var(--radius-control); outline: none; padding: 10px 12px; color: var(--ink); background: var(--panel-solid); transition: border-color 140ms ease, box-shadow 140ms ease; }
.field textarea { min-height: 100px; line-height: 1.6; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--line-strong); box-shadow: var(--shadow-focus); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field em { color: var(--red); font-size: 12px; font-style: normal; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: rgba(163,59,53,.45); }
.primary-action { min-height: 44px; border: 0; border-radius: var(--radius-button); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; background: var(--selected); color: #fff; font-weight: 570; cursor: pointer; box-shadow: var(--shadow-panel); transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease; }
.primary-action:hover { transform: translateY(-1px); background: #2a2927; box-shadow: var(--shadow-float); }
.primary-action:active { transform: scale(.98); }
.primary-action:disabled { cursor: wait; opacity: .6; transform: none; }
.login-form .primary-action { margin-top: 4px; }
.inline-alert { margin: 0 0 20px; padding: 11px 13px; border: 1px solid rgba(163,59,53,.16); border-radius: var(--radius-control); color: var(--red); background: var(--red-soft); font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { position: fixed; z-index: 30; inset: 16px auto 16px 16px; width: 232px; overflow: hidden; padding: 14px 12px 12px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(225,223,217,.8); border-radius: var(--radius-shell); background: var(--panel); box-shadow: var(--shadow-panel); backdrop-filter: blur(20px); }
.app-brand { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 6px; color: var(--ink); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.nav-label { margin: 24px 10px 8px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.function-nav { display: grid; gap: 3px; }
.function-link, .history-link { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: var(--radius-button); color: var(--muted); transition: color 140ms ease, background 140ms ease; }
.function-link strong, .history-link { font-size: 13px; font-weight: 570; }
.function-link:hover, .history-link:hover { color: var(--ink); background: var(--hover); }
.function-link.is-active, .history-link.is-active { color: #fff; background: var(--selected); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-divider { height: 12px; }
.account-block { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 8px 0; border-top: 1px solid var(--line); }
.account-block > div { min-width: 0; display: grid; gap: 3px; }
.account-kicker { margin: 0; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.account-block strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quiet-action:hover { color: var(--red); background: var(--red-soft); }
.mobile-header { display: none; }
.main-surface { grid-column: 2; min-width: 0; }
.workspace, .history-page, .record-page { width: min(100%, 1500px); margin: 0 auto; padding: 34px clamp(28px, 4vw, 64px) 64px; }
.workspace-header { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.workspace-title-line { display: flex; align-items: baseline; gap: 16px; }
.workspace-header h1, .record-header h1 { margin: 0; font-family: var(--display); font-size: clamp(28px, 3vw, 40px); font-weight: 570; line-height: 1.08; letter-spacing: -.042em; }
.workspace-header > div > p:last-child { min-width: 0; max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.workspace-grid { display: grid; grid-template-columns: minmax(320px, .92fr) minmax(420px, 1.08fr); gap: clamp(32px, 4vw, 64px); padding-top: 26px; align-items: start; }
.section-heading { display: block; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.generation-form { display: grid; gap: 20px; margin-top: 18px; }
.result-panel { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel-solid); box-shadow: var(--shadow-panel); animation: result-in 220ms cubic-bezier(.2,.72,.2,1) both; }
.result-toolbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 4px 7px 4px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--soft); font-size: 11px; }
.preview-actions { display: flex; align-items: center; gap: 2px; }
.copy-action { color: var(--muted); }
.copy-action.is-copied { color: var(--green); background: var(--green-soft); }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
.result-panel > pre { padding: 18px; color: #2f2e2b; font-size: 13px; line-height: 1.72; }
.preview-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.live-preview-panel { margin-top: 14px; }
.preview-body { position: relative; max-height: 190px; overflow: hidden; transition: max-height 220ms ease; }
.preview-body::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 58px; pointer-events: none; background: linear-gradient(to bottom, rgba(255,254,250,0), var(--panel-solid)); }
.preview-body pre { min-height: 150px; padding: 16px 18px 28px; font-size: 12px; line-height: 1.68; }
.live-preview-panel.is-expanded .preview-body { max-height: none; }
.live-preview-panel.is-expanded .preview-body::after { display: none; }
.live-preview-panel.is-empty .preview-body::after { display: none; }
.live-preview-panel.is-empty .preview-body pre::before { content: "填写内容后自动显示"; color: var(--faint); }
.expand-action svg { transition: transform 180ms ease; }
.live-preview-panel.is-expanded .expand-action svg { transform: rotate(180deg); }
.code-block, .code-block code { font-family: var(--mono); }
.code-block code { display: block; white-space: inherit; }
.answer-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.model-generation { width: 230px; display: grid; grid-template-columns: minmax(0, 178px) 44px; gap: 8px; align-items: center; }
.model-generation select { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-button); outline: none; padding: 0 32px 0 14px; appearance: none; color: var(--ink); background: linear-gradient(45deg, transparent 50%, var(--faint) 50%) calc(100% - 17px) 16px / 5px 5px no-repeat, linear-gradient(135deg, var(--faint) 50%, transparent 50%) calc(100% - 12px) 16px / 5px 5px no-repeat, var(--panel-solid); font-size: 12px; transition: border-color 140ms ease, box-shadow 140ms ease; }
.model-generation select:hover { border-color: var(--line-strong); }
.model-generation select:focus { border-color: var(--line-strong); box-shadow: var(--shadow-focus); }
.generate-action { margin: 0; }
.builder-output { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.answer-column .result-panel, .answer-column .result-state { width: 100%; }
.answer-column .answer-panel > pre { max-height: 650px; overflow: auto; }
.live-output-panel.is-empty > pre::before { content: "填写内容后自动显示"; color: var(--faint); }
.answer-column .result-state { min-height: 360px; }
.choice-results { margin-top: 18px; }
.choice-results-toolbar { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel-solid); box-shadow: var(--shadow-panel); }
.prompt-choice-list { display: grid; gap: 14px; margin-top: 14px; }
.prompt-choice { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel-solid); box-shadow: var(--shadow-panel); animation: result-in 220ms cubic-bezier(.2,.72,.2,1) both; }
.prompt-choice:nth-child(2) { animation-delay: 45ms; }
.prompt-choice:nth-child(3) { animation-delay: 90ms; }
.prompt-choice-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 7px 6px 16px; border-bottom: 1px solid var(--line); background: var(--soft); }
.prompt-choice-header > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.prompt-choice-header span { color: var(--faint); font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.prompt-choice-header h3 { min-width: 0; margin: 0; overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.choice-prompt { padding: 16px 18px; color: #2f2e2b; background: var(--soft); font-size: 12px; line-height: 1.7; }
.choice-translation { padding: 13px 18px 16px; border-top: 1px solid var(--line); }
.choice-translation span { color: var(--faint); font-size: 10px; font-weight: 650; letter-spacing: .06em; }
.choice-translation p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.history-choice-results { margin-top: 16px; }
.result-state { min-height: 180px; margin-top: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-card); color: var(--muted); background: rgba(255,254,250,.5); text-align: center; }
.result-state > span { color: var(--faint); }
.empty-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
.empty-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.result-state strong { margin-top: 12px; color: #55534e; font-size: 14px; }
.result-state p { max-width: 420px; margin: 6px 16px 0; font-size: 12px; line-height: 1.5; }
.error-state { align-items: flex-start; min-height: 140px; padding: 20px; border-style: solid; border-color: rgba(163,59,53,.2); color: var(--red); background: var(--red-soft); text-align: left; }
.error-state > span { color: var(--red); font-size: 12px; font-weight: 700; }
.error-state strong { color: var(--red); }

.builder-brief { padding-top: 28px; }
.builder-form { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.builder-form .field textarea { min-height: 128px; }
.compact-builder-submit { grid-template-columns: 220px 44px; max-width: none; }
.draft-meta { margin-top: 18px; color: var(--faint); font-size: 11px; }
.editor-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.prompt-editor { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel-solid); box-shadow: var(--shadow-panel); animation: result-in 220ms cubic-bezier(.2,.72,.2,1) both; }
.prompt-editor:nth-child(2) { animation-delay: 50ms; }
.prompt-editor:nth-child(3) { animation-delay: 100ms; }
.function-config-editor { grid-column: 1 / -1; }
.function-yaml-textarea { min-height: 360px; }
.editor-toolbar { min-height: 50px; padding: 7px 8px 7px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: var(--soft); }
.editor-toolbar > div:first-child { display: grid; gap: 2px; }
.editor-toolbar span { font-size: 12px; font-weight: 650; }
.editor-toolbar small { color: var(--faint); font-size: 10px; }
.editor-actions { display: flex; align-items: center; gap: 2px; }
.editor-textarea { width: 100%; min-height: 480px; display: block; border: 0; outline: 0; resize: vertical; padding: 18px; color: #35342f; background: var(--soft); caret-color: var(--ink); font: 12px/1.7 var(--mono); }
.editor-textarea:focus { box-shadow: inset 0 0 0 3px var(--focus-ring); }

.history-header { display: flex; align-items: center; justify-content: space-between; }
.record-count { color: var(--muted); font-size: 12px; }
.history-list { margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel-solid); box-shadow: var(--shadow-panel); }
.history-list-head, .history-row { display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .7fr) 100px 24px; gap: 18px; align-items: center; }
.history-list-head { padding: 13px 16px 10px; color: var(--muted); font-size: 11px; font-weight: 570; letter-spacing: .04em; }
.history-row { min-height: 68px; padding: 10px 16px; border-top: 1px solid var(--line); transition: background 140ms ease; }
.history-row:hover { background: var(--hover); }
.history-row > span:first-child { display: grid; gap: 4px; }
.history-row time { color: var(--faint); font-size: 11px; }
.history-row strong { font-size: 14px; font-weight: 570; }
.history-row > span:nth-child(2) { color: var(--muted); font-size: 12px; }
.row-arrow { color: var(--faint); font-size: 22px; }
.outcome { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 3px 10px; border-radius: var(--radius-button); font-size: 11px; font-weight: 600; }
.outcome::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.outcome.success { color: var(--green); background: var(--green-soft); }
.outcome.failed { color: var(--red); background: var(--red-soft); }
.history-empty { min-height: 260px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-card); color: var(--muted); background: rgba(255,254,250,.5); }
.history-empty span { color: var(--ink); font-size: 15px; font-weight: 650; }
.history-empty p { margin: 6px 0 0; font-size: 12px; }

.record-page { max-width: 1080px; }
.back-link { display: inline-flex; margin-bottom: 22px; color: var(--muted); font-size: 12px; font-weight: 650; transition: color 140ms ease; }
.back-link:hover { color: var(--ink); }
.back-link::before { content: "‹"; margin-right: 5px; font-size: 18px; line-height: 12px; }
.record-header { padding-bottom: 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; }
.record-header h1 { margin: 7px 0 0; }
.section-index { margin: 0; color: var(--faint); font-size: 11px; letter-spacing: .04em; }
.record-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.input-summary { margin: 16px 0 0; }
.input-summary > div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.input-summary dt { color: var(--muted); font-size: 12px; }
.input-summary dd { margin: 0; font-size: 13px; line-height: 1.6; }
.prompt-document { position: relative; margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel-solid); box-shadow: var(--shadow-panel); }
.prompt-document pre { padding-right: 36px; color: #2f2e2b; font-size: 12px; line-height: 1.72; }
.prompt-document .copy-action { position: absolute; top: 7px; right: 7px; }

.js [data-page-enter], .js .login-form-wrap, .js .login-intro > * { opacity: 0; transform: translateY(8px); }
.is-ready [data-page-enter], .is-ready .login-form-wrap, .is-ready .login-intro > * { opacity: 1; transform: translateY(0); transition: opacity 240ms ease, transform 260ms cubic-bezier(.2,.72,.2,1); }
.is-ready .login-form-wrap { transition-delay: 60ms; }
@keyframes result-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  :root { --sidebar: 242px; }
  .sidebar { width: 210px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .builder-form, .editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 220px; padding: 34px 24px; }
  .login-intro h1 { margin-top: 18px; font-size: 28px; }
  .login-form-panel { padding: 40px 24px 56px; place-items: start stretch; border-left: 0; border-top: 1px solid var(--line); }
  .login-form-wrap { margin: 0 auto; }
  .mobile-header { position: sticky; top: 0; z-index: 20; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); background: rgba(241,240,237,.88); backdrop-filter: blur(12px); color: var(--ink); }
  .mobile-header .icon-button { color: var(--muted); }
  .mobile-header .icon-button:hover { color: var(--ink); background: var(--hover); }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
  .mobile-brand img { width: 28px; height: 28px; display: block; border: 1px solid var(--line); border-radius: 8px; }
  .app-shell { display: block; }
  .sidebar { width: min(86vw, 300px); transform: translateX(-120%); transition: transform 200ms cubic-bezier(.2,.72,.2,1); box-shadow: var(--shadow-float); }
  .sidebar.is-open { transform: translateX(0); }
  .main-surface { min-width: 0; }
  .workspace, .history-page, .record-page { padding: 24px 16px 48px; }
  .workspace-header h1, .record-header h1 { font-size: 24px; }
  .workspace-title-line { display: grid; gap: 6px; }
  .workspace-header > div > p:last-child { margin: 0; }
  .workspace-grid { gap: 34px; padding-top: 24px; }
  .answer-heading { gap: 10px; }
  .model-generation { width: 218px; grid-template-columns: minmax(0, 166px) 44px; }
  .answer-column .result-state { min-height: 220px; }
  .history-list-head { display: none; }
  .history-row { grid-template-columns: 1fr auto; }
  .history-row > span:nth-child(2) { display: none; }
  .history-row > span:nth-child(3) { grid-column: 2; grid-row: 1; }
  .history-row > span:last-child { display: none; }
  .input-summary > div { grid-template-columns: 1fr; gap: 5px; }
  .editor-textarea { min-height: 380px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
