/* A single, short reward sequence. No timers, layout changes, or input delays. */
#result .result-content{position:relative;isolation:isolate}
#result .result-sparkles{display:none;position:absolute;inset:0;pointer-events:none;z-index:-1}
@media(prefers-reduced-motion:no-preference){
  #result:is([data-outcome=success],[data-outcome=complete]):not([hidden]){animation:result-in .4s cubic-bezier(.2,.85,.25,1.1) both}
  #result:is([data-outcome=success],[data-outcome=complete]):not([hidden]) .balanced-header{animation:reward-rise .35s .08s ease-out both}
  #result[data-outcome=success]:not([hidden]) #result-stars .rating-star{--star-delay:.22s;transform-origin:50% 70%;animation:reward-empty .25s var(--star-delay) ease-out both}
  #result[data-outcome=success]:not([hidden]) #result-stars .rating-star:nth-child(2){--star-delay:.43s}
  #result[data-outcome=success]:not([hidden]) #result-stars .rating-star:nth-child(3){--star-delay:.64s}
  #result[data-outcome=success]:not([hidden]) #result-stars .rating-star.earned{animation:reward-star .58s var(--star-delay) cubic-bezier(.2,.75,.25,1) both}
  #result[data-outcome=complete]:not([hidden]) .result-art{animation:reward-star .7s .2s cubic-bezier(.2,.75,.25,1) both}
  #result:is([data-outcome=success],[data-outcome=complete]):not([hidden]) .result-actions{animation:reward-rise .35s .7s ease-out both}
  #result:is([data-outcome=success],[data-outcome=complete]):not([hidden]) .result-actions button{position:relative;overflow:hidden}
  #result:is([data-outcome=success],[data-outcome=complete]):not([hidden]) .result-actions button:after{content:'';position:absolute;inset:-40% auto -40% -45%;width:32%;background:linear-gradient(90deg,transparent,#fff7,transparent);transform:skewX(-20deg);pointer-events:none;animation:reward-shine .6s 1s ease-out both}
  #result:is([data-outcome=success],[data-outcome=complete]):not([hidden]) .result-sparkles{display:block}
  #result .result-sparkles:before{content:'';position:absolute;inset:5% 0;background:radial-gradient(ellipse,#ffd24d38,transparent 68%);animation:reward-glow 1.15s .2s ease-out both}
  #result .result-sparkles i{position:absolute;left:var(--left);top:var(--top);width:9px;height:12px;background:var(--color,#ffe479);clip-path:polygon(50% 0,62% 36%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 36%);animation:reward-spark .75s var(--delay) ease-out both}
  #result .result-sparkles i:nth-child(1){--left:13%;--top:48%;--dx:-12px;--dy:-27px;--delay:.38s}
  #result .result-sparkles i:nth-child(2){--left:27%;--top:27%;--dx:-8px;--dy:-18px;--delay:.47s;--color:#fff7ca}
  #result .result-sparkles i:nth-child(3){--left:41%;--top:62%;--dx:-8px;--dy:25px;--delay:.53s}
  #result .result-sparkles i:nth-child(4){--left:49%;--top:20%;--dx:3px;--dy:-17px;--delay:.6s}
  #result .result-sparkles i:nth-child(5){--left:60%;--top:69%;--dx:9px;--dy:19px;--delay:.68s;--color:#fff7ca}
  #result .result-sparkles i:nth-child(6){--left:70%;--top:30%;--dx:8px;--dy:-22px;--delay:.76s}
  #result .result-sparkles i:nth-child(7){--left:82%;--top:53%;--dx:13px;--dy:18px;--delay:.83s}
  #result .result-sparkles i:nth-child(8){--left:88%;--top:32%;--dx:12px;--dy:-16px;--delay:.9s;--color:#fff7ca}
}
@keyframes reward-rise{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes reward-empty{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
@keyframes reward-star{0%{opacity:0;transform:translateY(15px) scale(.35) rotate(-15deg)}55%{opacity:1;transform:translateY(-5px) scale(1.16) rotate(5deg)}78%{transform:translateY(2px) scale(.96) rotate(-2deg)}100%{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
@keyframes reward-glow{0%,100%{opacity:0;transform:scale(.85)}40%{opacity:1;transform:scale(1.08)}}
@keyframes reward-spark{0%{opacity:0;transform:translate(0,0) scale(.15) rotate(0)}22%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.3) rotate(110deg)}}
@keyframes reward-shine{0%{opacity:0;left:-45%}15%{opacity:.85}100%{opacity:0;left:120%}}
