* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #1b1f2e;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; pointer-events: none;
}
.stat {
  background: rgba(15, 18, 30, 0.75); border: 3px solid #000; border-radius: 8px;
  padding: 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 96px; text-shadow: 2px 2px 0 #000;
}
.stat .label { font-size: 8px; color: #9aa3ae; }
.stat span:last-child { font-size: 16px; color: #ffd84a; }

#crosshair {
  position: fixed; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none;
  border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000;
}
#crosshair::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px;
  background: #fff; border-radius: 50%;
}
#reload {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: #ffd84a; text-shadow: 2px 2px 0 #000; pointer-events: none;
}

/* ---------- touch ---------- */
#touch {
  position: fixed; left: 0; right: 0; bottom: 16px; display: flex; justify-content: space-between;
  padding: 0 16px; pointer-events: none;
}
.tbtn {
  pointer-events: auto; width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid #000; background: rgba(255, 255, 255, 0.85); font-size: 24px;
}

/* ---------- menus ---------- */
.screen {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 24px; text-align: center; background: rgba(10, 14, 28, 0.55);
}
h1 {
  font-size: clamp(32px, 9vmin, 64px); line-height: 1.25; color: #ffd84a;
  text-shadow: 4px 4px 0 #e8483f, 8px 8px 0 #000;
}
h2 { font-size: clamp(24px, 7vmin, 40px); color: #ffd84a; text-shadow: 3px 3px 0 #000; }
p { font-size: 12px; line-height: 1.8; text-shadow: 2px 2px 0 #000; }
p.big { font-size: 18px; }
.best { color: #9fe870; }
.help { list-style: none; font-size: 10px; line-height: 2.4; text-shadow: 2px 2px 0 #000; }
kbd {
  display: inline-block; padding: 2px 6px; background: #fff; color: #000; border-radius: 4px;
  font-family: inherit; font-size: 10px; line-height: 1.4; box-shadow: 0 2px 0 #000;
  text-shadow: none; /* the black shadow from .help smeared the dark letters on the white keys */
}
button {
  font-family: inherit; font-size: 16px; padding: 16px 32px; color: #fff; background: #e8722b;
  border: 4px solid #000; border-radius: 8px; box-shadow: 0 5px 0 #000; cursor: pointer;
}
button:hover { background: #f5843e; }
button:active { transform: translateY(3px); box-shadow: 0 2px 0 #000; }
.back-link { font-size: 11px; color: #fff; text-decoration: none; text-shadow: 2px 2px 0 #000; padding: 8px; }
.back-link:hover, .back-link:focus-visible { color: #ffd84a; }
