/* 농장 기준값 움직임 — farm-params-motion.js 가 body 에 fpm(움직여도 됨) · fpm-in 을, 칸마다 fpm-show · fpm-pop · fpm-dot · fpm-float · fpm-ok · fpm-flash 를 붙이고 뗀다.
   ① 메뉴 톡 · 선 그어짐 · 점 차례로 · 예시 알약  ② 묶음 카드 올라옴 · 그림 다시  ③ 그림이 옛 자리에서 미끄러짐
   ④ 모서리 점 톡 · 메뉴 알약 톡 · 저장 띠 떠오름  ⑤ 저장 빛.  움직임 줄이기면 fpm 이 붙지 않는다. 글자는 바꾸지 않는다.
   눈금 점 · 글자는 자리 잡는 transform 이 있어 scale · translate 속성만 쓴다(겹쳐진다). */
body { --fpm-ease: cubic-bezier(.22, 1, .36, 1); --fpm-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.fpm.fpm-in #nav button[data-sec] { animation: fpm-pop-in .45s var(--fpm-spring) both; animation-delay: calc(var(--i, 0) * .07s); }
body.fpm.fpm-in #tl .ln, body.fpm.fpm-in #tl .seg { transform-origin: 0 50%; animation: fpm-draw .8s var(--fpm-ease) both; animation-delay: .25s; }
body.fpm.fpm-in #tl .pt { animation: fpm-dot-in .45s var(--fpm-spring) both; animation-delay: calc(.4s + var(--i, 0) * .18s); }
body.fpm.fpm-in #tl .lb, body.fpm.fpm-in #tl .ed { animation: fpm-fade .4s ease-out both; animation-delay: .9s; }
body.fpm.fpm-in #tl .fp-vr { animation: fpm-rise .45s var(--fpm-ease) both; animation-delay: calc(.25s + var(--i, 0) * .1s); }
body.fpm.fpm-in #fpEx .fpill { animation: fpm-pop-in .4s var(--fpm-spring) both; animation-delay: calc(1s + var(--i, 0) * .1s); }
body.fpm.fpm-in #fpWarn .fp-wb { animation: fpm-reveal .7s var(--fpm-ease) both; animation-delay: .6s; }
/* ② 묶음 (크기는 그대로 — 일령 칸 폭을 재는 검사가 있다) */
body.fpm .sec.fpm-show .card { animation: fpm-rise .45s var(--fpm-ease) both; }
body.fpm .sec.fpm-show :is(.rowf, .zrow, .ticks label) { animation: fpm-fade .4s ease-out both; animation-delay: calc(.15s + var(--i, 0) * .05s); }
body.fpm .sec.fpm-show #agebar, body.fpm .sec.fpm-show #fpWarn .fp-wb { animation: fpm-reveal .7s var(--fpm-ease) both; animation-delay: .1s; }
body.fpm .sec.fpm-show #zone .z { animation: fpm-fade .5s ease-out both; animation-delay: .2s; }
/* ③ 옛 자리에서 — 바뀐 속성의 키프레임만 JS 가 그 칸 style.animation 에 넣는다 */
/* ④ */
body.fpm #nav .fp-st.fpm-pop { animation: fpm-bump .45s var(--fpm-spring) both; }
body.fpm .fk.fpm-dot::after { animation: fpm-bump-dot .45s var(--fpm-spring) both; }
body.fpm #btnbar.fpm-float { animation: fpm-up .45s var(--fpm-spring) both; }
/* ⑤ */
body.fpm #navfoot .fpill.fpm-ok { animation: fpm-glow 1.2s ease-out both; }
body.fpm #nav .fp-st.fpm-flash { animation: fpm-flash .8s ease-out both; animation-delay: calc(var(--i, 0) * .07s); }

@keyframes fpm-pop-in { 0% { opacity: 0; scale: .75; } 60% { opacity: 1; scale: 1.05; } 100% { opacity: 1; scale: 1; } }
@keyframes fpm-dot-in { 0% { opacity: 0; scale: .2; } 70% { opacity: 1; scale: 1.25; } 100% { opacity: 1; scale: 1; } }
@keyframes fpm-draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes fpm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fpm-rise { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@keyframes fpm-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fpm-s-left { from { left: var(--f-left); } }
@keyframes fpm-s-top { from { top: var(--f-top); } }
@keyframes fpm-s-width { from { width: var(--f-width); } }
@keyframes fpm-s-height { from { height: var(--f-height); } }
@keyframes fpm-s-flex-grow { from { flex-grow: var(--f-flex-grow); } }
@keyframes fpm-bump { 0% { scale: 1; } 40% { scale: 1.15; } 100% { scale: 1; } }
@keyframes fpm-bump-dot { 0% { transform: scale(0); } 60% { transform: scale(1.6); } 100% { transform: none; } }
@keyframes fpm-up { from { translate: 0 30px; opacity: .3; } to { translate: 0 0; opacity: 1; } }
@keyframes fpm-glow { 0% { box-shadow: 0 0 0 3px var(--good, var(--accent)); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes fpm-flash { 0% { filter: brightness(1); } 35% { filter: brightness(1.6); scale: 1.08; } 100% { filter: none; scale: 1; } }

@media (prefers-reduced-motion: reduce) {
  #nav button, #nav .fp-st, #tl *, #fpEx *, #fpWarn *, .sec *, .fk, .fk::after, #btnbar, #navfoot *, #agebar, #agebar *, #zone *, #fpAx * { animation: none !important; }
}
@media print { #nav button, #tl *, .sec * { animation: none !important; } }
