/* 모돈카드 사진 움직임 — sow-cards-motion.js 가 body 에 spm(움직여도 됨) 을, 칸마다 spm-in · spm-tab · spm-drop · spm-shake · spm-bump · spm-saved · spm-stamp · spm-now · spm-run · spm-ok · spm-list 를 붙이고 뗀다.
   번호를 읽는 동안 훑는 빛은 화면이 붙이는 .shot.reading 에 CSS 로만 그린다.
   ① 띠 차례로 · 탭 들어옴  ② 사진 떨어짐 · 도장  ③ 훑는 빛 · 번호 톡 · 흔들림  ④ 빗금 · 올림 도장 · 빛  ⑤ 네 칸 · 묶음 · 사진 차례로.  움직임 줄이기면 spm 이 붙지 않는다. */
body { --spm-ease: cubic-bezier(.22, 1, .36, 1); --spm-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.spm #stage.spm-in > div { animation: spm-pop .45s var(--spm-spring) both; animation-delay: calc(var(--i, 0) * .1s); }
body.spm .spm-tab { animation: spm-slide .4s var(--spm-ease) both; }
/* ② */
body.spm #shots .shot.spm-drop { animation: spm-drop .5s var(--spm-ease) both; animation-delay: calc(var(--i, 0) * .06s); }
body.spm #stage .ic.spm-stamp { animation: spm-stamp .45s var(--spm-spring) both; }
body.spm #stage > div.spm-now { animation: spm-glow .7s ease-out both; }
/* ③ */
body.spm #shots .shot.reading::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: var(--shot-h, 180px); pointer-events: none;
  background: linear-gradient(180deg, transparent 0, color-mix(in srgb, var(--t-amber, var(--accent)) 55%, transparent) 50%, transparent 100%) no-repeat; background-size: 100% 36px;
  animation: spm-scan 1.1s ease-in-out infinite alternate; }
body.spm .spm-bump { display: inline-block; animation: spm-num .45s var(--spm-spring) both; }
body.spm #shots .shot.spm-shake { animation: spm-shake .5s ease-in-out both; }
/* ④ */
body.spm .btn.spm-run { background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent-ink, #fff) 20%, transparent) 0 8px, transparent 8px 16px) !important; background-size: 22px 22px !important; animation: spm-stripe .6s linear infinite; }
body.spm #shots .shot.spm-saved { animation: spm-lift .6s var(--spm-ease) both; }
body.spm #shots .shot.spm-saved .state { animation: spm-stamp .45s var(--spm-spring) both; animation-delay: .2s; display: inline-block; }
body.spm #msg.spm-ok { animation: spm-ring 1.4s ease-out both; }
/* ⑤ */
body.spm #fdNow.spm-in .fd-t { animation: spm-pop .45s var(--spm-spring) both; animation-delay: calc(var(--i, 0) * .08s); }
body.spm #found.spm-list > .fd-day { animation: spm-fade .35s ease-out both; animation-delay: calc(var(--i, 0) * .05s); }
body.spm #found.spm-list .thumb { animation: spm-rise .4s var(--spm-ease) both; animation-delay: calc(.1s + var(--k, 0) * .04s); }

@keyframes spm-pop { 0% { opacity: 0; transform: scale(.85); } 60% { opacity: 1; transform: scale(1.02); } 100% { opacity: 1; transform: none; } }
@keyframes spm-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes spm-drop { from { opacity: 0; transform: translateY(-18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes spm-stamp { 0% { transform: scale(1.9) rotate(-20deg); opacity: 0; } 70% { transform: scale(.92); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes spm-glow { 0% { box-shadow: inset 0 0 0 2px var(--c, var(--accent)); } 100% { box-shadow: inset 0 0 0 0 transparent; } }
@keyframes spm-scan { from { background-position: 0 -36px; } to { background-position: 0 100%; } }
@keyframes spm-num { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes spm-shake { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
@keyframes spm-stripe { from { background-position: 0 0; } to { background-position: 22px 0; } }
@keyframes spm-lift { 0% { transform: none; } 40% { transform: translateY(-8px); } 100% { transform: none; } }
@keyframes spm-ring { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good, var(--accent)) 55%, transparent), 0 0 18px color-mix(in srgb, var(--good, var(--accent)) 40%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes spm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  #stage > div, #stage .ic, [data-p], #shots .shot, #shots .shot *, .btn, #msg, #fdNow .fd-t, #found > *, #found .thumb, #upNow [data-n] { animation: none !important; }
  #shots .shot.reading::after { display: none; }
}
@media print { #shots .shot, #found .thumb, #stage > div { animation: none !important; } #shots .shot.reading::after { display: none; } }
