@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;
  }
}

/* SelahMC shared navigation geometry v2.5: one viewport width on every site page. */
html:has(.selah-masthead):not([data-selah-map-embedded]):not(:has([data-selah-ui="play-v2"])) {
  scrollbar-gutter: stable;
}

/* The map is a separate document without the website's global border-box reset. */
html .selah-masthead,
html .selah-masthead :where(*),
html .selah-masthead-server,
html .selah-masthead-server :where(*) {
  box-sizing: border-box;
}

/* Keep the map/Workshop divider inside the shared 66px row (64px on mobile). */
html .selah-masthead[data-selah-static-nav],
html .selah-masthead[data-workshop-nav] {
  border-bottom-width: 0;
  box-shadow: inset 0 -1px 0 #aab5a018;
}

@supports not (scrollbar-gutter: stable) {
  html:has(.selah-masthead):not([data-selah-map-embedded]):not(:has([data-selah-ui="play-v2"])) {
    overflow-y: scroll;
  }
}
/* Shared Companion-inspired chrome. Geometry remains the homepage's geometry. */
html .selah-masthead {
  background: #101a16;
  background: linear-gradient(180deg, #17251df5, #101a16f5);
  box-shadow: inset 0 -1px 0 #d8e7c91a;
}
html .selah-masthead-nav a,
html .selah-masthead .selah-mobile-nav nav a {
  border-radius: 999px;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
html .selah-masthead-nav a[aria-current="page"],
html .selah-masthead .selah-mobile-nav nav a[aria-current="page"] {
  color: #eff4e4;
  background: #304336;
  box-shadow: inset 0 0 0 1px #bdd9a82b, inset 0 1px 0 #f4f6df0a;
}
html .selah-masthead-nav a:hover,
html .selah-masthead .selah-mobile-nav nav a:hover {
  color: #fff4df;
  background: #293b2e;
}
html .selah-masthead-login {
  border-radius: 10px;
  border-color: #c9d7b837;
  background: #c9d7b80b;
  box-shadow: inset 0 1px 0 #f4f6df08;
}
html .selah-masthead :is(a,summary):focus-visible {
  outline: 2px solid #e7cf9f;
  outline-offset: 3px;
}
@supports (backdrop-filter: blur(1px)) {
  @media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
    html .selah-masthead { backdrop-filter: blur(12px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html .selah-masthead :is(a,summary) { transition: none; }
}
/* End SelahMC shared navigation geometry v2.5. */
