#scene-hub {
  background: url("../assets/images/bg_wonderland.webp") center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 四大游乐场水晶气泡岛入口 */
.hub-portals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portal-card {
  position: absolute;
  pointer-events: auto;
  width: clamp(118px, 18.5vw, 178px);
  aspect-ratio: 1 / 1.05;
  border-radius: 36px;
  border: 5px solid rgba(255, 255, 255, 0.95);
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 228, 242, 0.88) 100%);
  box-shadow: 0 10px 0 rgba(226, 95, 152, 0.32), 0 18px 34px rgba(215, 70, 135, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  animation: floatGentle 3.4s ease-in-out infinite;
}

.portal-card:hover {
  transform: translateY(-6px) scale(1.06);
}

.portal-card:active {
  transform: translateY(5px) scale(0.93);
  box-shadow: 0 3px 0 rgba(226, 95, 152, 0.32), 0 8px 18px rgba(215, 70, 135, 0.25);
}

.portal-card img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(225, 80, 145, 0.25));
  pointer-events: none;
}

.portal-label {
  margin-top: 2px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pink-600);
  font-weight: 900;
  font-size: clamp(0.78rem, 1.5vw, 0.98rem);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(230, 80, 145, 0.16);
}

/* 四角科学定位，给中央噗噗留足大舞台 */
.portal-flight {
  left: max(20px, 5vw);
  top: clamp(92px, 16vh, 140px);
  animation-delay: 0s;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #ffe0f0 100%);
}

.portal-gift {
  right: max(20px, 5vw);
  top: clamp(92px, 16vh, 140px);
  animation-delay: 0.6s;
  background: radial-gradient(circle at 50% 30%, #fffdf2 0%, #ffd8ec 100%);
  border-color: #fff6cc;
  box-shadow: 0 10px 0 rgba(235, 145, 45, 0.34), 0 0 28px rgba(255, 205, 75, 0.55);
}

.portal-cake {
  left: max(20px, 5vw);
  bottom: clamp(104px, 16vh, 145px);
  animation-delay: 1.1s;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #ffe6e0 100%);
}

.portal-bubble {
  right: max(20px, 5vw);
  bottom: clamp(104px, 16vh, 145px);
  animation-delay: 1.7s;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #ede0ff 100%);
}

/* 爸爸宝盒未读小红心徽章 */
.gift-heart-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff6596 0%, #ff2e6e 100%);
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(255, 46, 110, 0.45);
  animation: pulseBadge 1.2s ease-in-out infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1) rotate(-8deg); }
  50% { transform: scale(1.22) rotate(8deg); }
}

/* 中央噗噗互动大舞台 */
.hub-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.pufu-wrapper {
  position: relative;
  width: clamp(210px, 34vw, 320px);
  height: clamp(210px, 34vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pufu-shadow {
  position: absolute;
  bottom: 6%;
  width: 62%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(165, 95, 125, 0.36) 0%, rgba(165, 95, 125, 0) 72%);
  transition: transform 0.25s ease;
}

.pufu-main-img {
  position: relative;
  z-index: 2;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(235, 85, 148, 0.28));
  animation: pufuBreath 2.6s ease-in-out infinite;
  transform-origin: 50% 88%;
  transition: filter 0.25s ease;
  pointer-events: none;
}

.pufu-wrapper.squish .pufu-main-img {
  animation: jellySquish 0.52s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pufu-wrapper.jump .pufu-main-img {
  animation: pufuHappyJump 0.68s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pufuBreath {
  0%, 100% { transform: scale(1, 1) translateY(0); }
  50% { transform: scale(1.035, 0.97) translateY(3px); }
}

@keyframes pufuHappyJump {
  0% { transform: scale(1.15, 0.85) translateY(0); }
  40% { transform: scale(0.94, 1.08) translateY(-38px) rotate(5deg); }
  75% { transform: scale(1.08, 0.92) translateY(0) rotate(-3deg); }
  100% { transform: scale(1, 1) translateY(0); }
}

/* 噗噗身边的美味投喂小零食气泡 */
.hub-snack-btn {
  position: absolute;
  right: -28px;
  bottom: 18px;
  z-index: 5;
  width: clamp(62px, 10vw, 78px);
  height: clamp(62px, 10vw, 78px);
  border-radius: 50%;
  border: 4px solid #fff;
  background: radial-gradient(circle at 35% 30%, #fff7fa 0%, #ffc8e0 100%);
  box-shadow: var(--shadow-btn);
  font-size: clamp(1.85rem, 3.5vw, 2.3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: floatGentle 2.4s ease-in-out infinite;
  transition: transform 0.18s ease;
}

.hub-snack-btn:active {
  transform: scale(0.88);
}

/* 底部魔法一键换装圆盘栏 */
.wardrobe-dock {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 14px);
  padding: 8px 16px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 245, 251, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(220, 75, 138, 0.25);
}

.outfit-chip {
  width: clamp(50px, 8vw, 64px);
  height: clamp(50px, 8vw, 64px);
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #ffffff 0%, #ffe4f2 100%);
  box-shadow: 0 4px 0 rgba(220, 95, 150, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}

.outfit-chip.selected {
  border-color: var(--pink-500);
  background: linear-gradient(180deg, #fff0f7 0%, #ffb5d8 100%);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 0 rgba(230, 55, 130, 0.38), 0 8px 18px rgba(255, 80, 155, 0.35);
}

.outfit-chip.locked {
  opacity: 0.72;
  filter: grayscale(0.25);
}

.outfit-chip.locked .lock-gift-mini {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  display: flex;
  box-shadow: 0 2px 6px rgba(220, 60, 125, 0.25);
}

/* 竖屏窄手机布局自适应优化：四角紧凑不遮挡中央噗噗 */
@media (max-width: 680px) {
  .portal-card {
    width: clamp(98px, 25vw, 126px);
    border-radius: 28px;
    padding: 7px;
  }
  .portal-flight { left: 12px; top: 86px; }
  .portal-gift   { right: 12px; top: 86px; }
  .portal-cake   { left: 12px; bottom: 92px; }
  .portal-bubble { right: 12px; bottom: 92px; }
  .pufu-wrapper  { width: min(230px, 54vw); height: min(230px, 54vw); }
}
