/* 이유일지 시트 움직임 — weaning-sheet-motion.js 가 body 에 wnm(움직여도 됨) · wnm-in 을, 칸마다 wnm-rows · wnm-roll · wnm-bump · wnm-paint · wnm-done · wnm-head · wnm-diff · wnm-hit · wnm-busy 를 붙이고 뗀다.
   ① 세 칸 톡 · 우유병 살랑 · 표 줄 차례로 · 합계 톡  ② 이유일 바꾸면 날짜 넘김 · 줄 다시 · 숫자 톡
   ③ 칸 검사 돋보기 · 칸 색 차례로 물듦 · 다른 칸 흔들림 · 알약 차례로  ④ 쓰기 화살표 · 채운 칸 빛  ⑤ 다른 칸 화살표 오감.  움직임 줄이기면 wnm 이 붙지 않는다. 글자는 바꾸지 않는다. */
body { --wnm-ease: cubic-bezier(.22, 1, .36, 1); --wnm-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.wnm.wnm-in #wnNow .wn-t { animation: wnm-pop .5s var(--wnm-spring) both; animation-delay: calc(var(--i, 0) * .08s); }
body.wnm.wnm-in #tVal .ic svg { animation: wnm-sway 1s ease-in-out both; animation-delay: .4s; transform-origin: 50% 90%; }
body.wnm.wnm-in #preview tr, body.wnm #preview.wnm-rows tr { animation: wnm-row .35s var(--wnm-ease) both; animation-delay: calc(.2s + var(--r, 0) * .035s); }
body.wnm.wnm-in #preview .sum, body.wnm #preview.wnm-rows .sum { animation: wnm-fade .4s ease-out both; animation-delay: .8s; }
/* ② */
body.wnm .mid.wnm-roll #dayBig { display: inline-block; animation: wnm-roll .4s var(--wnm-spring) both; }
body.wnm #tVal.wnm-bump .big { display: inline-block; transform-origin: 0 70%; animation: wnm-bump .5s var(--wnm-spring) both; }
/* ③ ④ 칸 색이 위에서부터 */
body.wnm #preview.wnm-paint tr td:is(.w, .k, .l) { animation: wnm-paint .45s ease-out both; animation-delay: calc(var(--r, 0) * .05s); }
body.wnm #preview.wnm-paint tr td.x { animation: wnm-paint .45s ease-out both, wnm-shake .5s ease-in-out both; animation-delay: calc(var(--r, 0) * .05s), calc(.3s + var(--r, 0) * .05s); }
body.wnm #preview.wnm-done tr td.w { animation: wnm-glow 1.1s ease-out both; animation-delay: calc(var(--r, 0) * .05s); }
body.wnm #shHead.wnm-head .sh-head { animation: wnm-drop .4s var(--wnm-ease) both; }
body.wnm #shHead.wnm-head .legend .vp { animation: wnm-pop .4s var(--wnm-spring) both; animation-delay: calc(.15s + var(--i, 0) * .07s); }
body.wnm #check.wnm-busy svg { animation: wnm-scan .8s ease-in-out infinite; }
body.wnm #write.wnm-busy svg { animation: wnm-lift .7s ease-in-out infinite; }
body.wnm #lastLog.wnm-hit { animation: wnm-flash 1.2s ease-out both; border-radius: 8px; }
/* ⑤ */
body.wnm #out .xc.wnm-diff .vs svg { animation: wnm-swap .7s ease-in-out 2; animation-delay: .3s; }

@keyframes wnm-pop { 0% { opacity: 0; transform: scale(.7); } 60% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes wnm-sway { 0%, 100% { transform: none; } 25% { transform: rotate(-12deg); } 60% { transform: rotate(9deg); } }
@keyframes wnm-row { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes wnm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wnm-roll { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
@keyframes wnm-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes wnm-paint { from { background-color: transparent; box-shadow: none; } }
@keyframes wnm-shake { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -3px 0; } 40%, 80% { translate: 3px 0; } }
@keyframes wnm-glow { 0% { filter: brightness(1.6); } 100% { filter: none; } }
@keyframes wnm-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes wnm-scan { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }
@keyframes wnm-lift { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }
@keyframes wnm-flash { 0% { background: color-mix(in srgb, var(--good, var(--accent)) 22%, transparent); } 100% { background: transparent; } }
@keyframes wnm-swap { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  #wnNow .wn-t, #wnNow svg, #preview tr, #preview td, #preview .sum, #dayBig, #tVal .big, #shHead *, #check svg, #write svg, #lastLog, #out svg { animation: none !important; }
}
@media print { #wnNow .wn-t, #preview tr, #preview td { animation: none !important; } }
