/* ====================================================
   style.css  —  小琳生日网站
   iPhone 官方级流体极光美学 + eWishWell 庆生仪式感
   全面去除生硬条框 · 苹果系统级无衬线字阶 · 通透轻盈
==================================================== */

/* ── 核心设计系统变量 ── */
:root {
  /* 苹果官方极光与深空色调 */
  --bg-deep:        #070914;
  --gold:           #f7d56e;
  --gold-light:     #fff2b8;
  --gold-glow:      rgba(247, 213, 110, 0.35);
  --rose:           #ff7597;
  --rose-glow:      rgba(255, 117, 151, 0.35);
  --violet:         #a78bfa;
  --violet-glow:    rgba(167, 139, 250, 0.3);
  --cyan:           #67e8f9;

  --text-primary:   #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-tertiary:  rgba(255, 255, 255, 0.44);

  /* iOS 超清微磨砂玻璃 */
  --glass-bg:       rgba(255, 255, 255, 0.055);
  --glass-border:   rgba(255, 255, 255, 0.12);
  --glass-blur:     blur(36px);
  --glass-shadow:   0 20px 50px rgba(0, 0, 0, 0.35);

  /* 苹果系统级字体族：彻底解决乱码与草书糊成一团的问题 */
  --f-sans:    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --f-display: 'Figtree', 'Outfit', -apple-system, "SF Pro Display", "PingFang SC", sans-serif;
  --f-num:     'Figtree', 'Outfit', -apple-system, "SF Pro Display", sans-serif;

  /* 苹果经典弹性缓动 */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pop:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --trans-page:  0.7s var(--ease-spring);
}

/* ── 全局重置 ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-overscroll-behavior: none;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-text-size-adjust: 100%;
}


/* ════════════════════════════════════════════
   GLOBAL CANVAS & LAYERS (全局背景与覆盖层)
════════════════════════════════════════════ */

/* iPhone 动态极光 Canvas */
#starfield-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* Page 12 专属梦幻升空气球容器 */
#balloons-stage {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none; overflow: hidden;
}

/* 彩屑 Canvas */
#confetti-canvas {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
}

/* 点击文字飘落层 */
#float-layer {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none; overflow: hidden;
}

/* ── 音乐切换按钮 (iOS 磨砂唱片小胶囊纽) ── */
.music-btn {
  position: fixed; top: calc(env(safe-area-inset-top, 14px) + 12px); right: 16px; z-index: 200;
  height: 38px; padding: 0 13px 0 11px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(20, 16, 38, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.25s var(--ease-spring), background 0.25s, border-color 0.25s, box-shadow 0.25s;
  color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.music-btn:hover {
  background: rgba(32, 24, 60, 0.85);
  border-color: rgba(247, 213, 110, 0.4);
  box-shadow: 0 6px 20px rgba(247, 213, 110, 0.25);
}
.music-btn:active { transform: scale(0.92); }

.music-disc-icon {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-spring);
}
.music-btn.playing .music-disc-icon {
  animation: discSpin 4s linear infinite;
}
@keyframes discSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.music-btn svg {
  width: 17px; height: 17px; display: block; flex-shrink: 0;
  overflow: visible;
}

/* 微型音浪跳动条 */
.music-mini-wave {
  display: flex; align-items: flex-end; gap: 2.8px; height: 14px; flex-shrink: 0;
}
.music-mini-wave .wave-bar {
  width: 2.5px; height: 4px; border-radius: 2px;
  background: var(--gold);
  transition: height 0.25s ease, opacity 0.25s ease;
}
.music-btn:not(.playing) .music-mini-wave .wave-bar.b1 { height: 5px; opacity: 0.55; }
.music-btn:not(.playing) .music-mini-wave .wave-bar.b2 { height: 9px; opacity: 0.75; }
.music-btn:not(.playing) .music-mini-wave .wave-bar.b3 { height: 6px; opacity: 0.55; }

.music-btn.playing .music-mini-wave .wave-bar.b1 { animation: wavePulse 0.9s ease-in-out infinite alternate; }
.music-btn.playing .music-mini-wave .wave-bar.b2 { animation: wavePulse 1.2s ease-in-out 0.2s infinite alternate; }
.music-btn.playing .music-mini-wave .wave-bar.b3 { animation: wavePulse 0.8s ease-in-out 0.4s infinite alternate; }

@keyframes wavePulse {
  0%   { height: 3px; background: var(--rose); }
  50%  { height: 13px; background: var(--gold); }
  100% { height: 6px; background: var(--cyan); }
}

/* ── 右上角音乐功能首次指引提示气泡 (第0页弹出2秒后消失) ── */
.music-hint-tooltip {
  position: fixed;
  top: calc(env(safe-area-inset-top, 14px) + 58px);
  right: 14px;
  z-index: 210;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.92);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.music-hint-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.music-hint-tooltip.fade-out {
  opacity: 0;
  transform: translateY(-8px) scale(0.94);
  pointer-events: none;
}

.music-hint-tooltip .music-hint-arrow {
  position: absolute;
  top: -5px;
  right: 28px;
  width: 10px;
  height: 10px;
  background: rgba(30, 24, 52, 0.95);
  border-left: 1px solid rgba(247, 213, 110, 0.45);
  border-top: 1px solid rgba(247, 213, 110, 0.45);
  transform: rotate(45deg);
  z-index: 2;
}

.music-hint-tooltip .music-hint-body {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(32, 24, 60, 0.94) 0%, rgba(18, 16, 36, 0.96) 100%);
  border: 1px solid rgba(247, 213, 110, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(247, 213, 110, 0.22);
}

.music-hint-tooltip .mhb-icon {
  font-size: 13px;
  animation: noteFloat 1.8s ease-in-out infinite alternate;
}

@keyframes noteFloat {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-2px) rotate(8deg); }
}

.music-hint-tooltip .mhb-text {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 500;
  color: #fff9e6;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════
   MUSIC PLAYER MODAL (专属音乐播放器与歌单弹窗)
════════════════════════════════════════ */
.music-modal-backdrop {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(5, 7, 18, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease-spring);
}
.music-modal-backdrop.active {
  opacity: 1; pointer-events: all;
}

.music-player-modal {
  width: 100%; max-width: 420px;
  max-height: min(90vh, 720px);
  background: linear-gradient(165deg, rgba(28, 20, 52, 0.92) 0%, rgba(13, 15, 30, 0.96) 100%);
  border: 1px solid rgba(247, 213, 110, 0.25);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 50px rgba(167, 139, 250, 0.18);
  display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.92) translateY(24px);
  transition: transform 0.4s var(--ease-pop);
}
.music-modal-backdrop.active .music-player-modal {
  transform: scale(1) translateY(0);
}

/* 顶栏 */
.mp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mp-header-left {
  display: flex; align-items: center; gap: 10px;
}
.mp-logo-badge {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(247, 213, 110, 0.2), rgba(255, 117, 151, 0.2));
  border: 1px solid rgba(247, 213, 110, 0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.mp-header-text { display: flex; flex-direction: column; }
.mp-modal-title {
  font-family: var(--f-display); font-size: 15px; font-weight: 700;
  color: #fff; letter-spacing: 0.3px;
}
.mp-modal-subtitle {
  font-size: 11px; color: var(--text-tertiary); margin-top: 1px;
}

.mp-header-right {
  display: flex; align-items: center; gap: 10px;
}
.mp-mode-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(247, 213, 110, 0.12);
  border: 1px solid rgba(247, 213, 110, 0.3);
  font-size: 11px; font-weight: 600; color: var(--gold-light);
  user-select: none;
}
.mp-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.mp-close-btn:hover { background: rgba(255, 255, 255, 0.18); color: #fff; transform: scale(1.08); }
.mp-close-btn:active { transform: scale(0.92); }

/* 唱片机视效区 */
.mp-vinyl-section {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 20px 8px; text-align: center;
}
.mp-vinyl-turntable {
  position: relative; width: 118px; height: 118px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.mp-vinyl-disc {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle, #2a2a32 0%, #15161c 60%, #0d0e12 100%);
  border: 2px solid #3d3e48;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 16px rgba(0, 0, 0, 0.9);
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow 0.4s;
}
/* 黑胶唱片同心纹理 */
.mp-vinyl-disc::before {
  content: ''; position: absolute; inset: 6px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0, transparent 3px, rgba(255, 255, 255, 0.035) 4px, transparent 5px);
  pointer-events: none;
}
.mp-vinyl-disc.spinning {
  animation: discSpin 14s linear infinite;
  box-shadow: 0 12px 36px rgba(247, 213, 110, 0.25), inset 0 0 16px rgba(0, 0, 0, 0.9);
}
.mp-vinyl-core {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #f7d56e, #ff7597);
  padding: 2px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.mp-vinyl-label {
  width: 100%; height: 100%; border-radius: 50%;
  background: #181922; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.mp-vinyl-label img { width: 100%; height: 100%; object-fit: cover; }
.mp-vinyl-icon { font-size: 16px; }

/* 歌曲元信息 */
.mp-track-meta { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mp-track-title {
  font-family: var(--f-display); font-size: 17px; font-weight: 700;
  color: #fff; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-track-sub {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary);
}
.mp-track-quality {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: rgba(247, 213, 110, 0.15); border: 1px solid rgba(247, 213, 110, 0.35);
  color: var(--gold-light);
}

/* 进度条与时间 */
.mp-scrub-section {
  padding: 6px 24px 8px;
}
.mp-time-display {
  display: flex; justify-content: space-between;
  font-size: 11px; font-family: var(--f-num); color: var(--text-tertiary);
  margin-bottom: 6px; user-select: none;
}
.mp-progress-bar-wrap {
  width: 100%; height: 20px; display: flex; align-items: center; cursor: pointer;
  touch-action: none;
}
.mp-progress-track {
  position: relative; width: 100%; height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.12); overflow: visible;
}
.mp-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--gold));
  pointer-events: none;
}
.mp-progress-handle {
  position: absolute; top: 50%; left: 0%; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid var(--gold);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(247, 213, 110, 0.6);
  pointer-events: none; transition: transform 0.1s;
}
.mp-progress-bar-wrap:hover .mp-progress-handle {
  transform: translate(-50%, -50%) scale(1.25);
}

/* 控制按钮栏 */
.mp-control-actions {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 6px 20px 14px;
}
.mp-action-btn {
  background: none; border: none; outline: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--ease-spring), color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mp-action-btn:active { transform: scale(0.88); }
.mp-btn-prev, .mp-btn-next {
  width: 44px; height: 44px; border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.mp-btn-prev:hover, .mp-btn-next:hover {
  background: rgba(255, 255, 255, 0.14); color: #fff;
}
.mp-btn-play {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #f7d56e, #ff7597);
  color: #120e24; border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(247, 213, 110, 0.4);
}
.mp-btn-play:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(247, 213, 110, 0.55);
}

/* 歌单列表区 */
.mp-playlist-panel {
  display: flex; flex-direction: column;
  padding: 10px 18px 12px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 200px;
}
.mp-playlist-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; user-select: none;
}
.mp-pl-title-wrap {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: #fff;
}
.mp-pl-count {
  font-size: 11px; color: var(--text-tertiary);
}
.mp-playlist-scroll {
  overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding-right: 4px;
}
/* 自定义列表细滚动条 */
.mp-playlist-scroll::-webkit-scrollbar { width: 4px; }
.mp-playlist-scroll::-webkit-scrollbar-track { background: transparent; }
.mp-playlist-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }

/* 歌单条目 */
.mp-pl-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer; transition: all 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.mp-pl-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}
.mp-pl-item.active {
  background: linear-gradient(90deg, rgba(247, 213, 110, 0.16), rgba(255, 117, 151, 0.12));
  border-color: rgba(247, 213, 110, 0.4);
}
.mp-pl-item-left {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.mp-pl-item-idx {
  width: 20px; font-size: 11px; font-weight: 700; font-family: var(--f-num);
  color: var(--text-tertiary); text-align: center;
}
.mp-pl-item.active .mp-pl-item-idx {
  color: var(--gold);
}
/* 列表内播放中的三跳棒波形 */
.mp-pl-item-wave {
  display: flex; align-items: flex-end; gap: 2px; height: 12px; width: 14px;
}
.mp-pl-item-wave span {
  width: 2.5px; height: 3px; border-radius: 1px; background: var(--gold);
}
.mp-pl-item.active.playing .mp-pl-item-wave span:nth-child(1) { animation: wavePulse 0.9s ease-in-out infinite alternate; }
.mp-pl-item.active.playing .mp-pl-item-wave span:nth-child(2) { animation: wavePulse 1.2s ease-in-out 0.2s infinite alternate; }
.mp-pl-item.active.playing .mp-pl-item-wave span:nth-child(3) { animation: wavePulse 0.8s ease-in-out 0.4s infinite alternate; }

.mp-pl-item-info {
  display: flex; flex-direction: column; min-width: 0;
}
.mp-pl-item-name {
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-pl-item.active .mp-pl-item-name {
  color: var(--gold-light);
}
.mp-pl-item-artist {
  font-size: 11px; color: var(--text-tertiary); margin-top: 1px;
}
.mp-pl-item-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.mp-pl-item-tag {
  font-size: 10px; padding: 1.5px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.08); color: var(--text-secondary);
}
.mp-pl-item.active .mp-pl-item-tag {
  background: rgba(247, 213, 110, 0.2); color: var(--gold-light);
  border: 1px solid rgba(247, 213, 110, 0.35);
}

/* 底部单曲循环说明 */
.mp-footer-tip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px 12px;
  font-size: 11px; color: var(--text-tertiary);
  user-select: none;
}
.mp-tip-sparkle { font-size: 12px; color: var(--gold); }


/* ── 5秒未操作提示 (iOS 灵动胶囊) ── */
.idle-hint {
  position: fixed; bottom: calc(env(safe-area-inset-bottom, 20px) + 24px);
  left: 50%; transform: translateX(-50%) translateY(14px);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease-spring), transform 0.5s var(--ease-spring);
  cursor: pointer;
}
.idle-hint.visible {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.hint-capsule {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 18px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: capsuleFloat 2.4s ease-in-out infinite;
}
.hint-sparkle { font-size: 14px; }
.hint-text {
  font-size: 13px; font-weight: 500;
  letter-spacing: 2px; color: #ffffff;
}
@keyframes capsuleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ── 预览徽章 & 导航 ── */
.preview-badge {
  position: fixed; top: calc(env(safe-area-inset-top, 14px) + 58px); right: 16px; z-index: 300;
  background: rgba(255, 117, 151, 0.14); border: 1px solid rgba(255, 117, 151, 0.35);
  border-radius: 999px; padding: 4px 12px;
  font-size: 11px; font-weight: 500; color: var(--rose);
  backdrop-filter: blur(12px);
}
.preview-nav {
  position: fixed; bottom: calc(env(safe-area-inset-bottom, 16px) + 12px); left: 50%;
  transform: translateX(-50%); z-index: 300;
  display: flex; align-items: center; gap: 14px;
  background: rgba(18, 22, 40, 0.75); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px; padding: 6px 18px;
  backdrop-filter: blur(24px); box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.pnav-btn {
  background: none; border: none; color: var(--gold-light);
  font-size: 16px; cursor: pointer; padding: 4px 8px;
  transition: opacity 0.2s;
}
.pnav-btn:active { opacity: 0.6; }
.page-indicator {
  font-family: var(--f-display); font-size: 12px; font-weight: 600;
  color: #ffffff; min-width: 38px; text-align: center;
}


/* ════════════════════════════════════════════
   PAGE SYSTEM (流畅苹果转场系统)
════════════════════════════════════════════ */
#page-container {
  position: fixed; inset: 0; z-index: 10;
}

.page {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none !important;
  visibility: hidden;
  transform: scale(0.96) translateY(18px);
  will-change: opacity, transform, filter;
  transition: opacity var(--trans-page), transform var(--trans-page), filter var(--trans-page), visibility var(--trans-page);
  z-index: 1;
}
.page.active {
  opacity: 1; pointer-events: auto !important;
  visibility: visible !important;
  transform: scale(1) translateY(0);
  filter: blur(0);
  z-index: 10 !important;
}
.page:not(.active) {
  pointer-events: none !important;
  visibility: hidden !important;
}
.page:not(.active) * {
  pointer-events: none !important;
}
.page.exit-left {
  opacity: 0;
  transform: scale(1.04) translateY(-16px);
  filter: blur(8px);
}

.page-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow: hidden;
  position: relative;
}


/* ════════════════════════════════════════════
   PAGE 0 · iPhone 锁屏 / StandBy 倒计时
   彻底告别安卓黑方块与内切线，全端零溢出
════════════════════════════════════════════ */
.ios-countdown-container {
  width: 100%; max-width: min(92vw, 440px);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: clamp(28px, 5.5vh, 44px) clamp(14px, 3.5vw, 24px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 36px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  animation: containerFloat 6s ease-in-out infinite;
}

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

/* 顶部胶囊标签 */
.ios-pill-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: clamp(20px, 3.5vh, 32px);
  transition: all 0.6s var(--ease-spring);
}
.ios-pill-tag.celebrating {
  background: rgba(255, 107, 157, 0.18);
  border: 1px solid rgba(255, 182, 193, 0.55);
  box-shadow: 0 0 28px rgba(255, 107, 157, 0.45);
  animation: pillPulse 2.4s ease-in-out infinite;
  max-width: 92vw;
  padding: 6px clamp(14px, 3.5vw, 22px);
}
.ios-pill-tag.celebrating .pill-text {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.typing-cursor {
  display: inline-block;
  font-family: var(--f-mono), monospace;
  font-weight: 700;
  color: #ff6b9d;
  margin-left: 2px;
  animation: typingCursorBlink 0.75s steps(1) infinite;
  text-shadow: 0 0 10px rgba(255, 107, 157, 0.9), 0 0 20px rgba(255, 182, 193, 0.6);
}
@keyframes typingCursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* 最终10秒高燃倒计时胶囊光晕 */
.ios-countdown-container.final-10s-active {
  box-shadow: 0 0 50px rgba(255, 107, 157, 0.35), var(--glass-shadow);
  border-color: rgba(255, 182, 193, 0.35);
}
.ios-pill-tag.final-10s {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(247, 213, 110, 0.25));
  border: 1px solid rgba(255, 182, 193, 0.65);
  box-shadow: 0 0 28px rgba(255, 107, 157, 0.55), inset 0 0 14px rgba(255, 182, 193, 0.35);
  animation: pillFinalHeartbeat 1s ease-in-out infinite;
}
.ios-pill-tag.final-10s .pill-text {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 22px rgba(255, 107, 157, 0.8);
}
@keyframes pillFinalHeartbeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

@keyframes pillPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 107, 157, 0.3); }
  50%      { transform: scale(1.05); box-shadow: 0 0 32px rgba(255, 107, 157, 0.55); }
}
.pill-sparkle { color: var(--gold-light); font-size: 11px; }
.pill-text {
  font-size: 13px; font-weight: 500;
  letter-spacing: 3px; color: var(--text-secondary);
}

/* StandBy 极简大号数字排版：确保电脑端与手机端绝不溢出 */
.ios-standby-clock {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(4px, 1.8vw, 10px);
  width: 100%;
}
.ios-standby-clock.celebrating .clock-digit {
  color: #fff9e6;
  text-shadow: 0 0 24px rgba(247, 213, 110, 0.7), 0 0 45px rgba(255, 107, 157, 0.35);
}

/* 最终 10 秒数字流光渐变 & 秒数跳动脉冲 */
.ios-standby-clock.final-countdown .clock-digit {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff9a8b 22%, #fbc2eb 48%, #a18cd1 72%, #f7d56e 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: finalNeonShift 2.5s ease infinite;
  filter: drop-shadow(0 0 16px rgba(255, 107, 157, 0.75)) drop-shadow(0 0 28px rgba(247, 213, 110, 0.45));
  font-weight: 300;
}
.ios-standby-clock.final-countdown #cd-s {
  display: inline-block;
  animation: finalNeonShift 2.5s ease infinite, finalSecPulse 1s cubic-bezier(0.17, 0.89, 0.32, 1.25) infinite;
  filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.95)) drop-shadow(0 0 35px rgba(247, 213, 110, 0.75));
}
.ios-standby-clock.final-countdown .clock-sep {
  color: #ff9a8b;
  text-shadow: 0 0 16px rgba(255, 107, 157, 0.8);
  animation: finalSepFlash 1s ease-in-out infinite;
}

@keyframes finalNeonShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes finalSecPulse {
  0%   { transform: scale(1.15); }
  35%  { transform: scale(0.96); }
  65%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes finalSepFlash {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; text-shadow: 0 0 20px #ff6b9d; }
}

.clock-unit-col {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 0;
}
.clock-digit {
  font-family: var(--f-num);
  font-size: clamp(34px, 8.5vw, 56px);
  font-weight: 200; line-height: 1;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  text-align: center;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.clock-label {
  font-family: var(--f-display);
  font-size: clamp(9px, 2.2vw, 11px); font-weight: 600;
  letter-spacing: 2px; color: var(--text-tertiary);
  margin-top: 8px; text-transform: uppercase;
}
.clock-sep {
  font-family: var(--f-num);
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 200; line-height: 1;
  color: rgba(255, 255, 255, 0.28);
  margin-top: -12px;
  animation: sepBreathe 2s ease-in-out infinite;
}
@keyframes sepBreathe {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.7; }
}

/* 底部日期胶囊 */
.ios-date-capsule {
  margin-top: clamp(28px, 5vh, 40px);
  font-size: 13px; font-weight: 500;
  color: var(--gold-light);
  letter-spacing: 3px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(247, 213, 110, 0.08);
  border: 1px solid rgba(247, 213, 110, 0.2);
  text-shadow: 0 0 16px var(--gold-glow);
}


/* ════════════════════════════════════════════
   PAGE 1 · 今天 (eWishWell 电影感模糊浮现)
════════════════════════════════════════════ */
.wish-reveal-wrap {
  text-align: center;
  max-width: 90vw;
}

.wish-eyebrow {
  font-family: var(--f-display);
  font-size: 13px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--rose); margin-bottom: 16px;
  display: inline-block;
  opacity: 0; filter: blur(6px);
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease-spring), filter 0.8s var(--ease-spring), transform 0.8s var(--ease-spring);
}
.page-1.active .wish-eyebrow {
  opacity: 1; filter: blur(0); transform: translateY(0);
}

.big-clean-word {
  font-family: var(--f-sans);
  font-size: clamp(84px, 26vw, 170px);
  font-weight: 300; line-height: 1;
  color: #ffffff; letter-spacing: 8px;
  text-shadow: 0 10px 40px rgba(255, 255, 255, 0.25), 0 0 80px rgba(167, 139, 250, 0.35);
  opacity: 0; filter: blur(20px);
  transform: scale(0.85) translateY(24px);
  transition: opacity 1s var(--ease-spring), filter 1s var(--ease-spring), transform 1s var(--ease-spring);
}
.big-clean-word.animate-in {
  opacity: 1; filter: blur(0); transform: scale(1) translateY(0);
}


/* ════════════════════════════════════════════
   PAGE 2 · 是专属于你的节日！
════════════════════════════════════════════ */
.wish-statement {
  font-size: clamp(28px, 8.2vw, 50px);
  font-weight: 400; line-height: 1.8;
  color: #ffffff; letter-spacing: 4px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px;
}
.wish-statement span {
  display: inline-block;
  opacity: 0; filter: blur(14px);
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-spring), filter 0.65s var(--ease-spring), transform 0.65s var(--ease-spring);
  text-shadow: 0 4px 20px rgba(255, 117, 151, 0.35);
}
.wish-statement.animate-in span {
  opacity: 1; filter: blur(0); transform: translateY(0);
}

.wish-statement-sub {
  font-size: clamp(14px, 3.8vw, 17px);
  color: var(--text-secondary);
  margin-top: 24px; letter-spacing: 2px;
  line-height: 1.6;
  opacity: 0; filter: blur(10px); transform: translateY(12px);
  transition: opacity 0.9s 0.65s var(--ease-spring), filter 0.9s 0.65s var(--ease-spring), transform 0.9s 0.65s var(--ease-spring);
}
.page-2.active .wish-statement-sub {
  opacity: 1; filter: blur(0); transform: translateY(0);
}


/* ════════════════════════════════════════════
   PAGE 3 · MC 像素画 (悬浮展台 + 方块浪漫)
════════════════════════════════════════════ */
.pixel-scene {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 16px;
}

.mc-showcase-header {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.mc-pill-badge {
  font-family: var(--f-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 3px; color: var(--gold-light);
  padding: 4px 14px; border-radius: 999px;
  background: rgba(247, 213, 110, 0.1);
  border: 1px solid rgba(247, 213, 110, 0.25);
  text-shadow: 0 0 12px var(--gold-glow);
}
.mc-showcase-title {
  font-size: clamp(16px, 4.2vw, 20px); font-weight: 500;
  color: #ffffff; letter-spacing: 3px;
}

.mc-center { text-align: center; }
.mc-pedestal {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 12px 26px; border-radius: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s var(--ease-spring);
}
.mc-character-stage {
  display: flex; align-items: center; gap: 10px;
}
.mc-stand-icon { font-size: 22px; }
.mc-stand-text {
  font-family: var(--f-display);
  font-size: clamp(15px, 4vw, 19px); font-weight: 600;
  letter-spacing: 6px; color: var(--gold-light);
  text-shadow: 0 0 16px var(--gold-glow);
}
.mc-img {
  max-height: 120px; image-rendering: pixelated;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.pixel-rain {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}

.pixel-card {
  width: clamp(112px, 38vw, 170px); aspect-ratio: 1;
  border: 1px solid var(--glass-border);
  border-radius: 20px; overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: relative;
  opacity: 0;
  transform: translateY(-60px) scale(0.92);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: opacity 0.4s var(--ease-spring), transform 0.25s var(--ease-spring), box-shadow 0.25s;
}
.pixel-card:active {
  transform: scale(0.96) !important;
}
.pixel-card.rain-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: pixelDrop 0.65s var(--ease-spring) forwards;
}
.pixel-card.rain-in:nth-child(1) { animation-delay: 0.05s; }
.pixel-card.rain-in:nth-child(2) { animation-delay: 0.16s; }
.pixel-card.rain-in:nth-child(3) { animation-delay: 0.27s; }
.pixel-card.rain-in:nth-child(4) { animation-delay: 0.38s; }

@keyframes pixelDrop {
  0%   { opacity: 0; transform: translateY(-60px) scale(0.92); }
  75%  { opacity: 1; transform: translateY(4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.pixel-card img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated; display: block;
  position: relative; z-index: 2;
}
.pixel-card img:not([src]), .pixel-card img[src=""] { display: none; }
.pixel-card-ph {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04);
}
.pixel-ph-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
  opacity: 0.7;
  animation: pulseGlow 2.4s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0% { transform: scale(0.92); opacity: 0.5; }
  100% { transform: scale(1.08); opacity: 0.85; filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.7)); }
}

/* 像素画右上角全屏展开图标 (B站全屏风格四角折角微晶圆钮，扩大移动端热区) */
.pixel-zoom-badge {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(18, 18, 24, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  z-index: 15;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s var(--ease-spring), background 0.2s, color 0.2s;
}
.pixel-zoom-badge::after {
  content: '';
  position: absolute;
  inset: -10px;
  cursor: pointer;
}
.pixel-zoom-badge svg {
  pointer-events: none;
}
.pixel-zoom-badge:hover {
  transform: scale(1.15);
  background: rgba(247, 213, 110, 0.95);
  color: #1a1a1a;
  box-shadow: 0 0 18px rgba(247, 213, 110, 0.7);
}
.pixel-zoom-badge:active {
  transform: scale(0.9);
}

/* ════════════════════════════════════════════
   PIXEL LIGHTBOX (超清全屏手势查看器 · 双指捏合缩放 & 平移)
════════════════════════════════════════════ */
.pixel-lightbox {
  position: fixed; inset: 0; z-index: 99999 !important;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.pixel-lightbox.active {
  opacity: 1 !important; pointer-events: auto !important;
}
.pixel-lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 10, 14, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
.pixel-lb-body {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
}
.pixel-lb-topbar {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}
.pixel-lb-title {
  font-family: 'Figtree', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(247, 213, 110, 0.4);
}
.pixel-lb-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), background 0.2s;
}
.pixel-lb-close:active { transform: scale(0.9); }

.pixel-lb-viewport {
  flex: 1; width: 100%;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none;
  -webkit-user-select: none;
}
.pixel-lb-transform-wrap {
  will-change: transform;
  transform-origin: center center;
  display: flex; align-items: center; justify-content: center;
}
.pixel-lb-transform-wrap img {
  max-width: 90vw; max-height: 72vh;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.pixel-lb-footer {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}
.pixel-lb-hint {
  font-size: 11px; color: var(--text-tertiary); letter-spacing: 0.6px;
}
.pixel-lb-ctrls {
  display: flex; align-items: center; gap: 8px;
}
.pixel-lb-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.pixel-lb-btn:active { transform: scale(0.9); }
.pixel-lb-zoom-val {
  font-family: 'Figtree', monospace;
  font-size: 13px; font-weight: 600;
  color: #fff; min-width: 44px; text-align: center;
}
.pixel-lb-btn-pill {
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--gold-light); font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.pixel-lb-btn-pill:active { transform: scale(0.9); }



/* ════════════════════════════════════════════
   PAGE 4 · 美食记忆 (31 顿人间烟火 · 全景流光墙 + 聚光灯突出)
════════════════════════════════════════════ */
.food-page-inner {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* 1. 全景背景流光相片墙 (3 轨慢速无限漂移) */
.food-ambient-wall {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-around;
  gap: 12px; padding: 20px 0;
  overflow: hidden; z-index: 1;
  pointer-events: none;
}

.food-track {
  display: flex; gap: 14px;
  width: max-content;
  will-change: transform;
}

.food-track.track-1 { animation: driftTrackLeft 60s linear infinite; }
.food-track.track-2 { animation: driftTrackRight 68s linear infinite; }
.food-track.track-3 { animation: driftTrackLeft 64s linear infinite; }

.food-track:hover { animation-play-state: paused; }

@keyframes driftTrackLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes driftTrackRight {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.food-thumb {
  flex: 0 0 clamp(72px, 17vw, 106px);
  height: clamp(72px, 17vw, 106px);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transform: rotate(var(--rot, 0deg)) scale(1);
  transition: transform 0.35s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}

.food-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; pointer-events: none;
}

.food-thumb:hover {
  transform: scale(1.22) rotate(0deg);
  z-index: 20;
  border-color: var(--gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(247, 213, 110, 0.45);
}

.food-thumb.active {
  border-color: var(--rose);
  box-shadow: 0 0 22px rgba(255, 117, 151, 0.6);
}

/* 背景暗角柔焦蒙版 (使背景丰富却不干扰前景文字) */
/* 背景暗角柔焦蒙版 (加深暗角底色，确保前景文字和卡片极佳可读性，移除全屏模糊滤镜解放手机GPU) */
.food-wall-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(6, 8, 18, 0.82) 0%, rgba(6, 8, 18, 0.93) 65%, rgba(3, 4, 10, 0.98) 100%);
  pointer-events: none;
  z-index: 2;
}

/* 2. 前景高光聚光灯展台 (突出在背景之上) */
.food-hero-container {
  position: relative; z-index: 8;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 0 14px;
}

/* 优雅文艺风格标题：自带高级半透暗夜微光底座，杜绝背景漂浮图片对文字的任何干扰 */
.food-header-modern {
  margin-bottom: 8px;
  background: rgba(9, 12, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(247, 213, 110, 0.35);
  border-radius: 20px;
  padding: 8px 18px 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(247, 213, 110, 0.14);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  max-width: 94%;
  position: relative;
  z-index: 10;
}

.food-pill-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 14px; border-radius: 999px;
  background: rgba(247, 213, 110, 0.14);
  border: 1px solid rgba(247, 213, 110, 0.38);
  color: var(--gold-light);
  font-size: 11px; font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 2px 10px rgba(247, 213, 110, 0.18);
  margin-bottom: 5px;
}

.food-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseGlow 1.8s infinite alternate;
}

.food-serif-title {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  font-size: clamp(19px, 5.2vw, 25px);
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 25%, #fff2b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.98));
  line-height: 1.3;
}

.food-serif-sub {
  font-size: clamp(12.5px, 3.4vw, 14.5px);
  color: #ff9ebb;
  letter-spacing: 1.5px;
  margin-top: 3px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98), 0 0 14px rgba(255, 117, 151, 0.65);
}

/* 拍立得式居中聚光灯卡片 (突出在背景之上) */
.food-spotlight-wrap {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin: 10px 0 8px;
}

.food-nav-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.food-nav-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
}

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

.food-featured-card {
  flex: 1; max-width: clamp(260px, 75vw, 320px);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 32px rgba(247, 213, 110, 0.22);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s;
  cursor: pointer;
}

.food-featured-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 45px rgba(247, 213, 110, 0.35);
}

.food-photo-frame {
  position: relative;
  width: 100%; aspect-ratio: 1.18;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(255, 245, 230, 0.12), rgba(25, 20, 35, 0.55));
}

.food-photo-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-spring), opacity 0.3s;
}

.food-featured-card:hover .food-photo-frame img {
  transform: scale(1.06);
}

.food-counter-pill {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 11px; font-weight: 600;
  letter-spacing: 1px;
}

.food-autoplay-btn {
  position: absolute; bottom: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.food-autoplay-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.3);
}

.food-caption-box {
  padding: 12px 14px 14px;
  background: rgba(10, 13, 26, 0.88);
  text-align: left;
}

.food-caption-quote {
  font-size: clamp(12.5px, 3.5vw, 14px);
  line-height: 1.5;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.5px;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.food-caption-tip {
  font-size: 10.5px;
  color: var(--text-tertiary);
  margin-top: 5px;
  letter-spacing: 0.8px;
}

.food-footer-note {
  font-size: clamp(11.5px, 3.2vw, 13px);
  color: #fff1b8;
  letter-spacing: 1px;
  margin-top: 6px;
  background: rgba(9, 12, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
  display: inline-block;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
  position: relative;
  z-index: 10;
}

/* 手机端前进按钮：随时想走就走，无需等待 */
.food-next-page-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 8px; padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 12px; font-weight: 500;
  letter-spacing: 1px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.food-next-page-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(247, 213, 110, 0.25);
  color: var(--gold-light);
}

.food-next-page-pill:active { transform: scale(0.94); }

/* 漫游星云卡片容器 (23张照片四周优雅漫游，层级置顶杜绝被主卡遮挡点不到) */
.food-galaxy-container {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.galaxy-card {
  position: absolute;
  width: clamp(56px, 14vw, 76px);
  height: clamp(56px, 14vw, 76px);
  border-radius: 14px;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  border: 1.5px solid rgba(255, 215, 120, 0.75);
  background: rgba(15, 18, 30, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 12px rgba(247, 213, 110, 0.35);
  transition: transform 0.2s var(--ease-spring), border-color 0.2s, box-shadow 0.2s;
  will-change: transform, opacity;
  z-index: 22;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(247, 213, 110, 0.4);
}

.galaxy-card img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; pointer-events: none;
}

.galaxy-card:hover {
  transform: scale(1.22) rotate(0deg) !important;
  z-index: 100;
  border-color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 24px rgba(247, 213, 110, 0.75);
}

/* 绽放入场动画：纯 GPU 硬件加速 (去除 CPU 重复栅格化的 filter: blur，手机端60fps锁帧) */
@keyframes galaxyBloomIn {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(var(--card-rot, 0deg));
  }
  70% {
    opacity: 0.96;
    transform: scale(1.06) rotate(var(--card-rot, 0deg));
  }
  100% {
    opacity: 0.9;
    transform: scale(1) rotate(var(--card-rot, 0deg));
  }
}

/* 柔和微风悬浮：轻微微摆 ±8px，确保卡片永远保持在四周边缘轨道，绝不侵入中央主卡背面 */
@keyframes galaxyFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(var(--card-rot, 0deg)) scale(0.95);
    opacity: 0.85;
  }
  50% {
    transform: translate3d(8px, -10px, 0) rotate(calc(var(--card-rot, 0deg) + 3deg)) scale(1.02);
    opacity: 0.95;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(247, 213, 110, 0.45);
  }
  100% {
    transform: translate3d(-7px, 8px, 0) rotate(calc(var(--card-rot, 0deg) - 3deg)) scale(0.96);
    opacity: 0.85;
  }
}

/* 手机端高度自适应 (小屏幕 iPhone 专项优化) */
@media (max-height: 740px) {
  .food-header-modern { margin-bottom: 4px; padding: 6px 14px 8px; }
  .food-pill-badge { padding: 3px 12px; margin-bottom: 3px; font-size: 10.5px; }
  .food-serif-title { font-size: 17px; letter-spacing: 1.5px; }
  .food-serif-sub { font-size: 12px; margin-top: 2px; }
  .food-spotlight-wrap { margin: 6px 0 4px; }
  .food-featured-card { max-width: 275px; }
  .food-photo-frame { aspect-ratio: 1.25; }
  .food-caption-box { padding: 8px 12px; }
  .food-caption-quote { font-size: 12px; min-height: 34px; }
  .food-footer-note { font-size: 11.5px; margin-top: 2px; padding: 4px 12px; }
  .food-next-page-pill { margin-top: 4px; padding: 4px 14px; font-size: 11px; }
}

/* 手机端专项性能降载 (宽度 <= 768px)：隐藏中间冗余轨，降低卡片模糊半径，释放手机GPU显存 */
@media (max-width: 768px) {
  #food-track-2 { display: none !important; }
  .food-track { height: 44%; }
  .food-featured-card { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .food-thumb { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
}

/* 3. 全屏超清大图弹窗 */
.food-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.32s ease;
}

.food-lightbox.active {
  opacity: 1; pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 7, 16, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.lightbox-content {
  position: relative; z-index: 2;
  max-width: 90vw; max-height: 85vh;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  animation: popIn 0.35s var(--ease-spring);
}

.lightbox-close {
  position: absolute; top: -42px; right: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.lightbox-close:hover {
  transform: scale(1.1); background: rgba(255, 255, 255, 0.3);
}

.lightbox-content img {
  max-width: 100%; max-height: 70vh;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  object-fit: contain;
}

.lightbox-caption {
  font-size: 14px; color: #fff;
  text-align: center; max-width: 480px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}


/* ════════════════════════════════════════════
   PAGE 5 · 视频 (无界微光影院窗口)
════════════════════════════════════════════ */
.video-page {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.video-label {
  font-size: clamp(16px, 4.5vw, 20px); font-weight: 500;
  color: #ffffff; letter-spacing: 3px;
}
.video-frame {
  width: 100%; aspect-ratio: 16/9;
  border-radius: 28px; overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
  border-radius: 28px;
  border: none;
  z-index: 5;
}
.video-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-tertiary);
}
.video-ph-icon { font-size: 34px; margin-bottom: 2px; }


/* ════════════════════════════════════════════
   PAGE 6 · 切蛋糕 (通透舞台 + iMessage 气泡)
════════════════════════════════════════════ */
.cake-page {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}
.cake-title {
  font-size: clamp(20px, 5.5vw, 26px); font-weight: 600;
  color: #ffffff; letter-spacing: 3px;
}
.page-6, .cake-wrap, .cake-area {
  position: relative; display: flex; flex-direction: column; align-items: center;
  touch-action: none !important;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
}
#cake-canvas {
  display: block; border-radius: 24px;
  touch-action: none !important;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.cake-instr {
  font-size: 12px; color: var(--text-tertiary);
  letter-spacing: 1px; margin-top: 8px;
}
.blow-btn {
  margin-top: 10px;
  padding: 10px 24px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff; font-size: 14px; font-weight: 500;
  letter-spacing: 2px; cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.2s var(--ease-spring), background 0.2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.blow-btn:active { transform: scale(0.94); }

/* 蛋糕切块与拖拽 */
.cake-piece {
  position: fixed;
  font-size: 34px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  z-index: 500;
  touch-action: none;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
  transition: transform 0.2s var(--ease-spring);
}
.cake-piece.dragging {
  cursor: grabbing;
  z-index: 1000 !important;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.6));
  touch-action: none;
}
.cake-piece.selected {
  filter: drop-shadow(0 0 16px rgba(247, 213, 110, 0.95)) drop-shadow(0 6px 18px rgba(255, 117, 151, 0.7));
  animation: pieceSelectedBounce 0.8s ease-in-out infinite alternate;
}
@keyframes pieceSelectedBounce {
  0%   { transform: scale(1.15) translateY(0); }
  100% { transform: scale(1.32) translateY(-6px); }
}
.cake-piece.tutorial-ghost {
  opacity: 0.6;
  pointer-events: none;
  animation: ghostGuide 2.2s ease-in-out infinite;
}
.cake-piece.lin-piece {
  animation: linPiecePulse 1.8s ease-in-out infinite alternate;
}
@keyframes linPiecePulse {
  0% { transform: scale(1); filter: drop-shadow(0 6px 14px rgba(247, 213, 110, 0.45)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 8px 22px rgba(255, 117, 151, 0.7)); }
}

.ios-pill-tag.audio-ready {
  border-color: rgba(247, 213, 110, 0.9) !important;
  background: rgba(247, 213, 110, 0.18) !important;
  box-shadow: 0 0 20px rgba(247, 213, 110, 0.45) !important;
  transform: scale(1.05);
}


.ai-stage {
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin-top: 10px; width: 100%;
}
.ai-char {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 6px 8px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: transform 0.25s var(--ease-spring), border-color 0.25s;
}
.ai-char.drop-ready {
  transform: scale(1.16);
  border-color: rgba(247, 213, 110, 0.6);
  box-shadow: 0 0 20px rgba(247, 213, 110, 0.3);
}
.ai-av {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; border: 1px solid;
  transition: transform 0.25s var(--ease-spring);
}
.ai-av.hungry {
  animation: aiHungry 1.4s ease-in-out infinite;
}
@keyframes aiHungry {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px) scale(1.08); }
}
.ai-av.eating {
  transform: scale(1.3) rotate(12deg);
}
.ai-name {
  font-family: var(--f-display);
  font-size: 10px; font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

/* AI 对话气泡 (悬浮在角色头顶，自适应换行，贴边保护，避免重叠或出屏) */
.ai-bubble {
  position: absolute;
  bottom: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(255, 255, 255, 0.96);
  color: #111424;
  padding: 8px 13px; border-radius: 16px;
  font-size: 12px; font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
  width: max-content;
  max-width: min(200px, 70vw);
  box-sizing: border-box;
  text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  z-index: 100;
}
.ai-bubble::after {
  content: ''; position: absolute; top: 100%;
  left: calc(50% + var(--arrow-shift, 0px));
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.96);
}
.ai-bubble.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* 针对首尾 AI 角色的自适应贴边安全约束 (解决右侧 DeepSeek / 左侧豆包气泡越界) */
.ai-char:first-child .ai-bubble {
  max-width: min(190px, 65vw);
}
.ai-char:last-child .ai-bubble {
  max-width: min(190px, 65vw);
}

/* TA 的聊天窗口 (Apple iMessage 气泡风格) */
.my-chat {
  width: 100%; max-width: 320px;
  margin-top: 14px; display: none;
  flex-direction: column; gap: 8px;
}
.chat-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.chat-me-av {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #0a84ff, #0062cc);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.4);
}
.chat-my-name {
  font-size: 12px; font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
}
.chat-body {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 130px; overflow-y: auto;
  box-sizing: border-box;
  padding: 2px;
}
.chat-msg {
  align-self: flex-end;
  padding: 9px 15px; border-radius: 18px 18px 4px 18px;
  background: #0a84ff; color: #ffffff;
  font-size: 13px; line-height: 1.45;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s var(--ease-spring), transform 0.4s var(--ease-spring);
  max-width: 88%;
  word-break: break-word;
}
.chat-msg.show {
  opacity: 1; transform: translateY(0);
}


/* ════════════════════════════════════════════
   PAGE 7 · 手写留言 (iPhone 隐形墨水 + 3D 掀信封)
════════════════════════════════════════════ */
.hw-page {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.hw-title {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  font-size: clamp(20px, 5.5vw, 26px); font-weight: 600;
  color: #ffffff; letter-spacing: 4px;
  text-shadow: 0 4px 18px rgba(255, 255, 255, 0.35);
}

/* 信封与隐形墨水舞台 */
.hw-stage {
  position: relative;
  width: 100%; aspect-ratio: 16/11;
  perspective: 1200px;
  display: flex; align-items: center; justify-content: center;
}

/* 3D 实体拟真信封主体 */
.envelope-box {
  position: absolute; inset: 0;
  border-radius: 22px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 4px 20px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
}

/* 信封后背背板与内仓 */
.envelope-back {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #c7a584 0%, #b38c64 100%);
  border-radius: 22px;
  border: 1.5px solid rgba(255, 240, 215, 0.3);
  box-shadow: inset 0 0 24px rgba(110, 75, 45, 0.4);
}

/* 抽出的羊皮情书信纸 */
.letter-paper {
  position: absolute; inset: 0;
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(155deg, #fdfbf7 0%, #f7f1e4 50%, #ede3d0 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  box-shadow:
    0 16px 45px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(255, 248, 235, 0.16),
    inset 0 0 32px rgba(210, 180, 140, 0.28);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
  z-index: 2;
  transform: translateY(14px) scale(0.95);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.6s ease;
}

/* 信纸展开铺平状态 */
.letter-paper.unfolded {
  transform: translateY(0) scale(1);
  opacity: 1;
  z-index: 12;
}

/* 信封前折口袋面板 (三角形剪裁，形成信封正面袋子) */
.envelope-front-pocket {
  position: absolute; inset: 0;
  background: linear-gradient(140deg, #be9972 0%, #a87e53 100%);
  border-radius: 22px;
  clip-path: polygon(0% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%);
  border-bottom: 2px solid rgba(255, 240, 215, 0.25);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.letter-paper.unfolded ~ .envelope-front-pocket {
  opacity: 0.35;
}

/* 信封 3D 顶部开合翻盖 */
.envelope-flap {
  position: absolute; top: 0; left: 0; width: 100%; height: 55%;
  transform-origin: top center;
  transform-style: preserve-3d;
  background: linear-gradient(180deg, #c7a584 0%, #ab8258 100%);
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.35));
  z-index: 6;
  transition: transform 0.8s cubic-bezier(0.34, 1.25, 0.64, 1);
}
.envelope-flap.opened {
  transform: rotateX(180deg);
  z-index: 1;
}

/* 翻盖上的火漆印章 */
.envelope-wax-seal {
  position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e63946, #99101d);
  border: 1.5px solid rgba(255, 215, 0, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  transition: transform 0.4s var(--ease-spring), opacity 0.3s;
}
.envelope-wax-seal.popped {
  transform: translateX(-50%) scale(0);
  opacity: 0;
}
.seal-icon { display: flex; align-items: center; justify-content: center; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); margin-bottom: 1px; }
.seal-icon svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.seal-text { font-family: 'Figtree', sans-serif; font-size: 8px; font-weight: 800; letter-spacing: 1px; color: #ffd700; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

/* 邮票与暗纹 */
.hw-stamp {
  position: absolute; top: 12px; right: 14px;
  display: flex; flex-direction: column; align-items: center;
  padding: 3px 7px;
  border: 1.5px dashed rgba(180, 130, 80, 0.45);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 2;
}
.hw-stamp-icon { font-size: 14px; }
.hw-stamp-text { font-size: 8px; color: #8c6239; font-weight: 700; letter-spacing: 1px; }

.hw-watermark {
  position: absolute; bottom: 10px; left: 16px;
  font-family: 'Noto Serif SC', 'Songti SC', serif;
  font-size: 10px; color: rgba(140, 98, 57, 0.35);
  letter-spacing: 2px; pointer-events: none;
}

#hw-svg {
  width: 100%; height: 100%;
  display: block; overflow: visible;
  filter: drop-shadow(0 1px 1px rgba(60, 30, 10, 0.18));
}

/* ════════════════════════════════════════════
   iPhone 隐形墨水粒子涂层 (Canvas 擦除交互)
════════════════════════════════════════════ */
.invisible-ink-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 22px;
  z-index: 25;
  touch-action: none;
  cursor: crosshair;
  transition: opacity 0.5s ease-out;
}
.invisible-ink-canvas.revealed {
  opacity: 0;
  pointer-events: none;
}

/* 隐形墨水指引胶囊 (单行不换行，杜绝颜文字折断) */
.ink-hint-capsule {
  position: absolute; bottom: -44px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff; font-size: 12px; font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 30;
  transition: opacity 0.35s ease, transform 0.35s;
  white-space: nowrap !important;
  max-width: 95vw;
  width: max-content;
}
.ink-hint-capsule.hidden {
  opacity: 0; transform: translateX(-50%) translateY(8px);
}
.ink-hint-sparkle {
  font-size: 13px;
  animation: pulseGlow 1.8s infinite alternate;
  flex-shrink: 0;
}
.ink-hint-text {
  white-space: nowrap !important;
  display: inline-block;
  word-break: keep-all;
  flex-shrink: 0;
}


/* ════════════════════════════════════════════
   PAGE 8 ~ 11 · eWishWell 故事拍 (极简电影感)
════════════════════════════════════════════ */
.ewish-story-wrap {
  width: 100%; max-width: 90vw;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 20px;
}

/* Page 8: "今天你生日，我想做一些 Special 的事情" */
.ewish-story-phrase {
  font-family: var(--f-display);
  font-size: clamp(22px, 6vw, 38px);
  font-weight: 500;
  line-height: 1.6;
  color: #ffffff;
  letter-spacing: 1px;
}

/* P9 活泼蹦跳入场单字动画 */
.b-char {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}
.b-char.bouncing {
  animation: charBounceDown 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--bi, 0) * 0.065s) forwards;
}
.b-char.b-special {
  color: #60a5fa;
  font-weight: 600;
  margin: 0 3px;
  text-shadow: 0 0 16px rgba(96, 165, 250, 0.65);
}

@keyframes charBounceDown {
  0% {
    opacity: 0;
    transform: translateY(-42px) scale(0.62) rotate(-6deg);
    filter: blur(5px);
  }
  60% {
    opacity: 1;
    transform: translateY(7px) scale(1.1) rotate(1.5deg);
    filter: blur(0);
  }
  80% {
    transform: translateY(-2px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

/* 标志性高亮胶囊 (与用户提供图中的 special 风格一致) */
.pill-badge-special {
  display: inline-block;
  vertical-align: middle;
  padding: 2px 14px 4px;
  margin: 0 6px;
  background: #0a84ff;
  color: #ffffff;
  border-radius: 8px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.94em;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(10, 132, 255, 0.45);
  transform: translateY(-2px);
  animation: specialBadgePulse 3s ease-in-out infinite;
}
.pill-badge-special.glow {
  background: linear-gradient(135deg, #0a84ff 0%, #2f80ed 100%);
  box-shadow: 0 4px 24px rgba(47, 128, 237, 0.65), 0 0 12px rgba(255, 255, 255, 0.3);
}

@keyframes specialBadgePulse {
  0%, 100% { transform: translateY(-2px) scale(1); }
  50%      { transform: translateY(-3px) scale(1.04); }
}

/* Page 9: "Because" 逐字爆炸弹出 */
.ewish-because-text {
  font-family: var(--f-display);
  font-size: clamp(52px, 15vw, 92px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 3px;
  text-shadow: 0 6px 30px rgba(255, 255, 255, 0.35);
}

.bec-char {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}
.bec-char.popping {
  animation: becauseLetterPop 0.68s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--bci, 0) * 0.08s) forwards;
}

@keyframes becauseLetterPop {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.3) rotate(-12deg);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translateY(8px) scale(1.18) rotate(3deg);
    filter: blur(0);
  }
  82% {
    transform: translateY(-3px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

/* Page 10: "你很 Special :)" */
.ewish-special-phrase {
  font-family: var(--f-display);
  font-size: clamp(26px, 7.5vw, 48px);
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ewish-special-sub {
  font-size: clamp(14px, 3.8vw, 17px);
  color: var(--text-secondary);
  margin-top: 24px;
  letter-spacing: 1.5px;
  line-height: 1.8;
}
.ewish-special-sub span {
  display: inline-block;
  will-change: transform, opacity, color;
}
.ewish-special-sub.wave-active span {
  animation: charBreatheWave 2.2s ease-in-out infinite;
  animation-delay: calc(var(--ci) * 0.085s);
}
@keyframes charBreatheWave {
  0%, 100% {
    transform: scale(1);
    opacity: 0.76;
  }
  30% {
    transform: scale(1.36) translateY(-3px);
    opacity: 1;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.85), 0 0 22px var(--gold-light);
  }
  60% {
    transform: scale(1);
    opacity: 0.76;
  }
}

/* Special 初始为默认文本，随后变大并绽放为高亮蓝色胶囊 */
.morph-special {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 600;
  color: #ffffff;
  margin: 0 4px;
  padding: 2px 6px 3px;
  border-radius: 8px;
  transition: all 0.7s var(--ease-pop);
  transform-origin: center center;
}
.morph-special.active {
  background: #0a84ff;
  color: #ffffff;
  padding: 3px 14px 5px;
  transform: scale(1.14) translateY(-2px);
  box-shadow: 0 4px 22px rgba(10, 132, 255, 0.65), 0 0 14px rgba(255, 255, 255, 0.35);
}

/* 核心灵魂：:) 颜文字顺时针旋转 90 度变正微笑脸庞 (右移避免沾到Special蓝色背景) */
.smile-rotator {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15em;
  color: #ffffff;
  margin-left: clamp(20px, 4.5vw, 32px);
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 0.9s var(--ease-pop), color 0.5s ease, text-shadow 0.5s ease;
  will-change: transform;
}
.smile-rotator.upright {
  transform: rotate(90deg) translateY(-2px);
  color: var(--gold-light);
  text-shadow: 0 0 16px rgba(255, 117, 151, 0.8), 0 0 28px rgba(247, 213, 110, 0.6);
}

/* Page 11: 巨大的 "SO" 电影感定格转场 (S天降变小 + O右滚入) */
.ewish-so-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.so-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: visible;
}
.so-char {
  display: inline-block;
  font-family: var(--f-display);
  font-size: clamp(110px, 34vw, 240px);
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 12px 60px rgba(255, 255, 255, 0.4);
  will-change: transform, opacity;
}
.char-s {
  opacity: 0;
  transform: translateY(-120vh) scale(2.6);
}
.char-s.drop-in {
  animation: sDropIn 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.25) forwards;
}
@keyframes sDropIn {
  0% {
    opacity: 0;
    transform: translateY(-120vh) scale(2.6);
  }
  65% {
    opacity: 1;
    transform: translateY(14px) scale(0.92);
  }
  82% {
    transform: translateY(-10px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.char-o {
  opacity: 0;
  transform: translateX(110vw) rotate(720deg);
}
.char-o.roll-in {
  animation: oRollIn 0.85s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes oRollIn {
  0% {
    opacity: 0;
    transform: translateX(110vw) rotate(720deg);
  }
  65% {
    opacity: 1;
    transform: translateX(-12px) rotate(-18deg);
  }
  82% {
    transform: translateX(6px) rotate(8deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}


/* ════════════════════════════════════════════
   PAGE 12 · 终章生日盛典 (借鉴 Elodie's Birthday)
════════════════════════════════════════════ */
/* 全屏物理重力 Emoji 喷射礼炮与绚烂角隅烟花 Canvas */
#fx-cannon-canvas {
  position: absolute; inset: 0; pointer-events: none;
  z-index: 6;
}

.elodie-celebration {
  text-align: center;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  padding: 20px 10px;
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: opacity 0.85s var(--ease-spring), transform 0.85s var(--ease-spring);
}
.elodie-celebration.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* 1. 顶部中央小琳专属超质感圆角照片框 */
.elodie-photo-frame {
  width: clamp(120px, 32vw, 160px);
  height: clamp(120px, 32vw, 160px);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: clamp(14px, 2.5vh, 22px);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 25px rgba(247, 213, 110, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: photoFrameFloat 5s ease-in-out infinite;
}
@keyframes photoFrameFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.elodie-photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.frame-glass-glow {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  border-radius: 26px;
}

/* 2. "HAPPY BIRTHDAY!" 核心排版：每个字母先向左扭头、转向右侧、然后自然回正 */
.elodie-hbd-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1.4vh, 10px);
  margin-bottom: 12px;
}

.elodie-word {
  display: flex;
  justify-content: center;
  gap: clamp(3px, 1.6vw, 10px);
}

/* 14个字母 3D 扭头 + 星芒波浪闪烁 (Sequential Letter Sparkle Wave) */
.sparkle-letter {
  display: inline-block;
  font-family: var(--f-display);
  font-size: clamp(32px, 8.8vw, 62px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 15%, var(--gold-light) 60%, var(--rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform, opacity;
  transform-origin: center center;
  perspective: 800px;
  backface-visibility: visible;
  opacity: 0;
  transform: perspective(800px) rotateY(180deg) scale(0.9);
}

.sparkle-letter.flip-upright {
  animation: letterFlipUpright 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             letterSparkleWave 3.2s 1.25s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.075s), calc(1.25s + var(--i) * 0.09s);
}

@keyframes letterFlipUpright {
  0% {
    opacity: 0;
    transform: perspective(800px) rotateY(180deg) scale(0.85);
  }
  50% {
    opacity: 1;
    transform: perspective(800px) rotateY(0deg) scale(1.18);
  }
  75% {
    transform: perspective(800px) rotateY(-14deg) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: perspective(800px) rotateY(0deg) scale(1);
  }
}

@keyframes letterSparkleWave {
  0%, 35%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.95;
  }
  14% {
    transform: translateY(-8px) scale(1.16);
    opacity: 1;
  }
  24% {
    transform: translateY(-2px) scale(1.06);
    opacity: 1;
  }
}

.sparkle-letter.mark-excl {
  color: var(--gold);
}

/* 3. 祝福金句 */
.elodie-quote-en {
  font-family: var(--f-display);
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-top: 10px;
  opacity: 0.95;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.elodie-quote-cn {
  font-size: clamp(13px, 3.4vw, 15px);
  color: var(--text-secondary);
  line-height: 1.7;
  letter-spacing: 1px;
  margin-top: 8px;
  max-width: 84vw;
}
.elodie-date {
  font-family: var(--f-display);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 4px;
  margin-top: 18px;
}

/* 4. 专属浪漫寄语与落款署名 */
.elodie-footer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  position: relative;
  z-index: 5;
}

.elodie-footer-divider {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  margin-bottom: 2px;
}

.elodie-memory-en {
  font-family: var(--f-display);
  font-size: clamp(12.5px, 3.2vw, 14.5px);
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.8px;
  line-height: 1.5;
  max-width: 88vw;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.elodie-memory-cn {
  font-size: clamp(11.5px, 2.8vw, 13px);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1.2px;
  margin-top: -2px;
}

.elodie-copyright {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.46);
  letter-spacing: 1.2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.elodie-copyright .cp-heart {
  color: #ff5277;
  display: inline-block;
  animation: pulseHeart 1.6s ease-in-out infinite;
  font-size: 12px;
  margin: 0 1px;
}

@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.elodie-copyright .cp-sep {
  opacity: 0.4;
}

/* 5. 柔和背景大光晕 (纯渐变自然衰减，坚决移除高开销 filter: blur(60px) 解放手机GPU) */
.elodie-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.elodie-bg-orb.orb-coral {
  width: clamp(220px, 50vw, 360px);
  height: clamp(220px, 50vw, 360px);
  background: radial-gradient(circle, rgba(255, 117, 151, 0.16) 0%, rgba(255, 117, 151, 0.06) 45%, transparent 70%);
  top: 18%; left: 8%;
  animation: orbDrift1 8s ease-in-out infinite alternate;
}
.elodie-bg-orb.orb-gold {
  width: clamp(260px, 55vw, 420px);
  height: clamp(260px, 55vw, 420px);
  background: radial-gradient(circle, rgba(247, 213, 110, 0.14) 0%, rgba(247, 213, 110, 0.05) 50%, transparent 70%);
  bottom: 15%; right: 6%;
  animation: orbDrift2 10s ease-in-out infinite alternate;
}
@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(25px, -15px) scale(1.1); }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, 20px) scale(1.08); }
}


/* ════════════════════════════════════════════
   RISING BALLOONS (eWishWell 飘逸马卡龙气球舞台)
════════════════════════════════════════════ */
#balloons-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.floating-balloon {
  position: absolute;
  bottom: -50px;
  width: 44px; height: 56px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  animation: balloonFloatUp 8.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-fill-mode: both;
  box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.15), inset 4px 4px 10px rgba(255, 255, 255, 0.55), 0 8px 24px rgba(0, 0, 0, 0.28);
}
.floating-balloon::before {
  content: ''; position: absolute; bottom: -5px; left: 50%;
  width: 7px; height: 6px;
  background: inherit;
  transform: translateX(-50%);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
}
.floating-balloon::after {
  content: ''; position: absolute; bottom: -28px; left: 50%;
  width: 1.5px; height: 38px; background: rgba(255, 255, 255, 0.55);
  transform: translateX(-50%);
}
@keyframes balloonFloatUp {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(0.85);
    opacity: 0;
  }
  8% {
    opacity: 0.92;
    transform: translateY(-12vh) translateX(8px) rotate(4deg) scale(1);
  }
  45% {
    transform: translateY(-55vh) translateX(-16px) rotate(-5deg);
    opacity: 0.92;
  }
  80% {
    transform: translateY(-105vh) translateX(12px) rotate(4deg);
    opacity: 0.88;
  }
  100% {
    transform: translateY(-140vh) translateX(-8px) rotate(-3deg);
    opacity: 0;
  }
}


/* ════════════════════════════════════════════
   FLOATING AFFIRMATION TEXT (浪漫星空浮现文字流·纯CSS硬件加速·零JS帧循环)
════════════════════════════════════════════ */
.ft-item {
  position: fixed; pointer-events: none; z-index: 150;
  display: inline-flex; align-items: center;
  transform-origin: center center;
  will-change: transform, opacity;
  animation: ftFloatSoft 6s cubic-bezier(0.18, 1, 0.32, 1) forwards;
}

.ft-item.ambient-bg {
  z-index: 25;
}

.ft-pill {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: clamp(13px, 3.6vw, 16.5px);
  font-weight: 600;
  letter-spacing: 0.8px;
  background: rgba(10, 13, 28, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 12px rgba(255, 220, 150, 0.2);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

@keyframes ftFloatSoft {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) rotate(var(--base-rot, 0deg)) scale(0.92);
  }
  14% {
    opacity: 1;
    transform: translate3d(calc(var(--drift-x, 0px) * 0.15), calc(var(--drift-y, -50px) * 0.15), 0) rotate(calc(var(--base-rot, 0deg) + var(--drift-rot, 0deg) * 0.15)) scale(1);
  }
  75% {
    opacity: 0.95;
    transform: translate3d(calc(var(--drift-x, 0px) * 0.75), calc(var(--drift-y, -50px) * 0.75), 0) rotate(calc(var(--base-rot, 0deg) + var(--drift-rot, 0deg) * 0.75)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift-x, 0px), var(--drift-y, -50px), 0) rotate(calc(var(--base-rot, 0deg) + var(--drift-rot, 0deg))) scale(0.96);
  }
}

/* ════════════════════════════════════════════
   iOS LONG-PRESS ACTION BUTTON (右下角灵动长按推进圆环)
════════════════════════════════════════════ */
.next-fab-container {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 20px) + 16px);
  right: 18px;
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring);
}

.next-fab-container.locked {
  opacity: 0.42;
}

.next-fab-hint {
  background: rgba(12, 16, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.next-fab-container:not(.locked) .next-fab-hint {
  opacity: 0.92;
  transform: translateX(0);
  animation: hintBreathe 2.4s ease-in-out infinite alternate;
}

@keyframes hintBreathe {
  0%   { opacity: 0.65; transform: translateX(0); }
  100% { opacity: 1; transform: translateX(-3px); }
}

.next-fab-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-spring);
}

.next-fab-btn:active,
.next-fab-btn.pressing {
  transform: scale(0.92);
}

.next-fab-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 3.2;
}

.ring-fill {
  fill: none;
  stroke: var(--gold-light, #f7d56e);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-dasharray: 164;
  stroke-dashoffset: 164; /* 2 * PI * 26 ≈ 163.36 */
  filter: drop-shadow(0 0 6px rgba(247, 213, 110, 0.65));
  transition: stroke-dashoffset 0.05s linear;
}

.next-fab-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 22, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(247, 213, 110, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background 0.2s, box-shadow 0.2s;
}

.next-fab-btn.pressing .next-fab-core {
  background: rgba(247, 213, 110, 0.25);
  box-shadow: 0 0 24px rgba(247, 213, 110, 0.6);
  color: var(--gold-light);
}

.next-fab-btn.completed {
  animation: fabPulseSuccess 0.4s var(--ease-spring);
}

@keyframes fabPulseSuccess {
  0%   { transform: scale(0.92); }
  50%  { transform: scale(1.25); box-shadow: 0 0 32px rgba(247, 213, 110, 1); }
  100% { transform: scale(1); }
}

/* 最后一页：重塑为极具仪式感的优雅毛玻璃胶囊「重新观看」按钮（盛典全景演毕后柔和渐入） */
.next-fab-container.replay-mode {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(14px) scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.next-fab-container.replay-mode.revealed {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.next-fab-container.replay-mode .next-fab-hint {
  display: none !important;
}

.next-fab-container.replay-mode .next-fab-ring,
.next-fab-container.replay-mode .next-fab-core {
  display: none !important;
}

.next-fab-container.replay-mode .next-fab-btn {
  width: auto;
  min-width: 112px;
  height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(32, 24, 60, 0.94) 0%, rgba(18, 16, 36, 0.96) 100%);
  border: 1px solid rgba(247, 213, 110, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 18px rgba(247, 213, 110, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: replayBreathe 2.4s ease-in-out infinite alternate;
  transition: transform 0.25s var(--ease-spring), background 0.25s, box-shadow 0.25s;
}

.next-fab-container.replay-mode .next-fab-btn:hover {
  background: linear-gradient(135deg, rgba(46, 34, 88, 0.96) 0%, rgba(26, 22, 50, 0.98) 100%);
  border-color: rgba(247, 213, 110, 0.65);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 24px rgba(247, 213, 110, 0.42);
  transform: translateY(-2px) scale(1.03);
}

.next-fab-container.replay-mode .next-fab-btn:active {
  transform: scale(0.94);
}

@keyframes replayBreathe {
  0%   { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 14px rgba(247, 213, 110, 0.2); }
  100% { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 24px rgba(247, 213, 110, 0.45); }
}

.next-fab-replay {
  display: none;
  align-items: center;
  gap: 7px;
  color: #fff9e6;
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.next-fab-container.replay-mode .next-fab-replay {
  display: inline-flex;
}

.next-fab-replay .replay-icon {
  color: var(--gold-light, #f7d56e);
  transition: transform 0.4s var(--ease-spring);
}

.next-fab-container.replay-mode .next-fab-btn:hover .replay-icon {
  transform: rotate(-120deg);
}

/* ════════════════════════════════════════════
   GLOBAL iOS TOAST (状态轻提示)
════════════════════════════════════════════ */
.global-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 16px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  background: rgba(15, 18, 36, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.5px;
  padding: 8px 18px;
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 16px rgba(247, 213, 110, 0.2);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.28s ease, transform 0.28s var(--ease-spring);
  white-space: normal;
  word-break: break-word;
  max-width: min(88vw, 380px);
  width: max-content;
  box-sizing: border-box;
  text-align: center;
}
.global-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════════════
   P5 美食记忆前 8 张必看解锁徽章
════════════════════════════════════════════ */
.food-unlock-badge {
  font-size: 11.5px;
  color: #ffd180;
  background: rgba(14, 18, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 209, 128, 0.35);
  border-radius: 999px;
  padding: 5px 15px;
  margin-top: 8px;
  display: inline-block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.8px;
  transition: all 0.3s var(--ease-spring);
}
.food-unlock-badge.unlocked {
  color: #a7f3d0;
  border-color: rgba(167, 243, 208, 0.5);
  background: rgba(16, 40, 30, 0.88);
}

/* ════════════════════════════════════════════
   视频播放确认交互遮罩
════════════════════════════════════════════ */
.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border-radius: 20px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.video-play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.v-play-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7597, #f7d56e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 117, 151, 0.45), 0 0 20px rgba(247, 213, 110, 0.4);
  margin-bottom: 12px;
  transition: transform 0.25s var(--ease-spring);
}
.video-play-overlay:hover .v-play-btn,
.video-play-overlay:active .v-play-btn {
  transform: scale(1.12);
}
.v-play-triangle {
  color: #ffffff;
  font-size: 24px;
  margin-left: 4px;
}
.v-play-text {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
}
.v-play-sub {
  color: var(--text-tertiary);
  font-size: 11.5px;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* ════════════════════════════════════════════
   终章 iPhone 官方原生 DOM EMOJI 礼炮舞台 (纯 GPU 硬件合成层 60/120 FPS)
════════════════════════════════════════════ */
#fx-dom-emoji-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.dom-cannon-emoji {
  position: absolute;
  bottom: -20px;
  font-size: clamp(28px, 7.8vw, 42px);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  contain: layout style paint;
}

.dom-cannon-emoji.cannon-left {
  left: 20px;
}

.dom-cannon-emoji.cannon-right {
  right: 20px;
}

/* 左侧礼炮 6 条高真实度重力物理抛物线 (向中右侧飞溅下落，零空中悬停) */
.dom-cannon-emoji.arc-l-1 { animation: cannonArcL1 1.55s linear forwards; }
.dom-cannon-emoji.arc-l-2 { animation: cannonArcL2 1.45s linear forwards; }
.dom-cannon-emoji.arc-l-3 { animation: cannonArcL3 1.65s linear forwards; }
.dom-cannon-emoji.arc-l-4 { animation: cannonArcL4 1.38s linear forwards; }
.dom-cannon-emoji.arc-l-5 { animation: cannonArcL5 1.50s linear forwards; }
.dom-cannon-emoji.arc-l-6 { animation: cannonArcL6 1.68s linear forwards; }

@keyframes cannonArcL1 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  42% {
    transform: translate3d(34vw, -62vh, 0) scale(1.2) rotate(140deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(68vw, 25vh, 0) scale(0.85) rotate(320deg);
    opacity: 0;
  }
}

@keyframes cannonArcL2 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  40% {
    transform: translate3d(48vw, -50vh, 0) scale(1.22) rotate(110deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(84vw, 22vh, 0) scale(0.88) rotate(260deg);
    opacity: 0;
  }
}

@keyframes cannonArcL3 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  44% {
    transform: translate3d(24vw, -74vh, 0) scale(1.18) rotate(160deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(50vw, 26vh, 0) scale(0.82) rotate(380deg);
    opacity: 0;
  }
}

@keyframes cannonArcL4 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.7) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  38% {
    transform: translate3d(56vw, -38vh, 0) scale(1.15) rotate(90deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(88vw, 20vh, 0) scale(0.85) rotate(220deg);
    opacity: 0;
  }
}

@keyframes cannonArcL5 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  42% {
    transform: translate3d(40vw, -56vh, 0) scale(1.22) rotate(130deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(66vw, 24vh, 0) scale(0.86) rotate(300deg);
    opacity: 0;
  }
}

@keyframes cannonArcL6 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  44% {
    transform: translate3d(28vw, -78vh, 0) scale(1.25) rotate(170deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(54vw, 28vh, 0) scale(0.82) rotate(360deg);
    opacity: 0;
  }
}

/* 右侧礼炮 6 条高真实度重力物理抛物线 (向中左侧飞溅下落，零空中悬停) */
.dom-cannon-emoji.arc-r-1 { animation: cannonArcR1 1.55s linear forwards; }
.dom-cannon-emoji.arc-r-2 { animation: cannonArcR2 1.45s linear forwards; }
.dom-cannon-emoji.arc-r-3 { animation: cannonArcR3 1.65s linear forwards; }
.dom-cannon-emoji.arc-r-4 { animation: cannonArcR4 1.38s linear forwards; }
.dom-cannon-emoji.arc-r-5 { animation: cannonArcR5 1.50s linear forwards; }
.dom-cannon-emoji.arc-r-6 { animation: cannonArcR6 1.68s linear forwards; }

@keyframes cannonArcR1 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  42% {
    transform: translate3d(-34vw, -62vh, 0) scale(1.2) rotate(-140deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(-68vw, 25vh, 0) scale(0.85) rotate(-320deg);
    opacity: 0;
  }
}

@keyframes cannonArcR2 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  40% {
    transform: translate3d(-48vw, -50vh, 0) scale(1.22) rotate(-110deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(-84vw, 22vh, 0) scale(0.88) rotate(-260deg);
    opacity: 0;
  }
}

@keyframes cannonArcR3 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  44% {
    transform: translate3d(-24vw, -74vh, 0) scale(1.18) rotate(-160deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(-50vw, 26vh, 0) scale(0.82) rotate(-380deg);
    opacity: 0;
  }
}

@keyframes cannonArcR4 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.7) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  38% {
    transform: translate3d(-56vw, -38vh, 0) scale(1.15) rotate(-90deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(-88vw, 20vh, 0) scale(0.85) rotate(-220deg);
    opacity: 0;
  }
}

@keyframes cannonArcR5 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  42% {
    transform: translate3d(-40vw, -56vh, 0) scale(1.22) rotate(-130deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(-66vw, 24vh, 0) scale(0.86) rotate(-300deg);
    opacity: 0;
  }
}

@keyframes cannonArcR6 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.35, 1);
  }
  44% {
    transform: translate3d(-28vw, -78vh, 0) scale(1.25) rotate(-170deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0.08, 0.82, 0.48);
  }
  100% {
    transform: translate3d(-54vw, 28vh, 0) scale(0.82) rotate(-360deg);
    opacity: 0;
  }
}

/* 交互轻触绽放 Emoji (纯 GPU 硬件合成，零卡顿) */
.tap-burst-emoji {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-size: clamp(22px, 6vw, 32px);
  line-height: 1;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  animation: tapBurstAnim 1.4s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes tapBurstAnim {
  0% {
    transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg);
    opacity: 1;
  }
  35% {
    transform: translate3d(var(--tx), var(--ty), 0) scale(1.2) rotate(var(--rot));
    opacity: 1;
  }
  100% {
    transform: translate3d(calc(var(--tx) * 1.3), calc(var(--ty) + 45px), 0) scale(0.65) rotate(calc(var(--rot) * 1.5));
    opacity: 0;
  }
}
