/* 橘子岛宠物中心：孵蛋屋 / 宠物卡 / 详情浮层 / 图鉴进化链 / 战斗（复用 shop-* 与 cf-* 框架）。
   另含全屏游戏壳（body.page-game：标题画面 + 世界地图 + 底部 HUD Dock + 面板）
   与游戏大厅页（body.page-games）。
   立绘缺图时回退 .pet-avatar--ph 像素占位卡，图落到 /static/pets/ 即自动生效。 */

/* ---------- 立绘与像素占位卡 ---------- */
.pet-avatar { display: block; object-fit: contain; }
.pet-avatar--ph {
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .28),
              inset 0 -14px 22px rgba(29, 58, 47, .14);
  text-shadow: 0 3px 6px rgba(29, 58, 47, .25);
}

/* ---------- 顶栏金币 ---------- */
.pet-coins {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 800; font-family: var(--serif);
  color: var(--accent-deep, var(--accent));
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff);
}

/* ---------- 我的宠物卡片 ---------- */
.pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.pet-card {
  position: relative;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid color-mix(in srgb, var(--accent) 55%, var(--rule));
  border-radius: 14px;
  transition: transform .16s, box-shadow .16s;
}
.pet-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(29, 58, 47, .12);
}
.pet-card-top { display: flex; align-items: center; gap: 12px; position: relative; }
.pet-card-ava {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  flex: 0 0 auto; border-radius: 14px;
  transition: transform .16s;
}
.pet-card-ava:hover { transform: scale(1.06) rotate(-2deg); }
.pet-card-img { width: 72px; height: 72px; image-rendering: pixelated; }
.pet-avatar--ph.pet-card-img { font-size: 32px; }
.pet-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.pet-name { font-family: var(--serif); font-size: 17px; }
.pet-stage { color: #ffb020; margin-left: 2px; font-size: 12px; letter-spacing: 1px; }
.pet-lv { font-size: 12.5px; font-weight: 800; color: var(--accent-deep, var(--accent)); }
.pet-chip {
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: #3a3a3a; white-space: nowrap;
}
.pet-chip--rare { background: #eef1f5; color: #7c8794; }
.pet-chip--rare[data-rarity="R"] { background: #e3efff; color: #2f7cd6; }
.pet-chip--rare[data-rarity="SR"] { background: #f1e6ff; color: #8a3fd6; }
.pet-chip--rare[data-rarity="SSR"] { background: #fff3d6; color: #b97b0a; }
.pet-showing {
  position: absolute; top: -8px; right: -6px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--accent, #db580f);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 40%, transparent);
}
/* 四维属性迷你行（M4：属性可视化） */
.pet-ministats {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  padding: 7px 12px; border-radius: 10px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft, #5a5a5a);
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border: 1px solid var(--rule);
}
.pet-exp {
  position: relative; height: 20px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border: 1px solid var(--rule);
}
.pet-exp i {
  position: absolute; inset: 0 auto 0 0; border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, #fff),
              var(--accent, #db580f));
  transition: width .4s;
}
.pet-exp span {
  position: relative; display: block; text-align: center; line-height: 19px;
  font-size: 11.5px; font-weight: 700; color: #5c4a3a;
}
.pet-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.pet-evolve { color: var(--accent-deep, var(--accent)); }
.pet-evolve--super { color: #b97b0a; font-weight: 700; }
.pet-skillcount { color: var(--ink-soft, #5a5a5a); font-weight: 700; }
.pet-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pet-acts small { opacity: .75; font-size: 11px; }
.pet-link {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 0 2px;
  color: var(--accent-deep, var(--accent)); font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- 孵蛋屋 ---------- */
.pet-eggs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.pet-egg {
  padding: 18px 16px; display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.pet-egg-img { font-size: 46px; line-height: 1.2; }
.pet-egg-img--ready { animation: pet-egg-rock 1s ease-in-out infinite; }
@keyframes pet-egg-rock {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-9deg); }
  75% { transform: rotate(9deg); }
}
.pet-egg-desc { font-size: 12.5px; color: var(--muted); margin: 0; min-height: 3em; }
.pet-egg-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pet-tip {
  margin-top: 14px; font-size: 12.5px; color: var(--muted);
  border-left: 3px solid color-mix(in srgb, var(--accent) 40%, #fff);
  padding-left: 10px;
}

/* ---------- 图鉴（按进化链分组） ---------- */
.pet-dex-cap { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pet-dex-cap b { font-family: var(--serif); font-size: 15px; white-space: nowrap; }
.pet-dex-bar { flex: 1; max-width: 420px; }
.pet-dex-chains { display: flex; flex-direction: column; gap: 14px; }
.pet-dex-chain {
  padding: 12px 14px 14px; border-radius: 16px;
  border: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 70% 55% at 100% 0%, color-mix(in srgb, var(--element-tint, #ccc) 12%, transparent) 0 70%, transparent 71%),
    var(--paper-3);
}
.pet-dex-chain-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pet-dex-chain-head b { font-family: var(--serif); font-size: 15px; }
.pet-dex-chain-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.pet-dex-chain-row .pet-dex-card { background: var(--paper); }
.pet-dex-card {
  position: relative;
  padding: 16px 10px 12px; display: flex; flex-direction: column; align-items: center;
  gap: 5px; text-align: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.pet-dex-stage {
  position: absolute; top: 5px; right: 8px;
  font-size: 10px; letter-spacing: 1px; color: #ffb020;
}
.pet-dex-img { width: 64px; height: 64px; image-rendering: pixelated; }
.pet-avatar--ph.pet-dex-img { font-size: 28px; }
.pet-dex-card b { font-size: 13.5px; }
.pet-dex-count { font-size: 11.5px; color: var(--muted); }
.pet-dex-card--todo { opacity: .68; }
.pet-dex-card--todo .pet-dex-img,
.pet-dex-card--todo .pet-avatar--ph { filter: grayscale(1) brightness(1.06); }
.pet-dex-card--todo b { color: var(--muted); }

/* ---------- 开蛋弹窗（复用 cf-overlay/cf-card） ---------- */
.pet-hatch-card { text-align: center; min-width: 260px; }
.pet-hatch-cheer {
  font-family: var(--serif); font-size: 20px; font-weight: 800;
  color: var(--accent-deep, var(--accent)); margin: 2px 0 8px;
  animation: pet-pop .45s cubic-bezier(.2, 1.6, .4, 1);
}
.pet-hatch-img {
  width: 128px; height: 128px; margin: 0 auto;
  animation: pet-pop .6s cubic-bezier(.2, 1.6, .4, 1);
}
.pet-avatar--ph.pet-hatch-img { font-size: 56px; }
.pet-hatch-meta { font-size: 12.5px; color: var(--muted); margin: 6px 0 14px; }
@keyframes pet-pop {
  0% { transform: scale(.2) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ---------- 改名弹窗 ---------- */
.pet-rename-input {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--rule); font: inherit; font-size: 15px;
  margin-bottom: 14px; background: var(--paper-3, #fff);
}
.pet-rename-input:focus {
  outline: none; border-color: var(--accent, #db580f);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ---------- 空间页宠物卡 ---------- */
.sp-pet { display: block; text-decoration: none; color: inherit; }
.sp-pet-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; }
.sp-pet-img { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 12px; }
.pet-avatar--ph.sp-pet-img { font-size: 30px; }
.sp-pet-id b { display: block; font-family: var(--serif); font-size: 16px; }
.sp-pet-id small { color: var(--muted); font-size: 12px; }
.sp-pet-foot { margin: 0; font-size: 12px; color: var(--muted); }
.sp-pet:hover .sp-pet-foot { color: var(--accent-deep, var(--accent)); }

/* ---------- 页脚提示 ---------- */
.pet-foot-hint {
  text-align: center; font-size: 12.5px; color: var(--muted); margin: 26px 0 10px;
}
.pet-foot-hint a { color: var(--accent-deep, var(--accent)); font-weight: 700; }

@media (max-width: 640px) {
  .pet-grid { grid-template-columns: 1fr; }
  .pet-eggs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ================================================================
   全屏游戏壳（body.page-game，路由在 Layout 之外，无站内导航）
   ================================================================ */
body.page-game {
  height: 100vh;
  overflow: hidden;
  background: var(--paper-2);
}

/* ---------- 场景一 · 标题画面 ---------- */
.game-title {
  position: relative;
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 219, 150, .95) 0 4.5%, rgba(255, 219, 150, 0) 14%),
    radial-gradient(ellipse 46% 15% at 50% 86%, #86c976 0 62%, rgba(134, 201, 118, 0) 63%),
    radial-gradient(ellipse 66% 10% at 50% 94%, #eddfae 0 60%, rgba(237, 223, 174, 0) 61%),
    linear-gradient(180deg, #c4e6f0 0%, #e2f2f5 42%, #a5d5e0 58%, #6fb6cb 78%, #58a3ba 100%);
}
.game-title-deco img {
  position: absolute;
  width: clamp(64px, 9vw, 110px);
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(29, 58, 47, .25));
  animation: game-float 5.5s ease-in-out infinite;
}
.game-title-deco img:nth-child(1) { left: 12%; top: 20%; }
.game-title-deco img:nth-child(2) { right: 13%; top: 26%; animation-delay: 1.8s; }
.game-title-deco img:nth-child(3) { left: 22%; bottom: 17%; animation-delay: 3.4s; }
@keyframes game-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}
.game-logo {
  position: relative;
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 700; letter-spacing: .06em;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .7), 0 14px 36px rgba(29, 58, 47, .28);
}
.game-sub {
  position: relative;
  margin: 10px 0 30px;
  font-size: clamp(14px, 2vw, 17px); font-weight: 600;
  color: var(--ink-soft);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
.game-enter {
  position: relative;
  appearance: none; cursor: pointer;
  padding: 15px 52px; border-radius: 999px; border: 0;
  font-family: var(--serif); font-size: 19px; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #f07a2e, var(--accent, #db580f));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 42%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .16s, box-shadow .16s;
  animation: game-enter-pulse 2.6s ease-in-out infinite;
}
.game-enter:hover { transform: translateY(-3px) scale(1.03); }
.game-enter:active { transform: translateY(0) scale(.98); }
@keyframes game-enter-pulse {
  0%, 100% { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 42%, transparent),
                         0 0 0 0 color-mix(in srgb, var(--accent) 30%, transparent); }
  55% { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 42%, transparent),
                    0 0 0 16px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.game-title-meta {
  position: relative;
  margin: 26px 0 0;
  padding: 7px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .75);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* 左上角离开按钮 / 右上角金币（两个场景通用） */
.game-exit {
  position: fixed; top: 18px; left: 18px; z-index: 50;
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(29, 58, 47, .12);
  transition: transform .15s, background .15s;
}
.game-exit:hover { transform: translateX(-2px); background: rgba(255, 255, 255, .85); }
.game-coins {
  position: fixed; top: 18px; right: 18px; z-index: 50;
  padding: 8px 18px; border-radius: 999px;
  font-family: var(--serif); font-size: 14.5px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep, var(--accent));
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(29, 58, 47, .12);
}

/* ---------- 场景二 · 世界地图 ---------- */
.game-world {
  position: relative;
  height: 100vh;
}
.game-map {
  position: absolute; inset: 0;
  background:
    url("/static/pets/scene_island.png") center / cover no-repeat,
    radial-gradient(circle at 84% 14%, rgba(255, 224, 158, .95) 0 4%, rgba(255, 224, 158, 0) 12%),
    radial-gradient(ellipse 30% 10% at 24% 78%, #86c976 0 62%, rgba(134, 201, 118, 0) 63%),
    radial-gradient(ellipse 52% 15% at 58% 84%, #7dc16e 0 62%, rgba(125, 193, 110, 0) 63%),
    radial-gradient(ellipse 74% 9% at 50% 93%, #eddfae 0 60%, rgba(237, 223, 174, 0) 61%),
    linear-gradient(180deg, #bde2ee 0%, #dff0f4 38%, #9ed1de 56%, #63aec6 76%, #4d99b3 100%);
}
/* 展示宠站在这儿 */
.game-pet-on-map {
  position: absolute; left: 28%; bottom: 30%; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: game-float 4.5s ease-in-out infinite;
}
.game-pet-sprite {
  width: clamp(76px, 10vw, 120px); height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 14px rgba(29, 58, 47, .3));
}
.game-pet-on-map > span {
  padding: 2px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

/* ---------- 底部 HUD Dock（桌面/移动统一游戏式底栏） ---------- */
.game-hud {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 40;
  display: flex; gap: 6px;
  padding: 8px 10px; border-radius: 24px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(29, 58, 47, .22);
}
.game-hud-btn {
  position: relative;
  appearance: none; cursor: pointer;
  min-width: 72px; padding: 9px 10px 7px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 800; color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
}
.game-hud-btn i { font-style: normal; font-size: 22px; line-height: 1.2; }
.game-hud-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .9);
  border-color: rgba(255, 190, 80, .5);
  box-shadow: 0 8px 20px rgba(29, 58, 47, .16);
}
.game-hud-dot {
  position: absolute; top: 5px; right: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff5a3c;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
  animation: game-dot-blink 1.4s ease-in-out infinite;
}
@keyframes game-dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.8); }
}

/* ---------- 游戏面板（Hub：左侧导航 + 右侧内容，模块切换不关面板） ---------- */
.game-panel-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px 14px;
  background: rgba(29, 58, 47, .38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: game-fade-in .18s ease-out;
}
@keyframes game-fade-in { from { opacity: 0; } to { opacity: 1; } }
.game-hub {
  width: min(1060px, 100%);
  height: min(86vh, 900px);
  display: flex; flex-direction: column;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent, #db580f);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 35, 28, .35);
  overflow: hidden;
  animation: game-panel-pop .26s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes game-panel-pop {
  from { transform: scale(.94) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.game-hub-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--accent) 4%, var(--paper-3));
}
.game-hub-head > b {
  font-family: var(--serif); font-size: 16px; white-space: nowrap;
}
.game-panel-coins {
  flex: none; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep, var(--accent));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.game-panel-close {
  appearance: none; cursor: pointer; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 13px; color: var(--muted);
  background: transparent; border: 1px solid var(--rule);
  transition: color .15s, background .15s;
}
.game-panel-close:hover { color: var(--ink); background: var(--paper-2); }
.game-hub-body {
  flex: 1; min-height: 0;
  display: flex;
}
.game-hub-side {
  flex: 0 0 218px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--rule);
  background: color-mix(in srgb, var(--accent) 2.5%, var(--paper-3));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.game-hub-nav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 8px 6px;
  border-bottom: 1px solid var(--rule);
}
.game-hub-mod {
  position: relative;
  appearance: none; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 12px;
  font: inherit; font-size: 13.5px; font-weight: 800;
  color: var(--muted);
  background: transparent; border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.game-hub-mod i { font-style: normal; font-size: 17px; }
.game-hub-mod:hover { color: var(--accent-deep); background: rgba(255, 255, 255, .7); }
.game-hub-mod.current {
  color: var(--accent-deep, var(--accent));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}
.game-hub-roster {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 8px 14px;
}
.game-hub-roster-cap {
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: var(--muted);
  padding: 2px 6px 4px;
}
.hub-pet {
  appearance: none; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 12px;
  font: inherit; color: var(--ink);
  background: transparent; border: 1.5px solid transparent;
  transition: background .15s, border-color .15s;
}
.hub-pet:hover { background: rgba(255, 255, 255, .75); }
.hub-pet--on {
  background: var(--paper);
  border-color: var(--accent, #db580f);
  box-shadow: 0 3px 10px rgba(29, 58, 47, .1);
}
.hub-pet-img { width: 38px; height: 38px; flex: 0 0 auto; image-rendering: pixelated; }
.pet-avatar--ph.hub-pet-img { font-size: 19px; border-radius: 10px; }
.hub-pet-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-pet-name .pet-stage { font-size: 10px; }
.hub-pet-lv {
  flex: none; font-size: 11px; font-weight: 800;
  color: var(--accent-deep, var(--accent));
  font-variant-numeric: tabular-nums;
}
.hub-pet-empty { padding: 8px 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.game-hub-main {
  flex: 1; min-width: 0;
  overflow-y: auto;
  padding: 18px;
  -webkit-overflow-scrolling: touch;
}

/* ================================================================
   M4 · 宠物详情（Hub 右侧内联视图：四维属性 + 技能区 + 进化链 + 觉醒仪式）
   ================================================================ */
.petd-view { display: flex; flex-direction: column; gap: 14px; }
.petd-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px;
  font-size: 13.5px; font-weight: 800; color: #b97b0a;
  background: linear-gradient(180deg, #fff7e0, #ffeec2);
  border: 1.5px solid #ffd98a;
  animation: pet-pop .45s cubic-bezier(.2, 1.6, .4, 1);
}
.petd-banner span { flex: 1; line-height: 1.6; }
.petd-banner-x {
  appearance: none; cursor: pointer; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 11px; color: #b97b0a;
  background: transparent; border: 1px solid #ffd98a;
}
.petd-body {
  display: flex; gap: 22px; align-items: flex-start;
}
.petd-left {
  flex: 0 0 210px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.petd-stage-name {
  padding: 3px 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  color: var(--accent-deep, var(--accent));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.petd-img {
  width: 170px; height: 170px; image-rendering: pixelated;
  filter: drop-shadow(0 12px 18px rgba(29, 58, 47, .22));
  animation: game-float 4.6s ease-in-out infinite;
}
/* 详情大图精灵表（动漫风）：平滑缩放 + 浮动与帧动画叠加；攻击帧播完回待机 */
.petd-img.pet-sprite { image-rendering: auto; }
.petd-img.pet-sprite--idle {
  animation: game-float 4.6s ease-in-out infinite, pet-sheet-idle 1.6s steps(1, end) infinite;
}
.petd-img.pet-sprite--attack {
  animation: game-float 4.6s ease-in-out infinite, pet-sheet-attack .55s steps(1, end) 1 both;
}
/* 可试演的技能卡（点一下播攻击动画） */
.petd-skill--playable { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.petd-skill--playable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(29, 58, 47, .14);
}
.petd-skill--playable:active { transform: translateY(0) scale(.98); }
.pet-avatar--ph.petd-img { font-size: 76px; }
.petd-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.petd-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.petd-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.petd-name { font-family: var(--serif); font-size: 24px; }
.petd-exp { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.petd-rename {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.petd-rename .pet-rename-input { flex: 1; min-width: 180px; margin-bottom: 0; }
.petd-confirm-inline {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 12px; border-radius: 12px;
  font-size: 12.5px; font-weight: 800; color: #b97b0a;
  background: #fff7e0; border: 1.5px dashed #ffd98a;
}
.petd-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px;
  padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  border: 1px solid var(--rule);
}
.petd-stat { display: flex; align-items: center; gap: 8px; }
.petd-stat-name { flex: 0 0 64px; font-size: 12px; font-weight: 700; color: var(--muted); }
.petd-stat-bar {
  flex: 1; height: 10px; border-radius: 999px; overflow: hidden;
  background: rgba(29, 58, 47, .1);
}
.petd-stat-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, #fff),
              var(--accent, #db580f));
}
.petd-stat-val {
  flex: 0 0 38px; text-align: right;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.petd-sec-title {
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  color: var(--muted);
}
.petd-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.petd-skill {
  padding: 10px 12px; border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 3px;
}
.petd-skill b { font-size: 13.5px; }
.petd-skill p { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.petd-skill-type {
  align-self: flex-start;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800;
  background: #eef1f5; color: #7c8794;
}
.petd-skill--passive .petd-skill-type { background: #e4f4e2; color: #2f7d3a; }
.petd-skill--active1 .petd-skill-type,
.petd-skill--active2 .petd-skill-type { background: #e3efff; color: #2f7cd6; }
.petd-skill--ultimate { border-color: color-mix(in srgb, #ffb020 55%, var(--rule)); }
.petd-skill--ultimate .petd-skill-type { background: #fff3d6; color: #b97b0a; }
.petd-skill--ult { border-color: color-mix(in srgb, #ffb020 55%, var(--rule)); }
.petd-skill--lock { opacity: .62; }
.petd-skill-locktext { color: #b97b0a !important; font-weight: 700; }
.petd-skills--pop { width: 100%; }
.petd-skills--pop .petd-skill { text-align: left; }
.petd-chain { display: flex; align-items: stretch; gap: 6px; }
.petd-chain-node {
  flex: 1; text-align: center;
  padding: 8px 6px; border-radius: 12px;
  border: 1.5px dashed var(--rule);
  color: var(--muted); font-size: 11px;
  display: flex; flex-direction: column; gap: 2px;
}
.petd-chain-node b { font-size: 12.5px; }
.petd-chain-node--on {
  border-style: solid;
  border-color: var(--accent, #db580f);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.petd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.petd-acts small { opacity: .75; font-size: 11px; }
.petd-ceremony-btn {
  border: 1.5px solid #ffb020;
  background: linear-gradient(180deg, #fff7e0, #ffe9ad);
  color: #8a5a00; font-weight: 800;
}
.petd-ceremony-btn:hover:not(:disabled) { filter: brightness(1.03); }
.petd-ceremony-btn:disabled { opacity: .55; cursor: not-allowed; }
.petd-ult-banner {
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #b97b0a;
  background: #fff3d6; border: 1px solid #ffd98a;
}
/* ---------- 开蛋结果（孵蛋页内联卡） ---------- */
.pet-hatch-inline {
  margin-bottom: 18px; padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  background: var(--paper);
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--rule));
  border-radius: 16px;
  animation: pet-pop .45s cubic-bezier(.2, 1.6, .4, 1);
}
.pet-hatch-inline .petd-skills { width: 100%; margin-top: 6px; }

/* ================================================================
   游戏大厅（body.page-shop page-games）
   ================================================================ */
body.page-games .shop-hero {
  position: relative;
  min-height: clamp(240px, 34vh, 380px);
  display: grid; place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 58%, rgba(255, 196, 120, .85) 0 3.5%, rgba(255, 196, 120, 0) 11%),
    radial-gradient(ellipse 60% 9% at 50% 96%, rgba(29, 58, 47, .28) 0 60%, transparent 61%),
    linear-gradient(180deg, #27596a 0%, #357488 42%, #b06a3a 72%, #43788a 73%, #2c5e70 100%);
}
body.page-games .goods-hero-inner {
  padding: clamp(36px, 7vh, 64px) var(--pad) 40px;
}
body.page-games main { max-width: 1080px; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 6px;
}
.games-card {
  display: flex; flex-direction: column;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s;
}
a.games-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(29, 58, 47, .14);
}
.games-card--live { border-color: color-mix(in srgb, var(--accent) 35%, var(--rule)); }
.games-cover {
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #eef3ec, #e2ebe0);
}
.games-cover > span { font-size: 46px; opacity: .8; }
.games-cover--island {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 214, 140, .95) 0 5%, rgba(255, 214, 140, 0) 15%),
    radial-gradient(ellipse 55% 20% at 50% 88%, #86c976 0 62%, rgba(134, 201, 118, 0) 63%),
    radial-gradient(ellipse 75% 12% at 50% 97%, #eddfae 0 60%, rgba(237, 223, 174, 0) 61%),
    linear-gradient(180deg, #c4e6f0 0%, #e2f2f5 45%, #9ed1de 62%, #6fb6cb 100%);
}
.games-cover--island img {
  width: clamp(72px, 34%, 128px);
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 16px rgba(29, 58, 47, .28));
  transition: transform .2s;
}
a.games-card:hover .games-cover--island img { transform: translateY(-5px) scale(1.05); }
.games-cover--arena {
  background:
    radial-gradient(ellipse 62% 26% at 50% 86%, #e8cf96 0 58%, rgba(232, 207, 150, 0) 60%),
    radial-gradient(circle at 50% 88%, #d9b878 0 18%, rgba(217, 184, 120, 0) 40%),
    radial-gradient(circle at 20% 20%, rgba(255, 226, 138, .9) 0 6%, rgba(255, 226, 138, 0) 18%),
    linear-gradient(180deg, #9ed1de 0%, #c9e8ef 42%, #f2e2b8 100%);
}
.games-cover--arena span {
  font-size: 52px;
  filter: drop-shadow(0 8px 12px rgba(29, 58, 47, .25));
}
/* 橘子快跑：草地 + 大橘子 + 漂浮金币 */
.games-cover--run {
  position: relative;
  background:
    radial-gradient(ellipse 70% 22% at 50% 96%, #5e9c3f 0 58%, rgba(94, 156, 63, 0) 60%),
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, .5) 0 5%, rgba(255, 255, 255, 0) 16%),
    linear-gradient(180deg, #c9e8ef 0%, #d8eec9 46%, #a4d97e 78%, #8fce63 100%);
}
.games-cover--run .run-orange {
  font-size: 58px; line-height: 1;
  filter: drop-shadow(0 10px 14px rgba(29, 58, 47, .3));
  transition: transform .2s;
}
.games-cover--run .run-coin {
  position: absolute; font-style: normal;
  animation: run-coin-float 2.6s ease-in-out infinite;
}
.games-cover--run .run-coin--a { font-size: 24px; left: 24%; top: 26%; }
.games-cover--run .run-coin--b { font-size: 18px; right: 22%; top: 55%; animation-delay: -1.3s; }
@keyframes run-coin-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
a.games-card:hover .games-cover--run .run-orange { transform: translateY(-5px) scale(1.06) rotate(-8deg); }
.games-info {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px 16px; flex: 1;
}
.games-info b {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 17px;
}
.games-info p {
  margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--muted); flex: 1;
}
.games-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3ec46a;
  box-shadow: 0 0 0 3px rgba(62, 196, 106, .22);
  animation: game-dot-blink 2s ease-in-out infinite;
}
.games-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 8px;
}
.games-kind {
  padding: 3px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.games-soon { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.games-card--todo { opacity: .78; }
.games-card--todo .games-cover { filter: grayscale(.35); }
.games-card--todo .games-info b { color: var(--muted); }
a.games-card--todo:hover { transform: none; box-shadow: none; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 640px) {
  .game-title-deco img { width: 58px; }
  .game-title-deco img:nth-child(1) { left: 4%; top: 14%; }
  .game-title-deco img:nth-child(2) { right: 5%; top: 18%; }
  .game-title-deco img:nth-child(3) { display: none; }
  .game-exit { top: 12px; left: 12px; padding: 6px 14px; font-size: 12px; }
  .game-coins { top: 12px; right: 12px; padding: 6px 14px; font-size: 13px; }
  .game-pet-on-map { left: 50%; transform: translateX(-50%); bottom: 34%; }
  .game-hud { gap: 2px; padding: 6px; border-radius: 20px; }
  .game-hud-btn { min-width: 52px; padding: 7px 6px 5px; border-radius: 14px; font-size: 10.5px; }
  .game-hud-btn i { font-size: 18px; }
  .game-hub { height: 88vh; border-radius: 16px; }
  .game-hub-head { flex-wrap: wrap; padding: 10px 14px; }
  /* Hub 左侧导航收成横向条：模块一行可横滑，名单收进内容流之前 */
  .game-hub-body { flex-direction: column; overflow-y: auto; }
  .game-hub-side {
    flex: none; flex-direction: column;
    border-right: 0; border-bottom: 1px solid var(--rule);
    overflow: visible;
  }
  .game-hub-nav {
    flex-direction: row; overflow-x: auto; padding: 8px;
    border-bottom: 0;
  }
  .game-hub-mod { flex: 0 0 auto; padding: 7px 11px; font-size: 12.5px; }
  .game-hub-roster { flex-direction: row; flex-wrap: wrap; padding: 4px 8px 10px; }
  .game-hub-roster-cap { flex-basis: 100%; }
  .hub-pet { flex: 0 0 auto; }
  .game-hub-main { flex: none; overflow: visible; padding: 14px; }
  .games-grid { grid-template-columns: 1fr; }
  /* 详情上下堆叠 */
  .petd-body { flex-direction: column; align-items: center; gap: 14px; }
  .petd-left { flex: none; }
  .petd-img { width: 128px; height: 128px; }
  .petd-stats { grid-template-columns: 1fr; }
  .petd-skills { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .game-title-deco img, .game-enter, .game-pet-on-map, .petd-img,
  .games-live-dot, .game-hud-dot, .game-battle-img,
  .game-intent-badge--ult, .game-battle-log p,
  .game-battle-drawer-body p,
  .games-cover--run .run-coin { animation: none; }
}

/* ================================================================
   M2 · 探索区域卡 + 果子补给（游戏面板内）
   ================================================================ */
.pet-areas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.pet-area {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, color-mix(in srgb, var(--area-color, #ccc) 22%, transparent) 0 70%, transparent 71%),
    var(--paper-3);
}
.pet-area-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pet-area-head b { font-family: var(--serif); font-size: 16px; }
.pet-area-desc { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); flex: 1; }
.pet-area-pool { display: flex; gap: 6px; flex-wrap: wrap; }
.pet-area-face {
  width: 40px; height: 40px; border-radius: 12px;
  image-rendering: pixelated;
}
.pet-item-img {
  font-size: 30px; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(29, 58, 47, .2));
}
.pet-item { text-align: center; }

/* ---------- 派谁去探索（左侧名单即派宠选择，无浮层） ---------- */

/* ================================================================
   M2/M4 · 战斗场景（全屏浮层，最高层级；技能操作条 + 能量条）
   ================================================================ */
.game-battle-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: game-fade-in .25s ease-out;
}
/* 区域氛围底色（图落盘后 /static/pets/scenes/<key>.png 自动叠上来） */
.game-battle-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 240, 200, .8) 0 5%, rgba(255, 240, 200, 0) 16%),
    linear-gradient(180deg, #d7ecf3 0%, #eef6ee 55%, #d9eddc 100%);
}
.game-battle-overlay[data-element="sun"] .game-battle-bg {
  background:
    url("/static/pets/scenes/scene_meadow.png") center / cover no-repeat,
    radial-gradient(circle at 82% 12%, rgba(255, 226, 138, .9) 0 5%, rgba(255, 226, 138, 0) 16%),
    linear-gradient(180deg, #cdeaf7 0%, #f2f8dd 58%, #bfe3a8 100%);
}
.game-battle-overlay[data-element="fruit"] .game-battle-bg {
  background:
    url("/static/pets/scenes/scene_orchard.png") center / cover no-repeat,
    radial-gradient(circle at 18% 16%, rgba(255, 190, 120, .55) 0 8%, rgba(255, 190, 120, 0) 22%),
    linear-gradient(180deg, #f6e3c2 0%, #f1e8cf 45%, #cfe0a4 100%);
}
.game-battle-overlay[data-element="water"] .game-battle-bg {
  background:
    url("/static/pets/scenes/scene_lake.png") center / cover no-repeat,
    radial-gradient(circle at 76% 20%, rgba(160, 226, 255, .7) 0 7%, rgba(160, 226, 255, 0) 20%),
    linear-gradient(180deg, #c4e9f6 0%, #dff3f4 52%, #9fd4dd 100%);
}
.game-battle-overlay[data-element="thunder"] .game-battle-bg {
  background:
    url("/static/pets/scenes/scene_cliff.png") center / cover no-repeat,
    radial-gradient(circle at 50% 0%, rgba(214, 198, 255, .75) 0 10%, rgba(214, 198, 255, 0) 30%),
    linear-gradient(180deg, #cdc4e8 0%, #e4ddf2 55%, #b7a8d8 100%);
}

.game-battle-topbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap;
  padding: max(14px, 2.4vh) 16px 0;
}
.game-battle-area, .game-battle-round, .game-battle-order {
  padding: 5px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; color: var(--ink);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-variant-numeric: tabular-nums;
}
/* 行动顺序 chip（速度定先手，同速我方先） */
.game-battle-order {
  color: #7a5210;
  background: rgba(255, 243, 210, .85);
  border-color: rgba(240, 205, 120, .9);
}

/* M11 回合倒计时 chip：我方回合逐秒倒数（≤10s 变红脉冲），对方回合显示状态 */
.game-battle-timer {
  min-width: 76px; text-align: center;
  padding: 5px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 800; color: #0b6e4f;
  background: rgba(214, 255, 233, .88);
  border: 1px solid rgba(120, 220, 170, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-variant-numeric: tabular-nums;
}
.game-battle-timer--warn {
  color: #b3261e;
  background: rgba(255, 216, 210, .92);
  border-color: rgba(255, 150, 140, .95);
  animation: game-timer-pulse 1s ease-in-out infinite;
}
.game-battle-timer--enemy {
  color: #5a4b8a;
  background: rgba(235, 228, 255, .9);
  border-color: rgba(190, 175, 240, .95);
}
@keyframes game-timer-pulse {
  50% { transform: scale(1.07); }
}

/* ---------- live 实况版式：左主区 + 右日志抽屉（回放保持对角版式） ---------- */
.game-battle-overlay--live { flex-direction: row; align-items: stretch; }
.game-battle-main {
  position: relative; z-index: 1;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
/* 双站台同一水平线：底边对齐，左右分布 */
.game-battle-overlay--live .game-battle-stage {
  flex-direction: row; align-items: flex-end; justify-content: space-between;
  padding: 0 clamp(24px, 6vw, 88px) 10px;
}
/* 顶部信息卡：左上我方 / 右上敌方（头像+血量+蓝量） */
.game-battle-cards {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px clamp(16px, 3vw, 40px) 0;
}
.game-battle-card {
  display: flex; align-items: center; gap: 10px;
  width: min(360px, 100%);
  padding: 8px 14px 8px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(29, 58, 47, .14);
}
.game-battle-card--enemy { flex-direction: row-reverse; }
.game-battle-card-img {
  width: 54px; height: 54px; flex: none;
  border-radius: 12px; object-fit: contain;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .95);
  image-rendering: pixelated;
  display: grid; place-items: center; font-size: 26px; overflow: hidden;
}
.game-battle-card-info {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1; min-width: 0;
}
.game-battle-card-name {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.game-battle-card--enemy .game-battle-card-name { justify-content: flex-end; }
.game-battle-card-name b { font-family: var(--serif); font-size: 15px; }

/* 右侧战斗日志抽屉 */
.game-battle-drawer {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: min(300px, 32vw); flex: none;
  margin: 12px 12px 12px 0;
  border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(29, 58, 47, .16);
  transition: width .22s ease;
}
.game-battle-drawer.is-collapsed { width: 46px; }
.game-battle-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 10px 12px;
  font-size: 13px; font-weight: 800; color: var(--ink);
  border-bottom: 1px solid rgba(29, 58, 47, .08);
}
.game-battle-drawer.is-collapsed .game-battle-drawer-head {
  flex-direction: column; padding: 10px 6px; border-bottom: none; gap: 8px;
}
.game-battle-drawer.is-collapsed .game-battle-drawer-title {
  writing-mode: vertical-rl; letter-spacing: 4px;
}
.game-battle-drawer-toggle {
  appearance: none; cursor: pointer; flex: none;
  width: 26px; height: 26px; border-radius: 999px;
  font-size: 13px; font-weight: 900; color: var(--ink); line-height: 1;
  background: rgba(29, 58, 47, .08); border: 1px solid rgba(29, 58, 47, .14);
}
.game-battle-drawer-body {
  flex: 1; overflow-y: auto; padding: 6px 14px 12px;
}
.game-battle-drawer.is-collapsed .game-battle-drawer-body { display: none; }
.game-battle-drawer-body p {
  margin: 2px 0; font-size: 13px; line-height: 1.7; color: var(--ink);
  animation: game-log-in .32s ease-out both;
}
.game-battle-drawer-body p:last-child { font-weight: 700; }
.game-battle-stage {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: max(14px, 3vh) clamp(20px, 6vw, 80px);
}
.game-battle-side {
  display: flex; flex-direction: column; gap: 6px;
  width: min(330px, 76vw);
}
.game-battle-side--enemy { align-self: flex-end; align-items: flex-end; }
.game-battle-side--me { align-self: flex-start; }
.game-battle-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; max-width: 100%;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(29, 58, 47, .14);
  width: fit-content;
}
.game-battle-side--enemy .game-battle-meta { flex-direction: row-reverse; }
.game-battle-meta b { font-family: var(--serif); font-size: 15px; }
.game-first-badge {
  padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 900; color: #2f7d3a;
  background: #e4f4e2; border: 1px solid #bfe3b8;
}
/* 敌方意图徽章（AI 推定的下一招；奥义意图警示发光） */
.game-intent-badge {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
  color: #7a5210; background: #fff4d6; border: 1px solid #f0d390;
}
.game-intent-badge--ult {
  color: #b2470c; background: #ffedd2; border-color: #f2ae62;
  animation: game-intent-ult 1.4s ease-in-out infinite;
}
@keyframes game-intent-ult {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 150, 40, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(255, 150, 40, .6); }
}
/* 站台：毛玻璃椭圆地台固定在地面，立绘浮动在其上方（与磨砂白 UI 同风格） */
.game-battle-sprite { position: relative; width: fit-content; margin-bottom: 18px; }
.game-battle-side--enemy .game-battle-sprite { align-self: flex-end; }
.game-battle-sprite::before {
  content: "";
  position: absolute; left: 50%; bottom: -16px;
  width: 124%; height: 32px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg,
              rgba(255, 255, 255, .66) 0%,
              rgba(255, 255, 255, .30) 52%,
              rgba(255, 255, 255, .16) 100%);
  border: 1.5px solid rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(29, 58, 47, .24),
              inset 0 -5px 10px rgba(29, 58, 47, .16),
              inset 0 3px 6px rgba(255, 255, 255, .55);
}
.game-battle-sprite::after {
  content: "";
  position: absolute; left: 50%; bottom: -9px;
  width: 76%; height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
              rgba(29, 58, 47, .30) 0%, rgba(29, 58, 47, 0) 70%);
  pointer-events: none;
}
.game-battle-side--me .game-battle-img, .game-battle-sprite--me .game-battle-img { animation: game-float 4s ease-in-out infinite; }
.game-battle-side--enemy .game-battle-img, .game-battle-sprite--enemy .game-battle-img { animation: game-float 4.6s ease-in-out .8s infinite; }
.game-battle-img {
  width: clamp(88px, 13vw, 150px); height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 16px rgba(29, 58, 47, .32));
}
.game-dmg-float {
  position: absolute; left: 50%; top: -6px;
  transform: translateX(-50%);
  font-style: normal; font-weight: 900; font-size: 22px;
  color: #ff4d3d;
  text-shadow: 0 2px 0 #fff, 0 0 10px rgba(255, 77, 61, .35);
  animation: game-dmg-up .9s ease-out forwards;
  pointer-events: none;
}
@keyframes game-dmg-up {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -38px) scale(1); }
}

/* ---------- 血条 ---------- */
.game-hpbar {
  position: relative;
  width: 100%; height: 16px; border-radius: 999px;
  background: rgba(29, 58, 47, .16);
  border: 1px solid rgba(255, 255, 255, .7);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(29, 58, 47, .12);
}
.game-hpbar i {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #43c26a, #6fdc8c);
  transition: width .45s ease;
}
.game-hpbar--warn i { background: linear-gradient(90deg, #f2b23c, #ffd166); }
.game-hpbar--danger i { background: linear-gradient(90deg, #e2503c, #ff7a5c); }
.game-hpbar span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

/* ---------- 能量条与状态 chips ---------- */
.game-battle-res {
  display: flex; align-items: center; gap: 8px;
}
.game-battle-side--enemy .game-battle-res { flex-direction: row-reverse; }
.game-energybar {
  display: flex; gap: 3px;
  padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 2px 8px rgba(29, 58, 47, .12);
}
.game-energybar i {
  width: 18px; height: 9px; border-radius: 999px;
  background: rgba(29, 58, 47, .14);
  transition: background .3s;
}
.game-energybar i.on {
  background: linear-gradient(90deg, #ffb020, #ffd166);
  box-shadow: 0 0 6px rgba(255, 176, 32, .55);
}
.game-shield-chip, .game-cd-chip {
  padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; color: var(--ink);
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .95);
  font-variant-numeric: tabular-nums;
}
.game-shield-chip { color: #2f7cd6; }
.game-cd-chip { color: #8a8f98; }

/* ---------- 日志与操作条 ---------- */
.game-battle-log {
  position: relative; z-index: 1;
  margin: 0 clamp(16px, 5vw, 64px);
  max-height: 108px; overflow-y: auto;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(29, 58, 47, .14);
}
.game-battle-log p {
  margin: 2px 0; font-size: 13px; line-height: 1.7; color: var(--ink);
  /* log-anim：每行日志入场（父组件逐条追加，新挂载的行自动播放） */
  animation: game-log-in .32s ease-out both;
}
@keyframes game-log-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.game-battle-log p:last-child { font-weight: 700; }
.game-battle-actions {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
}
.game-battle-btn {
  appearance: none; cursor: pointer;
  min-width: 112px; padding: 12px 18px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 14.5px; font-weight: 800; color: var(--ink);
  background: rgba(255, 255, 255, .88);
  border: 1.5px solid rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(29, 58, 47, .18);
  transition: transform .15s, box-shadow .15s;
}
.game-battle-btn small {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.game-battle-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(29, 58, 47, .26);
}
.game-battle-btn:disabled { opacity: .55; cursor: not-allowed; }
.game-battle-btn--active1 { border-color: rgba(255, 120, 90, .55); }
.game-battle-btn--active2 { border-color: rgba(79, 179, 232, .6); }
.game-battle-btn--ultimate {
  border-color: rgba(255, 176, 32, .75);
  background: linear-gradient(180deg, #fff7e0, #ffe9ad);
}
.game-battle-btn--ultready {
  animation: game-ult-pulse 1.6s ease-in-out infinite;
}
@keyframes game-ult-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(255, 176, 32, .3); }
  50% { box-shadow: 0 6px 30px rgba(255, 176, 32, .65); }
}
.game-ult-gem { color: #e8960c; margin-right: 2px; }
.game-battle-btn--catch { border-color: rgba(255, 180, 60, .6); }
.game-battle-btn--flee { border-color: rgba(120, 150, 170, .5); }
.game-battle-fruits {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: center;
}
.game-fruit-btn {
  appearance: none; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 190, 80, .55);
  box-shadow: 0 4px 12px rgba(29, 58, 47, .14);
  transition: transform .15s;
}
.game-fruit-btn:hover:not(:disabled) { transform: translateY(-2px); }
.game-fruit-btn:disabled { opacity: .55; cursor: wait; }
.game-fruit-btn span { font-size: 18px; }
.game-fruit-btn small { color: var(--muted); }

/* ================================================================
   M3 · 好友切磋 / 竞技场 / 战报回放
   ================================================================ */

/* ---------- 竞技场：战绩条 / 候选对手 / 排行榜 ---------- */
.pet-arena-record {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.pet-arena-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px; border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 190, 80, .35);
}
.pet-arena-stat b {
  font-family: var(--serif); font-size: 22px;
  color: var(--accent-deep, var(--accent));
}
.pet-arena-stat span { font-size: 11.5px; color: var(--muted); }
.pet-arena-stat--rule b { color: var(--ink); }
.pet-arena-reroll { margin-left: auto; }
.pet-arena-cands {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.pet-cand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 190, 80, .35);
}
.pet-cand-img { width: 56px; height: 56px; image-rendering: pixelated; }
.pet-avatar--ph.pet-cand-img { font-size: 26px; }
.pet-cand-name { font-family: var(--serif); font-size: 14.5px; }
.pet-cand .pet-acts { margin-top: 6px; }
.pet-board { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pet-board-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 190, 80, .28);
}
.pet-board-row--me {
  border-color: rgba(80, 160, 90, .6);
  background: rgba(228, 244, 226, .9);
}
.pet-board-rank { width: 30px; text-align: center; font-weight: 900; color: var(--muted); }
.pet-board-img { width: 34px; height: 34px; image-rendering: pixelated; }
.pet-avatar--ph.pet-board-img { font-size: 16px; }
.pet-board-name {
  font-size: 13.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pet-board-pts {
  font-weight: 800; color: var(--accent-deep, var(--accent));
  font-variant-numeric: tabular-nums;
}
.pet-board-wl { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 切磋：战书卡 / 战报列表 / 好友名单 ---------- */
.pet-spar-reqs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pet-spar-req {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 190, 80, .4);
}
.pet-spar-face { flex: 0 0 auto; }
.pet-spar-img { width: 46px; height: 46px; image-rendering: pixelated; }
.pet-avatar--ph.pet-spar-img { font-size: 22px; }
.pet-spar-req-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pet-spar-req-info b { font-size: 13.5px; }
.pet-spar-req-meta { font-size: 12px; color: var(--muted); }
.pet-spar-log { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.pet-spar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(29, 58, 47, .08);
}
.pet-spar-verdict {
  flex: 0 0 auto;
  min-width: 46px; text-align: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
  background: #e4f4e2; color: #2f7d3a;
}
.pet-spar-verdict--lose { background: #f1f1f3; color: #8a8f98; }
.pet-spar-verdict[data-won="false"] { background: #fbe9e7; color: #c0563a; }
.pet-spar-row-who {
  flex: 1; min-width: 0; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pet-spar-row-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pet-spar-friends { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pet-spar-friend {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(29, 58, 47, .08);
}
.pet-spar-friend b {
  flex: 1; min-width: 0; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 战报回放（复用 game-battle-* 布局） ---------- */
.game-replay-close {
  position: absolute; top: 18px; right: 22px; z-index: 5;
  background: rgba(255, 255, 255, .85);
}
.game-battle-overlay--replay .game-battle-log { max-height: 168px; }
.game-replay-progress {
  font-size: 13px; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
}
.game-replay-result { font-weight: 800; }
.game-replay-result[data-result="win"] { color: #2f7d3a; }
.game-replay-result[data-result="lose"] { color: #c0563a; }

/* ---------- 小屏适配（M2 追加；live 版式抽屉在 ≤900px 浮层化） ---------- */
@media (max-width: 900px) {
  .game-battle-drawer {
    position: absolute; top: 10px; right: 10px; bottom: 10px; z-index: 5;
    width: min(300px, 80vw); margin: 0;
  }
  .game-battle-drawer.is-collapsed { width: 46px; }
  .game-battle-overlay--live .game-battle-stage { padding: 0 18px 10px; }
  .game-battle-cards { padding: 10px 12px 0; gap: 8px; }
  .game-battle-card { padding: 6px 10px 6px 6px; border-radius: 14px; }
  .game-battle-card-img { width: 44px; height: 44px; font-size: 22px; }
  .game-battle-card-name b { font-size: 14px; }
}
@media (max-width: 640px) {
  .pet-areas { grid-template-columns: 1fr; }
  .game-battle-stage { padding: 12px 14px; }
  .game-battle-img { width: clamp(72px, 22vw, 110px); }
  .game-battle-log { margin: 0 12px; max-height: 84px; }
  .game-battle-btn { min-width: 86px; padding: 9px 12px; font-size: 13px; border-radius: 13px; }
  .game-energybar i { width: 13px; }
  .pet-arena-record { grid-template-columns: repeat(2, 1fr); }
  .game-battle-overlay--live .game-battle-stage { padding: 0 10px 6px; }
  .game-battle-card-img { width: 38px; height: 38px; }
  .game-battle-cards { padding: 8px 8px 0; }
}

/* ---------- 精灵图逐帧动画（M5：sheets/<key>.png 2×2） ---------- */
/* 帧位约定：F0 待机A(左上) F1 待机B(右上) F2 蓄力(左下) F3 攻击(右下)。
 * background-size 200% 时 position 0/100% 恰好落在四宫格；steps(1) 硬切帧。 */
.pet-sprite {
  display: block; aspect-ratio: 1; height: auto;
  background-size: 200% 200%; background-repeat: no-repeat;
  image-rendering: auto; /* 热血动漫画风精灵图：平滑缩放（压过 .game-battle-img 的 pixelated） */
  filter: drop-shadow(0 14px 16px rgba(29, 58, 47, .32));
}
.pet-sprite--idle { animation: pet-sheet-idle 1.6s steps(1, end) infinite; }
@keyframes pet-sheet-idle {
  0%, 49% { background-position: 0 0; }
  50%, 100% { background-position: 100% 0; }
}
.pet-sprite--attack { animation: pet-sheet-attack .55s steps(1, end) 1 both; }
@keyframes pet-sheet-attack {
  0% { background-position: 0 0; }
  18% { background-position: 0 100%; }
  55% { background-position: 100% 100%; }
  100% { background-position: 0 0; }
}
/* 战斗里的浮动（game-float 动 transform，帧动画动 background，可叠加）
 * 选择器双写：回放= .game-battle-side--* 后代；实况= .game-battle-sprite--* 本体 */
.game-battle-side--me .pet-sprite--idle, .game-battle-sprite--me .pet-sprite--idle {
  animation: game-float 4s ease-in-out infinite, pet-sheet-idle 1.6s steps(1, end) infinite;
}
.game-battle-side--enemy .pet-sprite--idle, .game-battle-sprite--enemy .pet-sprite--idle {
  animation: game-float 4.6s ease-in-out .8s infinite, pet-sheet-idle 1.6s steps(1, end) infinite;
}
.game-battle-side--me .pet-sprite--attack, .game-battle-sprite--me .pet-sprite--attack {
  animation: game-float 4s ease-in-out infinite, pet-sheet-attack .55s steps(1, end) 1 both;
}
.game-battle-side--enemy .pet-sprite--attack, .game-battle-sprite--enemy .pet-sprite--attack {
  animation: game-float 4.6s ease-in-out .8s infinite, pet-sheet-attack .55s steps(1, end) 1 both;
}
/* 无精灵图的战斗立绘兜底待机：静态立绘 img / 占位卡也呼吸（落地压扁、
 * 腾空舒展，替代原 game-float 纯浮动；img 选择器多一个元素位压过上方规则）。
 * 有精灵图的 .pet-sprite 不命中，仍走上面的逐帧动画。 */
@keyframes pet-fig-idle {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1, .96); }
  50% { transform: translateY(-14px) rotate(2deg) scale(1.02, 1); }
}
.game-battle-side--me img.game-battle-img, .game-battle-sprite--me img.game-battle-img,
.game-battle-side--me .pet-avatar--ph, .game-battle-sprite--me .pet-avatar--ph {
  animation: pet-fig-idle 4s ease-in-out infinite;
}
.game-battle-side--enemy img.game-battle-img, .game-battle-sprite--enemy img.game-battle-img,
.game-battle-side--enemy .pet-avatar--ph, .game-battle-sprite--enemy .pet-avatar--ph {
  animation: pet-fig-idle 4.6s ease-in-out .8s infinite;
}

/* ---------- 战斗演出：前冲 / 受击 / 倒下（挂 .game-battle-sprite 容器） ---------- */
.game-battle-side--me .is-attacking, .game-battle-sprite--me.is-attacking { animation: pet-lunge-r .6s ease-in-out; }
.game-battle-side--enemy .is-attacking, .game-battle-sprite--enemy.is-attacking { animation: pet-lunge-l .6s ease-in-out; }
@keyframes pet-lunge-r {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(34px) scale(1.04); }
}
@keyframes pet-lunge-l {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(-34px) scale(1.04); }
}
.is-hurt { animation: pet-hurt .55s ease-out; }
@keyframes pet-hurt {
  0%, 100% { transform: translateX(0); filter: none; }
  15% { transform: translateX(-7px); }
  35% { transform: translateX(6px); }
  55% { transform: translateX(-4px); }
  75% { transform: translateX(2px); }
}
.is-hurt .pet-sprite, .is-hurt .game-battle-img {
  filter: brightness(1.85) saturate(.45)
          drop-shadow(0 14px 16px rgba(29, 58, 47, .32));
}
.is-fainted .pet-sprite, .is-fainted .game-battle-img {
  filter: grayscale(1) brightness(.72)
          drop-shadow(0 14px 16px rgba(29, 58, 47, .32));
  transform: rotate(-8deg) translateY(6px);
  transition: filter .5s, transform .5s;
}

/* ---------- 元素技能特效（vfx/<element>.png，盖在受击方立绘上） ---------- */
.game-vfx {
  position: absolute; left: 50%; top: 44%;
  width: clamp(96px, 15vw, 170px); aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.4);
  opacity: 0; pointer-events: none; z-index: 3;
  image-rendering: pixelated;
  animation: game-vfx-pop .62s ease-out forwards;
}
@keyframes game-vfx-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-6deg); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(3deg); }
  55% { opacity: .95; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -52%) scale(1.22); }
}
.game-vfx--ult {
  width: clamp(140px, 24vw, 260px);
  animation: game-vfx-pop .85s ease-out forwards,
             game-vfx-ult-pulse .85s ease-out forwards;
}
@keyframes game-vfx-ult-pulse {
  0%, 100% { filter: none; }
  40% { filter: brightness(1.5) drop-shadow(0 0 22px rgba(255, 200, 80, .85)); }
}
/* 奥义全屏震动 + 闪光 */
.game-battle-overlay.is-shaking { animation: game-screen-shake .6s ease-out; }
@keyframes game-screen-shake {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-9px, 5px); }
  26% { transform: translate(8px, -6px); }
  40% { transform: translate(-6px, -3px); }
  55% { transform: translate(5px, 4px); }
  70% { transform: translate(-3px, 2px); }
  85% { transform: translate(2px, -1px); }
}
.game-ult-flash {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 40%),
              rgba(255, 245, 214, .95) 0%, rgba(255, 244, 214, 0) 62%);
  opacity: 0; animation: game-ult-flash .7s ease-out forwards;
}
@keyframes game-ult-flash {
  0% { opacity: 0; } 16% { opacity: 1; } 100% { opacity: 0; }
}

/* ---------- 治疗 / 护盾 / 增益纯 CSS 光效 ---------- */
.game-heal-glow {
  position: absolute; left: 50%; bottom: 4%;
  width: 82%; aspect-ratio: 1.4; transform: translateX(-50%);
  pointer-events: none; z-index: 3; opacity: 0;
  background:
    radial-gradient(circle at 30% 78%, rgba(120, 226, 160, .85) 0%, transparent 34%),
    radial-gradient(circle at 62% 88%, rgba(160, 240, 190, .8) 0%, transparent 30%),
    radial-gradient(circle at 78% 72%, rgba(120, 226, 160, .75) 0%, transparent 26%);
  animation: game-heal-rise .9s ease-out forwards;
}
@keyframes game-heal-rise {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.8); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-26px) scale(1.05); }
}
.game-shield-pop {
  position: absolute; left: 50%; top: 46%;
  width: 96%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; z-index: 3; opacity: 0;
  border: 4px solid rgba(120, 180, 255, .8);
  box-shadow: inset 0 0 24px rgba(140, 190, 255, .5);
  animation: game-shield-pop .8s ease-out forwards;
}
@keyframes game-shield-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); }
}
.game-buff-glow {
  position: absolute; inset: -6%; pointer-events: none; z-index: 3; opacity: 0;
  border-radius: 18%;
  box-shadow: 0 0 26px 6px rgba(255, 208, 96, .65);
  animation: game-buff-glow .8s ease-out forwards;
}
@keyframes game-buff-glow {
  0% { opacity: 0; transform: scale(.86); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}
.game-dodge-slide { animation: pet-dodge .5s ease-out; }
@keyframes pet-dodge {
  0%, 100% { transform: translateX(0); opacity: 1; }
  40% { transform: translateX(var(--dodge-dir, 18px)); opacity: .45; }
  70% { transform: translateX(0); opacity: 1; }
}
/* 飘字分级：治疗绿 +N / 暴击大橙字 / 反伤紫 */
.game-dmg-float--heal { color: #2fae5e; text-shadow: 0 2px 0 #fff, 0 0 10px rgba(63, 200, 120, .4); }
.game-dmg-float--crit {
  font-size: 27px; color: #ff9c1a;
  text-shadow: 0 2px 0 #fff, 0 0 12px rgba(255, 140, 20, .5);
}
.game-dmg-float--thorns { color: #9c5bd6; text-shadow: 0 2px 0 #fff, 0 0 10px rgba(150, 80, 210, .4); }
