/* ---------- Mars Rover level ---------- */
.mars-rover-level {
  --mars-panel: rgba(29, 12, 10, 0.7);
  --mars-border: rgba(255, 201, 142, 0.24);
  --mars-gold: #ffd36f;
  --mars-orange: #ff8d4d;
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  color: #fff7df;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 214, 160, 0.18), transparent 30%),
    linear-gradient(180deg, #1a1015 0%, #3b2119 46%, #7a452f 100%);
}
.mars-rover-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mars-rover-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.mars-rover-3d::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 206, 150, 0.1), transparent 28%),
    linear-gradient(0deg, rgba(138, 52, 30, 0.18), transparent 34%),
    radial-gradient(ellipse at 50% 61%, rgba(255, 178, 105, 0.1), transparent 41%),
    radial-gradient(circle at 78% 22%, rgba(255, 211, 154, 0.18), transparent 28%),
    radial-gradient(ellipse at 50% 82%, transparent 42%, rgba(30, 10, 8, 0.18) 100%);
}
.mars-rover-3d.storming::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(255, 197, 128, 0.22) 32%, transparent 48%),
    rgba(166, 76, 34, 0.16);
  animation: mars-storm-flash 1.1s ease-in-out infinite alternate;
}
.mars-rover-wind-cues {
  position: fixed;
  inset: 0;
  z-index: 36;
  pointer-events: none;
  overflow: hidden;
}
.mars-rover-wind-cues i {
  position: absolute;
  left: -12vw;
  display: block;
  color: rgba(255, 224, 176, 0.74);
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 0 18px rgba(255, 169, 92, 0.34),
    0 5px 12px rgba(59, 24, 12, 0.46);
  animation: mars-wind-cue-sweep 3.8s linear infinite;
}
.mars-rover-stars {
  position: fixed;
  inset: 0 0 42vh;
  z-index: 35;
  overflow: hidden;
  pointer-events: none;
}
.mars-rover-stars i {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 238, 205, 0.58);
  box-shadow: 0 0 4px rgba(255, 212, 150, 0.22);
  animation: mars-star-twinkle 4.8s ease-in-out infinite;
}
@keyframes mars-wind-cue-sweep {
  0% {
    translate: -8vw 0;
    opacity: 0;
  }
  12% {
    opacity: 0.75;
  }
  100% {
    translate: 128vw -8vh;
    opacity: 0;
  }
}
@keyframes mars-collect-pop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes mars-dex-scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  24% {
    opacity: 0.65;
  }
  100% {
    transform: translateY(290%);
    opacity: 0;
  }
}

/* ---------- Mars City Builder level ---------- */
.mars-city-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  color: #fff6df;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 225, 158, 0.28), transparent 18%),
    linear-gradient(180deg, #20131b 0%, #4d261e 46%, #9b4f31 100%);
}
.mars-city-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mars-city-sky span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 223, 164, 0.36);
  box-shadow: 0 0 24px rgba(255, 190, 111, 0.24);
}
.mars-city-sky span:nth-child(1) {
  width: 180px;
  height: 18px;
  left: 12%;
  top: 21%;
}
.mars-city-sky span:nth-child(2) {
  width: 260px;
  height: 22px;
  right: 10%;
  top: 34%;
}
.mars-city-sky span:nth-child(3) {
  width: 140px;
  height: 16px;
  left: 48%;
  top: 18%;
}
.mars-city-command {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 20px 12px;
}
.mars-city-command h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}
.mars-city-command p {
  margin: 6px 0 0;
  max-width: 760px;
  color: rgba(255, 246, 223, 0.82);
  font-size: 1rem;
}
.mars-city-kicker {
  font-weight: 900;
  text-transform: uppercase;
}
.mars-city-exit,
.mars-city-score,
.mars-city-budget,
.mars-city-panel,
.mars-city-tool,
.mars-city-actions button {
  border: 1px solid rgba(255, 216, 156, 0.28);
  color: #fff6df;
  background: rgba(36, 16, 14, 0.72);
  box-shadow: 0 16px 34px rgba(55, 20, 12, 0.26);
}
.mars-city-exit,
.mars-city-actions button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
}
.mars-city-score {
  min-width: 104px;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}
.mars-city-budget {
  min-width: 94px;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}
.mars-city-score strong,
.mars-city-score span,
.mars-city-budget strong,
.mars-city-budget span {
  display: block;
}
.mars-city-score strong,
.mars-city-budget strong {
  font-size: 1.45rem;
}
.mars-city-score span,
.mars-city-budget span {
  color: rgba(255, 246, 223, 0.72);
  font-weight: 800;
}
.mars-city-play {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(320px, 1fr) minmax(210px, 280px);
  gap: 16px;
  align-items: stretch;
  height: calc(100vh - 122px);
  padding: 0 20px 20px;
}
.mars-city-tools {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}
.mars-city-tool {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-height: 58px;
  border-radius: 8px;
  padding: 9px;
  text-align: left;
}
.mars-city-tool.selected {
  border-color: rgba(143, 234, 255, 0.74);
  background: rgba(31, 67, 74, 0.72);
}
.mars-city-tool b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 214, 139, 0.22);
  font-size: 1.05rem;
}
.mars-city-tool span {
  font-weight: 900;
}
.mars-city-tool small {
  color: rgba(255, 246, 223, 0.72);
  font-size: 0.76rem;
}
.mars-city-board-wrap {
  display: grid;
  place-items: center;
  min-height: 0;
}
.mars-city-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(34px, 1fr));
  grid-template-rows: repeat(6, minmax(34px, 1fr));
  gap: 8px;
  width: min(100%, 760px);
  aspect-ratio: 8 / 6;
  padding: 14px;
  border: 2px solid rgba(255, 218, 158, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(255, 218, 156, 0.12), transparent 34%),
    repeating-linear-gradient(35deg, rgba(95, 40, 23, 0.42) 0 18px, rgba(129, 59, 33, 0.34) 18px 36px);
  box-shadow: inset 0 0 42px rgba(53, 20, 12, 0.44), 0 24px 64px rgba(54, 19, 13, 0.38);
}
.mars-city-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 225, 174, 0.22);
  border-radius: 7px;
  background: rgba(117, 58, 36, 0.58);
}
.mars-city-cell:focus-visible,
.mars-city-tool:focus-visible,
.mars-city-map-controls button:focus-visible,
.mars-city-exit:focus-visible,
.mars-city-mayor-choices button:focus-visible,
.mars-city-actions button:focus-visible {
  outline: 3px solid #8feaff;
  outline-offset: 2px;
}
.mars-city-building {
  display: grid;
  place-items: center;
  width: min(78%, 64px);
  aspect-ratio: 1;
  border-radius: 8px;
  font-weight: 1000;
  font-size: clamp(1rem, 3vw, 1.8rem);
  color: #1c1112;
  box-shadow: 0 9px 0 rgba(64, 23, 13, 0.28);
}
.mars-city-cell.has-hab .mars-city-building {
  background: linear-gradient(180deg, #ffe4ad, #f09b63);
}
.mars-city-cell.has-solar .mars-city-building {
  background: linear-gradient(180deg, #8feaff, #315a9b);
  color: #f6fbff;
}
.mars-city-cell.has-greenhouse .mars-city-building {
  background: linear-gradient(180deg, #b7f5b1, #32976b);
}
.mars-city-cell.has-water .mars-city-building {
  background: linear-gradient(180deg, #d7f7ff, #61b8df);
}
.mars-city-cell.has-road .mars-city-building {
  background: linear-gradient(180deg, #cab095, #6d5b51);
  color: #fff4dc;
}
.mars-city-empty {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(255, 231, 190, 0.38);
}
.mars-city-panel {
  position: relative;
  z-index: 4;
  border-radius: 8px;
  padding: 16px;
  min-height: 0;
  overflow: auto;
}
.mars-city-panel h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}
.mars-city-panel p {
  color: rgba(255, 246, 223, 0.82);
  line-height: 1.45;
}
.mars-city-storyline {
  margin-top: 8px;
  color: rgba(255, 226, 183, 0.88);
  font-weight: 800;
}
.mars-city-mayor-need {
  margin: 8px 0 0;
  border-left: 4px solid #8feaff;
  padding: 8px 10px;
  background: rgba(143, 234, 255, 0.1);
  color: #eaffff;
  font-weight: 900;
}
.mars-city-listen {
  min-height: 42px;
  border: 1px solid rgba(143, 234, 255, 0.34);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(19, 55, 64, 0.62);
  color: #f3ffff;
  font-weight: 900;
}
.mars-city-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mars-city-budget-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}
.mars-city-budget-row span {
  display: block;
  min-width: 0;
  border: 1px solid rgba(183, 245, 177, 0.22);
  border-radius: 7px;
  padding: 8px;
  background: rgba(40, 78, 54, 0.34);
  color: #eaffda;
  font-size: 0.72rem;
  font-weight: 1000;
  line-height: 1.15;
  text-align: center;
}
.mars-city-mission-card {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  border: 1px solid rgba(143, 234, 255, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(18, 45, 52, 0.5);
}
.mars-city-mission-card strong,
.mars-city-mission-card span,
.mars-city-mission-card small {
  display: block;
  min-width: 0;
}
.mars-city-mission-card strong {
  color: #f3ffff;
  font-size: 0.9rem;
  line-height: 1.15;
}
.mars-city-mission-card span {
  color: rgba(255, 246, 223, 0.82);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}
.mars-city-mission-card small {
  color: #b7f5b1;
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}
.mars-city-meters span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  border-radius: 7px;
  min-height: 58px;
  padding: 8px;
  background: rgba(255, 221, 166, 0.14);
  font-weight: 900;
}
.mars-city-meters span.ready {
  border: 1px solid rgba(183, 245, 177, 0.34);
  background: rgba(40, 78, 54, 0.36);
}
.mars-city-meters span.needs-help {
  border: 1px solid rgba(255, 194, 132, 0.36);
  background: rgba(91, 43, 24, 0.42);
  box-shadow: inset 0 0 18px rgba(255, 181, 102, 0.08);
}
.mars-city-meters b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 34px;
  border-radius: 7px;
  background: rgba(255, 246, 223, 0.12);
  color: #8feaff;
  font-size: 0.62rem;
  line-height: 1;
  text-align: center;
}
.mars-city-meters strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.05;
}
.mars-city-meters small {
  min-width: 0;
  color: rgba(255, 246, 223, 0.72);
  font-size: 0.68rem;
  line-height: 1.05;
  text-transform: uppercase;
}
.mars-city-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.mars-city-mayor-choices {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.mars-city-mayor-choices button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  border: 1px solid rgba(143, 234, 255, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(22, 47, 52, 0.48);
  color: #fff6df;
  text-align: left;
}
.mars-city-mayor-choices button:disabled,
.mars-city-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.mars-city-mayor-choices button.over-budget {
  border-color: rgba(255, 166, 128, 0.32);
  background: rgba(82, 35, 24, 0.42);
}
.mars-city-mayor-choices strong,
.mars-city-mayor-choices span,
.mars-city-mayor-choices i {
  display: block;
}
.mars-city-mayor-choices strong {
  font-size: 0.9rem;
}
.mars-city-mayor-choices span {
  color: rgba(255, 246, 223, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
}
.mars-city-mayor-choices i {
  width: fit-content;
  max-width: 100%;
  border-radius: 7px;
  padding: 3px 6px;
  background: rgba(183, 245, 177, 0.14);
  color: #eaffda;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 1000;
  line-height: 1.1;
}
.mars-city-mayor-choices em {
  display: block;
  margin-top: 2px;
  color: rgba(143, 234, 255, 0.82);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.18;
}
.mars-city-prop-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.mars-city-prop-card {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(255, 216, 156, 0.18);
  border-radius: 7px;
  padding: 6px;
  background: rgba(255, 246, 223, 0.08);
}
.mars-city-prop-card small {
  max-width: 100%;
  color: rgba(255, 246, 223, 0.8);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}
.mars-city-prop-sprite {
  display: block;
  width: 30px;
  aspect-ratio: 2 / 3;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  filter: drop-shadow(0 5px 5px rgba(42, 15, 9, 0.28));
  animation: mars-city-prop-frames 1.4s steps(4) infinite;
}
.mars-city-prop-sprite.mini {
  width: 17px;
  animation-duration: 1.9s;
}
.mars-city-prop-sprite.attached {
  position: absolute;
  right: -8px;
  bottom: -2px;
}
.mars-city-character-sprite {
  display: block;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: center;
  height: auto;
  filter: drop-shadow(0 7px 5px rgba(43, 15, 8, 0.36));
}
.mars-city-character-sprite img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}
.mars-city-character-sprite.resident {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 92px;
  translate: -50% 0;
}
.mars-city-character-sprite.bubble-house {
  width: 100%;
  animation: none;
}
@media (max-width: 860px) {
  .mars-city-command {
    grid-template-columns: 1fr auto;
  }
  .mars-city-budget {
    grid-column: 2;
  }
  .mars-city-exit {
    grid-row: 1;
  }
  .mars-city-command > div:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }
  .mars-city-play {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(260px, 1fr) auto;
    height: calc(100vh - 154px);
    overflow: auto;
  }
  .mars-city-tools {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    overflow-x: auto;
  }
  .mars-city-tool {
    min-width: 96px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .mars-city-tool b {
    grid-row: auto;
  }
  .mars-city-tool small {
    display: none;
  }
}
@media (max-width: 560px) {
  .mars-city-command {
    gap: 10px;
    padding-inline: 12px;
  }
  .mars-city-play {
    height: calc(100vh - 176px);
    padding: 0 12px 12px;
  }
  .mars-city-board {
    gap: 5px;
    padding: 8px;
  }
  .mars-city-panel {
    padding: 12px;
  }
  .mars-city-budget-row,
  .mars-city-meters,
  .mars-city-prop-strip {
    grid-template-columns: 1fr;
  }
  .mars-city-mayor-choices button,
  .mars-city-mission-card,
  .mars-city-selected,
  .mars-city-finish {
    width: 100%;
  }
  .mars-city-meters span {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

.mars-city-landmark-mode {
  background:
    radial-gradient(circle at 82% 14%, rgba(255, 229, 173, 0.28), transparent 22%),
    linear-gradient(180deg, #181620 0%, #543023 48%, #a85331 100%);
}
.mars-city-map-play {
  grid-template-columns: minmax(132px, 178px) minmax(440px, 1fr) minmax(230px, 286px);
}
.mars-city-map-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 178, 0.24);
  border-radius: 8px;
  background: rgba(44, 17, 12, 0.42);
  box-shadow: inset 0 0 44px rgba(38, 14, 8, 0.42);
}
.mars-city-map-controls {
  position: relative;
  z-index: 9;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 224, 178, 0.18);
  background: rgba(30, 13, 12, 0.82);
}
.mars-city-map-controls button {
  min-height: 38px;
  border: 1px solid rgba(255, 224, 178, 0.28);
  border-radius: 8px;
  padding: 0 11px;
  color: #fff7df;
  background: rgba(74, 34, 24, 0.78);
  font-weight: 900;
}
.mars-city-map-controls button.selected {
  border-color: rgba(143, 234, 255, 0.72);
  background: rgba(28, 80, 88, 0.78);
}
.mars-city-map-controls span {
  margin-left: auto;
  color: rgba(255, 247, 223, 0.74);
  font-size: 0.78rem;
  font-weight: 900;
}
.mars-city-map-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 216, 156, 0.56) rgba(29, 12, 10, 0.6);
}
.mars-city-map {
  position: relative;
  width: 1450px;
  height: 900px;
  min-width: 100%;
  min-height: 100%;
  overflow: hidden;
  background-size: 100% 100%;
  background-position: center;
}
.mars-city-map-detail {
  width: 1840px;
  height: 1120px;
}
.mars-city-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 10, 10, 0.14), transparent 18%, transparent 82%, rgba(20, 10, 10, 0.14)),
    radial-gradient(ellipse at 50% 86%, rgba(255, 197, 122, 0.12), transparent 42%);
}
.mars-city-road-layer,
.mars-city-sector-layer,
.mars-city-resource-layer,
.mars-city-house-layer,
.mars-city-people-layer,
.mars-city-activity-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mars-city-road-layer {
  z-index: 3;
}
.mars-city-sector-layer {
  z-index: 1;
}
.mars-city-resource-layer {
  z-index: 5;
}
.mars-city-house-layer {
  z-index: 6;
}
.mars-city-people-layer {
  z-index: 8;
}
.mars-city-activity-layer {
  z-index: 7;
  opacity: 0.42;
}
.mars-city-level[class*="mars-city-buzz-"] .mars-city-activity-layer {
  opacity: 0.88;
}
.mars-city-sector {
  position: absolute;
  display: grid;
  place-items: end start;
  border: 1px solid rgba(255, 235, 199, 0.12);
  border-radius: 8px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 235, 199, 0.05), transparent 58%),
    rgba(42, 22, 18, 0.22);
  opacity: 0.38;
  box-shadow: inset 0 0 18px rgba(20, 8, 6, 0.28);
}
.mars-city-sector small {
  display: none;
  max-width: 100%;
  border-radius: 6px;
  padding: 3px 6px;
  color: #fff7df;
  background: rgba(25, 10, 9, 0.72);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}
.mars-city-sector.unlocked {
  opacity: 0.58;
}
.mars-city-sector.built {
  border-color: rgba(143, 234, 255, 0.34);
  opacity: 0.78;
}
.mars-city-sector.selected {
  outline: 3px solid rgba(143, 234, 255, 0.62);
  outline-offset: 2px;
}
.mars-city-view-build .mars-city-sector.unlocked small,
.mars-city-view-needs .mars-city-sector small {
  display: block;
}
.mars-city-view-needs .mars-city-sector.hab {
  background-color: rgba(255, 218, 156, 0.18);
}
.mars-city-view-needs .mars-city-sector.food {
  background-color: rgba(117, 224, 143, 0.18);
}
.mars-city-view-needs .mars-city-sector.water {
  background-color: rgba(124, 222, 255, 0.18);
}
.mars-city-view-needs .mars-city-sector.energy {
  background-color: rgba(255, 214, 96, 0.2);
}
.mars-city-view-needs .mars-city-sector.traffic,
.mars-city-view-traffic .mars-city-sector.traffic {
  background-color: rgba(205, 196, 184, 0.18);
}
.mars-city-view-needs .mars-city-sector.civic {
  background-color: rgba(255, 147, 111, 0.17);
}
.mars-city-resource {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 28px;
  translate: -50% -50%;
  border: 1px solid rgba(255, 247, 223, 0.28);
  border-radius: 8px;
  padding: 2px 7px;
  color: #fff7df;
  background: rgba(31, 12, 10, 0.8);
  font-size: 0.68rem;
  font-weight: 1000;
  opacity: 0;
  text-transform: uppercase;
}
.mars-city-resource.unlocked {
  opacity: 0.18;
}
.mars-city-resource.active,
.mars-city-view-resources .mars-city-resource.unlocked {
  opacity: 0.94;
}
.mars-city-resource.water {
  box-shadow: 0 0 18px rgba(124, 222, 255, 0.28);
}
.mars-city-resource.energy {
  box-shadow: 0 0 18px rgba(255, 225, 124, 0.28);
}
.mars-city-resource.food {
  box-shadow: 0 0 18px rgba(117, 224, 143, 0.24);
}
.mars-city-view-traffic .mars-city-road {
  opacity: 0.64;
}
.mars-city-road {
  position: absolute;
  height: 18px;
  transform-origin: left center;
  border: 1px solid rgba(255, 233, 198, 0.16);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 235, 199, 0.52) 18px 25px, transparent 25px 42px),
    linear-gradient(180deg, rgba(75, 53, 45, 0.62), rgba(37, 26, 24, 0.74));
  box-shadow:
    0 4px 0 rgba(47, 18, 10, 0.22),
    0 0 20px rgba(255, 206, 134, 0.08);
  opacity: 0.3;
}
.mars-city-road.active {
  opacity: 0.92;
  box-shadow:
    0 4px 0 rgba(47, 18, 10, 0.24),
    0 0 22px rgba(143, 234, 255, 0.18);
}
.mars-city-unlock-report {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 9;
  display: grid;
  gap: 2px;
  min-width: 138px;
  border: 1px solid rgba(255, 226, 180, 0.28);
  border-radius: 8px;
  padding: 9px 11px;
  color: #fff7df;
  background: rgba(28, 12, 10, 0.78);
  box-shadow: 0 16px 34px rgba(50, 18, 10, 0.28);
}
.mars-city-unlock-report strong,
.mars-city-unlock-report span {
  display: block;
}
.mars-city-unlock-report strong {
  font-size: 0.86rem;
}
.mars-city-unlock-report span {
  color: rgba(255, 247, 223, 0.74);
  font-size: 0.74rem;
  font-weight: 900;
}
.mars-city-bubble-house {
  position: absolute;
  display: block;
  width: 58px;
  overflow: visible;
  translate: -50% -50%;
  animation: mars-city-house-pop 320ms ease both;
  filter: drop-shadow(0 12px 12px rgba(47, 18, 10, 0.34));
}
.mars-city-bubble-house.medium {
  width: 70px;
}
.mars-city-bubble-house.large {
  width: 82px;
}
.mars-city-resident {
  position: absolute;
  display: block;
  width: 88px;
  height: 116px;
  overflow: visible;
  translate: -50% -50%;
  animation: mars-city-resident-walk 4.4s ease-in-out infinite;
}
.mars-city-resident-need {
  position: absolute;
  left: 72%;
  top: -12px;
  width: 28px;
  height: 28px;
  translate: -50% 0;
  display: grid;
  place-items: center;
  font-style: normal;
  opacity: 0;
  filter: drop-shadow(0 5px 5px rgba(42, 15, 9, 0.3));
  animation: mars-city-thought-pop 4.4s ease-in-out infinite;
}
.mars-city-resident-need .mars-city-prop-sprite {
  width: 26px;
}
.mars-city-resident-tools {
  position: absolute;
  left: 48px;
  bottom: 16px;
  display: flex;
  gap: 1px;
  max-width: 46px;
  transform: rotate(-7deg);
}
.mars-city-people-layer .mars-city-resident-tools,
.mars-city-activity .mars-city-prop-sprite.attached {
  display: none;
}
.mars-city-activity {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  translate: -50% -50%;
  animation: mars-city-activity-cross 5.6s ease-in-out infinite;
}
.mars-city-activity.cart {
  width: 74px;
}
.mars-city-activity.drone {
  width: 72px;
  animation-name: mars-city-drone-loop;
  animation-duration: 6.8s;
}
.mars-city-activity.worker {
  width: 70px;
  animation-duration: 5.1s;
}
.mars-city-activity.spark {
  width: 56px;
  animation-name: mars-city-spark-pulse;
  animation-duration: 2.2s;
}
.mars-city-activity .mars-city-character-sprite {
  width: 100%;
  animation: mars-city-character-frames 1.25s steps(4) infinite;
}
.mars-city-activity .mars-city-prop-sprite.sparkle {
  width: 22px;
}
.mars-city-tool.locked {
  opacity: 0.48;
}
.mars-city-landmark {
  position: absolute;
  z-index: 10;
  width: clamp(104px, 13vw, 172px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 0;
  background: transparent;
  color: #fff7df;
  cursor: pointer;
}
.mars-city-landmark.locked {
  opacity: 0.42;
  filter: grayscale(0.7);
}
.mars-city-landmark:focus-visible {
  outline: 3px solid #8feaff;
  outline-offset: 4px;
  border-radius: 8px;
}
.mars-city-landmark.selected .mars-city-landmark-art {
  box-shadow:
    0 0 0 4px rgba(143, 234, 255, 0.86),
    0 18px 34px rgba(40, 14, 9, 0.44);
}
.mars-city-landmark.built .mars-city-landmark-art {
  opacity: 1;
  transform: translateY(-6px) scale(1.04);
}
.mars-city-landmark-art {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background-size: 400% 400%;
  background-repeat: no-repeat;
  opacity: 0.82;
  filter: drop-shadow(0 18px 18px rgba(41, 15, 8, 0.36));
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}
.mars-city-landmark-tag {
  position: absolute;
  left: 50%;
  bottom: -7px;
  translate: -50% 0;
  display: block;
  min-width: 76px;
  border: 1px solid rgba(255, 226, 180, 0.4);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(34, 14, 12, 0.82);
  color: #fff7df;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 18px rgba(39, 14, 8, 0.32);
}
.mars-city-selected {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-radius: 7px;
  padding: 10px;
  background: rgba(143, 234, 255, 0.1);
}
.mars-city-selected strong,
.mars-city-selected span {
  display: block;
}
.mars-city-selected span {
  color: rgba(255, 246, 223, 0.76);
  line-height: 1.35;
}
.mars-city-finish {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(183, 245, 177, 0.34);
  border-radius: 8px;
  padding: 10px;
  background: rgba(31, 67, 48, 0.42);
}
.mars-city-finish strong,
.mars-city-finish span {
  grid-column: 1 / -1;
  display: block;
}
.mars-city-finish span {
  color: rgba(246, 255, 233, 0.78);
  line-height: 1.32;
}
.mars-city-finish button {
  min-height: 42px;
  border: 1px solid rgba(246, 255, 233, 0.32);
  border-radius: 8px;
  background: rgba(246, 255, 233, 0.14);
  color: #f6ffe9;
  font-weight: 900;
}
.mars-city-progress {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}
.mars-city-progress span {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 232, 190, 0.22);
}
.mars-city-progress span.done {
  background: #b7f5b1;
}
.mars-city-progress span.current {
  background: #8feaff;
  box-shadow: 0 0 0 4px rgba(143, 234, 255, 0.16);
}
.mars-city-reward {
  position: fixed;
  z-index: 44;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: grid;
  gap: 6px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(183, 245, 177, 0.46);
  border-radius: 8px;
  padding: 14px;
  background: rgba(25, 42, 32, 0.92);
  color: #f6ffe9;
  box-shadow: 0 18px 44px rgba(11, 18, 15, 0.38);
}
.mars-city-reward strong,
.mars-city-reward span {
  display: block;
}
.mars-city-reward button {
  justify-self: start;
  min-height: 42px;
  border: 1px solid rgba(246, 255, 233, 0.36);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(246, 255, 233, 0.16);
  color: #f6ffe9;
  font-weight: 900;
}
.mars-city-reward button + button {
  margin-top: 2px;
}
@media (max-width: 860px) {
  .mars-city-map-play {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(260px, 46vh) auto;
  }
}
@media (max-width: 560px) {
  .mars-city-map-shell {
    overflow: hidden;
  }
  .mars-city-map {
    width: 100%;
    min-height: 220px;
  }
}
@keyframes mars-city-house-pop {
  from {
    opacity: 0;
    scale: 0.72;
    translate: -50% -42%;
  }
  to {
    opacity: 1;
    scale: 1;
    translate: -50% -50%;
  }
}
@keyframes mars-city-resident-walk {
  0%,
  100% {
    transform: translate(0, 0);
  }
  45% {
    transform: translate(var(--mars-city-walk-x), var(--mars-city-walk-y));
  }
  62% {
    transform: translate(calc(var(--mars-city-walk-x) * 0.7), calc(var(--mars-city-walk-y) * 0.6));
  }
}
@keyframes mars-city-thought-pop {
  0%,
  18%,
  100% {
    opacity: 0;
    transform: translateY(4px) scale(0.86);
  }
  30%,
  58% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes mars-city-prop-frames {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
@keyframes mars-city-character-frames {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
@keyframes mars-city-activity-cross {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(0, 0) scale(0.82);
  }
  16%,
  72% {
    opacity: 1;
  }
  50% {
    transform: translate(var(--mars-city-activity-x), var(--mars-city-activity-y)) scale(1);
  }
}
@keyframes mars-city-drone-loop {
  0%,
  100% {
    opacity: 0.15;
    transform: translate(0, 0) scale(0.86);
  }
  22%,
  80% {
    opacity: 1;
  }
  45% {
    transform: translate(var(--mars-city-activity-x), var(--mars-city-activity-y)) scale(1.08);
  }
}
@keyframes mars-city-spark-pulse {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(6px) scale(0.72);
  }
  46% {
    opacity: 1;
    transform: translateY(-10px) scale(1.08);
  }
}
@media (max-width: 860px) {
  .mars-city-map-play {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-items: start;
  }
  .mars-city-tools {
    order: 0;
  }
  .mars-city-map-play .mars-city-tools {
    display: none;
  }
  .mars-city-panel {
    order: 2;
    align-self: start;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-height: auto;
    overflow: visible;
  }
  .mars-city-budget-row {
    grid-template-columns: 1fr;
  }
  .mars-city-meters {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    overflow: visible;
    padding-bottom: 2px;
  }
  .mars-city-meters span {
    min-width: 112px;
  }
  .mars-city-map-shell {
    order: 1;
    min-height: 420px;
  }
  .mars-city-map {
    width: 1280px;
    height: 790px;
    min-height: 790px;
  }
  .mars-city-map-detail {
    width: 1540px;
    height: 940px;
    min-height: 940px;
  }
}
@media (max-width: 560px) {
  .mars-city-budget-row,
  .mars-city-meters,
  .mars-city-prop-strip {
    grid-template-columns: 1fr;
  }
  .mars-city-meters span {
    min-width: 0;
  }
  .mars-city-landmark {
    width: 82px;
  }
  .mars-city-bubble-house {
    width: 48px;
  }
  .mars-city-bubble-house.medium {
    width: 56px;
  }
  .mars-city-bubble-house.large {
    width: 64px;
  }
  .mars-city-resident {
    width: 22px;
    height: 34px;
  }
  .mars-city-map {
    width: 1160px;
    height: 740px;
    min-height: 740px;
  }
  .mars-city-map-detail {
    width: 1380px;
    height: 880px;
    min-height: 880px;
  }
  .mars-city-landmark-tag {
    min-width: 52px;
    font-size: 0.68rem;
  }
  .mars-city-finish {
    grid-template-columns: 1fr;
  }
}
.mars-rover-moons {
  position: fixed;
  z-index: 36;
  top: 15vh;
  right: 31vw;
  width: 150px;
  height: 70px;
  pointer-events: none;
}
.mars-rover-moons i {
  position: absolute;
  display: block;
  border-radius: 47% 53% 51% 49% / 45% 48% 52% 55%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 241, 220, 0.74), transparent 12%),
    radial-gradient(circle at 62% 36%, rgba(70, 48, 43, 0.46), transparent 13%),
    radial-gradient(circle at 38% 66%, rgba(68, 44, 37, 0.36), transparent 10%),
    radial-gradient(circle at 74% 72%, rgba(255, 224, 194, 0.18), transparent 8%),
    linear-gradient(145deg, #d9b8a2 0%, #9b725f 48%, #5b4037 100%);
  box-shadow:
    inset -12px -13px 18px rgba(38, 23, 20, 0.5),
    inset 8px 6px 12px rgba(255, 230, 207, 0.12),
    0 0 28px rgba(255, 187, 128, 0.12);
  opacity: 0.76;
  filter: saturate(0.72) contrast(1.08);
}
.mars-rover-moons i:first-child {
  left: 0;
  top: 8px;
  width: 58px;
  height: 58px;
  transform: rotate(-11deg);
}
.mars-rover-moons i:last-child {
  right: 16px;
  top: 0;
  width: 28px;
  height: 28px;
  opacity: 0.64;
  transform: rotate(18deg);
}
.mars-rover-back {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 42;
  min-height: 60px;
  border: 1px solid rgba(255, 224, 178, 0.3);
  border-radius: 999px;
  background: rgba(16, 10, 15, 0.62);
  color: #fff7df;
  font-family: inherit;
  font-weight: 900;
  padding: 0 18px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.mars-rover-sky {
  position: absolute;
  inset: 0 0 42%;
  overflow: hidden;
}
.mars-rover-sky::before {
  content: "";
  position: absolute;
  left: 9%;
  top: 18%;
  width: 84px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.7), transparent 18%),
    linear-gradient(135deg, #f6b36f, #a5482f);
  box-shadow: 0 0 48px rgba(255, 160, 96, 0.35);
}
.mars-rover-sky i {
  position: absolute;
  width: 180px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 214, 152, 0.28);
  transform: rotate(-9deg);
}
.mars-rover-sky i:nth-child(1) {
  right: 18%;
  top: 22%;
}
.mars-rover-sky i:nth-child(2) {
  right: 34%;
  top: 34%;
  width: 250px;
}
.mars-rover-sky i:nth-child(3) {
  right: 9%;
  top: 46%;
  width: 130px;
}
.mars-rover-mountains {
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: 29vh;
  height: 42vh;
}
.mars-rover-mountains .peak {
  position: absolute;
  bottom: 0;
  width: 34vw;
  height: 34vh;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(140deg, rgba(255, 224, 178, 0.2), transparent 42%),
    linear-gradient(180deg, #8d3f25, #3f1712);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.28));
}
.mars-rover-mountains .peak.a {
  left: 0;
  height: 30vh;
}
.mars-rover-mountains .peak.b {
  left: 22vw;
  height: 42vh;
  width: 40vw;
  background:
    linear-gradient(140deg, rgba(255, 232, 190, 0.22), transparent 38%),
    linear-gradient(180deg, #a64d2d, #431812);
}
.mars-rover-mountains .peak.c {
  right: 20vw;
  height: 34vh;
}
.mars-rover-mountains .peak.d {
  right: 0;
  height: 39vh;
  width: 38vw;
}
.mars-rover-ground {
  position: absolute;
  left: -4vw;
  right: -4vw;
  bottom: -8vh;
  height: 42vh;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  background:
    radial-gradient(ellipse at 18% 44%, rgba(82, 28, 17, 0.65) 0 42px, transparent 44px),
    radial-gradient(ellipse at 72% 38%, rgba(82, 28, 17, 0.55) 0 58px, transparent 60px),
    linear-gradient(180deg, #b95b32, #7b321f 62%, #451810);
  box-shadow: inset 0 18px 38px rgba(255, 212, 146, 0.18);
}
.mars-rover-ground .track {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 999px;
  background: rgba(50, 20, 14, 0.34);
}
.mars-rover-ground .track.one {
  top: 37%;
  transform: rotate(-2deg);
}
.mars-rover-ground .track.two {
  top: 50%;
  transform: rotate(1.4deg);
}
.mars-rover-ground .rock {
  position: absolute;
  width: 28px;
  aspect-ratio: 1.4;
  border-radius: 50%;
  background: #5d2418;
}
.mars-rover-ground .r1 {
  left: 24%;
  top: 42%;
}
.mars-rover-ground .r2 {
  left: 66%;
  top: 33%;
}
.mars-rover-ground .r3 {
  left: 82%;
  top: 54%;
}
.mars-rover-storm {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  background: rgba(196, 96, 44, 0.14);
  animation: mars-storm-flash 1.4s ease-in-out infinite alternate;
}
.mars-rover-storm i {
  position: absolute;
  left: -20vw;
  width: 150vw;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 223, 168, 0.35), transparent);
  transform: rotate(-8deg);
  animation: mars-gust 1.4s linear infinite;
}
.mars-rover-storm i:nth-child(1) {
  top: 22%;
}
.mars-rover-storm i:nth-child(2) {
  top: 38%;
  animation-delay: -0.45s;
}
.mars-rover-storm i:nth-child(3) {
  top: 54%;
  animation-delay: -0.9s;
}
.mars-rover-storm i:nth-child(4) {
  top: 68%;
  animation-delay: -1.2s;
}
.mars-rover-hud {
  position: fixed;
  z-index: 43;
  top: 18px;
  left: 132px;
  right: 18px;
  display: grid;
  grid-template-columns: minmax(160px, 250px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.mars-rover-card {
  grid-row: 1 / span 2;
  min-height: 56px;
  border: 1px solid rgba(255, 211, 111, 0.34);
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--mars-panel);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}
.mars-rover-card span {
  color: var(--mars-gold);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mars-rover-card strong {
  display: block;
  margin-top: 2px;
  font-family: "Fraunces", serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 580;
  line-height: 0.96;
}
.mars-rover-card p {
  margin: 6px 0 0;
  color: rgba(255, 247, 223, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.mars-rover-collected-strip {
  grid-column: 2;
  grid-row: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 111, 0.18);
  border-radius: 999px;
  background: rgba(16, 10, 15, 0.38);
  padding: 5px 8px;
  backdrop-filter: blur(10px);
}
.mars-rover-collected-strip span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 247, 223, 0.12);
  border-radius: 50%;
  background: rgba(255, 247, 223, 0.08);
  opacity: 0.48;
}
.mars-rover-collected-strip span.collected {
  border-color: rgba(255, 211, 111, 0.46);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 211, 111, 0.26), transparent 66%),
    rgba(48, 20, 14, 0.74);
  box-shadow: 0 0 14px rgba(255, 177, 86, 0.22);
  opacity: 1;
}
.mars-rover-collected-strip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter:
    sepia(0.14)
    saturate(0.82)
    drop-shadow(0 4px 5px rgba(0, 0, 0, 0.28));
}
.mars-rover-journey-rail {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
  min-width: 0;
}
.mars-rover-journey-rail span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 5px;
  align-items: center;
  border: 1px solid rgba(255, 247, 223, 0.12);
  border-radius: 8px;
  background: rgba(16, 10, 15, 0.36);
  padding: 5px 6px;
  color: rgba(255, 247, 223, 0.58);
  backdrop-filter: blur(10px);
}
.mars-rover-journey-rail span.active {
  border-color: rgba(255, 211, 111, 0.44);
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 211, 111, 0.24), transparent 52%),
    rgba(42, 18, 14, 0.62);
  color: #fff7df;
  box-shadow: 0 0 18px rgba(255, 177, 86, 0.16);
}
.mars-rover-journey-rail span.done {
  border-color: rgba(140, 255, 176, 0.28);
  color: rgba(223, 255, 232, 0.76);
}
.mars-rover-journey-rail b {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 247, 223, 0.1);
  color: inherit;
  font-size: 11px;
  font-weight: 1000;
}
.mars-rover-journey-rail em,
.mars-rover-journey-rail i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}
.mars-rover-journey-rail em {
  font-size: 11px;
  font-weight: 1000;
}
.mars-rover-journey-rail i {
  font-size: 10px;
  font-weight: 900;
  opacity: 0.62;
}
.mars-rover-badges {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 8px;
}
.mars-rover-badges span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--mars-border);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(16, 10, 15, 0.62);
  color: #fff7df;
  font-size: 14px;
  font-weight: 1000;
  backdrop-filter: blur(12px);
}
.mars-rover-badges span.close {
  background: var(--mars-gold);
  color: #251306;
}
/* Compact corner cluster: two round icon buttons, no text chrome (declutter). */
.mars-rover-guide {
  position: fixed;
  z-index: 43;
  top: 118px;
  right: 18px;
  display: flex;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
.mars-rover-guide .mars-rover-guide-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}
.mars-rover-guide button {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(143, 234, 255, 0.4);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(12, 30, 38, 0.82), rgba(34, 14, 12, 0.78)),
    rgba(10, 8, 18, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  color: #e9fbff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.mars-rover-collect-modal {
  position: fixed;
  z-index: 45;
  right: 18px;
  bottom: 128px;
  width: min(430px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 211, 111, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(54, 21, 14, 0.82), rgba(17, 11, 18, 0.78)),
    rgba(18, 10, 16, 0.84);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.38),
    inset 0 0 34px rgba(255, 211, 111, 0.08);
  padding: 12px;
  backdrop-filter: blur(14px);
  animation: mars-collect-pop 0.28s ease-out both;
  overflow: hidden;
}
.mars-rover-collect-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 234, 255, 0.06) 1px, transparent 1px);
  background-size: 100% 9px, 13px 100%;
  opacity: 0.46;
  mix-blend-mode: screen;
}
.mars-rover-collect-modal::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: -35%;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(143, 234, 255, 0.16), transparent);
  animation: mars-dex-scan 1.55s ease-in-out infinite;
}
.mars-rover-collect-modal.prop-visit {
  border-color: rgba(143, 234, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(18, 36, 44, 0.84), rgba(38, 18, 14, 0.8)),
    rgba(12, 10, 18, 0.86);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.38),
    inset 0 0 34px rgba(143, 234, 255, 0.1);
}
.mars-rover-collect-art {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 55% 35%, rgba(255, 211, 111, 0.18), transparent 58%),
    rgba(255, 247, 223, 0.06);
}
.mars-rover-collect-art img {
  width: 82px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.32));
}
.mars-rover-prop-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 234, 255, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(143, 234, 255, 0.28), transparent 62%),
    rgba(8, 24, 32, 0.5);
  color: #c8f6ff;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 0 18px rgba(143, 234, 255, 0.42);
}
.mars-rover-collect-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}
.mars-rover-collect-copy span {
  color: var(--mars-gold);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mars-rover-collect-copy strong {
  overflow-wrap: anywhere;
  color: #fff7df;
  font-size: 21px;
  line-height: 1.05;
}
.mars-rover-collect-copy p {
  margin: 0;
  color: rgba(255, 247, 223, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.mars-rover-collect-modal button {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 211, 111, 0.42);
  border-radius: 50%;
  background: rgba(255, 211, 111, 0.16);
  color: #fff7df;
  font-family: inherit;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
}
.mars-rover-collect-modal.prop-visit button {
  border-color: rgba(143, 234, 255, 0.44);
  background: rgba(143, 234, 255, 0.13);
}
.mars-rover-discovery {
  position: fixed;
  z-index: 42;
  left: 18px;
  bottom: 252px;
  width: min(285px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.mars-rover-discovery span {
  display: block;
  border-left: 3px solid rgba(255, 211, 111, 0.62);
  border-radius: 0 8px 8px 0;
  background: rgba(20, 8, 9, 0.76);
  color: rgba(255, 247, 223, 0.9);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.18;
  opacity: 0.72;
  animation: mars-discovery-glow 5.2s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  backdrop-filter: blur(10px);
}
.mars-rover-playfield {
  position: absolute;
  z-index: 38;
  left: 5vw;
  right: 5vw;
  bottom: 168px;
  height: 220px;
}
.mars-rover-stop {
  position: absolute;
  bottom: 82px;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: translateX(-50%);
  color: rgba(255, 247, 223, 0.78);
}
.mars-rover-stop span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 247, 223, 0.24);
  border-radius: 50%;
  background: rgba(43, 18, 12, 0.76);
  font-weight: 1000;
}
.mars-rover-stop strong {
  width: 110px;
  text-align: center;
  font-size: 12px;
  line-height: 1;
}
.mars-rover-stop.target span {
  border-color: var(--mars-gold);
  box-shadow: 0 0 0 8px rgba(255, 211, 111, 0.16), 0 0 30px rgba(255, 211, 111, 0.36);
}
.mars-rover-stop.done span {
  background: #8cffb0;
  color: #0a2a18;
}
.mars-rover-vehicle {
  position: absolute;
  bottom: 24px;
  z-index: 4;
  width: 124px;
  height: 92px;
  transform: translateX(-50%);
  transition: left 0.32s ease;
}
.mars-rover-vehicle .body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 30px;
  height: 34px;
  border-radius: 12px 12px 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 48%),
    #d7c39d;
  border: 3px solid #5b4232;
}
.mars-rover-vehicle .mast {
  position: absolute;
  left: 56px;
  bottom: 62px;
  width: 7px;
  height: 32px;
  background: #5b4232;
}
.mars-rover-vehicle .mast::after {
  content: "";
  position: absolute;
  left: -14px;
  top: -10px;
  width: 34px;
  height: 16px;
  border-radius: 999px;
  background: #7ee7ff;
  box-shadow: 0 0 18px rgba(126, 231, 255, 0.42);
}
.mars-rover-vehicle .wheel {
  position: absolute;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #2d2a28 0 38%, #0f0d0c 40% 100%);
  border: 3px solid #6b5142;
}
.mars-rover-vehicle .w1 {
  left: 16px;
}
.mars-rover-vehicle .w2 {
  left: 48px;
}
.mars-rover-vehicle .w3 {
  right: 16px;
}
.mars-rover-panel {
  position: fixed;
  z-index: 44;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(760px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  transform: translateX(-50%);
}
.mars-rover-message {
  min-height: 60px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 211, 111, 0.32);
  border-radius: 8px;
  background: rgba(18, 10, 16, 0.68);
  padding: 12px 14px;
  backdrop-filter: blur(12px);
}
.mars-rover-objective {
  display: grid;
  gap: 2px;
  margin-bottom: 2px;
}
.mars-rover-message .mars-rover-objective > span {
  color: var(--mars-gold);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}
.mars-rover-message .mars-rover-objective > strong {
  color: #fff7df;
  font-size: 17px;
  line-height: 1.1;
}
.mars-rover-message strong {
  font-size: 20px;
}
.mars-rover-message span {
  color: rgba(255, 247, 223, 0.72);
  font-size: 13px;
  font-weight: 800;
}
.mars-rover-mini-task {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
.mars-rover-mini-task > span {
  color: #8feaff;
  font-size: 12px;
  font-weight: 1000;
}
.mars-rover-rocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mars-rover-rocks button {
  min-height: 48px;
  border: 1px solid rgba(255, 247, 223, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7df;
  font-family: inherit;
  font-weight: 900;
}
.mars-rover-rocks button.on {
  background: rgba(255, 211, 111, 0.22);
  border-color: rgba(255, 211, 111, 0.72);
}
.mars-rover-progress {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}
.mars-rover-progress::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 211, 111, 0.34), rgba(143, 234, 255, 0.18));
  transform: translateY(-50%);
  opacity: 0.52;
}
.mars-rover-progress span {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  background: rgba(255, 247, 223, 0.24);
}
.mars-rover-progress span.done,
.mars-rover-progress span.on {
  background: var(--mars-gold);
  box-shadow: 0 0 14px rgba(255, 211, 111, 0.64);
}
.mars-rover-progress span.current {
  background: #8feaff;
  box-shadow:
    0 0 0 6px rgba(143, 234, 255, 0.16),
    0 0 18px rgba(143, 234, 255, 0.58);
}
.mars-rover-progress span.upcoming {
  border: 1px solid rgba(255, 247, 223, 0.18);
  background: rgba(255, 247, 223, 0.12);
}
.mars-rover-progress.mini {
  align-self: center;
  justify-self: start;
  gap: 7px;
}
.mars-rover-progress.mini::before {
  display: none;
}
.mars-rover-progress.mini span {
  width: 24px;
  height: 10px;
  border-radius: 999px;
  background: rgba(143, 234, 255, 0.2);
}
.mars-rover-progress.mini span.on {
  background: linear-gradient(90deg, #8feaff, #ffd36f);
  box-shadow: 0 0 16px rgba(143, 234, 255, 0.34);
}
.mars-rover-controls {
  display: grid;
  grid-template-columns: 62px minmax(130px, 1fr) 62px 84px 84px;
  gap: 8px;
}
.mars-rover-controls button {
  min-height: 60px;
  border: 1px solid rgba(255, 247, 223, 0.18);
  border-radius: 999px;
  background: rgba(16, 10, 15, 0.72);
  color: #fff7df;
  font-family: inherit;
  font-size: 16px;
  font-weight: 1000;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.mars-rover-controls .primary {
  background: linear-gradient(180deg, #ffd36f, #ff8d4d);
  color: #241106;
}
@keyframes mars-gust {
  from {
    translate: -20vw 0;
  }
  to {
    translate: 18vw 0;
  }
}
@keyframes mars-storm-flash {
  from {
    opacity: 0.76;
  }
  to {
    opacity: 1;
  }
}
@keyframes mars-star-twinkle {
  0%,
  100% {
    transform: scale(0.72);
    opacity: 0.38;
  }
  48% {
    transform: scale(1.18);
    opacity: 0.92;
  }
}
@keyframes mars-discovery-glow {
  0%,
  72%,
  100% {
    opacity: 0.72;
    transform: translateX(0);
  }
  18%,
  42% {
    opacity: 1;
    transform: translateX(4px);
  }
}
@media (max-width: 860px) {
  .mars-rover-hud {
    left: 14px;
    right: 14px;
    top: 76px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .mars-rover-collected-strip {
    grid-column: 1 / -1;
    order: 3;
    min-height: 36px;
    gap: 5px;
    padding: 4px 6px;
  }
  .mars-rover-collected-strip span {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }
  .mars-rover-collected-strip img {
    width: 24px;
    height: 24px;
  }
  .mars-rover-card {
    grid-row: auto;
    min-height: 0;
    padding: 9px 12px;
  }
  .mars-rover-card p {
    display: none;
  }
  .mars-rover-card strong {
    font-size: clamp(24px, 8vw, 32px);
  }
  .mars-rover-card span {
    font-size: 10px;
  }
  .mars-rover-badges {
    grid-column: auto;
    grid-row: auto;
    justify-content: end;
    align-content: start;
    gap: 6px;
  }
  .mars-rover-badges span {
    min-height: 38px;
    padding: 0 12px;
  }
  .mars-rover-journey-rail {
    grid-column: 1 / -1;
    grid-row: auto;
    order: 4;
    grid-template-columns: repeat(5, minmax(36px, 1fr));
  }
  .mars-rover-journey-rail span {
    display: flex;
    justify-content: center;
    padding: 4px;
  }
  .mars-rover-journey-rail b {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .mars-rover-journey-rail em,
  .mars-rover-journey-rail i {
    display: none;
  }
  .mars-rover-guide {
    top: 14px;
    right: 12px;
    bottom: auto;
  }
  .mars-rover-collect-modal {
    left: 12px;
    right: 12px;
    bottom: 302px;
    width: auto;
    grid-template-columns: 64px minmax(0, 1fr) 42px;
    gap: 9px;
    padding: 9px;
  }
  .mars-rover-collect-art {
    width: 64px;
    height: 58px;
  }
  .mars-rover-collect-art img {
    width: 62px;
    height: 54px;
  }
  .mars-rover-collect-copy strong {
    font-size: 17px;
  }
  .mars-rover-collect-copy p {
    font-size: 12px;
  }
  .mars-rover-collect-modal button {
    width: 44px;
    height: 44px;
  }
  .mars-rover-discovery {
    display: none;
  }
  .mars-rover-playfield {
    bottom: 218px;
    left: 2vw;
    right: 2vw;
  }
  .mars-rover-panel {
    grid-template-columns: 1fr;
    gap: 8px;
    width: calc(100vw - 24px);
  }
  .mars-rover-message {
    min-height: 86px;
  }
  .mars-rover-message .mars-rover-objective > strong {
    font-size: 16px;
  }
  .mars-rover-mini-task {
    flex-wrap: wrap;
    gap: 7px;
  }
  .mars-rover-controls {
    grid-template-columns: 0.65fr 1.35fr 0.65fr;
  }
  .mars-rover-controls button {
    min-height: 60px;
  }
  .mars-rover-controls button:nth-child(4),
  .mars-rover-controls button:nth-child(5) {
    grid-column: span 1;
  }
  .mars-rover-stop strong {
    display: none;
  }
  .mars-rover-rocks {
    grid-template-columns: 1fr;
  }
}

.pilot-level {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 48% 42%,
      rgba(38, 92, 160, 0.22),
      transparent 34%
    ),
    linear-gradient(180deg, #07111f 0%, #0b1524 48%, #05070d 100%);
  color: #fff;
}

.pilot-back {
  position: absolute;
  z-index: 5;
  top: 22px;
  left: 24px;
  min-width: 44px;
  min-height: 60px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(24, 18, 33, 0.86);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.pilot-mute {
  position: absolute;
  z-index: 5;
  top: 22px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(24, 18, 33, 0.86);
  color: #fff;
  font-weight: 850;
  font-size: 15px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}
.pilot-mute span {
  font-size: 20px;
  line-height: 1;
}
.pilot-mute.off {
  background: rgba(64, 22, 22, 0.86);
  border-color: rgba(255, 132, 132, 0.4);
}
.pilot-mute:hover {
  background: rgba(40, 30, 60, 0.92);
}

.pilot-space-window {
  position: absolute;
  inset: 72px 430px 46px 38px;
  border: 6px solid rgba(180, 213, 238, 0.32);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 62% 20%,
      rgba(255, 231, 145, 0.28),
      transparent 18%
    ),
    radial-gradient(
      circle at 36% 70%,
      rgba(94, 198, 255, 0.16),
      transparent 22%
    ),
    rgba(7, 14, 25, 0.78);
  box-shadow:
    inset 0 0 70px rgba(104, 196, 255, 0.22),
    0 28px 80px rgba(0, 0, 0, 0.42);
}

.pilot-space-window::before {
  content: "";
  position: absolute;
  inset: auto -8% -18% -8%;
  height: 34%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.18),
      transparent 45%
    ),
    linear-gradient(180deg, #314a6c, #102036);
  opacity: 0.78;
}

.pilot-gate {
  position: absolute;
  width: 118px;
  height: 118px;
  transform: translate(-50%, -50%);
  border: 8px solid rgba(111, 224, 255, 0.9);
  border-radius: 50%;
  box-shadow:
    0 0 22px rgba(62, 216, 255, 0.85),
    inset 0 0 24px rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  animation: pilot-gate-pulse 1.2s ease-in-out infinite;
}

.pilot-gate span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5, 13, 24, 0.72);
  color: #fff5bd;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pilot-course-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.42);
}

.pilot-course-dot.next {
  background: #ff4b4b;
  box-shadow: 0 0 26px rgba(255, 81, 81, 0.95);
}

.pilot-ship {
  position: absolute;
  width: 118px;
  height: 154px;
  transform-origin: 50% 54%;
  transition: transform 120ms ease-out;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.35));
}

.pilot-ship img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(90deg);
}

.pilot-ship span {
  position: absolute;
  left: -24px;
  top: 50%;
  width: 62px;
  height: 30px;
  transform: translateY(-50%);
  border-radius: 999px 20px 20px 999px;
  background: radial-gradient(
    circle at 82% 50%,
    #fff7ad,
    #ff8f2e 42%,
    rgba(255, 64, 18, 0) 72%
  );
  filter: blur(0.2px) drop-shadow(0 0 18px rgba(255, 129, 45, 0.82));
}

.pilot-panel {
  position: absolute;
  top: 72px;
  right: 26px;
  bottom: 46px;
  width: 360px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  padding: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(30, 40, 58, 0.93), rgba(13, 18, 28, 0.96)),
    repeating-linear-gradient(
      90deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.025) 14px 15px
    );
  box-shadow: -18px 0 44px rgba(0, 0, 0, 0.25);
}

.pilot-lesson {
  min-height: 150px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  align-content: start;
  gap: 12px;
}

.pilot-lesson.powered {
  border-color: rgba(255, 216, 107, 0.42);
  background:
    linear-gradient(
      135deg,
      rgba(255, 216, 107, 0.16),
      rgba(126, 231, 255, 0.08)
    ),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 22px rgba(255, 216, 107, 0.08);
}

.pilot-lesson strong {
  font-size: 30px;
  line-height: 1;
}

.pilot-lesson span {
  font-size: 17px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.pilot-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pilot-gauges div {
  min-height: 76px;
  border-radius: 12px;
  background: #07101c;
  border: 1px solid rgba(104, 206, 255, 0.28);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  box-shadow: inset 0 0 28px rgba(65, 202, 255, 0.12);
}

.pilot-gauges strong {
  font-size: 29px;
  line-height: 1;
  color: #7ee7ff;
}

.pilot-gauges span,
.pilot-throttle span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.pilot-throttle {
  display: grid;
  align-content: center;
  gap: 20px;
  min-height: 190px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(8, 14, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pilot-throttle input {
  width: 100%;
  accent-color: #ffbc42;
}

.pilot-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.pilot-controls button {
  min-height: 68px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffe58d, #ff8d37);
  color: #231006;
  font-size: 18px;
  font-weight: 950;
  box-shadow:
    0 12px 0 #8c3b16,
    0 20px 24px rgba(0, 0, 0, 0.22);
}

.pilot-controls button:active {
  transform: translateY(6px);
  box-shadow:
    0 6px 0 #8c3b16,
    0 12px 18px rgba(0, 0, 0, 0.18);
}
.pilot-controls button:disabled {
  opacity: 0.72;
  cursor: default;
  transform: none;
  background: linear-gradient(180deg, #eef6ff, #92a7b9);
  box-shadow:
    0 8px 0 #4d5965,
    0 14px 18px rgba(0, 0, 0, 0.18);
}

.pilot-steer-pad {
  position: relative;
}

.pilot-power-hint-arrow {
  position: absolute;
  left: 50%;
  top: -34px;
  z-index: 3;
  width: 54px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5656, #c60000);
  color: #fff7d8;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(80, 0, 0, 0.58);
  box-shadow:
    0 0 0 5px rgba(255, 0, 0, 0.12),
    0 0 22px rgba(255, 0, 0, 0.42),
    0 10px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%) rotate(90deg);
  pointer-events: none;
  animation: pilot-power-hint-blink 760ms ease-in-out infinite;
}

@keyframes pilot-power-hint-blink {
  0%,
  100% {
    opacity: 1;
    translate: 0 0;
  }
  50% {
    opacity: 0.25;
    translate: 0 7px;
  }
}

@keyframes pilot-gate-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.96);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@media (max-width: 900px) {
  .pilot-space-window {
    inset: 72px 14px 270px 14px;
    border-radius: 24px;
  }
  .pilot-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    padding: 14px;
    gap: 10px;
  }
  .pilot-lesson {
    min-height: 112px;
    padding: 13px;
  }
  .pilot-lesson strong {
    font-size: 23px;
  }
  .pilot-lesson span {
    font-size: 13px;
  }
  .pilot-throttle {
    min-height: 0;
    padding: 14px;
  }
  .pilot-controls button {
    min-height: 60px;
    font-size: 15px;
  }
}

.pilot-engineering {
  display: grid;
  grid-template-rows: minmax(240px, 42vh) 1fr;
  gap: 16px;
  padding: 74px 22px 18px;
  background:
    radial-gradient(
      circle at 50% 8%,
      rgba(126, 231, 255, 0.16),
      transparent 32%
    ),
    linear-gradient(180deg, #07101c 0%, #111827 46%, #07090f 100%);
}

.pilot-front-view {
  position: relative;
  overflow: hidden;
  width: min(980px, calc(100vw - 44px));
  justify-self: center;
  border: 8px solid rgba(166, 184, 196, 0.38);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 72% 28%,
      rgba(255, 244, 176, 0.26),
      transparent 12%
    ),
    radial-gradient(
      circle at 28% 62%,
      rgba(72, 157, 255, 0.16),
      transparent 22%
    ),
    linear-gradient(180deg, rgba(3, 9, 18, 0.86), rgba(5, 12, 24, 0.96));
  box-shadow:
    inset 0 0 60px rgba(126, 231, 255, 0.16),
    0 24px 60px rgba(0, 0, 0, 0.34);
  transform: translate3d(0, 0, 0);
}

.pilot-front-view {
  isolation: isolate;
}

.pilot-front-view::before,
.pilot-front-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pilot-front-view::before {
  inset: -12%;
  background:
    radial-gradient(circle at 18% 28%, white 0 1px, transparent 2px),
    radial-gradient(circle at 64% 44%, white 0 1px, transparent 2px),
    radial-gradient(circle at 82% 18%, white 0 1px, transparent 2px),
    radial-gradient(circle at 38% 76%, white 0 1px, transparent 2px),
    radial-gradient(
      circle at 12% 72%,
      rgba(255, 241, 168, 0.85) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 74% 84%,
      rgba(126, 231, 255, 0.82) 0 1px,
      transparent 2px
    );
  opacity: 0.58;
  transform: translate(var(--pilot-drift-x, 0), var(--pilot-drift-y, 0));
  transition:
    transform 180ms ease-out,
    opacity 180ms ease-out;
}

.pilot-front-view::after {
  inset: auto -10% -42% -10%;
  height: 54%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.22),
      transparent 42%
    ),
    linear-gradient(180deg, #42587a, #101b2c);
  opacity: 0.86;
}

.pilot-front-view.power-on {
  box-shadow:
    inset 0 0 74px rgba(126, 231, 255, 0.24),
    inset 0 -26px 60px rgba(255, 216, 107, 0.1),
    0 24px 60px rgba(0, 0, 0, 0.34);
}

.pilot-front-view.power-on::before {
  opacity: 0.86;
}

.pilot-front-view.engine-ready {
  border-color: rgba(90, 255, 152, 0.5);
  box-shadow:
    inset 0 0 84px rgba(126, 231, 255, 0.26),
    inset 0 -30px 70px rgba(90, 255, 152, 0.14),
    0 0 30px rgba(90, 255, 152, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.34);
}

.pilot-front-view.boost-on {
  box-shadow:
    inset 0 0 92px rgba(126, 231, 255, 0.28),
    inset 0 -30px 70px rgba(255, 216, 107, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.34);
}

.pilot-front-view.docking-zoom {
  box-shadow:
    inset 0 0 94px rgba(126, 231, 255, 0.34),
    inset 0 -30px 74px rgba(255, 216, 107, 0.12),
    0 0 36px rgba(126, 231, 255, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.34);
}
.pilot-window-monitor {
  position: absolute;
  z-index: 5;
  top: 18px;
  width: 128px;
  min-height: 72px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(126, 231, 255, 0.06) 0 2px,
      transparent 2px 6px
    ),
    rgba(5, 12, 23, 0.78);
  box-shadow:
    inset 0 0 22px rgba(126, 231, 255, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.28);
  text-transform: uppercase;
}

.pilot-window-monitor.left {
  left: 24px;
}

.pilot-window-monitor.right {
  right: 24px;
}

.pilot-window-monitor strong {
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 1000;
}

.pilot-window-monitor span {
  color: #fff1a8;
  font-size: 12px;
  font-weight: 900;
}

.pilot-window-status {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  max-width: calc(100% - 330px);
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(126, 231, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 12, 23, 0.62);
}

.pilot-window-status span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
}

.pilot-school-redesign .pilot-window-status {
  top: 20px;
}

.pilot-window-status span.next {
  color: #fff1a8;
  border-color: rgba(255, 216, 107, 0.52);
  box-shadow: 0 0 16px rgba(255, 216, 107, 0.18);
}

.pilot-window-status span.on {
  color: #d8ffe4;
  border-color: rgba(90, 255, 152, 0.46);
  box-shadow: 0 0 16px rgba(90, 255, 152, 0.18);
}

@media (max-width: 720px) {
  .pilot-window-status {
    display: none;
  }
}

.pilot-star-target {
  position: absolute;
  z-index: 2;
  right: 12%;
  top: 26%;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.32);
  font-weight: 1000;
  text-transform: uppercase;
  transform-origin: center;
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

.pilot-star-target.on {
  border-color: rgba(255, 65, 65, 0.82);
  color: #ffe2c7;
  box-shadow:
    0 0 24px rgba(255, 65, 65, 0.56),
    inset 0 0 22px rgba(255, 65, 65, 0.22);
  animation: pilot-radar-lock 0.8s ease-in-out infinite alternate;
}

.pilot-front-view.docking-zoom .pilot-star-target {
  transform: scale(1.28);
  filter: drop-shadow(0 0 18px rgba(126, 231, 255, 0.34));
}
.pilot-view-ship {
  position: absolute;
  z-index: 3;
  width: 118px;
  height: 118px;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.35));
  transition:
    filter 140ms ease-out,
    width 0.45s ease,
    height 0.45s ease;
  will-change: left, top, transform;
}

.pilot-view-ship img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(90deg);
}

.pilot-view-ship::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 24px -22px 24px 56px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(126, 231, 255, 0.24),
    transparent 68%
  );
  opacity: calc(0.16 + var(--pilot-thrust, 0) * 0.58);
  transform: scale(calc(0.8 + var(--pilot-thrust, 0) * 0.7));
}

.pilot-view-ship::after {
  content: "";
  position: absolute;
  z-index: -2;
  left: 58%;
  top: 44%;
  width: 170px;
  height: 42px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(126, 231, 255, 0.34),
    transparent 78%
  );
  opacity: 0;
  pointer-events: none;
}

.pilot-view-ship > span {
  position: absolute;
  z-index: 1;
  left: calc(9px - var(--pilot-thrust, 0) * 18px);
  top: 51%;
  width: calc(34px + var(--pilot-thrust, 0) * 56px);
  height: calc(14px + var(--pilot-thrust, 0) * 18px);
  transform: translateY(-50%);
  border-radius: 999px 20px 20px 999px;
  background:
    radial-gradient(
      circle at 90% 50%,
      rgba(255, 255, 230, 0.96),
      rgba(255, 177, 62, 0.86) 32%,
      rgba(255, 95, 28, 0.42) 58%,
      rgba(255, 64, 18, 0) 78%
    ),
    linear-gradient(90deg, rgba(255, 44, 14, 0), rgba(255, 176, 56, 0.5));
  filter: drop-shadow(0 0 12px rgba(255, 129, 45, 0.62));
  pointer-events: none;
}

.pilot-view-ship.boosting > span {
  animation: pilot-flame-flicker 0.12s ease-in-out infinite alternate;
}

.pilot-view-ship.engine-ready::before {
  background:
    radial-gradient(
      circle at 40% 50%,
      rgba(90, 255, 152, 0.32),
      transparent 45%
    ),
    radial-gradient(circle, rgba(126, 231, 255, 0.28), transparent 68%);
  opacity: calc(0.28 + var(--pilot-thrust, 0) * 0.64);
}

.pilot-view-ship.engine-ready > span {
  background:
    radial-gradient(
      circle at 92% 48%,
      #ffffff,
      #fff6a7 22%,
      #ff9a31 48%,
      rgba(255, 35, 18, 0) 78%
    ),
    linear-gradient(90deg, rgba(255, 44, 14, 0), rgba(255, 176, 56, 0.58));
  filter: drop-shadow(0 0 16px rgba(255, 129, 45, 0.9))
    drop-shadow(0 0 28px rgba(90, 255, 152, 0.34));
}

.pilot-view-ship.lights-on {
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 18px rgba(126, 231, 255, 0.72));
}

.pilot-view-ship.lights-on::after {
  opacity: 0.84;
}

.pilot-view-readout {
  position: absolute;
  z-index: 4;
  left: 18px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  border-radius: 8px;
  background: rgba(5, 11, 20, 0.74);
}

.pilot-view-readout strong {
  color: #fff1a8;
  font-size: 20px;
}

.pilot-view-readout span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 850;
}
.pilot-control-board {
  position: relative;
  width: min(1120px, calc(100vw - 34px));
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(67, 75, 88, 0.96), rgba(24, 29, 38, 0.98)),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.025) 18px 19px
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 58px rgba(0, 0, 0, 0.36);
}

.pilot-control-board.engine-ready {
  border-color: rgba(90, 255, 152, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 30px rgba(90, 255, 152, 0.08),
    0 22px 58px rgba(0, 0, 0, 0.36);
}

.pilot-control-board::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent),
    repeating-linear-gradient(
      90deg,
      transparent 0 66px,
      rgba(0, 0, 0, 0.16) 66px 68px
    );
  opacity: 0.72;
}

.pilot-board-column {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.pilot-board-column.mission {
  grid-template-rows: auto 1fr;
}

.pilot-panel-title {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pilot-panel-title i {
  min-width: 0;
  max-width: 46%;
  padding: 5px 8px;
  border: 1px solid rgba(126, 231, 255, 0.2);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.36);
  color: #7ee7ff;
  font-style: normal;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pilot-panel-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pilot-task-list {
  display: grid;
  gap: 8px;
}

.pilot-task-list span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(5, 10, 18, 0.42);
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 900;
}

.pilot-task-list span.next {
  color: #fff1a8;
  border-color: rgba(255, 216, 107, 0.52);
  box-shadow: 0 0 18px rgba(255, 216, 107, 0.14);
}

.pilot-task-list span.done {
  color: #c8ffd1;
  border-color: rgba(89, 231, 131, 0.42);
  background: rgba(39, 143, 75, 0.18);
}

.pilot-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pilot-power-bus {
  min-height: 42px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(126, 231, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      rgba(126, 231, 255, 0.08),
      rgba(255, 216, 107, 0.05)
    ),
    rgba(5, 10, 18, 0.5);
}

.pilot-power-bus span {
  min-height: 22px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 1000;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.34);
}

.pilot-power-bus span.on {
  background: linear-gradient(90deg, #7ee7ff, #fff1a8);
  color: #07101c;
  box-shadow:
    0 0 16px rgba(126, 231, 255, 0.42),
    0 0 22px rgba(255, 216, 107, 0.24);
}

.pilot-switch {
  min-height: 76px;
  display: grid;
  grid-template-columns: 18px 34px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(7, 13, 22, 0.68);
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.pilot-switch .pilot-switch-light {
  grid-row: 1 / 3;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.48);
}

.pilot-switch .pilot-switch-lever {
  grid-row: 1 / 3;
  width: 30px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a2f38, #0c1018);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.34);
}

.pilot-switch strong {
  align-self: end;
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pilot-switch em {
  align-self: start;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.pilot-switch.on {
  color: #fff7cc;
  border-color: rgba(255, 216, 107, 0.6);
  background: rgba(88, 68, 22, 0.36);
}

.pilot-switch.orange.on {
  border-color: rgba(255, 157, 56, 0.62);
  background: rgba(100, 57, 22, 0.38);
}

.pilot-switch.red.on {
  border-color: rgba(255, 93, 93, 0.66);
  background: rgba(108, 28, 28, 0.38);
}

.pilot-switch.on .pilot-switch-light {
  background: #fff4a8;
  box-shadow: 0 0 16px rgba(255, 216, 107, 0.72);
}

.pilot-switch.on .pilot-switch-lever {
  background: linear-gradient(180deg, #fff4a8, #ff9a30);
  box-shadow:
    0 0 18px rgba(255, 190, 64, 0.68),
    inset 0 -10px 0 rgba(116, 51, 0, 0.25);
}

.pilot-switch.on em {
  color: #fff1a8;
}

.pilot-switch.green.on {
  border-color: rgba(90, 255, 152, 0.56);
  background: rgba(26, 90, 55, 0.34);
}

.pilot-switch.cyan.on {
  border-color: rgba(126, 231, 255, 0.58);
  background: rgba(24, 80, 96, 0.36);
}

.pilot-switch.pink.on {
  border-color: rgba(255, 139, 208, 0.58);
  background: rgba(94, 34, 75, 0.34);
}

.pilot-gauges div.ready {
  border-color: rgba(90, 255, 152, 0.56);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(90, 255, 152, 0.18),
      transparent 62%
    ),
    #07101c;
  box-shadow:
    0 0 18px rgba(90, 255, 152, 0.14),
    inset 0 0 28px rgba(90, 255, 152, 0.12);
}

.pilot-board-column.controls {
  grid-template-rows: auto auto auto auto auto;
}

.pilot-engine-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(126, 231, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      rgba(126, 231, 255, 0.08),
      rgba(255, 216, 107, 0.05)
    ),
    rgba(5, 10, 18, 0.46);
}

.pilot-engine-strip span {
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  overflow: hidden;
}

.pilot-engine-strip i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.54);
  font-style: normal;
  font-size: 11px;
}

.pilot-mission-plan-label {
  justify-self: start;
  border: 1px solid rgba(255, 216, 107, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 216, 107, 0.1);
  color: #fff4c7;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pilot-engine-strip span.on {
  color: #d8ffe4;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(90, 255, 152, 0.24),
      transparent 74%
    ),
    rgba(25, 91, 58, 0.34);
  box-shadow: inset 0 0 18px rgba(90, 255, 152, 0.1);
}

.pilot-engine-strip span.nudge,
.rocket-schematic-part.nudge {
  animation: pilot-needed-nudge 0.32s ease-in-out 2;
}

@keyframes pilot-needed-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  28% {
    transform: translateX(-5px);
  }
  58% {
    transform: translateX(5px);
  }
}

.pilot-engine-strip span.on i {
  background: linear-gradient(180deg, #d8ffe4, #5aff98);
  color: #07101c;
}

.pilot-engineering .pilot-throttle {
  min-height: 0;
  padding: 13px;
  gap: 10px;
  border-radius: 8px;
}

.pilot-engineering .pilot-controls {
  grid-template-columns: repeat(4, 1fr);
}

.pilot-engineering .pilot-controls button {
  min-height: 60px;
  border-radius: 8px;
  font-size: 14px;
}

.pilot-engineering .pilot-front-view {
  border: 10px solid rgba(154, 174, 188, 0.42);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 6px rgba(7, 13, 22, 0.82),
    inset 0 0 60px rgba(126, 231, 255, 0.16),
    0 24px 60px rgba(0, 0, 0, 0.34);
}

.pilot-engineering .pilot-front-view::after {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0 3px,
      transparent 3px 22px
    ),
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.22),
      transparent 42%
    ),
    linear-gradient(180deg, #42587a, #101b2c);
}

.pilot-engineering .pilot-control-board {
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(82, 91, 105, 0.98), rgba(29, 34, 45, 0.99)),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.035) 18px 19px
    );
  box-shadow:
    inset 0 0 0 5px rgba(7, 12, 20, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 58px rgba(0, 0, 0, 0.36);
}

.pilot-engineering .pilot-control-board::before {
  background:
    radial-gradient(
      circle at 12px 12px,
      rgba(255, 236, 161, 0.38) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at calc(100% - 12px) 12px,
      rgba(255, 236, 161, 0.38) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at 12px calc(100% - 12px),
      rgba(255, 236, 161, 0.26) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at calc(100% - 12px) calc(100% - 12px),
      rgba(255, 236, 161, 0.26) 0 3px,
      transparent 4px
    ),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent),
    repeating-linear-gradient(
      90deg,
      transparent 0 66px,
      rgba(0, 0, 0, 0.16) 66px 68px
    );
}

.pilot-engineering .pilot-board-column {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 15, 26, 0.44), rgba(5, 10, 18, 0.24)),
    rgba(255, 255, 255, 0.035);
}

.pilot-engineering .pilot-panel-title {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.5);
  color: #f6fbff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.pilot-engineering .pilot-panel-title i {
  color: #fff1a8;
}

.pilot-engineering .pilot-lesson {
  min-height: 124px;
  border-radius: 8px;
  background:
    linear-gradient(
      135deg,
      rgba(126, 231, 255, 0.1),
      rgba(255, 216, 107, 0.06)
    ),
    rgba(5, 11, 20, 0.56);
}

.pilot-engineering .pilot-lesson strong {
  font-size: 25px;
}

.pilot-engineering .pilot-lesson span {
  font-size: 15px;
}

.pilot-engineering .pilot-task-list span {
  position: relative;
  min-height: 32px;
  padding: 0 11px 0 30px;
}

.pilot-engineering .pilot-task-list span::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.pilot-engineering .pilot-task-list span.next::before {
  border-color: rgba(255, 216, 107, 0.82);
  background: #ffd86b;
  box-shadow: 0 0 12px rgba(255, 216, 107, 0.46);
}

.pilot-engineering .pilot-task-list span.done::before {
  border-color: rgba(89, 231, 131, 0.72);
  background: #8cffaa;
}

.pilot-engineering .pilot-power-bus {
  position: relative;
  min-height: 56px;
  grid-template-columns: repeat(7, 1fr);
  padding: 12px 8px 8px;
  background:
    linear-gradient(
      90deg,
      rgba(126, 231, 255, 0.08),
      rgba(255, 216, 107, 0.08),
      rgba(255, 128, 191, 0.07)
    ),
    rgba(5, 10, 18, 0.5);
}

.pilot-engineering .pilot-power-bus::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 15px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(126, 231, 255, 0.22),
    rgba(255, 216, 107, 0.28),
    rgba(255, 154, 223, 0.2)
  );
  box-shadow: 0 0 14px rgba(126, 231, 255, 0.14);
}

.pilot-engineering .pilot-power-bus span {
  position: relative;
  height: 30px;
  padding-bottom: 3px;
  place-items: end center;
  background:
    radial-gradient(
      circle at 50% 7px,
      rgba(255, 255, 255, 0.32) 0 3px,
      transparent 4px
    ),
    rgba(255, 255, 255, 0.12);
}

.pilot-engineering .pilot-power-bus span.on {
  background:
    radial-gradient(circle at 50% 7px, #ffffff 0 3px, transparent 4px),
    linear-gradient(180deg, #7ee7ff, #fff1a8);
}

.pilot-engineering .pilot-switch {
  --switch-glow: #ffd86b;
  position: relative;
  min-height: 84px;
  gap: 4px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.05)),
    rgba(7, 13, 22, 0.68);
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.pilot-engineering .pilot-switch.gold {
  --switch-glow: #ffd86b;
}

.pilot-engineering .pilot-switch.orange {
  --switch-glow: #ffb24e;
}

.pilot-engineering .pilot-switch.red {
  --switch-glow: #ff6f6f;
}

.pilot-engineering .pilot-switch.green {
  --switch-glow: #83ff9f;
}

.pilot-engineering .pilot-switch.cyan {
  --switch-glow: #7ee7ff;
}

.pilot-engineering .pilot-switch.pink {
  --switch-glow: #ff9adf;
}

.pilot-engineering .pilot-switch::after {
  content: "";
  position: absolute;
  left: 36px;
  right: 14px;
  top: 18px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.pilot-engineering .pilot-switch .pilot-switch-lever {
  position: relative;
  width: 32px;
  height: 52px;
  box-shadow:
    inset 0 -10px 0 rgba(0, 0, 0, 0.34),
    inset 0 4px 0 rgba(255, 255, 255, 0.08);
}

.pilot-engineering .pilot-switch .pilot-switch-lever::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.pilot-engineering .pilot-switch.on::after {
  background: linear-gradient(
    90deg,
    var(--switch-glow),
    rgba(255, 255, 255, 0.24)
  );
  box-shadow: 0 0 12px var(--switch-glow);
}

.pilot-engineering .pilot-switch.on .pilot-switch-light {
  background: #ffffff;
  box-shadow:
    0 0 12px var(--switch-glow),
    0 0 20px var(--switch-glow);
}

.pilot-engineering .pilot-switch.on .pilot-switch-lever {
  background: linear-gradient(180deg, #fffef4, var(--switch-glow) 54%, #ff8d37);
  box-shadow:
    0 0 18px var(--switch-glow),
    inset 0 -10px 0 rgba(116, 51, 0, 0.25);
}

.pilot-engineering .pilot-gauges {
  gap: 10px;
}

.pilot-engineering .pilot-gauges div {
  min-height: 66px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(126, 231, 255, 0.045) 0 2px,
      transparent 2px 8px
    ),
    #07101c;
}

.pilot-engineering .pilot-gauges strong {
  font-size: 24px;
}

.pilot-engineering .pilot-throttle {
  padding: 12px;
  gap: 8px;
  background:
    linear-gradient(
      90deg,
      rgba(126, 231, 255, 0.08),
      rgba(255, 216, 107, 0.06)
    ),
    rgba(8, 14, 24, 0.78);
}

.pilot-engineering .pilot-controls {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.pilot-engineering .pilot-gauges span,
.pilot-engineering .pilot-throttle span {
  letter-spacing: 0;
}

.pilot-thrust-cue {
  border: 1px solid rgba(110, 202, 255, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(8, 24, 44, 0.68);
}
.pilot-thrust-cue strong,
.pilot-thrust-cue span {
  display: block;
}
.pilot-thrust-cue strong {
  color: #dff6ff;
  font-size: 0.78rem;
  margin-bottom: 4px;
}
.pilot-thrust-cue span {
  color: rgba(214, 228, 255, 0.72);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@keyframes pilot-window-boost {
  from {
    transform: translate3d(-1px, 0, 0);
  }
  to {
    transform: translate3d(1px, 1px, 0);
  }
}

@keyframes pilot-radar-lock {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1.04);
  }
}

@keyframes pilot-flame-flicker {
  from {
    opacity: calc(0.55 + var(--pilot-thrust, 0) * 0.28);
    transform: translateY(-50%) scaleX(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scaleX(1.08);
  }
}

@keyframes pilot-ship-thrum {
  from {
    transform: rotate(90deg) translateX(-1px);
  }
  to {
    transform: rotate(90deg) translateX(2px);
  }
}

@media (max-width: 900px) {
  .pilot-engineering {
    grid-template-rows: 32vh 1fr;
    padding: 68px 12px 12px;
  }
  .pilot-control-board {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .pilot-front-view {
    width: calc(100vw - 24px);
  }
  .pilot-view-ship {
    width: 88px;
    height: 88px;
  }
  .pilot-engineering .pilot-controls {
    grid-template-columns: 1fr 1fr;
  }
}

.pilot-school-redesign {
  grid-template-rows: minmax(220px, 31vh) 1fr;
  gap: 12px;
  padding: 70px 18px 14px;
  background:
    radial-gradient(
      circle at 50% 8%,
      rgba(110, 178, 224, 0.18),
      transparent 30%
    ),
    linear-gradient(180deg, #07101c 0%, #171d26 54%, #06080d 100%);
}

.pilot-school-redesign .pilot-front-view {
  width: min(1040px, calc(100vw - 36px));
  border-radius: 16px;
  background:
    radial-gradient(
      circle at 72% 36%,
      rgba(255, 238, 154, 0.24),
      transparent 10%
    ),
    linear-gradient(
      115deg,
      transparent 0 44%,
      rgba(126, 231, 255, 0.08) 45% 46%,
      transparent 47%
    ),
    linear-gradient(
      65deg,
      transparent 0 52%,
      rgba(255, 216, 107, 0.07) 53% 54%,
      transparent 55%
    ),
    linear-gradient(180deg, rgba(5, 18, 31, 0.94), rgba(4, 10, 20, 0.98));
}

.pilot-school-redesign .pilot-view-readout {
  max-width: min(430px, 62%);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.pilot-school-redesign .pilot-view-readout.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.pilot-docking-meter {
  position: absolute;
  z-index: 5;
  right: 24px;
  bottom: 18px;
  width: 190px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(126, 231, 255, 0.26);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(126, 231, 255, 0.05) 0 2px,
      transparent 2px 7px
    ),
    rgba(5, 12, 23, 0.78);
  box-shadow: inset 0 0 18px rgba(126, 231, 255, 0.08);
}

.pilot-docking-meter span,
.pilot-docking-meter strong {
  position: relative;
  z-index: 1;
}

.pilot-docking-meter span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pilot-docking-meter strong {
  color: #fff1a8;
  font-size: 21px;
  font-weight: 1000;
}

.pilot-docking-meter i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(126, 231, 255, 0.18),
    rgba(90, 255, 152, 0.24)
  );
}

.pilot-docking-meter.docked {
  border-color: rgba(90, 255, 152, 0.56);
  box-shadow:
    0 0 18px rgba(90, 255, 152, 0.16),
    inset 0 0 20px rgba(90, 255, 152, 0.12);
}

.pilot-docking-meter.hidden {
  opacity: 0;
  pointer-events: none;
}

.engineering-console {
  width: min(1160px, calc(100vw - 28px));
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  background:
    radial-gradient(
      circle at 18px 18px,
      rgba(255, 255, 255, 0.18) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at calc(100% - 18px) 18px,
      rgba(255, 255, 255, 0.18) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at 18px calc(100% - 18px),
      rgba(255, 255, 255, 0.18) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at calc(100% - 18px) calc(100% - 18px),
      rgba(255, 255, 255, 0.18) 0 3px,
      transparent 4px
    ),
    linear-gradient(180deg, rgba(72, 81, 93, 0.98), rgba(30, 35, 44, 0.99)),
    repeating-linear-gradient(
      90deg,
      transparent 0 22px,
      rgba(255, 255, 255, 0.035) 22px 23px
    );
  box-shadow:
    inset 0 0 0 5px rgba(6, 10, 16, 0.44),
    0 24px 58px rgba(0, 0, 0, 0.36);
}

.engineering-console::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 48px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(126, 231, 255, 0.18),
    rgba(255, 216, 107, 0.34),
    rgba(126, 231, 255, 0.18)
  );
  pointer-events: none;
}

.engineering-console .pilot-board-column {
  min-height: 0;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      transparent 0 48%,
      rgba(255, 255, 255, 0.05) 48% 52%,
      transparent 52%
    ),
    linear-gradient(180deg, rgba(10, 17, 28, 0.72), rgba(6, 10, 18, 0.42)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.engineering-brief {
  grid-template-rows: auto auto auto;
  overflow: hidden;
}

.engineering-brief .pilot-lesson {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  align-self: start;
  overflow: hidden;
  contain: paint;
  border-radius: 8px;
  padding: 12px 14px 14px;
  gap: 6px;
}

.engineering-brief .pilot-lesson strong {
  font-size: 20px;
}

.engineering-brief .pilot-lesson span {
  display: block;
  width: min(100%, 31ch);
  max-width: 31ch;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.engineering-brief .pilot-lesson strong,
.engineering-brief .pilot-lesson span {
  min-width: 0;
}

.pilot-engine-strip span.next {
  color: #fff1a8;
  border: 1px solid rgba(255, 216, 107, 0.42);
  background: rgba(122, 82, 24, 0.28);
  box-shadow: inset 0 0 18px rgba(255, 216, 107, 0.08);
}

.rocket-schematic {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  min-height: 260px;
  padding: 14px;
  border: 1px solid rgba(126, 231, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 17, 28, 0.92), rgba(4, 9, 16, 0.92)),
    repeating-linear-gradient(
      0deg,
      transparent 0 24px,
      rgba(126, 231, 255, 0.05) 24px 25px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 24px,
      rgba(126, 231, 255, 0.04) 24px 25px
    );
}

.rocket-schematic.pilot-board-image {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  align-items: end;
  gap: 14px;
  padding: 22px 20px 18px;
  background:
    radial-gradient(
      circle at 50% 12%,
      rgba(126, 231, 255, 0.16),
      transparent 34%
    ),
    linear-gradient(180deg, rgba(5, 10, 18, 0.18), rgba(5, 10, 18, 0.44)),
    var(--pilot-board-bg) center / cover no-repeat,
    linear-gradient(180deg, rgba(8, 17, 28, 0.92), rgba(4, 9, 16, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(126, 231, 255, 0.1),
    inset 0 -24px 42px rgba(0, 0, 0, 0.3);
}

.rocket-schematic.pilot-board-image::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 15px;
  height: 18px;
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 8% 50%,
      rgba(255, 216, 107, 0.7) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at 18% 50%,
      rgba(90, 255, 152, 0.55) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at 28% 50%,
      rgba(126, 231, 255, 0.55) 0 3px,
      transparent 4px
    ),
    linear-gradient(
      90deg,
      rgba(126, 231, 255, 0.18),
      rgba(255, 216, 107, 0.1),
      rgba(126, 231, 255, 0.18)
    );
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.rocket-schematic::before {
  content: "";
  position: absolute;
  left: 38px;
  right: 38px;
  top: 82px;
  height: 8px;
  border-radius: 999px;
  background: rgba(104, 123, 140, 0.32);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.36);
}

.rocket-schematic-part {
  position: relative;
  z-index: 1;
  min-height: 220px;
  display: grid;
  grid-template-rows: 104px auto auto;
  gap: 8px;
  align-items: center;
  justify-items: center;
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    #111923;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.2),
    0 10px 18px rgba(0, 0, 0, 0.18);
}

.rocket-schematic-part:focus {
  outline: none;
}

.rocket-schematic-part.next:focus-visible {
  outline: 3px solid rgba(255, 216, 107, 0.72);
  outline-offset: 2px;
}

.pilot-board-image .rocket-schematic-part {
  min-height: 152px;
  align-self: stretch;
  grid-template-rows: 66px auto auto;
  border: 2px solid rgba(197, 220, 235, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(40, 50, 62, 0.92), rgba(11, 17, 26, 0.96)),
    rgba(9, 16, 27, 0.84);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 0 rgba(0, 0, 0, 0.28),
    0 10px 16px rgba(0, 0, 0, 0.2);
}

.pilot-board-image .rocket-schematic-part.next {
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 216, 107, 0.28),
      transparent 58%
    ),
    linear-gradient(180deg, rgba(88, 63, 24, 0.9), rgba(14, 18, 25, 0.96));
}

.pilot-board-image .rocket-schematic-part.on {
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(90, 255, 152, 0.28),
      transparent 58%
    ),
    linear-gradient(180deg, rgba(21, 82, 59, 0.92), rgba(6, 23, 18, 0.96));
}

.pilot-board-image .rocket-schematic-part .schematic-icon {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background-color: rgba(18, 25, 35, 0.92);
}

.pilot-board-image .rocket-schematic-part::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 8px rgba(126, 231, 255, 0.12);
}

.pilot-board-image .rocket-schematic-part.next::before {
  background: linear-gradient(90deg, #fff4a8, #ff9a30);
  box-shadow: 0 0 14px rgba(255, 216, 107, 0.46);
}

.pilot-board-image .rocket-schematic-part.on::before {
  background: linear-gradient(90deg, #d8ffe4, #5aff98);
  box-shadow: 0 0 14px rgba(90, 255, 152, 0.36);
}

.rocket-schematic-part.next {
  border-color: rgba(255, 216, 107, 0.68);
  color: #fff4c7;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(255, 216, 107, 0.08),
    0 0 22px rgba(255, 216, 107, 0.12),
    inset 0 -5px 0 rgba(0, 0, 0, 0.18);
  animation: schematic-next-pulse 0.9s ease-in-out infinite alternate;
}

.rocket-schematic-part.on {
  border-color: rgba(90, 255, 152, 0.55);
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(90, 255, 152, 0.18),
      transparent 58%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.06)),
    #14221f;
  color: #d8ffe4;
}

.rocket-schematic-part strong {
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
}

.rocket-schematic-part em {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.rocket-schematic-part.on em,
.rocket-schematic-part.next em {
  color: inherit;
}

.rocket-schematic-part b {
  position: absolute;
  z-index: -1;
  right: -18px;
  top: 82px;
  width: 26px;
  height: 8px;
  border-radius: 999px;
  background: rgba(104, 123, 140, 0.4);
}

.rocket-schematic-part b.on {
  background: linear-gradient(90deg, #7ee7ff, #fff1a8);
  box-shadow: 0 0 14px rgba(126, 231, 255, 0.4);
}

.schematic-icon {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: linear-gradient(180deg, #4f5b69, #202936);
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 0 rgba(0, 0, 0, 0.2);
}

.schematic-icon::before,
.schematic-icon::after {
  content: "";
  position: absolute;
}

.schematic-icon.electricity {
  border-radius: 14px;
  background: linear-gradient(180deg, #6e7781, #242d38);
}

.schematic-icon.electricity::before {
  left: 31px;
  top: 14px;
  width: 18px;
  height: 52px;
  clip-path: polygon(54% 0, 20% 42%, 48% 42%, 34% 100%, 82% 34%, 52% 34%);
  background: #ffd86b;
  filter: drop-shadow(0 0 10px rgba(255, 216, 107, 0.6));
}

.schematic-icon.fuel {
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, #a8f0ff, #2487a0 58%, #193544);
}

.schematic-icon.fuel::before {
  inset: 14px 18px 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

.schematic-icon.spark {
  border-radius: 999px;
  background: radial-gradient(
    circle,
    #fff7ba 0 18%,
    #ff9a30 19% 38%,
    #642f68 39% 66%,
    #232936 67%
  );
}

.schematic-icon.spark::before {
  left: 10px;
  right: 10px;
  top: 39px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  transform: rotate(-25deg);
}

.schematic-icon.thrust {
  border-radius: 48% 48% 18px 18px;
  background: linear-gradient(180deg, #cbd5df, #667686 52%, #1f2732);
}

.schematic-icon.thrust::before {
  left: 18px;
  right: 18px;
  bottom: -14px;
  height: 30px;
  border-radius: 0 0 999px 999px;
  background: radial-gradient(
    circle at 50% 0,
    #fff6a7,
    #ff9a30 44%,
    rgba(255, 60, 20, 0) 72%
  );
  opacity: 0.76;
}

.rocket-schematic-part.on .schematic-icon {
  box-shadow:
    0 0 18px rgba(90, 255, 152, 0.24),
    inset 0 6px 0 rgba(255, 255, 255, 0.16),
    inset 0 -8px 0 rgba(0, 0, 0, 0.2);
}

.flight-controls-simple {
  grid-template-rows: auto auto auto auto auto;
}

.big-throttle {
  min-height: 150px;
}

.big-throttle input {
  height: 34px;
}

.throttle-joystick {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.throttle-joystick > span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.06em;
}

.throttle-stick-track {
  position: relative;
  height: 126px;
  min-width: 78px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12) 0 2px,
      transparent 2px 15px
    ),
    linear-gradient(180deg, rgba(8, 14, 24, 0.94), rgba(4, 8, 14, 0.98));
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.5),
    0 10px 18px rgba(0, 0, 0, 0.18);
  touch-action: none;
}

.throttle-stick-rail {
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 12px;
  width: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent), #121923;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.72);
}

.throttle-stick-fill {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 12px;
  max-height: calc(100% - 24px);
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff1a8, #ff9a30);
  box-shadow: 0 0 14px rgba(255, 190, 64, 0.42);
}

.throttle-stick-handle {
  position: absolute;
  left: 50%;
  width: 68px;
  height: 60px;
  border: 1px solid rgba(255, 216, 107, 0.68);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe58d, #ff9b36 58%, #d96820);
  transform: translate(-50%, 50%);
  box-shadow:
    0 6px 0 #8c3b16,
    0 12px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.pilot-meter-row {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(126, 231, 255, 0.22);
  border-radius: 8px;
  background: #07101c;
}

.pilot-meter-row span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pilot-meter-row strong {
  position: relative;
  z-index: 1;
  color: #fff1a8;
  font-size: 26px;
  font-weight: 1000;
}

.pilot-meter-row i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background:
    linear-gradient(
      90deg,
      rgba(126, 231, 255, 0.22),
      rgba(255, 216, 107, 0.26)
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.1) 18px 20px
    );
}

.pilot-steer-pad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.pilot-steer-pad button,
.support-toggle-row button {
  min-height: 66px;
  border: 1px solid rgba(255, 216, 107, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe58d, #ff963d);
  color: #211207;
  font-size: 17px;
  font-weight: 1000;
  box-shadow:
    0 8px 0 #8c3b16,
    0 14px 18px rgba(0, 0, 0, 0.2);
}

.pilot-steer-pad button:active,
.support-toggle-row button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 #8c3b16,
    0 8px 14px rgba(0, 0, 0, 0.18);
}

.pilot-dock-button {
  min-height: 70px;
  border: 1px solid rgba(126, 231, 255, 0.46);
  border-radius: 8px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.28),
      transparent 58%
    ),
    linear-gradient(180deg, #8df4ff, #3fa7ff 56%, #1661a8);
  color: #04111e;
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow:
    0 8px 0 #0b3f70,
    0 16px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.pilot-dock-button.active {
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.34),
      transparent 58%
    ),
    linear-gradient(180deg, #d8ffe4, #5aff98 56%, #1d8f5a);
  box-shadow:
    0 8px 0 #11643a,
    0 0 24px rgba(90, 255, 152, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.pilot-dock-button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 #0b3f70,
    0 10px 16px rgba(0, 0, 0, 0.2);
}

.pilot-school-redesign .pilot-view-ship {
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 10px rgba(126, 231, 255, 0.24));
  width: 122px;
  height: 122px;
  isolation: isolate;
  transform-origin: center;
  transition:
    filter 140ms ease-out,
    width 0.45s ease,
    height 0.45s ease,
    transform 0.45s ease;
}

.pilot-school-redesign .pilot-view-ship img {
  position: relative;
  z-index: 3;
  transform: rotate(0deg) scale(1.12);
  filter: saturate(1.08) contrast(1.05)
    drop-shadow(0 0 8px rgba(126, 231, 255, 0.22));
}

.pilot-school-redesign .pilot-view-ship::after {
  z-index: 0;
  left: auto;
  right: 82%;
  top: 55%;
  width: calc(34px + var(--pilot-thrust, 0) * 92px);
  height: calc(12px + var(--pilot-thrust, 0) * 12px);
  transform: translateY(-50%) rotate(-2deg);
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 92% 50%,
      rgba(255, 255, 255, 0.88),
      rgba(255, 225, 120, 0.72) 22%,
      rgba(255, 128, 38, 0.42) 44%,
      transparent 72%
    ),
    linear-gradient(90deg, transparent, rgba(126, 231, 255, 0.22));
  opacity: calc(0.06 + var(--pilot-thrust, 0) * 0.54);
  filter: blur(0.2px) drop-shadow(0 0 18px rgba(255, 153, 61, 0.54));
}

.pilot-school-redesign .pilot-view-ship > span {
  z-index: 1;
  left: calc(-48px - var(--pilot-thrust, 0) * 42px);
  top: 56%;
  width: calc(52px + var(--pilot-thrust, 0) * 78px);
  height: calc(16px + var(--pilot-thrust, 0) * 20px);
  transform: translateY(-50%) rotate(-2deg);
  border-radius: 999px 26px 26px 999px;
  background:
    radial-gradient(
      circle at 90% 50%,
      #fffef4,
      #fff4a8 18%,
      #ff9a30 42%,
      rgba(255, 72, 23, 0.18) 62%,
      transparent 78%
    ),
    linear-gradient(90deg, rgba(126, 231, 255, 0), rgba(255, 154, 52, 0.76));
}

.pilot-school-redesign .pilot-view-ship.backing-up::after,
.pilot-school-redesign .pilot-view-ship.backing-up > span {
  opacity: 0 !important;
  animation: none;
}

.pilot-school-redesign .pilot-view-ship.backing-up::before {
  inset: 36px 72px 34px -10px;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(199, 246, 255, 0.7),
      transparent 52%
    ),
    radial-gradient(
      circle at 72% 35%,
      rgba(126, 231, 255, 0.42),
      transparent 58%
    );
  opacity: 0.72;
  filter: drop-shadow(0 0 14px rgba(126, 231, 255, 0.42));
}

.pilot-school-redesign .pilot-star-target {
  width: 138px;
  height: 96px;
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(126, 231, 255, 0.12),
      transparent 66%
    ),
    rgba(5, 12, 23, 0.24);
  color: #d8f7ff;
  box-shadow: none;
}

.pilot-docking-lane {
  position: absolute;
  z-index: 1;
  left: 43%;
  right: 16%;
  top: 46%;
  height: 46px;
  border-top: 2px dashed rgba(126, 231, 255, 0.18);
  border-radius: 50%;
  transform: rotate(-10deg);
  opacity: 0;
  pointer-events: none;
}

.pilot-docking-lane::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -8px;
  width: 14px;
  height: 14px;
  border-top: 3px solid rgba(126, 231, 255, 0.35);
  border-right: 3px solid rgba(126, 231, 255, 0.35);
  transform: rotate(45deg);
}

.pilot-docking-lane.on {
  border-color: rgba(90, 255, 152, 0.6);
  opacity: 0.72;
  filter: drop-shadow(0 0 8px rgba(90, 255, 152, 0.3));
}

.pilot-docking-lane.on::after {
  border-color: rgba(90, 255, 152, 0.72);
}

.pilot-school-redesign .pilot-star-target img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(126, 231, 255, 0.28))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.36));
}

.pilot-school-redesign .pilot-star-target span {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 12, 23, 0.76);
  color: #d8f7ff;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0;
}

.pilot-school-redesign .pilot-star-target::before,
.pilot-school-redesign .pilot-star-target::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.pilot-school-redesign .pilot-star-target::after {
  inset: 28px;
}

.pilot-school-redesign .pilot-star-target.on img {
  filter: drop-shadow(0 0 18px rgba(126, 231, 255, 0.58))
    drop-shadow(0 0 28px rgba(90, 255, 152, 0.28))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.36));
}

@keyframes schematic-next-pulse {
  from {
    transform: translateY(-1px);
  }
  to {
    transform: translateY(-4px);
  }
}

.support-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.support-toggle-row button {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: linear-gradient(180deg, #334154, #182232);
  color: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}

.support-toggle-row button.on {
  border-color: rgba(90, 255, 152, 0.48);
  background:
    radial-gradient(circle at 50% 0, rgba(90, 255, 152, 0.24), transparent 65%),
    linear-gradient(180deg, #274e42, #162b27);
  color: #d8ffe4;
}

.support-toggle-row button span {
  font-size: 11px;
  font-weight: 900;
  opacity: 0.78;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .pilot-school-redesign {
    grid-template-rows: 29vh 1fr;
    padding: 66px 10px 10px;
  }

  .engineering-console {
    grid-template-columns: 1fr;
    overflow: auto;
    align-content: start;
  }

  .engineering-console .pilot-board-column {
    margin-bottom: 10px;
  }

  .rocket-schematic {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }

  .rocket-schematic::before,
  .rocket-schematic-part b {
    display: none;
  }

  .rocket-schematic-part {
    min-height: 132px;
    grid-template-rows: 60px auto auto;
    padding: 10px 8px;
  }

  .rocket-schematic.pilot-board-image {
    grid-template-columns: 1fr 1fr;
  }

  .pilot-board-image .rocket-schematic-part {
    min-height: 132px;
  }

  .schematic-icon {
    width: 54px;
    height: 54px;
  }

  .pilot-school-redesign .pilot-view-readout {
    max-width: 72%;
  }

  .pilot-docking-meter {
    right: 14px;
    bottom: 10px;
    width: 132px;
    min-height: 40px;
    padding: 6px 8px;
  }

  .pilot-docking-meter span {
    font-size: 10px;
  }

  .pilot-docking-meter strong {
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .pilot-level {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .pilot-school-redesign {
    min-height: 100svh;
    height: auto;
    grid-template-rows: 200px auto;
    gap: 8px;
    padding: 66px 8px 8px;
  }

  .pilot-school-redesign .pilot-front-view {
    border-width: 7px;
    border-radius: 14px;
  }

  .pilot-school-redesign .pilot-window-monitor {
    width: 116px;
    min-height: 50px;
    padding: 7px 9px;
  }

  .pilot-school-redesign .pilot-window-monitor strong {
    font-size: 12px;
  }

  .pilot-school-redesign .pilot-window-monitor span {
    font-size: 12px;
  }

  .pilot-school-redesign .pilot-star-target {
    right: 9%;
    top: 36%;
    width: 94px;
    height: 68px;
    font-size: 11px;
  }

  .pilot-school-redesign .pilot-view-ship {
    width: 82px;
    height: 82px;
  }

  .pilot-docking-lane {
    left: 42%;
    right: 20%;
    top: 50%;
    height: 30px;
  }

  .pilot-school-redesign .pilot-view-readout {
    left: 18px;
    right: auto;
    bottom: 12px;
    max-width: 52%;
    padding: 8px 11px;
    background: rgba(5, 11, 20, 0.82);
  }

  .pilot-school-redesign .pilot-view-readout strong {
    font-size: 17px;
  }

  .pilot-school-redesign .pilot-view-readout span {
    display: none;
  }

  .engineering-console {
    display: block;
    overflow: visible;
    padding: 10px;
  }

  .engineering-console .pilot-board-column {
    display: grid;
    margin-bottom: 10px;
  }

  .engineering-brief .pilot-lesson {
    min-height: 74px;
    padding: 10px 12px;
  }

  .engineering-brief .pilot-lesson strong {
    font-size: 20px;
  }

  .engineering-brief .pilot-lesson span {
    font-size: 13px;
    line-height: 1.2;
  }

  .pilot-engine-strip {
    gap: 6px;
    padding: 6px;
  }

  .pilot-engine-strip span {
    min-height: 36px;
    grid-template-columns: 18px 1fr;
    padding: 0 6px;
    font-size: 10px;
  }

  .pilot-engine-strip i {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .rocket-schematic {
    gap: 8px;
    padding: 8px;
  }

  .rocket-schematic-part {
    min-height: 96px;
    gap: 4px;
    grid-template-rows: 42px auto auto;
  }

  .pilot-board-image .rocket-schematic-part {
    min-height: 104px;
    grid-template-rows: 42px auto auto;
  }

  .rocket-schematic-part strong {
    font-size: 12px;
  }

  .rocket-schematic-part em {
    font-size: 10px;
  }

  .schematic-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .schematic-icon.electricity::before {
    left: 18px;
    top: 8px;
    height: 32px;
  }

  .big-throttle {
    min-height: 64px;
  }

  .pilot-meter-row {
    min-height: 50px;
  }

  .pilot-steer-pad button,
  .support-toggle-row button {
    min-height: 60px;
    min-width: 60px;
    font-size: 15px;
  }
}

/* Round-3: surfaces window.__spaceErrors so kids on a broken level see
   a recovery affordance instead of staring at a blank screen. */
.space-error-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  padding: 16px 24px;
  min-height: 56px;
  border-radius: 999px;
  background: rgba(20, 32, 48, 0.92);
  color: #fff8d8;
  border: 2px solid rgba(255, 200, 88, 0.85);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  animation: space-error-toast-pulse 1.6s ease-in-out infinite;
}
.space-error-toast span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.82;
}
.space-error-toast:active {
  transform: translateX(-50%) scale(0.96);
}
@keyframes space-error-toast-pulse {
  0%,
  100% {
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.45),
      0 0 0 0 rgba(255, 200, 88, 0.4);
  }
  50% {
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.45),
      0 0 0 10px rgba(255, 200, 88, 0);
  }
}
