/* =========================================================
   悟空五对五 · 5V5 热血对战
   移动端优先，深紫金橙的西游记团战质感
   ========================================================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #0B0818;
  --bg-deep: #07050F;
  --panel: rgba(28, 21, 49, .86);
  --panel-2: rgba(17, 13, 33, .92);
  --gold: #FFD27A;
  --gold-2: #FFB347;
  --gold-3: #FFE9B8;
  --orange: #FF8A3D;
  --orange-deep: #F26419;
  --red: #FF5A4E;
  --ink: #F8EFE4;
  --muted: #A99BBE;
  --line: rgba(255, 205, 135, .18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", "Noto Serif CJK SC", serif;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #05040C;
  color: var(--ink);
  font-family: var(--font);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(255, 138, 61, .07), transparent 70%),
    #05040C;
  overflow: hidden;
}
button {
  font-family: inherit;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
img { display: block; }
p, h1, h2, h3 { margin: 0; }

.app {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, .8);
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   大厅 · 主视觉
   ========================================================= */
.lobby { overflow: hidden; background: var(--bg); }

.art {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: min(46vh, 95vw);
  min-height: 212px;
  max-height: 440px;
  overflow: hidden;
  background: #1A1024;
}
.art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.02);
  transform-origin: 50% 0;
  filter: saturate(1.08) contrast(1.03);
}
.scrim { position: absolute; pointer-events: none; }
.scrim-top {
  inset: 0 0 auto;
  height: 146px;
  background: linear-gradient(180deg, rgba(8, 6, 18, .995) 0%, rgba(8, 6, 18, .97) 36%, rgba(8, 6, 18, .8) 66%, rgba(8, 6, 18, 0) 100%);
}
.scrim-left {
  inset: 0 auto 0 0;
  width: 122px;
  background: linear-gradient(90deg, rgba(8, 6, 18, .94) 0%, rgba(8, 6, 18, .6) 42%, rgba(8, 6, 18, .14) 78%, rgba(8, 6, 18, 0) 100%);
}
.scrim-corner {
  inset: 0 0 auto auto;
  width: 58%;
  height: 178px;
  background: radial-gradient(70% 66% at 84% 16%, rgba(8, 6, 18, .98) 0%, rgba(8, 6, 18, .74) 42%, rgba(8, 6, 18, 0) 78%);
}
.scrim-bottom {
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(11, 8, 24, 0) 0%, rgba(11, 8, 24, .06) 54%, rgba(11, 8, 24, .32) 76%, rgba(11, 8, 24, .9) 94%, var(--bg) 100%);
}

/* 火星粒子 */
.sparks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sparks span {
  position: absolute;
  bottom: 16%;
  width: var(--sz, 3px);
  height: var(--sz, 3px);
  border-radius: 50%;
  background: #FFC46B;
  box-shadow: 0 0 8px 2px rgba(255, 138, 61, .55);
  opacity: 0;
  animation: sparkRise var(--dur, 7s) linear var(--delay, 0s) infinite;
}
@keyframes sparkRise {
  0% { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  14% { opacity: .85; }
  70% { opacity: .5; }
  100% { transform: translate3d(var(--drift, 18px), -62vh, 0) scale(1.15); opacity: 0; }
}

/* 主视觉文案 */
.hero-caption {
  position: absolute;
  left: 16px;
  bottom: 30px;
  z-index: 3;
  pointer-events: none;
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #FFDCA8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
}
.hero-line { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.brush {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.05;
  background: linear-gradient(180deg, #FFF8DE 0%, #FFD987 42%, #F09A32 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: .4px rgba(88, 30, 0, .25);
  filter: drop-shadow(0 2px 0 rgba(68, 22, 0, .7)) drop-shadow(0 0 14px rgba(255, 150, 50, .38));
}
.hero-sep {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(255, 210, 122, .7), transparent);
}
.hero-sub {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 2px;
  color: #FFE9C4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
}

/* =========================================================
   顶部玩家 HUD
   ========================================================= */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 9px) 14px 8px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2A1A12;
  border: 2px solid #FFD27A;
  box-shadow: 0 4px 14px rgba(255, 138, 61, .42), inset 0 0 0 2px rgba(20, 10, 4, .45);
  overflow: visible;
}
.avatar-crop {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background-image: url("images/gen/gptimg_1795253238_look.png");
  background-repeat: no-repeat;
  background-size: 430px auto;
  background-position: -13px -9px;
}
.avatar-shine {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .18), transparent 46%);
  pointer-events: none;
}
.lv-badge {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #FFEBC5;
  background: linear-gradient(180deg, #5A3413, #2A1509);
  border: 1px solid rgba(255, 205, 130, .55);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.lv-badge b { font-size: 9px; color: #fff; }
.hud-id { min-width: 0; padding-top: 1px; }
.hud-name-row { display: flex; align-items: center; gap: 6px; }
.hud-name {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #FFF3DC;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .85);
}
.hud-tag {
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #3B1800;
  background: linear-gradient(180deg, #FFE5A8, #FFB347);
  box-shadow: 0 1px 4px rgba(255, 138, 61, .5);
}
.hud-exp {
  width: 82px;
  height: 3px;
  margin-top: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.hud-exp i {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF8A3D, #FFE39A);
  box-shadow: 0 0 6px rgba(255, 180, 70, .7);
}
.hud-power {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: .4px;
  color: #BEAECF;
  text-shadow: 0 1px 3px #000;
}
.hud-power .mp-icon { width: 12px; height: 12px; color: #FFB347; }
.hud-power b { color: #FFD98E; font-size: 10px; }
.hud-right { flex: 0 0 auto; }
.streak-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  font-size: 10px;
  color: #FFE7BF;
  background: linear-gradient(180deg, rgba(61, 40, 20, .84), rgba(28, 18, 9, .86));
  border: 1px solid rgba(255, 201, 120, .32);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.streak-chip .mp-icon { width: 15px; height: 15px; color: #FFC65A; }
.streak-chip b { color: #FFF3D4; font-size: 12px; }

/* 左侧快捷栏 */
.quick-rail::before {
  content: "";
  position: absolute;
  inset: -8px -5px -7px;
  z-index: -1;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 7, 20, .92) 0%, rgba(10, 7, 20, .66) 100%);
  border: 1px solid rgba(255, 207, 138, .14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.quick-rail {
  position: absolute;
  left: 12px;
  top: calc(var(--safe-top) + 78px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rail-btn {
  width: 46px;
  padding: 4px 0 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-radius: 13px;
  background: rgba(14, 10, 26, .93);
  border: 1px solid rgba(255, 207, 138, .18);
  color: #FFDCA4;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: transform .12s, background .2s;
}
.rail-btn .mp-icon { width: 21px; height: 21px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.rail-btn span { font-size: 8px; letter-spacing: .5px; color: #D9C5A8; }
.rail-btn:active { transform: scale(.92); background: rgba(255, 160, 70, .24); }
.rail-btn .ico-off { display: none; }
body.muted .rail-btn .ico-on { display: none; }
body.muted .rail-btn .ico-off { display: inline-block; }

/* =========================================================
   大厅 · 阵容与开战
   ========================================================= */
.hero-mode {
  position: absolute;
  right: 14px;
  top: calc(var(--safe-top) + 56px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px 6px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(55, 36, 20, .9), rgba(24, 15, 12, .92));
  border: 1px solid rgba(255, 203, 122, .45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .12s, background .2s;
}
.hero-mode:active { transform: scale(.96); background: linear-gradient(135deg, rgba(80, 52, 26, .95), rgba(34, 21, 16, .95)); }
.hm-key {
  font-size: 15px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.5px;
  line-height: 1;
  color: #FFD26E;
  text-shadow: 0 0 10px rgba(255, 138, 61, .6), 0 1px 0 #5A1B00;
}
.hm-txt {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 1px;
  color: #FFE7BC;
  white-space: nowrap;
}
.hero-mode .mp-icon { width: 12px; height: 12px; color: #D9A85C; }

.lobby-body::-webkit-scrollbar { display: none; }
.lobby-body {
  position: relative;
  z-index: 5;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: clamp(9px, 1.8vh, 17px);
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 16px calc(12px + var(--safe-bottom));
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(90% 42% at 50% 0%, rgba(255, 138, 61, .10), transparent 72%),
    var(--bg);
}

.vs-card {
  position: relative;
  padding: 12px 12px 10px;
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(48, 36, 78, .82) 0%, rgba(25, 19, 45, .92) 58%, rgba(17, 13, 32, .95) 100%);
  border: 1px solid rgba(255, 200, 116, .20);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}
.vs-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 214, 140, .6), transparent);
}
.vs-card::after {
  content: "5V5";
  position: absolute;
  right: 10px;
  bottom: -18px;
  font: 900 64px/1 var(--font);
  letter-spacing: -5px;
  color: rgba(255, 194, 110, .055);
  pointer-events: none;
}
.vs-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vs-title { display: flex; align-items: center; gap: 5px; min-width: 0; }
.vs-title .mp-icon { width: 15px; height: 15px; color: #FFB347; }
.vs-title b {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #FFE7BC;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
  white-space: nowrap;
}
.vs-title span {
  font-size: 8px;
  letter-spacing: .5px;
  color: #A796BC;
  padding-left: 5px;
  border-left: 1px solid rgba(255, 210, 140, .22);
  white-space: nowrap;
}
.round-pill {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 9px;
  color: #FFD79A;
  background: rgba(255, 138, 61, .11);
  border: 1px solid rgba(255, 170, 90, .3);
}
.round-pill b { font-size: 10px; color: #FFF1CF; }

.team-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0 5px;
}
.team-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 28px;
  flex: 0 0 auto;
  font-size: 9px;
  letter-spacing: .5px;
  color: #FFD9A2;
}
.team-row.foe .team-label { color: #E7A6AE; }
.dot { width: 5px; height: 5px; border-radius: 50%; display: block; }
.dot.ally { background: #FFC46B; box-shadow: 0 0 7px #FF8A3D; }
.dot.enemy { background: #FF6B7A; box-shadow: 0 0 7px #FF3B52; }
.team-list {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
.hero-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.medal {
  position: relative;
  width: clamp(34px, 10.2vw, 42px);
  height: clamp(34px, 10.2vw, 42px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .3), transparent 46%),
    radial-gradient(circle at 50% 120%, var(--m2, #6A3A1A), var(--m1, #A85A22) 72%);
  border: 1px solid rgba(255, 222, 166, .52);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(40, 16, 4, .3);
  color: #FFF6E2;
  font-family: var(--serif);
  font-size: clamp(15px, 4.6vw, 18px);
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.hero-chip.mine .medal {
  border-color: #FFDE9E;
  box-shadow: 0 0 0 2px rgba(255, 174, 66, .22), 0 4px 12px rgba(255, 120, 30, .35), inset 0 0 0 1px rgba(60, 20, 0, .3);
}
.hero-chip.mine .medal::after {
  content: "本命";
  position: absolute;
  top: -7px;
  right: -9px;
  padding: 1px 4px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 6px;
  font-weight: 800;
  color: #4A1B00;
  background: linear-gradient(180deg, #FFF0BF, #FFB347);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  white-space: nowrap;
}
.hero-chip .cname {
  max-width: 100%;
  font-size: 8px;
  line-height: 1.2;
  color: #C7B7DA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-row.foe .hero-chip .cname { color: #C294A2; }
.team-row.foe .medal { filter: saturate(.78) brightness(.9); }
.team-score {
  flex: 0 0 auto;
  width: 31px;
  text-align: right;
  font-size: 8px;
  font-weight: 700;
  color: #C6B48A;
  font-variant-numeric: tabular-nums;
}
.team-score.enemy { color: #B98A96; }

.vs-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  opacity: .9;
}
.vs-divider span { flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 200, 120, .22), transparent); }
.vs-divider b {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
  color: rgba(255, 210, 140, .6);
}

/* 开战按钮 */
.start-btn {
  position: relative;
  width: 100%;
  height: 62px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  overflow: hidden;
  color: #451A00;
  background:
    linear-gradient(180deg, #FFF0BE 0%, #FFD27A 16%, #FFA33F 52%, #F5751C 84%, #D9530C 100%);
  border: 1px solid #FFE9B8;
  box-shadow:
    0 9px 26px rgba(255, 120, 30, .36),
    0 2px 0 rgba(120, 44, 0, .35),
    inset 0 1px 0 #FFF9E3,
    inset 0 -4px 0 rgba(132, 44, 0, .26);
  transition: transform .1s, box-shadow .2s;
}
.start-btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 15px;
  border: 1px solid rgba(255, 249, 224, .45);
  pointer-events: none;
}
.start-btn:active {
  transform: translateY(2px) scale(.995);
  box-shadow: 0 4px 14px rgba(255, 120, 30, .3), inset 0 1px 0 #FFF9E3, inset 0 -2px 0 rgba(132, 44, 0, .26);
}
.start-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 160%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255, 255, 255, .38), transparent 66%);
  pointer-events: none;
  animation: startGlow 3.4s ease-in-out infinite;
}
@keyframes startGlow {
  0%, 100% { opacity: .45; transform: translate(-50%, -50%) scale(.9); }
  50% { opacity: .9; transform: translate(-50%, -50%) scale(1.08); }
}
.start-shine {
  position: absolute;
  top: -30%;
  left: -40%;
  width: 34%;
  height: 170%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(18deg);
  animation: shineSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shineSweep {
  0%, 62% { left: -45%; opacity: 0; }
  68% { opacity: .8; }
  88%, 100% { left: 118%; opacity: 0; }
}
.start-icon {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(96, 36, 0, .13);
  border: 1px solid rgba(120, 48, 0, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.start-icon .mp-icon { width: 22px; height: 22px; color: #5B2400; }
.start-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.start-copy b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 1px 0 rgba(255, 246, 210, .7);
}
.start-copy small { margin-top: 3px; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: rgba(88, 34, 0, .68); }
.start-arrow { position: relative; z-index: 2; display: flex; align-items: center; opacity: .72; }
.start-arrow .mp-icon { width: 20px; height: 20px; color: #5B2400; }

.lobby-hint {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: .4px;
  line-height: 1.5;
  color: #9B8BB4;
  text-align: center;
}
.lobby-hint .mp-icon { width: 14px; height: 14px; margin-top: 1px; color: #C7A35F; }
.lobby-hint em { display: block; font-style: normal; font-size: 9px; color: #746689; }
.lobby-record {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: -3px;
  font-size: 9px;
  letter-spacing: .3px;
  color: #6F6386;
}
.lobby-record b { color: #B7A3CD; font-weight: 700; }
.lobby-record span { color: #4D445F; }

/* =========================================================
   战斗页
   ========================================================= */
.battle {
  overflow: hidden;
  background: var(--bg-deep);
}
.battle-bg {
  position: absolute;
  inset: -24px;
  background: url("images/gen/gptimg_1795253238_look.png") center 16% / cover no-repeat;
  filter: blur(4px) brightness(.3) saturate(1.28);
  transform: scale(1.08);
}
.battle-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 44% at 50% 58%, rgba(255, 122, 44, .16), transparent 72%),
    radial-gradient(80% 40% at 50% 0%, rgba(110, 70, 220, .18), transparent 72%),
    linear-gradient(180deg, rgba(7, 5, 15, .88) 0%, rgba(9, 7, 20, .5) 26%, rgba(7, 5, 15, .82) 78%, rgba(5, 4, 12, .98) 100%);
}
.battle-hud {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-top) + 9px) 14px 4px;
}
.round-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFE2B0;
  background: rgba(20, 14, 36, .62);
  border: 1px solid rgba(255, 207, 138, .24);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .12s, background .2s;
}
.round-btn .mp-icon { width: 20px; height: 20px; }
.round-btn:active { transform: scale(.9); background: rgba(255, 160, 70, .22); }
.round-btn .ico-off { display: none; }
body.muted .round-btn .ico-on { display: none; }
body.muted .round-btn .ico-off { display: inline-block; }
.wave-info { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wave-round {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #FFE4B4;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9), 0 0 14px rgba(255, 138, 61, .3);
}
.wave-time { font-size: 9px; letter-spacing: 1px; color: #9A89B3; font-variant-numeric: tabular-nums; }

.team-bar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 3px 22px 5px;
}
.tbar { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
.tbar.enemy { justify-content: flex-end; }
.tname { font-size: 9px; letter-spacing: 1px; color: #C9B6A0; white-space: nowrap; }
.tbar.ally .tname { color: #FFD9A2; }
.tbar.enemy .tname { color: #E9A4AE; }
.pips { display: flex; align-items: center; gap: 3px; }
.pip {
  width: 12px;
  height: 6px;
  border-radius: 1px;
  transform: skewX(-22deg);
  background: linear-gradient(180deg, #FFD98A, #E88A2C);
  box-shadow: 0 0 6px rgba(255, 160, 60, .5);
  transition: opacity .3s, background .3s, box-shadow .3s;
}
.tbar.enemy .pip { background: linear-gradient(180deg, #FF8A8A, #B33A4A); box-shadow: 0 0 6px rgba(255, 70, 90, .4); }
.pip.empty { background: rgba(255, 255, 255, .12); box-shadow: none; opacity: .5; }
.bar-vs { font-size: 8px; font-weight: 900; letter-spacing: 1px; color: rgba(255, 210, 140, .55); }

/* 战场 */
.arena {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}
.arena-glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 120%;
  height: 68%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 142, 52, .16), transparent 58%),
    radial-gradient(ellipse at 50% 50%, rgba(112, 74, 255, .10), transparent 70%);
  pointer-events: none;
}
.arena-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 92%;
  height: 30%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 118, .17);
  box-shadow: inset 0 0 40px rgba(255, 140, 50, .10), 0 0 30px rgba(120, 80, 255, .08);
  background: radial-gradient(ellipse, rgba(255, 160, 60, .08), transparent 64%);
  pointer-events: none;
}
.arena-ring::before {
  content: "";
  position: absolute;
  inset: 14% 20%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 210, 140, .12);
}
.arena-seal {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%) rotate(-8deg);
  z-index: 2;
  border-radius: 50%;
  border: 1px solid rgba(255, 207, 138, .16);
  box-shadow: inset 0 0 0 4px rgba(255, 207, 138, .04), inset 0 0 24px rgba(255, 150, 60, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.arena-seal::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 207, 138, .13);
}
.arena-seal span {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 900;
  color: rgba(255, 214, 146, .13);
  text-shadow: 0 0 20px rgba(255, 138, 61, .16);
  line-height: 1;
}
.arena-clash {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(320px, 84%);
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(255, 200, 120, .42), transparent);
  opacity: .8;
  pointer-events: none;
}
.arena-clash i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #FFD88C;
  box-shadow: 0 0 16px 5px rgba(255, 138, 61, .45);
  animation: clashPulse 2.2s ease-in-out infinite;
}
@keyframes clashPulse {
  0%, 100% { opacity: .5; transform: translate(-50%, -50%) rotate(45deg) scale(.8); }
  50% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.25); }
}
.team-zone {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 5px;
  z-index: 3;
}
.enemy-zone { top: 21%; }
.ally-zone { bottom: 18%; }
.enemy-zone .d1, .enemy-zone .d3 { margin-top: 15px; }
.enemy-zone .d2 { margin-top: 30px; }
.ally-zone .d1, .ally-zone .d3 { margin-top: -15px; }
.ally-zone .d2 { margin-top: -30px; }

/* 角色 */
.fighter {
  position: relative;
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 20%;
  transition: opacity .4s;
  will-change: transform;
}
.unit-wrap {
  position: relative;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.unit-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 46px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 196, 110, .28);
  background: radial-gradient(ellipse, rgba(255, 138, 61, .16), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.enemy-zone .unit-wrap::after {
  border-color: rgba(255, 90, 120, .24);
  background: radial-gradient(ellipse, rgba(196, 74, 255, .16), transparent 70%);
}
.unit-shadow {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 34px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 72%);
  filter: blur(.5px);
}
.aura {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 60px;
  height: 60px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 80, .36), rgba(255, 120, 30, .12) 48%, transparent 68%);
  opacity: 0;
  pointer-events: none;
}
.is-hero .aura { opacity: 1; animation: auraPulse 2.4s ease-in-out infinite; }
@keyframes auraPulse {
  0%, 100% { transform: translateX(-50%) scale(.92); opacity: .7; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 1; }
}
.chibi-scale {
  position: relative;
  transform-origin: 50% 100%;
  transition: transform .45s ease, opacity .45s ease, filter .45s ease;
  z-index: 2;
}
.chibi-scale { transform: scale(1.1); }
.is-hero .chibi-scale { transform: scale(1.26); }
.chibi {
  position: relative;
  width: 46px;
  height: 57px;
  transform-origin: 50% 90%;
  animation: chibiIdle 2.8s ease-in-out infinite;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35));
}
@keyframes chibiIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.chibi span { position: absolute; display: block; }
.hair-back {
  left: 8px; top: 3px; width: 30px; height: 27px;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(180deg, var(--hair, #4A2B18), rgba(20, 10, 6, .95));
  z-index: 1;
}
.head {
  left: 12px; top: 2px; width: 22px; height: 21px;
  border-radius: 48% 48% 46% 46%;
  background: radial-gradient(circle at 34% 28%, #FFE2C0 0%, var(--skin, #F2C49B) 56%, #C98F63 100%);
  box-shadow: inset -2px -2px 4px rgba(110, 50, 25, .24);
  z-index: 3;
}
.ear { top: 9px; width: 4px; height: 6px; border-radius: 50%; background: var(--skin, #F2C49B); z-index: 2; }
.ear.l { left: 9px; }
.ear.r { left: 33px; }
.eye { top: 11px; width: 3px; height: 4px; border-radius: 50%; background: #2A1710; z-index: 5; box-shadow: 0 0 1px rgba(255, 255, 255, .5) inset; }
.eye.l { left: 17px; }
.eye.r { left: 26px; }
.brow { top: 8px; width: 4px; height: 1.5px; border-radius: 2px; background: #3D2415; z-index: 5; opacity: .85; }
.brow.l { left: 16px; transform: rotate(8deg); }
.brow.r { left: 26px; transform: rotate(-8deg); }
.mouth { left: 21px; top: 18px; width: 4px; height: 1.5px; border-radius: 2px; background: #A4513D; z-index: 5; opacity: .8; }
.hair-front {
  left: 10px; top: 0; width: 26px; height: 12px;
  background: linear-gradient(180deg, var(--hair, #4A2B18), var(--hair2, #2A150A));
  border-radius: 14px 14px 5px 5px;
  clip-path: polygon(0 0, 100% 0, 100% 58%, 88% 76%, 74% 60%, 60% 82%, 46% 62%, 32% 84%, 18% 62%, 0 78%);
  z-index: 4;
}
.body {
  left: 10px; top: 22px; width: 26px; height: 21px;
  border-radius: 9px 9px 7px 7px;
  background: linear-gradient(180deg, var(--body, #D94A2B) 0%, var(--body2, #8E2416) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16), 0 2px 4px rgba(0, 0, 0, .28);
  z-index: 2;
}
.body::after {
  content: "";
  position: absolute;
  left: 1px; right: 1px; bottom: 4px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent, #FFD166);
  opacity: .82;
  box-shadow: 0 0 4px rgba(255, 210, 120, .3);
}
.arm {
  top: 24px; width: 6px; height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--body, #D94A2B), var(--body2, #8E2416));
  z-index: 1;
  transform-origin: 50% 0;
}
.arm.l { left: 5px; transform: rotate(11deg); }
.arm.r { left: 35px; transform: rotate(-13deg); }
.arm::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--skin, #F2C49B);
}
.leg { top: 41px; width: 8px; height: 13px; border-radius: 3px 3px 4px 4px; background: linear-gradient(180deg, #38304A, #1D1728); z-index: 1; }
.leg.l { left: 13px; }
.leg.r { left: 25px; }
.leg::after {
  content: "";
  position: absolute;
  left: -1px; bottom: -1px;
  width: 10px; height: 4px;
  border-radius: 3px;
  background: #151020;
}
.weapon {
  z-index: 6;
  left: 34px;
  top: 4px;
  width: 3px;
  height: 44px;
  border-radius: 2px;
  background: linear-gradient(90deg, #A06A20, #FFE7A8 42%, #C78B2C);
  transform: rotate(20deg);
  transform-origin: 50% 90%;
  box-shadow: 0 0 6px rgba(255, 190, 80, .55);
}
.wk-bajie .weapon { left: 33px; height: 48px; background: linear-gradient(90deg, #7A4A22, #E0B57A 46%, #8A5A2A); }
.wk-bajie .weapon::before {
  content: "";
  position: absolute;
  left: -6px; top: -3px;
  width: 15px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #FFE7B0, #B8813A);
  box-shadow: 0 0 0 1px rgba(70, 40, 10, .3);
}
.wk-shaseng .weapon { background: linear-gradient(90deg, #5D6B7A, #EAF6FF 46%, #7E92A4); }
.wk-shaseng .weapon::before {
  content: "";
  position: absolute;
  left: -3px; top: -7px;
  width: 9px; height: 9px;
  background: linear-gradient(180deg, #E8F7FF, #8FA8BC);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.wk-nezha .weapon { background: linear-gradient(90deg, #8B2C1E, #FFD08A 44%, #B14327); }
.wk-nezha .weapon::before {
  content: "";
  position: absolute;
  left: -4px; top: -6px;
  width: 11px; height: 11px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #FFE9A8, #FF6B2B);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 120, 40, .8);
}
.wk-longnv .weapon {
  width: 4px;
  height: 40px;
  background: linear-gradient(180deg, rgba(200, 255, 255, .1), #A6F3FF 40%, rgba(120, 230, 255, .2));
  box-shadow: 0 0 10px rgba(120, 230, 255, .65);
  transform: rotate(26deg);
  border-radius: 50%;
}
.wk-niumo .weapon { left: 34px; top: 0; height: 49px; background: linear-gradient(90deg, #6B4A2A, #D8B57C 46%, #7A5430); }
.wk-niumo .weapon::before {
  content: "";
  position: absolute;
  left: -8px; top: -4px;
  width: 18px; height: 12px;
  border-radius: 50% 4px 4px 50%;
  background: linear-gradient(160deg, #F4E9D8, #9A8A76);
  box-shadow: 0 0 0 1px rgba(50, 30, 15, .4);
}
.wk-honghaier .weapon {
  background: linear-gradient(90deg, #8A2410, #FFD08A 46%, #C0431C);
  box-shadow: 0 0 8px rgba(255, 100, 30, .8);
}
.wk-honghaier .weapon::before {
  content: "";
  position: absolute;
  left: -5px; top: -7px;
  width: 13px; height: 13px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 40% 40%, #FFF1A8, #FF7A1E 58%, rgba(200, 40, 0, 0));
  box-shadow: 0 0 12px rgba(255, 100, 20, .9);
  animation: flameFlicker 1.2s infinite alternate;
}
@keyframes flameFlicker {
  0% { transform: scale(.9) rotate(0); opacity: .85; }
  100% { transform: scale(1.15) rotate(12deg); opacity: 1; }
}
.wk-zhizhu .weapon { background: linear-gradient(90deg, #3C1B52, #D58AFF 46%, #6B2F8C); box-shadow: 0 0 8px rgba(200, 100, 255, .55); }
.wk-zhizhu .weapon::before {
  content: "";
  position: absolute;
  left: -6px; top: -5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #E5B8FF;
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-20deg);
}
.wk-baigu .weapon { background: linear-gradient(90deg, #6C6888, #F2ECFF 46%, #9C96B8); }
.wk-baigu .weapon::before {
  content: "";
  position: absolute;
  left: -8px; top: -8px;
  width: 20px; height: 18px;
  border-radius: 50% 50% 6px 6px;
  background: conic-gradient(from 210deg at 50% 100%, #F7F2FF, #BDB4E0, #F7F2FF);
  clip-path: polygon(50% 100%, 0 12%, 22% 30%, 50% 0, 78% 30%, 100% 12%);
  opacity: .9;
}
.wk-huangmei .weapon { background: linear-gradient(90deg, #7A5A20, #FFE9A8 46%, #A87A28); }
.wk-huangmei .weapon::before {
  content: "";
  position: absolute;
  left: -7px; top: -9px;
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 2px solid #FFDF8E;
  box-shadow: 0 0 8px rgba(255, 200, 100, .6), inset 0 0 6px rgba(255, 200, 100, .4);
}

.wk-wukong .crown {
  left: 13px; top: -1px; width: 20px; height: 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #A96F1C, #FFF2C2 46%, #A96F1C);
  box-shadow: 0 0 7px rgba(255, 210, 120, .65);
  z-index: 7;
}
.wk-wukong .crown::before, .wk-wukong .crown::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 5px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF6D0, #FFC24D);
  box-shadow: 0 0 5px rgba(255, 190, 70, .8);
}
.wk-wukong .crown::before { left: 1px; }
.wk-wukong .crown::after { right: 1px; }
.wk-wukong .scarf {
  left: 5px; top: 22px; width: 13px; height: 7px;
  border-radius: 5px 2px 5px 2px;
  background: linear-gradient(180deg, #E54B33, #8F1D14);
  transform: rotate(-18deg);
  z-index: 1;
  box-shadow: 0 0 5px rgba(230, 60, 30, .4);
}
.wk-niumo .horn {
  top: 1px; width: 7px; height: 10px;
  background: linear-gradient(180deg, #F4EAD8, #A08B70);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  z-index: 4;
}
.wk-niumo .horn.l { left: 10px; transform: rotate(-24deg); }
.wk-niumo .horn.r { left: 30px; transform: rotate(24deg); }
.wk-honghaier .flame {
  left: 12px; top: -7px; width: 22px; height: 15px;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 80%, #FFE9A0, #FF7A1E 48%, rgba(200, 40, 0, 0) 72%);
  filter: blur(1px);
  z-index: 1;
  animation: flameFlicker 1s infinite alternate;
}
.wk-longnv .hair-back {
  left: 10px; top: 6px; width: 26px; height: 36px;
  border-radius: 14px 14px 50% 50%;
  background: linear-gradient(180deg, #202B4A, #101528);
}

.fighter .plate {
  position: relative;
  z-index: 5;
  width: 74px;
  margin-top: 1px;
  text-align: center;
}
.uname {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #FFE9C9;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, .8);
  white-space: nowrap;
}
.enemy-zone .uname { color: #FFC9CE; }
.uhp {
  width: 56px;
  height: 5px;
  margin: 2px auto 0;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(0, 0, 0, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.uhp i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #2FD87E, #B9FF72);
  transition: width .18s ease-out;
}
.enemy-zone .uhp i { background: linear-gradient(90deg, #FF5A5A, #FFAE63); }
.is-hero .uhp { width: 62px; height: 6px; border-color: rgba(255, 214, 130, .5); }
.is-hero .uhp i { background: linear-gradient(90deg, #FFBE3E, #FFF1B4); }

.fighter.targeted::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 18px;
  height: 9px;
  transform: translateX(-50%);
  border-left: 2px solid #FFD166;
  border-right: 2px solid #FFD166;
  border-top: 2px solid #FFD166;
  border-radius: 3px 3px 0 0;
  filter: drop-shadow(0 0 4px #FF8A3D);
  animation: targetBob .9s ease-in-out infinite;
  z-index: 8;
}
@keyframes targetBob {
  0%, 100% { transform: translate(-50%, 0); opacity: .85; }
  50% { transform: translate(-50%, -4px); opacity: 1; }
}
.fighter.hit .chibi { filter: brightness(2.6) saturate(.35) drop-shadow(0 0 8px #fff); }
.fighter.atk .chibi { animation: lungeUp .36s cubic-bezier(.2, .9, .3, 1); }
.enemy-zone .fighter.atk .chibi { animation-name: lungeDown; }
@keyframes lungeUp {
  0% { transform: translateY(0) scale(1); }
  32% { transform: translateY(-24px) scale(1.07) rotate(-4deg); }
  60% { transform: translateY(-18px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes lungeDown {
  0% { transform: translateY(0) scale(1); }
  32% { transform: translateY(24px) scale(1.07) rotate(4deg); }
  60% { transform: translateY(18px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}
.fighter.casting .chibi { animation: castSpin .8s cubic-bezier(.3, .1, .3, 1); }
@keyframes castSpin {
  0% { transform: translateY(0) rotate(0) scale(1); }
  30% { transform: translateY(-16px) rotate(180deg) scale(1.12); }
  70% { transform: translateY(-10px) rotate(340deg) scale(1.05); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}
.fighter.dead .chibi-scale {
  transform: scale(.9) rotate(74deg) translate(8px, 6px);
  opacity: .3;
  filter: grayscale(1) brightness(.75);
}
.fighter.dead .plate { opacity: .28; }
.fighter.dead .unit-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 46px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 196, 110, .28);
  background: radial-gradient(ellipse, rgba(255, 138, 61, .16), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.enemy-zone .unit-wrap::after {
  border-color: rgba(255, 90, 120, .24);
  background: radial-gradient(ellipse, rgba(196, 74, 255, .16), transparent 70%);
}
.unit-shadow { opacity: .2; }
.fighter.dead .aura { display: none; }
.fighter.dead { pointer-events: none; }

/* 战场 HUD */
.combo-hud {
  position: absolute;
  left: 10px;
  top: 43%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .7);
}
.combo-hud.show { opacity: 1; transform: none; }
.combo-hud span { font-size: 8px; letter-spacing: 2px; color: #FFD9A0; }
.combo-hud b {
  font-size: 30px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #FFF7DD, #FFC24D 55%, #F07A18);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)) drop-shadow(0 0 10px rgba(255, 138, 61, .4));
}
.combo-hud em { font-size: 9px; font-style: normal; font-weight: 700; color: #FFE3AE; }
.combo-hud.pop b { animation: comboPop .18s ease-out; }
@keyframes comboPop {
  0% { transform: scale(1.35) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); }
}
.battle-hint {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 6;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 9px;
  letter-spacing: .4px;
  color: #D9C7E8;
  background: rgba(12, 8, 24, .5);
  border: 1px solid rgba(255, 255, 255, .06);
  white-space: nowrap;
  transition: opacity .4s;
  pointer-events: none;
}
.battle-hint.hide { opacity: 0; }

/* 特效 */
.fx-layer { position: absolute; inset: 0; z-index: 9; overflow: hidden; pointer-events: none; }
.fx-slash {
  position: absolute;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--fx, #FFD166);
  border-right-color: rgba(255, 209, 102, .28);
  filter: drop-shadow(0 0 9px var(--fx, #FFD166));
  transform-origin: 50% 50%;
  animation: slashAnim .38s ease-out forwards;
}
@keyframes slashAnim {
  0% { transform: rotate(-70deg) scale(.35); opacity: 0; }
  22% { opacity: 1; }
  100% { transform: rotate(26deg) scale(1.18); opacity: 0; }
}
.fx-dmg {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: .3px;
  color: #FFEFC4;
  -webkit-text-stroke: .6px rgba(58, 16, 0, .55);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 #4A1500, 0 0 8px rgba(255, 150, 50, .75);
  white-space: nowrap;
  animation: dmgFloat .8s ease-out forwards;
}
.fx-dmg.crit { font-size: 20px; color: #FFFBEA; -webkit-text-stroke: .7px rgba(80, 20, 0, .5); text-shadow: 0 1px 0 #A32F00, 0 0 10px #FF8A3D; }
.fx-dmg.hurt { color: #FF9A9A; -webkit-text-stroke: .6px rgba(50, 0, 0, .5); text-shadow: 0 1px 0 #3A0000, 0 0 8px rgba(255, 40, 40, .6); }
@keyframes dmgFloat {
  0% { transform: translate(-50%, -30%) scale(.7); opacity: 0; }
  16% { transform: translate(-50%, -58%) scale(1.14); opacity: 1; }
  100% { transform: translate(-50%, -190%) scale(.92); opacity: 0; }
}
.fx-burst {
  position: absolute;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 214, .92) 0%, rgba(255, 160, 60, .5) 36%, transparent 68%);
  animation: burstAnim .32s ease-out forwards;
}
@keyframes burstAnim {
  0% { transform: scale(.3); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}
.fx-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 54%, rgba(255, 238, 180, .7), rgba(255, 138, 61, .22) 38%, transparent 68%);
  animation: flashFade .55s ease-out forwards;
}
@keyframes flashFade { 0% { opacity: 1; } 100% { opacity: 0; } }
.fx-sweep {
  position: absolute;
  left: -24%;
  top: 44%;
  width: 148%;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 226, 150, .18) 18%, rgba(255, 250, 225, .96) 50%, rgba(255, 226, 150, .18) 82%, transparent 100%);
  filter: blur(.6px);
  box-shadow: 0 0 32px 8px rgba(255, 180, 60, .6);
  transform: rotate(-9deg) translateX(-100%);
  animation: sweepAnim .5s cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes sweepAnim {
  0% { transform: rotate(-9deg) translateX(-70%); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: rotate(-9deg) translateX(70%); opacity: 0; }
}
.fx-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFE6AE;
  text-shadow: 0 0 12px rgba(255, 138, 61, .9), 0 2px 2px #4A1500;
  white-space: nowrap;
  animation: markRise .7s ease-out forwards;
}
@keyframes markRise {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -170%) scale(1); }
}
.battle-banner {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 13;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  pointer-events: none;
  animation: bannerIn 1.45s ease-out forwards;
}
.battle-banner b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #FFF1C8;
  text-shadow: 0 0 22px #FF8A3D, 0 2px 0 #6A1F00, 0 0 3px #6A1F00;
}
.battle-banner span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 3px;
  color: #FFCF87;
  text-shadow: 0 1px 4px #000;
}
@keyframes bannerIn {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(.86); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  28% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(.98); }
}
.arena.shake { animation: arenaShake .18s linear; }
.arena.shake-big { animation: arenaShakeBig .26s linear; }
@keyframes arenaShake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, -2px); }
}
@keyframes arenaShakeBig {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px) rotate(-.3deg); }
  40% { transform: translate(6px, -3px) rotate(.3deg); }
  60% { transform: translate(-4px, -4px); }
  80% { transform: translate(4px, 3px); }
}

/* 底部操作区 */
.controls {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(7, 5, 15, 0) 0%, rgba(7, 5, 15, .78) 34%, rgba(7, 5, 15, .97) 100%);
}
.skill-btn {
  position: relative;
  flex: 0 0 auto;
  width: clamp(58px, 17vw, 68px);
  height: clamp(58px, 17vw, 68px);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #FFE8B8;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .24), transparent 42%),
    linear-gradient(160deg, #54317A 0%, #2A1944 58%, #171026 100%);
  border: 2px solid rgba(255, 207, 138, .38);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14);
  overflow: hidden;
  transition: transform .1s, filter .2s;
}
.skill-btn .mp-icon, .skill-btn b, .skill-btn small { position: relative; z-index: 3; }
.skill-btn .mp-icon { width: 24px; height: 24px; color: #FFD98A; filter: drop-shadow(0 0 6px rgba(255, 180, 70, .5)); }
.skill-btn b { font-size: 10px; letter-spacing: 1px; line-height: 1; }
.skill-btn small { font-size: 7px; color: #DCC9F2; line-height: 1; }
.skill-btn.ready { animation: skillReady 1.8s ease-in-out infinite; }
@keyframes skillReady {
  0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 0 0 rgba(255, 190, 80, .28), inset 0 1px 0 rgba(255, 255, 255, .14); }
  50% { box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 0 5px rgba(255, 190, 80, .07), 0 0 18px rgba(255, 150, 50, .35), inset 0 1px 0 rgba(255, 255, 255, .14); }
}
.skill-btn:active { transform: scale(.93); }
.skill-btn.cooling { filter: saturate(.7) brightness(.82); }
.skill-btn.cooling.ready { animation: none; }
.skill-btn:disabled { opacity: .45; filter: grayscale(.7); }
.cd-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.combo-meter {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 148px;
  padding: 7px 10px 8px;
  border-radius: 12px;
  background: rgba(20, 14, 36, .62);
  border: 1px solid rgba(255, 205, 135, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.cm-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.cm-top span { font-size: 8px; letter-spacing: .5px; color: #A898C2; white-space: nowrap; }
.cm-top b { font-size: 9px; font-weight: 800; color: #FFD98E; }
.meter { height: 5px; margin-top: 5px; border-radius: 3px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF8A3D, #FFE08A);
  box-shadow: 0 0 7px rgba(255, 170, 60, .65);
  transition: width .15s ease-out;
}
.attack-btn {
  position: relative;
  flex: 0 0 auto;
  width: clamp(80px, 24vw, 94px);
  height: clamp(80px, 24vw, 94px);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #4A1B00;
  background:
    radial-gradient(circle at 34% 26%, #FFF4CE 0%, #FFD27A 24%, #FFA33F 56%, #F5751C 82%, #C94A08 100%);
  border: 3px solid #FFE7B0;
  box-shadow:
    0 0 0 5px rgba(255, 138, 61, .12),
    0 12px 26px rgba(255, 90, 20, .42),
    inset 0 -6px 12px rgba(120, 30, 0, .32),
    inset 0 2px 0 rgba(255, 255, 255, .55);
  transition: transform .08s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.attack-btn .mp-icon { width: 30px; height: 30px; color: #5B2400; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .5)); }
.attack-btn b { font-size: 11px; font-weight: 900; letter-spacing: 2px; line-height: 1.2; }
.attack-btn:active { transform: scale(.93); box-shadow: 0 0 0 8px rgba(255, 138, 61, .16), 0 5px 14px rgba(255, 90, 20, .34), inset 0 -3px 8px rgba(120, 30, 0, .3); }
.attack-btn:disabled { opacity: .42; filter: grayscale(.85); }
.atk-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 210, 130, .36);
  animation: ringSpin 12s linear infinite;
  pointer-events: none;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.attack-btn.pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 240, 190, .8);
  animation: tapPulse .32s ease-out forwards;
  pointer-events: none;
}
@keyframes tapPulse {
  0% { transform: scale(.95); opacity: .9; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* =========================================================
   结算
   ========================================================= */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 3, 11, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: overlayIn .25s ease-out;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.result-card {
  position: relative;
  width: 100%;
  max-width: 342px;
  padding: 26px 20px 20px;
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(165deg, #302456 0%, #1A1333 46%, #0F0B1E 100%);
  border: 1px solid rgba(255, 210, 140, .34);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .13);
  overflow: hidden;
  animation: cardIn .42s cubic-bezier(.16, 1, .3, 1);
}
@keyframes cardIn {
  0% { opacity: 0; transform: translateY(22px) scale(.92); }
  100% { opacity: 1; transform: none; }
}
.result-glow {
  position: absolute;
  left: 50%;
  top: -46%;
  width: 120%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 170, 70, .3), transparent 62%);
  pointer-events: none;
}
.seal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 2px solid currentColor;
  color: #FF7A5C;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 900;
  transform: rotate(-12deg);
  opacity: .9;
  box-shadow: inset 0 0 0 2px rgba(255, 122, 92, .18);
  animation: sealIn .5s .15s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes sealIn {
  0% { opacity: 0; transform: rotate(-30deg) scale(1.5); }
  100% { opacity: .9; transform: rotate(-12deg) scale(1); }
}
.result-card.lose .seal { color: #8E9AC4; box-shadow: inset 0 0 0 2px rgba(142, 154, 196, .16); }
.result-eyebrow {
  position: relative;
  font-size: 9px;
  letter-spacing: 4px;
  color: #B9A6D6;
  margin-bottom: 3px;
}
.result-title {
  position: relative;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1.15;
  background: linear-gradient(180deg, #FFF9E3 0%, #FFD987 42%, #F09A32 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(70, 22, 0, .55)) drop-shadow(0 0 18px rgba(255, 150, 50, .38));
  -webkit-text-stroke: .5px rgba(90, 30, 0, .2);
}
.result-card.lose .result-title {
  background: linear-gradient(180deg, #F2F4FF 0%, #B9C3E8 48%, #6E7BA8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 3px 0 rgba(10, 14, 30, .6));
}
.result-sub { position: relative; margin-top: 3px; font-size: 11px; color: #B7A6CD; letter-spacing: .5px; }
.result-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 210, 140, .14);
  border-bottom: 1px solid rgba(255, 210, 140, .14);
}
.result-stats > div { position: relative; display: flex; flex-direction: column; gap: 3px; }
.result-stats > div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  width: 1px;
  height: 72%;
  background: linear-gradient(180deg, transparent, rgba(255, 210, 140, .2), transparent);
}
.result-stats b {
  font-size: 20px;
  font-weight: 800;
  color: #FFE3A8;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.result-stats span { font-size: 9px; letter-spacing: .5px; color: #8F80A8; }
.result-btns { position: relative; display: flex; flex-direction: column; gap: 8px; }
.btn-primary {
  height: 50px;
  border-radius: 15px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #451A00;
  background: linear-gradient(180deg, #FFF0BE, #FFD27A 24%, #FFA33F 62%, #F5751C 100%);
  border: 1px solid #FFE9B8;
  box-shadow: 0 8px 20px rgba(255, 120, 30, .34), inset 0 1px 0 #FFF9E3, inset 0 -3px 0 rgba(132, 44, 0, .22);
  transition: transform .1s;
}
.btn-primary:active { transform: translateY(2px) scale(.99); }
.btn-ghost {
  height: 42px;
  border-radius: 13px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #CDBBE3;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
}
.btn-ghost:active { background: rgba(255, 255, 255, .1); }

/* =========================================================
   规则 / 战绩弹层
   ========================================================= */
.sheet-wrap {
  z-index: 60;
  align-items: flex-end;
  padding: 0;
  background: rgba(4, 2, 9, .66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sheet-mask { position: absolute; inset: 0; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 78%;
  overflow-y: auto;
  padding: 16px 20px calc(22px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: linear-gradient(175deg, #241A40 0%, #151025 58%, #0E0A1B 100%);
  border-top: 1px solid rgba(255, 210, 140, .34);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .65);
  animation: sheetUp .32s cubic-bezier(.16, 1, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-head h3 { font-family: var(--serif); font-size: 19px; font-weight: 900; letter-spacing: 2px; color: #FFE7BC; }
.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #BFAED6;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}
.sheet-close .mp-icon { width: 18px; height: 18px; }
.sheet-body { font-size: 13px; line-height: 1.75; color: #C7B8DC; }
.sheet-body .rule-line {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.sheet-body .rule-line:last-child { border-bottom: 0; }
.sheet-body .rule-line i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: #FFB347;
  box-shadow: 0 0 7px rgba(255, 160, 60, .7);
}
.sheet-body .rule-line b { color: #FFE1AC; font-weight: 700; }
.sheet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 14px;
}
.sheet-stat {
  padding: 12px 6px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 210, 140, .12);
}
.sheet-stat b { display: block; font-size: 21px; color: #FFD98E; font-weight: 800; line-height: 1.1; }
.sheet-stat span { display: block; margin-top: 3px; font-size: 9px; color: #9B8AB2; }
.sheet-note { margin-top: 10px; font-size: 10px; color: #7D6F92; text-align: center; }

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 80;
  transform: translate(-50%, 12px);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: .3px;
  color: #FFEAC4;
  background: rgba(20, 14, 34, .92);
  border: 1px solid rgba(255, 205, 135, .24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   适配
   ========================================================= */
@media (max-height: 700px) {
  .hero-caption { bottom: 22px; }
  .brush { font-size: 25px; }
  .hero-mode {
  position: absolute;
  right: 14px;
  top: calc(var(--safe-top) + 56px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px 6px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(55, 36, 20, .9), rgba(24, 15, 12, .92));
  border: 1px solid rgba(255, 203, 122, .45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .12s, background .2s;
}
.hero-mode:active { transform: scale(.96); background: linear-gradient(135deg, rgba(80, 52, 26, .95), rgba(34, 21, 16, .95)); }
.hm-key {
  font-size: 15px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.5px;
  line-height: 1;
  color: #FFD26E;
  text-shadow: 0 0 10px rgba(255, 138, 61, .6), 0 1px 0 #5A1B00;
}
.hm-txt {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 1px;
  color: #FFE7BC;
  white-space: nowrap;
}
.hero-mode .mp-icon { width: 12px; height: 12px; color: #D9A85C; }

.lobby-body::-webkit-scrollbar { display: none; }
.lobby-body { gap: 8px; padding-top: 8px; }
  .vs-card { padding: 10px 11px 8px; }
  .team-row { padding: 5px 0 3px; }
  .start-btn { height: 56px; }
  .lobby-record { display: none; }
  .enemy-zone { top: 14%; }
  .ally-zone { bottom: 12%; }
}
@media (max-height: 600px) {
  .art { min-height: 190px; }
  .hud-name { font-size: 13px; }
  .hero-caption { display: none; }
  .vs-card { padding: 8px 10px 6px; }
  .vs-title span { display: none; }
  .team-row { padding: 3px 0 2px; }
  .hero-chip .cname { display: none; }
  .start-btn { height: 52px; }
  .start-copy b { font-size: 19px; }
  .lobby-hint { display: none; }
}
@media (min-width: 600px) {
  body { background: #05040C; }
  .app { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   大厅 V2 · 对齐「5V5 热血对战」实机主视觉
   满屏大圣原画 + 金色 HUD + 双模式卡 + 开始游戏
   ========================================================= */
.lobby {
  background: #07040F;
  isolation: isolate;
}
.lobby-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #140B1E;
}
.lobby-bg-img {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  object-position: 76% 18%;
  filter: saturate(1.07) contrast(1.03) brightness(.96);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55.8%, rgba(0, 0, 0, .78) 56.8%, transparent 58.5%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55.8%, rgba(0, 0, 0, .78) 56.8%, transparent 58.5%, transparent 100%);
}
.lobby-top-shade {
  position: absolute;
  inset: 0 0 auto;
  height: 150px;
  background:
    linear-gradient(180deg, rgba(6, 3, 14, .97) 0%, rgba(6, 3, 14, .9) 24%, rgba(6, 3, 14, .55) 58%, rgba(6, 3, 14, 0) 100%),
    radial-gradient(46% 104px at 100% 58px, rgba(6, 3, 14, .96), rgba(6, 3, 14, .4) 55%, transparent 80%);
  pointer-events: none;
}
.lobby-bottom-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(7, 4, 16, 0) 0%, rgba(7, 4, 16, .22) 34%, rgba(7, 4, 16, .74) 72%, rgba(7, 4, 16, .96) 100%);
  pointer-events: none;
}
.lobby .sparks { z-index: 1; opacity: .8; }

/* ---------- 顶部玩家 HUD ---------- */
.lg-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(var(--safe-top) + 7px) 10px 6px;
  pointer-events: none;
}
.lg-hud > * { pointer-events: auto; }
.lg-player {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 auto;
  min-width: 0;
}
.lg-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2A1A12;
  border: 2px solid #FFD27A;
  box-shadow:
    0 0 0 2px rgba(66, 26, 4, .65),
    0 4px 14px rgba(255, 138, 61, .42),
    inset 0 0 0 2px rgba(20, 10, 4, .45);
}
.lg-avatar-crop {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background-image: url("images/gen/gptimg_1795253238_look.png");
  background-repeat: no-repeat;
  background-size: 480% auto;
  background-position: 43% 17%;
}
.lg-avatar-ring {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(255, 255, 255, .24), transparent 44%);
  box-shadow: inset 0 0 8px rgba(255, 120, 40, .24);
  pointer-events: none;
}
.lg-lv {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #FFEBC5;
  background: linear-gradient(180deg, #5A3413, #2A1509);
  border: 1px solid rgba(255, 205, 130, .55);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.lg-lv b { font-size: 8.5px; color: #fff; }
.lg-id { min-width: 0; padding-top: 1px; }
.lg-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.lg-name {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #FFF3DC;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .9);
}
.lg-tag {
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 6.5px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #3B1800;
  background: linear-gradient(180deg, #FFE5A8, #FFB347);
  box-shadow: 0 1px 4px rgba(255, 138, 61, .5);
}
.lg-exp {
  width: 72px;
  height: 3px;
  margin-top: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
}
.lg-exp i {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF8A3D, #FFE39A);
  box-shadow: 0 0 6px rgba(255, 180, 70, .7);
}
.lg-power {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: .3px;
  color: #C4B3D6;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
}
.lg-power .mp-icon { width: 11px; height: 11px; color: #FFB347; }
.lg-power b { color: #FFD98E; font-size: 9px; }

.lg-wallet {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
}
.lg-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0 6px 0 5px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 12, 30, .82), rgba(8, 5, 15, .88));
  border: 1px solid rgba(255, 207, 138, .26);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.lg-chip .mp-icon { width: 15px; height: 15px; color: #FFC95E; filter: drop-shadow(0 0 4px rgba(255, 160, 50, .4)); }
.lg-chip.blue .mp-icon { color: #8DE2FF; filter: drop-shadow(0 0 4px rgba(90, 200, 255, .4)); }
.lg-chip-num { display: flex; flex-direction: column; line-height: 1; }
.lg-chip-num b { font-size: 11px; font-weight: 800; color: #FFF2D2; font-variant-numeric: tabular-nums; }
.lg-chip-num em { margin-top: 1px; font-size: 6px; font-style: normal; letter-spacing: .5px; color: #A897BB; }

.lg-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto;
}
.lg-tool {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E8D6F6;
  background: linear-gradient(180deg, rgba(29, 20, 44, .78), rgba(10, 6, 18, .82));
  border: 1px solid rgba(255, 207, 138, .22);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: transform .12s, background .2s;
}
.lg-tool .mp-icon { width: 17px; height: 17px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
.lg-tool:active { transform: scale(.88); background: rgba(255, 160, 70, .26); }

/* ---------- 右上 5V5 巅峰对决 ---------- */
.peak-card {
  position: absolute;
  top: calc(var(--safe-top) + 60px);
  right: 11px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  min-height: 56px;
  padding: 5px 7px 5px 5px;
  border-radius: 14px;
  color: #FFE9C0;
  background:
    linear-gradient(135deg, rgba(82, 42, 15, .9) 0%, rgba(35, 17, 28, .93) 58%, rgba(19, 10, 24, .95) 100%);
  border: 1px solid rgba(255, 203, 122, .55);
  box-shadow:
    0 0 0 14px rgba(7, 4, 16, .62),
    0 6px 18px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 0 18px rgba(255, 130, 40, .14);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: transform .12s;
}
.peak-card:active { transform: scale(.96); }
.peak-emblem {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, .28), transparent 46%),
    linear-gradient(160deg, #8A3A12, #4A1A0A);
  border: 1px solid rgba(255, 220, 160, .5);
  box-shadow: inset 0 0 8px rgba(255, 140, 40, .4);
  overflow: hidden;
}
.peak-emblem::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 60, .4), transparent 68%);
}
.peak-emblem .mp-icon { position: relative; z-index: 1; width: 23px; height: 23px; color: #FFD98A; filter: drop-shadow(0 0 6px rgba(255, 140, 40, .8)); }
.peak-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.peak-copy b {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #FFEFC9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  white-space: nowrap;
}
.peak-copy b em {
  font-family: var(--font);
  font-size: 13px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.4px;
  color: #FFD26E;
  text-shadow: 0 0 8px rgba(255, 138, 61, .6);
}
.peak-copy small {
  font-size: 7.5px;
  letter-spacing: .3px;
  color: #D5B98E;
  white-space: nowrap;
}
.peak-copy small i { font-style: normal; font-weight: 800; color: #FFF1CC; }
.peak-arrow { flex: 0 0 auto; width: 13px; height: 13px; color: #C99751; }

/* ---------- 左侧战况栏 ---------- */
.stat-rail {
  position: absolute;
  left: 10px;
  top: calc(var(--safe-top) + 128px);
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-medal {
  width: 50px;
  padding: 5px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 14, 34, .9) 0%, rgba(9, 5, 17, .92) 100%);
  border: 1px solid rgba(255, 207, 138, .24);
  box-shadow:
    0 5px 14px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stat-medal .mp-icon {
  width: 19px;
  height: 19px;
  color: #FFC46B;
  filter: drop-shadow(0 0 5px rgba(255, 150, 50, .45));
}
.stat-medal:nth-child(2) .mp-icon { color: #FFD98A; }
.stat-medal:nth-child(3) .mp-icon { color: #8DE2FF; filter: drop-shadow(0 0 5px rgba(90, 200, 255, .4)); }
.stat-medal b { font-size: 9.5px; font-weight: 800; line-height: 1.1; color: #FFEAC4; font-variant-numeric: tabular-nums; }
.stat-medal span { font-size: 7.5px; letter-spacing: .5px; color: #A18FB8; }

/* ---------- 底部大厅操作区 ---------- */
.lobby-dock {
  position: relative;
  z-index: 6;
  margin-top: auto;
  width: 100%;
  min-height: 44.2%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 14px 0;
  background:
    linear-gradient(180deg, rgba(7, 4, 16, .5) 0%, rgba(7, 4, 16, .9) 5%, rgba(7, 4, 16, .99) 12%, #07040F 28%, #07040F 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.dock-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #FFE7BC;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .75);
}
.dock-title .mp-icon { width: 15px; height: 15px; color: #FFB347; }
.dock-sub { font-size: 8px; letter-spacing: 1px; color: #9E8CB5; }
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mode-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.5;
  min-height: 110px;
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  background: #1A1022;
  border: 1.5px solid rgba(255, 196, 110, .58);
  box-shadow:
    0 9px 22px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(255, 232, 186, .14),
    0 0 16px rgba(255, 120, 30, .12);
  transition: transform .12s ease, box-shadow .2s ease;
  isolation: isolate;
}
.mode-card.rank {
  border-color: rgba(148, 203, 255, .55);
  box-shadow:
    0 9px 22px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(208, 238, 255, .14),
    0 0 16px rgba(90, 170, 255, .12);
}
.mode-card:active {
  transform: scale(.972);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 232, 186, .2);
}
.mode-art {
  position: absolute;
  inset: 0;
  background-image: url("images/gen/gptimg_1795253238_look.png");
  background-repeat: no-repeat;
  filter: saturate(1.08) contrast(1.03) brightness(.9);
  transition: transform .35s ease;
  z-index: 0;
}
.mode-card.team .mode-art {
  background-size: 238% auto;
  background-position: 9% 72%;
}
.mode-card.rank .mode-art {
  background-size: 238% auto;
  background-position: 88% 72%;
}
.mode-card:active .mode-art { transform: scale(1.045); }
.mode-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(9, 5, 18, 0) 62%, rgba(9, 5, 18, .12) 78%, rgba(9, 5, 18, .34) 92%, rgba(9, 5, 18, .5) 100%),
    linear-gradient(90deg, rgba(9, 5, 18, .16), transparent 26%);
}
.mode-card.rank .mode-veil {
  background:
    linear-gradient(180deg, rgba(5, 12, 26, 0) 62%, rgba(5, 12, 26, .13) 78%, rgba(5, 12, 26, .36) 92%, rgba(5, 12, 26, .52) 100%),
    linear-gradient(90deg, rgba(5, 12, 26, .17), transparent 26%);
}
/* 开始游戏 */
.cta-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 13px;
}
.side-stat {
  flex: 0 0 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(34, 21, 46, .9), rgba(12, 7, 21, .93));
  border: 1px solid rgba(255, 201, 130, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 5px 14px rgba(0, 0, 0, .35);
}
.side-stat .mp-icon { width: 17px; height: 17px; color: #FFC46B; }
.side-stat b { font-size: 13px; font-weight: 800; line-height: 1.1; color: #FFEAC4; font-variant-numeric: tabular-nums; }
.side-stat span { font-size: 7px; letter-spacing: .2px; color: #9C8AB3; white-space: nowrap; }
.play-btn {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 84px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #481A00;
  background:
    linear-gradient(180deg, #FFF1BE 0%, #FFD37C 18%, #FFA33F 54%, #F5751C 85%, #D5530B 100%);
  border: 1.5px solid #FFE9B8;
  box-shadow:
    0 10px 26px rgba(255, 110, 20, .4),
    0 2px 0 rgba(120, 44, 0, .35),
    inset 0 1px 0 #FFF9E3,
    inset 0 -4px 0 rgba(132, 44, 0, .28);
  transition: transform .1s ease, box-shadow .2s ease;
}
.play-btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 13px;
  border: 1px solid rgba(255, 249, 224, .48);
  pointer-events: none;
}
.play-btn:active {
  transform: translateY(2px) scale(.995);
  box-shadow: 0 4px 14px rgba(255, 110, 20, .34), inset 0 1px 0 #FFF9E3, inset 0 -2px 0 rgba(132, 44, 0, .28);
}
.play-shine {
  position: absolute;
  top: -40%;
  left: -40%;
  width: 30%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .62), transparent);
  transform: rotate(16deg);
  animation: playShine 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes playShine {
  0%, 64% { left: -42%; opacity: 0; }
  70% { opacity: .85; }
  90%, 100% { left: 118%; opacity: 0; }
}
.play-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.play-copy b {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 1px 0 rgba(255, 246, 210, .72);
}
.play-copy small { margin-top: 5px; font-size: 9px; font-weight: 800; letter-spacing: .8px; color: rgba(88, 34, 0, .66); }
.play-arrow {
  position: relative;
  z-index: 2;
  width: 21px;
  height: 21px;
  margin-left: 1px;
  color: #5B2400;
  opacity: .7;
}

.lg-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 9px 0 7px;
  font-size: 9.5px;
  letter-spacing: .3px;
  color: #A28FB8;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.lg-hint .mp-icon { width: 13px; height: 13px; color: #C7A35F; }
.lg-hint span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 底部游戏功能条 */
.dock-nav {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  margin: 0 -14px;
  padding: 5px 3px calc(6px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(10, 6, 20, .6) 0%, rgba(7, 4, 14, .96) 62%, #06030D 100%);
  border-top: 1px solid rgba(255, 201, 130, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dock-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0 1px;
  border-radius: 10px;
  color: #8979A0;
  transition: transform .12s, color .2s, background .2s;
}
.dock-item .mp-icon { width: 23px; height: 23px; }
.dock-item span { font-size: 9px; letter-spacing: .5px; white-space: nowrap; }
.dock-item.active { color: #FFD27A; }
.dock-item.active .mp-icon { filter: drop-shadow(0 0 7px rgba(255, 160, 60, .6)); }
.dock-item.active span { color: #FFE2A8; }
.dock-item:active { transform: scale(.93); background: rgba(255, 160, 70, .1); }

/* 音效图标切换（大厅与战斗共用） */
.sound-toggle .ico-off { display: none; }
body.muted .sound-toggle .ico-on { display: none; }
body.muted .sound-toggle .ico-off { display: inline-block; }

/* ---------- 大厅适配 ---------- */
@media (max-width: 389px) {
  .lg-wallet { display: none; }
  .lg-name { max-width: 110px; }
  .stat-rail { top: calc(var(--safe-top) + 118px); }
  .peak-card { max-width: 170px; }
  .play-copy b { font-size: 19px; letter-spacing: 2px; }
  .side-stat { flex-basis: 50px; }
  .side-stat span { font-size: 6.5px; }
}
@media (max-height: 730px) {
  .lobby-dock { padding-top: 12px; }
  .mode-card { aspect-ratio: 1.6; min-height: 96px; }
  .mode-card.team .mode-art { background-position: 9% 74%; }
  .mode-card.rank .mode-art { background-position: 88% 74%; }
  .play-btn { height: 70px; }
  .play-copy b { font-size: 21px; }
  .lg-hint { display: none; }
  .dock-nav { padding-top: 3px; }
  .dock-item .mp-icon { width: 20px; height: 20px; }
  .dock-item span { font-size: 8.5px; }
  .stat-rail { top: calc(var(--safe-top) + 116px); gap: 6px; }
  .stat-medal { width: 46px; }
}
@media (max-height: 640px) {
  .lg-exp, .lg-power { display: none; }
  .lg-avatar { width: 38px; height: 38px; }
  .lg-name { max-width: 84px; font-size: 12px; }
  .peak-card { top: calc(var(--safe-top) + 54px); min-height: 44px; padding: 4px 6px 4px 4px; }
  .peak-emblem { width: 30px; height: 30px; }
  .stat-rail { display: none; }
  .mode-card { aspect-ratio: 1.75; min-height: 82px; }
  .mode-card.team .mode-art { background-position: 9% 76%; }
  .mode-card.rank .mode-art { background-position: 88% 76%; }
  .cta-row { margin-top: 8px; }
  .side-stat { display: none; }
  .play-btn { height: 60px; }
  .play-copy b { font-size: 18px; }
  .play-copy small { display: none; }
  .dock-item span { display: none; }
  .dock-item { padding: 3px 0; }
}
@media (min-width: 600px) {
  .lobby-bg-img { object-position: 72% 18%; }
  .lobby-dock { padding-left: 20px; padding-right: 20px; }
  .dock-nav { margin-left: -20px; margin-right: -20px; }
  .play-copy b { font-size: 24px; }
}
