:root {
  color-scheme: light;
  font-family:
    "Arial Rounded MT Bold", "Nunito", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --stage-scale: 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, #75d9e9 0%, #168caf 72%, #087493 100%);
}

button {
  font: inherit;
}

.game-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: center;
  background: #4bcfe4;
  box-shadow: 0 26px 80px rgba(0, 55, 75, 0.38);
}

.game-art,
.game-ui,
.tap-mode,
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-art {
  z-index: 0;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.game-ui {
  z-index: 1;
}

.game-ui.hidden,
.tap-mode.hidden {
  display: none;
}

.tap-mode {
  z-index: 2;
}

.follow-read-overlay {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(39, 57, 49, 0.18);
  backdrop-filter: blur(1px) saturate(0.92);
  pointer-events: none;
}

.follow-read-overlay.hidden {
  display: none;
}

.follow-read-celebration {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.follow-read-overlay.success .follow-read-celebration {
  opacity: 1;
}

.follow-read-ribbon,
.follow-read-star,
.follow-read-spark,
.follow-read-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.follow-read-ribbon {
  z-index: 3;
  width: var(--w, 44px);
  height: var(--h, 10px);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c1, #ff9278), var(--c2, #ffd45f));
  box-shadow: 0 5px 10px rgba(90, 71, 38, 0.14);
  opacity: 0;
  transform: translate(var(--x0, 0), var(--y0, -220px)) rotate(var(--r0, 0deg));
}

.follow-read-ribbon::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.52),
    transparent
  );
  content: "";
  transform: translateX(-45%);
}

.follow-read-overlay.success .follow-read-ribbon {
  animation: follow-read-ribbon-fall 1.3s ease-out both;
  animation-delay: var(--delay, 0ms);
}

.follow-read-star {
  z-index: 4;
  width: var(--size, 34px);
  height: var(--size, 34px);
  background: #ffd45f;
  clip-path: polygon(
    50% 0%,
    61% 34%,
    98% 35%,
    68% 56%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 56%,
    2% 35%,
    39% 34%
  );
  filter: drop-shadow(0 4px 10px rgba(151, 109, 42, 0.25));
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
}

.follow-read-overlay.success .follow-read-star {
  animation: follow-read-star-float 1.25s ease-out both;
  animation-delay: var(--delay, 0ms);
}

.follow-read-spark {
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color, #7de8c8);
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
}

.follow-read-overlay.success .follow-read-spark {
  animation: follow-read-confetti-float 1.25s ease-out both;
  animation-delay: var(--delay, 0ms);
}

.follow-read-burst {
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffd45f;
  box-shadow:
    0 -34px 0 -1px #ff9278,
    25px -24px 0 -2px #73cfff,
    34px 0 0 -1px #7de8c8,
    24px 25px 0 -2px #7acb75,
    0 34px 0 -1px #ff9278,
    -25px 25px 0 -2px #73cfff,
    -34px 0 0 -1px #ffd45f,
    -25px -25px 0 -2px #7de8c8;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rotate, 0deg)) translateY(-64px) scale(0.4);
}

.follow-read-burst::before,
.follow-read-burst::after {
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: inherit;
  content: "";
}

.follow-read-burst::after {
  inset: -13px;
  opacity: 0.44;
}

.follow-read-overlay.success .follow-read-burst {
  animation: follow-read-burst-pop 1.2s ease-out both;
  animation-delay: var(--delay, 0ms);
}

.follow-read-microphone {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 280px;
  height: 410px;
  filter: drop-shadow(0 20px 16px rgba(39, 48, 39, 0.3));
}

.follow-read-microphone img {
  position: relative;
  z-index: 1;
  width: 245px;
  height: 370px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.follow-read-microphone.recording {
  animation: follow-read-breathe 1.3s ease-in-out infinite alternate;
}

.follow-read-microphone.recording::before,
.follow-read-microphone.recording::after {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 180px;
  height: 180px;
  border: 4px solid rgba(224, 255, 244, 0.72);
  border-radius: 50%;
  content: "";
  animation: follow-read-listen-ring 1.5s ease-out infinite;
}

.follow-read-microphone.recording::after {
  animation-delay: 450ms;
}

.follow-read-microphone.success {
  animation: follow-read-success 720ms ease both;
}

.follow-read-microphone.retry {
  animation: follow-read-retry 520ms ease-in-out;
}

@keyframes follow-read-breathe {
  from {
    transform: translateY(4px) scale(0.985) rotate(-1deg);
  }
  to {
    transform: translateY(-4px) scale(1.015) rotate(1deg);
  }
}

@keyframes follow-read-listen-ring {
  from {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.64);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

@keyframes follow-read-success {
  0%,
  100% {
    filter:
      drop-shadow(0 20px 16px rgba(39, 48, 39, 0.3))
      drop-shadow(0 0 0 rgba(105, 220, 139, 0));
    transform: scale(1);
  }
  45% {
    filter:
      drop-shadow(0 20px 16px rgba(39, 48, 39, 0.25))
      drop-shadow(0 0 30px rgba(105, 220, 139, 0.95));
    transform: scale(1.08);
  }
}

@keyframes follow-read-retry {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-10px) rotate(-3deg);
  }
  75% {
    transform: translateX(10px) rotate(3deg);
  }
}

@keyframes follow-read-ribbon-fall {
  0% {
    opacity: 0;
    transform: translate(var(--x0), var(--y0)) rotate(var(--r0)) scale(0.72);
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy)))
      rotate(var(--r1))
      scale(1);
  }
}

@keyframes follow-read-star-float {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.4);
  }
  36% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1.08);
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(var(--x) * 1.08), calc(var(--y) - 22px))
      rotate(calc(var(--r) + 18deg))
      scale(0.82);
  }
}

@keyframes follow-read-confetti-float {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  32% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1);
  }
}

@keyframes follow-read-burst-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rotate)) translateY(-64px) scale(0.4);
  }
  38% {
    opacity: 1;
    transform:
      translate(-50%, -50%)
      rotate(var(--rotate))
      translateY(var(--radius))
      scale(1);
  }
  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      rotate(var(--rotate))
      translateY(calc(var(--radius) - 20px))
      scale(1.08);
  }
}

.tap-classroom {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 17%, rgba(255, 255, 255, 0.88) 0 4px, transparent 5px),
    radial-gradient(circle at 84% 24%, rgba(255, 255, 255, 0.7) 0 3px, transparent 4px),
    linear-gradient(90deg, rgba(222, 174, 98, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(222, 174, 98, 0.11) 1px, transparent 1px),
    linear-gradient(180deg, #fff6dd 0 71%, #d69b62 71% 100%);
  background-size: auto, auto, 62px 62px, 62px 62px, auto;
}

.tap-classroom::before {
  position: absolute;
  inset: 0 0 auto;
  height: 22px;
  background: linear-gradient(180deg, #65bdb2 0 12px, #f1d796 12px 22px);
  content: "";
}

.tap-bunting {
  position: absolute;
  left: 220px;
  top: 20px;
  display: flex;
  gap: 55px;
  width: 850px;
  border-top: 4px solid #d5a35e;
}

.tap-bunting span {
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-left: 18px solid transparent;
  border-top: 31px solid #f28b63;
}

.tap-bunting span:nth-child(2),
.tap-bunting span:nth-child(6) {
  border-top-color: #f7c75e;
}

.tap-bunting span:nth-child(3),
.tap-bunting span:nth-child(7) {
  border-top-color: #66bbaa;
}

.tap-bunting span:nth-child(4) {
  border-top-color: #8da8df;
}

.tap-bunting span:nth-child(5) {
  border-top-color: #ef8aa5;
}

.tap-header {
  position: absolute;
  z-index: 4;
  left: 42px;
  right: 42px;
  top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tap-back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 152px;
  padding: 12px 20px;
  border: 4px solid #fff4d7;
  border-radius: 999px;
  background: #fffaf0;
  color: #6e482e;
  font-size: 20px;
  font-weight: 1000;
  box-shadow: 0 6px 0 #b97848;
  cursor: pointer;
}

.tap-back-button::before {
  font-size: 34px;
  line-height: 15px;
  content: "‹";
}

.tap-back-button:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #b97848;
}

.tap-heading {
  text-align: center;
}

.tap-heading p {
  margin: 0 0 3px;
  color: #2d8d84;
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tap-heading h1 {
  margin: 0;
  color: #5b3a25;
  font-size: 38px;
  line-height: 1;
  text-shadow: 0 3px 0 #fff;
}

.tap-theme-chip {
  min-width: 152px;
  padding: 12px 20px;
  border: 4px solid #d8efe0;
  border-radius: 999px;
  background: #f8fff5;
  color: #347a59;
  font-size: 18px;
  font-weight: 1000;
  text-align: center;
  box-shadow: 0 6px 0 #88b58d;
}

.tap-word-board {
  position: absolute;
  z-index: 3;
  left: 42px;
  top: 132px;
  width: 310px;
  height: 475px;
  padding: 23px 22px 20px;
  border: 11px solid #c18048;
  border-radius: 42px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.9), transparent 45%),
    #fff9e9;
  box-shadow:
    inset 0 0 0 5px #f7db99,
    0 14px 0 #8d552f,
    0 24px 38px rgba(88, 57, 34, 0.22);
  text-align: center;
}

.tap-word-board::after {
  position: absolute;
  left: 86px;
  bottom: -62px;
  width: 120px;
  height: 62px;
  background:
    linear-gradient(90deg, transparent 0 20px, #9a653c 20px 38px, transparent 38px 82px, #9a653c 82px 100px, transparent 100px),
    linear-gradient(180deg, transparent 42px, #a66c41 42px 55px, transparent 55px);
  content: "";
}

.tap-speaker {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #ffb347;
  color: white;
  font-size: 35px;
  box-shadow:
    inset 0 0 0 5px #fff0bd,
    0 6px 0 #c66d2f;
}

.tap-speaker::before,
.tap-speaker::after {
  position: absolute;
  border: 4px solid #ffcf65;
  border-radius: 50%;
  content: "";
  animation: tap-sound-wave 1.6s ease-out infinite;
}

.tap-speaker::before {
  inset: -10px;
}

.tap-speaker::after {
  inset: -20px;
  animation-delay: 350ms;
}

.tap-word-label {
  margin: 0;
  color: #2d8d84;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.tap-copy-area {
  display: grid;
  place-items: center;
  height: 98px;
  margin: 4px 0 4px;
}

.tap-active-word {
  width: 100%;
  overflow: hidden;
  color: #5a3823;
  font-size: 42px;
  font-weight: 1000;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 0 3px 0 white;
  white-space: nowrap;
}

.tap-active-sentence {
  color: #69462f;
  font-size: 28px;
  font-weight: 1000;
  line-height: 1.2;
  text-shadow: 0 2px 0 white;
}

.tap-active-sentence strong {
  display: inline-block;
  padding: 1px 7px 4px;
  border-radius: 12px;
  background: #ffd465;
  color: #70401f;
  box-shadow: 0 3px 0 #d89242;
}

.tap-playback-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  height: 10px;
  margin-bottom: 11px;
}

.tap-playback-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5d2b2;
}

.tap-playback-dots[data-total="2"] span:nth-child(3) {
  display: none;
}

.tap-playback-dots span.completed {
  background: #65b7a3;
  box-shadow: 0 0 0 3px rgba(101, 183, 163, 0.16);
}

.tap-listen-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tap-listen-button {
  --tap-button-depth: #8b5c36;
  --tap-button-glow: rgba(255, 210, 83, 0.62);
  position: relative;
  min-height: 58px;
  padding: 6px 4px 7px;
  border: 4px solid #fff3cc;
  border-radius: 18px;
  color: white;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1.05;
  cursor: pointer;
  touch-action: manipulation;
  isolation: isolate;
  overflow: visible;
  transform-origin: 50% 70%;
}

.tap-listen-button span {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 2px;
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
}

.tap-listen-button.clicked {
  z-index: 2;
  animation: tap-listen-click 520ms cubic-bezier(0.2, 0.85, 0.25, 1.35);
}

.tap-listen-button.clicked::before,
.tap-listen-button.clicked::after {
  position: absolute;
  z-index: 0;
  inset: -9px;
  border: 4px solid var(--tap-button-glow);
  border-radius: 25px;
  content: "";
  pointer-events: none;
  animation: tap-listen-click-ring 520ms ease-out both;
}

.tap-listen-button.clicked::after {
  animation-delay: 80ms;
}

.tap-listen-button.clicked span {
  animation: tap-listen-click-icon 420ms ease-in-out;
}

.tap-word-button {
  --tap-button-depth: #b95727;
  --tap-button-glow: rgba(255, 170, 65, 0.78);
  background: linear-gradient(180deg, #ffad43, #ed762e);
  box-shadow: 0 5px 0 #b95727;
}

.tap-sentence-button {
  --tap-button-depth: #246b5f;
  --tap-button-glow: rgba(83, 190, 163, 0.78);
  background: linear-gradient(180deg, #65bca8, #378e7d);
  box-shadow: 0 5px 0 #246b5f;
}

.tap-listen-button.active {
  transform: translateY(2px);
  filter: saturate(1.13);
  box-shadow:
    0 3px 0 #8b5c36,
    0 0 0 4px rgba(255, 210, 83, 0.5);
}

.tap-listen-button:focus-visible {
  outline: 6px solid rgba(255, 210, 83, 0.65);
  outline-offset: 2px;
}

.tap-hint {
  margin: 14px 0 0;
  color: #9b7458;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.tap-display {
  position: absolute;
  z-index: 2;
  left: 375px;
  top: 130px;
  width: 855px;
  height: 515px;
}

.tap-display-arch {
  position: absolute;
  inset: 0;
  border: 8px solid rgba(212, 160, 91, 0.48);
  border-radius: 180px 180px 34px 34px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.9), rgba(255, 246, 215, 0.72) 55%, rgba(246, 219, 166, 0.76));
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.75),
    0 12px 26px rgba(120, 82, 47, 0.16);
}

.tap-shelf {
  position: absolute;
  left: 42px;
  width: 770px;
  height: 22px;
  border: 4px solid #a9693d;
  border-radius: 13px;
  background: linear-gradient(180deg, #efbd72, #c67b45);
  box-shadow: 0 10px 0 rgba(117, 68, 39, 0.2);
}

.tap-shelf-top {
  top: 260px;
}

.tap-shelf-bottom {
  top: 470px;
}

.tap-grid {
  position: absolute;
  inset: 36px 39px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 200px);
  column-gap: 24px;
  row-gap: 10px;
}

.tap-character {
  position: relative;
  display: grid;
  grid-template-rows: 150px auto;
  justify-items: center;
  align-items: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: #67442d;
  cursor: pointer;
  touch-action: manipulation;
}

.tap-character::before {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 38px;
  width: 145px;
  height: 38px;
  border-radius: 50%;
  background: #f8ca69;
  box-shadow:
    inset 0 -7px 0 rgba(119, 75, 43, 0.14),
    0 7px 0 rgba(119, 75, 43, 0.12);
  content: "";
  transform: translateX(-50%);
}

.tap-character[data-cushion="coral"]::before {
  background: #ef9c74;
}

.tap-character[data-cushion="leaf"]::before {
  background: #9ecf92;
}

.tap-character[data-cushion="sky"]::before {
  background: #9ebdde;
}

.tap-character[data-cushion="mint"]::before {
  background: #8dd2b3;
}

.tap-character[data-cushion="lilac"]::before {
  background: #b7a8dc;
}

.tap-character img {
  max-width: 190px;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(90, 58, 34, 0.2));
  transform-origin: 50% 100%;
  transition:
    transform 220ms ease,
    filter 220ms ease,
    opacity 220ms ease;
  pointer-events: none;
}

.tap-character span {
  min-width: 118px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.88);
  font-size: 18px;
  font-weight: 1000;
  text-align: center;
  box-shadow: 0 3px 0 rgba(165, 109, 60, 0.22);
  pointer-events: none;
}

.tap-character:hover img,
.tap-character:focus-visible img,
.tap-character.active img {
  filter:
    drop-shadow(0 15px 12px rgba(90, 58, 34, 0.22))
    drop-shadow(0 0 22px #ffd866);
  transform: translateY(-10px) scale(1.14);
}

.tap-character:focus-visible {
  border-radius: 28px;
  outline: 7px solid rgba(255, 213, 91, 0.62);
}

.tap-character.active span {
  background: #ffcf64;
  color: #6a3c1d;
  box-shadow:
    0 4px 0 #c8833f,
    0 0 0 5px rgba(255, 255, 255, 0.72);
}

.tap-character.playing img {
  animation: tap-card-bounce 620ms ease;
}

.tap-display.hidden,
.tap-scene.hidden {
  display: none;
}

.tap-classroom[data-layout="school-gate"] {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 229, 161, 0.42), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(141, 213, 255, 0.36), transparent 29%),
    linear-gradient(145deg, #e9f7ff 0%, #fff4d3 48%, #fff0f4 100%);
}

.tap-classroom[data-layout="school-gate"] .tap-bunting,
.tap-classroom[data-layout="school-gate"] .tap-rug,
.tap-classroom[data-layout="school-gate"] .tap-plant {
  display: none;
}

.tap-classroom[data-layout="school-gate"] .tap-speaker {
  display: none;
}

.tap-classroom[data-layout="school-gate"] .tap-word-board {
  padding-top: 42px;
}

.tap-classroom[data-layout="school-gate"] .tap-listen-button span {
  display: none;
}

.tap-scene {
  position: absolute;
  z-index: 2;
  left: 377px;
  top: 130px;
  width: 855px;
  height: 515px;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.88);
  border-radius: 42px;
  background: #dff4ff;
  box-shadow:
    0 17px 0 rgba(128, 89, 52, 0.13),
    0 28px 48px rgba(64, 93, 120, 0.2);
}

.tap-scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  transform-origin: center;
  animation: tap-scene-breathe 8s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

.tap-scene::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%),
    radial-gradient(circle at 50% 78%, transparent 44%, rgba(31, 62, 84, 0.12));
  content: "";
  pointer-events: none;
}

.tap-scene-bubbles {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.tap-scene-choice {
  position: absolute;
  min-width: 284px;
  max-width: 330px;
  padding: 16px 20px 17px;
  border: 5px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.93);
  color: #265b99;
  box-shadow: 0 14px 32px rgba(49, 78, 112, 0.18);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.tap-scene-choice.left {
  left: 46px;
  top: 44px;
  color: #2e7740;
}

.tap-scene-choice.right {
  right: 46px;
  top: 52px;
}

.tap-scene-choice::after {
  position: absolute;
  bottom: -16px;
  width: 28px;
  height: 28px;
  border-right: 5px solid rgba(255, 255, 255, 0.84);
  border-bottom: 5px solid rgba(255, 255, 255, 0.84);
  background: inherit;
  content: "";
  transform: rotate(45deg);
}

.tap-scene-choice.left::after {
  left: 56%;
}

.tap-scene-choice.right::after {
  right: 54%;
}

.tap-scene-sentence {
  display: block;
  color: inherit;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.tap-scene-choice small {
  display: block;
  margin-top: 7px;
  color: rgba(32, 48, 71, 0.48);
  font-size: 14px;
  font-weight: 900;
}

.tap-scene-choice:hover,
.tap-scene-choice:focus-visible,
.tap-scene-choice.active {
  filter: saturate(1.06);
  transform: translateY(-6px) scale(1.025);
  box-shadow:
    0 17px 34px rgba(49, 78, 112, 0.2),
    0 0 0 7px rgba(255, 213, 91, 0.34);
}

.tap-scene-choice.playing {
  animation: tap-card-bounce 620ms ease;
}

.tap-rug {
  position: absolute;
  left: 330px;
  bottom: -112px;
  width: 650px;
  height: 185px;
  border: 11px solid #f3c86e;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f8e9bd 0 40%, #76c4b4 41% 57%, #fff4d6 58%);
  box-shadow: 0 -3px 0 rgba(151, 91, 48, 0.2);
}

.tap-plant {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 125px;
  height: 180px;
}

.tap-plant::before {
  position: absolute;
  left: 35px;
  bottom: 34px;
  width: 54px;
  height: 100px;
  border-radius: 70% 10% 70% 10%;
  background: #5fa45f;
  box-shadow:
    -31px 18px 0 -5px #75b86a,
    31px 18px 0 -5px #4c9454,
    -17px -25px 0 -7px #8ac36d,
    21px -28px 0 -8px #65a960;
  content: "";
  transform: rotate(-8deg);
}

.tap-plant::after {
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 72px;
  height: 56px;
  border-radius: 12px 12px 30px 30px;
  background: #e68557;
  box-shadow: inset 0 8px 0 #f6ac70;
  content: "";
}

@keyframes tap-sound-wave {
  0% {
    opacity: 0.7;
    transform: scale(0.75);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes tap-listen-click {
  0% {
    transform: translateY(2px) scale(1);
  }
  36% {
    transform: translateY(-8px) scale(1.13);
  }
  68% {
    transform: translateY(3px) scale(0.96);
  }
  100% {
    transform: translateY(2px) scale(1);
  }
}

@keyframes tap-listen-click-ring {
  0% {
    opacity: 0.88;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.24);
  }
}

@keyframes tap-listen-click-icon {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(14deg) scale(1.28);
  }
}

@keyframes tap-scene-breathe {
  0%,
  100% {
    transform: scale(1.015);
  }
  50% {
    transform: scale(1.035) translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .follow-read-microphone,
  .follow-read-microphone::before,
  .follow-read-microphone::after,
  .follow-read-ribbon,
  .follow-read-star,
  .follow-read-spark,
  .follow-read-burst,
  .tap-listen-button.clicked,
  .tap-listen-button.clicked::before,
  .tap-listen-button.clicked::after,
  .tap-listen-button.clicked span,
  .tap-scene-image,
  .tap-scene-choice.playing {
    animation: none;
  }
}

.tap-actions {
  display: flex;
  justify-content: center;
}

.tap-actions .secondary-button,
.mode-actions .secondary-button {
  margin-left: 0;
}

.prompt-text {
  position: absolute;
  left: 485px;
  top: 70px;
  width: 570px;
  margin: 0;
  color: #4c2c18;
  font-size: 52px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.88);
}

.replay-hotspot {
  position: absolute;
  left: 1098px;
  top: 55px;
  width: 105px;
  height: 105px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.replay-hotspot:hover,
.replay-hotspot:focus-visible {
  outline: 8px solid rgba(255, 244, 151, 0.75);
  outline-offset: 3px;
}

.replay-hotspot:active {
  transform: scale(0.94);
}

.feedback-text {
  position: absolute;
  left: 475px;
  top: 176px;
  width: 590px;
  min-height: 38px;
  color: #187768;
  font-size: 24px;
  font-weight: 1000;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.choice-grid {
  position: absolute;
  left: 300px;
  top: 226px;
  display: grid;
  grid-template-columns: repeat(3, 244px);
  gap: 26px;
}

.animal-card {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 52px;
  justify-items: center;
  width: 244px;
  height: 310px;
  padding: 18px 14px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.animal-card img {
  align-self: end;
  width: 100%;
  max-width: 218px;
  max-height: 226px;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 12px 8px rgba(86, 57, 35, 0.18));
  transition:
    transform 160ms ease,
    filter 160ms ease;
  pointer-events: none;
}

.animal-card span {
  align-self: center;
  color: #6d391d;
  font-size: 25px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 242, 195, 0.9);
  pointer-events: none;
}

.animal-card:hover img,
.animal-card:focus-visible img {
  transform: translateY(-8px) scale(1.04);
  filter:
    drop-shadow(0 16px 10px rgba(86, 57, 35, 0.2))
    brightness(1.04);
}

.animal-card:focus-visible {
  border-radius: 28px;
  outline: 8px solid rgba(255, 221, 72, 0.7);
  outline-offset: -8px;
}

.animal-card.correct img {
  animation: bounce-correct 650ms ease;
}

.animal-card.wrong img {
  animation: shake-wrong 420ms ease;
}

.animal-card.hint::after {
  position: absolute;
  inset: 8px;
  border: 8px solid rgba(255, 219, 54, 0.9);
  border-radius: 28px;
  box-shadow:
    0 0 0 8px rgba(255, 248, 168, 0.46),
    0 0 28px rgba(255, 207, 43, 0.92);
  content: "";
  pointer-events: none;
  animation: hint-pulse 900ms ease-in-out infinite;
}

.progress-strip {
  position: absolute;
  left: 324px;
  top: 568px;
  display: grid;
  grid-template-columns: repeat(6, 108px);
  gap: 7px;
  width: 683px;
  height: 130px;
}

.sticker {
  display: grid;
  grid-template-rows: 82px auto;
  justify-items: center;
  align-items: center;
  color: #623419;
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(255, 230, 171, 0.9);
}

.sticker img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.sticker-placeholder {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  color: rgba(175, 116, 60, 0.48);
  font-size: 43px;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.72),
    0 -1px 0 rgba(118, 70, 31, 0.22);
}

.sticker-label {
  min-height: 18px;
}

.sticker.collected img {
  animation: pop-sticker 420ms ease;
}

.overlay {
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(10, 98, 122, 0.22);
  backdrop-filter: blur(7px);
}

.overlay.hidden {
  display: none;
}

.overlay-panel {
  width: 430px;
  padding: 30px 34px 35px;
  border: 7px solid #f5bd57;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.9), transparent 40%),
    #fff8e6;
  box-shadow:
    inset 0 0 0 4px #fff,
    0 12px 0 #a75e29,
    0 28px 60px rgba(43, 58, 44, 0.32);
  text-align: center;
}

.start-panel {
  width: 625px;
  padding: 26px 34px 32px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #168c8b;
  font-size: 18px;
  font-weight: 1000;
}

.overlay-panel h2 {
  margin: 0;
  color: #4c2c18;
  font-size: 56px;
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 3px 0 #fff;
}

.overlay-copy {
  margin: 18px 0 24px;
  color: #76513a;
  font-size: 19px;
  font-weight: 800;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 24px;
}

.theme-option {
  display: grid;
  grid-template-rows: 78px auto auto;
  justify-items: center;
  min-width: 0;
  padding: 11px 8px 10px;
  border: 4px solid #efcf8d;
  border-radius: 22px;
  background: #fffdfa;
  color: #5b321c;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.9),
    0 6px 0 rgba(169, 94, 41, 0.42);
  cursor: pointer;
}

.theme-option.selected {
  border-color: #ff9a2c;
  background: #fff4d7;
  box-shadow:
    inset 0 0 0 3px #fff,
    0 6px 0 #b95c25,
    0 0 0 5px rgba(255, 221, 72, 0.42);
}

.theme-option:focus-visible {
  outline: 6px solid rgba(255, 221, 72, 0.78);
  outline-offset: 2px;
}

.theme-option img {
  width: 82px;
  height: 78px;
  object-fit: contain;
  border-radius: 14px;
}

.theme-option strong {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1;
}

.theme-option span {
  margin-top: 5px;
  color: #168c8b;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.mode-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.primary-button {
  min-width: 170px;
  padding: 15px 28px;
  border: 5px solid #fff1bd;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.45), transparent 25%),
    linear-gradient(180deg, #ff9a2c, #f15a22);
  color: white;
  font-size: 24px;
  font-weight: 1000;
  box-shadow:
    0 8px 0 #a93e18,
    0 14px 24px rgba(110, 62, 31, 0.25);
  cursor: pointer;
}

.primary-button:active {
  transform: translateY(4px);
  box-shadow:
    0 4px 0 #a93e18,
    0 8px 16px rgba(110, 62, 31, 0.22);
}

.secondary-button {
  min-width: 138px;
  margin-left: 12px;
  padding: 13px 22px;
  border: 4px solid #f1d8a1;
  border-radius: 999px;
  background: #fffdfa;
  color: #7b4525;
  font-size: 20px;
  font-weight: 1000;
  box-shadow: 0 6px 0 rgba(169, 94, 41, 0.42);
  cursor: pointer;
}

.secondary-button:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(169, 94, 41, 0.42);
}

.secondary-button:disabled {
  border-color: #e0d3bd;
  background: #f3eadb;
  color: #a99178;
  box-shadow: 0 5px 0 rgba(139, 116, 91, 0.24);
  cursor: not-allowed;
  transform: none;
}

@keyframes bounce-correct {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-24px) scale(1.08);
  }
}

@keyframes shake-wrong {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-12px);
  }
  50% {
    transform: translateX(12px);
  }
  75% {
    transform: translateX(-7px);
  }
}

@keyframes hint-pulse {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes pop-sticker {
  0% {
    transform: scale(0.65) rotate(-8deg);
  }
  70% {
    transform: scale(1.16) rotate(3deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tap-card-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-13px) scale(1.08);
  }
}
