/* ============================================================
   背诵网页 · 视觉系统（移植自博主 v40 verified source + 模板样式）
   仅对“头像资源”等无素材部分做等价适配，色值/字号/圆角/间距保持一致。
   ============================================================ */

:root {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --background: #fffbed;
  --foreground: #354b38;
  --card: #fffdf6;
  --card-foreground: #354b38;
  --primary: #5f8b61;
  --primary-foreground: #fffdf6;
  --secondary: #f0f5e9;
  --secondary-foreground: #4f7553;
  --muted: #f6f2e6;
  --muted-foreground: #778276;
  --accent: #fbf0c9;
  --accent-foreground: #655624;
  --destructive: #b74b45;
  --border: #e8e2cf;
  --input: #e8e2cf;
  --ring: #9cbd82;
  --radius: 0.9rem;
}

* { box-sizing: border-box; }
html { background: #edf7fb; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 13% 11%, rgba(255,255,255,.9) 0 1px, transparent 1.5px) 0 0 / 17px 17px, #edf7fb;
  color: var(--foreground);
  font-family: var(--font-sans);
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.site-stage { min-height: 100vh; padding: 0; }
.app-shell { position: relative; width: min(100%, 520px); height: 100vh; height: 100dvh; min-height: 100vh; margin: 0 auto; overflow: hidden; background: var(--background); box-shadow: 0 0 80px rgba(35, 70, 58, .14); }
.app-shell-scroll { position: relative; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.app-shell-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.app-shell::before { content: ''; position: absolute; inset: 0 0 auto; height: 310px; pointer-events: none; background: linear-gradient(180deg, rgba(201,226,211,.72) 0%, rgba(231,239,213,.48) 52%, rgba(255,251,237,0) 100%); }
.site-account-mark { position: absolute; z-index: 30; top: 14px; right: 21px; color: #9a6958; font-family: "Segoe Print", "KaiTi", "STKaiti", cursive; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .025em; white-space: nowrap; pointer-events: none; }
.page-header, .recall-header, .notebook-header { position: relative; z-index: 1; padding: 30px 24px 22px; }
.page-header, .notebook-header { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { margin: 0 0 5px; color: #6d7e76; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.brand-title, .notebook-header h1 { margin: 0; font-size: 34px; font-weight: 850; letter-spacing: -.05em; }
.brand-title span { color: #e37f58; }
.date-pill { width: 72px; height: 72px; display: grid; place-content: center; text-align: center; border: 1px solid rgba(35,89,74,.15); border-radius: 50%; background: rgba(255,253,248,.8); box-shadow: 0 10px 24px rgba(48,75,65,.08); }
.date-pill span { font-size: 10px; color: #718079; line-height: 1.15; }
.date-pill strong { font-size: 24px; line-height: 1; }

.hero-card { position: relative; z-index: 1; margin: 0 16px; padding: 24px; overflow: hidden; border-radius: 26px 26px 26px 8px; background: #23594a; color: #fffdf8; box-shadow: 0 18px 38px rgba(35,89,74,.22); }
.hero-card::after { content: '记'; position: absolute; right: -12px; bottom: -42px; color: rgba(255,255,255,.055); font-family: serif; font-size: 150px; font-weight: 900; transform: rotate(-7deg); }
.hero-card__top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.hero-card__count { color: #cfe0d7; font-size: 12px; }
.hero-card h2 { position: relative; z-index: 1; margin: 22px 0 9px; font-size: 26px; line-height: 1.28; letter-spacing: -.035em; }
.hero-card p { position: relative; z-index: 1; max-width: 340px; margin: 0; color: #c9dbd2; font-size: 13px; line-height: 1.7; }
.hero-card [data-slot="progress-track"] { height: 6px; background: rgba(255,255,255,.17); }
.hero-card [data-slot="progress-indicator"] { background: #f4ca8d; }
.primary-cta { position: relative; z-index: 1; width: 100%; height: 48px; margin-top: 22px; justify-content: space-between; padding: 0 17px; background: #fffdf8; color: #23594a; border-radius: 13px; font-size: 14px; font-weight: 750; }
.primary-cta:hover { background: #f7f0e4; }

.section-block { padding: 30px 16px 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 8px 14px; }
.section-heading h2, .review-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.section-icon { width: 22px; color: #688276; }
.chapter-list { display: grid; gap: 10px; }
.topic-block { overflow: hidden; border: 1px solid #ddd6c9; border-radius: 20px 20px 20px 7px; background: #fffdf8; }
.topic-block .chapter-card { border: 0; border-bottom: 1px solid #e5ded2; border-radius: 0; }
.question-preview-list { margin: 0; padding: 5px 16px 12px; list-style: none; }
.question-preview-list li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: start; padding: 10px 2px; border-bottom: 1px dashed #e4ddd1; }
.question-preview-list li:last-child { border-bottom: 0; }
.question-preview-list span { padding-top: 1px; color: #b4a993; font-family: Georgia, serif; font-size: 11px; font-style: italic; }
.question-preview-list p { margin: 0; color: #52625a; font-size: 12px; line-height: 1.5; }
.chapter-card { display: grid; grid-template-columns: 46px 1fr 24px; align-items: center; min-height: 92px; padding: 15px 16px; border: 1px solid #e1dbcf; border-radius: 18px 18px 18px 7px; background: #fffdf8; transition: transform .18s ease, box-shadow .18s ease; }
.chapter-card--active:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(66,78,71,.09); }
.chapter-number { align-self: start; color: #9a9e94; font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.chapter-copy h3 { margin: 0; color: #213f36; font-size: 16px; }
.chapter-copy p { margin: 5px 0 0; color: #89928d; font-size: 12px; }
.chapter-arrow, .chapter-lock { width: 18px; color: #789287; }
.chapter-card--locked { opacity: .58; }
.mini-progress { height: 3px; margin-top: 12px; overflow: hidden; border-radius: 9px; background: #e8e4dc; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: #e49766; }
.tip-strip { display: grid; grid-template-columns: 22px 1fr 18px; gap: 12px; align-items: center; margin: 18px 16px 0; padding: 15px 16px; border: 1px dashed #d7cbb9; border-radius: 15px; color: #756955; background: #f9f1e3; }
.tip-strip svg { width: 18px; }
.tip-strip p { margin: 0; font-size: 12px; line-height: 1.65; }

.bottom-spacer { height: 100px; }
.bottom-nav { position: absolute; z-index: 20; left: 0; bottom: 0; width: 100%; display: grid; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(210,205,194,.9); background: rgba(255,253,248,.94); backdrop-filter: blur(18px); }
.bottom-nav--two { grid-template-columns: repeat(2, 1fr); }
.bottom-nav--three { grid-template-columns: repeat(3, 1fr); }
.bottom-nav--four { grid-template-columns: repeat(4, 1fr); }
.bottom-nav a { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; color: #93a098; font-size: 10px; }
.bottom-nav svg { width: 20px; height: 20px; }
.bottom-nav a.is-active { color: #23594a; font-weight: 750; }
.bottom-nav a.is-active::after { content: ''; position: absolute; top: -10px; width: 34px; height: 3px; border-radius: 0 0 5px 5px; background: #23594a; }

.recall-header { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding-top: 46px; }
.icon-link { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(35,89,74,.12); border-radius: 50%; background: rgba(255,253,248,.72); }
.icon-link svg { width: 18px; }
.recall-header p { margin: 0; color: #697b73; font-size: 11px; }
.recall-header strong { display: block; margin-top: 3px; font-size: 13px; }
.question-index { color: rgba(35,89,74,.22); font-family: Georgia, serif; font-size: 28px; font-style: italic; }
.recall-header-actions { align-self: start; display: flex; gap: 6px; align-items: center; margin-top: 28px; }
.recall-header-button { min-width: 42px; height: 43px; display: grid; place-items: center; gap: 0; padding: 4px 7px 3px; border: 1px solid rgba(35,89,74,.14); border-radius: 12px 12px 12px 4px; color: #52685f; background: rgba(255,253,248,.82); font: inherit; cursor: pointer; }
.recall-header-button svg { width: 15px; height: 15px; }
.recall-header-button span { font-size: 8px; font-weight: 750; white-space: nowrap; }
.recall-header-next { color: #fffdf8; background: #23594a; }
.question-catalog-dialog { width: min(calc(100% - 30px), 440px); max-width: 440px; max-height: min(82vh, 680px); gap: 0; overflow: hidden; padding: 0; border-radius: 24px 24px 24px 8px; background: #fffdf8; box-shadow: 0 24px 70px rgba(28,48,41,.28); }
.question-catalog-dialog__header { padding: 22px 52px 17px 21px; border-bottom: 1px solid #e4ddd1; background: #f7f2e8; }
.question-catalog-dialog__header [data-slot="dialog-title"] { color: #193c32; font-size: 20px; font-weight: 850; }
.question-catalog-dialog__header [data-slot="dialog-description"] { margin-top: 7px; color: #7a867f; font-size: 10px; line-height: 1.55; }
.question-catalog-scroll { height: min(59vh, 480px); }
.question-catalog-list { margin: 0; padding: 7px 19px 14px; list-style: none; }
.question-catalog-list li { border-bottom: 1px dashed #ddd5c8; }
.question-catalog-list li:last-child { border-bottom: 0; }
.question-catalog-list button { width: 100%; display: grid; grid-template-columns: 27px 1fr 18px; gap: 9px; align-items: center; padding: 15px 2px; border: 0; color: #273c34; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.question-catalog-list button > span { color: #a3785a; font-family: Georgia, serif; font-size: 11px; font-style: italic; }
.question-catalog-list button > p { margin: 0; font-size: 12px; font-weight: 750; line-height: 1.55; }
.question-catalog-list button > svg { width: 15px; color: #9ba69f; }
.question-catalog-list button.is-current { color: #17382f; }
.question-catalog-list button.is-current > span { color: #fff; background: #23594a; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px 8px 8px 3px; font-style: normal; }
.recall-progress { position: relative; z-index: 1; margin: 0 24px 20px; }
.recall-progress [data-slot="progress-track"] { height: 4px; }
.recall-question-content { will-change: transform, opacity; }
.recall-question-content--next { animation: recall-page-next .22s cubic-bezier(.22,1,.36,1) both; }
.recall-question-content--previous { animation: recall-page-previous .22s cubic-bezier(.22,1,.36,1) both; }
@keyframes recall-page-next { from { opacity: .38; transform: translateX(14px); } }
@keyframes recall-page-previous { from { opacity: .38; transform: translateX(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .recall-question-content--next, .recall-question-content--previous { animation: none; }
}
.question-card { position: relative; z-index: 1; margin: 0 16px; padding: 25px 22px 28px; border: 1px solid #e0d8c9; border-radius: 8px 24px 24px 24px; background: #fffdf8; box-shadow: 0 15px 32px rgba(84,79,66,.08); touch-action: pan-y; }
.question-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.true-question-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; padding: 0 10px; border: 1px solid #f2cfaa; border-radius: 9px 9px 9px 3px; color: #ae6738; background: #fff0df; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.true-question-trigger span { width: 5px; height: 5px; border-radius: 50%; background: #dd9657; }
.true-question-trigger:hover { border-color: #e9b982; background: #ffe6cd; transform: translateY(-1px); }
.no-related { color: #9a9f9b; font-size: 9px; font-weight: 700; }
.question-label { display: inline-flex; gap: 6px; align-items: center; color: #b46643; font-size: 12px; font-weight: 750; }
.question-label svg { width: 15px; }
.question-card h1 { margin: 20px 0 16px; font-size: 25px; line-height: 1.48; letter-spacing: -.035em; }
.question-card p { margin: 0; padding-right: 42px; color: #7f8984; font-size: 12px; }
.question-card-next { position: absolute; right: 18px; bottom: 13px; width: 34px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: #9abda4; pointer-events: none; }
.question-card-next svg { width: 21px; height: 21px; stroke-width: 1.8; }
.question-card-next small { color: #b8bfbb; font-size: 7px; font-weight: 500; line-height: 1; letter-spacing: .08em; white-space: nowrap; }
.reveal-stack { display: grid; gap: 10px; padding: 14px 16px 0; }
.reveal-entry-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; align-items: stretch; }
.reveal-button { width: 100%; height: 50px; display: flex; align-items: center; gap: 7px; justify-content: flex-start; padding: 0 16px; border: 1px dashed #d1c3ac; border-radius: 12px; color: #6a5740; background: #f7ead8; box-shadow: none; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.reveal-button:hover { background: #f2e0c9; }
.reveal-panel { padding: 17px; border-radius: 18px 18px 18px 7px; animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }
.reveal-panel--clue { border: 1px solid #e3d2b9; background: #f9eddb; }
.reveal-panel--keywords { border: 1px solid #ccdcd4; background: #edf4ef; }
.reveal-panel--answer { border: 1px solid #ddd7cc; background: #fffdf8; }
.reveal-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reveal-title { display: flex; gap: 7px; align-items: center; color: #69736c; font-size: 11px; font-weight: 750; letter-spacing: .05em; }
.reveal-title svg { width: 15px; }
.clue-line { margin: 14px 0 0; color: #4f4639; font-size: 16px; font-weight: 700; line-height: 1.7; }
.clue-list { display: grid; gap: 10px; margin: 15px 0 0; padding: 0; list-style: none; }
.clue-list li { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; }
.clue-list li > span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #dec49d; border-radius: 50%; color: #8a6133; background: rgba(255,255,255,.55); font-family: Georgia, serif; font-size:12px; }
.clue-list p { margin: 0; color: #4f4639; font-size: 14px; font-weight: 650; line-height: 1.65; }
.panel-next { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding: 0 16px; border: 0; border-radius: 12px; color: #fffdf8; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 14px rgba(48,65,57,.12); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.panel-next--keywords { background: #bd7638; }
.panel-next--answer { background: #285f50; }
.panel-next:hover { filter: brightness(1.04); box-shadow: 0 8px 18px rgba(48,65,57,.17); }
.panel-next:active { transform: translateY(1px); }
.panel-next svg, .panel-collapse svg { width: 18px; height: 18px; flex: 0 0 auto; }
.panel-collapse { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 0 14px; border: 1px solid rgba(40,95,80,.28); border-radius: 11px; background: #f3f7f3; color: #285f50; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.panel-collapse:hover { background: #eaf2ec; }
.panel-next:focus-visible, .panel-collapse:focus-visible { outline: 3px solid rgba(211,136,70,.28); outline-offset: 2px; }
.panel-mini-toggle { display: flex; align-items: center; gap: 4px; width: fit-content; margin: 11px 0 0 auto; padding: 3px 2px; border: 0; background: transparent; color: #718078; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.panel-mini-toggle svg { width: 14px; height: 14px; }
.reveal-panel.is-collapsed { padding-block: 14px 10px; }
.reveal-panel.is-collapsed .panel-mini-toggle { margin-top: 7px; }
.keyword-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.keyword-row span { padding: 8px 11px; border-radius: 9px 9px 9px 3px; color: #23594a; background: #dbe9e0; font-size: 13px; font-weight: 750; }
.answer-list { display: grid; gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.answer-list li { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; }
.answer-list li > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #6a8b7c; font-family: Georgia, serif; font-size: 12px; }
.answer-list p { margin: 0; color: #526159; font-size: 12px; line-height: 1.72; }
.answer-list strong { margin-right: 6px; color: #1f3d34; }
.answer-outline { margin-top: 16px; }
.answer-outline h3 { margin: 18px 0 8px; color: #1f3d34; font-size: 15px; font-weight: 850; line-height: 1.5; }
.answer-outline h3:first-child { margin-top: 0; }
.answer-outline h4 { margin: 13px 0 7px; color: #385449; font-size: 13px; font-weight: 800; line-height: 1.55; }
.answer-outline-point { display: grid; grid-template-columns: 7px 1fr; gap: 8px; align-items: start; margin-top: 7px; }
.answer-outline-point > span { width: 5px; height: 5px; margin-top: 8px; border-radius: 50%; background: #779486; }
.answer-outline-point p, .answer-outline-text { margin: 0; color: #526159; font-size: 12px; line-height: 1.75; }
.answer-outline-text + .answer-outline-text { margin-top: 6px; }
.answer-body { min-width: 0; padding-top: 1px; }
.answer-body > h3 { margin: 0 0 7px; color: #1f3d34; font-size: 14px; font-weight: 850; line-height: 1.45; }
.answer-body > p { white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-subsection { margin-top: 12px; padding-top: 11px; border-top: 1px dashed #d8d1c6; }
.answer-subsection h4 { margin: 0 0 7px; color: #385449; font-size: 12px; font-weight: 800; line-height: 1.55; }
.answer-points { display: grid; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.answer-points li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; }
.answer-points li > b { width: 16px; height: 16px; display: grid; place-items: center; margin-top: 2px; border-radius: 5px; color: #6c7c74; background: #ece7de; font-family: Georgia, serif; font-size: 9px; font-weight: 700; }
.answer-extension { margin-top: 18px; border: 1px dashed #d5c7b5; border-radius: 12px; background: #f8f2e9; }
.answer-extension summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 13px; color: #6a5740; font-size: 12px; font-weight: 750; cursor: pointer; list-style: none; }
.answer-extension summary::-webkit-details-marker { display: none; }
.answer-extension summary::after { content: '＋'; margin-left: auto; color: #9a7650; font-size: 17px; font-weight: 400; }
.answer-extension[open] summary::after { content: '－'; }
.answer-extension summary small { color: #9a8d7e; font-size: 10px; font-weight: 600; }
.answer-extension-list { margin: 0; padding: 4px 13px 15px; border-top: 1px dashed #dfd3c4; }
.rating-card { margin: 28px 16px 0; padding: 16px; border-top: 2px solid #23594a; border-radius: 8px 8px 18px 18px; background: #fffdf8; }
.rating-card h2 { margin: 0; font-size: 16px; }
.rating-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.rating { min-height: 48px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; padding: 8px 7px; border: 1px solid; border-radius: 11px; text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.rating:hover { filter: brightness(.98); transform: translateY(-1px); }
.rating svg, .rating-dot { width: 16px; height: 16px; flex: 0 0 auto; }
.rating-dot { display: block; border: 4px solid currentColor; border-radius: 50%; background: rgba(255,255,255,.5); }
.rating span { display: block; }
.rating strong { font-size: 12px; white-space: nowrap; }
.rating small { display: none; }
.rating--clear { color: #2d7259; border-color: #b9d8c9; background: #e8f4ed; }
.rating--fuzzy { color: #a96624; border-color: #e9c693; background: #fff1dc; }
.rating--unfamiliar { color: #a34842; border-color: #e6b8b3; background: #fbe8e5; }
.rating.is-selected { box-shadow: 0 0 0 2px currentColor inset, 0 6px 14px rgba(58,68,62,.07); }
.after-rating { margin-top: 16px; padding-top: 15px; border-top: 1px dashed #ddd6c9; }
.after-rating > p { margin: 0 0 10px; color: #708078; font-size: 11px; }
.after-rating > div { display: grid; grid-template-columns: 1fr 1.15fr; gap: 8px; }
.notebook-link, .next-question { height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 11px; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.notebook-link { border: 1px solid #d7d1c6; color: #597067; background: #f7f3eb; }
.notebook-link svg, .next-question svg { width: 16px; }
.next-question { border: 0; color: #36513c; background: #c2d3bd; transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.next-question:hover, .next-question:focus-visible { color: #fff; background: #6f9272; box-shadow: 0 9px 20px rgba(72,108,77,.24); transform: translateY(-1px); }

/* ===== 复习本 ===== */
.notebook-header svg { width: 32px; height: 32px; padding: 7px; border-radius: 10px; color: #fff; background: #23594a; }
.status-summary { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 16px; }
.summary-card { min-height: 94px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; align-items: center; padding: 13px; border: 1px solid; border-radius: 18px 18px 18px 6px; text-align: left; cursor: pointer; transition: transform .18s ease; }
.summary-card.is-selected { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(54,70,62,.1); }
.summary-card strong { align-self: end; font-family: Georgia, serif; font-size: 30px; line-height: 1; }
.summary-card small { grid-column: 1 / -1; font-size: 11px; font-weight: 750; }
.summary-dot { justify-self: end; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status-clear { color: #2f725a !important; border-color: #bad8ca !important; background: #e8f3ec !important; }
.status-fuzzy { color: #a76624 !important; border-color: #e8c793 !important; background: #fff1dd !important; }
.status-unfamiliar { color: #a34c46 !important; border-color: #e6bbb6 !important; background: #fbe8e5 !important; }
.review-section { padding: 30px 16px 0; }
.review-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 7px 14px; }
.text-button { border: 0; color: #477264; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.review-list { display: grid; gap: 9px; }
.review-card { display: grid; grid-template-columns: 5px 1fr 20px; gap: 13px; align-items: center; min-height: 100px; overflow: hidden; padding: 14px 14px 14px 0; border: 1px solid #e1dbcf; border-radius: 8px 17px 17px 8px; background: #fffdf8; }
.review-rail { align-self: stretch; border-radius: 0 6px 6px 0; }
.review-meta { display: flex; gap: 8px; align-items: center; }
.review-meta > span { color: #8c9691; font-size: 10px; }
.review-copy h3 { margin: 10px 0 5px; font-size: 15px; line-height: 1.35; }
.review-copy > p { margin: 0; color: #8d9691; font-size: 10px; }
.review-card > svg { width: 17px; color: #8d9a94; }
.review-again { display: flex; align-items: center; justify-content: space-between; margin: 16px; padding: 15px 17px; border-radius: 14px; color: #fff; background: #23594a; }
.review-again span { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 750; }
.review-again svg { width: 16px; }
.review-again small { color: #c9dad2; font-size: 10px; }

/* ===== 科目优先信息架构 ===== */
.catalog-header { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; padding: 34px 24px 20px; }
.catalog-intro { margin: 9px 0 0; color: #61756c; font-size: 13px; }
.phone-only-break { display: none; }
.catalog-count { width: 70px; height: 70px; display: grid; place-content: center; text-align: center; border: 1px solid rgba(35,89,74,.14); border-radius: 20px 20px 20px 7px; background: rgba(255,253,248,.78); margin-top: 30px; }
.catalog-count strong { font-family: Georgia, serif; font-size: 27px; line-height: 1; }
.catalog-count span { margin-top: 3px; color: #718079; font-size: 10px; }
.catalog-tools { display: grid; justify-items: center; gap: 7px; position: relative; z-index: 50; }
.display-mode-trigger { width: 42px; height: 25px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; color: #657b70; background: rgba(224,237,231,.92); cursor: pointer; }
.display-mode-trigger svg { width: 19px; height: 19px; }
.display-mode-trigger:hover, .display-mode-trigger:focus-visible { color: #315946; background: #d9ebe1; outline: none; }
.display-mode-menu { width: 184px !important; padding: 6px !important; border-radius: 14px !important; background: #fffdf7 !important; }
.display-mode-option { min-height: 50px; justify-content: space-between; padding: 8px 10px !important; border-radius: 9px !important; cursor: pointer !important; }
.display-mode-option > span { display: grid; gap: 2px; }
.display-mode-option strong { color: #365442; font-size: 14px; }
.display-mode-option small { color: #8a958e; font-size: 11px; }
.display-mode-option > svg { color: #5f8b61; }
.subject-section, .notebook-subject-section { position: relative; z-index: 1; padding: 16px; }
.catalog-section-heading { align-items: center; padding: 0 7px 14px; }
.step-note { color: #8a968f; font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.subject-list { display: grid; gap: 11px; }
.subject-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 13px; align-items: center; min-height: 112px; padding: 17px; border: 1px solid #dfd8cc; border-radius: 20px 20px 20px 7px; background: #fffdf8; }
.subject-card--ready { box-shadow: 0 14px 28px rgba(58,80,70,.1); }
.subject-card--pending { opacity: .6; background: #f8f4ec; }
.subject-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px 14px 14px 5px; }
.subject-icon span { font-family: "KaiTi", "STKaiti", serif; font-size: 13px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.subject-icon--green { color: #6f8968; background: #eff6e7; }
.subject-icon--orange { color: #887c9a; background: #f5f1fa; }
.subject-icon--red { color: #668799; background: #eaf5fa; }
.subject-icon--blue { color: #907d49; background: #fff8df; }
.subject-title-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.subject-copy { min-width: 0; }
.subject-copy h3 { margin: 0; font-size: 17px; }
.subject-copy p { margin: 7px 0; color: #7c8983; font-size: 11px; line-height: 1.55; }
.subject-copy > span { color: #456b5e; font-size: 11px; font-weight: 750; }
.subject-arrow { width: 18px; color: #85938c; }
.subject-card-action { display: inline-flex; align-items: center; gap: 7px; }
.subject-start-label { padding: 4px 9px; border-radius: 999px; color: #7f9b81; background: #f0f7ef; font-size: 11px; font-weight: 700; white-space: nowrap; }
.structure-note { margin: 6px 16px 0; padding: 16px 18px; border: 1px dashed #d6c8b3; border-radius: 15px; color: #766852; background: #f9f0e1; }
.structure-note span { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 800; }
.structure-note p { margin: 0; font-size: 11px; line-height: 1.6; }

.subject-page-header { position: relative; z-index: 1; display: grid; grid-template-columns: 42px 1fr 54px; gap: 12px; align-items: start; padding: 30px 22px 22px; }
.subject-page-header h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.subject-page-header > div > p:last-child { margin: 7px 0 0; color: #687a72; font-size: 11px; }
.chapter-total { width: 52px; height: 59px; display: grid; place-content: center; text-align: center; margin-top: 30px; border-radius: 15px 15px 15px 5px; color: #fff; background: #23594a; }
.chapter-total strong { font-family: Georgia, serif; font-size: 23px; line-height: 1; }
.chapter-total span { font-size: 9px; }
.chapter-catalog { position: relative; z-index: 1; margin: 0 16px; overflow: hidden; border: 1px solid #ddd6ca; border-radius: 22px 22px 22px 7px; background: #fffdf8; }
.chapter-catalog-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px; border-bottom: 1px solid #e5ded2; background: #f8f4eb; }
.chapter-catalog-heading > span { display: flex; gap: 7px; align-items: center; color: #566a61; font-size: 11px; font-weight: 800; }
.chapter-catalog-heading svg { width: 16px; }
.chapter-catalog-list { margin: 0; padding: 0; list-style: none; }
.chapter-catalog-item { min-height: 78px; border-bottom: 1px dashed #e2dbcf; }
.chapter-catalog-row { display: grid; grid-template-columns: 1fr auto; gap: 11px; align-items: center; min-height: 78px; padding: 13px 16px; }
.chapter-catalog-item:last-child { border-bottom: 0; }
.chapter-catalog-item--focus .chapter-catalog-row { cursor: pointer; }
.chapter-catalog-item--focus .chapter-catalog-row:active { background: #ffefd6; }
.chapter-ordinal { display: block; margin-bottom: 5px; color: #998e7d; font-family: serif; font-size: 11px; }
.chapter-catalog-item h2 { margin: 0; font-size: 18px; }
.chapter-catalog-item p { margin: 5px 0 0; color: #929a96; font-size: 13px; }
.chapter-catalog-row > svg { width: 16px; color: #a6afa9; }
.flow-footnote { display: grid; grid-template-columns: auto 1fr 18px; gap: 10px; align-items: center; margin: 15px 16px; padding: 14px 16px; border: 1px dashed #d6cbbb; border-radius: 14px; color: #6f685b; }
.flow-footnote span { font-size: 10px; font-weight: 800; }
.flow-footnote p { margin: 0; font-size: 10px; line-height: 1.5; }
.flow-footnote svg { width: 16px; }

/* ===== 我的 ===== */
.me-header { position: relative; z-index: 1; padding: 47px 22px 20px; }
.me-identity-row { display: flex; gap: 14px; align-items: center; margin-top: 13px; }
.me-avatar { flex: 0 0 auto; width: 68px; height: 68px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(35,89,74,.1); border-radius: 50%; box-shadow: 0 12px 28px rgba(55,79,69,.09); font-size: 30px; }
.me-avatar--mint { background: #b9d9cb; }
.me-avatar--peach { background: #e8b89f; }
.me-avatar--sky { background: #b9d1e1; }
.me-avatar--lilac { background: #d2c3dc; }
.me-profile-copy h1 { margin: 0; font-size: 29px; line-height: 1.18; letter-spacing: -.04em; }
.me-profile-copy > span { display: block; margin-top: 7px; color: #718079; font-size: 12px; line-height: 1.55; }
.me-profile-edit { width: fit-content; min-height: 44px; display: flex; gap: 10px; align-items: center; padding: 9px 14px; border: 1px solid rgba(35,89,74,.16); border-radius: 11px 11px 11px 4px; color: #23594a; background: rgba(255,253,248,.72); box-shadow: 0 5px 14px rgba(55,79,69,.04); }
.me-profile-edit strong { font-size: 13px; }
.me-profile-edit > span { display: flex; gap: 4px; align-items: center; color: #78867f; font-size: 10px; }
.me-profile-edit svg { width: 12px; height: 12px; }
.me-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; }
.me-stats article { min-height: 118px; padding: 17px; border: 1px solid #ded8cc; border-radius: 20px 20px 20px 7px; background: #fffdf8; }
.me-stats article > span { display: flex; gap: 7px; align-items: center; color: #6f7d76; font-size: 11px; font-weight: 750; }
.me-stats article > span svg { width: 16px; height: 16px; color: #b66e49; }
.me-stats strong { display: block; margin-top: 17px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; line-height: 1; }
.me-stats strong small { margin-left: 5px; color: #8b958f; font-family: var(--font-sans); font-size: 10px; font-weight: 650; }
.me-menu { position: relative; z-index: 1; margin: 18px 16px 0; overflow: hidden; border: 1px solid #ded8cc; border-radius: 20px 20px 20px 7px; background: #fffdf8; }
.me-menu-row { display: grid; grid-template-columns: 44px 1fr 18px; gap: 12px; align-items: center; min-height: 62px; padding: 11px 16px; border-bottom: 1px dashed #e1dbcf; transition: background .16s ease, transform .16s ease; }
.me-menu-row:last-child { border-bottom: 0; }
.me-menu-row > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.me-menu-row strong { font-size: 14px; }
.me-menu-row small { color: #89938e; font-size: 10px; }
.me-menu-row > svg { width: 17px; color: #93a098; }
.me-menu-icon { width: 42px; height: 42px; display: grid; place-items:center; border-radius: 13px 13px 13px 5px; }
.me-menu-icon svg { width: 19px; }
.me-menu-icon--square { color: #23594a; background: #e1eee7; }
.me-menu-icon--records { color: #64836a; background: #e8f3e7; }
.me-menu-icon--feedback { color: #668799; background: #eaf5fa; }
.me-menu-button { width: 100%; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }

/* ===== 备考社区（广场） ===== */
.community-header { position: relative; z-index: 1; display: grid; grid-template-columns: 42px 1fr 42px; gap: 12px; align-items: center; padding: 30px 22px 18px; }
.community-header h1 { margin: 0; font-family: "Songti SC", "STSong", "SimSun", serif; font-size: 28px; font-weight: 700; letter-spacing: .01em; }
.community-header > svg { width: 38px; height: 38px; padding: 9px; border-radius: 12px 12px 12px 4px; color: #fffdf8; background: #23594a; }
.community-header-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; color: #fffdf8; background: #23594a; font-family: Georgia, serif; font-size: 11px; font-weight: 750; }
.community-intro { position: relative; z-index: 1; margin: 0 16px 12px; padding: 15px 17px; border: 1px solid #d9d3c8; border-radius: 16px 16px 16px 6px; background: rgba(255,253,248,.72); }
.community-intro strong { font-size: 13px; }
.community-intro p { margin: 5px 0 0; color: #7e8a84; font-size: 10px; }
.study-feed { position: relative; z-index: 1; margin: 0 16px; overflow: hidden; border: 1px solid #ded8cc; border-radius: 20px 20px 20px 7px; background: #fffdf8; }
.study-post { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 17px 16px; border-bottom: 1px dashed #e1dbcf; }
.study-post:last-child { border-bottom: 0; }
.study-post-avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(40,65,56,.06); border-radius: 50%; font-size: 20px; }
.study-post-avatar--mint { background: #b9d9cb; }
.study-post-avatar--peach { background: #e8b89f; }
.study-post-avatar--sky { background: #b9d1e1; }
.study-post-avatar--lilac { background: #d2c3dc; }
.study-post-main { min-width: 0; }
.study-post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.study-post-head > div { display: grid; gap: 3px; }
.study-post-head strong { font-size: 13px; }
.study-post-head span { color: #929b96; font-size: 9px; }
.study-post-main > p { margin: 10px 0 12px; color: #344940; font-size: 13px; line-height: 1.72; white-space: pre-wrap; }
.study-post-foot { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.study-post-foot-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.study-post-foot-meta time { color: #939d98; font-family: Georgia, "Songti SC", serif; font-size: 10px; }
.carrot-cheer { min-width: 48px; height: 36px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 3px; border: 0; color: #87938d; background: transparent; font: inherit; cursor: pointer; }
.carrot-cheer b { min-width: 16px; font-family: Georgia, serif; font-size: 14px; font-weight: 500; }
.carrot-cheer.is-cheered { color: #b66e49; }

/* ===== 结束背诵 / 完成弹窗 ===== */
.finish-study-section { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; margin: 20px 16px 4px; }
.finish-study-button { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #23594a; border-radius: 14px 14px 14px 5px; color: #fffdf8; background: #23594a; font: inherit; font-size: 13px; font-weight: 800; box-shadow: 0 10px 22px rgba(35,89,74,.16); cursor: pointer; transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.finish-study-button:hover, .finish-study-button:focus-visible { color: #fff; background: #668b6b !important; border-color: #668b6b !important; box-shadow: 0 12px 25px rgba(72,108,77,.28); transform: translateY(-1px); }
.finish-study-button svg { width: 17px; }
.finish-study-section p { margin: 0; color: #939b97; font-size: 9px; }

/* ===== 用户可选画布（手机/平板） ===== */
@media (min-width: 600px) {
  html[data-display-mode="phone"],
  html[data-display-mode="tablet"] { overflow: hidden; }
  html[data-display-mode="phone"] body,
  html[data-display-mode="tablet"] body { overflow: hidden; }

  html[data-display-mode="phone"] .site-stage,
  html[data-display-mode="tablet"] .site-stage { height: 100vh; display: grid; place-items: center; padding: 32px; }

  html[data-display-mode="phone"] .app-shell {
    width: min(440px, calc((100vh - 64px) * .5625), calc(100vw - 64px));
    height: min(782px, calc(100vh - 64px), calc((100vw - 64px) * 1.7778));
    min-height: 0; overflow: hidden; border-radius: 28px; transform: translateZ(0);
  }
  html[data-display-mode="phone"] .bottom-nav { border-radius: 0 0 28px 28px; }
  html[data-display-mode="phone"] .app-shell::before { height: 310px; }
  html[data-display-mode="phone"] .site-account-mark { top: 14px; right: 21px; }
  html[data-display-mode="phone"] .catalog-header { padding: 34px 24px 10px; }
  html[data-display-mode="phone"] .phone-only-break { display: block; }
  html[data-display-mode="phone"] .catalog-count { margin-top: 30px; }
  html[data-display-mode="phone"] .subject-section { padding: 16px; }
  html[data-display-mode="phone"] .subject-list { grid-template-columns: 1fr; }
  html[data-display-mode="phone"] .subject-card { min-height: 102px; padding: 16px; }
  html[data-display-mode="phone"] .structure-note { margin: 0 16px 100px; }
  html[data-display-mode="phone"] .subject-page-header { grid-template-columns: 42px 1fr auto; padding: 42px 22px 23px; }
  html[data-display-mode="phone"] .chapter-catalog { margin-right: 16px; margin-left: 16px; }
  html[data-display-mode="phone"] .chapter-catalog-row { min-height: 78px; padding: 13px 15px; }
  html[data-display-mode="phone"] .recall-header { padding: 46px 24px 22px; }
  html[data-display-mode="phone"] .recall-progress,
  html[data-display-mode="phone"] .recall-question-content { width: auto; margin-right: 16px; margin-left: 16px; }
  html[data-display-mode="phone"] .study-feed { width: auto; margin-right: 16px; margin-left: 16px; }
  html[data-display-mode="phone"] .study-post { grid-template-columns: 42px 1fr; gap: 12px; padding: 18px 16px; }

  html[data-display-mode="tablet"] .app-shell {
    width: min(1040px, calc(100vw - 80px), calc((100vh - 80px) * 1.3333));
    height: min(780px, calc(100vh - 80px), calc((100vw - 80px) * .75));
    min-height: 0; overflow: hidden; border-radius: 30px; transform: translateZ(0);
  }
  html[data-display-mode="tablet"] .bottom-nav { border-radius: 0 0 30px 30px; }
  html[data-display-mode="tablet"] .catalog-header { padding: 44px 56px 18px; }
  html[data-display-mode="tablet"] .catalog-count { margin-top: 0; }
  html[data-display-mode="tablet"] .subject-section { padding: 14px 56px 34px; }
  html[data-display-mode="tablet"] .subject-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  html[data-display-mode="tablet"] .subject-card { min-height: 122px; padding: 18px 20px; }
  html[data-display-mode="tablet"] .subject-copy { min-width: 0; }
  /* 窗口较窄、卡片被压到约 210px 时，隐藏“开始”文字，把空间让给标题 */
  @media (max-width: 900px) {
    html[data-display-mode="tablet"] .subject-start-label { display: none; }
    html[data-display-mode="tablet"] .subject-card { gap: 10px; padding: 16px; }
    html[data-display-mode="tablet"] .subject-icon { width: 42px; height: 42px; }
  }
}

/* ============================================================
   模板层补充样式（template.css，同等顺序置于其后）
   ============================================================ */
svg { width: 22px; height: 22px; flex-shrink: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, input, textarea, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #a3bb96; outline-offset: 4px; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
.site-stage { height: 100dvh; }
.app-shell { display: flex; flex-direction: column; isolation: isolate; }
.app-shell-scroll { flex: 1; min-height: 0; height: auto; padding-bottom: 24px !important; }
.app-shell .bottom-nav { position: relative !important; left: auto !important; bottom: auto !important; transform: none !important; flex: 0 0 auto; width: 100%; min-height: 65px; padding: 9px 14px max(9px, env(safe-area-inset-bottom)); z-index: 2; }
.bottom-nav a { min-height: 44px; }
.bottom-nav span { font-size: 12px; }

.template-mode { position: relative; }
.template-mode > summary { list-style: none; text-align: center; margin-top: 8px; padding: 5px 13px; border-radius: 10px; background: #e1eee7; font-weight: 800; letter-spacing: .12em; cursor: pointer; }
.template-mode > summary::-webkit-details-marker { display: none; }
.template-mode-panel { position: absolute; right: 0; z-index: 40; width: 165px; padding: 8px; border-radius: 13px; background: #fffdf7; box-shadow: 0 8px 30px #344b3a24; }
.template-mode-panel button { display: block; width: 100%; padding: 12px 8px; background: transparent; border: 0; border-radius: 8px; color: #345c43; text-align: left; font-size: 14px; }
.template-mode-panel button:hover { background: #edf4e7; }
.catalog-header:has(.template-mode[open]) { position: relative; z-index: 60; }
.template-mode-panel { max-width: calc(100vw - 40px); }
@media (prefers-reduced-motion: no-preference) {
  .app-shell { transition: width .22s ease-out, height .22s ease-out, border-radius .22s ease-out; }
}

.template-empty { margin: 20px 22px; padding: 32px 24px; min-height: 180px; display: grid; place-content: center; text-align: center; background: #fffdf7; border: 1px solid #e4dcc2; border-radius: 23px 23px 23px 8px; }
.template-empty > svg { margin: 0 auto 12px; color: #789b7b; width: 36px; height: 36px; }
.template-empty h2 { font-size: 20px; margin: 0 0 10px; }
.template-empty p { font-size: 14px; color: #778579; line-height: 1.8; margin: 0; }
.template-empty a { display: inline-block; margin-top: 22px; color: #5f8b61; }

.template-page-header { position: relative; padding: 42px 24px 22px; }
.template-page-header h1 { font-size: 30px; margin: 8px 0; }
.template-page-header p { color: #778579; font-size: 14px; line-height: 1.7; margin: 6px 0; }
.template-page-header > a { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }

.template-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 14px; }
.template-tabs a { padding: 9px 12px; border-radius: 12px; background: #f2f2e8; font-size: 14px; }
.template-tabs .is-active { background: #5f8b61; color: #fff; }

.template-list { display: grid; gap: 12px; margin: 0 22px 20px; }
.template-list > a { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid #e4dcc2; padding: 18px; border-radius: 18px 18px 18px 6px; background: #fffdf7; }
.template-list strong { font-size: 16px; }
.template-list small { display: block; color: #7a887d; font-size: 12px; margin-top: 8px; }
.template-notebook-counts { display: flex; gap: 12px; flex-wrap: wrap; }

.template-profile { display: flex; align-items: center; gap: 20px; padding: 10px 22px 25px; }
.template-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #e4efe0; overflow: hidden; font-size: 34px; }
.template-profile strong { font-size: 23px; }
.template-profile small { display: block; margin-top: 8px; font-size: 13px; color: #819084; }

.template-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 0 22px 16px; }
.template-stats article { background: #fffdf7; border: 1px solid #e4dcc2; border-radius: 21px 21px 21px 7px; padding: 23px 20px; }
.template-stats span { display: flex; align-items: center; gap: 7px; color: #718477; font-size: 14px; }
.template-stats strong { display: block; font-family: Georgia, serif; font-size: 34px; margin-top: 22px; }
.template-stats small { margin-left: 6px; color: #86938a; font-size: 13px; }

.template-form { margin: 0 22px 25px; display: grid; gap: 15px; }
.template-form label { font-size: 15px; font-weight: 700; }
.template-form input, .template-form textarea { width: 100%; margin-top: 8px; padding: 14px; border: 1px solid #d9dfcf; border-radius: 12px; background: #fffdf7; color: #344b3a; font-size: 16px; }
.template-form textarea { resize: vertical; min-height: 145px; line-height: 1.7; }
.template-form input:focus, .template-form textarea:focus { outline: 0; border-color: #91ad93; box-shadow: 0 0 0 3px rgba(111,151,115,.1); }

.template-avatar-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.template-avatar-grid button { width: 100%; aspect-ratio: 1; min-height: 44px; display: grid; place-items: center; border: 2px solid transparent; border-radius: 18px; padding: 8px; background: #f1f5e9; font-size: 26px; }
.template-avatar-grid button[aria-pressed="true"] { border-color: #5f8b61; background: #e2eedf; }

.template-primary { border: 0; border-radius: 13px 13px 13px 5px; background: #345c43; color: #fff; padding: 15px 20px; font-size: 15px; font-weight: 700; }
.template-secondary { border: 1px solid #d5ddcb; border-radius: 12px; background: #f1f6e9; color: #456a4e; padding: 12px 18px; font-size: 14px; }
.template-memo { border: 1px solid #e4dcc2; border-radius: 18px 18px 18px 6px; background: #fffdf7; padding: 20px; }
.template-memo p { margin: 10px 0 0; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.template-memo time { font-size: 12px; color: #8a978c; }
.template-actions { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0; }
.template-actions button { flex: 1; }
.template-toast { position: fixed; z-index: 100; bottom: 95px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 40px); background: #345c43; color: #fff; padding: 13px 22px; border-radius: 13px; font-size: 14px; box-shadow: 0 10px 30px rgba(35,53,40,.25); }
.template-overall { display: block; margin: 12px 0; border: 0; padding: 8px 0; color: #806443; background: transparent; text-decoration: underline; font-size: 14px; }
.reveal-panel p, .reveal-panel h3, .reveal-panel h4 { overflow-wrap: anywhere; white-space: pre-wrap; }
.template-source { color: #849286; font-size: 12px; line-height: 1.7; margin: 14px 0 0; }

/* 弹窗基座 */
.template-dialog { position: fixed; inset: 0; margin: auto; width: min(680px, calc(100vw - 28px)); max-width: calc(100vw - 28px); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #ddd9c9; border-radius: 24px 24px 24px 8px; background: #fffdf8; color: #344b3a; box-shadow: 0 24px 70px #213c3540; }
.template-dialog[open] { display: flex; flex-direction: column; }
.template-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-shrink: 0; padding: 18px 22px; border-bottom: 1px solid #e4ddd1; background: #f7f2e8; }
.template-dialog-header h2 { font-size: 20px; margin: 0; line-height: 1.5; }
.template-close { border: 0; background: #efeee5; color: #718278; width: 40px; height: 40px; border-radius: 50%; font-size: 28px; flex-shrink: 0; line-height: 1; display: grid; place-items: center; }
.template-dialog-body { overflow: auto; overscroll-behavior: contain; min-height: 0; padding: 20px 22px; scrollbar-width: thin; }
.template-dialog-note { font-size: 14px; color: #7d897f; margin: 0 0 18px; line-height: 1.7; }
.template-dialog .question-catalog-list { padding: 0; margin: 0; list-style: none; }
.template-person-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.template-person-grid button { padding: 14px 5px; }
.template-image-slot { display: grid; place-items: center; min-height: 260px; background: #f5f4e9; border: 1px dashed #d6dacb; border-radius: 16px; color: #8b9589; font-size: 16px; }
.template-overall-copy { font-size: 18px; line-height: 1.9; white-space: pre-wrap; margin: 0; }
.template-completion { display: flex; flex-direction: column; align-items: center; text-align: center; }
.template-status-overview { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 0 22px 20px; }
.template-status-overview a { padding: 18px 8px; border: 1px solid #e1dcc6; border-radius: 20px 20px 20px 6px; background: #fffdf7; display: grid; text-align: center; gap: 10px; }
.template-status-overview strong { font: 30px Georgia, serif; }
.template-status-overview span { font-size: 14px; }

/* 掌握进度条（纯 CSS 可视化，替代 Chart.js） */
.mastery-bars { display: grid; gap: 14px; margin: 4px 22px 24px; }
.mastery-bar-row { display: grid; grid-template-columns: 78px 1fr 40px; gap: 10px; align-items: center; }
.mastery-bar-row > span { font-size: 12px; color: #52625a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mastery-bar-track { height: 9px; border-radius: 999px; background: #ece7db; overflow: hidden; }
.mastery-bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9cbd82, #5f8b61); }
.mastery-bar-row > b { font: 13px Georgia, serif; color: #6a7a70; text-align: right; font-weight: 600; }

/* 真题年份分组 */
.exam-year-grid { display: grid; gap: 12px; margin: 0 22px 24px; }
.exam-year-card { border: 1px solid #e1dbcf; border-radius: 18px 18px 18px 6px; background: #fffdf7; overflow: hidden; }
.exam-year-card > header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #f8f4eb; border-bottom: 1px solid #e7e0d4; }
.exam-year-card > header strong { font-size: 16px; color: #23594a; }
.exam-year-card .exam-group { padding: 12px 16px 4px; }
.exam-year-card .exam-group > span { display: inline-block; font-size: 11px; font-weight: 800; color: #4f7553; margin-bottom: 8px; }
.exam-year-card .exam-group ul { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; }
.exam-year-card .exam-group li { font-size: 13px; color: #526159; padding-left: 14px; position: relative; line-height: 1.5; }
.exam-year-card .exam-group li::before { content: '·'; position: absolute; left: 4px; color: #5f8b61; font-weight: 800; }

/* 人物卡网格 */
.person-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 0 22px 24px; }
.person-tile { border: 1px solid #e1dbcf; border-radius: 16px 16px 16px 6px; background: #fffdf8; padding: 14px 8px; text-align: center; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.person-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(58,80,70,.12); }
.person-tile .pt-avatar { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #e8f3e7; }
.person-tile strong { display: block; font-size: 13px; color: #263d34; }
.person-tile small { display: block; margin-top: 3px; font-size: 10px; color: #8d9690; }

/* 数据管理视图 */
.data-actions-grid { display: grid; gap: 10px; margin: 0 22px 24px; }

@media (max-width: 599px) {
  .template-dialog-header, .template-dialog-body { padding: 16px; }
  .template-person-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 370px) {
  .hero-card h2 { font-size: 23px; }
  .question-card h1 { font-size: 22px; }
}
@media (min-width: 521px) {
  .site-stage { padding: 24px 0; }
}
@media (min-width: 768px) and (orientation: landscape) {
  .person-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .exam-year-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ============================================================
   范例 template.css 后置基座（与“可点击范例”最终计算样式一致）
   ============================================================ */
.recall-progress { height: 5px; margin: 18px 22px; overflow: hidden; background: #e7e9d9; border-radius: 8px; }
.recall-progress > span { display: block; height: 100%; background: #75956d; border-radius: inherit; }

/* 真题关联弹窗 */
.true-question-list { padding: 0; }
.true-question-item { padding: 15px 0 16px; border-bottom: 1px dashed #ddd5c8; }
.true-question-item:last-child { border-bottom: 0; }
.true-question-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; white-space: normal; }
.true-question-meta strong { color: #b66e49; font-family: Georgia, serif; font-size: 14px; }
.true-question-meta span { overflow: hidden; color: #687970; font-size: 12px; font-weight: 750; text-overflow: ellipsis; }
.true-question-meta em { margin-left: auto; color: #9a8e7d; font-size: 12px; font-style: normal; }
.true-question-item > p { margin: 8px 0 0; color: #1f2e29; font-size: 15px; font-weight: 700; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.true-question-back { display: block; width: 100%; min-height: 44px; margin: 16px 0 0; border: 0; border-radius: 12px; color: #fffdf8; background: #23594a; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.true-question-jump { width: 100%; min-height: 40px; margin-top: 12px; border: 1px solid #d7d1c6; border-radius: 11px; color: #4f7553; background: #f3f7f3; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.true-question-jump:hover { background: #e9f1ea; }

/* 人物联想触发（复用真题按钮暖色风格，置于线索面板标题行） */
.person-related-trigger { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 10px; border: 1px solid #bcd2c4; border-radius: 9px 9px 9px 3px; color: #3f6b52; background: #e9f2ec; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
.person-related-trigger:hover { background: #dcebe1; }

/* 结束背诵完成弹窗 */
.template-completion h3 { margin: 14px 0 8px; color: #2d4935; font-size: 20px; font-weight: 800; }
.template-completion > p { margin: 0; color: #6f7c75; font-size: 13px; line-height: 1.95; white-space: pre-wrap; }
.completion-stats { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 18px; overflow: hidden; border: 1px solid #e4e8e1; border-radius: 18px; background: #fafcf9; }
.completion-stats > div { display: grid; gap: 5px; justify-items: center; padding: 16px 5px 14px; border-right: 1px solid #e6eae4; }
.completion-stats > div:last-child { border-right: 0; }
.completion-stats strong { color: #23594a; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.completion-stats span { color: #7f8984; font-size: 12px; }
.completion-actions { width: 100%; display: grid; grid-template-columns: .72fr 1.28fr; gap: 9px; }
.completion-actions > * { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 13px 13px 13px 5px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.completion-done { border: 1px solid #d9d3c8; color: #65736c; background: #fffdf8; }
.completion-share { border: 1px solid #23594a; color: #fffdf8; background: #23594a; }
.completion-share svg { width: 16px; }

/* 真题视图：题目可点击跳转 */
.exam-jump { width: 100%; border: 0; padding: 0; color: inherit; background: transparent; font: inherit; text-align: left; line-height: 1.5; cursor: pointer; border-radius: 6px; transition: color .15s ease, background .15s ease; }
.exam-jump:hover { color: #2f6a4c; }
.exam-year-card li:has(.exam-jump:hover) { background: #f3f8f1; }

/* 掌握进度总览（无 Chart.js 的纯 CSS 可视化） */
.mastery-overview-note { margin: 0 22px 14px; color: #7a867f; font-size: 12px; line-height: 1.7; }

/* 数据管理 */
.data-actions-grid { display: grid; gap: 10px; margin: 4px 22px 18px; }
.data-actions-grid .template-primary,
.data-actions-grid .template-secondary,
.data-danger { width: 100%; min-height: 50px; }
.template-secondary { border: 1px solid #d5ddcb; border-radius: 13px 13px 13px 5px; background: #f1f6e9; color: #456a4e; padding: 14px 18px; font-size: 15px; font-weight: 700; cursor: pointer; }
.data-danger { border: 1px solid #e6c4c0; border-radius: 13px 13px 13px 5px; background: #fbeae8; color: #a34c46; font-size: 15px; font-weight: 700; cursor: pointer; }
.data-footnote { margin: 0 22px; color: #8d978f; font-size: 11px; line-height: 1.7; }
.import-hint { margin: 0; color: #8a958e; font-size: 12px; line-height: 1.7; }
#import-form input[type="file"] { width: 100%; margin-top: 8px; padding: 10px; border: 1px dashed #c9d3c2; border-radius: 12px; background: #f7f9f2; font-size: 13px; }

/* 备考广场：发布框与删除 */
.square-form { position: relative; z-index: 1; display: grid; gap: 10px; margin: 16px 16px 24px; padding: 16px; border: 1px solid #ded8cc; border-radius: 20px 20px 20px 7px; background: #fffdf8; }
.square-form label { font-size: 13px; font-weight: 750; color: #4f6557; }
.square-form textarea { width: 100%; min-height: 72px; padding: 12px; border: 1px solid #d9dfcf; border-radius: 12px; background: #fffdf7; color: #344b3a; font: inherit; font-size: 14px; line-height: 1.7; resize: vertical; }
.square-form textarea:focus { outline: 0; border-color: #91ad93; box-shadow: 0 0 0 3px rgba(111,151,115,.1); }
.square-form button { height: 44px; border: 0; border-radius: 12px 12px 12px 4px; background: #23594a; color: #fffdf8; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.study-post-del { border: 0; background: transparent; color: #c3aba4; font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.study-post-del:hover { color: #a34c46; }
.memo-del { float: right; border: 0; background: transparent; color: #b7a79c; font-size: 18px; line-height: 1.2; cursor: pointer; padding: 0 2px; }
.memo-del:hover { color: #a34c46; }

/* 弹窗遮罩与分尺寸弹窗（与范例一致） */
.template-dialog::backdrop { background: #34433573; backdrop-filter: blur(3px); }
.true-question-dialog,
.template-exam-dialog,
.template-picture-dialog { width: min(calc(100% - 30px), 440px); max-width: 440px; max-height: min(82vh, 680px); }
.template-completion-dialog { width: min(calc(100vw - 34px), 430px); max-width: 430px; }

/* 加载与异常 */
.app-loading { position: relative; z-index: 1; display: grid; gap: 12px; justify-items: center; padding: 120px 32px; text-align: center; color: #6f7d76; font-size: 14px; }
.app-loading .loading-ring { width: 34px; height: 34px; border: 3px solid #d9e6d7; border-top-color: #5f8b61; border-radius: 50%; animation: app-spin .8s linear infinite; }
@keyframes app-spin { to { transform: rotate(360deg); } }
