:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-light: #faf8f2;
  --ink: #242820;
  --muted: #696b61;
  --line: #d9d5c8;
  --accent: #988453;
  --accent-ink: #77623b;
  --selection: #ded5b6;
  --reading-size: 22px;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #1e2421;
  --paper-light: #242b26;
  --ink: #e2e0d5;
  --muted: #aaa99b;
  --line: #434940;
  --accent: #ad9968;
  --accent-ink: #c7b482;
  --selection: #4f543e;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--ink); }
::selection { background: var(--selection); color: var(--ink); }
a { color: inherit; text-decoration: none; text-underline-offset: .3em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input { border-radius: 0; }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 5px; }
button, a, input { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
figure, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.js-only { display: none; }
.has-js .js-only { display: flex; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 1rem; left: 1rem; transform: translateY(-200%); z-index: 20; padding: .7rem 1.1rem; background: var(--ink); color: var(--paper); }
.skip-link:focus { transform: translateY(0); }

.site-header { max-width: 1440px; margin: 0 auto; padding: 28px 64px; min-height: 101px; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .12em; line-height: 1.2; flex-shrink: 0; }
.wordmark-symbol { width: 36px; height: 42px; display: grid; place-items: center; border: 1px solid var(--accent); font-size: 24px; color: var(--accent-ink); position: relative; }
.wordmark-symbol::after { content: ""; position: absolute; inset: 3px; border: 1px solid var(--line); }
.wordmark-caption { display: block; margin-top: 5px; font-family: var(--sans); font-size: 9px; font-weight: 400; color: var(--muted); letter-spacing: .22em; }
.site-nav { margin-left: auto; display: flex; gap: 31px; font-size: 12px; letter-spacing: .05em; }
.site-nav a { position: relative; padding: 9px 0; color: var(--muted); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--accent); }
.theme-toggle { padding: 6px 0 6px 22px; margin-left: 7px; border: 0; border-left: 1px solid var(--line); background: transparent; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.3; }

.book-hero { max-width: 1312px; margin: 0 auto; padding: 74px 48px 65px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 62px; align-items: center; }
.hero-copy { min-width: 0; padding-bottom: 10px; }
.edition-line { display: flex; align-items: center; gap: 13px; font-size: 11px; letter-spacing: .18em; color: var(--accent-ink); }
.small-rule { display: inline-block; width: 28px; height: 1px; background: var(--accent); flex-shrink: 0; }
.edition-number { margin-left: 15px; font-family: Georgia, serif; font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.hero-copy h1 { display: inline-flex; align-items: baseline; margin: 29px 0 13px -6px; font-family: var(--serif); font-size: clamp(96px, 10vw, 148px); font-weight: 500; letter-spacing: -.05em; line-height: 1.25; }
.hero-copy h1 > span:not(.title-seal) { margin-left: .12em; }
.title-seal { align-self: flex-start; margin: 31px 0 0 20px; padding: 5px 7px; border: 1px solid var(--accent); color: var(--accent-ink); font-size: 18px; line-height: 1; }
.hero-subtitle { margin-top: 8px; font-family: var(--serif); font-size: 25px; letter-spacing: .13em; }
.hero-description { margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 2.1; letter-spacing: .025em; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 25px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; min-width: 162px; min-height: 48px; padding: 12px 20px; font-size: 12px; letter-spacing: .1em; gap: 32px; transition: background-color .2s, transform .2s; }
.button-ink { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.button-ink:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-2px); }
.button > span { font-size: 18px; line-height: 1; }
.resume-link { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; color: var(--accent-ink); max-width: 100%; }
.resume-link span:first-child { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-link:hover { text-decoration: underline; }
.book-facts { display: flex; margin: 43px 0 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 435px; }
.book-facts > div { padding-right: 27px; margin-right: 27px; border-right: 1px solid var(--line); }
.book-facts > div:last-child { padding: 0; margin: 0; border: 0; }
.book-facts dt { font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.book-facts dd { margin: 5px 0 0; font-family: Georgia, var(--serif); font-size: 22px; letter-spacing: -.02em; line-height: 1.3; }
.book-facts dd span { margin-left: 5px; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.hero-art { position: relative; isolation: isolate; margin: 0; width: 100%; max-width: 440px; justify-self: end; }
.hero-art::before { content: ""; position: absolute; inset: 11px -12px -12px 11px; border: 1px solid var(--line); z-index: -1; }
.hero-art img { width: 100%; aspect-ratio: 26 / 31; object-fit: cover; }
.hero-art figcaption { display: flex; justify-content: space-between; margin: 18px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: 9px; letter-spacing: .15em; }
:root[data-theme="night"] .hero-art img { filter: brightness(.76) saturate(.8); }

.chapter-section { max-width: 1312px; margin: 0 auto; padding: 51px 48px 65px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.eyebrow { font-size: 10px; color: var(--accent-ink); letter-spacing: .16em; line-height: 1.7; }
.section-heading h2 { margin-top: 12px; font-family: var(--serif); font-size: 35px; font-weight: 500; letter-spacing: .07em; }
.heading-dot { color: var(--accent); }
.section-note { padding-bottom: 7px; color: var(--muted); font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
.section-note span { margin: 0 10px; color: var(--accent); }
.catalog-controls { align-items: center; justify-content: space-between; gap: 24px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stage-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stage-filters button { padding: 6px 12px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 11px; }
.stage-filters button:first-child { margin-left: -12px; }
.stage-filters button:hover { color: var(--ink); }
.stage-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chapter-search-wrap { display: flex; align-items: center; gap: 9px; width: 215px; max-width: 100%; flex-shrink: 0; }
.chapter-search-wrap svg { width: 16px; height: 16px; stroke: var(--muted); stroke-width: 1.3; flex-shrink: 0; }
.chapter-search-wrap input { width: 100%; min-width: 0; padding: 7px 2px; border: 0; background: transparent; font-size: 11px; }
.chapter-search-wrap input::placeholder { color: var(--muted); opacity: 1; }
.has-js .chapter-count { display: block; margin-top: 14px; font-size: 10px; color: var(--muted); text-align: right; }
.chapter-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 60px; margin-top: 8px; }
.source-note { margin: 14px 0 24px; max-width: 680px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.original-preface .document-body { padding-top: 25px; font-size: 14px; overflow-wrap: anywhere; }
.chapter-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 14px; position: relative; padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); transition: border-color .2s; }
.chapter-card::after { content: "↗"; position: absolute; right: 1px; top: 25px; color: var(--accent-ink); font-size: 16px; transition: transform .2s; }
.chapter-card:hover { border-bottom-color: var(--accent); }
.chapter-card:hover::after { transform: translate(2px, -2px); }
.chapter-number { grid-row: 1 / span 3; align-self: start; padding-top: 3px; font-family: Georgia, serif; font-size: 16px; color: var(--accent-ink); }
.chapter-title { grid-column: 2; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.55; letter-spacing: .03em; }
.chapter-teaser { grid-column: 2; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.9; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.chapter-meta { grid-column: 2; margin-top: 8px; color: var(--muted); font-size: 9px; letter-spacing: .05em; }
.empty-state { padding: 58px 16px; text-align: center; }
.empty-state p:first-child { font-family: var(--serif); font-size: 23px; }
.empty-state p + p { margin-top: 12px; color: var(--muted); font-size: 12px; }
.text-button { margin-top: 24px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--accent); background: transparent; font-size: 12px; color: var(--accent-ink); }
.text-button span { margin-left: 15px; }
.full-toc { margin-top: 26px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.full-toc summary { display: flex; justify-content: space-between; align-items: center; list-style: none; cursor: pointer; font-size: 11px; color: var(--muted); }
.full-toc summary::-webkit-details-marker { display: none; }
.full-toc summary > span { font-size: 17px; color: var(--accent-ink); }
.full-toc[open] summary > span { transform: rotate(45deg); }
.full-toc-content { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; padding: 28px 0 10px; }
.toc-group h3 { margin-bottom: 11px; color: var(--accent-ink); font-family: var(--serif); font-size: 15px; font-weight: 500; }
.toc-link { display: block; padding: 5px 0; font-size: 11px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.toc-link:hover { color: var(--ink); text-decoration: underline; }
.toc-link[aria-current="page"] { color: var(--ink); font-weight: 700; }

.reading-shelf { max-width: 1216px; margin: 0 auto 65px; padding: 37px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.15fr; column-gap: 90px; }
.shelf-intro h2 { margin-top: 13px; font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: .06em; }
.shelf-intro > p:last-child { margin-top: 12px; color: var(--muted); font-size: 12px; }
.shelf-links > a { display: grid; grid-template-columns: 25px minmax(0, 1fr) 20px; column-gap: 19px; align-items: center; padding: 17px 0 20px; border-bottom: 1px solid var(--line); }
.shelf-links > a:first-child { padding-top: 0; }
.shelf-index { align-self: start; padding-top: 6px; color: var(--accent-ink); font-family: Georgia, serif; font-size: 11px; }
.shelf-links strong { display: block; font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: .05em; }
.shelf-links small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.shelf-arrow { color: var(--accent-ink); font-size: 20px; }
.shelf-links > a:hover .shelf-arrow { transform: translate(2px, -2px); }
.download-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 15px 28px; align-items: center; margin-top: 36px; font-size: 10px; }
.download-links > span { color: var(--muted); margin-right: auto; }
.download-links a:hover { text-decoration: underline; }
.download-links a span { margin-left: 10px; color: var(--accent-ink); font-family: Georgia, serif; font-size: 9px; }
.site-footer { max-width: 1440px; margin: 0 auto; padding: 28px 64px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10px; }
.site-footer p > span { display: inline-block; margin-left: 19px; padding-left: 19px; border-left: 1px solid var(--line); font-size: 9px; }
.site-footer > div { display: flex; gap: 27px; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

.reader-layout { max-width: 1440px; margin: 0 auto; padding: 51px 64px 72px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; }
.toc-sidebar { position: sticky; top: 32px; align-self: start; padding-right: 25px; border-right: 1px solid var(--line); min-width: 0; }
.toc-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 0 18px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 17px; }
.toc-title > span { font-family: var(--sans); color: var(--muted); font-size: 9px; }
.toc-panel { max-height: calc(100vh - 200px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 8px 6px 12px 0; overscroll-behavior: contain; }
.toc-panel .toc-group { margin-top: 19px; }
.toc-panel .toc-group h3 { font-family: var(--sans); font-size: 10px; letter-spacing: .05em; margin-bottom: 7px; }
.toc-panel .toc-link { position: relative; padding: 6px 7px 6px 10px; border-left: 1px solid transparent; font-size: 11px; }
.toc-panel .toc-link[aria-current="page"] { border-left-color: var(--accent); background: var(--paper-light); text-decoration: none; }
.toc-home { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.toc-home:hover { color: var(--ink); }
.has-js .toc-toggle { display: none; }
.reader-main { min-width: 0; }
.chapter-article { max-width: 900px; margin: 0 auto; }
.chapter-header { padding: 5px 0 30px; }
.chapter-header > .eyebrow { font-size: 9px; }
.chapter-kicker { margin-top: 33px; color: var(--accent-ink); font-size: 12px; letter-spacing: .15em; }
.chapter-header h1 { margin-top: 12px; font-family: var(--serif); font-size: clamp(30px, 3.1vw, 43px); line-height: 1.5; font-weight: 500; letter-spacing: .06em; overflow-wrap: anywhere; }
.chapter-details { display: flex; align-items: center; gap: 19px; margin-top: 20px; font-size: 10px; color: var(--muted); }
.chapter-divider { margin-left: auto; color: var(--accent); font-size: 18px; }
.reader-tools { align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 35px; }
.font-controls { display: flex; align-items: center; gap: 5px; }
.font-controls > span { margin-right: 9px; font-size: 10px; color: var(--muted); }
.font-controls button { min-width: 32px; min-height: 32px; padding: 4px 5px; border: 1px solid transparent; background: transparent; font-family: Georgia, var(--serif); font-size: 15px; }
.font-controls button:hover:not(:disabled) { border-color: var(--line); background: var(--paper-light); }
.font-controls #font-reset { color: var(--muted); font-size: 11px; }
.progress-info { display: flex; align-items: center; gap: 9px; font-size: 9px; color: var(--muted); }
.progress-info progress { width: 56px; height: 2px; appearance: none; border: 0; background: var(--line); color: var(--accent); }
.progress-info progress::-webkit-progress-bar { background: var(--line); }
.progress-info progress::-webkit-progress-value { background: var(--accent); }
.progress-info progress::-moz-progress-bar { background: var(--accent); }
.progress-info #progress-label { min-width: 29px; font-family: Georgia, serif; }
.chapter-body { max-width: 36em; margin: 0 auto; padding-top: 8px; font-family: var(--serif); font-size: var(--reading-size); line-height: 1.95; letter-spacing: .02em; overflow-wrap: anywhere; }
.chapter-body p { margin: 0 0 1.2em; text-indent: 2em; }
.chapter-body .scene-heading { margin: 2.3em 0 1.3em; font-size: .78em; color: var(--accent-ink); font-weight: 400; letter-spacing: .08em; line-height: 1.9; text-align: center; }
.chapter-body .scene-heading:first-child { margin-top: 1.2em; }
.chapter-end { display: flex; gap: 20px; align-items: center; justify-content: center; margin: 49px 0; color: var(--accent); font-size: 17px; }
.chapter-end span { width: 36px; height: 1px; background: var(--line); }
.chapter-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.chapter-navigation a { min-width: 0; padding: 6px 0; }
.chapter-navigation a:last-child { text-align: right; border-left: 1px solid var(--line); padding-left: 24px; }
.page-direction { display: block; font-size: 10px; color: var(--accent-ink); }
.chapter-navigation strong { display: block; margin-top: 8px; font-family: var(--serif); font-size: 16px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.chapter-navigation a:hover strong { text-decoration: underline; }
.has-js .keyboard-hint { display: block; margin-top: 18px; color: var(--muted); text-align: center; font-size: 9px; }

.document-main { width: min(100% - 128px, 880px); margin: 0 auto; padding: 48px 0 75px; }
.back-link { display: inline-block; color: var(--muted); font-size: 11px; }
.back-link:hover { color: var(--ink); text-decoration: underline; }
.document-header { padding-bottom: 35px; border-bottom: 1px solid var(--line); }
.document-header .eyebrow { margin-top: 39px; }
.document-header h1 { margin-top: 15px; font-family: var(--serif); font-size: clamp(34px, 4vw, 48px); font-weight: 500; letter-spacing: .06em; line-height: 1.5; }
.document-header > p:last-child { margin-top: 14px; font-size: 12px; color: var(--muted); }
.document-body { margin-top: 37px; font-family: var(--serif); font-size: 18px; line-height: 1.95; overflow-wrap: anywhere; }
.document-body h1, .document-body h2, .document-body h3, .document-body h4 { line-height: 1.65; font-weight: 500; }
.document-body h1 { font-size: 1.7em; margin: 1.4em 0 .75em; }
.document-body h2 { font-size: 1.4em; margin: 2em 0 .8em; padding-bottom: .5em; border-bottom: 1px solid var(--line); }
.document-body h3 { font-size: 1.12em; margin: 1.7em 0 .65em; color: var(--accent-ink); }
.document-body h4 { font-size: 1em; margin: 1.5em 0 .6em; }
.document-body > :first-child { margin-top: 0; }
.document-body p { margin: .9em 0; }
.document-body ul, .document-body ol { margin: .9em 0; padding-left: 1.5em; }
.document-body li { padding-left: .2em; margin: .4em 0; }
.document-body li::marker { color: var(--accent-ink); }
.document-body li p { margin: .35em 0; }
.document-body a { text-decoration: underline; color: var(--accent-ink); }
.document-body blockquote { margin: 1.4em 0; padding: .15em 0 .15em 1.1em; border-left: 2px solid var(--accent); color: var(--muted); }
.document-body hr { height: 1px; border: 0; background: var(--line); margin: 2em 0; }
.document-body table { display: block; max-width: 100%; width: max-content; overflow-x: auto; border-collapse: collapse; margin: 1.4em 0; font-family: var(--sans); font-size: 12px; line-height: 1.8; scrollbar-width: thin; }
.document-body th, .document-body td { text-align: left; vertical-align: top; padding: 10px 13px; border: 1px solid var(--line); min-width: 90px; max-width: 400px; }
.document-body th { background: var(--paper-light); font-weight: 500; }
.document-body code { font-family: Consolas, "Courier New", monospace; font-size: .8em; padding: .12em .3em; background: var(--paper-light); }
.document-body pre { overflow: auto; max-width: 100%; margin: 1.4em 0; padding: 18px; border: 1px solid var(--line); background: var(--paper-light); font-size: 12px; line-height: 1.8; white-space: pre-wrap; }
.document-body pre code { padding: 0; background: transparent; font-size: inherit; }
.document-toc { margin-top: 50px; padding: 19px 0; border-top: 1px solid var(--line); }
.document-toc .full-toc-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.document-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; }

@keyframes page-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: page-arrive .65s ease both; }
  .hero-art { animation: page-arrive .8s .12s ease both; }
}

@media (min-width: 1600px) {
  .book-hero { padding-top: 94px; padding-bottom: 86px; }
}

@media (max-width: 1100px) {
  .site-header, .site-footer { padding-right: 36px; padding-left: 36px; }
  .book-hero { gap: 38px; padding-right: 36px; padding-left: 36px; }
  .hero-copy h1 { font-size: 112px; }
  .title-seal { margin-top: 22px; margin-left: 14px; }
  .hero-subtitle { font-size: 22px; }
  .chapter-section { padding-right: 36px; padding-left: 36px; }
  .chapter-grid { column-gap: 36px; }
  .reading-shelf { margin-right: 36px; margin-left: 36px; column-gap: 50px; }
  .reader-layout { padding-right: 36px; padding-left: 36px; grid-template-columns: 185px minmax(0, 1fr); gap: 38px; }
  .toc-sidebar { padding-right: 17px; }
  .document-main { width: min(100% - 72px, 880px); }
}

@media (max-width: 780px) {
  .site-header { gap: 22px; min-height: 89px; padding: 22px 24px; }
  .wordmark { font-size: 20px; gap: 9px; }
  .wordmark-symbol { width: 30px; height: 36px; font-size: 21px; }
  .site-nav { gap: 19px; font-size: 11px; }
  .theme-toggle { margin-left: 0; padding-left: 16px; }
  .theme-label { display: none; }
  .book-hero { padding: 49px 24px 48px; gap: 30px; }
  .hero-copy h1 { font-size: 88px; }
  .edition-line { gap: 9px; font-size: 9px; }
  .edition-number { display: none; }
  .small-rule { width: 20px; }
  .title-seal { margin: 18px 0 0 11px; font-size: 14px; padding: 4px 5px; }
  .hero-subtitle { font-size: 18px; letter-spacing: .08em; }
  .hero-description { font-size: 11px; margin-top: 17px; }
  .desktop-break { display: none; }
  .hero-actions { margin-top: 25px; gap: 17px; }
  .button { min-width: 142px; min-height: 44px; padding: 10px 16px; font-size: 11px; }
  .book-facts { margin-top: 29px; padding-top: 17px; }
  .book-facts > div { padding-right: 15px; margin-right: 15px; }
  .book-facts dt { font-size: 9px; }
  .book-facts dd { font-size: 18px; }
  .book-facts dd span { font-size: 8px; }
  .hero-art figcaption { font-size: 7px; letter-spacing: .08em; }
  .chapter-section { padding: 37px 24px 44px; }
  .section-heading { margin-bottom: 24px; }
  .section-heading h2 { font-size: 30px; }
  .section-note { font-size: 9px; }
  .section-note span { margin: 0 5px; }
  .catalog-controls { flex-wrap: wrap; gap: 12px; }
  .stage-filters { gap: 2px; }
  .stage-filters button { padding: 6px 10px; }
  .stage-filters button:first-child { margin-left: -10px; }
  .chapter-search-wrap { width: 175px; }
  .chapter-grid { column-gap: 26px; }
  .chapter-card { grid-template-columns: 31px minmax(0, 1fr); column-gap: 9px; padding-top: 19px; padding-bottom: 19px; }
  .chapter-number { font-size: 13px; }
  .chapter-title { font-size: 18px; }
  .chapter-card::after { top: 20px; font-size: 14px; }
  .full-toc-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-shelf { margin: 0 24px 45px; grid-template-columns: .8fr 1.2fr; gap: 25px; }
  .shelf-intro h2 { font-size: 27px; }
  .shelf-intro .eyebrow { font-size: 8px; }
  .shelf-intro > p:last-child { font-size: 10px; }
  .shelf-links > a { column-gap: 12px; }
  .shelf-links strong { font-size: 19px; }
  .download-links { margin-top: 7px; }
  .site-footer { padding: 23px 24px; font-size: 9px; }
  .site-footer p > span { margin-left: 10px; padding-left: 10px; font-size: 8px; }
  .site-footer > div { gap: 18px; }
  .reader-layout { display: block; padding: 25px 24px 49px; }
  .toc-sidebar { position: static; border: 0; padding: 0 0 22px; }
  .toc-title { display: none; }
  .has-js .toc-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; }
  .toc-toggle-mark { font-size: 17px; color: var(--accent-ink); }
  .toc-toggle[aria-expanded="true"] .toc-toggle-mark { transform: rotate(45deg); }
  .toc-panel { padding: 10px 0 20px; max-height: 330px; border-bottom: 1px solid var(--line); }
  .toc-panel .toc-group { margin-top: 12px; }
  .toc-home { display: none; }
  .chapter-header { padding: 8px 0 25px; }
  .chapter-kicker { margin-top: 25px; }
  .chapter-header h1 { font-size: 35px; }
  .chapter-body { letter-spacing: .015em; }
  .reader-tools { margin-bottom: 28px; }
  .chapter-navigation strong { font-size: 15px; }
  .has-js .keyboard-hint { display: none; }
  .document-main { width: calc(100% - 48px); padding: 33px 0 50px; }
  .document-header h1 { font-size: 37px; }
  .document-body { font-size: 17px; }
}

@media (max-width: 540px) {
  .site-header { display: grid; grid-template-columns: 1fr auto; gap: 17px 14px; padding: 21px 20px 15px; }
  .site-nav { order: 3; grid-column: 1 / -1; margin: 0; justify-content: space-between; gap: 16px; padding-top: 7px; border-top: 1px solid var(--line); }
  .site-nav a { padding: 5px 0; font-size: 11px; }
  .theme-toggle { justify-self: end; border: 0; padding: 10px 0 10px 15px; }
  .theme-label { display: inline; }
  .book-hero { grid-template-columns: 1fr; padding: 37px 24px 39px; gap: 35px; }
  .hero-copy { padding-bottom: 0; }
  .edition-line { font-size: 10px; }
  .edition-number { display: inline; margin-left: auto; font-size: 9px; }
  .hero-copy h1 { margin: 21px 0 9px -4px; font-size: clamp(94px, 26vw, 128px); }
  .title-seal { margin: 23px 0 0 17px; font-size: 16px; }
  .hero-subtitle { font-size: 22px; letter-spacing: .1em; }
  .hero-description { max-width: 30em; margin-top: 15px; font-size: 12px; }
  .hero-actions { margin-top: 26px; gap: 17px; }
  .resume-link { font-size: 10px; }
  .resume-link span:first-child { max-width: 150px; }
  .book-facts { margin-top: 28px; width: 100%; max-width: none; justify-content: space-between; }
  .book-facts > div { padding-right: 20px; margin-right: 0; }
  .book-facts dd { font-size: 22px; }
  .hero-art { justify-self: stretch; max-width: none; }
  .hero-art::before { inset: 8px -8px -8px 8px; }
  .hero-art img { aspect-ratio: 1.25 / 1; object-fit: cover; object-position: center 43%; }
  .hero-art figcaption { margin-top: 15px; font-size: 8px; }
  .chapter-section { padding: 34px 24px 39px; }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 29px; margin-top: 9px; }
  .section-note { max-width: 85px; font-size: 8px; line-height: 1.8; text-align: right; white-space: normal; }
  .section-note span { display: block; height: 8px; line-height: 8px; margin: 2px 0; }
  .eyebrow { font-size: 8px; }
  .catalog-controls { gap: 12px; padding: 12px 0; }
  .stage-filters { width: 100%; justify-content: space-between; gap: 0; }
  .stage-filters button { padding: 6px 9px; font-size: 10px; }
  .stage-filters button:first-child { margin-left: 0; }
  .chapter-search-wrap { width: 100%; padding-top: 7px; border-top: 1px solid var(--line); }
  .chapter-search-wrap input { font-size: 12px; padding-top: 6px; padding-bottom: 6px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-card { grid-template-columns: 38px minmax(0, 1fr); column-gap: 11px; padding-top: 21px; padding-bottom: 21px; }
  .chapter-number { font-size: 15px; }
  .chapter-title { font-size: 21px; }
  .chapter-teaser { margin-top: 6px; font-size: 11px; }
  .chapter-meta { font-size: 9px; }
  .chapter-card::after { top: 25px; }
  .full-toc-content { gap: 22px 16px; }
  .reading-shelf { grid-template-columns: 1fr; gap: 25px; padding-top: 28px; }
  .shelf-intro > p:last-child { font-size: 11px; }
  .shelf-links > a { grid-template-columns: 28px minmax(0, 1fr) 20px; }
  .shelf-links strong { font-size: 22px; }
  .shelf-links small { font-size: 11px; }
  .download-links { gap: 15px; margin-top: 0; font-size: 10px; }
  .download-links > span { width: 100%; margin-bottom: 1px; }
  .download-links a span { margin-left: 4px; font-size: 8px; }
  .site-footer { align-items: flex-start; padding: 24px; flex-direction: column; gap: 15px; }
  .site-footer > div { width: 100%; justify-content: space-between; }
  .reader-layout { padding: 20px 22px 40px; }
  .toc-sidebar { padding-bottom: 18px; }
  .chapter-header { padding-top: 7px; }
  .chapter-header > .eyebrow { font-size: 8px; }
  .chapter-kicker { margin-top: 25px; font-size: 11px; }
  .chapter-header h1 { font-size: 31px; margin-top: 10px; letter-spacing: .03em; }
  .chapter-details { margin-top: 17px; gap: 15px; }
  .reader-tools { gap: 10px; }
  .font-controls { gap: 1px; }
  .font-controls > span { margin-right: 3px; font-size: 9px; }
  .font-controls button { min-width: 29px; }
  .progress-info { gap: 6px; font-size: 8px; }
  .progress-info progress { width: 34px; }
  .chapter-body { line-height: 1.9; padding-top: 4px; }
  .chapter-body p { margin-bottom: 1.1em; }
  .chapter-body .scene-heading { font-size: .7em; }
  .chapter-navigation { gap: 15px; padding: 17px 0; }
  .chapter-navigation a:last-child { padding-left: 15px; }
  .chapter-navigation strong { font-size: 14px; }
  .document-main { width: calc(100% - 44px); }
  .document-header h1 { font-size: 32px; letter-spacing: .03em; }
  .document-header { padding-bottom: 28px; }
  .document-header .eyebrow { margin-top: 30px; }
  .document-body { margin-top: 27px; font-size: 17px; }
  .document-body h2 { font-size: 1.3em; }
  .document-body pre { padding: 13px; font-size: 11px; }
  .document-bottom { flex-wrap: wrap; gap: 19px; }
}

@media (max-width: 360px) {
  .book-hero, .chapter-section, .site-footer { padding-right: 18px; padding-left: 18px; }
  .reading-shelf { margin-right: 18px; margin-left: 18px; }
  .hero-copy h1 { font-size: 88px; }
  .hero-subtitle { font-size: 20px; }
  .book-facts > div { padding-right: 15px; }
  .book-facts dd { font-size: 19px; }
  .reader-layout { padding-right: 17px; padding-left: 17px; }
  .progress-info label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  :root { --paper: #fff; --paper-light: #fff; --ink: #000; --muted: #444; --line: #aaa; --accent-ink: #444; }
  .site-header, .site-footer, .toc-sidebar, .reader-tools, .chapter-navigation, .keyboard-hint, .document-toc, .document-bottom, .skip-link { display: none !important; }
  .reader-layout { display: block; padding: 0; }
  .chapter-body { font-size: 12pt; max-width: none; }
  .chapter-header h1 { font-size: 24pt; }
  .document-main { width: 100%; padding: 0; }
  .document-body { font-size: 12pt; }
  .chapter-end { margin: 20pt 0; }
  h1, h2, h3 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
}
