/* Cross-document dissolve shared by all public pages and the app root.
   Keep the outgoing snapshot opaque behind the incoming page, so the canvas
   cannot flash through between two partially transparent page snapshots.
   Do not animate body: direct loads and unsupported browsers stay visible. */
@keyframes ms-page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  ::view-transition-old(root) {
    animation: none;
    opacity: 1;
    mix-blend-mode: normal;
    z-index: 0;
  }
  ::view-transition-new(root) {
    animation: ms-page-in 360ms cubic-bezier(0.4, 0, 0.2, 1) both;
    mix-blend-mode: normal;
    z-index: 1;
  }
  ::view-transition-group(root) {
    animation-duration: 360ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-group(root) { animation: none; }
}
