:root {
  --ink: #1b1420;
  --cream: #ffe9b8;
  --gold: #ffd24a;
  --mint: #3ecf9a;
  --blue: #3a5bd9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1b1420; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.hidden { display: none !important; }

#hud {
  position: fixed; inset: 0; pointer-events: none; z-index: 4;
  font-family: "Press Start 2P", monospace; color: var(--cream);
}
.hud-l { position: absolute; top: 16px; left: 16px; }
.hud-c { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); text-align: center; }
.hud-r { position: absolute; top: 16px; right: 16px; }
.hearts { color: #ff5d73; font-size: 11px; margin-bottom: 8px; text-shadow: 2px 2px 0 #000; }
.chip {
  background: rgba(20, 12, 28, 0.72);
  border: 2px solid #ffe9b8;
  padding: 6px 10px;
  font-size: 10px;
  margin-top: 6px;
  box-shadow: 3px 3px 0 #000;
}
.chip.gold { color: var(--gold); }
#prompt {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--gold); color: #1b1420; padding: 8px 12px; font-size: 10px;
}

#title, #over {
  position: fixed; inset: 0; z-index: 6;
  display: grid; place-items: center; text-align: center;
  background: linear-gradient(to top, rgba(12,8,16,.82), rgba(12,8,16,.28) 55%);
  color: var(--cream);
  font-family: "Luckiest Guy", system-ui;
}
#title h1, #over h2 {
  font-size: clamp(52px, 10vw, 96px);
  line-height: 0.88;
  color: var(--gold);
  -webkit-text-stroke: 3px #1b1420;
  paint-order: stroke fill;
  font-weight: 400;
}
.city { font-family: "Press Start 2P", monospace; font-size: 11px; letter-spacing: 2px; margin-bottom: 10px; }
.year {
  width: 76px; height: 76px; margin: 10px auto 12px;
  background: var(--mint); color: #1b1420; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px;
  box-shadow: 0 6px 0 #1b1420;
}
.blurb { max-width: 36ch; margin: 0 auto 16px; font-family: Nunito, system-ui; font-weight: 800; }
#playBtn, #retryBtn {
  pointer-events: auto; cursor: pointer;
  font-family: "Luckiest Guy", system-ui; font-size: 26px;
  background: var(--gold); color: #1b1420; border: 0; border-radius: 12px;
  padding: 10px 22px; box-shadow: 0 6px 0 #8a6a12;
}
.help { margin-top: 14px; font-family: "Press Start 2P", monospace; font-size: 8px; opacity: 0.85; }

#mobile { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#stick {
  pointer-events: auto; position: absolute; left: 18px; bottom: 18px;
  width: 110px; height: 110px; border: 3px solid rgba(255,233,184,.6); border-radius: 50%;
}
#knob {
  width: 48px; height: 48px; background: var(--cream); border-radius: 50%;
  position: absolute; left: 31px; top: 31px;
}
#fireBtn, #useBtn {
  pointer-events: auto; position: absolute; right: 18px; border: 0; border-radius: 50%;
  font-family: "Luckiest Guy", system-ui; color: #1b1420;
}
#fireBtn { bottom: 22px; width: 84px; height: 84px; background: #ff5d73; font-size: 18px; }
#useBtn { bottom: 118px; right: 32px; width: 58px; height: 58px; background: var(--gold); }

@media (pointer: fine) and (min-width: 821px) { #mobile { display: none !important; } }
