/* =========================================================
   KU ICONS — 動くアイコン集
   調整できる値（親要素で上書きできる）
     --ico-size   大きさ（既定 48px）
     --ico-stroke 線の太さ（既定 2）
     --ico-accent 差し色（既定 エンジ）
     --ico-bg     重なりを隠す塗り（置く場所の背景色に合わせる）
     --ico-dur    1回の長さ（既定 3.6s）
   形は「動かないとき＝完成形」。動きは .is-play のときだけ。
   ========================================================= */
.ku-ico {
  --ico-size: 48px; --ico-stroke: 2; --ico-accent: #79323F; --ico-bg: #fff; --ico-dur: 3.6s;
  display: inline-block; flex: none; width: var(--ico-size); height: var(--ico-size); line-height: 0; vertical-align: middle;
}
.ku-ico svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: var(--ico-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ku-ico svg * { transform-box: fill-box; transform-origin: center; }
.ku-ico .k-bg { fill: var(--ico-bg); }
.ku-ico .k-fill { fill: currentColor; stroke: none; }
.ku-ico .k-accent { stroke: var(--ico-accent); }
.ku-ico .k-accent-fill { fill: var(--ico-accent); stroke: none; }
.ku-ico .k-on-accent { stroke: #fff; }
.ku-ico .k-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ku-ico text { stroke: none; }

/* 再生（画面に入ったとき・触れたとき） */
.ku-ico.is-play svg * { animation-duration: var(--ico-dur); animation-iteration-count: infinite; animation-timing-function: cubic-bezier(.22, 1, .36, 1); animation-fill-mode: both; }

/* mail：手紙が封筒から出て、戻る */
.is-play .k-mail-letter { animation-name: kMail; }
@keyframes kMail { 0%, 8% { transform: translateY(10px); } 34%, 66% { transform: translateY(0); } 90%, 100% { transform: translateY(10px); } }

/* chat：入力中の点 → 既読のチェック（止まっているときはチェックだけ） */
.ku-ico .k-chat-dots { opacity: 0; }
.is-play .k-chat-dots { animation-name: kChatDots; }
.is-play .k-chat-dots circle { animation: kBounce .9s ease-in-out infinite both !important; }
.is-play .k-chat-dots circle:nth-child(2) { animation-delay: .15s !important; }
.is-play .k-chat-dots circle:nth-child(3) { animation-delay: .3s !important; }
.is-play .k-chat-check { animation-name: kChatCheck; }
@keyframes kChatDots { 0% { opacity: 0; } 6%, 44% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes kBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-3px); } }
@keyframes kChatCheck { 0%, 50% { stroke-dashoffset: 1; opacity: 1; } 62%, 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }

/* phone：受話器が揺れて、電波が出る */
.is-play .k-phone-hand { animation-name: kRing; animation-timing-function: ease-in-out; }
.is-play .k-phone-w1 { animation-name: kWave; }
.is-play .k-phone-w2 { animation-name: kWave; animation-delay: .18s; }
@keyframes kRing { 0%, 36%, 100% { transform: rotate(0); } 4% { transform: rotate(-12deg); } 9% { transform: rotate(10deg); } 14% { transform: rotate(-9deg); } 19% { transform: rotate(7deg); } 24% { transform: rotate(-4deg); } 29% { transform: rotate(2deg); } }
@keyframes kWave { 0%, 3% { opacity: 0; } 10%, 36% { opacity: 1; } 48%, 100% { opacity: 0; } }

/* calendar：日付に丸がついて、チェック */
.is-play .k-cal-day { animation-name: kPop; }
.is-play .k-cal-check { animation-name: kCalCheck; }
@keyframes kPop { 0%, 18% { transform: scale(0); } 30% { transform: scale(1.18); } 38%, 100% { transform: scale(1); } }
@keyframes kCalCheck { 0%, 34% { stroke-dashoffset: 1; } 48%, 100% { stroke-dashoffset: 0; } }

/* clock：長い針がひと回り */
.ku-ico .k-clock-m, .ku-ico .k-clock-h { transform-box: view-box; transform-origin: 24px 24px; }
.is-play .k-clock-m { animation-name: kTurn; }
.is-play .k-clock-h { animation-name: kTurnH; }
@keyframes kTurn { 0%, 14% { transform: rotate(0); } 62%, 100% { transform: rotate(360deg); } }
@keyframes kTurnH { 0%, 14% { transform: rotate(0); } 62%, 100% { transform: rotate(30deg); } }

/* pin：ピンが落ちて、地面に輪が広がる */
.is-play .k-pin-body { animation-name: kDrop; animation-timing-function: ease-in; }
.is-play .k-pin-ring { animation-name: kRipple; }
@keyframes kDrop { 0% { transform: translateY(-14px); opacity: 0; } 14% { transform: translateY(0); opacity: 1; animation-timing-function: ease-out; } 21% { transform: translateY(-4px); animation-timing-function: ease-in; } 27%, 100% { transform: translateY(0); } }
@keyframes kRipple { 0%, 13% { transform: scale(.3); opacity: 0; } 17% { opacity: 1; } 50%, 100% { transform: scale(1.6); opacity: 0; } }

/* mobile：画面がスクロール */
.is-play .k-mob-feed { animation-name: kFeed; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
@keyframes kFeed { 0%, 14% { transform: translateY(0); } 44%, 62% { transform: translateY(-14px); } 92%, 100% { transform: translateY(0); } }

/* speed：針が振れて止まる */
.ku-ico .k-speed-needle { transform-box: view-box; transform-origin: 24px 33px; transform: rotate(48deg); }
.is-play .k-speed-needle { animation-name: kNeedle; }
@keyframes kNeedle { 0%, 6% { transform: rotate(-80deg); } 30% { transform: rotate(62deg); } 38% { transform: rotate(42deg); } 46%, 84% { transform: rotate(48deg); } 100% { transform: rotate(-80deg); } }

/* update：矢印がひと回り */
.ku-ico .k-upd-spin { transform-box: view-box; transform-origin: 24px 24px; }
.is-play .k-upd-spin { animation-name: kTurn; }

/* gear：歯車が回り、きらっと光る */
.ku-ico .k-gear-teeth { stroke-width: 3.4; stroke-dasharray: 2.9 4.01; }
.is-play .k-gear { animation: kSpin 5s linear infinite !important; }
.is-play .k-spark { animation-name: kSpark; }
@keyframes kSpin { to { transform: rotate(360deg); } }
@keyframes kSpark { 0%, 36% { transform: scale(0) rotate(0); } 48% { transform: scale(1.25) rotate(25deg); } 56%, 80% { transform: scale(1) rotate(45deg); } 92%, 100% { transform: scale(0) rotate(60deg); } }

/* search：虫めがねが探して、光る */
.is-play .k-search { animation-name: kLook; animation-timing-function: ease-in-out; }
.is-play .k-search-glint { animation-name: kGlint; }
@keyframes kLook { 0%, 100% { transform: translate(0, 0); } 22% { transform: translate(4px, -3px); } 46% { transform: translate(-3px, 2px); } 66% { transform: translate(2px, 3px); } 80% { transform: translate(0, 0); } }
@keyframes kGlint { 0%, 70% { opacity: .2; } 80%, 90% { opacity: 1; } 100% { opacity: .2; } }

/* estimate：行が書かれて、印が押される */
.is-play .k-est-l1 { animation-name: kL1; }
.is-play .k-est-l2 { animation-name: kL2; }
.is-play .k-est-l3 { animation-name: kL3; }
.is-play .k-est-stamp { animation-name: kStamp; }
@keyframes kL1 { 0%, 6% { stroke-dashoffset: 1; } 20%, 100% { stroke-dashoffset: 0; } }
@keyframes kL2 { 0%, 18% { stroke-dashoffset: 1; } 32%, 100% { stroke-dashoffset: 0; } }
@keyframes kL3 { 0%, 30% { stroke-dashoffset: 1; } 40%, 100% { stroke-dashoffset: 0; } }
@keyframes kStamp { 0%, 44% { transform: scale(1.7); opacity: 0; } 52% { transform: scale(.88); opacity: 1; } 58%, 90% { transform: scale(1); opacity: 1; } 98%, 100% { transform: scale(1); opacity: 0; } }

/* sprout：芽がのびて、葉がひらき、ゆれる */
.ku-ico .k-sprout { transform-box: view-box; transform-origin: 24px 41px; }
.ku-ico .k-sprout-l { transform-origin: 100% 100%; }
.ku-ico .k-sprout-r { transform-origin: 0% 100%; }
.is-play .k-sprout-stem { animation-name: kStem; }
.is-play .k-sprout-l { animation-name: kLeaf; }
.is-play .k-sprout-r { animation-name: kLeaf2; }
.is-play .k-sprout { animation-name: kSway; animation-timing-function: ease-in-out; }
@keyframes kStem { 0%, 4% { stroke-dashoffset: 1; } 26%, 100% { stroke-dashoffset: 0; } }
@keyframes kLeaf { 0%, 22% { transform: scale(0); } 36% { transform: scale(1.12); } 42%, 100% { transform: scale(1); } }
@keyframes kLeaf2 { 0%, 30% { transform: scale(0); } 44% { transform: scale(1.12); } 50%, 100% { transform: scale(1); } }
@keyframes kSway { 0%, 52% { transform: rotate(0); } 66% { transform: rotate(4deg); } 80% { transform: rotate(-3deg); } 92%, 100% { transform: rotate(0); } }

/* pen：ペンが線を引く */
.is-play .k-pen-line { animation-name: kPenLine; animation-timing-function: linear; }
.is-play .k-pen { animation-name: kPen; animation-timing-function: linear; }
@keyframes kPenLine { 0%, 6% { stroke-dashoffset: 1; opacity: 1; } 60%, 86% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes kPen { 0%, 6% { transform: translate(-16px, 7px); } 18% { transform: translate(-7px, 0); } 30% { transform: translate(1px, 5px); } 42% { transform: translate(9px, -1px); } 60% { transform: translate(19px, 4px); } 86% { transform: translate(19px, 4px); } 100% { transform: translate(-16px, 7px); } }

/* access：文字が大きくなる */
.ku-ico .k-a-l { transform-origin: 0% 100%; }
.is-play .k-a-l { animation-name: kGrowA; }
.is-play .k-a-s { animation-name: kFadeA; }
@keyframes kGrowA { 0%, 16% { transform: scale(.6); } 36%, 80% { transform: scale(1); } 100% { transform: scale(.6); } }
@keyframes kFadeA { 0%, 16% { opacity: 1; } 36%, 80% { opacity: .35; } 100% { opacity: 1; } }

/* shield：チェックが入り、光が走る */
.is-play .k-shield-check { animation-name: kShield; }
.is-play .k-shield-shine { animation-name: kShine; }
@keyframes kShield { 0%, 16% { stroke-dashoffset: 1; } 34%, 100% { stroke-dashoffset: 0; } }
@keyframes kShine { 0%, 38% { opacity: 0; transform: translate(0, 0); } 44% { opacity: 1; } 60%, 100% { opacity: 0; transform: translate(18px, 0); } }

/* camera：シャッターを切って、光る */
.is-play .k-cam { animation-name: kShutter; animation-timing-function: ease-in-out; }
.is-play .k-cam-lens { animation-name: kLens; }
.is-play .k-cam-flash { animation-name: kFlash; }
@keyframes kShutter { 0%, 18%, 34%, 100% { transform: scale(1); } 24% { transform: scale(.95); } }
@keyframes kLens { 0%, 20% { transform: scale(1); } 26% { transform: scale(.4); } 40%, 100% { transform: scale(1); } }
@keyframes kFlash { 0%, 22% { opacity: 0; transform: scale(.6); } 28% { opacity: 1; transform: scale(1.1); } 46%, 100% { opacity: 0; transform: scale(1); } }

/* hand：タップして、輪が広がる */
.is-play .k-hand { animation-name: kPress; animation-timing-function: ease-in-out; }
.is-play .k-tap { animation-name: kTapRing; }
@keyframes kPress { 0%, 14%, 40%, 100% { transform: translateY(0) scale(1); } 22%, 28% { transform: translateY(2px) scale(.97); } }
@keyframes kTapRing { 0%, 22% { transform: scale(.3); opacity: 0; } 26% { opacity: 1; } 52%, 100% { transform: scale(1.5); opacity: 0; } }

/* 動きを減らす設定：完成形で止める */
@media (prefers-reduced-motion: reduce) {
  .ku-ico svg * { animation: none !important; }
}
