:root {
  color-scheme: dark;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #0b1015;
  color: #d8e3e7;
  --mint: #afffbd;
  --amber: #ffbe70;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  max-width: 1440px;
  margin: auto;
  padding: 22px 32px;
  border-bottom: 1px solid #27333b;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #71818d;
}
a {
  color: #a2b2bb;
  text-decoration: none;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 28px 32px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #83979e;
  margin: 0 0 12px;
}
h1 {
  font-size: 64px;
  letter-spacing: -4px;
  line-height: 1;
  margin: 0;
  color: #f1f5ef;
}
h1 span {
  color: var(--mint);
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  background: #151f27;
  border: 1px solid #35464f;
  padding: 12px 16px;
  border-radius: 3px;
  touch-action: none;
}
button:hover,
button:focus-visible {
  border-color: var(--mint);
  color: var(--mint);
}
.heading button {
  font-size: 11px;
  letter-spacing: 1px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
}
.field {
  position: relative;
  border: 1px solid #34444e;
  background: #0b1118;
  align-self: start;
}
.fieldbar {
  height: 40px;
  background: #131c24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--mint);
}
.fieldbar button {
  padding: 4px 8px;
  font-size: 9px;
}
#seed {
  color: #6d818b;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  outline: none;
}
#message {
  padding: 14px 16px;
  min-height: 52px;
  font-size: 11px;
  color: var(--amber);
  border-top: 1px solid #26333b;
  line-height: 1.6;
}
aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.readout {
  border-bottom: 1px solid #27343d;
  padding-bottom: 18px;
}
strong {
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--mint);
}
#healthbar {
  height: 5px;
  background: #25352f;
  margin-top: 12px;
}
#healthbar span {
  display: block;
  height: 100%;
  background: var(--mint);
}
#ammo {
  display: grid;
  gap: 7px;
}
#ammo button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 11px;
  padding: 11px;
}
#ammo button.selected {
  border-color: var(--mint);
  background: #1d302b;
  color: var(--mint);
}
#ammo b {
  font-size: 20px;
}
#kit {
  font-size: 12px;
  line-height: 2;
  color: #aabec6;
}
.objective p:not(.eyebrow) {
  font-size: 13px;
  color: var(--amber);
}
small,
details {
  font-size: 11px;
  line-height: 1.9;
  color: #8c9da6;
}
summary {
  cursor: pointer;
  letter-spacing: 1px;
  color: #b1c1c9;
}
details b {
  color: #d6e1df;
}
.overlay {
  position: absolute;
  inset: 40px 0 52px;
  background: #091016e8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.overlay.hidden {
  display: none;
}
#panel {
  width: min(520px, 100%);
}
#panel h2 {
  font-size: 32px;
  color: var(--mint);
  letter-spacing: -1px;
}
#panel p {
  font-size: 13px;
  line-height: 1.8;
  color: #a9bbc2;
}
#panel button {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: left;
}
#panel button b {
  display: block;
  color: var(--mint);
  margin-bottom: 8px;
}
#panel button small {
  display: block;
}
.touch {
  display: flex;
  justify-content: space-between;
  max-width: 700px;
  margin: 24px auto;
  gap: 12px;
}
.pad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 40px);
  gap: 3px;
}
.pad button {
  padding: 0;
}
.pad button:first-child {
  grid-column: 2;
}
.pad button:nth-child(2) {
  grid-row: 2;
  grid-column: 1;
}
.pad span {
  grid-row: 2;
  grid-column: 2;
  align-self: center;
  text-align: center;
  font-size: 8px;
  color: #70848f;
}
.pad button:nth-child(4) {
  grid-row: 2;
  grid-column: 3;
}
.pad button:last-child {
  grid-row: 3;
  grid-column: 2;
}
.actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #617680;
  letter-spacing: 1px;
  font-size: 9px;
  border-top: 1px solid #233039;
  padding-top: 18px;
}
@media (min-width: 1000px) and (pointer: fine) {
  .touch {
    display: none;
  }
  footer {
    margin-top: 24px;
  }
}
@media (max-width: 850px) {
  header {
    padding: 16px;
  }
  header > span {
    display: none;
  }
  main {
    padding: 20px 12px;
  }
  h1 {
    font-size: 48px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .readout {
    padding-bottom: 10px;
  }
  details {
    grid-column: 1/-1;
  }
  #ammo {
    grid-template-columns: 1fr 1fr;
  }
  #ammo button {
    font-size: 9px;
    padding: 7px;
  }
  #ammo b {
    font-size: 16px;
  }
  footer {
    line-height: 1.8;
    display: block;
  }
  footer span {
    display: block;
  }
  .fieldbar {
    padding: 0 8px;
  }
  #panel h2 {
    font-size: 23px;
  }
  #panel p {
    font-size: 11px;
  }
  #panel button {
    padding: 8px;
    font-size: 12px;
  }
  #panel button small {
    font-size: 10px;
  }
  .overlay {
    padding: 12px;
  }
  #message {
    font-size: 10px;
  }
}
