/* Bright playground backdrop for game pages */
.stage.play-fun {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 126, 179, 0.55) 0 12%, transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(255, 210, 63, 0.65) 0 14%, transparent 34%),
    radial-gradient(circle at 78% 78%, rgba(126, 217, 87, 0.45) 0 16%, transparent 40%),
    radial-gradient(circle at 18% 82%, rgba(93, 173, 226, 0.5) 0 14%, transparent 36%),
    linear-gradient(160deg, #7ad7ff 0%, #b8f2c8 28%, #ffe29a 58%, #ffb4d9 100%);
  overflow: hidden;
}
.stage.play-fun::before {
  height: 18%;
  opacity: 0.85;
  background:
    radial-gradient(ellipse 55% 120% at 15% 120%, #2fa85c 0 42%, transparent 43%),
    radial-gradient(ellipse 70% 140% at 55% 130%, #49c974 0 46%, transparent 47%),
    radial-gradient(ellipse 50% 120% at 90% 125%, #1f7a52 0 40%, transparent 41%);
}

.fun-bits {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.fun-bits .blob {
  position: absolute;
  border-radius: 40% 60% 55% 45%;
  opacity: 0.55;
  animation: bob 5s ease-in-out infinite;
}
.fun-bits .b1 { width: 7rem; height: 5.5rem; left: -1rem; top: 22%; background: #ff7eb3; }
.fun-bits .b2 { width: 5.5rem; height: 5rem; right: -0.5rem; top: 30%; background: #5dade2; animation-delay: -1.2s; }
.fun-bits .b3 { width: 6rem; height: 4.5rem; left: 8%; bottom: 16%; background: #ffd23f; animation-delay: -2s; border-radius: 50% 40% 60% 50%; }
.fun-bits .b4 { width: 4.5rem; height: 4.5rem; right: 12%; bottom: 22%; background: #7ed957; animation-delay: -0.6s; border-radius: 50%; }

.fun-bits .star {
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  background: #fff46a;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: bob 3.2s ease-in-out infinite;
}
.fun-bits .s1 { top: 14%; left: 22%; }
.fun-bits .s2 { top: 20%; right: 24%; animation-delay: -0.8s; width: 1.1rem; height: 1.1rem; }
.fun-bits .s3 { top: 42%; left: 6%; animation-delay: -1.5s; background: #fff; }

.fun-bits .dot {
  position: absolute;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  animation: bob 4s ease-in-out infinite;
}
.fun-bits .d1 { background: #ff6b5b; top: 28%; left: 40%; }
.fun-bits .d2 { background: #fff; top: 36%; right: 38%; animation-delay: -1s; }
.fun-bits .d3 { background: #5dade2; top: 48%; left: 28%; width: 0.6rem; height: 0.6rem; }
.fun-bits .d4 { background: #ff9f1c; bottom: 28%; left: 18%; animation-delay: -2.2s; }
.fun-bits .d5 { background: #ff7eb3; bottom: 34%; right: 20%; animation-delay: -0.4s; }

.game-shell {
  position: relative;
  z-index: 2;
  width: min(52rem, 100%);
  margin: 0 auto;
  padding: 4.5rem 0.75rem 2rem;
}

.game-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  text-align: center;
  color: var(--white);
  text-shadow: 0 3px 0 rgba(30, 42, 74, 0.18);
  margin-bottom: 0.35rem;
}

.game-sub {
  text-align: center;
  font-weight: 800;
  color: rgba(30, 42, 74, 0.75);
  margin-bottom: 0.85rem;
}

.level-picker,
.size-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto 0.95rem;
}
.level-btn,
.size-btn {
  appearance: none;
  border: 0.18rem solid #fff;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0.22rem 0 rgba(30, 42, 74, 0.1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-width: 2.6rem;
}
.level-btn.is-on,
.size-btn.is-on {
  color: #fff;
  background: linear-gradient(145deg, #5dade2, #2e86c1);
  box-shadow: 0 0.22rem 0 #1f5f8a;
}
.level-btn.is-locked,
.size-btn.is-locked {
  color: rgba(30, 42, 74, 0.45);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.85;
}
.level-btn-lock {
  width: 0.7rem;
  height: 0.62rem;
  border: 0.12rem solid currentColor;
  border-radius: 0.12rem;
  position: relative;
  flex: 0 0 auto;
}
.level-btn-lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.42rem;
  width: 0.42rem;
  height: 0.42rem;
  border: 0.12rem solid currentColor;
  border-bottom: none;
  border-radius: 0.35rem 0.35rem 0 0;
  transform: translateX(-50%);
}
.level-btn:focus-visible,
.size-btn:focus-visible {
  outline: 3px solid #ffd23f;
  outline-offset: 2px;
}

.game-board {
  background: rgba(255, 255, 255, 0.55);
  border: 0.28rem solid #fff;
  border-radius: 1.6rem;
  padding: 1rem;
  box-shadow: 0 0.8rem 0 rgba(30, 42, 74, 0.08);
}

.score-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 0.16rem solid #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Animal match */
.match-layout {
  display: grid;
  grid-template-columns: minmax(6.5rem, 1fr) minmax(10rem, 14rem) minmax(6.5rem, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-height: 18rem;
}

.word-col {
  display: grid;
  gap: 0.4rem;
}

.word-btn {
  appearance: none;
  border: 0.2rem solid #fff;
  border-radius: 1rem;
  padding: 0.55rem 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3.2vw, 1.25rem);
  font-weight: 800;
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 0.32rem 0 rgba(30, 42, 74, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.word-btn:nth-child(5n+1) { background: linear-gradient(145deg, #ff8a70, #ff6b5b); }
.word-btn:nth-child(5n+2) { background: linear-gradient(145deg, #6ed3ff, #3db5e8); }
.word-btn:nth-child(5n+3) { background: linear-gradient(145deg, #7dffb0, #3ecf78); }
.word-btn:nth-child(5n+4) { background: linear-gradient(145deg, #ffb347, #ff9800); }
.word-btn:nth-child(5n+5) { background: linear-gradient(145deg, #ff7eb3, #e84a8a); }
.word-col:last-child .word-btn:nth-child(5n+1) { background: linear-gradient(145deg, #7ed957, #3fa34d); }
.word-col:last-child .word-btn:nth-child(5n+2) { background: linear-gradient(145deg, #5dade2, #2e86c1); }
.word-col:last-child .word-btn:nth-child(5n+3) { background: linear-gradient(145deg, #f4a261, #e76f51); }
.word-col:last-child .word-btn:nth-child(5n+4) { background: linear-gradient(145deg, #a8e6cf, #3dbb8a); }
.word-col:last-child .word-btn:nth-child(5n+5) { background: linear-gradient(145deg, #ffd166, #f4a261); }

.word-btn:hover,
.word-btn:focus-visible {
  transform: translateY(-2px) scale(1.03);
  outline: none;
}
.word-btn:active { transform: translateY(3px); box-shadow: 0 0.1rem 0 rgba(30, 42, 74, 0.18); }
.word-btn.is-wrong {
  animation: nope 0.45s ease;
  filter: grayscale(0.3) brightness(0.95);
}
.word-btn.is-right {
  animation: yay 0.55s ease;
}

.animal-stage {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1.4rem;
  border: 0.22rem solid #fff;
  min-height: 16rem;
  padding: 0.55rem;
  overflow: hidden;
}
.animal-photo {
  width: min(100%, 15rem);
  height: min(58vw, 15rem);
  object-fit: cover;
  border-radius: 1.1rem;
  animation: pop-in 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.clue-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}

.feedback {
  text-align: center;
  min-height: 1.6rem;
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #1f7a52;
}
.feedback.bad { color: #c73b2d; }

/* Word search */
.search-layout {
  display: grid;
  grid-template-columns: minmax(4.5rem, 7.5rem) minmax(11rem, 22rem) minmax(4.5rem, 7.5rem);
  gap: 0.65rem;
  align-items: start;
  justify-content: center;
}
.search-layout .word-btn.word-chip {
  display: block;
  text-align: center;
  cursor: default;
  pointer-events: none;
  user-select: none;
}
.search-layout .word-btn.word-chip.done {
  position: relative;
  background: linear-gradient(145deg, #9aa3b2, #6b7280);
  color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  filter: grayscale(0.35);
  opacity: 0.95;
}
.search-layout .word-btn.word-chip.done .chip-text {
  text-decoration: line-through;
  text-decoration-color: #fff;
  text-decoration-thickness: 0.28rem;
  text-decoration-skip-ink: none;
}
.search-layout .word-btn.word-chip.done::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 0.34rem;
  background: #ff6b5b;
  border-radius: 999px;
  transform: translateY(-50%) rotate(-14deg);
  box-shadow: 0 0.12rem 0 rgba(30, 42, 74, 0.2);
  pointer-events: none;
}

.grid {
  display: grid;
  gap: 0.35rem;
  width: min(22rem, 100%);
  margin: 0 auto;
  min-height: 8rem;
}
.grid.grid-lg {
  gap: 0.28rem;
  width: 100%;
  max-width: min(22rem, 100%);
  min-height: min(22rem, 70vw);
}

/* Counting */
.count-stage {
  min-height: 10rem;
  margin-bottom: 0.85rem;
}
.count-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 0.65rem;
}
.count-group.compare {
  min-width: 0;
  width: 100%;
  min-height: 11rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.count-group.compare .count-group-pics {
  gap: 0.4rem;
}
.count-group.compare .count-pic {
  width: clamp(3.6rem, 16vw, 5.4rem);
  height: clamp(3.6rem, 16vw, 5.4rem);
}
@media (max-width: 420px) {
  .count-compare {
    gap: 0.5rem;
  }
  .count-group.compare {
    min-height: 9rem;
    padding: 0.5rem;
  }
}
.count-swarm {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.75);
  border: 0.22rem solid #fff;
  border-radius: 1.2rem;
  min-height: 8.5rem;
}
.count-swarm.build { min-height: 6.5rem; }
.count-pic {
  width: clamp(3.4rem, 14vw, 5.2rem);
  height: clamp(3.4rem, 14vw, 5.2rem);
  object-fit: cover;
  border-radius: 0.85rem;
  border: 0.16rem solid #fff;
  box-shadow: 0 0.22rem 0 rgba(30, 42, 74, 0.1);
  transform: rotate(var(--tilt, 0deg));
  animation: pop-in 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.count-pic.tiny {
  width: clamp(2.1rem, 8vw, 3rem);
  height: clamp(2.1rem, 8vw, 3rem);
  border-radius: 0.55rem;
}
.count-target-num {
  width: min(7rem, 34vw);
  margin: 0 auto 0.55rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 1.2rem;
  background: linear-gradient(145deg, #ffd23f, #ff9f1c);
  border: 0.22rem solid #fff;
  box-shadow: 0 0.4rem 0 rgba(30, 42, 74, 0.12);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 800;
  color: var(--ink);
}
.count-goal {
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.35rem;
}
.count-goal strong {
  color: #e67e22;
  font-size: 1.2em;
}
.count-empty {
  text-align: center;
  font-weight: 800;
  color: rgba(30, 42, 74, 0.55);
  margin: 0.75rem auto;
  padding: 1rem;
  min-height: 6.5rem;
  display: grid;
  place-items: center;
  border: 0.18rem dashed rgba(30, 42, 74, 0.2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.45);
  box-sizing: border-box;
}
.count-hint {
  text-align: center;
  font-weight: 800;
  color: rgba(30, 42, 74, 0.7);
  margin: 0.35rem 0 0;
}
.count-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}
.count-num {
  min-width: 3.6rem;
  min-height: 3.6rem;
  font-size: clamp(1.4rem, 5vw, 1.9rem) !important;
}
.count-num.add { min-width: 7rem; }
.count-num.done-build { min-width: 5.5rem; }
.count-num:disabled {
  opacity: 0.45;
  cursor: default;
  filter: grayscale(0.3);
}
.count-group {
  appearance: none;
  border: 0.22rem solid #fff;
  border-radius: 1.1rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.32rem 0 rgba(30, 42, 74, 0.12);
  cursor: pointer;
  min-width: min(9rem, 42vw);
  transition: transform 0.12s ease;
}
.count-group.tall { min-width: min(11rem, 44vw); }
.count-group:hover,
.count-group:focus-visible {
  transform: translateY(-2px) scale(1.02);
  outline: none;
}
.count-group.is-wrong { animation: nope 0.45s ease; }
.count-group.is-right { animation: yay 0.55s ease; outline: 0.22rem solid #5fd08a; }
.count-group-pics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem;
}

/* Treasure Island maze — ocean rim, sandy paths, bushy hedges */
.maze-wrap {
  width: min(30rem, 100%);
  margin: 0 auto 0.85rem;
}
.maze-island {
  position: relative;
  padding: 2.4rem 1.6rem 1.8rem;
  border-radius: 1.8rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(255, 224, 150, 0.28), transparent 62%),
    linear-gradient(180deg, #5ec8ef 0%, #3aa8d8 42%, #2f8fc4 100%);
  border: 0.28rem solid #fff;
  box-shadow:
    0 0.55rem 0 rgba(30, 42, 74, 0.12),
    inset 0 -0.55rem 1.2rem rgba(20, 80, 120, 0.18);
  overflow: visible;
}
.island-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.island-decor .wave {
  position: absolute;
  left: -8%;
  right: -8%;
  height: 1.1rem;
  border-radius: 50%;
  border: 0.18rem solid rgba(255, 255, 255, 0.35);
  border-bottom: none;
  opacity: 0.7;
  animation: island-wave 3.4s ease-in-out infinite;
  z-index: 0;
}
.island-decor .w1 { top: 0.35rem; animation-delay: 0s; }
.island-decor .w2 { bottom: 0.55rem; animation-delay: 0.7s; opacity: 0.5; }
.island-decor .w3 { top: 48%; left: auto; right: -1.2rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0.16rem solid rgba(255,255,255,0.28); animation: island-bob 2.8s ease-in-out infinite; }
.island-decor .palm {
  position: absolute;
  width: 3.4rem;
  height: 4.8rem;
  z-index: 3;
  filter: drop-shadow(0 0.2rem 0.1rem rgba(20, 50, 30, 0.28));
}
.island-decor .palm-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.island-decor .p1 { left: -0.15rem; top: -0.35rem; transform: rotate(-8deg); }
.island-decor .p2 { right: -0.2rem; top: 0.15rem; transform: rotate(10deg) scale(0.92); }
.island-decor .p3 { left: 0.55rem; bottom: -0.45rem; transform: rotate(6deg) scale(0.88); }
.island-decor .island-rock {
  position: absolute;
  width: 1.35rem;
  height: 0.85rem;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(circle at 35% 30%, #c5ced8, transparent 55%),
    linear-gradient(180deg, #9aa7b5, #5f6c7a);
  opacity: 0.85;
  z-index: 1;
}
.island-decor .r1 { right: 2.1rem; bottom: 0.85rem; }
.island-decor .r2 { left: 3.1rem; top: 1.15rem; width: 0.95rem; height: 0.55rem; opacity: 0.65; }
@keyframes island-wave {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(1.5%); opacity: 0.85; }
}
@keyframes island-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.2rem); }
}
.maze-board {
  --maze-size: 6;
  --maze-r: 0;
  --maze-c: 0;
  --maze-pad: 0.35rem;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  width: 100%;
  min-height: 14rem;
  aspect-ratio: 1 / 1;
  grid-auto-rows: 1fr;
  padding: var(--maze-pad);
  background:
    radial-gradient(circle at 18% 22%, rgba(60, 160, 80, 0.35), transparent 34%),
    radial-gradient(circle at 82% 70%, rgba(40, 120, 60, 0.3), transparent 38%),
    radial-gradient(circle at 50% 45%, #f0dfa0 0%, #d4c878 55%, #b8a858 100%);
  border-radius: 1.35rem;
  overflow: visible;
  box-shadow:
    inset 0 0 0 0.2rem rgba(255, 248, 220, 0.45),
    0 0.35rem 0.65rem rgba(30, 70, 40, 0.18);
}
.maze-board.maze-bump {
  animation: nope 0.28s ease;
}
.maze-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
  overflow: visible;
}
.maze-cell.is-ocean {
  cursor: default;
  border-radius: 0.7rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 45%),
    linear-gradient(160deg, #7ed6f7 0%, #4bb8e8 48%, #2f9fd0 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  animation: island-ocean-shimmer 3.2s ease-in-out infinite;
}
.maze-cell.is-ocean:nth-child(3n) { animation-delay: 0.4s; }
.maze-cell.is-ocean:nth-child(5n) { animation-delay: 0.9s; }
@keyframes island-ocean-shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
.maze-cell.is-beach {
  z-index: 5;
  overflow: visible;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.65), transparent 48%),
    linear-gradient(165deg, #fff6d2 0%, #ffe59a 48%, #f0d06a 100%);
}
.maze-cell.is-jungle {
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(90, 170, 70, 0.18), transparent 42%),
    radial-gradient(circle at 25% 75%, rgba(50, 120, 50, 0.14), transparent 40%),
    linear-gradient(165deg, #eaf6c4 0%, #d4e892 45%, #c2d87a 100%);
}
/* Leafy hedges stay inside each jungle cell so beach pads stay clear */
.hedge {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 12% 45%, #4ad46e 0 22%, transparent 23%),
    radial-gradient(circle at 28% 18%, #2f9e4c 0 26%, transparent 27%),
    radial-gradient(circle at 48% 8%, #3ecf6a 0 24%, transparent 25%),
    radial-gradient(circle at 68% 20%, #249447 0 28%, transparent 29%),
    radial-gradient(circle at 88% 42%, #36b85a 0 24%, transparent 25%),
    radial-gradient(circle at 78% 78%, #1f7a38 0 26%, transparent 27%),
    radial-gradient(circle at 52% 92%, #2db85a 0 24%, transparent 25%),
    radial-gradient(circle at 22% 82%, #145c32 0 28%, transparent 29%),
    radial-gradient(circle at 40% 50%, #237a3c 0 30%, transparent 31%),
    linear-gradient(180deg, #2f9e4c 0%, #1a6b34 48%, #0f3d24 100%);
  box-shadow:
    inset 0 0.12rem 0 rgba(180, 255, 160, 0.28),
    0 0.12rem 0.15rem rgba(10, 40, 20, 0.35);
}
/* Keep hedges inside their cell; one side only so corridors stay roomy */
.hedge-n {
  left: 4%;
  right: 4%;
  top: 0;
  height: 26%;
  border-radius: 55% 60% 40% 45% / 70% 65% 40% 45%;
}
.hedge-s {
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 26%;
  border-radius: 45% 40% 60% 55% / 40% 45% 70% 65%;
}
.hedge-e {
  top: 4%;
  bottom: 4%;
  right: 0;
  width: 26%;
  border-radius: 45% 60% 55% 40% / 50% 60% 50% 45%;
  background:
    radial-gradient(circle at 40% 12%, #4ad46e 0 22%, transparent 23%),
    radial-gradient(circle at 18% 28%, #2f9e4c 0 26%, transparent 27%),
    radial-gradient(circle at 8% 48%, #3ecf6a 0 24%, transparent 25%),
    radial-gradient(circle at 20% 68%, #249447 0 28%, transparent 29%),
    radial-gradient(circle at 42% 88%, #36b85a 0 24%, transparent 25%),
    radial-gradient(circle at 78% 78%, #1f7a38 0 26%, transparent 27%),
    radial-gradient(circle at 92% 52%, #2db85a 0 24%, transparent 25%),
    radial-gradient(circle at 82% 22%, #145c32 0 28%, transparent 29%),
    radial-gradient(circle at 50% 40%, #237a3c 0 30%, transparent 31%),
    linear-gradient(90deg, #2f9e4c 0%, #1a6b34 48%, #0f3d24 100%);
}
.hedge-w {
  top: 4%;
  bottom: 4%;
  left: 0;
  width: 26%;
  border-radius: 60% 45% 40% 55% / 60% 50% 45% 50%;
  background:
    radial-gradient(circle at 60% 12%, #4ad46e 0 22%, transparent 23%),
    radial-gradient(circle at 82% 28%, #2f9e4c 0 26%, transparent 27%),
    radial-gradient(circle at 92% 48%, #3ecf6a 0 24%, transparent 25%),
    radial-gradient(circle at 80% 68%, #249447 0 28%, transparent 29%),
    radial-gradient(circle at 58% 88%, #36b85a 0 24%, transparent 25%),
    radial-gradient(circle at 22% 78%, #1f7a38 0 26%, transparent 27%),
    radial-gradient(circle at 8% 52%, #2db85a 0 24%, transparent 25%),
    radial-gradient(circle at 18% 22%, #145c32 0 28%, transparent 29%),
    radial-gradient(circle at 50% 40%, #237a3c 0 30%, transparent 31%),
    linear-gradient(270deg, #2f9e4c 0%, #1a6b34 48%, #0f3d24 100%);
}
.jungle-litter {
  position: absolute;
  left: 30%;
  top: 55%;
  width: 0.45rem;
  height: 0.28rem;
  border-radius: 60% 40%;
  background: #5a9e3a;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
  box-shadow:
    0.55rem -0.35rem 0 -0.05rem #7bc45a,
    -0.4rem 0.25rem 0 -0.08rem #3d7a28,
    0.2rem 0.4rem 0 -0.1rem #e85d75;
}
.maze-cell.is-visited:not(.is-end):not(.is-ocean):not(.has-hero) {
  background:
    radial-gradient(circle at 50% 45%, rgba(110, 200, 255, 0.35), transparent 55%),
    linear-gradient(165deg, #e8f5c8 0%, #d0e8a0 55%, #c2d87a 100%);
}
.maze-cell.is-visited:not(.is-end):not(.is-ocean):not(.has-hero)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: #3b9dd8;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.9);
  pointer-events: none;
  opacity: 0.9;
  z-index: 3;
}
.maze-cell.is-start,
.maze-cell.is-gate {
  z-index: 4;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.7), transparent 50%),
    linear-gradient(165deg, #fff6d2 0%, #ffe59a 45%, #f0d06a 100%);
}
.maze-cell.is-start {
  box-shadow:
    inset 0 0 0 0.14rem rgba(255, 255, 255, 0.55),
    0 0 0 0.14rem rgba(241, 196, 15, 0.35);
}
.maze-cell.is-gate {
  background:
    radial-gradient(circle at 50% 80%, rgba(80, 180, 90, 0.2), transparent 50%),
    linear-gradient(180deg, #fff6d2 0%, #ffe59a 55%, #eaf6c4 100%);
}
.maze-cell.is-exit,
.maze-cell.is-end {
  z-index: 6;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.75), transparent 50%),
    linear-gradient(165deg, #fff8dc 0%, #ffe59a 45%, #f0d06a 100%);
}
.maze-cell.is-end {
  box-shadow:
    inset 0 0 0 0.14rem rgba(255, 255, 255, 0.6),
    0 0 0 0.16rem rgba(241, 196, 15, 0.45);
}
.maze-cell.is-beach .hedge {
  display: none !important;
}
.maze-landmark {
  position: absolute;
  inset: 16%;
  pointer-events: none;
  opacity: 0.95;
  z-index: 1;
}
.gate-arch {
  inset: auto 12% 4% 12%;
  height: 58%;
  border-radius: 1.2rem 1.2rem 0.35rem 0.35rem;
  background:
    radial-gradient(circle at 18% 30%, #4ad46e 0 18%, transparent 19%),
    radial-gradient(circle at 82% 28%, #2f9e4c 0 20%, transparent 21%),
    radial-gradient(circle at 12% 70%, #1f7a38 0 22%, transparent 23%),
    radial-gradient(circle at 88% 72%, #249447 0 20%, transparent 21%),
    radial-gradient(ellipse 70% 85% at 50% 100%, transparent 38%, #145c32 39% 78%, transparent 79%),
    linear-gradient(90deg, #145c32 0 22%, transparent 22% 78%, #145c32 78%);
  opacity: 0.95;
}
.maze-chest {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 108%;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0.2rem 0.1rem rgba(30, 42, 74, 0.35));
  animation: maze-chest-bob 2.2s ease-in-out infinite;
}
.chest-glow {
  position: absolute;
  inset: -22% -14% 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 80, 0.6) 0%, rgba(255, 180, 40, 0.22) 42%, transparent 70%);
  animation: maze-chest-aura 1.5s ease-in-out infinite;
  z-index: 0;
}
.chest-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
}
.maze-chest .chest-lid-g {
  transform-origin: 60px 52px;
  animation: maze-lid-wiggle 2.6s ease-in-out infinite;
}
.maze-chest .chest-loot-g {
  transform-origin: 60px 60px;
  animation: maze-loot-shimmy 2.2s ease-in-out infinite;
}
.chest-sparks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.chest-sparks .spark {
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  background: #fff6a0;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  animation: maze-spark-twinkle 0.85s ease-in-out infinite;
}
.chest-sparks .sp1 { left: 12%; top: 8%; }
.chest-sparks .sp2 { left: 38%; top: 0; background: #fff; animation-delay: 0.12s; }
.chest-sparks .sp3 { left: 58%; top: 6%; animation-delay: 0.24s; }
.chest-sparks .sp4 { right: 14%; top: 12%; background: #fff; animation-delay: 0.36s; }
.chest-sparks .sp5 { left: 22%; top: 28%; animation-delay: 0.18s; }
.chest-sparks .sp6 { right: 24%; top: 22%; background: #fff; animation-delay: 0.42s; }
.chest-sparks .sp7 { left: 48%; top: 18%; animation-delay: 0.3s; }
.chest-sparks .sp8 { right: 8%; top: 32%; background: #fff; animation-delay: 0.5s; }

.maze-chest.is-open {
  z-index: 7;
  animation: maze-chest-open-pop 0.6s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
.maze-chest.is-open .chest-glow {
  animation: maze-chest-aura 0.5s ease-in-out infinite;
  inset: -34% -20% 8%;
}
.maze-chest.is-open .chest-loot-g {
  animation: maze-loot-burst 0.7s ease-out both, maze-loot-shimmy 1.1s ease-in-out 0.7s infinite;
}
.maze-chest.is-open .spark {
  animation-duration: 0.4s;
}
@keyframes maze-chest-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-0.14rem) scale(1.05); }
}
@keyframes maze-chest-aura {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes maze-lid-wiggle {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-3%); }
}
@keyframes maze-loot-shimmy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5%); }
}
@keyframes maze-loot-burst {
  0% { transform: scale(0.85) translateY(10%); }
  60% { transform: scale(1.14) translateY(-8%); }
  100% { transform: scale(1) translateY(0); }
}
@keyframes maze-chest-open-pop {
  0% { transform: scale(0.9); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1.08); }
}
@keyframes maze-spark-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.65) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(20deg); }
}

/* AZ Hero — front idle, side L/R, back up, down toward camera */
.maze-runner {
  position: absolute;
  z-index: 6;
  width: calc((100% - 2 * var(--maze-pad)) / var(--maze-size));
  height: calc((100% - 2 * var(--maze-pad)) / var(--maze-size));
  left: calc(var(--maze-pad) + var(--maze-c) * (100% - 2 * var(--maze-pad)) / var(--maze-size));
  top: calc(var(--maze-pad) + var(--maze-r) * (100% - 2 * var(--maze-pad)) / var(--maze-size));
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: visible;
  transition:
    left 1.05s cubic-bezier(0.4, 0.05, 0.35, 1),
    top 1.05s cubic-bezier(0.4, 0.05, 0.35, 1);
  filter: drop-shadow(0 0.22rem 0 rgba(30, 42, 74, 0.22));
}
.maze-hero-svg {
  width: 68%;
  height: auto;
  max-height: 82%;
  overflow: visible;
  transform-origin: 50% 85%;
}
.maze-hero-side,
.maze-hero-back,
.maze-hero-down { display: none; }

.maze-runner.face-front .maze-hero-front { display: inline; }
.maze-runner.face-front .maze-hero-side,
.maze-runner.face-front .maze-hero-back,
.maze-runner.face-front .maze-hero-down { display: none; }

.maze-runner.is-running.face-left .maze-hero-front,
.maze-runner.is-running.face-right .maze-hero-front,
.maze-runner.is-running.face-up .maze-hero-front,
.maze-runner.is-running.face-down .maze-hero-front { display: none; }

.maze-runner.is-running.face-left .maze-hero-side,
.maze-runner.is-running.face-right .maze-hero-side { display: inline; }
.maze-runner.is-running.face-left .maze-hero-svg { transform: scaleX(-1); }
.maze-runner.is-running.face-right .maze-hero-svg { transform: scaleX(1); }

.maze-runner.is-running.face-up .maze-hero-back { display: inline; }
.maze-runner.is-running.face-down .maze-hero-down { display: inline; }

.maze-runner.is-running.face-left .maze-hero-side,
.maze-runner.is-running.face-right .maze-hero-side {
  animation: maze-side-bob 0.42s ease-in-out infinite;
}
.maze-runner.is-running .maze-side-leg-back {
  transform-origin: 78px 148px;
  animation: maze-side-leg-back 0.42s ease-in-out infinite;
}
.maze-runner.is-running .maze-side-leg-front {
  transform-origin: 86px 148px;
  animation: maze-side-leg-front 0.42s ease-in-out infinite;
}
.maze-runner.is-running .maze-side-arm-back {
  transform-origin: 78px 100px;
  animation: maze-side-arm-back 0.42s ease-in-out infinite;
}
.maze-runner.is-running .maze-side-arm-front {
  transform-origin: 96px 100px;
  animation: maze-side-arm-front 0.42s ease-in-out infinite;
}
.maze-runner.is-running .maze-side-cape {
  transform-origin: 70px 90px;
  animation: maze-side-cape 0.42s ease-in-out infinite;
}

.maze-runner.is-running.face-up .maze-hero-back {
  animation: maze-side-bob 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-up .maze-back-leg-l {
  transform-origin: 65px 146px;
  animation: maze-back-leg-l 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-up .maze-back-leg-r {
  transform-origin: 95px 146px;
  animation: maze-back-leg-r 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-up .maze-back-arm-l {
  transform-origin: 52px 98px;
  animation: maze-back-arm-l 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-up .maze-back-arm-r {
  transform-origin: 108px 98px;
  animation: maze-back-arm-r 0.42s ease-in-out infinite;
}

.maze-runner.is-running.face-down .maze-hero-down {
  animation: maze-side-bob 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-down .maze-down-leg-l {
  transform-origin: 67px 148px;
  animation: maze-back-leg-l 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-down .maze-down-leg-r {
  transform-origin: 93px 148px;
  animation: maze-back-leg-r 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-down .maze-down-arm-l {
  transform-origin: 50px 96px;
  animation: maze-back-arm-l 0.42s ease-in-out infinite;
}
.maze-runner.is-running.face-down .maze-down-arm-r {
  transform-origin: 110px 96px;
  animation: maze-back-arm-r 0.42s ease-in-out infinite;
}

.maze-runner.is-win .maze-hero-front {
  animation: maze-hero-win 0.7s cubic-bezier(0.34, 1.45, 0.64, 1);
}
@keyframes maze-side-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6%; }
}
@keyframes maze-side-leg-back {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-28deg); }
}
@keyframes maze-side-leg-front {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(28deg); }
}
@keyframes maze-side-arm-back {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(20deg); }
}
@keyframes maze-side-arm-front {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: rotate(-20deg); }
}
@keyframes maze-side-cape {
  0%, 100% { transform: skewX(0deg) translateX(0); }
  50% { transform: skewX(-10deg) translateX(-4px); }
}
@keyframes maze-back-leg-l {
  0%, 100% { transform: rotate(12deg) translateY(0); }
  50% { transform: rotate(-14deg) translateY(-4px); }
}
@keyframes maze-back-leg-r {
  0%, 100% { transform: rotate(-12deg) translateY(0); }
  50% { transform: rotate(14deg) translateY(-4px); }
}
@keyframes maze-back-arm-l {
  0%, 100% { transform: rotate(-16deg); }
  50% { transform: rotate(18deg); }
}
@keyframes maze-back-arm-r {
  0%, 100% { transform: rotate(16deg); }
  50% { transform: rotate(-18deg); }
}
@keyframes maze-hero-win {
  0% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.2) translateY(-18%); }
  100% { transform: scale(1.08) translateY(0); }
}
.maze-pad {
  display: grid;
  grid-template-columns: repeat(3, 3.1rem);
  grid-template-rows: repeat(3, 3.1rem);
  gap: 0.35rem;
  justify-content: center;
  margin: 0.35rem auto 0.5rem;
  width: max-content;
}
.maze-pad .maze-dir[data-dir="up"] { grid-column: 2; grid-row: 1; }
.maze-pad .maze-dir[data-dir="left"] { grid-column: 1; grid-row: 2; }
.maze-pad .maze-dir[data-dir="right"] { grid-column: 3; grid-row: 2; }
.maze-pad .maze-dir[data-dir="down"] { grid-column: 2; grid-row: 3; }
.maze-pad-mid { display: contents; }
.maze-dir {
  appearance: none;
  width: 3.1rem;
  height: 3.1rem;
  border: 0.2rem solid #fff;
  border-radius: 1rem;
  background: linear-gradient(145deg, #ff7eb3, #e84a8a);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 0.32rem 0 rgba(30, 42, 74, 0.16);
  cursor: pointer;
}
.maze-dir:active {
  transform: translateY(2px);
  box-shadow: 0 0.12rem 0 rgba(30, 42, 74, 0.16);
}

/* Memory */
.memory-grid {
  display: grid;
  gap: 0.4rem;
  width: min(28rem, 100%);
  margin: 0 auto;
}
.memory-card {
  position: relative;
  aspect-ratio: 1;
  border: 0.18rem solid #fff;
  border-radius: 0.85rem;
  padding: 0;
  cursor: pointer;
  background: transparent;
  box-shadow: 0 0.22rem 0 rgba(30, 42, 74, 0.12);
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}
.memory-card:disabled { cursor: default; }
.memory-card.is-open,
.memory-card.is-matched {
  transform: rotateY(180deg);
}
.memory-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  backface-visibility: hidden;
  overflow: hidden;
}
.memory-back {
  background: linear-gradient(145deg, #5dade2, #3db5e8 45%, #ff7eb3);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  font-weight: 800;
}
.memory-front {
  background: #fff;
  transform: rotateY(180deg);
}
.memory-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.memory-card.is-matched {
  box-shadow: none;
}
.memory-card.is-matched .memory-front {
  outline: 0.28rem solid #5fd08a;
  outline-offset: -0.28rem;
}
.memory-card.is-matched .memory-front::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 48%;
  height: 0.3rem;
  background: rgba(31, 122, 82, 0.9);
  border-radius: 999px;
  transform: rotate(-14deg);
  z-index: 2;
  pointer-events: none;
}
.memory-card.is-matched .memory-front img {
  filter: saturate(0.85) brightness(0.96);
}
.memory-card.is-blank {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  cursor: default;
  border-style: dashed;
}
.memory-star {
  color: #ffd23f;
  font-size: clamp(1.4rem, 6vw, 2rem);
  text-shadow: 0 2px 0 rgba(30, 42, 74, 0.15);
}

@media (max-width: 700px) {
  .memory-grid { gap: 0.28rem; }
  .memory-card { border-radius: 0.65rem; }
}
.cell {
  aspect-ratio: 1;
  border: 0;
  border-radius: 0.75rem;
  background: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 0.22rem 0 rgba(30, 42, 74, 0.1);
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease;
}
.grid-lg .cell {
  border-radius: 0.55rem;
  font-size: clamp(0.85rem, 3.2vw, 1.35rem);
  box-shadow: 0 0.16rem 0 rgba(30, 42, 74, 0.1);
}
.cell:hover,
.cell:focus-visible {
  transform: scale(1.05);
  outline: none;
  background: #e8f7ff;
}
.cell.is-picked {
  background: #ffd23f;
  color: var(--ink);
  transform: scale(1.06);
}
.cell.is-found {
  background: #5fd08a;
  color: #fff;
  box-shadow: none;
}

.next-btn {
  display: none;
  margin: 1rem auto 0;
  appearance: none;
  border: 0.22rem solid #fff;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #5fd08a, #2fa85c);
  box-shadow: 0 0.45rem 0 #1f7a52;
  cursor: pointer;
}
.next-btn.show { display: inline-block; animation: pop-in 0.4s ease; }

@media (max-width: 700px) {
  .match-layout,
  .search-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .animal-stage { order: -1; min-height: 11rem; }
  .search-layout .grid { order: -1; }
  .word-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes nope {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
@keyframes yay {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Celebration overlay */
#celebrate-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#celebrate-layer.is-on { opacity: 1; }
#celebrate-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.celebrate-banner {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translate(-50%, 0) scale(0.7);
  z-index: 3;
  padding: 0.7rem 1.5rem;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.96);
  border: 0.28rem solid #fff;
  box-shadow: 0 0.65rem 0 rgba(30, 42, 74, 0.14);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.6rem);
  font-weight: 800;
  color: #1f7a52;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}
.celebrate-banner.pop {
  animation: celebrate-banner-pop 7s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}
@keyframes celebrate-banner-pop {
  0% { opacity: 0; transform: translate(-50%, -12%) scale(0.5) rotate(-5deg); }
  8% { opacity: 1; transform: translate(-50%, 0) scale(1.12) rotate(2deg); }
  82% { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -8%) scale(0.94); }
}

.celebrate-reveal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: min(20rem, 78vw);
  max-width: 90vw;
  padding: 0.75rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.96);
  border: 0.28rem solid #fff;
  box-shadow: 0 0.7rem 0 rgba(30, 42, 74, 0.14);
  text-align: center;
  opacity: 0;
  z-index: 2;
  box-sizing: border-box;
}
.celebrate-reveal.pop {
  animation: celebrate-reveal 2.4s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}
.celebrate-photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  background: #e8f7ff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.celebrate-photo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.celebrate-word {
  margin: 0.55rem 0 0.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}
@keyframes celebrate-reveal {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(0.55) rotate(-5deg); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(2deg); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -54%) scale(0.92); }
}

.feedback.is-win {
  color: #1f7a52;
  font-size: 1.55rem;
  animation: yay 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  .word-btn.is-wrong,
  .word-btn.is-right,
  .animal-stage svg,
  .animal-photo,
  .next-btn.show,
  .celebrate-reveal.pop { animation: none; opacity: 1; transform: translate(-50%, -50%) scale(1); }
  .celebrate-banner.pop { animation: none; opacity: 1; transform: translate(-50%, 0) scale(1); }
  #celebrate-layer { display: none; }
}
