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

  /* The incoming snapshot dissolves over a fully opaque outgoing frame. */
  html:root:active-view-transition:not([hidden])::view-transition {
    pointer-events: none;
  }

  html:root:active-view-transition:not([hidden])::view-transition-group(root) {
    animation: none !important;
    transform: none !important;
  }

  html:root:active-view-transition:not([hidden])::view-transition-image-pair(root) {
    isolation: isolate;
  }

  html:root:active-view-transition:not([hidden])::view-transition-old(root) {
    animation: none !important;
    opacity: 1;
    mix-blend-mode: normal;
    transform: none !important;
  }

  html:root:active-view-transition:not([hidden])::view-transition-new(root) {
    animation: selah-page-arrival 245ms cubic-bezier(.21,.68,.36,1) both !important;
    mix-blend-mode: normal;
    transform: none !important;
  }

  /* An already cached standalone page can still load the previous stylesheet. */
  html:root[data-selah-site-route-fallback]::after {
    content: none;
    animation: none;
  }

  html[data-selah-site-route-fallback] :where(main, body[data-selah-map-chrome] > #map) {
    animation: selah-page-content-arrival 180ms cubic-bezier(.22,.61,.36,1) both;
  }

  @keyframes selah-page-arrival {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes selah-page-content-arrival {
    from { opacity: .88; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html:root:active-view-transition::view-transition-group(*),
  html:root:active-view-transition::view-transition-old(*),
  html:root:active-view-transition::view-transition-new(*) {
    animation: none !important;
  }
}
