/* ==========================================================================
   POKÉSPIRE 正式版 · 宝可梦中心「白瓷休整露台 + 像素大家庭立体展台 + 五段脉冲波」
   与顶部悬浮白瓷 HUD、HD-2D 白泥路线图、事件立体箱庭保持完全统一的纯白冷调白瓷画风
   所有规则严格限定在 .run-center.cg-center 作用域内，零污染其他界面
   ========================================================================== */

.run-center.cg-center {
  --cg-cream: #f8fbff;
  --cg-ink: #0f172a;
  --cg-ink-soft: #475569;
  --cg-line: rgba(148, 163, 184, 0.30);
  --cg-accent: #0284c7;
  --beam-core: rgba(255, 255, 255, 0.72);
  --beam-mid: rgba(224, 242, 254, 0.34);
  --beam-edge: rgba(224, 242, 254, 0);
  --beam-opacity: 0.88;

  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  display: block !important;
  isolation: isolate;
  color: var(--cg-ink);
  background: var(--cg-cream) !important;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.run-center.cg-center[data-mood="train"] {
  --beam-opacity: 0.98;
}

/* 正式版顶部 HUD 血量同步发光提示 */
.run-hud-hp.is-cg-infusing {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.72), 0 0 18px rgba(56, 189, 248, 0.55) !important;
  transform: scale(1.06);
  transition: transform 0.28s ease, box-shadow 0.35s ease;
}

/* =========================================================
   1. 纯白冷调白瓷天幕背景层
   ========================================================= */
.cg-center .cg-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cg-center .cg-sky-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 76% 62% at 18% 10%, rgba(224, 242, 254, 0.78) 0%, rgba(240, 249, 255, 0.45) 48%, transparent 76%),
    radial-gradient(ellipse 70% 62% at 84% 84%, rgba(238, 242, 255, 0.72) 0%, transparent 72%),
    linear-gradient(180deg, #f8fbff 0%, #edf4fc 54%, #e4eef9 100%);
}

.cg-center .cg-amber-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 86% 72% at 22% 16%, rgba(251, 191, 36, 0.18) 0%, rgba(245, 158, 11, 0.08) 48%, transparent 76%),
    linear-gradient(135deg, rgba(254, 243, 199, 0.24) 0%, rgba(224, 242, 254, 0.1) 58%, transparent 100%);
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.cg-center[data-mood="train"] .cg-amber-wash {
  opacity: 1;
}

.cg-center .cg-rose-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 54%, rgba(16, 185, 129, 0.14) 0%, rgba(56, 189, 248, 0.10) 48%, transparent 74%);
  opacity: 0;
  transition: opacity 0.55s ease;
}

.cg-center[data-mood="heal"] .cg-rose-wash,
.cg-center.is-healing .cg-rose-wash {
  opacity: 1;
}

.cg-center .cg-dome-arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 左上角 35° 斜射冷调天光光束 */
.cg-center .cg-sunbeams {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: var(--beam-opacity);
  transition: opacity 0.65s ease;
}

.cg-center .cg-beam {
  position: absolute;
  top: -26%;
  transform-origin: top center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--beam-core) 0%, var(--beam-mid) 56%, var(--beam-edge) 100%);
  filter: blur(20px);
  will-change: transform, opacity;
}

.cg-center .cg-beam::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.55) 0%, rgba(245, 158, 11, 0.24) 55%, rgba(245, 158, 11, 0) 100%);
  opacity: 0;
  transition: opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.cg-center[data-mood="train"] .cg-beam::after {
  opacity: 1;
}

.cg-center .cg-beam.beam-1 { left: -4%; width: 170px; height: 145vh; animation: cgBeamSway1 9.5s ease-in-out infinite; }
.cg-center .cg-beam.beam-2 { left: 9%;  width: 240px; height: 155vh; filter: blur(24px); animation: cgBeamSway2 11.8s ease-in-out infinite; }
.cg-center .cg-beam.beam-3 { left: 23%; width: 130px; height: 140vh; filter: blur(15px); animation: cgBeamSway3 8.6s ease-in-out infinite; }
.cg-center .cg-beam.beam-4 { left: 36%; width: 205px; height: 138vh; filter: blur(26px); animation: cgBeamSway4 12.6s ease-in-out infinite; }
.cg-center .cg-beam.beam-5 { left: 50%; width: 115px; height: 125vh; filter: blur(20px); animation: cgBeamSway5 10.4s ease-in-out infinite; }

@keyframes cgBeamSway1 {
  0%, 100% { transform: rotate(-35deg) translateX(0px) scaleX(1); opacity: 0.72; }
  50% { transform: rotate(-33.2deg) translateX(14px) scaleX(1.08); opacity: 0.92; }
}
@keyframes cgBeamSway2 {
  0%, 100% { transform: rotate(-35deg) translateX(0px) scaleX(1); opacity: 0.80; }
  50% { transform: rotate(-36.8deg) translateX(-16px) scaleX(1.06); opacity: 0.62; }
}
@keyframes cgBeamSway3 {
  0%, 100% { transform: rotate(-35deg) translateX(0px); opacity: 0.68; }
  50% { transform: rotate(-33.6deg) translateX(10px); opacity: 0.88; }
}
@keyframes cgBeamSway4 {
  0%, 100% { transform: rotate(-35deg) translateX(0px); opacity: 0.58; }
  50% { transform: rotate(-36.4deg) translateX(-12px); opacity: 0.78; }
}
@keyframes cgBeamSway5 {
  0%, 100% { transform: rotate(-35deg) translateX(0px); opacity: 0.44; }
  50% { transform: rotate(-33.8deg) translateX(8px); opacity: 0.64; }
}

.cg-center .cg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cg-center .cg-floor-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 32px),
    linear-gradient(180deg, rgba(248, 251, 255, 0) 0%, rgba(241, 247, 254, 0.72) 58%, rgba(226, 236, 248, 0.94) 100%);
}

/* =========================================================
   2. 全屏白瓷治愈水波纹
   ========================================================= */
.cg-center .cg-ripple-layer {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}

.cg-center .cg-water-ripple {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  border: 3px solid rgba(14, 165, 233, 0.74);
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.04) 48%,
    rgba(16, 185, 129, 0.22) 76%,
    rgba(125, 211, 252, 0.38) 92%,
    rgba(255, 255, 255, 0.80) 100%
  );
  box-shadow: 0 0 36px rgba(56, 189, 248, 0.42), inset 0 0 28px rgba(16, 185, 129, 0.34);
  animation: cgMintPinkRipple 1.55s cubic-bezier(0.14, 0.76, 0.24, 1) forwards;
}

.cg-center .cg-water-ripple.is-secondary {
  border-width: 2px;
  border-color: rgba(16, 185, 129, 0.68);
  background: radial-gradient(circle, transparent 60%, rgba(16, 185, 129, 0.18) 86%, rgba(186, 230, 253, 0.34) 100%);
  animation-duration: 1.78s;
}

.cg-center .cg-water-ripple.is-amber {
  border-color: rgba(245, 158, 11, 0.88);
  background: radial-gradient(circle, transparent 56%, rgba(251, 191, 36, 0.22) 84%, rgba(245, 158, 11, 0.36) 100%);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.44);
  animation-duration: 1.15s;
}

@keyframes cgMintPinkRipple {
  0% { transform: translate(-50%, -50%) scale(0.28); opacity: 0.95; }
  65% { opacity: 0.56; }
  100% { transform: translate(-50%, -50%) scale(19); opacity: 0; }
}

/* =========================================================
   3. 主壳层：顶标题 + 白瓷液态生命条 + 白泥露台 + 底部底座
   ========================================================= */
.cg-center .cg-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: calc(var(--run-hud-size, 96px) + 10px) 24px 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

.cg-center .cg-header {
  display: grid;
  grid-template-columns: 1fr minmax(250px, 340px);
  align-items: center;
  gap: 16px;
  z-index: 15;
}

.cg-center .cg-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cg-center .cg-header-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cg-center .cg-eyebrow {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.11);
  border: 1px solid rgba(14, 165, 233, 0.24);
}

.cg-center .cg-squad-pill {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.30);
  box-shadow: 0 4px 10px -6px rgba(15, 42, 78, 0.14);
}

.cg-center .cg-title {
  margin: 2px 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #0f172a !important;
  text-shadow: none;
}

.cg-center .cg-subtitle {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cg-ink-soft);
}

/* 顶部悬浮白瓷液态生命条 */
.cg-center .cg-room-hp {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 14px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.38);
  -webkit-backdrop-filter: blur(18px) saturate(1.38);
  border: 1px solid rgba(148, 163, 184, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 26px -10px rgba(15, 42, 78, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.45s ease, border-color 0.45s ease, transform 0.35s ease;
}

.cg-center .cg-room-hp.is-infusing {
  border-color: rgba(16, 185, 129, 0.78);
  box-shadow:
    0 0 0 3px rgba(16, 185, 129, 0.22),
    0 0 24px rgba(56, 189, 248, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.cg-center .cg-room-hp.is-full-flash {
  animation: cgHudHpCelebrate 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cgHudHpCelebrate {
  0% { transform: scale(1); }
  35% { transform: scale(1.035); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.25), 0 0 28px rgba(56, 189, 248, 0.45); }
  100% { transform: scale(1); }
}

.cg-center .cg-hud-hp-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}

.cg-center .cg-hud-hp-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #334155;
}

.cg-center .cg-hud-heart-icon {
  width: 13px;
  height: 13px;
  color: #f43f5e;
  filter: drop-shadow(0 0 4px rgba(244, 63, 94, 0.35));
}

.cg-center .cg-hud-hp-value {
  font-family: "Barlow Condensed", "Noto Sans SC", sans-serif;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0f172a;
}

.cg-center .cg-liquid-track {
  position: relative;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e2e8f0, #f1f5f9);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

.cg-center .cg-liquid-fill {
  position: relative;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 55%, #34d399 100%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.65), 0 0 12px rgba(245, 158, 11, 0.32);
  transition: width 1.15s cubic-bezier(0.22, 1, 0.36, 1), background 0.65s ease, box-shadow 0.5s ease;
  overflow: hidden;
}

.cg-center .cg-room-hp.is-low .cg-liquid-fill {
  background: linear-gradient(90deg, #f43f5e 0%, #fb7185 55%, #fda4af 100%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.65), 0 0 12px rgba(244, 63, 94, 0.38);
}

.cg-center .cg-room-hp.is-healthy .cg-liquid-fill,
.cg-center .cg-room-hp.is-infusing .cg-liquid-fill {
  background: linear-gradient(90deg, #10b981 0%, #34d399 52%, #38bdf8 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.78), 0 0 16px rgba(16, 185, 129, 0.45);
}

.cg-center .cg-liquid-wave {
  position: absolute;
  inset: -6px -40% -6px -40%;
  background: repeating-linear-gradient(
    -65deg,
    rgba(255, 255, 255, 0.24) 0px,
    rgba(255, 255, 255, 0.24) 10px,
    rgba(255, 255, 255, 0.02) 10px,
    rgba(255, 255, 255, 0.02) 22px
  );
  opacity: 0.42;
  animation: cgLiquidFlow 2.6s linear infinite;
}

.cg-center .cg-liquid-wave.wave-b {
  opacity: 0.28;
  animation-duration: 1.7s;
  animation-direction: reverse;
}

.cg-center .cg-room-hp.is-infusing .cg-liquid-wave {
  opacity: 0.8;
  animation-duration: 0.85s;
}

@keyframes cgLiquidFlow {
  from { transform: translateX(-22px); }
  to { transform: translateX(22px); }
}

.cg-center .cg-liquid-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.8) 50%, transparent 80%);
  transform: translateX(-120%);
  opacity: 0;
}

.cg-center .cg-room-hp.is-infusing .cg-liquid-shimmer {
  opacity: 1;
  animation: cgLiquidShimmer 0.72s ease-in-out infinite;
}

@keyframes cgLiquidShimmer {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(130%); }
}

.cg-center .cg-liquid-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cg-center .cg-room-hp.is-infusing .cg-liquid-bubbles {
  opacity: 1;
}

.cg-center .cg-liquid-bubbles span {
  position: absolute;
  bottom: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 6px #ffffff;
  animation: cgLiquidBubble 0.88s ease-in infinite;
}
.cg-center .cg-liquid-bubbles span:nth-child(1) { left: 16%; animation-delay: 0.0s; }
.cg-center .cg-liquid-bubbles span:nth-child(2) { left: 36%; animation-delay: 0.2s; width: 4px; height: 4px; }
.cg-center .cg-liquid-bubbles span:nth-child(3) { left: 58%; animation-delay: 0.35s; }
.cg-center .cg-liquid-bubbles span:nth-child(4) { left: 76%; animation-delay: 0.12s; width: 4px; height: 4px; }
.cg-center .cg-liquid-bubbles span:nth-child(5) { left: 90%; animation-delay: 0.28s; }

@keyframes cgLiquidBubble {
  0% { transform: translateY(4px) scale(0.6); opacity: 0; }
  35% { opacity: 0.95; }
  100% { transform: translateY(-16px) scale(1.1); opacity: 0; }
}

.cg-center .cg-liquid-tip {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 70% 50%, #ffffff, rgba(255, 255, 255, 0));
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.cg-center .cg-room-hp.is-infusing .cg-liquid-tip {
  opacity: 1;
  box-shadow: 0 0 12px #ffffff;
}

/* =========================================================
   4. 中央白泥雕塑阶梯治愈露台（匹配 HD-2D 白泥板风格）
   ========================================================= */
.cg-center .cg-terrace-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.cg-center .cg-terrace-floor {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: min(1140px, 96%);
  height: 230px;
  pointer-events: none;
}

.cg-center .cg-terrace-aura {
  position: absolute;
  inset: -16px 24px -10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(186, 230, 253, 0.42), rgba(255, 255, 255, 0) 70%);
  filter: blur(22px);
  transition: background 0.5s ease, transform 0.5s ease;
}

.cg-center[data-mood="heal"] .cg-terrace-aura,
.cg-center.is-healing .cg-terrace-aura {
  background: radial-gradient(ellipse at 50% 58%, rgba(16, 185, 129, 0.28), rgba(56, 189, 248, 0.22) 50%, rgba(255, 255, 255, 0) 74%);
  transform: scale(1.04);
}

.cg-center[data-mood="train"] .cg-terrace-aura {
  background: radial-gradient(ellipse at 50% 58%, rgba(251, 191, 36, 0.34), rgba(56, 189, 248, 0.14) 52%, rgba(255, 255, 255, 0) 74%);
}

.cg-center .cg-terrace-step {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.45s ease, box-shadow 0.45s ease;
}

.cg-center .cg-terrace-step.step-back {
  bottom: 86px;
  width: 88%;
  height: 118px;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #ffffff 0%, #f1f6fc 100%);
  box-shadow: 0 14px 28px rgba(15, 42, 78, 0.09), 0 4px 0 #dce5f1, inset 0 2px 0 rgba(255, 255, 255, 0.96);
}

.cg-center .cg-terrace-step.step-mid {
  bottom: 44px;
  width: 94%;
  height: 136px;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  box-shadow: 0 16px 32px rgba(15, 42, 78, 0.11), 0 5px 0 #d8e2ef, inset 0 2px 0 rgba(255, 255, 255, 0.98);
}

.cg-center .cg-terrace-step.step-front {
  bottom: 4px;
  width: 100%;
  height: 148px;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.09) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #ffffff 0%, #f3f7fd 58%, #e6eff9 100%);
  box-shadow:
    0 22px 44px -12px rgba(15, 42, 78, 0.18),
    0 6px 0 #d3dfee,
    inset 0 2px 0 #ffffff;
}

.cg-center[data-mood="heal"] .cg-terrace-step.step-front {
  border-color: rgba(125, 211, 252, 0.96);
  box-shadow:
    0 22px 44px -10px rgba(14, 165, 233, 0.22),
    0 6px 0 #bae6fd,
    inset 0 2px 0 #ffffff;
}

.cg-center.is-healing .cg-terrace-step.step-front {
  border-color: rgba(52, 211, 153, 0.96);
  box-shadow:
    0 22px 48px -10px rgba(16, 185, 129, 0.24),
    0 6px 0 #a7f3d0,
    inset 0 2px 0 #ffffff;
}

.cg-center .cg-terrace-center-emblem {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: 240px;
  height: 78px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px dashed rgba(14, 165, 233, 0.28);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.56), transparent 72%);
}

.cg-center .cg-terrace-pulse-ring {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 98%;
  height: 148px;
  border-radius: 50%;
  border: 2.5px solid rgba(56, 189, 248, 0);
}

.cg-center .cg-terrace-pulse-ring.is-pulsing {
  animation: cgTerraceRingPulse 0.48s cubic-bezier(0.18, 0.82, 0.32, 1);
}

@keyframes cgTerraceRingPulse {
  0% {
    transform: translateX(-50%) scale(0.96);
    border-color: rgba(14, 165, 233, 0.85);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.55);
  }
  100% {
    transform: translateX(-50%) scale(1.08);
    border-color: rgba(14, 165, 233, 0);
    box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  }
}

.cg-center .cg-terrace-beats {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(148, 163, 184, 0.30);
  box-shadow: 0 6px 16px -6px rgba(15, 42, 78, 0.16);
  pointer-events: none;
}

.cg-center .cg-terrace-beats i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  transition: all 0.2s ease;
}

.cg-center .cg-terrace-beats i.is-lit {
  width: 16px;
  background: linear-gradient(90deg, #0ea5e9, #10b981);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.72);
}

/* =========================================================
   5. 像素大家庭站位层（去重代表 + 数量徽章）
   ========================================================= */
.cg-center .cg-family-stage {
  position: relative;
  width: min(1120px, 96%);
  height: 100%;
  z-index: 12;
}

.cg-center .cg-mon {
  position: absolute;
  left: var(--mon-x, 50%);
  bottom: var(--mon-y, 38px);
  width: var(--mon-size, 112px);
  height: var(--mon-size, 112px);
  transform: translateX(-50%);
  z-index: var(--mon-z, 10);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  outline: none;
  transition:
    left 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    bottom 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.cg-center .cg-mon-shadow {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 72%;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.26) 0%, rgba(15, 23, 42, 0.09) 55%, transparent 76%);
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cg-center .cg-mon-ring {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 84%;
  height: 24px;
  transform: translateX(-50%) scale(0.88);
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.28);
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.35), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
  transition: all 0.3s ease;
}

.cg-center[data-mood="heal"] .cg-mon-ring {
  opacity: 1;
  border-color: rgba(16, 185, 129, 0.85);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.42), inset 0 0 10px rgba(186, 230, 253, 0.55);
  animation: cgMonRoseBreath 1.45s ease-in-out infinite;
  animation-delay: var(--mon-delay, 0s);
}

@keyframes cgMonRoseBreath {
  0%, 100% { transform: translateX(-50%) scale(0.92); }
  50% { transform: translateX(-50%) scale(1.06); }
}

.cg-center[data-mood="heal"] .cg-mon-body {
  animation: cgMonHealExpect 0.95s ease-in-out infinite;
  animation-delay: var(--mon-delay, 0s);
}

@keyframes cgMonHealExpect {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-2px) rotate(-1.6deg); }
  75% { transform: translateY(-2px) rotate(1.6deg); }
}

.cg-center .cg-mon:hover {
  z-index: calc(var(--mon-z, 10) + 25);
}

.cg-center .cg-mon:hover .cg-mon-ring {
  opacity: 1;
  border-color: rgba(14, 165, 233, 0.92);
  box-shadow: 0 0 18px rgba(14, 165, 233, 0.45);
  transform: translateX(-50%) scale(1.05);
}

.cg-center .cg-mon:hover .cg-mon-art {
  transform: translateY(-6px) scale(1.06);
  filter: drop-shadow(0 12px 16px rgba(15, 42, 78, 0.24)) brightness(1.04);
}

.cg-center .cg-mon.is-selected {
  z-index: calc(var(--mon-z, 10) + 12);
}

.cg-center .cg-mon.is-selected .cg-mon-ring {
  opacity: 1;
  border-width: 2.5px;
  border-color: #f59e0b;
  background: radial-gradient(ellipse at center, rgba(254, 243, 199, 0.52), rgba(245, 158, 11, 0.14) 68%, transparent 100%);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.62), inset 0 0 12px rgba(254, 243, 199, 0.72);
  transform: translateX(-50%) scale(1.08);
}

.cg-center .cg-mon.is-selected .cg-mon-art {
  filter: drop-shadow(0 10px 18px rgba(245, 158, 11, 0.34)) brightness(1.05);
}

.cg-center .cg-mon-cursor {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.cg-center .cg-mon-cursor::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #f59e0b;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.65));
}

.cg-center .cg-mon.is-selected .cg-mon-cursor {
  opacity: 1;
  animation: cgCursorBob 1.1s ease-in-out infinite;
}

@keyframes cgCursorBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

.cg-center .cg-mon-count {
  position: absolute;
  right: 4px;
  bottom: -4px;
  z-index: 20;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(14, 165, 233, 0.38);
  color: #0369a1;
  font-family: "Barlow Condensed", "Noto Sans SC", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.16);
  pointer-events: none;
}

.cg-center .cg-mon-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 6px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid #e2e8f0;
  box-shadow:
    0 12px 26px -10px rgba(15, 42, 78, 0.22),
    0 3px 8px -3px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.2s ease;
  z-index: 40;
}

.cg-center .cg-mon:hover .cg-mon-tooltip,
.cg-center .cg-mon:focus-visible .cg-mon-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cg-center .cg-mon-tip-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
}

.cg-center .cg-mon-tip-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.cg-center .cg-mon-tip-h {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.cg-center .cg-mon-tip-exp {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.cg-center .cg-mon-tip-exp i {
  width: 11px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
}

.cg-center .cg-mon-tip-exp i.is-filled {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.55);
}

.cg-center .cg-mon-tip-exp span {
  margin-left: 3px;
  font-size: 10px;
  font-weight: 800;
  color: #b45309;
}

.cg-center .cg-mon-body {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: bottom center;
  animation: cgMonIdleBreath var(--mon-idle-dur, 3.6s) ease-in-out infinite;
  animation-delay: var(--mon-delay, 0s);
}

@keyframes cgMonIdleBreath {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-3px) scaleY(1.014); }
}

.cg-center .cg-mon-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    drop-shadow(0 8px 12px rgba(15, 23, 42, var(--mon-shadow-alpha, 0.22)))
    brightness(var(--mon-depth-bright, 1));
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.cg-center .cg-mon-art.is-pixel,
.cg-center .cg-selected-thumb.is-pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.cg-center .cg-mon-pillar {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 78%;
  height: 145%;
  transform: translateX(-50%) scaleY(0.2);
  transform-origin: bottom center;
  border-radius: 50% 50% 42% 42% / 22% 22% 12% 12%;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.cg-center .cg-mon.is-beat-lit .cg-mon-pillar {
  background: linear-gradient(180deg, rgba(186, 230, 253, 0) 0%, rgba(56, 189, 248, 0.34) 52%, rgba(16, 185, 129, 0.62) 100%);
  animation: cgPillarRise 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cg-center .cg-mon.is-beat-lit .cg-mon-ring {
  opacity: 1;
  border-color: #38bdf8;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.85), inset 0 0 14px rgba(224, 242, 254, 0.85);
}

.cg-center .cg-mon.is-beat-lit .cg-mon-art {
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.82)) brightness(1.14);
}

.cg-center .cg-mon.is-training-burst .cg-mon-pillar {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0) 0%, rgba(251, 191, 36, 0.48) 48%, rgba(245, 158, 11, 0.78) 100%);
  animation: cgPillarRise 0.92s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cg-center .cg-mon.is-training-burst .cg-mon-body {
  animation: cgMonHappyHop 0.82s cubic-bezier(0.28, 0.84, 0.42, 1);
}

.cg-center .cg-mon.is-training-burst .cg-mon-art {
  filter: drop-shadow(0 0 22px rgba(245, 158, 11, 0.92)) brightness(1.16);
}

@keyframes cgPillarRise {
  0% { opacity: 0; transform: translateX(-50%) scaleY(0.18) scaleX(0.75); }
  28% { opacity: 1; transform: translateX(-50%) scaleY(1.05) scaleX(1.02); }
  100% { opacity: 0; transform: translateX(-50%) scaleY(1.18) scaleX(1.12); }
}

.cg-center .cg-mon.is-finale-hop .cg-mon-body {
  animation: cgMonHappyHop 0.84s cubic-bezier(0.28, 0.84, 0.42, 1);
}

.cg-center .cg-mon.is-finale-hop .cg-mon-shadow {
  animation: cgMonShadowHop 0.84s cubic-bezier(0.28, 0.84, 0.42, 1);
}

@keyframes cgMonHappyHop {
  0% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(4px) scale(1.08, 0.9); }
  45% { transform: translateY(-28px) scale(0.95, 1.07); }
  72% { transform: translateY(2px) scale(1.06, 0.93); }
  86% { transform: translateY(-7px) scale(0.99, 1.02); }
  100% { transform: translateY(0) scale(1, 1); }
}

@keyframes cgMonShadowHop {
  0% { transform: translateX(-50%) scale(1); opacity: 0.9; }
  45% { transform: translateX(-50%) scale(0.65); opacity: 0.42; }
  100% { transform: translateX(-50%) scale(1); opacity: 0.9; }
}

.cg-center .cg-pixel-heart {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 28px;
  height: 25px;
  z-index: 30;
  pointer-events: none;
  transform: translate(-50%, 0) scale(0.2);
  filter: drop-shadow(0 3px 7px rgba(244, 63, 94, 0.42));
  animation: cgPixelHeartPop 1.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cgPixelHeartPop {
  0% { transform: translate(-50%, 10px) scale(0.2) rotate(-8deg); opacity: 0; }
  22% { transform: translate(-50%, -14px) scale(1.15) rotate(5deg); opacity: 1; }
  45% { transform: translate(-50%, -22px) scale(0.98) rotate(-4deg); opacity: 1; }
  100% { transform: translate(-50%, -52px) scale(0.84) rotate(2deg); opacity: 0; }
}

.cg-center .cg-exp-float {
  position: absolute;
  left: 50%;
  top: -12px;
  z-index: 35;
  pointer-events: none;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-family: "Barlow Condensed", "Noto Sans SC", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
  animation: cgExpFloatUp 1.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cgExpFloatUp {
  0% { transform: translate(-50%, 8px) scale(0.6); opacity: 0; }
  22% { transform: translate(-50%, -14px) scale(1.08); opacity: 1; }
  75% { transform: translate(-50%, -32px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -48px) scale(0.92); opacity: 0; }
}

/* =========================================================
   6. 底部悬浮白瓷操作底座
   ========================================================= */
.cg-center .cg-dock {
  position: relative;
  z-index: 30;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(420px, 1.38fr);
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px) saturate(1.38);
  -webkit-backdrop-filter: blur(18px) saturate(1.38);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 18px 40px -16px rgba(15, 42, 78, 0.18),
    0 4px 12px -4px rgba(15, 23, 42, 0.05);
}

.cg-center .cg-selected-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 11px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.cg-center .cg-selected-thumb-wrap {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0f2fe 100%);
  border: 1px solid rgba(14, 165, 233, 0.28);
}

.cg-center .cg-selected-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.cg-center .cg-selected-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.cg-center .cg-selected-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cg-center .cg-selected-title-row strong {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

.cg-center .cg-selected-height {
  font-family: "Barlow Condensed", "Noto Sans SC", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
}

.cg-center .cg-selected-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.cg-center .cg-selected-badge.is-muted {
  color: #64748b;
  background: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.28);
}

.cg-center .cg-selected-exp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cg-center .cg-exp-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.cg-center .cg-exp-pips {
  display: inline-flex;
  gap: 4px;
}

.cg-center .cg-exp-pips i {
  display: block;
  width: 14px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
}

.cg-center .cg-exp-pips i.is-filled {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.cg-center .cg-exp-text {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
}

.cg-center .cg-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cg-center .cg-action-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 10px 24px -14px rgba(15, 42, 78, 0.16),
    0 2px 6px -2px rgba(15, 23, 42, 0.05);
  text-align: left;
  color: var(--cg-ink);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease, background 0.2s ease;
}

.cg-center .cg-action-card:hover:not(:disabled) {
  transform: translateY(-3px);
}

.cg-center .cg-action-card:active:not(:disabled) {
  transform: translateY(-1px) scale(0.985);
}

.cg-center .cg-action-card:disabled {
  background: #f1f5f9;
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
}

.cg-center .cg-action-card.is-heal:hover:not(:disabled) {
  background: #f0fdf9;
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 16px 30px -14px rgba(16, 185, 129, 0.28), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}

.cg-center .cg-action-card.is-train:hover:not(:disabled) {
  background: #f0f9ff;
  border-color: #38bdf8;
  box-shadow: 0 16px 30px -14px rgba(14, 165, 233, 0.28), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}

.cg-center .cg-action-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.cg-center .cg-action-card.is-heal .cg-action-glow {
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.16), transparent 68%);
}

.cg-center .cg-action-card.is-train .cg-action-glow {
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.18), transparent 68%);
}

.cg-center .cg-action-card:hover .cg-action-glow {
  opacity: 1;
}

.cg-center .cg-action-icon {
  position: relative;
  z-index: 2;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.cg-center .cg-action-icon img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
}

.cg-center .cg-action-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cg-center .cg-action-copy strong {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

.cg-center .cg-action-copy small {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.36;
  color: #475569;
}

.cg-center .cg-action-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.cg-center .cg-action-card.is-heal .cg-action-tag {
  color: #059669;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.24);
}

.cg-center .cg-action-card.is-train .cg-action-tag {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.24);
}

@media (max-width: 960px) {
  .cg-center .cg-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cg-center .cg-dock {
    grid-template-columns: 1fr;
  }
}
