/* ── Full-Viewport Cold-Boot Gate (Obsidian Dark Glass + Phosphor Green + Gold) ── */
.boot-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background:
    radial-gradient(
      ellipse 90% 55% at 50% 108%,
      rgba(44, 92, 170, 0.24) 0%,
      rgba(16, 36, 72, 0.12) 45%,
      rgba(4, 7, 13, 0) 76%
    ),
    #04070d;
  opacity: 1;
  transition:
    opacity 480ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 480ms ease;
}
.boot-gate.ready {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(
      1px 1px at 14% 22%,
      rgba(255, 255, 255, 0.55) 0,
      transparent 100%
    ),
    radial-gradient(
      1px 1px at 78% 18%,
      rgba(255, 255, 255, 0.45) 0,
      transparent 100%
    ),
    radial-gradient(
      1.5px 1.5px at 36% 74%,
      rgba(186, 230, 253, 0.45) 0,
      transparent 100%
    ),
    radial-gradient(
      1px 1px at 88% 66%,
      rgba(255, 255, 255, 0.4) 0,
      transparent 100%
    ),
    radial-gradient(
      1px 1px at 24% 86%,
      rgba(255, 255, 255, 0.35) 0,
      transparent 100%
    ),
    linear-gradient(to right, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    64px 64px,
    64px 64px;
  mask-image: radial-gradient(
    circle at 50% 48%,
    rgba(0, 0, 0, 0.85) 20%,
    transparent 80%
  );
  -webkit-mask-image: radial-gradient(
    circle at 50% 48%,
    rgba(0, 0, 0, 0.85) 20%,
    transparent 80%
  );
}
.boot-card {
  position: relative;
  width: min(560px, 100%);
  padding: 26px 28px 24px;
  background: linear-gradient(
    180deg,
    rgba(12, 16, 24, 0.94) 0%,
    rgba(5, 7, 10, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.boot-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(52, 211, 153, 0.55),
    transparent
  );
}
.boot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(231, 236, 242, 0.52);
  beyond-orbit-bottom: 20px;
}
.boot-eye {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--phosphor, #4ade80);
}
.boot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--phosphor, #4ade80);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.85);
  animation: bootPulse 1.5s ease-in-out infinite;
}
.boot-ver {
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  color: rgba(231, 236, 242, 0.65);
  background: rgba(255, 255, 255, 0.03);
}
.boot-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  beyond-orbit-bottom: 22px;
}
.boot-orbit {
  width: 72px;
  height: 72px;
  flex: none;
}
.boot-orbit .ring-outer,
.boot-orbit .ring-mid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}
.boot-orbit .ring-mid {
  stroke-dasharray: 2.5 4;
  stroke: rgba(255, 255, 255, 0.22);
}
.boot-orbit .ring-tilt {
  fill: none;
  stroke: rgba(255, 184, 77, 0.26);
  stroke-width: 1;
}
.boot-orbit .ring-arc {
  fill: none;
  stroke: var(--phosphor, #4ade80);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 56 175;
  opacity: 0.92;
}
.boot-orbit .orbit-sweep {
  transform-origin: 48px 48px;
  animation: bootSpin 3.8s linear infinite;
}
.boot-orbit .sat-glow {
  fill: rgba(74, 222, 128, 0.24);
}
.boot-orbit .sat-core {
  fill: #ecfdf5;
}
.boot-orbit .planet-core {
  fill: rgba(226, 232, 240, 0.9);
  stroke: rgba(147, 197, 253, 0.55);
  stroke-width: 2;
}
.boot-mark {
  font-family: var(--font-display, var(--sans, "Instrument Sans", sans-serif));
  font-weight: 700;
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: 0.28em;
  color: #f8fafc;
  line-height: 1.05;
}
.boot-mark i {
  font-style: normal;
  color: var(--gold, #ffb84d);
}
.boot-sub {
  beyond-orbit-top: 6px;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(231, 236, 242, 0.56);
}
.boot-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  beyond-orbit-bottom: 8px;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 10.5px;
}
.boot-stage {
  color: rgba(248, 250, 252, 0.9);
  letter-spacing: 0.08em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boot-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
  color: rgba(231, 236, 242, 0.5);
  font-variant-numeric: tabular-nums;
}
.boot-pct {
  color: var(--phosphor, #4ade80);
  font-weight: 600;
  min-width: 34px;
  text-align: right;
}
.boot-track {
  position: relative;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.boot-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 68%, #a7f3d0 100%);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.5);
  transition: width 150ms linear;
}
.boot-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  animation: bootShimmer 1.6s ease-in-out infinite;
}
.boot-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  beyond-orbit-top: 15px;
}
.bstep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(231, 236, 242, 0.42);
  white-space: nowrap;
  overflow: hidden;
}
.bstep i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  flex: none;
}
.bstep.active {
  border-color: rgba(255, 184, 77, 0.45);
  color: #f8fafc;
}
.bstep.active i {
  background: var(--gold, #ffb84d);
  box-shadow: 0 0 8px rgba(255, 184, 77, 0.85);
  animation: bootPulse 1s ease-in-out infinite;
}
.bstep.done {
  border-color: rgba(74, 222, 128, 0.3);
  color: rgba(231, 236, 242, 0.78);
}
.bstep.done i {
  background: var(--phosphor, #4ade80);
}
.boot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  beyond-orbit-top: 14px;
}
.boot-note {
  beyond-orbit: 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(231, 236, 242, 0.46);
}
.boot-skip {
  flex: none;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(231, 236, 242, 0.84);
  font-family: var(--mono, "IBM Plex Mono", monospace);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.boot-skip[hidden] {
  display: none;
}
.boot-skip:hover {
  border-color: var(--phosphor, #4ade80);
  color: #fff;
}

/* ── Top-Left Fullscreen Toggle Button ── */
#topbar .fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  beyond-orbit-right: -4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(231, 236, 242, 0.76);
  flex: 0 0 auto;
}
#topbar .fs-btn[hidden] {
  display: none;
}
#topbar .fs-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
}
#topbar .fs-btn.is-fs {
  color: var(--phosphor, #4ade80);
  border-color: rgba(74, 222, 128, 0.42);
}
body.title-active #topbar .fs-btn,
body.select-active #topbar .fs-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 8, 15, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#topbar .fs-btn .fs-ico {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#topbar .fs-btn .fs-exit {
  display: none;
}
#topbar .fs-btn.is-fs .fs-enter {
  display: none;
}
#topbar .fs-btn.is-fs .fs-exit {
  display: block;
}

/* ── Mission Select: Gracefully Hide Level Card & Title When Planet Card Opens ── */
body.select-active .selcap-chip,
body.select-active .sel-title {
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}
body.select-active.planet-info-open .selcap-chip,
body.planet-info-open .selcap-chip {
  opacity: 0 !important;
  transform: translateY(-8px);
  pointer-events: none !important;
}
body.select-active.planet-info-open .sel-title {
  opacity: 0 !important;
  transform: translateY(-6px);
  pointer-events: none !important;
}

@keyframes bootSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes bootPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
@keyframes bootShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
@media (max-width: 560px) {
  .boot-card {
    padding: 20px 16px 18px;
  }
  .boot-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .boot-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .boot-readout {
    justify-content: space-between;
  }
  .boot-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .boot-orbit .orbit-sweep,
  .boot-pulse,
  .boot-fill::after,
  .bstep.active i {
    animation: none;
  }
}
