.byte-flight-page {
  --flight-ink: #eaf5ff;
  --flight-muted: #9fb6cf;
  --flight-cyan: #62f4e3;
  box-sizing: border-box;
  width: 100%;
  min-height: calc(100vh - 80px);
  margin: 0;
  padding: 2rem max(calc((100vw - 1120px) / 2), 1rem) 4rem;
  color: var(--flight-ink);
  background: radial-gradient(ellipse at 50% 0, #153859, #081323 68%);
}

.byte-flight-back {
  color: var(--flight-cyan);
  font-weight: 700;
  text-decoration: none;
}

.byte-flight-back:hover,
.byte-flight-back:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.flight-race-link {
  display: inline-block;
  padding: .65rem 1rem;
  border: 1px solid var(--flight-cyan);
  border-radius: 999px;
  color: var(--flight-cyan);
  font-weight: 800;
  text-decoration: none;
}

.flight-race-link:hover,
.flight-race-link:focus-visible {
  color: #071323;
  background: var(--flight-cyan);
}

.byte-flight-heading {
  max-width: 760px;
  margin: 1.5rem auto;
  text-align: center;
}

.byte-flight-kicker {
  margin-bottom: .35rem;
  color: var(--flight-cyan);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.byte-flight-heading h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -.06em;
  text-shadow: 0 0 32px rgb(98 244 227 / 35%);
}

.byte-flight-heading > p:last-child {
  color: var(--flight-muted);
  font-size: 1.05rem;
}

.byte-flight-cabinet {
  overflow: hidden;
  border: 1px solid rgb(126 196 255 / 24%);
  border-radius: 22px;
  background: #071323;
  box-shadow: 0 24px 80px rgb(0 0 0 / 34%);
}

.byte-flight-hud {
  display: flex;
  justify-content: space-around;
  gap: .75rem;
  padding: 1rem;
  background: #0c1d32;
}

.byte-flight-hud > div {
  display: grid;
  gap: .15rem;
  text-align: center;
}

.byte-flight-hud span {
  color: var(--flight-muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.byte-flight-hud strong {
  color: var(--flight-cyan);
  font-size: 1.5rem;
  line-height: 1.1;
}

.byte-flight-stage {
  position: relative;
  overflow: hidden;
  background: #071323;
}

#flightCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  touch-action: none;
}

.byte-flight-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgb(4 13 27 / 68%);
  text-align: center;
}

.byte-flight-overlay[hidden] {
  display: none;
}

.byte-flight-overlay-icon {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  filter: drop-shadow(0 0 16px rgb(98 244 227 / 60%));
}

.byte-flight-overlay h2 {
  margin: .2rem 0 .4rem;
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 900;
}

.byte-flight-overlay > p:not(.byte-flight-overlay-icon) {
  max-width: 560px;
  margin: 0 0 1rem;
  color: var(--flight-ink);
}

.byte-flight-overlay button,
.byte-flight-controls button {
  border: 0;
  border-radius: 999px;
  background: var(--flight-cyan);
  color: #06202a;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 24px rgb(98 244 227 / 25%);
}

.byte-flight-overlay button {
  padding: .8rem 1.5rem;
}

.byte-flight-overlay button:hover,
.byte-flight-controls button:hover {
  background: #fff;
}

.byte-flight-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: #0c1d32;
}

.byte-flight-controls p {
  margin: 0;
  color: var(--flight-muted);
  font-size: .9rem;
}

.byte-flight-controls button {
  flex: 0 0 auto;
  padding: .65rem 1rem;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.byte-flight-briefing {
  max-width: 800px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgb(126 196 255 / 18%);
  border-radius: 16px;
  background: rgb(7 19 35 / 78%);
}

.byte-flight-briefing h2 {
  color: #fff;
  font-size: 1.2rem;
}

.byte-flight-briefing ul {
  display: grid;
  gap: .5rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--flight-muted);
}

.byte-flight-briefing strong {
  color: var(--flight-cyan);
}

@media (max-width: 600px) {
  .byte-flight-page {
    padding: 1rem .5rem 3rem;
  }

  .byte-flight-hud {
    padding: .7rem .35rem;
  }

  .byte-flight-hud span {
    font-size: .55rem;
    letter-spacing: .04em;
  }

  .byte-flight-hud strong {
    font-size: 1.2rem;
  }

  .byte-flight-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .byte-flight-controls button {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .byte-flight-overlay-icon {
    filter: none;
  }
}
