/* Local book and author presentation; the opening composition is unchanged. */
.book-introduction { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); margin-bottom: 4rem; }
.book-introduction > *, .author-section > * { min-width: 0; }
.book-summary h2 { margin-bottom: 1.5rem; }
.book-summary h2, .book-summary p, .author-copy h2, .author-copy p, .author-portrait figcaption { overflow-wrap: anywhere; }
.book-summary > p { font-size: 1rem; line-height: 1.9; color: var(--muted); max-width: 34rem; }
.book-viewer { min-width: 0; margin: 0; text-align: center; }
.book-stage {
  --book-width: min(330px, 62vw);
  --book-height: calc(var(--book-width) * 1035 / 698);
  --book-depth: calc(var(--book-width) * 123 / 698);
  position: relative; display: none; align-items: center; justify-content: center;
  min-height: calc(var(--book-height) + 6rem); padding: 3rem 1rem;
  perspective: 1400px; touch-action: pan-y; cursor: grab; user-select: none;
  background: radial-gradient(ellipse at 35% 50%, #0d2a3899, transparent 70%), radial-gradient(ellipse at 80% 65%, #50171344, transparent 65%);
}
.book-viewer.is-3d .book-stage { display: flex; }
.book-viewer.is-3d .book-flat { display: none; }
.book-stage:active { cursor: grabbing; }
.book-stage:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.book-stage::after { content: ''; position: absolute; bottom: 1.1rem; width: var(--book-width); height: 1.8rem; background: radial-gradient(ellipse, #0009, transparent 70%); pointer-events: none; }
.book-object { position: relative; width: var(--book-width); height: var(--book-height); transform-style: preserve-3d; transform: rotateX(-6deg) rotateY(24deg); }
.book-face { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #222c2f; pointer-events: none; }
.book-face img { display: block; width: 100%; height: 100%; object-fit: fill; }
.book-front, .book-back { inset: 0; box-shadow: 0 0 0 1px #111c22, 0 5px 16px #0003; }
.book-front { transform: translateZ(calc(var(--book-depth) / 2)); }
.book-back { transform: rotateY(180deg) translateZ(calc(var(--book-depth) / 2)); }
.book-spine, .book-pages { top: 0; left: calc((var(--book-width) - var(--book-depth)) / 2); width: var(--book-depth); height: 100%; }
.book-spine { transform: rotateY(-90deg) translateZ(calc(var(--book-width) / 2)); }
.book-pages { transform: rotateY(90deg) translateZ(calc(var(--book-width) / 2)); background: repeating-linear-gradient(to right, #e6dfcf 0 1px, #b9b09e 1px 2px, #e0d7c5 2px 4px); border: 3px solid #343536; }
.book-top, .book-bottom { width: 100%; height: var(--book-depth); top: calc((var(--book-height) - var(--book-depth)) / 2); left: 0; background: repeating-linear-gradient(to bottom, #e6dfcf 0 1px, #b9b09e 1px 2px, #e0d7c5 2px 4px); border: 3px solid #343536; }
.book-top { transform: rotateX(90deg) translateZ(calc(var(--book-height) / 2)); }
.book-bottom { transform: rotateX(-90deg) translateZ(calc(var(--book-height) / 2)); }
.book-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .5rem; }
.book-controls button { min-height: 44px; padding: .65rem .85rem; font-size: .875rem; line-height: 1.4; color: var(--ink); border: 1px solid #e9b36555; background: #0d2a3870; border-radius: 2px; }
.book-controls button:hover { border-color: var(--gold); background: #e9b36512; }
.book-controls button[aria-pressed='true'] { border-color: var(--gold); }
.book-hint { margin: .75rem 0 0; font-size: .875rem; line-height: 1.6; color: var(--muted); }
.book-flat img, .book-back-details img { display: block; width: min(100%, 330px); height: auto; margin: 0 auto; box-shadow: 0 15px 30px #0004; }
.book-back-details { margin: 1rem auto 0; max-width: 30rem; text-align: center; }
.book-back-details summary { cursor: pointer; min-height: 44px; padding: .75rem; font-size: .875rem; color: var(--gold); }
.book-back-details img { width: 100%; margin-top: 1rem; }
.author-section { gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.author-portrait { margin: 0; max-width: 560px; }
.author-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 3px; box-shadow: 0 18px 50px #0004; border: 1px solid #e9b36533; }
.author-portrait figcaption { margin-top: 1rem; padding-left: .8rem; border-left: 2px solid #e9b365; font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.author-copy h2 { margin-bottom: 1.75rem; }
.author-copy > p { font-size: 1rem; }
.author-copy .large-copy { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.author-copy .text-link { font-size: .875rem; flex-wrap: wrap; }
@media (max-width: 700px) {
  .book-introduction { grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-bottom: 3rem; }
  .book-summary h2 { font-size: clamp(1.75rem, 7vw, 2.25rem); letter-spacing: -.04em; }
  .book-stage { padding: 2.5rem .5rem; min-height: calc(var(--book-height) + 5rem); }
  .book-controls button { padding: .6rem .7rem; }
  .author-section { grid-template-columns: minmax(0, 1fr); }
  .author-copy h2 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
}
@media (forced-colors: active) {
  .book-stage { background: none; }
  .book-controls button { border: 1px solid ButtonText; }
  .book-stage::after { display: none; }
}
