/* 首页彩蛋：小鱼光标 + 转头小猫 + 右侧话语气泡（猫固定居中，气泡绝对定位） */
body.pet-active, body.pet-active * { cursor: none !important; }

#wt-fish {
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 24px;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
}
#wt-fish .body { width: 100%; height: 100%; animation: wt-fish-wig .55s ease-in-out infinite; transform-origin: 70% 50%; }
#wt-fish svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(74, 59, 47, .25)); }
@keyframes wt-fish-wig { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* 猫：固定尺寸、居中，位置恒定；气泡是其绝对定位的兄弟元素，宽度变化不影响猫 */
#wt-pet {
  display: none;
  position: relative;
  margin: 10px auto 8px;
  pointer-events: none;
  animation: wt-pet-bob 3.4s ease-in-out infinite;
}
.pet-box {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 10px 16px rgba(74, 59, 47, .16));
}
.pet-body {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  transform-origin: 50% 92%;
  will-change: transform;
}
.pet-happy { animation: pet-happy .55s ease; }
@keyframes pet-happy {
  0% { transform: scale(1); }
  35% { transform: scale(1.14) translateY(-4px); }
  70% { transform: scale(.95); }
  100% { transform: scale(1); }
}
@keyframes wt-pet-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 卡通气泡：在猫右侧，奶油底/蜡笔描边/描边投影，尾巴朝左 */
.pet-say {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  max-width: min(200px, calc(50vw - 88px));
  padding: 9px 13px;
  background: #fffdf8;
  border: 2px solid #e3d7bf;
  border-radius: 16px;
  color: #4a3b2f;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 2px 3px 0 #e6dac3;
  pointer-events: none;
  opacity: 1;
  transition: opacity .16s ease;
}
.pet-say.hide { opacity: 0; }
.pet-say::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 50%;
  margin-top: -8px;
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #e3d7bf;
}
.pet-say::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  margin-top: -7px;
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid #fffdf8;
}

.pet-heart {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  color: #ff6b8a;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  animation: pet-heart 1s ease-out forwards;
}
@keyframes pet-heart {
  0% { opacity: 0; transform: translateY(0) translateX(0) scale(.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-48px) translateX(var(--dx)) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) { #wt-pet, #wt-fish .body { animation: none; } .pet-heart { display: none; } }
