/* Lightweight game-world motion, controlled by OS preference and the visible pause button. */
.play-motion-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  color: #746681;
  font-size: 0.78rem;
  flex-wrap: wrap;
}
.play-motion-tools .link-button {
  font-size: 0.78rem;
  min-height: 36px;
}
.play-buddy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 0 0 22px;
  border-radius: 20px;
  background: linear-gradient(110deg, #f2eaff, #e5f7ed);
}
.play-buddy p {
  margin: 0 !important;
  font-weight: 600;
  line-height: 1.5 !important;
}
.play-buddy small {
  font-weight: 400;
  color: #665575;
  font-size: 0.78rem;
}
.buddy-button {
  background: transparent;
  border: 0;
  flex: 0 0 75px;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
}
.buddy-button:focus-visible {
  outline: 3px solid #7650ae;
  outline-offset: 2px;
}
.buddy-bird {
  width: 75px;
  height: 75px;
  overflow: visible;
  animation: buddy-breathe 4s ease-in-out infinite;
  transform-origin: 50% 85%;
}
.buddy-wing {
  transform-box: fill-box;
  transform-origin: 90% 20%;
}
.buddy-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: buddy-blink 6s linear infinite;
}
.discovery-lab .btn:active,
.habitat-board button:active,
.bridge-deck button:active,
.memory-card:active,
.rhythm-pads button:active {
  scale: 0.96;
}
.discovery-lab button,
.memory-card,
.picture-puzzle button,
.counter-controls button {
  transition:
    box-shadow 0.18s,
    background 0.18s,
    scale 0.15s;
}
.discovery-lab {
  position: relative;
}
.scene-sun {
  position: absolute;
  top: 6%;
  right: 8%;
  font-size: 3.2rem;
  animation: sun-breathe 6s ease-in-out infinite;
}
.scene-cloud {
  position: absolute;
  pointer-events: none;
  opacity: 0.8;
  font-size: 3.8rem;
  animation: cloud-drift 13s ease-in-out infinite alternate;
}
.scene-cloud.cloud-one {
  left: 42%;
  top: 5%;
}
.scene-cloud.cloud-two {
  left: 4%;
  top: 13%;
  font-size: 2.3rem;
  animation-delay: -6s;
}
.scene-grass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  border-radius: 55% 45% 0 0;
  background: repeating-linear-gradient(
    105deg,
    transparent 0 25px,
    #7baf6030 26px 28px,
    transparent 29px 45px
  );
  pointer-events: none;
}
.scene-hotspot {
  z-index: 1;
  box-shadow: 0 4px 12px #3a623812;
}
.scene-hotspot[data-creature="tree"] > span {
  transform-origin: 50% 95%;
  animation: tree-sway 5s ease-in-out infinite;
}
.scene-hotspot[data-creature="seedling"] > span {
  transform-origin: 50% 100%;
  animation: tree-sway 3.5s ease-in-out infinite reverse;
}
.scene-hotspot[data-creature="bird"] > span {
  animation: bird-hop 5s ease-in-out infinite;
}
.scene-hotspot[data-creature="butterfly"] > span {
  animation: butterfly-hover 4.5s ease-in-out infinite;
}
.test-tank {
  isolation: isolate;
}
.tank-current {
  position: absolute;
  top: 23%;
  left: -10%;
  width: 120%;
  height: 13px;
  border-radius: 50%;
  background: #d7f6ff99;
  animation: water-current 3.2s ease-in-out infinite alternate;
}
.tank-object {
  z-index: 2;
  will-change: auto;
}
.tank-object.floating {
  animation: float-bob 3s ease-in-out infinite;
}
.tank-bubbles {
  position: absolute;
  inset: 25% 0 0;
  overflow: hidden;
  pointer-events: none;
}
.tank-bubbles i {
  position: absolute;
  bottom: -15px;
  width: 10px;
  height: 10px;
  border: 1.5px solid #ffffffb0;
  border-radius: 50%;
  left: 15%;
  animation: bubble-rise 5s linear infinite;
}
.tank-bubbles i:nth-child(2) {
  left: 38%;
  animation-delay: -1.7s;
  width: 7px;
  height: 7px;
}
.tank-bubbles i:nth-child(3) {
  left: 75%;
  animation-delay: -3.1s;
  width: 13px;
  height: 13px;
}
.tank-bubbles i:nth-child(4) {
  left: 87%;
  animation-delay: -4.2s;
}
.garden-light {
  animation: sun-breathe 6s ease-in-out infinite;
}
.garden-cloud {
  position: absolute;
  top: 45px;
  left: 20%;
  font-size: 3rem;
  opacity: 0.75;
  animation: cloud-drift 12s ease-in-out infinite alternate;
}
.plant-leaf {
  transform-origin: 50% 100%;
  animation: leaf-sway 4s ease-in-out infinite;
}
.seed-model.dark .garden-cloud {
  opacity: 0.2;
}
.habitat-board {
  position: relative;
}
.habitat-board button {
  position: relative;
  overflow: visible;
}
.habitat-board button > span {
  opacity: 0.83;
}
.habitat-animal {
  position: absolute;
  width: 84px;
  height: 84px;
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -55%);
  filter: drop-shadow(0 5px 4px #3c5d3c25);
}
.habitat-animal svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.habitat-animal .animal-tail {
  transform-box: fill-box;
  transform-origin: 80% 80%;
  animation: tail-twitch 4s ease-in-out infinite;
}
.habitat-animal .animal-legs {
  transform-box: fill-box;
  transform-origin: 50% 0;
}
.habitat-board .drop-ready {
  outline: 4px solid #8b64c5;
  outline-offset: -3px;
  background: #f3e9ff !important;
}
.discovery-lab [data-discovery="tool"],
.drag-lamp {
  touch-action: none;
  cursor: grab;
}
.discovery-lab [data-discovery="tool"]:active,
.drag-lamp:active {
  cursor: grabbing;
}
.play-drag-ghost {
  position: fixed;
  z-index: 10000;
  transform: translate(-50%, -65%);
  pointer-events: none;
  padding: 12px 18px;
  border-radius: 18px;
  background: #fff8ed;
  box-shadow: 0 8px 24px #38215340;
  border: 2px solid #9171c0;
  font-size: 1.35rem;
  max-width: 200px;
  color: #422966;
}
.shadow-scene {
  overflow: hidden;
}
.shadow-scene ellipse,
.shadow-scene circle {
  transform-box: fill-box;
  transform-origin: center;
}
.drag-lamp {
  stroke: #edbd45;
  stroke-width: 4;
}
.drag-lamp:hover {
  stroke: #7651b0;
}
.sound-wave {
  overflow: hidden;
}
.sound-wave.is-sounding polyline {
  animation: wave-flow 0.65s linear infinite;
}
.bridge-scene {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.bridge-water {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 120%;
  z-index: -1;
  color: #fff9;
  font-size: 2.3rem;
  letter-spacing: 14px;
  white-space: nowrap;
  pointer-events: none;
  animation: river-flow 5s linear infinite;
}
.bridge-cart {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  border-bottom: 7px solid #906baf;
  border-radius: 8px;
  position: relative;
  line-height: 1.1;
  background: #ffedb8;
  padding: 3px 10px 0;
}
.cart-wheels {
  display: block;
  position: absolute;
  top: 100%;
  font-size: 12px;
  line-height: 1;
  color: #4f3c63;
  letter-spacing: 6px;
}
.bridge-load {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}
.weather-sky {
  height: 150px;
  margin: 22px 0;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(#d3edff, #eff9ff);
  isolation: isolate;
}
.weather-sun {
  position: absolute;
  left: 20%;
  top: 15px;
  font-size: 4rem;
  animation: sun-breathe 6s ease-in-out infinite;
}
.weather-cloud {
  position: absolute;
  left: 45%;
  top: 12px;
  font-size: 5rem;
  animation: cloud-drift 8s ease-in-out infinite alternate;
  z-index: 1;
}
.weather-wind {
  display: none;
  position: absolute;
  top: 75px;
  left: 20%;
  font-size: 2.7rem;
  color: #6e8ca9;
  animation: river-flow 2.5s linear infinite;
}
.weather-sky[data-weather="sunny"] .weather-cloud {
  opacity: 0.22;
  left: 72%;
  font-size: 3rem;
}
.weather-sky[data-weather="rainy"],
.weather-sky[data-weather="cloudy"] {
  background: linear-gradient(#b9c8dc, #e0e9f4);
}
.weather-sky[data-weather="rainy"] .weather-sun,
.weather-sky[data-weather="cloudy"] .weather-sun {
  opacity: 0.18;
}
.weather-sky[data-weather="rainy"] .weather-cloud {
  filter: brightness(0.87);
  left: 37%;
}
.weather-rain {
  display: none;
  position: absolute;
  inset: 62px 20% 0;
}
.weather-sky[data-weather="rainy"] .weather-rain,
.weather-sky[data-weather="mixed"] .weather-rain {
  display: block;
}
.weather-rain i {
  position: absolute;
  left: calc(var(--i) * 12%);
  width: 3px;
  height: 15px;
  border-radius: 4px;
  background: #6d9cd4;
  animation: rain-fall 0.85s linear infinite;
  animation-delay: calc(var(--i) * -0.13s);
}
.weather-sky[data-weather="windy"] .weather-wind {
  display: block;
}
.weather-sky[data-weather="windy"] .weather-cloud {
  animation-duration: 3s;
}
.play-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
  border-radius: inherit;
}
.play-particle {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #f1c75a;
  animation: play-spark 900ms cubic-bezier(0.15, 0.65, 0.35, 1) both;
  animation-delay: calc(var(--i) * 0.025s);
  --dx: calc((var(--i) - 3.5) * 24px);
}
.play-particle:nth-child(3n) {
  background: #a77ad3;
}
.play-particle:nth-child(3n + 1) {
  background: #74c6a4;
}
.play-particle.drop {
  background: #71bce2 !important;
  border-radius: 50% 50% 60% 60%;
  width: 6px;
  height: 12px;
  top: 30%;
  animation-name: play-drop;
}
.challenge {
  position: relative;
  overflow: hidden;
}
.live-counter {
  display: inline-block;
}
.memory-card {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}
.rhythm-pads button:focus-visible,
.buddy-button:focus-visible {
  outline: 3px solid #7650ae;
  outline-offset: 3px;
}
@keyframes buddy-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.025);
  }
}
@keyframes buddy-blink {
  0%,
  43%,
  47%,
  100% {
    scale: 1 1;
  }
  45% {
    scale: 1 0.08;
  }
}
@keyframes tree-sway {
  0%,
  100% {
    rotate: -3deg;
  }
  50% {
    rotate: 4deg;
  }
}
@keyframes bird-hop {
  0%,
  35%,
  65%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  45% {
    translate: 0 -7px;
    rotate: -8deg;
  }
  55% {
    translate: 0 -3px;
    rotate: 5deg;
  }
}
@keyframes butterfly-hover {
  0%,
  100% {
    translate: -4px 0;
    rotate: -8deg;
  }
  50% {
    translate: 7px -8px;
    rotate: 8deg;
  }
}
@keyframes sun-breathe {
  0%,
  100% {
    scale: 1;
    rotate: -4deg;
  }
  50% {
    scale: 1.07;
    rotate: 4deg;
  }
}
@keyframes cloud-drift {
  from {
    translate: -15px 0;
  }
  to {
    translate: 25px 0;
  }
}
@keyframes water-current {
  from {
    translate: -12px 0;
    rotate: -1deg;
  }
  to {
    translate: 12px 3px;
    rotate: 1deg;
  }
}
@keyframes float-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(4px) rotate(3deg);
  }
}
@keyframes bubble-rise {
  0% {
    translate: 0 0;
    opacity: 0;
  }
  12% {
    opacity: 0.8;
  }
  100% {
    translate: 8px -175px;
    opacity: 0;
  }
}
@keyframes leaf-sway {
  0%,
  100% {
    rotate: -3deg;
  }
  50% {
    rotate: 4deg;
  }
}
@keyframes tail-twitch {
  0%,
  70%,
  100% {
    rotate: 0deg;
  }
  80% {
    rotate: 10deg;
  }
  90% {
    rotate: -8deg;
  }
}
@keyframes wave-flow {
  from {
    translate: -8px 0;
  }
  to {
    translate: 8px 0;
  }
}
@keyframes river-flow {
  from {
    translate: -25px 0;
  }
  to {
    translate: 10px 0;
  }
}
@keyframes rain-fall {
  0% {
    translate: 0 -18px;
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  100% {
    translate: -12px 100px;
    opacity: 0;
  }
}
@keyframes play-spark {
  0% {
    translate: 0 0;
    scale: 0.2;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    translate: var(--dx) -85px;
    rotate: 130deg;
    scale: 0.6;
    opacity: 0;
  }
}
@keyframes play-drop {
  0% {
    translate: 0 0;
    scale: 0.5;
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  55% {
    translate: var(--dx) -25px;
  }
  100% {
    translate: var(--dx) 100px;
    opacity: 0;
  }
}
html[data-motion-paused="true"] .buddy-bird,
html[data-motion-paused="true"] .buddy-eyes,
html[data-motion-paused="true"] .scene-sun,
html[data-motion-paused="true"] .scene-cloud,
html[data-motion-paused="true"] .scene-hotspot > span,
html[data-motion-paused="true"] .tank-current,
html[data-motion-paused="true"] .tank-object,
html[data-motion-paused="true"] .tank-bubbles i,
html[data-motion-paused="true"] .garden-light,
html[data-motion-paused="true"] .garden-cloud,
html[data-motion-paused="true"] .plant-leaf,
html[data-motion-paused="true"] .animal-tail,
html[data-motion-paused="true"] .sound-wave polyline,
html[data-motion-paused="true"] .bridge-water,
html[data-motion-paused="true"] .weather-sun,
html[data-motion-paused="true"] .weather-cloud,
html[data-motion-paused="true"] .weather-wind,
html[data-motion-paused="true"] .weather-rain i {
  animation: none !important;
}
html[data-motion-paused="true"] .discovery-lab *,
html[data-motion-paused="true"] .memory-card {
  transition: none !important;
}
@media (max-width: 600px) {
  .play-motion-tools {
    gap: 8px;
    justify-content: space-between;
  }
  .play-motion-tools > span {
    font-size: 0.7rem;
    max-width: 150px;
  }
  .play-buddy {
    padding: 8px 10px;
    gap: 8px;
  }
  .buddy-button {
    flex-basis: 58px;
  }
  .buddy-bird {
    width: 58px;
    height: 58px;
  }
  .play-buddy p {
    font-size: 0.87rem;
  }
  .play-buddy small {
    font-size: 0.7rem;
  }
  .habitat-animal {
    width: 66px;
    height: 66px;
  }
  .scene-cloud {
    font-size: 2.8rem;
  }
  .weather-sky {
    height: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .buddy-bird,
  .buddy-eyes,
  .scene-sun,
  .scene-cloud,
  .scene-hotspot > span,
  .tank-current,
  .tank-object,
  .tank-bubbles i,
  .garden-light,
  .garden-cloud,
  .plant-leaf,
  .animal-tail,
  .sound-wave polyline,
  .bridge-water,
  .weather-sun,
  .weather-cloud,
  .weather-wind,
  .weather-rain i,
  .play-particle {
    animation: none !important;
  }
  .discovery-lab *,
  .memory-card,
  .picture-puzzle button,
  .counter-controls button {
    transition: none !important;
  }
}
.teaching-clock .hour-hand,
.teaching-clock .minute-hand {
  transform-origin: 100px 100px;
  transform-box: view-box;
}
.place-beads i {
  transform-origin: center;
}
.memory-board {
  perspective: 700px;
}
.live-counter {
  transform-origin: center;
}
