:root {
  color-scheme: dark;
  --ice: #74ffdf;
  --glass: rgba(10, 15, 33, 0.94);
  font:
    16px/1.45 system-ui,
    sans-serif;
  color: #f4f6ff;
  background: #0a1026;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: 0;
}
header {
  position: fixed;
  inset: 18px 24px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  pointer-events: none;
}
header > * {
  pointer-events: auto;
}
a,
button {
  color: inherit;
  font: inherit;
  font-weight: 650;
}
a {
  text-decoration: none;
  text-shadow: 0 1px 5px #000;
}
button {
  cursor: pointer;
  border: 1px solid #71839a;
  border-radius: 8px;
  background: var(--glass);
  padding: 0.55rem 1rem;
}
button:hover,
button:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}
#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 7vw;
  background: linear-gradient(90deg, #070d20ed 0%, #0a1026c9 32%, transparent 75%);
}
article {
  max-width: 34rem;
  padding: 1rem 0;
}
small,
#controls,
#marker em {
  font:
    650 0.73rem/1.55 ui-monospace,
    monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
small {
  color: var(--ice);
}
h1 {
  font-size: clamp(3.5rem, 8vw, 8rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
  margin: 0.25em 0;
}
article p {
  font-size: 1.2rem;
  max-width: 31rem;
}
#actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
#actions button:first-child,
#marker.near {
  background: var(--ice);
  color: #071c22;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.mission,
.patience,
.kit,
#radar,
#controls {
  position: absolute;
  background: var(--glass);
  border: 1px solid #546078;
  border-radius: 10px;
}
.mission {
  inset-block-start: 4rem;
  inset-inline-start: 24px;
  padding: 12px 18px;
  border-inline-start: 3px solid var(--ice);
  max-width: min(360px, 48vw);
}
h2 {
  font-size: 1.3rem;
  margin: 0.2rem 0;
}
.mission p {
  margin: 0;
  color: #e0e6f0;
}
.patience {
  inset-inline-end: 24px;
  top: 4rem;
  width: min(220px, 34vw);
  padding: 10px 14px;
}
.patience b {
  float: inline-end;
}
.patience progress {
  width: 100%;
  height: 0.4rem;
  accent-color: var(--ice);
}
.kit {
  inset-inline-end: 24px;
  bottom: 24px;
  padding: 10px 16px;
}
.kit strong {
  display: block;
}
#controls {
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 8px 12px;
  margin: 0;
  font-size: 0.68rem;
}
#radar {
  bottom: 24px;
  inset-inline-start: 24px;
  width: clamp(118px, 15vw, 170px);
  aspect-ratio: 22 / 16;
  background:
    repeating-linear-gradient(0deg, transparent 0 18px, #65748040 19px 20px),
    repeating-linear-gradient(90deg, #111c32 0 18px, #394259 19px 20px);
  overflow: hidden;
}
#radar i {
  position: absolute;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: white;
}
#radar #goal {
  background: #ffc45e;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 0;
}
#marker {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.85rem;
  background: #151c34eb;
}
#marker span {
  color: #ffcc86;
}
#marker.near span {
  color: inherit;
}
#marker em {
  font-style: normal;
  letter-spacing: 0;
}
#notice {
  position: fixed;
  bottom: 17%;
  width: 100%;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 5px black;
}
#notice:not(:empty) {
  background: #10182ae8;
  padding: 0.4em;
}
#pad {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (pointer: coarse) {
  #pad {
    position: absolute;
    bottom: 12px;
    left: 12px;
    text-align: center;
    display: block;
    pointer-events: auto;
    touch-action: none;
  }
  #radar {
    bottom: 112px;
  }
  #controls {
    display: none;
  }
}
@media (max-width: 660px) {
  header {
    inset: 10px 10px auto;
  }
  .mission,
  .patience {
    top: 3.4rem;
    padding: 8px;
    inset-inline-start: 10px;
  }
  .patience {
    inset-inline-start: auto;
    inset-inline-end: 10px;
  }
  .mission {
    max-width: 57vw;
    font-size: 0.8rem;
  }
  .kit {
    inset-inline-end: 10px;
  }
  .mission h2 {
    font-size: 1rem;
  }
  #overlay {
    background: #090f22b8;
  }
}

#radar span {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 2px;
  min-height: 2px;
}
.map-wall {
  background: #94a3bd;
}
.map-cargo {
  background: #dc9867;
}
.map-work {
  background: #d8af48;
}
#terrain {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.45rem 0.8rem;
  background: #302316;
  color: #ffd28c;
  border-radius: 6px;
}

.map-gate {
  background: #ff9961;
}
.map-gate.open {
  opacity: 0.25;
}
