/* =========================
   ■ ペット
   ========================= */
.pet-layer{
  position:absolute;
  z-index:5;
  left:50%;

  --flip: 1;
  --scale: 1;

  transform: translateX(-50%) scaleX(var(--flip)) scale(var(--scale));
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  pointer-events:auto;
}

/* サイズと足元 */
.pet-small{ width:35px; bottom:-3px; }
.pet-medium{ width:45px; bottom:-8px; }
.pet-large{ width:70px; bottom:-16px; }

/* 左右位置：transformは書かない */
.pet-left{ left:20%; }
.pet-right{ left:80%; }

/* 状態 */
.pet-flip{ --flip:-1; }
.pet-idle{ --scale:1.02; }
.pet-click{ --scale:1.2; }

@keyframes pet-walk-bob {
  0% { margin-bottom:0; }
  50% { margin-bottom:2px; }
  100% { margin-bottom:0; }
}

/* 設定画面プレビューは枠内 */
.pet-preview-box{
  position: relative;
  width: 110px;
  height: 120px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

/* サイド窓ではペットが外に出られる */
.side-widget .avatar-box{
  overflow: visible;
}

.pet-walking{
  animation: pet-walk-bob 0.6s infinite;
}

.pet-happy{
  filter: drop-shadow(0 4px 8px rgba(255,255,255,0.35));
}

.pet-tired{
  opacity:0.7;
}

.pet-stress{
  filter: grayscale(60%);
}