@view-transition {
  navigation: auto;
}

.grid-route-handoff-shell {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: hidden;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  color: #eaf6f3;
  background:
    radial-gradient(circle at 50% 50%, rgba(111, 243, 255, .17), transparent 28%),
    #05161c;
  isolation: isolate;
}

.grid-route-handoff-shell::before {
  position: absolute;
  content: "";
  inset: -12%;
  opacity: .62;
  background-image:
    linear-gradient(rgba(85, 230, 242, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 230, 242, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(720px) rotateX(56deg) scale(1.3);
  transform-origin: 50% 58%;
}

.grid-route-handoff-shell__core {
  width: clamp(180px, 24vw, 390px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(111, 243, 255, .4);
  border-radius: 50%;
  box-shadow: inset 0 0 80px rgba(85, 230, 242, .06), 0 0 90px rgba(85, 230, 242, .08);
  transform: scale(1);
}

/* The static core exists before the React bundle, so it owns the destination
   shared-element snapshot on cold navigation. */
html.grid-route-handoff-boot .grid-route-handoff-shell__core {
  view-transition-name: grid-access-core;
}

.grid-route-handoff-shell__core::before,
.grid-route-handoff-shell__core::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.grid-route-handoff-shell__core::before {
  inset: 11%;
  border: 1px dashed rgba(85, 230, 242, .48);
  animation: grid-route-handoff-orbit 5.8s linear infinite;
}

.grid-route-handoff-shell__core::after {
  inset: 28%;
  border: 1px solid rgba(255, 155, 80, .34);
}

.grid-route-handoff-shell__packet {
  width: 19%;
  aspect-ratio: 1;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #05161c;
  background: #6ff3ff;
  border-radius: 4px;
  box-shadow: 0 0 0 9px rgba(85, 230, 242, .06), 0 0 34px rgba(85, 230, 242, .48);
  transform: rotate(45deg);
  font: 650 clamp(15px, 2vw, 27px)/1 "Unbounded", sans-serif;
}

.grid-route-handoff-shell__packet > span {
  transform: rotate(-45deg);
}

html.grid-route-handoff-boot .grid-route-handoff-shell {
  display: grid;
  opacity: 1;
}

html.grid-route-handoff-boot.grid-route-handoff-react-ready .grid-route-handoff-shell {
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

@keyframes grid-route-handoff-orbit {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .grid-route-handoff-shell__core::before { animation: none; }
  html.grid-route-handoff-boot.grid-route-handoff-react-ready .grid-route-handoff-shell {
    transition: none;
  }
}
