*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #E74C3C;
  --amber: #D4845C;
  --sky: #87CEEB;
  --sky-deep: #4A90D9;
  --green: #27AE60;
  --text: #2C1810;
  --white: #fff;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --vh: 100vh;
  --touch: 44px;
  --splash-bg: linear-gradient(180deg, #5C1A12 0%, #C45A2C 45%, #E8A15A 78%, #F3D2A6 100%);
  --font-display: "ZCOOL XiaoWei", "STKaiti", "KaiTi", "PingFang SC", serif;
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@supports (height: 100dvh) { :root { --vh: 100dvh; } }
@supports (height: -webkit-fill-available) {
  :root { --vh: -webkit-fill-available; }
}

* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

html {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  background: #5C1A12;
}
body {
  width: 100%;
  min-height: 100%;
  min-height: var(--vh);
  min-height: -webkit-fill-available;
  overflow: hidden;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  background: var(--splash-bg);
}

.screen {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  display: none; flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }
.hidden { display: none !important; }

/* ===== 连贯开屏大片（无静态加载页） ===== */
#splash {
  background: var(--splash-bg);
}
.cine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  --cine-dur: 9.5s;
}
.cine-sky {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #00897b 0%, #ffcc80 55%, #ff8a65 100%);
  animation: sky-shift var(--cine-dur) ease both;
}
.cine.play .cine-sky { animation-play-state: running; }
@keyframes sky-shift {
  0% { filter: brightness(0.85) saturate(1.05); background: linear-gradient(180deg, #0277bd, #4fc3f7, #ffe082); }
  25% { filter: brightness(1) saturate(1.15); background: linear-gradient(180deg, #1565c0, #4fc3f7, #fff59d); }
  55% { filter: brightness(1.05); background: linear-gradient(180deg, #00897b, #ffcc80, #ff8a65); }
  80%,100% { background: linear-gradient(180deg, #ff7043, #ffab91, #fff3e0); filter: brightness(1); }
}
.cine-clouds {
  position: absolute; inset: -10% -20%; z-index: 1; pointer-events: none; opacity: 0;
  background:
    radial-gradient(ellipse 100px 44px at 15% 30%, rgba(255,255,255,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 140px 50px at 70% 22%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 80px 36px at 40% 55%, rgba(255,255,255,0.7) 0%, transparent 70%);
}
.cine.play .cine-clouds {
  animation: clouds-rush var(--cine-dur) linear both;
}
@keyframes clouds-rush {
  0% { opacity: 0; transform: translateX(40px) scale(1.2); }
  8% { opacity: 1; }
  45% { opacity: 0.7; transform: translateX(-80px) scale(1); }
  70%,100% { opacity: 0; transform: translateX(-160px); }
}
.cine-flash {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: #fff; opacity: 0;
}
.cine.play .cine-flash {
  animation: flash-hits var(--cine-dur) ease both;
}
@keyframes flash-hits {
  0%,18%,19.5%,42%,43.5%,62%,63.5%,100% { opacity: 0; }
  19%,43%,63% { opacity: 0.55; }
}

.cine-layer {
  position: absolute; z-index: 5; opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.35));
}
.cine-layer img { display: block; width: 100%; height: auto; }

/* 飞机：冲入 → 定格 → 掠出 */
.cine-plane {
  width: min(78vw, 300px);
  left: 50%; top: 28%;
  transform: translate(-50%, -40%) scale(0.2);
}
.cine.play .cine-plane {
  animation: plane-rush 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes plane-rush {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.15) rotate(-12deg); }
  35% { opacity: 1; transform: translate(-50%, -20%) scale(1.15) rotate(0); }
  70% { opacity: 1; transform: translate(-50%, -25%) scale(1) rotate(2deg); }
  100% { opacity: 0; transform: translate(80%, -60%) scale(0.5) rotate(18deg); }
}

/* 笔记砸入 */
.cine-note {
  left: 50%; top: 32%; width: min(70vw, 260px);
  transform: translate(-50%, -50%);
  filter: none;
}
.cine-notebook {
  background: #FFF8E7; border: 3px solid #5D4037; border-radius: 8px;
  padding: 18px 16px; text-align: left;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), 8px 8px 0 rgba(0,0,0,0.12);
}
.nb-label { font-size: 11px; color: #8D6E63; }
.nb-title { font-size: clamp(32px, 10vw, 42px); font-weight: 900; color: var(--red); margin: 4px 0 8px; }
.nb-poem { font-size: 12px; color: var(--text); line-height: 1.6; font-style: italic; }
.cine.play .cine-note {
  animation: note-slam 2.2s cubic-bezier(0.15, 1.2, 0.3, 1) 1.9s both;
}
@keyframes note-slam {
  0% { opacity: 0; transform: translate(-50%, -120%) scale(1.6) rotate(-18deg); }
  40% { opacity: 1; transform: translate(-50%, -45%) scale(1.05) rotate(2deg); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: translate(-120%, -30%) scale(0.7) rotate(-25deg); }
}

/* 主角冲入 */
.cine-hero {
  width: min(62vw, 240px);
  left: 50%; top: 26%;
  transform: translate(-50%, 0);
}
.cine.play .cine-hero {
  animation: hero-burst 2.4s cubic-bezier(0.2, 1.1, 0.3, 1) 3.7s both;
}
@keyframes hero-burst {
  0% { opacity: 0; transform: translate(-50%, 60%) scale(0.4) rotate(-10deg); }
  35% { opacity: 1; transform: translate(-50%, 0) scale(1.12) rotate(0); }
  70% { opacity: 1; transform: translate(-50%, -4%) scale(1); }
  100% { opacity: 0; transform: translate(-130%, -10%) scale(0.75) rotate(8deg); }
}

/* 出租车疾驰 */
.cine-taxi {
  width: min(95vw, 380px);
  left: -40%; top: 42%;
}
.cine.play .cine-taxi {
  animation: taxi-whip 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 5.5s both;
}
@keyframes taxi-whip {
  0% { opacity: 0; transform: translateX(-30%) rotate(-6deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(160%) rotate(4deg); }
}

/* 东坡肉撞击 */
.cine-pork {
  width: min(68vw, 260px);
  left: 50%; top: 30%;
  transform: translate(-50%, -50%);
}
.cine.play .cine-pork {
  animation: pork-impact 2.2s cubic-bezier(0.15, 1.3, 0.3, 1) 6.5s both;
}
@keyframes pork-impact {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4) rotate(12deg); filter: drop-shadow(0 0 0 transparent) blur(6px); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(-2deg); filter: drop-shadow(0 24px 48px rgba(0,0,0,0.4)) blur(0); }
  75% { opacity: 1; transform: translate(-50%, -52%) scale(1); }
  /* 收在中景尺寸，交给落地放大接续，不再淡出消失 */
  100% { opacity: 1; transform: translate(-50%, -50%) scale(0.92); filter: drop-shadow(0 18px 28px rgba(40,12,8,0.35)) blur(0); }
}

/* 字幕 */
.cine-subs {
  position: absolute; left: 0; right: 0; bottom: calc(22% + var(--safe-b));
  z-index: 12; text-align: center; pointer-events: none;
}
.cine-subs .sub {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(15px, 4.2vw, 18px); font-weight: 700;
  color: var(--text);
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--text);
  border-radius: 18px;
  padding: 10px 18px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
  opacity: 0;
}
.cine.play .s1 { animation: sub-pop 1.8s ease 0.4s both; }
.cine.play .s2 { animation: sub-pop 1.8s ease 2.2s both; }
.cine.play .s3 { animation: sub-pop 1.6s ease 4.2s both; }
.cine.play .s4 { animation: sub-pop 1.8s ease 6.6s both; }
@keyframes sub-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(16px) scale(0.9); }
  20%,70% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.96); }
}

/* 终场：东坡肉铺满主视觉，品牌落在下半屏 */
.cine-finale {
  position: absolute; inset: 0; z-index: 15;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 0 24px calc(56px + var(--safe-b));
  opacity: 0; pointer-events: none;
  background:
    linear-gradient(180deg,
      transparent 0%,
      transparent 38%,
      rgba(48,16,10,0.28) 62%,
      rgba(36,12,8,0.72) 100%);
}
.cine.play .cine-finale {
  animation: finale-in 1s ease 8s both;
}
.cine.landing .cine-finale {
  animation: finale-in 0.95s ease 0.55s both;
}
.cine.done .cine-finale {
  animation: none;
  opacity: 1; pointer-events: auto;
}
.cine.landing .cine-finale .cine-cta,
.cine.done .cine-finale .cine-cta { pointer-events: auto; }
@keyframes finale-in {
  from { opacity: 0; }
  to { opacity: 1; pointer-events: auto; }
}
.cine-finale-steam {
  position: absolute;
  left: 50%; top: 18%;
  width: min(70vw, 280px);
  height: 28%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}
.cine-finale-steam i {
  position: absolute;
  bottom: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,248,236,0.55);
  filter: blur(1px);
  animation: steam-rise 3.2s ease-in-out infinite;
}
.cine-finale-steam i:nth-child(1) { left: 28%; animation-delay: 0s; }
.cine-finale-steam i:nth-child(2) { left: 48%; width: 14px; height: 14px; animation-delay: 0.7s; }
.cine-finale-steam i:nth-child(3) { left: 66%; animation-delay: 1.3s; }
@keyframes steam-rise {
  0% { opacity: 0; transform: translateY(20px) scale(0.6); }
  35% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-90px) scale(1.4); }
}
.cine-finale-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cine-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 13vw, 60px);
  font-weight: 400;
  line-height: 1.15;
  color: #FFF6EB;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
  animation: title-settle 0.9s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
.cine.play .cine-title { animation-delay: 8.15s; }
.cine.landing .cine-title { animation: title-settle 0.9s cubic-bezier(0.2, 1.2, 0.3, 1) 0.65s both; }
.cine.done .cine-title { animation: none; opacity: 1; }
@keyframes title-settle {
  from { opacity: 0; transform: translateY(18px); letter-spacing: 0.32em; }
  to { opacity: 1; transform: translateY(0); letter-spacing: 0.18em; }
}
.cine-tagline {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,246,235,0.88);
  letter-spacing: 0.14em;
  margin-bottom: 22px;
  animation: tagline-in 0.8s ease 0.15s both;
}
.cine.play .cine-tagline { animation-delay: 8.35s; }
.cine.landing .cine-tagline { animation: tagline-in 0.8s ease 0.8s both; }
.cine.done .cine-tagline { animation: none; opacity: 1; }
@keyframes tagline-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.cine-cta {
  appearance: none;
  border: none;
  width: min(78vw, 240px);
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 14px;
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #6E1F14;
  background: #FFF4E4;
  box-shadow: 0 10px 0 #8B2E1F;
  touch-action: manipulation;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: cta-bob 2.4s ease-in-out 0.5s infinite;
}
.cine-cta:active {
  transform: translateY(6px);
  box-shadow: 0 4px 0 #8B2E1F;
  animation: none;
}
@keyframes cta-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 落地过渡：从中景流畅放大到终场主视觉 */
.cine.landing .cine-layer:not(.cine-pork),
.cine.landing .cine-subs .sub,
.cine.landing .cine-clouds,
.cine.landing .cine-flash,
.cine.done .cine-layer:not(.cine-pork),
.cine.done .cine-subs .sub,
.cine.done .cine-clouds,
.cine.done .cine-flash {
  animation: none !important;
  opacity: 0 !important;
  transition: opacity 0.55s ease;
}
.cine.landing .cine-pork {
  opacity: 1 !important;
  left: 50%;
  top: 34%;
  z-index: 6;
  animation: pork-land-zoom 1.45s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
@keyframes pork-land-zoom {
  0% {
    width: min(68vw, 260px);
    top: 32%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.92);
    filter: drop-shadow(0 18px 28px rgba(40,12,8,0.35));
  }
  100% {
    width: min(108vw, 520px);
    top: 36%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 28px 36px rgba(40,12,8,0.4));
  }
}
.cine.done .cine-pork {
  opacity: 1 !important;
  left: 50%;
  top: 36%;
  width: min(108vw, 520px);
  transform: translate(-50%, -50%) scale(1);
  filter: drop-shadow(0 28px 36px rgba(40,12,8,0.4));
  z-index: 6;
  animation: pork-breathe 4s ease-in-out infinite !important;
}
@keyframes pork-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, calc(-50% - 6px)) scale(1.03); }
}
.cine.landing .cine-sky,
.cine.done .cine-sky {
  animation: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% 34%, rgba(255,196,120,0.55) 0%, transparent 58%),
    radial-gradient(ellipse 120% 40% at 50% 100%, rgba(243,210,166,0.9) 0%, transparent 50%),
    linear-gradient(180deg, #4A140E 0%, #A63D24 36%, #E08A45 70%, #F0C896 100%);
  transition: filter 1.2s ease;
}
.cine.landing .cine-sky {
  animation: sky-land-in 1.4s ease both;
}
@keyframes sky-land-in {
  from { filter: brightness(1.08) saturate(1.05); }
  to { filter: brightness(1) saturate(1); }
}
.cine.landing .cine-sky::after,
.cine.done .cine-sky::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 70%, rgba(255,255,255,0.2) 0 1px, transparent 2px);
  background-size: 120px 120px, 160px 160px, 90px 90px;
  animation: dust-drift 18s linear infinite;
}
.cine.landing .cine-sky::after { opacity: 0; animation: dust-fade-in 1.2s ease 0.3s both; }
@keyframes dust-fade-in {
  from { opacity: 0; }
  to { opacity: 0.22; }
}
@keyframes dust-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-40px); }
}

/* ===== 启程飞入杭州 ===== */
#flight {
  background: #4fc3f7;
}
.flight-stage {
  position: absolute; inset: 0;
  overflow: hidden;
}
.flight-air {
  position: absolute; inset: 0;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.flight-stage.is-cabin .flight-air {
  opacity: 0; transform: scale(1.08);
  pointer-events: none;
}
.flight-sky {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.05);
  animation: sky-drift 12s ease-in-out infinite alternate;
}
@keyframes sky-drift {
  from { transform: scale(1.05) translateY(0); }
  to { transform: scale(1.1) translateY(-2%); }
}
.flight-cloud {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.78);
  filter: blur(2px);
  pointer-events: none;
  animation: cloud-pass 9s linear infinite;
}
.flight-cloud.c1 { width: 120px; height: 48px; top: 18%; left: -30%; animation-duration: 11s; }
.flight-cloud.c2 { width: 160px; height: 56px; top: 32%; left: -40%; animation-duration: 14s; animation-delay: -4s; opacity: 0.7; }
.flight-cloud.c3 { width: 90px; height: 36px; top: 48%; left: -25%; animation-duration: 10s; animation-delay: -7s; opacity: 0.85; }
@keyframes cloud-pass {
  from { transform: translateX(0); }
  to { transform: translateX(140vw); }
}

/* 外景页景点标签（可点查看历史） */
.flight-spots {
  position: absolute; inset: 0; z-index: 8;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}
.flight-spots .spot-tag {
  pointer-events: none; /* 默认不可点，避免飞行/机舱阶段点到隐形标签 */
}
/* 仅落地外景、未进机舱时可点 */
.flight-stage.is-ready:not(.is-cabin) .flight-spots {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}
.flight-stage.is-ready:not(.is-cabin) .flight-spots .spot-tag {
  pointer-events: auto;
}
.flight-stage.is-cabin .flight-spots,
.flight-stage.is-fly .flight-spots {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.flight-stage.is-cabin .flight-spots .spot-tag,
.flight-stage.is-fly .flight-spots .spot-tag {
  pointer-events: none !important;
}

/* 侧视飞机：3D 椭圆环绕（远近缩放 + 左右绕景） */
.flight-air {
  perspective: 900px;
  perspective-origin: 50% 42%;
}
.flight-jet {
  position: absolute;
  z-index: 7;
  width: min(48vw, 200px);
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,0.35));
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.flight-jet img {
  width: 100%; display: block;
  transform: translateZ(0);
}
.flight-stage.is-fly .flight-jet {
  /* linear：匀速绕圈，避免关键帧间忽快忽慢 */
  animation: jet-ring-3d 6.5s linear both;
}
.flight-stage.is-ready .flight-jet,
.flight-stage.is-cabin .flight-jet {
  opacity: 0 !important;
  visibility: hidden;
  animation: none;
}
/*
  椭圆环绕：等间隔关键帧 + 缓变缩放/倾角
  掉头只在远景、几乎最小时翻转，减少顿挫
*/
@keyframes jet-ring-3d {
  0% {
    opacity: 0;
    transform: translate3d(10vw, 14vh, -80px) scale(0.36) rotate(-16deg) scaleX(1);
  }
  4% { opacity: 1; }
  10% {
    transform: translate3d(6vw, 20vh, -40px) scale(0.44) rotate(-14deg) scaleX(1);
  }
  20% {
    transform: translate3d(4vw, 32vh, 20px) scale(0.62) rotate(-8deg) scaleX(1);
  }
  30% {
    transform: translate3d(12vw, 44vh, 80px) scale(0.92) rotate(-2deg) scaleX(1);
  }
  /* 最近：下方掠过，平滑过渡到朝右（先压扁再翻） */
  36% {
    transform: translate3d(28vw, 50vh, 120px) scale(1.12) rotate(4deg) scaleX(0.15);
  }
  38% {
    transform: translate3d(34vw, 51vh, 130px) scale(1.18) rotate(5deg) scaleX(-0.15);
  }
  42% {
    transform: translate3d(48vw, 50vh, 140px) scale(1.22) rotate(3deg) scaleX(-1);
  }
  50% {
    transform: translate3d(68vw, 42vh, 60px) scale(0.95) rotate(10deg) scaleX(-1);
  }
  58% {
    transform: translate3d(80vw, 30vh, 0px) scale(0.7) rotate(12deg) scaleX(-1);
  }
  66% {
    transform: translate3d(84vw, 18vh, -50px) scale(0.48) rotate(4deg) scaleX(-1);
  }
  /* 远景掉头回朝左 */
  72% {
    transform: translate3d(78vw, 10vh, -90px) scale(0.36) rotate(-4deg) scaleX(-0.2);
  }
  74% {
    transform: translate3d(72vw, 8vh, -100px) scale(0.34) rotate(-8deg) scaleX(0.2);
  }
  78% {
    transform: translate3d(58vw, 5vh, -110px) scale(0.32) rotate(-12deg) scaleX(1);
  }
  86% {
    transform: translate3d(32vw, 6vh, -100px) scale(0.33) rotate(-18deg) scaleX(1);
  }
  94% {
    opacity: 1;
    transform: translate3d(14vw, 10vh, -90px) scale(0.35) rotate(-18deg) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(10vw, 13vh, -80px) scale(0.34) rotate(-16deg) scaleX(1);
  }
}

/* 飞过后舷窗出现（z-index 高于景点层，避免点不到） */
.flight-plane {
  position: absolute; z-index: 9;
  width: min(72vw, 280px);
  left: 50%; top: 24%;
  transform: translate(-50%, -50%) scale(0.6);
  filter: drop-shadow(0 18px 36px rgba(0,0,0,0.35));
  opacity: 0;
  pointer-events: none;
}
.flight-stage.is-ready .flight-plane {
  opacity: 1;
  pointer-events: auto;
  animation: porthole-land 0.75s cubic-bezier(0.2, 1.25, 0.3, 1) both,
             plane-hover 2.8s ease-in-out 0.75s infinite;
}
@keyframes porthole-land {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.45); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes plane-hover {
  0%,100% { transform: translate(-50%, -50%) rotate(-1deg); }
  50% { transform: translate(-50%, calc(-50% - 8px)) rotate(1.5deg); }
}
.flight-plane-sky {
  position: absolute;
  left: 18%; top: 18%;
  width: 64%; height: 58%;
  border-radius: 22% / 26%;
  background: linear-gradient(180deg, #5BA3E8 0%, #87CEEB 55%, #B3E5FC 100%);
  z-index: 0;
  pointer-events: none;
}
.flight-plane img {
  position: relative; z-index: 1;
  width: 100%; display: block; pointer-events: none;
}

.flight-hotspot {
  position: absolute;
  left: 22%; top: 24%;
  width: 56%; height: 50%;
  border: none; background: transparent;
  cursor: pointer; touch-action: manipulation;
  opacity: 0; pointer-events: none;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  z-index: 5;
}
/* 四个景点都看完后才出现「点击舷窗」 */
.flight-stage.is-ready .flight-hotspot {
  opacity: 0; pointer-events: none;
}
.flight-stage.is-ready.is-window-ready .flight-hotspot {
  opacity: 1; pointer-events: auto;
  animation: hotspot-in 0.45s ease both;
}
.flight-hotspot i {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(231,76,60,0.75);
  box-shadow: 0 0 0 0 rgba(231,76,60,0.55);
  animation: tap-ring 1.4s ease infinite;
}
.flight-hotspot span {
  font-size: 13px; font-weight: 800; color: #fff;
  background: rgba(231,76,60,0.92);
  border: 2px solid #fff;
  padding: 6px 12px; border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
@keyframes hotspot-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes tap-ring {
  0% { box-shadow: 0 0 0 0 rgba(231,76,60,0.55); }
  70% { box-shadow: 0 0 0 14px rgba(231,76,60,0); }
  100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
}

.flight-tip {
  position: absolute; left: 50%; bottom: calc(28px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 8; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,0.9);
  border: 2px solid var(--text);
  border-radius: 16px;
  padding: 8px 16px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
}
.flight-tip[hidden] { display: none !important; }
.flight-stage.is-ready .flight-tip:not([hidden]) {
  display: block;
  opacity: 1;
  animation: tip-pulse 1.6s ease infinite;
}
@keyframes tip-pulse {
  0%,100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.03); }
}
.flight-stage.is-cabin .flight-tip { display: none !important; }

/* 第一人称：坐在机舱内望窗外 */
.flight-cabin {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 0 20px calc(28px + var(--safe-b));
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.flight-cabin[hidden] { display: none !important; }
.flight-stage.is-cabin .flight-cabin {
  display: flex !important;
  opacity: 1; pointer-events: auto;
}
.cabin-scene {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  animation: cabin-in 0.7s ease both;
}
@keyframes cabin-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}
.spot-tag {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.95);
  background: rgba(44,24,16,0.55);
  color: #fff;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 10px 5px 8px;
  border-radius: 14px;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: spot-bob 2.4s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.spot-bang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #E74C3C;
  border: 1.5px solid #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  animation: bang-pulse 1.2s ease infinite;
}
.spot-tag.is-seen {
  background: rgba(39,174,96,0.72);
  border-color: rgba(255,255,255,0.95);
}
.spot-tag.is-seen .spot-bang {
  background: #27AE60;
  animation: none;
  font-size: 10px;
}
.spot-tag:nth-child(2) { animation-delay: 0.2s; }
.spot-tag:nth-child(3) { animation-delay: 0.4s; }
.spot-tag:nth-child(4) { animation-delay: 0.55s; }
.spot-tag:nth-child(5) { animation-delay: 0.7s; }
.spot-tag:active { transform: translate(-50%, -50%) scale(0.94); background: rgba(231,76,60,0.85); }
@keyframes bang-pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes spot-bob {
  0%,100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-3px); }
}
/* 景点历史弹窗 */
.spot-pop {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.spot-pop[hidden] { display: none !important; }
.spot-pop-mask {
  position: absolute; inset: 0;
  background: rgba(20,14,10,0.45);
  backdrop-filter: blur(2px);
}
.spot-pop-card {
  position: relative; z-index: 1;
  width: min(86vw, 320px);
  background: #FFF8E7;
  border: 3px solid var(--text);
  border-radius: 18px;
  padding: 20px 18px 18px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.12);
  animation: bubble-pop 0.35s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
.spot-pop-close {
  position: absolute; top: 8px; right: 10px;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 20px; line-height: 1;
  color: var(--text); cursor: pointer;
}
.spot-pop-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--red);
  background: rgba(231,76,60,0.12);
  border: 1.5px solid var(--red);
  border-radius: 12px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.spot-pop-card h3 {
  font-size: 18px; font-weight: 900;
  color: var(--text); margin-bottom: 10px;
}
.spot-pop-card #spot-pop-text {
  font-size: 14px; line-height: 1.7;
  color: #5D4037;
}
/* 出租车：固定在舷窗公路上，仅原地微动 */
.cabin-taxi {
  position: absolute;
  left: 32%;
  top: 42%;
  width: min(16vw, 64px);
  border: none; background: transparent;
  padding: 0; cursor: pointer;
  touch-action: manipulation;
  z-index: 4;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,0.4));
  animation: taxi-idle 1.8s ease-in-out infinite;
}
.cabin-taxi img {
  width: 100%; display: block;
  pointer-events: none;
  transform: rotate(8deg);
}
.cabin-taxi:active { transform: scale(0.94); }
.cabin-taxi-hint {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px; font-weight: 800; color: #fff;
  background: rgba(231,76,60,0.92);
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 4px 9px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: inline-flex; align-items: center; gap: 5px;
  pointer-events: none;
}
.cabin-taxi-hint i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: tap-ring 1.4s ease infinite;
}
@keyframes taxi-idle {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.flight-bubble {
  position: relative; z-index: 5;
  margin-top: 0;
  max-width: min(86vw, 320px);
  background: rgba(255,255,255,0.96);
  border: 3px solid var(--text);
  border-radius: 18px 18px 18px 6px;
  padding: 14px 18px;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateY(12px);
  backdrop-filter: blur(6px);
}
.flight-stage.is-cabin .flight-bubble {
  animation: bubble-pop 0.55s cubic-bezier(0.2, 1.3, 0.3, 1) 0.35s both;
}
.flight-bubble p {
  font-size: clamp(16px, 4.5vw, 18px);
  font-weight: 700; color: var(--text);
  text-align: center;
}
.flight-bubble-sub {
  margin-top: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #6D4C41 !important;
}
.flight-bubble::after {
  content: '';
  position: absolute; left: 28px; top: -10px;
  border: 8px solid transparent;
  border-bottom-color: var(--text);
}
@keyframes bubble-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 2D 开车：点击名吃后自动前进 ===== */
#taxi-ride {
  background: linear-gradient(180deg, #7EC8E8 0%, #B8E0F0 40%, #E8F4E8 100%);
}
.taxi2d {
  position: absolute; inset: 0;
  overflow: hidden;
  touch-action: manipulation;
  --p: 0;
}
.taxi2d-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90px 40px at 18% 12%, rgba(255,255,255,0.85), transparent 70%),
    radial-gradient(ellipse 110px 44px at 72% 10%, rgba(255,255,255,0.75), transparent 70%),
    linear-gradient(180deg, #64B5F6 0%, #90CAF9 28%, #A5D6A7 55%, #81C784 100%);
  z-index: 0;
}
/* 草地两侧：全程铺满，不随轨道断开 */
.taxi2d-ground-fixed {
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #81C784 0 24%, transparent 24% 76%, #81C784 76% 100%);
  pointer-events: none;
}
/* 马路固定铺满屏幕高度，永不中断 */
.taxi2d-road-fixed {
  position: absolute;
  left: 26%; right: 26%;
  top: 0; bottom: 0;
  z-index: 1;
  background: linear-gradient(90deg, #5C6370 0%, #6B7280 12%, #747B88 50%, #6B7280 88%, #5C6370 100%);
  border-left: 3px solid #F5D76E;
  border-right: 3px solid #F5D76E;
  box-shadow:
    -14px 0 0 #9CCC65,
    14px 0 0 #9CCC65,
    -22px 0 0 #AED581,
    22px 0 0 #AED581;
  pointer-events: none;
}
.taxi2d-centerline {
  position: absolute;
  left: 50%; top: -50%; bottom: -50%;
  width: 4px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    180deg,
    #fff 0 22px,
    transparent 22px 44px
  );
  opacity: 0.95;
  will-change: transform;
}
/* 景物层固定全屏，由 JS 按进度算 top，全程都有东西 */
.taxi2d-track {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.taxi2d-scenery {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
}
.sc-sticker {
  position: absolute;
  top: 50%;
  width: min(17vw, 64px);
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.08s linear;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
  transform-origin: 50% 100%;
  will-change: transform, top, opacity;
}
.sc-sticker.is-show { opacity: 1; }
.sc-sticker[data-side="L"] { left: 1.5%; }
.sc-sticker[data-side="R"] { right: 1.5%; left: auto; }
.sc-sticker-build { width: min(18vw, 68px); }
.sc-sticker-tree { width: min(16vw, 60px); }
.sc-sticker-tree.sc-tree3d {
  width: min(24vw, 96px);
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.28));
  z-index: 2;
}
.sc-sticker-tree.sc-tree3d.is-far {
  width: min(18vw, 72px);
  left: 0.2%;
  opacity: 0.92;
  z-index: 1;
}
.sc-sticker-tree.sc-tree3d.is-far[data-side="R"] {
  left: auto;
  right: 0.2%;
}
.sc-sticker-light { width: min(11vw, 42px); }
.taxi2d-shops {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.taxi2d-shop {
  position: absolute;
  top: 50%;
  width: min(28vw, 108px);
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.25s ease;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.25));
  -webkit-tap-highlight-color: transparent;
}
.taxi2d-shop[data-side="L"] { left: 1%; }
.taxi2d-shop[data-side="R"] { right: 1%; left: auto; }
.taxi2d-shop.is-show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  cursor: pointer;
}
.taxi2d-shop.is-pass {
  opacity: 0.45;
  transform: scale(0.9);
}
.taxi2d-shop.is-show:active { transform: scale(0.96); }
.taxi2d-shop img { width: 100%; display: block; pointer-events: none; }
/* 名吃介绍卡片 */
.food-pop {
  position: absolute; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.food-pop[hidden] { display: none !important; }
.food-pop-mask {
  position: absolute; inset: 0;
  background: rgba(20,14,10,0.5);
  backdrop-filter: blur(2px);
}
.food-pop-card {
  position: relative; z-index: 1;
  width: min(86vw, 320px);
  background: #FFF8E7;
  border: 3px solid var(--text);
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.12);
  animation: bubble-pop 0.35s cubic-bezier(0.2, 1.3, 0.3, 1) both;
  text-align: center;
}
.food-pop-close {
  position: absolute; top: 8px; right: 10px;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 20px; line-height: 1;
  color: var(--text); cursor: pointer;
}
.food-pop-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--red);
  background: rgba(231,76,60,0.12);
  border: 1.5px solid var(--red);
  border-radius: 12px;
  padding: 2px 8px;
  margin-bottom: 10px;
}
.food-pop-img {
  width: min(42vw, 148px);
  height: auto;
  display: block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.18));
}
.food-pop-card h3 {
  font-size: 20px; font-weight: 900;
  color: var(--text); margin-bottom: 6px;
}
.food-pop-tip {
  font-size: 12px; font-weight: 700;
  color: #A0522D;
  margin-bottom: 10px;
}
.food-pop-card #food-pop-text {
  font-size: 14px; line-height: 1.75;
  color: #5D4037;
  text-align: left;
  margin-bottom: 14px;
}
.food-pop-next {
  width: 100%;
  margin-top: 2px;
}
.taxi-shop-name {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 4px; width: 100%;
  font-size: 11px; font-weight: 900; color: #fff;
  background: rgba(231,76,60,0.92);
  border: 2px solid #fff; border-radius: 10px; padding: 3px 6px;
  box-sizing: border-box;
}
.taxi-shop-bang {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  color: #E74C3C;
  font-size: 11px; font-weight: 900; line-height: 1;
  flex-shrink: 0;
  animation: bang-pulse 1.2s ease infinite;
}
.taxi2d-shop.is-seen .taxi-shop-name {
  background: rgba(39,174,96,0.92);
}
.taxi2d-shop.is-seen .taxi-shop-bang {
  color: #27AE60;
  animation: none;
  font-size: 9px;
}
.taxi2d-car {
  position: absolute;
  left: 50%; bottom: calc(148px + var(--safe-b));
  transform: translateX(-50%);
  width: min(28vw, 110px);
  z-index: 3;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.32));
  pointer-events: none;
}
.taxi2d-car img { width: 100%; display: block; }
.taxi2d-car.is-moving {
  animation: car-bob 0.32s ease-in-out infinite;
}
@keyframes car-bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
.taxi2d-ui {
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
}
.taxi2d-ui .btn-main,
.taxi2d-ui .taxi-ride-cta { pointer-events: auto; }
.taxi2d-progress {
  position: absolute;
  left: 12%; right: 12%;
  top: calc(12px + var(--safe-t) + 40px);
  height: 6px;
  background: rgba(255,255,255,0.45);
  border: 2px solid var(--text);
  border-radius: 6px;
  overflow: hidden;
}
.taxi2d-progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #F1C40F, #E74C3C);
  border-radius: 4px;
  transition: width 0.08s linear;
}
.taxi2d-hint {
  position: absolute;
  left: 50%; top: calc(28px + var(--safe-t) + 48px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px; font-weight: 800; color: var(--text);
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--text);
  border-radius: 14px;
  padding: 6px 12px;
  animation: tip-pulse 1.6s ease infinite;
}
.taxi2d-hint[hidden] { display: none !important; }
.taxi-shop-toast {
  position: absolute;
  left: 50%; top: calc(58px + var(--safe-t) + 48px);
  transform: translateX(-50%);
  max-width: min(88vw, 320px);
  text-align: center;
  font-size: 12px; font-weight: 800; color: var(--text);
  background: rgba(255,248,231,0.96);
  border: 2.5px solid var(--text);
  border-radius: 14px;
  padding: 7px 11px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}
.taxi-shop-toast[hidden] { display: none !important; }
.taxi-ride-bubble {
  position: absolute;
  left: 50%; bottom: calc(72px + var(--safe-b));
  transform: translateX(-50%);
  width: min(86vw, 320px);
  background: rgba(255,248,231,0.96);
  border: 3px solid var(--text);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
  text-align: center;
}
/* 动画必须带上 translateX(-50%)，否则会偏到右侧 */
.taxi2d.is-on .taxi-ride-bubble {
  animation: taxi-bubble-pop 0.45s cubic-bezier(0.2, 1.3, 0.3, 1) 0.15s both;
}
@keyframes taxi-bubble-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.92); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.taxi-ride-bubble p {
  font-size: 15px; font-weight: 800; color: var(--text); text-align: center;
}
.taxi-ride-bubble .sub {
  margin-top: 6px; font-size: 12px; font-weight: 600; color: #6D4C41;
}
.taxi-ride-cta {
  position: absolute;
  left: 50%; bottom: calc(18px + var(--safe-b));
  transform: translateX(-50%);
  width: min(78vw, 260px) !important;
}
.taxi-ride-cta[hidden] { display: none !important; }

/* ===== Buttons ===== */
.btn-main {
  background: linear-gradient(135deg, var(--red), #C0392B);
  color: var(--white); border: none;
  min-height: var(--touch); padding: 12px 36px;
  border-radius: 50px; font-size: 16px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(231,76,60,0.45);
  cursor: pointer; width: min(88vw, 280px);
}
.btn-main:active { transform: scale(0.96); }
.btn-back {
  position: absolute;
  top: calc(12px + var(--safe-t)); left: 12px;
  z-index: 40;
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  touch-action: manipulation;
}
.btn-back:active { transform: scale(0.96); }
.btn-back.hud-back {
  position: relative;
  top: auto; left: auto;
  flex-shrink: 0;
  width: var(--touch); height: var(--touch);
  padding: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.btn-ghost {
  position: absolute; top: calc(12px + var(--safe-t)); right: 16px;
  background: rgba(0,0,0,0.25); color: var(--white);
  border: none; padding: 8px 16px; border-radius: 20px;
  font-size: 13px; cursor: pointer; z-index: 30;
  touch-action: manipulation;
}
#splash > .btn-ghost {
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.35);
}
.btn-ghost.light { position: relative; top: auto; right: auto; background: rgba(255,255,255,0.2); margin-top: 12px; }
.btn-round {
  width: var(--touch); height: var(--touch); border-radius: 50%;
  border: none; background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15); cursor: pointer; flex-shrink: 0;
}
.btn-round img { width: 20px; height: 20px; }

@keyframes pulse { 0%,100%{box-shadow:0 6px 20px rgba(231,76,60,0.4)} 50%{box-shadow:0 8px 30px rgba(231,76,60,0.65)} }

/* ===== HUD ===== */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-t)) 12px 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 100%);
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-chapter {
  flex: 1; color: var(--white); font-size: 13px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hud-stamps { display: flex; gap: 5px; }
.hud-stamps .slot {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: 2px dashed rgba(255,255,255,0.45);
  display: flex; align-items: center; justify-content: center; opacity: 0.35;
  transition: all 0.35s;
}
.hud-stamps .slot.on { opacity: 1; background: var(--white); border-style: solid; border-color: #F1C40F; transform: scale(1.08); }
.hud-stamps .slot img { width: 18px; height: 18px; object-fit: contain; }

.scroll-hint {
  position: fixed; bottom: calc(24px + var(--safe-b)); left: 50%;
  transform: translateX(-50%); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.85); font-size: 12px;
  pointer-events: none; transition: opacity 0.5s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.scroll-hint.gone { opacity: 0; }
.hint-hand {
  width: 24px; height: 36px;
  border: 2px solid rgba(255,255,255,0.7); border-radius: 12px;
  position: relative; animation: hand-scroll 1.8s ease infinite;
}
.hint-hand::after {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: rgba(255,255,255,0.8); border-radius: 2px;
}
@keyframes hand-scroll {
  0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)}
}

/* ===== Vertical World ===== */
#game { background: #111; }
.world {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
}

.scene {
  position: relative;
  min-height: var(--vh);
  overflow: hidden;
}

/* Scene base + photo backgrounds */
.scene-plane { background: linear-gradient(180deg, #4A90D9 0%, #87CEEB 45%, #C8E6C9 100%); }
.scene-taxi { background: linear-gradient(180deg, #7CB342 0%, #FFF59D 45%, #FFB74D 100%); min-height: 130vh; }
.scene-shop { background: linear-gradient(180deg, #4E342E 0%, #8D6E63 50%, #D7CCC8 100%); }
.scene-taste { background: linear-gradient(180deg, #3E2723 0%, #5D4037 40%, #FFAB91 100%); }
.scene-end { background: linear-gradient(180deg, #1A237E 0%, #3949AB 35%, #FF8A65 75%, #FFCCBC 100%); min-height: 120vh; }

.scene-bg-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.scene-bg-img.road-scroll {
  opacity: 0.7;
  background-size: 140% auto;
  background-position: center 20%;
  animation: road-drift 18s linear infinite;
}
@keyframes road-drift {
  0% { background-position: center 10%; }
  100% { background-position: center 55%; }
}

.road-lines {
  position: absolute; left: 50%; top: 35%; bottom: 10%;
  width: 6px; transform: translateX(-50%);
  background: repeating-linear-gradient(
    180deg,
    #FFD54F 0 18px,
    transparent 18px 36px
  );
  opacity: 0.55; z-index: 1; pointer-events: none;
  animation: dash-move 1.2s linear infinite;
  border-radius: 3px;
}
@keyframes dash-move {
  from { background-position: 0 0; }
  to { background-position: 0 36px; }
}

/* Soft scene transitions */
.scene-fade {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 28%; pointer-events: none; z-index: 8;
}
.fade-to-green { background: linear-gradient(180deg, transparent, #81C784); }
.fade-to-wood { background: linear-gradient(180deg, transparent, #5D4037); }
.fade-to-amber { background: linear-gradient(180deg, transparent, #FFAB91); }
.fade-to-end { background: linear-gradient(180deg, transparent, #3949AB); }

/* Bridge / 幕间过渡 */
.scene-bridge {
  min-height: 42vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #81C784 0%, #A5D6A7 40%, #FFF59D 100%);
  padding: 32px 24px;
}
.scene-bridge.bridge-shop {
  background: linear-gradient(180deg, #FFB74D 0%, #A1887F 50%, #5D4037 100%);
}
.bridge-inner { text-align: center; max-width: 320px; }
.bridge-text {
  font-size: clamp(16px, 4.5vw, 20px); font-weight: 700;
  color: var(--text); line-height: 1.7;
  background: rgba(255,255,255,0.88);
  border: 2px solid var(--text); border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.12);
}
.bridge-sub {
  margin-top: 14px; font-size: 13px; color: var(--red);
  font-weight: 600; letter-spacing: 1px;
}

.layer {
  position: absolute; inset: 0; pointer-events: none;
  will-change: transform; z-index: 1;
}
.layer-clouds {
  background:
    radial-gradient(ellipse 120px 50px at 20% 30%, rgba(255,255,255,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 160px 60px at 70% 20%, rgba(255,255,255,0.45) 0%, transparent 70%);
}
.layer-warm {
  background: radial-gradient(ellipse at 50% 80%, rgba(255,140,0,0.18) 0%, transparent 60%);
}
.layer-amber {
  background: radial-gradient(ellipse at 50% 40%, rgba(255,107,53,0.22) 0%, transparent 55%);
}

.scene-inner {
  position: relative; z-index: 2;
  min-height: var(--vh);
  padding: calc(72px + var(--safe-t)) 16px calc(40px + var(--safe-b));
}

.comic-tag {
  position: relative;
  z-index: 20;
  display: inline-block;
  background: var(--white); color: var(--red);
  font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
  margin-bottom: 12px;
}
.comic-tag.light { background: rgba(255,255,255,0.9); }

.comic-caption {
  position: absolute; left: 16px; bottom: calc(14% + var(--safe-b));
  max-width: min(62%, 240px); background: var(--white);
  border: 2px solid var(--text); border-radius: 14px;
  padding: 10px 14px; font-size: 13px; line-height: 1.65;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.12);
  z-index: 20;
  pointer-events: none;
}
.comic-caption.right { left: auto; right: 16px; }
.comic-caption strong { color: var(--red); }

.calligraphy-deco {
  position: absolute; top: 15%; right: 8%;
  writing-mode: vertical-rl;
  font-size: clamp(22px, 6vw, 32px); font-weight: 800;
  color: rgba(255,255,255,0.12); letter-spacing: 6px;
  font-family: "STKaiti", "KaiTi", serif;
}

/* ===== 3D Sticker ===== */
.sticker-wrap {
  position: absolute;
  left: var(--tx, 10%); top: var(--ty, 20%);
  transform: translateY(var(--py, 0px));
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 3;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  overflow: visible;
  pointer-events: none;
}
.sticker-wrap .npc-pin,
.sticker-wrap .collect-pin {
  pointer-events: auto;
}
.sticker-wrap img {
  display: block; width: 100%; height: auto;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  /* 阴影跟随贴纸轮廓，不要矩形卡片感 */
  filter: drop-shadow(2px 10px 14px rgba(0,0,0,0.28)) drop-shadow(0 2px 4px rgba(0,0,0,0.12));
  transform: perspective(900px) rotateX(var(--rx, 5deg)) rotateY(var(--ry, -8deg));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: float-y 4s ease-in-out infinite;
}
.sticker-wrap.slow img { animation-duration: 5.5s; }
.sticker-wrap.pop img {
  transform: perspective(900px) rotateX(0deg) rotateY(0deg) scale(1.06);
  animation-play-state: paused;
}
.sticker-sm { width: min(32vw, 130px); }
.sticker-md { width: min(40vw, 160px); }
.sticker-lg { width: min(48vw, 200px); }
.sticker-xl { width: min(62vw, 260px); }

/* 第一幕 */
.scene-plane .sticker-plane { --tx: 6%; --ty: 16%; }
.scene-plane .sticker-hero { --tx: 50%; --ty: 34%; }
.float-note {
  position: absolute; top: 22%; right: 6%;
  background: #FFF8E7; border: 2px dashed var(--amber);
  padding: 8px 12px; border-radius: 8px; font-size: 11px;
  color: var(--text); transform: rotate(6deg); z-index: 5;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

/* 第二幕：赶路 */
.scene-taxi { padding-bottom: 8vh; }
.taxi-inner { min-height: 120vh; }
.scene-taxi .sticker-seat { --tx: 4%; --ty: 28%; width: min(52vw, 210px); }
.scene-taxi .sticker-car { --tx: 38%; --ty: 58%; width: min(70vw, 280px); z-index: 4; }
.scene-taxi .sticker-driver { --tx: 48%; --ty: 36%; width: min(42vw, 170px); z-index: 5; }
.scene-taxi .sticker-lake-sm { --tx: -2%; --ty: 48%; width: min(46vw, 180px); z-index: 2; }
.travel-story { position: relative; z-index: 20; margin: 8px 0 12px; }
.mini-bubble {
  display: inline-block;
  background: rgba(255,255,255,0.95);
  border: 2px solid var(--text); border-radius: 14px 14px 14px 4px;
  padding: 8px 12px; font-size: 13px; color: var(--text);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}
.road-signs {
  position: absolute; right: 8px; top: 30%;
  display: flex; flex-direction: column; gap: 10px; z-index: 6;
}
.road-signs .sign {
  background: rgba(255,255,255,0.9); color: var(--comic-green, #27AE60);
  font-size: 11px; font-weight: 700; padding: 6px 10px;
  border-radius: 8px; border: 2px solid #2E7D32;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  animation: sign-pop 3s ease-in-out infinite;
}
.road-signs .sign:nth-child(2) { animation-delay: 0.6s; }
.road-signs .sign:nth-child(3) { animation-delay: 1.2s; color: var(--red); border-color: var(--red); }
@keyframes sign-pop {
  0%,100% { transform: translateX(0); opacity: 0.85; }
  50% { transform: translateX(-4px); opacity: 1; }
}

/* 第三幕 */
.scene-shop .sticker-chef { --tx: 4%; --ty: 28%; }
.shop-props {
  position: absolute; right: 8%; top: 55%;
  display: flex; flex-direction: column; gap: 8px; z-index: 6;
}
.shop-props .prop {
  background: rgba(255,248,231,0.92); padding: 6px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 2px solid var(--amber); color: var(--text);
}

/* 第四幕 */
.scene-taste .sticker-pork { --tx: 8%; --ty: 20%; }
.scene-taste .sticker-dish { --tx: 48%; --ty: 42%; width: min(42vw, 170px); }
.side-note {
  position: absolute; left: 12%; top: 58%;
  font-size: 12px; color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35); padding: 6px 12px; border-radius: 12px;
  z-index: 6;
}

.end-lead {
  text-align: center; color: var(--white); font-size: 14px;
  line-height: 1.7; margin-bottom: 8px; text-shadow: 0 1px 4px rgba(0,0,0,0.35);
  max-width: 320px;
}

@keyframes float-y {
  0%,100% { transform: perspective(900px) rotateX(var(--rx, 5deg)) rotateY(var(--ry, -8deg)) translateY(0); }
  50% { transform: perspective(900px) rotateX(var(--rx, 5deg)) rotateY(var(--ry, -8deg)) translateY(-10px); }
}

/* NPC / Collect pins */
.npc-pin, .collect-pin {
  position: absolute; top: -8px; right: -8px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--white); background: var(--red);
  color: var(--white); font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 22;
  box-shadow: 0 4px 14px rgba(231,76,60,0.5);
  animation: pin-pulse 1.6s ease infinite;
  pointer-events: auto;
}
.collect-pin {
  background: #F1C40F; color: var(--text);
  box-shadow: 0 4px 14px rgba(241,196,15,0.5);
}
.collect-pin img { width: 20px; height: 20px; border: none; box-shadow: none; transform: none; border-radius: 0; }
.collect-pin:not(:has(img)) span, .npc-pin span { line-height: 1; }
@keyframes pin-pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.scene-plane .collect-pin.pin-a {
  position: absolute;
  top: auto; bottom: 26%; left: 12%; right: auto;
  z-index: 22;
}

@media (max-height: 700px) {
  .scene-plane .sticker-plane { --ty: 14%; }
  .scene-plane .sticker-hero { --ty: 32%; }
  .scene-taxi .sticker-seat { --ty: 26%; }
  .scene-taxi .sticker-driver { --ty: 34%; }
  .scene-taxi .sticker-car { --ty: 54%; }
  .comic-caption { bottom: calc(10% + var(--safe-b)); font-size: 12px; }
  .scene-bridge { min-height: 36vh; }
}
.lake-pin { top: 8px; right: 8px; }

/* Pot sticker (CSS 3D) */
.pot-sticker {
  position: absolute; right: 8%; top: 42%;
  width: 110px; z-index: 3;
  transform: translateY(var(--py, 0px));
  pointer-events: none;
}
.pot-sticker .pot-lid,
.pot-sticker .collect-pin { pointer-events: auto; }
.pot-body {
  width: 100px; height: 70px; margin: 0 auto;
  background: linear-gradient(180deg, #795548, #4E342E);
  border-radius: 8px 8px 20px 20px;
  border: 4px solid var(--white);
  box-shadow: 0 16px 35px rgba(0,0,0,0.3);
}
.pot-lid {
  width: 90px; height: 26px; margin: 0 auto -4px;
  background: linear-gradient(180deg, #90A4AE, #607D8B);
  border-radius: 50%; border: 3px solid var(--white);
  position: relative; z-index: 2;
  transition: transform 0.6s ease;
  cursor: pointer;
}
.pot-lid.open { transform: translateY(-18px) rotate(-12deg); }
.pot-lid.shake { animation: shake 0.3s ease infinite; }
@keyframes shake { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
.pot-steam {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 50px; opacity: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 18px 28px at 35% 50%, rgba(255,255,255,0.65) 0%, transparent 70%),
    radial-gradient(ellipse 22px 32px at 65% 40%, rgba(255,255,255,0.5) 0%, transparent 70%);
  transition: opacity 0.6s;
}
.pot-steam.on { opacity: 1; animation: steam 2s ease infinite; }
@keyframes steam { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-12px)} }
.pot-pin { top: -10px; right: -10px; position: absolute; }

/* Taste */
.taste-panel {
  position: absolute; bottom: calc(10% + var(--safe-b)); left: 50%; transform: translateX(-50%);
  width: min(90vw, 340px); background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 16px; padding: 16px; text-align: center;
  color: var(--white); z-index: 20;
  border: 2px solid rgba(255,255,255,0.2);
}
.taste-panel p:first-child { font-size: 13px; margin-bottom: 12px; }
.taste-dots { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.taste-dots span {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; transition: all 0.35s;
}
.taste-dots span.on { background: var(--amber); border-color: #F4C896; transform: scale(1.1); }
.taste-text { font-size: 13px; line-height: 1.7; color: #F4C896; min-height: 44px; }

.zimei {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(255,255,255,0.93);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: fade-in 0.8s ease;
}
.zimei span { font-size: clamp(56px, 20vw, 80px); font-family: "STKaiti","KaiTi",serif; font-weight: 900; color: var(--text); }
.zimei p { margin-top: 16px; font-size: 14px; color: #666; font-style: italic; }
@keyframes fade-in { from{opacity:0} to{opacity:1} }

/* Ending */
.end-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.end-stickers { display: flex; gap: 10px; width: 100%; justify-content: center; flex-wrap: wrap; }
.end-card {
  flex: 1; min-width: 90px; max-width: 120px;
  background: transparent;
  padding: 6px; text-align: center;
  border: none;
  box-shadow: none;
  transform: perspective(600px) rotateY(-5deg);
}
.end-card.main { transform: perspective(600px) rotateY(0deg) scale(1.05); z-index: 2; }
.end-card img {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  filter: drop-shadow(2px 8px 14px rgba(0,0,0,0.28));
}
.end-card p {
  margin-top: 8px;
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--text);
  border-radius: 10px;
  padding: 6px 4px;
  font-size: 10px; color: var(--text); line-height: 1.45;
}
.end-pork-layers {
  width: min(70vw, 220px); border-radius: 10px; overflow: hidden;
  border: 3px solid var(--white); box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.layer-row { padding: 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--white); }
.layer-row.skin { background: #C0392B; }
.layer-row.fat { background: #F5CBA7; color: var(--text); }
.layer-row.lean { background: #922B21; }
.end-slogan { color: var(--white); font-size: 14px; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,0.4); line-height: 1.8; }

/* ===== Comic Dialog ===== */
.comic-dialog {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
  padding: 0 12px calc(12px + var(--safe-b));
}
.comic-dialog.open { display: flex; }
.dialog-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.45); z-index: 0; }
.dialog-panel {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--white); border: 3px solid var(--text);
  border-radius: 20px 20px 16px 16px;
  padding: 18px; animation: slide-up 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
}
@keyframes slide-up { from{opacity:0;transform:translateY(50px)} to{opacity:1;transform:translateY(0)} }
.dialog-close {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.06); border: none; border-radius: 50%;
  font-size: 22px; line-height: 1; color: #666; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.dialog-close:active { background: rgba(0,0,0,0.12); }
.dialog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dialog-face {
  width: 52px; height: 52px; object-fit: contain;
  background: transparent; border: none; border-radius: 0;
  filter: drop-shadow(1px 3px 6px rgba(0,0,0,0.25));
}
.dialog-who { font-size: 15px; color: var(--red); }
.dialog-body {
  max-height: min(38vh, 260px); overflow-y: auto;
  font-size: 14px; line-height: 1.8; color: var(--text);
  margin-bottom: 14px; -webkit-overflow-scrolling: touch;
}
.dialog-body p { margin-bottom: 8px; animation: fade-up 0.3s ease; }
.dialog-panel .btn-main { width: 100%; }

/* Stamp pop */
.stamp-pop {
  position: fixed; top: calc(70px + var(--safe-t)); left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0,0,0,0.82); color: var(--white);
  padding: 10px 20px; border-radius: 24px; font-size: 13px;
  z-index: 90; opacity: 0; pointer-events: none; transition: all 0.35s;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.stamp-pop.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.stamp-pop img { width: 22px; height: 22px; }

/* Share */
.share {
  position: fixed; inset: 0; z-index: 110;
  display: none; flex-direction: column; align-items: center;
  padding: calc(20px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  overflow-y: auto;
}
.share.open { display: flex; }
.share-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 0; }
.share > :not(.share-mask) { position: relative; z-index: 1; }
.culture-card {
  width: 100%; max-width: 360px;
  background: linear-gradient(180deg, #FFF8E7, #FFECB3);
  border: 3px solid var(--amber); border-radius: 16px;
  padding: 22px 18px; text-align: center;
}
.culture-card h2 { color: var(--red); font-size: 22px; }
.culture-card .sub { font-size: 12px; color: #888; margin-bottom: 12px; }
.card-hero {
  width: 140px; height: auto; object-fit: contain;
  background: transparent; border: none; border-radius: 0;
  filter: drop-shadow(2px 8px 16px rgba(0,0,0,0.25)); margin-bottom: 10px;
}
.card-layers { display: flex; flex-direction: column; width: 120px; margin: 0 auto 14px; border-radius: 8px; overflow: hidden; }
.card-layers span { padding: 8px; font-size: 12px; font-weight: 700; color: var(--white); }
.card-layers span:nth-child(1){background:#C0392B} .card-layers span:nth-child(2){background:#F5CBA7;color:var(--text)} .card-layers span:nth-child(3){background:#922B21}
.card-stamps { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.card-stamps span { background: var(--white); padding: 4px 10px; border-radius: 12px; font-size: 11px; border: 1px solid #F4C896; display: inline-flex; align-items: center; gap: 4px; }
.card-stamps img { width: 14px; height: 14px; }
.card-foot { font-size: 11px; color: #888; }
.share-tip { color: rgba(255,255,255,0.7); font-size: 12px; margin-top: 12px; }

@media (max-width: 360px) {
  .sticker-lg { width: 48vw; }
  .sticker-xl { width: 68vw; }
  .comic-caption { max-width: 65%; font-size: 12px; }
}
