/* 백업 움직임 — backup-motion.js 가 body 에 bkm(움직여도 됨) · bkm-in 을, 칸마다 bkm-bump · bkm-stamp · bkm-tap · bkm-run · bkm-ok · bkm-err · bkm-open · bkm-days · bkm-hit · bkm-new 를 붙이고 뗀다.
   ① 세 칸 톡 · 시계 되감기 · 바늘 · 묶음 칸 차례로  ② 칸 톡 · ✓ 도장 · 고른 수 톡  ③ 막대 빗금 · 파일 툭 · 성공 빛
   ④ 묶음 줄 차례로  ⑤ 요일 칩 차례로 · 다음 백업 반짝  ⑥ 종이비행기 · 새 파일 빛.  움직임 줄이기면 bkm 이 붙지 않는다. 글자는 바꾸지 않는다. */
body { --bkm-ease: cubic-bezier(.22, 1, .36, 1); --bkm-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.bkm.bkm-in #bkNow .bk-t { animation: bkm-pop .5s var(--bkm-spring) both; animation-delay: calc(var(--i, 0) * .09s); }
body.bkm.bkm-in #nowLast .ic svg { animation: bkm-rewind 1s var(--bkm-ease) both; animation-delay: .35s; }
body.bkm.bkm-in #nowNext .ic svg { animation: bkm-tick 1.1s var(--bkm-ease) both; animation-delay: .45s; }
body.bkm.bkm-in #nowHand .ic svg { animation: bkm-nod .7s var(--bkm-spring) both; animation-delay: .55s; }
body.bkm.bkm-in #bkGs .bk-g { animation: bkm-rise .5s var(--bkm-ease) both; animation-delay: calc(.3s + var(--i, 0) * .07s); }
/* ② */
body.bkm .bkm-bump { transform-origin: 0 50%; animation: bkm-bump .5s var(--bkm-spring) both; }   /* 칸 모양(블록)은 그대로, 왼쪽을 축으로 */
body.bkm #bkGs .bk-g.bkm-tap { animation: bkm-tap .4s var(--bkm-spring) both; }
body.bkm #bkGs .bk-g.bkm-stamp { animation: bkm-tap .4s var(--bkm-spring) both; }
body.bkm #bkGs .bk-g.bkm-stamp .st { animation: bkm-stamp .45s var(--bkm-spring) both; animation-delay: .1s; }
body.bkm #bkGs .bk-g.bkm-stamp .ic { animation: bkm-bump .5s var(--bkm-spring) both; }
/* ③ */
body.bkm #bar.bkm-run > i { background-image: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, #fff 28%, transparent) 8px 16px); background-size: 22.6px 100%; animation: bkm-stripes .6s linear infinite; position: relative; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
body.bkm #msg.bkm-ok { animation: bkm-glow 1.4s ease-out both; }
body.bkm #msg.bkm-err { animation: bkm-shake .5s ease-in-out both; }
.bkm-sprite { position: absolute; z-index: 150; width: 0; height: 0; pointer-events: none; }
.bkm-sprite svg { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bkm-sprite.bkm-drop svg { stroke: var(--good, var(--accent)); animation: bkm-drop 1.1s var(--bkm-ease) both; }
.bkm-sprite.bkm-fly svg { animation: bkm-fly 1.1s var(--bkm-ease) both; }
/* ④ */
body.bkm #groups.bkm-open .grp { animation: bkm-rise .4s var(--bkm-ease) both; animation-delay: calc(var(--i, 0) * .06s); }
/* ⑤ */
body.bkm #days.bkm-days [data-d] { animation: bkm-pop .4s var(--bkm-spring) both; animation-delay: calc(var(--i, 0) * .05s); }
body.bkm .bk-t.bkm-hit { animation: bkm-glow 1.3s ease-out both; }
/* ⑥ */
body.bkm .bkm-new { animation: bkm-glow 1.5s ease-out both; }

@keyframes bkm-pop { 0% { opacity: 0; transform: scale(.7); } 60% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes bkm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bkm-rewind { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes bkm-tick { 0% { transform: rotate(0); } 70% { transform: rotate(380deg); } 100% { transform: rotate(360deg); } }
@keyframes bkm-nod { 0% { transform: translateY(-6px); } 60% { transform: translateY(3px); } 100% { transform: none; } }
@keyframes bkm-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes bkm-tap { 0% { transform: scale(1); } 40% { transform: scale(.94); } 100% { transform: none; } }
@keyframes bkm-stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-12deg); } 70% { opacity: 1; transform: scale(.92) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes bkm-stripes { from { background-position: 0 0; } to { background-position: 22.6px 0; } }
@keyframes bkm-glow { 0% { outline: 3px solid var(--good, var(--accent)); outline-offset: 1px; } 100% { outline: 3px solid transparent; outline-offset: 8px; } }
@keyframes bkm-shake { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
@keyframes bkm-drop { 0% { opacity: 0; transform: translateY(-8px) scale(.6); } 25% { opacity: 1; transform: translateY(0) scale(1.1); } 75% { opacity: 1; transform: translateY(44px) scale(1); } 100% { opacity: 0; transform: translateY(56px) scale(.8); } }
@keyframes bkm-fly { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(90px, -70px) rotate(10deg); } }

@media (prefers-reduced-motion: reduce) {
  #bkNow .bk-t, #bkNow svg, #bkGs .bk-g, #bkGs .bk-g *, #pick, #nowHandB, #autoSum, #bar > i, #msg, #groups .grp, #days [data-d], .bk-t, .bkm-new, .bkm-sprite svg { animation: none !important; }
  .bkm-sprite { display: none; }
}
@media print { #bkNow .bk-t, #bkGs .bk-g, #groups .grp { animation: none !important; } .bkm-sprite { display: none; } }
