/* ============================================================
   PetDex 桌宠样式 —— 哆啦A梦像素机器猫
   挂载点：#petdeck / #petCanvas / #petdeck-bubble
   ============================================================ */

#petdeck {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2147483000;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    pointer-events: auto;
    will-change: left, top;
}
#petdeck.is-drag { cursor: grabbing; }
#petdeck canvas { display: block; pointer-events: none; }

/* 气泡：位于宠物头顶，可随宠物移动 */
#petdeck-bubble {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    max-width: 250px;
    padding: 9px 14px;
    background: #fff;
    color: #1C1917;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
    border: 1.5px solid #ebe6dd;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
}
#petdeck-bubble.show { opacity: 1; }
#petdeck-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1.5px solid #ebe6dd;
    border-bottom: 1.5px solid #ebe6dd;
    transform: translateX(-50%) rotate(45deg);
}

@media (max-width: 720px) {
    #petdeck-bubble {
        font-size: 12px;
        max-width: 210px;
        padding: 8px 12px;
    }
}