/* Hover animations: classic-b group (wizard, dino, pirate, mermaid, castle) */

.ico-th-wizard .hat, .ico-th-wizard .wand, .ico-th-wizard .spark,
.ico-th-dino .head, .ico-th-dino .tail, .ico-th-dino .heart,
.ico-th-pirate .ship, .ico-th-pirate .flag, .ico-th-pirate .waves,
.ico-th-mermaid .hair, .ico-th-mermaid .fin, .ico-th-mermaid .bub,
.ico-th-castle .flag, .ico-th-castle .win, .ico-th-castle .star { transform-box: fill-box; }

/* Wizard: wand swishes, hat wiggles, sparkles twinkle */
.ico-th-wizard .wand { transform-origin: 0% 100%; }
.ico-th-wizard .hat { transform-origin: 50% 100%; }
.ico-th-wizard .spark { transform-origin: 50% 50%; }
.hov:hover .ico-th-wizard .wand, .hov:focus-visible .ico-th-wizard .wand, .hov.on .ico-th-wizard .wand { animation: th-wizard-wand 1.2s ease-in-out infinite; }
.hov:hover .ico-th-wizard .hat, .hov:focus-visible .ico-th-wizard .hat, .hov.on .ico-th-wizard .hat { animation: th-wizard-hat 1.2s ease-in-out infinite; }
.hov:hover .ico-th-wizard .spark, .hov:focus-visible .ico-th-wizard .spark, .hov.on .ico-th-wizard .spark { animation: th-wizard-spark 1.2s ease-in-out infinite; }
.hov:hover .ico-th-wizard .s2, .hov:focus-visible .ico-th-wizard .s2, .hov.on .ico-th-wizard .s2 { animation-delay: -.4s; }
.hov:hover .ico-th-wizard .s3, .hov:focus-visible .ico-th-wizard .s3, .hov.on .ico-th-wizard .s3 { animation-delay: -.8s; }
@keyframes th-wizard-wand { 0%,100% { transform: rotate(0); } 40% { transform: rotate(-12deg); } 70% { transform: rotate(6deg); } }
@keyframes th-wizard-hat { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-4deg) translateY(-1.5px); } }
@keyframes th-wizard-spark { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.4) rotate(45deg); opacity: .4; } }

/* Dino: head nods, tail wags, little heart floats up */
.ico-th-dino .head { transform-origin: 10% 90%; }
.ico-th-dino .tail { transform-origin: 100% 60%; }
.ico-th-dino .heart { transform-origin: 50% 100%; }
.hov:hover .ico-th-dino .head, .hov:focus-visible .ico-th-dino .head, .hov.on .ico-th-dino .head { animation: th-dino-head 1.4s ease-in-out infinite; }
.hov:hover .ico-th-dino .tail, .hov:focus-visible .ico-th-dino .tail, .hov.on .ico-th-dino .tail { animation: th-dino-tail .7s ease-in-out infinite; }
.hov:hover .ico-th-dino .heart, .hov:focus-visible .ico-th-dino .heart, .hov.on .ico-th-dino .heart { animation: th-dino-heart 1.4s ease-in-out infinite; }
@keyframes th-dino-head { 0%,100% { transform: rotate(0); } 30% { transform: rotate(7deg); } 60% { transform: rotate(-3deg); } }
@keyframes th-dino-tail { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes th-dino-heart { 0% { transform: translateY(3px) scale(.6); opacity: 0; } 30% { opacity: 1; transform: translateY(0) scale(1.1); } 70% { opacity: 1; transform: translateY(-2px) scale(1); } 100% { transform: translateY(-4px) scale(.9); opacity: 0; } }

/* Pirate: ship rocks, flag flutters, waves roll */
.ico-th-pirate .ship { transform-origin: 50% 90%; }
.ico-th-pirate .flag { transform-origin: 0% 50%; }
.hov:hover .ico-th-pirate .ship, .hov:focus-visible .ico-th-pirate .ship, .hov.on .ico-th-pirate .ship { animation: th-pirate-rock 1.6s ease-in-out infinite; }
.hov:hover .ico-th-pirate .flag, .hov:focus-visible .ico-th-pirate .flag, .hov.on .ico-th-pirate .flag { animation: th-pirate-flag .6s ease-in-out infinite; }
.hov:hover .ico-th-pirate .waves, .hov:focus-visible .ico-th-pirate .waves, .hov.on .ico-th-pirate .waves { animation: th-pirate-waves 1.6s ease-in-out infinite; }
@keyframes th-pirate-rock { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(1.5px); } }
@keyframes th-pirate-flag { 0%,100% { transform: scaleX(1) skewY(0); } 50% { transform: scaleX(.85) skewY(6deg); } }
@keyframes th-pirate-waves { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }

/* Mermaid: tail fin flaps, hair sways, bubbles rise */
.ico-th-mermaid .fin { transform-origin: 0% 100%; }
.ico-th-mermaid .hair { transform-origin: 50% 0%; }
.ico-th-mermaid .bub { transform-origin: 50% 50%; }
.hov:hover .ico-th-mermaid .fin, .hov:focus-visible .ico-th-mermaid .fin, .hov.on .ico-th-mermaid .fin { animation: th-mermaid-fin .8s ease-in-out infinite; }
.hov:hover .ico-th-mermaid .hair, .hov:focus-visible .ico-th-mermaid .hair, .hov.on .ico-th-mermaid .hair { animation: th-mermaid-hair 1.6s ease-in-out infinite; }
.hov:hover .ico-th-mermaid .bub, .hov:focus-visible .ico-th-mermaid .bub, .hov.on .ico-th-mermaid .bub { animation: th-mermaid-bub 1.5s ease-in infinite; }
.hov:hover .ico-th-mermaid .b2, .hov:focus-visible .ico-th-mermaid .b2, .hov.on .ico-th-mermaid .b2 { animation-delay: -.5s; }
.hov:hover .ico-th-mermaid .b3, .hov:focus-visible .ico-th-mermaid .b3, .hov.on .ico-th-mermaid .b3 { animation-delay: -1s; }
@keyframes th-mermaid-fin { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes th-mermaid-hair { 0%,100% { transform: rotate(0); } 50% { transform: rotate(4deg); } }
@keyframes th-mermaid-bub { 0% { transform: translateY(6px) scale(.6); opacity: 0; } 25% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-6px) scale(1.05); opacity: 0; } }

/* Castle: flags wave, windows light up, star twinkles */
.ico-th-castle .flag { transform-origin: 0% 50%; }
.ico-th-castle .star { transform-origin: 50% 50%; }
.hov:hover .ico-th-castle .flag, .hov:focus-visible .ico-th-castle .flag, .hov.on .ico-th-castle .flag { animation: th-castle-flag .8s ease-in-out infinite; }
.hov:hover .ico-th-castle .f2, .hov:focus-visible .ico-th-castle .f2, .hov.on .ico-th-castle .f2 { animation-delay: -.27s; }
.hov:hover .ico-th-castle .f3, .hov:focus-visible .ico-th-castle .f3, .hov.on .ico-th-castle .f3 { animation-delay: -.53s; }
.hov:hover .ico-th-castle .win, .hov:focus-visible .ico-th-castle .win, .hov.on .ico-th-castle .win { animation: th-castle-win 1.6s ease-in-out infinite; }
.hov:hover .ico-th-castle .w2, .hov:focus-visible .ico-th-castle .w2, .hov.on .ico-th-castle .w2 { animation-delay: -.5s; }
.hov:hover .ico-th-castle .w3, .hov:focus-visible .ico-th-castle .w3, .hov.on .ico-th-castle .w3 { animation-delay: -1s; }
.hov:hover .ico-th-castle .star, .hov:focus-visible .ico-th-castle .star, .hov.on .ico-th-castle .star { animation: th-castle-star 1.6s ease-in-out infinite; }
@keyframes th-castle-flag { 0%,100% { transform: scaleX(1) skewY(0); } 50% { transform: scaleX(.82) skewY(7deg); } }
@keyframes th-castle-win { 0%,100% { fill: #333a70; } 40%,70% { fill: #f2c65a; } }
@keyframes th-castle-star { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.35) rotate(36deg); } }

@media (prefers-reduced-motion: reduce) {
  .ico-th-wizard *, .ico-th-dino *, .ico-th-pirate *, .ico-th-mermaid *, .ico-th-castle * { animation: none !important; }
}
