:root {
  color-scheme: dark;
  --mint: #a2ebcc;
  --gold: #e7bc73;
  --ink: #061218;
  --cream: #f4f5ed;
  --muted: #a2b8ba;
  --mono: "Space Mono", monospace;
  --sans: "DM Sans", sans-serif;
  --pad: clamp(18px, 3vw, 52px);
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  font: 14px/1.5 var(--sans);
  background: #030d17;
  color: var(--cream);
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
button {
  touch-action: manipulation;
}
button:active:enabled {
  filter: brightness(1.18);
}
.glyph {
  vertical-align: middle;
  flex: none;
}
#game {
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #07131e url(assets/deep-space.webp) center center/cover no-repeat;
}
#stage,
#ambience,
#vignette,
#markers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#stage {
  cursor: crosshair;
  outline: none;
  touch-action: none;
}
#ambience {
  pointer-events: none;
}
#vignette {
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      #03101899 0%,
      transparent 19%,
      transparent 73%,
      #020b13b5 100%
    ),
    linear-gradient(
      90deg,
      #03121c3b,
      transparent 22%,
      transparent 80%,
      #04121b38
    );
}
.outside #vignette {
  background:
    linear-gradient(
      0deg,
      #041018ec,
      transparent 30%,
      transparent 72%,
      #031019b3
    ),
    linear-gradient(
      90deg,
      #030e184a,
      transparent 25%,
      transparent 75%,
      #010e194a
    );
}
header {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 23px;
  display: flex;
  align-items: center;
  gap: 23px;
  pointer-events: none;
}
.wordmark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.wordmark h1 {
  margin: 0;
  line-height: 0;
}
.wordmark img {
  display: block;
  width: 236px;
  height: auto;
  filter: drop-shadow(0 2px 5px #030b13aa);
}
.header-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #b5d9ce38, #badbd30b 45%, #9fd6cb24);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}
#projects {
  padding: 5px 9px;
  border: 1px solid #88b19f70;
  border-radius: 3px;
  background: #0b2025ed;
  color: var(--mint);
  font: 11px var(--mono);
  white-space: nowrap;
}
#project-notice:not(:empty) {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 14px;
  background: #163732;
  color: var(--mint);
  font-size: 13px;
}
.sol {
  font: 10px var(--mono);
  letter-spacing: 1.2px;
  color: #d7dfd8;
  margin-right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sol svg {
  color: var(--gold);
}
.icon-btn,
.close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #081923c4;
  border: 1px solid #99bac14d;
  border-radius: 4px;
  color: #d6e5df;
}
.icon-btn:hover,
.close:hover {
  border-color: var(--mint);
  color: var(--mint);
}
.pause-icon {
  height: 12px;
  width: 10px;
  border-left: 3px solid;
  border-right: 3px solid;
}
.pilot-hud {
  position: absolute;
  left: var(--pad);
  top: 82px;
  width: 166px;
  padding: 0 2px 0 0;
  filter: drop-shadow(0 2px 4px #001016);
}
.identity {
  background: none;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-align: left;
}
.identity img {
  width: 41px;
  height: 43px;
  object-fit: contain;
  image-rendering: pixelated;
  border: 1px solid #9ebeb666;
  background: linear-gradient(145deg, #444841bb, #17272de6);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
}
.identity small,
.overline,
.place-kind,
.objective-cap,
.radar-top,
.coords,
#beltTitle {
  font-family: var(--mono);
  font-weight: 400;
}
.identity small {
  color: var(--mint);
  display: block;
  font-size: 8px;
  letter-spacing: 1.7px;
}
.identity b {
  display: block;
  font-size: 18px;
  letter-spacing: -0.4px;
}
.meter {
  margin-top: 10px;
}
.meter > div:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #c3cfcd;
}
.meter svg {
  color: var(--meter);
}
.meter b {
  margin-left: auto;
  font: 10px var(--mono);
  color: #e2ebe5;
}
.meter small {
  font-size: 8px;
  color: #a9b9b7;
}
.track {
  height: 4px;
  margin-top: 5px;
  background: #5771784d;
  border-radius: 1px;
  overflow: hidden;
}
.track i {
  height: 100%;
  display: block;
  background: var(--meter);
  box-shadow: 0 0 8px var(--meter);
}
.objective {
  position: absolute;
  right: var(--pad);
  top: 84px;
  width: 235px;
  max-width: 24vw;
  text-align: left;
  border: none;
  border-left: 2px solid #d9ba76;
  background: linear-gradient(90deg, #07151ce8, #07151c75 78%, #07151c00);
  padding: 10px 11px 12px 14px;
  color: var(--cream);
  text-shadow: 0 1px 4px #001018;
}
.objective-cap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 1.65px;
}
.objective-cap i {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1.5px #19232a;
  background: var(--gold);
}
.objective strong {
  display: block;
  margin: 5px 0;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.task-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: #c4cfcd;
}
.task-line i {
  width: 5px;
  height: 5px;
  margin-top: 6px;
  border: 1px solid #b3c4bf;
  flex: none;
}
.objective:hover {
  background: linear-gradient(90deg, #172723ed, #07151c50);
}
#markers {
  pointer-events: none;
}
.pin {
  pointer-events: auto;
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -100%);
  padding: 4px 5px;
  background: none;
  border: none;
  color: #dbfae9;
  text-shadow: 0 1px 4px #031011;
}
.pin-shape {
  border: 1px solid #b8f5d3aa;
  background: #0c211fe6;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  transform: rotate(45deg);
  border-radius: 3px;
  box-shadow: 0 1px 6px #00150f80;
}
.pin-shape svg {
  transform: rotate(-45deg);
  width: 13px;
  height: 13px;
}
.pin-label {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  font: 10px var(--mono);
  letter-spacing: 0.5px;
  background: #0a191eeb;
  border: 1px solid #94c5ac77;
  padding: 4px 8px;
  color: #d4f4df;
  border-radius: 3px;
  opacity: 0;
}
.pin:hover .pin-label,
.pin:focus-visible .pin-label,
.nav-pin .pin-label {
  opacity: 1;
}
.nav-pin .pin-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 9px;
}
.lift-pin .pin-label {
  pointer-events: auto;
}
.nav-pin .pin-shape {
  background: #345c4beb;
  border-color: #bcffe4;
}
.charted .pin-shape {
  border-color: #8ab6a0;
}
.charted::after {
  content: "✓";
  position: absolute;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: #bbebcc;
  color: #15372b;
  font: bold 11px/14px var(--mono);
  text-align: center;
  width: 14px;
  text-shadow: none;
}
.pin:hover .pin-shape {
  background: #35614e;
}
.pin.near:not(.nav-pin) .pin-label {
  opacity: 1;
}
#interact {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateX(-50%);
  border: 1px solid #b1d5bf91;
  border-radius: 3px;
  background: #0c1b20e6;
  padding: 5px 8px 5px 5px;
  font: 11px var(--sans);
  color: #e2f4e7;
  display: flex;
  gap: 7px;
  align-items: center;
}
#interact[hidden] {
  display: none;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border: 1px solid #a9c8c74f;
  border-bottom-width: 2px;
  border-radius: 3px;
  color: #d6e3df;
  font: 10px/1 var(--mono);
  background: #1c2d34b5;
}
#interact kbd {
  background: var(--mint);
  border-color: #78ac9b;
  color: #0c2820;
  font-weight: bold;
}
.place {
  position: absolute;
  left: var(--pad);
  bottom: 90px;
  text-shadow: 0 2px 15px #001017;
  pointer-events: none;
}
.place-kind {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--mint);
  letter-spacing: 2.2px;
  font-size: 10px;
}
.place-kind i {
  height: 2px;
  width: 25px;
  background: var(--mint);
}
.place h2 {
  font-size: clamp(32px, 3.15vw, 53px);
  line-height: 1.16;
  letter-spacing: -1.7px;
  margin: 5px 0;
}
.place #placeDetail {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b4c6c7;
  font-size: 12px;
}
.belt {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
}
#beltTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bdd2cd;
  text-shadow: 0 1px 5px #061019;
  font-size: 9px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
#beltTitle i {
  height: 1px;
  width: 16px;
  background: #a9cfbd61;
}
#slots {
  display: flex;
  gap: 5px;
}
#stick,
#touch-interact,
#touch-map {
  display: none;
}
.slot {
  position: relative;
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  border: 1px solid #82a7ad59;
  border-radius: 4px;
  background: linear-gradient(145deg, #16262ce6, #0c1823ed);
  box-shadow: inset 0 -2px 0 #0002;
}
.pixel {
  image-rendering: pixelated;
  object-fit: contain;
}
.slot img {
  width: 30px;
  height: 33px;
}
.slot small {
  position: absolute;
  top: 3px;
  left: 5px;
  font: 8px var(--mono);
  color: #a4b9ba;
}
.slot.selected {
  border-color: #9ce2c1;
  background: linear-gradient(145deg, #29463fd9, #10262aeb);
  box-shadow: inset 0 -2px 0 #b1edca;
}
.slot.selected small {
  color: #c0f9db;
}
.slot:hover {
  border-color: var(--mint);
}
#radar {
  position: absolute;
  right: var(--pad);
  bottom: 75px;
  width: 153px;
  padding: 7px 9px 5px;
  background: linear-gradient(135deg, #0d2025eb, #07171dd4);
  border: 1px solid #62827f85;
  border-radius: 4px;
  color: #bcdbc9;
  text-align: left;
}
#radar:before,
#radar:after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: #a8cbb5;
  border-style: solid;
}
#radar:before {
  left: -1px;
  top: -1px;
  border-width: 1px 0 0 1px;
}
#radar:after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}
.radar-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  letter-spacing: 1px;
}
.radar-top b {
  font-weight: 400;
}
.radar-top > span:last-child {
  margin-left: auto;
  font-size: 8px;
  color: #8ead9f;
}
.radar-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
}
#mini,
#localMap {
  display: block;
  width: 100%;
  background-image:
    linear-gradient(#7da5940b 1px, transparent 1px),
    linear-gradient(90deg, #7da5940b 1px, transparent 1px);
  background-size: 11px 11px;
}
#mini {
  height: 62px;
  margin-top: 3px;
}
.coords {
  border-top: 1px solid #9ac6b526;
  padding-top: 3px;
  color: #8da99c;
  font-size: 8px;
  letter-spacing: 1.6px;
  text-align: center;
}
footer {
  position: absolute;
  bottom: 0;
  left: var(--pad);
  right: var(--pad);
  height: 49px;
  border-top: 1px solid #b5d4cc31;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #b8c4c7;
  font-size: 11px;
}
.desktop-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.desktop-controls > span,
.desktop-controls button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.desktop-controls button {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
}
.desktop-controls button:hover {
  color: var(--mint);
}
.pad-controls {
  display: none;
}
/* Controller in use: swap footer hints and show focus on menu options. */
body.pad .desktop-controls {
  display: none;
}
body.pad .pad-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pad-controls > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.pad dialog :is(button, a, select, input):focus {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
.save {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 9px var(--mono);
  color: #9fb8ae;
}
.save:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9ad5af;
}
.outside .pilot-hud {
  background: #0a171db0;
  padding: 10px;
  border-radius: 4px;
}
.outside .place {
  text-shadow: 0 2px 5px #000;
}
#message {
  position: absolute;
  left: 50%;
  top: 77px;
  transform: translate(-50%, -5px);
  padding: 9px 14px;
  max-width: min(86vw, 460px);
  width: max-content;
  text-align: center;
  pointer-events: none;
  background: #0b2025ed;
  border: 1px solid #88b19f70;
  color: #d4ebd9;
  border-radius: 3px;
  opacity: 0;
  transition: 0.18s;
  font: 12px var(--sans);
}
#message.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#transition {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #061419;
  color: var(--mint);
  font: 14px var(--mono);
  letter-spacing: 1.2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s;
}
#transition.show {
  opacity: 1;
  pointer-events: auto;
}
dialog {
  width: min(450px, calc(100vw - 28px));
  max-height: 84dvh;
  margin: auto;
  border: 1px solid #648b82;
  border-radius: 7px;
  background: linear-gradient(145deg, #17292b, #0b191f 75%);
  color: var(--cream);
  padding: 25px;
  box-shadow: 0 20px 90px #000b;
}
dialog.wide {
  width: min(700px, calc(100vw - 28px));
}
dialog::backdrop {
  background: #020a10b8;
  backdrop-filter: blur(4px);
}
.defense-contact {
  display: flex;
  align-items: center;
  gap: 18px;
  border-block: 1px solid #416360;
  padding: 14px 0;
}
.defense-contact img { width: 76px; height: 78px; object-fit: contain; image-rendering: pixelated; }
.defense-contact p { margin: 4px 0 0; }
#dialog[open]:has(.defense-scope) {
  display: flex;
  flex-direction: column;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #0a181e;
}
#pane:has(.defense-scope) {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template: "kicker readout pause" auto "title readout pause" auto "scope scope scope" minmax(0, 1fr) / 1fr auto auto;
  column-gap: 16px;
  padding-top: max(8px, env(safe-area-inset-top));
}
#pane:has(.defense-scope) .pane-top { display: contents; }
#pane:has(.defense-scope) .overline { grid-area: kicker; }
#pane:has(.defense-scope) h2 { grid-area: title; margin: 0 0 7px; font-size: clamp(18px, 2.4vw, 26px); }
#pane:has(.defense-scope) :is(.overline, h2) { padding-left: max(16px, env(safe-area-inset-left)); }
#pane:has(.defense-scope) .close {
  grid-area: pause;
  align-self: center;
  width: auto;
  height: auto;
  min-height: 40px;
  margin: 0 max(12px, env(safe-area-inset-right)) 6px 0;
  padding: 0 14px;
}
.defense-readout { grid-area: readout; align-self: center; font: clamp(10px, 1.2vw, 13px) var(--mono); color: var(--mint); }
.defense-scope {
  grid-area: scope;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  touch-action: none;
  cursor: crosshair;
  background: linear-gradient(#07132642, #02111b88), url("assets/deep-space.webp") center / cover;
  box-shadow: inset 0 1px #557a78;
}
@media (max-width: 700px) {
  #pane:has(.defense-scope) {
    grid-template: "kicker pause" auto "title pause" auto "readout readout" auto "scope scope" minmax(0, 1fr) / 1fr auto;
  }
  .defense-readout { padding: 0 12px 7px max(16px, env(safe-area-inset-left)); }
}
.pane-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.overline {
  color: var(--mint);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}
.close {
  width: 27px;
  height: 27px;
}
.close svg {
  width: 15px;
}
dialog h2 {
  font-size: 31px;
  letter-spacing: -1px;
  margin: 4px 0 15px;
  line-height: 1.2;
}
dialog h3 {
  font-size: 19px;
  margin: 0 0 4px;
}
dialog p {
  color: #bdcbca;
  font-size: 14px;
  line-height: 1.6;
  margin: 9px 0 16px;
}
.command,
.map-list button {
  padding: 10px 15px;
  border: 1px solid #536f69;
  border-radius: 4px;
  background: #203438;
  color: #dfebe5;
  font-weight: 600;
  font-size: 13px;
}
.command:hover:enabled,
.map-list button:hover {
  border-color: var(--mint);
  background: #2c4844;
}
.command.primary {
  background: #a5dfc2;
  border-color: #a5dfc2;
  color: #102a21;
}
.command.primary:hover:enabled {
  background: #c0f3d8;
}
.command:disabled {
  color: #96aaa4;
  background: #1b292d;
  border-color: #374b4a;
}
.commands {
  display: grid;
  gap: 8px;
}
.map-system {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a9c8ba;
  font: 11px var(--mono);
  margin-top: -6px;
}
.chart {
  overflow: hidden;
  height: 240px;
  position: relative;
  margin: 15px -10px;
  background:
    linear-gradient(#05151bec, #06172088),
    url(assets/deep-space.webp) center/cover;
  border: 1px solid #3a5554;
  border-radius: 5px;
}
.star-core {
  position: absolute;
  left: 8%;
  top: 57%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(at 30% 25%, #fff4c7, #edb575 50%, #b8743c);
  box-shadow: 0 0 29px #ffd89480;
}
.orbital {
  position: absolute;
  top: 65%;
  left: 10%;
  transform: translate(-50%, -50%) rotate(-12deg);
  border: 1px solid #a8d6c842;
  border-radius: 50%;
}
.o1 {
  width: 45%;
  height: 54%;
}
.o2 {
  width: 96%;
  height: 97%;
}
.o3 {
  width: 150%;
  height: 135%;
}
.planet {
  position: absolute;
  transform: translate(-50%, -25%);
  display: grid;
  justify-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--cream);
}
.planet > i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(at 28% 20%, #b6eac9, #709f88 48%, #253e3d 83%);
  box-shadow: inset 2px 1px 3px #d9ffdb6b;
  margin-bottom: 6px;
}
.planet.targeted > i {
  outline: 1px dashed var(--mint);
  outline-offset: 5px;
}
.p0 {
  left: 31%;
  top: 52%;
}
.p1 {
  left: 55%;
  top: 34%;
}
.p2 {
  left: 80%;
  top: 19%;
}
.p1 > i {
  background: radial-gradient(at 30% 25%, #caf6f1, #71a2bc 45%, #32434e 80%);
}
.p2 > i {
  width: 43px;
  height: 43px;
  background: radial-gradient(at 30% 28%, #f9bb83, #aa5e47 50%, #462d36 83%);
}
.planet b {
  font-size: 13px;
}
.planet small {
  font: 8px var(--mono);
  color: #b0bcb8;
  letter-spacing: 0.6px;
}
.route-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.route-info h3 {
  font-size: 24px;
  margin: 3px 0;
}
.route-info p {
  font-size: 12px;
  margin: 4px 0 14px;
}
.readout {
  display: grid;
  text-align: right;
  gap: 3px;
  font: 11px var(--mono);
  color: #acc4bd;
}
.wide .command {
  width: 100%;
}
.supplies > div,
.reserves > div,
.journal-tasks > div {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #435d574f;
  padding: 10px 0;
  color: #c3d2ca;
}
.supplies b,
.reserves b,
.journal-tasks b {
  font: 12px var(--mono);
  margin-left: auto;
  color: var(--cream);
}
.supplies img {
  width: 27px;
  height: 27px;
}
.reserves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.subhead {
  margin-top: 18px;
}
.journal-tasks {
  margin-bottom: 18px;
}
.journal-tasks svg,
.reward {
  color: var(--mint);
}
.log-line {
  font-size: 11px;
  color: #9fb2aa;
}
.tabs {
  display: flex;
  gap: 7px;
  margin: 10px 0;
}
.tabs .command {
  flex: 1;
}
.costs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.costs span {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 10px var(--mono);
  color: #c6af9e;
}
.costs img {
  width: 17px;
  height: 20px;
}
.costs .enough {
  color: var(--mint);
}
form label {
  display: block;
  color: #bed0c5;
  margin: 14px 0;
}
form input,
form select {
  display: block;
  width: 100%;
  padding: 10px;
  background: #0c1c20;
  color: var(--cream);
  border: 1px solid #4e6960;
  border-radius: 4px;
  margin-top: 5px;
}
.map-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}
.map-number {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border: 1px solid #f8d699;
  border-radius: 50%;
  color: #ffdfab;
  background: #10201e;
  font: bold 11px var(--mono);
}
.map-player {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-radius: 50%;
  background: #a6ffe1;
}
.map-list button {
  display: flex;
  gap: 7px;
  align-items: center;
  text-align: left;
  font-size: 12px;
}
.caption {
  font-size: 12px;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  :root {
    --pad: 20px;
  }
  .objective {
    max-width: 27vw;
    width: 196px;
  }
  .pilot-hud {
    width: 142px;
  }
  .place {
    bottom: 81px;
  }
  .slot {
    width: 43px;
    height: 43px;
  }
  .slot img {
    width: 25px;
    height: 29px;
  }
  #radar {
    width: 121px;
    bottom: 70px;
  }
  #mini {
    height: 44px;
  }
  .desktop-controls {
    gap: 13px;
  }
}
@media (max-width: 650px) {
  :root {
    --pad: 15px;
  }
  header {
    top: 15px;
    gap: 10px;
  }
  .wordmark img {
    width: clamp(104px, 32vw, 174px);
  }
  .sol {
    font-size: 8px;
    margin-right: 3px;
    gap: 4px;
  }
  .sol svg {
    width: 11px;
  }
  .header-tools {
    gap: 4px;
  }
  .icon-btn {
    width: 27px;
    height: 27px;
  }
  .pilot-hud {
    top: 59px;
    width: 98px;
  }
  .identity img {
    width: 29px;
    height: 31px;
  }
  .identity {
    gap: 6px;
  }
  .identity small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .identity b {
    font-size: 14px;
  }
  .meter {
    margin-top: 6px;
  }
  .meter > div:first-child {
    font-size: 9px;
    gap: 4px;
  }
  .meter b {
    font-size: 8px;
  }
  .meter .glyph {
    width: 10px;
  }
  .track {
    margin-top: 3px;
    height: 3px;
  }
  .objective {
    top: 60px;
    width: 148px;
    max-width: 42vw;
    padding: 7px 3px 7px 9px;
  }
  .objective-cap {
    font-size: 7px;
    letter-spacing: 1.1px;
  }
  .objective-cap i {
    height: 6px;
    width: 6px;
  }
  .objective strong {
    font-size: 16px;
    margin: 3px 0;
  }
  .task-line {
    font-size: 10px;
    line-height: 1.4;
  }
  .place {
    bottom: 125px;
  }
  .place h2 {
    font-size: 28px;
    letter-spacing: -0.8px;
  }
  .place-kind {
    font-size: 8px;
    letter-spacing: 1.6px;
    gap: 6px;
  }
  .place-kind i {
    width: 14px;
  }
  .place #placeDetail {
    font-size: 10px;
  }
  .belt {
    bottom: 48px;
    gap: 5px;
  }
  #beltTitle {
    font-size: 8px;
  }
  .slot {
    width: 41px;
    height: 41px;
  }
  .slot img {
    width: 24px;
    height: 27px;
  }
  #slots {
    gap: 5px;
  }
  #radar {
    bottom: 126px;
    width: 88px;
    padding: 4px 5px;
  }
  #mini {
    height: 29px;
  }
  .coords {
    font-size: 6px;
    letter-spacing: 0.6px;
  }
  .radar-top {
    font-size: 6px;
    letter-spacing: 0.6px;
  }
  .radar-top > span:last-child {
    font-size: 6px;
  }
  footer {
    height: 33px;
    gap: 5px;
  }
  .desktop-controls {
    gap: 9px;
  }
  .desktop-controls button {
    display: none;
  }
  body.pad .pad-controls {
    gap: 9px;
    font-size: 9px;
  }
  .save {
    font-size: 7px;
    gap: 4px;
  }
  .pin-shape {
    width: 20px;
    height: 20px;
  }
  .pin-label {
    font-size: 8px;
  }
  .nav-pin .pin-label {
    font-size: 8px;
  }
  .outside .pilot-hud {
    padding: 5px;
  }
  #message {
    top: 166px;
    font-size: 11px;
  }
  dialog {
    padding: 19px;
  }
  .chart {
    height: 200px;
  }
  .map-system {
    font-size: 10px;
  }
  .planet b {
    font-size: 10px;
  }
  .planet small {
    font-size: 6px;
  }
  .planet > i {
    width: 28px;
    height: 28px;
  }
  .planet.p2 > i {
    width: 31px;
    height: 31px;
  }
  .star-core {
    width: 27px;
    height: 27px;
  }
  .readout {
    font-size: 9px;
  }
  .route-info h3 {
    font-size: 20px;
  }
  .route-info p {
    font-size: 11px;
  }
}
@media (max-height: 560px) and (min-width: 651px) {
  header {
    top: 10px;
  }
  .pilot-hud,
  .objective {
    top: 53px;
  }
  .pilot-hud {
    width: 108px;
  }
  .identity img {
    width: 28px;
    height: 30px;
  }
  .identity b {
    font-size: 13px;
  }
  .meter {
    margin-top: 5px;
  }
  footer {
    height: 29px;
  }
  .place {
    bottom: 45px;
  }
  .place h2 {
    font-size: 24px;
  }
  .belt,
  #radar {
    bottom: 38px;
  }
  #radar {
    width: 95px;
  }
  #mini {
    height: 30px;
  }
  .slot {
    height: 34px;
    width: 34px;
  }
  .slot img {
    width: 21px;
    height: 23px;
  }
  .objective strong {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
.pin[hidden] {
  display: none;
}
.deck-list,
.atlas-regions {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.deck-choice,
.atlas-regions button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: #15292c;
  border: 1px solid #3e5851;
  border-radius: 4px;
  padding: 11px 13px;
}
.deck-choice:hover:enabled {
  border-color: var(--mint);
}
.deck-choice b {
  font: 14px var(--mono);
  color: var(--mint);
}
.deck-choice strong,
.deck-choice small {
  display: block;
}
.deck-choice small {
  font-size: 11px;
  color: #a6b9ae;
  margin-top: 3px;
}
.deck-choice:disabled {
  background: #102024;
  color: #839a90;
  border-color: #2c4541;
}
.deck-choice:disabled b,
.deck-choice:disabled small {
  color: #849a91;
}
.atlas-regions {
  grid-template-columns: repeat(2, 1fr);
}
.atlas-regions small {
  margin-left: auto;
  font: 10px var(--mono);
  white-space: nowrap;
}
.survey-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.wide .survey-links .command {
  width: auto;
}
.survey-count,
.puzzle-status {
  font: 11px/1.5 var(--mono);
  color: var(--mint);
}
.evidence section {
  border-top: 1px solid #3a5450;
  padding: 10px 0;
}
.evidence section p {
  margin: 4px 0;
  font-size: 13px;
}
.wire-grid,
.core-grid {
  display: grid;
  margin: 17px auto;
  max-width: 300px;
  gap: 3px;
}
.wire-grid {
  grid-template-columns: repeat(var(--n), 1fr);
}
.wire {
  padding: 0;
  aspect-ratio: 1;
  line-height: 0;
  color: #899ba7;
  background: #13212b;
  border: 1px solid #33434c;
  border-radius: 3px;
}
.wire.live {
  color: #9dedd0;
  background: #193a32;
  border-color: #588570;
}
.wire svg {
  width: 100%;
  height: 100%;
}
.core-grid {
  grid-template-columns: 34px repeat(var(--n), 1fr);
  align-items: center;
  text-align: center;
}
.core-grid small,
.core-grid b {
  line-height: 1.1;
  color: #c2d9c9;
  font: 11px var(--mono);
}
.core-cell {
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #47635d;
  border-radius: 3px;
  background: #10272a;
  color: #94aaac;
}
.core-cell.state-1 {
  background: #759c91;
  color: #153834;
}
.core-cell.state-2 {
  background: #1c3035;
}
.evidence strong {
  color: #e0e9da;
}
blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 2px solid #bd9d73;
  color: #ddc9ab;
  background: #b9996d0a;
}
#pane > .command + .command {
  margin-left: 6px;
}
@media (max-width: 550px) {
  .atlas-regions {
    grid-template-columns: 1fr;
  }
}
.trace {
  display: block;
  width: 100%;
  height: 75px;
  border: 1px solid #48625b;
  background: repeating-linear-gradient(
    90deg,
    #13232a,
    #13232a 15px,
    #243b3c 16px
  );
  margin: 4px 0 10px;
}
.instrument-reading {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 2px solid var(--mint);
  background: #14292b;
  color: #c9e6d9;
  font: 13px/1.7 var(--mono);
}
.instrument-gauge {
  display: grid;
  grid-template-columns: 1fr minmax(70px, 40%);
  align-items: center;
  gap: 8px;
}
.instrument-gauge meter {
  width: 100%;
}
.instrument-controls, .prism-array {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 4px;
}
.instrument-controls .command {
  margin: 0;
  min-height: 40px;
}
.prism-array {
  max-width: 150px;
  margin: 0 auto 10px;
  text-align: center;
}
.prism-array span {
  background: #1b2431;
  color: #a998bf;
  font-size: 20px;
}
.prism-array .lit {
  background: #574267;
  color: #ffdcff;
}
.heat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  max-width: 290px;
  margin: auto;
}
.heat-cell {
  background: #442f29;
  border: 1px solid #bc8f6c;
  color: #f0c59a;
  font: 14px var(--mono);
  aspect-ratio: 1;
  border-radius: 3px;
}
.heat-cell:disabled {
  color: #a99486;
  border-color: #584c43;
}
.heat-cell.traced {
  background: #2e5447;
  color: #cbf3d7;
  border-color: #70a887;
}
.home-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

dialog:has(.star-chart) {
  width: min(1040px, calc(100vw - 24px));
}
.chart-tools,
.departure-list,
.destination {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.chart-tools {
  justify-content: space-between;
  font-size: 12px;
  color: #bfd1c8;
}
.chart-tools select {
  max-width: 100%;
  background: #12231f;
  color: #f5edda;
  border: 1px solid #53665b;
  padding: 5px;
  font: inherit;
}
.star-scroll {
  overflow-x: auto;
  border: 1px solid #48605a;
  border-radius: 5px;
  margin: 10px 0;
}
.star-chart {
  position: relative;
  min-width: 650px;
  height: clamp(330px, 43vh, 490px);
  isolation: isolate;
  background:
    linear-gradient(115deg, #1028238c, #071625ac 46%, #2413218c),
    url(assets/deep-space.webp) center/cover;
}
.star-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.9%, #92baaf43 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, #92baaf43 50%, transparent 50.3%);
}
.zone-name {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--zone);
  text-transform: uppercase;
  top: 2%;
  left: 2%;
}
.zone-1,
.zone-3 {
  left: 52%;
}
.zone-2,
.zone-3 {
  top: 52%;
}
.star-chart svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.star-chart line {
  stroke: #b4d3c65c;
  stroke-dasharray: 3 6;
  vector-effect: non-scaling-stroke;
}
.star-chart .course {
  stroke: #f1ce8e;
  stroke-width: 2;
}
.star-world {
  position: absolute;
  transform: translate(-50%, -33%);
  background: none;
  border: 0;
  display: grid;
  justify-items: center;
  gap: 1px;
  color: #fff2d9;
  line-height: 1.12;
  text-shadow: 0 1px 4px #000;
  padding: 0 3px;
}
.star-world i {
  display: block;
  width: clamp(35px, 4.5vw, 52px);
  aspect-ratio: 1;
  border-radius: 50%;
  background-image: url(assets/chart-worlds.webp);
  background-size: 400% 400%;
}
.star-world.selected i,
.star-world:focus-visible i,
body.pad .star-world:focus i {
  outline: 1px solid var(--zone);
  outline-offset: 2px;
  box-shadow: 0 0 15px var(--zone);
}
.star-world b {
  font-size: 12px;
}
.star-world small {
  font-size: 9px;
  color: var(--zone);
}
.departure-list {
  gap: 6px;
  font-size: 11px;
}
.departure-list button {
  color: #cfebdd;
  background: #17332e;
  border: 1px solid #415a50;
  border-radius: 3px;
  padding: 3px 7px;
}
.destination {
  border-block: 1px solid #3c5049;
  margin: 10px 0;
  padding: 9px 0;
}
.destination img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 3px;
}
.destination h3,
.destination p {
  margin: 2px 0;
}
.destination p,
.jump-cost {
  font-size: 12px;
}
.jump-cost {
  margin-left: auto;
  line-height: 1.5;
  color: var(--mint);
}
/* Station consoles use the deck's own artwork above a compact working area. */
dialog.station {
  --station-pad: clamp(14px, 2.5vw, 24px);
  top: 8dvh;
  bottom: auto;
  margin-block: 0;
  scrollbar-gutter: stable;
  padding: 0;
  width: min(560px, calc(100vw - 28px));
}
dialog.station.wide {
  width: min(760px, calc(100vw - 28px));
  height: min(84dvh, 820px);
}
dialog.station:has(.star-chart) {
  width: min(1040px, calc(100vw - 24px));
}
.station-header {
  padding: 12px var(--station-pad) 16px;
  position: relative;
  isolation: isolate;
  background: #112327;
  border-bottom: 1px solid #506e64;
}
.station-header::before {
  content: "";
  position: absolute;
  inset: 0 0 0 34%;
  z-index: -1;
  background: linear-gradient(90deg, #112327, #11232750 60%, #11232733), var(--deck-art) center 43% / cover;
}
.station-header .pane-top {
  position: static;
  background: transparent;
  min-height: 0;
  padding: 0;
}
.station-header .close {
  width: 36px;
  height: 36px;
  background-color: #102126ee;
}
.station-header h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  text-shadow: 0 2px 6px #071317;
}
.station-body {
  padding: var(--station-pad);
}
.station-body > :first-child { margin-top: 0; }
.station-body > :last-child { margin-bottom: 0; }
.station-body .command { min-height: 42px; }
.station-body .tabs .primary {
  color: var(--mint);
  background: #1c3936;
  box-shadow: inset 0 -2px var(--mint);
}
.station-row {
  padding: 14px;
  background: #112226;
  border: 1px solid #39544f;
  border-radius: 5px;
}
.station-body .material-costs {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.material-costs li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid #46605865;
  font-size: 13px;
}
.material-costs img { width: 24px; aspect-ratio: 32 / 36; }
.material-costs small {
  display: block;
  font-size: 11px;
  color: var(--mint);
}
.material-costs .short small { color: var(--gold); }
.material-costs b {
  color: #c4d2cc;
  font: 11px var(--mono);
  text-align: right;
}
.station-readings {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  margin: 0 0 12px;
  background: #39544f;
  border: 1px solid #39544f;
  border-radius: 4px;
}
.station-readings div {
  flex: 1 1 90px;
  padding: 10px 12px;
  background: #102124;
}
.station-readings dt, .station-row small {
  color: #b3c7bd;
  font-size: 12px;
}
.station-readings dd {
  margin: 3px 0 0;
  font: 16px var(--mono);
  color: var(--mint);
}
.station-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.station-row h3 { font-size: 16px; margin: 0; }
.station-row + .station-row { margin-top: 7px; }
.resident-row { justify-content: flex-start; }
.resident-row img { width: 62px; height: 62px; object-fit: contain; }
.resident-row div { flex: 1 1 120px; }
.resident-row p { margin: 4px 0 0; font-size: 13px; }
.resident-row strong { color: var(--gold); }
.facility-controls, .station-options {
  display: grid;
  gap: 8px;
}
.facility-controls > * { margin: 0; }
.station-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); }
.transfer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.facility-controls .station-row { margin: 0; }
.station-body .deck-choice:disabled {
  border-left: 3px solid var(--mint);
  color: var(--cream);
}
.station-body .deck-choice:disabled small { color: #b3c7bd; }
.station-feedback {
  padding: 9px 12px;
  background: #18352d;
  border-left: 3px solid var(--mint);
}
/* The header and station controls stay in place while either column scrolls. */
dialog.wide:where(:has(.station-browser)),
dialog.station:where(:has(.station-browser)) {
  width: min(800px, calc(100vw - 28px));
  height: min(84dvh, 624px);
  overflow: hidden;
  scrollbar-gutter: auto;
}
#pane:has(.station-browser),
.station-body:has(.station-browser) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#pane:has(.station-browser) { height: 100%; }
dialog[open]:has(.station-browser):has(#project-notice:not(:empty)) {
  display: flex;
  flex-direction: column;
}
dialog:has(#project-notice:not(:empty)) #pane:has(.station-browser) { flex: 1; }
.station-body:has(.station-browser) { flex: 1; gap: 12px; }
.station-body:has(.station-browser) > * { margin-block: 0; }
.facility-controls:has(.station-browser) { display: contents; }
.station-browser {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid #39544f;
  border-radius: 5px;
  overflow: hidden;
  background: #102125;
}
.station-browser [role="tablist"],
.station-detail {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #55776e transparent;
}
.station-browser [role="tablist"] {
  background: #0d1c20;
  border-right: 1px solid #39544f;
}
.station-browser [role="tab"] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
  line-height: 1.3;
  color: #d0dfd8;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #304742;
  border-radius: 0;
  overflow-wrap: anywhere;
}
.station-browser [role="tab"] span { font-weight: 600; }
.station-browser [role="tab"] small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}
.station-browser [role="tab"]:hover { background: #192e30; }
.station-browser [aria-selected="true"] {
  background: #203b37;
  color: var(--mint);
  box-shadow: inset 3px 0 var(--mint);
}
.station-browser :is([role="tab"], .station-detail):focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: -2px;
}
.station-detail { padding: clamp(12px, 2vw, 22px); overflow-wrap: anywhere; }
.station-detail h3 { margin-bottom: 12px; }
.station-detail > :last-child { margin-bottom: 0; }
.station-photo {
  display: block;
  width: 100%;
  height: clamp(84px, 17dvh, 150px);
  object-fit: cover;
  object-position: center 48%;
  border-radius: 3px;
}
.resident-portrait { width: 90px; height: 90px; object-fit: contain; }
.robot-profile { display: flex; gap: 14px; align-items: center; margin: 8px 0 16px; }
.robot-profile img { width: min(34%, 128px); height: 112px; object-fit: contain; }
.robot-profile h4 { margin: 0; color: var(--gold); }
.robot-profile p { margin: 5px 0; }
.robot-orders { display: grid; gap: 6px; margin-bottom: 12px; }
.robot-orders .command { display: flex; justify-content: space-between; align-items: center; }
.robot-orders .command[aria-pressed="true"] b { color: var(--mint); }
.salvage-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 1.1fr);
  gap: 20px;
  margin-bottom: 16px;
}
.wreck-portrait {
  aspect-ratio: 3 / 2;
  margin-bottom: 12px;
  border: 1px solid #39544f;
  border-radius: 4px;
  background: #08141e url("assets/orbital-wrecks.webp") no-repeat;
  background-size: 200% 200%;
}
.salvage-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  padding: 5px;
  border: 1px solid #44605b;
  border-radius: 4px;
  background: #0a151a;
}
.salvage-cell, .salvage-wall {
  display: grid;
  place-items: center;
  height: 42px;
  border: 1px solid #324748;
  border-radius: 2px;
}
.salvage-cell {
  padding: 0;
  background: #182a2e;
  color: #abbbba;
  font: 600 16px var(--mono);
}
.salvage-wall {
  background: repeating-linear-gradient(135deg, #1e2e30 0 2px, #142125 2px 6px);
  border-color: #1c2c30;
}
.salvage-cell.tether { color: #f0c188; background: #393225; }
.salvage-cell.cleared { color: var(--mint); }
.salvage-cell:enabled { border-color: #8fbdaa; background: #284640; color: #edfff5; }
.salvage-cell:enabled:hover, .salvage-cell:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.salvage-cell[aria-current] { background: #a5dfc2; color: #102a21; }
.salvage-console .spool, .salvage-console .salvage-key, .salvage-console .salvage-status {
  font: 12px/1.6 var(--mono);
  color: #b9d5c8;
}
.salvage-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.salvage-footer p { flex: 1 1 220px; margin: 0; }
.salvage-footer .command { width: auto; }
@media (max-width: 640px) {
  .salvage-console { grid-template-columns: 1fr; }
  .wreck-portrait { max-width: 220px; }
}
@media (pointer: coarse) {
  .salvage-cell, .salvage-wall { min-height: 44px; }
}
@media (max-width: 520px) {
  .station-browser [role="tab"] { padding: 9px 8px; }
  .station-detail .material-costs li { grid-template-columns: 24px 1fr; }
  .station-detail .material-costs b { grid-column: 2; text-align: left; }
}
@media (max-width: 600px) {
  .destination img {
    width: 62px;
    height: 57px;
  }
  .jump-cost {
    margin: 0;
  }
  .chart-tools {
    gap: 5px;
  }
  .star-chart {
    height: 310px;
  }
  .star-world b {
    font-size: 11px;
  }
  .chart-tools select {
    max-width: calc(100vw - 155px);
  }
}
.hull-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #344b47;
  background: #0a181b;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}
.hull-portrait {
  flex: 0 0 34%;
  max-width: 230px;
  aspect-ratio: 1.5;
  background: url(assets/kestrel-expansions.webp) 0 0 / 200% 200%;
}
.hull-profile h3 {
  margin: 4px 0;
}
.hull-profile p {
  font-size: 12px;
  margin: 4px 0;
}
.hull-profile > div:last-child {
  padding: 7px 7px 7px 0;
}
#transition.in-flight {
  align-content: center;
  gap: 12px;
  background: #05121b url(assets/deep-space.webp) center/cover;
}
#transition .jump-portrait {
  width: min(440px, 74vw);
  max-width: none;
  mask-image: radial-gradient(ellipse at center, #000 50%, transparent 75%);
}
@media (max-width: 600px) {
  .departure-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .departure-list > * {
    flex-shrink: 0;
  }
}
@media (max-width: 600px), (pointer: coarse) and (max-height: 550px) {
  dialog:has(.star-chart) button[data-act="launch"] {
    position: sticky;
    bottom: 0;
    z-index: 1;
    box-shadow: 0 -3px 12px #0b191a;
  }
}
.wildlife-contact { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.wildlife-contact img { width: min(34%, 138px); height: auto; flex: 0 0 auto; }
.wildlife-contact p { margin: 0; }

/* Prologue, logbook entries, coaching cards and the field guide. */
dialog.intro {
  width: min(560px, calc(100vw - 28px));
  padding: 32px 32px 24px;
  border-color: #6f9d90;
  background:
    linear-gradient(160deg, #06121be8, #0a1a20f5 70%),
    url(assets/deep-space.webp) center/cover;
}
dialog.intro .close {
  display: none;
}
dialog.intro h2 {
  font-size: 38px;
  margin: 8px 0 14px;
}
.intro-page {
  animation: introIn 0.8s ease both;
}
.intro-page p {
  font-size: 16px;
  line-height: 1.75;
  color: #d3dedb;
}
@keyframes introIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.intro-actions .command.primary {
  order: 1;
}
.intro-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
}
.intro-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b5753;
}
.intro-dots span.on {
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.storyline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.storyline-grid button {
  display: block;
  height: auto;
  padding: 12px 14px;
  text-align: left;
  white-space: normal;
  background: #15292cdd;
  border: 1px solid #3e5851;
  border-radius: 4px;
}
.storyline-grid button:hover,
.storyline-grid button:focus-visible {
  border-color: var(--mint);
  background: #1d3535;
}
.storyline-grid button.chosen {
  border-color: var(--mint);
  box-shadow: inset 0 0 0 1px var(--mint);
}
.storyline-grid strong,
.storyline-grid em,
.storyline-grid small {
  display: block;
}
.storyline-grid strong {
  font-size: 16px;
  color: var(--cream);
}
.storyline-grid em {
  margin-top: 1px;
  color: var(--mint);
  font: normal 10px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.storyline-grid small {
  margin-top: 7px;
  color: #bdcbca;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
}
.pilot-record {
  display: grid;
  grid-template-columns: minmax(68px, 28%) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 4vw, 28px);
}
.pilot-preview {
  width: 100%;
  image-rendering: pixelated;
}
.briefing {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 6px 0 0;
}
.briefing li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #435d574f;
  color: #cfdcd7;
  font-size: 14px;
  line-height: 1.55;
}
.briefing li::before {
  content: counter(step);
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--mint);
  border-radius: 50%;
  color: var(--mint);
  font: 11px/20px var(--mono);
  text-align: center;
}
#coach {
  position: absolute;
  left: var(--pad);
  top: 214px;
  width: min(278px, calc(100vw - 2 * var(--pad)));
  padding: 11px 14px 12px;
  border: 1px solid #88b19f70;
  border-left: 2px solid var(--mint);
  border-radius: 3px;
  background: #0b2025f2;
  box-shadow: 0 6px 24px #0008;
  animation: introIn 0.35s ease both;
}
#coach[hidden] {
  display: none;
}
.coach-cap {
  color: var(--mint);
  font-size: 9px;
  letter-spacing: 1.6px;
}
#coach strong {
  display: block;
  margin: 3px 0 4px;
  font-size: 14px;
}
#coach p {
  margin: 0 0 9px;
  color: #bdcbca;
  font-size: 12px;
  line-height: 1.55;
}
#coach div {
  display: flex;
  gap: 14px;
}
#coach button {
  padding: 2px 0;
  background: none;
  border: 0;
  color: var(--mint);
  font-size: 12px;
  font-weight: 600;
}
#coach button:last-child {
  margin-left: auto;
  color: #dfebe5;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 12px 0 16px;
}
.guide-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 13px;
  background: #15292c;
  border: 1px solid #3e5851;
  border-radius: 4px;
}
.guide-grid button:hover {
  border-color: var(--mint);
  background: #1d3535;
}
.guide-grid strong,
.guide-grid small {
  display: block;
}
.guide-grid small {
  margin-top: 2px;
  color: #a7c1b2;
  font-size: 11px;
  font-weight: 400;
}
.guide-grid i {
  margin-left: auto;
  color: var(--mint);
  font: normal 9px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.guide-body :is(ul, ol) {
  margin: 8px 0 14px;
  padding-left: 20px;
  color: #bdcbca;
  font-size: 14px;
  line-height: 1.6;
}
.guide-body li {
  margin-bottom: 6px;
}
.guide-body b {
  color: var(--cream);
}
@media (max-width: 650px) {
  #coach {
    left: 12px;
    right: 12px;
    width: auto;
    top: auto;
    bottom: 138px;
  }
  .guide-grid,
  .storyline-grid {
    grid-template-columns: 1fr;
  }
  dialog.intro {
    padding: 24px 20px 18px;
  }
  dialog.intro h2 {
    font-size: 30px;
  }
  .intro-page p {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro-page,
  #coach {
    animation: none;
  }
}

@media (pointer: coarse) {
  :root {
    --touch-top: max(6px, env(safe-area-inset-top));
    --touch-right: max(14px, calc(env(safe-area-inset-right) + 8px));
    --touch-bottom: max(6px, env(safe-area-inset-bottom));
    --touch-left: max(14px, calc(env(safe-area-inset-left) + 8px));
    --touch-control-offset: calc(var(--touch-bottom) + 18px);
    --stick-size: clamp(82px, 27dvh, 112px);
  }
  #game {
    -webkit-user-select: none;
    user-select: none;
  }
  #game,
  dialog {
    -webkit-tap-highlight-color: transparent;
  }
  #landscape-prompt[open] {
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: max(24px, var(--touch-top)) max(24px, var(--touch-right))
      max(24px, var(--touch-bottom)) max(24px, var(--touch-left));
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(ellipse at center, #102c35d9, #040e17 74%),
      url(assets/deep-space.webp) center/cover;
    text-align: center;
  }
  #landscape-icon {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin-bottom: 20px;
    border: 1px solid #a2ebcc59;
    border-radius: 50%;
    background: #0c2028ad;
    color: var(--mint);
  }
  #landscape-prompt p {
    margin: 0 0 20px;
  }
  #landscape-lock {
    min-height: 44px;
  }
  header {
    top: var(--touch-top);
    left: var(--touch-left);
    right: var(--touch-right);
    gap: 10px;
  }
  .wordmark img {
    width: clamp(128px, 28vw, 174px);
  }
  .header-tools {
    gap: 5px;
  }
  .sol {
    font-size: 9px;
    margin-right: 3px;
    gap: 4px;
  }
  .icon-btn,
  .close {
    width: 44px;
    height: 44px;
  }
  .pilot-hud,
  .objective {
    top: calc(var(--touch-top) + 50px);
  }
  .pilot-hud,
  .outside .pilot-hud {
    left: var(--touch-left);
    width: min(44%, 170px);
    padding: 0 6px 6px;
    border-radius: 4px;
    background: #0a171dd9;
    filter: none;
    pointer-events: none;
  }
  .identity {
    min-height: 44px;
    width: 100%;
    gap: 6px;
    pointer-events: auto;
  }
  .identity img {
    width: 29px;
    height: 31px;
    flex: none;
  }
  .identity small {
    font-size: 8px;
  }
  .identity b {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  #meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .meter {
    margin-top: 0;
  }
  .meter > div:first-child {
    gap: 3px;
    font-size: 10px;
  }
  .meter svg {
    display: none;
  }
  .meter b {
    font-size: 9px;
  }
  .track {
    height: 3px;
    margin-top: 3px;
  }
  .objective {
    right: var(--touch-right);
    width: min(46%, 235px);
    max-width: none;
    min-height: 44px;
    padding: 6px 5px 7px 9px;
  }
  .objective-cap {
    gap: 5px;
    font-size: 8px;
    letter-spacing: 1px;
  }
  .objective strong,
  .task-line i {
    display: none;
  }
  .task-line {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--cream);
  }
  .pin {
    justify-content: center;
    width: 44px;
    height: 44px;
  }
  .pin-label {
    font-size: 10px;
  }
  .pin-shape {
    width: 23px;
    height: 23px;
  }
  #interact,
  #radar,
  .place-kind,
  .place #placeDetail,
  .slot small,
  .desktop-controls,
  body.pad .pad-controls {
    display: none;
  }
  .place {
    left: var(--touch-left);
    bottom: calc(var(--touch-control-offset) + var(--stick-size) + 9px);
    max-width: min(155px, 24vw);
  }
  .place h2 {
    margin: 0;
    font-size: clamp(13px, 2.4vw, 21px);
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  .belt {
    inset: auto var(--touch-right) var(--touch-control-offset) auto;
    max-width: calc(100% - var(--touch-left) - var(--touch-right) - var(--stick-size) - 12px);
    transform: none;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "label map interact" "slots slots interact";
    align-items: end;
    justify-items: end;
    gap: 5px 9px;
  }
  #beltTitle {
    grid-area: label;
    align-self: end;
    display: block;
    max-width: 100%;
    margin-bottom: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  #beltTitle i {
    display: none;
  }
  .belt button {
    touch-action: none;
  }
  #slots {
    grid-area: slots;
    flex-wrap: wrap;
    justify-content: end;
    gap: 4px;
  }
  .slot {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .slot img {
    width: 24px;
    height: 27px;
  }
  #stick,
  #touch-map,
  #touch-interact {
    display: grid;
    place-items: center;
    border: 1px solid #9ad4c181;
    background: #0a1b23dc;
    color: var(--mint);
    border-radius: 50%;
  }
  #stick {
    position: absolute;
    left: var(--touch-left);
    bottom: var(--touch-control-offset);
    width: var(--stick-size);
    aspect-ratio: 1;
    touch-action: none;
    background:
      linear-gradient(90deg, transparent 49%, #9ad4c133 49% 51%, transparent 51%),
      linear-gradient(transparent 49%, #9ad4c133 49% 51%, transparent 51%),
      #0a1b23a8;
    box-shadow: inset 0 0 0 5px #9ad4c116;
  }
  #stick span {
    pointer-events: none;
    width: 42%;
    aspect-ratio: 1;
    border: 1px solid #bfefda;
    border-radius: 50%;
    background: #2a4a46;
    box-shadow: 0 2px 8px #0008;
  }
  #stick.running span {
    color: var(--gold);
    border-color: currentColor;
    box-shadow: 0 0 10px #e7bc7366;
  }
  #touch-map {
    grid-area: map;
    align-content: center;
    gap: 2px;
    width: 46px;
    height: 46px;
    padding: 0;
    font: 8px/1 var(--mono);
  }
  #touch-interact {
    grid-area: interact;
    width: clamp(70px, 23dvh, 86px);
    aspect-ratio: 1;
    gap: 3px;
    align-content: center;
    padding: 6px;
    background: #153a36ed;
    border-color: var(--mint);
    box-shadow: inset 0 0 0 3px #a2ebcc22;
    font-size: 12px;
    line-height: 1;
  }
  #touch-interact:disabled {
    opacity: 0.56;
  }
  #touch-interact small {
    max-width: 100%;
    min-height: 1em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--cream);
    font-size: 9px;
  }
  footer {
    inset: auto var(--touch-right) var(--touch-bottom) var(--touch-left);
    height: 16px;
    justify-content: center;
    border: 0;
    pointer-events: none;
  }
  .save {
    font-size: 8px;
  }
  #message {
    z-index: 3;
    top: calc(var(--touch-top) + 3px);
    max-width: min(42vw, 420px);
  }
  #coach {
    z-index: 2;
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(var(--touch-control-offset) + 105px);
    width: min(310px, calc(100% - var(--touch-left) - var(--touch-right) - 160px));
    translate: -50% 0;
    padding-bottom: 4px;
  }
  #coach button {
    min-height: 44px;
  }
  dialog :is(.command, .map-list button, .departure-list button, select, input) {
    min-height: 44px;
  }
  dialog :is(select, input) {
    font-size: 16px;
  }
  .chart-tools label {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
  }
  .chart-tools select {
    min-width: 0;
    max-width: 100%;
  }
  .star-world {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (min-width: 640px) {
  .star-chart {
    height: clamp(245px, 60dvh, 420px);
  }
}

@media (pointer: coarse) and (max-width: 950px), (pointer: coarse) and (max-height: 550px) {
  dialog,
  dialog.wide,
  dialog.intro,
  dialog:has(.star-chart) {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100dvh;
    padding: 0 max(14px, var(--touch-right)) max(16px, var(--touch-bottom)) max(14px, var(--touch-left));
    border: 0;
    border-radius: 0;
    overscroll-behavior: contain;
    scroll-padding-top: calc(var(--touch-top) + 49px);
  }
  .pane-top {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: calc(var(--touch-top) + 49px);
    padding-top: var(--touch-top);
    background: #16272a;
  }
  dialog.station, dialog.station.wide, dialog.station:has(.star-chart) {
    width: 100%;
    height: 100%;
    top: 0;
    padding: 0;
  }
  .station-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    align-content: center;
    min-height: calc(var(--touch-top) + 64px);
    padding: calc(var(--touch-top) + 6px) max(62px, calc(var(--touch-right) + 56px)) 6px max(14px, var(--touch-left));
  }
  .station-header .close {
    position: absolute;
    right: max(10px, var(--touch-right));
    top: calc(var(--touch-top) + 10px);
    width: 44px;
    height: 44px;
  }
  .station-body { padding: 14px max(14px, var(--touch-right)) max(16px, var(--touch-bottom)) max(14px, var(--touch-left)); }
  .intro .pane-top {
    background: #0a1a20;
  }
  dialog h2,
  dialog.intro h2 {
    font-size: clamp(24px, 6.8vw, 32px);
  }
}

/* ---------- Explorer accounts and leaderboard (account.js) ---------- */
.clerk-mount {
  display: flex;
  justify-content: center;
  margin: 4px -10px 0;
}
.clerk-mount:empty::before {
  content: "Opening the flight registry…";
  color: var(--muted);
  font: 11px var(--mono);
  padding: 30px 0;
}
.leaderboard {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.leaderboard li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #435d574f;
  padding: 9px 6px;
}
.leaderboard li.you {
  background: #a2ebcc14;
  border-radius: 4px;
}
.leaderboard .rank {
  min-width: 26px;
  color: var(--gold);
  font: 12px var(--mono);
}
.leaderboard .who {
  display: grid;
  min-width: 0;
}
.leaderboard .who b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard .who small {
  color: #9fb2aa;
  font: 10px var(--mono);
}
.leaderboard .score {
  margin-left: auto;
  font: 13px var(--mono);
  color: var(--cream);
}

#perspective {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-inline: 9px;
  font: 11px var(--sans);
}
#perspective[aria-pressed="true"] {
  border-color: #9bd5b8;
  color: #baf9d9;
  background: #0b2825e8;
}
#visor, #sight, #heading,
.first-person #markers {
  display: none;
}
.first-person #visor {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url(assets/helmet/visor.webp) center / 100% 100% no-repeat;
}
.first-person.visor-loading #visor {
  background-color: #09131e;
}
.first-person.visor-loading #sight, .first-person.visor-loading #interact {
  visibility: hidden;
}
.first-person.visor-loading #visor::after {
  content: "Calibrating visor…";
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  color: var(--mint);
  font: 12px var(--mono);
}
.first-person #sight, .first-person #heading {
  display: block;
  position: absolute;
  left: 50%;
  pointer-events: none;
  text-align: center;
  color: #d5f8e7;
  text-shadow: 0 1px 3px #00110e, 0 0 5px #00110e;
  font: 10px var(--mono);
}
#heading {
  top: max(8%, 42px);
  transform: translateX(-50%);
  padding: 4px 12px 6px;
  border-bottom: 1px solid #c1ecc988;
  border-radius: 3px;
  background: linear-gradient(0deg, #0b2124b8, #0b212455);
  letter-spacing: 2px;
}
#heading::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - 2px);
  border: 3px solid transparent;
  border-top-color: #bce6cf;
}
#sight {
  top: 50%;
  transform: translate(-50%, -50%);
}
#sight i {
  display: block;
  margin: auto;
  height: 5px;
  width: 5px;
  background: #defce4;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0c261bab;
}
#sight.on-target i {
  width: 12px;
  height: 12px;
  border: 1.5px solid #dcffdf;
  background: #0b302255;
}
#sight-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 7px;
  background: #0c201de6;
  border-radius: 3px;
}
#sight-label:empty { display: none; }
@media (max-width: 700px), (pointer: coarse) {
  #perspective span { display: none; }
  #perspective { width: 44px; justify-content: center; padding: 0; }
}

/* Audio: soundtrack credit in the footer and the mixer panel. */
#now-playing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: min(46vw, 420px);
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: #9fb8ae;
  font: 9px var(--mono);
  white-space: nowrap;
}
#now-playing[hidden] {
  display: none;
}
#now-playing svg {
  flex: none;
  color: var(--mint);
}
#now-playing span {
  overflow: hidden;
  text-overflow: ellipsis;
}
#now-playing b {
  color: #d4ebd9;
  font-weight: 400;
}
#now-playing:hover b {
  color: var(--mint);
}
.now-card {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--mint);
  background: #0b2025;
}
.now-card small {
  color: #a9c8ba;
  font: 10px var(--mono);
  letter-spacing: 1px;
}
.now-card b {
  color: var(--cream);
  font-weight: 500;
}
.now-card span {
  color: var(--gold);
  font-size: 12px;
}
.mixer {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}
.mix-row {
  display: grid;
  grid-template-columns: 76px 1fr 40px;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.mix-row span {
  color: #c9d8d2;
}
.mix-row output {
  color: #a9c8ba;
  font: 11px var(--mono);
  text-align: right;
}
.mix-row input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--mint);
  background: transparent;
}
.music-credit {
  margin: 14px 0 0;
  color: #a9c8ba;
  font-size: 12px;
}
.music-credit a {
  color: var(--mint);
}
@media (pointer: coarse) {
  #now-playing {
    margin-left: 0;
    max-width: 40vw;
    font-size: 8px;
  }
}
