/* 三项真实训练任务。保留朋友的淡水墨与控件动效，集中覆盖布局和阅读层级。 */
:root {
  --quest-ink: #293e3b;
  --quest-text: #50655f;
  --quest-muted: #6b7f74;
  --quest-accent: #357464;
  --quest-line: #dce6da;
  --quest-paper: #fffefa;
  --quest-soft: #eff5ec;
}
html, body { height: 100%; overflow: hidden; }
body { color: var(--quest-ink); background: #f8faf6; }
.app-shell {
  position: relative;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100dvh;
  max-width: none;
  min-height: 0;
  background-image: linear-gradient(#fbfcfaf0, #fbfcfac9), url('/assets/ink-landscape-white-v1.png');
  background-size: cover;
  background-position: center;
}
.main-panel { min-width: 0; min-height: 0; overflow: hidden; }
.sidebar { padding: 28px 17px 19px; background: #f4f7efdf; border-color: #dce5d6; }
.brand { font-size: 15px; gap: 10px; }
.brand small { font-size: 11px; letter-spacing: .8px; color: #768776; }
.brand-mark { height: 37px; width: 37px; border-radius: 12px; }
.new-session { min-height: 44px; font-size: 13px; margin-top: 28px; }
.sidebar-label { font-size: 12px; margin: 27px 9px 12px; }
.history-item strong { font-size: 13px; color: #496051; }
.history-item small, .sidebar-bottom, .sidebar-bottom small { font-size: 11px; color: var(--quest-muted); }
.sidebar-bottom { line-height: 1.85; }
.topbar { height: 84px; min-height: 84px; padding: 0 30px; gap: 12px; background: #fcfdf9a6; border-color: #e2e9db; }
.page-title strong { font-size: 16px; color: var(--quest-ink); }
.page-title small { font-size: 12px; color: var(--quest-muted); }
.topbar-actions { gap: 7px; flex-shrink: 0; }
.topbar .mode-badge { display: inline-flex; align-items: center; font-size: 12px; padding: 6px 9px; color: #66725b; background: #f4f3e9; border-color: #dfdfc8; margin-right: 4px; }
.topbar .mode-badge.model { color: #3f7860; background: #edf5e8; border-color: #d7e6cc; }
html.white-controls .topbar .icon-button { width: 38px; height: 40px; }
.focus-view-button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.focus-view-button svg { width: 17px; height: 17px; }
html.white-controls .focus-view-button[aria-pressed="true"] { background: #e4f0df; color: #37674c; }
.settings-toggle, .close-settings { display: grid; }
.settings-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 355px;
  z-index: 45;
  min-height: 0;
  padding: 27px 23px 24px;
  background: #f9fcf6f7;
  transform: translateX(100%);
  transition: transform 220ms ease;
  box-shadow: -10px 0 35px #354f391a;
  overflow: auto;
}
.settings-panel.open { transform: translateX(0); }
.settings-heading h2 { font-size: 25px; }
.settings-heading .eyebrow { font-size: 12px; letter-spacing: .8px; color: var(--quest-muted); }
.settings-section { padding: 18px 15px; border-radius: 15px; }
.settings-section h3 { font-size: 15px; }
.settings-section label { font-size: 12px; color: var(--quest-muted); }
.settings-section select, .settings-section textarea { font-size: 14px; }
.settings-section select { min-height: 44px; }
.settings-section .field-note, .field-note, .settings-note { font-size: 12px; color: var(--quest-muted); line-height: 1.85; }
.settings-section button { min-height: 44px; font-size: 13px; }
.drawer-overlay { z-index: 35; background: #334c3d45; }
.quest-nav.stage-nav {
  width: min(880px, calc(100% - 64px));
  max-width: 880px;
  height: 78px;
  margin: 18px 32px 0;
  padding: 6px 8px;
  border-radius: 18px;
  gap: 9px;
  background: #fcfef8ce;
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #dde7d6, 0 4px 15px #385a3b07;
}
.quest-nav.stage-nav button {
  flex: 1;
  min-width: 0;
  min-height: 62px;
  padding: 9px 17px;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: 24px 19px;
  gap: 1px 10px;
  text-align: left;
  border-radius: 13px;
}
.quest-nav button > span { grid-row: 1 / 3; align-self: center; width: 29px; height: 29px; font-size: 12px; background: #f0f5e9; color: #83937d; }
.quest-nav button strong { font-size: 15px; font-weight: 550; line-height: 1.6; color: #4f6856; }
.quest-nav .quest-step-status { font-size: 12px; line-height: 1.5; color: #7b8b74; }
.quest-nav.stage-nav button.current, .quest-nav.stage-nav button.is-current { background: #eaf4e2; border-color: #caddc0; color: #345f44; }
.quest-nav button.current > span, .quest-nav button.is-current > span { background: #4b7b5b; border-color: #4b7b5b; color: white; }
.quest-nav.stage-nav button.current strong, .quest-nav.stage-nav button.is-current strong { color: #305f40; }
.quest-nav button.done > span, .quest-nav button.is-done > span, .quest-nav button.completed > span { color: #4e7855; background: #e4efda; border-color: #c5d9b9; }
.quest-nav.stage-nav button:disabled { opacity: .6; }
.quest-nav.stage-nav button:disabled strong { color: #788b74; }
.quest-nav.stage-nav i { width: 14px; flex-shrink: 0; height: 1px; background: #cddbc5; }
.quest-nav .motion-stage-indicator { border-radius: 13px; background: #eaf4e2; border-color: #d2e1c7; }
.chat-scroll { padding: 23px 32px 32px; scrollbar-color: #c5d5be transparent; }
.conversation { max-width: 880px; margin: 0 auto; }
.quest-welcome { max-width: 850px; margin: 19px auto 25px; text-align: center; }
.quest-welcome .welcome-symbol { display: none; }
.quest-welcome .eyebrow { font-size: 12px; color: #788972; letter-spacing: 1.3px; }
.quest-welcome h1 { font-family: "Songti SC", "SimSun", serif; font-size: clamp(39px, 3.8vw, 53px); line-height: 1.25; letter-spacing: 2px; font-weight: 550; margin: 16px 0 16px; color: #294737; }
.quest-welcome h1 span { display: inline; }
.quest-welcome h1 span:last-child { color: #4f7952; }
.quest-welcome .welcome-description { font-size: 16px; line-height: 1.9; color: #6a7e65; }
.quest-welcome-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: 27px auto 24px; max-width: 690px; text-align: left; }
.quest-welcome-tasks article { position: relative; padding: 18px 18px 16px; border: 1px solid #dbe7d2; border-radius: 14px; background: linear-gradient(145deg, #ffffffdf, #f2f8eddf); box-shadow: inset 0 1px 0 #fff, 0 4px 16px #355b3d04; }
.quest-card-number { display: grid; place-items: center; height: 27px; width: 27px; border-radius: 9px; color: #648b61; background: #e8f1de; font-size: 12px; }
.quest-welcome-tasks article:nth-child(2) .quest-card-number { color: #5d8991; background: #e8f1ef; }
.quest-welcome-tasks article:nth-child(3) .quest-card-number { color: #a28359; background: #f3eedf; }
.quest-welcome-tasks h2 { margin: 11px 0 7px; font-size: 17px; color: #436b49; font-weight: 550; }
.quest-welcome-tasks p { margin: 0; font-size: 13px; color: #7c8d72; line-height: 1.8; }
html.white-controls .quest-primary, html.white-controls #questMainAction {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 46px;
  padding: 11px 19px;
  border-radius: 10px;
  border: 1px solid #3f7557;
  background: linear-gradient(135deg, #4d8362, #376b53);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff20, 0 5px 14px #376b5320;
  font-size: 14px;
}
html.white-controls .quest-primary:not(:disabled):hover, html.white-controls #questMainAction:not(:disabled):hover { color: white; background: #35694d; border-color: #35694d; }
html.white-controls .start-button.quest-primary { min-height: 50px; padding-left: 23px; padding-right: 16px; border-radius: 12px; }
.start-button.quest-primary > span:not(.orb-visual):not(.orb-label) { color: #fff; background: #ffffff19; box-shadow: none; }
.quest-welcome .welcome-note { font-size: 12px; line-height: 1.8; color: var(--quest-muted); margin-top: 15px; }
.quest-board { position: relative; background: linear-gradient(130deg, #fcfff7, #f1f7eb); border: 1px solid #d6e5cc; border-radius: 17px; padding: 22px 26px 18px; box-shadow: 0 6px 24px #4a743c08; }
.quest-board-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.quest-eyebrow { font-size: 12px; color: #7d956f; line-height: 1.7; margin: 0 0 6px; }
.quest-board h2 { font-size: 27px; font-weight: 600; letter-spacing: .5px; line-height: 1.4; color: #315d3d; margin: 0; }
.quest-progress-text { flex-shrink: 0; color: #6c895d; font-size: 12px; padding: 6px 10px; background: #e8f1dd; border-radius: 8px; }
.quest-description { color: #6a805f; font-size: 16px; line-height: 1.8; margin: 12px 0 17px; }
.quest-progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #e0ead7; }
#questProgressBar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #91b378, #5d9762); transition: width 240ms ease; }
.quest-board-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 17px; }
.quest-checklist { flex: 1; list-style: none; padding: 0; margin: 0; }
.quest-checklist li { position: relative; padding-left: 17px; font-size: 14px; line-height: 1.8; color: #718963; margin-top: 3px; }
.quest-checklist li::before { content: "·"; position: absolute; left: 3px; color: #84a171; font-weight: 600; }
.quest-mode-note { font-size: 12px; line-height: 1.75; color: #7c8e70; border-top: 1px solid #dfE8d6; padding-top: 11px; margin: 15px 0 0; }
.task-focus-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 1px; }
html.white-controls #taskFocusToggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; color: #657f58; font-size: 12px; border-radius: 8px; background: #f8fcf4; border-color: #e1e9d9; box-shadow: none; }
#taskFocusToggle svg { width: 17px; height: 17px; }
.task-toggle-arrow { color: #8b9e7f; padding-left: 4px; }
#taskFocusToggle[aria-expanded="false"] .task-toggle-arrow { transform: rotate(-90deg); }
.task-focus-toolbar > span { font-size: 12px; color: #8b9b80; }
.task-details { margin-top: 4px; }
.practice-mode { font-size: 12px; color: var(--quest-muted); gap: 10px; margin-bottom: 18px; }
.practice-mode small { font-size: 12px; color: var(--quest-muted); }
.practice-mode button { min-height: 38px; font-size: 12px; }
.question-card { border-radius: 13px; border-color: #dce6d4; background: #fffefbf7; }
.question-card-heading { padding: 18px 23px; border-bottom: 1px solid #e8eddf; gap: 12px; }
.question-label { font-size: 12px; color: #718968; border-radius: 5px; }
.question-card-heading strong { font-size: 14px; font-weight: 500; color: #506c50; }
.question-content { padding: 20px 23px 19px; }
.question-content > p, .question-content p.question-task-prompt { font-size: 17px; line-height: 1.95; color: #475c4a; }
.question-content p.question-paper-heading { font-size: 15px; color: #4c6a4e; line-height: 1.8; margin-bottom: 18px; }
.question-requirements strong, .question-requirements p { font-size: 13px; color: #728569; line-height: 1.85; }
.question-content p.source-note { font-size: 12px; color: #7a8c70; line-height: 1.8; }
.question-hints summary { font-size: 14px; min-height: 40px; padding-top: 3px; padding-bottom: 3px; }
.question-hints-content p { font-size: 15px; line-height: 1.9; color: #657d5e; }
.question-hints-content p:first-child, #questionReference { font-size: 12px; color: #7a8c71; }
.question-tags span { font-size: 12px; }
.oral-task { border-radius: 13px; padding: 22px 23px; margin-top: 19px; border-color: #dce6d4; background: #fcfef8f2; }
.oral-task-heading h2 { font-size: 21px; color: #557849; }
.oral-task-heading > span { font-size: 12px; }
.oral-task-intro { font-size: 15px; line-height: 1.9; color: #73876b; }
.reading-timer { padding: 11px 14px; border-radius: 9px; }
.timer-label { font-size: 12px; }
.reading-timer strong { font-size: 24px; }
.timer-actions button { min-height: 40px; font-size: 13px; }
.timer-status, .oral-task-note { font-size: 12px; line-height: 1.8; color: #7d9072; }
.oral-task-list { font-size: 16px; line-height: 1.85; color: #607954; gap: 12px 24px; }
.oral-task-scaffold { font-size: 13px; line-height: 1.85; color: #75896b; padding: 13px; border-radius: 8px; }
.training-tip { font-size: 14px; line-height: 1.85; border-radius: 9px; padding: 11px 14px; margin-top: 18px; margin-bottom: 18px; }
.training-tip button { font-size: 13px; min-height: 40px; }
.coach-next-action { display: flex; align-items: center; gap: 13px; border: 1px solid #d7e3d6; border-left: 3px solid #84a485; border-radius: 11px; background: #f7fcf4ed; padding: 18px 20px; margin: 20px 0 24px; }
.coach-action-mark { font-size: 28px; color: #8da982; align-self: flex-start; line-height: 1.2; }
.coach-action-content { flex: 1; min-width: 0; }
.section-eyebrow { font-size: 12px; letter-spacing: .6px; color: #799571; margin: 0 0 6px; }
.coach-next-action h2 { font-size: 19px; line-height: 1.6; color: #4e764e; font-weight: 550; margin: 0 0 6px; }
.coach-next-action p:not(.section-eyebrow) { font-size: 16px; line-height: 1.85; color: #698361; margin: 0; white-space: pre-wrap; }
html.white-controls #useCoachAction { font-size: 12px; min-height: 42px; padding: 8px 12px; color: #4a7953; background: #edf6e6; border-color: #d5e4c9; border-radius: 8px; white-space: nowrap; }
.messages { gap: 26px; }
.message .bubble { font-size: 16px; line-height: 1.9; padding: 17px 20px; border-radius: 13px; }
.message.user .bubble { font-size: 16px; background: #e9f1e1; color: #486441; }
.message-meta { font-size: 12px; color: #829576; margin-top: 4px; }
.checks-label, .check-item { font-size: 12px; line-height: 1.85; }
.pending .bubble span { font-size: 13px; }
.feedback-section + .feedback-section, .reply-section + .reply-section { border-top: 1px solid #e1e9d8; margin-top: 17px; padding-top: 17px; }
.feedback-section h3, .reply-section h3 { font-size: 15px; color: #4d774d; margin: 0 0 9px; }
.feedback-section p, .reply-section p { font-size: 16px; line-height: 1.9; white-space: pre-wrap; margin: 8px 0; }
.revision-review { border: 1px solid #dce6d4; border-radius: 13px; padding: 23px; margin-top: 27px; background: #fffefbf2; }
.review-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.review-heading h2 { font-size: 24px; color: #4f754c; margin: 0; line-height: 1.5; font-weight: 550; }
.review-heading > span { font-size: 12px; color: #88a078; }
#revisionSummary { font-size: 15px; line-height: 1.9; color: #6e8565; margin: 14px 0 17px; }
.revision-changes { font-size: 14px; line-height: 1.9; color: #6c8661; }
.revision-changes:empty { display: none; }
.revision-changes ul { padding-left: 20px; }
.draft-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 16px; }
.draft-comparison article { min-width: 0; border: 1px solid #e0e8d9; border-radius: 9px; background: #fbfcf7; overflow: hidden; }
.draft-comparison article:last-child { border-color: #d0e2c5; background: #f6fbf0; }
.draft-comparison h3 { padding: 11px 15px; border-bottom: 1px solid #e3eadb; font-size: 13px; color: #7c936c; margin: 0; font-weight: 500; }
.draft-comparison pre { max-height: 320px; overflow: auto; font-family: inherit; font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 15px; color: #617d55; }
.revision-goal { margin-top: 21px; }
.revision-goal label { display: block; font-size: 14px; color: #67835b; margin-bottom: 10px; }
html.white-controls .revision-goal textarea { width: 100%; font-size: 16px; line-height: 1.8; border-radius: 9px; padding: 12px; background: #fffefb; border-color: #dce5d3; }
.revision-goal > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
#revisionGoalNote { color: #819675; font-size: 12px; line-height: 1.8; margin: 0; }
html.white-controls #revisionGoalSave { min-height: 42px; padding: 8px 14px; color: #5b8053; background: #eef6e7; border-color: #d6e6ca; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.round-summary { display: flex; align-items: center; gap: 15px; margin-top: 23px; border-radius: 13px; padding: 22px; background: #edf6e5; border: 1px solid #d4e6c6; }
.round-summary > span { display: grid; place-items: center; flex-shrink: 0; font-size: 24px; height: 42px; width: 42px; border-radius: 50%; background: #dceccc; color: #73905d; }
.round-summary > div { flex: 1; }
.round-summary h2 { font-size: 20px; color: #567c48; margin: 0 0 8px; }
.round-summary p { font-size: 14px; color: #789367; line-height: 1.9; margin: 0; }
html.white-controls #roundNextRound { font-size: 13px; color: #527c46; border-color: #cddfbd; background: #f8fcf2; min-height: 44px; padding: 10px 14px; border-radius: 8px; white-space: nowrap; }
.composer-area { background: transparent; padding: 0 32px 13px; }
.composer { max-width: 880px; padding: 16px 19px 12px; border-radius: 18px; background: #fffefbf5; }
.white-controls .composer textarea { font-size: 16px; line-height: 1.75; min-height: 44px; }
.composer textarea::placeholder { color: #94a18a; }
.composer-bottom { gap: 12px; margin-top: 10px; }
.input-tools { gap: 12px; }
.voice-button, .outline-template-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; min-height: 40px; padding: 7px 11px; white-space: nowrap; }
.outline-template-button svg { width: 16px; height: 16px; }
.input-hint { color: #839676; font-size: 12px; }
.composer .send-button { height: 42px; width: 42px; }
.composer-disclaimer { max-width: 880px; font-size: 12px; color: #809271; line-height: 1.8; margin-top: 9px; }
.inline-notice { max-width: 880px; font-size: 13px; line-height: 1.8; }
.toast { font-size: 13px; }
.focus-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
.focus-mode .sidebar { position: fixed; z-index: 45; inset: 0 auto 0 0; width: 250px; transform: translateX(-100%); }
.focus-mode .sidebar.open { transform: translateX(0); }
.focus-mode .mobile-menu { display: grid; }
.focus-mode .conversation, .focus-mode .composer, .focus-mode .composer-disclaimer { max-width: 960px; }
.focus-mode .quest-nav.stage-nav { max-width: 960px; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { width: 32px; height: 35px; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .topbar-actions { gap: 4px; }
  .focus-view-button { padding-left: 7px; padding-right: 7px; }
  .focus-view-button span { display: none; }
  .quest-nav.stage-nav { width: calc(100% - 44px); margin-left: 22px; margin-right: 22px; }
  .quest-nav.stage-nav button { padding-left: 11px; padding-right: 11px; gap: 1px 7px; }
  .chat-scroll { padding-left: 22px; padding-right: 22px; }
  .composer-area { padding-left: 22px; padding-right: 22px; }
  .input-hint { display: none; }
  .quest-welcome-tasks { gap: 12px; }
}
@media (max-width: 800px) {
  .app-shell { display: flex; }
  .main-panel { width: 100%; height: 100dvh; }
  .sidebar { position: fixed; z-index: 45; inset: 0 auto 0 0; width: 255px; transform: translateX(-100%); transition: transform 220ms; background: #f5f9f0f7; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; flex-shrink: 0; }
  .quest-welcome { margin-top: 25px; }
  .quest-welcome h1 { font-size: 44px; }
}
@media (max-width: 600px) {
  .topbar { height: 98px; min-height: 98px; position: relative; padding: 10px 12px 31px; gap: 8px; }
  .topbar-actions { gap: 3px; }
  .page-title strong { font-size: 14px; }
  .page-title small { font-size: 11px; margin-top: 4px; }
  .topbar .mode-badge { position: absolute; display: inline-flex; left: 52px; bottom: 8px; font-size: 11px; padding: 2px 7px; margin: 0; }
  html.white-controls .topbar .icon-button { width: 31px; height: 38px; }
  .topbar .icon-button svg { width: 18px; height: 18px; }
  .focus-view-button { width: 30px; min-height: 38px; padding: 5px; }
  .focus-view-button svg { width: 16px; height: 16px; }
  .quest-nav.stage-nav { height: 76px; width: calc(100% - 26px); margin: 12px 13px 0; padding: 5px; gap: 3px; border-radius: 14px; }
  .quest-nav.stage-nav button { grid-template-columns: 21px 1fr; grid-template-rows: 22px 18px; gap: 0 6px; padding: 8px 7px; min-height: 62px; border-radius: 10px; }
  .quest-nav button > span { width: 21px; height: 21px; font-size: 10px; }
  .quest-nav button strong { font-size: 13px; }
  .quest-nav .quest-step-status { font-size: 10px; }
  .quest-nav.stage-nav i { width: 5px; }
  .quest-nav .motion-stage-indicator { border-radius: 10px; }
  .chat-scroll { padding: 20px 13px 27px; }
  .quest-welcome { margin-top: 19px; }
  .quest-welcome .eyebrow { font-size: 12px; letter-spacing: .3px; }
  .quest-welcome h1 { font-size: 42px; margin: 17px 0; line-height: 1.28; letter-spacing: 1px; }
  .quest-welcome h1 span { display: block; }
  .quest-welcome .welcome-description { font-size: 15px; line-height: 1.95; }
  .quest-welcome-tasks { gap: 8px; margin: 23px 0; }
  .quest-welcome-tasks article { padding: 14px 10px 13px; border-radius: 11px; }
  .quest-card-number { height: 24px; width: 24px; font-size: 11px; border-radius: 8px; }
  .quest-welcome-tasks h2 { font-size: 15px; margin-top: 10px; }
  .quest-welcome-tasks p { font-size: 12px; line-height: 1.85; }
  .quest-welcome-tasks p br { display: none; }
  .quest-welcome .welcome-note { font-size: 12px; line-height: 1.9; padding: 0 8px; }
  .quest-board { padding: 19px 17px 16px; border-radius: 13px; }
  .quest-board-heading { align-items: flex-start; gap: 11px; }
  .quest-eyebrow { font-size: 11px; margin-bottom: 6px; }
  .quest-board h2 { font-size: 25px; }
  .quest-progress-text { font-size: 11px; padding: 5px 7px; margin-top: 2px; }
  .quest-description { font-size: 16px; line-height: 1.85; margin: 12px 0 15px; }
  .quest-board-bottom { align-items: flex-start; flex-direction: column; gap: 14px; margin-top: 15px; }
  .quest-checklist li { font-size: 14px; }
  html.white-controls #questMainAction { width: 100%; min-height: 44px; font-size: 14px; }
  .quest-mode-note { font-size: 12px; }
  .task-focus-toolbar { padding-top: 13px; padding-bottom: 13px; }
  .task-focus-toolbar > span { display: none; }
  html.white-controls #taskFocusToggle { font-size: 12px; }
  .practice-mode { gap: 9px; font-size: 12px; }
  .practice-mode small { flex-basis: 100%; font-size: 12px; line-height: 1.8; }
  .practice-mode button { font-size: 12px; }
  .question-card-heading { padding: 17px; gap: 10px; }
  .question-label { font-size: 12px; }
  .question-card-heading strong { font-size: 13px; }
  .question-content { padding: 18px 17px; }
  .question-content > p, .question-content p.question-task-prompt { font-size: 16px; line-height: 1.95; }
  .question-content p.question-paper-heading { font-size: 14px; }
  .question-content p.source-note, .question-requirements p, .question-requirements strong { font-size: 12px; }
  .question-hints-content p { font-size: 15px; }
  .question-hints-content p:first-child, #questionReference { font-size: 12px; }
  .oral-task { padding: 19px 17px; }
  .oral-task-heading h2 { font-size: 21px; }
  .oral-task-heading > span, .timer-label { font-size: 12px; }
  .oral-task-intro { font-size: 15px; }
  .oral-task-list { grid-template-columns: 1fr; font-size: 16px; gap: 12px; }
  .oral-task-scaffold { font-size: 13px; }
  .reading-timer { padding: 10px 11px; }
  .reading-timer > div { gap: 8px; }
  .reading-timer strong { font-size: 22px; }
  .timer-actions button { min-height: 40px; padding: 6px 9px; font-size: 12px; }
  .training-tip { font-size: 14px; padding: 11px 12px; gap: 8px; }
  .training-tip button { font-size: 12px; padding: 6px 9px; }
  .coach-next-action { flex-wrap: wrap; align-items: flex-start; padding: 17px 15px; gap: 10px; }
  .coach-action-mark { font-size: 23px; }
  .coach-action-content { flex-basis: calc(100% - 33px); }
  .section-eyebrow { font-size: 12px; }
  .coach-next-action h2 { font-size: 18px; }
  .coach-next-action p:not(.section-eyebrow) { font-size: 16px; }
  html.white-controls #useCoachAction { margin-left: 33px; font-size: 12px; min-height: 40px; }
  .message { gap: 8px; }
  .message .bubble, .message.user .bubble { font-size: 16px; line-height: 1.9; padding: 15px; }
  .message-meta, .checks-label, .check-item { font-size: 12px; }
  .revision-review { padding: 19px 16px; }
  .review-heading { align-items: flex-start; gap: 10px; }
  .review-heading h2 { font-size: 22px; }
  .review-heading > span { font-size: 11px; }
  #revisionSummary { font-size: 15px; }
  .draft-comparison { grid-template-columns: 1fr; gap: 13px; }
  .draft-comparison pre { font-size: 16px; }
  .revision-goal > div { align-items: flex-start; flex-direction: column; gap: 10px; }
  #revisionGoalNote { font-size: 12px; }
  .round-summary { flex-wrap: wrap; padding: 19px 16px; gap: 12px; }
  .round-summary > span { height: 34px; width: 34px; font-size: 20px; }
  .round-summary > div { flex-basis: calc(100% - 46px); }
  .round-summary h2 { font-size: 19px; }
  .round-summary p { font-size: 14px; }
  html.white-controls #roundNextRound { margin-left: 46px; font-size: 13px; }
  .composer-area { padding: 0 12px 11px; }
  .composer { padding: 14px 15px 11px; border-radius: 16px; }
  .white-controls .composer textarea { font-size: 16px; }
  .input-tools { gap: 8px; }
  .voice-button, .outline-template-button { gap: 5px; padding: 6px 9px; font-size: 12px; min-height: 40px; }
  .voice-button svg, .outline-template-button svg { height: 15px; width: 15px; }
  .composer .send-button { height: 40px; width: 40px; }
  .composer-disclaimer { font-size: 12px; line-height: 1.75; padding: 0 3px; }
  .settings-panel { width: min(350px, 94vw); padding-left: 22px; padding-right: 22px; }
  .toast { font-size: 12px; bottom: 185px; }
}
@media (max-width: 370px) {
  .topbar { padding-left: 9px; padding-right: 9px; gap: 6px; }
  html.white-controls .topbar .icon-button { width: 29px; }
  .topbar-actions { gap: 2px; }
  .page-title strong { font-size: 13px; }
  .page-title small { font-size: 10px; }
  .quest-nav.stage-nav button { gap: 0 4px; padding-left: 5px; padding-right: 5px; }
  .quest-nav button strong { font-size: 12px; }
  .quest-welcome h1 { font-size: 39px; }
  .quest-welcome-tasks article { padding-left: 8px; padding-right: 8px; }
  .quest-progress-text { max-width: 85px; white-space: normal; line-height: 1.7; }
}
@media (prefers-reduced-motion: reduce) {
  .settings-panel, .sidebar, #questProgressBar { transition: none !important; }
}

/* 聊天编辑区以外框表达焦点，避免正文输入出现第二层矩形描边。 */
html.white-controls .composer textarea,
html.white-controls .composer textarea:focus,
html.white-controls .composer textarea:focus-visible {
  outline: none !important;
  outline-offset: 0;
  border: 0 !important;
  box-shadow: none !important;
}

/* 手机首屏先给开始入口，再展示三项任务说明。 */
@media (max-width: 600px) {
  .quest-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px auto 16px;
  }
  .quest-welcome .eyebrow { order: 0; line-height: 1.7; }
  .quest-welcome h1 { order: 1; font-size: 38px; line-height: 1.22; margin: 12px 0; }
  .quest-welcome .welcome-description { order: 2; font-size: 15px; line-height: 1.8; }
  .quest-welcome .start-button { order: 3; margin-top: 17px; }
  .quest-welcome .quest-welcome-tasks { order: 4; width: 100%; margin: 20px 0 12px; }
  .quest-welcome .welcome-note { order: 5; margin-top: 6px; }
}
