/* Approved Game Addict companion. Accent and UI colors inherit the store theme.
 * Neutral shell materials belong to the illustration; there is no companion palette selector.
 * The component stays in document flow and reserves its own speech/focus space.
 */
.ga-footer-companion {
    --gafc-accent: var(--brand-accent, var(--brand-bright, currentColor));
    --gafc-bright: var(--brand-bright, var(--brand-accent, currentColor));
    --gafc-ink: var(--store-text, var(--gz-ink, CanvasText));
    --gafc-surface: var(--store-surface, var(--gz-card, Canvas));
    --gafc-muted: color-mix(in srgb, var(--gafc-ink) 70%, var(--gafc-surface));
    --gafc-outline: #10151c;
    --gafc-shell-hi: #f1f6fa;
    --gafc-shell: #bdccd6;
    --gafc-shell-lo: #758a9c;
    --gafc-joint: #354554;
    --gafc-glass-hi: #253a46;
    --gafc-glass-lo: #101c24;
    --gafc-glass-glint: #9fb8c3;
    --gafc-shadow: rgb(0 0 0 / 18%);
    --gafc-look-x: 0px;
    --gafc-look-y: 0px;
    box-sizing: border-box;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: end;
    align-self: end;
    justify-self: end;
    inline-size: 130px;
    max-inline-size: 100%;
    margin-inline-start: auto;
    padding-block: 4px;
    isolation: isolate;
    color: inherit;
    font: inherit;
    text-align: center;
}
.ga-footer-companion *,
.ga-footer-companion *::before,
.ga-footer-companion *::after { box-sizing: border-box; }
.ga-footer-companion .gafc-button {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    position: relative;
    inline-size: 100%;
    min-inline-size: 44px;
    min-block-size: 44px;
    aspect-ratio: 260 / 290;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ga-footer-companion .gafc-button:disabled { cursor: default; }
.ga-footer-companion .gafc-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--gafc-accent) 65%, transparent);
}
.ga-footer-companion .gafc-art {
    display: block;
    inline-size: 100%;
    block-size: auto;
    overflow: visible;
    filter: drop-shadow(0 4px 2px rgb(0 0 0 / 13%));
    pointer-events: none;
    user-select: none;
}
.ga-footer-companion .gafc-speech {
    inline-size: 100%;
    min-block-size: 34px;
    padding: 6px 7px;
    border: 1px solid color-mix(in srgb, var(--gafc-accent) 40%, var(--gafc-surface));
    border-radius: 11px 11px 3px 11px;
    background: var(--gafc-surface);
    color: var(--gafc-ink);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.65;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    pointer-events: none;
}
.ga-footer-companion .gafc-speech i,
.ga-footer-companion .gafc-hint i {
    display: inline-block;
    inline-size: 4px;
    block-size: 4px;
    border-radius: 1px;
    margin-inline-start: 5px;
    vertical-align: middle;
    background: var(--gafc-bright);
}
.ga-footer-companion[data-speaking="true"] .gafc-speech { opacity: 1; visibility: visible; transform: none; }
.ga-footer-companion .gafc-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-block-size: 18px;
    color: inherit;
    font-size: 10px;
    line-height: 1.8;
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}
.ga-footer-companion .gafc-hint i { margin: 0; border-radius: 50%; background: var(--gafc-accent); }
.ga-footer-companion[data-ready="true"]:not([data-touched="true"]) .gafc-hint { opacity: 1; }
.ga-footer-companion .gafc-sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.ga-footer-companion .gafc-body-sway { transform-origin: 130px 260px; animation: gafcIdle 6.4s ease-in-out infinite; }
.ga-footer-companion .gafc-antenna { transform-origin: 130px 64px; animation: gafcAntenna 6.4s ease-in-out infinite; }
.ga-footer-companion .gafc-head { transform-origin: 130px 167px; }
.ga-footer-companion .gafc-eyes { transform-origin: 130px 119px; animation: gafcBlink 6.7s infinite; }
.ga-footer-companion .gafc-eye-track { transform: translate(var(--gafc-look-x), var(--gafc-look-y)); transition: transform .18s ease-out; }
.ga-footer-companion .gafc-arm-left { transform-origin: 90px 185px; }
.ga-footer-companion .gafc-arm-right { transform-origin: 171px 184px; }
.ga-footer-companion .gafc-leg-left { transform-origin: 112px 234px; }
.ga-footer-companion .gafc-leg-right { transform-origin: 150px 234px; }
.ga-footer-companion .gafc-face-happy,
.ga-footer-companion .gafc-face-game,
.ga-footer-companion .gafc-face-sleep,
.ga-footer-companion .gafc-controller,
.ga-footer-companion .gafc-battery,
.ga-footer-companion .gafc-sparks { opacity: 0; }
.ga-footer-companion .gafc-spark { transform-box: fill-box; transform-origin: center; }
.ga-footer-companion[data-motion="wave"] .gafc-arm-right { animation: gafcWave 1.45s ease-in-out both; }
.ga-footer-companion[data-motion="wave"] .gafc-head { animation: gafcHeadTilt 1.45s ease-in-out both; }
.ga-footer-companion:not([data-motion="idle"]) .gafc-face-normal { opacity: 0; }
.ga-footer-companion[data-motion="wave"] .gafc-face-happy,
.ga-footer-companion[data-motion="win"] .gafc-face-happy { opacity: 1; }
.ga-footer-companion[data-motion="game"] .gafc-controller,
.ga-footer-companion[data-motion="game"] .gafc-face-game { opacity: 1; }
.ga-footer-companion[data-motion="game"] .gafc-controller { animation: gafcController 1.9s ease-in-out both; }
.ga-footer-companion[data-motion="game"] .gafc-arm-left { animation: gafcGameL 1.9s ease-in-out both; }
.ga-footer-companion[data-motion="game"] .gafc-arm-right { animation: gafcGameR 1.9s ease-in-out both; }
.ga-footer-companion[data-motion="game"] .gafc-head { animation: gafcGameHead 1.9s ease-in-out both; }
.ga-footer-companion[data-motion="game"] .gafc-thumb-right { animation: gafcTap .18s .3s 7 alternate; }
.ga-footer-companion[data-motion="win"] .gafc-jump { animation: gafcWin 1.5s cubic-bezier(.4,0,.3,1) both; transform-origin: 130px 264px; }
.ga-footer-companion[data-motion="win"] .gafc-arm-left { animation: gafcWinL 1.5s ease-in-out both; }
.ga-footer-companion[data-motion="win"] .gafc-arm-right { animation: gafcWinR 1.5s ease-in-out both; }
.ga-footer-companion[data-motion="win"] .gafc-ground-shadow { animation: gafcShadow 1.5s ease-in-out both; transform-origin: 130px 268px; }
.ga-footer-companion[data-motion="win"] .gafc-sparks { animation: gafcSparkShow 1.5s both; }
.ga-footer-companion[data-motion="win"] .gafc-spark { animation: gafcSpark .9s .2s ease-out both; }
.ga-footer-companion[data-motion="win"] .gafc-spark-two { animation-delay: .34s; }
.ga-footer-companion[data-motion="win"] .gafc-spark-three { animation-delay: .43s; }
.ga-footer-companion[data-motion="charge"] .gafc-battery,
.ga-footer-companion[data-motion="charge"] .gafc-face-sleep { opacity: 1; }
.ga-footer-companion[data-motion="charge"] .gafc-chest-symbol { opacity: 0; }
.ga-footer-companion[data-motion="charge"] .gafc-battery-fill { transform-origin: 119px 211px; animation: gafcCharge 2s ease-in-out both; }
.ga-footer-companion[data-motion="charge"] .gafc-head { animation: gafcSleep 2s ease-in-out both; }
.ga-footer-companion:not([data-motion="idle"]) .gafc-body-sway { animation-play-state: paused; }
.ga-footer-companion[data-paused="true"] *,
.ga-footer-companion[data-paused="true"] .gafc-art * { animation-play-state: paused !important; }

@keyframes gafcIdle{0%,100%{transform:translateY(0) rotate(0)}45%{transform:translateY(-2px) rotate(-1deg)}75%{transform:translateY(-.5px) rotate(.7deg)}}
@keyframes gafcAntenna{0%,70%,100%{transform:rotate(0)}77%{transform:rotate(-9deg)}83%{transform:rotate(5deg)}90%{transform:rotate(-2deg)}}
@keyframes gafcBlink{0%,40%,43%,86%,89%,100%{transform:scaleY(1)}41.5%,87.5%{transform:scaleY(.08)}}
@keyframes gafcWave{0%,100%{transform:rotate(0)}18%{transform:rotate(-122deg)}30%{transform:rotate(-96deg)}42%{transform:rotate(-130deg)}54%{transform:rotate(-96deg)}66%{transform:rotate(-128deg)}80%{transform:rotate(-113deg)}}
@keyframes gafcHeadTilt{0%,100%{transform:rotate(0)}20%,75%{transform:rotate(7deg)}}
@keyframes gafcWin{0%,100%{transform:translateY(0) scale(1)}12%{transform:translateY(1px) scale(1.06,.9)}36%{transform:translateY(-36px) scale(.97,1.04)}55%{transform:translateY(-40px) rotate(-4deg)}78%{transform:translateY(0) scale(1.09,.88)}88%{transform:translateY(-3px) scale(.98,1.03)}}
@keyframes gafcWinL{0%,100%{transform:rotate(0)}20%,63%{transform:rotate(142deg)}}
@keyframes gafcWinR{0%,100%{transform:rotate(0)}20%,63%{transform:rotate(-142deg)}}
@keyframes gafcShadow{0%,100%{transform:scaleX(1);opacity:1}36%,55%{transform:scaleX(.55);opacity:.4}78%{transform:scaleX(1.13);opacity:1}}
@keyframes gafcSparkShow{0%,90%,100%{opacity:0}15%,80%{opacity:1}}
@keyframes gafcSpark{0%{transform:translateY(12px) scale(.4);opacity:0}24%{opacity:1}100%{transform:translateY(-22px) rotate(50deg) scale(1.1);opacity:0}}
@keyframes gafcController{0%,100%{transform:translateY(18px);opacity:0}15%,88%{transform:translateY(0);opacity:1}40%,65%{transform:translateY(-2px);opacity:1}}
@keyframes gafcGameL{0%,100%{transform:rotate(0)}15%,88%{transform:rotate(-35deg)}}
@keyframes gafcGameR{0%,100%{transform:rotate(0)}15%,88%{transform:rotate(35deg)}}
@keyframes gafcGameHead{0%,100%{transform:rotate(0)}30%,65%{transform:translateY(3px) rotate(-3deg)}45%,80%{transform:translateY(1px) rotate(3deg)}}
@keyframes gafcTap{from{transform:translateY(0)}to{transform:translateY(2px)}}
@keyframes gafcCharge{0%,12%{transform:scaleX(.12)}65%,100%{transform:scaleX(1)}}
@keyframes gafcSleep{0%,100%{transform:translateY(0) rotate(0)}15%,75%{transform:translateY(5px) rotate(4deg)}86%{transform:translateY(-2px) rotate(-2deg)}}

@media (prefers-reduced-motion: reduce) {
    .ga-footer-companion *,
    .ga-footer-companion .gafc-art * { animation: none !important; transition: none !important; }
    .ga-footer-companion .gafc-eye-track,
    .ga-footer-companion .gafc-controller { transform: none !important; }
}

/* Opt-in host layout: existing footer uses 2fr 1fr 1fr, with a 900px mobile breakpoint.
 * Add this modifier only to the grid that includes the companion as its last child.
 * Payment/legal/copyright rows remain outside this grid and retain their own flow.
 */
.gz-footer .gz-footer-grid.gz-footer-grid--with-companion {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 130px;
    column-gap: clamp(20px, 3vw, 40px);
}
.gz-footer-grid--with-companion > .ga-footer-companion {
    grid-column: 4;
    grid-row: 1;
}
@media (max-width: 900px) {
    .gz-footer .gz-footer-grid.gz-footer-grid--with-companion {
        grid-template-columns: minmax(0, 1fr) 130px;
        gap: 24px;
    }
    .gz-footer-grid--with-companion > .gz-footer-brand { grid-column: 1 / -1; }
    .gz-footer-grid--with-companion > div:not(.gz-footer-brand):not(.ga-footer-companion) { grid-column: 1; }
    .gz-footer-grid--with-companion > .ga-footer-companion {
        grid-column: 2;
        grid-row: 2 / span 2;
        align-self: end;
    }
}
@media (max-width: 520px) {
    .gz-footer .gz-footer-grid.gz-footer-grid--with-companion { gap: 20px; }
}
