/* 平妖 · 花果山篇 —— 竖屏 720x1280 舞台 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: 100%;
  background: #101812;
  overflow: hidden;
  position: fixed;               /* 锁死 iOS 橡皮筋滚动 */
  inset: 0;
  overscroll-behavior: none;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  touch-action: pan-y;   /* 面板列表要能滚；画布区单独 none（下），双击缩放/捏合由 viewport+gesturestart 兜底 */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;   /* 禁长按弹出复制/保存菜单 */
}

/* 横屏提示：竖屏游戏，横持手机时引导旋转 */
#rotateTip {
  position: fixed; inset: 0; z-index: 99;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.5vh;
  background: #101812;
  color: #ffe9a8;
  font-size: 3.2vh; letter-spacing: .3em; text-indent: .3em;
}
#rotateTip .rot-icon {
  width: 12vh; height: 12vh;
  border: .6vh solid #ffe9a8; border-radius: 2vh;
  position: relative;
  animation: rotWiggle 1.6s ease-in-out infinite;
}
#rotateTip .rot-icon::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 40%; height: 60%;
  transform: translate(-50%, -50%);
  background: #ffe9a8; border-radius: .8vh;
}
@keyframes rotWiggle {
  0%, 100% { transform: rotate(0deg) }
  30% { transform: rotate(-90deg) }
  60% { transform: rotate(-90deg) }
  90% { transform: rotate(0deg) }
}
@media (orientation: landscape) and (max-height: 560px) {
  #rotateTip { display: flex; }
}

#stage {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 60px rgba(0,0,0,.7);
}

#game {
  display: block;
  width: 100%; height: 100%;
  background: #2c4a1e;
  touch-action: pan-y;   /* 面板列表要能滚；画布区单独 none（下），双击缩放/捏合由 viewport+gesturestart 兜底 */   /* 摇杆手势全归游戏，禁浏览器接管 */
}

/* ---------- 通用覆盖层 ---------- */
.overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.hidden { display: none !important; }

/* ---------- 开始菜单 ---------- */
#menu {
  background:
    radial-gradient(ellipse at 50% 28%, rgba(20,40,16,0) 30%, rgba(8,18,8,.82) 100%),
    linear-gradient(180deg, rgba(10,24,10,.35) 0%, rgba(6,14,6,.9) 100%);
}
.menu-inner { display: flex; flex-direction: column; align-items: center; gap: 2.2vh; padding: 3vh 0; }
.title-cn {
  font-size: 13.5vh; line-height: 1;
  font-weight: 900; letter-spacing: .18em; text-indent: .18em;
  color: #ffe9a8;
  text-shadow:
    0 2px 0 #b8860b, 0 4px 0 #8a5a00, 0 6px 0 #6b4300,
    0 10px 24px rgba(0,0,0,.65),
    0 0 42px rgba(255,190,60,.45);
}
.title-sub {
  margin-top: 1vh;
  font-size: 2.4vh; letter-spacing: .5em; text-indent: .5em;
  color: #cfe6b8; opacity: .9;
}
.menu-hero { height: 26vh; display: flex; align-items: flex-end; }
.menu-hero img { height: 100%; filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); animation: heroFloat 3.2s ease-in-out infinite; }
@keyframes heroFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }

.btn-gold {
  font-family: inherit;
  font-size: 3.4vh; font-weight: 800; letter-spacing: .35em; text-indent: .35em;
  color: #5b3200;
  padding: 2vh 7vh;
  border: none; border-radius: 999px;
  background: linear-gradient(180deg, #ffe9a0 0%, #ffc93c 45%, #f09c00 100%);
  box-shadow: 0 6px 0 #a85e00, 0 12px 26px rgba(0,0,0,.5), inset 0 2px 3px rgba(255,255,255,.8);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn-gold:active { transform: translateY(4px); box-shadow: 0 2px 0 #a85e00, 0 6px 14px rgba(0,0,0,.5); }

.menu-tip { font-size: 1.9vh; color: #b9d3a2; letter-spacing: .12em; }
.menu-best { font-size: 2vh; color: #ffd97a; letter-spacing: .2em; min-height: 2.4vh; }

/* ---------- 开光E：菜单氛围——灵火浮游 + 题字金晕呼吸 + 悬停光（桌面） ---------- */
#menu .spirit {
  position: absolute; z-index: -1; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle, #ffe9a8 0%, rgba(255,190,60,.65) 45%, rgba(255,150,40,0) 75%);
  filter: blur(.4px); opacity: 0; pointer-events: none;
  animation: spiritFloat 7s ease-in-out infinite;
}
#menu .spirit.s2 { animation-duration: 9s; animation-delay: -3s; }
#menu .spirit.s3 { animation-duration: 6s; animation-delay: -1.6s; }
#menu .spirit.s4 { animation-duration: 11s; animation-delay: -5s; }
@keyframes spiritFloat {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(.8); }
  20% { opacity: .85; }
  50% { opacity: .55; transform: translate(3vw, -6vh) scale(1.15); }
  80% { opacity: .8; }
}
#menu::after {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 9vh; width: 60vh; height: 24vh;
  transform: translateX(-50%); pointer-events: none; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,190,60,.14), rgba(255,190,60,0) 68%);
  animation: haloBreathe 7.5s ease-in-out infinite;
}
@keyframes haloBreathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (hover: hover) {
  .btn-gold:hover { filter: brightness(1.06); box-shadow: 0 6px 0 #a85e00, 0 12px 26px rgba(0,0,0,.5), 0 0 26px rgba(255,201,60,.45); }
  .btn-sub:hover, .btn-back:hover {
    border-color: rgba(255,225,120,.9); background: rgba(48,32,14,.62);
    box-shadow: 0 0 14px rgba(255,190,60,.35); transform: translateY(-1px);
  }
  .menu-chapters .ch-btn:hover { border-color: rgba(255,225,120,.9); box-shadow: 0 0 12px rgba(255,190,60,.3); }
}

/* ---------- 主菜单 2.0：四入口按钮组 ---------- */
.menu-btns { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; }
#btnContinue:disabled { filter: grayscale(.85) brightness(.65); cursor: default; }
#btnContinue:disabled:active { transform: none; box-shadow: 0 6px 0 #a85e00, 0 12px 26px rgba(0,0,0,.5); }
.menu-row { display: flex; gap: min(1.6vh, 2.2vw); }
.btn-sub {
  font-family: inherit; font-size: 2.3vh; font-weight: 700; letter-spacing: .28em; text-indent: .28em;
  color: #ffe9a0; background: rgba(30,20,10,.55);
  border: 1px solid rgba(255,217,74,.45); border-radius: 999px;
  padding: 1.4vh 4.2vh; cursor: pointer; min-height: 44px;
  transition: transform .08s ease;
}
.btn-sub:active { transform: translateY(2px); }

/* ---------- 子面板（装备 / 图鉴 / 设置） ---------- */
.subview { z-index: 20; background: linear-gradient(180deg, rgba(8,16,8,.94) 0%, rgba(4,10,4,.97) 100%); padding: 2.4vh 0; }
.sv-panel {
  width: min(92%, 640px); max-height: 94vh;
  display: flex; flex-direction: column;
  background: linear-gradient(170deg, rgba(26,18,10,.92) 0%, rgba(16,12,6,.96) 100%);
  border: 1px solid #d4a017; border-radius: 2.4vh;
  box-shadow: 0 2vh 5vh rgba(0,0,0,.6), inset 0 1px 0 rgba(255,217,74,.25);
}
.sv-head {
  display: flex; align-items: center; gap: 2vh;
  padding: 2vh 2.6vh 1.4vh; border-bottom: 1px solid rgba(212,160,23,.3);
  flex: none;
}
.btn-back {
  font-family: inherit; font-size: 2.2vh; color: #ffd97a;
  background: rgba(30,20,10,.5); border: 1px solid rgba(255,217,74,.4);
  border-radius: 999px; padding: 1.1vh 2.8vh; cursor: pointer; min-height: 44px; min-width: 44px;
}
.btn-back:active { transform: translateY(2px); }
.sv-title { font-size: 2.8vh; font-weight: 900; letter-spacing: .4em; color: #ffe9a8; text-shadow: 0 0 14px rgba(255,190,60,.4); }
.sv-space { flex: 1; }
.sv-count { margin-left: auto; font-size: 2vh; color: #c9a86a; letter-spacing: .15em; white-space: nowrap; }
.sv-body {
  overflow-y: auto; padding: 2vh 2.6vh 3vh;
  display: flex; flex-direction: column; gap: 1.8vh;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}

/* 装备卡片 */
.eq-slotname { font-size: 2.1vh; color: #c9a86a; letter-spacing: .3em; margin-bottom: .4vh; }
.eq-slotname b { color: #ffd94a; }
.eq-card {
  display: flex; align-items: center; gap: 2vh;
  background: rgba(10,8,4,.5); border: 1px solid rgba(212,160,23,.28); border-left: 4px solid var(--rar, #8bd06a);
  border-radius: 1.6vh; padding: 1.6vh 2vh; margin-bottom: 1.4vh;
}
.eq-card.owned { background: rgba(24,18,8,.6); }
.eq-card.on { border-color: #ffd94a; box-shadow: 0 0 1.6vh rgba(255,217,74,.35); background: rgba(40,28,10,.65); }
.eq-glyph {
  width: 8.4vh; height: 8.4vh; min-width: 8.4vh;
  display: flex; align-items: center; justify-content: center;
  font-size: 4vh; font-weight: 900; color: var(--rar, #8bd06a);
  background: rgba(0,0,0,.35); border: 1px solid var(--rar, #8bd06a); border-radius: 1.4vh;
  text-shadow: 0 0 12px currentColor;
}
.eq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5vh; }
.eq-name { font-size: 2.4vh; font-weight: 800; color: #ffe9a8; letter-spacing: .1em; }
.eq-stats { font-size: 1.9vh; color: #8bd06a; }
.eq-desc { font-size: 1.7vh; color: #a9946e; line-height: 1.45; }
.eq-how { font-size: 1.6vh; color: #7a8a6a; letter-spacing: .08em; }
.eq-card:not(.owned) { opacity: .62; }
.eq-card:not(.owned) .eq-name { color: #b0a488; }
.eq-act {
  font-family: inherit; font-size: 2vh; font-weight: 800; letter-spacing: .2em; text-indent: .2em;
  color: #5b3200; background: linear-gradient(180deg, #ffe9a0, #f09c00);
  border: none; border-radius: 999px; padding: 1.3vh 3vh; cursor: pointer;
  min-height: 44px; min-width: 9.6vh; white-space: nowrap;
}
.eq-act:active { transform: translateY(2px); }
.eq-lock { font-size: 1.8vh; color: #8a7a5a; letter-spacing: .1em; white-space: nowrap; }

/* 图鉴 */
.dex-cht { font-size: 2.1vh; color: #c9a86a; letter-spacing: .3em; margin: .6vh 0 1.2vh; }
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4vh; }
.dex-cell {
  display: flex; flex-direction: column; align-items: center; gap: .8vh;
  background: rgba(0,0,0,.3); border: 1px solid rgba(212,160,23,.22); border-radius: 1.4vh;
  padding: 1.4vh .6vh 1.2vh;
}
.dex-cell img { height: 7.5vh; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.dex-cell:not(.seen) img { filter: brightness(0) opacity(.45); }
.dex-name { font-size: 1.8vh; color: #ffe9a8; letter-spacing: .12em; white-space: nowrap; }
.dex-cell:not(.seen) .dex-name { color: #6a6a58; }

/* 设置 */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 2vh; }
.set-lb { font-size: 2.2vh; color: #c9a86a; letter-spacing: .2em; }
.set-seg { display: flex; gap: .8vh; }
.seg {
  font-family: inherit; font-size: 2vh; color: #ffe9a0;
  background: rgba(30,20,10,.55); border: 1px solid rgba(255,217,74,.35);
  border-radius: 999px; padding: 1.1vh 2.6vh; cursor: pointer; min-height: 44px; min-width: 7.2vh;
}
.seg.on { background: linear-gradient(180deg, #ffe9a0, #f09c00); color: #5b3200; font-weight: 800; border-color: #ffd94a; }
.set-stat { font-size: 1.9vh; color: #a9946e; text-align: center; line-height: 1.7; letter-spacing: .1em; }
.set-stat b { color: #ffd97a; }
.btn-reset {
  font-family: inherit; font-size: 2vh; color: #ff8a6a; background: rgba(60,14,8,.4);
  border: 1px solid rgba(224,82,82,.5); border-radius: 999px;
  padding: 1.3vh 3vh; cursor: pointer; min-height: 44px; align-self: center; letter-spacing: .2em;
}
.btn-reset.arm { background: #c0392b; color: #fff; border-color: #ff8a6a; }

/* 结算按钮列（再来一局 + 返回主菜单） */
.go-act { display: flex; flex-direction: column; gap: 1.8vh; align-items: center; width: 100%; }

/* ---------- 主菜单 2.0：四入口按钮组 ---------- */
.menu-btns { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; }
#btnContinue:disabled { filter: grayscale(.85) brightness(.65); cursor: default; }
#btnContinue:disabled:active { transform: none; box-shadow: 0 6px 0 #a85e00, 0 12px 26px rgba(0,0,0,.5); }
.menu-row { display: flex; gap: min(1.6vh, 2.2vw); }
.btn-sub {
  font-family: inherit; font-size: 2.3vh; font-weight: 700; letter-spacing: .28em; text-indent: .28em;
  color: #ffe9a0; background: rgba(30,20,10,.55);
  border: 1px solid rgba(255,217,74,.45); border-radius: 999px;
  padding: 1.4vh 4.2vh; cursor: pointer; min-height: 44px;
  transition: transform .08s ease;
}
.btn-sub:active { transform: translateY(2px); }

/* ---------- 子面板（装备 / 图鉴 / 设置） ---------- */
.subview { z-index: 20; background: linear-gradient(180deg, rgba(8,16,8,.94) 0%, rgba(4,10,4,.97) 100%); padding: 2.4vh 0; }
.sv-panel {
  width: min(92%, 640px); max-height: 94vh;
  display: flex; flex-direction: column;
  background: linear-gradient(170deg, rgba(26,18,10,.92) 0%, rgba(16,12,6,.96) 100%);
  border: 1px solid #d4a017; border-radius: 2.4vh;
  box-shadow: 0 2vh 5vh rgba(0,0,0,.6), inset 0 1px 0 rgba(255,217,74,.25);
}
.sv-head {
  display: flex; align-items: center; gap: 2vh;
  padding: 2vh 2.6vh 1.4vh; border-bottom: 1px solid rgba(212,160,23,.3);
  flex: none;
}
.btn-back {
  font-family: inherit; font-size: 2.2vh; color: #ffd97a;
  background: rgba(30,20,10,.5); border: 1px solid rgba(255,217,74,.4);
  border-radius: 999px; padding: 1.1vh 2.8vh; cursor: pointer; min-height: 44px; min-width: 44px;
}
.btn-back:active { transform: translateY(2px); }
.sv-title { font-size: 2.8vh; font-weight: 900; letter-spacing: .4em; color: #ffe9a8; text-shadow: 0 0 14px rgba(255,190,60,.4); }
.sv-space { flex: 1; }
.sv-count { margin-left: auto; font-size: 2vh; color: #c9a86a; letter-spacing: .15em; white-space: nowrap; }
.sv-body {
  overflow-y: auto; padding: 2vh 2.6vh 3vh;
  display: flex; flex-direction: column; gap: 1.8vh;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}

/* 装备卡片 */
.eq-slotname { font-size: 2.1vh; color: #c9a86a; letter-spacing: .3em; margin-bottom: .4vh; }
.eq-slotname b { color: #ffd94a; }
.eq-card {
  display: flex; align-items: center; gap: 2vh;
  background: rgba(10,8,4,.5); border: 1px solid rgba(212,160,23,.28); border-left: 4px solid var(--rar, #8bd06a);
  border-radius: 1.6vh; padding: 1.6vh 2vh; margin-bottom: 1.4vh;
}
.eq-card.owned { background: rgba(24,18,8,.6); }
.eq-card.on { border-color: #ffd94a; box-shadow: 0 0 1.6vh rgba(255,217,74,.35); background: rgba(40,28,10,.65); }
.eq-glyph {
  width: 8.4vh; height: 8.4vh; min-width: 8.4vh;
  display: flex; align-items: center; justify-content: center;
  font-size: 4vh; font-weight: 900; color: var(--rar, #8bd06a);
  background: rgba(0,0,0,.35); border: 1px solid var(--rar, #8bd06a); border-radius: 1.4vh;
  text-shadow: 0 0 12px currentColor;
}
.eq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5vh; }
.eq-name { font-size: 2.4vh; font-weight: 800; color: #ffe9a8; letter-spacing: .1em; }
.eq-stats { font-size: 1.9vh; color: #8bd06a; }
.eq-desc { font-size: 1.7vh; color: #a9946e; line-height: 1.45; }
.eq-how { font-size: 1.6vh; color: #7a8a6a; letter-spacing: .08em; }
.eq-card:not(.owned) { opacity: .62; }
.eq-card:not(.owned) .eq-name { color: #b0a488; }
.eq-act {
  font-family: inherit; font-size: 2vh; font-weight: 800; letter-spacing: .2em; text-indent: .2em;
  color: #5b3200; background: linear-gradient(180deg, #ffe9a0, #f09c00);
  border: none; border-radius: 999px; padding: 1.3vh 3vh; cursor: pointer;
  min-height: 44px; min-width: 9.6vh; white-space: nowrap;
}
.eq-act:active { transform: translateY(2px); }
.eq-lock { font-size: 1.8vh; color: #8a7a5a; letter-spacing: .1em; white-space: nowrap; }

/* 图鉴 */
.dex-cht { font-size: 2.1vh; color: #c9a86a; letter-spacing: .3em; margin: .6vh 0 1.2vh; }
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4vh; }
.dex-cell {
  display: flex; flex-direction: column; align-items: center; gap: .8vh;
  background: rgba(0,0,0,.3); border: 1px solid rgba(212,160,23,.22); border-radius: 1.4vh;
  padding: 1.4vh .6vh 1.2vh;
}
.dex-cell img { height: 7.5vh; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.dex-cell:not(.seen) img { filter: brightness(0) opacity(.45); }
.dex-name { font-size: 1.8vh; color: #ffe9a8; letter-spacing: .12em; white-space: nowrap; }
.dex-cell:not(.seen) .dex-name { color: #6a6a58; }

/* 设置 */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 2vh; }
.set-lb { font-size: 2.2vh; color: #c9a86a; letter-spacing: .2em; }
.set-seg { display: flex; gap: .8vh; }
.seg {
  font-family: inherit; font-size: 2vh; color: #ffe9a0;
  background: rgba(30,20,10,.55); border: 1px solid rgba(255,217,74,.35);
  border-radius: 999px; padding: 1.1vh 2.6vh; cursor: pointer; min-height: 44px; min-width: 7.2vh;
}
.seg.on { background: linear-gradient(180deg, #ffe9a0, #f09c00); color: #5b3200; font-weight: 800; border-color: #ffd94a; }
.set-stat { font-size: 1.9vh; color: #a9946e; text-align: center; line-height: 1.7; letter-spacing: .1em; }
.set-stat b { color: #ffd97a; }
.btn-reset {
  font-family: inherit; font-size: 2vh; color: #ff8a6a; background: rgba(60,14,8,.4);
  border: 1px solid rgba(224,82,82,.5); border-radius: 999px;
  padding: 1.3vh 3vh; cursor: pointer; min-height: 44px; align-self: center; letter-spacing: .2em;
}
.btn-reset.arm { background: #c0392b; color: #fff; border-color: #ff8a6a; }

/* 结算按钮列（再来一局 + 返回主菜单） */
.go-act { display: flex; flex-direction: column; gap: 1.8vh; align-items: center; width: 100%; }

/* ---------- 章节选卡 ---------- */
.menu-chapters { display: flex; gap: min(1.2vh, 1.6vw); justify-content: center; margin: .8vh 0 2.4vh; }
.ch-btn {
  font-family: inherit; font-size: min(1.9vh, 3.3vw); letter-spacing: .14em; white-space: nowrap;
  color: #ffe9a0; background: rgba(30,20,10,.55);
  border: 1px solid rgba(255,217,74,.4); border-radius: 999px;
  padding: .9vh min(2vh, 2.6vw); cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;   /* 手机触控热区下限 */
  transition: transform .08s ease, box-shadow .08s ease;
}
.ch-btn.on {
  background: linear-gradient(180deg, #ffe9a0 0%, #ffc93c 55%, #f09c00 100%);
  color: #5b3200; font-weight: 800; border-color: #ffd94a;
  box-shadow: 0 0 1.4vh rgba(255,217,74,.5);
}
.ch-btn:active { transform: translateY(2px); }

/* ---------- 升级三选一 ---------- */
#levelup {
  background: radial-gradient(ellipse at 50% 45%, rgba(8,16,8,.55) 0%, rgba(4,10,4,.88) 100%);
}
.lv-title {
  font-size: min(4.6vh, 6.8vw); font-weight: 900; letter-spacing: .4em; text-indent: .4em;
  color: #ffe9a8;
  text-shadow: 0 3px 0 #8a5a00, 0 8px 20px rgba(0,0,0,.6), 0 0 30px rgba(255,190,60,.4);
  margin-bottom: 4vh;
  animation: lvPop .35s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes lvPop { from { transform: scale(.6); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.lv-cards { display: flex; gap: min(3.4vh, 2.6vw); }
/* P1-1 符卡重做：分类色条 + 金字图标 + 细金边卡面 + 分类色光晕（方案规格逐项对表） */
.lv-card {
  position: relative;
  width: min(17vh, 26vw); height: 30vh;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8e7 0%, #f5e6c4 100%);
  border: 1px solid #d4a017;
  box-shadow: 0 2vh 4vh rgba(0,0,0,.55), inset 0 2px 8px rgba(90,60,10,.18), inset 0 1px 0 rgba(255,255,255,.85);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(6px + 2vh) min(1.4vh, 1.6vw) 2vh;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s ease-out, box-shadow .3s ease-out;
  animation: cardIn .4s cubic-bezier(.2,1.5,.4,1) both;
}
.lv-card:nth-child(2) { animation-delay: .12s }
.lv-card:nth-child(3) { animation-delay: .24s }
@keyframes cardIn { from { transform: translateY(6vh) scale(.8); opacity: 0 } to { transform: none; opacity: 1 } }
.lv-card:hover, .lv-card:active {
  transform: translateY(-6px);
  box-shadow: 0 2vh 4vh rgba(0,0,0,.55), 0 0 20px var(--glow-soft, rgba(212,160,23,.4)),
    inset 0 2px 8px rgba(90,60,10,.18), inset 0 1px 0 rgba(255,255,255,.85);
}
.lv-card .lv-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: var(--glow, #d4a017);
}
.lv-card .lv-tag {
  font-size: min(1.6vh, 2.5vw); font-weight: 700; letter-spacing: .25em; text-indent: .25em;
  color: #fff; background: var(--glow, #d4a017);
  padding: .5vh 1.6vh; border-radius: 999px;
  box-shadow: inset 0 .2vh .3vh rgba(255,255,255,.35);
}
.lv-card .lv-glyph {
  font-size: 44px; line-height: 1.25; margin: 1.6vh 0 .8vh;
  color: #ffd94a;
  -webkit-text-stroke: 2px #6b3a00; paint-order: stroke fill;
  text-shadow: 0 3px 6px rgba(120,60,0,.35);
}
.lv-card .lv-name {
  width: 100%;   /* 盒宽钉死为卡内容宽：长名缩字号兜底（flex fit-content 会撑爆盒子躲过 scrollWidth 检测） */
  font-size: 20px; font-weight: 900; color: #3a2410; letter-spacing: .08em;
  text-align: center; white-space: nowrap;
}
.lv-card .lv-desc {
  margin-top: 1.2vh;
  font-size: 14px; line-height: 1.5; color: #5a4426;
  text-align: center;
}
.lv-hint { margin-top: 3.6vh; font-size: 1.9vh; color: #cfe6b8; opacity: .85; letter-spacing: .3em; text-indent: .3em; }

/* ---------- 结算 ---------- */
/* P1-2：深棕黑渐变面板（80% 不透明盖在冻结战场上），金色系文字，胜负双辉光 */
#gameover { background: rgba(5, 10, 5, .6); }
.go-panel {
  display: flex; flex-direction: column; align-items: center; gap: 3vh;
  background: linear-gradient(170deg, rgba(26,18,10,.86) 0%, rgba(42,29,16,.8) 100%);
  border: 1px solid #d4a017; border-radius: 3vh;
  padding: 5vh 7vh 4.4vh;
  box-shadow: 0 2vh 5vh rgba(0,0,0,.65), inset 0 1px 0 rgba(255,217,74,.25), inset 0 0 4vh rgba(0,0,0,.4);
  animation: lvPop .4s cubic-bezier(.2,1.5,.4,1) both;
}
.go-title {
  font-size: 4.6vh; font-weight: 900; letter-spacing: .3em; text-indent: .3em;
  color: #ff8a6a;
  text-shadow: 0 0 18px rgba(192,57,43,.6);
}
.go-title.go-win {
  color: #ffd94a;
  text-shadow: 0 0 18px rgba(255,217,74,.6);
}
.go-sub { font-size: 2.1vh; color: #c9a86a; letter-spacing: .18em; margin-top: .6vh; }
.go-rows { display: flex; flex-direction: column; gap: 1.4vh; width: 100%; }
.go-row { display: flex; justify-content: space-between; gap: 6vh; font-size: 2.4vh; color: #c9a86a; }
.go-row b { color: #ffe9a8; font-size: 2.6vh; text-shadow: 0 0 10px rgba(255,190,60,.25); }

/* P0-2：竖屏不折行 */
#btnRestart { white-space: nowrap; min-width: 68%; }

/* ---------- 3.3 结算战报详情 ---------- */
.btn-detail {
  font-family: inherit; font-size: 2vh; font-weight: 700; letter-spacing: .25em; text-indent: .25em;
  color: #ffd97a; background: rgba(30,20,10,.5);
  border: 1px solid rgba(255,217,74,.4); border-radius: 999px;
  padding: 1.2vh 3.4vh; cursor: pointer;
}
.btn-detail:active { transform: translateY(2px); }
.go-detail { width: 100%; display: flex; flex-direction: column; gap: 1.6vh; }
.gd-title { font-size: 1.9vh; color: #c9a86a; letter-spacing: .3em; text-align: center; opacity: .9; }
.gd-dmgbars {
  display: flex; height: 2.2vh; border-radius: 1.1vh; overflow: hidden;
  background: rgba(0,0,0,.35); border: 1px solid rgba(212,160,23,.35);
}
.gd-dmgbars i { display: block; height: 100%; }
.gd-legend { display: flex; flex-wrap: wrap; gap: .6vh 1.8vh; justify-content: center; }
.gd-legend span { font-size: 1.7vh; color: #c9a86a; display: inline-flex; align-items: center; gap: .8vh; }
.gd-legend i { width: 1.6vh; height: 1.6vh; border-radius: .4vh; display: inline-block; }

/* ── M5-2 战斗光标（0919）：进战斗隐藏系统光标，SVG 准星 translate3d 跟随（仅精确指针设备生效）── */
#crosshair{position:fixed;left:0;top:0;z-index:999;pointer-events:none;will-change:transform;
  display:none;margin:-18px 0 0 -18px;filter:drop-shadow(0 0 4px rgba(255,180,40,.55))}
body.battle-cursor, body.battle-cursor *{cursor:none !important}
body.battle-cursor #crosshair{display:block}
@media (hover:none), (pointer:coarse){ #crosshair{display:none !important} }

/* ── Z-1（0919 审计返工）：prefers-reduced-motion 降级——菜单/结算装饰动画静止 ── */
@media (prefers-reduced-motion: reduce){
  #menu .spirit, .menu-hero img, #menu .halo, #goOverlay .halo, .btn-gold, .ch-btn, .lv-card,
  .banner, #toast, .gd-item, .rot-icon { animation: none !important; transition: none !important; }
}
