:root {
  --ink: #f7f1df;
  --paper: #e8dfc9;
  --forest: #11211b;
  --pine: #1e4a36;
  --moss: #6d8c45;
  --gold: #e0a936;
  --red: #a7392f;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background: repeating-linear-gradient(135deg, #e5dcc8 0 3px, #d8ceb7 3px 6px);
}

button { font: inherit; cursor: pointer; }

.game-shell {
  width: min(100%, 1040px);
  min-height: 100vh;
  padding: 28px;
  background: var(--forest);
  box-shadow: 0 0 0 8px #243d2d, 0 0 0 12px #c29343, 0 22px 60px #574a37aa;
}

.game-header, .game-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 4px; color: #d9bc7a; font: 700 11px/1.2 Verdana, sans-serif; letter-spacing: 1.4px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: 0; }

.icon-button {
  width: 42px;
  height: 42px;
  border: 2px solid #d9bc7a;
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
  background: transparent;
}
.icon-button:hover { background: #2d5b42; }

.status-bar {
  margin: 24px 0 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #b99656;
  background: #0b1712;
}
.status-bar div { min-width: 0; padding: 10px 14px; border-right: 1px solid #4e6045; }
.status-bar div:last-child { border-right: 0; }
.status-bar span { display: block; margin-bottom: 3px; color: #c9be9d; font: 700 10px/1.2 Verdana, sans-serif; letter-spacing: .7px; text-transform: uppercase; }
.status-bar strong { font-size: 20px; color: #fff9e8; }

.canvas-wrap { position: relative; border: 4px solid #c29343; background: #89b94d; }
canvas { display: block; width: 100%; height: auto; touch-action: none; }
canvas + p strong { color: #e0a936; }

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background: #07110bd9;
}
.overlay[hidden] { display: none; }
.overlay-kicker { margin: 0; color: #e0a936; font: 700 12px Verdana, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; }
.overlay h2 { margin: 12px 0; font-size: clamp(32px, 7vw, 58px); line-height: .95; }
.overlay p:not(.overlay-kicker) { max-width: 440px; margin: 4px 0 22px; color: #c29343; font-size: 18px; line-height: 1.45; }
.overlay button { padding: 13px 28px; border: 2px solid #f3d77b; color: #221808; font-weight: 700; font-size: 19px; background: var(--gold); box-shadow: 4px 4px 0 #6e4216; }
.overlay button:hover { background: #f0c450; }

.game-footer { min-height: 50px; color: #ddd2b7; font-size: 15px; }
.game-footer strong { color: var(--gold); font-size: 19px; }

@media (max-width: 560px) {
  .game-shell { padding: 16px 12px; box-shadow: none; }
  .status-bar div { padding: 9px 7px; }
  .status-bar strong { font-size: 15px; }
  .status-bar span { font-size: 8px; }
  .game-footer { align-items: flex-start; flex-direction: column; gap: 3px; padding-top: 8px; }
  .game-footer p { margin: 0; }
}