/* A photographed empty spread with precise, localizable type laid over the paper. */
.art-window { transition: filter 1.65s ease, transform 1.65s ease; }
body[data-view="book"] .art-window { filter: blur(6px) brightness(.46) saturate(.72); transform: scale(1.035); }
body[data-view="book"] .shade { background: radial-gradient(ellipse at 50% 42%, #0b15194d, #0b1519d1); }
.book-view {
  --book-width: min(930px, 92vw, calc((100svh - 240px) * 1.5));
  --page-ink: #3d352b;
  position: absolute;
  z-index: 12;
  inset: 88px 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--paper);
}
.book-spread-window { position: relative; flex: 0 0 auto; width: var(--book-width); aspect-ratio: 3 / 2; margin-top: -10px; perspective: 1800px; }
.open-volume { position: relative; display: flex; width: var(--book-width); aspect-ratio: 3 / 2; margin: 0; container-type: inline-size; filter: drop-shadow(0 20px 24px #0008); animation: book-arrives 1.3s .4s both; }
.volume-half { position: relative; width: 50%; height: 100%; overflow: hidden; }
.volume-left { transform-origin: right center; animation: leaf-opens-left 1.5s .4s both; }
.volume-right { transform-origin: left center; animation: leaf-opens-right 1.5s .4s both; }
.sheet-photo { position: absolute; top: 0; left: 0; display: block; width: 200%; max-width: none; height: 100%; pointer-events: none; }
.volume-right .sheet-photo { left: -100%; }
.leaf-print { position: absolute; inset: 12% 9% 13% 23%; display: flex; flex-direction: column; color: var(--page-ink); }
.chapter-print { inset-inline: 11% 23%; inset-block-end: 11%; }
.running-title { margin: 0; text-align: center; font-size: clamp(8px, 1.05cqw, 10px); line-height: 1.5; letter-spacing: .16em; color: #7b7161; }
.engraving-plate { display: flex; flex: 1; min-height: 0; flex-direction: column; justify-content: center; margin: 22px 0 0; }
.engraving-plate img { display: block; width: 100%; height: auto; max-height: 76%; object-fit: contain; filter: grayscale(1) contrast(.94); mix-blend-mode: multiply; clip-path: inset(0 0 3%); }
.engraving-plate figcaption { margin-top: 20px; font-size: clamp(9px, 1.2cqw, 11px); text-align: center; letter-spacing: .12em; color: #6b5e4d; line-height: 1.7; }
.plate-ornament { color: #9b8a6b; text-align: center; font-family: Georgia, serif; font-size: 25px; line-height: 1; }
.chapter-number { margin: 22px 0 12px; text-align: center; font-size: clamp(10px, 1.3cqw, 12px); letter-spacing: .2em; line-height: 1.5; color: #74634b; }
.chapter-print h2 { margin: 0; text-align: center; font-size: clamp(19px, 2.7cqw, 27px); font-weight: 400; letter-spacing: .12em; line-height: 1.5; }
.chapter-print h2:focus { outline: none; }
.page-rule { display: block; flex: 0 0 auto; width: 34px; height: 1px; margin: 18px auto 24px; background: #89765766; }
.page-excerpt { font-size: clamp(12px, 1.85cqw, 16px); line-height: 1.95; text-align: justify; letter-spacing: .015em; }
.page-excerpt p { text-indent: 2em; margin: 0 0 .8em; }
.page-source { margin: auto 0 0; padding-top: 7px; font-size: clamp(7px, .94cqw, 8.5px); line-height: 1.6; color: #8a7b65; text-align: center; letter-spacing: .06em; }
.book-questions { width: min(840px, 94%); display: grid; grid-template-columns: 1fr 1.5fr; align-items: center; gap: 22px; margin: 0; animation: questions-arrive .85s 2.05s both; }
.book-questions p { margin: 0; text-align: center; font-family: var(--hand); font-size: clamp(17px, 1.55vw, 21px); color: #f1e6d1; letter-spacing: .015em; line-height: 1.7; }
.book-questions p:first-child { border-right: 1px solid #d2b17a45; padding-right: 22px; }
.book-return { width: min(840px, 100%); animation: questions-arrive .8s 2.45s both; }
.reading-locations { display: flex; justify-content: center; flex-wrap: wrap; column-gap: 28px; row-gap: 3px; margin: 13px 0 0; font-size: 10px; color: #c1b7a5b3; line-height: 1.7; letter-spacing: .04em; text-align: center; }
.book-actions { display: flex; justify-content: center; gap: 38px; margin-top: 7px; }
.text-button { display: inline-flex; align-items: center; gap: 16px; min-width: 88px; min-height: 44px; padding: 8px 0; background: transparent; border: 0; font-size: 12px; color: #d2b17a; letter-spacing: .08em; }
.text-button + .text-button { color: #d8d0bf; }
.return-arrow { font-family: Georgia, serif; font-size: 16px; }
.text-button:hover { color: #fff4d9; }
.book-view[lang="en"] .running-title { letter-spacing: .08em; }
.book-view[lang="en"] .chapter-number { letter-spacing: .17em; margin-top: 18px; margin-bottom: 10px; }
.book-view[lang="en"] .chapter-print h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: .015em; }
.book-view[lang="en"] .page-excerpt { font-family: Georgia, "Times New Roman", serif; font-size: clamp(11px, 1.65cqw, 15px); line-height: 1.5; letter-spacing: 0; text-align: left; }
.book-view[lang="en"] .page-rule { margin-block: 14px 18px; }
.book-view[lang="en"] .page-excerpt p { text-indent: 1.25em; }
.book-view[lang="en"] .page-excerpt p:first-child { text-indent: 0; }
.book-view[lang="en"] .book-questions p { font-family: Georgia, serif; font-style: italic; font-size: clamp(15px, 1.35vw, 19px); }
.book-view[lang="en"] .engraving-plate figcaption { font-family: Georgia, serif; letter-spacing: .01em; }
@keyframes book-arrives {
  from { opacity: 0; transform: translateY(24px) scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes leaf-opens-left {
  from { transform: rotateY(24deg); }
  to { transform: none; }
}
@keyframes leaf-opens-right {
  from { transform: rotateY(-24deg); }
  to { transform: none; }
}
@keyframes questions-arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (max-height: 760px) and (min-width: 761px), (min-width: 761px) and (max-width: 1000px) {
  .book-view { inset-block: 82px 12px; }
  .chapter-number { margin-top: 16px; margin-bottom: 9px; }
  .page-rule { margin-block: 12px 18px; }
  .book-questions { margin-top: -5px; }
}
@media (max-width: 760px) {
  body[data-view="book"] .art-window { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  body[data-view="book"] .shade { background: radial-gradient(ellipse at 50% 35%, #0b151933, #0b1519e3); }
  .book-view { --book-width: min(700px, calc((100svh - 240px) * 1.5)); inset: 80px 12px 14px; justify-content: center; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d2b17a55 transparent; }
  /* On a narrow screen, bring the chapter page close enough to read instead of shrinking both leaves. */
  .book-spread-window { width: 100%; max-width: 520px; height: calc(var(--book-width) / 1.5); aspect-ratio: auto; overflow: hidden; margin-top: -8px; }
  .open-volume { position: absolute; top: 0; right: -8px; }
  .page-continuation { display: none; }
  .book-questions { width: 100%; display: flex; flex-direction: column; gap: 2px; margin-top: -4px; }
  .book-questions p { font-size: 18px; line-height: 1.7; }
  .book-questions p:first-child { border: 0; padding: 0; }
  .reading-locations { column-gap: 12px; margin-top: 10px; font-size: 9px; }
  .book-actions { gap: 36px; margin-top: 5px; }
  .text-button { font-size: 12px; }
  .book-view[lang="en"] .book-questions p { font-size: 15px; line-height: 1.7; }
}
@media (max-width: 760px) and (max-height: 730px) {
  .book-view { inset-block: 76px 8px; justify-content: flex-start; }
  .chapter-number { margin-top: 12px; margin-bottom: 8px; }
  .chapter-print h2 { font-size: 18px; }
  .page-rule { margin-block: 10px 15px; }
  .page-excerpt { line-height: 1.8; }
  .book-questions p { font-size: 16px; line-height: 1.6; }
  .reading-locations { margin-top: 7px; font-size: 8px; }
  .book-actions { margin-top: 2px; }
  .book-view[lang="en"] .book-questions p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .open-volume, .volume-half, .book-questions, .book-return { animation-delay: 0s !important; }
  body[data-view="book"] .art-window { transition: none; }
}
