:root {
  --bg: #07080b;
  --panel: rgba(12, 14, 19, 0.78);
  --panel-solid: #11141b;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #eceef3;
  --ink-dim: #9097a6;
  --ink-faint: #5f6675;
  --accent: #f0b442;
  --accent-2: #ff8a3c;
  --good: #6dff9a;
  --bad: #ff5a4a;
  --air: #59a8e6;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#game {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#view,
#overlay {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  image-rendering: pixelated;
}

#view {
  cursor: crosshair;
  touch-action: none;
}

#overlay {
  pointer-events: none;
}

body.building #view {
  cursor: cell;
}

.hidden {
  display: none !important;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

button {
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

button:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
}

button:active {
  transform: translateY(1px);
}

button.primary {
  background: linear-gradient(180deg, #f6c35a, #e09a2c);
  color: #1a1206;
  border-color: #ffd27a;
  font-weight: 650;
}

button.primary:hover {
  background: linear-gradient(180deg, #ffd06e, #eba535);
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

kbd {
  font: 600 10.5px/1 var(--mono);
  padding: 2px 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-dim);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- HUD ---------------------------------------------------------------- */

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#hud .panel,
#hud button,
#hud .hotbar {
  pointer-events: auto;
}

.hud-tl {
  position: absolute;
  left: 16px;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vitals {
  padding: 10px 12px 8px;
  display: grid;
  gap: 6px;
  min-width: 200px;
}

.vital {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vlabel {
  width: 28px;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.meter {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #d8402e, #ff6a4a);
  border-radius: 4px;
  transition: width 0.08s linear;
}

.meter i.air {
  background: linear-gradient(90deg, #3a7fc0, #6fc0ff);
}

.meter i.jet {
  background: linear-gradient(90deg, #e07a20, #ffc04a);
}

.gear {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  font: 500 11px/1.2 var(--mono);
  color: var(--ink-dim);
}

#gear-dyn {
  color: #ff8a6a;
}

.depth {
  padding-left: 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9);
}

.depth-m {
  font: 700 26px/1 var(--mono);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.depth-name {
  margin-top: 4px;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hud-tr {
  position: absolute;
  right: 16px;
  top: 16px;
  width: min(360px, 38vw);
}

.objective {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
}

.objective.flash {
  animation: flash 0.9s ease-out;
}

@keyframes flash {
  0% {
    background: rgba(240, 180, 66, 0.35);
  }
  100% {
    background: var(--panel);
  }
}

.obj-head {
  display: flex;
  justify-content: space-between;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.obj-title {
  margin-top: 6px;
  font-weight: 650;
  font-size: 15px;
}

.obj-how {
  margin-top: 4px;
  color: var(--ink-dim);
  font-size: 12.5px;
}

.obj-repair {
  margin-top: 8px;
  display: grid;
  gap: 5px;
}

.obj-repair:empty {
  display: none;
}

.req {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  font: 500 11.5px/1 var(--mono);
  color: var(--ink-dim);
}

.req .chip {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.req .bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
}

.req .bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.req.done .bar i {
  background: var(--good);
}

.req .n {
  min-width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.req .pocket {
  color: var(--ink-faint);
}

/* toasts */

.toasts {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(560px, 60vw);
}

.toast {
  padding: 10px 16px;
  background: rgba(10, 12, 16, 0.86);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  text-align: center;
  font-size: 13.5px;
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), toast-out 0.6s ease-in forwards;
  animation-delay: 0s, var(--life, 3.6s);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast .rewards {
  display: grid;
  gap: 4px;
  text-align: left;
}

.toast b {
  color: var(--accent);
}

.toast.big {
  padding: 14px 26px 16px;
  border-color: rgba(240, 180, 66, 0.5);
}

.toast.big .kicker {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.toast.big .headline {
  margin-top: 6px;
  font: 750 22px/1.1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toast.big .sub {
  margin-top: 6px;
  color: var(--ink-dim);
  font-size: 13px;
}

.toast.warn {
  border-color: rgba(255, 90, 74, 0.5);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* bottom */

.hud-bottom {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* Clear of the help on the left and the map on the right. */
  width: min(1060px, calc(100vw - 2 * 330px));
  min-width: 480px;
}

.prompt {
  font: 600 13px/1 var(--sans);
  padding: 7px 12px;
  border-radius: 7px;
  background: rgba(10, 12, 16, 0.75);
  border: 1px solid var(--line-2);
}

.prompt:empty {
  display: none;
}

.prompt kbd {
  margin-right: 6px;
  color: var(--accent);
  border-color: rgba(240, 180, 66, 0.5);
}

.hint {
  max-width: 100%;
  font-size: 12.5px;
  color: #cfd3dc;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95), 0 0 2px #000;
}

.hotbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  background: rgba(10, 12, 16, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  max-width: 100%;
  overflow: hidden;
}

.slot {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  place-items: center;
}

.slot .chip {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.slot .count {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font: 600 10px/1 var(--mono);
  color: #e5e8ee;
  text-shadow: 0 1px 2px #000;
}

.slot .key {
  position: absolute;
  left: 4px;
  top: 3px;
  font: 600 9px/1 var(--mono);
  color: var(--ink-faint);
}

.slot.selected {
  border-color: var(--accent);
  background: rgba(240, 180, 66, 0.14);
  box-shadow: 0 0 0 1px rgba(240, 180, 66, 0.35), 0 0 16px rgba(240, 180, 66, 0.2);
}

.slot .tip {
  display: none;
}

.slot:hover .tip {
  display: block;
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  font-size: 11.5px;
  background: #000;
  border-radius: 5px;
  pointer-events: none;
}

/* The name of whatever you just picked, for a moment, since a swatch alone
   does not tell iron ore from dirt. */
.selname {
  height: 16px;
  font: 600 12px/16px var(--sans);
  letter-spacing: 0.04em;
  color: #f2f3f6;
  text-shadow: 0 1px 6px #000, 0 0 2px #000;
  opacity: 0;
  transition: opacity 0.4s;
}

.selname.show {
  opacity: 1;
  transition: none;
}

.hotbar-empty {
  padding: 12px 16px;
  color: var(--ink-dim);
  font-size: 12.5px;
}

/* build bar */

.buildbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  max-width: 100%;
}

.mcard {
  position: relative;
  width: 80px;
  padding: 5px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
}

.mcard canvas {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.mlocked {
  align-self: center;
  padding: 0 8px;
  font: 500 10.5px/1.3 var(--mono);
  color: var(--ink-faint);
  text-align: center;
}

.mcard .mname {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.mcard .mcost {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
  font: 500 10px/1.1 var(--mono);
  color: var(--ink-dim);
}

.mcard .mcost i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-radius: 2px;
  vertical-align: 0;
}

.mcard .mcost .short {
  color: var(--bad);
}

.mcard .mkey {
  position: absolute;
  left: 5px;
  top: 4px;
  font: 600 9px/1 var(--mono);
  color: var(--ink-faint);
}

.mcard.selected {
  border-color: var(--accent);
  background: rgba(240, 180, 66, 0.15);
}

.mcard.poor {
  opacity: 0.5;
}

.mcard.poor .mname::after {
  content: ' ·';
  color: var(--bad);
}

.mcard.locked {
  opacity: 0.28;
}

.mcard.locked::after {
  content: 'LOCKED';
  position: absolute;
  top: 18px;
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 5px;
  border-radius: 3px;
}

.hud-br {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

#minimap {
  width: 120px;
  height: 180px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  image-rendering: pixelated;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.map-hint {
  font: 500 10px/1 var(--mono);
  color: var(--ink-faint);
  text-shadow: 0 1px 4px #000;
}

.hud-bl {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: 300px;
  font-size: 11px;
  color: var(--ink-dim);
  text-shadow: 0 1px 6px #000, 0 0 2px #000;
  line-height: 1.6;
}

.hud-bl b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
}

.perf {
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  font: 500 10.5px/1.3 var(--mono);
  color: #9fe0b0;
  text-shadow: 0 1px 3px #000;
  white-space: pre;
}

/* --- screens ------------------------------------------------------------ */

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 5, 8, 0.55);
  backdrop-filter: blur(2px);
}

#title {
  background: radial-gradient(ellipse at 50% 42%, rgba(4, 5, 8, 0.15), rgba(4, 5, 8, 0.82) 72%);
  backdrop-filter: none;
}

.title-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateY(-4vh);
}

.logo {
  margin: 0;
  display: flex;
  gap: 0.06em;
  font: 900 clamp(64px, 11vw, 150px) / 0.9 var(--sans);
  letter-spacing: 0.04em;
}

.logo span {
  display: inline-block;
  text-shadow: 0 0.05em 0 rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 0, 0, 0.6);
  animation: rise 1.1s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.logo span:nth-child(1) {
  color: #8fc25a;
  animation-delay: 0.05s;
}
.logo span:nth-child(2) {
  color: #9a6c48;
  animation-delay: 0.12s;
}
.logo span:nth-child(3) {
  color: #8d8b98;
  animation-delay: 0.19s;
}
.logo span:nth-child(4) {
  color: #d6ad7a;
  animation-delay: 0.26s;
}
.logo span:nth-child(5) {
  color: #6f86b0;
  animation-delay: 0.33s;
}
.logo span:nth-child(6) {
  color: #ff6a6a;
  animation-delay: 0.4s;
  text-shadow: 0 0.05em 0 rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 60, 80, 0.55);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.35em);
  }
}

.tagline {
  margin: 4px 0 18px;
  font: 500 16px/1.3 var(--sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #c9cdd6;
  text-shadow: 0 2px 10px #000;
}

.title-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 260px;
}

.title-menu button {
  padding: 12px 18px;
  font-size: 15px;
}

.seed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--mono);
  color: var(--ink-dim);
}

.seed-row input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  font: 500 12px/1 var(--mono);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-2);
  border-radius: 6px;
}

.title-foot {
  max-width: 440px;
  margin-top: 26px;
  color: var(--ink-dim);
  font-size: 12.5px;
  text-shadow: 0 1px 6px #000;
}

.loading {
  position: absolute;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  text-align: center;
}

.loading-text {
  font: 500 12px/1 var(--mono);
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}

.loading-bar {
  margin-top: 10px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s;
}

.menu,
.ending {
  width: min(520px, calc(100vw - 32px));
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu h2,
.ending h2 {
  margin: 0 0 4px;
  font: 800 22px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.settings {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.settings label {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-dim);
}

.settings label.check {
  display: flex;
  gap: 8px;
}

.settings input[type='range'] {
  accent-color: var(--accent);
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.row button {
  flex: 1;
}

.keys {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.7;
}

.keys b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

/* journal */

.journal {
  width: min(860px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--line);
}

.tab {
  border: none;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--ink-dim);
  padding: 9px 14px;
}

.tab.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tabs-gap {
  flex: 1;
}

.close {
  margin-bottom: 6px;
  padding: 5px 10px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tab-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 22px;
  user-select: text;
}

.tab-body h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.tab-body .sub {
  color: var(--ink-dim);
  font-size: 13px;
  margin: 0 0 14px;
}

.repair {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.repair .req {
  font-size: 12.5px;
  grid-template-columns: 14px 120px 1fr auto;
}

.repair .req .label {
  color: var(--ink);
  font-family: var(--sans);
}

.repair .actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.rewards {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-dim);
  font-size: 12.5px;
}

.rewards li::marker {
  color: var(--accent);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.ms {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.ms .num {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.1em;
}

.ms.done {
  color: var(--good);
  border-color: rgba(109, 255, 154, 0.3);
}

.ms.now {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(240, 180, 66, 0.08);
}

.launch-box {
  margin-top: 16px;
  padding: 18px;
  text-align: center;
  border: 1px solid rgba(255, 106, 106, 0.5);
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 90, 90, 0.18), transparent 70%);
}

.launch-box button {
  font-size: 16px;
  padding: 12px 28px;
}

.recipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.recipe {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.recipe .rname {
  font-weight: 650;
}

.recipe .rnote {
  color: var(--ink-dim);
  font-size: 12px;
  flex: 1;
}

.recipe .rcost {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font: 500 11.5px/1.2 var(--mono);
  color: var(--ink-dim);
}

.recipe .rcost i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}

.recipe .rcost .short {
  color: var(--bad);
}

.recipe.owned {
  border-color: rgba(109, 255, 154, 0.3);
}

.pockets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}

.pocket-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
}

.pocket-item .chip {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.pocket-item .n {
  margin-left: auto;
  font: 500 12px/1 var(--mono);
  color: var(--ink-dim);
}

.pocket-item .drop {
  padding: 2px 7px;
  font-size: 10.5px;
  color: var(--ink-dim);
  opacity: 0;
}

.pocket-item:hover .drop {
  opacity: 1;
}

.finds {
  display: grid;
  gap: 4px;
}

.finds .sub {
  margin: 0;
  font-size: 12px;
}

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat dt {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stat dd {
  margin: 6px 0 0;
  font: 700 18px/1 var(--mono);
}

.ending-text {
  color: var(--ink-dim);
  margin: 0;
}

.ending-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0;
}

.ending-stats div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.ending-stats dt {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ending-stats dd {
  margin: 5px 0 0;
  font: 700 16px/1 var(--mono);
}

/* big map */

.bigmap-frame {
  padding: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

#bigmap-canvas {
  height: min(80vh, 900px);
  aspect-ratio: 2 / 3;
  image-rendering: pixelated;
  border-radius: 6px;
  background: #000;
}

.bigmap-legend {
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-dim);
}

.bigmap-legend .band {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bigmap-legend .band i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

#touchnote {
  display: none;
}

/* Only a touch screen, no mouse: say so rather than leave someone poking at
   a game that cannot hear them. */
@media (hover: none) and (pointer: coarse) {
  #touchnote {
    display: block;
    position: absolute;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    white-space: nowrap;
  }
}

#nogl {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--ink-dim);
}

@media (max-width: 900px) {
  .hud-bl {
    display: none;
  }
  .hud-bottom {
    width: calc(100vw - 24px);
    min-width: 0;
  }
  .hud-tr {
    width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo span,
  .toast,
  .objective.flash {
    animation: none !important;
  }
}

/* The ending sits on the white the launch faded to, not on a grey veil. */
#ending {
  background: transparent;
  backdrop-filter: none;
}
