/* Henry's Game — everything is one full-screen canvas plus a few big buttons.
   Designed thumb-first: nothing important sits in a corner a kid can't reach. */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #1b2a4a;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  /* A seven-year-old will drag, pinch and double-tap. Let none of it scroll. */
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

#game {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hidden { display: none !important; }

/* ---- HUD ---------------------------------------------------------------- */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.score {
  font-size: 40px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35);
  min-width: 2ch;
}

.hearts { font-size: 28px; letter-spacing: 2px; }

/* A lost flower stays in place, greyed, so the row never jumps around. */
.hearts .gone { filter: grayscale(1); opacity: .3; }

/* ---- Screens ------------------------------------------------------------ */

.screen {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  color: #fff;
  background: rgba(14, 22, 40, .82);
  backdrop-filter: blur(3px);
}

.screen h1 {
  margin: 0;
  font-size: clamp(44px, 15vw, 92px);
  line-height: .95;
  letter-spacing: 2px;
  color: #7dfba0;
  text-shadow: 0 6px 0 #1d6b39, 0 10px 24px rgba(0, 0, 0, .5);
}

.screen h2 {
  margin: 0;
  font-size: clamp(26px, 8vw, 46px);
  line-height: 1.05;
  color: #ffd76b;
  text-shadow: 0 4px 0 #8a5f00;
}

.blurb { margin: 0; font-size: clamp(16px, 4.6vw, 22px); line-height: 1.5; opacity: .92; }
.final { margin: 6px 0 0; font-size: clamp(20px, 6vw, 30px); }
.final span { font-weight: bold; color: #7dfba0; }
.best { margin: 0; font-size: 17px; opacity: .7; }

.big {
  margin-top: 10px;
  padding: 20px 42px;
  border: 0;
  border-radius: 999px;
  background: #ff5d8f;
  box-shadow: 0 8px 0 #b02b58;
  color: #fff;
  font: inherit;
  font-size: clamp(22px, 6.5vw, 32px);
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  animation: bob 1.4s ease-in-out infinite;
}

.big:active { transform: translateY(6px); box-shadow: 0 2px 0 #b02b58; animation: none; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .big { animation: none; }
}

/* ---- Cross-link to the rest of the family ------------------------------- */

.badge {
  position: fixed;
  right: calc(env(safe-area-inset-right) + 8px);
  bottom: calc(env(safe-area-inset-bottom) + 8px);
  z-index: 4;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  opacity: .55;
}

.badge:active { opacity: 1; }
