:root {
  color-scheme: dark;
  --ink: #090d0c;
  --cream: #f2ead8;
  --mint: #8ce0bc;
  --coral: #ef816f;
  --line: rgba(242, 234, 216, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
html, body, .game-shell, .game-shell * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
body { background: var(--ink); color: var(--cream); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; touch-action: none; }
button { font: inherit; }

.game-shell { position: relative; width: 100%; height: 100%; background: radial-gradient(circle at 50% 45%, #13201d 0, var(--ink) 58%); }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.hud {
  position: absolute; inset: max(18px, env(safe-area-inset-top)) 20px auto;
  display: flex; align-items: center; gap: 24px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line); pointer-events: none;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.hud strong { color: var(--mint); margin-right: auto; letter-spacing: .18em; }
.hud b { color: var(--cream); font-weight: 500; }

.overlay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 40px)); padding: 34px; text-align: center;
  background: rgba(9, 13, 12, .9); border: 1px solid var(--line);
  box-shadow: 12px 12px 0 rgba(140, 224, 188, .08);
}
.overlay.hidden { display: none; }
.eyebrow { margin: 0 0 20px; color: var(--coral); font-size: 11px; letter-spacing: .2em; }
h1, h2 { margin: 0; font-size: clamp(38px, 9vw, 74px); line-height: .95; letter-spacing: -.06em; }
.overlay p { margin: 18px 0; }
.keys { color: rgba(242, 234, 216, .62); font-size: 11px; }
.overlay button {
  margin-top: 8px; padding: 12px 18px; color: var(--ink); background: var(--mint);
  border: 0; cursor: pointer; text-transform: uppercase; letter-spacing: .08em;
}
.overlay button:hover, .overlay button:focus-visible { background: var(--cream); outline: 2px solid var(--coral); outline-offset: 3px; }

.controls { display: none; position: absolute; inset: auto 16px max(16px, env(safe-area-inset-bottom)); gap: 10px; align-items: end; }
.controls button {
  width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 50%;
  color: var(--cream); background: rgba(9, 13, 12, .72); touch-action: none; user-select: none;
}
.controls .fire { margin-left: auto; width: 68px; height: 68px; color: var(--coral); border-color: var(--coral); }
.controls button.active { color: var(--ink); background: var(--mint); }

@media (hover: none), (max-width: 760px) {
  .controls { display: flex; }
  .hud { gap: 10px; font-size: 10px; }
  .hud strong { display: none; }
  .overlay { padding: 26px 18px; }
  .keys { display: none; }
}
