/* Nebula Flight owns a full-screen first-person cockpit surface. */

.nebula-flight-level,
.nebula-flight-level * {
  box-sizing: border-box;
}

.nebula-flight-level {
  position: fixed;
  z-index: 2;
  inset: 0;
  width: 100vw;
  height: 100svh;
  min-height: 0 !important;
  overflow: hidden;
  color: #efffff;
  background: #01040b;
  isolation: isolate;
  touch-action: none;
  user-select: none;
}

/* The global discovery-garden badge occupies the same phone corner as Brake. */
body:has(.nebula-flight-level) #data-garden-button {
  display: none !important;
}

.nebula-flight-level::before,
.nebula-flight-level::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  pointer-events: none;
}

.nebula-flight-level::before {
  background:
    radial-gradient(circle at 50% 44%, transparent 28%, rgba(0, 2, 10, 0.2) 66%, rgba(0, 1, 6, 0.76) 100%),
    linear-gradient(180deg, rgba(4, 7, 18, 0.06), rgba(1, 4, 12, 0.34));
}

.nebula-flight-level::after {
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.nebula-flight-stage,
.nebula-flight-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.nebula-flight-canvas {
  cursor: crosshair;
  touch-action: none;
}

.nebula-flight-back {
  position: absolute;
  z-index: 42;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  min-width: 92px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(133, 247, 240, 0.5);
  border-radius: 999px;
  color: #eaffff;
  font: 800 0.88rem/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(145deg, rgba(8, 31, 48, 0.92), rgba(4, 10, 25, 0.88));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    inset 0 0 16px rgba(84, 255, 237, 0.08);
  backdrop-filter: blur(14px);
}

.nebula-flight-back:hover,
.nebula-flight-back:focus-visible {
  border-color: #9dfff4;
  outline: 3px solid rgba(119, 255, 240, 0.3);
  outline-offset: 3px;
}

.nebula-flight-hud {
  position: absolute;
  z-index: 12;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  left: max(128px, calc(env(safe-area-inset-left) + 122px));
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.nebula-flight-progress-panel,
.nebula-flight-meter-panel {
  border: 1px solid rgba(108, 240, 231, 0.38);
  background:
    linear-gradient(140deg, rgba(4, 28, 39, 0.82), rgba(3, 8, 23, 0.78)),
    rgba(0, 8, 17, 0.72);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.36),
    inset 0 0 24px rgba(60, 255, 227, 0.055);
  backdrop-filter: blur(14px) saturate(125%);
}

.nebula-flight-progress-panel {
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 11px 16px 12px;
  border-radius: 18px;
  text-align: center;
  text-transform: uppercase;
}

.nebula-flight-progress-panel span,
.nebula-flight-meter-row span {
  color: rgba(205, 255, 249, 0.72);
  font: 750 0.67rem/1.2 system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nebula-flight-progress-panel strong {
  color: #c9fff5;
  font: 900 1.32rem/1.15 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(80, 255, 227, 0.6);
}

.nebula-flight-meter-panel {
  display: grid;
  gap: 9px;
  width: min(260px, 30vw);
  padding: 12px 14px;
  border-radius: 18px;
}

.nebula-flight-meter-row {
  display: grid;
  grid-template-columns: 58px minmax(86px, 1fr);
  align-items: center;
  gap: 10px;
}

.nebula-flight-meter-row > i {
  position: relative;
  display: block;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(181, 255, 247, 0.24);
  border-radius: 999px;
  background: rgba(2, 7, 16, 0.85);
}

.nebula-flight-meter-row > i > b {
  position: absolute;
  inset: 0;
  display: block;
  transform: scaleX(1);
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, #32b9ff, #80fff0);
  box-shadow: 0 0 14px rgba(84, 219, 255, 0.7);
}

.nebula-flight-meter-row > i > b.boost {
  background: linear-gradient(90deg, #b865ff, #ff78d7);
  box-shadow: 0 0 14px rgba(211, 92, 255, 0.66);
}

.nebula-flight-reticle {
  position: absolute;
  z-index: 10;
  top: 47%;
  left: 50%;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(134, 255, 240, 0.55);
  border-radius: 50%;
  box-shadow:
    0 0 18px rgba(74, 255, 228, 0.16),
    inset 0 0 18px rgba(74, 255, 228, 0.08);
  pointer-events: none;
}

.nebula-flight-reticle::before,
.nebula-flight-reticle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(159, 255, 243, 0.68);
  transform: translate(-50%, -50%);
}

.nebula-flight-reticle::before {
  width: 82px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0 22%, currentColor 22% 38%, transparent 38% 62%, currentColor 62% 78%, transparent 78%);
}

.nebula-flight-reticle::after {
  width: 1px;
  height: 82px;
  background: linear-gradient(180deg, transparent 0 22%, currentColor 22% 38%, transparent 38% 62%, currentColor 62% 78%, transparent 78%);
}

.nebula-flight-reticle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #d9fff9;
  box-shadow: 0 0 10px #71ffed;
}

.nebula-flight-cockpit {
  position: absolute;
  z-index: 8;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.nebula-flight-glass {
  position: absolute;
  inset: clamp(56px, 8vh, 88px) clamp(72px, 9vw, 172px) clamp(132px, 17vh, 190px);
  overflow: hidden;
  border-radius: 38% 38% 8% 8% / 18% 18% 5% 5%;
  opacity: 0.38;
  background:
    radial-gradient(circle at 50% 112%, rgba(96, 236, 255, 0.1), transparent 38%),
    linear-gradient(118deg, transparent 0 21%, rgba(160, 234, 255, 0.045) 23%, transparent 28% 72%, rgba(154, 226, 255, 0.035) 76%, transparent 81%);
  box-shadow: inset 0 0 80px rgba(76, 188, 220, 0.035);
  mix-blend-mode: screen;
}

.nebula-flight-glass::before,
.nebula-flight-glass::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(171, 237, 255, 0.08);
  border-radius: 50%;
  filter: blur(0.2px);
}

.nebula-flight-glass::before {
  top: 8%;
  right: 5%;
  width: 31%;
  height: 58%;
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-17deg);
}

.nebula-flight-glass::after {
  bottom: 6%;
  left: 9%;
  width: 22%;
  height: 37%;
  border-top-color: transparent;
  border-right-color: transparent;
  transform: rotate(16deg);
}

.nebula-flight-glass-glare {
  position: absolute;
  top: -18%;
  bottom: -12%;
  width: clamp(26px, 4vw, 58px);
  opacity: 0.32;
  background: linear-gradient(90deg, transparent, rgba(195, 242, 255, 0.09), transparent);
  filter: blur(5px);
}

.nebula-flight-glass-glare.glare-left {
  left: 19%;
  transform: rotate(18deg);
}

.nebula-flight-glass-glare.glare-right {
  right: 18%;
  transform: rotate(-15deg);
}

.nebula-flight-canopy-etch {
  position: absolute;
  bottom: 12px;
  left: 28px;
  color: rgba(189, 241, 249, 0.25);
  font: 650 0.54rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.nebula-flight-canopy-arch {
  position: absolute;
  top: clamp(30px, 4vh, 48px);
  left: 50%;
  width: min(46vw, 620px);
  height: clamp(94px, 17vh, 158px);
  transform: translateX(-50%);
  border: clamp(10px, 1.3vw, 18px) solid rgba(2, 7, 12, 0.985);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow:
    inset 0 4px 0 rgba(129, 221, 231, 0.055),
    0 -2px 0 rgba(96, 188, 204, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.7);
}

.nebula-flight-canopy-arch::before {
  position: absolute;
  top: 7px;
  right: 9px;
  bottom: 0;
  left: 9px;
  content: "";
  border: 1px solid rgba(103, 211, 222, 0.08);
  border-bottom: 0;
  border-radius: inherit;
}

.nebula-flight-canopy-arch .arch-fastener,
.nebula-flight-dash-fastener {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(142, 219, 226, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, rgba(165, 228, 232, 0.2) 45% 55%, transparent 56%),
    #071015;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.38);
}

.nebula-flight-canopy-arch .arch-fastener {
  bottom: 12px;
}

.nebula-flight-canopy-arch .arch-fastener-left {
  left: 9%;
}

.nebula-flight-canopy-arch .arch-fastener-right {
  right: 9%;
}

.nebula-flight-canopy {
  position: absolute;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.98), rgba(4, 9, 15, 0.96) 58%, rgba(16, 29, 37, 0.94));
  box-shadow:
    inset 0 0 24px rgba(110, 230, 239, 0.045),
    0 0 28px rgba(0, 0, 0, 0.92);
}

.nebula-flight-canopy.canopy-left {
  top: -8vh;
  bottom: 14vh;
  left: -2vw;
  width: clamp(78px, 10vw, 178px);
  transform: skewX(13deg);
  clip-path: polygon(0 0, 58% 0, 100% 100%, 0 100%);
  border-right: 2px solid rgba(113, 211, 222, 0.12);
}

.nebula-flight-canopy.canopy-right {
  top: -8vh;
  right: -2vw;
  bottom: 14vh;
  width: clamp(78px, 10vw, 178px);
  transform: skewX(-13deg);
  clip-path: polygon(42% 0, 100% 0, 100% 100%, 0 100%);
  border-left: 2px solid rgba(113, 211, 222, 0.12);
}

.nebula-flight-canopy.canopy-top {
  top: -28px;
  left: 8vw;
  right: 8vw;
  height: clamp(56px, 7.5vh, 92px);
  clip-path: polygon(0 0, 100% 0, 91% 100%, 9% 100%);
  border-bottom: 2px solid rgba(113, 211, 222, 0.11);
}

.nebula-flight-frame-rivets {
  position: absolute;
  top: 12%;
  bottom: 12%;
  width: 7px;
  opacity: 0.5;
  background: radial-gradient(circle, rgba(137, 211, 219, 0.42) 0 1.5px, #071014 1.8px 3px, transparent 3.2px);
  background-size: 7px 46px;
}

.nebula-flight-canopy.canopy-left .nebula-flight-frame-rivets {
  right: 15px;
}

.nebula-flight-canopy.canopy-right .nebula-flight-frame-rivets {
  left: 15px;
}

.nebula-flight-canopy > b {
  position: absolute;
  bottom: 34%;
  color: rgba(142, 221, 227, 0.22);
  font: 700 0.5rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.nebula-flight-canopy.canopy-left > b {
  right: 31px;
  transform: skewX(-13deg) rotate(180deg);
}

.nebula-flight-canopy.canopy-right > b {
  left: 31px;
  transform: skewX(13deg);
}

.nebula-flight-overhead-panel {
  position: absolute;
  z-index: 2;
  top: clamp(20px, 2.5vh, 30px);
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 5px 14px;
  width: clamp(190px, 20vw, 270px);
  min-height: 62px;
  padding: 10px 14px 9px;
  transform: translateX(-50%);
  border: 1px solid rgba(106, 201, 210, 0.13);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(95, 192, 202, 0.055) 50%, transparent 51%),
    linear-gradient(180deg, #050b0f, #020609);
  box-shadow:
    0 12px 25px rgba(0, 0, 0, 0.58),
    inset 0 -1px 0 rgba(117, 224, 230, 0.06);
}

.nebula-flight-overhead-copy {
  display: grid;
  align-content: center;
  gap: 2px;
  text-transform: uppercase;
}

.nebula-flight-overhead-copy span,
.nebula-flight-overhead-copy strong {
  font: 750 0.52rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

.nebula-flight-overhead-copy span {
  color: rgba(186, 235, 239, 0.38);
}

.nebula-flight-overhead-copy strong {
  color: rgba(112, 255, 225, 0.75);
}

.nebula-flight-overhead-lights {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nebula-flight-overhead-lights i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #65ebc5;
  box-shadow: 0 0 8px rgba(79, 252, 201, 0.55);
}

.nebula-flight-overhead-lights i:nth-child(2),
.nebula-flight-overhead-lights i:nth-child(4) {
  background: #d5a557;
  box-shadow: 0 0 6px rgba(224, 171, 78, 0.38);
}

.nebula-flight-overhead-switches {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(119, 210, 218, 0.07);
}

.nebula-flight-overhead-switches i {
  width: 23px;
  height: 5px;
  border: 1px solid rgba(139, 205, 210, 0.12);
  border-radius: 2px;
  background: #0a151a;
  box-shadow: inset 8px 0 0 rgba(92, 193, 193, 0.16);
}

.nebula-flight-dashboard {
  position: absolute;
  right: 10vw;
  bottom: -38px;
  left: 10vw;
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(220px, 1fr) minmax(180px, 0.78fr);
  align-items: center;
  gap: clamp(18px, 4vw, 60px);
  min-height: clamp(168px, 22vh, 238px);
  padding: 24px clamp(28px, 5vw, 74px) 52px;
  border: 2px solid rgba(95, 181, 195, 0.19);
  border-bottom: 0;
  border-radius: 48% 48% 0 0 / 32% 32% 0 0;
  background:
    linear-gradient(180deg, rgba(13, 25, 31, 0.98), rgba(0, 3, 8, 0.995)),
    #02050a;
  box-shadow:
    0 -18px 50px rgba(0, 0, 0, 0.68),
    inset 0 2px 0 rgba(133, 232, 240, 0.04),
    inset 0 20px 56px rgba(43, 111, 128, 0.05);
}

.nebula-flight-dashboard::before {
  position: absolute;
  top: -8px;
  right: 6%;
  left: 6%;
  height: 14px;
  content: "";
  border: 1px solid rgba(122, 211, 222, 0.13);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #0c1a20, #02070b);
  box-shadow:
    0 -8px 22px rgba(0, 0, 0, 0.72),
    inset 0 2px 0 rgba(141, 230, 234, 0.04);
}

.nebula-flight-dashboard::after {
  position: absolute;
  z-index: 0;
  inset: 12px 2.5% 0;
  content: "";
  border: 1px solid rgba(112, 189, 199, 0.045);
  border-bottom: 0;
  border-radius: 46% 46% 0 0 / 22% 22% 0 0;
  background-image: repeating-linear-gradient(112deg, transparent 0 13px, rgba(116, 196, 204, 0.018) 13px 14px);
}

.nebula-flight-dashboard > * {
  position: relative;
  z-index: 1;
}

.nebula-flight-dash-stitch {
  position: absolute;
  top: 14px;
  right: 10%;
  left: 10%;
  height: 1px;
  opacity: 0.5;
  background: repeating-linear-gradient(90deg, rgba(122, 213, 220, 0.16) 0 6px, transparent 6px 18px);
}

.nebula-flight-dash-fastener {
  position: absolute;
  top: 29px;
}

.nebula-flight-dash-fastener.fastener-left {
  left: 6.5%;
}

.nebula-flight-dash-fastener.fastener-right {
  right: 6.5%;
}

.nebula-flight-radar-module,
.nebula-flight-center-stack,
.nebula-flight-systems-stack {
  min-width: 0;
}

.nebula-flight-radar-module {
  position: relative;
  justify-self: end;
  width: clamp(112px, 13vw, 164px);
}

.nebula-flight-module-label {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 13px;
  left: 13px;
  display: flex;
  justify-content: space-between;
  color: rgba(154, 237, 223, 0.53);
  font: 700 0.5rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.11em;
}

.nebula-flight-module-label b {
  color: rgba(255, 215, 119, 0.62);
  font: inherit;
}

.nebula-flight-radar {
  position: relative;
  justify-self: end;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid #071a1a;
  border-radius: 20px;
  background:
    radial-gradient(circle, rgba(100, 255, 206, 0.08), transparent 67%),
    #03130f;
  box-shadow:
    0 0 0 2px rgba(103, 230, 208, 0.13),
    0 0 30px rgba(72, 255, 207, 0.18),
    inset 0 0 24px rgba(34, 220, 164, 0.12);
}

.nebula-flight-radar::before,
.nebula-flight-radar::after {
  position: absolute;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.nebula-flight-radar::before {
  inset: 4px;
  border: 1px solid rgba(142, 255, 225, 0.08);
  border-radius: 15px;
  background:
    radial-gradient(circle at 7px 7px, #101d1b 0 2px, rgba(146, 225, 206, 0.22) 2.2px 2.7px, transparent 3px),
    radial-gradient(circle at calc(100% - 7px) 7px, #101d1b 0 2px, rgba(146, 225, 206, 0.22) 2.2px 2.7px, transparent 3px),
    radial-gradient(circle at 7px calc(100% - 7px), #101d1b 0 2px, rgba(146, 225, 206, 0.22) 2.2px 2.7px, transparent 3px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #101d1b 0 2px, rgba(146, 225, 206, 0.22) 2.2px 2.7px, transparent 3px);
}

.nebula-flight-radar::after {
  top: 50%;
  left: 50%;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(102, 255, 209, 0.08);
  border-radius: 50%;
}

.nebula-flight-radar-grid {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(112, 255, 211, 0.24);
  border-radius: 50%;
  background:
    linear-gradient(rgba(100, 255, 213, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 255, 213, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

.nebula-flight-radar-grid::before,
.nebula-flight-radar-grid::after {
  position: absolute;
  content: "";
  background: rgba(108, 255, 212, 0.2);
}

.nebula-flight-radar-grid::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.nebula-flight-radar-grid::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.nebula-flight-radar-sweep {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 82%, rgba(88, 255, 202, 0.24) 96%, transparent 100%);
  animation: nebula-radar-sweep 3s linear infinite;
}

.nebula-flight-radar-target {
  z-index: 3;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px;
  border: 2px solid #d8fff4;
  border-radius: 50%;
  box-shadow: 0 0 10px #72ffd5;
  transition: transform 100ms linear;
}

.nebula-flight-panel-keys {
  position: absolute;
  z-index: 4;
  bottom: 10px;
  left: 50%;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.nebula-flight-panel-keys i {
  width: 22px;
  height: 6px;
  border: 1px solid rgba(121, 217, 207, 0.13);
  border-radius: 2px;
  background: linear-gradient(180deg, #0a1a19, #03100e);
  box-shadow: inset 0 1px 0 rgba(126, 255, 224, 0.05);
}

.nebula-flight-panel-keys i:nth-child(3) {
  background: linear-gradient(180deg, #342814, #161106);
}

.nebula-flight-center-stack {
  display: grid;
  align-content: center;
  gap: 7px;
}

.nebula-flight-attitude-display {
  --cockpit-bank: 0deg;
  --cockpit-pitch: 0px;
  position: relative;
  height: 48px;
  overflow: hidden;
  border: 2px solid #071a1a;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(25, 72, 91, 0.28) 0 49%, rgba(52, 37, 28, 0.22) 51% 100%),
    #031116;
  box-shadow:
    0 0 0 2px rgba(103, 230, 208, 0.09),
    inset 0 0 20px rgba(46, 179, 192, 0.09);
}

.nebula-flight-attitude-display::before {
  position: absolute;
  z-index: 2;
  top: -30px;
  left: 50%;
  width: 118px;
  height: 58px;
  content: "";
  transform: translateX(-50%);
  border: 1px dashed rgba(141, 240, 228, 0.19);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.nebula-flight-attitude-horizon {
  position: absolute;
  z-index: 1;
  top: -25px;
  right: -18px;
  bottom: -25px;
  left: -18px;
  transform: translateY(var(--cockpit-pitch)) rotate(var(--cockpit-bank));
  transition: transform 90ms linear;
}

.nebula-flight-attitude-horizon::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(132, 255, 230, 0.38);
  box-shadow: 0 -1px 8px rgba(100, 255, 224, 0.12);
}

.nebula-flight-attitude-line {
  position: absolute;
  left: 50%;
  width: 46px;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(145, 255, 232, 0.25);
}

.nebula-flight-attitude-line::after {
  position: absolute;
  top: -3px;
  right: -10px;
  content: "";
  width: 5px;
  height: 5px;
  border-top: 1px solid rgba(145, 255, 232, 0.22);
}

.nebula-flight-attitude-line.line-high {
  top: calc(50% - 12px);
}

.nebula-flight-attitude-line.line-center {
  top: 50%;
  width: 76px;
}

.nebula-flight-attitude-line.line-low {
  top: calc(50% + 12px);
}

.nebula-flight-attitude-wings {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-right: 1px solid rgba(255, 221, 123, 0.74);
  border-bottom: 1px solid rgba(255, 221, 123, 0.74);
  border-left: 1px solid rgba(255, 221, 123, 0.74);
  clip-path: polygon(0 0, 39% 0, 43% 68%, 57% 68%, 61% 0, 100% 0, 100% 25%, 64% 25%, 60% 100%, 40% 100%, 36% 25%, 0 25%);
  background: rgba(255, 218, 110, 0.38);
}

.nebula-flight-heading-readout {
  position: absolute;
  z-index: 4;
  top: 5px;
  right: 7px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #8dffdd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-shadow: 0 0 8px rgba(91, 255, 208, 0.55);
}

.nebula-flight-heading-readout small {
  color: rgba(142, 247, 224, 0.44);
  font-size: 0.42rem;
  letter-spacing: 0.1em;
}

.nebula-flight-heading-readout b {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.nebula-flight-console-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 14px 18px;
  border: 2px solid #071a1a;
  border-radius: 15px;
  color: #83ffd2;
  text-align: center;
  background:
    linear-gradient(rgba(87, 255, 206, 0.06) 1px, transparent 1px),
    #03120f;
  background-size: 100% 8px;
  box-shadow:
    0 0 0 2px rgba(103, 230, 208, 0.12),
    inset 0 0 24px rgba(34, 220, 164, 0.1);
  text-shadow: 0 0 10px rgba(91, 255, 208, 0.62);
}

.nebula-flight-console-copy span,
.nebula-flight-console-copy i {
  font: 700 0.65rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em;
}

.nebula-flight-console-copy strong {
  font: 850 clamp(1rem, 1.8vw, 1.45rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nebula-flight-console-copy i {
  color: rgba(131, 255, 210, 0.54);
  font-style: normal;
}

.nebula-flight-console-lights {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.nebula-flight-console-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #63f4c8;
  box-shadow: 0 0 12px rgba(85, 255, 207, 0.55);
}

.nebula-flight-console-lights i:nth-child(2n) {
  background: #ffd568;
  box-shadow: 0 0 12px rgba(255, 214, 103, 0.48);
}

.nebula-flight-systems-stack {
  display: grid;
  grid-template-columns: minmax(116px, 1fr) 38px;
  align-items: stretch;
  gap: 9px;
}

.nebula-flight-systems-panel {
  display: grid;
  align-content: center;
  gap: 9px;
  min-height: 116px;
  padding: 12px;
  border: 2px solid #071517;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(89, 223, 205, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(89, 223, 205, 0.025) 1px, transparent 1px),
    #050d0f;
  background-size: 9px 9px;
  box-shadow:
    0 0 0 2px rgba(97, 213, 197, 0.07),
    inset 0 0 22px rgba(44, 185, 166, 0.055);
}

.nebula-flight-systems-title {
  display: grid;
  gap: 3px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(115, 222, 208, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
}

.nebula-flight-systems-title span {
  color: rgba(174, 236, 228, 0.43);
  font-size: 0.5rem;
}

.nebula-flight-systems-title b {
  color: #75f2cd;
  font-size: 0.56rem;
  text-shadow: 0 0 9px rgba(94, 243, 205, 0.42);
}

.nebula-flight-systems-stack[data-alert="shield"] .nebula-flight-systems-title b {
  color: #ffbd74;
  text-shadow: 0 0 9px rgba(255, 145, 71, 0.48);
}

.nebula-flight-systems-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

.nebula-flight-systems-grid span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(184, 235, 228, 0.5);
  font: 700 0.47rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}

.nebula-flight-systems-grid i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5ce5bb;
  box-shadow: 0 0 6px rgba(77, 232, 187, 0.52);
}

.nebula-flight-systems-stack[data-alert="shield"] .nebula-flight-systems-grid span:first-child i {
  background: #ffae60;
  box-shadow: 0 0 7px rgba(255, 136, 64, 0.58);
}

.nebula-flight-systems-panel .nebula-flight-console-lights {
  justify-content: flex-start;
  gap: 7px;
}

.nebula-flight-systems-panel .nebula-flight-console-lights i {
  width: 7px;
  height: 7px;
}

.nebula-flight-throttle {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 5px;
  min-width: 38px;
  padding: 8px 5px 7px;
  border: 1px solid rgba(102, 201, 200, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, #081215, #020708);
  box-shadow: inset 0 0 13px rgba(81, 191, 190, 0.045);
}

.nebula-flight-throttle-slot {
  position: relative;
  width: 12px;
  height: 62px;
  border: 1px solid #0c2425;
  border-radius: 999px;
  background: #000304;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.9);
}

.nebula-flight-throttle-slot::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 50%;
  width: 1px;
  content: "";
  transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, rgba(113, 219, 211, 0.23) 0 2px, transparent 2px 7px);
}

.nebula-flight-throttle-slot i {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 50%;
  width: 22px;
  height: 12px;
  transform: translate(-50%, var(--throttle-y));
  border: 1px solid rgba(143, 224, 218, 0.17);
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #26373a, #071012 72%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.64);
  transition: transform 90ms linear;
}

.nebula-flight-throttle > b,
.nebula-flight-throttle > small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1;
  letter-spacing: 0.06em;
}

.nebula-flight-throttle > b {
  color: rgba(115, 255, 217, 0.78);
  font-size: 0.43rem;
}

.nebula-flight-throttle > small {
  color: rgba(164, 221, 216, 0.34);
  font-size: 0.39rem;
}

.nebula-flight-status {
  position: absolute;
  z-index: 14;
  right: 20%;
  bottom: clamp(170px, 21vh, 228px);
  left: 20%;
  min-height: 38px;
  margin: 0;
  padding: 9px 18px;
  border: 1px solid rgba(103, 245, 222, 0.3);
  border-radius: 999px;
  color: #c9fff4;
  font: 750 0.78rem/1.3 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  background: rgba(2, 13, 22, 0.72);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.nebula-flight-touch-controls {
  position: absolute;
  z-index: 20;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: none;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.nebula-flight-steer-pad,
.nebula-flight-action-pad {
  display: grid;
  gap: 6px;
  pointer-events: auto;
}

.nebula-flight-steer-pad {
  grid-template-columns: repeat(3, 58px);
  grid-template-rows: repeat(2, 56px);
}

.nebula-flight-steer-pad button:nth-child(1) {
  grid-column: 2;
}

.nebula-flight-steer-pad button:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.nebula-flight-steer-pad button:nth-child(3) {
  grid-column: 3;
  grid-row: 2;
}

.nebula-flight-steer-pad button:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

.nebula-flight-action-pad {
  grid-template-columns: repeat(2, minmax(72px, 96px));
}

.nebula-flight-touch-controls button {
  min-width: 56px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(142, 255, 241, 0.46);
  border-radius: 18px;
  color: #eafffb;
  font: 800 0.74rem/1 system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(150deg, rgba(12, 39, 49, 0.9), rgba(3, 9, 19, 0.91));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    inset 0 0 14px rgba(87, 255, 226, 0.07);
  backdrop-filter: blur(12px);
  touch-action: none;
}

.nebula-flight-action-pad button {
  min-height: 68px;
}

.nebula-flight-touch-controls button.boost {
  border-color: rgba(238, 126, 255, 0.56);
  background: linear-gradient(150deg, rgba(77, 28, 93, 0.92), rgba(17, 7, 31, 0.92));
}

.nebula-flight-touch-controls button:active {
  transform: translateY(2px) scale(0.97);
  filter: brightness(1.28);
}

.nebula-flight-overlay {
  position: absolute;
  z-index: 34;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(76px, calc(env(safe-area-inset-top) + 64px)) 18px max(22px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 40%, rgba(31, 80, 116, 0.16), rgba(0, 2, 8, 0.7) 70%),
    rgba(0, 2, 8, 0.42);
  backdrop-filter: blur(5px);
}

.nebula-flight-card {
  width: min(620px, 100%);
  max-height: calc(100svh - 108px);
  overflow: auto;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(126, 255, 239, 0.46);
  border-radius: 32px;
  color: #efffff;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(5, 28, 42, 0.94), rgba(9, 7, 28, 0.95)),
    #030b14;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.62),
    inset 0 0 54px rgba(74, 255, 223, 0.055);
}

.nebula-flight-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #87ffe8;
  font: 850 0.72rem/1 system-ui, sans-serif;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.nebula-flight-card h1,
.nebula-flight-card h2 {
  margin: 0;
  color: #f5ffff;
  font: 900 clamp(2.25rem, 7vw, 4.6rem)/0.98 system-ui, sans-serif;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 0 34px rgba(103, 234, 255, 0.22);
}

.nebula-flight-card h2 {
  font-size: clamp(2.1rem, 6vw, 3.9rem);
}

.nebula-flight-card > p {
  max-width: 48ch;
  margin: 18px auto 22px;
  color: rgba(227, 248, 255, 0.82);
  font: 650 clamp(1rem, 2.1vw, 1.18rem)/1.55 system-ui, sans-serif;
}

.nebula-flight-instructions {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
  gap: 8px;
  margin: 0 auto 24px;
}

.nebula-flight-instructions span {
  display: grid;
  gap: 4px;
  min-height: 68px;
  place-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(120, 237, 231, 0.2);
  border-radius: 16px;
  color: rgba(219, 249, 250, 0.75);
  font: 650 0.75rem/1.35 system-ui, sans-serif;
  background: rgba(3, 16, 27, 0.66);
}

.nebula-flight-instructions b {
  color: #9affe8;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nebula-flight-card > button,
.nebula-flight-complete-actions button {
  min-width: 184px;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid rgba(145, 255, 238, 0.74);
  border-radius: 18px;
  color: #041414;
  font: 900 0.92rem/1 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #78ffe7, #67dfff);
  box-shadow: 0 14px 36px rgba(77, 235, 235, 0.25);
}

.nebula-flight-card > button:hover,
.nebula-flight-card > button:focus-visible,
.nebula-flight-complete-actions button:hover,
.nebula-flight-complete-actions button:focus-visible {
  outline: 3px solid rgba(139, 255, 241, 0.34);
  outline-offset: 4px;
  filter: brightness(1.08);
}

.nebula-flight-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.nebula-flight-complete-actions button.secondary {
  color: #dffffa;
  background: rgba(6, 19, 31, 0.82);
}

@keyframes nebula-radar-sweep {
  to { transform: rotate(360deg); }
}

@media (hover: none), (pointer: coarse) {
  .nebula-flight-level[data-flight-phase="flying"] .nebula-flight-touch-controls {
    display: flex;
  }

  .nebula-flight-canvas {
    cursor: default;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .nebula-flight-dashboard {
    grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr) minmax(120px, 0.7fr);
    gap: 14px;
    padding-right: 36px;
    padding-left: 36px;
  }

  .nebula-flight-systems-stack {
    grid-template-columns: 1fr;
  }

  .nebula-flight-throttle {
    display: none;
  }

  .nebula-flight-systems-panel {
    min-height: 104px;
    padding: 9px;
  }
}

@media (max-width: 760px) {
  .nebula-flight-back {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    min-width: 76px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.72rem;
  }

  .nebula-flight-hud {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    left: max(98px, calc(env(safe-area-inset-left) + 94px));
    gap: 7px;
  }

  .nebula-flight-progress-panel {
    min-width: 88px;
    padding: 8px 9px;
    border-radius: 14px;
  }

  .nebula-flight-progress-panel span,
  .nebula-flight-meter-row span {
    font-size: 0.56rem;
  }

  .nebula-flight-progress-panel strong {
    font-size: 1rem;
  }

  .nebula-flight-meter-panel {
    gap: 6px;
    width: min(170px, 45vw);
    padding: 9px;
    border-radius: 14px;
  }

  .nebula-flight-meter-row {
    grid-template-columns: 42px 1fr;
    gap: 5px;
  }

  .nebula-flight-reticle {
    top: 42%;
    width: 48px;
    height: 48px;
  }

  .nebula-flight-reticle::before {
    width: 66px;
  }

  .nebula-flight-reticle::after {
    height: 66px;
  }

  .nebula-flight-glass {
    inset: 54px 11vw 132px;
    opacity: 0.28;
  }

  .nebula-flight-canopy-etch,
  .nebula-flight-canopy-arch,
  .nebula-flight-overhead-panel,
  .nebula-flight-canopy > b {
    display: none;
  }

  .nebula-flight-frame-rivets {
    opacity: 0.3;
    background-size: 6px 38px;
  }

  .nebula-flight-canopy.canopy-left,
  .nebula-flight-canopy.canopy-right {
    width: clamp(54px, 14vw, 84px);
    bottom: 13vh;
  }

  .nebula-flight-canopy.canopy-top {
    right: 10vw;
    left: 10vw;
    height: 48px;
  }

  .nebula-flight-dashboard {
    right: -8vw;
    bottom: -22px;
    left: -8vw;
    grid-template-columns: 94px minmax(108px, 1fr) 76px;
    gap: 10px;
    min-height: 146px;
    padding: 17px 13vw 34px;
    border-radius: 42% 42% 0 0 / 24% 24% 0 0;
  }

  .nebula-flight-dashboard::before {
    top: -4px;
    height: 8px;
  }

  .nebula-flight-dashboard::after {
    inset: 8px 4% 0;
  }

  .nebula-flight-dash-stitch {
    top: 9px;
  }

  .nebula-flight-dash-fastener,
  .nebula-flight-module-label,
  .nebula-flight-panel-keys {
    display: none;
  }

  .nebula-flight-radar-module {
    justify-self: center;
    width: 86px;
  }

  .nebula-flight-radar {
    justify-self: center;
    width: 86px;
    border-radius: 13px;
  }

  .nebula-flight-radar-grid,
  .nebula-flight-radar-sweep {
    inset: 7px;
  }

  .nebula-flight-radar::before {
    inset: 3px;
    border-radius: 10px;
  }

  .nebula-flight-center-stack {
    gap: 4px;
  }

  .nebula-flight-attitude-display {
    height: 32px;
    border-radius: 8px;
  }

  .nebula-flight-attitude-display::before {
    top: -37px;
  }

  .nebula-flight-heading-readout {
    top: 4px;
    right: 5px;
  }

  .nebula-flight-heading-readout small {
    display: none;
  }

  .nebula-flight-heading-readout b {
    font-size: 0.52rem;
  }

  .nebula-flight-console-copy {
    gap: 3px;
    min-height: 70px;
    padding: 8px;
    border-radius: 11px;
  }

  .nebula-flight-console-copy strong {
    font-size: 0.85rem;
  }

  .nebula-flight-console-copy span,
  .nebula-flight-console-copy i {
    font-size: 0.52rem;
  }

  .nebula-flight-systems-stack {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .nebula-flight-systems-panel {
    gap: 7px;
    min-height: 70px;
    padding: 7px 6px;
    border-radius: 9px;
  }

  .nebula-flight-systems-title {
    padding-bottom: 5px;
    text-align: center;
  }

  .nebula-flight-systems-title span {
    font-size: 0.45rem;
    letter-spacing: 0.07em;
  }

  .nebula-flight-systems-title b,
  .nebula-flight-systems-grid,
  .nebula-flight-throttle {
    display: none;
  }

  .nebula-flight-systems-panel .nebula-flight-console-lights {
    justify-content: center;
  }

  .nebula-flight-console-lights {
    gap: 5px;
  }

  .nebula-flight-console-lights i {
    width: 7px;
    height: 7px;
  }

  .nebula-flight-status {
    right: 12px;
    bottom: 150px;
    left: 12px;
    min-height: 32px;
    padding: 7px 10px;
    font-size: 0.64rem;
  }

  .nebula-flight-steer-pad {
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(2, 48px);
  }

  .nebula-flight-touch-controls button {
    min-width: 48px;
    min-height: 48px;
    border-radius: 15px;
    font-size: 0.62rem;
  }

  .nebula-flight-action-pad {
    grid-template-columns: repeat(2, minmax(62px, 76px));
  }

  .nebula-flight-action-pad button {
    min-height: 58px;
  }

  .nebula-flight-overlay {
    padding: max(66px, calc(env(safe-area-inset-top) + 58px)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .nebula-flight-card {
    max-height: calc(100svh - 82px);
    padding: 22px 18px;
    border-radius: 24px;
  }

  .nebula-flight-card h1,
  .nebula-flight-card h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .nebula-flight-card > p {
    margin: 14px auto 17px;
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .nebula-flight-instructions {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
  }

  .nebula-flight-instructions span:first-child {
    grid-column: 1 / -1;
  }

  .nebula-flight-instructions span {
    min-height: 54px;
    padding: 7px 9px;
  }

  .nebula-flight-card > button,
  .nebula-flight-complete-actions button {
    min-width: 150px;
    min-height: 52px;
  }
}

@media (max-width: 430px) {
  .nebula-flight-touch-controls {
    right: max(8px, env(safe-area-inset-right));
    left: max(8px, env(safe-area-inset-left));
    gap: 8px;
  }

  .nebula-flight-meter-panel {
    width: min(150px, 42vw);
  }

  .nebula-flight-attitude-display {
    height: 28px;
  }

  .nebula-flight-attitude-wings {
    width: 44px;
  }

  .nebula-flight-console-copy i {
    display: none;
  }

  .nebula-flight-steer-pad {
    grid-template-columns: repeat(3, 46px);
    grid-template-rows: repeat(2, 46px);
  }

  .nebula-flight-touch-controls button {
    min-width: 46px;
    min-height: 46px;
    padding: 5px;
  }

  .nebula-flight-action-pad {
    grid-template-columns: repeat(2, 62px);
  }

  .nebula-flight-action-pad button {
    min-height: 56px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .nebula-flight-dashboard {
    min-height: 124px;
    padding-top: 14px;
    padding-bottom: 30px;
  }

  .nebula-flight-overhead-panel,
  .nebula-flight-module-label,
  .nebula-flight-panel-keys,
  .nebula-flight-throttle,
  .nebula-flight-systems-grid {
    display: none;
  }

  .nebula-flight-canopy-arch {
    top: 18px;
    height: 76px;
  }

  .nebula-flight-attitude-display {
    height: 30px;
  }

  .nebula-flight-console-copy {
    min-height: 62px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .nebula-flight-systems-stack {
    grid-template-columns: 1fr;
  }

  .nebula-flight-systems-panel {
    gap: 5px;
    min-height: 76px;
    padding: 7px;
  }

  .nebula-flight-radar {
    width: 82px;
  }

  .nebula-flight-status {
    bottom: 126px;
  }

  .nebula-flight-card {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .nebula-flight-card > p {
    margin: 10px auto;
  }

  .nebula-flight-instructions {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nebula-flight-radar-sweep {
    animation: none;
    opacity: 0.42;
  }

  .nebula-flight-radar-target,
  .nebula-flight-attitude-horizon,
  .nebula-flight-throttle-slot i,
  .nebula-flight-touch-controls button {
    transition: none;
  }
}

/* Modern blue cockpit visibility pass. Geometry stays fixed; materials carry the light. */
.nebula-flight-level::before {
  background:
    radial-gradient(circle at 50% 44%, transparent 33%, rgba(0, 8, 28, 0.08) 70%, rgba(0, 3, 15, 0.57) 100%),
    linear-gradient(180deg, rgba(9, 24, 52, 0.025), rgba(2, 10, 28, 0.2));
}

.nebula-flight-back,
.nebula-flight-progress-panel,
.nebula-flight-meter-panel {
  border-color: rgba(129, 229, 244, 0.54);
  background:
    radial-gradient(circle at 50% 0, rgba(83, 195, 228, 0.13), transparent 62%),
    linear-gradient(145deg, rgba(13, 54, 72, 0.94), rgba(5, 18, 37, 0.94));
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(218, 252, 255, 0.11),
    inset 0 0 24px rgba(73, 211, 239, 0.085);
}

.nebula-flight-canopy {
  background:
    linear-gradient(90deg, rgba(2, 7, 12, 0.99), rgba(9, 28, 38, 0.98) 58%, rgba(24, 53, 65, 0.96));
  box-shadow:
    inset 0 0 30px rgba(111, 226, 240, 0.085),
    0 0 28px rgba(0, 0, 0, 0.88);
}

.nebula-flight-canopy.canopy-left {
  border-right-color: rgba(127, 224, 235, 0.32);
}

.nebula-flight-canopy.canopy-right {
  border-left-color: rgba(127, 224, 235, 0.32);
}

.nebula-flight-canopy.canopy-top {
  border-bottom-color: rgba(127, 224, 235, 0.28);
}

.nebula-flight-frame-rivets {
  opacity: 0.76;
}

.nebula-flight-canopy > b {
  color: rgba(151, 228, 238, 0.43);
}

.nebula-flight-canopy-arch {
  border-color: rgba(5, 18, 27, 0.985);
  box-shadow:
    inset 0 4px 0 rgba(155, 235, 242, 0.11),
    0 -2px 0 rgba(103, 216, 230, 0.17),
    0 8px 32px rgba(0, 0, 0, 0.66);
}

.nebula-flight-overhead-panel {
  border-color: rgba(126, 225, 235, 0.29);
  background:
    linear-gradient(90deg, transparent 49%, rgba(103, 213, 227, 0.09) 50%, transparent 51%),
    linear-gradient(180deg, #17323e, #091b25);
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.53),
    inset 0 -1px 0 rgba(191, 247, 250, 0.13),
    inset 0 12px 30px rgba(81, 185, 215, 0.065);
}

.nebula-flight-overhead-copy span {
  color: rgba(211, 247, 250, 0.65);
}

.nebula-flight-overhead-copy strong {
  color: #9effe9;
}

.nebula-flight-overhead-switches {
  border-top-color: rgba(166, 231, 238, 0.17);
}

.nebula-flight-overhead-switches i {
  border-color: rgba(171, 232, 238, 0.26);
  background: #102b34;
  box-shadow: inset 8px 0 0 rgba(97, 220, 226, 0.34);
}

.nebula-flight-dashboard {
  border-color: rgba(122, 219, 234, 0.46);
  background:
    radial-gradient(ellipse at 50% -8%, rgba(75, 185, 223, 0.23), transparent 54%),
    linear-gradient(180deg, rgba(25, 59, 72, 0.99), rgba(12, 34, 45, 0.995) 48%, rgba(5, 18, 28, 0.998)),
    #0c2732;
  box-shadow:
    0 -20px 58px rgba(0, 0, 0, 0.63),
    0 -8px 36px rgba(35, 155, 199, 0.13),
    inset 0 2px 0 rgba(215, 250, 253, 0.14),
    inset 0 24px 68px rgba(62, 167, 194, 0.13);
}

.nebula-flight-dashboard::before {
  border-color: rgba(151, 231, 240, 0.42);
  background: linear-gradient(180deg, #315f6d, #173947 48%, #0a202b);
  box-shadow:
    0 -9px 24px rgba(0, 0, 0, 0.63),
    0 -2px 10px rgba(99, 221, 236, 0.12),
    inset 0 2px 0 rgba(222, 253, 255, 0.15);
}

.nebula-flight-dashboard::after {
  border-color: rgba(142, 219, 228, 0.13);
  background-image: repeating-linear-gradient(112deg, transparent 0 13px, rgba(151, 224, 231, 0.042) 13px 14px);
}

.nebula-flight-dash-stitch {
  opacity: 0.9;
  background: repeating-linear-gradient(90deg, rgba(161, 229, 235, 0.31) 0 6px, transparent 6px 18px);
}

.nebula-flight-dash-fastener,
.nebula-flight-canopy-arch .arch-fastener {
  border-color: rgba(170, 231, 236, 0.31);
  background:
    linear-gradient(45deg, transparent 44%, rgba(225, 249, 250, 0.38) 45% 55%, transparent 56%),
    #17343d;
}

.nebula-flight-module-label {
  color: rgba(186, 244, 240, 0.8);
  text-shadow: 0 0 8px rgba(97, 240, 225, 0.28);
}

.nebula-flight-module-label b {
  color: #ffd978;
}

.nebula-flight-radar {
  border-color: #183f4a;
  background:
    radial-gradient(circle, rgba(74, 225, 218, 0.16), transparent 67%),
    linear-gradient(180deg, rgba(18, 72, 82, 0.48), rgba(5, 35, 45, 0.92)),
    #082a33;
  box-shadow:
    0 0 0 2px rgba(112, 234, 220, 0.29),
    0 0 32px rgba(69, 226, 217, 0.2),
    inset 0 0 28px rgba(45, 229, 191, 0.17),
    inset 0 1px 0 rgba(216, 255, 250, 0.12);
}

.nebula-flight-radar-grid {
  border-color: rgba(130, 255, 224, 0.4);
  background:
    linear-gradient(rgba(114, 255, 221, 0.27) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 255, 221, 0.27) 1px, transparent 1px);
  background-size: 18px 18px;
}

.nebula-flight-radar-grid::before,
.nebula-flight-radar-grid::after {
  background: rgba(127, 255, 224, 0.38);
}

.nebula-flight-radar-sweep {
  background: conic-gradient(from 0deg, transparent 0 81%, rgba(96, 255, 216, 0.34) 96%, transparent 100%);
}

.nebula-flight-panel-keys i {
  border-color: rgba(144, 232, 225, 0.29);
  background: linear-gradient(180deg, #183e42, #09252a);
}

.nebula-flight-attitude-display {
  border-color: #173e4c;
  background:
    linear-gradient(180deg, rgba(38, 142, 197, 0.53) 0 48%, rgba(116, 79, 48, 0.43) 52% 100%),
    #092634;
  box-shadow:
    0 0 0 2px rgba(108, 225, 222, 0.23),
    0 0 20px rgba(71, 196, 229, 0.12),
    inset 0 0 22px rgba(78, 210, 224, 0.17);
}

.nebula-flight-attitude-horizon::before {
  background: rgba(175, 255, 237, 0.68);
}

.nebula-flight-attitude-line {
  background: rgba(179, 255, 239, 0.55);
}

.nebula-flight-attitude-line::after {
  border-top-color: rgba(179, 255, 239, 0.49);
}

.nebula-flight-heading-readout {
  color: #c8fff4;
}

.nebula-flight-heading-readout small {
  color: rgba(185, 246, 240, 0.72);
}

.nebula-flight-console-copy {
  border-color: #174552;
  color: #b8faff;
  background:
    radial-gradient(ellipse at 50% 0, rgba(70, 206, 232, 0.16), transparent 64%),
    linear-gradient(rgba(91, 224, 238, 0.095) 1px, transparent 1px),
    #082a35;
  background-size: 100% 100%, 100% 8px, 100% 100%;
  box-shadow:
    0 0 0 2px rgba(101, 224, 226, 0.24),
    0 0 24px rgba(59, 202, 226, 0.13),
    inset 0 0 26px rgba(52, 216, 216, 0.15),
    inset 0 1px 0 rgba(213, 252, 253, 0.11);
  text-shadow: 0 0 10px rgba(88, 237, 237, 0.57);
}

.nebula-flight-console-copy span {
  color: #a9edf7;
}

.nebula-flight-console-copy strong {
  color: #efffff;
  text-shadow: 0 0 13px rgba(94, 240, 239, 0.7);
}

.nebula-flight-console-copy i {
  color: rgba(126, 215, 235, 0.78);
}

.nebula-flight-systems-panel {
  border-color: #183f49;
  background:
    radial-gradient(ellipse at 50% 0, rgba(65, 198, 217, 0.13), transparent 66%),
    linear-gradient(90deg, rgba(110, 232, 227, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(110, 232, 227, 0.055) 1px, transparent 1px),
    #0a2932;
  background-size: 100% 100%, 9px 9px, 9px 9px, 100% 100%;
  box-shadow:
    0 0 0 2px rgba(105, 222, 214, 0.22),
    0 0 22px rgba(55, 204, 204, 0.11),
    inset 0 0 24px rgba(63, 213, 194, 0.12),
    inset 0 1px 0 rgba(220, 254, 252, 0.1);
}

.nebula-flight-systems-title {
  border-bottom-color: rgba(145, 233, 226, 0.24);
}

.nebula-flight-systems-title span {
  color: rgba(213, 247, 244, 0.72);
}

.nebula-flight-systems-title b {
  color: #92ffe4;
}

.nebula-flight-systems-grid span {
  color: rgba(214, 245, 241, 0.7);
}

.nebula-flight-systems-grid i,
.nebula-flight-console-lights i {
  background: #76f2d8;
  box-shadow: 0 0 8px rgba(84, 244, 211, 0.62);
}

.nebula-flight-throttle {
  border-color: rgba(127, 222, 226, 0.3);
  background: linear-gradient(180deg, #173740, #091c24);
  box-shadow:
    inset 0 1px 0 rgba(215, 250, 250, 0.1),
    inset 0 0 16px rgba(78, 201, 202, 0.09);
}

.nebula-flight-throttle-slot {
  border-color: #1b4a4d;
  background: #02090c;
}

.nebula-flight-throttle-slot i {
  border-color: rgba(206, 245, 244, 0.41);
  background: linear-gradient(180deg, #d1e7e8, #5b7880 42%, #173038 75%);
  box-shadow:
    0 3px 7px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.nebula-flight-throttle > b {
  color: #a3ffe7;
}

.nebula-flight-status {
  border-color: rgba(120, 231, 231, 0.51);
  color: #e9fffd;
  background: rgba(5, 30, 45, 0.9);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(210, 253, 253, 0.09),
    0 0 18px rgba(57, 207, 222, 0.08);
}

.nebula-flight-touch-controls button {
  border-color: rgba(151, 242, 239, 0.68);
  background: linear-gradient(150deg, rgba(18, 63, 76, 0.97), rgba(5, 20, 34, 0.98));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(218, 253, 252, 0.1),
    inset 0 0 16px rgba(86, 235, 225, 0.11);
}

.nebula-flight-touch-controls button.boost {
  border-color: rgba(236, 151, 255, 0.72);
  background: linear-gradient(150deg, rgba(83, 36, 108, 0.98), rgba(25, 10, 43, 0.98));
}

@media (max-width: 760px) {
  .nebula-flight-dashboard {
    min-height: 176px;
  }

  .nebula-flight-radar-module,
  .nebula-flight-center-stack,
  .nebula-flight-systems-stack {
    transform: translateY(-28px);
  }

  .nebula-flight-status {
    bottom: 178px;
  }

  .nebula-flight-console-copy strong {
    font-size: 0.92rem;
  }

  .nebula-flight-touch-controls button {
    background: linear-gradient(150deg, rgba(17, 58, 70, 0.985), rgba(4, 17, 30, 0.99));
  }

  .nebula-flight-touch-controls button.boost {
    background: linear-gradient(150deg, rgba(79, 32, 102, 0.99), rgba(22, 8, 39, 0.99));
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .nebula-flight-dashboard {
    min-height: 132px;
  }

  .nebula-flight-radar-module,
  .nebula-flight-center-stack,
  .nebula-flight-systems-stack {
    transform: translateY(-4px);
  }

  .nebula-flight-status {
    bottom: 148px;
  }
}
