/* 메뉴 순서 움직임 — menu-motion.js 가 body 에 mom(움직여도 됨) · mom-in 을, 칸마다 mom-bump · mom-open · mom-saved · mom-run · mom-ok · mom-err 를 붙이고 뗀다.
   줄이 자리를 바꾸는 것은 JS 가 그 줄에 잠깐 거꾸로 건 transform 을 푸는 것(Web Animations, id mom-slide)이다.
   ① 묶음 · 줄 · 미리보기 차례로  ② ③ 미끄러짐 · 개수 톡  ④ 미리보기 펼침  ⑤ 빗금 · 글 빛 · 미리보기 반짝.  움직임 줄이기면 mom 이 붙지 않는다. */
body { --mom-ease: cubic-bezier(.22, 1, .36, 1); --mom-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.mom.mom-in #list .grp > h3, body.mom.mom-in #list li { animation: mom-rise .4s var(--mom-ease) both; animation-delay: calc(var(--i, 0) * .035s); }
body.mom.mom-in #list .ms3-sg { animation: mom-fade .45s ease-out both; animation-delay: calc(.3s + var(--i, 0) * .1s); }
/* ③ */
body.mom .mom-bump { display: inline-block; animation: mom-num .5s var(--mom-spring) both; }
/* ④ */
body.mom #list .ms3-pv.mom-open .ms3-sg { animation: mom-drop .4s var(--mom-ease) both; animation-delay: calc(var(--i, 0) * .07s); }
/* ⑤ */
body.mom #list .ms3-pv.mom-saved .ms3-si { animation: mom-lit .9s ease-out both; animation-delay: calc(var(--i, 0) * .05s); }
body.mom #save.mom-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: mom-stripe .6s linear infinite; }
body.mom #msg.mom-ok { border-radius: 8px; animation: mom-glow 1.4s ease-out both; }
body.mom #msg.mom-err { animation: mom-shake .5s ease-in-out both; }

@keyframes mom-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mom-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mom-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes mom-num { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: none; } }
@keyframes mom-lit { 0% { background: transparent; } 35% { background: color-mix(in srgb, var(--g, var(--accent)) 24%, transparent); } 100% { background: transparent; } }
@keyframes mom-stripe { from { background-position: 0 0; } to { background-position: 22px 0; } }
@keyframes mom-glow { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes mom-shake { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }

@media (prefers-reduced-motion: reduce) {
  #list .grp > h3, #list li, #list .ms3-sg, #list .ms3-si, #list .ms-cnt, #save, #msg { animation: none !important; }
}
@media print { #list .grp > h3, #list li, #list .ms3-sg { animation: none !important; } }
