/* 飞机大战3 — 竖屏空战 H5 */
:root {
  --orange: #FF8A3D;
  --orange-hi: #FFC45C;
  --orange-deep: #C94E05;
  --navy: #062A57;
  --navy-deep: #031A3D;
  --blue: #0F6FD8;
  --sky-line: rgba(165, 225, 255, 0.55);
  --glass: rgba(4, 37, 80, 0.42);
  --glass-line: rgba(171, 226, 255, 0.3);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #041d40;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid #9ADFFF;
  outline-offset: 3px;
}

.app {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  max-width: 560px;
  overflow: hidden;
  background: #0A5BB8;
  isolation: isolate;
}

@media (min-width: 600px) {
  body {
    background:
      radial-gradient(circle at 50% 10%, #123f78 0%, #061b38 55%, #020d1e 100%);
  }
  .app {
    box-shadow: 0 0 0 1px rgba(137, 208, 255, 0.12), 0 30px 100px rgba(0, 0, 0, 0.65);
  }
}

.sky-canvas,
.game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.game-canvas { z-index: 2; }

.sky-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(2, 23, 56, 0.16) 0%, transparent 18%, transparent 72%, rgba(1, 18, 42, 0.3) 100%);
}

.damage-flash {
  position: absolute;
  inset: 0;
  z-index: 46;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 38, 60, 0.55), transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(255, 28, 48, 0.6) 100%);
}

.damage-flash.is-on { animation: damageFlash 0.5s ease-out; }

@keyframes damageFlash {
  0% { opacity: 0; }
  16% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* ---------- 通用屏幕 ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ---------- 开始界面 ---------- */
.start-screen {
  padding-top: max(16px, env(safe-area-inset-top));
  background:
    radial-gradient(ellipse at 50% 29%, rgba(255, 190, 110, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(8, 55, 120, 0.1) 0%, transparent 35%, rgba(1, 24, 56, 0.18) 100%);
}

.start-top {
  flex: 0 0 auto;
  padding: 4px 20px 0;
  text-align: center;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(189, 233, 255, 0.38);
  background: rgba(4, 45, 98, 0.26);
  color: #D8F3FF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-hi);
  box-shadow: 0 0 8px rgba(255, 196, 92, 0.9);
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.72); }
}

.logo-wrap {
  position: relative;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(46px, 14.6vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.045em;
  color: #F8FDFF;
  text-shadow:
    0 2px 0 #4A90D9,
    0 5px 0 #1B5FA9,
    0 9px 0 #0C3D7E,
    0 14px 0 rgba(5, 35, 76, 0.55),
    0 20px 28px rgba(0, 29, 70, 0.4);
  transform: skewX(-2deg);
}

.logo-3 {
  display: inline-block;
  margin-left: 1px;
  font-size: 1.16em;
  color: #FFD05A;
  letter-spacing: 0;
  transform: rotate(5deg) translateY(1px);
  text-shadow:
    0 2px 0 #FFA630,
    0 6px 0 #E25A0C,
    0 10px 0 #9E2E00,
    0 17px 22px rgba(83, 25, 0, 0.42);
}

.logo-wing {
  position: absolute;
  top: 55%;
  width: 28%;
  height: 7px;
  border-radius: 999px;
  z-index: 1;
  pointer-events: none;
}

.logo-wing-l {
  left: -2%;
  background: linear-gradient(90deg, transparent, rgba(157, 225, 255, 0.78));
  transform: rotate(-8deg);
  box-shadow: 0 10px 0 -2px rgba(157, 225, 255, 0.26);
}

.logo-wing-r {
  right: -2%;
  background: linear-gradient(270deg, transparent, rgba(157, 225, 255, 0.78));
  transform: rotate(8deg);
  box-shadow: 0 10px 0 -2px rgba(157, 225, 255, 0.26);
}

.tagline {
  margin: 15px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(235, 249, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 28, 66, 0.45);
}

.hero-stage {
  position: relative;
  flex: 1 1 34vh;
  min-height: 196px;
  max-height: 43vh;
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.radar {
  position: absolute;
  width: min(84vw, 370px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(182, 235, 255, 0.17);
  box-shadow: inset 0 0 60px rgba(80, 184, 255, 0.08);
  pointer-events: none;
}

.radar span {
  position: absolute;
  border: 1px solid rgba(182, 235, 255, 0.12);
  border-radius: 50%;
}

.radar span:nth-child(1) { inset: 13%; }
.radar span:nth-child(2) { inset: 27%; }
.radar span:nth-child(3) { inset: 41%; }

.radar::after {
  content: "";
  position: absolute;
  inset: 1%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(167, 231, 255, 0.24), rgba(167, 231, 255, 0) 26%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 33%, #000 34%, #000 68%, transparent 69%);
  mask: radial-gradient(circle, transparent 33%, #000 34%, #000 68%, transparent 69%);
  animation: radarSpin 9s linear infinite;
}

@keyframes radarSpin {
  to { transform: rotate(360deg); }
}

.hero-aura {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 92, 0.5), rgba(255, 138, 61, 0.12) 45%, transparent 70%);
  filter: blur(8px);
  animation: auraPulse 4s ease-in-out infinite;
}

@keyframes auraPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
}

.hero-shadow {
  position: absolute;
  bottom: 6%;
  width: 46%;
  height: 22px;
  border-radius: 50%;
  background: rgba(1, 33, 76, 0.4);
  filter: blur(12px);
  animation: shadowPulse 4s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(0.9); opacity: 0.5; }
  50% { transform: scaleX(1.08); opacity: 0.75; }
}

.hero-svg {
  position: relative;
  z-index: 3;
  width: min(72vw, 315px);
  max-height: 100%;
  height: auto;
  animation: heroFloat 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(4px) rotate(-0.4deg); }
  50% { transform: translateY(-8px) rotate(0.5deg); }
}

.hero-flames {
  transform-origin: 180px 330px;
  animation: flameFlicker 0.18s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
  from { transform: scaleY(0.9) scaleX(0.97); opacity: 0.88; }
  to { transform: scaleY(1.06) scaleX(1.03); opacity: 1; }
}

.hero-tag {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(4, 42, 92, 0.36);
  border: 1px solid rgba(173, 231, 255, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #DDF6FF;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 28, 65, 0.16);
  animation: tagFloat 5s ease-in-out infinite;
}

.hero-tag .mp-icon {
  width: 13px;
  height: 13px;
  color: #FFD36B;
}

.hero-tag-l { left: 5%; top: 53%; }
.hero-tag-r { right: 5%; top: 66%; animation-delay: -2.2s; }
.hero-tag-r .mp-icon { color: #7EE8FF; }

@keyframes tagFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.start-bottom {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  width: 100%;
  padding: 0 20px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ship-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(3, 33, 73, 0.32);
  border: 1px solid rgba(173, 230, 255, 0.24);
  color: rgba(225, 246, 255, 0.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #79F2B2;
  box-shadow: 0 0 7px rgba(121, 242, 178, 0.95);
}

.btn-play {
  position: relative;
  width: 100%;
  height: 66px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFD171 0%, #FFA43F 42%, #FF7A18 100%);
  color: #FFFDF8;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 rgba(143, 53, 0, 0.4);
  box-shadow:
    0 8px 0 #C34E05,
    0 15px 28px rgba(82, 35, 0, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.68),
    inset 0 -3px 0 rgba(176, 66, 0, 0.22);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-play::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 3px;
  height: 42%;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.btn-play::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 40%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: rotate(22deg);
  animation: btnShine 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btnShine {
  0%, 58% { left: -40%; }
  82%, 100% { left: 118%; }
}

.btn-play .mp-icon {
  width: 31px;
  height: 31px;
  filter: drop-shadow(0 2px 0 rgba(137, 51, 0, 0.35));
}

.btn-play:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 #C34E05,
    0 6px 14px rgba(82, 35, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.start-meta {
  display: flex;
  gap: 9px;
  align-items: stretch;
}

.stats-strip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 17px;
  background: rgba(3, 39, 84, 0.38);
  border: 1px solid rgba(173, 231, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 16px rgba(0, 24, 58, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(207, 238, 255, 0.72);
}

.stat b {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #FFF;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 28, 65, 0.3);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(186, 233, 255, 0.22);
  margin: 0 5px;
}

.round-btn {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(4, 37, 80, 0.44);
  border: 1px solid var(--glass-line);
  color: #E9F8FF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.17), 0 5px 14px rgba(0, 22, 52, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.08s ease, background 0.2s ease;
}

.round-btn:active { transform: scale(0.92); }

.sound-btn { width: auto; min-width: 58px; border-radius: 17px; }
.sound-btn .mp-icon { width: 21px; height: 21px; }

.sound-btn.is-off { color: rgba(206, 235, 255, 0.62); }

.start-hint {
  margin: 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: rgba(222, 244, 255, 0.7);
  text-shadow: 0 1px 6px rgba(0, 25, 60, 0.5);
}

/* ---------- 战斗 HUD ---------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 25;
  padding: calc(max(10px, env(safe-area-inset-top))) 16px 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hud.is-on { opacity: 1; transform: translateY(0); }

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.score-card {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 128px;
  padding: 8px 14px 9px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid rgba(172, 228, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 16px rgba(0, 26, 62, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hud-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #A9DBFF;
}

.score-value {
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #FFF;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 27, 63, 0.4);
}

.score-value.pop { animation: scorePop 0.2s ease-out; }

@keyframes scorePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.17); color: #FFE7A8; }
  100% { transform: scale(1); }
}

.combo-chip {
  position: absolute;
  left: 12px;
  bottom: -13px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FFB449, #F06A0F);
  border: 1px solid rgba(255, 225, 180, 0.55);
  box-shadow: 0 3px 8px rgba(99, 34, 0, 0.3);
  opacity: 0;
  transform: scale(0.72) translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.combo-chip.is-on { opacity: 1; transform: scale(1) translateY(0); }

.combo-chip em {
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FFE9D2;
}

.combo-chip b {
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  color: #FFF;
}

.hud-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lives {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid rgba(172, 228, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.heart {
  width: 18px;
  height: 18px;
  color: #FF4D6D;
  filter: drop-shadow(0 2px 3px rgba(67, 0, 20, 0.35));
  transition: color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.heart.is-off {
  color: rgba(221, 241, 255, 0.22);
  filter: none;
  transform: scale(0.84);
}

.hud-btn { width: 42px; height: 42px; border-radius: 14px; }
.hud-btn .mp-icon { width: 20px; height: 20px; }

.weapon-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.weapon-pill {
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(4, 37, 80, 0.35);
  border: 1px solid rgba(172, 228, 255, 0.22);
  color: #D8F1FF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.weapon-pips {
  display: flex;
  gap: 3px;
  align-items: center;
}

.weapon-pips i {
  width: 13px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.24);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.weapon-pips i.is-on {
  background: linear-gradient(90deg, #FFD05A, #FF8A3D);
  box-shadow: 0 0 8px rgba(255, 174, 82, 0.65);
}

.shield-pill {
  display: none;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 9px;
  color: #8EEBFF;
  border: 1px solid rgba(126, 232, 255, 0.55);
  background: rgba(16, 104, 156, 0.32);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 0 12px rgba(80, 215, 255, 0.25);
}

.shield-pill.is-on { display: inline-flex; }
.shield-pill .mp-icon { width: 13px; height: 13px; }

/* ---------- 暂停 / 结束 ---------- */
.overlay-screen {
  z-index: 40;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 24%, rgba(30, 102, 182, 0.42), transparent 55%),
    rgba(2, 13, 31, 0.74);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.overlay-card {
  width: 100%;
  max-width: 410px;
  max-height: calc(100dvh - 38px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 25px 21px 21px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(58, 140, 221, 0.24), transparent 48%),
    linear-gradient(180deg, rgba(13, 51, 101, 0.97), rgba(5, 27, 61, 0.99));
  border: 1px solid rgba(142, 213, 255, 0.26);
  box-shadow:
    0 26px 70px rgba(0, 9, 26, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #fff;
  text-align: center;
  animation: cardIn 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.panel-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: #7FD4FF;
  text-indent: 0.28em;
}

.panel-title {
  margin: 8px 0 5px;
  font-size: 33px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #FFF;
  text-shadow: 0 3px 0 rgba(9, 52, 107, 0.8), 0 10px 24px rgba(0, 20, 48, 0.4);
}

.panel-sub {
  margin: 0;
  color: rgba(196, 230, 255, 0.74);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.result-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 13px;
}

.result-stars .mp-icon {
  width: 31px;
  height: 31px;
  color: rgba(218, 240, 255, 0.15);
  transition: color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.result-stars .mp-icon.on {
  color: #FFC24D;
  filter: drop-shadow(0 0 9px rgba(255, 190, 70, 0.7));
  transform: scale(1.04);
}

.final-score {
  position: relative;
  margin: 15px 0 13px;
  padding: 15px 12px 12px;
  border-radius: 21px;
  background:
    linear-gradient(180deg, rgba(255, 151, 70, 0.17), rgba(255, 122, 40, 0.05));
  border: 1px solid rgba(255, 169, 96, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.12);
}

.final-score > span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #FFC99C;
  text-indent: 0.2em;
}

.final-score > b {
  display: block;
  margin-top: 2px;
  font-size: 51px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #FFF6DE;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 0 #A84000, 0 10px 26px rgba(66, 19, 0, 0.45);
}

.new-best {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 7px;
  border-radius: 7px;
  background: linear-gradient(180deg, #FFD76F, #FF9A2E);
  color: #6E2500;
  font-size: 8px;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.08em;
  box-shadow: 0 3px 8px rgba(93, 30, 0, 0.32);
  animation: bestPop 1.4s ease-in-out infinite;
}

@keyframes bestPop {
  0%, 100% { transform: scale(1) rotate(-3deg); }
  50% { transform: scale(1.08) rotate(-3deg); }
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 16px;
}

.result-cell {
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(3, 28, 62, 0.44);
  border: 1px solid rgba(146, 208, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-cell span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(176, 220, 255, 0.64);
}

.result-cell b {
  font-size: 15px;
  font-weight: 900;
  color: #EAF8FF;
  font-variant-numeric: tabular-nums;
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 900;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.2s ease;
}

.btn-primary {
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(180deg, #FFC65C, #FF973A 48%, #FF7A18);
  color: #FFF;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 rgba(137, 49, 0, 0.35);
  box-shadow:
    0 6px 0 #BE4A04,
    0 12px 22px rgba(61, 23, 0, 0.34),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary .mp-icon { width: 22px; height: 22px; }

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #BE4A04, 0 5px 12px rgba(61, 23, 0, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.btn-secondary {
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2E88E8, #1661C4);
  border: 1px solid rgba(137, 212, 255, 0.45);
  color: #F2FBFF;
  font-size: 16px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 0 #0A3C7F, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary .mp-icon { width: 19px; height: 19px; }
.btn-secondary:active { transform: translateY(3px); box-shadow: 0 1px 0 #0A3C7F; }

.btn-ghost {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(160, 216, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(196, 229, 255, 0.82);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.btn-ghost:active { background: rgba(255, 255, 255, 0.1); }

/* ---------- 提示 ---------- */
.game-tip {
  position: absolute;
  z-index: 24;
  left: 50%;
  top: calc(max(96px, env(safe-area-inset-top) + 82px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(3, 37, 79, 0.56);
  border: 1px solid rgba(161, 226, 255, 0.3);
  color: #DFF6FF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 6px 18px rgba(0, 20, 50, 0.2);
}

.game-tip.is-on { opacity: 1; transform: translate(-50%, 0); }
.game-tip .mp-icon { width: 15px; height: 15px; color: #FFD36B; }

.toast {
  position: absolute;
  z-index: 50;
  left: 50%;
  top: 31%;
  padding: 9px 16px;
  border-radius: 13px;
  background: rgba(3, 29, 65, 0.82);
  border: 1px solid rgba(155, 225, 255, 0.4);
  color: #F2FCFF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 14, 35, 0.35);
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- 小屏适配 ---------- */
@media (max-height: 740px) {
  .logo { font-size: clamp(42px, 13.4vw, 62px); }
  .logo-wrap { margin-top: 11px; }
  .tagline { margin-top: 11px; }
  .hero-stage { min-height: 172px; max-height: 39vh; }
  .hero-svg { width: min(64vw, 270px); }
  .hero-tag-l { top: 48%; }
  .hero-tag-r { top: 61%; }
  .start-bottom { gap: 8px; }
  .btn-play { height: 60px; font-size: 22px; border-radius: 20px; }
  .ship-chip { display: none; }
  .start-hint { font-size: 9px; }
}

@media (max-height: 630px) {
  .start-screen { padding-top: max(8px, env(safe-area-inset-top)); }
  .eyebrow { padding: 4px 10px; font-size: 9px; }
  .logo { font-size: clamp(38px, 12vw, 52px); }
  .tagline { display: none; }
  .hero-stage { min-height: 138px; }
  .hero-svg { width: min(54vw, 220px); }
  .hero-tag { display: none; }
  .start-bottom { padding: 0 16px calc(10px + env(safe-area-inset-bottom)); gap: 7px; }
  .btn-play { height: 54px; font-size: 20px; }
  .btn-play .mp-icon { width: 25px; height: 25px; }
  .start-hint { display: none; }
  .stats-strip { padding: 6px 10px; }
  .stat b { font-size: 16px; }
  .sound-btn { min-width: 52px; }
  .panel-title { font-size: 28px; }
  .final-score > b { font-size: 43px; }
  .overlay-card { padding: 20px 18px 18px; }
}

@media (max-height: 540px) {
  .hero-stage { display: none; }
  .logo-wrap { margin-top: 10px; }
  .logo { font-size: 44px; }
  .start-bottom { margin-top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
