/* 机甲合成战线 · 竖屏卡通机甲风 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #04070c;
  color: #f4f8ff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}
body {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 132, 52, .16), transparent 60%),
    radial-gradient(100% 100% at 50% 110%, #0a1423, #04070c 70%);
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: none; }
.hidden { display: none !important; }

.game {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #060c15;
  box-shadow: 0 0 90px rgba(0, 0, 0, .8), 0 0 0 1px rgba(120, 170, 230, .08);
  isolation: isolate;
}
#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* 全局画面质感 */
.fx-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(120% 82% at 50% 44%, transparent 48%, rgba(2, 6, 12, .42) 100%),
    linear-gradient(180deg, rgba(3, 8, 15, .52) 0%, transparent 16%, transparent 68%, rgba(2, 6, 12, .82) 100%);
}
.fx-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .16;
  background: repeating-linear-gradient(0deg, rgba(180, 220, 255, .16) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.hit-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease-out;
  box-shadow: inset 0 0 90px rgba(255, 48, 24, .78);
  background: radial-gradient(110% 80% at 50% 50%, transparent 45%, rgba(255, 45, 25, .22) 100%);
}
.hit-vignette.hurt { opacity: 1; }

/* ============ 开始界面 ============ */
.menu {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.menu::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 9, 16, .74) 0%, rgba(4, 9, 16, .18) 24%, transparent 44%, transparent 58%, rgba(4, 9, 16, .86) 84%, #060c15 100%);
}
.menu > * { position: relative; pointer-events: auto; }

.menu-top { display: flex; align-items: flex-start; justify-content: space-between; }
.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 5px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(16, 30, 48, .86), rgba(8, 16, 27, .7));
  border: 1px solid rgba(122, 178, 240, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 151, 74, .7);
  background: radial-gradient(100% 100% at 30% 20%, #29435f, #0b1522 74%);
  box-shadow: inset 0 0 14px rgba(255, 140, 58, .22), 0 0 12px rgba(255, 130, 45, .18);
}
.avatar.small { width: 40px; height: 40px; border-radius: 11px; }
.avatar canvas, .avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar canvas { display: block; }
.profile-meta { display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #f3f8ff;
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .01em;
}
.profile-sub { font-size: 10px; color: #8ea6bf; letter-spacing: .04em; }
.profile-sub b { color: #ffb066; font-weight: 800; margin-left: 2px; }

.round-btn {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #dceaff;
  background: linear-gradient(160deg, rgba(26, 44, 66, .92), rgba(9, 17, 29, .9));
  border: 1px solid rgba(133, 186, 244, .2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .12s ease, border-color .12s ease;
}
.round-btn .mp-icon { width: 21px; height: 21px; }
.round-btn:active { transform: scale(.92); border-color: rgba(255, 150, 74, .55); }
.round-btn .snd-off { display: none; }
.round-btn.muted .snd-on { display: none; }
.round-btn.muted .snd-off { display: block; }
.round-btn.muted { color: #7f92a8; }

.logo {
  margin-top: clamp(22px, 5.4vh, 54px);
  text-align: center;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .5));
}
.logo-en {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .42em;
  color: #9fc4e6;
  padding: 4px 8px 4px 12px;
  border-top: 1px solid rgba(159, 196, 230, .35);
  border-bottom: 1px solid rgba(159, 196, 230, .35);
  transform: skewX(-10deg);
  opacity: .86;
}
.logo h1 {
  margin: 10px 0 0;
  font-size: clamp(40px, 12vw, 57px);
  line-height: .94;
  font-weight: 900;
  letter-spacing: .045em;
  color: #fff;
  text-shadow: 0 2px 0 #7d3c12, 0 0 26px rgba(255, 138, 61, .3);
}
.logo h1 span {
  display: block;
  background: linear-gradient(178deg, #ffe0ac 4%, #ff9d4b 40%, #ff6d1c 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 122, 35, .5));
  letter-spacing: .075em;
}
.logo-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: #b4c8dd;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}
.logo-sub::before, .logo-sub::after {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 155, 82, .75));
}
.logo-sub::after { transform: rotate(180deg); }
.menu-spacer { flex: 1 1 auto; min-height: 10px; }

.menu-bottom { width: 100%; }
.howto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 11px;
  color: #a9bfd6;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}
.howto-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.howto-item .mp-icon { width: 15px; height: 15px; color: #ffab61; }
.howto-sep { width: 3px; height: 3px; border-radius: 50%; background: rgba(160, 195, 230, .38); }

.primary-btn {
  position: relative;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 17px;
  border: 1px solid rgba(255, 202, 150, .8);
  background: linear-gradient(180deg, #ffc074 0%, #ff8e3c 32%, #f56b17 78%, #dc520c 100%);
  box-shadow:
    0 12px 30px rgba(255, 106, 20, .38),
    0 2px 0 rgba(120, 45, 5, .55),
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -8px 16px rgba(174, 60, 5, .28);
  color: #fff;
  transition: transform .1s ease, filter .12s ease;
  touch-action: manipulation;
}
.primary-btn::before, .primary-btn::after {
  content: "";
  position: absolute;
  top: -30%;
  width: 26px;
  height: 170%;
  background: rgba(255, 255, 255, .15);
  transform: rotate(18deg);
  pointer-events: none;
}
.primary-btn::before { left: 13%; }
.primary-btn::after { left: 23%; background: rgba(255, 255, 255, .07); }
.primary-btn .btn-label {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .16em;
  text-indent: .16em;
  text-shadow: 0 2px 0 rgba(137, 51, 5, .46), 0 0 12px rgba(255, 238, 212, .35);
}
.primary-btn .btn-arrow { position: relative; z-index: 1; width: 25px; height: 25px; color: #fff8ef; }
.btn-sheen {
  position: absolute;
  top: -40%;
  left: -35%;
  width: 30%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(16deg);
  animation: sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 58% { left: -40%; opacity: 0; }
  66% { opacity: 1; }
  86%, 100% { left: 115%; opacity: 0; }
}
.primary-btn:active { transform: translateY(2px) scale(.985); filter: brightness(1.08); }
.menu-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 9px;
  padding: 9px 4px 1px;
}
.mstat { position: relative; text-align: center; }
.mstat + .mstat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(140, 185, 230, .24), transparent);
}
.mstat b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #eef7ff;
  text-shadow: 0 0 12px rgba(110, 190, 255, .2);
}
.mstat span { display: block; margin-top: 1px; font-size: 9.5px; letter-spacing: .14em; color: #7990a8; }

/* ============ 战斗 HUD ============ */
.hud {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));
}
.hud::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 132px;
  background: linear-gradient(180deg, rgba(2, 7, 13, .82), rgba(2, 7, 13, .42) 58%, transparent);
  pointer-events: none;
}
.hud::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 142px;
  background: linear-gradient(0deg, rgba(2, 7, 13, .9), rgba(2, 7, 13, .45) 56%, transparent);
  pointer-events: none;
}
.hud > * { position: relative; z-index: 1; pointer-events: none; }
.hud .round-btn, .hud .dash-btn { pointer-events: auto; }

.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hud-profile { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hud-vitals { min-width: 0; }
.hud-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.hud-name-row span {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #e6f1ff;
  letter-spacing: .03em;
}
.hud-name-row em {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 4px;
  color: #241407;
  background: linear-gradient(180deg, #ffcb82, #ff9346);
  box-shadow: 0 0 10px rgba(255, 138, 61, .35);
}
.hp-track {
  position: relative;
  width: 132px;
  max-width: 34vw;
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(4, 12, 21, .86);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .55);
}
.hp-fill {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  border-radius: 3px;
  transform-origin: left center;
  background: linear-gradient(90deg, #ffb15d, #ff7f2c 55%, #ff5d19);
  box-shadow: 0 0 10px rgba(255, 122, 38, .55), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: width .16s ease-out;
}
.hp-track.low .hp-fill { background: linear-gradient(90deg, #ff7361, #ef2f2f); box-shadow: 0 0 12px rgba(255, 56, 40, .7); }
.hp-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
}
.hud-right { display: flex; align-items: flex-start; gap: 8px; }
.score-box { text-align: right; padding-top: 1px; }
.score-box span { display: block; font-size: 8px; font-weight: 800; letter-spacing: .25em; color: #8fa8c2; }
.score-box b {
  display: block;
  margin-top: 1px;
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 155, 82, .35);
  font-variant-numeric: tabular-nums;
}

.wave-row { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 7px; }
.wave-line { width: 34px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 160, 88, .55)); }
.wave-line:last-child { transform: rotate(180deg); }
.wave-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .26em;
  color: #ffc48c;
  text-shadow: 0 0 10px rgba(255, 132, 52, .5);
}

.boss { width: min(310px, 82%); margin: 8px auto 0; }
.boss-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.boss-head span { font-size: 9px; font-weight: 700; letter-spacing: .22em; color: #ff9c8c; }
.boss-head b { font-size: 9px; color: #ffd9c9; font-variant-numeric: tabular-nums; }
.boss-track {
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(8, 12, 19, .92);
  border: 1px solid rgba(255, 105, 84, .34);
  box-shadow: 0 0 14px rgba(255, 60, 40, .2);
}
.boss-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff6b4a, #ff3b2d 60%, #c41c1c);
  box-shadow: 0 0 12px rgba(255, 64, 48, .7);
  transition: width .14s linear;
}

.combo {
  position: absolute;
  left: 16px;
  top: 36%;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #ffcb8a;
  filter: drop-shadow(0 0 12px rgba(255, 124, 38, .55));
  animation: comboPop .18s ease-out;
}
.combo b { font-size: 30px; font-weight: 900; font-style: italic; line-height: 1; color: #fff0d9; }
.combo span { font-size: 9px; font-weight: 800; letter-spacing: .18em; color: #ffab61; }
@keyframes comboPop { from { transform: scale(1.35) translateX(-4px); opacity: .4; } to { transform: scale(1); opacity: 1; } }

.wave-banner, .fusion-toast {
  position: absolute;
  left: 50%;
  top: 31%;
  transform: translate(-50%, -50%) scale(.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
.wave-banner span { font-size: 9px; font-weight: 800; letter-spacing: .4em; color: #a9c7e6; }
.wave-banner b {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 2px 0 #8a3b0b, 0 0 26px rgba(255, 132, 52, .7);
}
.wave-banner.show { animation: bannerIn 1.7s ease-out forwards; }
@keyframes bannerIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.78); filter: blur(4px); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
  72% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.03); }
}

.fusion-toast {
  top: 34%;
  padding: 13px 22px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(16, 30, 48, .94), rgba(7, 14, 25, .92));
  border: 1px solid rgba(255, 168, 96, .5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55), 0 0 34px rgba(255, 132, 52, .22), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.fusion-kicker { font-size: 8px; font-weight: 800; letter-spacing: .34em; color: #ffae68; }
.fusion-toast b { font-size: 19px; font-weight: 900; color: #fff; letter-spacing: .05em; text-shadow: 0 0 16px rgba(255, 170, 95, .45); }
.fusion-toast span:last-child { font-size: 10px; color: #b5c9de; letter-spacing: .06em; }
.fusion-toast.show { animation: fusionIn 1.9s ease-out forwards; }
@keyframes fusionIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  20% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(.98); }
}

.hud-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.squad { display: flex; flex-direction: column; gap: 5px; }
.squad-title { font-size: 8px; font-weight: 800; letter-spacing: .2em; color: #7e97b0; padding-left: 2px; }
.squad-slots { display: flex; gap: 5px; }
.squad-slot {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px dashed rgba(130, 170, 210, .28);
  background: rgba(7, 15, 25, .55);
  color: #52677d;
  transition: all .2s ease;
}
.squad-slot .mp-icon { width: 19px; height: 19px; opacity: .45; }
.squad-slot em {
  position: absolute;
  right: -1px;
  bottom: -1px;
  font-style: normal;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 4px;
  background: rgba(6, 11, 19, .92);
  color: #91a7bd;
}
.squad-slot.filled { border-style: solid; border-color: rgba(255, 150, 80, .5); background: linear-gradient(160deg, rgba(31, 51, 74, .95), rgba(9, 18, 31, .95)); color: #ffc18a; box-shadow: 0 0 14px rgba(255, 130, 45, .16); }
.squad-slot.filled .mp-icon { opacity: 1; }
.squad-slot.filled em { color: #fff1dc; background: #d7651d; }
.squad-slot.t2 { color: #72d9ff; border-color: rgba(84, 199, 255, .5); }
.squad-slot.t3 { color: #c69bff; border-color: rgba(170, 120, 255, .55); }
.squad-slot.t4 { color: #ffd267; border-color: rgba(255, 200, 91, .6); box-shadow: 0 0 16px rgba(255, 196, 82, .24); }

.core-tray {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 12px;
  border: 1px solid rgba(126, 173, 220, .16);
  background: linear-gradient(160deg, rgba(17, 32, 50, .8), rgba(7, 14, 24, .84));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-self: flex-end;
  margin-bottom: 2px;
}
.core-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 31px;
  height: 26px;
  padding: 0 4px;
  border-radius: 7px;
  background: rgba(5, 11, 20, .55);
  border: 1px solid rgba(130, 170, 210, .12);
  opacity: .42;
  filter: grayscale(.7);
  transition: all .18s ease;
}
.core-chip.has { opacity: 1; filter: none; border-color: rgba(255, 170, 100, .3); }
.core-orb {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  transform: rotate(45deg);
  background: #5ad6ff;
  box-shadow: 0 0 8px rgba(90, 214, 255, .8);
}
.core-chip[data-tier="2"] .core-orb { background: #b78bff; box-shadow: 0 0 8px rgba(170, 120, 255, .85); }
.core-chip[data-tier="3"] .core-orb { background: #ffc45e; box-shadow: 0 0 8px rgba(255, 190, 80, .9); }
.core-chip b { font-size: 10.5px; font-weight: 800; color: #edf6ff; line-height: 1; }
.core-chip em { font-style: normal; font-size: 7.5px; color: #748ca3; line-height: 1; }

.dash-btn {
  position: relative;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(70% 70% at 50% 32%, rgba(255, 158, 83, .34), rgba(10, 20, 33, .94) 72%);
  border: 1.5px solid rgba(255, 160, 86, .68);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42), 0 0 20px rgba(255, 130, 45, .16), inset 0 0 18px rgba(255, 130, 45, .12);
  overflow: hidden;
  transition: transform .12s ease;
  touch-action: manipulation;
}
.dash-btn .mp-icon { width: 25px; height: 25px; color: #ffd6ac; filter: drop-shadow(0 0 7px rgba(255, 140, 58, .55)); }
.dash-text { font-size: 9px; font-weight: 800; letter-spacing: .12em; color: #ffe6cc; }
.dash-btn:active { transform: scale(.92); }
.dash-btn.cooling { border-color: rgba(126, 160, 194, .3); color: #8195aa; }
.dash-btn.cooling .mp-icon { color: #8aa0b6; filter: none; }
.dash-btn.cooling .dash-text { color: #93a7ba; }
.dash-mask {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(rgba(3, 8, 14, .76) 0deg, rgba(3, 8, 14, .76) 0deg, transparent 0deg);
}
.dash-btn .mp-icon, .dash-btn .dash-text { position: relative; z-index: 1; }

/* ============ 弹层 ============ */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  background: rgba(2, 6, 12, .66);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .18s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.panel {
  width: 100%;
  max-width: 348px;
  padding: 24px 20px 18px;
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 132, 52, .14), transparent 58%),
    linear-gradient(175deg, rgba(21, 38, 60, .98), rgba(7, 14, 25, .99));
  border: 1px solid rgba(255, 164, 94, .26);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .09);
}
.panel-kicker { font-size: 8.5px; font-weight: 800; letter-spacing: .4em; color: #ffae68; }
.panel h2 {
  margin: 8px 0 0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 138, 61, .35);
}
.panel-desc { margin: 8px 0 18px; font-size: 12px; line-height: 1.7; color: #9fb4c9; letter-spacing: .03em; }
.panel .primary-btn { height: 54px; margin-top: 4px; }
.panel .primary-btn .btn-label { font-size: 17px; }
.ghost-btn {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
  border-radius: 12px;
  color: #bcd0e4;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
  border: 1px solid rgba(130, 175, 220, .18);
  background: rgba(11, 22, 37, .6);
  transition: transform .12s ease, background .12s ease;
}
.ghost-btn .mp-icon { width: 17px; height: 17px; }
.ghost-btn:active { transform: scale(.98); background: rgba(26, 44, 66, .7); }

.over-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .22em;
  color: #ffc08a;
  background: rgba(255, 132, 52, .1);
  border: 1px solid rgba(255, 150, 80, .28);
}
.over-badge .mp-icon { width: 14px; height: 14px; }
.over-panel h2 { margin-top: 12px; }
.over-panel .panel-desc { margin-bottom: 11px; }
.over-best {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .2em;
  color: #231304;
  background: linear-gradient(180deg, #ffd68c, #ff9c4a);
  box-shadow: 0 0 18px rgba(255, 150, 68, .4);
  animation: bestPulse 1.8s ease-in-out infinite;
}
@keyframes bestPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.over-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0 13px; }
.ostat {
  padding: 9px 8px 8px;
  border-radius: 11px;
  background: rgba(5, 12, 21, .55);
  border: 1px solid rgba(130, 175, 220, .13);
  text-align: left;
}
.ostat span { display: block; font-size: 9px; letter-spacing: .08em; color: #7f97ae; }
.ostat b { display: block; margin-top: 2px; font-size: 20px; line-height: 1.1; font-weight: 800; color: #f6fbff; font-variant-numeric: tabular-nums; }
.ostat:first-child b { color: #ffb266; }

/* 小屏适配 */
@media (max-height: 680px) {
  .logo { margin-top: 10px; }
  .logo h1 { font-size: 42px; }
  .logo-sub { margin-top: 8px; }
  .menu-bottom .howto { margin-bottom: 7px; }
  .primary-btn { height: 54px; }
  .primary-btn .btn-label { font-size: 18px; }
  .menu-stats { margin-top: 6px; padding-top: 7px; }
  .mstat b { font-size: 15px; }
  .dash-btn { width: 60px; height: 60px; }
  .squad-slot { width: 30px; height: 30px; }
  .core-chip { min-width: 28px; height: 24px; }
}
@media (max-height: 560px) {
  .logo h1 { font-size: 34px; }
  .howto { display: none; }
  .menu-stats { display: none; }
}

/* 窄屏适配 */
@media (max-width: 360px) {
  .menu { padding-left: 12px; padding-right: 12px; }
  .profile-name { max-width: 92px; }
  .hud { padding-left: 10px; padding-right: 10px; }
  .hud-profile { gap: 6px; }
  .avatar.small { width: 34px; height: 34px; }
  .hud-name-row span { max-width: 78px; font-size: 10px; }
  .hp-track { max-width: 92px; }
  .hud-right { gap: 5px; }
  .score-box b { font-size: 18px; }
  .hud .round-btn { width: 38px; height: 38px; }
  .squad-slot { width: 30px; height: 30px; }
  .squad-slot .mp-icon { width: 17px; height: 17px; }
  .core-chip { min-width: 27px; height: 24px; padding: 0 3px; }
  .dash-btn { width: 60px; height: 60px; }
  .hud-bottom { left: 10px; right: 10px; gap: 5px; }
  .logo-sub { letter-spacing: .1em; font-size: 10.5px; }
  .howto { gap: 6px; font-size: 10px; }
}
