:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #edf5f0;
  background: #000;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overscroll-behavior: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  border: 1px solid #42514a;
  background: #17251d;
  border-radius: 10px;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #96e6b8;
  outline-offset: 3px;
}
button:not(#boost):active,
.pressed {
  background: #346c4c !important;
  border-color: #a5ebc3 !important;
}
main {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 440px;
  overflow: hidden;
  background: #000;
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(#101b15f2, #101b15b3, transparent);
  gap: 10px;
}
.brand {
  font-size: 14px;
  letter-spacing: 0.02em;
  visibility: hidden;
  pointer-events: none;
}
.brand small {
  display: block;
  color: #86b497;
  font-size: 10px;
  margin-top: 2px;
}
.topbar button {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 12px;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.hud {
  position: absolute;
  top: calc(65px + env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  font-size: 10px;
  color: #a3b8ab;
}
.telemetry {
  display: flex;
  gap: 16px;
}
.telemetry b {
  display: block;
  color: #edf5f0;
  font:
    15px ui-monospace,
    monospace;
  margin-top: 3px;
}
.landing-state {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 140px;
  font-size: 10px;
  line-height: 1.3;
}
.landing-lamp {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-radius: 50%;
}
.green {
  background: #86cfac;
  box-shadow: 0 0 12px #86cfac55;
}
.orange {
  background: #e4ac62;
  box-shadow: 0 0 12px #e4ac6255;
}
.red {
  background: #ed877e;
  box-shadow: 0 0 12px #ed877e55;
}
.touch {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #0c1611e6);
  touch-action: none;
}
.control-group {
  display: flex;
  gap: 8px;
}
.touch button {
  width: 64px;
  height: 68px;
  font-size: 28px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: #17251de6;
}
.touch button span {
  display: block;
  font-size: 9px;
  color: #b6cdc0;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.touch .throttle {
  width: 86px;
  background: #244a33e6;
}
.touch .reduce {
  font-size: 25px;
  width: 56px;
}
.drawer {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: #0b1510f7;
  overflow: auto;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(25px + env(safe-area-inset-bottom));
}
.drawer[hidden] {
  display: none;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.drawer h1 {
  font-size: 20px;
  margin: 0;
}
.drawer button {
  min-height: 44px;
  padding: 8px 14px;
}
.back {
  color: #9dceb0;
  font-size: 13px;
  text-decoration: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 22px 0;
}
.stat {
  font-size: 11px;
  color: #a4b8ac;
}
.stat b {
  display: block;
  font:
    19px ui-monospace,
    monospace;
  color: #edf5f0;
  margin-top: 5px;
}
.cockpit {
  border-top: 1px solid #32483a;
  padding: 20px 0;
}
.assist-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.options-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #32483a;
}
.options-block h2 {
  margin: 0 0 12px;
  font-size: 13px;
  color: #c3e7d0;
}
.option-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.option-row > b {
  color: #edf5f0;
  font: 600 12px ui-monospace, monospace;
}
.option-volume {
  grid-template-columns: minmax(72px, auto) minmax(120px, 1fr) auto;
}
.option-volume input[type='range'] {
  width: 100%;
  accent-color: #86cfac;
}
.toggle {
  width: 52px;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 20px;
  position: relative;
  padding: 0 !important;
  background: #353d42;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e9eeee;
  transition: transform 0.15s;
}
.toggle[aria-checked='true'] {
  background: #377356;
  border-color: #86cfac;
}
.toggle[aria-checked='true']::after {
  transform: translateX(22px);
}
.help,
.panel-note {
  font-size: 12px;
  line-height: 1.7;
  color: #a4b8ac;
}
.commander-log {
  font-size: 12px;
  line-height: 1.7;
}
.commander-log > summary {
  cursor: pointer;
  padding: 16px 0;
  color: #edf5f0;
}
.commander-log ul {
  padding-left: 18px;
}
.commander-log li {
  margin: 12px 0;
}
.log-version {
  color: #86cfac;
  margin-left: 8px;
}
kbd {
  padding: 2px 5px;
  background: #263d2e;
  border-radius: 3px;
}
.keyboard-note {
  display: none;
}
@media (min-width: 701px) {
  .topbar {
    padding: 16px 24px;
  }
  .brand {
    font-size: 18px;
  }
  .hud {
    left: 24px;
    right: 24px;
    top: 80px;
  }
  .telemetry {
    gap: 26px;
  }
  .telemetry b {
    font-size: 19px;
  }
  .landing-state {
    font-size: 12px;
    max-width: 230px;
  }
  .touch {
    padding: 20px 24px;
  }
  .keyboard-note {
    display: block;
    align-self: center;
    color: #8fae9b;
    font-size: 12px;
  }
  .drawer {
    left: auto;
    width: 420px;
    border-left: 1px solid #32483a;
  }
  .touch button {
    height: 64px;
  }
  .topbar button {
    font-size: 13px;
  }
}
@media (max-width: 359px) {
  .touch {
    padding-left: 10px;
    padding-right: 10px;
    gap: 8px;
  }
  .touch button {
    width: 55px;
  }
  .touch .throttle {
    width: 74px;
  }
  .touch .reduce {
    width: 48px;
  }
  .telemetry {
    gap: 10px;
  }
  .telemetry b {
    font-size: 13px;
  }
  .landing-state {
    max-width: 110px;
  }
}
.joystick-wrap {
  flex-shrink: 0;
  margin-left: auto;
}
.joystick {
  position: relative;
  width: 132px;
  height: 132px;
  border: 1px solid #87b59a88;
  border-radius: 50%;
  background: radial-gradient(circle, #31584166, #102b1caa);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: inset 0 0 25px #86cfac14;
}
.joystick.active {
  border-color: #a5ebc3;
  box-shadow: 0 0 18px #86cfac22;
}
.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #a5ebc3;
  background: #507c60ed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 3px 12px #0008;
}
.joystick span {
  position: absolute;
  pointer-events: none;
  color: #b9d6c4;
  font-size: 9px;
}
.joystick-up {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.joystick-down {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.joystick-left {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.joystick-right {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 359px) {
  .joystick {
    width: 120px;
    height: 120px;
  }
}
.level-map {
  position: absolute;
  z-index: 2;
  right: 5px;
  top: calc(130px + env(safe-area-inset-top));
  bottom: calc(180px + env(safe-area-inset-bottom));
  width: 62px;
  border: 1px solid #698575;
  border-radius: 4px;
  background: #0b1811df;
  pointer-events: none;
  overflow: hidden;
}
#mapPlatforms span {
  position: absolute;
  height: 2px;
  background: #648473;
}
#mapViewport {
  position: absolute;
  left: 0;
  right: 0;
  background: #86cfac18;
  border: 1px solid #86cfac99;
  border-radius: 2px;
}
.map-repairs,
.pause-map-repairs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.repair-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.map-repair {
  overflow: visible;
}
.map-repair path {
  fill: #99c6a6;
  stroke: #0b1811;
  stroke-width: 0.5;
  stroke-linejoin: miter;
  shape-rendering: crispEdges;
}
#mapShip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e9fff2;
  box-shadow: 0 0 5px #b6ffd1;
  transform: translate(-50%, -50%);
}
@media (min-width: 701px) {
  .level-map {
    width: 76px;
    right: 8px;
    top: 140px;
  }
}
.landing-account {
  display: flex;
  align-items: center;
  gap: 12px;
}
.landing-account .landing-state {
  flex: 1;
  min-width: 0;
}
.credit-balance {
  flex-shrink: 0;
}
.credit-balance b {
  display: block;
  margin-top: 3px;
  color: #e7cf8f;
  font:
    15px ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
}
.hud {
  flex-wrap: wrap;
}
.landing-account {
  margin-left: auto;
}
@media (max-width: 700px) {
  .hud {
    row-gap: 10px;
  }
  .telemetry {
    flex: 0 0 100%;
    justify-content: space-between;
  }
  .landing-account {
    width: 100%;
    justify-content: space-between;
  }
  .landing-state {
    max-width: none;
  }
  .level-map {
    top: calc(155px + env(safe-area-inset-top));
  }
}
#fire {
  flex-shrink: 0;
  width: 64px;
  height: 76px;
  border-color: #86cfac;
  background: #203b2bcc;
  align-self: flex-end;
}
@media (max-width: 359px) {
  #fire {
    width: 64px;
    height: 68px;
  }
}
.victory {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100% - 32px));
  padding: 28px;
  text-align: center;
  border: 1px solid #86cfac;
  border-radius: 14px;
  background: #0a1c13f5;
  box-shadow: 0 0 60px #000;
}
.victory[hidden] {
  display: none;
}
.victory p {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #86cfac;
}
.victory h1 {
  margin: 10px 0 24px;
}
.victory div {
  font-size: 12px;
  color: #a4b8ac;
  margin: 15px 0;
}
.victory strong {
  display: block;
  color: #8affbd;
  font: 24px monospace;
  margin: 5px;
}
.victory button {
  padding: 12px 24px;
  margin-top: 12px;
}
.pause-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 20px;
  background: #06100a66;
}
.pause-map-overlay[hidden] {
  display: none;
}
.pause-map-canvas {
  position: relative;
  width: 75vw;
  height: 75vh;
  max-width: 75vw;
  max-height: 75vh;
  border: 1px solid #93d7b1;
  border-radius: 8px;
  background: #0a1a12cc;
  box-shadow: 0 0 40px #0009;
  overflow: hidden;
}
.pause-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}
#pauseMapLayer {
  opacity: 0.75;
}
#pauseMapViewport {
  fill: #b8ffe31f;
  stroke: #d4ffe8;
  stroke-width: 10;
}
#pauseMapShip {
  fill: #f4fff9;
  stroke: #57c389;
  stroke-width: 12;
}
.pause-map-note {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #5f9275;
  border-radius: 4px;
  background: #0a1812cc;
  color: #defbe9;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
.weapon-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.weapon-controls #fire {
  align-self: center;
}
.weapon-stack {
  width: 78px;
}
.weapon-wheel {
  height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  border: 1px solid #526e5e;
  border-radius: 10px;
  background: linear-gradient(#101b16, #284c35 50%, #101b16);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ns-resize;
}
.weapon-wheel:focus-visible {
  outline: 2px solid #96e6b8;
  outline-offset: 3px;
}
.wheel-edge {
  height: 20px;
  line-height: 20px;
  color: #86b497;
  font-size: 13px;
  pointer-events: none;
}
.weapon-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.weapon-current strong {
  font: 11px monospace;
  letter-spacing: 0.08em;
  color: #d9ffe7;
}
.weapon-current span {
  font: 9px monospace;
  color: #b6cdc0;
}
.weapon-icon {
  height: 28px;
  display: grid;
  place-items: center;
}
.weapon-icon[hidden] {
  display: none;
}
.weapon-hint {
  text-align: center;
  color: #a3b8ab;
  font: 8px monospace;
  margin-top: 5px;
  min-height: 10px;
}
.keyboard-note {
  max-width: 380px;
  line-height: 1.7;
} /* Cockpit sections and the combined weapon control. */
#fire.weapon-wheel {
  width: 104px;
  height: 132px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  font-size: 12px;
}
.weapon-stack {
  width: 104px;
}
.touch #fire .wheel-edge {
  display: block;
  margin: 0;
  font: 9px/24px monospace;
  height: 24px;
  color: #86b497;
}
.touch #fire .weapon-current {
  display: flex;
  margin: 0;
  gap: 3px;
}
.touch #fire .weapon-icon {
  display: grid;
  margin: 0;
  height: 28px;
}
.touch #fire .weapon-icon[hidden] {
  display: none;
}
.touch #fire #weaponAmmo {
  margin: 0;
  font: 11px monospace;
}
.weapon-hint {
  font-size: 9px;
  min-height: 12px;
}
.hud .landing-account {
  width: 100%;
  margin: 0;
}
.cockpit-section {
  border-top: 1px solid #32483a;
}
.cockpit-section > summary {
  padding: 18px 0;
  cursor: pointer;
  font-size: 16px;
  color: #c3e7d0;
}
.section-body {
  padding-bottom: 20px;
}
.section-body h2 {
  font-size: 15px;
  margin: 4px 0 12px;
}
.section-body .telemetry {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: #a4b8ac;
}
.section-body .telemetry b {
  font-size: 17px;
}
.section-body .cockpit {
  border: 0;
  padding: 0;
}
.position-stat {
  margin-bottom: 16px;
}
.position-stat b {
  font-size: 15px;
}
.module-card {
  border: 1px solid #32483a;
  background: #14251b;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 13px;
}
.module-card p {
  font-size: 12px;
  line-height: 1.6;
  color: #a4b8ac;
  margin: 6px 0 0;
}
.module-card.is-active {
  border-color: #7bc88d;
  box-shadow: 0 0 0 1px #7bc88d inset;
}
.map-card .level-map {
  position: relative;
  inset: auto;
  width: min(100%, 240px);
  height: auto;
  aspect-ratio: 2/3;
  margin: 0 auto;
  border-radius: 6px;
}
.map-card .help {
  text-align: center;
}
.map-card {
  margin: 4px 0 14px;
}
.drawer .stats {
  padding: 20px 0;
}
.drawer .commander-log {
  margin-top: 0;
}
.drawer .commander-log > summary {
  font-size: 12px;
}
#fire.weapon-wheel {
  position: relative;
  width: var(--weapon-control-width);
  height: var(--weapon-control-height);
  padding-right: 7px;
}
.weapon-stack {
  width: var(--weapon-control-width);
}
.touch #fire .wheel-edge {
  font-size: 7px;
  line-height: 15px;
  height: 15px;
}
.touch #fire .weapon-current {
  gap: 1px;
}
.touch #fire .weapon-icon {
  height: 22px;
}
.touch #fire .weapon-icon svg {
  width: 20px;
  height: 22px;
}
.weapon-current strong {
  font-size: 9px;
}
.touch #fire #weaponAmmo {
  font-size: 9px;
}
.weapon-hint {
  font-size: 8px;
}
.touch #fire .weapon-scroll {
  display: block;
  position: absolute;
  right: 3px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  margin: 0;
  border-radius: 2px;
  background: #0a160e;
  pointer-events: none;
}
.touch #fire #weaponScrollThumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 33.333%;
  margin: 0;
  border-radius: 2px;
  background: #8affbd;
  transition: top 0.12s ease;
}
.hull-meter {
  width: clamp(120px, 45vw, 280px);
  height: 12px;
  border: 1px solid #6c927b;
  border-radius: 3px;
  overflow: hidden;
  background: #17271e;
}
.hull-bar {
  height: 100%;
  width: 100%;
  background: #86cfac;
  transition: width 0.12s linear;
}
.hud .landing-account {
  justify-content: space-between;
}
.inspiration {
  padding: 0;
  font-size: 12px;
  color: #a4b8ac;
  line-height: 1.6;
}
.inspiration a {
  display: block;
  color: #8affbd;
}
.lives-meter {
  display: flex;
  gap: 5px;
  align-items: center;
}
.heart {
  position: relative;
  display: block;
  width: 22px;
  height: 24px;
}
.heart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}
.heart-empty {
  fill: #263d30;
  stroke: #6b927b;
  stroke-width: 0.3;
}
.heart-fill {
  fill: #8affbd;
  transition: clip-path 0.12s linear;
}
.intro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #020a07e8;
  overflow: auto;
}
.intro[hidden] {
  display: none;
}
.intro-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: min(440px, 100%);
  padding: 24px;
  text-align: left;
  border: 1px solid #86cfac;
  border-radius: 12px;
  background: #101e16;
  color: #c1d8ca;
  line-height: 1.55;
  font-size: 13px;
}
.intro-card > span {
  display: block;
}
.intro-card #introTitle {
  font-size: 25px;
  color: #e2ffed;
}
.intro-eyebrow {
  font: 10px monospace;
  letter-spacing: 0.09em;
  color: #8affbd;
}
.intro-start {
  padding-top: 10px;
  border-top: 1px solid #32483a;
  color: #8affbd;
  font: 12px monospace;
  text-align: center;
}
@media (max-height: 540px) {
  .intro-card {
    gap: 8px;
    padding: 16px;
    font-size: 12px;
  }
  .intro-card #introTitle {
    font-size: 20px;
  }
}
.fuel-display {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 120px;
  color: #edf5f0;
}
.fuel-label {
  display: block;
  margin-bottom: 4px;
  font:
    10px/1.3 system-ui,
    sans-serif;
  letter-spacing: 0.04em;
}
.fuel-meter {
  height: 12px;
  overflow: hidden;
  border: 1px solid #86cfac;
  border-radius: 3px;
  background: #17271e;
}
.fuel-bar {
  width: 100%;
  height: 100%;
  background: #ffab4c;
}

/* Compact resource stack, aligned to the safe top-left corner on all screens. */
.hud {
  top: calc(8px + env(safe-area-inset-top));
  left: calc(8px + env(safe-area-inset-left));
  right: auto;
  width: 120px;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
}
.hud .landing-account {
  width: auto;
  margin: 0;
  justify-content: flex-start;
}
.hud .hud-reset {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 12px;
  pointer-events: auto;
}
.hud .fuel-display {
  position: static;
  width: 100%;
}
.hud .credit-balance {
  text-align: left;
}
.topbar {
  justify-content: flex-end;
}
.topbar .brand {
  display: none;
}
@media (max-width: 380px) {
  .hud .reset-label {
    display: none;
  }
}

#boost {
  width: 72.8px;
  height: 69.3px;
  min-height: 69.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  border: 1px solid #86cfac;
  border-radius: 10px;
  color: #a2d4b5;
  background: #203b2bcc;
  font: 9px ui-monospace, monospace;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
}
#boost.active {
  background: #3b291dcc;
  color: #ffc18a;
  border-color: #c68a58;
  box-shadow: 0 0 10px #ff9b4233, inset 0 0 8px #ff9b421a;
}

.weapon-controls { flex-direction: column; gap: 0; }

#boost .boost-icon {
 width:20px;
 height:20px;
 fill:currentColor;
 pointer-events:none;
}

.level-links {
  display: grid;
  gap: 8px;
}
.level-links a {
  display: block;
  padding: 12px;
  border: 1px solid #32483a;
  border-radius: 8px;
  color: #b6cdc0;
  background: #14251b;
  text-decoration: none;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.level-links a[aria-current="true"] {
  border-color: #86cfac;
  color: #b9ffd1;
}

.wheel-edge[hidden], .weapon-scroll[hidden] { display: none !important; }

/* Fixed slots preserve the cannon icon's size and position with any inventory. */
#fire.weapon-wheel { justify-content: center; }
.touch #fire .weapon-current { flex: 0 0 auto; }
.touch #fire .weapon-icon { flex: 0 0 22px; }
#fire .wheel-edge { position: absolute; left: 0; right: 7px; }
#weaponPrevious { top: 0; }
#weaponNext { bottom: 0; }

#weaponLinks { padding-left: 20px; }
#weaponLinks li { margin: 8px 0; }
#weaponLinks a { color: #59baff; text-decoration: underline; }

/* Dynamic objects share the terrain coordinates; the player stays above them. */
.map-entities { position:absolute;inset:0;pointer-events:none; }
.map-entities > svg { display:block;width:100%;height:100%; }
.map-entity { overflow:visible; }
.map-entity path,.map-entity rect,.map-entity circle { stroke-linejoin:miter; }

.race-status { position:fixed;top:calc(160px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:5;padding:7px 10px;background:#08140fe6;color:#b8ffe3;font:12px monospace;white-space:nowrap;pointer-events:none; }
.race-countdown { position:fixed;inset:35% 0 auto;text-align:center;z-index:6;font:bold 72px monospace;color:#ffab4c;text-shadow:0 3px 15px #000;pointer-events:none; }
.race-status[hidden],.race-countdown[hidden]{display:none;}

/* The race uses the weapon wheel's exact footprint for its only left-hand control. */
.weapon-controls { --weapon-control-width:72.8px; --weapon-control-height:92.4px; }
.weapon-controls.race-controls { padding-bottom:17px; }
.race-controls #boost {
  width:var(--weapon-control-width);
  height:var(--weapon-control-height);
  min-height:var(--weapon-control-height);
  margin-bottom:0;
}

.lives-meter[hidden], .heart[hidden] { display:none; }
.hull-display { width:100%; color:#edf5f0; }
.hull-bar { width:100%; height:100%; background:#8affbd; }
.hud .landing-account { flex-direction:column; align-items:flex-start; gap:0; }

/* Keep the menu close action reachable while its contents scroll. */
.drawer-head {
  position: sticky;
  top: calc(-18px - env(safe-area-inset-top));
  z-index: 10;
  margin-top: calc(-18px - env(safe-area-inset-top));
  margin-left: -20px;
  margin-right: -20px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 16px;
  background: #0b1510;
  border-bottom: 1px solid #32483a;
}
