/* =========================================================
   横版射击小游戏 · 移动端游戏界面
   主色 #FF8A3D / 卡通科幻荒漠风
   ========================================================= */
:root {
  --orange: #FF8A3D;
  --orange-deep: #E9651C;
  --orange-light: #FFB768;
  --gold: #FFD24A;
  --navy: #111B2E;
  --navy-2: #1B2742;
  --sky: #6BC6F5;
  --red: #FF4D4D;
  --green: #58E38B;
  --cream: #FFF5E4;
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .15);
  --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", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0A1220;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(900px 600px at 50% 10%, rgba(56, 120, 190, .25), transparent 65%),
    #080E19;
}

button { font-family: inherit; border: 0; cursor: pointer; color: inherit; }
button:focus-visible { outline: 2px solid #FFD24A; outline-offset: 2px; }

#app {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1B4C8F;
  isolation: isolate;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 0 90px rgba(0, 0, 0, .55);
}

#game {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hidden { display: none !important; }

.mp-icon { flex: 0 0 auto; pointer-events: none; }

/* ================= 开始页 ================= */
.screen {
  position: absolute;
  inset: 0;
}

.start-screen {
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #173D78;
}

.scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.start-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 17, 38, .78) 0%, rgba(7, 17, 38, .38) 23%, rgba(7, 17, 38, 0) 44%, rgba(7, 17, 38, 0) 58%, rgba(7, 17, 38, .5) 84%, rgba(7, 17, 38, .9) 100%),
    radial-gradient(120% 65% at 50% 102%, rgba(255, 122, 38, .18), transparent 65%);
}

.start-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: calc(var(--safe-top) + 14px) 20px calc(var(--safe-bottom) + 16px);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px 0 10px;
  border-radius: 999px;
  background: rgba(9, 19, 38, .48);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.brand-chip .mp-icon { width: 18px; height: 18px; color: var(--orange-light); }

.best-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(9, 19, 38, .44);
  border: 1px solid rgba(255, 210, 74, .32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.best-chip span { font-size: 10px; color: rgba(255, 220, 150, .8); letter-spacing: .1em; }
.best-chip b {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 210, 74, .55);
}

.profile-chip {
  position: relative;
  max-width: 178px;
  padding: 0 9px 0 7px;
  cursor: pointer;
  text-align: left;
  color: #fff;
  transition: transform .1s ease, background .15s ease;
}
.profile-chip:active { transform: scale(.96); background: rgba(255, 138, 61, .26); }
.player-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #2A3550;
  border: 1px solid rgba(255, 255, 255, .25);
}
.player-avatar .mp-icon { width: 14px; height: 14px; color: #FFD9A8; }
.player-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.player-initial { display: none; font-size: 11px; font-weight: 900; color: #FFD9A8; }
.player-avatar.logged:not(.has-img) .mp-icon { display: none; }
.player-avatar.logged:not(.has-img) .player-initial { display: block; }
.player-avatar.has-img img { display: block; }
.player-avatar.has-img .mp-icon,
.player-avatar.has-img .player-initial { display: none; }
#playerName {
  max-width: 102px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-caret { width: 12px; height: 12px; opacity: .45; margin-left: 1px; }

.title-block {
  margin-top: 24px;
  text-shadow: 0 4px 22px rgba(0, 0, 0, .35);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .26em;
  color: #FFD9A8;
  opacity: .92;
}
.kicker span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
}

.title-block h1 {
  margin: 7px 0 0;
  font-size: clamp(48px, 14.6vw, 68px);
  line-height: .94;
  font-weight: 900;
  letter-spacing: .015em;
  color: #fff;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .18);
  text-shadow:
    0 3px 0 #B34A16,
    0 7px 0 rgba(80, 30, 10, .35),
    0 14px 30px rgba(255, 120, 40, .28);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.title-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9px;
  background: linear-gradient(180deg, #FFC36D, #FF7E2E);
  border: 1px solid rgba(255, 255, 255, .45);
  color: #4A1D06;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 rgba(124, 46, 14, .55), 0 8px 20px rgba(255, 122, 38, .3);
}
.title-sub {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255, 244, 225, .82);
}
.title-block p {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 247, 235, .72);
  letter-spacing: .03em;
}

.hero-space { flex: 1 1 auto; min-height: 96px; }

.start-actions {
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  z-index: 3;
}

/* ---------- 主按钮 ---------- */
.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 0 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #FFB45F 0%, #FF8A3D 48%, #F26F21 100%);
  border: 1px solid rgba(255, 236, 205, .8);
  box-shadow:
    0 7px 0 #B34A16,
    0 16px 32px rgba(255, 116, 30, .4),
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -3px 0 rgba(150, 55, 10, .32);
  color: #3D1805;
  text-align: left;
  overflow: hidden;
  transition: transform .09s ease, box-shadow .09s ease, filter .15s ease;
}
.btn-primary:active {
  transform: translateY(5px);
  box-shadow:
    0 2px 0 #B34A16,
    0 7px 16px rgba(255, 116, 30, .34),
    inset 0 2px 0 rgba(255, 255, 255, .45);
  filter: brightness(.98);
}
.btn-shine {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 36%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(18deg);
  animation: shineSweep 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shineSweep {
  0%, 55% { left: -40%; }
  78%, 100% { left: 125%; }
}
.btn-primary .btn-lead {
  width: 40px;
  height: 40px;
  padding: 9px;
  background: rgba(74, 28, 6, .16);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary .btn-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.btn-primary .btn-copy b { font-size: 22px; line-height: 1.1; font-weight: 900; letter-spacing: .08em; }
.btn-primary .btn-copy small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: rgba(78, 31, 7, .72); }
.btn-primary .btn-arrow { width: 22px; height: 22px; opacity: .62; }
.btn-primary > .mp-icon + .btn-copy { margin-left: 2px; }

.start-btn { animation: startPulse 2.2s ease-in-out infinite; }
@keyframes startPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 138, 61, 0)); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 160, 80, .55)); }
}

/* ---------- 操作提示 ---------- */
.howto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.howto-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border-radius: 14px;
  background: rgba(10, 20, 40, .46);
  border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 248, 236, .86);
}
.howto-item .mp-icon { width: 17px; height: 17px; color: var(--orange-light); }

.start-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.start-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  color: rgba(255, 240, 218, .5);
  letter-spacing: .06em;
}
.start-foot > span .mp-icon { width: 13px; height: 13px; flex: 0 0 auto; }
.sound-group { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.sound-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px; }

.sound-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 240, 218, .62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .1s ease, background .15s ease, color .15s ease;
}
.sound-link .mp-icon { width: 14px; height: 14px; }
.sound-link:active { transform: scale(.95); background: rgba(255, 255, 255, .13); color: #FFE7C8; }
.sound-row .sound-link { min-width: 88px; }
.sound-link.center { margin-top: 0; }

@media (max-width: 350px) {
  .start-foot { justify-content: flex-end; }
  .start-foot > span { display: none; }
}

/* ---------- 场景动画 ---------- */
.cloud-a { animation: cloudDrift 16s ease-in-out infinite alternate; }
.cloud-b { animation: cloudDrift 22s ease-in-out infinite alternate-reverse; }
.cloud-c { animation: cloudDrift 19s ease-in-out infinite alternate; }
@keyframes cloudDrift {
  from { transform: translateX(-8px); }
  to { transform: translateX(18px); }
}
.ship { animation: shipFloat 5.5s ease-in-out infinite; }
@keyframes shipFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, -8px); }
}
.drone-deco { animation: droneFloat 3.8s ease-in-out infinite; }
@keyframes droneFloat {
  0%, 100% { transform: translate(0, 0) rotate(-2deg); }
  50% { transform: translate(-4px, -12px) rotate(2deg); }
}
.mech-bob { animation: mechBob 2.6s ease-in-out infinite; }
@keyframes mechBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.scarf { transform-origin: -6px -140px; animation: scarfWave 2.8s ease-in-out infinite; }
@keyframes scarfWave {
  0%, 100% { transform: rotate(0deg) skewY(0deg); }
  50% { transform: rotate(3deg) skewY(2deg); }
}

/* ================= 微信登录页 ================= */
.login-screen {
  z-index: 25;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  background: #12305F;
  animation: loginFade .35s ease;
}
@keyframes loginFade { from { opacity: 0; } to { opacity: 1; } }
.login-bg {
  position: absolute;
  inset: 0;
  min-height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #0E2A55 0%, #1B4F8E 29%, #3B8FD0 51%, #FFD1A0 72%, #F09054 100%);
}
.login-sun {
  position: absolute;
  top: 8%;
  right: 8%;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF8D6 0 16%, #FFE08E 27%, rgba(255, 190, 90, .42) 48%, transparent 70%);
  filter: blur(.3px);
}
.login-cloud {
  position: absolute;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  opacity: .5;
  filter: blur(.4px);
}
.login-cloud::before,
.login-cloud::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: #fff;
}
.lc1 { width: 108px; top: 17%; left: -24px; animation: cloudDrift 17s ease-in-out infinite alternate; }
.lc1::before { width: 48px; height: 38px; left: 22px; top: -19px; }
.lc1::after { width: 30px; height: 26px; left: 63px; top: -12px; }
.lc2 { width: 74px; top: 28%; right: 4%; opacity: .32; animation: cloudDrift 23s ease-in-out infinite alternate-reverse; }
.lc2::before { width: 38px; height: 30px; left: 18px; top: -15px; }
.lc3 { width: 92px; top: 41%; left: 12%; opacity: .2; animation: cloudDrift 20s ease-in-out infinite alternate; }
.lc3::before { width: 42px; height: 32px; left: 24px; top: -17px; }
.login-mountain {
  position: absolute;
  left: -2%;
  bottom: 0;
  width: 104%;
  pointer-events: none;
}
.lm1 {
  height: 44%;
  background: #7472AA;
  opacity: .42;
  clip-path: polygon(0 100%, 0 58%, 11% 36%, 23% 62%, 37% 26%, 51% 61%, 65% 40%, 79% 66%, 91% 48%, 100% 66%, 100% 100%);
}
.lm2 {
  height: 35%;
  background: #B96847;
  opacity: .86;
  clip-path: polygon(0 100%, 0 64%, 13% 43%, 29% 72%, 47% 45%, 63% 73%, 78% 51%, 92% 78%, 100% 63%, 100% 100%);
}
.lm3 {
  height: 25%;
  background: #8A4A35;
  opacity: .95;
  clip-path: polygon(0 100%, 0 70%, 15% 55%, 32% 80%, 50% 58%, 68% 82%, 84% 62%, 100% 76%, 100% 100%);
}
.login-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16%;
  background: linear-gradient(180deg, #C77B4A, #5C2E22 70%, #3D1E18);
}
.login-ground::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: #F0A458;
}
.login-ground::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 8%;
  width: 22%;
  height: 3px;
  border-radius: 50%;
  background: rgba(80, 35, 24, .35);
  box-shadow: 110px 22px 0 -1px rgba(80, 35, 24, .25), 210px -5px 0 -1px rgba(80, 35, 24, .3);
}
.login-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFE6A6;
  box-shadow: 0 0 10px #FFD36B;
  animation: sparkTwinkle 2.6s ease-in-out infinite;
}
.lsp1 { top: 33%; left: 14%; }
.lsp2 { top: 25%; right: 20%; animation-delay: .8s; }
.lsp3 { top: 47%; right: 10%; animation-delay: 1.4s; }
@keyframes sparkTwinkle { 0%, 100% { opacity: .18; transform: scale(.7); } 50% { opacity: .9; transform: scale(1.2); } }
.login-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 15, 35, .63) 0%, rgba(5, 15, 35, .22) 24%, rgba(5, 15, 35, 0) 43%, rgba(5, 11, 22, .2) 60%, rgba(5, 10, 20, .9) 100%),
    radial-gradient(100% 60% at 50% 45%, rgba(255, 138, 61, .12), transparent 70%);
}

.login-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: calc(var(--safe-top) + 14px) 20px calc(var(--safe-bottom) + 18px);
}
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.login-top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.login-back { width: 34px; height: 34px; border-radius: 11px; pointer-events: auto; flex: 0 0 auto; }
.login-back .mp-icon { width: 17px; height: 17px; }
.login-brand { height: 34px; font-size: 11px; flex: 0 0 auto; }
.login-best { height: 34px; flex: 0 0 auto; }

.login-hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 0 18px;
  min-height: 0;
}
.login-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .28em;
  color: #FFD9A8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.login-kicker span { width: 20px; height: 2px; border-radius: 2px; background: #07C160; box-shadow: 0 0 9px rgba(7, 193, 96, .8); }
.login-hero-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.login-title { flex: 1 1 auto; min-width: 0; text-shadow: 0 4px 20px rgba(0, 0, 0, .4); }
.login-title h1 {
  margin: 0;
  font-size: clamp(38px, 11.6vw, 52px);
  line-height: .96;
  font-weight: 900;
  letter-spacing: .01em;
  color: #fff;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .14);
  text-shadow: 0 3px 0 #B34A16, 0 8px 0 rgba(80, 30, 10, .3), 0 14px 26px rgba(255, 120, 40, .26);
}
.login-title h1 span {
  display: table;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FFC36D, #FF7E2E);
  border: 1px solid rgba(255, 255, 255, .4);
  color: #4A1D06;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  line-height: 1.3;
  transform: rotate(-2deg);
  text-shadow: none;
  box-shadow: 0 3px 0 rgba(124, 46, 14, .45);
}
.login-title p {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255, 245, 230, .68);
  letter-spacing: .02em;
}
.login-art {
  position: relative;
  flex: 0 0 102px;
  width: 102px;
  height: 102px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(255, 194, 120, .95), rgba(255, 122, 42, .85));
  border: 1px solid rgba(255, 236, 205, .75);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32), 0 0 26px rgba(255, 138, 61, .22), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.login-hero-face { display: block; width: 100%; height: 100%; border-radius: 50%; }
.login-avatar-img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
  background: #26304C;
}
.login-art.has-img .login-hero-face { visibility: hidden; }
.wechat-badge {
  position: absolute;
  right: -5px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1B4F8E;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .3);
}
.wechat-badge svg { width: 26px; height: 26px; }

.login-card {
  position: relative;
  flex: 0 0 auto;
  padding: 18px 16px 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 150, 70, .12), transparent 70%),
    linear-gradient(180deg, rgba(39, 54, 84, .94), rgba(15, 23, 40, .97));
  box-shadow: 0 24px 52px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.login-card h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #FFF7EA;
}
#loginCardDesc {
  margin: 6px 0 14px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 245, 230, .58);
}
.wechat-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2BE084 0%, #07C160 55%, #05A94F 100%);
  border: 1px solid rgba(210, 255, 230, .58);
  box-shadow:
    0 6px 0 #04763A,
    0 14px 26px rgba(7, 193, 96, .3),
    inset 0 2px 0 rgba(255, 255, 255, .38);
  color: #fff;
  text-align: left;
  transition: transform .09s ease, box-shadow .09s ease, filter .15s ease;
}
.wechat-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #04763A, 0 6px 14px rgba(7, 193, 96, .26), inset 0 2px 0 rgba(255, 255, 255, .28);
}
.wechat-btn:disabled { cursor: default; }
.wechat-btn.loading { opacity: .78; pointer-events: none; }
.wechat-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 70, 35, .22);
}
.wechat-logo svg { width: 28px; height: 28px; }
.wechat-btn .btn-copy { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.wechat-btn .btn-copy b { font-size: 18px; font-weight: 900; letter-spacing: .05em; line-height: 1.15; }
.wechat-btn .btn-copy small { font-size: 9.5px; font-weight: 600; letter-spacing: .03em; color: rgba(255, 255, 255, .74); }
.wechat-btn > .mp-icon { width: 18px; height: 18px; opacity: .66; }
.login-guest { width: 100%; min-height: 44px; margin-top: 9px; }
.login-guest .mp-icon { color: rgba(255, 200, 140, .9); }
.login-msg {
  min-height: 15px;
  margin: 9px 0 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  color: rgba(255, 245, 230, .46);
}
.login-msg.error { color: #FF9B8A; }
.login-msg.ok { color: #8FE6B8; }
.login-terms {
  margin: 5px 0 0;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: .02em;
  color: rgba(255, 245, 230, .26);
}

/* ================= HUD ================= */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 9px) 12px 0;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(4, 10, 22, .3));
}
.hud-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 2px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 190, 110, .9), rgba(255, 120, 40, .75));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .55);
  overflow: hidden;
}
.avatar svg { display: block; width: 100%; height: 100%; border-radius: 11px; }
.avatar img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 10px;
  object-fit: cover;
  display: none;
  background: #26304C;
}
.avatar.has-img img { display: block; }
.avatar.has-img svg { visibility: hidden; }
.hp-block { min-width: 100px; }
.hp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: 3px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .14em;
  color: rgba(255, 245, 230, .78);
}
.hp-top b { font-size: 10px; font-variant-numeric: tabular-nums; color: #fff; }
.hp-bar {
  position: relative;
  width: 108px;
  height: 10px;
  border-radius: 999px;
  background: rgba(7, 14, 28, .68);
  border: 1px solid rgba(255, 255, 255, .17);
  overflow: hidden;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .45);
}
.hp-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3DDC84, #A6F26B);
  box-shadow: 0 0 10px rgba(88, 227, 139, .55), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: width .18s ease, background .25s ease;
}
.hp-bar i.low { background: linear-gradient(90deg, #FF4D4D, #FF9B45); box-shadow: 0 0 12px rgba(255, 77, 77, .65); }

.buff-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.buff-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(6, 14, 28, .62);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.buff-chip .mp-icon { width: 10px; height: 10px; }
.buff-chip b { font-size: 8px; font-variant-numeric: tabular-nums; }
.shield-chip { color: #8FE6FF; border-color: rgba(102, 210, 255, .4); box-shadow: 0 0 8px rgba(102, 210, 255, .16); }
.power-chip { color: #FFC46B; border-color: rgba(255, 160, 70, .42); box-shadow: 0 0 8px rgba(255, 140, 50, .18); }
.power-chip.low { animation: buffBlink .55s steps(2, end) infinite; }
@keyframes buffBlink { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }

.hud-mid { text-align: center; padding-top: 1px; min-width: 84px; }
.score-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(8, 17, 34, .55);
  border: 1px solid rgba(255, 210, 74, .28);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.score-row .mp-icon { width: 15px; height: 15px; color: var(--gold); }
.score-row b {
  font-size: 16px;
  font-weight: 900;
  color: #FFF6DC;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.wave-row {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 7px;
  background: rgba(8, 17, 34, .42);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
  color: rgba(255, 233, 200, .62);
}
.wave-row b { font-size: 10px; color: #FFD9A8; }
.combo-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 170, 70, .95), rgba(241, 98, 26, .95));
  box-shadow: 0 3px 10px rgba(255, 100, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .4);
  color: #401A03;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  animation: comboPop .2s ease;
}
.combo-tag .mp-icon { width: 12px; height: 12px; }
@keyframes comboPop { from { transform: scale(.72); } to { transform: scale(1); } }

.hud-right { display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(8, 17, 34, .52);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  color: rgba(255, 249, 238, .9);
  transition: transform .1s ease, background .15s ease;
}
.icon-btn .mp-icon { width: 19px; height: 19px; }
.icon-btn:active { transform: scale(.9); background: rgba(255, 138, 61, .4); }

/* ---------- BOSS 血条 ---------- */
.boss-wrap {
  position: absolute;
  top: calc(var(--safe-top) + 96px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 13;
  width: min(76%, 330px);
  padding: 7px 10px 9px;
  border-radius: 12px;
  background: rgba(8, 14, 28, .62);
  border: 1px solid rgba(255, 77, 77, .36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  pointer-events: none;
  animation: bossIn .3s ease;
}
@keyframes bossIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.boss-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  color: rgba(255, 220, 220, .82);
}
.boss-meta span { display: inline-flex; align-items: center; gap: 4px; }
.boss-meta .mp-icon { width: 12px; height: 12px; color: #FF6B6B; }
.boss-meta b { font-size: 9px; font-variant-numeric: tabular-nums; color: #FFD0D0; }
.boss-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  overflow: hidden;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .5);
}
.boss-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FF3D3D, #FF8A3D);
  box-shadow: 0 0 10px rgba(255, 70, 70, .6);
  transition: width .15s linear;
}

/* ---------- 波次横幅 ---------- */
.banner {
  position: absolute;
  top: 24%;
  left: 0;
  right: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.9);
}
.banner.show { animation: bannerPop 2.1s cubic-bezier(.2, .9, .25, 1) both; }
.banner span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .4em;
  color: #FFD9A8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}
.banner b {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: .1em;
  color: #fff;
  -webkit-text-stroke: 1px rgba(140, 50, 10, .35);
  text-shadow: 0 3px 0 #C24E16, 0 8px 24px rgba(0, 0, 0, .5);
}
@keyframes bannerPop {
  0% { opacity: 0; transform: translateY(14px) scale(.88); }
  12% { opacity: 1; transform: translateY(0) scale(1.04); }
  22% { transform: translateY(0) scale(1); }
  78% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-12px) scale(.98); }
}

/* ================= 底部操作 ================= */
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 16px calc(var(--safe-bottom) + 18px);
  height: 188px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 12, 24, 0) 0%, rgba(6, 12, 24, .16) 52%, rgba(6, 12, 24, .52) 100%);
}

.move-pad { display: flex; align-items: flex-end; gap: 9px; }
.pad-btn {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(43, 58, 84, .62), rgba(15, 24, 42, .68));
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .22);
  color: #FFF6E8;
  transition: transform .08s ease, background .12s ease, box-shadow .12s ease;
}
.pad-btn .mp-icon { width: 27px; height: 27px; }
.pad-btn span { font-size: 9px; font-weight: 700; letter-spacing: .08em; color: rgba(255, 248, 236, .6); }
.pad-btn.pressed {
  transform: scale(.93) translateY(2px);
  background: linear-gradient(180deg, rgba(255, 166, 82, .92), rgba(235, 103, 28, .92));
  box-shadow: 0 0 22px rgba(255, 138, 61, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: #401A03;
}
.pad-btn.pressed span { color: rgba(64, 26, 3, .72); }

.action-pad { display: flex; align-items: flex-end; gap: 12px; }
.act-btn {
  pointer-events: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 50%;
  transition: transform .08s ease, filter .12s ease;
}
.jump-btn {
  width: 62px;
  height: 62px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(80, 196, 255, .78), rgba(28, 112, 180, .86));
  border: 1px solid rgba(190, 240, 255, .62);
  box-shadow: 0 6px 0 rgba(15, 68, 112, .8), 0 10px 22px rgba(30, 130, 200, .3), inset 0 2px 0 rgba(255, 255, 255, .35);
  color: #fff;
}
.jump-btn .mp-icon { width: 27px; height: 27px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.jump-btn span { font-size: 8.5px; font-weight: 800; letter-spacing: .1em; }
.jump-btn.pressed { transform: translateY(4px) scale(.94); box-shadow: 0 2px 0 rgba(15, 68, 112, .8), inset 0 2px 8px rgba(0, 0, 0, .25); }

.fire-btn {
  width: 86px;
  height: 86px;
  background: radial-gradient(circle at 36% 28%, #FFC26E 0%, #FF8A3D 42%, #EF5E16 100%);
  border: 2px solid rgba(255, 230, 200, .85);
  box-shadow: 0 7px 0 #A83F0D, 0 12px 28px rgba(255, 100, 24, .42), inset 0 3px 0 rgba(255, 255, 255, .4);
  color: #421A04;
}
.fire-btn .mp-icon { width: 39px; height: 39px; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .28)); }
.fire-btn span { font-size: 9.5px; font-weight: 900; letter-spacing: .18em; margin-top: -2px; }
.fire-btn.pressed { transform: translateY(5px) scale(.95); box-shadow: 0 2px 0 #A83F0D, 0 4px 12px rgba(255, 100, 24, .35), inset 0 2px 10px rgba(120, 40, 4, .25); }
.fire-btn.powered {
  border-color: #C9F8FF;
  box-shadow: 0 7px 0 #1B6E8E, 0 12px 30px rgba(80, 220, 255, .45), inset 0 3px 0 rgba(255, 255, 255, .55);
}
.fire-btn.powered .fire-ring { border-color: rgba(140, 240, 255, .55); }
.fire-btn.powered.pressed { box-shadow: 0 2px 0 #1B6E8E, 0 4px 12px rgba(80, 220, 255, .3), inset 0 2px 10px rgba(10, 60, 90, .25); }
.fire-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 205, 150, .38);
  animation: fireRing 1.9s ease-out infinite;
  pointer-events: none;
}
@keyframes fireRing {
  0% { transform: scale(.92); opacity: .8; }
  70% { transform: scale(1.14); opacity: 0; }
  100% { opacity: 0; }
}

/* ================= 暂停 / 结算 ================= */
.overlay {
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  touch-action: pan-y;
  padding: calc(var(--safe-top) + 22px) 20px calc(var(--safe-bottom) + 22px);
  background:
    radial-gradient(90% 60% at 50% 44%, rgba(255, 120, 40, .1), transparent 70%),
    rgba(6, 11, 22, .76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: overlayIn .2s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.pause-card, .over-card {
  position: relative;
  width: 100%;
  margin: auto 0;
  flex: 0 0 auto;
  max-width: 352px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    linear-gradient(180deg, rgba(39, 54, 84, .94), rgba(17, 25, 43, .97)),
    var(--navy);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  padding: 24px 20px 20px;
  text-align: center;
  animation: cardIn .26s cubic-bezier(.2, .9, .25, 1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

.pause-card h2, .over-card h2 {
  margin: 0;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: .1em;
  color: #FFF7EA;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .28);
}
.pause-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 176, 92, .26), rgba(255, 138, 61, .1));
  border: 1px solid rgba(255, 172, 94, .3);
}
.pause-badge .mp-icon { width: 27px; height: 27px; color: var(--orange-light); }
.pause-card p { margin: 8px 0 20px; font-size: 12px; color: var(--muted); }

.pause-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  color: rgba(255, 248, 236, .86);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .09s ease, background .12s ease;
}
.btn-ghost .mp-icon { width: 17px; height: 17px; color: rgba(255, 190, 120, .9); }
.btn-ghost:active { transform: scale(.97); background: rgba(255, 255, 255, .13); }
.btn-ghost.wide { width: 100%; margin-top: 9px; }

.pause-card .btn-primary { min-height: 62px; margin-top: 2px; }
.pause-card .btn-primary .btn-copy b { font-size: 18px; }

.over-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .32em;
  color: rgba(255, 120, 100, .9);
  margin-bottom: 5px;
}
.over-sub { margin: 7px 0 16px; font-size: 12px; color: var(--muted); }
.over-sub b { color: #FFD9A8; font-size: 14px; }

.final-score {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 10px 8px;
  margin-bottom: 14px;
  border-radius: 18px;
  background:
    radial-gradient(75% 90% at 50% 0%, rgba(255, 138, 61, .17), transparent 70%),
    rgba(8, 14, 28, .38);
  border: 1px solid rgba(255, 180, 100, .16);
}
.final-score > span { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: rgba(255, 228, 195, .6); }
.final-score > b {
  font-size: 48px;
  line-height: 1.08;
  font-weight: 900;
  color: #FFF3D8;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  text-shadow: 0 3px 0 rgba(170, 62, 10, .4), 0 0 26px rgba(255, 160, 70, .45);
}
.new-best {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE07A, #FFB72B);
  color: #4A2602;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  box-shadow: 0 3px 10px rgba(255, 190, 60, .4);
  animation: bestPop .5s cubic-bezier(.2, 1.5, .4, 1);
}
.new-best .mp-icon { width: 12px; height: 12px; }
@keyframes bestPop { from { transform: scale(.6); } to { transform: scale(1); } }

.over-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, .07);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 4px 10px;
  background: rgba(13, 21, 38, .92);
}
.stat .mp-icon { width: 18px; height: 18px; color: rgba(255, 164, 82, .9); margin-bottom: 2px; }
.stat b { font-size: 19px; font-weight: 900; color: #FFF3DC; font-variant-numeric: tabular-nums; }
.stat span { font-size: 9px; color: var(--muted); letter-spacing: .08em; }

.over-card .btn-primary { min-height: 62px; }
.over-card .btn-primary .btn-copy b { font-size: 18px; }
.over-card .btn-primary .btn-copy small { font-size: 9.5px; }

/* ================= 横屏兜底 ================= */
@media (orientation: landscape) and (max-height: 520px) {
  #app { max-width: 100vw; }
  .start-content { padding-top: calc(var(--safe-top) + 8px); }
  .title-block { margin-top: 8px; }
  .title-block h1 { font-size: 38px; }
  .title-block p, .title-sub { display: none; }
  .hero-space { min-height: 10px; }
  .start-actions { width: 56%; align-self: flex-end; }
  .howto { display: none; }
  .start-foot { display: none; }
  .title-row { margin-top: 7px; }
  .start-shade { background: linear-gradient(90deg, rgba(7, 17, 38, .8), rgba(7, 17, 38, .1) 65%, rgba(7, 17, 38, .6)); }
  .controls { height: 132px; }
  .pad-btn { width: 54px; height: 54px; }
  .fire-btn { width: 70px; height: 70px; }
  .jump-btn { width: 52px; height: 52px; }
}

/* 矮屏手机压缩布局，避免按钮和内容打架 */
@media (max-height: 700px) and (orientation: portrait) {
  .title-block { margin-top: 14px; }
  .title-block h1 { font-size: clamp(42px, 12.4vw, 56px); }
  .title-block p { display: none; }
  .title-row { margin-top: 8px; }
  .start-actions { gap: 8px; }
  .btn-primary { min-height: 64px; border-radius: 19px; }
  .btn-primary .btn-copy b { font-size: 19px; }
  .howto-item { height: 36px; font-size: 10px; }
  .howto-item .mp-icon { width: 15px; height: 15px; }
  .start-foot { display: none; }
  .overlay { align-items: flex-start; overflow-y: auto; }
  .pause-card, .over-card { margin: auto 0; }
}

@media (max-height: 600px) and (orientation: portrait) {
  .title-block { margin-top: 8px; }
  .title-block h1 { font-size: 38px; }
  .kicker { font-size: 8px; }
  .title-tag { font-size: 11px; padding: 3px 8px; }
  .title-sub { display: none; }
  .start-actions { gap: 6px; }
  .btn-primary { min-height: 58px; }
  .btn-primary .btn-copy small { display: none; }
  .howto { display: none; }
}

/* 宽屏桌面预览时，把游戏框成一块手机屏 */
@media (min-width: 640px) and (min-height: 640px) {
  #app {
    max-width: 430px;
    height: min(920px, calc(100vh - 32px));
    margin: auto 0;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .7), 0 0 0 8px #101827, 0 0 0 9px rgba(255, 255, 255, .08);
  }
}


/* 窄屏手机：把操作区收紧，避免左右按钮相撞 */
@media (max-width: 374px) {
  .controls { padding-left: 11px; padding-right: 11px; }
  .pad-btn { width: 58px; height: 58px; border-radius: 17px; }
  .pad-btn .mp-icon { width: 24px; height: 24px; }
  .jump-btn { width: 54px; height: 54px; }
  .fire-btn { width: 76px; height: 76px; }
  .fire-btn .mp-icon { width: 34px; height: 34px; }
  .action-pad { gap: 9px; }
  .move-pad { gap: 7px; }
  .hp-bar { width: 92px; }
  .hud-mid { min-width: 72px; }
  .score-row { padding: 0 8px; }
}

/* 登录页矮屏适配：保证微信登录按钮和卡片始终完整可见 */
@media (max-height: 700px) and (orientation: portrait) {
  .login-content { padding-top: calc(var(--safe-top) + 10px); padding-bottom: calc(var(--safe-bottom) + 12px); }
  .login-hero { padding: 8px 0 10px; }
  .login-title h1 { font-size: clamp(34px, 10.4vw, 46px); }
  .login-title p { margin-top: 7px; font-size: 10.5px; }
  .login-art { flex-basis: 84px; width: 84px; height: 84px; }
  .wechat-badge { width: 33px; height: 33px; }
  .wechat-badge svg { width: 22px; height: 22px; }
  .login-card { padding: 14px 14px 11px; border-radius: 21px; }
  .login-card h2 { font-size: 19px; }
  #loginCardDesc { margin: 5px 0 11px; font-size: 10.5px; }
  .wechat-btn { min-height: 58px; }
  .wechat-btn .btn-copy b { font-size: 17px; }
  .login-guest { min-height: 40px; margin-top: 7px; }
  .login-msg { margin-top: 7px; }
}

@media (max-height: 600px) and (orientation: portrait) {
  .login-kicker { display: none; }
  .login-hero { padding: 4px 0 6px; }
  .login-hero-row { margin-top: 4px; }
  .login-title h1 { font-size: 30px; }
  .login-title p { display: none; }
  .login-art { flex-basis: 66px; width: 66px; height: 66px; }
  .wechat-badge { width: 28px; height: 28px; border-width: 2px; }
  .wechat-badge svg { width: 18px; height: 18px; }
  .login-card h2 { font-size: 16px; }
  #loginCardDesc { display: none; }
  .login-terms { display: none; }
  .login-card { padding: 11px 12px 9px; }
  .wechat-btn { min-height: 52px; border-radius: 15px; }
  .wechat-btn .wechat-logo { width: 34px; height: 34px; }
  .wechat-btn .btn-copy b { font-size: 15px; }
  .wechat-btn .btn-copy small { display: none; }
  .login-guest { min-height: 36px; margin-top: 6px; font-size: 11px; }
  .login-msg { font-size: 9px; margin-top: 5px; }
}

@media (max-width: 374px) {
  .login-content { padding-left: 14px; padding-right: 14px; }
  .login-title h1 { font-size: clamp(30px, 10.2vw, 38px); }
  .login-art { flex-basis: 82px; width: 82px; height: 82px; }
  .login-card { padding-left: 12px; padding-right: 12px; }
  .wechat-btn { padding: 0 10px; gap: 8px; }
  .wechat-logo { width: 36px; height: 36px; }
  .wechat-btn .btn-copy b { font-size: 16px; }
}
