/* Shared design tokens and base styles for all mini games.
   Audience: children ages 2-4 on phones/tablets.
   Rules of thumb:
   - Touch targets are huge (>= 72px, usually much bigger).
   - No reading required to play; text is for grown-ups.
   - High contrast, friendly colors, rounded shapes. */

:root {
  --color-bg: #fdf6e3;
  --color-text: #3b3054;
  --color-primary: #ff8a5c;
  --color-sky: #aee6ff;
  --color-grass: #b8e986;
  --color-sun: #ffd93d;
  --color-berry: #c86bfa;
  --radius: 24px;
  --shadow: 0 6px 0 rgba(59, 48, 84, 0.15);
  --tap-target: 72px;
  font-size: 18px;
}

* {
  box-sizing: border-box;
  /* Prevent long-press text selection / callouts during play. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  /* Disable double-tap zoom and pull-to-refresh surprises mid-game. */
  touch-action: manipulation;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--color-berry);
  outline-offset: 3px;
}

/* Big friendly "home" button shown inside every game. */
.home-button {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 2rem;
  text-decoration: none;
}

.home-button:active {
  transform: scale(0.92);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
