:root {
  color-scheme: dark;
  --bg: #08140b;
  --panel: rgba(8, 20, 11, 0.78);
  --panel-strong: rgba(7, 17, 9, 0.9);
  --text: #eff9df;
  --muted: #b8d0a5;
  --accent: #87cf67;
  --accent-strong: #4f8f3a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", "Nunito Sans", "Segoe UI", sans-serif;
  color: var(--text);
  font-size: clamp(15px, 1.4vw, 18px);
  background:
    radial-gradient(circle at top left, rgba(135, 207, 103, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(79, 143, 58, 0.2), transparent 30%),
    linear-gradient(180deg, #0e1d12 0%, #07100a 100%);
  letter-spacing: 0.01em;
}

.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.lede {
  margin: 12px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.legend {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.frame {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hud {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--panel-strong);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat {
  display: grid;
  gap: 4px;
}

.stat span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.stat strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  color: #07200d;
  background: linear-gradient(180deg, #bdf792, #7fcf61);
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  min-width: 64px;
}

.button:hover {
  filter: brightness(1.05);
}

.board {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: none;
}

.background,
.chimp,
.fist {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  image-rendering: auto;
}

.background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chimp,
.fist {
  transform-origin: center center;
  pointer-events: none;
  will-change: transform;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(5, 12, 7, 0.58);
  backdrop-filter: blur(4px);
  padding: 24px;
}

.overlay h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.overlay p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: start;
  }

  .legend {
    justify-items: start;
  }

  .hud {
    flex-wrap: wrap;
  }
}

/* Touch & small-screen tweaks */
@media (pointer: coarse) {
  .board {
    cursor: auto;
  }

  .button {
    padding: 16px 20px;
    font-size: 1.05rem;
    border-radius: 18px;
    min-height: 52px;
    min-width: 72px;
  }
}

@media (max-width: 480px) {
  .shell {
    padding: 18px 12px 28px;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }

  .lede {
    font-size: 0.98rem;
    max-width: 45ch;
  }

  .board {
    aspect-ratio: 4 / 3;
  }
}
