.word-cell.entry-error {
  color: #ff8787 !important;
  border-bottom-color: #ff5f65 !important;
  background: linear-gradient(180deg, transparent 70%, #ff4f5e22 70%);
  text-shadow: 0 0 12px #ff3d4f80;
  animation: entryErrorShake .28s ease;
}

@keyframes entryErrorShake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.coin-celebration {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(255,224,112,.22), transparent 38%);
}

.coin-celebration i {
  position: absolute;
  left: var(--left);
  top: -80px;
  width: var(--size);
  height: var(--size);
  opacity: 0;
  animation-delay: var(--delay);
  animation-duration: var(--duration);
  animation-fill-mode: forwards;
}

.coin-celebration .confetti {
  border-radius: 2px;
  background: linear-gradient(135deg,var(--particle-color),#fff);
  box-shadow: 0 0 10px var(--particle-color),0 0 20px color-mix(in srgb,var(--particle-color) 35%,transparent);
  animation-name: prototypeConfettiFall,prototypeBling;
  animation-timing-function: ease-out,ease-in-out;
  animation-iteration-count: 1,infinite;
}

.coin-celebration .dust {
  border-radius: 50%;
  background: radial-gradient(circle,#fff 0%,var(--particle-color) 52%,var(--particle-color) 100%);
  box-shadow: 0 0 8px var(--particle-color),0 0 18px color-mix(in srgb,var(--particle-color) 50%,transparent);
  animation-name: prototypeDustFall,prototypeBling;
  animation-timing-function: ease-out,ease-in-out;
  animation-iteration-count: 1,infinite;
}

.coin-celebration .sparkle {
  border-radius: 50%;
  background: radial-gradient(circle,#fff 0%,var(--particle-color) 40%,transparent 72%);
  box-shadow: 0 0 15px var(--particle-color),0 0 32px color-mix(in srgb,var(--particle-color) 42%,transparent);
  animation-name: prototypeSparkleFall,prototypeBigBling;
  animation-timing-function: ease-out,ease-in-out;
  animation-iteration-count: 1,infinite;
}

.coin-celebration .coin {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:2px solid #ffd700;
  border-radius:50%;
  background:linear-gradient(145deg,#ffd700,#ffaa00,#ff8c00);
  box-shadow:0 0 15px rgba(212,175,120,.7),inset 0 0 10px rgba(255,255,255,.45);
  color:#8b4513;
  font-size:14px;
  font-style:normal;
  font-weight:900;
  animation-name:prototypeCoinFall;
  animation-timing-function:ease-out;
}

.coin-celebration .coin:before {
  content:"¥";
  text-shadow:0 1px 2px rgba(255,255,255,.9);
}

.coin-reward-burst {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%,-50%);
  color:#ffd700;
  font-size:clamp(52px,7vw,82px);
  font-weight: 900;
  letter-spacing:.03em;
  text-shadow:0 0 30px rgba(212,175,120,.95),0 4px 10px rgba(105,69,13,.32);
  animation:prototypeRewardPop 2s ease-out forwards;
}

@keyframes prototypeConfettiFall {
  0%{transform:translateY(-100px) rotate(0);opacity:1}
  100%{transform:translateY(110vh) rotate(var(--spin));opacity:0}
}
@keyframes prototypeDustFall {
  0%{transform:translateY(-50px) rotate(0) scale(.5);opacity:0}
  10%{opacity:1}
  100%{transform:translateY(55vh) rotate(360deg) scale(1);opacity:0}
}
@keyframes prototypeSparkleFall {
  0%{transform:translateY(-80px) rotate(0) scale(.3);opacity:0}
  15%{opacity:1}
  100%{transform:translateY(62vh) rotate(720deg) scale(1);opacity:0}
}
@keyframes prototypeCoinFall {
  0%{transform:translateY(-50px) rotateY(0) rotateZ(0);opacity:1}
  100%{transform:translateY(110vh) rotateY(720deg) rotateZ(360deg);opacity:.8}
}
@keyframes prototypeBling {0%,100%{filter:brightness(1);opacity:1}50%{filter:brightness(1.6);opacity:.6}}
@keyframes prototypeBigBling {0%,100%{filter:brightness(1) saturate(1.2)}50%{filter:brightness(2) saturate(1.5)}}
@keyframes prototypeRewardPop {
  0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}
  20%{opacity:1;transform:translate(-50%,-50%) scale(1.3)}
  40%,80%{opacity:1;transform:translate(-50%,-50%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-70%) scale(.8)}
}

@media (prefers-reduced-motion: reduce) {
  .coin-celebration i{display:none}
  .coin-reward-burst{animation:prototypeRewardPop .8s ease-out forwards}
  .word-cell.entry-error{animation:none}
}
