:root {
  --bg: #efe8d8;
  --panel: #fff8e8;
  --ink: #151515;
  --accent: #e85d2d;
  --accent-2: #f4a62a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  background:
    radial-gradient(circle at 20% 20%, #fff4cb 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, #ffd7aa 0%, transparent 35%),
    var(--bg);
  color: var(--ink);
}

body {
  display: grid;
  place-items: center;
  padding: 12px;
}

.app {
  width: min(900px, 100%);
}

.hud {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  letter-spacing: 0.04em;
}

.stats {
  display: flex;
  gap: 14px;
  font-size: 0.98rem;
}

.game-shell {
  margin-top: 8px;
  position: relative;
  background: var(--panel);
  border: 4px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.1);
}

#game {
  display: block;
  width: 100%;
  height: min(70vh, 560px);
  background:
    linear-gradient(180deg, #fff8e2 0%, #ffe9c2 100%);
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: rgba(20, 20, 20, 0.35);
  color: #fff;
  text-align: center;
}

.overlay.hidden {
  display: none;
}

#overlayText {
  margin: 0;
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  font-weight: 700;
}

#startBtn {
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
}

.help {
  margin: 10px 4px 0;
  font-size: 0.9rem;
  opacity: 0.8;
}
