/* =========================================================
   雪峰竞速 · 竖屏滑雪竞速 H5
   ========================================================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #08192B;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #17324A;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1000px 700px at 50% -10%, #1D4B77 0%, #0C2339 55%, #071626 100%);
}

#app {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #A8D4F2;
  isolation: isolate;
}
@media (min-width: 640px) {
  #app {
    height: min(960px, 100dvh);
    border-radius: 30px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  }
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#game:active { cursor: grabbing; }

.screen { position: absolute; inset: 0; }

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

/* ---------- 通用按钮 ---------- */
button {
  font-family: inherit;
  border: 0;
  cursor: pointer;
  color: inherit;
  touch-action: manipulation;
}
.mp-icon { flex: 0 0 auto; }

.icon-btn {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(15, 42, 68, .38);
  border: 1px solid rgba(255, 255, 255, .34);
  box-shadow: 0 6px 18px rgba(10, 35, 60, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform .16s ease, background .2s ease;
}
.icon-btn .mp-icon { width: 25px; height: 25px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2)); }
.icon-btn:active { transform: scale(.92); background: rgba(15, 42, 68, .55); }
.icon-btn .off { display: none; }
.sound-toggle.is-muted .on { display: none; }
.sound-toggle.is-muted .off { display: inline-block; }

/* =========================================================
   开始界面
   ========================================================= */
.start {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity .38s ease, visibility 0s linear .38s;
}
/* 只有按钮可点，其余区域留给画布与场景 */
.start .btn-primary,
.start .icon-btn { pointer-events: auto; }
.start.is-gone {
  opacity: 0;
  visibility: hidden;
  transition: opacity .38s ease, visibility 0s linear .38s;
}
.start::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 30, 54, .26) 0%, rgba(8, 30, 54, 0) 22%),
    linear-gradient(0deg, rgba(7, 28, 50, .52) 0%, rgba(7, 28, 50, 0) 20%);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 0;
}

.coin-chip,
.hud-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 15px 0 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 42, 68, .42);
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 8px 22px rgba(8, 30, 52, .24), inset 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.coin-chip .mp-icon { width: 28px; height: 28px; color: #FFD34F; filter: drop-shadow(0 2px 3px rgba(120, 60, 0, .35)); }
.coin-chip strong {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.coin-chip span { font-size: 11px; font-weight: 700; opacity: .7; margin-left: -1px; }

.hero {
  position: relative;
  z-index: 2;
  margin-top: auto;
  margin-bottom: auto;
  padding: 18px 24px 0;
  text-align: center;
  transform: translateY(-30px);
}
.logo-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #FFB25C 0%, #FF8A3D 45%, #F26212 100%);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow:
    0 12px 26px rgba(150, 58, 0, .35),
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -6px 12px rgba(190, 70, 0, .28);
  transform: rotate(-4deg);
}
.logo-mark .mp-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 2px rgba(140, 55, 0, .35));
}
.kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: #EAF7FF;
  background: rgba(11, 38, 64, .3);
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero h1 {
  margin: 12px 0 0;
  font-size: clamp(44px, 13.5vw, 64px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(23, 66, 103, .35),
    0 8px 22px rgba(5, 30, 55, .5),
    0 18px 46px rgba(5, 30, 55, .3);
}
.hero h1::after {
  content: "";
  display: block;
  width: 62px;
  height: 5px;
  margin: 14px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #FFC24D, #FF7A1F);
  box-shadow: 0 3px 10px rgba(180, 70, 0, .4);
}
.hero p {
  margin: 13px 0 0;
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 8px rgba(5, 30, 55, .5);
}

.start-foot {
  position: relative;
  z-index: 3;
  padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 18px);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(255, 255, 255, .94);
  background: rgba(13, 40, 66, .34);
  border: 1px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.meta .mp-icon { width: 14px; height: 14px; color: #FFD46B; }
.meta.best .mp-icon { color: #FFD34F; }
#bestStart { font-variant-numeric: tabular-nums; }

.btn-primary {
  position: relative;
  width: 100%;
  min-height: 66px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  background: linear-gradient(180deg, #FFB95F 0%, #FF922F 34%, #FF7A1D 62%, #F15C05 100%);
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow:
    0 8px 0 #B94600,
    0 18px 30px rgba(140, 52, 0, .38),
    inset 0 3px 1px rgba(255, 255, 255, .52),
    inset 0 -10px 18px rgba(190, 62, 0, .3);
  text-shadow: 0 2px 0 rgba(150, 55, 0, .4);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s ease;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 4px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn-primary .mp-icon { width: 30px; height: 30px; filter: drop-shadow(0 2px 2px rgba(140, 50, 0, .35)); }
.btn-primary:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 #B94600,
    0 8px 14px rgba(140, 52, 0, .32),
    inset 0 2px 1px rgba(255, 255, 255, .4),
    inset 0 -6px 12px rgba(190, 62, 0, .3);
}
@media (hover: hover) {
  .btn-primary:hover { filter: brightness(1.04); }
}
.start-btn { letter-spacing: 5px; }
.hint {
  margin: 0 0 2px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 3px rgba(0, 22, 45, .8), 0 0 10px rgba(0, 22, 45, .35);
}

/* =========================================================
   游戏 HUD
   ========================================================= */
.hud {
  pointer-events: none;
  transition: opacity .3s ease;
}
.hud-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 0;
}
.hud-pill {
  height: 42px;
  padding: 0 13px 0 10px;
  gap: 6px;
}
.hud-pill .mp-icon { width: 25px; height: 25px; color: #FFD34F; filter: drop-shadow(0 2px 3px rgba(120, 60, 0, .35)); }
.hud-pill strong {
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.race {
  align-self: start;
  padding: 7px 12px 9px;
  border-radius: 16px;
  background: rgba(15, 42, 68, .34);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 6px 18px rgba(8, 30, 52, .18), inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.race-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
}
.rank-label { color: #FFD977; }
.left-label { font-variant-numeric: tabular-nums; opacity: .92; }
.rail {
  position: relative;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px 2px rgba(0, 30, 55, .22);
}
.rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFB13E, #FF6B16);
  box-shadow: 0 0 8px rgba(255, 140, 40, .55);
  transition: width .12s linear;
}
.rail-dot {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  transition: left .12s linear;
}
.rail-dot.me {
  background: #fff;
  border: 2px solid #FF7A1D;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .4), 0 2px 6px rgba(120, 40, 0, .4);
  z-index: 2;
}
.rail-dot.rival {
  background: #8FD6FF;
  border: 2px solid #2B6FA8;
  box-shadow: 0 2px 6px rgba(0, 40, 70, .4);
}

.combo {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  right: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 8px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 170, 60, .96), rgba(244, 93, 15, .96));
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 8px 20px rgba(150, 50, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transform: rotate(2deg);
  transition: opacity .18s ease, transform .18s ease;
}
.combo b {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.5px;
  text-shadow: 0 2px 0 rgba(150, 55, 0, .35);
}
.combo span { font-size: 10.5px; font-weight: 800; opacity: .95; white-space: nowrap; }
.combo.hidden { transform: rotate(2deg) scale(.7); }

.speed-pill {
  position: absolute;
  left: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 8px 13px 8px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 42, 68, .32);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 6px 16px rgba(8, 30, 52, .18);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.speed-pill .mp-icon { width: 16px; height: 16px; color: #FFD34F; align-self: center; }
.speed-pill strong { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.speed-pill span { font-size: 9.5px; font-weight: 700; opacity: .7; letter-spacing: .3px; }

.hint-toast {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
  background: rgba(13, 38, 64, .48);
  border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  animation: toastFade 3.2s ease forwards;
  pointer-events: none;
}
@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  72% { opacity: 1; }
  100% { opacity: 0; }
}

.countdown {
  position: absolute;
  left: 50%;
  top: 40%;
  width: clamp(112px, 34vw, 148px);
  height: clamp(112px, 34vw, 148px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: clamp(66px, 19vw, 92px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  color: #fff;
  background:
    radial-gradient(circle at 34% 26%, #FFCF87 0%, #FF9A47 38%, #FA6E15 72%, #DC4A00 100%);
  border: 3px solid rgba(255, 255, 255, .92);
  box-shadow:
    0 16px 34px rgba(90, 32, 0, .4),
    0 0 0 9px rgba(255, 255, 255, .14),
    inset 0 5px 0 rgba(255, 255, 255, .5),
    inset 0 -12px 18px rgba(160, 50, 0, .35);
  text-shadow:
    0 4px 0 rgba(166, 56, 0, .55),
    0 10px 18px rgba(110, 40, 0, .4);
  opacity: 0;
  pointer-events: none;
}
.countdown.show { opacity: 1; animation: cdPop .55s cubic-bezier(.2, .9, .25, 1.2) both; }
.countdown.go {
  background: radial-gradient(circle at 34% 26%, #B6FFD9 0%, #4FE59B 40%, #16C777 74%, #06935B 100%);
  text-shadow: 0 4px 0 rgba(0, 103, 63, .6), 0 10px 18px rgba(0, 80, 50, .4);
  box-shadow:
    0 16px 34px rgba(0, 70, 40, .38),
    0 0 0 9px rgba(255, 255, 255, .16),
    inset 0 5px 0 rgba(255, 255, 255, .5),
    inset 0 -12px 18px rgba(0, 80, 50, .3);
  letter-spacing: 1px;
  font-size: clamp(42px, 12.5vw, 60px);
}
@keyframes cdPop {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  45% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.floater {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .5px;
  white-space: nowrap;
  pointer-events: none;
  animation: floatUp .82s cubic-bezier(.2, .7, .3, 1) forwards;
  text-shadow: 0 2px 0 rgba(120, 65, 0, .45), 0 4px 10px rgba(0, 30, 55, .3);
}
.floater.good { color: #FFE071; }
.floater.bad { color: #FF8A8A; font-size: 19px; }
.floater.boost { color: #9DEEFF; }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.65); }
  18% { opacity: 1; transform: translate(-50%, -55%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(.95); }
}

.hit-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 72%, rgba(255, 70, 40, 0) 30%, rgba(220, 40, 20, .42) 100%);
}
.hit-flash.show { animation: hitFlash .42s ease-out; }
@keyframes hitFlash {
  0% { opacity: .9; }
  100% { opacity: 0; }
}

/* =========================================================
   暂停 / 结算
   ========================================================= */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
  background: rgba(6, 26, 45, .52);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  transition: opacity .28s ease, visibility 0s linear .28s;
  overflow: hidden;
}
.overlay:not(.hidden) { visibility: visible; opacity: 1; transition: opacity .28s ease; }

.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 352px;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px) * .2);
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, #FFFDF9 0%, #F8F2E8 100%);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow:
    0 30px 70px rgba(0, 18, 38, .5),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}
.overlay:not(.hidden) .card { animation: cardIn .42s cubic-bezier(.18, 1.1, .3, 1) both; }
@keyframes cardIn {
  0% { opacity: 0; transform: translateY(26px) scale(.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.card-kicker {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #C68641;
}
.card h2 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 1px;
  color: #16324A;
}
.card-sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #7B8794;
  font-weight: 600;
}
.pause-card .btn-primary { margin-top: 20px; }
.pause-card .btn-primary .mp-icon { width: 24px; height: 24px; }

.menu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}
.btn-ghost {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .4px;
  color: #3B5268;
  background: #fff;
  border: 1.5px solid #E4DED2;
  box-shadow: 0 3px 0 rgba(190, 180, 165, .35), inset 0 1px 0 #fff;
  transition: transform .12s ease, background .15s ease;
}
.btn-ghost .mp-icon { width: 19px; height: 19px; color: #8A7A64; }
.btn-ghost:active { transform: translateY(2px); background: #F6F1E8; box-shadow: 0 1px 0 rgba(190, 180, 165, .3); }
.btn-ghost.wide { width: 100%; margin-top: 9px; }

.sound-row {
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #536577;
  background: rgba(228, 221, 209, .45);
  border: 1px solid rgba(205, 195, 180, .4);
  font-size: 12.5px;
  font-weight: 800;
}
.sound-row .mp-icon { width: 19px; height: 19px; color: #F1792B; }
.sound-row b { margin-left: auto; font-size: 12px; color: #16324A; }
.sound-row .off { display: none; }
.sound-row.is-muted .on { display: none; }
.sound-row.is-muted .off { display: inline-block; }

/* 结算卡 */
.result-card { padding-top: 26px; }
.medal {
  width: 82px;
  height: 82px;
  margin: -58px auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}
.medal::before,
.medal::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55);
  opacity: .7;
}
.medal::after { inset: -16px; opacity: .28; }
.medal .mp-icon { width: 42px; height: 42px; color: #fff; filter: drop-shadow(0 3px 4px rgba(120, 55, 0, .35)); }
.medal.gold {
  background: linear-gradient(160deg, #FFE68E 0%, #FFC43D 42%, #F09A00 100%);
  box-shadow: 0 10px 24px rgba(190, 105, 0, .4), inset 0 3px 0 rgba(255, 255, 255, .6);
}
.medal.silver {
  background: linear-gradient(160deg, #F4FAFF 0%, #CFE0EC 45%, #90AFC6 100%);
  box-shadow: 0 10px 24px rgba(70, 100, 130, .32), inset 0 3px 0 rgba(255, 255, 255, .7);
}
.new-record {
  display: inline-block;
  margin: 10px 0 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #8C4C00;
  background: linear-gradient(180deg, #FFE7A4, #FFC94F);
  border: 1px solid #F0B22F;
  box-shadow: 0 3px 8px rgba(220, 140, 0, .25);
}
.new-record.hidden { display: none; }
.result-card h2 { font-size: 34px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 18px;
}
.stat {
  padding: 10px 4px 9px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #EDE6DA;
  box-shadow: 0 3px 8px rgba(150, 130, 100, .08);
}
.stat span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #A0937E;
}
.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.2px;
  color: #17324A;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wallet-line {
  margin: 13px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #84909D;
}
.wallet-line .mp-icon { width: 18px; height: 18px; color: #F0A61E; }
.wallet-line b { color: #17324A; font-size: 13px; font-weight: 900; }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  transform: rotate(var(--r));
  animation: confettiFall var(--t) linear var(--d) forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(var(--r)); }
  100% { opacity: .9; transform: translateY(115vh) rotate(calc(var(--r) + 460deg)); }
}

/* 小屏适配 */
@media (max-height: 680px) {
  .hero { transform: translateY(-10px); }
  .logo-mark { width: 54px; height: 54px; border-radius: 18px; margin-bottom: 9px; }
  .logo-mark .mp-icon { width: 32px; height: 32px; }
  .hero h1 { font-size: clamp(36px, 11vw, 50px); }
  .hero h1::after { margin-top: 9px; }
  .hero p { margin-top: 8px; font-size: 12px; }
  .kicker { font-size: 9px; padding: 5px 10px; }
  .start-foot { gap: 9px; }
  .btn-primary { min-height: 58px; font-size: 20px; }
  .start-btn { letter-spacing: 4px; }
  .meta { font-size: 10px; padding: 6px 8px; }
  .card { padding-top: 20px; }
  .medal { width: 70px; height: 70px; margin-top: -50px; }
  .result-card h2 { font-size: 29px; }
  .stat strong { font-size: 16px; }
}

@media (max-height: 580px) {
  .hero .logo-mark, .hero .kicker { display: none; }
  .hero { transform: translateY(0); }
  .hero h1 { font-size: 34px; }
  .hero p { display: none; }
  .start-foot { gap: 7px; }
  .meta-row { display: none; }
}
