/* 움직임 1차(2026-11-27, 말틈_UI규칙_v1 10장 · 다운로드 말틈_움직임_1127/움직임시안). 값은 css/maltum-tokens.css의 --mz-dur-* · --mz-ease-*만 읽는다.
 *   ① 누름: 단추 · 칩 · 카드 120ms 동안 96%
 *   ② 아래 판 380ms 약한 튕김 · 닫기 220ms 가속 / 가운데 창 94% → 100% 320ms / 토스트 320ms 들어오고 160ms 나감
 *   ③ 카드 뽑기(js/mz-table.js?v=8b36bc0-202611271755): 손 대면 14px · 날아가 앉기 480ms · 뒤집기 560ms · 금빛 한 번
 *   ④ 충전 완료 · ⑤ 출석 도장은 js/routes/motion1.js?v=8b36bc0-202611271755
 *   움직임 줄이기: 옮기기 · 튕김 · 뒤집기 없이 150ms 옅게 나타나기만. 누르면 크기 대신 조금 어둡게. */

/* ① 누름 — 위치를 transform으로 잡는 것(카드 판 · 배너 안 · 뜬 그림)은 빼고 */
:where(#app) :where(button, a, [role="tab"], [role="button"], .chip, .panel, article):not(:disabled):not(.mzt-c):not([data-mz-hero] *):not([style*="transform"]) {
  transition-property: transform, background-color, box-shadow, opacity, filter;
  transition-duration: var(--mz-dur-press), var(--mz-dur-s), var(--mz-dur-s), var(--mz-dur-s), var(--mz-dur-press);
  transition-timing-function: var(--mz-ease-std);
}
:where(#app) :where(button, a, [role="tab"], [role="button"], .chip, a.panel, article[data-pid]):not(:disabled):not(.mzt-c):not([data-mz-hero] *):not([style*="transform"]):active {
  transform: scale(var(--mz-press-scale));
}
#mz-ask button:active, #mz-help button:active, #mz-reconsent button:active, .mz-stk-item:active { transform: scale(var(--mz-press-scale)); transition: transform var(--mz-dur-press) var(--mz-ease-std); }

/* ② 아래 판 · 가운데 창 · 어두운 막 */
@keyframes mzDimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mzDimOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes mzSheetIn { from { transform: translateY(105%); } to { transform: none; } }
@keyframes mzSheetOut { from { transform: none; } to { transform: translateY(105%); } }
@keyframes mzDlgIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes mzDlgOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.96); } }
@keyframes mzFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mzFadeOut { from { opacity: 1; } to { opacity: 0; } }
.mz-sheet-in { animation: mzDimIn var(--mz-dur-m) var(--mz-ease-std) both; }
.mz-sheet-in > :first-child { animation: mzSheetIn var(--mz-dur-sheet) var(--mz-ease-soft) both; }
.mz-sheet-out { animation: mzDimOut 220ms var(--mz-ease-out) both; pointer-events: none; }
.mz-sheet-out > :first-child { animation: mzSheetOut 220ms var(--mz-ease-out) both; }
.mz-dlg-in { animation: mzDimIn var(--mz-dur-m) var(--mz-ease-std) both; }
.mz-dlg-in > :first-child { animation: mzDlgIn var(--mz-dur-m) var(--mz-ease-soft) both; }
.mz-dlg-out { animation: mzDimOut 200ms var(--mz-ease-out) both; pointer-events: none; }
.mz-dlg-out > :first-child { animation: mzDlgOut 200ms var(--mz-ease-out) both; }

/* 토스트: 320ms 들어오고(아래 12px에서) 160ms 나감 */
#mz-toast { transition: opacity 160ms var(--mz-ease-out), transform 160ms var(--mz-ease-out) !important; }
#mz-toast.on { transition: opacity var(--mz-dur-s) var(--mz-ease-std), transform var(--mz-dur-m) var(--mz-ease-in) !important; }

/* ④ 충전 완료: 체크 그리기 → 0.46초 깍지 주판(강한 튕김) → 콩 숫자 0.5초 → 단추 */
.mz-pd-check { display: block; width: 44px; height: 44px; margin: 0 auto 4px; }
.mz-pd-check circle { fill: none; stroke: #1F7A56; stroke-width: 3; stroke-dasharray: 126; stroke-dashoffset: 126; animation: mzDraw var(--mz-dur-m) var(--mz-ease-std) 120ms forwards; }
.mz-pd-check path { fill: none; stroke: #1F7A56; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: mzDraw var(--mz-dur-s) var(--mz-ease-std) 300ms forwards; }
@keyframes mzDraw { to { stroke-dashoffset: 0; } }
.mz-pd-hero { display: block; width: 150px; height: 150px; margin: 4px auto 0; object-fit: contain; transform-origin: 50% 90%; animation: mzPop 520ms var(--mz-ease-pop) 460ms both; }
@keyframes mzPop { 0% { transform: scale(.6); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.mz-pd-rise { animation: mzRise var(--mz-dur-m) var(--mz-ease-in) 880ms both; }
@keyframes mzRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mz-pd-skip .mz-pd-check circle, .mz-pd-skip .mz-pd-check path { animation: none; stroke-dashoffset: 0; }
.mz-pd-skip .mz-pd-hero, .mz-pd-skip .mz-pd-rise { animation: none; opacity: 1; transform: none; }

/* ⑤ 출석 도장(젤리쾅 v6): 꾸범 앞발이 올라와 오늘 칸을 누르고 내려가며, 도장이 젤리처럼 눌렸다 튄다 */
.mz-paw-arm { position: fixed; left: 0; top: 0; width: 120px; height: auto; z-index: 60; pointer-events: none; transform-origin: 50% 12%;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%); mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  animation: mzPawPress 1.2s linear both; }
@keyframes mzPawPress {
  0% { transform: translateY(520px); animation-timing-function: cubic-bezier(.2,.7,.3,1); }
  30% { transform: translateY(-8px) scale(1.04); }
  36% { transform: translateY(-12px) scale(1.06); animation-timing-function: cubic-bezier(.7,0,1,.5); }
  42% { transform: translateY(0) scale(.95, 1.03); }
  50% { transform: translateY(0) scale(1.01); }
  62% { transform: translateY(0) scale(1.02); animation-timing-function: ease-in; }
  100% { transform: translateY(540px); }
}
.mz-stamp-jelly { animation: mzJelly 620ms var(--mz-ease-pop) 480ms both; }
@keyframes mzJelly { 0% { transform: scale(1.3); opacity: 0; } 30% { opacity: 1; transform: scale(.82, 1.12); } 55% { transform: scale(1.1, .9); } 75% { transform: scale(.97, 1.03); } 100% { transform: none; opacity: 1; } }
.mz-paw-bang { position: fixed; z-index: 61; pointer-events: none; font: 900 26px/1 "Noto Sans KR", sans-serif; color: #FFFFFF; -webkit-text-stroke: 6px #33508A; paint-order: stroke fill; text-shadow: 0 3px 0 #33508A;
  opacity: 0; transform-origin: 50% 100%; animation: mzBang 900ms cubic-bezier(.3,1.4,.5,1) 470ms both; }
@keyframes mzBang { 0% { opacity: 0; transform: translateY(12px) scale(.4) rotate(-10deg); } 20% { opacity: 1; transform: translateY(-6px) scale(.85, 1.25) rotate(-10deg); } 34% { transform: scale(1.2, .82) rotate(-10deg); } 50%, 82% { opacity: 1; transform: scale(1) rotate(-10deg); } 100% { opacity: 0; transform: translateY(-8px) scale(.9) rotate(-10deg); } }
.mz-paw-ring { position: fixed; z-index: 59; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 0 0 6px rgba(51,80,138,.25); opacity: 0; animation: mzRing 450ms ease-out 480ms both; }
@keyframes mzRing { 0% { opacity: 0; transform: scale(.3); } 8% { opacity: .9; } 100% { opacity: 0; transform: scale(1.6); } }
.mz-paw-dust { position: fixed; z-index: 59; pointer-events: none; width: 16px; height: 10px; border-radius: 50%/60%; background: #E6D6B2; opacity: 0; filter: blur(.6px); animation: mzDust 700ms cubic-bezier(.15,.75,.3,1) 480ms both; }
@keyframes mzDust { 0% { opacity: 0; transform: translate(0,0) scale(.4); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.5); } }

/* 움직임 줄이기: 옮기기 · 튕김 · 뒤집기 없이 150ms 옅게 나타나기만 */
@media (prefers-reduced-motion: reduce) {
  :where(#app) :where(button, a, [role="tab"], [role="button"], .chip, a.panel, article[data-pid]):active { transform: none !important; filter: brightness(.92); }
  .mz-sheet-in > :first-child, .mz-dlg-in > :first-child { animation: mzFadeIn 150ms linear both; }
  .mz-sheet-out > :first-child, .mz-dlg-out > :first-child { animation: mzFadeOut 150ms linear both; }
  #mz-toast, #mz-toast.on { transform: translate(-50%, 0) !important; transition: opacity 150ms linear !important; }
  .mz-pd-check circle, .mz-pd-check path { animation: none; stroke-dashoffset: 0; }
  .mz-pd-hero, .mz-pd-rise { animation: mzFadeIn 150ms linear both; transform: none; }
  .mz-paw-arm, .mz-paw-bang, .mz-paw-ring, .mz-paw-dust { display: none; }
  .mz-stamp-jelly { animation: mzFadeIn 150ms linear both; }
}
