/* ================================================================
   THE PAGE AROUND THE GAME
   The game itself is all drawn inside the canvas. This file only
   handles the page it sits on.
   ================================================================ */

body {
  margin: 0;
  min-height: 100vh;
  padding: 18px 12px 40px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  background: #101c14;
  color: #cfe4d0;
  font-family: system-ui, sans-serif;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffd166;
}

canvas {
  /* The game is drawn 960 wide, but shrinks to fit a smaller screen. */
  width: min(960px, 100%);
  height: auto;
  border-radius: 12px;
  border: 3px solid #2f4a33;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);

  /* Stops a double-tap zooming the page in mid-harvest. */
  touch-action: none;

  /* Keeps the pixels crisp instead of blurry when the page scales it down. */
  image-rendering: -webkit-optimize-contrast;
}

#controls {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

#how-to {
  max-width: 420px;
  font-size: 14px;
  line-height: 1.5;
  color: #9dbfa2;
}

#how-to p { margin: 0 0 6px; }
#how-to b { color: #ffd166; }

footer {
  font-size: 12px;
  color: #55705a;
}
