/* 받은함 /inbox 전용 움직임(PLAN 부록 F §7.1 Inbox 행 — framer-motion 값을 CSS @keyframes · linear() 스프링으로) — inbox/show 만 싣는다.
 * 값은 구 화면 transition 그대로, 이징은 framer-motion 12 기본값(B0 inbox STRUCTURE §5 rAF 샘플로 확인):
 *   - 이징을 주지 않은 tween 은 easeOut = cubic-bezier(0, 0, 0.58, 1)(키프레임 배열이면 구간마다), easeInOut = ease-in-out.
 *   - transition 없는 등장은 opacity tween cubic-bezier(0.25, 0.1, 0.35, 1) 0.3s, scale 은 스프링(stiffness 550 · damping 30).
 *   - 스프링(linear() 표본): 타이틀 묶음 bounce 0.4 · duration 0.5(감쇠비 0.6, 최대 진행 1.0947 = scale 1.019 — B0 1.01888),
 *     타이틀 상자 hover stiffness 400 · damping 10(감쇠비 0.25, 최대 1.4437 = scale 1.0289 — B0 1.02883, 0.48s 에 정착),
 *     빈 상태 상자 stiffness 550 · damping 30(감쇠비 0.64, 0.33s).
 *   - repeatDelay 는 쉼을 주기에 넣는다(Sparkles 1s + 2s = 3s, 👀 0.8s + 1.5s = 2.3s). 무한 루프는 fill 을 두지 않는다 —
 *     지연 동안 제자리였다가 첫 키프레임으로 뛰는 것이 구 화면과 같다.
 *   - 등장은 fill backwards — 지연 동안 첫 자세, 끝나면 애니메이션이 빠지고 class 그대로(끝 자세 = 기본 스타일). both 로 끝 값을 붙잡아 두면
 *     opacity·transform 애니메이션이 계속 걸린 채라 섹션이 쌓임 맥락·backdrop 경계로 남는다(구 화면은 끝나면 inline 'opacity: 1; transform: none').
 * 정지 화면 채취(script/visual/freeze.css)는 애니메이션·트랜지션을 끄므로 정지 자세는 각 요소의 class 그대로다.
 * 대상은 class 대신 data-inbox-motion 으로 고르고(class 문자열은 구 화면 그대로), keyframes 이름은 inbox- 접두로 다른 화면과 겹치지 않게 한다.
 * 배경 blob 의 animate-blob · animation-delay-* 는 정의하지 않는다 — 구 CSS 에도 없어 움직이지 않았다(B0 §9 B6). */

/* 섹션 등장 — opacity 0→1 · y 30→0, 0.5s, 지연 0.2s */
[data-inbox-motion="section"] {
  animation: inbox-section-enter 0.5s cubic-bezier(0, 0, 0.58, 1) 0.2s backwards;
}

@keyframes inbox-section-enter {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}

/* 타이틀 묶음 — scale 0.8→1 · opacity 0→1, 스프링 bounce 0.4 · duration 0.5, 지연 0.3s */
[data-inbox-motion="title"] {
  animation: inbox-title-pop 0.5s linear(0, 0.081, 0.2654, 0.4833, 0.6885, 0.8557, 0.9756, 1.0498, 1.0861, 1.0947, 1.0856, 1.0676, 1.0469, 1.0277, 1.0123, 1.0014, 0.9948, 0.9917, 0.9911, 0.992, 0.9938, 0.9958, 0.9975, 0.999, 0.9999, 1) 0.3s backwards;
}

@keyframes inbox-title-pop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: none; }
}

/* 떠다니는 이모지 4종 — easeInOut 무한 */
[data-inbox-motion="sparkle"] {
  animation: inbox-sparkle 2s ease-in-out infinite;
}

@keyframes inbox-sparkle {
  0%, 100% { transform: translateY(-3px) rotate(-5deg); }
  50% { transform: translateY(3px) rotate(5deg); }
}

[data-inbox-motion="dizzy"] {
  animation: inbox-dizzy 1.8s ease-in-out 0.3s infinite;
}

@keyframes inbox-dizzy {
  0%, 100% { transform: translateY(2px) rotate(5deg); }
  50% { transform: translateY(-2px) rotate(-5deg); }
}

[data-inbox-motion="heart"] {
  animation: inbox-heart 1.5s ease-in-out 0.5s infinite;
}

@keyframes inbox-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

[data-inbox-motion="fire"] {
  animation: inbox-fire 2.2s ease-in-out 0.7s infinite;
}

@keyframes inbox-fire {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(2px, -4px); }
}

/* 타이틀 상자 — 마우스로 올리면 scale 1.02(스프링 400) + 그림자(즉시 — 보간 없음). 터치 기기는 hover 하지 않는다(구 whileHover 도 터치 무시) */
[data-inbox-motion="title-box"] {
  transition: transform 0.48s linear(0, 0.0425, 0.1585, 0.3282, 0.5299, 0.7426, 0.947, 1.1273, 1.2719, 1.3738, 1.4306, 1.4437, 1.4182, 1.3615, 1.2828, 1.1915, 1.0971, 1.0078, 0.9303, 0.8693, 0.8277, 0.8062, 0.8037, 0.8179, 0.8452, 0.8816, 0.9227, 0.9644, 1.0034, 1.0366, 1.0621, 1.079, 1);
}

@media (hover: hover) {
  [data-inbox-motion="title-box"]:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }
}

/* Sparkles 아이콘 — rotate 0→15→−15→0 1s, 쉼 2s */
[data-inbox-motion="sparkles-icon"] {
  animation: inbox-sparkles-icon 3s cubic-bezier(0, 0, 0.58, 1) infinite;
}

@keyframes inbox-sparkles-icon {
  0%, 33.333%, 100% { transform: rotate(0deg); }
  11.111% { transform: rotate(15deg); }
  22.222% { transform: rotate(-15deg); }
}

/* 👀 — scale 1→1.3→1 0.8s, 쉼 1.5s */
[data-inbox-motion="eyes"] {
  animation: inbox-eyes 2.3s cubic-bezier(0, 0, 0.58, 1) infinite;
}

@keyframes inbox-eyes {
  0%, 34.783%, 100% { transform: scale(1); }
  17.391% { transform: scale(1.3); }
}

/* 미방문 빨간 점 — scale 1→1.3→1 1s 무한 */
[data-inbox-motion="new-dot"] {
  animation: inbox-new-dot 1s cubic-bezier(0, 0, 0.58, 1) infinite;
}

@keyframes inbox-new-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* 목록 등장 — opacity 0→1 기본 tween */
[data-inbox-motion="list"] {
  animation: inbox-fade 0.3s cubic-bezier(0.25, 0.1, 0.35, 1) backwards;
}

@keyframes inbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 빈 상태 — 상자 opacity tween + scale 0.9→1 스프링, 첫 줄 y 0→−3px 2s 무한 */
[data-inbox-motion="empty"] {
  animation: inbox-fade 0.3s cubic-bezier(0.25, 0.1, 0.35, 1) backwards, inbox-empty-pop 0.33s linear(0, 0.0944, 0.3002, 0.5308, 0.7353, 0.8907, 0.9931, 1.0495, 1.0714, 1.0709, 1.0586, 1.0419, 1.0257, 1.0126, 1.0034, 0.9979, 1) backwards;
}

@keyframes inbox-empty-pop {
  from { transform: scale(0.9); }
  to { transform: none; }
}

[data-inbox-motion="empty-text"] {
  animation: inbox-empty-bob 2s cubic-bezier(0, 0, 0.58, 1) infinite;
}

@keyframes inbox-empty-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
