:root {
  color-scheme: dark;
  font:
    14px system-ui,
    sans-serif;
  color: #edf4f3;
  background: #0c1822;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
button,
select {
  font: inherit;
  color: inherit;
  background: #1a3340;
  border: 1px solid #46616a;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 14px;
  touch-action: manipulation;
}
button {
  cursor: pointer;
  font-weight: 650;
}
button:active {
  background: #376578;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
select:focus-visible {
  outline: 2px solid #a8ecb8;
}
canvas#game {
  display: block;
  width: 100vw;
  height: 100dvh;
  touch-action: none;
}
#hud {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 6px 10px;
  background: #0b1b25ed;
  border: 1px solid #38545d;
  border-radius: 10px;
  pointer-events: none;
}
#hud button {
  pointer-events: auto;
  margin-left: auto;
}
.brand {
  font-size: 10px;
  letter-spacing: 2px;
}
.brand b {
  display: block;
  color: #a9e8b8;
  font-size: 13px;
}
#resources {
  color: #80e9df;
}
#clock {
  font-variant-numeric: tabular-nums;
  color: #c1cdd1;
}
#notice {
  position: fixed;
  top: calc(max(8px, env(safe-area-inset-top)) + 65px);
  left: 16px;
  right: 16px;
  text-align: center;
  color: #e0efdd;
  font-size: 12px;
  pointer-events: none;
  text-shadow: 0 1px 4px #000;
}
#tools {
  position: fixed;
  left: max(10px, env(safe-area-inset-left));
  top: 110px;
  display: grid;
  gap: 6px;
}
#tools button {
  background: #102631e8;
  padding: 8px;
  min-width: 44px;
}
#minimap {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(130px + env(safe-area-inset-bottom));
  width: 144px;
  height: 88px;
  border: 1px solid #69818b;
  border-radius: 6px;
  touch-action: none;
  background: #0b1c24;
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px max(12px, env(safe-area-inset-right))
    calc(10px + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: #0b1b25f5;
  border-top: 1px solid #38545d;
  min-height: 112px;
}
#status {
  font-size: 12px;
  color: #aec5cc;
  margin-bottom: 8px;
}
#panel {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  min-height: 44px;
}
#panel button {
  white-space: nowrap;
  font-size: 12px;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: radial-gradient(ellipse at 70% 20%, #224745e8, #07131bf5 70%);
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow: auto;
}
.overlay section {
  width: min(100%, 430px);
  max-height: 100%;
  overflow: auto;
  padding: 28px;
  background: #102530;
  border: 1px solid #3b5b64;
  border-radius: 18px;
  box-shadow: 0 22px 70px #0006;
}
h1 {
  font-size: 46px;
  line-height: 1.02;
  margin: 18px 0;
  letter-spacing: -2px;
}
h1 em {
  font-style: normal;
  color: #a9e8b8;
}
p {
  color: #b5c9cd;
  line-height: 1.55;
}
.eyebrow {
  font-size: 10px;
  color: #a9e8b8;
  letter-spacing: 2px;
}
label {
  display: grid;
  gap: 6px;
  margin: 15px 0;
  font-size: 12px;
  color: #b5c9cd;
}
select {
  width: 100%;
}
.primary {
  width: 100%;
  background: #a9e8b8;
  color: #10271f;
  border: 0;
  margin: 5px 0 10px;
}
#resume {
  width: 100%;
}
details {
  margin: 12px 0;
  font-size: 12px;
}
summary {
  cursor: pointer;
  padding: 8px 0;
}
small {
  font-size: 11px;
  color: #96adb7;
}
[hidden] {
  display: none !important;
}
@media (max-height: 500px) {
  .overlay section {
    width: min(94%, 650px);
    padding: 18px;
  }
  h1 {
    font-size: 32px;
    margin: 10px 0;
  }
  h1 br {
    display: none;
  }
  .overlay label {
    display: inline-grid;
    width: 48%;
    margin: 8px 0;
  }
  .overlay p {
    margin: 8px 0;
  }
  .brand b {
    font-size: 11px;
  }
  #minimap {
    bottom: 110px;
    width: 126px;
    height: 77px;
  }
  footer {
    min-height: 95px;
    padding-top: 6px;
  }
  #tools {
    top: 90px;
    grid-template-columns: repeat(2, auto);
  }
  #notice {
    top: 70px;
    font-size: 11px;
  }
}
:root {
  --game-version: 2;
}
@media (max-height: 500px) {
  #tools {
    left: auto;
    right: max(12px, env(safe-area-inset-right));
  }
}
