/* Faithful reader composition; shared shell and task surfaces live in archive.css. */
html, body { overflow-x: clip; }
.living-reader:has(.book-arrival) .site-header { background: #183534; color: #f0eee2; }
.living-reader:has(.book-arrival) .header-inner { border-color: #536c65; }
.living-reader:has(.book-arrival) .site-header .user-greeting { color: #c7cebd; }
.living-reader:has(.book-arrival) .site-header :focus-visible, .book-front :focus-visible { outline-color: #f0eee2; }
.book-front { position: relative; isolation: isolate; padding: 60px 0 76px; color: #f0eee2; }
.book-front::before { content: ''; position: absolute; z-index: -1; inset: 0 calc((100vw - 100%)/-2); background: #183534; }
.book-front h1 { font: 400 clamp(64px,7.4vw,106px)/1.05 var(--font-serif); letter-spacing: -.055em; margin: 36px 0; overflow-wrap: anywhere; color: inherit; }
.book-front h1 span, .book-front h1 em { display: block; font-weight: 400; }
.book-eyebrow { font: 11px/1.5 var(--font-sans); text-transform: uppercase; letter-spacing: .16em; color: var(--text-muted); margin: 0; }
.book-front .book-eyebrow, .book-publication { color: #c7cebd; }
.book-premise, .book-subtitle { max-width: 34ch; font: 400 19px/1.7 var(--font-serif); color: #e4e6d9; margin: 0 0 35px; }
.book-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.book-read-action { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; background: #efecdc; color: #183534 !important; padding: 13px 23px; text-decoration: none; font: 13px/1.6 var(--font-sans); }
.book-follow { min-height: 44px; background: transparent; color: #e4e6d9; text-decoration: underline; text-underline-offset: 5px; border: 0; padding: 12px 0; cursor: pointer; font: 13px/1.6 var(--font-sans); }
.book-publication { font-size: 12px; margin: 26px 0 0; }
.book-front { display: grid; gap: 28px; align-items: end; }
.book-cover { margin: 0; }
.book-cover img { width: 100%; height: auto; display: block; }
.book-complete { max-width: 650px; margin: 8px auto 0; font: 13px/1.6 var(--font-sans); }
.book-complete a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 16px; }
.opening-preview { max-width: 650px; margin: 72px auto 0; padding-bottom: 42px; }
.opening-words { font: 20px/1.9 var(--font-serif); margin-top: 27px; }
.opening-words p { margin: 0; }
.opening-words p::first-letter { float: left; font: 64px/.9 var(--font-serif); padding: 9px 10px 0 0; }
.opening-preview > a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 22px; font-size: 13px; }
.book-contents { border-top: 1px solid var(--border-delicate); padding: 22px 0; max-width: 650px; margin: auto; font-size: 13px; }
.book-contents > summary { cursor: pointer; min-height: 44px; }
.book-contents .chapter-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: none; border: 0; border-bottom: 1px solid var(--border-delicate); border-radius: 0; padding: 18px 0; }
.living-reader .reading-room-wrapper { padding: 0 0 20px; }
.living-reader .reading-room-measure { max-width: 650px; width: 100%; padding: 0; margin-left: auto; margin-right: auto; }
.living-reader .reading-orientation { display: flex; justify-content: space-between; align-items: center; max-width: 720px; min-height: 44px; margin: 40px auto 0; gap: 20px; font: 12px/1.6 var(--font-sans); border: 0; padding: 0; }
.reading-orientation a { min-height: 44px; display: inline-flex; align-items: center; }
.chapter-heading { text-align: center; margin: 65px auto 0; padding: 0; }
.chapter-heading h1 span { display: block; }
.chapter-heading h1 { font: 450 clamp(37px,4.2vw,53px)/1.1 var(--font-serif); letter-spacing: -.04em; max-width: none; margin: 24px auto 44px; overflow-wrap: anywhere; }
.living-reader .story-prose { font: 400 19px/1.95 var(--font-serif); color: var(--text-primary); overflow-wrap: anywhere; letter-spacing: normal; }
.living-reader #prose-content { max-width: 57ch; margin: auto; scroll-margin-top: 2rem; }
.living-reader .story-prose p { margin: 0 0 1.4em; }
.living-reader .opening-words { font: 20px/1.9 var(--font-serif); }
.living-reader .opening-words p { margin: 0; }
.reading-passage { position: relative; scroll-margin-top: 2rem; }
.reading-passage:first-of-type > p:first-child::first-letter { float: left; font-size: 70px; line-height: .9; padding: 10px 10px 0 0; }
.reading-note { font: 14px/1.7 var(--font-sans); position: relative; margin: 0; }
.reading-note > summary { position: absolute; left: calc(100% + 34px); top: -80px; width: 150px; border-left: 1px solid var(--border-delicate); list-style: none; padding: 12px 0 12px 15px; cursor: pointer; min-height: 44px; }
.reading-note > summary::-webkit-details-marker { display: none; }
.reading-note > summary small { font: 11.67px/1.7 var(--font-sans); }
.reading-note > summary .note-title { display: block; font: italic 15px/1.55 var(--font-serif); margin-top: 6px; }
.reading-note > summary .note-action { display: block; text-decoration: underline; text-underline-offset: 4px; margin-top: 8px; font: 11px/1.7 var(--font-sans); }
.reading-note .note-content { border-top: 1px solid var(--border-delicate); border-bottom: 1px solid var(--border-delicate); padding: 28px 0; margin: 24px 0 32px; }
.note-content h2 { font: 450 24px/1.3 var(--font-serif); margin: 0 0 22px; }
.note-content .note-commentary { font: italic 18px/1.7 var(--font-serif); }
.note-content button, .note-content a { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 0; margin-right: 20px; color: var(--text-primary); background: none; border: 0; text-decoration: underline; cursor: pointer; font: 12px/1.6 var(--font-sans); }
.additional-note > summary { position: static; cursor: pointer; min-height: 44px; font: italic 18px/1.6 var(--font-serif); padding: 12px 0; }
.living-reader .scene-divider { text-align: center; padding: 42px 0; margin: 0; font-size: 21px; color: var(--text-muted); }
.living-reader .post-chapter-card { background: none; border: 0; border-top: 1px solid var(--border-delicate); border-radius: 0; padding: 30px 0 0; margin-top: 20px; }
.chapter-notebook { padding: 0 0 26px; border-bottom: 1px solid var(--border-delicate); margin: 0 0 26px; }
.chapter-notebook > summary { cursor: pointer; min-height: 44px; font: italic 20px/1.6 var(--font-serif); }
.chapter-notebook .behind-chapter-shelf { margin-top: 26px; }
.reading-finish { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.living-reader .completion-title { font: 13px/1.6 var(--font-sans); margin: 0; }
.chapter-discussion { padding: 22px 0; border-top: 1px solid var(--border-delicate); margin-top: 26px; }
.chapter-discussion > summary { min-height: 44px; font: 20px/1.6 var(--font-serif); cursor: pointer; }
.living-reader [data-edition-notice] { font: 13px/1.7 var(--font-sans); padding: 16px 0; border-bottom: 1px solid var(--border-delicate); }
.living-reader #post-chapter { scroll-margin-top: 2rem; }
@media (max-width: 1100px) {
  .reading-note { margin: 30px 0; }
  .reading-note > summary { position: static; width: auto; max-width: 330px; padding: 12px 18px; }
  .reading-note > summary .note-title { margin-top: 4px; }
  .reading-note .note-content { margin-top: 18px; }
}
@media (min-width: 820px) {
  .book-front:has(.book-cover) { grid-template-columns: minmax(0, 1fr) minmax(140px, 220px); }
}
@media (min-width: 601px) and (max-width: 950px) {
  .book-front h1 { font-size: 67px; }
  .book-premise { font-size: 18px; }
}
@media (max-width: 600px) {
  .book-front { padding: 36px 0 42px; }
  .book-front h1 { margin: 30px 0 25px; font-size: clamp(50px,14vw,67px); }
  .book-premise { font-size: 18px; max-width: 31ch; line-height: 1.65; margin-bottom: 25px; }
  .book-actions { gap: 8px 23px; }
  .opening-preview { margin-top: 43px; padding-bottom: 15px; }
  .living-reader .opening-words { font-size: 18px; line-height: 1.9; }
  .living-reader .story-prose { font-size: 18px; line-height: 1.85; }
  .living-reader .reading-orientation { flex-wrap: nowrap; margin-top: 23px; gap: 16px; font-size: 11px; }
  .reading-orientation a { max-width: 165px; }
  .chapter-heading { margin-top: 38px; }
  .chapter-heading h1 { font-size: 36px; line-height: 1.15; margin: 20px auto 32px; }
  .reading-passage:first-of-type > p:first-child::first-letter { font-size: 63px; }
  .reading-finish { align-items: start; flex-direction: column; gap: 10px; }
}

.living-reader .artifact-prose { font: italic 22px/1.7 var(--font-serif); letter-spacing: normal; }

@media (prefers-color-scheme: dark) {
  .living-reader .story-prose {
    color: var(--text-primary);
  }
  .living-reader:has(.book-arrival) .site-header {
    background: #112221;
    color: #f4f4f5;
  }
  .living-reader:has(.book-arrival) .header-inner {
    border-color: #2e4636;
  }
  .book-front::before {
    background: #112221;
  }
  .book-front {
    color: #f4f4f5;
  }
  .book-contents {
    border-top-color: var(--border-delicate);
  }
  .book-contents .chapter-row {
    border-bottom-color: var(--border-delicate);
  }
  .note-content button, .note-content a {
    color: var(--accent-oxblood);
  }
}

.chapter-earned-media { display: grid; gap: 1rem; margin-block: 1rem; }
.chapter-earned-piece { padding: 1rem; border: 1px solid var(--border-delicate); border-radius: .5rem; }
.chapter-earned-piece h3 { margin-block: 0 .5rem; font-size: 1.1rem; }
.chapter-earned-piece img, .chapter-earned-piece video { display: block; max-width: 100%; max-height: 18rem; object-fit: contain; }
