#pannda-avatar-companion {
    position: fixed;
    right: 10px;
    bottom: 0;
    width: 200px;
    height: 220px;
    z-index: 99990;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
}

#pannda-avatar-companion canvas {
    display: block;
    width: 200px;
    height: 220px;
    cursor: grab;
    /* The GLB contains transparent floor padding. Move the rendered Panda down
       inside its fixed mount so its feet meet the selected resting edge. */
    transform: translateY(65px);
}

#pannda-avatar-companion canvas:active {
    cursor: grabbing;
}

#pannda-avatar-companion .pannda-avatar-fallback {
    width: 200px;
    height: 220px;
    display: grid;
    place-items: end center;
    color: #111;
    font: 12px system-ui, sans-serif;
}

#pannda-avatar-companion .pannda-avatar-mirror-preview {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 92px;
    height: 68px;
    object-fit: cover;
    transform: scaleX(-1);
    border: 2px solid rgba(255,255,255,.75);
    border-radius: 10px;
    z-index: 2;
}

/* The theme's fixed mobile navigation is visible below the lg breakpoint.
   Standalone templates call wp_footer() without get_footer(), receive the
   viewport mode, and continue to rest at bottom: 0. */
@media (max-width: 1023px) {
    #pannda-avatar-companion {
        width: 200px;
        height: 220px;
        right: 10px;
        bottom: 0;
    }

    #pannda-avatar-companion.pannda-avatar-companion--theme-footer {
        bottom: 56px;
    }
}
