:root {
  --orange: #FF8A3D;
  --orange-2: #FFB25F;
  --orange-deep: #EE6A22;
  --ink: #3B2A24;
  --muted: #8C7163;
  --cream: #FFF8EE;
  --glass: rgba(255, 255, 255, 0.24);
  --glass-strong: rgba(255, 255, 255, 0.4);
  --glass-line: rgba(255, 255, 255, 0.68);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* {
  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: #8FD1F5;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: fixed;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.92);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

#app {
  position: fixed;
  inset: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #74C4F3 0%, #A9DDF9 42%, #F7D8EC 78%, #FFE7E0 100%);
  isolation: isolate;
}

#stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ── 梦幻天空（gpt-image 成品图） ─────────────────────────── */
#scenery {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #8FD2F6;
  background-image: url("images/gen/gptimg_1795240762_look.png");
  background-size: auto 120%;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  filter: saturate(1.04) brightness(1.015);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

#scenery::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, rgba(35, 105, 180, 0.1) 0%, rgba(35, 105, 180, 0) 32%, rgba(72, 61, 130, 0.1) 100%);
  pointer-events: none;
}

#cloudbank {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8px;
  z-index: 2;
  height: 22vh;
  min-height: 120px;
  pointer-events: none;
  opacity: 0.92;
  filter: blur(1.5px);
  background:
    radial-gradient(40% 64% at 8% 100%, rgba(255, 253, 255, 0.96) 0 38%, rgba(255, 253, 255, 0) 74%),
    radial-gradient(48% 70% at 34% 104%, rgba(255, 241, 249, 0.98) 0 40%, rgba(255, 241, 249, 0) 76%),
    radial-gradient(44% 66% at 62% 98%, rgba(255, 248, 252, 0.94) 0 38%, rgba(255, 248, 252, 0) 74%),
    radial-gradient(52% 72% at 88% 104%, rgba(255, 237, 246, 0.96) 0 40%, rgba(255, 237, 246, 0) 76%),
    radial-gradient(36% 54% at 100% 92%, rgba(255, 225, 238, 0.8) 0 38%, rgba(255, 225, 238, 0) 72%);
  animation: cloudDrift 19s ease-in-out infinite alternate;
  transform: translate3d(0, 0, 0);
}

#cloudbank::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 56%;
  background:
    radial-gradient(36% 70% at 18% 108%, rgba(255, 255, 255, 0.8) 0 42%, rgba(255, 255, 255, 0) 76%),
    radial-gradient(42% 76% at 52% 112%, rgba(255, 244, 250, 0.9) 0 44%, rgba(255, 244, 250, 0) 78%),
    radial-gradient(40% 72% at 82% 108%, rgba(255, 255, 255, 0.84) 0 42%, rgba(255, 255, 255, 0) 76%);
  filter: blur(2px);
}

#vignette {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    radial-gradient(130% 84% at 50% 34%, rgba(24, 52, 98, 0) 54%, rgba(30, 44, 92, 0.22) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 26%, rgba(38, 42, 92, 0.14) 100%);
}

/* ── 环境层 ─────────────────────────────────────────────── */
#streaks,
#dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

#streaks {
  z-index: 3;
}

#dust {
  z-index: 4;
}

.streak {
  position: absolute;
  top: -18vh;
  width: 2px;
  height: 13vh;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  opacity: 0.28;
  animation: streakFall linear infinite;
}

.dust {
  position: absolute;
  border-radius: 50%;
  background: #FFF9D8;
  box-shadow: 0 0 8px rgba(255, 244, 183, 0.9);
  opacity: 0;
  animation: dustTwinkle ease-in-out infinite;
}

#balloonGlow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 190px;
  height: 190px;
  margin: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 203, 126, 0.42) 0%, rgba(255, 185, 104, 0.16) 44%, rgba(255, 185, 104, 0) 70%);
  filter: blur(7px);
  transform: translate3d(-400px, -400px, 0);
  transition: opacity 0.5s ease;
  will-change: transform;
}

#balloonGlow.live {
  opacity: 0.92;
  animation: glowBreath 3.2s ease-in-out infinite alternate;
}

/* ── 动态物体 ───────────────────────────────────────────── */
#entities,
#particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#entities {
  z-index: 6;
}

#particles {
  z-index: 9;
  overflow: hidden;
}

.ent {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
}

.ent-art {
  position: absolute;
  inset: 0;
}

.star .star-art {
  animation: starTwinkle 1.6s ease-in-out infinite alternate;
}

.star .star-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 9px rgba(255, 216, 92, 0.8)) drop-shadow(0 3px 4px rgba(178, 105, 20, 0.3));
}

.star-halo {
  position: absolute;
  inset: -38%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 110, 0.58) 0%, rgba(255, 211, 83, 0.2) 42%, rgba(255, 211, 83, 0) 70%);
  animation: haloPulse 1.9s ease-in-out infinite;
}

.bird .bird-art {
  transition: transform 0.22s ease;
}

.bird .bird-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 7px 8px rgba(37, 82, 128, 0.22));
}

.bird .wing {
  transform-box: fill-box;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: ease-in-out;
  animation-duration: var(--flap, 0.38s);
}

.bird .wing-l {
  transform-origin: 88% 82%;
  animation-name: flapL;
}

.bird .wing-r {
  transform-origin: 12% 82%;
  animation-name: flapR;
}

.storm .storm-art {
  animation: cloudWobble 3.7s ease-in-out infinite alternate;
}

.storm .storm-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 12px 16px rgba(46, 37, 84, 0.28));
}

.storm .bolt {
  animation: boltFlash 2.6s linear infinite;
}

/* 粒子 */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: var(--c, #FFE16D);
  box-shadow: 0 0 8px var(--c, #FFE16D);
  animation: particleFly var(--d, 720ms) cubic-bezier(0.16, 0.8, 0.32, 1) forwards;
}

.particle.soft {
  filter: blur(2px);
  box-shadow: none;
}

.float-text {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  color: #FFF4B8;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(207, 120, 20, 0.36), 0 6px 14px rgba(176, 108, 26, 0.4);
  animation: floatUp 820ms cubic-bezier(0.18, 0.72, 0.32, 1) forwards;
  pointer-events: none;
}

/* ── HUD ────────────────────────────────────────────────── */
#hud {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.score-pill {
  position: absolute;
  top: calc(var(--sat) + 14px);
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 94px;
  height: 52px;
  padding: 5px 18px 5px 7px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.2));
  box-shadow: 0 8px 22px rgba(25, 78, 142, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(13px) saturate(1.25);
  -webkit-backdrop-filter: blur(13px) saturate(1.25);
  transform-origin: 20% 50%;
}

.score-pill.bump {
  animation: scoreBump 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.35);
}

.star-mini {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.star-mini svg {
  width: 36px;
  height: 36px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(180, 107, 15, 0.3));
}

.score-num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(31, 88, 152, 0.38);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: left;
}

.hud-btn {
  position: absolute;
  top: calc(var(--sat) + 14px);
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.2));
  box-shadow: 0 8px 22px rgba(25, 78, 142, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(13px) saturate(1.25);
  -webkit-backdrop-filter: blur(13px) saturate(1.25);
  color: rgba(255, 255, 255, 0.98);
  pointer-events: auto;
  transition: transform 0.12s ease, background 0.2s ease;
}

.hud-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(31, 88, 152, 0.28));
}

.hud-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.5);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sab) + 28px);
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(43, 69, 120, 0.34);
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(28, 58, 110, 0.18);
}

.toast.show {
  animation: toastLife 4.2s ease forwards;
}

/* ── 开始页 ─────────────────────────────────────────────── */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--sat) + max(36px, 7.5vh)) 22px calc(var(--sab) + 18px);
  background:
    linear-gradient(180deg, rgba(22, 75, 140, 0.26) 0%, rgba(22, 75, 140, 0) 26%, rgba(22, 75, 140, 0) 54%, rgba(35, 42, 96, 0.4) 100%);
  pointer-events: auto;
}

.intro-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: riseIn 0.76s cubic-bezier(0.2, 0.8, 0.24, 1) both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 5px 16px rgba(25, 70, 130, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  color: rgba(255, 255, 255, 0.96);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow-star {
  width: 18px;
  height: 18px;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(255, 210, 86, 0.65));
}

.intro-top h1 {
  margin: 18px 0 8px;
  font-size: clamp(42px, 12.4vw, 58px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0.045em;
  background: linear-gradient(180deg, #FFFFFF 2%, #FFF7D7 46%, #FFD47B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(255, 138, 61, 0.22)) drop-shadow(0 10px 24px rgba(30, 80, 150, 0.42));
}

.tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(28, 74, 132, 0.45);
}

.intro-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: riseIn 0.82s 0.08s cubic-bezier(0.2, 0.8, 0.24, 1) both;
}

.tips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(35, 67, 118, 0.2);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.tip svg {
  width: 17px;
  height: 17px;
  display: block;
  opacity: 0.9;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.965);
}

.btn.primary {
  height: 58px;
  width: min(78vw, 306px);
  color: #FFFFFF;
  font-size: 18.5px;
  background: linear-gradient(180deg, #FFAE63 0%, #FF8A3D 46%, #F5762A 100%);
  box-shadow:
    0 14px 30px rgba(214, 84, 18, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.38) inset,
    0 -4px 0 rgba(174, 66, 10, 0.2) inset;
  overflow: hidden;
}

.btn.primary::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 48%;
  height: 180%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.btn.primary svg {
  width: 21px;
  height: 21px;
  display: block;
}

.start-btn {
  margin-top: 2px;
  height: 62px !important;
}

.best-line {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(26, 62, 112, 0.4);
}

.best-line strong {
  color: #FFE9A6;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  margin-left: 2px;
}

/* ── 弹层 ───────────────────────────────────────────────── */
.dim {
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--sat) + 20px) 20px calc(var(--sab) + 20px);
  background: rgba(26, 38, 78, 0.36);
  backdrop-filter: blur(9px) saturate(0.9);
  -webkit-backdrop-filter: blur(9px) saturate(0.9);
  animation: fadeIn 0.26s ease both;
}

.panel {
  width: min(86vw, 344px);
  padding: 24px 22px 20px;
  border-radius: 30px;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF4E4 100%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 30px 70px rgba(18, 30, 68, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  animation: panelIn 0.38s cubic-bezier(0.2, 0.92, 0.28, 1.18) both;
}

.panel-icon,
.over-emblem {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #FFFFFF;
  background: radial-gradient(circle at 34% 26%, #FFC481 0%, #FF9A4C 46%, #F2772B 100%);
  box-shadow: 0 10px 22px rgba(214, 103, 35, 0.32), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.panel-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.over-emblem {
  background: radial-gradient(circle at 34% 26%, #FFF4C9 0%, #FFE079 40%, #FFBE3E 100%);
  box-shadow: 0 12px 26px rgba(221, 154, 29, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.65);
}

.over-emblem svg {
  width: 42px;
  height: 42px;
  display: block;
  filter: drop-shadow(0 3px 5px rgba(170, 100, 10, 0.25));
}

.panel h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #38251E;
}

.panel-sub {
  margin: 8px 0 20px;
  color: #94796A;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.55;
}

.panel .btn.primary {
  width: 100%;
  height: 54px;
  font-size: 17.5px;
}

.panel-actions {
  display: flex;
  gap: 9px;
  margin-top: 11px;
}

.btn.ghost {
  flex: 1 1 0;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255, 138, 61, 0.26);
  background: rgba(255, 255, 255, 0.68);
  color: #B96A38;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.8) inset;
}

.btn.ghost:active {
  background: #FFF0DE;
  transform: scale(0.97);
}

.btn.ghost.sound-btn {
  flex: 0 0 96px;
}

.btn.text {
  margin-top: 7px;
  height: 42px;
  width: 100%;
  color: #A98A76;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.btn.text:active {
  color: #FF8A3D;
}

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

.result {
  padding: 12px 8px 11px;
  border-radius: 18px;
  border: 1px solid rgba(255, 177, 105, 0.28);
  background: linear-gradient(180deg, #FFF8EC, #FFEFDC);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.8) inset;
}

.result span {
  display: block;
  color: #9A7C69;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.result b {
  display: block;
  margin-top: 4px;
  color: #F0762A;
  font-size: 31px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.new-best {
  margin: -4px 0 13px;
  color: #E8792C;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.new-best::before,
.new-best::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 7px 2px;
  border-radius: 50%;
  background: #FFC24B;
  box-shadow: 0 0 7px rgba(255, 179, 55, 0.8);
}

#flash {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 228, 178, 0.7) 35%, rgba(255, 196, 122, 0) 68%);
  opacity: 0;
}

#flash.on {
  animation: flashBurst 0.62s ease-out forwards;
}

/* ── 动效 ───────────────────────────────────────────────── */
@keyframes starTwinkle {
  from { transform: scale(0.92) rotate(-6deg); }
  to { transform: scale(1.07) rotate(5deg); }
}

@keyframes haloPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.72; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes flapL {
  from { transform: rotate(-13deg); }
  to { transform: rotate(11deg); }
}

@keyframes flapR {
  from { transform: rotate(13deg); }
  to { transform: rotate(-11deg); }
}

@keyframes cloudWobble {
  from { transform: translateY(-4px) rotate(-1.5deg); }
  to { transform: translateY(5px) rotate(1.6deg); }
}

@keyframes boltFlash {
  0%, 68%, 100% { opacity: 0; }
  72%, 82% { opacity: 1; }
  88% { opacity: 0.3; }
}

@keyframes particleFly {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  100% { transform: translate3d(var(--tx, 0), var(--ty, 0), 0) scale(var(--sc, 0.35)); opacity: 0; }
}

@keyframes floatUp {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  18% { opacity: 1; transform: translate(-50%, -62%) scale(1.08); }
  100% { transform: translate(-50%, -160%) scale(1); opacity: 0; }
}

@keyframes cloudDrift {
  from { transform: translate3d(-14px, 0, 0); }
  to { transform: translate3d(14px, 0, 0); }
}

@keyframes streakFall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 148vh, 0); }
}

@keyframes dustTwinkle {
  0%, 100% { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.7); }
  35% { opacity: 0.9; }
  70% { opacity: 0.35; }
  90% { opacity: 0; transform: translate3d(0, -18px, 0) scale(1.1); }
}

@keyframes glowBreath {
  from { opacity: 0.68; }
  to { opacity: 1; }
}

@keyframes scoreBump {
  0% { transform: scale(1); }
  38% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

@keyframes toastLife {
  0% { opacity: 0; transform: translate(-50%, 14px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  78% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flashBurst {
  0% { opacity: 0; }
  14% { opacity: 0.95; }
  100% { opacity: 0; }
}

@keyframes shakeIt {
  0%, 100% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-9px, 4px, 0) rotate(-0.5deg); }
  30% { transform: translate3d(8px, -5px, 0) rotate(0.6deg); }
  45% { transform: translate3d(-6px, 3px, 0) rotate(-0.4deg); }
  60% { transform: translate3d(5px, -2px, 0) rotate(0.3deg); }
  78% { transform: translate3d(-3px, 1px, 0); }
}

#app.crash-shake {
  animation: shakeIt 0.52s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ── 小屏适配 ───────────────────────────────────────────── */
@media (max-height: 720px) {
  .intro {
    padding-top: calc(var(--sat) + 30px);
    padding-bottom: calc(var(--sab) + 12px);
  }

  .intro-top h1 {
    margin-top: 12px;
    font-size: clamp(36px, 11vw, 48px);
  }

  .tagline {
    font-size: 13px;
  }

  .intro-bottom {
    gap: 10px;
  }

  .btn.primary {
    height: 54px;
  }

  .start-btn {
    height: 56px !important;
  }

  .panel {
    padding: 20px 20px 16px;
  }

  .panel-icon,
  .over-emblem {
    width: 58px;
    height: 58px;
    margin-bottom: 9px;
  }

  .panel-sub {
    margin: 6px 0 15px;
  }

  .result b {
    font-size: 27px;
  }
}

@media (max-height: 620px) {
  .tips {
    display: none;
  }

  .intro-top h1 {
    font-size: 36px;
  }

  .tagline {
    display: none;
  }

  .eyebrow {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cloudbank,
  .storm .storm-art,
  .storm .bolt,
  #balloonGlow.live {
    animation: none;
  }
}
