/* 小邻 · 图片浮标（左右轻摇 + 说话时张嘴） */

.xp-root--booting {
    opacity: 0;
    pointer-events: none;
}

.xp-root--float.xp-root--ready {
    transition: opacity 0.18s ease;
}

.xp-root {
    position: relative;
    touch-action: none;
    user-select: none;
    cursor: grab;
    z-index: 9999;
    background: transparent;
    pointer-events: auto;
}

.xp-root--hero {
    width: 200px;
    height: 250px;
    margin: 0 auto 4px;
}

.xp-root--float {
    position: fixed;
    width: 68px;
    height: 84px;
    left: var(--xp-x, calc(100vw - 78px));
    top: var(--xp-y, 108px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18));
    transition: width 0.25s ease, height 0.25s ease;
    z-index: 520;
    pointer-events: none;
}

.xp-root--float .xp-stage {
    pointer-events: auto;
}

.xp-root--dragging {
    cursor: grabbing;
    opacity: 0.92;
    transition: none;
}

.xp-stage {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: visible;
    background: transparent;
}

.xp-char {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: 50% 78%;
    will-change: transform;
    animation: xp-idle-sway 2.6s ease-in-out infinite alternate;
}

body.xp-anim-paused .xp-char {
    animation: none !important;
    will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
    .xp-char {
        animation: none !important;
        will-change: auto;
    }
}

.xp-face-img--blend {
    mix-blend-mode: screen;
}

.xp-face-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    transition: opacity 0.2s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.xp-hint {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted, #8B7355);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.xp-root--float .xp-hint {
    display: none;
}

.xp-fallback-svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes xp-idle-sway {
    from { transform: rotate(-3deg); }
    to { transform: rotate(3deg); }
}

.main-area.chat-active .chat-log.has-compact-mascot {
    padding-right: 100px;
}

#xiaolinMascotHero {
    position: relative;
    z-index: 6;
    flex-shrink: 0;
    background: transparent;
}

@media (max-width: 440px) {
    .xp-root--hero {
        width: 150px;
        height: 185px;
    }
}
