/* Manual interaction layer. JavaScript drives the phone position frame by frame. */
.tap-zone,
.tap-zone:hover,
.tap-zone:active,
.tap-zone:focus {
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.phone-actor {
  animation: none;
  backface-visibility: hidden;
  will-change: transform;
}
.tap-stage.is-approaching .phone-actor,
.tap-stage.is-detected .phone-actor,
.tap-stage.is-paying .phone-actor,
.tap-stage.is-complete .phone-actor {
  animation: none !important;
}

.phone-actor .float-y { animation: none; }
.phone-glow { display: none; }
/* 圆环动画改由 reference-hero.css 统一控制，避免覆盖整球播报动效 */

@keyframes phone-tap-return {
  0% {
    transform: translate3d(-50%, 0, 0) rotate(0);
    animation-timing-function: cubic-bezier(.22, .72, .25, 1);
  }
  52% {
    transform: translate3d(calc(-50% + 92px), 0, 0) rotate(.45deg);
    animation-timing-function: cubic-bezier(.2, .8, .2, 1);
  }
  58% {
    transform: translate3d(calc(-50% + 100px), 0, 0) rotate(.16deg);
    animation-timing-function: cubic-bezier(.35, 0, .2, 1);
  }
  65% {
    transform: translate3d(calc(-50% + 95px), 0, 0) rotate(0);
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
  }
  100% { transform: translate3d(-50%, 0, 0) rotate(0); }
}

@media (max-width: 640px) {
  .tap-zone,
  .tap-zone:hover,
  .tap-zone:active,
  .tap-zone:focus { transform: translateX(-50%) translateZ(0); }

  .phone-actor { will-change: transform; }
}

@media (prefers-reduced-motion: reduce) {
  .tap-stage.is-approaching .phone-actor { animation-duration: .001ms; }
}

.tap-zone.tap-contact {
  box-shadow: inset 0 1px 0 #fff, 0 0 0 10px oklch(0.72 0.16 240/.1), 0 22px 44px -20px rgba(65,92,170,.72);
}
.tap-contact .tap-glyph { animation: tapContactPulse .52s cubic-bezier(.2,.8,.2,1); }
.tap-contact .tap-zone-ring.ring-a { animation: tapContactRing .56s cubic-bezier(.2,.8,.2,1) both; }
.tap-contact .tap-zone-ring.ring-b { animation: tapContactRing .56s .06s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tapContactPulse {
  0% { transform: scale(1); }
  42% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
@keyframes tapContactRing {
  0% { opacity: .8; transform: translate(-50%,-50%) scale(.78); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.72); }
}

/* Final transition authority: keep content changes visibly animated even when
   the legacy reduced-motion block sets global transition durations to 0.001ms. */
.phone-screen .scan-overlay {
  opacity: 1 !important;
  transform: translate3d(0,0,0) scale(1) !important;
  filter: blur(0) !important;
  transition: opacity .72s cubic-bezier(.22,1,.36,1), transform .82s cubic-bezier(.22,1,.36,1), filter .72s ease !important;
}
.phone-screen .phone-body {
  opacity: 0 !important;
  transform: translate3d(0,22px,0) scale(.985) !important;
  filter: blur(2px) !important;
  transition: opacity .76s .14s cubic-bezier(.22,1,.36,1), transform .86s .08s cubic-bezier(.22,1,.36,1), filter .76s .14s ease !important;
}
.phone-screen.merchant-open .scan-overlay {
  opacity: 0 !important;
  transform: translate3d(0,-10px,0) scale(.965) !important;
  filter: blur(3px) !important;
}
.phone-screen.merchant-open .phone-body {
  opacity: 1 !important;
  transform: translate3d(0,0,0) scale(1) !important;
  filter: blur(0) !important;
}
.phone-screen.payment-complete .phone-body {
  opacity: .12 !important;
  transform: translate3d(0,-7px,0) scale(.975) !important;
  filter: blur(3px) !important;
  transition-delay: 0s !important;
}
.phone-screen .payment-modal {
  transition: opacity .78s .18s cubic-bezier(.22,1,.36,1), transform .86s .18s cubic-bezier(.22,1,.36,1) !important;
}
.phone-screen:not(.payment-complete) .payment-modal {
  opacity: 0 !important;
  transform: translate3d(0,20px,0) scale(.94) !important;
}
.phone-screen.payment-complete .payment-modal {
  opacity: 1 !important;
  transform: translate3d(0,0,0) scale(1) !important;
}
.tap-stage .broadcast-stand {
  transition-duration: .7s, .82s, 0s !important;
}
