:root {
  --pf-void: #05070a;
  --pf-paper: #e8eef4;
  --pf-muted: rgba(232, 238, 244, 0.62);
  --pf-subtle: rgba(232, 238, 244, 0.38);
  --pf-line: rgba(232, 238, 244, 0.14);
  --pf-accent: #9ec4e6;
  --pf-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --pf-body: "Outfit", "Avenir Next", "Helvetica Neue", sans-serif;
  --pf-ease: cubic-bezier(0.2, 0.72, 0.2, 1);
}

.pf-body *,
.pf-body *::before,
.pf-body *::after,
.toward-scene--planetfall *,
.toward-scene--planetfall *::before,
.toward-scene--planetfall *::after {
  box-sizing: border-box;
}

html:has(> body.pf-body),
body.pf-body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--pf-void);
  color: var(--pf-paper);
  -webkit-text-size-adjust: 100%;
}

.pf-body {
  position: relative;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--pf-body);
  font-weight: 400;
  background: var(--pf-void);
  overflow: hidden;
}

.pf-canvas {
  display: block;
  background: transparent;
  touch-action: none;
}

.pf-body .pf-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #05070a;
}

.pf-embed {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
}

.pf-embed .pf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.pf-wash {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.pf-body .pf-wash--top {
  top: 0;
  height: min(28vh, 220px);
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.72) 0%, rgba(5, 7, 10, 0) 100%);
}

.pf-body .pf-wash--bottom {
  bottom: 0;
  height: min(22vh, 160px);
  background: linear-gradient(0deg, rgba(5, 7, 10, 0.72) 0%, rgba(5, 7, 10, 0) 100%);
}

.toward-scene--planetfall .pf-wash {
  display: none;
}

.pf-lower {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  pointer-events: none;
}

.pf-body .pf-lower {
  position: fixed;
}

.pf-overlay--controls {
  position: static;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: auto;
}

.pf-seg {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pf-seg__legend {
  position: static;
  width: auto;
  height: auto;
  padding: 0 0 5px 12px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border: 0;
  font-family: var(--pf-body);
  font-size: 0.58rem;
  font-weight: 560;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(220, 232, 244, 0.42);
}

.pf-seg__row {
  display: inline-flex;
  border: 1px solid var(--pf-line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(5, 7, 10, 0.42);
}

.pf-seg__opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 15px;
  cursor: pointer;
  transition: background-color 220ms var(--pf-ease);
}

.pf-seg__opt input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  /* 16px keeps iPhone Safari from zooming the page when a toggle is focused. */
  font-size: 16px;
}

.pf-seg__opt span {
  font-family: var(--pf-body);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-muted);
  transition: color 220ms var(--pf-ease);
}

.pf-seg__opt:has(input:checked) {
  background: var(--pf-paper);
}

.pf-seg__opt:has(input:checked) span {
  color: var(--pf-void);
}

.pf-seg__opt:has(input:focus-visible) {
  outline: 2px solid var(--pf-accent);
  outline-offset: 2px;
}

.pf-egg {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 10px 6px;
  pointer-events: auto;
  font-family: var(--pf-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(236, 246, 255, 0.9);
  background: transparent;
  border: 0;
  isolation: isolate;
  animation: pf-egg-shimmer 3.6s var(--pf-ease) infinite;
}

.pf-egg::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 156%;
  height: 110%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 50%, rgba(210, 230, 248, 0.38), rgba(186, 214, 240, 0.08) 46%, rgba(186, 214, 240, 0) 74%);
  filter: blur(7px);
  pointer-events: none;
  z-index: -1;
  animation: pf-egg-halo 3.6s var(--pf-ease) infinite;
}

.pf-egg::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 9px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 236, 250, 0.08), rgba(236, 246, 255, 0.78), rgba(220, 236, 250, 0.08), transparent);
  opacity: 0.55;
  pointer-events: none;
  animation: pf-egg-rule 3.6s var(--pf-ease) infinite;
}

.pf-egg:hover,
.pf-egg:focus-visible {
  color: rgba(255, 255, 255, 0.98);
  animation: none;
  text-shadow:
    0 0 12px rgba(220, 236, 252, 0.7),
    0 0 28px rgba(176, 212, 242, 0.42);
}

.pf-egg:hover::before,
.pf-egg:focus-visible::before {
  animation: none;
  opacity: 0.95;
}

.pf-egg:hover::after,
.pf-egg:focus-visible::after {
  animation: none;
  opacity: 0.9;
}

.pf-egg:focus-visible {
  outline: 1px solid var(--pf-line);
  outline-offset: 3px;
}

@keyframes pf-egg-shimmer {
  0%,
  14%,
  100% {
    color: rgba(226, 238, 250, 0.8);
    text-shadow:
      0 0 10px rgba(186, 214, 240, 0.34),
      0 0 22px rgba(160, 200, 232, 0.16);
  }
  38% {
    color: rgba(255, 255, 255, 0.98);
    text-shadow:
      0 0 14px rgba(230, 242, 255, 0.82),
      0 0 32px rgba(176, 214, 244, 0.54),
      0 0 54px rgba(148, 196, 232, 0.3);
  }
  62% {
    color: rgba(242, 248, 255, 0.94);
    text-shadow:
      0 0 12px rgba(214, 232, 248, 0.56),
      0 0 26px rgba(176, 212, 240, 0.28);
  }
}

@keyframes pf-egg-halo {
  0%,
  14%,
  100% {
    opacity: 0.34;
    transform: translate(-50%, -50%) scale(0.9);
  }
  38% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.12);
  }
  62% {
    opacity: 0.56;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pf-egg-rule {
  0%,
  14%,
  100% {
    opacity: 0.22;
    transform: scaleX(0.86);
  }
  38% {
    opacity: 0.92;
    transform: scaleX(1);
  }
  62% {
    opacity: 0.48;
    transform: scaleX(0.96);
  }
}

.pf-skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  background: var(--pf-paper);
  color: var(--pf-void);
  padding: 8px 12px;
}

.pf-skip:focus {
  left: 8px;
}

.pf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pf-noscript,
.pf-fallback {
  position: absolute;
  z-index: 6;
  left: 18px;
  right: 18px;
  bottom: 120px;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--pf-muted);
}

.pf-body .pf-noscript,
.pf-body .pf-fallback {
  position: fixed;
}

.pf-fallback[hidden] {
  display: none;
}

@media (max-width: 430px) {
  .pf-lower {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .pf-overlay--controls {
    gap: 8px;
    max-width: 100%;
  }

  .pf-seg__opt {
    padding: 0 11px;
  }

  .pf-egg {
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    padding-right: 2px;
  }
}

@media (max-width: 360px) {
  .pf-seg__opt {
    padding: 0 9px;
  }

  .pf-seg__opt span {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-egg,
  .pf-egg::before,
  .pf-egg::after {
    animation: none;
  }

  .pf-egg {
    color: rgba(236, 246, 255, 0.92);
    text-shadow:
      0 0 12px rgba(196, 220, 244, 0.48),
      0 0 24px rgba(168, 206, 236, 0.24);
  }

  .pf-egg::before {
    opacity: 0.7;
  }

  .pf-egg::after {
    opacity: 0.7;
  }
}

.pf-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #05070a;
  opacity: 0;
}

.pf-body .pf-veil {
  position: fixed;
  z-index: 1;
}

.pf-embed .pf-canvas {
  z-index: 1;
}

.pf-hits {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.pf-body .pf-hits {
  position: fixed;
}

.pf-hits.is-live {
  pointer-events: auto;
  touch-action: pan-y;
}

.pf-seg__opt,
.pf-egg,
.pf-hit {
  touch-action: manipulation;
}

.pf-orbit-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.pf-orbit-fallback[hidden] {
  display: none;
}

html.pf-webgl-failed .pf-embed,
html.pf-webgl-failed .pf-hits,
html.pf-webgl-failed #pf-controls,
html.pf-webgl-failed .pf-place,
html.pf-webgl-failed #pf-canvas {
  display: none;
}

html.pf-webgl-failed .pf-fallback {
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(28px, env(safe-area-inset-bottom));
}

.pf-hit {
  position: absolute;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
}

.pf-hit:focus-visible {
  outline: 1px solid rgba(232, 238, 244, 0.4);
  outline-offset: 2px;
}

.pf-hit.is-focus {
  box-shadow: 0 0 0 1px rgba(232, 238, 244, 0.12);
}

.pf-place {
  position: absolute;
  left: 50%;
  bottom: 20%;
  z-index: 5;
  transform: translateX(-50%);
  margin: 0;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
}

.pf-body .pf-place {
  position: fixed;
  bottom: 22%;
}

.pf-place[hidden] {
  display: none;
}

.pf-place__name {
  margin: 0;
  font-family: var(--pf-display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pf-paper);
}

.pf-place__note {
  margin: 4px 0 0;
  font-family: var(--pf-body);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pf-subtle);
}

.pf-overlay--controls.is-locked {
  opacity: 0.85;
}

@media (max-width: 430px) {
  .pf-place {
    bottom: 18%;
  }

  .pf-place__name {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-veil,
  .pf-place,
  .pf-seg__opt,
  .pf-seg__opt span {
    transition: none;
  }
}

#toward-ending-lead {
  transition: opacity 260ms ease;
}

@media (prefers-reduced-motion: reduce) {
  #toward-ending-lead {
    transition: none;
  }
}
