:root {
  --bg: #f8f7f4; --paper: #fffefa; --canvas: #eceae5;
  --ink: #282824; --muted: #77776e; --line: #deded5;
  --accent: #a5412b; --accent-hover: #853420; --soft: #f6eee9;
  font: 16px -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--bg); color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; transition: background .15s, border-color .15s; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: #a5412b15; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
button svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 30; background: var(--ink); color: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.app-header { height: 76px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 64px; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 16px; font-weight: 600; letter-spacing: .06em; }
.brand-mark { width: 29px; height: 29px; stroke: var(--accent); stroke-width: 1.7; }
.brand small { font-size: 10px; border: 1px solid var(--line); padding: 3px 5px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.app-header nav { display: flex; height: 100%; gap: 28px; }
.nav-link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active:after { content: ""; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: var(--ink); }
.nav-link span { margin-left: 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.new-work { margin-left: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 500; line-height: 1.5; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.subtle { background: transparent; border-color: var(--line); }
.button.subtle:hover:not(:disabled) { background: var(--canvas); border-color: #bdbeb2; }
.button.full { width: 100%; }
.quiet { color: var(--muted); font-size: 12px; line-height: 1.8; }
main { max-width: 1760px; margin: auto; padding: 27px 32px 16px; }
.workspace-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; min-width: 0; }
.page-heading > div { min-width: 0; }
.eyebrow { font-size: 10px; color: var(--muted); margin-bottom: 7px; letter-spacing: .14em; }
h1 { font-size: 22px; font-weight: 500; line-height: 1.5; letter-spacing: -.03em; overflow-wrap: anywhere; }
.stepper { display: flex; align-items: center; flex-shrink: 0; padding: 0; list-style: none; margin: 0; gap: 21px; }
.stepper li { display: flex; align-items: center; gap: 6px; color: #92938a; font-size: 11px; white-space: nowrap; }
.stepper li > span { font-size: 10px; font-variant-numeric: tabular-nums; }
.stepper li.active { color: var(--accent); }
.stepper li.done { color: #4d5947; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 400px; height: max(620px, calc(100dvh - 225px)); max-height: 960px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--paper); }
.visual-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.panel-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 8px 22px; gap: 8px; font-size: 12px; border-bottom: 1px solid var(--line); }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.small-button { border: 1px solid transparent; background: transparent; color: var(--muted); min-height: 32px; padding: 6px 8px; border-radius: 3px; font-size: 12px; }
.small-button:hover, .small-button.selected { background: var(--soft); color: var(--accent); }
.icon-button { border: 0; background: none; font-size: 22px; min-height: 32px; min-width: 32px; padding: 2px; border-radius: 3px; }
.icon-button:hover { background: var(--soft); }
.upload-zone { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 20px 24px; background: var(--canvas); }
.upload-zone.dragging { outline: 2px dashed var(--accent); outline-offset: -12px; background: #f1e9e1; }
.paper-study { position: relative; width: 164px; height: 244px; margin: 0 0 30px; }
.paper-study > img { position: absolute; width: 151px; height: 210px; top: 6px; left: 0; object-fit: cover; transform: rotate(-7deg); box-shadow: 0 8px 18px #24232018; border: 5px solid var(--paper); }
.study-sheet { position: absolute; inset: 0 0 24px 5px; background: #fdfcf7; transform: rotate(7deg); border: 1px solid #d4d3c9; }
.study-caption { position: absolute; font-size: 9px; color: var(--muted); white-space: nowrap; left: 50%; bottom: -9px; transform: translateX(-50%); letter-spacing: .13em; }
.upload-zone h2 { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: 28px; font-weight: 500; letter-spacing: .03em; line-height: 1.5; }
.upload-zone > p { font-size: 12px; color: var(--muted); margin: 10px 0 24px; }
.upload-zone .button { min-width: 146px; }
.file-help { font-size: 10px; color: var(--muted); line-height: 1.7; margin-top: 12px; }
.example-card { padding: 9px 0; border: 0; border-bottom: 1px solid #bcbcaf; background: transparent; margin-top: 25px; font-size: 12px; }
.example-card span { margin-left: 23px; }
.example-card:hover { color: var(--accent); border-color: var(--accent); }
.panel-footnote { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 34px; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.image-stage { flex: 1; min-height: 0; padding: 28px 28px 40px; background: var(--canvas); display: flex; align-items: center; justify-content: center; position: relative; }
.image-stage > img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 5px 25px #26291e14; }
.image-caption { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #6f7366; font-size: 10px; }
.version-strip { display: flex; flex-shrink: 0; gap: 14px; overflow-x: auto; border-top: 1px solid var(--line); padding: 12px 20px; }
.version { display: flex; align-items: center; gap: 9px; flex-shrink: 0; text-align: left; background: none; border: 1px solid transparent; border-radius: 3px; padding: 5px 9px 5px 5px; color: var(--muted); font-size: 11px; }
.version:hover { background: var(--canvas); }
.version.active { color: var(--ink); border-color: #adada0; background: #f3f2ed; }
.version img { width: 27px; height: 36px; object-fit: contain; }
.version small { display: block; font-size: 9px; color: var(--muted); margin-top: 4px; }
.conversation-panel { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.conversation-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px; }
.conversation-heading h2 { font-size: 15px; font-weight: 500; }
.conversation-heading p { font-size: 11px; color: var(--muted); margin-top: 7px; }
.rail-number { font-size: 10px; color: #96978c; padding-top: 4px; }
.conversation { position: relative; flex: 1; min-height: 0; padding: 16px 24px 24px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.welcome { padding-top: 20px; }
.welcome h3 { font-size: 19px; font-weight: 400; line-height: 1.65; letter-spacing: -.035em; margin-bottom: 15px; }
.welcome > p { font-size: 12px; line-height: 1.9; color: var(--muted); max-width: 310px; }
.welcome-list { margin-top: 35px; }
.welcome-list > div { display: grid; grid-template-columns: 50px 1fr; gap: 16px; padding: 15px 0; border-top: 1px solid #e9e9e0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.welcome-list strong { color: var(--ink); font-size: 12px; font-weight: 500; }
.message { margin-bottom: 23px; overflow-wrap: anywhere; }
.message:last-child { margin-bottom: 0; }
.message-label { font-size: 10px; color: var(--muted); margin-bottom: 9px; }
.message.user .message-body { background: #f1f1ea; padding: 14px 16px; border-radius: 3px; font-size: 12px; line-height: 1.9; white-space: pre-wrap; }
.message.assistant > .message-body { font-size: 12px; line-height: 1.9; }
.message-thumbnail { width: 50px; height: 56px; object-fit: cover; margin-top: 8px; margin-right: 5px; }
.confirm-card { border: 1px solid #d8d8cc; border-top: 2px solid var(--accent); border-radius: 0 0 3px 3px; background: var(--paper); }
.confirm-head { padding: 14px 15px 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.confirm-head h3 { font-size: 13px; font-weight: 500; }
.badge { font-size: 9px; white-space: nowrap; color: var(--muted); }
.confirm-base { padding: 0 15px 12px; font-size: 10px; color: var(--muted); border-bottom: 1px solid #e9e9e0; }
.change-row { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 15px; border-bottom: 1px solid #ecece4; font-size: 12px; line-height: 1.8; }
.change-label { font-size: 11px; color: var(--muted); }
.change-row s { color: var(--muted); font-size: 10px; display: block; }
.change-row strong { font-weight: 500; }
.keep-note { margin: 13px 15px; padding-left: 9px; border-left: 2px solid #c9cdbd; color: #676b60; font-size: 11px; line-height: 1.8; }
.spelling-note { padding: 10px 12px; margin: 12px 15px; background: #f6f2e8; color: #806843; font-size: 11px; line-height: 1.8; }
.confirm-actions { display: flex; flex-direction: column; gap: 5px; padding: 4px 15px 12px; }
.confirm-actions .small-button { align-self: center; }
.clarification { padding: 12px 15px 16px; }
.clarification label { display: block; margin-bottom: 8px; font-size: 12px; }
.clarification input { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 10px; font-size: 14px; }
.clarification p { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 8px; }
.clarification .button { margin-top: 12px; width: 100%; }
.composer-area { padding: 16px 20px 14px; margin-top: auto; border-top: 1px solid var(--line); }
.composer-area form { border: 1px solid #cfd0c3; background: #fff; border-radius: 4px; padding: 12px; }
.composer-area form:focus-within { outline: 2px solid #a5412b38; outline-offset: 2px; border-color: var(--accent); }
.composer-area textarea { width: 100%; min-height: 76px; max-height: 160px; resize: vertical; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.8; display: block; }
.composer-area textarea:focus { outline: none; }
.composer-area textarea::placeholder { color: #7b7d72; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.attach-button { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; min-height: 32px; padding: 4px 0; font-size: 11px; color: var(--muted); }
.attach-button span { font-size: 20px; font-weight: 300; }
.attach-button:hover { color: var(--accent); }
.send-button { display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 7px 13px; border: 0; border-radius: 3px; background: var(--ink); color: white; font-size: 12px; }
.send-button:hover:not(:disabled) { background: var(--accent); }
.composer-note { margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.attachments { display: flex; gap: 12px; overflow-x: auto; }
.attachment { position: relative; margin-bottom: 12px; padding: 3px 4px 0 0; flex-shrink: 0; }
.attachment img { width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 3px; object-fit: cover; }
.attachment button { position: absolute; top: 0; right: 0; width: 24px; height: 24px; line-height: 1; border-radius: 50%; border: 1px solid var(--line); background: white; }
.attachment p { max-width: 64px; font-size: 9px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 4px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.inline-actions .button { min-height: 36px; font-size: 11px; padding: 8px 11px; }
.progress-box { padding: 15px; border: 1px solid var(--line); border-radius: 3px; }
.progress-title { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.spinner { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.progress-steps { margin: 15px 0 10px; color: var(--muted); font-size: 11px; line-height: 2.4; }
.progress-steps .current { color: var(--accent); }
.progress-steps .finished { color: #4d5947; }
.progress-box > p { color: var(--muted); font-size: 10px; line-height: 1.8; margin-bottom: 8px; }
.notice-card { border: 1px solid var(--line); padding: 15px; background: #f8f7f0; }
.notice-card strong { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.notice-card p { color: var(--muted); font-size: 12px; }
.success-label { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.success-label span { font-size: 9px; color: var(--muted); margin-left: 8px; border: 1px solid var(--line); padding: 3px 5px; font-weight: 400; }
.selected-note { padding: 10px 12px; background: #f0f2e9; color: #636b54; font-size: 11px; }
.example-hint { color: var(--muted); font-size: 10px; margin-top: 10px; }
.mobile-result { display: none; }
.session-note { font-size: 10px; color: var(--muted); margin-top: 15px; line-height: 1.7; }
.session-note > span { margin-right: 10px; color: var(--accent); }
.works-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.work-card { background: none; border: 1px solid var(--line); border-radius: 3px; padding: 12px; text-align: left; min-width: 0; }
.work-card:hover { border-color: #9c9e8f; background: var(--paper); }
.work-card img { width: 100%; height: 260px; object-fit: contain; background: var(--canvas); }
.work-card h2 { font-size: 13px; font-weight: 500; margin: 13px 0 8px; overflow-wrap: anywhere; }
.work-card p { font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.empty-works { grid-column: 1/-1; text-align: center; padding: 100px 20px; }
.empty-works h2 { font-size: 24px; font-weight: 400; }
.empty-works p { font-size: 13px; color: var(--muted); margin: 15px 0 25px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; background: #282824; color: #fff; padding: 12px 18px; font-size: 13px; line-height: 1.7; border-radius: 4px; max-width: min(90vw, 550px); }
dialog { background: var(--canvas); border: 0; border-radius: 4px; padding: 38px 22px 22px; max-width: 94vw; max-height: 94dvh; overscroll-behavior: contain; }
dialog::backdrop { background: #20251bcc; }
dialog img { display: block; max-height: 80dvh; max-width: 86vw; object-fit: contain; margin: auto; }
.dialog-close { position: absolute; top: 3px; right: 5px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
  .app-header { padding: 0 24px; gap: 40px; }
  main { padding: 23px 24px 16px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .conversation-heading { padding: 22px 20px; }
  .conversation { padding: 12px 20px 20px; }
  .composer-area { padding: 14px 16px; }
  .paper-study { transform: scale(.9); margin-bottom: 15px; }
  .upload-zone h2 { font-size: 25px; }
  .file-help { max-width: 280px; }
}
@media (max-width: 780px) {
  .app-header { height: 64px; padding: 0 18px; gap: 22px; }
  .brand { font-size: 14px; gap: 9px; }
  .brand small { display: none; }
  .brand-mark { width: 24px; height: 24px; }
  .app-header nav { gap: 18px; margin-left: auto; }
  .nav-link { font-size: 12px; }
  .nav-link span { display: none; }
  .new-work { width: 32px; min-height: 32px; padding: 4px; margin: 0; }
  .new-work .new-label { display: none; }
  main { padding: 22px 16px 18px; }
  .workspace-heading { align-items: flex-end; margin-bottom: 18px; gap: 12px; }
  h1 { font-size: 19px; }
  .eyebrow { font-size: 9px; }
  .stepper { gap: 10px; padding-bottom: 4px; }
  .stepper li { font-size: 10px; }
  .stepper li > span { display: none; }
  .workspace-grid { display: flex; flex-direction: column; height: auto; max-height: none; }
  .visual-panel { display: block; }
  .upload-zone { min-height: 470px; padding: 30px 16px; }
  .paper-study { height: 211px; margin-bottom: 28px; transform: scale(.8); transform-origin: center center; }
  .study-caption { bottom: -34px; }
  .upload-zone > p { margin-bottom: 20px; }
  .file-help { max-width: none; }
  .example-card { margin-top: 15px; }
  .panel-toolbar { min-height: 48px; padding: 7px 14px; }
  .toolbar-actions { gap: 0; }
  .panel-footnote { padding: 9px 14px; }
  .image-stage { height: 430px; padding: 22px 18px 40px; }
  .version-strip { padding: 10px 14px; gap: 8px; }
  .conversation-panel { border-left: 0; border-top: 1px solid var(--line); min-height: 430px; }
  .conversation-heading { padding: 22px 20px 8px; }
  .conversation { overflow: visible; max-height: none; padding: 18px 20px 24px; }
  .welcome { padding-top: 6px; }
  .welcome h3 { font-size: 18px; margin-bottom: 10px; }
  .welcome-list { margin-top: 22px; }
  .welcome-list > div { padding: 12px 0; }
  .composer-area { padding: 16px; }
  .composer-area textarea { font-size: 16px; min-height: 90px; }
  .clarification input { font-size: 16px; }
  .attach-button, .send-button { min-height: 40px; }
  .message.user .message-body, .message.assistant > .message-body { font-size: 13px; }
  .change-row { font-size: 13px; }
  .mobile-result { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--canvas); border: 0; padding: 16px; margin: 12px 0 15px; }
  .mobile-result img { max-width: 100%; height: 270px; object-fit: contain; }
  .mobile-result span { font-size: 10px; color: var(--muted); }
  .works-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .work-card img { height: 220px; }
  .session-note { font-size: 10px; padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 380px) {
  .app-header { gap: 12px; padding: 0 12px; }
  .app-header nav { gap: 12px; }
  main { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 13px; }
  .workspace-heading { gap: 8px; }
  .stepper { gap: 7px; }
  .image-stage { height: 380px; }
  .small-button { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .spinner { animation: none; }
}
/* 真实任务所需的问答、逐字文案与错误状态。 */
.exact-copy { white-space: pre-wrap; margin-top: 6px; color: var(--accent); }
.question-choices { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.question-choices .small-button { border-color: var(--line); color: var(--ink); text-align: left; }
.error-message { padding: 12px; background: var(--soft); border-left: 2px solid var(--accent); }
.review-check { margin: 14px 0; padding: 14px; border: 1px solid var(--line); background: var(--canvas); }
.review-check > p:first-child { font-weight: 600; margin-bottom: 8px; }
.review-question + .review-question { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.review-question p { margin-bottom: 7px; }
.review-question .button { margin-top: 4px; white-space: normal; text-align: left; }
.setup-page { max-width: 560px; padding-top: 72px; }
.setup-page > * { margin-bottom: 20px; }
.setup-page form { display: grid; gap: 14px; }
.setup-page input { width: 100%; border: 1px solid var(--line); background: white; padding: 12px; border-radius: 4px; }
.setup-page a { font-size: 13px; }

.support-entry{display:flex;gap:12px;align-items:center;margin-top:18px}#support-dialog{max-width:560px;width:calc(100% - 32px);padding:28px;border:1px solid #deded5;border-radius:12px}#support-dialog h2{margin:0}.support-header{display:flex;align-items:center;justify-content:space-between;gap:20px}#support-form{display:grid;gap:14px;margin-top:20px}#support-form textarea{width:100%;padding:12px;font:inherit;border:1px solid #d0d7cc;border-radius:6px}.support-ticket{border-bottom:1px solid #dde3dc;padding:14px 0;white-space:pre-wrap;overflow-wrap:anywhere}.support-answer{background:#eef3ed;padding:14px;border-radius:6px}

.study-placeholder{position:relative;display:block;padding:2rem;color:#657168;font-family:serif;font-size:2.6rem;line-height:1.8;letter-spacing:.15em}
