.moxun-live2d {
    --moxun-live2d-width: 320px;
    --moxun-live2d-height: 520px;
    position: fixed;
    left: 10px;
    bottom: 0;
    width: var(--moxun-live2d-width);
    height: var(--moxun-live2d-height);
    z-index: 36;
    pointer-events: none;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.moxun-live2d[data-ready="true"] {
    opacity: 1;
    transform: translateY(0);
}

.moxun-live2d__stage {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
    cursor: grab;
}

.moxun-live2d__stage:active {
    cursor: grabbing;
}

.moxun-live2d__bubble {
    position: absolute;
    left: calc(100% - 12px);
    top: 74px;
    max-width: min(240px, calc(100vw - var(--moxun-live2d-width) - 28px));
    padding: 12px 16px;
    border-radius: 18px 18px 18px 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #51607f;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 10px 10px 24px rgba(196, 201, 214, 0.85), -8px -8px 20px rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transform-origin: left bottom;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    white-space: normal;
}

.moxun-live2d__bubble::after {
    content: "";
    position: absolute;
    left: 24px;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.92);
    transform: rotate(45deg);
    box-shadow: 4px 4px 10px rgba(196, 201, 214, 0.35);
}

.moxun-live2d__bubble.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (max-width: 960px) {
    .moxun-live2d {
        left: 2px;
    }

    .moxun-live2d__bubble {
        left: calc(100% - 16px);
        top: 60px;
        max-width: min(210px, calc(100vw - var(--moxun-live2d-width) - 18px));
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 640px) {
    .moxun-live2d {
        left: -8px;
    }

    .moxun-live2d__bubble {
        left: calc(100% - 14px);
        top: 44px;
        max-width: min(180px, calc(100vw - var(--moxun-live2d-width) - 10px));
        font-size: 12px;
        line-height: 1.5;
    }
}
