*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh;
  background: #0d1630; color: #e7ecf7;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #ffb35c; outline-offset: 3px; }
.callsign, .clock, .status-label, .launch, .comms, .mission { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; }

.control { max-width: 1040px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; }

.space {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; min-height: 340px;
  border-radius: 6px;
  background-color: #0b1432;
  background-image:
    radial-gradient(circle at 12% 22%, #ffffff 0 1.2px, transparent 2px),
    radial-gradient(circle at 34% 12%, #c9d4ff 0 1px, transparent 1.6px),
    radial-gradient(circle at 58% 30%, #ffffff 0 1.4px, transparent 2px),
    radial-gradient(circle at 76% 14%, #ffe2c2 0 1px, transparent 1.6px),
    radial-gradient(circle at 90% 40%, #ffffff 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 22% 48%, #c9d4ff 0 1px, transparent 1.6px),
    radial-gradient(circle at 46% 56%, #ffffff 0 .9px, transparent 1.5px),
    radial-gradient(circle at 68% 52%, #ffffff 0 1px, transparent 1.6px),
    linear-gradient(180deg, #0a1230 0%, #18265a 100%);
}
.space.short { aspect-ratio: auto; height: 300px; }
.planet {
  position: absolute; right: 9%; top: 14%; width: 11%; aspect-ratio: 1 / 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffc78f, #e86f2c 70%);
  box-shadow: 0 0 0 6px rgba(255, 140, 70, .12);
}
.ground {
  position: absolute; left: -10%; right: -10%; bottom: -62%; height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #3b4877 0 4%, transparent 4.5%), radial-gradient(circle at 70% 15%, #3b4877 0 3%, transparent 3.5%), #2a3563;
}
.pilot {
  position: absolute; left: 50%; bottom: 8%; width: 34%; max-width: 340px; margin: 0;
  transform: translateX(-50%); z-index: 2;
}
.pilot img { display: block; width: 100%; height: auto; user-select: none; }
.pilot.airborne picture { display: block; animation: hop 1.7s ease-in-out both; }
@keyframes hop {
  0% { transform: translateY(0); }
  30% { transform: translateY(-34%) rotate(-6deg); }
  60% { transform: translateY(-40%) rotate(4deg); }
  100% { transform: translateY(0) rotate(0); }
}

.hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 1rem 1.1rem; z-index: 3; }
.callsign { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffb35c; }
.mission { display: block; margin-top: .2rem; font-weight: 400; color: #9fb0db; letter-spacing: .18em; }
.clock {
  margin: 0; display: flex; align-items: baseline; gap: .4rem;
  border: 1px solid #ff8a2a; padding: .3rem .6rem; font-size: 1.15rem; color: #ffe1c4;
  background: rgba(13, 22, 48, .7);
}
.clock-label { font-size: .7rem; color: #ff8a2a; letter-spacing: .1em; }

.deck {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  padding: 1.1rem 0; border-bottom: 1px solid #24315f;
}
.status { margin: 0; font-size: 1rem; flex: 1 1 18rem; min-height: 1.5em; }
.status-label { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: #ff8a2a; margin-right: .5rem; }
.launch {
  display: inline-block; text-decoration: none; text-align: center;
  background: #ff7a1a; color: #0d1630; border: 0; border-radius: 8px;
  padding: .95rem 2.2rem; min-height: 52px; font-size: 1.05rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(255, 122, 26, .2);
  transition: background-color .15s ease;
}
.launch:hover { background: #ff9440; }
.launch:disabled { background: #8a5a3a; color: #1b2448; cursor: default; box-shadow: none; }

.comms { font-style: normal; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding-top: 1rem; font-size: .82rem; }
.comms-label { color: #7d8dbb; letter-spacing: .16em; text-transform: uppercase; }
.comms a { color: #cdd6f1; padding: .2rem 0; min-height: 26px; text-underline-offset: 3px; text-decoration-color: #ff8a2a; overflow-wrap: anywhere; }
.comms a:hover { color: #ffffff; }

@media (max-width: 640px) {
  .control { padding: .8rem .8rem 2rem; }
  .space { aspect-ratio: 4 / 5; min-height: 0; }
  .space.short { height: 220px; }
  .pilot { width: 62%; bottom: 10%; }
  .planet { width: 16%; top: 22%; }
  .ground { bottom: -50%; height: 70%; left: -30%; right: -30%; }
  .launch { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
