/* Both documents share one paper surface and the same CSS motion. */
html:has(.guest-page.is-invitation),
html:has(.reading-room),
.guest-page.is-invitation {
  background: #fbf6ec url('/assets/paper.svg');
}

@view-transition { navigation: none; }

.cover-departing .card-sound,
.cover-departing .hedgehog-journey,
.cover-departing .card-status {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.cover-arriving::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: #fbf6ec url('/assets/paper.svg');
}
.cover-arriving .reading-room { opacity: 0; pointer-events: none; }
.cover-arrival-ready .reading-room {
  animation: cover-unfold 1.1s cubic-bezier(.22,.7,.2,1) both;
}
.cover-arrival-ready::before {
  animation: cover-paper-lift 800ms ease both;
}
@keyframes cover-unfold {
  from { opacity: 0; transform: perspective(1600px) translateY(22px) rotateY(5deg) scale(.975); }
  to { opacity: 1; transform: perspective(1600px) translateY(0) rotateY(0deg) scale(1); }
}
@keyframes cover-paper-lift {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-arriving .reading-room { opacity: 1; animation: none; }
  .cover-arriving::before { display: none; }
  .cover-departing .card-sound,
  .cover-departing .hedgehog-journey,
  .cover-departing .card-status { transition: none; }
}
