:root {
  color-scheme: light;
  /* 活力明快：青绿主色、紫色闯关、珊瑚错题、向日葵黄星星 */
  --ink: #1f2c3a;
  --ink-soft: #46566a;
  --muted: #66768a;
  --line: #dcebea;
  --paper: #ffffff;
  --canvas: #f1faf8;
  --teal: #0c8f7e;
  --teal-bright: #2cc9b4;
  --teal-press: #076e61;
  --teal-soft: #e2f7f3;
  --violet: #2f84e0;
  --violet-press: #1d62b5;
  --violet-soft: #e3f1ff;
  --coral: #db4a2b;
  --coral-press: #a83218;
  --coral-soft: #ffe6df;
  --sun: #ffc83d;
  --sun-press: #d99a00;
  --sun-soft: #fff3cf;
  --mint: #1fb985;
  --mint-soft: #dcf7ec;
  /* 旧变量名保留，指向新配色（教师端跟着换色） */
  --green: #0c8f7e;
  --green-dark: #076e61;
  --green-soft: #e2f7f3;
  --gold: #8a5a00;
  --gold-soft: #fff3cf;
  --radius: 14px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0; margin: 0 0 7px; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.brand-lockup { align-items: center; color: var(--ink); display: inline-flex; font-size: 16px; font-weight: 750; gap: 10px; text-decoration: none; }
.brand-mark { align-items: center; background: var(--green); border-radius: 5px; color: #fff; display: inline-flex; font-size: 16px; height: 32px; justify-content: center; width: 32px; }

.auth-screen { background: #f2f5f9; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 520px); min-height: 100vh; }
.auth-intro { background: #26375e; display: flex; flex-direction: column; min-height: 100vh; padding: 42px clamp(32px, 7vw, 100px) 28px; position: relative; }
.auth-copy { margin: auto 0 0; max-width: 570px; padding-bottom: 24px; }
.auth-copy .eyebrow { color: var(--green-dark); }
.auth-copy h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.22; margin: 0 0 16px; }
.auth-copy > p:last-child { color: #4f5a6b; font-size: 16px; margin: 0; max-width: 420px; }
.auth-diagram { align-self: center; display: block; margin: 10px auto 26px; max-height: 330px; max-width: 76%; object-fit: contain; mix-blend-mode: multiply; }
.local-note { color: #66707f; font-size: 12px; margin: 0; }
.auth-panel-wrap { align-items: center; display: flex; justify-content: center; padding: 38px; }
.auth-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); max-width: 440px; padding: 30px; width: 100%; }
.auth-heading h2 { font-size: 24px; margin: 0 0 20px; }
.segmented { background: #eef1f6; border-radius: 6px; display: flex; padding: 3px; }
.segment { background: transparent; border: 0; border-radius: 4px; color: var(--muted); cursor: pointer; flex: 1; min-height: 36px; padding: 7px 4px; }
.segment.active { background: var(--paper); box-shadow: 0 1px 3px #1e2a441a; color: var(--ink); font-weight: 700; }
.auth-tabs { margin-bottom: 22px; }
.auth-form { display: grid; gap: 15px; }
.auth-form label, .select-label, .practice-toolbar label { color: #3f4a5c; display: grid; font-size: 12px; font-weight: 650; gap: 6px; }
.auth-form input, .auth-form select, .select-label select, .practice-toolbar select { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 42px; outline: none; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #26375e24; outline: none; }
.field-group { display: grid; gap: 6px; }
.field-group > label { color: #3f4a5c; font-size: 12px; font-weight: 650; }
.phone-entry { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; }
.phone-entry input { min-width: 0; }
.phone-entry .button { min-width: 96px; white-space: nowrap; }
.sms-status { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; min-height: 17px; }
.sms-status.success { color: var(--green-dark); }
.sms-status.error { color: var(--coral); }
.form-row { display: grid; gap: 12px; grid-template-columns: .75fr 1fr; }
.form-hint, .auth-footnote { color: var(--muted); font-size: 12px; margin: 0; }
.auth-footnote { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.form-message { color: var(--coral); font-size: 12px; min-height: 18px; margin: 10px 0 0; }
.form-message.success { color: var(--green-dark); }

.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 100vh; padding: 24px 13px 16px; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { margin: 0 10px 36px; }
.nav-caption { color: #87909e; font-size: 10px; font-weight: 750; margin: 0 12px 9px; }
.main-nav { display: grid; gap: 4px; }
/* 桌面端“更多”分组不改变布局；手机端变成底栏上方的弹出列表 */
.nav-more-group { display: contents; }
.nav-more-toggle { display: none !important; }
.daily-goal-select { align-items: center; color: var(--muted); display: inline-flex; font-size: 11px; font-weight: 400; gap: 4px; margin-left: 10px; vertical-align: middle; }
.daily-goal-select select { background: #fff; border: 1px solid #c9d1dd; border-radius: 4px; font-size: 11px; padding: 1px 4px; }
.nav-item { align-items: center; background: transparent; border: 0; border-radius: 5px; color: #4f5a6b; cursor: pointer; display: flex; gap: 12px; min-height: 42px; padding: 9px 11px; text-align: left; width: 100%; }
.nav-item:hover { background: #eef2f8; color: var(--ink); }
.nav-item.active { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.nav-symbol { color: #66707f; font-size: 18px; line-height: 1; text-align: center; width: 18px; }
.nav-item.active .nav-symbol { color: var(--green); }
.nav-badge { background: var(--coral-soft); border-radius: 10px; color: #b02a24; font-size: 10px; font-weight: 700; margin-left: auto; min-width: 20px; padding: 2px 6px; text-align: center; }
.sidebar-bottom { border-top: 1px solid var(--line); display: grid; gap: 10px; margin-top: auto; padding-top: 14px; }
.sync-state { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 8px; padding: 0 12px; }
.status-dot { background: #26375e; border-radius: 50%; height: 7px; width: 7px; }
.signout { min-height: 38px; }
.main-column { min-width: 0; }
.topbar { align-items: center; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; height: 64px; justify-content: space-between; padding: 0 34px; }
.breadcrumb { align-items: center; color: var(--muted); display: flex; font-size: 12px; gap: 10px; }
.breadcrumb strong { color: var(--ink); font-weight: 650; }
.crumb-separator { color: #a9b2c0; }
.topbar-user { align-items: center; color: #4f5a6b; display: flex; font-size: 12px; gap: 10px; }
.grade-pill { background: #f2f5f9; border: 1px solid #dde3ec; border-radius: 4px; color: #4f5a6b; margin-right: 8px; padding: 5px 8px; }
.avatar { align-items: center; background: #fbeceb; border-radius: 50%; color: #b02a24; display: inline-flex; font-size: 12px; font-weight: 750; height: 28px; justify-content: center; width: 28px; }
.user-nameplate { display: grid; line-height: 1.35; }
.user-nameplate small { color: var(--muted); font-size: 10px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-content { margin: 0 auto; max-width: 1260px; padding: 32px 36px 64px; }
.view { animation: appear .15s ease-out; }
@keyframes appear { from { opacity: .7; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-size: 28px; line-height: 1.25; margin: 0 0 8px; }
.page-heading > .muted { margin: 0; }
.heading-inline { align-items: end; display: flex; justify-content: space-between; }
.heading-inline h1 { margin-bottom: 0; }
.button { align-items: center; border: 1px solid transparent; border-radius: 5px; cursor: pointer; display: inline-flex; font-size: 12px; font-weight: 700; gap: 9px; justify-content: center; min-height: 38px; padding: 8px 13px; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-outline { background: #fff; border-color: #c9d1dd; color: #3a4866; }
.button-outline:hover:not(:disabled) { background: #f5f7fa; border-color: #97a3b5; }
.button-quiet { background: transparent; color: var(--green-dark); padding-inline: 5px; }
.button-quiet:hover { color: var(--green); }
.button-wide { width: 100%; }
.text-button { background: transparent; border: 0; color: var(--green-dark); cursor: pointer; font-size: 12px; font-weight: 700; padding: 5px 0; }
.text-button:hover { color: var(--green); }

.home-feature-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr); }
.feature-panel, .progress-panel, .lesson-player-panel, .lesson-notes, .import-form-panel, .template-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-panel { align-items: center; display: flex; justify-content: space-between; min-height: 218px; overflow: hidden; padding: 27px 28px; }
.feature-copy { max-width: 390px; position: relative; z-index: 1; }
.accent-eyebrow { color: var(--green); }
.feature-copy h2 { font-size: 22px; margin: 0 0 8px; }
.feature-copy > p:not(.eyebrow) { color: var(--muted); margin: 0 0 20px; }
.feature-diagram { height: 170px; margin-right: 4%; max-width: 35%; mix-blend-mode: multiply; object-fit: contain; }
.progress-panel { padding: 22px; }
.panel-heading { align-items: flex-start; display: flex; justify-content: space-between; }
.panel-heading h2, .section-heading h2 { font-size: 17px; margin: 0; }
.progress-ring { align-items: center; background: conic-gradient(var(--green) 0deg, #e3e8f0 0deg); border-radius: 50%; display: flex; height: 54px; justify-content: center; position: relative; width: 54px; }
.progress-ring::before { background: #fff; border-radius: 50%; content: ""; height: 42px; position: absolute; width: 42px; }
.progress-ring span { color: var(--green-dark); font-size: 10px; font-weight: 750; position: relative; }
.progress-main { align-items: baseline; margin: 17px 0 9px; }
.progress-main strong { font-size: 30px; line-height: 1; }
.progress-main span { color: var(--muted); font-size: 12px; }
.progress-track, .mini-track { background: #e6ebf2; border-radius: 10px; height: 6px; overflow: hidden; }
.progress-track span, .mini-track span { background: var(--green); border-radius: inherit; display: block; height: 100%; transition: width .2s ease; width: 0; }
.progress-panel > .small { margin: 12px 0 0; }
.stat-strip { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.stat-cell { align-items: baseline; border-right: 1px solid var(--line); display: flex; gap: 6px; min-height: 76px; padding: 17px 22px; }
.stat-cell:last-child { border: 0; }
.stat-cell > span { color: var(--muted); font-size: 11px; margin-right: auto; }
.stat-cell strong { font-size: 21px; }
.stat-cell small { color: var(--muted); font-size: 10px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; margin: 29px 0 14px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.knowledge-progress-list { border-top: 1px solid var(--line); }
.knowledge-progress-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 18px; grid-template-columns: minmax(130px, 1fr) minmax(90px, 1.4fr) 70px; min-height: 62px; padding: 10px 2px; }
.knowledge-progress-row strong { font-size: 12px; font-weight: 650; }
.knowledge-progress-row .mini-track { height: 5px; }
.knowledge-progress-row .row-status { color: var(--muted); font-size: 11px; text-align: right; }
.recent-heading { margin-top: 28px; }
.recent-activity { border-top: 1px solid var(--line); }
.activity-row { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 54px; padding: 10px 2px; }
.activity-title { align-items: center; display: flex; gap: 10px; }
.activity-dot { background: var(--green-soft); border-radius: 50%; height: 8px; width: 8px; }
.activity-row strong { font-size: 12px; font-weight: 650; }
.activity-row small { color: var(--muted); font-size: 11px; }
.empty-line { border: 1px dashed #c9d1dd; border-radius: var(--radius); color: var(--muted); padding: 20px; text-align: center; }

.toolbar-row { display: flex; gap: 12px; margin: 0 0 22px; }
.select-label { min-width: 150px; }
.knowledge-chapters { display: grid; gap: 24px; }
.knowledge-chapter { border-top: 1px solid var(--line); padding-top: 17px; }
.knowledge-chapter-heading { align-items: end; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.knowledge-chapter-heading .eyebrow { margin-bottom: 3px; }
.knowledge-chapter-heading h2 { font-size: 17px; margin: 0; }
.knowledge-chapter-heading > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chapter-heading-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.chapter-heading-actions > span { color: var(--muted); font-size: 11px; }
.chapter-progress-track { margin: 0 0 14px; }
.knowledge-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.knowledge-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.knowledge-item-top { align-items: flex-start; display: flex; justify-content: space-between; }
.knowledge-item h2 { font-size: 14px; margin: 0 0 7px; }
.knowledge-item p { color: var(--muted); font-size: 11px; margin: 0; }
.status-label { border-radius: 3px; font-size: 10px; font-weight: 700; padding: 3px 6px; white-space: nowrap; }
.status-label.new { background: #eef1f6; color: #66707f; }
.status-label.learning { background: var(--gold-soft); color: var(--gold); }
.status-label.mastered { background: var(--green-soft); color: var(--green-dark); }
.knowledge-item .mini-track { margin: 16px 0 8px; }
.knowledge-item-foot { align-items: center; display: flex; justify-content: space-between; }
.knowledge-item-foot span { color: var(--muted); font-size: 10px; }
.knowledge-item-foot button { background: transparent; border: 0; color: var(--green-dark); cursor: pointer; font-size: 11px; font-weight: 700; padding: 3px 0; }

.practice-toolbar { align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; padding: 13px; }
.practice-toolbar label { min-width: 135px; }
.practice-toolbar .button { margin-left: auto; }
.practice-area { max-width: 850px; }
.chapter-picker-list { border-top: 1px solid var(--line); }
.chapter-picker-row, .teacher-account-row, .medal-card { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 14px; justify-content: space-between; min-height: 68px; padding: 12px 4px; }
.chapter-picker-row > div, .teacher-account-row > div, .medal-card > div { display: grid; gap: 3px; min-width: 0; }
.chapter-picker-row strong, .teacher-account-row strong, .medal-card strong { font-size: 13px; overflow-wrap: anywhere; }
.chapter-picker-row small, .teacher-account-row small, .medal-card small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.chapter-complete-state { align-items: center; background: var(--paper); border: 1px solid #c9d1dd; border-radius: var(--radius); display: grid; justify-items: center; max-width: 560px; padding: 30px 20px; text-align: center; }
.chapter-complete-state strong { font-size: 17px; }
.chapter-complete-state p { color: var(--muted); font-size: 12px; }
.medal-mark { align-items: center; background: var(--gold-soft); border: 1px solid #e9d5a8; border-radius: 50%; color: var(--gold); display: inline-flex; flex: 0 0 38px; font-size: 21px; height: 38px; justify-content: center; width: 38px; }
.profile-medals { margin-top: 26px; max-width: 620px; }
.profile-medals .section-heading { align-items: end; }
.profile-medals .section-heading h2 { font-size: 17px; margin: 0; }
.medal-card { justify-content: flex-start; }
.teacher-create-form { margin-bottom: 24px; }
.teacher-account-list { border-top: 1px solid var(--line); max-width: 620px; }
.teacher-account-row { justify-content: flex-start; }
.teacher-account-row .status-label { margin-left: auto; }
.practice-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 25px 28px; }
.question-meta { align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; font-size: 11px; gap: 8px; padding-bottom: 14px; }
.question-meta .meta-spacer { flex: 1; }
.question-stem { font-size: 17px; line-height: 1.9; margin: 22px 0; }
.question-image { display: block; margin: 15px auto; max-height: 260px; max-width: min(100%, 420px); object-fit: contain; }
.choice-list { display: grid; gap: 9px; }
.choice-option { align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; display: flex; gap: 12px; line-height: 1.6; padding: 11px 13px; transition: background .12s ease, border .12s ease; }
.choice-option:hover { background: #f7f9fc; border-color: #9fabbd; }
.choice-option.selected { background: #e8edf6; border-color: var(--green); }
.choice-option.correct { background: #ffffff; border-color: #c8322b; }
.choice-option.incorrect { background: #fbeceb; border-color: #c8322b; }
.written-answer-label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.written-answer { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); display: block; font: inherit; font-size: 14px; line-height: 1.75; max-width: 100%; padding: 10px 12px; resize: vertical; width: 100%; }
.written-answer:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.written-answer[readonly] { background: #f5f7fa; }
.reference-answer, .reference-explanation { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.reference-explanation { margin-top: 12px; }
.reference-answer .katex-display, .reference-explanation .katex-display, .import-answer .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.choice-letter { align-items: center; border: 1px solid #c9d1dd; border-radius: 50%; color: #4f5a6b; display: inline-flex; flex: 0 0 23px; font-size: 10px; height: 23px; justify-content: center; margin-top: 1px; }
.selected .choice-letter { background: var(--green); border-color: var(--green); color: #fff; }
.feedback { border-left: 3px solid var(--green); margin-top: 18px; padding: 10px 13px; }
.feedback.incorrect { border-color: var(--coral); }
.feedback strong { display: block; font-size: 12px; margin-bottom: 4px; }
.feedback p { color: #4f5a6b; font-size: 12px; margin: 0; }
.practice-footer { align-items: center; display: flex; gap: 14px; justify-content: space-between; margin-top: 20px; }
.practice-footer > .button { flex-shrink: 0; }
.practice-footer .muted { font-size: 11px; }
.latex-frac { align-items: center; display: inline-flex; flex-direction: column; font-size: .85em; line-height: 1.15; margin: 0 .12em; vertical-align: middle; }
.latex-frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 .15em 1px; }
.latex-frac > span:last-child { padding-top: 1px; }
.latex-root { border-top: 1px solid currentColor; display: inline-block; margin-left: .1em; padding: 0 .1em; }
.math-text { white-space: normal; }
.inline-question-image { display: block; margin: 12px auto; max-height: 220px; max-width: min(100%, 360px); object-fit: contain; }
.missing-image { background: var(--coral-soft); border-radius: 3px; color: #b02a24; display: inline-block; font-size: 11px; padding: 4px 7px; }

.mistake-list { display: grid; gap: 10px; }
.mistake-paper-controls { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; padding: 16px 18px; }
.paper-title-field { align-items: center; display: flex; flex-wrap: wrap; font-size: 12px; font-weight: 650; gap: 10px; }
.paper-title-field input { border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); flex: 1; font: inherit; max-width: 420px; min-height: 38px; min-width: 0; padding: 7px 10px; }
.mistake-paper-actions, .ai-settings-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.paper-answer-option { align-items: center; display: inline-flex; font-size: 11px; gap: 5px; margin-left: auto; }
.paper-answer-option input, .mistake-select-label input { accent-color: var(--green); flex: 0 0 auto; height: 16px; width: 16px; }
.mistake-select-label { align-items: center; cursor: pointer; display: inline-flex; gap: 9px; min-width: 0; }
.mistake-item.selected-for-paper { background: #f2f5fb; border-color: #8d9bb3; border-left-color: var(--green); }
.mistake-paper-controls .form-message { margin: 10px 0 0; }
.mistake-stem { overflow-wrap: anywhere; }
.mistake-stem .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.mistake-item { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid #c8322b; border-radius: var(--radius); padding: 16px 18px; }
.mistake-item-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 9px; }
.mistake-item-head strong { font-size: 11px; }
.mistake-item-head span { color: var(--muted); font-size: 10px; }
.mistake-stem { line-height: 1.7; margin: 0 0 12px; }
.mistake-item-foot { align-items: center; border-top: 1px solid #edf0f5; display: flex; justify-content: space-between; padding-top: 10px; }
.mistake-item-foot .muted { font-size: 11px; }
.empty-state { background: var(--paper); border: 1px dashed #c9d1dd; border-radius: var(--radius); color: var(--muted); padding: 38px 20px; text-align: center; }
.empty-state strong { color: var(--ink); display: block; font-size: 14px; margin-bottom: 5px; }

.lesson-layout { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); }
.lesson-player-panel { overflow: hidden; }
.lesson-player-panel video { aspect-ratio: 16 / 9; background: #18213a; display: block; max-height: 500px; width: 100%; }
.video-empty { align-items: center; aspect-ratio: 16 / 9; background: #dde3ec; color: #4f5a6b; display: flex; flex-direction: column; font-size: 12px; gap: 12px; justify-content: center; }
.play-mark { align-items: center; background: #fff; border-radius: 50%; color: var(--green); display: inline-flex; font-size: 22px; height: 54px; justify-content: center; padding-left: 4px; width: 54px; }
.lesson-player-foot { align-items: center; display: flex; justify-content: space-between; padding: 17px 19px; }
.lesson-player-foot h2, .lesson-notes h2 { font-size: 16px; margin: 0; }
.file-button { cursor: pointer; position: relative; }
.file-button input { cursor: pointer; inset: 0; opacity: 0; position: absolute; width: 100%; }
.lesson-notes { padding: 22px; }
.lesson-notes ol { color: #4f5a6b; display: grid; font-size: 12px; gap: 12px; margin: 18px 0 22px; padding-left: 20px; }
.lesson-notes li::marker { color: var(--green); font-weight: 700; }

.report-summary { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.report-metric { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.report-metric span { color: var(--muted); display: block; font-size: 11px; }
.report-metric strong { display: block; font-size: 26px; margin-top: 8px; }
.report-section { margin-top: 28px; }
.week-bars { align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 12px; grid-template-columns: repeat(7, 1fr); min-height: 190px; padding: 22px 24px 14px; }
.week-column { align-items: center; display: flex; flex-direction: column; gap: 8px; height: 145px; justify-content: end; }
.week-column strong { color: #66707f; font-size: 10px; font-weight: 600; }
.bar-space { align-items: end; display: flex; height: 104px; width: 100%; }
.week-bar { background: #8d9bb3; border-radius: 3px 3px 0 0; min-height: 3px; width: 100%; }
.week-column.today .week-bar { background: var(--green); }
.week-column small { color: var(--muted); font-size: 10px; }
.report-knowledge { border-top: 1px solid var(--line); }
.report-knowledge-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: minmax(160px, 1fr) 2fr 70px; min-height: 53px; }
.report-knowledge-row strong { font-size: 12px; font-weight: 650; }
.report-knowledge-row > span { color: var(--muted); font-size: 11px; text-align: right; }

.teacher-layout { align-items: start; display: grid; gap: 15px; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); }
.question-bank-toolbar { align-items: end; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; padding-bottom: 15px; }
.question-bank-toolbar label { color: #3f4a5c; display: grid; font-size: 12px; font-weight: 650; gap: 6px; min-width: 150px; }
.question-bank-toolbar select, .question-bank-search input { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 40px; min-width: 0; outline: none; padding: 7px 9px; width: 100%; }
.question-bank-search { flex: 1 1 260px; }
.question-bank-list { display: grid; gap: 10px; }
.question-bank-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; padding: 15px 17px; }
.question-bank-head { align-items: center; border-bottom: 1px solid #edf0f5; display: flex; flex-wrap: wrap; gap: 9px 14px; justify-content: space-between; padding-bottom: 9px; }
.question-bank-head > div { align-items: center; display: flex; flex-wrap: wrap; gap: 7px 10px; }
.question-bank-head strong, .question-bank-head > div > span:last-child { font-size: 11px; }
.question-bank-head > div > span:last-child, .question-bank-number { color: var(--muted); font-size: 10px; }
.question-type-label { background: var(--green-soft); border-radius: 3px; color: var(--green-dark); font-size: 10px; padding: 3px 6px; }
.question-bank-stem { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; padding: 12px 0; }
.question-bank-stem .katex-display { overflow-x: auto; }
.question-bank-image { display: block; margin: 0 0 12px; max-height: 160px; max-width: min(100%, 320px); object-fit: contain; }
.question-chapter-editor { align-items: end; border-top: 1px solid #edf0f5; display: flex; gap: 10px; padding-top: 12px; }
.question-chapter-editor label { color: #3f4a5c; display: grid; font-size: 11px; font-weight: 650; gap: 5px; max-width: 420px; width: 100%; }
.question-chapter-editor input { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 38px; min-width: 0; padding: 6px 9px; width: 100%; }
.question-bank-answer { border-top: 1px solid #edf0f5; color: #4f5a6b; font-size: 11px; line-height: 1.7; margin-top: 12px; padding-top: 9px; }
.question-bank-answer summary { color: var(--green-dark); cursor: pointer; font-weight: 650; }
.question-bank-answer > div { margin-top: 8px; overflow-wrap: anywhere; }
.import-form-panel, .template-panel { padding: 20px; }
.field-label { display: block; font-size: 12px; font-weight: 700; margin: 0 0 9px; }
.import-controls-row { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 14px; }
.import-controls-row .select-label { flex: 1; max-width: 210px; }
.import-controls-row input { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 42px; min-width: 0; outline: none; padding: 8px 10px; width: 100%; }
.batch-file-button { flex: 0 0 auto; position: relative; }
.batch-file-button input { cursor: pointer; inset: 0; opacity: 0; position: absolute; width: 100%; }
.pdf-upload-list { background: #f5f7fa; border: 1px solid var(--line); border-radius: var(--radius); margin: -3px 0 14px; padding: 11px 12px; }
.pdf-upload-heading { align-items: baseline; display: flex; gap: 10px; justify-content: space-between; }
.pdf-upload-heading strong { font-size: 11px; }
.pdf-upload-heading > span, .pdf-file-meta, .pdf-upload-state { color: var(--muted); font-size: 10px; }
.pdf-upload-items { display: grid; gap: 6px; list-style: none; margin: 9px 0 0; padding: 0; }
.pdf-upload-items li { align-items: center; background: #fff; border: 1px solid #e3e8f0; border-radius: 4px; display: grid; gap: 8px; grid-template-columns: 34px minmax(0, 1fr) auto; min-height: 38px; padding: 5px 8px; }
.pdf-file-mark { color: #b02a24; font-size: 9px; font-weight: 750; }
.pdf-file-name { font-size: 11px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-meta { white-space: nowrap; }
.pdf-upload-state { margin: 8px 0 0; }
.ai-import-settings { border-block: 1px solid var(--line); margin: 0 0 15px; padding: 11px 0; }
.text-batch-options { align-items: center; display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.text-batch-options label { align-items: center; display: flex; font-size: 11px; font-weight: 650; gap: 8px; }
.text-batch-options select { background: white; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 36px; padding: 6px; }
.text-import-panel { background: #f2f5fb; border: 1px solid #c9d1dd; border-radius: var(--radius); margin-bottom: 15px; padding: 13px; }
.text-import-panel > strong { display: block; font-size: 12px; }
.text-import-panel progress { accent-color: var(--green); display: block; height: 10px; margin: 12px 0; width: 100%; }
.text-import-panel > p { font-size: 11px; line-height: 1.65; margin: 7px 0; overflow-wrap: anywhere; }
.text-import-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai-import-settings summary { color: var(--green-dark); cursor: pointer; font-size: 12px; font-weight: 700; }
.ai-settings-fields { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.4fr) minmax(120px, .7fr); margin-top: 12px; }
.ai-settings-fields label { color: #3f4a5c; display: grid; font-size: 11px; font-weight: 650; gap: 5px; min-width: 0; }
.ai-settings-fields input { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 38px; min-width: 0; padding: 7px 9px; width: 100%; }
.ai-settings-fields .ai-key-field, .ai-settings-fields .ai-security-note, .ai-settings-actions, #aiSettingsStatus { grid-column: 1 / -1; }
.ai-settings-actions { margin-top: 0; }
.ai-security-note { font-size: 10px; line-height: 1.55; }
.import-form-panel textarea { border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); font-family: Consolas, "Microsoft YaHei", monospace; font-size: 12px; line-height: 1.65; min-height: 310px; padding: 12px; resize: vertical; width: 100%; }
.batch-import-hint { margin: 7px 0 0; }
.import-options, .import-actions { align-items: center; display: flex; gap: 10px; margin-top: 12px; }
.import-actions { justify-content: flex-end; }
.import-actions #aiImportQuestions { margin-right: auto; }
.template-panel h2 { font-size: 15px; margin: 0 0 13px; }
.template-panel pre { background: #f5f7fa; border: 1px solid #e3e8f0; border-radius: 4px; color: #2c3852; font-family: Consolas, "Microsoft YaHei", monospace; font-size: 11px; line-height: 1.55; margin: 0 0 12px; overflow-x: auto; padding: 12px; }
.template-panel code { background: #f1f3f7; border-radius: 3px; font-family: Consolas, monospace; padding: 2px 4px; }
.additional-templates summary { color: var(--green-dark); cursor: pointer; font-size: 12px; margin-bottom: 10px; }
.import-preview-section { margin-top: 29px; }
.count-label { color: var(--muted); font-size: 11px; }
.import-preview { display: grid; gap: 9px; }
.import-preview-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.import-preview-item.invalid { border-left: 3px solid var(--coral); }
.preview-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.preview-locate-title { background: transparent; border: 0; color: var(--ink); cursor: pointer; flex: 1; font-size: 11px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; padding: 0; text-align: left; }
.preview-tools { align-items: center; display: flex; flex: 0 0 auto; gap: 7px; }
.preview-delete { color: #b02a24; }
.preview-head span { color: var(--green-dark); font-size: 10px; font-weight: 700; }
.preview-head .error-label { color: #b02a24; }
.import-preview-item p { font-size: 12px; line-height: 1.65; margin: 0; }
.import-preview-stem { font-size: 13px; line-height: 1.8; }
.import-preview-stem .katex-display { margin: 10px 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.import-preview-options { display: grid; gap: 7px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 13px 0; padding: 0; }
.import-preview-options li { align-items: baseline; display: flex; font-size: 12px; gap: 6px; line-height: 1.75; min-width: 0; }
.import-preview-options li > strong { color: var(--green-dark); flex: 0 0 auto; }
.import-preview-options .katex-display { margin: 4px 0; overflow-x: auto; }
.import-preview-rationale { border-top: 1px solid #edf0f5; color: #4f5a6b; font-size: 11px; margin-top: 12px; padding-top: 10px; }
.import-preview-rationale summary { color: var(--green-dark); cursor: pointer; font-weight: 650; }
.ai-answer-note { background: #fff4df; border-radius: 3px; color: #805a17; font-size: 10px; margin-left: 5px; padding: 2px 5px; }
.import-preview-rationale p, .import-preview-rationale > div { line-height: 1.75; margin-top: 8px; }
.math-render-error { background: var(--coral-soft); border-radius: 3px; color: #b02a24; padding: 1px 4px; }
.import-preview-item .preview-errors { color: #b02a24; font-size: 11px; margin-top: 7px; }
.import-preview-item img { display: block; max-height: 120px; max-width: 200px; object-fit: contain; }
.pdf-result-editor { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.pdf-result-editor .section-heading { margin-bottom: 10px; }
.pdf-result-editor .section-heading h2 { font-size: 14px; margin: 0; }
.pdf-result-editor textarea { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); font-family: Consolas, "Microsoft YaHei", monospace; font-size: 12px; line-height: 1.65; min-height: 240px; padding: 12px; resize: vertical; width: 100%; }
.pdf-result-editor .form-hint { margin-top: 6px; }

.settings-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); max-width: 620px; padding: 24px; }
.settings-panel input[readonly] { background: #f2f5f9; color: var(--muted); }
.profile-cooldown-notice { background: #eef2f8; border-left: 3px solid var(--green); color: #3a4866; font-size: 12px; margin: 0; padding: 10px 12px; }
.profile-cooldown-notice.is-cooling-down { background: var(--gold-soft); border-color: var(--gold); color: #76551f; }
.student-account-toolbar { align-items: end; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 14px; }
.student-search { color: #3f4a5c; display: grid; font-size: 12px; font-weight: 650; gap: 6px; max-width: 520px; width: 100%; }
.student-search input { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 42px; outline: none; padding: 8px 10px; width: 100%; }
.student-account-list { border-top: 1px solid var(--line); }
.student-account-row { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; min-height: 91px; padding: 15px 4px; }
.student-account-identity { min-width: 0; }
.student-account-identity strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.student-account-identity strong span { color: var(--muted); font-size: 11px; font-weight: 500; margin-left: 5px; }
.student-account-identity p { color: #4f5a6b; font-size: 11px; margin: 4px 0 2px; overflow-wrap: anywhere; }
.student-account-identity small { color: var(--muted); display: block; font-size: 10px; overflow-wrap: anywhere; }
.student-account-row > .button { flex: 0 0 auto; }
.exam-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; }
.exam-create-form > .form-hint, .exam-create-form > button, .exam-create-form > .form-message { grid-column: 1 / -1; }
.student-exam-card, .admin-exam-card, .student-assignment-card, .admin-assignment-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.student-exam-card + .student-exam-card, .admin-exam-card + .admin-exam-card, .student-assignment-card + .student-assignment-card, .admin-assignment-card + .admin-assignment-card { margin-top: 12px; }
.assignment-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; }
.assignment-create-form > label:nth-child(4), .assignment-create-form > .form-hint, .assignment-create-form > button, .assignment-create-form > .form-message { grid-column: 1 / -1; }
.assignment-create-form textarea { background: #fff; border: 1px solid #c9d1dd; border-radius: 5px; color: var(--ink); min-height: 76px; outline: none; padding: 8px 10px; resize: vertical; width: 100%; }
.assignment-list { display: grid; gap: 12px; }
.assignment-schedule { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 10px 0; }
.assignment-instructions { background: #f5f7fa; border-left: 3px solid #97a3b5; color: #3f4a5c; font-size: 12px; margin: 12px 0; padding: 9px 12px; overflow-wrap: anywhere; }
.assignment-upload { margin-top: 0; }
.assignment-upload input { cursor: pointer; inset: 0; opacity: 0; position: absolute; width: 100%; }
.assignment-submissions { border-top: 1px solid var(--line); margin-top: 15px; }
.assignment-submission-row, .assignment-pending-row { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; min-height: 66px; padding: 12px 0; }
.assignment-pending-row .status-label { flex: 0 0 auto; }
.assignment-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.assignment-analysis { background: #f5f7fa; border-left: 3px solid var(--green); display: grid; gap: 5px; padding: 11px 13px; }
.assignment-analysis strong { color: var(--green-dark); }
.assignment-analysis p { font-size: 12px; margin: 0; overflow-wrap: anywhere; }
.assignment-analysis small { color: var(--muted); font-size: 10px; }
.student-exam-card h2, .admin-exam-card h2 { font-size: 17px; margin: 4px 0 0; overflow-wrap: anywhere; }
.exam-schedule { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 10px 0; }
.student-exam-card .exam-actions, .admin-exam-card .exam-actions { margin-top: 12px; }
.submission-upload { margin-top: 12px; }
.submission-upload input { cursor: pointer; inset: 0; opacity: 0; position: absolute; width: 100%; }
.submission-state { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.exam-result-panel { background: #edf1f8; border-left: 3px solid var(--green); margin-top: 14px; padding: 12px 14px; }
.exam-result-panel strong { color: var(--green-dark); font-size: 20px; }
.exam-result-panel p { font-size: 12px; margin: 5px 0 0; overflow-wrap: anywhere; }
.exam-admin-list { display: grid; gap: 12px; }
.exam-submissions { border-top: 1px solid var(--line); margin-top: 16px; }
.exam-submission-row { border-bottom: 1px solid var(--line); display: grid; gap: 10px; padding: 15px 0; }
.submission-student { display: grid; gap: 4px; }
.submission-student strong { font-size: 12px; }
.submission-student small, .review-state { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.exam-submission-row .exam-actions { align-items: end; margin: 0; }
.exam-submission-row .exam-actions label { color: var(--muted); display: grid; font-size: 10px; gap: 4px; min-width: 110px; }
.exam-submission-row .exam-actions input { background: #fff; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); min-height: 34px; padding: 6px 8px; width: 100%; }
.self-rating-dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); max-height: 85dvh; max-width: 600px; overflow-y: auto; padding: 26px; width: calc(100% - 28px); }
.self-rating-reference { background: #f5f7fa; border: 1px solid var(--line); border-radius: 5px; margin: 14px 0; padding: 12px; }
.self-rating-dialog::backdrop { background: #1a2440b3; }
.self-rating-dialog h2 { font-size: 20px; margin: 4px 0 8px; }
.self-rating-dialog > .muted { font-size: 12px; }
.self-rating-options { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.button-small { font-size: 11px; min-height: 32px; padding: 5px 10px; }
.student-edit-dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); max-height: 90vh; max-width: 560px; overflow-y: auto; padding: 24px; width: calc(100% - 28px); }
.student-edit-dialog::backdrop { background: #1a2440b3; }
.student-edit-dialog .dialog-heading { align-items: center; }
.student-edit-dialog .dialog-heading h2 { font-size: 18px; }
.student-edit-dialog .auth-form { gap: 12px; }
.knowledge-video-row { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 10px; margin-top: 14px; padding-top: 12px; }
.knowledge-video-row .small { font-size: 10px; }
.knowledge-grid > .empty-state { grid-column: 1 / -1; }
.lesson-dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); max-height: 90vh; overflow-y: auto; padding: 24px; width: min(840px, calc(100% - 28px)); }
.lesson-dialog::backdrop { background: #1a2440b3; }
.dialog-heading { align-items: flex-start; display: flex; gap: 15px; justify-content: space-between; margin-bottom: 18px; }
.dialog-heading h2 { font-size: 21px; margin: 0; overflow-wrap: anywhere; }
.dialog-heading .button { flex-shrink: 0; }
.lesson-dialog video { aspect-ratio: 16 / 9; background: #141c2e; border-radius: 6px; display: block; width: 100%; }
.course-list, .student-progress-list { display: grid; gap: 14px; }
.course-row { align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 15px; justify-content: space-between; padding: 17px 20px; }
.course-row > div { min-width: 0; overflow-wrap: anywhere; }
.course-row > button { flex-shrink: 0; }
.course-row p { margin: 5px 0 0; }
.student-progress-list { margin-top: 22px; }
.metrics-help { color: var(--muted); font-size: 12px; margin-top: 18px; }
.metrics-help summary { color: var(--green-dark); cursor: pointer; }
.metrics-help p { max-width: 900px; }
.student-progress-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 22px; }
.student-card-head { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
.student-card-head h2 { font-size: 17px; margin: 0; }
.student-card-head h2 span { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 8px; }
.student-card-head p { margin: 5px 0 0; overflow-wrap: anywhere; }
.completion-grid { display: grid; gap: 18px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 22px; }
.completion-metric > span { color: var(--muted); font-size: 11px; }
.completion-metric strong { display: block; font-size: 23px; margin: 6px 0; }
.completion-metric small { color: var(--muted); display: block; font-size: 10px; margin-top: 7px; }
.student-detail { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 15px; }
.student-detail summary, .exam-review summary { color: var(--green-dark); cursor: pointer; font-size: 12px; font-weight: 650; }
.detail-row { align-items: center; display: flex; font-size: 11px; gap: 12px; justify-content: space-between; padding-top: 13px; }
.detail-row span { color: var(--muted); text-align: right; }
.exam-heading { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.exam-heading h2 { font-size: 20px; margin: 0; }
.exam-clock { background: var(--gold-soft); border-radius: 5px; color: var(--gold); font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 700; padding: 6px 12px; }
.exam-numbers { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.exam-number { background: var(--canvas); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; height: 34px; width: 34px; }
.exam-number.answered { background: var(--green-soft); color: var(--green-dark); }
.exam-number.current { border: 2px solid var(--green); }
.exam-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.exam-actions .button:last-child { margin-left: auto; }
.exam-score { color: var(--green); font-size: 30px; white-space: nowrap; }
.exam-review { border-top: 1px solid var(--line); margin: 15px 0; padding: 15px 0; }
.exam-review p { font-size: 13px; }
.app-toast { background: #1e2a44; border-radius: 7px; bottom: 85px; box-shadow: 0 5px 25px #1e2a4426; color: white; font-size: 13px; left: 50%; margin: 0; max-width: calc(100% - 30px); padding: 12px 18px; position: fixed; transform: translateX(-50%); z-index: 20; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* 提示、掌握度、间隔复习 */
.hint-box { display: grid; gap: 8px; justify-items: start; margin: 14px 0 4px; }
.hint-item { background: var(--gold-soft); border-left: 3px solid #d9b45a; border-radius: 4px; margin: 0; padding: 8px 12px; width: 100%; }
.hint-item strong { color: var(--gold); display: block; font-size: 11px; margin-bottom: 2px; }
.mastery-line { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.mistake-review-bar { align-items: center; background: var(--green-soft); border: 1px solid #c9d1dd; border-radius: var(--radius); display: flex; gap: 16px; justify-content: space-between; margin-bottom: 14px; padding: 14px 18px; }
.mistake-review-bar > div { display: grid; gap: 2px; }
.review-stage { border-radius: 3px; font-size: 10px; font-weight: 700; padding: 2px 6px; white-space: nowrap; }
.review-stage.due { background: var(--coral-soft); color: #b02a24 !important; }
.review-stage.waiting { background: #eef1f6; color: #5a6475 !important; }
.mistake-item.is-waiting { border-left-color: #b8c2d0; }
.mistake-item-foot { gap: 10px; }
.mistake-cause { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 6px; margin-left: auto; }
.mistake-cause select { background: #fff; border: 1px solid #c9d1dd; border-radius: 4px; font-size: 12px; padding: 3px 6px; }

/* 题目质量 */
.question-quality { align-items: center; border-top: 1px dashed var(--line); color: var(--muted); display: flex; flex-wrap: wrap; font-size: 12px; gap: 6px 14px; margin-top: 10px; padding-top: 8px; }
.question-quality.needs-review { color: var(--ink); }
.quality-flag { background: var(--coral-soft); border-radius: 3px; color: #b02a24; font-weight: 650; padding: 1px 6px; }
.question-reports { background: #fffaf3; border: 1px solid #f0dcc0; border-radius: 5px; display: grid; gap: 8px; justify-items: start; margin-top: 8px; padding: 10px 12px; }
.question-reports ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; }
.question-reports small { color: var(--muted); display: block; font-size: 11px; }
.report-question-button { color: var(--muted); flex-shrink: 0; font-size: 12px; margin-right: auto; }
.question-bank-toolbar .question-bank-review-filter { align-items: center; align-self: end; display: flex; font-size: 12px; gap: 6px; min-height: 42px; white-space: nowrap; }
#reportQuestionDialog textarea { border: 1px solid #c9d1dd; border-radius: 5px; padding: 8px 10px; resize: vertical; }

/* 数据备份 */
.backup-overview { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; max-width: 960px; }
.backup-stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 4px; padding: 14px 16px; }
.backup-stat > span:first-child { color: var(--muted); font-size: 12px; }
.backup-stat strong { font-size: 15px; }
.backup-stat small { color: var(--muted); font-size: 12px; }
.backup-stat.is-warning { background: var(--gold-soft); border-color: #e7cf9c; }
.backup-stat.is-warning small { color: var(--gold); font-weight: 650; }
.backup-meter { background: #e3e8f0; border-radius: 3px; display: block; height: 6px; overflow: hidden; }
.backup-meter span { background: var(--green); display: block; height: 100%; }
.backup-stat.is-warning .backup-meter span { background: var(--gold); }
.backup-panel { display: grid; gap: 12px; justify-items: start; margin-bottom: 16px; }
.backup-panel h2 { font-size: 16px; margin: 0; }
.backup-panel p { margin: 0; }
.check-label { align-items: center; cursor: pointer; display: flex; gap: 8px; }
.check-label input { accent-color: var(--green); height: 16px; width: 16px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .page-content { padding-inline: 24px; }
  .home-feature-grid { grid-template-columns: minmax(0, 1.3fr) minmax(235px, .8fr); }
  .feature-diagram { max-width: 31%; }
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-intro { min-height: 270px; padding: 22px 24px 16px; }
  .auth-copy { margin: 30px 0 0; padding: 0; }
  .auth-copy h1 { font-size: 32px; }
  .auth-copy > p:last-child { font-size: 13px; }
  .auth-diagram { display: none; }
  .local-note { margin-top: auto; padding-top: 14px; }
  .auth-panel-wrap { align-items: flex-start; padding: 18px 16px 32px; }
  .auth-panel { padding: 22px 18px; }
  .app-shell { display: block; padding-bottom: 62px; }
  .sidebar { background: var(--paper); border-bottom: 1px solid var(--line); border-right: 0; bottom: 0; height: 62px; min-height: 0; padding: 4px 5px; position: fixed; top: auto; width: 100%; z-index: 5; }
  .sidebar-brand, .nav-caption, .sidebar-bottom { display: none; }
  /* 手机底栏只放 5 个入口，其余收进“更多” */
  .main-nav.student-nav, .main-nav.teacher-nav { align-items: stretch; display: grid; gap: 2px; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 100%; }
  .nav-more-toggle { display: flex !important; position: relative; }
  .nav-more-group { display: none; }
  .main-nav.more-open .nav-more-group { background: var(--paper); border: 1px solid var(--line); border-radius: 10px 10px 0 0; bottom: 62px; box-shadow: 0 -8px 24px #12302a24; display: grid; gap: 2px; left: 0; padding: 8px; position: fixed; right: 0; z-index: 6; }
  .main-nav.more-open .nav-more-group .nav-item, .teacher-nav.more-open .nav-more-group .nav-item { flex-direction: row; font-size: 14px; gap: 12px; justify-content: flex-start; min-height: 46px; padding: 8px 14px; text-align: left; }
  .main-nav.more-open .nav-more-group .nav-symbol { font-size: 16px; width: 20px; }
  .main-nav.more-open .nav-more-group .nav-badge { margin-left: auto; position: static; transform: none; }
  .daily-goal-select { display: flex; margin: 6px 0 0; }
  .nav-item { align-content: center; flex-direction: column; font-size: 9px; gap: 3px; justify-content: center; min-height: 0; padding: 3px 2px; text-align: center; }
  .nav-symbol { font-size: 18px; height: 19px; width: auto; }
  .nav-badge { font-size: 8px; min-width: 16px; padding: 1px 4px; position: absolute; transform: translate(26px, -12px); }
  .teacher-nav .nav-item { flex-direction: column; font-size: 8px; gap: 1px; line-height: 1.2; overflow-wrap: anywhere; }
  .teacher-nav .nav-symbol { height: 18px; width: auto; }
  .topbar { height: 54px; padding: 0 15px; }
  .breadcrumb { font-size: 11px; }
  .topbar-user { font-size: 10px; gap: 6px; }
  .topbar-user .text-button { font-size: 10px; white-space: nowrap; }
  .topbar-user .user-nameplate { max-width: 60px; overflow: hidden; white-space: nowrap; }
  .breadcrumb > span { display: none; }
  .user-nameplate small { display: none; }
  .grade-pill { display: none; }
  .page-content { padding: 23px 15px 28px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .heading-inline { align-items: flex-start; gap: 10px; }
  .heading-inline .button { font-size: 10px; padding-inline: 0; white-space: nowrap; }
  .heading-inline > .button { flex-shrink: 0; padding-inline: 10px; }
  .home-feature-grid, .lesson-layout, .teacher-layout { grid-template-columns: 1fr; }
  .feature-panel { min-height: 195px; padding: 20px 17px; }
  .feature-copy h2 { font-size: 18px; }
  .feature-copy > p:not(.eyebrow) { font-size: 11px; max-width: 220px; }
  .feature-diagram { margin-right: 0; max-width: 34%; }
  .progress-panel { padding: 17px; }
  .stat-cell { align-items: flex-start; flex-direction: column; gap: 2px; min-height: 81px; padding: 12px 10px; }
  .stat-cell > span { margin: 0; min-height: 28px; }
  .stat-cell strong { font-size: 18px; }
  .stat-cell small { display: none; }
  .knowledge-progress-row { gap: 10px; grid-template-columns: minmax(105px, 1fr) minmax(50px, .7fr) 60px; }
  .knowledge-progress-row strong { font-size: 10px; }
  .knowledge-progress-row .row-status { font-size: 10px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .toolbar-row { flex-wrap: wrap; }
  .select-label { flex: 1; min-width: 120px; }
  .practice-toolbar { align-items: stretch; flex-wrap: wrap; }
  .practice-toolbar label { flex: 1; min-width: 125px; }
  .knowledge-chapter-heading { align-items: flex-start; }
  .knowledge-chapter-heading > span { padding-top: 14px; white-space: normal; text-align: right; }
  .chapter-heading-actions { align-items: flex-end; flex-direction: column; gap: 5px; }
  .practice-toolbar .button { margin-left: 0; }
  .practice-card { padding: 18px 14px; }
  .mistake-paper-controls { padding: 14px; }
  .mistake-paper-actions { align-items: flex-start; }
  .paper-answer-option { flex-basis: 100%; margin-left: 0; }
  .mistake-item-head { align-items: flex-start; gap: 8px; }
  .mistake-item-head > span { flex-shrink: 0; }
  .mistake-item-foot { flex-wrap: wrap; }
  .mistake-cause { margin-left: 0; }
  .mistake-review-bar { align-items: stretch; flex-direction: column; }
  #downloadMistakePaper { width: 100%; }
  .question-stem { font-size: 15px; }
  .practice-footer { align-items: flex-end; gap: 8px; }
  .practice-footer .muted { max-width: 150px; }
  .practice-footer { flex-wrap: wrap; }
  .report-summary { gap: 7px; }
  .report-metric { padding: 13px 10px; }
  .report-metric span { font-size: 10px; min-height: 28px; }
  .report-metric strong { font-size: 21px; }
  .week-bars { gap: 5px; padding-inline: 10px; }
  .report-knowledge-row { gap: 8px; grid-template-columns: minmax(100px, 1fr) 1fr 55px; }
  .report-knowledge-row strong, .report-knowledge-row > span { font-size: 10px; }
  .lesson-notes { padding: 18px; }
  .import-form-panel, .template-panel { padding: 15px; }
  .import-controls-row { align-items: stretch; flex-wrap: wrap; }
  .import-controls-row .select-label { max-width: none; min-width: 135px; }
  .ai-settings-fields { grid-template-columns: 1fr; }
  .ai-settings-fields .ai-key-field, .ai-settings-fields .ai-security-note { grid-column: auto; }
  .import-options { align-items: flex-start; flex-direction: column; }
  .import-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-actions #aiImportQuestions { grid-column: 1 / -1; margin: 0; }
  .import-actions .button { font-size: 11px; min-width: 0; padding-inline: 7px; }
  .import-preview-options { grid-template-columns: 1fr; }
  .preview-head { align-items: flex-start; flex-direction: column; }
  .preview-tools { flex-wrap: wrap; }
  .settings-panel { padding: 18px; }
  .student-account-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .question-bank-toolbar { align-items: stretch; gap: 9px; }
  .question-bank-toolbar label, .question-bank-search { flex: 1 1 calc(50% - 9px); min-width: 120px; }
  .question-bank-toolbar > .count-label { flex-basis: 100%; }
  .question-bank-item { padding: 13px; }
  .question-chapter-editor { align-items: stretch; flex-direction: column; }
  .question-chapter-editor label { max-width: none; }
  .question-chapter-editor .button { align-self: flex-start; }
  .student-account-row { align-items: flex-start; gap: 8px; }
  .student-account-row > .button { font-size: 10px; min-height: 34px; padding: 6px 8px; }
  .chapter-picker-row { align-items: flex-start; }
  .chapter-picker-row > .button { flex: 0 0 auto; }
  .chapter-heading-actions .button { font-size: 10px; min-height: 32px; padding: 5px 8px; }
  .student-edit-dialog { padding: 18px; }
  .exam-create-form { grid-template-columns: 1fr; }
  .exam-create-form > .form-hint, .exam-create-form > button, .exam-create-form > .form-message { grid-column: auto; }
  .assignment-create-form { grid-template-columns: 1fr; }
  .assignment-create-form > label:nth-child(4), .assignment-create-form > .form-hint, .assignment-create-form > button, .assignment-create-form > .form-message { grid-column: auto; }
  .exam-submission-row .exam-actions { align-items: stretch; flex-direction: column; }
  .exam-submission-row .exam-actions label { min-width: 0; }
  .assignment-submission-row, .assignment-pending-row { align-items: flex-start; flex-direction: column; }
  .self-rating-dialog { padding: 20px; }
  .completion-grid { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-progress-card { padding: 16px; }
  .student-card-head { flex-wrap: wrap; }
  .lesson-dialog { padding: 17px; }
  .dialog-heading h2 { font-size: 17px; }
  .detail-row { align-items: start; flex-direction: column; gap: 5px; }
  .exam-heading h2 { font-size: 16px; }
  .exam-clock { font-size: 16px; }
  .course-row { padding: 14px; }
}

/* =====================================================================
   活力明快主题
   白底 + 大圆角；彩色色块分区：青绿=今日与主操作，紫=知识闯关，
   珊瑚=错题，向日葵黄=星星与提示。按钮有一条实色“底边”，按下时下沉。
   ===================================================================== */

body { background: var(--canvas); font-size: 15px; }
h1, h2 { font-weight: 800; letter-spacing: 0; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: none; }
.small, .muted.small { font-size: 13px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-bright); box-shadow: 0 0 0 4px #2cc9b43d; outline: none; }
input, select, textarea { border-radius: 12px !important; }

/* 图标 */
.nav-symbol { fill: none; flex: 0 0 22px; height: 22px; overflow: hidden; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 22px; }

/* ---- 按钮：实色底边，按下下沉 ---- */
.button { border-radius: 14px; font-size: 14px; font-weight: 700; min-height: 42px; padding: 9px 16px; transition: transform .08s ease, box-shadow .08s ease, background .15s ease; }
.button-primary { background: var(--teal); box-shadow: 0 4px 0 var(--teal-press); color: #fff; }
.button-primary:hover:not(:disabled) { background: #0b8f80; }
.button-primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--teal-press); transform: translateY(3px); }
.button-outline { background: #fff; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); color: var(--ink); }
.button-outline:hover:not(:disabled) { background: #fafbfd; border-color: #cfd6e2; }
.button-outline:active:not(:disabled) { box-shadow: 0 0 0 var(--line); transform: translateY(3px); }
.button:disabled { box-shadow: none; }
.button-quiet, .text-button { color: var(--teal); font-weight: 700; }
.button-quiet:hover, .text-button:hover { color: var(--teal-press); }
.status-label { border-radius: 99px; font-size: 12px; font-weight: 700; padding: 3px 10px; }
.status-label.new { background: #eef1f6; color: var(--muted); }
.status-label.learning { background: var(--sun-soft); color: #8a5a00; }
.status-label.mastered { background: var(--mint-soft); color: #08704d; }
.progress-track, .mini-track { background: #e8ecf3; border-radius: 99px; height: 10px; }
.progress-track span, .mini-track span { background: var(--teal-bright); border-radius: 99px; }
.empty-state, .empty-line { background: #fff; border: 2px dashed #d7dde8; border-radius: 18px; }
.app-toast { background: var(--ink); border-radius: 16px; box-shadow: 0 10px 30px #23252f40; font-size: 14px; font-weight: 600; }
.nav-badge { background: var(--coral); border-radius: 99px; color: #fff; font-size: 12px; font-weight: 800; }

/* ---- 侧栏 ---- */
.sidebar { background: #fff; border-right: 0; box-shadow: 1px 0 0 var(--line); }
.brand-lockup { font-weight: 800; }
.brand-mark { background: var(--teal); border-radius: 12px; box-shadow: 0 3px 0 var(--teal-press); color: #fff; font-weight: 800; }
.cover-label { align-items: center; background: var(--violet-soft); border-radius: 18px; display: flex; gap: 10px; margin: -14px 0 22px; padding: 10px 12px; }
.player-avatar { align-items: center; background: var(--violet); border-radius: 12px; color: #fff; display: inline-flex; flex: 0 0 38px; font-weight: 800; height: 38px; justify-content: center; }
.player-info { display: grid; line-height: 1.3; min-width: 0; }
.player-info strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-info small { color: #1d62b5; font-size: 12px; font-weight: 600; }
.player-stars { align-items: center; background: #fff; border-radius: 99px; display: inline-flex; font-size: 13px; gap: 3px; margin-left: auto; padding: 3px 9px 3px 6px; }
.player-stars svg { fill: var(--sun); height: 16px; stroke: var(--sun-press); stroke-linejoin: round; stroke-width: 1.4; width: 16px; }
.nav-caption { color: #9aa0ad; font-size: 12px; font-weight: 700; }
.nav-item { border-radius: 14px; color: var(--ink-soft); font-size: 15px; font-weight: 600; gap: 12px; min-height: 46px; }
.nav-item:hover { background: #f3f5f9; color: var(--ink); }
.nav-item.active { background: var(--teal-soft); color: var(--teal-press); font-weight: 800; }
.nav-item.active .nav-symbol { stroke-width: 2.4; }
.sidebar-bottom { border-top: 2px solid #f0f2f6; }
.status-dot { background: var(--mint); }
.topbar { background: #fff; border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.breadcrumb strong { font-weight: 800; }
.grade-pill { background: var(--sun-soft); border: 0; border-radius: 99px; color: #8a5a00; font-weight: 700; padding: 5px 12px; }
.avatar { background: var(--violet); border-radius: 10px; color: #fff; }

/* ---- 页面标题 ---- */
.page-heading h1 { font-size: 30px; margin-bottom: 8px; }
#view-practice .page-heading > .eyebrow { display: none; }
#todayLabel { color: var(--muted); font-size: 14px; font-weight: 600; }
.section-heading { margin: 30px 0 12px; }
.section-heading h2, .panel-heading h2 { font-size: 19px; }

/* ---- 首页：彩色色块 ---- */
.home-feature-grid { gap: 16px; grid-template-columns: minmax(280px, .95fr) minmax(0, 1.3fr); }
.progress-panel { background: var(--teal); border: 0; border-radius: 24px; color: #fff; grid-column: 1; grid-row: 1; overflow: hidden; padding: 22px 24px; position: relative; }
.progress-panel::after { background: #ffffff1f; border-radius: 50%; content: ""; height: 160px; pointer-events: none; position: absolute; right: -50px; top: -60px; width: 160px; }
.progress-panel h2 { color: #fff; font-size: 17px; font-weight: 700; opacity: .92; }
.progress-main { margin: 10px 0 12px; position: relative; z-index: 1; }
.progress-main strong { color: #fff; font-size: 42px; font-weight: 800; }
.progress-main > span { color: #e2fffa; font-size: 16px; font-weight: 700; }
.daily-goal-select { color: #e2fffa; font-size: 12px; }
.daily-goal-select select { background: #ffffff26; border: 0; color: #fff; font-weight: 700; }
.daily-goal-select option { color: var(--ink); }
.daily-boxes { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; position: relative; z-index: 1; }
.daily-box { align-items: center; background: #ffffff2e; border-radius: 11px; display: inline-flex; height: 34px; justify-content: center; width: 34px; }
.daily-box svg { fill: #ffffff59; height: 20px; width: 20px; }
.daily-box.done { background: var(--sun); box-shadow: 0 3px 0 var(--sun-press); }
.daily-box.done svg { fill: #7a4b00; }
#dailyEncouragement { color: #e2fffa !important; font-size: 13px; position: relative; z-index: 1; }
.feature-panel { background: var(--violet); border: 0; border-radius: 24px; color: #fff; grid-column: 2; grid-row: 1; min-height: 210px; padding: 24px 26px; }
.feature-copy h2 { color: #fff; font-size: 26px; }
.feature-copy > p:not(.eyebrow) { color: #e3f1ff; font-size: 14px; }
.feature-panel .button-primary { background: #fff; box-shadow: 0 4px 0 var(--violet-press); color: var(--violet); }
.feature-panel .button-primary:hover:not(:disabled) { background: #eef6ff; }
.feature-panel .button-primary:disabled { opacity: .7; }
.feature-diagram { flex: 0 0 auto; height: 170px; margin: 0; max-width: 40%; mix-blend-mode: normal; }
.feature-diagram svg { display: block; height: 100%; width: auto; }
.fig-line { fill: #ffffff14; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
.fig-tick { fill: none; stroke: var(--sun); stroke-linecap: round; stroke-width: 2.6; }
.fig-label { fill: #fff; font-size: 16px; font-weight: 700; }
.stat-strip { background: transparent; border: 0; gap: 12px; margin-top: 16px; }
.stat-cell { background: #fff; border: 0 !important; border-radius: 18px; box-shadow: 0 3px 0 var(--line); flex-direction: column; gap: 2px; min-height: 92px; padding: 14px 18px; }
.stat-cell > span { font-size: 13px; font-weight: 600; margin: 0; }
.stat-cell strong { font-size: 30px; font-weight: 800; }
.stat-cell small { display: none; }
.stat-cell:nth-child(1) strong { color: var(--teal); }
.stat-cell:nth-child(2) strong { color: #8a5a00; }
.stat-cell:nth-child(3) strong { color: var(--coral); }
.knowledge-progress-list, .recent-activity, .report-knowledge { background: #fff; border-radius: 20px; border-top: 0; box-shadow: 0 3px 0 var(--line); overflow: hidden; }
.knowledge-progress-row, .activity-row, .report-knowledge-row { border-bottom: 1px solid #f0f2f6; padding-inline: 18px; }
.knowledge-progress-row:last-child, .activity-row:last-child, .report-knowledge-row:last-child { border-bottom: 0; }
.knowledge-progress-row { grid-template-columns: minmax(130px, 1fr) minmax(90px, 1.4fr) max-content; }
.knowledge-progress-row strong, .activity-row strong, .report-knowledge-row strong { font-size: 14px; font-weight: 700; }
.knowledge-progress-row .row-status, .report-knowledge-row > span { font-size: 12px; white-space: nowrap; }
.activity-dot { background: var(--teal-bright); height: 10px; width: 10px; }
.empty-line { border-radius: 18px; }

/* ---- 知识闯关：每章一个“世界”，知识点是关卡 ---- */
.knowledge-chapter { background: #fff; border: 0; border-radius: 24px; box-shadow: 0 4px 0 var(--line); overflow: hidden; padding: 0 0 18px; }
.knowledge-chapter-heading { align-items: center; background: var(--violet-soft); margin: 0 0 16px; padding: 16px 20px; }
.knowledge-chapter-heading .eyebrow { color: #1d62b5; font-weight: 700; }
.knowledge-chapter-heading h2 { font-size: 22px; }
.chapter-heading-actions > span { color: #1d62b5; font-size: 13px; font-weight: 700; }
.chapter-heading-actions .button-outline { border-color: #d6cdff; box-shadow: 0 3px 0 #d6cdff; color: var(--violet); }
.chapter-progress-track { display: none; }
.knowledge-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); padding: 0 20px; }
.knowledge-item { background: #f7f8fc; border: 0; border-radius: 18px; padding: 16px; }
.knowledge-item h2 { font-size: 16px; }
.knowledge-item p { font-size: 12px; }
.knowledge-item .mini-track { margin: 14px 0 6px; }
.mastery-line { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.knowledge-item-foot span { font-size: 12px; }
.knowledge-item-foot button { color: var(--teal); font-size: 14px; font-weight: 800; }
.knowledge-video-row { border-top: 1px solid #e8ecf3; }
.knowledge-video-row .button { background: #fff; border-width: 2px; font-size: 12px; min-height: 32px; padding: 4px 10px; }
.knowledge-video-row .muted.small { font-size: 12px; }

/* ---- 做题 ---- */
.practice-toolbar { background: #fff; border: 0; border-radius: 20px; box-shadow: 0 3px 0 var(--line); }
.practice-toolbar label, .auth-form label, .field-group > label, .select-label { font-size: 13px; font-weight: 700; }
.practice-card { background: #fff; border: 0; border-radius: 24px; box-shadow: 0 4px 0 var(--line), 0 18px 40px -28px #23252f55; padding: 24px 28px; }
.question-meta { border-bottom: 0; flex-wrap: wrap; font-size: 12px; gap: 8px; padding-bottom: 4px; }
.question-number { background: var(--sun-soft); border-radius: 99px; color: #8a5a00; font-weight: 800; padding: 3px 12px; }
.meta-tag { background: var(--violet-soft); border-radius: 99px; color: #1d62b5; font-weight: 700; padding: 3px 10px; }
.meta-tag + .meta-tag { background: #eef1f6; color: var(--ink-soft); }
.question-count { color: var(--muted); font-weight: 700; }
.question-stem { font-size: 19px; font-weight: 600; line-height: 1.8; margin: 16px 0 18px; }
.choice-list { gap: 10px; }
.choice-option { background: #f3f5f9; border: 0; border-radius: 16px; box-shadow: inset 0 0 0 2px transparent; font-size: 16px; font-weight: 600; padding: 13px 14px; }
.choice-option:hover { background: #eaeef5; }
.choice-letter { background: #fff; border: 0; border-radius: 10px; color: var(--ink-soft); flex-basis: 28px; font-size: 13px; font-weight: 800; height: 28px; }
.choice-option.selected { background: var(--teal-soft); box-shadow: inset 0 0 0 2px var(--teal-bright); }
.selected .choice-letter { background: var(--teal); color: #fff; }
.choice-option.correct { background: var(--mint-soft); box-shadow: inset 0 0 0 2px var(--mint); color: #08704d; }
.choice-option.correct .choice-letter { background: var(--mint); color: #fff; }
.choice-option.incorrect { background: var(--coral-soft); box-shadow: inset 0 0 0 2px #ff8a6b; color: #b23a20; }
.choice-option.incorrect .choice-letter { background: var(--coral); color: #fff; }
.choice-option:disabled { cursor: default; }
.choice-option:disabled:hover { background: #f3f5f9; }
.choice-option.correct:disabled:hover { background: var(--mint-soft); }
.choice-option.incorrect:disabled:hover { background: var(--coral-soft); }
.written-answer-label { font-size: 14px; }
.written-answer { background: #f3f5f9; border: 2px solid transparent; border-radius: 16px; font-size: 16px; padding: 12px 14px; }
.written-answer:focus { background: #fff; border-color: var(--teal-bright); outline: none; }
.written-answer[readonly] { background: #f3f5f9; }
.hint-item { background: var(--sun-soft); border-left: 0; border-radius: 14px; }
.hint-item strong { color: #8a5a00; }
.hint-box .button-quiet { color: #8a5a00; }
.feedback { align-items: start; background: var(--mint-soft); border: 0; border-radius: 18px; display: grid; gap: 4px 12px; grid-template-columns: auto 1fr; margin-top: 18px; padding: 14px 16px; }
.feedback > :not(.result-badge) { grid-column: 2; }
.feedback.incorrect { background: var(--sun-soft); }
.feedback > strong { font-size: 17px; font-weight: 800; margin: 4px 0 2px; }
.feedback > .result-badge { grid-row: 1 / span 3; }
.practice-footer .muted { font-size: 13px; }
.report-question-button { color: var(--muted); font-size: 13px; font-weight: 600; }

/* 判对判错徽章 */
.result-badge { align-items: center; border-radius: 50%; display: inline-flex; flex: 0 0 auto; height: 36px; justify-content: center; width: 36px; }
.result-badge svg { fill: none; height: 22px; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.2; width: 22px; }
.result-badge.is-right { background: var(--mint); box-shadow: 0 3px 0 #108a60; }
.result-badge.is-wrong { background: var(--coral); box-shadow: 0 3px 0 var(--coral-press); }
.rating-head { align-items: center; display: flex; gap: 14px; }
.rating-head h2 { font-size: 22px; margin: 0; }
.pen-mark:empty { display: none; }
.pen-mark .result-badge { height: 52px; width: 52px; }
.pen-mark .result-badge svg { height: 30px; width: 30px; }
.result-badge.pop { animation: badge-pop .38s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes badge-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .result-badge.pop { animation: none; }
  .view { animation: none; }
  .button { transition: none; }
}
.self-rating-dialog, .lesson-dialog, .student-edit-dialog { border: 0; border-radius: 24px; }
.self-rating-dialog::backdrop, .lesson-dialog::backdrop, .student-edit-dialog::backdrop { background: #23252f8c; }
.self-rating-reference { background: #f6f8fb; border: 0; border-radius: 16px; }
.self-rating-options .button { min-width: 84px; }

/* ---- 错题本 ---- */
.mistake-review-bar { background: var(--coral); border: 0; border-radius: 22px; box-shadow: 0 4px 0 var(--coral-press); color: #fff; padding: 18px 20px; }
.mistake-review-bar strong { font-size: 19px; font-weight: 800; }
.mistake-review-bar .muted { color: #ffe6df !important; }
.mistake-review-bar .button-primary { background: #fff; box-shadow: 0 4px 0 var(--coral-press); color: var(--coral); }
.mistake-paper-controls { background: #fff; border: 0; border-radius: 20px; box-shadow: 0 3px 0 var(--line); }
.mistake-list { gap: 12px; }
.mistake-item { background: #fff; border: 0; border-radius: 20px; box-shadow: 0 3px 0 var(--line), inset 5px 0 0 var(--coral); padding: 16px 18px 16px 22px; }
.mistake-item.is-waiting { box-shadow: 0 3px 0 var(--line), inset 5px 0 0 var(--sun); }
.mistake-item.selected-for-paper { background: #f2fbf9; box-shadow: 0 3px 0 var(--line), inset 5px 0 0 var(--teal-bright), inset 0 0 0 2px var(--teal-bright); }
.mistake-item-head strong { font-size: 13px; font-weight: 700; }
.mistake-item-foot { border-top: 1px solid #f0f2f6; }
.mistake-item-foot .muted, .mistake-cause { font-size: 12px; }
.mistake-stem { font-size: 16px; font-weight: 600; }
.review-stage { border-radius: 99px; font-size: 12px !important; padding: 3px 10px; }
.review-stage.due { background: var(--coral-soft); color: #b23a20 !important; }
.review-stage.waiting { background: var(--sun-soft); color: #8a5a00 !important; }
.mistake-cause select, .daily-goal-select select { border-radius: 10px !important; }

/* ---- 报告 ---- */
.report-summary { gap: 12px; }
.report-metric { background: #fff; border: 0; border-radius: 20px; box-shadow: 0 3px 0 var(--line); }
.report-metric span { font-size: 13px; font-weight: 600; }
.report-metric strong { font-size: 32px; font-weight: 800; }
.report-metric:nth-child(1) strong { color: var(--teal); }
.report-metric:nth-child(2) strong { color: #8a5a00; }
.report-metric:nth-child(3) strong { color: var(--coral); }
.week-bars { background: #fff; border: 0; border-radius: 20px; box-shadow: 0 3px 0 var(--line); }
.week-bar { background: #c9f1ea; border-radius: 10px 10px 4px 4px; }
.week-column.today .week-bar { background: var(--teal-bright); }
.week-column strong { font-size: 13px; font-weight: 800; }
.week-column small { font-size: 12px; font-weight: 600; }
.week-column.today small { color: var(--teal); }
.report-knowledge-row { grid-template-columns: minmax(130px, 1fr) minmax(120px, 2fr) minmax(150px, max-content); }

/* ---- 登录页 ---- */
.auth-screen { background: var(--canvas); }
.auth-intro { background: var(--teal); color: #fff; overflow: hidden; }
.auth-intro::before, .auth-intro::after { background: #ffffff1a; border-radius: 50%; content: ""; pointer-events: none; position: absolute; }
.auth-intro::before { height: 340px; right: -120px; top: -120px; width: 340px; }
.auth-intro::after { bottom: -80px; height: 220px; left: -60px; width: 220px; }
.auth-intro .brand-lockup { color: #fff; position: relative; z-index: 1; }
.auth-intro .brand-mark { background: #fff; box-shadow: 0 3px 0 var(--teal-press); color: var(--teal); }
.auth-hero { margin: auto 0 0; max-width: 560px; position: relative; z-index: 1; }
.auth-copy.auth-hero h1 { color: #fff; font-size: clamp(34px, 4vw, 50px); line-height: 1.2; margin: 0 0 14px; }
.auth-copy.auth-hero > p { color: #dffaf5; font-size: 16px; margin: 0 0 24px; max-width: 440px; }
.auth-hero-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.auth-hero-tiles span { border-radius: 18px; color: #fff; display: grid; font-size: 16px; font-weight: 800; gap: 2px; min-width: 170px; padding: 14px 16px; }
.auth-hero-tiles small { font-size: 12px; font-weight: 500; opacity: .9; }
.tile-violet { background: var(--violet); box-shadow: 0 4px 0 var(--violet-press); }
.tile-coral { background: var(--coral); box-shadow: 0 4px 0 var(--coral-press); }
.auth-diagram { height: auto; margin: 26px 0 24px auto; max-height: 190px; max-width: 46%; mix-blend-mode: normal; position: relative; z-index: 1; }
.auth-intro .fig-line { fill: #ffffff14; stroke: #fff; }
.auth-intro .fig-tick { stroke: var(--sun); }
.auth-intro .fig-label { fill: #fff; }
.local-note { color: #c6f3ec; font-size: 13px; position: relative; z-index: 1; }
.auth-panel { border: 0; border-radius: 26px; box-shadow: 0 4px 0 var(--line), 0 24px 50px -30px #23252f55; padding: 30px; }
.auth-heading .eyebrow { color: var(--teal); font-weight: 700; }
.auth-heading h2 { font-size: 26px; }
.segmented { background: #f0f2f6; border-radius: 16px; padding: 4px; }
.segment { border-radius: 12px; font-weight: 600; min-height: 40px; }
.segment.active { background: #fff; box-shadow: 0 2px 0 var(--line); color: var(--teal-press); font-weight: 800; }
.auth-form input, .auth-form select { background: #f6f8fb; border: 2px solid transparent; min-height: 46px; }
.auth-form input:focus, .auth-form select:focus { background: #fff; }

/* ---- 手机 ---- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .sidebar { border-radius: 22px 22px 0 0; box-shadow: 0 -4px 18px #23252f14; }
  .cover-label { display: none; }
  .nav-item { border-radius: 14px; color: #8b91a0; font-size: 11px; font-weight: 700; position: relative; }
  .nav-item.active { background: transparent; color: var(--teal); }
  .nav-item.active .nav-symbol { background: var(--teal-soft); border-radius: 10px; box-sizing: content-box; padding: 3px 10px; }
  .nav-symbol, .teacher-nav .nav-symbol, .student-nav .nav-symbol { flex: 0 0 22px; height: 22px; width: 22px; }
  .main-nav.more-open .nav-more-group { border: 0; border-radius: 22px 22px 0 0; }
  .main-nav.more-open .nav-more-group .nav-item { color: var(--ink); font-size: 15px; }
  .main-nav.more-open .nav-more-group .nav-item.active .nav-symbol { padding: 0; background: none; }
  .page-heading h1 { font-size: 26px; }
  .home-feature-grid { grid-template-columns: 1fr; }
  .progress-panel, .feature-panel { grid-column: 1; grid-row: auto; }
  .progress-panel { order: -1; }
  .feature-panel { min-height: 0; padding: 20px; }
  .feature-copy h2 { font-size: 22px; }
  .feature-diagram { height: 110px; }
  .stat-strip { gap: 8px; }
  .stat-cell { min-height: 0; padding: 12px; }
  .stat-cell > span { font-size: 12px; line-height: 1.35; }
  .stat-cell strong { font-size: 24px; }
  .knowledge-progress-row { gap: 10px; grid-template-columns: minmax(0, 1fr) 70px max-content; padding-inline: 14px; }
  .report-knowledge-row { gap: 8px 12px; grid-template-columns: minmax(0, 1fr) max-content; padding-block: 10px; }
  .report-knowledge-row .mini-track { grid-column: 1 / -1; grid-row: 2; }
  .knowledge-grid { grid-template-columns: 1fr; padding: 0 14px; }
  .knowledge-chapter-heading { padding: 14px; }
  .practice-card { border-radius: 20px; padding: 18px 16px; }
  .question-stem { font-size: 17px; }
  .auth-intro { min-height: 0; padding-bottom: 26px; }
  .auth-copy.auth-hero h1 { font-size: 30px; margin-top: 26px; }
  .auth-hero-tiles span { min-width: 0; flex: 1; }
  .auth-diagram { display: none; }
  .auth-panel { padding: 22px 18px; }
}

/* ---- 截图检查后的修正 ---- */
.app-shell { background: linear-gradient(90deg, #fbfffe 230px, transparent 230px); }
.progress-main span, .progress-main #dailyGoalText { color: #e2fffa; }
.feedback.incorrect { background: var(--coral-soft); }
.feedback.incorrect > strong { color: #b23a20; }
.feedback:not(.incorrect) > strong { color: #08704d; }
.nav-more-toggle.active .nav-symbol { stroke-width: 2.6; }
@media (max-width: 1050px) { .app-shell { background: linear-gradient(90deg, #fbfffe 205px, transparent 205px); } }
@media (max-width: 760px) {
  .app-shell { background: none; }
  .nav-item.active::after { display: none; }
}

/* 上传页：教材目录选择 */
.import-catalog-row { align-items: end; background: var(--violet-soft); border-radius: 16px; display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 14px; padding: 12px 14px; }
.import-catalog-row .select-label { flex: 1 1 220px; max-width: 320px; }
.import-catalog-row p { flex: 1 1 100%; margin: 0; }
.question-chapter-editor.catalog-editor { align-items: end; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.question-chapter-editor.catalog-editor label { flex: 1 1 220px; }
.question-chapter-editor select { width: 100%; }
.question-chapter-editor select { background: #f6f8fb; border: 2px solid transparent; color: var(--ink); font-size: 13px; min-height: 40px; padding: 6px 10px; }
.question-chapter-editor label { font-size: 12px; max-width: none; }

/* 学生端：目录里还没有题目的章、节 */
.knowledge-item.is-empty { background: #fafbfd; box-shadow: inset 0 0 0 2px #eef1f6; }
.knowledge-item.is-empty h2 { color: var(--muted); }
.knowledge-item.is-empty p { color: #9aa0ad; }
.knowledge-chapter.is-empty .knowledge-chapter-heading { background: #f3f5f9; }
.knowledge-chapter.is-empty .knowledge-chapter-heading h2 { color: var(--ink-soft); }
.knowledge-chapter.is-empty .eyebrow, .knowledge-chapter.is-empty .chapter-heading-actions > span { color: var(--muted); }
.chapter-book { margin-bottom: 18px; }
.chapter-book-title { font-size: 17px; margin: 0 0 8px; }
.chapter-book .chapter-picker-list { background: #fff; border-radius: 18px; box-shadow: 0 3px 0 var(--line); overflow: hidden; }
.chapter-picker-row { padding-inline: 16px; }
.chapter-picker-row.is-empty strong { color: var(--muted); font-weight: 600; }
.chapter-picker-row.is-empty small { color: #9aa0ad; }
.knowledge-grid { align-items: start; }
.knowledge-item.is-empty { padding-block: 12px; }
.knowledge-item.is-empty h2 { font-size: 15px; margin-bottom: 0; }
@media (max-width: 760px) {
  .knowledge-chapter-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .knowledge-chapter-heading h2 { font-size: 19px; }
  .chapter-heading-actions { justify-content: flex-start; width: 100%; }
  .chapter-heading-actions .button { margin-left: auto; white-space: nowrap; }
  .knowledge-item.is-empty { padding-block: 10px; }
}
@media (max-width: 760px) {
  .knowledge-chapter-heading .chapter-heading-actions { align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; }
}

/* 登录页右上角的“后台入口” */
.auth-screen { position: relative; }
.auth-admin-link { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; padding: 6px 10px; position: absolute; right: 18px; top: 14px; z-index: 2; }
.auth-admin-link:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.auth-admin-link.active { color: var(--teal); }
@media (max-width: 760px) {
  /* 手机上右上角在青绿色区域里 */
  .auth-admin-link { color: #d4f5ef; right: 10px; top: 10px; }
  .auth-admin-link:hover, .auth-admin-link.active { color: #fff; }
}

/* ---- 资料推荐 ---- */
.resource-toolbar { align-items: end; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.resource-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.resource-chip { background: #fff; border: 0; border-radius: 99px; box-shadow: 0 2px 0 var(--line); color: var(--ink-soft); cursor: pointer; font-size: 13px; font-weight: 700; padding: 7px 14px; }
.resource-chip:hover { background: #f3f5f9; }
.resource-chip.active { background: var(--teal); box-shadow: 0 3px 0 var(--teal-press); color: #fff; }
.resource-search { color: var(--ink-soft); display: grid; flex: 0 1 320px; font-size: 13px; font-weight: 700; gap: 6px; }
.resource-search input { background: #fff; border: 2px solid transparent; box-shadow: 0 2px 0 var(--line); min-height: 42px; padding: 8px 12px; }
.resource-list { display: grid; gap: 14px; }
.resource-card { align-items: flex-start; background: #fff; border-radius: 22px; box-shadow: 0 3px 0 var(--line); display: flex; gap: 16px; padding: 18px 20px; }
.ext-violet, .type-violet { --c: var(--violet); --c-soft: var(--violet-soft); --c-ink: #1d62b5; }
.ext-coral, .type-coral { --c: var(--coral); --c-soft: var(--coral-soft); --c-ink: #b23a20; }
.ext-teal, .type-teal { --c: var(--teal); --c-soft: var(--teal-soft); --c-ink: var(--teal-press); }
.ext-sun, .type-sun { --c: var(--sun-press); --c-soft: var(--sun-soft); --c-ink: #8a5a00; }
.ext-mint, .type-mint { --c: var(--mint); --c-soft: var(--mint-soft); --c-ink: #08704d; }
.ext-gray, .type-gray { --c: #8b91a0; --c-soft: #eef1f6; --c-ink: var(--ink-soft); }
.resource-body { flex: 1; min-width: 0; }
.resource-head { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.resource-head h2 { flex: 1 1 100%; font-size: 18px; margin: 4px 0 0; overflow-wrap: anywhere; }
.resource-type { background: var(--c-soft); border-radius: 99px; color: var(--c-ink); font-size: 12px; font-weight: 800; padding: 2px 10px; }
.resource-flag { border-radius: 99px; font-size: 12px; font-weight: 800; padding: 2px 10px; }
.resource-flag.is-new { background: var(--coral); color: #fff; }
.resource-flag.is-updated { background: var(--sun-soft); color: #8a5a00; }
.resource-meta { color: var(--muted); font-size: 12px; margin: 6px 0 8px; overflow-wrap: anywhere; }
.resource-intro { color: var(--ink-soft); font-size: 14px; line-height: 1.75; margin: 0 0 12px; overflow-wrap: anywhere; }
.resource-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.mall-links { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 6px 12px; margin-left: auto; }
.mall-link { color: var(--teal); font-size: 13px; font-weight: 700; text-decoration: none; }
.mall-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.resource-form { max-width: 860px; }
.resource-form h2 { font-size: 18px; margin: 0; }
.resource-form textarea { background: #f6f8fb; border: 2px solid transparent; border-radius: 14px; font: inherit; font-size: 14px; line-height: 1.7; padding: 10px 12px; resize: vertical; }
.resource-form-row { grid-template-columns: 2fr 1fr 1fr; }
.resource-form-row:last-of-type { grid-template-columns: 1fr 1fr; }
.resource-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#teacherResourcesPanel .section-heading { margin-top: 26px; }
@media (max-width: 760px) {
  .resource-card { gap: 12px; padding: 14px; }
    .resource-head h2 { font-size: 16px; }
  .mall-links { margin-left: 0; }
  .resource-search { flex-basis: 100%; }
  .resource-form-row, .resource-form-row:last-of-type { grid-template-columns: 1fr; }
}
.resource-form input[type="file"] { background: #f6f8fb; border: 2px dashed #d7dde8; border-radius: 14px; cursor: pointer; font-size: 13px; padding: 12px; }
.resource-form input[type="file"]::file-selector-button { background: var(--teal); border: 0; border-radius: 10px; box-shadow: 0 3px 0 var(--teal-press); color: #fff; cursor: pointer; font: inherit; font-weight: 700; margin-right: 12px; padding: 7px 14px; }

/* ---- 清新薄荷：整体调浅，页面底色带一点薄荷蓝，卡片阴影更轻 ---- */
body { background: var(--canvas); }
.sidebar { background: #fbfffe; box-shadow: 1px 0 0 var(--line); }
.topbar { background: #ffffffd9; backdrop-filter: blur(6px); box-shadow: 0 1px 0 var(--line); }
.progress-panel { background: linear-gradient(135deg, #0c8f7e 0%, #14a592 100%); }
.feature-panel { background: linear-gradient(135deg, #2f84e0 0%, #4a9ae8 100%); }
.auth-intro { background: linear-gradient(150deg, #0c8f7e 0%, #14a592 55%, #2f84e0 130%); }
.stat-cell, .knowledge-progress-list, .recent-activity, .report-knowledge { box-shadow: 0 2px 0 var(--line), 0 8px 22px #0c8f7e14; }
.knowledge-progress-row, .activity-row, .report-knowledge-row { border-bottom-color: #e8f3f1; }
.nav-item:hover { background: #eef8f6; }
.sidebar-bottom { border-top-color: #e8f3f1; }
.cover-label { background: #e8f3ff; }
.empty-state, .empty-line { border-color: #cfe6e2; }
.progress-track, .mini-track { background: #e1f0ee; }
.grade-pill { background: #e4f7f1; color: #076e61; }

/* ---- 资料封面 ---- */
.resource-cover { aspect-ratio: 3 / 4; background: linear-gradient(160deg, var(--c-soft) 0%, #fff 130%); border-radius: 10px 16px 16px 10px; box-shadow: 0 3px 0 var(--line), 0 8px 18px #0c8f7e1f; display: flex; flex: 0 0 96px; flex-direction: column; gap: 6px; justify-content: space-between; margin: 0; overflow: hidden; padding: 12px 10px 10px 16px; position: relative; width: 96px; }
.resource-cover::before { background: var(--c); bottom: 0; content: ""; left: 0; position: absolute; top: 0; width: 7px; }
.resource-cover.is-wide { aspect-ratio: 4 / 3; flex-basis: 128px; width: 128px; }
.resource-cover .cover-art { background: radial-gradient(circle at 70% 30%, var(--c) 0 9px, transparent 10px), repeating-linear-gradient(135deg, var(--c-soft) 0 6px, #ffffff80 6px 12px); border-radius: 50%; height: 30px; opacity: .85; width: 30px; }
.resource-cover .cover-title { color: var(--c-ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; font-size: 13px; font-weight: 800; line-height: 1.35; overflow: hidden; overflow-wrap: anywhere; }
.resource-cover .cover-type { color: var(--c-ink); font-size: 11px; font-weight: 700; opacity: .75; }
.resource-cover img { background: #fff; height: 100%; inset: 0; left: 0; object-fit: cover; object-position: top center; position: absolute; top: 0; width: 100%; }
.resource-cover.is-wide img { object-fit: contain; object-position: center; }
.resource-cover.has-image::before { display: none; }
.resource-cover-editor { align-items: flex-start; background: #f2fbf9; border-radius: 16px; display: flex; gap: 16px; padding: 14px; }
.resource-cover-editor .resource-cover { flex-basis: 84px; width: 84px; }
.resource-cover-editor .resource-cover.is-wide { flex-basis: 112px; width: 112px; }
.resource-cover-side { display: grid; gap: 4px; min-width: 0; }
.resource-cover-side p { margin: 0; }
.resource-cover-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.resource-cover-actions .file-button { overflow: hidden; }
.resource-cover-actions .file-button input { height: 100%; }
.resource-form .resource-cover-actions input[type="file"] { border: 0; padding: 0; }
@media (max-width: 760px) {
  .resource-cover { flex-basis: 72px; padding: 9px 7px 8px 13px; width: 72px; }
  .resource-cover.is-wide { flex-basis: 96px; width: 96px; }
  .resource-cover .cover-art { height: 22px; width: 22px; }
  .resource-cover .cover-title { -webkit-line-clamp: 3; font-size: 11px; }
  .resource-cover .cover-type { font-size: 10px; }
  .resource-cover-editor { flex-direction: column; }
}

/* 有封面图时直接用原图：完整显示、不裁切、不叠文字 */
.resource-cover.has-image { aspect-ratio: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; flex-basis: 150px; padding: 0; width: 150px; }
.resource-cover.has-image.is-wide { flex-basis: 220px; width: 220px; }
.resource-cover.has-image .cover-art, .resource-cover.has-image .cover-title, .resource-cover.has-image .cover-type { display: none; }
.resource-cover.has-image img { display: block; height: auto; inset: auto; object-fit: contain; position: static; width: 100%; }
.resource-cover[role="button"] { cursor: zoom-in; }
.resource-cover[role="button"]:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }
.resource-cover-editor .resource-cover.has-image { flex-basis: 120px; width: 120px; }
.resource-cover-editor .resource-cover.has-image.is-wide { flex-basis: 180px; width: 180px; }
.cover-dialog { background: #fff; border: 0; border-radius: 10px; box-shadow: 0 20px 60px #0f1f2c59; max-height: 92vh; max-width: min(92vw, 960px); padding: 10px; position: fixed; }
.cover-dialog::backdrop { background: #0f1f2c99; }
.cover-dialog img { display: block; margin: 0 auto; max-height: calc(92vh - 20px); max-width: 100%; }
.cover-dialog-close { background: #1f2c3acc; border: 0; border-radius: 50%; color: #fff; cursor: pointer; font-size: 20px; height: 34px; line-height: 1; position: absolute; right: 14px; top: 14px; width: 34px; }
@media (max-width: 760px) {
  .resource-cover.has-image { flex-basis: 104px; width: 104px; }
  .resource-cover.has-image.is-wide { flex-basis: 140px; width: 140px; }
  .resource-cover-editor .resource-cover.has-image { flex-basis: 110px; width: 110px; }
}

/* ======== 沉稳扁平：去掉实色底边和大色块，圆角收小，线条变细 ======== */
:root { --radius: 10px; }
.nav-symbol { stroke-width: 1.8; }
.page-heading h1 { font-size: 28px; font-weight: 700; }
.section-heading h2, .panel-heading h2 { font-weight: 700; }

/* 按钮 */
.button { border-radius: 8px; min-height: 40px; transition: background .15s ease, border-color .15s ease; }
.button-primary, .button-primary:active:not(:disabled) { box-shadow: none; transform: none; }
.button-primary:hover:not(:disabled) { background: var(--teal-press); }
.button-outline, .button-outline:active:not(:disabled) { border: 1px solid #c9dcd9; box-shadow: none; transform: none; }
.button-outline:hover:not(:disabled) { background: #f1faf8; border-color: var(--teal-bright); }
.chapter-heading-actions .button-outline { border-color: #c9dcd9; box-shadow: none; color: var(--teal-press); }
.resource-form input[type="file"]::file-selector-button { border-radius: 6px; box-shadow: none; }
.resource-chip { border: 1px solid var(--line); border-radius: 8px; box-shadow: none; font-weight: 600; }
.resource-chip:hover { background: #f1faf8; }
.resource-chip.active { background: var(--teal); border-color: var(--teal); box-shadow: none; }
.resource-search input { border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }

/* 卡片：细边框，不再有底部厚阴影 */
.stat-cell, .knowledge-progress-list, .recent-activity, .report-knowledge, .knowledge-chapter, .practice-toolbar, .practice-card,
.mistake-paper-controls, .report-metric, .week-bars, .chapter-book .chapter-picker-list, .resource-card, .empty-state, .empty-line {
  border: 1px solid var(--line) !important; border-radius: 12px; box-shadow: none;
}
.empty-state, .empty-line { border-style: dashed !important; }
.practice-card { box-shadow: 0 18px 40px -32px #1f2c3a66; }
.mistake-item { border: 1px solid var(--line); border-radius: 12px; box-shadow: inset 3px 0 0 var(--coral); }
.mistake-item.is-waiting { box-shadow: inset 3px 0 0 var(--sun); }
.mistake-item.selected-for-paper { box-shadow: inset 3px 0 0 var(--teal-bright), 0 0 0 1px var(--teal-bright); }
.auth-panel { border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -28px #0c8f7e59; }
.segmented { border-radius: 10px; }
.segment { border-radius: 8px; }
.segment.active { box-shadow: 0 1px 3px #1f2c3a1f; }
.app-toast { border-radius: 10px; }
.result-badge.is-right, .result-badge.is-wrong { box-shadow: none; }
.daily-box { border-radius: 8px; }

/* 首页两块：由整块饱和色改成白底细边卡片，只保留一点主色 */
.progress-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.progress-panel::after { display: none; }
.progress-panel h2 { color: var(--ink-soft); opacity: 1; }
.progress-main strong { color: var(--teal); }
.progress-main > span, .progress-main span, .progress-main #dailyGoalText { color: var(--muted); }
.daily-goal-select { color: var(--muted); }
.daily-goal-select select { background: var(--teal-soft); color: var(--teal-press); }
.daily-box { background: #e7f1ef; }
.daily-box svg { fill: #b6ccc8; }
.daily-box.done { background: var(--sun); box-shadow: none; }
.daily-box.done svg { fill: #7a4b00; }
#dailyEncouragement { color: var(--muted) !important; }
.feature-panel { background: #f1f7fe; border: 1px solid #d3e5f8; border-radius: 12px; color: var(--ink); }
.feature-copy h2 { color: var(--ink); }
.feature-copy > p:not(.eyebrow) { color: var(--ink-soft); }
.feature-panel .eyebrow { color: var(--violet-press); }
.feature-panel .button-primary { background: var(--violet); box-shadow: none; color: #fff; }
.feature-panel .button-primary:hover:not(:disabled) { background: var(--violet-press); }
.fig-line { fill: #2f84e01a; stroke: var(--violet); }
.fig-tick { stroke: #e09a00; }
.fig-label { fill: var(--violet-press); }
.stat-cell strong { font-weight: 700; }

/* 错题复习条：浅珊瑚底 */
.mistake-review-bar { background: #fff4f1; border: 1px solid #f4d3ca; border-radius: 12px; box-shadow: none; color: var(--ink); }
.mistake-review-bar strong { font-weight: 700; }
.mistake-review-bar .muted { color: var(--muted) !important; }
.mistake-review-bar .button-primary { background: var(--coral); box-shadow: none; color: #fff; }
.mistake-review-bar .button-primary:hover:not(:disabled) { background: var(--coral-press); }

/* 侧栏与标志 */
.brand-mark { align-items: center; background: var(--teal); border-radius: 9px; box-shadow: none; color: #fff; display: inline-flex; flex: 0 0 34px; height: 34px; justify-content: center; width: 34px; --logo-dot: #ffd66b; }
.brand-glyph { fill: none; height: 24px; width: 24px; }
.brand-name { display: grid; font-size: 18px; font-weight: 700; letter-spacing: .1em; line-height: 1.05; }
.brand-name small { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .34em; margin-top: 3px; }
.nav-item { border-radius: 8px; font-weight: 500; }
.nav-item.active { font-weight: 700; }
.cover-label { background: #f1f7fe; border-radius: 12px; }
.player-avatar { border-radius: 9px; }
.avatar { border-radius: 8px; }
.player-stars { border: 1px solid var(--line); }

/* 登录页：深青色底，说明块改成描边，不再是彩色厚块 */
.auth-intro { background: linear-gradient(160deg, #0a6d62 0%, #0c8f7e 70%, #138f9c 130%); }
.auth-intro::before, .auth-intro::after { background: #ffffff0f; }
.auth-intro .brand-mark { background: #fff; box-shadow: none; color: var(--teal); --logo-dot: #f2b21c; }
.auth-intro .brand-name small { color: #bfeae3; }
.auth-copy.auth-hero h1 { font-weight: 700; }
.auth-hero-tiles span { background: #ffffff1a; border: 1px solid #ffffff4d; border-radius: 10px; box-shadow: none; font-weight: 700; }
.tile-violet, .tile-coral { background: #ffffff1a; box-shadow: none; }
.resource-cover { box-shadow: none; }
@media (max-width: 760px) {
  .sidebar { border-radius: 16px 16px 0 0; }
  .nav-item { border-radius: 8px; }
  .nav-item.active .nav-symbol { border-radius: 8px; }
}
input, select, textarea { border-radius: 8px; }
.auth-form input, .auth-form select, .resource-form textarea { border-radius: 8px; }
.ai-settings-panel { max-width: 760px; }
.ai-settings-panel .ai-settings-fields { margin-top: 14px; }
.ai-settings-fields input { border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.ai-settings-fields label { font-size: 13px; }
.ai-settings-fields .ai-security-note { font-size: 12px; }

/* ======== 知识闯关地图 ======== */
#knowledgeGrid { display: block; }
.qm-wrap { align-items: start; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.qm-wrap.is-wide { grid-template-columns: minmax(0, 1fr) 320px; }
.qm-main { min-width: 0; }
.qm-head { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 6px 20px; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 14px; padding: 18px 22px; }
.qm-head .eyebrow { color: var(--teal-press); font-size: 12px; font-weight: 700; letter-spacing: .04em; margin: 0 0 4px; }
.qm-head h2 { font-size: 24px; letter-spacing: .02em; margin: 0 0 4px; }
.qm-head .muted { font-size: 13px; margin: 0; }
.qm-head-ring, .qm-ring { align-items: center; background: conic-gradient(var(--teal) var(--qm-p), #e3efed 0); border-radius: 50%; display: flex; flex: 0 0 auto; height: 76px; justify-content: center; width: 76px; }
.qm-head-ring > span, .qm-ring > span { align-items: center; background: #fff; border-radius: 50%; display: flex; flex-direction: column; height: 62px; justify-content: center; line-height: 1.1; width: 62px; }
.qm-head-ring b, .qm-ring b { color: var(--teal-press); font-size: 17px; }
.qm-head-ring small, .qm-ring small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.qm-legend { border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; grid-column: 1 / -1; list-style: none; margin: 8px 0 0; padding: 10px 0 0; }
.qm-legend li { align-items: center; color: var(--ink-soft); display: inline-flex; font-size: 12px; gap: 6px; }
.qm-legend i { border-radius: 50%; display: inline-block; height: 14px; width: 14px; }
.qm-legend i.is-new { background: #fff; border: 2px solid var(--teal); }
.qm-legend i.is-learning { background: conic-gradient(var(--teal) 200deg, #d5e9e5 0); }
.qm-legend i.is-mastered { background: var(--teal); }
.qm-legend i.is-empty { background: #f6f8f8; border: 1.5px dashed #b9c7c5; }

.quest-map { border: 1px solid #d6ebee; border-radius: 16px; overflow: hidden; position: relative; }
.qm-svg { display: block; left: 0; position: absolute; top: 0; }
.qm-svg text { fill: var(--ink-soft); font-family: inherit; font-size: 12px; font-weight: 700; }
.qm-compass text { fill: #8aa3a0; font-size: 11px; }
.qm-road-bed { fill: none; stroke: #fff; stroke-linecap: round; stroke-width: 15; }
.qm-road { fill: none; stroke: #9fc9c3; stroke-dasharray: 2 9; stroke-linecap: round; stroke-width: 4; }
.qm-road.is-done { stroke: var(--teal); stroke-dasharray: none; stroke-width: 5; }

/* 每章一块“陆地”：外层不挡点击，只有标题牌和站点能点 */
.quest-map .knowledge-chapter.qm-region { background: transparent !important; border: 0 !important; border-radius: 0; box-shadow: none !important; left: 0; margin: 0; overflow: visible; padding: 0; pointer-events: none; position: absolute; right: 0; }
.quest-map .qm-region > * { pointer-events: auto; }
.quest-map .knowledge-chapter-heading.qm-banner { align-items: center; background: #fffffff2; border: 1px solid #dce8e6; border-left: 4px solid var(--qm-accent); border-radius: 10px; box-shadow: 0 8px 22px -16px #1f2c3a59; display: flex; flex-direction: row; gap: 12px; justify-content: space-between; margin: 0; overflow: hidden; padding: 12px 16px 14px; position: absolute; }
.quest-map .qm-banner.is-compact { align-items: stretch; flex-direction: column; gap: 6px; justify-content: center; padding: 10px 14px 13px; }
.quest-map .qm-banner-text { min-width: 0; }
.quest-map .qm-banner .eyebrow { align-items: center; color: var(--qm-ink); display: flex; font-size: 11.5px; font-weight: 700; gap: 4px; margin: 0 0 3px; }
.quest-map .qm-banner h2 { color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.quest-map .qm-banner .chapter-heading-actions { align-items: center; display: flex; flex: 0 0 auto; flex-direction: row; gap: 10px; justify-content: space-between; padding: 0; }
.quest-map .qm-banner .chapter-heading-actions > span { color: var(--muted); font-size: 12px; font-weight: 600; padding: 0; white-space: nowrap; }
.quest-map .qm-banner .chapter-heading-actions .button-outline { border-color: #c9dcd9; color: var(--qm-ink); min-height: 32px; padding: 4px 12px; }
.quest-map .knowledge-chapter.is-empty .qm-banner { border-left-color: #c8d3d2; }
.quest-map .knowledge-chapter.is-empty .qm-banner h2 { color: var(--ink-soft); }
.qm-banner-track { background: #e6f0ee; bottom: 0; height: 3px; left: 0; position: absolute; right: 0; }
.qm-banner-track span { background: var(--qm-accent); display: block; height: 100%; }
.qm-medal { height: 15px; width: 15px; }

/* 站点 */
.quest-map .knowledge-item.qm-node { background: none; border: 0; border-radius: 50%; box-shadow: none; color: inherit; cursor: pointer; font: inherit; margin: 0; padding: 0; position: absolute; }
.qm-dot { align-items: center; background: #fff; border: 3px solid var(--teal); border-radius: 50%; box-shadow: 0 4px 0 #0c8f7e22, 0 6px 14px -6px #0c8f7e66; display: flex; height: 100%; justify-content: center; position: relative; transition: transform .15s ease, box-shadow .15s ease; width: 100%; }
.qm-dot b { color: var(--teal-press); font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.qm-node:hover .qm-dot { transform: translateY(-2px); }
.qm-node.is-learning .qm-dot { background: radial-gradient(circle at center, #fff 0 calc(50% - 6px), transparent calc(50% - 5px)), conic-gradient(var(--teal) var(--qm-deg), #d5e9e5 0); border-color: #fff; box-shadow: 0 0 0 1px #c4dfdb, 0 6px 14px -6px #0c8f7e66; }
.qm-node.is-mastered .qm-dot { background: var(--teal); border-color: #fff; box-shadow: 0 0 0 2px var(--teal), 0 6px 14px -6px #0c8f7e99; }
.qm-node.is-mastered .qm-dot svg { fill: none; height: 26px; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; width: 26px; }
.qm-node.is-mastered .qm-dot::after { background: #f2b21c; border: 2px solid #fff; border-radius: 50%; content: ""; height: 12px; position: absolute; right: -3px; top: -3px; width: 12px; }
.qm-node.is-empty .qm-dot { background: #f7f9f9; border: 2px dashed #b9c7c5; box-shadow: none; }
.qm-node.is-empty .qm-dot b { color: #8f9ea0; font-weight: 700; }
.qm-node.is-current .qm-dot::before { animation: qm-pulse 2.2s ease-out infinite; border: 2px solid var(--teal-bright); border-radius: 50%; content: ""; inset: -9px; position: absolute; }
@keyframes qm-pulse { 0% { opacity: .9; transform: scale(.9); } 70% { opacity: 0; transform: scale(1.25); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qm-node.is-current .qm-dot::before { animation: none; opacity: .6; } }
.qm-here { background: #e8613f; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 700; left: 50%; line-height: 1; padding: 5px 8px; position: absolute; top: -28px; transform: translateX(-50%); white-space: nowrap; }
.qm-here::after { border: 5px solid transparent; border-top-color: #e8613f; content: ""; left: 50%; margin-left: -5px; position: absolute; top: 100%; }
.qm-node.is-selected .qm-dot { outline: 3px solid #2f84e0; outline-offset: 4px; }
.qm-node:focus-visible { outline: none; }
.qm-node:focus-visible .qm-dot { outline: 3px solid #2f84e0; outline-offset: 4px; }
.qm-label { display: grid; gap: 2px; position: absolute; text-align: center; }
.qm-label strong { color: var(--ink); display: -webkit-box; font-size: 13px; font-weight: 700; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; overflow: hidden; overflow-wrap: anywhere; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff; }
.qm-label small { color: var(--muted); font-size: 11px; font-weight: 600; text-shadow: 0 0 3px #fff; }
.qm-node.is-empty .qm-label strong { color: #7f8f92; font-weight: 600; }
.qm-node.is-mastered .qm-label small { color: var(--teal-press); }
.qm-node.is-selected .qm-label strong { color: #1d62b5; }

/* 终点 */
.qm-finale { align-items: center; display: flex; flex-direction: column; gap: 3px; position: absolute; transform: translate(-50%, -38px); }
.qm-finale-badge { align-items: center; background: #fff; border: 2px solid #e6d7aa; border-radius: 50%; box-shadow: 0 6px 16px -8px #b9842d80; display: flex; height: 54px; justify-content: center; width: 54px; }
.qm-finale-badge svg { fill: none; height: 26px; stroke: #b9842d; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 26px; }
.qm-finale strong { color: var(--ink); font-size: 13px; }
.qm-finale small { color: var(--muted); font-size: 11px; }
.qm-finale.is-done .qm-finale-badge { background: #f2b21c; border-color: #fff; box-shadow: 0 0 0 2px #f2b21c, 0 8px 18px -8px #b9842d; }
.qm-finale.is-done .qm-finale-badge svg { stroke: #fff; }

/* 右侧（手机上是底部弹出）详情 */
.qm-panel-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; border-top: 4px solid var(--qm-accent); padding: 18px 20px 14px; position: relative; }
.qm-wrap.is-wide .qm-panel { position: sticky; top: 20px; }
.qm-panel .eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; margin: 0 28px 6px 0; }
.qm-panel h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
.qm-panel-num { color: var(--teal-press); margin-right: 8px; }
.qm-panel-here { background: #fdece6; border-radius: 99px; color: #c4471f; font-size: 12px; font-weight: 700; margin-left: 6px; padding: 3px 10px; }
.qm-panel-stats { align-items: center; display: flex; gap: 16px; margin: 16px 0 8px; }
.qm-panel-stats dl { display: grid; flex: 1; gap: 6px; margin: 0; }
.qm-panel-stats dl > div { display: flex; font-size: 13px; justify-content: space-between; }
.qm-panel-stats dt { color: var(--muted); }
.qm-panel-stats dd { font-weight: 700; margin: 0; }
.qm-panel-note { color: var(--ink-soft); font-size: 13px; line-height: 1.7; margin: 12px 0 4px; }
.qm-panel-actions { display: grid; gap: 8px; margin: 14px 0 6px; }
.qm-panel-actions .button { width: 100%; }
.qm-panel-steps { align-items: center; border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: 12px; justify-content: space-between; margin-top: 10px; padding-top: 10px; }
.qm-panel-steps .text-button { background: none; border: 0; cursor: pointer; font-size: 13px; padding: 4px 2px; }
.qm-panel-steps .text-button:disabled { color: #b8c4c3; cursor: default; }
.qm-panel-close { background: #f1f5f5; border: 0; border-radius: 50%; color: var(--ink-soft); cursor: pointer; display: none; font-size: 18px; height: 30px; line-height: 1; position: absolute; right: 12px; top: 12px; width: 30px; }

/* 窄屏：详情从底部弹出，点站点时出现 */
.qm-wrap:not(.is-wide) .qm-panel { bottom: 0; left: 0; max-height: 72vh; opacity: 0; overflow: auto; padding: 0 12px 12px; pointer-events: none; position: fixed; right: 0; transform: translateY(16px); transition: opacity .18s ease, transform .18s ease, visibility 0s .18s; visibility: hidden; z-index: 60; }
.qm-wrap:not(.is-wide) .qm-panel.is-open { opacity: 1; pointer-events: auto; transform: none; transition: opacity .18s ease, transform .18s ease; visibility: visible; }
.qm-wrap:not(.is-wide) .qm-panel-card { box-shadow: 0 -10px 40px -12px #1f2c3a59; margin: 0 auto; max-width: 560px; }
.qm-wrap:not(.is-wide) .qm-panel-close { display: block; }
@media (max-width: 760px) {
  .qm-wrap:not(.is-wide) .qm-panel { bottom: 62px; }
  .qm-head { gap: 4px 12px; padding: 14px 16px; }
  .qm-head h2 { font-size: 20px; }
  .qm-head-ring { height: 64px; width: 64px; }
  .qm-head-ring > span { height: 52px; width: 52px; }
  .qm-head-ring b { font-size: 15px; }
  .qm-legend { gap: 6px 12px; }
  .quest-map { border-radius: 12px; }
  .quest-map .qm-banner h2 { font-size: 15px; }
  .qm-label strong { font-size: 12px; }
  .qm-dot b { font-size: 12px; }
}
.quest-map .qm-banner > .qm-banner-track { height: 3px; padding: 0; text-align: left; white-space: normal; }
.qm-panel-note:empty { display: none; }

/* ---- 翻章：上一章 / 下一章 ---- */
.qm-pager { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); margin-bottom: 14px; padding: 10px 12px; }
.qm-pager-bottom { margin: 14px 0 0; }
.qm-pager .button { align-items: center; display: inline-flex; flex-direction: column; gap: 1px; justify-content: center; line-height: 1.25; min-height: 44px; min-width: 0; padding: 6px 14px; }
.qm-pager .button small { font-size: 11px; font-weight: 500; max-width: 100%; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-pager-prev { justify-self: start; }
.qm-pager-next { justify-self: end; }
.qm-pager .button:disabled { background: #f4f7f7; border-color: #e3ebea; color: #a9b7b6; cursor: not-allowed; opacity: 1; }
.qm-pager-mid { align-items: center; display: grid; gap: 6px; justify-items: center; min-width: 0; text-align: center; }
.qm-pager-mid strong { font-size: 14px; }
.qm-pager-mid > span { color: var(--muted); font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-dot-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.qm-dot-tab { align-items: center; background: #fff; border: 2px solid var(--teal); border-radius: 50%; color: var(--teal-press); cursor: pointer; display: inline-flex; font-size: 12px; font-weight: 800; height: 28px; justify-content: center; padding: 0; position: relative; width: 28px; }
.qm-dot-tab svg { fill: none; height: 15px; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; width: 15px; }
.qm-dot-tab.is-done { background: var(--teal); }
.qm-dot-tab.is-empty { background: #f7f9f9; border: 1.5px dashed #b9c7c5; color: #8f9ea0; }
.qm-dot-tab.has-current::after { border: 2px solid var(--teal-bright); border-radius: 50%; content: ""; inset: -5px; position: absolute; }
.qm-dot-tab.is-shown { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2f84e0; }
.qm-dot-tab:focus-visible { outline: 3px solid #2f84e0; outline-offset: 3px; }
.qm-note { background: #fff; border: 1px dashed #c9dcd9; border-radius: 10px; color: var(--ink-soft); margin: 12px 0 0; padding: 12px 14px; text-align: center; }

/* 章末的“前往下一章”路牌（和终点奖杯同一位置）*/
button.qm-gate { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 6px 10px; }
.qm-gate strong { color: var(--ink); }
.qm-gate small { max-width: 190px; text-align: center; }
.qm-gate .qm-finale-badge svg { stroke: var(--teal-press); }
.qm-gate:hover .qm-finale-badge { transform: translateX(2px); }
.qm-gate .qm-finale-badge { transition: transform .15s ease; }
.qm-gate.is-done .qm-finale-badge { background: var(--teal); border-color: #fff; box-shadow: 0 0 0 2px var(--teal), 0 8px 18px -8px #0c8f7e; }
.qm-gate.is-done .qm-finale-badge svg { stroke: #fff; }
.qm-gate:focus-visible { outline: 3px solid #2f84e0; outline-offset: 2px; }
@media (max-width: 760px) {
  .qm-pager { gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; }
  .qm-pager-mid { grid-column: 1 / -1; grid-row: 1; }
  .qm-pager-prev { grid-row: 2; }
  .qm-pager-next { grid-row: 2; }
  .qm-pager .button { width: 100%; }
  .qm-pager-bottom .qm-pager-mid { display: none; }
  .qm-pager-bottom .qm-pager-prev, .qm-pager-bottom .qm-pager-next { grid-row: 1; }
  .qm-dot-tab { height: 30px; width: 30px; }
}

/* ======== 紧凑：整体收小一档（电脑端），保留手机端的可点大小 ======== */
:root { --radius: 8px; }
.view h1, .view h2, .view h3 { letter-spacing: 0; }
.qm-node.is-empty .qm-label strong { font-weight: 600; }

@media (min-width: 761px) {
  body { font-size: 14px; line-height: 1.5; }
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); background: linear-gradient(90deg, #fbfffe 200px, transparent 200px); }
  .sidebar { padding: 16px 10px 12px; }
  .brand-lockup { gap: 9px; }
  .brand-mark { border-radius: 8px; flex-basis: 30px; height: 30px; width: 30px; }
  .brand-glyph { height: 21px; width: 21px; }
  .brand-name { font-size: 16px; }
  .brand-name small { font-size: 7px; margin-top: 2px; }
  .cover-label { border-radius: 10px; gap: 9px; margin: -6px 0 14px; padding: 8px 10px; }
  .player-avatar { border-radius: 8px; flex-basis: 32px; font-size: 14px; height: 32px; }
  .player-info strong { font-size: 13.5px; }
  .player-info small { font-size: 11px; }
  .player-stars { font-size: 12px; padding: 2px 8px 2px 5px; }
  .player-stars svg { height: 14px; width: 14px; }
  .main-nav { gap: 2px; }
  .nav-caption { font-size: 11px; margin: 0 10px 6px; }
  .nav-item { border-radius: 7px; font-size: 13.5px; gap: 10px; min-height: 37px; padding: 6px 10px; }
  .nav-symbol { flex-basis: 19px; height: 19px; width: 19px; }
  .nav-badge { font-size: 11px; }
  .sidebar-bottom { gap: 6px; padding-top: 10px; }
  .topbar { height: 50px; padding: 0 28px; }
  .breadcrumb { font-size: 12.5px; }
  .grade-pill { font-size: 12px; padding: 3px 10px; }
  .avatar { border-radius: 7px; font-size: 12px; height: 26px; width: 26px; }
  .page-content { max-width: 1180px; padding: 22px 28px 44px; }
  .page-heading { margin-bottom: 16px; }
  .page-heading h1 { font-size: 23px; margin-bottom: 5px; }
  .page-heading > .muted, .page-heading .muted { font-size: 13px; }
  .section-heading { margin: 22px 0 9px; }
  .section-heading h2, .panel-heading h2 { font-size: 16px; }
  #todayLabel { font-size: 12.5px; }

  /* 按钮、输入框 */
  .button { border-radius: 7px; font-size: 13px; min-height: 34px; padding: 5px 13px; }
  .button-small { font-size: 12.5px; min-height: 29px; padding: 3px 11px; }
  select, input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="search"], input[type="tel"], input[type="email"] { font-size: 13px; min-height: 34px; padding: 5px 10px; }
  .auth-form input, .auth-form select { min-height: 40px; }
  textarea { font-size: 13px; }
  label, .select-label, .field-label { font-size: 12px; }
  .practice-toolbar, .toolbar-row { gap: 10px; }
  .practice-toolbar { border-radius: 10px; padding: 10px 14px; }
  .resource-chip { font-size: 12.5px; padding: 5px 12px; }
  .resource-search input { min-height: 36px; }

  /* 首页 */
  .home-feature-grid { gap: 12px; }
  .progress-panel { border-radius: 12px; padding: 14px 18px; }
  .progress-panel h2 { font-size: 14px; }
  .progress-main { margin: 6px 0 9px; }
  .progress-main strong { font-size: 32px; }
  .progress-main > span, .progress-main span, .progress-main #dailyGoalText { font-size: 13px; }
  .daily-boxes { gap: 5px; margin-bottom: 9px; }
  .daily-box { border-radius: 7px; height: 28px; width: 28px; }
  .daily-box svg { height: 16px; width: 16px; }
  #dailyEncouragement { font-size: 12px; }
  .feature-panel { border-radius: 12px; min-height: 150px; padding: 16px 22px; }
  .feature-copy h2 { font-size: 20px; margin-bottom: 5px; }
  .feature-copy > p:not(.eyebrow) { font-size: 13px; }
  .feature-diagram { height: 118px; }
  .stat-strip { gap: 10px; margin-top: 12px; }
  .stat-cell { border-radius: 10px; min-height: 64px; padding: 10px 14px; }
  .stat-cell > span { font-size: 12px; }
  .stat-cell strong { font-size: 23px; }
  .knowledge-progress-list, .recent-activity, .report-knowledge { border-radius: 10px; }
  .knowledge-progress-row, .activity-row, .report-knowledge-row { padding-block: 9px; padding-inline: 14px; }
  .knowledge-progress-row strong { font-size: 13px; }
  .knowledge-progress-row .row-status, .activity-row small { font-size: 11.5px; }
  .empty-state, .empty-line { border-radius: 10px; padding: 14px; }

  /* 练习 */
  .practice-card { border-radius: 12px; padding: 16px 20px; }
  .question-stem { font-size: 17px; line-height: 1.75; margin: 12px 0 14px; }
  .choice-list { gap: 7px; }
  .choice-option { border-radius: 9px; font-size: 14.5px; padding: 9px 12px; }
  .choice-letter { flex-basis: 22px; height: 22px; width: 22px; }
  .written-answer { border-radius: 9px; font-size: 14px; padding: 9px 12px; }
  .feedback > strong { font-size: 15px; }
  .result-badge { height: 38px; width: 38px; }

  /* 错题、报告、资料 */
  .mistake-review-bar { border-radius: 10px; padding: 12px 16px; }
  .mistake-review-bar strong { font-size: 16px; }
  .mistake-paper-controls, .mistake-item { border-radius: 10px; }
  .mistake-item { padding: 12px 14px 12px 18px; }
  .mistake-stem { font-size: 14.5px; }
  .report-metric { border-radius: 10px; padding: 12px 14px; }
  .report-metric strong { font-size: 25px; margin-top: 4px; }
  .week-bars { border-radius: 10px; }
  .resource-card { border-radius: 10px; gap: 14px; padding: 13px 16px; }
  .resource-head h2 { font-size: 16px; margin-top: 2px; }
  .resource-intro { font-size: 13px; line-height: 1.65; margin-bottom: 9px; }
  .resource-meta { font-size: 11.5px; margin: 4px 0 6px; }
  .resource-cover.has-image { flex-basis: 118px; width: 118px; }
  .resource-cover.has-image.is-wide { flex-basis: 170px; width: 170px; }
  .resource-cover { flex-basis: 78px; width: 78px; }
  .settings-panel { padding: 16px 18px; }

  /* 登录页 */
  .auth-panel { border-radius: 12px; padding: 24px; }
  .auth-heading h2 { font-size: 22px; margin-bottom: 14px; }
  .auth-copy.auth-hero h1 { font-size: clamp(30px, 3.4vw, 40px); }
  .auth-copy.auth-hero > p { font-size: 14px; margin-bottom: 18px; }
  .auth-hero-tiles span { font-size: 14px; min-width: 150px; padding: 10px 13px; }
  .auth-hero-tiles small { font-size: 11px; }
  .segment { min-height: 34px; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .app-shell { grid-template-columns: 184px minmax(0, 1fr); background: linear-gradient(90deg, #fbfffe 184px, transparent 184px); }
  .page-content { padding-inline: 20px; }
}

/* ---- 知识闯关地图：整体小一号 ---- */
.qm-wrap { gap: 18px; }
.qm-wrap.is-wide { grid-template-columns: minmax(0, 1fr) 280px; }
.qm-head { border-radius: 10px; gap: 4px 16px; margin-bottom: 10px; padding: 12px 16px; }
.qm-head .eyebrow { font-size: 11px; margin-bottom: 2px; }
.qm-head h2 { font-size: 19px; margin-bottom: 2px; }
.qm-head .muted { font-size: 12px; }
.qm-head-ring, .qm-ring { height: 58px; width: 58px; }
.qm-head-ring > span, .qm-ring > span { height: 46px; width: 46px; }
.qm-head-ring b, .qm-ring b { font-size: 14px; }
.qm-head-ring small, .qm-ring small { font-size: 9px; }
.qm-legend { gap: 4px 14px; margin-top: 4px; padding-top: 8px; }
.qm-legend li { font-size: 11.5px; }
.qm-legend i { height: 12px; width: 12px; }
.qm-pager { border-radius: 10px; gap: 8px; margin-bottom: 10px; padding: 7px 10px; }
.qm-pager-bottom { margin-top: 10px; }
.qm-pager .button { min-height: 36px; padding: 3px 12px; }
.qm-pager .button small { font-size: 10.5px; }
.qm-pager-mid { gap: 4px; }
.qm-pager-mid strong { font-size: 13px; }
.qm-pager-mid > span { font-size: 11.5px; }
.qm-dot-tabs { gap: 5px; }
.qm-dot-tab { font-size: 11px; height: 24px; width: 24px; }
.qm-dot-tab svg { height: 13px; width: 13px; }
.qm-dot-tab.has-current::after { inset: -4px; }
.quest-map { border-radius: 12px; }
.qm-road-bed { stroke-width: 12; }
.qm-road { stroke-width: 3.2; }
.qm-road.is-done { stroke-width: 4; }
.quest-map .knowledge-chapter-heading.qm-banner { border-radius: 8px; padding: 9px 13px 11px; }
.quest-map .qm-banner.is-compact { gap: 4px; padding: 8px 12px 11px; }
.quest-map .qm-banner .eyebrow { font-size: 11px; margin-bottom: 1px; }
.quest-map .qm-banner h2 { font-size: 15px; line-height: 1.3; }
.quest-map .qm-banner .chapter-heading-actions { gap: 8px; }
.quest-map .qm-banner .chapter-heading-actions > span { font-size: 11.5px; }
.quest-map .qm-banner .chapter-heading-actions .button-outline { font-size: 12.5px; min-height: 28px; padding: 2px 10px; }
.qm-banner-track { height: 3px; }
.qm-dot { border-width: 2.5px; box-shadow: 0 3px 0 #0c8f7e1c, 0 5px 11px -6px #0c8f7e66; }
.qm-dot b { font-size: 12px; }
.qm-node.is-mastered .qm-dot svg { height: 22px; width: 22px; }
.qm-node.is-mastered .qm-dot::after { height: 10px; right: -3px; top: -3px; width: 10px; }
.qm-node.is-learning .qm-dot { background: radial-gradient(circle at center, #fff 0 calc(50% - 5px), transparent calc(50% - 4px)), conic-gradient(var(--teal) var(--qm-deg), #d5e9e5 0); }
.qm-node.is-current .qm-dot::before { inset: -7px; }
.qm-here { border-radius: 5px; font-size: 10.5px; padding: 3px 7px; top: -24px; }
.qm-here::after { border-width: 4px; margin-left: -4px; }
.qm-label { gap: 1px; }
.qm-label strong { font-size: 12px; line-height: 1.25; }
.qm-label small { font-size: 10.5px; }
.qm-finale { gap: 2px; transform: translate(-50%, -32px); }
.qm-finale-badge { height: 44px; width: 44px; }
.qm-finale-badge svg { height: 22px; width: 22px; }
.qm-finale strong { font-size: 12px; }
.qm-finale small { font-size: 10.5px; }
button.qm-gate { padding: 4px 8px; }
.qm-gate small { max-width: 170px; }
.qm-panel-card { border-radius: 10px; padding: 14px 16px 10px; }
.qm-panel .eyebrow { font-size: 11px; margin-bottom: 4px; }
.qm-panel h3 { font-size: 16px; margin-bottom: 8px; }
.qm-panel-here { font-size: 11px; padding: 2px 8px; }
.qm-panel-stats { gap: 12px; margin: 12px 0 6px; }
.qm-panel-stats dl { gap: 4px; }
.qm-panel-stats dl > div { font-size: 12px; }
.qm-panel-note { font-size: 12px; margin-top: 8px; }
.qm-panel-actions { gap: 6px; margin: 10px 0 4px; }
.qm-panel-steps { font-size: 11px; margin-top: 8px; padding-top: 7px; }
.qm-panel-steps .text-button { font-size: 12px; }
@media (max-width: 760px) {
  .qm-head h2 { font-size: 18px; }
  .qm-head-ring { height: 52px; width: 52px; }
  .qm-head-ring > span { height: 42px; width: 42px; }
  .qm-pager .button { min-height: 40px; }
  .qm-dot-tab { height: 30px; width: 30px; }
  .qm-label strong { font-size: 11.5px; }
  .qm-dot b { font-size: 12px; }
}

/* 紧凑：压住旧规则里写死的最小高度（电脑端）*/
@media (min-width: 761px) {
  .knowledge-progress-row { min-height: 44px; gap: 14px; }
  .activity-row { min-height: 40px; padding: 7px 2px; }
  .report-knowledge-row { min-height: 40px; }
  .knowledge-progress-row strong, .activity-row strong, .report-knowledge-row strong { font-size: 13px; }
  .knowledge-progress-row .row-status, .report-knowledge-row > span { font-size: 11.5px; }
  .auth-panel select, .select-label select, .practice-toolbar select, .question-bank-toolbar select, .question-bank-search input,
  .import-controls-row input, .import-controls-row select, .student-search input, .question-chapter-editor select { min-height: 34px; padding: 4px 10px; }
  .question-bank-toolbar .question-bank-review-filter { min-height: 34px; }
  .practice-toolbar label, .select-label { gap: 4px; }
  .practice-toolbar label { min-width: 120px; }
  .practice-toolbar select, .toolbar-row select { font-size: 13px; }
  .assignment-submission-row, .assignment-pending-row { padding-block: 8px; }
  .completion-metric strong { font-size: 20px; margin: 3px 0; }
  .student-card-head h2, .student-exam-card h2, .admin-exam-card h2 { font-size: 15px; }
  .knowledge-chapter-heading h2 { font-size: 17px; }
  .chapter-picker-row { padding-block: 8px; }
  .chapter-book-title { font-size: 15px; margin-bottom: 6px; }
  .dialog-heading h2 { font-size: 18px; }
  .rating-head h2 { font-size: 19px; }
  .resource-form-row { gap: 10px; }
  .toolbar-row { margin-bottom: 12px; }
}
input, select, textarea { border-radius: 8px !important; }
@media (min-width: 761px) { .auth-form input, .auth-form select { border-radius: 9px !important; } }

/* ======== 错题卡片：小巧精致 ======== */
.mistake-list { gap: 8px; }
.mistake-item { background: #fff; border: 1px solid #e3eeec; border-radius: 10px; box-shadow: inset 3px 0 0 var(--coral); padding: 9px 14px 9px 17px; transition: border-color .15s ease, box-shadow .15s ease; }
.mistake-item:hover { border-color: #cfe3df; }
.mistake-item.is-waiting { box-shadow: inset 3px 0 0 var(--sun); }
.mistake-item.selected-for-paper { background: #f6fcfb; border-color: var(--teal-bright); box-shadow: inset 3px 0 0 var(--teal-bright); }
.mistake-item-head { align-items: center; gap: 10px; margin-bottom: 4px; }
.mistake-select-label { flex: 1 1 auto; gap: 8px; min-width: 0; }
.mistake-select-label input { height: 15px; width: 15px; }
.mistake-item-head strong { color: var(--ink); font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mistake-tags { color: var(--muted); flex: 0 0 auto; font-size: 11.5px; white-space: nowrap; }
.mistake-item-head .review-stage { border-radius: 99px; flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 1px 9px; white-space: nowrap; }
.mistake-stem-wrap { position: relative; }
.mistake-stem { color: var(--ink); font-size: 14px; font-weight: 400; line-height: 1.65; margin: 0; }
.mistake-stem strong, .mistake-stem b { font-weight: 600; }
.mistake-stem-wrap.is-clamped .mistake-stem { max-height: 84px; overflow: hidden; }
.mistake-stem-wrap.is-clamped::after { background: linear-gradient(to bottom, #fff0, #fff 85%); bottom: 0; content: ""; height: 26px; left: 0; pointer-events: none; position: absolute; right: 0; }
.mistake-item.selected-for-paper .mistake-stem-wrap.is-clamped::after { background: linear-gradient(to bottom, #f6fcfb00, #f6fcfb 85%); }
.mistake-expand { background: none; border: 0; color: var(--teal); cursor: pointer; font-size: 12px; font-weight: 700; margin-top: 1px; padding: 2px 0; }
.mistake-expand:hover { color: var(--teal-press); }
.mistake-item .question-image { margin-top: 6px; max-height: 150px; }
.mistake-item-foot { border-top: 0; gap: 8px; margin-top: 5px; padding-top: 0; }
.mistake-item-foot .muted { font-size: 11.5px; }
.mistake-cause { font-size: 11.5px; gap: 5px; }
.mistake-cause select { border-radius: 7px !important; font-size: 12px; min-height: 28px !important; padding: 2px 22px 2px 8px !important; }
.mistake-item-foot .button-small { font-size: 12px; min-height: 28px; padding: 2px 11px; }
.mistake-paper-controls { padding: 10px 14px; }
@media (max-width: 760px) {
  .mistake-item { padding: 9px 12px 9px 15px; }
  .mistake-item-head { flex-wrap: wrap; row-gap: 3px; }
  .mistake-select-label { flex-basis: 100%; order: 1; }
  .mistake-item-head .review-stage { order: 0; }
  .mistake-stem { font-size: 14px; }
  .mistake-item-foot { flex-wrap: wrap; row-gap: 6px; }
  .mistake-item-foot .button-small { min-height: 34px; }
  .mistake-cause select { min-height: 34px !important; }
}
.mistake-list > *, .mistake-item { min-width: 0; }
.mistake-select-label strong { min-width: 0; }
.mistake-stem-wrap, .mistake-stem { min-width: 0; }
@media (max-width: 760px) {
  .mistake-item-head { align-items: center; }
  .mistake-select-label { max-width: 100%; }
  .mistake-tags { display: none; }
}
@media (max-width: 760px) {
  .mistake-item-head { flex-wrap: nowrap; gap: 8px; }
  .mistake-select-label { flex: 1 1 auto; flex-basis: auto; order: 0; }
  .mistake-item-head .review-stage { order: 1; }
}

/* ======== 联机版 ======== */
.is-online [data-view="courses"], .is-online #backupNav, .is-online #view-courses, .is-online #view-backup { display: none !important; }
.sync-state .status-dot.is-warning { background: var(--coral); }
.password-form { max-width: 460px; margin-top: 16px; }
.password-form h2 { font-size: 16px; margin: 0; }
#addStudentsText, #addStudentsOutput { font-family: Consolas, "Microsoft YaHei", monospace; font-size: 12.5px; line-height: 1.6; }
#addStudentsOutput { background: #f6fbfa; }
#addStudentsResult { display: grid; gap: 8px; }
.site-filing { display: none; }
.is-online .site-filing { display: block; padding: 16px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.site-filing a { color: inherit; text-decoration: none; }
.site-filing a:hover, .site-filing a:focus-visible { text-decoration: underline; }
