:root {
  color-scheme: dark;
  --background-image: url("assets/cockpit-ui.png");
  --cyan-rgb: 126, 232, 255;
  --pink-rgb: 255, 79, 145;
  --red-rgb: 255, 49, 95;
  --text-rgb: 235, 248, 255;
  --cyan: #7ee8ff;
  --pink: #ff4f91;
  --red: #ff315f;
  --panel-bg: rgba(2, 8, 16, 0.68);
  --ink: rgba(2, 8, 16, 0.68);
  --line: rgba(var(--cyan-rgb), 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02050a;
  font-family: "Rajdhani", "Orbitron", "Eurostile", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.cockpit {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  color: rgba(235, 248, 255, 0.92);
  isolation: isolate;
}

.background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(2, 5, 12, 0.18), rgba(2, 5, 12, 0.32)),
    var(--background-image) center / cover no-repeat;
  transform: scale(1.015);
  filter: saturate(1.12) contrast(1.14) brightness(0.82);
  animation: wakeImage 1.4s ease-out both;
}

.vignette,
.scanlines,
.boot-grid,
.edge-lights,
.console-glow,
.console-arc-glow,
.hud-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vignette {
  z-index: 1;
  background:
    radial-gradient(circle at center, transparent 0 45%, rgba(0, 7, 16, 0.42) 78%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(var(--red-rgb), 0.1), transparent 22% 78%, rgba(var(--cyan-rgb), 0.1));
  mix-blend-mode: screen;
}

.scanlines {
  z-index: 4;
  opacity: 0.24;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12) 0,
      rgba(255, 255, 255, 0.12) 1px,
      transparent 1px,
      transparent 7px
    );
  animation: scanMove 7s linear infinite;
}

.boot-grid {
  z-index: 2;
  opacity: 0;
  background:
    linear-gradient(rgba(var(--cyan-rgb), 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 0 45%, transparent 72%);
  animation: bootGrid 2.2s 0.25s ease-out both;
}

.edge-lights {
  z-index: 3;
  overflow: hidden;
}

.edge-top,
.edge-side {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
}

.edge-top {
  top: clamp(22px, 4.5vh, 56px);
  left: 8vw;
  width: 28vw;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.86), rgba(var(--pink-rgb), 0.72), transparent);
  filter: drop-shadow(0 0 7px rgba(var(--cyan-rgb), 0.42));
  animation: topLightSweep 6.8s ease-in-out infinite;
}

.edge-top-b {
  top: clamp(52px, 8.4vh, 96px);
  width: 20vw;
  animation-delay: 2.7s;
  animation-duration: 8.5s;
  background: linear-gradient(90deg, transparent, rgba(var(--red-rgb), 0.68), rgba(var(--cyan-rgb), 0.64), transparent);
}

.edge-side {
  top: 14vh;
  width: 2px;
  height: 34vh;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(var(--cyan-rgb), 0.75), rgba(var(--pink-rgb), 0.55), transparent);
  filter: drop-shadow(0 0 6px rgba(var(--pink-rgb), 0.36));
  animation: sideLightSweep 7.4s ease-in-out infinite;
}

.edge-left {
  left: clamp(16px, 2.7vw, 48px);
  transform: skewY(-18deg);
}

.edge-right {
  right: clamp(16px, 2.7vw, 48px);
  transform: skewY(18deg);
  animation-delay: 1.8s;
}

.console-glow {
  z-index: 3;
  opacity: 0.68;
  overflow: hidden;
  mix-blend-mode: screen;
}

.console-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 2.5vh, 34px);
  width: min(54vw, 700px);
  aspect-ratio: 4 / 1;
  translate: -50% 0;
  border-top: 8px solid rgba(var(--red-rgb), 0.42);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  opacity: 0.58;
  filter: drop-shadow(0 0 12px rgba(var(--red-rgb), 0.4));
  animation: consoleBoot 2.4s ease-out both, consoleIdle 5.8s 2.4s ease-in-out infinite;
}

.console-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 3.7vh, 52px);
  width: min(22vw, 300px);
  height: 3px;
  translate: -50% 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(var(--red-rgb), 0.78), rgba(var(--cyan-rgb), 0.4), transparent);
  opacity: 0;
  animation: consoleTrace 4.8s 1.2s ease-in-out infinite;
}

.console-arc-glow {
  z-index: 4;
  overflow: hidden;
  mix-blend-mode: screen;
}

.console-arc-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: min(3.8vh, 42px);
  width: min(55vw, 760px);
  height: min(22vw, 210px);
  translate: -50% 0;
  transform-origin: 50% 100%;
  opacity: 0.38;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(var(--red-rgb), 0.28) 0 18%, transparent 46%),
    radial-gradient(ellipse at 50% 96%, transparent 0 45%, rgba(var(--red-rgb), 0.5) 49%, rgba(var(--pink-rgb), 0.32) 57%, transparent 67%),
    radial-gradient(ellipse at 50% 100%, rgba(var(--pink-rgb), 0.2), transparent 72%);
  filter: blur(1px) saturate(1.08);
  animation: consoleArcBreathe 5.4s 1.1s ease-in-out infinite;
  will-change: opacity, transform, filter;
}

.console-arc-sweep {
  position: absolute;
  left: 50%;
  bottom: min(5.8vh, 58px);
  width: min(18vw, 240px);
  height: min(5vw, 38px);
  translate: -50% 0;
  transform-origin: 50% 50%;
  border-radius: 999px;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(var(--red-rgb), 0.5) 0, rgba(var(--pink-rgb), 0.28) 34%, transparent 72%);
  filter: blur(2px);
  animation: consoleArcSweep 5.6s 2.2s ease-in-out infinite;
  will-change: opacity, transform;
}

.hud-layer {
  z-index: 5;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  border: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  cursor: crosshair;
  touch-action: manipulation;
}

.hotspot:focus-visible {
  outline: 1px solid var(--cyan);
  box-shadow: 0 0 18px rgba(126, 232, 255, 0.8);
}

.hotspot-left {
  left: 3%;
  top: 15%;
  width: 28%;
  height: 63%;
}

.hotspot-right {
  right: 3%;
  top: 14%;
  width: 29%;
  height: 64%;
}

.hotspot-center {
  left: 39%;
  top: 28%;
  width: 22%;
  height: 31%;
  border-radius: 50%;
}

.hotspot-bottom {
  left: 23%;
  right: 23%;
  bottom: 0;
  height: 31%;
}

.ghost-nav {
  position: absolute;
  z-index: 6;
  left: clamp(92px, 10.8vw, 190px);
  top: clamp(30px, 5.2vh, 66px);
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 2.2vw, 2.2rem);
  pointer-events: auto;
}

.ghost-nav button {
  position: relative;
  border: 0;
  padding: 0.42rem 0.16rem;
  background: transparent;
  color: rgba(var(--text-rgb), 0.38);
  cursor: pointer;
  font-size: clamp(0.58rem, 0.68vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(var(--cyan-rgb), 0.12);
  transition: color 220ms ease, opacity 220ms ease, transform 220ms ease, text-shadow 220ms ease;
}

.ghost-nav button::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0.18rem;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.78), rgba(var(--pink-rgb), 0.78), transparent);
  opacity: 0;
  transition: left 240ms ease, right 240ms ease, opacity 240ms ease;
}

.ghost-nav button:hover,
.ghost-nav button:focus-visible,
.ghost-nav button.is-active {
  color: rgba(var(--text-rgb), 0.92);
  outline: 0;
  transform: translateY(-2px);
  text-shadow:
    0 0 10px rgba(var(--cyan-rgb), 0.48),
    0 0 14px rgba(var(--pink-rgb), 0.26);
}

.ghost-nav button:hover::after,
.ghost-nav button:focus-visible::after,
.ghost-nav button.is-active::after {
  left: 0.08rem;
  right: 0.08rem;
  opacity: 0.82;
}

.ghost-preview {
  position: absolute;
  left: 0;
  top: calc(100% + 0.8rem);
  width: min(20rem, 44vw);
  padding: 0.82rem 0.9rem 0.9rem;
  border: 1px solid rgba(var(--cyan-rgb), 0.26);
  border-radius: 8px;
  background:
    linear-gradient(rgba(var(--cyan-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--pink-rgb), 0.04) 1px, transparent 1px),
    rgba(2, 8, 16, 0.58);
  background-size: 18px 18px;
  box-shadow:
    0 0 0 1px rgba(var(--pink-rgb), 0.1) inset,
    0 0 20px rgba(var(--cyan-rgb), 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(9px);
}

.ghost-nav:hover .ghost-preview,
.ghost-nav:focus-within .ghost-preview,
.ghost-nav.is-previewing .ghost-preview {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ghost-preview-kicker {
  margin: 0 0 0.36rem;
  color: rgba(var(--pink-rgb), 0.82);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-shadow: 0 0 10px rgba(var(--pink-rgb), 0.42);
}

.ghost-preview h2 {
  margin: 0 0 0.38rem;
  color: rgba(var(--text-rgb), 0.94);
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ghost-preview p:not(.ghost-preview-kicker) {
  margin: 0 0 0.72rem;
  color: rgba(var(--text-rgb), 0.64);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ghost-preview-bars {
  display: grid;
  gap: 0.34rem;
}

.ghost-preview-bars i {
  display: block;
  height: 3px;
  width: var(--bar, 64%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--cyan-rgb), 0.78), rgba(var(--pink-rgb), 0.58), transparent);
  opacity: 0.74;
}

.ghost-preview-bars i:nth-child(2) {
  --bar: 82%;
}

.ghost-preview-bars i:nth-child(3) {
  --bar: 48%;
}

.hud-clock {
  position: absolute;
  z-index: 6;
  top: clamp(78px, 10vh, 128px);
  right: clamp(16px, 4.5vw, 72px);
  display: grid;
  gap: 0.15rem;
  min-width: min(15.5rem, 42vw);
  padding: 0.62rem 0.78rem;
  border: 1px solid rgba(var(--cyan-rgb), 0.32);
  border-radius: 8px;
  background:
    linear-gradient(rgba(var(--cyan-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--pink-rgb), 0.04) 1px, transparent 1px),
    rgba(2, 8, 16, 0.46);
  background-size: 16px 16px;
  box-shadow:
    0 0 0 1px rgba(var(--pink-rgb), 0.12) inset,
    0 0 18px rgba(var(--cyan-rgb), 0.13);
  color: rgba(var(--text-rgb), 0.92);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: bootText 1.1s 1.35s ease-out both;
}

.hud-clock-date {
  color: rgba(var(--pink-rgb), 0.82);
  font-size: clamp(0.64rem, 0.9vw, 0.78rem);
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(var(--pink-rgb), 0.5);
}

.hud-clock-time {
  display: flex;
  align-items: baseline;
  gap: 0.32rem;
  color: rgba(var(--text-rgb), 0.96);
  font-size: clamp(1.1rem, 2.2vw, 1.85rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.48);
}

.hud-clock-time small {
  color: rgba(var(--cyan-rgb), 0.64);
  font-size: 0.48em;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.34);
}

.reticle {
  position: absolute;
  left: 50%;
  top: 43%;
  width: min(34vw, 430px);
  aspect-ratio: 1;
  translate: -50% -50%;
  opacity: 0;
  animation: reticleBoot 1.1s 0.75s ease-out both, reticlePulse 3.5s 1.9s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(255, 79, 145, 0.6));
}

.reticle-ring,
.reticle-axis,
.reticle-core,
.reticle-label {
  position: absolute;
  left: 50%;
  top: 50%;
}

.reticle-ring {
  aspect-ratio: 1;
  border: 1px solid rgba(126, 232, 255, 0.38);
  border-radius: 50%;
  translate: -50% -50%;
}

.ring-a {
  width: 94%;
  border-top-color: rgba(255, 79, 145, 0.75);
  animation: rotate 18s linear infinite;
}

.ring-idle-a {
  width: 102%;
  border-color: transparent;
  border-top-color: rgba(126, 232, 255, 0.24);
  border-right-color: rgba(255, 79, 145, 0.18);
  animation: rotate 32s linear infinite;
}

.ring-idle-b {
  width: 72%;
  border-color: transparent;
  border-left-color: rgba(255, 79, 145, 0.22);
  border-bottom-color: rgba(126, 232, 255, 0.16);
  animation: rotate 27s linear reverse infinite;
}

.ring-b {
  width: 55%;
  border-color: rgba(255, 49, 95, 0.45);
  animation: rotate 11s linear reverse infinite;
}

.ring-c {
  width: 22%;
  border-color: rgba(239, 250, 255, 0.7);
  box-shadow: 0 0 16px rgba(126, 232, 255, 0.55);
}

.reticle-axis {
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  transform-origin: center;
  translate: -50% -50%;
}

.axis-x {
  width: 78%;
  height: 1px;
}

.axis-y {
  width: 1px;
  height: 78%;
  background: linear-gradient(180deg, transparent, var(--pink), transparent);
}

.reticle-core {
  width: 14px;
  aspect-ratio: 1;
  border: 1px solid white;
  border-radius: 50%;
  translate: -50% -50%;
  box-shadow: 0 0 14px rgba(255, 79, 145, 0.78), inset 0 0 8px rgba(126, 232, 255, 0.55);
  animation: corePulse 3.2s ease-in-out infinite;
}

.reticle-label {
  top: calc(50% + min(18vw, 215px));
  translate: -50% 0;
  color: #ff86b2;
  font-size: clamp(0.68rem, 1.3vw, 0.9rem);
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(255, 79, 145, 0.85);
  white-space: nowrap;
}

.boot-text {
  position: absolute;
  left: 50%;
  top: 70%;
  translate: -50% 0;
  display: grid;
  gap: 0.15rem;
  text-align: center;
  color: rgba(230, 246, 255, 0.86);
  text-shadow: 0 0 18px rgba(126, 232, 255, 0.55);
  opacity: 0;
  animation: bootText 1.6s 1.15s ease-out both;
}

.boot-text span {
  color: var(--pink);
  font-size: clamp(0.65rem, 1vw, 0.82rem);
  letter-spacing: 0.25em;
}

.boot-text strong {
  font-weight: 300;
  font-size: clamp(1.45rem, 4.4vw, 3.4rem);
  letter-spacing: 0.34em;
}

.panel {
  position: absolute;
  z-index: 8;
  width: min(22rem, calc(100vw - 32px));
  padding: 1rem;
  border: 1px solid rgba(126, 232, 255, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(rgba(var(--cyan-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--pink-rgb), 0.04) 1px, transparent 1px),
    var(--panel-bg);
  background-size: 22px 22px;
  box-shadow:
    0 0 0 1px rgba(var(--pink-rgb), 0.18) inset,
    0 0 24px rgba(var(--cyan-rgb), 0.16),
    0 0 34px rgba(var(--pink-rgb), 0.13);
  color: rgba(235, 248, 255, 0.92);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transition: opacity 280ms ease, transform 280ms ease;
  backdrop-filter: blur(10px);
}

.panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.panel-system {
  left: clamp(16px, 6vw, 84px);
  top: clamp(88px, 16vh, 160px);
}

.panel-mission {
  right: clamp(16px, 6vw, 84px);
  top: clamp(88px, 16vh, 160px);
}

.panel-assist {
  left: 50%;
  top: 14%;
  translate: -50% 0;
}

.panel-console {
  left: 50%;
  bottom: clamp(18px, 7vh, 72px);
  translate: -50% 0;
}

.panel-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(var(--pink-rgb), 0.45);
  border-radius: 50%;
  background: rgba(8, 12, 22, 0.45);
  color: #ffd8e6;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(var(--pink-rgb), 0.22);
}

.panel-kicker {
  margin: 0 2.4rem 0.45rem 0;
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(255, 79, 145, 0.8);
}

.panel h1 {
  margin: 0 0 0.9rem;
  font-size: 1.34rem;
  font-weight: 300;
  letter-spacing: 0.16em;
}

.panel-summary {
  margin: -0.35rem 0 0.85rem;
  color: rgba(var(--text-rgb), 0.68);
  font-size: 0.78rem;
  line-height: 1.45;
}

.panel-widget {
  margin-bottom: 0.9rem;
}

.panel-widget:last-of-type {
  margin-bottom: 0.75rem;
}

.widget-label {
  margin: 0 0 0.48rem;
  color: rgba(var(--cyan-rgb), 0.78);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.kpi-card {
  min-width: 0;
  border: 1px solid rgba(var(--cyan-rgb), 0.16);
  border-radius: 6px;
  padding: 0.58rem;
  background: rgba(255, 255, 255, 0.035);
}

.kpi-card span {
  display: block;
  color: rgba(var(--text-rgb), 0.58);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.kpi-card strong {
  display: block;
  margin-top: 0.2rem;
  color: rgba(var(--text-rgb), 0.95);
  font-size: 1rem;
  font-weight: 500;
}

.progress-list,
.log-list {
  display: grid;
  gap: 0.5rem;
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.36rem 0.8rem;
  align-items: center;
}

.progress-row span,
.progress-row output {
  font-size: 0.72rem;
  color: rgba(var(--text-rgb), 0.78);
}

.progress-track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track i {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--red));
}

.log-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(var(--cyan-rgb), 0.13);
  padding-bottom: 0.38rem;
  color: rgba(var(--text-rgb), 0.74);
  font-size: 0.72rem;
}

.log-list time {
  color: rgba(var(--pink-rgb), 0.84);
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 0.42rem;
  height: 4.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-bars li {
  position: relative;
  flex: 1;
  height: var(--value);
  min-height: 14%;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.85), rgba(var(--pink-rgb), 0.72));
}

.chart-bars li::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: -1.05rem;
  translate: -50% 0;
  color: rgba(var(--text-rgb), 0.48);
  font-size: 0.55rem;
}

.readouts {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.readouts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(126, 232, 255, 0.14);
  padding-bottom: 0.34rem;
}

.readouts dt,
.readouts dd {
  margin: 0;
  font-size: 0.74rem;
}

.readouts dt {
  color: rgba(196, 224, 235, 0.67);
}

.readouts dd {
  color: rgba(255, 244, 248, 0.95);
}

.panel code {
  display: block;
  color: #8ff0ff;
  font-size: 0.75rem;
  white-space: normal;
  text-shadow: 0 0 12px rgba(126, 232, 255, 0.65);
}

.meter {
  height: 4px;
  margin: 0.5rem 0 0.9rem;
  background: rgba(255, 255, 255, 0.08);
}

.meter span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 14px rgba(255, 79, 145, 0.7);
}

.map-grid {
  position: relative;
  height: 6.4rem;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(126, 232, 255, 0.18);
  background:
    linear-gradient(rgba(126, 232, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 232, 255, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
}

.map-grid span {
  position: absolute;
  width: 44%;
  height: 1px;
  left: 29%;
  top: 50%;
  background: var(--pink);
  box-shadow: 0 0 12px rgba(255, 79, 145, 0.7);
  transform: rotate(calc(var(--i, 0) * 45deg));
}

.map-grid span:nth-child(2) { --i: 1; }
.map-grid span:nth-child(3) { --i: 2; }
.map-grid span:nth-child(4) { --i: 3; }

.signal-stack,
.console-row {
  display: flex;
  align-items: end;
  gap: 0.42rem;
  height: 3.4rem;
  margin-bottom: 0.9rem;
}

.signal-stack i,
.console-row b {
  flex: 1;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--pink));
  box-shadow: 0 0 14px rgba(126, 232, 255, 0.42);
}

.signal-stack i:nth-child(1) { height: 35%; }
.signal-stack i:nth-child(2) { height: 64%; }
.signal-stack i:nth-child(3) { height: 48%; }
.signal-stack i:nth-child(4) { height: 82%; }
.console-row b:nth-child(1) { height: 46%; }
.console-row b:nth-child(2) { height: 88%; }
.console-row b:nth-child(3) { height: 58%; }
.console-row b:nth-child(4) { height: 72%; }
.console-row b:nth-child(5) { height: 38%; }

.spark {
  position: absolute;
  z-index: 7;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  pointer-events: none;
  background: white;
  box-shadow:
    0 0 18px 8px rgba(255, 79, 145, 0.78),
    0 0 36px 18px rgba(126, 232, 255, 0.25);
  animation: spark 480ms ease-out forwards;
}

@keyframes wakeImage {
  from { opacity: 0; filter: saturate(0.72) contrast(1) brightness(0.3); }
  to { opacity: 1; filter: saturate(1.12) contrast(1.14) brightness(0.82); }
}

@keyframes scanMove {
  to { transform: translateY(56px); }
}

@keyframes bootGrid {
  0% { opacity: 0; transform: scale(1.05); }
  35% { opacity: 0.42; }
  100% { opacity: 0.08; transform: scale(1); }
}

@keyframes reticleBoot {
  from { opacity: 0; transform: scale(0.72) rotate(-18deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes reticlePulse {
  0%, 100% { opacity: 0.58; filter: drop-shadow(0 0 10px rgba(255, 79, 145, 0.42)); }
  50% { opacity: 0.98; filter: drop-shadow(0 0 24px rgba(126, 232, 255, 0.58)); }
}

@keyframes rotate {
  to { rotate: 360deg; }
}

@keyframes topLightSweep {
  0%, 58%, 100% { opacity: 0; transform: translateX(-34vw) scaleX(0.55); }
  64% { opacity: 0.42; }
  76% { opacity: 0.3; transform: translateX(66vw) scaleX(1); }
  82% { opacity: 0; transform: translateX(78vw) scaleX(0.7); }
}

@keyframes sideLightSweep {
  0%, 62%, 100% { opacity: 0; translate: 0 -28vh; }
  69% { opacity: 0.34; }
  84% { opacity: 0.2; translate: 0 56vh; }
  90% { opacity: 0; translate: 0 64vh; }
}

@keyframes corePulse {
  0%, 100% { opacity: 0.72; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes consoleBoot {
  0% { opacity: 0; transform: scaleX(0.5); }
  44% { opacity: 1; transform: scaleX(1.04); }
  100% { opacity: 0.58; transform: scaleX(1); }
}

@keyframes consoleIdle {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 0.72; }
}

@keyframes consoleTrace {
  0%, 52%, 100% { opacity: 0; transform: scaleX(0.2); }
  62% { opacity: 0.58; }
  78% { opacity: 0.18; transform: scaleX(2.7); }
  86% { opacity: 0; transform: scaleX(3.15); }
}

@keyframes consoleArcBreathe {
  0%, 100% {
    opacity: 0.22;
    transform: scale(0.985);
    filter: blur(1px) saturate(1);
  }
  48% {
    opacity: 0.48;
    transform: scale(1.025);
    filter: blur(1.5px) saturate(1.14);
  }
}

@keyframes consoleArcSweep {
  0%, 56%, 100% {
    opacity: 0;
    transform: scaleX(0.22) scaleY(0.8);
  }
  66% {
    opacity: 0.26;
  }
  82% {
    opacity: 0.08;
    transform: scaleX(3.35) scaleY(1.05);
  }
  90% {
    opacity: 0;
    transform: scaleX(3.85) scaleY(1);
  }
}

@keyframes bootText {
  0% { opacity: 0; transform: translateY(12px); }
  40% { opacity: 1; }
  100% { opacity: 0.72; transform: translateY(0); }
}

@keyframes spark {
  to {
    opacity: 0;
    transform: scale(8);
  }
}

@media (max-width: 720px) {
  .cockpit {
    min-height: 620px;
  }

  .background {
    background-position: center;
  }

  .hotspot-left,
  .hotspot-right {
    top: 16%;
    width: 42%;
    height: 45%;
  }

  .hotspot-left {
    left: 0;
  }

  .hotspot-right {
    right: 0;
  }

  .hotspot-center {
    left: 28%;
    top: 28%;
    width: 44%;
    height: 28%;
  }

  .hotspot-bottom {
    left: 0;
    right: 0;
    height: 35%;
  }

  .ghost-nav {
    left: 12px;
    top: 18px;
    max-width: calc(100vw - 24px);
    gap: 0.34rem;
    overflow: visible;
  }

  .ghost-nav button {
    padding: 0.36rem 0.08rem;
    font-size: clamp(0.48rem, 2.45vw, 0.58rem);
    letter-spacing: 0.05em;
  }

  .ghost-preview {
    width: min(18rem, calc(100vw - 24px));
    padding: 0.68rem 0.72rem;
  }

  .ghost-preview h2 {
    font-size: 0.86rem;
  }

  .ghost-preview p:not(.ghost-preview-kicker) {
    font-size: 0.66rem;
  }

  .hud-clock {
    top: 68px;
    right: 10px;
    min-width: 9.4rem;
    padding: 0.48rem 0.58rem;
  }

  .hud-clock-date {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }

  .hud-clock-time {
    gap: 0.22rem;
    font-size: clamp(0.92rem, 5vw, 1.18rem);
    letter-spacing: 0.04em;
  }

  .reticle {
    top: 42%;
    width: min(72vw, 360px);
  }

  .edge-top {
    top: 38px;
    left: 4vw;
    width: 36vw;
  }

  .edge-side {
    top: 18vh;
    height: 26vh;
  }

  .console-glow::before {
    width: min(86vw, 520px);
    border-top-width: 6px;
  }

  .console-glow::after {
    width: min(42vw, 240px);
  }

  .console-arc-glow::before {
    bottom: min(4.6vh, 38px);
    width: min(88vw, 560px);
    height: min(42vw, 180px);
  }

  .console-arc-sweep {
    bottom: min(6.7vh, 52px);
    width: min(34vw, 220px);
    height: min(9vw, 34px);
  }

  .boot-text {
    top: 62%;
    width: min(92vw, 420px);
  }

  .boot-text strong {
    letter-spacing: 0.18em;
  }

  .panel {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 18px;
    translate: -50% 0;
    max-height: 48svh;
    overflow: auto;
    padding: 1rem 1rem 1.1rem;
  }

  .panel-assist {
    top: 15%;
    bottom: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .edge-lights,
  .console-glow,
  .console-arc-glow,
  .scanlines {
    opacity: 0.12;
  }

  .console-arc-glow::before {
    opacity: 0.24;
    transform: scale(1);
  }

  .console-arc-sweep {
    opacity: 0;
  }
}
