@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.92) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 47, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(255, 122, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 47, 0); }
}

@keyframes soundBar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

@keyframes bubbleRise {
  0% { transform: translateY(8px) scale(0.96); }
  50% { transform: translateY(-8px) scale(1.02); }
  100% { transform: translateY(8px) scale(0.96); }
}

@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.anim-pop {
  animation: popIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-float {
  animation: floatBob 3s ease-in-out infinite;
}

.anim-pulse-ring {
  animation: pulseRing 1.4s infinite;
}

.anim-shake {
  animation: shakeWrong 0.38s ease;
}

.sound-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}

.sound-wave span {
  display: block;
  width: 3.5px;
  height: 16px;
  border-radius: 3px;
  background: currentColor;
  animation: soundBar 0.7s ease-in-out infinite;
}

.sound-wave span:nth-child(2) { animation-delay: 0.15s; }
.sound-wave span:nth-child(3) { animation-delay: 0.3s; }
.sound-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes confettiFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, -80px))) scale(1.15) rotate(var(--rot, 120deg));
  }
}

@keyframes floatBadgeUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -10px) scale(1.08);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -34px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -48px) scale(0.95);
  }
}

.celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9500;
  overflow: hidden;
}

.celebration-particle {
  position: fixed;
  font-size: 22px;
  line-height: 1;
  animation: confettiFly 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.celebration-float-badge {
  position: fixed;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a2f, #f59e0b);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
  white-space: nowrap;
  animation: floatBadgeUp 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f1e8d9;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a2f, #fbbf24);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.praise-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8fbef 0%, #fef6d8 100%);
  border: 2px solid #86efac;
  color: #166534;
  font-weight: 800;
  font-size: 16px;
  animation: popIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reward-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 14px auto;
}

.reward-stat-box {
  background: var(--bg-paper);
  border: 2px solid #eadcc6;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}

.reward-stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--orange);
}

.reward-stat-box span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}
