.stash-art .coin { opacity: 1; }
.stash-art .coin.on { opacity: 1; }
.coin-fly {
  position: fixed;
  left: 50%;
  top: var(--origin-y, 52%);
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  z-index: 90;
  pointer-events: none;
  perspective: 700px;
}
.coin-fly[hidden] { display: none !important; }
.coin-fly .spin {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.coin-fly .face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 28px #0009;
}
.coin-fly .face.a {
  background: var(--coin-a, radial-gradient(circle at 30% 28%, #f4efe3, #c4b48a 55%, #7a6a48)) center/cover no-repeat;
}
.coin-fly .face.b {
  background: var(--coin-b, radial-gradient(circle at 30% 28%, #e8ddd0, #9a8a68 55%, #5a4a32)) center/cover no-repeat;
  transform: rotateY(180deg);
}
.coin-fly.rise {
  animation: coin-rise 1.55s cubic-bezier(.12,.82,.22,1) forwards;
}
.coin-fly.rise .spin {
  animation: coin-flip 1.55s linear forwards;
}
.coin-fly.home {
  animation: coin-home .85s cubic-bezier(.22,.8,.2,1) forwards;
}
.coin-fly.summon { animation: coin-summon 1.45s ease-in-out forwards; }
.coin-fly.summon .spin { animation: coin-flip 1.45s ease-out; }
.coin-fly.hovering { top: var(--hover-y); width: var(--coin-size); height: var(--coin-size); }
.coin-fly.hovering .spin { animation: coin-flip 6s linear infinite; }
@keyframes coin-summon {
  0% { left: 12%; top: 6%; width: 12px; height: 12px; opacity: 0; filter: blur(3px); }
  20% { opacity: 1; }
  58% { left: 50%; top: var(--impact-y); width: var(--coin-size); height: var(--coin-size); filter: blur(0); }
  66% { left: 50%; top: calc(var(--impact-y) - 12px); width: var(--coin-size); height: var(--coin-size); }
  100% { left: 50%; top: var(--hover-y); width: var(--coin-size); height: var(--coin-size); }
}
.coin-dust { position: fixed; z-index: 95; width: 5px; height: 5px; border-radius: 50%; background: #ffe5a0; box-shadow: 0 0 7px #ffbe40; pointer-events: none; animation: coin-dust-out 1.1s ease-out forwards; }
@keyframes coin-dust-out { from { opacity: 1; transform: translate(0,0) scale(1.5); } to { opacity: 0; transform: translate(var(--dx),var(--dy)) scale(.1); } }
.stash-art .coin.received { animation: purse-receive .7s ease-out; }
@keyframes purse-receive { 40% { filter: drop-shadow(0 0 14px #ffcf65); transform: scale(1.12); } }
.coin-fly.home .spin {
  animation: coin-tilt .85s linear forwards;
}
@keyframes coin-rise {
  0%   { top: var(--origin-y, 52%); width: 22px; height: 22px; filter: blur(4px) brightness(.55); }
  55%  { top: calc(var(--origin-y, 52%) - 34px); width: calc(var(--coin-size, 132px) * 1.045); height: calc(var(--coin-size, 132px) * 1.045); filter: blur(0) brightness(1); }
  100% { top: calc(var(--origin-y, 52%) - 30px); width: var(--coin-size, 132px); height: var(--coin-size, 132px); filter: none; }
}
@keyframes coin-flip {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(1080deg); }
}
@keyframes coin-home {
  from { left: 50%; top: var(--hover-y); width: var(--coin-size, 132px); height: var(--coin-size, 132px); }
  to   { left: var(--tx); top: var(--ty); width: var(--end); height: var(--end); }
}
.coin-intro-lock { overflow:hidden; }
@keyframes coin-tilt {
  from { transform: rotateY(1080deg) rotate(0deg); }
  to   { transform: rotateY(1260deg) rotate(40deg); }
}
.coin-stamp {
  position: fixed;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--coin-a) center/cover no-repeat;
  pointer-events: none;
  z-index: 70;
  opacity: .82;
  filter: drop-shadow(0 2px 4px #0008);
  animation: stamp-settle .35s ease-out both;
}
.coin-stamp.b { background-image: var(--coin-b); }
#coin-trail.fade .coin-stamp { animation: stamp-fade .9s ease-in forwards; }
@keyframes stamp-settle {
  from { transform: scale(.92) rotate(var(--rot, 8deg)); opacity: .45; }
  to   { transform: scale(1) rotate(var(--rot, 8deg)); opacity: .82; }
}
@keyframes stamp-fade {
  to { opacity: 0; transform: scale(.88) rotate(var(--rot, 8deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .coin-fly, .coin-stamp { display: none !important; }
  .stash-art .coin { opacity: 1; }
}
