/* A quiet, document-first workspace. No remote fonts or runtime UI dependencies. */
:root {
  color-scheme: light;
  --font: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --bg: #f6f8fb;
  --surface: #fff;
  --surface-soft: #f8f9fc;
  --text: #202b42;
  --muted: #657188;
  --subtle: #66738a;
  --border: #e7ebf2;
  --primary: #315cdb;
  --primary-hover: #254bc0;
  --primary-soft: #edf2ff;
  --mark: #ffedb5;
  --warn: #90650c;
  --warn-bg: #fff9e9;
  --bad: #b43743;
  --bad-bg: #fff0f1;
  --ok: #28745c;
  --ok-bg: #edf7f2;
  --shadow: 0 3px 16px -10px #24396620;
  --sidebar-width: 224px;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, a, input, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--primary); }
button { transition: background .16s, border-color .16s, box-shadow .16s; }
button:disabled { box-shadow: none; }
input, textarea { width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
input:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; }
::placeholder { color: var(--subtle); opacity: 1; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; background: var(--surface); padding: 10px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--primary); color: white; border: 1px solid var(--primary); border-radius: 9px; padding: 10px 19px; font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 4px 12px #315cdb22; }
.btn-quiet { padding: 7px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; }
.btn-quiet:hover, .btn-choice:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.btn-link { padding: 7px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.btn-link:hover { color: var(--primary); }
.eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 600; color: var(--subtle); }
.help, .status { font-size: 12px; color: var(--muted); }
.error { color: var(--bad); font-size: 13px; }
.error:empty { display: none; }
.error-box { color: var(--bad); background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 18%, transparent); padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; overflow-wrap: anywhere; }

/* Navigation */
.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 5; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 34px 18px 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; width: fit-content; }
.sidebar > .brand { margin: 0 12px 41px; }
.brand-mark { width: 36px; height: 36px; background: var(--primary); border-radius: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; flex-shrink: 0; box-shadow: 0 3px 7px #315cdb1a; }
.brand-mark span { background: white; border-radius: 2px; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { opacity: .55; }
.brand-name { font-size: 22px; font-weight: 650; letter-spacing: .12em; line-height: 1.2; }
.brand-name > span { display: block; font-size: 8px; font-weight: 600; letter-spacing: .22em; color: var(--muted); margin-top: 5px; }
.new-button { width: 100%; min-height: 44px; font-size: 13px; }
.nav-label { margin: 30px 12px 10px; font-size: 10px; letter-spacing: .1em; color: var(--subtle); }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; padding: 12px 14px; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; margin-bottom: 6px; }
.nav-item:hover { background: var(--surface-soft); color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.sidebar-note { margin: 0 12px 32px; }
.sidebar-note > .icon { color: #9aaac3; margin-bottom: 10px; width: 22px; height: 22px; }
.sidebar-note p { font-size: 13px; line-height: 1.8; margin-bottom: 8px; color: var(--muted); }
.sidebar-note > span { font-size: 11px; color: var(--subtle); line-height: 1.8; }
.quota { margin: 0 10px 25px; }
.quota-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 9px; }
.quota-label strong { font-weight: 500; }
.meter { height: 4px; background: var(--border); border-radius: 6px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .3s; }
.quota.low .meter-fill { background: var(--warn); }
.account { display: flex; gap: 9px; align-items: center; border-top: 1px solid var(--border); padding: 20px 4px 0; }
.avatar { flex-shrink: 0; width: 33px; height: 33px; display: grid; place-items: center; background: var(--primary-soft); border: 1px solid var(--border); border-radius: 50%; color: var(--primary); font-weight: 600; }
.account-name { min-width: 0; flex: 1; }
.account-name strong { display: block; font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.account-name > span { display: block; font-size: 10px; color: var(--subtle); }

/* Main workspace */
main { margin-left: var(--sidebar-width); min-height: 100vh; }
main:focus { outline: none; }
.topbar { height: 72px; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 15px; min-width: 0; font-size: 12px; color: var(--muted); }
.breadcrumb h1 { font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-note { display: flex; gap: 7px; align-items: center; flex-shrink: 0; font-size: 11px; color: var(--muted); }
.review-note .icon { width: 15px; height: 15px; color: var(--ok); }
.workspace-content { padding: 24px 40px 20px; max-width: 1640px; margin: auto; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.heading-line { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 16px; }
.workspace-heading h2 { font-size: 22px; font-weight: 600; letter-spacing: -.04em; line-height: 1.5; margin: 0; }
.title-dot { color: var(--primary); padding-left: 3px; }
.workspace-heading > div > p:last-child { font-size: 12px; color: var(--muted); }
.mode-badge { font-size: 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; white-space: nowrap; }
.workspace-grid { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.pane { min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.pane-head { min-height: 64px; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.panel-heading { display: flex; align-items: center; gap: 12px; }
.step-number { color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 9%, transparent); font-size: 11px; font-weight: 600; letter-spacing: .03em; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.panel-heading h3 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.panel-heading p { font-size: 10px; color: var(--subtle); margin-top: 3px; }
.output-panel .step-number { color: var(--muted); background: var(--surface-soft); border-color: var(--border); }
.output-label { font-size: 10px; color: var(--subtle); white-space: nowrap; }
.tabs { display: none; }
.input-body { padding: 18px 24px 0; }
.field-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 11px; }
.field-heading label { font-size: 12px; font-weight: 500; }
.field-heading > span { font-size: 10px; color: var(--subtle); }
.inquiry-wrap { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface-soft); }
.inquiry-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.inquiry { display: block; min-height: 160px; padding: 16px; border: 0; border-radius: 0; background: transparent; font-size: 13px; line-height: 1.9; resize: vertical; }
.inquiry:focus-visible { outline-offset: -3px; }
.input-meta { display: flex; justify-content: space-between; gap: 8px; padding: 9px 14px 12px; color: var(--subtle); font-size: 10px; }
.input-meta span:last-child { font-variant-numeric: tabular-nums; }
.instruction { border: 1px solid var(--border); border-radius: 8px; margin-top: 12px; padding: 12px 14px; }
.instruction summary { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; }
.instruction summary::-webkit-details-marker { display: none; }
.instruction summary > span { font-size: 10px; color: var(--subtle); margin-left: auto; }
.instruction summary::after { content: "+"; margin-left: 4px; font-size: 17px; line-height: 1; }
.instruction[open] summary::after { content: "−"; }
.instruction .icon { width: 16px; height: 16px; }
.instruction textarea { margin-top: 12px; padding: 10px; font-size: 12px; line-height: 1.8; }
.submit-row { padding: 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.btn-lg { width: 100%; min-height: 46px; font-size: 13px; }
.btn-lg .arrow { margin-left: auto; width: 16px; }
.btn-lg > .icon:first-child { margin-right: auto; }
.shortcut-hint { font-size: 10px; color: var(--subtle); }
kbd { font: 10px var(--font); border: 1px solid var(--border); background: var(--surface-soft); padding: 2px 4px; border-radius: 4px; }
.input-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 15px 12px; background: var(--surface-soft); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); color: var(--subtle); font-size: 10px; }
.input-footnote .icon { width: 14px; height: 14px; }
.output-body { padding: 24px; }
.paper-empty { min-height: 520px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; }
.empty-art { position: relative; width: 158px; height: 150px; margin: 8px 0 24px; }
.art-orbit { position: absolute; width: 144px; height: 144px; left: 6px; top: 2px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 50%; }
.art-sheet { width: 86px; height: 112px; border: 1px solid #d9e1f0; border-radius: 8px; background: var(--surface); position: absolute; left: 37px; top: 19px; transform: rotate(-9deg); box-shadow: 0 8px 18px #2439660d; display: flex; flex-direction: column; gap: 7px; padding: 20px 13px; }
.art-sheet > span { height: 3px; flex-shrink: 0; background: var(--border); border-radius: 3px; }
.art-sheet .art-title { width: 22px; height: 5px; background: #a8bce9; margin-bottom: 5px; }
.art-sheet .art-highlight { height: 8px; background: var(--mark); }
.art-sheet .art-short { width: 60%; }
.art-check { position: absolute; right: 12px; bottom: 19px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary); color: white; border: 4px solid var(--surface); border-radius: 50%; font-size: 16px; }
.art-spark { position: absolute; top: 11px; right: 12px; font-size: 24px; color: #8da7e4; }
.empty-eyebrow { color: var(--primary); font-size: 10px; letter-spacing: .1em; margin-bottom: 11px; }
.paper-empty h3 { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.7; }
.empty-description { color: var(--muted); font-size: 11px; line-height: 1.9; margin-top: 14px; }
.btn-example { display: flex; align-items: center; gap: 7px; margin-top: 23px; border: 0; background: none; color: var(--primary); font-size: 11px; padding: 7px 9px; border-radius: 6px; }
.btn-example:hover { background: var(--primary-soft); }
.btn-example .icon { width: 14px; height: 14px; }
.workflow { display: flex; align-items: center; justify-content: center; list-style: none; padding: 29px 0 0; margin: 24px 0 8px; border-top: 1px solid var(--border); width: 90%; gap: 10px; color: var(--subtle); font-size: 10px; }
.workflow li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.workflow li > span { width: 17px; height: 17px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; font-size: 9px; }
.workflow .workflow-line { height: 1px; background: var(--border); flex: 1; max-width: 26px; }
.workspace-footer { display: flex; gap: 16px; justify-content: space-between; padding: 24px 0 0; font-size: 9px; color: var(--subtle); letter-spacing: .02em; }
.footer-dot { padding: 0 7px; }

/* Generation and editable reply */
.paper-loading { min-height: 520px; padding: 32px 8px; }
.loading-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.loading-heading h3 { font-size: 15px; font-weight: 500; }
.loading-heading p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.loading-spinner { height: 26px; width: 26px; border: 2px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
.skeleton { display: grid; gap: 18px; margin: 40px 0; }
.skeleton span { display: block; height: 9px; border-radius: 4px; background: var(--border); animation: pulse 1.5s ease-in-out infinite; }
.skeleton span:nth-child(2) { width: 92%; }
.skeleton span:nth-child(3) { width: 82%; }
.skeleton span:nth-child(4) { width: 95%; }
.skeleton span:nth-child(5) { width: 45%; }
.loading-note { font-size: 11px; color: var(--subtle); }
.letter-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.statusline { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.seal { font-size: 10px; font-weight: 500; color: var(--ok); background: var(--ok-bg); border-radius: 5px; padding: 4px 8px; }
.seal::before { content: "✓"; margin-right: 5px; }
.seal.bad { color: var(--bad); background: var(--bad-bg); }
.seal.bad::before { content: "!"; }
.stat { font-size: 10px; color: var(--muted); }
.stat-confirm { color: var(--warn); background: var(--warn-bg); border-radius: 5px; padding: 4px 8px; }
#stat-retry { color: var(--primary); }
.draft-grid { display: grid; gap: 16px; }
.letter { position: relative; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.highlights, .reply { font: 14px/1.9 var(--font); letter-spacing: 0; padding: 22px; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 8; }
.highlights { position: absolute; inset: 0; color: transparent; overflow: hidden; pointer-events: none; }
.highlights mark { color: transparent; background: var(--mark); border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.reply { position: relative; display: block; width: 100%; min-height: 340px; border: 0; border-radius: 9px; background: transparent; margin: 0; overflow: hidden; resize: none; caret-color: var(--primary); }
.reply:focus-visible { outline: none; }
.letter:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.margin-notes { padding: 16px; border: 1px solid color-mix(in srgb, var(--warn) 18%, transparent); background: var(--warn-bg); border-radius: 9px; }
.margin-notes h3 { font-size: 12px; color: var(--warn); }
.margin-notes .help { font-size: 10px; margin-top: 4px; }
.confirm-list { display: grid; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.confirm-list button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 1px solid transparent; border-radius: 5px; background: var(--surface); font-size: 11px; overflow-wrap: anywhere; line-height: 1.7; }
.confirm-list button::before { content: "○"; color: var(--warn); margin-right: 8px; }
.confirm-list button:hover { border-color: var(--warn); }
.confirm-list .done button { text-decoration: line-through; color: var(--subtle); }
.confirm-list .done button::before { content: "✓"; color: var(--ok); }
.reply-help { margin: 11px 0 18px; font-size: 10px; }
.actionbar { padding-top: 17px; border-top: 1px solid var(--border); }
.copy-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copy-hint { font-size: 11px; color: var(--muted); margin-right: auto; }
.copy-group .btn-primary { font-size: 12px; padding: 9px 20px; }
#copy-status:not(:empty) { flex-basis: 100%; font-size: 11px; color: var(--warn); }
.verdict { margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--border); }
.verdict fieldset { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border: 0; margin: 0; padding: 0; }
.verdict legend { float: left; padding: 0; font-size: 11px; color: var(--muted); margin-right: auto; }
.verdict-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-choice { font-size: 10px; padding: 6px 10px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); }
.btn-choice[aria-pressed="true"] { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.btn-choice.suggested:not([aria-pressed="true"]) { border-color: var(--primary); border-style: dashed; }
.verdict.nudge legend { color: var(--primary); }
.fb-status:not(:empty) { margin-top: 10px; font-size: 11px; }
.fb-status:empty, .pane-status:not(.visible) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pane-status.visible { background: var(--primary-soft); padding: 12px; border-radius: 8px; margin-bottom: 16px; }
.comment { display: grid; justify-items: start; gap: 9px; margin-top: 18px; }
.comment label, .comment textarea { font-size: 12px; }
.optional { font-weight: 400; color: var(--subtle); }
.extras { margin-top: 24px; border-top: 1px solid var(--border); }
.extras details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.extras details:last-child { border-bottom: 0; padding-bottom: 0; }
.extras summary { cursor: pointer; font-size: 11px; font-weight: 500; color: var(--muted); }
.extras summary > span { float: right; font-size: 10px; color: var(--subtle); font-weight: 400; }
.notes { font-size: 12px; color: var(--muted); line-height: 1.9; white-space: pre-wrap; margin-top: 12px; overflow-wrap: anywhere; }
.checks { font-size: 12px; padding-left: 18px; margin-bottom: 0; }
.checks li + li { margin-top: 8px; }
.checks .bad { color: var(--bad); }
.checks .warn { color: var(--warn); }
pre { font: 11px/1.8 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; background: var(--surface-soft); padding: 14px; border: 1px solid var(--border); border-radius: 8px; margin: 12px 0 0; }

/* History */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 94vw); height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid var(--border); padding: 30px; background: var(--surface); color: var(--text); overflow: auto; box-shadow: -10px 0 50px #18294110; }
.drawer::backdrop { background: #15223b55; backdrop-filter: blur(3px); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.drawer-head h2 { font-size: 23px; font-weight: 600; margin-top: 5px; }
.history { list-style: none; margin: 24px 0 0; padding: 0; }
.history li + li { margin-top: 10px; }
.history button { width: 100%; display: grid; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: left; }
.history button:hover { background: var(--surface-soft); border-color: var(--primary); }
.history time { font-size: 10px; color: var(--subtle); }
.history .snippet { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.history .tag { font-size: 10px; color: var(--muted); }
.history .tag.good { color: var(--ok); }
.history .tag.edited { color: var(--warn); }
.history .tag.wrong { color: var(--bad); }
.history-empty { text-align: center; padding: 64px 0; font-size: 14px; }
.history-empty span { font-size: 11px; color: var(--muted); }
#history-loading { margin-top: 24px; }
#history-error { margin-top: 16px; }

/* Login */
body:not([data-view="work"]) .sidebar { display: none; }
body:not([data-view="work"]) main { margin-left: 0; }
.startup { display: none; }
body[data-view="loading"] .startup { display: block; padding: 25vh 24px; text-align: center; color: var(--muted); }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-story { background: #edf2fb; padding: 50px 12%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-story::after { content: ""; position: absolute; width: 450px; height: 450px; border: 1px solid #315cdb0f; border-radius: 50%; bottom: -260px; right: -100px; box-shadow: 0 0 0 70px #315cdb04, 0 0 0 140px #315cdb04; pointer-events: none; }
.login-message { margin: auto 0; padding: 60px 0; }
.login-message .eyebrow { color: var(--primary); font-size: 11px; letter-spacing: .12em; }
.login-message h1 { font-size: clamp(28px, 3vw, 44px); font-weight: 500; letter-spacing: -.05em; line-height: 1.6; margin: 20px 0; }
.login-message > p:not(.eyebrow) { font-size: 12px; line-height: 2; color: var(--muted); }
.login-proof { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--primary); margin-top: 32px; }
.login-caption { color: var(--subtle); font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 64px 32px; background: var(--surface); }
.login-card { width: min(100%, 350px); }
.login-card h2 { font-size: 28px; font-weight: 500; margin: 10px 0; letter-spacing: -.04em; }
.login-intro { color: var(--muted); font-size: 12px; margin-bottom: 35px; }
.login-card label { display: block; font-size: 12px; margin: 19px 0 8px; }
.login-card input { font-size: 13px; height: 45px; }
.btn-block { width: 100%; margin: 28px 0 12px; min-height: 46px; justify-content: space-between; font-size: 13px; }
.login-help { font-size: 10px; color: var(--muted); margin-top: 22px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .4; } }
@media (min-width: 1700px) { .workspace-grid { grid-template-columns: minmax(380px, .8fr) minmax(0, 1.4fr); } }
@media (max-width: 1200px) {
  :root { --sidebar-width: 194px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .workspace-content { padding: 24px 24px 18px; }
  .topbar { padding: 0 24px; }
  .workspace-grid { gap: 18px; grid-template-columns: minmax(280px, .95fr) minmax(0, 1.15fr); }
  .pane-head { padding: 14px 18px; }
  .input-body { padding: 16px 18px 0; }
  .submit-row { padding: 16px 18px; }
  .output-body { padding: 20px 18px; }
  .output-label { display: none; }
  .paper-empty h3 { font-size: 19px; }
  .verdict legend { float: none; margin-bottom: 9px; }
}
@media (max-width: 960px) {
  :root { --sidebar-width: 180px; }
  .sidebar > .brand { margin-left: 6px; }
  .workspace-content { padding: 24px 22px 18px; }
  .workspace-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .tabs { display: flex; padding: 4px; gap: 4px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; background: var(--surface); }
  .tabs button { flex: 1; border: 0; border-radius: 6px; padding: 10px 8px; background: transparent; color: var(--muted); font-size: 12px; }
  .tabs button[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace[data-tab="input"] #pane-output, .workspace[data-tab="output"] #pane-input { display: none; }
  .paper-empty, .paper-loading { min-height: 440px; }
  .workspace-footer { flex-direction: column; gap: 4px; }
  .review-note { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .sidebar { position: static; width: 100%; padding: 18px 20px 12px; display: grid; grid-template-columns: 1fr auto; gap: 18px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar > .brand { margin: 0; }
  .brand-mark { width: 32px; height: 32px; padding: 7px; gap: 3px; border-radius: 8px; }
  .brand-name { font-size: 19px; }
  .brand-name > span { font-size: 7px; }
  .sidebar-bottom { display: contents; }
  .sidebar-note, .quota, .account-name > span, .avatar { display: none !important; }
  .account { grid-column: 2; grid-row: 1; padding: 0; border: 0; gap: 13px; }
  .account-name { max-width: 70px; }
  .navigation { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 10px; }
  .nav-label, .nav-item.active { display: none; }
  .new-button, .nav-item { width: auto; font-size: 11px; min-height: 38px; padding: 8px 14px; margin: 0; border-radius: 7px; }
  .new-button .icon, .nav-item .icon { width: 15px; height: 15px; }
  .nav-item { background: var(--surface-soft); margin-left: auto; }
  main { margin-left: 0; }
  .topbar { height: 45px; padding: 0 20px; background: var(--bg); border-bottom: 0; }
  .breadcrumb, .breadcrumb h1 { font-size: 10px; }
  .workspace-content { padding: 12px 16px 22px; }
  .workspace-heading { gap: 9px; padding: 0 4px; }
  .workspace-heading h2 { font-size: 22px; }
  .mode-badge { font-size: 9px; padding: 3px 9px; }
  .workspace-heading > div > p:last-child { font-size: 11px; }
  .pane-head { min-height: 64px; padding: 14px 17px; }
  .panel-heading { gap: 10px; }
  .panel-heading h3 { font-size: 13px; }
  .panel-heading p { font-size: 10px; }
  .input-body { padding: 16px 17px 0; }
  .inquiry { font-size: 16px; min-height: 160px; line-height: 1.8; padding: 13px; }
  .instruction textarea, .reply, .comment textarea, .login-card input { font-size: 16px; }
  .highlights { font-size: 16px; }
  .submit-row { padding: 16px 17px; }
  .shortcut-hint { display: none; }
  .input-footnote { font-size: 9px; }
  .output-body { padding: 18px 16px; }
  .paper-empty { min-height: 430px; }
  .empty-art { transform: scale(.85); margin: 0 0 6px; }
  .paper-empty h3 { font-size: 19px; }
  .workflow { width: 100%; gap: 6px; font-size: 9px; margin-top: 16px; padding-top: 20px; }
  .highlights, .reply { padding: 17px; }
  .reply { min-height: 300px; }
  .copy-hint { font-size: 10px; }
  .verdict-buttons { width: 100%; }
  .btn-choice { flex: 1; min-height: 38px; }
  .drawer { padding: 25px 20px; }
  .workspace-footer { padding-left: 4px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { padding: 28px; background: var(--bg); }
  .login-story::after, .login-message, .login-caption { display: none; }
  .login-panel { align-items: start; padding: 26px 28px 64px; }
  .login-card { width: 100%; max-width: 380px; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #131923; --surface: #1a2230; --surface-soft: #202a3a; --text: #e4eaf5; --muted: #a3afc4; --subtle: #94a1b7; --border: #2b374b; --primary: #8aaaff; --primary-hover: #a2bbff; --primary-soft: #263657; --mark: #675124; --warn: #e9c772; --warn-bg: #332d20; --bad: #f2a3ad; --bad-bg: #3d2630; --ok: #8acbb0; --ok-bg: #213c34; --shadow: none; }
  .btn-primary { color: #152344; }
  .brand-mark, .art-check { background: #315cdb; }
  .login-story { background: #1c2942; }
  .art-sheet { border-color: var(--border); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 草稿顶部固定提示:价格表日期、检验报告有效期(只给业务员看,不进正文) */
.notices { list-style: none; margin: -4px 0 16px; padding: 0; display: grid; gap: 6px; }
.notices li { font-size: 12px; line-height: 1.5; padding: 8px 12px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); }
.notices li.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; font-weight: 500; }
.notices li.warn::before { content: "!"; display: inline-block; width: 16px; font-weight: 700; }

/* 有提醒时的印章 */
.seal.warn { color: var(--warn); background: var(--warn-bg); }
.seal.warn::before { content: "!"; }

/* 复制提示:还有待确认时用警示色 */
.copy-hint.warn { color: var(--warn); font-weight: 500; }

/* 复制成功后,在复制按钮原位一键反馈 */
.after-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.after-copy-done { font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-bg); border-radius: 5px; padding: 4px 8px; }
.after-copy-done::before { content: "✓"; margin-right: 5px; }
.after-copy-ask { font-size: 13px; font-weight: 600; margin-right: auto; }
.after-copy .btn-link { font-size: 12px; }

/* 我的草稿:没反馈的醒目,并能直接一键反馈 */
.history .tag.pending { color: var(--warn); font-weight: 600; }
.quick-verdict { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 0 4px; font-size: 11px; color: var(--muted); }
.quick-verdict span { margin-right: 2px; }
.btn-mini { font-size: 11px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-mini:disabled { opacity: .5; cursor: default; }

/* 登录页的支持联系方式 */
.login-help { font-size: 12px; line-height: 1.6; }
.login-help .btn-link, .login-help a { font-size: inherit; color: var(--primary); }

@media (max-width: 640px) {
  .after-copy-ask { width: 100%; margin-right: 0; }
}
