/* Self-hosted Latin subsets: DM Sans 400-700, Libre Caslon Display 400. CJK falls back to system serif. */
/* latin-ext */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/01-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/02-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  src: url(/fonts/03-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  src: url(/fonts/04-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  src: url(/fonts/05-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  src: url(/fonts/06-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  src: url(/fonts/07-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  src: url(/fonts/08-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-display: swap;
  font-family: 'Libre Caslon Display';
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/09-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-display: swap;
  font-family: 'Libre Caslon Display';
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/10-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #172a25;
  --muted: #65726c;
  --green: #173f35;
  --green-2: #24594a;
  --gold: #b88746;
  --paper: #f6f2e9;
  --paper-deep: #ece4d4;
  --white: #fffdf8;
  --line: rgba(23, 63, 53, .14);
  --shadow: 0 20px 55px rgba(30, 42, 35, .09);
  --serif: 'Libre Caslon Display', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #d6a555; outline-offset: 3px; }
::selection { background: #d9bf8e; color: var(--green); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 1000; padding: 10px 18px; background: var(--white); color: var(--green); }
.skip-link:focus { top: 20px; }
.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.narrow { width: min(800px, calc(100% - 48px)); margin-inline: auto; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 30px; height: 1px; background: currentColor; }
.display { margin: 0; font-family: var(--serif); font-size: clamp(48px, 6.5vw, 82px); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
.section-title { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4vw, 52px); font-weight: 400; line-height: 1.08; letter-spacing: -.025em; }
.section-copy { max-width: 590px; margin: 16px 0 0; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 34px; }
.section { padding: 84px 0; }
.section-tinted { background: #ede7da; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(246, 242, 233, .94); backdrop-filter: blur(16px); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark { width: 33px; height: 33px; color: var(--green); }
.brand-name { font-family: var(--serif); font-size: 31px; letter-spacing: -.02em; }
.brand-tag { margin-left: 2px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display: flex; gap: 25px; align-items: center; }
.main-nav a { position: relative; color: #42534d; font-size: 13px; font-weight: 600; }
.main-nav a:hover, .main-nav a.active { color: var(--green); }
.main-nav a.active::after { content: ''; position: absolute; right: 0; bottom: -10px; left: 0; height: 2px; background: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-select { width: auto; min-width: 80px; padding: 8px 27px 8px 10px; border: 0; background-color: transparent; color: var(--green); font-size: 12px; font-weight: 600; cursor: pointer; }
.mobile-menu { display: none; padding: 8px; border: 0; background: none; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 11px 19px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: transform .2s, background .2s, color .2s, border .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fffaf0; }
.btn-primary:hover { background: var(--green-2); }
.btn-gold { background: var(--gold); color: #172a25; }
.btn-outline { border-color: var(--line); background: transparent; color: var(--green); }
.btn-outline:hover { border-color: var(--green); }
.btn-light { background: var(--white); color: var(--green); }
.btn-ghost { min-height: 36px; padding: 7px 11px; background: transparent; color: var(--green); }
.btn-small { min-height: 34px; padding: 7px 12px; font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--gold); }

.hero { position: relative; overflow: hidden; background: var(--green); color: #f9f3e7; }
.hero::before { content: ''; position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(#fff 0.7px, transparent .7px); background-size: 12px 12px; mask-image: linear-gradient(to right, transparent, #000); }
.hero::after { content: 'L'; position: absolute; right: -2vw; bottom: -25vw; color: rgba(255,255,255,.025); font-family: var(--serif); font-size: 70vw; line-height: 1; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; min-height: 650px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 80px; padding-block: 74px; }
.hero .eyebrow { color: #d9b778; }
.hero .display { max-width: 720px; }
.hero-copy { max-width: 590px; margin: 25px 0 30px; color: #d4ded8; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-outline { border-color: rgba(255,255,255,.28); color: #fff; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 40px; color: #bccac3; font-size: 12px; }
.hero-proof span { display: flex; align-items: center; gap: 7px; }
.hero-proof b { color: #e2c58d; font-size: 18px; font-weight: 500; }
.hero-art { position: relative; min-height: 450px; display: flex; justify-content: center; align-items: center; }
.hero-cover { position: relative; z-index: 2; width: 245px; transform: rotate(3deg); border-radius: 3px; box-shadow: -20px 30px 60px rgba(0,0,0,.32); }
.hero-cover::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: -7px; width: 7px; background: #102a23; }
.hero-art::before, .hero-art::after { content: ''; position: absolute; width: 245px; height: 368px; border: 1px solid rgba(215,185,124,.35); }
.hero-art::before { transform: rotate(-8deg) translate(-25px, 5px); }
.hero-art::after { transform: rotate(10deg) translate(20px, 10px); }
.hero-note { position: absolute; right: -5px; bottom: 6px; z-index: 3; width: 195px; padding: 16px; background: #f3e7cf; color: var(--green); box-shadow: var(--shadow); transform: rotate(-3deg); }
.hero-note small { display: block; margin-bottom: 5px; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.hero-note strong { font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.05; }

.stat-strip { border-bottom: 1px solid var(--line); background: var(--white); }
.stat-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 24px 26px; border-right: 1px solid var(--line); text-align: center; }
.stat:last-child { border: 0; }
.stat strong { display: block; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.stat span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.book-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 22px; }
.book-card { position: relative; min-width: 0; }
.book-cover-link { position: relative; display: block; margin-bottom: 16px; }
.book-cover { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px; box-shadow: 0 12px 30px rgba(35,42,36,.13); transition: transform .3s, box-shadow .3s; }
.book-card:hover .book-cover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 20px 38px rgba(35,42,36,.2); }
.book-badge { position: absolute; top: 10px; left: -5px; padding: 4px 8px; background: #f6e9ca; color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 4px 12px #0002; }
.book-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.book-title { margin: 0 0 5px; font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.08; }
.book-title a:hover { color: var(--gold); }
.book-author { margin: 0; color: var(--muted); font-size: 12px; }
.book-description { display: -webkit-box; overflow: hidden; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card { position: relative; min-height: 180px; padding: 25px; border: 1px solid var(--line); background: var(--white); overflow: hidden; transition: transform .2s, border .2s; }
.category-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.category-number { position: absolute; right: 13px; bottom: -30px; color: rgba(23,63,53,.05); font-family: var(--serif); font-size: 125px; line-height: 1; }
.category-icon { display: grid; width: 38px; height: 38px; margin-bottom: 22px; place-items: center; border: 1px solid var(--line); color: var(--gold); }
.category-card h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.category-card p { margin: 0; color: var(--muted); font-size: 12px; }

.feature-band { background: #d9c6a0; }
.feature-inner { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 65px; }
.feature-quote { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 45px); line-height: 1.12; }
.feature-quote::before { content: '“'; display: block; height: 45px; color: var(--gold); font-size: 85px; line-height: 1; }
.feature-list { display: grid; gap: 0; }
.feature-item { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid rgba(23,63,53,.17); }
.feature-item:last-child { border: 0; }
.feature-item b { color: var(--gold); font-family: var(--serif); font-size: 27px; font-weight: 400; }
.feature-item h3 { margin: 0 0 4px; font-size: 14px; }
.feature-item p { margin: 0; color: #47534c; font-size: 12px; }

.ad-slot { display: flex; min-height: 94px; margin: 30px 0; align-items: center; justify-content: center; border: 1px dashed rgba(100,110,100,.25); background: rgba(255,255,255,.28); color: #8a928d; font-size: 9px; letter-spacing: .16em; text-align: center; text-transform: uppercase; }
.ad-slot span { opacity: .75; }

.site-footer { padding: 55px 0 25px; background: #122f28; color: #d2ddd7; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 50px; }
.footer-brand .brand-name { color: #fff8ea; }
.footer-brand p { max-width: 320px; margin: 15px 0; color: #9fb2aa; font-size: 12px; }
.footer-column h3 { margin: 0 0 15px; color: #d8bd87; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.footer-column a { display: block; margin: 8px 0; color: #b7c6c0; font-size: 12px; }
.footer-column a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: #8fa39b; font-size: 10px; }

.page-hero { padding: 62px 0 45px; border-bottom: 1px solid var(--line); background: #ede7da; }
.page-hero .section-title { max-width: 800px; }
.page-hero p { max-width: 690px; margin: 16px 0 0; color: var(--muted); }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 24px; color: var(--muted); font-size: 11px; }
.breadcrumbs a:hover { color: var(--gold); }
.library-tools { display: flex; gap: 12px; margin: 28px 0 36px; }
.search-wrap { position: relative; flex: 1; }
.search-wrap .icon { position: absolute; top: 14px; left: 15px; color: var(--muted); }
.search-input { width: 100%; min-height: 47px; padding: 10px 15px 10px 45px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--ink); }
.filter-select { min-height: 47px; padding: 10px 35px 10px 13px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--ink); }
.result-count { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.empty-state { grid-column: 1/-1; padding: 60px 20px; border: 1px dashed var(--line); text-align: center; }
.empty-state h3 { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 400; }

.book-hero { padding: 52px 0 60px; background: #e9e1d2; }
.book-hero-grid { display: grid; grid-template-columns: 250px 1fr; align-items: center; gap: 60px; }
.book-detail-cover { border-radius: 2px; box-shadow: 15px 20px 40px rgba(30,40,33,.19); }
.book-overline { margin-bottom: 13px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.book-detail-title { margin: 0; font-family: var(--serif); font-size: clamp(44px, 5vw, 66px); font-weight: 400; line-height: 1; letter-spacing: -.03em; }
.book-detail-author { margin: 12px 0; color: var(--green); font-size: 14px; }
.book-dek { max-width: 720px; margin: 20px 0; color: #4d5b55; font-size: 16px; }
.book-facts { display: flex; flex-wrap: wrap; gap: 22px; margin: 20px 0 25px; }
.book-fact strong { display: block; color: var(--green); font-size: 12px; }
.book-fact span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.book-content { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 65px; padding-block: 65px; }
.article-section { margin-bottom: 55px; scroll-margin-top: 100px; }
.article-section h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1.1; }
.article-section h2 .section-index { color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.article-section > p { margin: 0 0 15px; color: #40514a; font-family: Georgia, 'Noto Serif SC', serif; font-size: 17px; line-height: 1.85; }
.guide-callout { margin-top: 20px; padding: 22px 25px; border-left: 3px solid var(--gold); background: #eee6d7; }
.guide-callout p { margin: 0; font-family: Georgia, 'Noto Serif SC', serif; }
.route-list { display: grid; gap: 0; counter-reset: route; }
.route-step { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 0 0 26px; }
.route-step:not(:last-child)::after { content: ''; position: absolute; top: 34px; bottom: 0; left: 17px; width: 1px; background: var(--line); }
.route-number { position: relative; z-index: 1; display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; background: var(--paper); color: var(--gold); font-family: var(--serif); font-size: 20px; }
.route-step h3 { margin: 2px 0 4px; font-size: 14px; }
.route-step p { margin: 0; color: var(--muted); font-size: 13px; }
.character-list { display: grid; gap: 10px; }
.character-card { padding: 18px 20px; border: 1px solid var(--line); background: var(--white); }
.character-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 23px; font-weight: 400; }
.character-card strong { display: block; color: var(--gold); font-size: 10px; font-weight: 600; }
.character-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.version-card { margin-bottom: 14px; padding: 22px; border: 1px solid var(--line); background: #f1ebdf; }
.version-card h3 { margin: 0 0 8px; font-size: 14px; }
.version-card p { margin: 0; color: var(--muted); font-size: 13px; }
.chapter-list { border-top: 1px solid var(--line); }
.chapter-item { border-bottom: 1px solid var(--line); }
.chapter-item summary { display: grid; grid-template-columns: 145px 1fr 20px; gap: 16px; padding: 20px 4px; align-items: center; cursor: pointer; list-style: none; }
.chapter-item summary::-webkit-details-marker { display: none; }
.chapter-item summary::after { content: '+'; color: var(--gold); font-size: 20px; }
.chapter-item[open] summary::after { content: '−'; }
.chapter-range { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.chapter-item summary strong { font-family: var(--serif); font-size: 23px; font-weight: 400; }
.chapter-item > p { margin: -5px 25px 22px 165px; color: var(--muted); font-size: 13px; }
.prompt-list { margin: 0; padding: 0; list-style: none; counter-reset: prompt; }
.prompt-list li { position: relative; margin: 12px 0; padding: 18px 20px 18px 55px; background: #eee6d7; counter-increment: prompt; }
.prompt-list li::before { content: counter(prompt, decimal-leading-zero); position: absolute; top: 18px; left: 18px; color: var(--gold); font-size: 10px; font-weight: 700; }
.book-sidebar { align-self: start; position: sticky; top: 105px; }
.sidebar-card { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); background: var(--white); }
.sidebar-card h3 { margin: 0 0 13px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.toc-link { display: block; padding: 7px 0; color: var(--muted); font-size: 12px; }
.toc-link:hover { color: var(--gold); }
.source-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.source-note a { color: var(--green); text-decoration: underline; }

.comments-section { padding: 60px 0; border-top: 1px solid var(--line); background: #eee7da; }
.comments-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; }
.comment-form textarea { width: 100%; min-height: 120px; padding: 13px; resize: vertical; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.comment-form .btn { margin-top: 10px; }
.login-prompt { padding: 25px; border: 1px dashed var(--line); background: rgba(255,255,255,.35); }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 10px; }
.comment-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--serif); }
.comment-author { font-size: 12px; font-weight: 700; }
.comment-date { color: var(--muted); font-size: 10px; }
.comment-content { margin: 10px 0 0 44px; white-space: pre-wrap; color: #40514a; font-size: 13px; }
.comment-delete { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 10px; cursor: pointer; }

.path-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.path-card { padding: 28px; border: 1px solid var(--line); background: var(--white); }
.path-card .book-title { margin-top: 10px; }
.path-card ol { padding-left: 20px; color: var(--muted); font-size: 13px; }
.path-card li { margin: 8px 0; padding-left: 5px; }

.reader-page { min-height: 100vh; background: #f8f4eb; }
.reader-page.dark-reader { background: #17251f; color: #d7ded9; }
.reader-toolbar { position: sticky; top: 76px; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(248,244,235,.96); backdrop-filter: blur(12px); }
.dark-reader .reader-toolbar { background: rgba(23,37,31,.97); }
.reader-toolbar-inner { display: flex; min-height: 62px; align-items: center; gap: 12px; }
.reader-title { min-width: 0; margin-right: auto; }
.reader-title strong { display: block; overflow: hidden; font-family: var(--serif); font-size: 20px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.reader-title span { display: block; color: var(--muted); font-size: 9px; }
.reader-select { max-width: 240px; padding: 7px 28px 7px 10px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 11px; }
.reader-control { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.reader-control.active { background: var(--green); color: #fff; }
.reader-progress { height: 2px; background: var(--gold); transition: width .1s; }
.reader-content { width: min(740px, calc(100% - 48px)); margin: 0 auto; padding: 65px 0 100px; }
.reader-chapter-kicker { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.reader-chapter-title { margin: 10px 0 40px; font-family: var(--serif); font-size: clamp(38px, 5vw, 55px); font-weight: 400; line-height: 1.05; }
.reader-text { font-family: Georgia, 'Noto Serif SC', serif; font-size: var(--reader-size, 19px); line-height: 1.95; }
.reader-text p { margin: 0 0 1.35em; white-space: pre-line; }
.reader-nav { display: flex; justify-content: space-between; gap: 15px; margin-top: 60px; padding-top: 25px; border-top: 1px solid var(--line); }
.reader-loading { padding: 100px 0; text-align: center; color: var(--muted); }

.info-page { padding: 65px 0 85px; }
.prose { max-width: 790px; }
.prose h2 { margin: 40px 0 12px; font-family: var(--serif); font-size: 34px; font-weight: 400; }
.prose h3 { margin: 28px 0 8px; font-size: 15px; }
.prose p, .prose li { color: #45554e; font-size: 14px; line-height: 1.8; }
.prose a { color: var(--green); text-decoration: underline; }
.prose .notice { padding: 20px 24px; border-left: 3px solid var(--gold); background: #eee5d4; }
.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; margin: 10px 0; padding-left: 28px; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; padding: 20px; place-items: center; background: rgba(10,28,23,.7); backdrop-filter: blur(5px); }
.modal { position: relative; width: min(430px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 35px; background: var(--paper); box-shadow: 0 30px 100px #0005; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; background: none; font-size: 24px; cursor: pointer; }
.modal h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 38px; font-weight: 400; }
.modal > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.form-field { margin: 14px 0; }
.form-field label { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 700; }
.form-field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.form-submit { width: 100%; margin-top: 8px; }
.form-switch { margin: 18px 0 0 !important; text-align: center; }
.form-switch button { padding: 0; border: 0; background: none; color: var(--green); font-weight: 700; text-decoration: underline; cursor: pointer; }
.form-error { display: none; margin: 10px 0; padding: 10px; background: #f4ded6; color: #8c352b; font-size: 11px; }
.form-error.visible { display: block; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 360px; padding: 13px 18px; background: var(--green); color: #fff; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); pointer-events: none; transition: .25s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.loading-screen { display: grid; min-height: 70vh; place-items: center; color: var(--muted); }
.spinner { display: inline-block; width: 24px; height: 24px; margin-right: 10px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; vertical-align: middle; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .brand-tag { display: none; }
  .main-nav { gap: 16px; }
  .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-inner { gap: 30px; }
  .book-content { gap: 35px; }
  .footer-grid { gap: 25px; }
}
@media (max-width: 800px) {
  .container, .narrow { width: min(100% - 32px, var(--max)); }
  .header-inner { min-height: 66px; gap: 12px; }
  .brand-name { font-size: 27px; }
  .main-nav { position: absolute; top: 66px; right: 0; left: 0; display: none; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .main-nav.open { display: flex; flex-direction: column; align-items: flex-start; }
  .mobile-menu { display: block; }
  .header-actions .btn { display: none; }
  .hero-inner { min-height: auto; grid-template-columns: 1fr; padding-block: 60px; }
  .hero-art { display: none; }
  .hero-copy { font-size: 15px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-inner { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-hero-grid { grid-template-columns: 180px 1fr; gap: 30px; }
  .book-content { grid-template-columns: 1fr; }
  .book-sidebar { display: none; }
  .comments-layout { grid-template-columns: 1fr; }
  .reader-toolbar { top: 66px; }
  .reader-select { max-width: 150px; }
  .path-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .display { font-size: 50px; }
  .hero-proof { gap: 14px; }
  .stat-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .book-title { font-size: 20px; }
  .book-description { display: none; }
  .section-head { align-items: start; flex-direction: column; }
  .category-grid { grid-template-columns: 1fr; }
  .library-tools { flex-direction: column; }
  .book-hero-grid { grid-template-columns: 1fr; }
  .book-detail-cover { width: 175px; }
  .book-detail-title { font-size: 44px; }
  .book-content { padding-block: 45px; }
  .chapter-item summary { grid-template-columns: 1fr 20px; gap: 5px; }
  .chapter-range { grid-column: 1/-1; }
  .chapter-item > p { margin-left: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 15px; }
  .footer-brand { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; }
  .reader-toolbar-inner { flex-wrap: wrap; gap: 5px; padding-block: 8px; }
  .reader-title { width: 100%; }
  .reader-select { max-width: 145px; }
  .reader-content { width: calc(100% - 34px); padding-top: 45px; }
  .reader-text { line-height: 1.85; }
  .modal { padding: 30px 24px; }
}
@media print {
  .site-header, .site-footer, .reader-toolbar, .reader-nav, .ad-slot, .book-actions, .book-sidebar { display: none !important; }
  body, .reader-page { background: #fff; color: #000; }
  .book-content { display: block; }
  .reader-content { width: 100%; }
}
