.xiaozhi-pet{position:relative;width:56px;height:56px;border-radius:18px;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;z-index:100;transition:box-shadow .3s ease,filter .3s ease;will-change:transform}.xiaozhi-pet img{width:56px;height:56px;border-radius:18px;object-fit:cover;pointer-events:none;-webkit-user-drag:none}.xiaozhi-pet.dragging{cursor:grabbing;z-index:100002;box-shadow:0 12px 32px #6366f159,0 4px 12px #00000026;filter:brightness(1.08)}@keyframes xiaozhi-enter{0%{opacity:0;transform:scale(.5) translateY(12px)}40%{opacity:1;transform:scale(1.12) translateY(-4px)}65%{transform:scale(.96) translateY(2px)}80%{transform:scale(1.04) translateY(-1px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes xiaozhi-wiggle{0%,to{transform:rotate(0)}20%{transform:rotate(-5deg)}40%{transform:rotate(4deg)}60%{transform:rotate(-3deg)}80%{transform:rotate(2deg)}}@keyframes xiaozhi-breathe{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.02)}}.xiaozhi-pet.entering{animation:xiaozhi-enter .6s cubic-bezier(.34,1.56,.64,1) forwards,xiaozhi-wiggle .5s ease-in-out .6s 2}.xiaozhi-pet.idle{animation:xiaozhi-breathe 3s ease-in-out infinite}.xiaozhi-pet.dragging{animation:none}@keyframes xiaozhi-tap{0%{transform:scale(1)}30%{transform:scale(.92)}55%{transform:scale(1.06)}to{transform:scale(1)}}.xiaozhi-pet.tapped{animation:xiaozhi-tap .4s ease-out}@keyframes xiaozhi-talk{0%,to{transform:scale(1)}25%{transform:scale(1.03) translateY(-1px)}50%{transform:scale(.98) translateY(1px)}75%{transform:scale(1.02) translateY(-1px)}}.xiaozhi-pet.talking{animation:xiaozhi-talk .8s ease-in-out infinite}.xiaozhi-blink-overlay{position:absolute;top:35%;left:50%;transform:translate(-50%);width:70%;height:8%;background:#ffffffd9;border-radius:50%;opacity:0;pointer-events:none;z-index:2}@keyframes xiaozhi-blink{0%,to{opacity:0;transform:translate(-50%) scaleY(1)}50%{opacity:.8;transform:translate(-50%) scaleY(.3)}}.xiaozhi-blink-overlay.blinking{animation:xiaozhi-blink .15s ease-in-out}.xiaozhi-bubble{position:absolute;max-width:280px;min-width:160px;padding:12px 16px;background:var(--h-card, #ffffff);color:var(--h-text, #1A1D26);border-radius:16px;font-size:13px;line-height:1.6;box-shadow:0 4px 16px #0000001a,0 1px 4px #0000000f;opacity:0;transform:translateY(8px) scale(.92);transition:opacity .3s ease,transform .3s cubic-bezier(.34,1.56,.64,1);pointer-events:none;z-index:99;white-space:normal;word-break:break-word}.xiaozhi-bubble.show{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}.xiaozhi-bubble:before{content:"";position:absolute;width:12px;height:12px;background:var(--h-card, #ffffff);border-radius:2px}.xiaozhi-bubble.position-top{bottom:calc(100% + 10px);left:50%;transform:translate(-50%) translateY(8px) scale(.92)}.xiaozhi-bubble.position-top.show{transform:translate(-50%) translateY(0) scale(1)}.xiaozhi-bubble.position-top:before{bottom:-5px;left:50%;transform:translate(-50%) rotate(45deg)}.xiaozhi-bubble.position-bottom{top:calc(100% + 10px);left:50%;transform:translate(-50%) translateY(-8px) scale(.92)}.xiaozhi-bubble.position-bottom.show{transform:translate(-50%) translateY(0) scale(1)}.xiaozhi-bubble.position-bottom:before{top:-5px;left:50%;transform:translate(-50%) rotate(45deg)}.xiaozhi-bubble.position-right{left:calc(100% + 10px);top:50%;transform:translateY(-50%) translate(-8px) scale(.92)}.xiaozhi-bubble.position-right.show{transform:translateY(-50%) translate(0) scale(1)}.xiaozhi-bubble.position-right:before{left:-5px;top:50%;transform:translateY(-50%) rotate(45deg)}.xiaozhi-bubble.position-left{right:calc(100% + 10px);top:50%;transform:translateY(-50%) translate(8px) scale(.92)}.xiaozhi-bubble.position-left.show{transform:translateY(-50%) translate(0) scale(1)}.xiaozhi-bubble.position-left:before{right:-5px;top:50%;transform:translateY(-50%) rotate(45deg)}.xiaozhi-bubble-close{position:absolute;top:6px;right:8px;width:18px;height:18px;border:none;background:transparent;color:var(--h-text-muted, #9CA3AF);font-size:14px;line-height:1;cursor:pointer;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center}.xiaozhi-bubble-close:hover{background:#0000000f;color:var(--h-text, #1A1D26)}.xiaozhi-bubble-chat{display:inline-block;margin-top:6px;color:var(--h-accent, #6366F1);font-size:12px;font-weight:600;cursor:pointer;text-decoration:none}.xiaozhi-bubble-chat:hover{text-decoration:underline}@media(max-width:768px){.xiaozhi-pet,.xiaozhi-pet img{width:48px;height:48px;border-radius:16px}.xiaozhi-bubble{max-width:220px;min-width:140px;font-size:12px;padding:10px 14px}}[data-theme=dark] .xiaozhi-bubble{background:var(--h-card, #1a1a2e);color:var(--h-text, #e5e7eb);box-shadow:0 4px 16px #0000004d,0 1px 4px #0003}[data-theme=dark] .xiaozhi-bubble:before{background:var(--h-card, #1a1a2e)}[data-theme=dark] .xiaozhi-bubble-close:hover{background:#ffffff1a}

/* fix0817buddy: Emotion visual states — filter-based, non-conflicting with animations */
.xiaozhi-pet.emotion-excited{filter:saturate(1.25) brightness(1.08)}
.xiaozhi-pet.emotion-curious{filter:hue-rotate(-8deg) saturate(1.15) brightness(1.03)}
.xiaozhi-pet.emotion-concerned{filter:hue-rotate(-20deg) brightness(0.92) saturate(0.85)}
.xiaozhi-pet.emotion-sleepy{filter:saturate(0.65) brightness(0.88)}
/* emotion-happy = default, no filter needed */
/* Don't override emotion when dragging (drag filter takes precedence) */
.xiaozhi-pet.dragging.emotion-excited,.xiaozhi-pet.dragging.emotion-curious,
.xiaozhi-pet.dragging.emotion-concerned,.xiaozhi-pet.dragging.emotion-sleepy{filter:brightness(1.08)}
