/* Footer mascot "Sparky". Hard-scoped reset so legacy WP button/img rules can't leak in. */
.ap-footer .ap-mascot { --m-y: #ffd526; --m-ink: #171717; --m-paper: #fdfdfc;
  grid-column: 1 / -1; display: flex; align-items: center; gap: clamp(16px, 3vw, 32px);
  margin: 0 0 36px; padding: 18px 22px 18px 14px; border: 1px solid #d9d9d9; border-left: 5px solid var(--m-y);
  background: #f4f4f4; border-radius: 0; color: var(--m-ink); }
.ap-footer .ap-mascot button, .ap-footer .ap-mascot a { all: unset; box-sizing: border-box; cursor: pointer; font-family: inherit; }
.ap-footer .ap-mascot button,
.ap-footer .ap-mascot button:is(:hover, :focus, :active) {
  background: transparent !important; background-image: none !important; box-shadow: none !important;
  text-transform: none !important; letter-spacing: normal !important; text-shadow: none !important;
}
.ap-footer .ap-mascot .ap-mascot__char { border: 0 !important; padding: 0 !important; margin: 0 !important; }
.ap-footer .ap-mascot img { all: unset; display: block; }
.ap-footer .ap-mascot__stage { flex: 0 0 auto; width: 152px; height: 152px; display: grid; place-items: center; }
.ap-footer .ap-mascot .ap-mascot__char { position: relative; display: block; width: 148px; height: 148px; border-radius: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ap-footer .ap-mascot .ap-mascot__char:focus-visible { outline: 3px solid #c91420 !important; outline-offset: 4px; }
.ap-footer .ap-mascot__float { position: absolute; inset: 6px 0 14px; display: block; will-change: transform; }
.ap-footer .ap-mascot .ap-mascot__bolt { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.ap-footer .ap-mascot__shadow { position: absolute; left: 30%; right: 30%; bottom: 2px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.16); display: block; }
.ap-footer .ap-mascot__face { position: absolute; left: 30%; top: 38%; width: 32%; height: 19%; display: flex; gap: 6%; transform: rotate(-12deg); }
.ap-footer .ap-mascot__eye { position: relative; flex: 1; aspect-ratio: 1 / 1.12; background: var(--m-paper); border-radius: 50%; border: 2px solid var(--m-ink); overflow: visible; display: block;
  box-shadow: inset -2px -3px 0 rgba(23,23,23,.12); }
.ap-footer .ap-mascot__eye--r { transform: translateY(-14%) scale(1.06); }
.ap-footer .ap-mascot__pupil { position: absolute; left: 50%; top: 52%; width: 48%; height: 48%; margin: -24% 0 0 -24%; border-radius: 50%; background: var(--m-ink); display: block;
  transform: translate(var(--px, 8%), var(--py, 6%)); transition: transform .18s cubic-bezier(.2,.7,.2,1); }
.ap-footer .ap-mascot__glint { position: absolute; top: 16%; left: 20%; width: 32%; height: 32%; border-radius: 50%; background: var(--m-paper); display: block; }
.ap-footer .ap-mascot__lid { position: absolute; inset: -2px; border-radius: 50%; background: var(--m-y); border-bottom: 2px solid var(--m-ink); display: block; transform-origin: 50% 0; transform: scaleY(0); }
.ap-footer .ap-mascot__brow { position: absolute; left: 5%; right: 5%; top: -40%; height: 20%; min-height: 4px; background: var(--m-ink); border-radius: 80% 80% 40% 40%; display: block; transform: rotate(-8deg); transition: transform .25s; }
.ap-footer .ap-mascot__smile { position: absolute; display: block; left: 18%; top: 100%; width: 52%; height: auto; overflow: visible; }
.ap-footer .ap-mascot__eye--r .ap-mascot__brow { transform: rotate(10deg); }
.ap-footer .ap-mascot__copy { min-width: 0; display: grid; gap: 6px; }
.ap-footer .ap-mascot__name { color: #c91420; font-weight: 750; font-size: 15px; letter-spacing: .02em; }
.ap-footer .ap-mascot__name span { color: #626262; font-weight: 500; }
.ap-footer .ap-mascot__say { color: #303030; font-size: 17px; line-height: 1.4; max-width: 520px; min-height: 2.8em; }
.ap-footer .ap-mascot__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; align-items: center; }
.ap-footer .ap-mascot .ap-mascot__book { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 999px; background: var(--m-y); color: var(--m-ink) !important; font-weight: 700; font-size: 14px; }
.ap-footer .ap-mascot .ap-mascot__book:hover { background: #ffe066; }
.ap-footer .ap-mascot .ap-mascot__book:focus-visible { outline: 3px solid #c91420 !important; outline-offset: 3px; }

/* Motion (JS adds .is-live only when allowed and visible) */
.ap-footer .ap-mascot.is-live .ap-mascot__float { animation: ap-m-float 3.6s ease-in-out infinite; }
.ap-footer .ap-mascot.is-live .ap-mascot__shadow { animation: ap-m-shadow 3.6s ease-in-out infinite; }
.ap-footer .ap-mascot.is-blink .ap-mascot__lid { animation: ap-m-blink .22s ease-in-out; }
.ap-footer .ap-mascot.is-happy .ap-mascot__float { animation: ap-m-hop .6s cubic-bezier(.3,1.6,.5,1); }
.ap-footer .ap-mascot.is-happy .ap-mascot__brow { transform: translateY(-30%) rotate(-14deg); }
.ap-footer .ap-mascot.is-happy .ap-mascot__eye--r .ap-mascot__brow { transform: translateY(-30%) rotate(16deg); }
.ap-footer .ap-mascot__char:hover .ap-mascot__brow { transform: translateY(-20%) rotate(-10deg); }
@keyframes ap-m-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes ap-m-shadow { 0%,100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.8); opacity: .6; } }
@keyframes ap-m-blink { 0%,100% { transform: scaleY(0); } 50% { transform: scaleY(1); } }
@keyframes ap-m-hop { 0% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-14px) rotate(-8deg); } 70% { transform: translateY(0) rotate(4deg); } 100% { transform: none; } }

@media (max-width: 600px) {
  .ap-footer .ap-mascot { padding: 14px; gap: 12px; align-items: flex-start; }
  .ap-footer .ap-mascot__stage { width: 112px; height: 112px; }
  .ap-footer .ap-mascot .ap-mascot__char { width: 112px; height: 112px; }
  .ap-footer .ap-mascot__say { font-size: 15px; min-height: 4.2em; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-footer .ap-mascot *, .ap-footer .ap-mascot { animation: none !important; transition: none !important; }
  .ap-footer .ap-mascot__pupil { transform: translate(8%, 6%) !important; }
  .ap-footer .ap-mascot__brow { transform: none !important; }
}
