* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #101a22;
  color: #e9d7ae;
  font-family: Georgia, serif;
}
main {
  height: 100svh;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}
header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
}
.wordmark,
.actions,
footer,
footer span {
  display: flex;
  align-items: center;
}
.wordmark {
  gap: 13px;
}
.seal {
  color: #ffcf7f;
  font-size: 41px;
  border: 1px solid #99784e;
  outline: 1px solid #6b5842;
  outline-offset: 3px;
  width: 41px;
  height: 41px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
}
small,
kbd,
button,
#guide,
footer {
  font:
    600 10px/1.35 system-ui,
    sans-serif;
  letter-spacing: 1.8px;
}
small {
  display: block;
  color: #e3ba7c;
}
h1,
h2 {
  font-weight: normal;
  margin: 0;
}
h1 {
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -1.6px;
}
.actions {
  gap: 9px;
}
button {
  cursor: pointer;
  color: #e6d5b4;
  background: #15242e;
  border: 1px solid #6e6755;
  padding: 8px 11px;
  border-radius: 3px;
  letter-spacing: 0.6px;
}
button:hover,
button:focus-visible {
  background: #364550;
}
section {
  flex: 1;
  min-height: 0;
  position: relative;
  border: 1px solid #a79169;
  outline: 1px solid #584c39;
  outline-offset: 3px;
  isolation: isolate;
  overflow: hidden;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: none;
  touch-action: none;
  outline: none;
}
.corners {
  position: absolute;
  inset: 5px;
  border: 1px solid #ccb17a66;
  pointer-events: none;
}
.stage,
.objective,
.vitals,
#guide,
#toast {
  position: absolute;
  pointer-events: none;
  text-shadow:
    0 2px 4px #0b1524,
    0 0 9px #122333;
}
.stage {
  left: 25px;
  top: 20px;
}
.stage small:before {
  content: "✦";
  margin-right: 9px;
}
.stage h2 {
  font-size: clamp(21px, 2.5vw, 34px);
  margin-top: 3px;
}
.objective {
  top: 18px;
  right: 24px;
  text-align: right;
}
.objective span {
  font-size: 32px;
}
.objective i {
  font-size: 20px;
  color: #d3ba8b;
}
.objective small,
.vitals small {
  font-size: 8px;
}
.vitals {
  bottom: 16px;
  left: 22px;
}
.vitals span {
  color: #91f0d3;
  font-size: 15px;
  letter-spacing: 4px;
}
.vitals small {
  color: #f4d8a4;
}
#guide,
#toast {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff0cd;
}
#guide {
  bottom: 16px;
  letter-spacing: 1px;
  white-space: nowrap;
  background: #102932e8;
  padding: 7px 14px;
  border: 1px solid #b29364;
  font-size: 11px;
}
#toast {
  top: 18%;
  font:
    italic 20px Georgia,
    serif;
  width: 80%;
}
footer {
  gap: 24px;
  height: 55px;
  flex: none;
  color: #baae97;
  font-size: 11px;
  letter-spacing: 0.3px;
}
footer span {
  gap: 7px;
}
kbd {
  padding: 3px 6px;
  color: #dfceb0;
  border: 1px solid #746e5d;
  border-bottom-width: 2px;
  font-size: 9px;
  letter-spacing: 1px;
}
dialog {
  color: #eedfbb;
  background: #162836;
  border: 1px solid #dfb66e;
  padding: 30px;
  max-width: min(400px, 90vw);
}
dialog::backdrop {
  background: #0d162aaa;
}
dialog h2 {
  font-size: 34px;
  margin: 8px 0;
}
dialog p {
  line-height: 1.5;
}
dialog button {
  background: #e3bd79;
  color: #152631;
  padding: 10px 16px;
}
#touch {
  display: none;
}
@media (pointer: coarse) {
  #touch {
    position: absolute;
    display: flex;
    gap: 4px;
    bottom: 50px;
    left: 10px;
  }
  #touch button {
    touch-action: none;
    opacity: 0.85;
    padding: 10px;
  }
}
@media (max-width: 640px) {
  main {
    padding: 0 8px;
  }
  header {
    height: 66px;
  }
  .seal {
    font-size: 28px;
    width: 31px;
    height: 31px;
    line-height: 30px;
  }
  .wordmark {
    gap: 9px;
  }
  .wordmark small {
    font-size: 7px;
  }
  .actions b {
    display: none;
  }
  .stage {
    left: 14px;
    top: 12px;
  }
  .objective {
    right: 13px;
    top: 10px;
  }
  .objective small {
    font-size: 7px;
  }
  .stage small {
    font-size: 8px;
  }
  footer {
    height: 47px;
    gap: 10px;
  }
  footer span {
    font-size: 9px;
    gap: 3px;
  }
  kbd {
    font-size: 7px;
  }
  #guide {
    font-size: 9px;
    bottom: 12px;
    max-width: 65%;
    white-space: normal;
    left: 58%;
  }
  .vitals {
    left: 12px;
  }
  .vitals span {
    letter-spacing: 0;
  }
}
