@font-face {
  font-family: "Zhuque Fangsong";
  src: url("./fonts/ZhuqueFangsong-Site.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fffdf7;
  --paper-deep: #f5efe3;
  --ink: #332b22;
  --muted: #817568;
  --line: #ded1be;
  --accent: #8c3d2f;
  --accent-dark: #6f2f25;
  --accent-soft: #f8ece5;
  --gold: #b8873d;
  --shadow: 0 16px 42px rgba(60, 42, 24, .12);
  --font-caption: 12px;
  --font-ui: 14px;
  --font-body: 16px;
  --font-subheading: 20px;
  --font-heading: 28px;
  --font-display: clamp(36px, 5.2vw, 52px);
  --reading-font-size: 24px;
  --reading-note-size: calc(var(--reading-font-size) * .84);
  --reading-supplement-size: calc(var(--reading-font-size) * .9);
  --reader-viewport-top: 0px;
  --reader-viewport-height: 100vh;
  --note-split: 60vh;
  --split-viewport-height: 100vh;
  --note-width: 42vw;
  --topbar-height: 58px;
}

html.night-reading {
  color-scheme: dark;
  --paper: #24201c;
  --paper-deep: #171411;
  --ink: #e7ded1;
  --muted: #afa397;
  --line: #4a4036;
  --accent: #d99b7e;
  --accent-dark: #edb198;
  --accent-soft: #382a25;
  --gold: #d0aa61;
  --shadow: 0 16px 42px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { background: var(--paper-deep); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0, rgba(255,255,255,.72), transparent 33rem),
    var(--paper-deep);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

html.night-reading body {
  background:
    radial-gradient(circle at 15% 0, rgba(255,255,255,.035), transparent 33rem),
    var(--paper-deep);
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.loading-bar { position: fixed; z-index: 9; top: var(--topbar-height); right: 0; left: 0; height: 2px; overflow: hidden; pointer-events: none; background: rgba(222, 209, 190, .42); }
.loading-bar::after { position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; content: ""; background: var(--accent); animation: loading-line 1.15s ease-in-out infinite; }
@keyframes loading-line { from { transform: translateX(0); } to { transform: translateX(385%); } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px max(18px, calc((100vw - 980px) / 2));
  background: var(--paper);
  border-bottom: 1px solid rgba(222, 209, 190, .75);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-weight: 700; font-synthesis: weight; }
.brand-seal { display: block; width: 25.5px; height: 25.5px; flex: 0 0 auto; border-radius: 5px; object-fit: cover; }
.topbar-actions { display: flex; gap: 8px; }
.icon-button, .settings-actions button { padding: 7px 12px; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 7px; font-size: var(--font-ui); font-weight: 700; }
.topbar-actions #chapter-button, .topbar-actions #settings-button { color: var(--muted); border: 0; }
.icon-button:hover, .settings-actions button:hover { background: var(--accent-soft); }
.settings-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 7px; }
.settings-button svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.page-shell { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 76px; }
.hero { margin-bottom: 28px; }
.eyebrow, .drawer-kicker { margin: 0 0 5px; color: var(--accent); font-size: var(--font-caption); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { margin: 0; line-height: 1.25; }
h1 { font-family: Georgia, "Songti SC", "STSong", serif; font-size: clamp(37px, 8vw, 58px); font-weight: 700; letter-spacing: .04em; }
.hero-copy { max-width: 590px; margin: 13px 0 7px; color: var(--muted); font-size: var(--font-body); }
.source-line { color: var(--muted); font-size: var(--font-caption); }
.notice-card { padding: 18px 20px; color: var(--muted); background: rgba(255,253,247,.78); border: 1px solid var(--line); border-radius: 10px; }
.error-card { color: #9c332b; background: #fff3ef; border-color: #e6bdb3; }

.reading-tip { margin-bottom: 16px; padding: 9px 12px; color: var(--muted); background: rgba(248,236,229,.7); border-left: 3px solid var(--gold); border-radius: 4px; font-size: var(--font-caption); }
.reading-tip span { margin-right: 7px; color: var(--accent); font-weight: 800; }
.reading-onboarding { position: relative; display: flex; align-items: center; gap: 16px; margin: 0 0 6px; padding: 13px 46px 13px 16px; color: var(--muted); background: rgba(248,236,229,.78); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; }
.reading-onboarding-copy { min-width: 0; }
.reading-onboarding-copy p { margin: 0; font-size: var(--font-body); line-height: 1.75; }
.reading-onboarding-copy .reading-onboarding-title { font-size: var(--font-ui); line-height: 1.6; }
.reading-onboarding-title { margin-bottom: 2px !important; color: var(--accent); font-weight: 800; }
.reading-onboarding-dismiss { flex: 0 0 auto; min-height: 32px; padding: 5px 12px; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 6px; font-size: 12px; font-weight: 800; }
.reading-onboarding-dismiss:hover, .reading-onboarding-dismiss:focus-visible { background: var(--accent-dark); border-color: var(--accent-dark); outline: none; }
.reading-onboarding-close { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); }
.reader { padding: clamp(22px, 5vw, 50px) 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.chapter-title { margin: 0 0 25px; padding-bottom: 20px; color: var(--accent); border-bottom: 1px solid var(--line); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-heading); }
.section-title { margin: 33px 0 12px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); }
.section-title:first-of-type { margin-top: 0; }
.paragraph { position: relative; margin: 0 0 20px; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--reading-font-size); line-height: 2.12; text-align: justify; text-justify: inter-ideograph; }
.paragraph:last-child { margin-bottom: 0; }
.supplements { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.supplement-block + .supplement-block { margin-top: 30px; padding-top: 24px; border-top: 1px dashed var(--line); }
.supplement-title { margin: 0 0 12px; color: var(--accent); font-family: system-ui, -apple-system, sans-serif; font-size: var(--font-ui); font-weight: 700; letter-spacing: .035em; }
.paragraph.supplement-paragraph { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif; font-size: var(--reading-supplement-size); font-weight: 400; }
.note-marker { display: inline-block; margin: 0 1px; padding: 0; color: var(--accent); background: transparent; border: 0; border-radius: 0; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: .56em; font-weight: 700; line-height: 1; vertical-align: .72em; }
.note-marker:hover, .note-marker.is-active { color: #fff; background: var(--accent); }
.difficulty-range { padding-bottom: .12em; border-bottom: 1px dotted var(--accent); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.difficulty-anchor { cursor: pointer; text-decoration: none; }
.article-footer { padding: 18px 4px 0; color: var(--muted); font-size: var(--font-caption); }
.article-footer p { margin: 0 0 3px; }
.chapter-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 5vw, 38px); margin: 48px 0 10px; padding-top: 30px; border-top: 1px solid rgba(222, 209, 190, .58); }
.chapter-navigation-link { display: grid; min-height: 48px; place-items: center; padding: 8px 12px; color: var(--accent); background: rgba(248, 236, 229, .72); border: 1px solid transparent; border-radius: 7px; font-size: var(--font-ui); font-weight: 800; text-decoration: none; }
.chapter-navigation-link:hover, .chapter-navigation-link:focus-visible { background: var(--accent-soft); border-color: var(--line); outline: none; }
.chapter-navigation-link.is-disabled { color: #aaa39a; background: rgba(232, 227, 217, .65); cursor: default; }
.chapter-navigation-link.is-disabled:hover, .chapter-navigation-link.is-disabled:focus-visible { border-color: transparent; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 18px; color: var(--muted); font-size: var(--font-caption); }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.library-page h1 { margin-bottom: 14px; }
.library-heading { margin: 38px 0 14px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-heading); }
.book-card { margin-top: 28px; padding: 22px; background: rgba(255,253,247,.78); border: 1px solid var(--line); border-radius: 10px; }
.book-card h2 { margin: 2px 0 8px; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; }
.book-card h2 a { color: var(--ink); text-decoration: none; }
.book-card p:not(.eyebrow) { margin: 0 0 16px; color: var(--muted); }
.book-entry { display: inline-block; padding: 8px 12px; color: #fff; background: var(--accent); border-radius: 7px; text-decoration: none; font-size: var(--font-ui); font-weight: 800; }
.book-info { margin-top: 32px; padding-top: 6px; }
.book-info .library-heading { margin-top: 0; }
.book-info p { margin: 0 0 10px; color: var(--muted); font-size: var(--font-body); line-height: 1.9; }
.book-info-name { color: var(--ink) !important; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading) !important; font-weight: 700; }
.book-author { margin-top: 42px; padding-top: 18px; border-top: 1px solid var(--line); }
.book-author-layout { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 22px; align-items: start; }
.book-author-portrait { margin: 0; }
.book-author-portrait img { display: block; width: 128px; aspect-ratio: 364 / 372; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 20px rgba(60, 42, 24, .1); }
.book-knowledge { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.book-knowledge h2 { margin: 0 0 8px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); font-weight: 400; }
.book-knowledge-link { margin: 0 0 4px; color: var(--muted); font-size: var(--font-ui); line-height: 1.9; }
.book-knowledge-link a { margin-left: 5px; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.seo-notes[data-annotation-help="true"] > summary { display: inline-flex; align-items: center; white-space: nowrap; list-style: none; }
.seo-notes[data-annotation-help="true"] > summary::-webkit-details-marker { display: none; }
.seo-notes[data-annotation-help="true"] > summary::before { content: "▸"; margin-right: 5px; font-size: 14px; line-height: 1; }
.seo-notes[data-annotation-help="true"][open] > summary::before { content: "▾"; }
.annotation-help { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; margin-left: 5px; color: var(--accent); vertical-align: middle; cursor: help; }
.annotation-help-icon { display: inline-flex; width: 11px; height: 11px; align-items: center; justify-content: center; border: .8px solid currentColor; border-radius: 50%; font: 600 8px/1 system-ui, sans-serif; opacity: .72; }
.annotation-help-tooltip { position: fixed; z-index: 1000; top: -9999px; left: -9999px; width: min(288px, calc(100vw - 24px)); padding: 10px 12px; white-space: normal; border: 1px solid rgba(117, 57, 43, .2); border-radius: 7px; background: #fffaf0; box-shadow: 0 8px 24px rgba(65, 38, 25, .14); color: #55372d; font: 400 var(--font-ui)/1.55 system-ui, sans-serif; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(4px); transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease; cursor: default; }
.annotation-help-tooltip.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.annotation-help-link { color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.note-guide-page { max-width: 860px; }
.note-guide-lede { max-width: 720px; font-size: var(--font-body); line-height: 1.95; }
.note-guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.note-guide-section { margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--line); }
.note-guide-section h2 { color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-heading); }
.note-guide-section > p, .note-guide-intro p { margin: 14px 0 0; color: var(--ink); font-size: var(--font-body); line-height: 2; }
.note-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.note-guide-card { padding: 20px; background: rgba(255,253,247,.72); border: 1px solid var(--line); border-radius: 10px; }
.note-guide-card h3 { margin: 2px 0 10px; color: var(--ink); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); line-height: 1.45; }
.note-guide-card p { margin: 0 0 9px; color: var(--muted); font-size: var(--font-body); line-height: 1.8; }
.note-guide-card .note-guide-clue { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: var(--font-ui); }
.note-guide-clue span { display: block; margin-bottom: 3px; color: var(--accent); font-size: 12px; font-weight: 800; }
.note-guide-table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
.note-guide-table { width: 100%; min-width: 660px; border-collapse: collapse; background: rgba(255,253,247,.62); font-size: var(--font-body); }
.note-guide-table th, .note-guide-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.75; }
.note-guide-table th { color: var(--accent); background: var(--accent-soft); font-size: var(--font-ui); }
.note-guide-table tr:last-child td { border-bottom: 0; }
.note-guide-example { padding: 28px 24px; background: rgba(248,236,229,.5); border: 1px solid var(--line); border-radius: 10px; }
.note-guide-example h2 { margin-top: 0; }
.note-guide-example-source { margin-top: 10px !important; font-size: var(--font-ui) !important; }
.note-guide-example blockquote { margin: 20px 0 16px; padding: 16px 18px; color: var(--ink); background: var(--paper); border-left: 3px solid var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); line-height: 1.9; }
.note-guide-note-list { margin: 0; padding-left: 1.4rem; }
.note-guide-note-list li { margin: 8px 0; color: var(--ink); font-size: var(--font-body); line-height: 1.85; }
.note-guide-note-list strong { margin-right: 6px; color: var(--accent); }
.note-guide-steps { display: grid; gap: 15px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: note-step; }
.note-guide-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.note-step-number { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: var(--accent); border-radius: 50%; font-size: var(--font-ui); font-weight: 800; }
.note-guide-steps strong { display: block; color: var(--ink); font-size: var(--font-body); }
.note-guide-steps p { margin: 2px 0 0; color: var(--muted); font-size: var(--font-body); line-height: 1.85; }
.note-faq-item { padding: 15px 0; border-bottom: 1px dashed var(--line); }
.note-faq-item h3 { margin: 0 0 4px; color: var(--ink); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); }
.note-faq-item p { margin: 0; color: var(--muted); font-size: var(--font-body); line-height: 1.9; }
.note-guide-final { padding-bottom: 18px; }
.home-page { max-width: 920px; padding-top: 62px; }
.home-page .eyebrow { font-size: var(--font-ui); letter-spacing: .1em; }
.home-topnav { display: flex; align-items: center; gap: 18px; }
.home-topnav a { padding: 6px 0; color: var(--accent); text-decoration: none; font-size: var(--font-ui); font-weight: 800; }
.home-topnav a:hover, .home-topnav a:focus-visible { color: var(--accent-dark); text-decoration: underline; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: clamp(28px, 6vw, 72px); align-items: center; padding: 20px 0 58px; border-bottom: 1px solid rgba(222, 209, 190, .8); }
.home-page h1 { max-width: 660px; font-size: var(--font-display); letter-spacing: .02em; }
.home-hero .hero-copy { max-width: 560px; margin-top: 16px; font-size: var(--font-body); }
.home-hero-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin: 21px 0 25px; color: var(--muted); font-size: var(--font-ui); }
.home-hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.home-hero-meta span::before { width: 5px; height: 5px; content: ""; background: var(--gold); border-radius: 50%; }
.home-phone { position: relative; width: min(100%, 300px); height: auto; margin: 0 auto; padding: 7px 7px 0; background: #fff; border: 1px solid rgba(255,255,255,.96); border-bottom: 0; border-radius: 36px 36px 0 0; box-shadow: 0 18px 36px rgba(60,42,24,.12); overflow: hidden; }
.home-phone::before { position: absolute; z-index: 2; top: 17px; left: 50%; width: 68px; height: 5px; content: ""; background: #d7d2c7; border-radius: 99px; transform: translateX(-50%); }
.home-phone-screen { position: relative; overflow: hidden; aspect-ratio: 2 / 3; height: auto; background: var(--paper-deep); border-radius: 27px 27px 0 0; }
.home-phone-image { position: absolute; top: 0; left: 0; display: block; width: 100%; height: auto; max-width: none; opacity: 0; animation: home-phone-fade 8s ease-in-out infinite; }
.home-phone-image:first-child { opacity: 1; animation-delay: 0s; }
.home-phone-image:nth-child(2) { animation-delay: 4s; }
@keyframes home-phone-fade { 0%, 44% { opacity: 1; } 50%, 94% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .home-phone-image { animation: none; }
  .home-phone-image:first-child { opacity: 1; }
  .home-phone-image:nth-child(2) { opacity: 0; }
}
.home-featured-section { padding-top: 48px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.home-section-heading .eyebrow { margin-bottom: 3px; }
.home-section-heading h2 { color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-heading); }
.home-section-link { color: var(--accent); font-size: var(--font-ui); text-decoration: none; white-space: nowrap; }
.home-section-link:hover, .home-section-link:focus-visible { text-decoration: underline; }
.home-featured-list { display: grid; gap: 22px; margin-top: 18px; }
.home-book-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; padding: 28px 30px; background: rgba(255,253,247,.8); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(60, 42, 24, .06); }
.home-book-card h3 { margin: 0 0 4px; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-heading); }
.home-book-card h3 a { color: var(--ink); text-decoration: none; }
.home-book-card h3 a:hover, .home-book-card h3 a:focus-visible { color: var(--accent); }
.home-book-author { margin: 0 0 10px; color: var(--accent); font-size: var(--font-ui); font-weight: 700; }
.home-book-description { max-width: 560px; margin: 0 0 17px; color: var(--muted); font-size: var(--font-body); }
.home-book-meta { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.home-book-meta span { padding: 3px 8px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; font-size: var(--font-ui); font-weight: 700; }
.home-book-card-actions { display: grid; gap: 8px; min-width: 122px; }
.home-book-card-actions .book-entry { text-align: center; }
.home-secondary-button { display: inline-block; padding: 8px 12px; color: var(--accent); border: 1px solid var(--line); border-radius: 7px; font-size: var(--font-caption); font-weight: 800; text-align: center; text-decoration: none; }
.home-page .home-secondary-button { font-size: var(--font-ui); }
.home-secondary-button:hover, .home-secondary-button:focus-visible { background: var(--accent-soft); }
.home-quick-start { margin-top: 30px; }
.home-quick-start .eyebrow { margin-bottom: 9px; }
.home-quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-quick-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; color: var(--ink); background: rgba(255,253,247,.5); border: 1px solid var(--line); border-radius: 8px; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-body); text-decoration: none; }
.home-quick-link span:last-child { color: var(--accent); font-family: sans-serif; font-size: var(--font-ui); }
.home-quick-link:hover, .home-quick-link:focus-visible { background: var(--accent-soft); border-color: var(--accent); }
.home-reading-features { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.home-reading-features > .eyebrow { margin-bottom: 13px; }
.home-feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.home-feature-list div { display: grid; gap: 4px; }
.home-feature-list strong { color: var(--ink); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-body); }
.home-feature-list span { color: var(--muted); font-size: var(--font-ui); line-height: 1.7; }
.site-footer { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 34px; color: var(--muted); border-top: 1px solid rgba(222, 209, 190, .72); font-size: var(--font-caption); }
.site-footer p { margin: 0 0 7px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--accent-dark); text-decoration: underline; }
.not-found-page { display: grid; min-height: calc(100vh - var(--topbar-height)); max-width: 900px; place-items: center; padding-top: 34px; padding-bottom: 70px; }
.not-found-card { width: min(620px, 100%); padding: clamp(34px, 7vw, 68px) clamp(24px, 7vw, 72px); text-align: center; }
.not-found-card::before { display: block; width: 42px; height: 3px; margin: 0 auto 25px; content: ""; background: var(--gold); border-radius: 99px; }
.not-found-card .eyebrow { margin-bottom: 13px; }
.not-found-card h1 { color: var(--ink); font-size: clamp(42px, 7vw, 64px); letter-spacing: .08em; }
.not-found-card .hero-copy { max-width: none; margin: 16px 0 30px; font-size: var(--font-body); }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.not-found-actions a { min-width: 132px; padding: 10px 16px; font-size: var(--font-ui); }
.not-found-actions .primary-button { color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 7px; font-weight: 800; }
.not-found-actions .primary-button:hover, .not-found-actions .primary-button:focus-visible { background: var(--accent-dark); }
.legal-page { max-width: 820px; padding-bottom: 54px; }
.legal-page h1 { margin-bottom: 14px; }
.legal-updated { margin: 9px 0 0; color: var(--muted); font-size: var(--font-caption); }
.legal-content { margin-top: 34px; padding-top: 4px; border-top: 1px solid var(--line); }
.legal-content h2 { margin: 34px 0 10px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-heading); }
.legal-content h2:first-child { margin-top: 24px; }
.legal-content h3 { margin: 22px 0 7px; color: var(--ink); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); }
.legal-content p { margin: 0 0 13px; color: var(--ink); font-size: var(--font-body); line-height: 1.95; }
.legal-content .legal-lede { margin-bottom: 22px; color: var(--muted); font-size: var(--font-body); }
.legal-content ul { margin: 8px 0 17px; padding-left: 1.45rem; color: var(--ink); }
.legal-content li { margin: 6px 0; padding-left: 3px; font-size: var(--font-body); line-height: 1.85; }
.legal-content a { overflow-wrap: anywhere; }
.legal-content code { padding: 1px 5px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.legal-callout { margin: 22px 0 26px; padding: 16px 18px 7px; background: var(--accent-soft); border-left: 3px solid var(--gold); border-radius: 5px; }
.legal-callout strong { display: block; margin-bottom: 4px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); }
.legal-callout p { margin-bottom: 7px; }
html.night-reading .site-footer { border-top-color: var(--line); }
html.night-reading .legal-content { border-top-color: var(--line); }
.seo-notes { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.seo-notes > summary { width: fit-content; padding: 8px 0; }
.seo-notes > summary:focus-visible { outline: 2px solid rgba(117, 57, 43, .55); outline-offset: 4px; border-radius: 4px; }
.seo-notes[data-annotation-help="true"] > summary:focus-visible { outline: none; }
.seo-notes[data-annotation-help="true"] > summary:focus-visible .seo-notes-summary-label { outline: 2px solid rgba(117, 57, 43, .55); outline-offset: 4px; border-radius: 4px; }
.annotation-help:focus-visible { outline: 1px solid rgba(117, 57, 43, .55); outline-offset: 3px; border-radius: 50%; }
.seo-notes[open] > summary { margin-bottom: 10px; }
.seo-notes h2 { margin-bottom: 10px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); }
.seo-notes details { margin: 6px 0; padding: 8px 10px; background: rgba(248,236,229,.45); border: 1px solid var(--line); border-radius: 6px; }
.seo-notes summary { color: var(--accent); cursor: pointer; font-size: var(--font-ui); font-weight: 800; }
.seo-notes[data-css-labels="true"] .seo-css-label::before { content: attr(data-label); }
.seo-note-entry { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid rgba(222,209,190,.65); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-ui); line-height: 1.8; }
.seo-note-entry .note-source { margin-bottom: 2px; }

.selection-actions { position: fixed; z-index: 100; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); width: min(160px, calc(100vw - 16px)); align-items: stretch; overflow: hidden; color: #fff; background: var(--accent); border: 0; border-radius: 9px; box-shadow: 0 7px 18px rgba(68, 35, 24, .28); user-select: none; -webkit-user-select: none; touch-action: manipulation; pointer-events: auto; }
.selection-action { position: static; min-width: 0; min-height: 36px; padding: 8px 13px; color: #fff; background: transparent; border: 0; font-size: var(--font-ui); font-weight: 800; line-height: 1.2; white-space: nowrap; }
.selection-action::before { display: inline-block; }
#share-card-action::before { content: "分享"; }
#selection-action::before { content: "AI解读"; }
.selection-action + .selection-action { border-left: 1px solid rgba(255,255,255,.28); }
.selection-action:focus-visible { background: var(--accent-dark); outline: 2px solid rgba(255,255,255,.82); outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) { .selection-action:hover { background: var(--accent-dark); } }
::highlight(yueguwen-selected-text) { color: inherit; background: rgba(140,61,47,.2); text-decoration: underline; text-decoration-color: rgba(140,61,47,.55); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(46, 31, 18, .28); }
.drawer { position: fixed; z-index: 21; right: 0; bottom: 0; left: 0; width: min(680px, 100%); max-height: min(76vh, 720px); margin: 0 auto; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -12px 42px rgba(51, 39, 25, .2); }
.drawer-handle { width: 38px; height: 4px; margin: 9px auto 0; background: var(--line); border-radius: 5px; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.drawer-title { margin: 0; font-family: Georgia, "Songti SC", "STSong", serif; font-size: var(--font-subheading); font-weight: 700; line-height: 1.25; }
.close-button { width: 30px; height: 30px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 5px; font-size: 26px; line-height: 1; }
.close-button:hover { color: var(--accent); background: var(--accent-soft); }
.drawer-content { max-height: calc(min(76vh, 720px) - 88px); overflow: auto; padding: 16px 20px 26px; overscroll-behavior: contain; }
.chapter-content { padding-top: 12px; }
.chapter-search-wrap { position: sticky; top: -16px; z-index: 4; display: block; margin: -2px 0 16px; padding: 2px 0 10px; background: var(--paper); }
.chapter-search { width: 100%; padding: 10px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; outline: none; }
.chapter-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,61,47,.12); }
.chapter-group { margin: 0 0 20px; }
.chapter-group:last-child { margin-bottom: 0; }
.chapter-group-title { margin: 0 0 8px; color: var(--accent); font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--font-subheading); }
.chapter-group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.chapter-link { display: flex; align-items: baseline; min-width: 0; gap: 7px; padding: 8px 9px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: var(--font-ui); line-height: 1.45; text-decoration: none; }
.chapter-link:hover, .chapter-link:focus-visible { background: var(--accent-soft); border-color: var(--line); outline: none; }
.chapter-link.is-current { color: var(--accent); background: var(--accent-soft); border-color: #e7cfc3; font-weight: 800; }
.chapter-number { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chapter-link.is-current .chapter-number { color: var(--accent); }
.directory-page h1 { font-size: var(--font-display); }
.directory-page .breadcrumbs { font-size: var(--font-ui); }
.directory-page .hero-copy { max-width: 720px; font-size: 18px; line-height: 1.8; }
.directory-page .chapter-directory-groups { display: grid; gap: 30px; margin-top: 40px; }
.directory-page .chapter-group { margin: 0; }
.directory-page .chapter-group-title { margin: 0 0 8px; padding-bottom: 7px; border-bottom: 1px solid rgba(222,209,190,.8); font-size: var(--font-subheading); }
.directory-page .chapter-group-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; }
.directory-page .chapter-link { gap: 9px; padding: 8px 0; border-width: 0 0 1px; border-color: rgba(222,209,190,.58); border-radius: 0; font-size: 18px; line-height: 1.7; }
.directory-page .chapter-link:hover, .directory-page .chapter-link:focus-visible { padding-right: 8px; padding-left: 8px; border-color: var(--line); }
.directory-page .chapter-number { min-width: 3ch; font-size: 18px; }
.note-entry { margin-bottom: 15px; padding: 12px 13px; background: #fffaf2; border: 1px solid #e7dccb; border-radius: 8px; }
.note-entry:last-child { margin-bottom: 0; }
.note-source { display: inline-block; margin-bottom: 4px; color: var(--accent); font-size: var(--font-caption); font-weight: 800; }
.note-source-toggle { min-height: 28px; padding: 4px 0; appearance: none; color: var(--accent); background: transparent; border: 0; border-radius: 4px; font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.note-source-toggle::after { content: " ›"; display: inline-block; margin-left: 2px; text-decoration: none; transition: transform .15s ease; }
.note-source-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }
.note-source-info { margin: 0 0 9px; padding: 6px 9px; color: var(--muted); border-left: 2px solid var(--line); font-size: var(--font-caption); line-height: 1.65; }
.note-source-info[hidden] { display: none; }
.note-source-info a { color: var(--accent); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.ai-entry .note-source { position: sticky; top: -16px; z-index: 3; display: block; max-width: calc(100% + 26px); margin: -12px -13px 9px; padding: 9px 13px 8px; overflow-wrap: anywhere; white-space: normal; background: #fffaf2; border-bottom: 1px solid #e7dccb; border-radius: 7px 7px 0 0; }
.ai-entry .note-source-label { display: inline; padding: 0; color: var(--ink); background: transparent; border-radius: 0; }
.note-text { white-space: pre-wrap; font-family: "Zhuque Fangsong", "Songti SC", "STSong", SimSun, serif; font-size: var(--reading-note-size); line-height: 1.8; }
.ai-markdown { white-space: normal; }
.ai-loading-state { display: inline-flex; align-items: baseline; }
.ai-loading-dots { display: inline-flex; width: 3.15em; margin-left: .12em; justify-content: space-between; color: var(--accent); }
.ai-loading-dots span { display: inline-block; opacity: .24; animation: ai-loading-dot 1s ease-in-out infinite; }
.ai-loading-dots span:nth-child(2) { animation-delay: .1s; }
.ai-loading-dots span:nth-child(3) { animation-delay: .2s; }
.ai-loading-dots span:nth-child(4) { animation-delay: .3s; }
.ai-loading-dots span:nth-child(5) { animation-delay: .4s; }
.ai-loading-dots span:nth-child(6) { animation-delay: .5s; }
@keyframes ai-loading-dot { 0%, 100% { opacity: .24; } 35%, 65% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ai-loading-dots span { animation: none; opacity: .72; }
}
.ai-markdown p { margin: 0 0 12px; }
.ai-markdown p:last-child { margin-bottom: 0; }
.ai-markdown .markdown-heading { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; color: var(--accent); font-size: var(--font-subheading); }
.ai-share-button { display: inline-grid; place-items: center; width: 27px; height: 27px; padding: 3px; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.ai-share-button:hover, .ai-share-button:focus-visible { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent); outline: none; }
.ai-share-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.ai-markdown ul, .ai-markdown ol { margin: 0 0 12px; padding-left: 1.5em; }
.ai-markdown li { margin: 3px 0; }
.ai-retry-state { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ai-retry-message { color: #a3312b; }
.ai-retry-button { min-height: 30px; padding: 5px 12px; color: #fff; background: var(--accent); border: 0; border-radius: 6px; font: inherit; font-size: var(--font-ui); font-weight: 800; cursor: pointer; }
.ai-retry-button:hover, .ai-retry-button:focus-visible { background: var(--accent-dark); }
.ai-retry-button:disabled { opacity: .62; cursor: wait; }
.ai-markdown strong { color: var(--accent-dark); }
.ai-markdown code { padding: 1px 4px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.chapter-note { margin-bottom: 17px; padding: 12px 13px; background: var(--accent-soft); border-radius: 8px; font-size: var(--font-ui); }
.chapter-note strong { color: var(--accent); }
.settings-note { margin: 0 0 18px; color: var(--muted); font-size: var(--font-ui); }
.field { display: block; margin: 15px 0; }
.field span { display: block; margin-bottom: 6px; font-size: var(--font-ui); font-weight: 800; }
.field-label { display: flex !important; align-items: center; justify-content: space-between; }
.field-label output { color: var(--accent); font-variant-numeric: tabular-nums; }
.field input, .field select { width: 100%; padding: 10px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; outline: none; }
.field input[type="range"] { padding: 0; accent-color: var(--accent); }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,61,47,.12); }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.theme-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 11px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; font-size: var(--font-ui); font-weight: 700; }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.theme-toggle-track { position: relative; display: inline-block; width: 34px; height: 20px; flex: 0 0 auto; background: var(--line); border-radius: 999px; transition: background .18s ease; }
.theme-toggle-track::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; content: ""; background: var(--paper); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s ease; }
.theme-toggle[aria-checked="true"] { color: var(--accent-dark); border-color: var(--accent); }
.theme-toggle[aria-checked="true"] .theme-toggle-track { background: var(--accent); }
.theme-toggle[aria-checked="true"] .theme-toggle-track::after { transform: translateX(14px); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.settings-actions .primary-button { color: #fff; background: var(--accent); border-color: var(--accent); }
.settings-actions .primary-button:hover { background: var(--accent-dark); }
.settings-actions button:not(.primary-button) { color: var(--accent); background: transparent; border: 1px solid var(--line); }
.settings-status { min-height: 24px; margin: 13px 0 0; color: var(--muted); font-size: var(--font-ui); }
.settings-status.success { color: #34734c; }
.settings-status.error { color: #a3312b; }

html.night-reading .notice-card,
html.night-reading .book-card,
html.night-reading .home-book-card,
html.night-reading .home-quick-link { background: rgba(36, 32, 28, .86); }
html.night-reading .error-card { color: #f0aaa0; background: #382321; border-color: #74413a; }
html.night-reading .reading-onboarding { background: rgba(56, 42, 37, .86); }
html.night-reading .chapter-search,
html.night-reading .field input,
html.night-reading .field select { color: var(--ink); background: #2c2722; border-color: var(--line); }
html.night-reading .note-entry,
html.night-reading .ai-entry .note-source { background: #2c2722; border-color: var(--line); }
html.night-reading .seo-notes details { background: rgba(56, 42, 37, .72); }
html.night-reading .chapter-navigation-link { background: rgba(56, 42, 37, .86); }
html.night-reading .chapter-navigation-link.is-disabled { color: #81786e; background: rgba(54, 49, 43, .72); }
html.night-reading .drawer,
html.night-reading .topbar { border-color: var(--line); }
html.night-reading .selection-actions { color: #fff7ec; background: #8f4034; box-shadow: 0 7px 18px rgba(0, 0, 0, .38); }
html.night-reading .selection-action { color: #fff7ec; }
html.night-reading .selection-action + .selection-action { border-left-color: rgba(255, 247, 236, .28); }
html.night-reading .selection-action:hover,
html.night-reading .selection-action:focus-visible { background: #a94c3d; }
html.night-reading .home-hero { border-bottom-color: var(--line); }
html.night-reading .home-phone { background: var(--paper); border-color: var(--line); }
html.night-reading .directory-page .chapter-group-title,
html.night-reading .directory-page .chapter-link { border-color: var(--line); }

body.split-notes { overflow-x: hidden; background: var(--paper-deep); }
body.split-notes .page-shell {
  padding-bottom: calc(100vh - var(--note-split) + 34px);
}
body.split-notes .overlay { display: none; }
body.split-notes .note-drawer {
  display: flex;
  flex-direction: column;
  top: var(--note-split);
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: none;
  height: auto;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 -8px 24px rgba(51, 39, 25, .12);
  overflow: visible;
  overscroll-behavior-y: none;
}
body.split-notes .split-resizer {
  position: absolute;
  z-index: 2;
  top: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  cursor: row-resize;
  touch-action: none;
}
body.split-notes .split-resizer span { width: 42px; height: 5px; background: var(--line); border-radius: 5px; }
body.split-notes .drawer-content { max-height: none; height: calc(100% - 88px); }
body.split-notes .drawer-header { flex: 0 0 auto; }
body.split-notes .drawer-content {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
body.split-notes .note-drawer .drawer-kicker { display: none; }
body.split-notes .note-drawer .drawer-header { padding: 5px 15px 4px; align-items: center; }
body.split-notes .note-drawer .drawer-header .drawer-title { font-size: var(--font-subheading); }
body.split-notes .note-drawer .drawer-content { height: calc(100% - 70px); padding: 10px 15px 18px; }
body.split-notes .ai-entry .note-source { top: -10px; }

@media (min-width: 760px) {
  body.split-notes .page-shell {
    width: min(calc(100% - var(--note-width) - 32px), 820px);
    margin-right: calc(var(--note-width) + 16px);
    margin-left: max(16px, calc((100% - var(--note-width) - 820px) / 2));
    padding-bottom: 76px;
  }
  body.split-notes .note-drawer {
    top: 58px;
    right: 0;
    bottom: 0;
    left: auto;
    width: var(--note-width);
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  body.split-notes .split-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -18px;
    width: 36px;
    height: 100%;
    cursor: col-resize;
  }
  body.split-notes .split-resizer span { width: 5px; height: 42px; }
  body.split-notes .note-drawer .drawer-header { padding-left: 20px; }
}

@media (min-width: 760px) {
  .drawer { right: 18px; bottom: 18px; left: auto; border-bottom: 1px solid var(--line); border-radius: 14px; }
  .drawer-handle { display: none; }
}
@media (max-width: 520px) {
  :root { --topbar-height: 55px; }
  .topbar { min-height: 52px; padding-right: 12px; padding-left: 12px; }
  .topbar-actions { gap: 5px; }
  .icon-button { padding: 6px 8px; font-size: 12px; }
  .page-shell { width: calc(100% - 20px); padding-top: 34px; }
  .not-found-page { min-height: calc(100vh - var(--topbar-height)); padding-top: 20px; padding-bottom: 40px; }
  .not-found-card { padding: 38px 20px 42px; border-radius: 14px; }
  .not-found-card h1 { font-size: clamp(38px, 12vw, 52px); }
  .not-found-actions { display: grid; }
  .not-found-actions a { width: min(280px, 100%); margin: 0 auto; }
  .hero-copy { font-size: 14px; }
  .home-page { padding-top: 35px; }
  .home-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 5px; padding-bottom: 38px; }
  .home-phone { width: min(270px, 82vw); height: auto; }
  .home-section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .home-featured-list { gap: 16px; }
  .home-book-card { grid-template-columns: 1fr; gap: 22px; padding: 22px 20px; }
  .home-book-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-quick-links, .home-feature-list { grid-template-columns: 1fr; }
  .home-reading-features { margin-top: 38px; }
  .note-guide-page { width: calc(100% - 28px); padding-top: 38px; }
  .note-guide-lede { font-size: 16px; }
  .note-guide-section { margin-top: 40px; padding-top: 22px; }
  .note-guide-section h2 { font-size: 24px; }
  .note-guide-section > p, .note-guide-intro p { font-size: 16px; line-height: 1.9; }
  .note-guide-grid { grid-template-columns: 1fr; }
  .note-guide-card { padding: 17px; }
  .note-guide-example { padding: 22px 17px; }
  .note-guide-example blockquote { font-size: 20px; }
  .reader { padding: 22px 0; border-radius: 0; }
  .reading-onboarding { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; padding-right: 42px; }
  .reading-onboarding-copy { flex-basis: 100%; }
  .chapter-title { font-size: 24px; }
  .paragraph { font-size: var(--reading-font-size); line-height: 2; text-align: left; }
  .drawer-content { padding-right: 15px; padding-left: 15px; }
  .book-author-layout { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .book-author-portrait img { width: 96px; }
  .directory-page .chapter-directory-groups { gap: 24px; }
  .directory-page .chapter-group-list { grid-template-columns: 1fr; }
}

@media (max-width: 759px) {
  html { min-height: 100%; overflow-x: hidden; }
  body { position: static; min-height: 100%; height: auto; overflow-x: hidden; background: var(--paper-deep); }
  .page-shell {
    position: relative;
    margin: 0 auto;
    padding-right: 0;
    padding-bottom: 76px;
    padding-left: 0;
    overflow: visible;
    overflow-anchor: none;
    touch-action: pan-y;
  }
  body.reader-page .topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform 160ms ease;
    will-change: transform;
  }
  body.reader-page .topbar.is-scroll-hidden {
    transform: translate3d(0, -100%, 0);
  }
  body.reader-page {
    position: static;
    width: 100%;
    min-height: 100%;
    height: auto;
    max-height: none;
    padding-top: var(--topbar-height);
    overflow-x: hidden;
    overflow-y: visible;
  }
  body.reader-page .page-shell {
    position: relative;
    width: min(820px, calc(100% - 32px));
    height: auto;
    margin: 0 auto;
    padding: 54px 0 76px;
    overflow: visible;
    overflow-anchor: none;
    touch-action: pan-y;
  }
  html.split-notes-root {
    overflow-x: hidden;
  }
  body.reader-page.split-notes .page-shell {
    padding-bottom: calc(var(--split-viewport-height) - var(--note-split) + 76px);
  }
  body.reader-page.split-notes .note-drawer {
    position: fixed;
    top: var(--note-split);
    bottom: 0;
    height: auto;
  }
  body.split-notes .note-drawer .drawer-header { min-height: 36px; padding: 3px 12px 2px; }
  body.split-notes .note-drawer .drawer-header .drawer-title { font-size: var(--font-body); line-height: 1.2; }
  body.split-notes .note-drawer .drawer-content { height: calc(100% - 36px); padding-top: 8px; }
}

@media (max-width: 520px) {
  body.reader-page .page-shell {
    width: calc(100% - 20px);
    padding-top: 34px;
  }
}

@media (min-width: 521px) and (max-width: 759px) {
  .directory-page .chapter-group-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
}

@media (max-width: 759px) and (prefers-reduced-motion: reduce) {
  body.reader-page .topbar { transition: none; }
}

.feedback-overlay { z-index: 50; }
.feedback-drawer { z-index: 51; }
.feedback-intro { margin: 0 0 14px; color: var(--muted); font-size: var(--font-ui); line-height: 1.7; }
.feedback-content textarea { width: 100%; min-height: 132px; resize: vertical; padding: 10px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; outline: none; font: inherit; font-size: var(--font-body); line-height: 1.7; }
.feedback-content textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,61,47,.12); }
.feedback-content .field small { display: inline; color: var(--muted); font-size: var(--font-caption); font-weight: 400; }
.feedback-page-context { margin: 14px 0 0; color: var(--muted); font-size: var(--font-caption); line-height: 1.6; overflow-wrap: anywhere; }
.feedback-actions { margin-top: 17px; }
.feedback-actions .primary-button { color: #fff; background: var(--accent); border-color: var(--accent); }
.feedback-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.feedback-admin { max-width: 980px; }
.feedback-admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 18px; }
.feedback-admin-list { display: grid; gap: 14px; }
.feedback-admin-card { padding: 16px; background: rgba(255,250,242,.8); border: 1px solid var(--line); border-radius: 9px; }
.feedback-admin-card[data-status="resolved"] { opacity: .62; }
.feedback-admin-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; color: var(--muted); font-size: var(--font-caption); }
.feedback-admin-message { margin: 0 0 12px; white-space: pre-wrap; font-size: var(--font-body); line-height: 1.75; }
.feedback-admin-context { margin: 0 0 12px; color: var(--muted); font-size: var(--font-ui); line-height: 1.65; overflow-wrap: anywhere; }
.feedback-admin-actions { display: flex; gap: 8px; }
.feedback-admin-actions button { padding: 7px 11px; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 6px; font-weight: 700; }
html.night-reading .feedback-content textarea { color: var(--ink); background: #2c2722; border-color: var(--line); }
html.night-reading .feedback-admin-card { background: rgba(44,39,34,.88); }

.difficulty-markdown p { margin: 0 0 .7em; }
.difficulty-markdown p:last-child { margin-bottom: 0; }
.difficulty-markdown ul { margin: .3em 0 .8em; padding-left: 1.45em; }
.difficulty-markdown li { margin: .18em 0; }
