/* Reading books (no coloring): the look of book.html, which is both the printed PDF and the text the
   reader shows one chapter at a time. Same paper, ink and accent as app.css. */
.text-book, .reading {
  --paper: #fbf5e9; --card: #fffdf8; --ink: #2b2118; --muted: #6e5f50; --accent: #b3471d; --line: #e6dac4;
}
.text-book { background: var(--paper); color: var(--ink); margin: 0; font-family: "Literata", Georgia, serif; }
.text-book #book, .reading #chapter { font-size: 1.12rem; line-height: 1.7; }
.text-book #book { max-width: 44rem; margin: 0 auto; padding: 24px 20px; }
.chapter h1, .chapter h2, .chapter h3, .chapter h4 { font-family: "Jost", "Fredoka", system-ui, sans-serif; line-height: 1.2; }
.chapter h2 { font-size: 1.9rem; margin: .2em 0 .7em; }
.chapter h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.chapter h4 { font-size: 1.05rem; margin: 1.4em 0 .3em; color: var(--muted); }
.chapter p { margin: 0 0 .95em; }
.chapter p.byline { margin: -.4em 0 1.4em; color: var(--muted); font-style: italic; }
.chapter p.source { margin-top: 2em; font-size: .85em; color: var(--muted); }
.chapter a { color: var(--accent); }
.chapter img { max-width: 100%; height: auto; display: block; margin: 1em auto; }
.chapter blockquote { margin: 1em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--accent); }
.kicker, .jl { font-family: "Jost", system-ui, sans-serif; text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; color: var(--accent); font-weight: 600; }
.q-inline { font-style: italic; color: var(--muted); }
.q-inline span { color: var(--accent); font-style: normal; margin-right: .2em; }
.journal, .step, .action, .day { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 1.2em 0; }
.jq { border-bottom: 1px solid var(--line); padding-bottom: 1.6em; }
.fnote { font-size: .92rem; }
.front { text-align: center; }
.title-page h1, .front h1 { font-family: "Jost", system-ui, sans-serif; font-size: 2.6rem; margin: 1em 0 .2em; }
.copyright { font-size: .88rem; color: var(--muted); margin-top: 2em; }
.epigraph { font-style: italic; margin: 2em auto; max-width: 32rem; }
.gutenberg center, .gutenberg .center { text-align: center; }
.gutenberg pre { white-space: pre-wrap; font-size: .9rem; }
.scan-page { margin: 0; text-align: center; }
.scan-page img { width: 100%; max-width: 60rem; border-radius: 6px; box-shadow: 0 6px 20px rgba(70,45,20,.15); }
.scan-page figcaption { font-family: "Jost", system-ui, sans-serif; color: var(--muted); margin-top: .6em; }
.scan-page .names { display: block; font-size: .9rem; }

@media screen and (prefers-color-scheme: dark) {
  .text-book, .reading { --paper: #1d1916; --card: #27221d; --ink: #f3eadc; --muted: #b8a993; --accent: #e9814f; --line: #3b332b; }
}
@media print {
  @page { size: letter; margin: .8in .85in; }
  .text-book { background: #fff; --paper: #fff; --ink: #1a1410; }
  .text-book #book { max-width: none; padding: 0; font-size: 11.5pt; line-height: 1.55; }
  .text-book section.chapter { break-before: page; }
  .text-book section.chapter:first-child { break-before: auto; }
  .chapter h2, .chapter h3, .chapter h4 { break-after: avoid; }
  .journal, .step, .action, .day, figure, img { break-inside: avoid; }
  .chapter a { color: inherit; }
  .scan-book .scan-page img { max-height: 9in; width: auto; max-width: 100%; box-shadow: none; }
}

/* The reading reader (engine/reader.js): one chapter at a time, full width, no coloring pane. */
.reading .read-wrap { max-width: 46rem; margin: 0 auto; padding: 20px 20px 48px; }
.reading #chapter { min-height: 50vh; }
.reading .pager { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 10px 0; margin-top: 24px; }
.reading .pager #where { color: var(--muted); font-family: "Jost", system-ui, sans-serif; font-size: .9rem; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading .toc-item.here { border-left-color: var(--accent); }
.reading .topbar button.home { background: none; border: 0; font: inherit; padding: 0; color: var(--accent); }
.reading .local-note { max-width: 46rem; margin: 12px auto 0; padding: 0 20px; color: var(--muted); font-size: .9rem; font-family: "Jost", system-ui, sans-serif; }

/* Gutenberg page numbers ([pg xiv]): kept as link targets, never shown. */
.text-book .pagenum, .reading .pagenum { display: none; }
