/* 엑셀 업로드 움직임 — import-motion.js 가 body 에 ipm(움직여도 됨) · ipm-in 을, 칸마다 ipm-pick · ipm-chips · ipm-tap · ipm-drop · ipm-took · ipm-see · ipm-no · ipm-bump · ipm-run · ipm-ok · ipm-err · ipm-new 를 붙이고 뗀다.
   ① 표 칸 차례로 · 줄 수 톡 · 기록 줄 차례로  ② 고른 칸 톡 · ✓ 도장 · 칩 차례로  ③ 끌어 올리면 아이콘 통통 · 파일 이름 툭
   ④ 네 칸 · 칩 · 열 차례로 · 빠지면 흔들림  ⑤ 방식 칸 톡 · 지우개 · + · 빗금 · 성공 빛 · 새 기록 줄.  움직임 줄이기면 ipm 이 붙지 않는다.
   표 칸은 위아래로만 움직인다(칸 너비를 재는 검사가 있다). 고른 칸 · 방식 칸의 빛은 화면이 !important 그림자로 잡고 있어 테두리 밖 선으로. */
body { --ipm-ease: cubic-bezier(.22, 1, .36, 1); --ipm-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.ipm.ipm-in #targets [data-t] { animation: ipm-rise .45s var(--ipm-ease) both; animation-delay: calc(var(--i, 0) * .06s); }
body.ipm.ipm-in #targets [data-t] .n { display: inline-block; animation: ipm-num .5s var(--ipm-spring) both; animation-delay: calc(.25s + var(--i, 0) * .06s); }
body.ipm.ipm-in #drop svg { animation: ipm-bob .9s ease-in-out 2; animation-delay: .7s; }
body.ipm.ipm-in #summary tbody tr { animation: ipm-row .4s var(--ipm-ease) both; animation-delay: calc(.5s + var(--i, 0) * .05s); }
/* ② */
body.ipm #targets .ipm-pick, body.ipm #modes .ipm-pick { animation: ipm-tap .45s var(--ipm-spring) both, ipm-ring .7s ease-out both; }
body.ipm #targets .ipm-pick .ck { animation: ipm-stamp .45s var(--ipm-spring) both; animation-delay: .08s; }
body.ipm #need.ipm-chips .hc { animation: ipm-chip .35s var(--ipm-spring) both; animation-delay: calc(var(--i, 0) * .04s); }
body.ipm .ipm-tap { animation: ipm-tap .4s var(--ipm-spring) both; }
/* ③ */
body.ipm #drop.over svg { animation: ipm-bob .7s ease-in-out infinite; }
body.ipm #drop.ipm-took { animation: ipm-flash .7s ease-out both; }
body.ipm #fileName.ipm-drop { animation: ipm-drop .45s var(--ipm-spring) both; }
/* ④ */
body.ipm #preview.ipm-see #mStat .ibox { animation: ipm-pop .45s var(--ipm-spring) both; animation-delay: calc(var(--i, 0) * .08s); }
body.ipm #preview.ipm-see #mStat .ibox.miss { animation: ipm-pop .45s var(--ipm-spring) both, ipm-shake .5s ease-in-out both; animation-delay: calc(var(--i, 0) * .08s), .55s; }
body.ipm #preview.ipm-see .chip { animation: ipm-chip .35s var(--ipm-spring) both; animation-delay: calc(.3s + var(--i, 0) * .04s); }
body.ipm #preview.ipm-see .chip.miss { animation: ipm-chip .35s var(--ipm-spring) both, ipm-shake .5s ease-in-out both; animation-delay: .3s, .7s; }
body.ipm #preview.ipm-see th, body.ipm #preview.ipm-see td:not(.s) { animation: ipm-fade .35s ease-out both; animation-delay: calc(.45s + var(--c, 0) * .06s); }
body.ipm #preview.ipm-see td.s { animation: ipm-fade-s .35s ease-out both; animation-delay: calc(.45s + var(--c, 0) * .06s); }
body.ipm #upload.ipm-no svg { animation: ipm-jiggle .45s ease-in-out 2; animation-delay: .8s; }
/* ⑤ */
body.ipm #modes .ipm-pick[data-m="replace"] .im-ic svg { animation: ipm-rub .6s ease-in-out both; animation-delay: .1s; }
body.ipm #modes .ipm-pick[data-m="append"] .im-ic svg { animation: ipm-spin .5s var(--ipm-ease) both; animation-delay: .1s; }
body.ipm .ipm-bump { display: inline-block; animation: ipm-num .5s var(--ipm-spring) both; }
:root body.ipm #upload.btn-primary.ipm-run { background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent-ink, #fff) 18%, transparent) 0 10px, transparent 10px 20px) !important; background-size: 28px 28px !important; animation: ipm-stripe .6s linear infinite; }
body.ipm #msg.ipm-ok { animation: ipm-glow 1.4s ease-out both; }
body.ipm #msg.ipm-err { animation: ipm-shake .5s ease-in-out both; }
body.ipm #summary tr.ipm-new { animation: ipm-new 1.5s ease-out both; }

@keyframes ipm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ipm-num { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes ipm-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-5px); } }
@keyframes ipm-row { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes ipm-tap { 0% { transform: scale(1); } 40% { transform: scale(.95); } 100% { transform: none; } }
@keyframes ipm-ring { 0% { outline: 3px solid color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); outline-offset: 0; } 100% { outline: 3px solid transparent; outline-offset: 9px; } }
@keyframes ipm-stamp { 0% { transform: scale(2.2) rotate(-40deg); opacity: 0; } 70% { transform: scale(.9) rotate(6deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes ipm-chip { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes ipm-flash { 0% { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--bg)); } 100% { } }
@keyframes ipm-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes ipm-pop { 0% { opacity: 0; transform: scale(.8); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes ipm-shake { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
@keyframes ipm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ipm-fade-s { from { opacity: 0; transform: translateY(6px); } to { opacity: .55; transform: none; } }
@keyframes ipm-jiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -14deg; } 75% { rotate: 14deg; } }
@keyframes ipm-rub { 0%, 100% { transform: none; } 20%, 60% { transform: translate(-3px, 1px) rotate(-12deg); } 40%, 80% { transform: translate(3px, -1px) rotate(10deg); } }
@keyframes ipm-spin { from { transform: rotate(-180deg) scale(.6); } to { transform: none; } }
@keyframes ipm-stripe { from { background-position: 0 0; } to { background-position: 28px 0; } }
@keyframes ipm-glow { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes ipm-new { 0% { background: color-mix(in srgb, var(--accent) 22%, transparent); } 100% { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  #targets *, #targets [data-t], #need *, #drop, #drop svg, #fileName, #preview *, #modes *, #modes [data-m], #modeNote *, #upload, #upload *, #msg, #summary tr, #template { animation: none !important; }
}
@media print { #targets [data-t], #preview *, #summary tr { animation: none !important; } }
