/* Shared look for Rebeca's games — pastel, rounded, big touch targets. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Chalkboard SE", "Comic Sans MS", "Segoe Print", sans-serif;
  background: linear-gradient(#7dc3fa, #ebf8ff 70%, #96d78c);
  color: #5f4655;
  overflow: hidden;
  touch-action: manipulation;       /* no double-tap zoom */
  user-select: none;
  -webkit-user-select: none;
}

h1 {
  text-align: center;
  margin: 14px 0 6px;
  font-size: clamp(26px, 5vw, 48px);
  color: #fff;
  text-shadow: 0 2px 0 rgba(95, 70, 85, .35);
}

.card {
  background: #fffcf2;
  border-radius: 24px;
  border: 4px solid #e8b06a;
  box-shadow: 0 6px 0 rgba(95, 70, 85, .15);
}

button, .bigbtn {
  font-family: inherit;
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: bold;
  color: #5f4655;
  background: #fffcf2;
  border: 4px solid #e8b06a;
  border-radius: 20px;
  padding: 14px 26px;
  min-width: 64px;
  min-height: 64px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(95, 70, 85, .18);
}
button:active, .bigbtn:active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 rgba(95,70,85,.18); }

/* home button — every game has one, top-left */
.home {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  font-size: 30px;
  padding: 8px 14px;
  border-radius: 50%;
  border-color: #c8a078;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* confetti bits spawned by KID.confetti() */
.kid-confetti {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 999;
  animation: kid-fall 1.3s ease-in forwards;
}
@keyframes kid-fall {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(540deg); }
}

.kid-pop {
  animation: kid-pop .35s ease-out;
}
@keyframes kid-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* flying star spawned by KID.award() — bursts at screen center, sails
   to the top-right corner, fades. --fx/--fy are set per-flight by kid.js. */
.kid-star-fly {
  position: fixed;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  pointer-events: none;
  z-index: 998;
  animation: kid-star-fly 1.25s ease-in forwards;
}
@keyframes kid-star-fly {
  0%   { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0deg); }
  18%  { opacity: 1; transform: translate(0, 0) scale(1.5) rotate(12deg); }
  38%  { opacity: 1; transform: translate(0, 0) scale(1.1) rotate(-8deg); }
  100% { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.4) rotate(180deg); }
}

.kid-shake { animation: kid-shake .4s ease; }
@keyframes kid-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  75% { transform: translateX(9px); }
}
