:root {
  --leaf-deep: #21451f;
  --leaf: #3a6b34;
  --ink: #eaf4e2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #21451f;
  color: var(--ink);
  font-family: ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  /* stop iOS rubber-banding / pull-to-refresh while shaking */
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---- Start overlay ---- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 90% at 50% 30%, rgba(58, 107, 52, 0.35), transparent 60%),
    rgba(20, 38, 18, 0.82);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 0.6s ease;
}
.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  text-align: center;
  max-width: 320px;
}

.overlay-bug {
  font-size: 64px;
  line-height: 1;
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.overlay h1 {
  margin: 14px 0 4px;
  font-size: 40px;
  letter-spacing: 2px;
  font-weight: 800;
}

.tagline {
  margin: 0 0 26px;
  opacity: 0.7;
  font-size: 15px;
}

.start-btn {
  appearance: none;
  border: 2px solid rgba(234, 244, 226, 0.85);
  background: rgba(234, 244, 226, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 1px;
  padding: 14px 34px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.start-btn:hover { background: rgba(234, 244, 226, 0.16); }
.start-btn:active { transform: scale(0.96); }

.hint {
  margin-top: 22px;
  font-size: 12.5px;
  opacity: 0.55;
  line-height: 1.5;
}

/* ---- Mute toggle ---- */
.mute-btn {
  position: fixed;
  z-index: 9;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 38, 18, 0.45);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mute-btn.muted { opacity: 0.45; }
.mute-btn.muted::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
