.book-preview { margin: 0; min-width: 0; text-align: center; }
.book-hero .book-preview { width: 100%; max-width: 230px; margin-inline: auto; }
.book-turn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.book-preview .book-turn img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45));
}
.book-turn model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.book-turn:focus-visible, .book-enlarge:focus-visible, .book-dialog a:focus-visible, .book-dialog button:focus-visible { outline: 2px solid #4fc8ff; outline-offset: 6px; }
.book-turn[aria-busy="true"] { cursor: progress; }
.book-preview [hidden] { display: none !important; }
.book-preview figcaption { margin-top: 16px; font: 12px/1.5 system-ui, sans-serif; color: var(--muted, #9ab6cf); }
.book-preview [data-book-hint] { display: block; }
.book-enlarge { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 2px; color: var(--accent, #4fc8ff); text-decoration: underline; text-underline-offset: 4px; }
.book-enlarge:hover { color: #b5e8fa; }
.book-dialog { width: min(780px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #1e3a54; border-radius: 8px; color: #dceaf5; background: #0a1520; overscroll-behavior: contain; }
.book-dialog::backdrop { background: rgba(0, 5, 12, .88); }
.book-dialog-inner { padding: 20px; }
.book-dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 10px; background: #0a1520; }
.book-dialog h2 { margin: 0; color: #dceaf5; font: 600 18px/1.3 system-ui, sans-serif; letter-spacing: normal; }
.book-dialog button { min-height: 44px; padding: 8px 14px; border: 1px solid #1e3a54; border-radius: 4px; color: #dceaf5; background: #102130; font: 14px system-ui, sans-serif; cursor: pointer; }
.book-dialog img { display: block; width: 100%; height: auto; }
.book-dialog .book-full-size { display: inline-block; margin-top: 18px; color: #4fc8ff; font: 14px/1.5 system-ui, sans-serif; text-decoration: underline; }
html.book-dialog-open { overflow: hidden; }
@media (max-width: 680px) {
  .book-hero .book-preview { max-width: 240px; }
  .book-dialog-inner { padding: 12px; }
  .book-dialog h2 { font-size: 16px; }
}
