.story-dialog:not(.interactive-book-story) .book-stage { display: contents; }
.interactive-book-story { padding-top: 64px; }
.interactive-book-story h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 24px; }
.interactive-book-story .book-stage {
  position: relative;
  perspective: 1200px;
  margin: 20px 0 28px;
  background: #faf6eb;
  border-radius: 4px 14px 14px 4px;
  border: 1px solid #10203922;
  box-shadow: 5px 5px 0 #ddd5c5, 10px 10px 0 #e8dfcf;
  overflow: hidden;
}
.interactive-book-story .story-body {
  padding: 24px 28px 56px;
  min-height: 320px;
  margin: 0;
  opacity: 0;
  transition: opacity 280ms ease;
}
.interactive-book-story .story-body p { font-size: 18px; line-height: 1.6; }
.interactive-book-story .book-open .story-body { opacity: 1; }
.book-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: #102039;
  color: #faf6eb;
  transform-origin: left center;
  transition: transform 650ms cubic-bezier(.22,1,.36,1), opacity 450ms ease;
  backface-visibility: hidden;
}
.book-cover img { width: 100%; height: 0; flex: 1; min-height: 0; object-fit: contain; background: #f4f4f2; }
.book-cover span { padding: 16px; font-size: 15px; }
.book-open .book-cover { transform: rotateY(-105deg); opacity: 0; pointer-events: none; }
.book-reset { position: absolute; bottom: 16px; left: 28px; background: transparent; border: 0; color: #102039; text-decoration: underline; padding: 8px 0; font-size: 15px; }
.book-cover:focus-visible { outline: 3px solid #d9b56e; outline-offset: -5px; }
.book-reset:focus-visible { outline: 3px solid #102039; outline-offset: 2px; }
.book-cover[hidden], .book-reset[hidden] { display: none; }
@media(max-width:540px) {
  .interactive-book-story .story-body { padding: 18px 18px 60px; }
  .interactive-book-story .story-body p { font-size: 16px; line-height: 1.55; }
  .book-reset { left: 18px; }
}
@media(prefers-reduced-motion:reduce) {
  .book-cover, .interactive-book-story .story-body { transition: none; }
  .book-open .book-cover { transform: none; visibility: hidden; }
}
