/* Icon hover animations: each icon moves in a way that matches its meaning.
   Triggered when the pointer is over the control that holds the icon; off under reduced motion. */
.ic { transform-box: fill-box; transform-origin: center; }
:is(a, button, summary, label, .chip, .tag):hover > .ic,
:is(a, button, summary, label, .chip, .tag):hover > span > .ic,
:is(a, button, summary, label, .chip, .tag):focus-visible > .ic { animation-duration: .7s; animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); animation-iteration-count: 1; }

:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-heart { animation: i-beat .9s ease-in-out infinite; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-search { animation: i-search .7s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-plus { animation: i-spin90 .5s cubic-bezier(.34, 1.56, .64, 1); }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-user { animation: i-nod .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-map { animation: i-unfold .7s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-list,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-filter { animation: i-slide .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-grid { animation: i-pulse .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-close { animation: i-spin90 .4s ease-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-back { animation: i-left .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-next,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-logout { animation: i-right .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-pin,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-home,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-building { animation: i-bounce .6s cubic-bezier(.34, 1.56, .64, 1); }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-share,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-up { animation: i-up .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-down { animation: i-down .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-flag { animation: i-wave .7s ease-in-out; transform-origin: 20% 90%; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-vk,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-edit,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-scale { animation: i-tilt .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-phone { animation: i-ring .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-chat { animation: i-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-check { animation: i-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-shield,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-info,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-qr { animation: i-pulse .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-bolt { animation: i-flash .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-camera { animation: i-flash .5s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-clock,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-locate,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-sun,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-settings { animation: i-spin .8s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-moon { animation: i-rock .7s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-star,
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-sparkle { animation: i-twinkle .7s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-trash { animation: i-shake .5s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-copy { animation: i-copy .5s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-send { animation: i-send .7s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-bed { animation: i-nod .6s ease-in-out; }
:is(a, button, summary, label, .chip):is(:hover, :focus-visible) .ic-minus { animation: i-slide .5s ease-in-out; }

@keyframes i-beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(.95); } 45% { transform: scale(1.12); } }
@keyframes i-search { 0%, 100% { transform: none; } 30% { transform: translate(-2px, -2px) rotate(-12deg); } 65% { transform: translate(1px, 1px) rotate(8deg); } }
@keyframes i-spin90 { from { transform: rotate(0); } to { transform: rotate(90deg); } }
@keyframes i-nod { 0%, 100% { transform: none; } 40% { transform: translateY(-2px); } 70% { transform: translateY(1px); } }
@keyframes i-unfold { 0%, 100% { transform: scaleX(1); } 40% { transform: scaleX(.75); } 75% { transform: scaleX(1.08); } }
@keyframes i-slide { 0%, 100% { transform: none; } 40% { transform: translateX(3px); } 70% { transform: translateX(-1px); } }
@keyframes i-pulse { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.18); } }
@keyframes i-left { 0%, 100% { transform: none; } 45% { transform: translateX(-4px); } }
@keyframes i-right { 0%, 100% { transform: none; } 45% { transform: translateX(4px); } }
@keyframes i-bounce { 0%, 100% { transform: none; } 35% { transform: translateY(-4px); } 60% { transform: translateY(0) scale(1.06, .92); } 80% { transform: translateY(-1px); } }
@keyframes i-up { 0%, 100% { transform: none; } 45% { transform: translateY(-4px); } }
@keyframes i-down { 0%, 100% { transform: none; } 45% { transform: translateY(3px); } }
@keyframes i-wave { 0%, 100% { transform: none; } 25% { transform: skewY(-8deg); } 55% { transform: skewY(6deg); } 80% { transform: skewY(-3deg); } }
@keyframes i-tilt { 0%, 100% { transform: none; } 30% { transform: rotate(-12deg); } 65% { transform: rotate(8deg); } }
@keyframes i-ring { 0%, 100% { transform: none; } 15%, 45%, 75% { transform: rotate(-14deg); } 30%, 60%, 90% { transform: rotate(14deg); } }
@keyframes i-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-6deg); } }
@keyframes i-flash { 0%, 100% { transform: scale(1); opacity: 1; } 30% { transform: scale(1.15); opacity: .55; } 60% { opacity: 1; } }
@keyframes i-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes i-rock { 0%, 100% { transform: none; } 35% { transform: rotate(-18deg); } 70% { transform: rotate(10deg); } }
@keyframes i-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 45% { transform: scale(1.25) rotate(25deg); } }
@keyframes i-shake { 0%, 100% { transform: none; } 20%, 60% { transform: rotate(-10deg); } 40%, 80% { transform: rotate(10deg); } }
@keyframes i-copy { 0%, 100% { transform: none; } 45% { transform: translate(2px, -2px); } }
@keyframes i-send { 0% { transform: none; opacity: 1; } 45% { transform: translate(6px, -6px); opacity: 0; } 46% { transform: translate(-6px, 6px); opacity: 0; } 100% { transform: none; opacity: 1; } }

@keyframes rr-heartbeat {
  0%, 67%, 100% { transform: scale(1); }
  13% { transform: scale(1.52); }
  26% { transform: scale(.85, .90); }
  40% { transform: scale(1.32); }
  53% { transform: scale(.94); }
}
@keyframes rr-post-turn {
  0% { transform: rotate(0) scale(1); }
  13% { transform: rotate(-14deg) scale(.91); }
  36% { transform: rotate(101deg) scale(1.43); }
  51% { transform: rotate(84deg) scale(.98); }
  65%, 100% { transform: rotate(90deg) scale(1); }
}
@keyframes rr-back-glide {
  0%, 75%, 100% { transform:translateX(0); }
  38% { transform:translateX(-5px); }
}
@keyframes rr-chat-pop {
  0%, 66%, 100% { transform: scale(1); }
  18% { transform: scale(1.24) rotate(-6deg); }
  38% { transform: scale(1.08) rotate(2deg); }
}
@keyframes rr-typing-dot {
  0%, 44%, 100% { transform: translateY(0); }
  22% { transform: translateY(-3px); }
}
@keyframes rr-compare-bar {
  0%, 64%, 100% { transform: scaleY(1); }
  18% { transform: scaleY(.48); }
  40% { transform: scaleY(1.23); }
}
@keyframes rr-bookmark-lift {
  0%, 72%, 100% { transform:translateY(0) scale(1); }
  28% { transform:translateY(-3px) scale(1.14); }
  48% { transform:translateY(1px) scale(1.04,.96); }
}
@keyframes rr-sort-lines {
  0%, 85%, 100% { transform:scaleX(1); }
  42% { transform:scaleX(var(--line-scale,.38)); }
}
@media (hover:hover) and (pointer:fine) {
  :is(button,a):hover .ic-heart { animation:rr-heartbeat 1.05s ease-in-out infinite; }
  .btn-post:hover .ic-plus { animation:rr-post-turn 1.45s ease-in-out; }
  [data-back]:hover .ic-back { animation:rr-back-glide 1.4s ease-in-out infinite; }
  :is(button,a):hover .ic-chat { animation:rr-chat-pop 1.3s ease-in-out infinite; }
  :is(button,a):hover .ic-chat circle { animation:rr-typing-dot 1.3s ease-in-out infinite; }
  :is(button,a):hover .ic-scale path { transform-box:fill-box; transform-origin:center bottom; animation:rr-compare-bar 1.3s ease-in-out infinite; }
  :is(button,a):hover .ic-scale path:nth-child(2) { animation-delay:90ms; }
  :is(button,a):hover .ic-scale path:nth-child(3) { animation-delay:180ms; }
  :is(button,a):hover .ic-bookmark { animation:rr-bookmark-lift 1.5s ease-in-out; }
}
@media(prefers-reduced-motion:reduce) { :is(button,a):hover .ic, :is(button,a):hover .ic path, :is(button,a):hover .ic circle { animation:none !important; } }

@media(hover:hover) and (pointer:fine) { :is(button,a):hover .ic-scale { animation:none; } .ic-chat circle { transform-box:fill-box; transform-origin:center; } }
