/* Load after the existing board and effect styles. Keep browser pinch zoom
   available while making the card controls respond to a single tap. */
.card-btn,
.table-card,
.lens-play,
.lens-close,
#playBtn,
#inspectBtn,
#exchangeBtn,
.exchange-candidate,
.effect-cards button {
 touch-action:manipulation;
}

/* Keep the already-visible face on screen while the larger source loads.
   Its natural 2:3 space also keeps the confirmation button steady. */
.lens-card {
 position:relative;
 aspect-ratio:2/3;
}
.lens-card img.lens-preview-img {
 position:absolute;
 inset:0;
 width:100%;
 height:100%;
 object-fit:contain;
 pointer-events:none;
}

/* A played card is visible on its first frame. Animate only its transform;
   the original 720ms entrance also animated brightness and a large shadow. */
@media (max-width:700px), (pointer:coarse) {
 body.playing .card-arriving {
  opacity:1;
  filter:none;
  animation:brisk-card-land-touch 260ms cubic-bezier(.2,.7,.25,1) both;
 }
 .lens-card {
  opacity:1;
  animation:brisk-card-grow-touch 120ms ease-out both;
 }
 .card-btn {
  transition-duration:100ms;
 }
}

@keyframes brisk-card-land-touch {
 from {transform:translateY(calc(var(--entry-y) * .24)) rotate(calc(var(--tilt) - 3deg)) scale(.97)}
 to {transform:translateY(0) rotate(var(--tilt)) scale(1)}
}

@keyframes brisk-card-grow-touch {
 from {transform:scale(.96)}
 to {transform:scale(1)}
}

@media (prefers-reduced-motion:reduce) {
 body.playing .card-arriving,
 .lens-card {animation:none!important}
 .card-btn {transition:none!important}
}
