/* The hero deck's front card gets scanned (beta/hero.mjs): corners lock on, a
   line reads down the card, plus marks pop, and the gold MAZI MATCH
   seal stamps with a shine. One pass each time a card swaps to the front; the
   swap, bob and foil shine are untouched. It rides inside .deck-bob, so it
   moves with the card. Green is the machine reading; gold is the answer. */
.deck-scan { position: absolute; inset: 0; z-index: 7; pointer-events: none; visibility: hidden; }
.deck-card.front.is-scanning .deck-scan { visibility: visible; }
.deck-scan > * { opacity: 0; }
.ds-corner { position: absolute; width: 22px; height: 22px; border: 2px solid #4fe896; filter: drop-shadow(0 0 6px #4fe89699); }
.ds-corner.tl { left: -7px; top: -7px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.ds-corner.tr { right: -7px; top: -7px; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.ds-corner.bl { left: -7px; bottom: -7px; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.ds-corner.br { right: -7px; bottom: -7px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }
.ds-plane { position: absolute; left: -5%; right: -5%; top: 0; height: 2px; background: #4fe896; box-shadow: 0 0 14px 2px #4fe896aa; }
.ds-plane::after { content: ""; position: absolute; left: 5%; right: 5%; bottom: 2px; height: 64px; background: linear-gradient(to top, #4fe89633, transparent); }
.ds-plus {
  position: absolute; width: 13px; height: 13px; margin: -6.5px; filter: drop-shadow(0 0 5px #4fe896aa);
  background: linear-gradient(#4fe896, #4fe896) center / 100% 1.5px no-repeat, linear-gradient(#4fe896, #4fe896) center / 1.5px 100% no-repeat;
}
.ds-seal {
  position: absolute; left: -20px; bottom: -18px; width: 68px; height: 68px; display: grid; place-items: center; align-content: center;
  border-radius: 50%; overflow: hidden; rotate: -12deg; font-style: normal; color: #16120a;
  background: radial-gradient(circle at 32% 26%, #fff3c4, #e9be4f 46%, #c9982d);
  box-shadow: 0 10px 24px #000a, 0 0 0 3px #151410, 0 0 0 4.5px #e9be4fb0, 0 0 34px #e9be4f66;
}
.ds-seal b { font: 600 22px / 1 var(--display); letter-spacing: .06em; }
.ds-seal small { margin-top: 1px; font: 500 7.5px / 1 var(--mono); letter-spacing: .22em; }
.ds-seal::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 38%, #fffdf0e0 50%, transparent 62%); translate: -110% 0; }
.is-scanning .ds-corner { animation: ds-corner .35s cubic-bezier(.22, 1, .36, 1) both, ds-out .45s 3.4s forwards; }
.is-scanning .ds-plane { animation: ds-plane 1.7s .3s cubic-bezier(.45, 0, .25, 1) both; }
.is-scanning .ds-plus { animation: ds-plus .4s var(--d) cubic-bezier(.22, 1, .36, 1) both, ds-out .45s 3.4s forwards; }
.is-scanning .ds-seal { animation: ds-seal .42s 2.15s cubic-bezier(.3, 1.6, .5, 1) both, ds-out .45s 4.2s forwards; }
.is-scanning .ds-seal::after { animation: ds-shine .9s 2.5s ease-out both; }
@keyframes ds-corner { from { opacity: 0; transform: scale(1.5); } to { opacity: 1; transform: none; } }
@keyframes ds-plane { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes ds-plus { from { opacity: 0; transform: scale(0) rotate(-90deg); } 60% { transform: scale(1.5); } to { opacity: 1; transform: none; } }
@keyframes ds-seal { from { opacity: 0; transform: scale(1.9); } to { opacity: 1; transform: none; } }
@keyframes ds-shine { to { translate: 110% 0; } }
@keyframes ds-out { to { opacity: 0; } }
@media (max-width: 760px) {
  .ds-seal { width: 60px; height: 60px; left: -14px; }
  .ds-seal b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .deck-scan { display: none; } }
