:root {
  --ink: #223528;
  --paper: #fcf4df;
  --line: #b5aa8c;
  --moss: #30513b;
  --gold: #f4b845;
  --red: #893d2c;
  color: var(--ink);
  background: #f1e7cd;
  font:
    17px/1.5 "Atkinson Hyperlegible Next",
    "Trebuchet MS",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  max-width: 1250px;
  margin: auto;
  padding: 0 clamp(18px, 4vw, 62px);
}
header,
footer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0 0 2px;
  padding: 20px 0;
}
header {
  justify-content: space-between;
}
.wordmark,
.mode,
summary {
  font-weight: 750;
}
.wordmark {
  font-size: 0.82rem;
  letter-spacing: 0.15em;
}
.wordmark span {
  color: #86714d;
}
.mode {
  font-size: 0.8rem;
  line-height: 1.2;
  background: var(--gold);
  border: 1px solid var(--ink);
  padding: 6px 11px;
  border-radius: 2px;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(275px, 1fr);
  gap: clamp(26px, 4vw, 65px);
  padding: clamp(26px, 5vw, 70px) 0;
  align-items: start;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.04;
}
h1,
h2 {
  font-family:
    "Barlow Condensed", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: -0.018em;
}
h1 {
  font-size: clamp(2.85rem, 6.3vw, 5.8rem);
  margin: 0 0 23px;
  font-weight: 750;
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}
h3 {
  font-size: 1.3rem;
}
p {
  margin: 0.55em 0;
  max-width: 55ch;
}
.scene {
  border: 2px solid var(--ink);
  background: #d88654;
}
.scene canvas {
  display: block;
  width: 100%;
  image-rendering: pixelated;
}
.explore {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  justify-content: space-between;
  padding: 22px 0;
}
.explore p {
  font-size: 0.95rem;
}
.explore button {
  flex-shrink: 0;
}
button,
input {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  padding: 9px 15px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-weight: bold;
  font-size: 0.94rem;
  line-height: 1.35;
  min-height: 44px;
}
button:hover:enabled {
  background: #efdba7;
}
button:disabled {
  opacity: 0.62;
  cursor: default;
}
button.primary {
  background: var(--moss);
  color: #fff7e0;
  width: 100%;
  font-size: 1.06rem;
}
button.primary:hover:enabled {
  background: #213b29;
}
:focus-visible {
  outline: 3px solid #934319;
  outline-offset: 3px;
}
.shop {
  padding: clamp(20px, 2.5vw, 34px);
  border: 2px solid var(--ink);
  background: var(--paper);
}
.inventory,
.price {
  display: flex;
  align-items: center;
  gap: 14px;
}
.inventory {
  margin: 22px 0;
}
.inventory span:not(.key-icon),
.price > span {
  font-size: 0.88rem;
}
.key-icon {
  font:
    2.7rem/1 Georgia,
    serif;
  color: #665033;
  transform: rotate(-24deg);
}
.price {
  border-top: 1px dashed var(--line);
  justify-content: space-between;
  padding: 15px 0;
}
.price strong {
  white-space: nowrap;
}
#checkout:not(:empty) {
  margin-top: 20px;
}
#checkout h3 {
  font-size: 1.35rem;
  color: var(--moss);
}
#checkout[data-state="ERROR"] h3,
#checkout[data-state="FAILED"] h3 {
  color: var(--red);
}
#checkout p,
details p,
#connection {
  font-size: 0.9rem;
}
#checkout[hidden],
[hidden] {
  display: none !important;
}
#qr {
  display: block;
  width: min(100%, 230px);
  height: auto;
  margin: 12px auto;
  image-rendering: pixelated;
}
summary {
  font-size: 0.9rem;
  padding: 7px 0;
}
code {
  display: block;
  font-size: 0.83rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
#reference {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
#account {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
form {
  margin-top: 12px;
}
label {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 3px;
}
input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--ink);
  background: #fffaf0;
}
form button {
  margin-top: 8px;
}
footer {
  border-width: 1px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
@media (max-width: 760px) {
  main {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  h1 {
    font-size: clamp(2.65rem, 9vw, 4.1rem);
  }
  .explore {
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 5px;
  }
  .explore button {
    margin: 6px 0;
  }
  header {
    padding: 14px 0;
  }
  .shop {
    padding: 19px;
  }
  .scene canvas {
    min-height: 116px;
  }
}
