/* AI 사용량 움직임 — ai-usage-motion.js 가 body 에 aum(움직여도 됨) · aum-in 을, 칸마다 aum-grow · aum-bump · aum-tap · aum-drop · aum-plug · aum-ok · aum-bad · aum-flash 를 붙이고 뗀다.
   ① 세 칸 톡 · 로봇 갸웃 · 화살표 튐 · 한도 막대 차오름 · 그래프 자람 · 오류 점 맥박 · 볼 것 줄  ② 기간 바꾸면 다시 자람 · 숫자 톡
   ③ 범례 칩 → 다시 자람  ④ 막대 톡 · 그날 내역 펼침  ⑤ 플러그 꽂힘 · 결과 빛  ⑥ 표 줄 깜빡.  움직임 줄이기면 aum 이 붙지 않는다. 글자는 바꾸지 않는다. */
body { --aum-ease: cubic-bezier(.22, 1, .36, 1); --aum-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.aum.aum-in #aiNow .ai-t { animation: aum-pop .5s var(--aum-spring) both; animation-delay: calc(var(--i, 0) * .09s); }
body.aum.aum-in #tAi .ic svg { animation: aum-tilt 1s ease-in-out both; animation-delay: .4s; }
body.aum.aum-in #tEk .ic svg { animation: aum-hop .7s var(--aum-spring) both; animation-delay: .5s; }
body.aum.aum-in #tCf .ic svg { animation: aum-drift 1.2s ease-in-out both; animation-delay: .55s; }
body.aum.aum-in .tile .bar i { transform-origin: 0 50%; animation: aum-fill .9s var(--aum-ease) both; animation-delay: .5s; }
body.aum.aum-in #chart .dot-err { animation: aum-beat 1s ease-in-out 3; animation-delay: 1.2s; }
body.aum.aum-in #chart .col.today .stk { animation: aum-grow .5s var(--aum-spring) both, aum-glow 1.2s ease-out 1s both; animation-delay: calc(.3s + var(--i, 0) * .025s), 1.1s; }
body.aum.aum-in #watch .w-i { animation: aum-rise .45s var(--aum-ease) both; animation-delay: calc(.3s + var(--i, 0) * .06s); }
body.aum.aum-in .tiles .tile { animation: aum-rise .45s var(--aum-ease) both; animation-delay: .25s; }
/* ① ② ③ 그래프 막대 — 버튼(.col)은 두고 안쪽 막대만 자란다 */
body.aum #chart.aum-grow .stk { transform-origin: 50% 100%; animation: aum-grow .5s var(--aum-spring) both; animation-delay: calc(var(--i, 0) * .025s); }
body.aum .tiles.aum-bump .tile .v { display: inline-block; transform-origin: 0 70%; animation: aum-bump .5s var(--aum-spring) both; }
/* ③ ④ */
body.aum #chart .lg.aum-tap, body.aum #chart .stk.aum-tap { animation: aum-tap .45s var(--aum-spring) both; }
body.aum #dayInfo.aum-drop { animation: aum-drop .4s var(--aum-ease) both; }
/* ⑤ */
body.aum .btn.aum-plug svg { animation: aum-plug .8s var(--aum-ease) both; }
body.aum .r.aum-ok { animation: aum-ok 1.3s ease-out both; border-radius: 6px; }
body.aum .r.aum-bad { animation: aum-shake .5s ease-in-out both; }
/* ⑥ */
body.aum tr.aum-flash td { animation: aum-flash 1.5s ease-out both; }

@keyframes aum-pop { 0% { opacity: 0; transform: scale(.7); } 60% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes aum-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes aum-tilt { 0%, 100% { transform: none; } 25% { transform: rotate(-14deg); } 55% { transform: rotate(10deg); } 80% { transform: rotate(-4deg); } }
@keyframes aum-hop { 0% { transform: none; } 40% { transform: translate(3px, -6px); } 100% { transform: none; } }
@keyframes aum-drift { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }
@keyframes aum-fill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes aum-grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes aum-beat { 0%, 100% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.6); } }
@keyframes aum-glow { 0% { filter: brightness(1.8); } 100% { filter: none; } }
@keyframes aum-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes aum-tap { 0% { transform: scale(1); } 40% { transform: scale(.88); } 100% { transform: none; } }
@keyframes aum-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes aum-plug { 0% { transform: none; } 35% { transform: translate(-4px, 3px) rotate(-20deg); } 60% { transform: translate(2px, -1px) rotate(4deg); } 100% { transform: none; } }
@keyframes aum-ok { 0% { box-shadow: 0 0 0 2px var(--good, var(--accent)); background: color-mix(in srgb, var(--good, var(--accent)) 18%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes aum-shake { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }
@keyframes aum-flash { 0%, 40% { background: color-mix(in srgb, var(--t-amber) 40%, transparent); } }

@media (prefers-reduced-motion: reduce) {
  #aiNow .ai-t, #aiNow svg, .tile, .tile .bar i, .tile .v, #chart *, #dayInfo, #watch .w-i, .btn svg, .r, tr td { animation: none !important; }
}
@media print { #aiNow .ai-t, .tile, #chart * { animation: none !important; } }
