/* 沉浸式故事流 - 样式（v2 全内容区重做） */

/* 沉浸页覆盖层 - 整体纸质背景 */
.immersive-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at top, rgba(139,38,53,0.03), transparent 60%),
    linear-gradient(180deg, #F5EDD8 0%, #F0E6D0 100%);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* 纸张纹理叠加层 */
.immersive-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139,38,53,0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(201,169,97,0.03) 0%, transparent 50%);
  background-size: 300px 300px;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* 顶部固定栏 */
.immersive-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
  color: #fff;
  transition: background 0.3s;
}
.immersive-topbar.scrolled {
  background: rgba(250, 246, 240, 0.95);
  color: #2D1F14;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 38, 53, 0.1);
}
.back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: inherit;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
}
.day-badge-top {
  font-size: 13px;
  font-weight: 600;
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  letter-spacing: 1px;
}

/* Hero 区 - 视差 */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: -10%; left: 0; right: 0;
  height: 120%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  z-index: 2;
}
.hero-content {
  position: absolute;
  bottom: 40px; left: 0; right: 0;
  z-index: 3;
  padding: 0 24px;
  color: #fff;
}
.hero-day {
  font-size: 14px;
  letter-spacing: 4px;
  opacity: 0.85;
  margin-bottom: 4px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}
/* Day 数字超大视觉锚点 */
.hero-day-num {
  font-size: 80px;
  font-weight: 900;
  line-height: 0.9;
  font-family: 'Playfair Display', serif;
  display: inline-block;
  margin-right: 6px;
  vertical-align: baseline;
  letter-spacing: -2px;
}
.hero-day-unit {
  font-size: 16px;
  opacity: 0.7;
  letter-spacing: 3px;
  font-family: 'Playfair Display', serif;
}
.hero-title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  margin: 8px 0 6px;
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-title-en {
  font-size: 20px;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
}
.hero-location {
  font-size: 14px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scroll-hint {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: #fff;
  font-size: 11px;
  opacity: 0.7;
  animation: bounceDown 2s infinite;
  text-align: center;
}
@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.4; }
}

/* 内容段落通用 - v2 带纸质容器 */
.content-section {
  position: relative;
  z-index: 2;
  padding: 48px 24px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.content-section.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* 故事段和冷知识：更轻的渐显，几乎不位移（保持安静） */
.story-section,
.fact-section {
  transform: translateY(4px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
/* 实景段：轻微位移（它是"强动效"段，但幅度也收到10px内） */
.photos-section {
  transform: translateY(10px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.section-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: #8B2635;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #C9A961;
}

/* 段落分割装饰 - 版画风格分隔线 */
.divider-ornament {
  text-align: center;
  padding: 8px 0;
  color: #C9A961;
  font-size: 16px;
  letter-spacing: 12px;
  opacity: 0.5;
}

/* 故事段落 - 旧书页质感容器 */
.story-section {
  position: relative;
  z-index: 2;
}
.story-container {
  background:
    linear-gradient(135deg, #FFFCF2 0%, #F9F0D8 100%);
  border-radius: 4px;
  padding: 36px 28px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 8px 32px rgba(139,38,53,0.08),
    0 2px 8px rgba(45,31,20,0.06);
  border: 1px solid rgba(201,169,97,0.25);
  position: relative;
}
/* 旧书页四角装饰 */
.story-container::before,
.story-container::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1.5px solid #C9A961;
  opacity: 0.5;
}
.story-container::before {
  top: 10px; left: 10px;
  border-right: none; border-bottom: none;
}
.story-container::after {
  bottom: 10px; right: 10px;
  border-left: none; border-top: none;
}
.story-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(201,169,97,0.4);
}
.story-icon-deco {
  font-size: 36px;
  margin-bottom: 8px;
}
.story-text {
  font-size: 17px;
  line-height: 1.9;
  color: #2A1A0E;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 0.5px;
  text-align: justify;
}
.story-text::first-letter {
  font-size: 56px;
  font-weight: 700;
  float: left;
  line-height: 0.9;
  margin: 4px 8px 0 0;
  color: #8B2635;
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
}

/* 冷知识 - 便签贴纸风格 */
.fact-section {
  padding: 20px 24px 48px;
}
.fact-sticker {
  background: linear-gradient(135deg, #FFF4D6, #FFE8A8);
  padding: 24px 22px 22px;
  border-radius: 3px;
  position: relative;
  box-shadow:
    0 8px 20px rgba(139,38,53,0.12),
    0 2px 4px rgba(45,31,20,0.08);
  transform: rotate(-1.2deg);
  border-left: 3px solid #C9A961;
}
/* 便签顶部胶带感 */
.fact-sticker::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 70px; height: 18px;
  background: rgba(201,169,97,0.35);
  border-radius: 1px;
}
.fact-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #8B6914;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fact-text {
  font-size: 15px;
  line-height: 1.85;
  color: #3D2B1F;
  font-family: 'Noto Serif SC', serif;
}

/* 实景画廊 - 博物馆展陈式 */
.photos-section {
  position: relative;
  z-index: 2;
  padding: 48px 0;
}
.photos-section .section-label,
.photos-section .section-title {
  padding: 0 24px;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #2D1F14;
  margin-bottom: 6px;
  font-family: 'Noto Serif SC', serif;
}
.photos-subtitle {
  padding: 0 24px;
  font-size: 13px;
  color: #6B5D52;
  margin-bottom: 24px;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}
.photos-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 24px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.photos-scroll::-webkit-scrollbar { display: none; }
.photo-card {
  flex-shrink: 0;
  width: 260px;
  scroll-snap-align: start;
  position: relative;
}
.photo-frame {
  background: #fff;
  padding: 10px 10px 14px;
  box-shadow:
    0 2px 4px rgba(45,31,20,0.08),
    0 8px 24px rgba(139,38,53,0.1);
  transform: rotate(-0.8deg);
  transition: transform 0.2s;
}
.photo-card:nth-child(even) .photo-frame {
  transform: rotate(0.8deg);
}
.photo-card:active .photo-frame {
  transform: rotate(0deg) scale(0.98);
}
.photo-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #ddd;
  filter: sepia(0.35) contrast(1.08) saturate(0.85) brightness(0.98);
}
.photo-tag {
  margin-top: 10px;
  padding: 0 4px;
}
.photo-caption {
  font-size: 14px;
  color: #2D1F14;
  font-weight: 600;
  font-family: 'Noto Serif SC', serif;
}
.photo-location {
  font-size: 11px;
  color: #8B2635;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

/* 商品导流 - 旅行伴手礼清单 */
.products-section {
  padding: 40px 0 120px;
  position: relative;
  z-index: 2;
}
.products-section .section-label,
.products-section .section-title,
.products-intro {
  padding: 0 24px;
}
.products-intro {
  font-size: 13px;
  color: #6B5D52;
  margin-bottom: 24px;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}
/* 横向滚动纪念品清单 */
.products-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 24px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.products-scroll::-webkit-scrollbar { display: none; }
.souvenir-card {
  flex-shrink: 0;
  width: 180px;
  scroll-snap-align: start;
  background: linear-gradient(180deg, #FFFCF2 0%, #F5E8C8 100%);
  border-radius: 4px;
  padding: 20px 18px;
  box-shadow:
    0 2px 4px rgba(45,31,20,0.06),
    0 6px 20px rgba(139,38,53,0.08);
  border: 1px solid rgba(201,169,97,0.25);
  position: relative;
  transform: rotate(-0.5deg);
  transition: transform 0.2s;
}
.souvenir-card:nth-child(even) {
  transform: rotate(0.5deg);
}
.souvenir-card:active {
  transform: rotate(0) scale(0.97);
}
/* 价格吊牌 */
.souvenir-tag {
  position: absolute;
  top: -8px;
  right: 14px;
  background: #8B2635;
  color: #FFFCF2;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 2px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(139,38,53,0.3);
}
.souvenir-tag::before {
  content: '';
  position: absolute;
  left: -4px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: #FFFCF2;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #8B2635;
}
.souvenir-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(201,169,97,0.4);
}
.souvenir-name {
  font-size: 14px;
  color: #3D2B1F;
  font-weight: 600;
  font-family: 'Noto Serif SC', serif;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 8px;
}
.souvenir-desc {
  font-size: 11px;
  color: #6B5D52;
  text-align: center;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  line-height: 1.5;
}
/* 底部 CTA 引导 */
.products-cta {
  text-align: center;
  margin-top: 24px;
  padding: 0 24px;
}
.products-cta-text {
  font-size: 12px;
  color: #8B2635;
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* 底部固定签到按钮 */
.claim-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #FAF6F0 70%, rgba(250,246,240,0));
  z-index: 10;
}
.btn-claim-immersive {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #8B2635, #A52A3C);
  color: #fff;
  border: none;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(139, 38, 53, 0.35);
  transition: transform 0.15s;
  font-family: 'Noto Sans SC', sans-serif;
}
.btn-claim-immersive:active { transform: scale(0.97); }
.btn-claim-immersive.claimed {
  background: #6B5D52;
  box-shadow: none;
}

/* 印章盖章动画覆盖层 */
.stamp-animation {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
}
.stamp-seal {
  width: 140px;
  height: 140px;
  border: 6px solid #C41E3A;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(196, 30, 58, 0.1);
  color: #C41E3A;
  transform: scale(0) rotate(-45deg);
}
.stamp-seal.animate {
  animation: stampDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes stampDown {
  0% { transform: scale(3) rotate(-45deg); opacity: 0; }
  60% { transform: scale(0.9) rotate(-12deg); opacity: 1; }
  80% { transform: scale(1.05) rotate(-15deg); }
  100% { transform: scale(1) rotate(-12deg); opacity: 1; }
}
.stamp-icon-big { font-size: 40px; }
.stamp-text { font-size: 14px; font-weight: 700; margin-top: 4px; font-family: 'Noto Serif SC', serif; }
.stamp-points { font-size: 11px; opacity: 0.8; }

/* 数字滚动动画 */
.miles-num {
  transition: color 0.3s;
}
.miles-num.counting {
  color: #C41E3A;
}

/* ========== 贴纸元素：邮票 ========== */
.stamp-sticker {
  position: absolute;
  bottom: 130px;
  right: 20px;
  width: 82px;
  background: #FFFCF2;
  padding: 6px;
  z-index: 5;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.25);
  transform: rotate(6deg) scale(0);
  opacity: 0;
  /* 邮票齿孔效果 */
  filter: drop-shadow(0 0 0 transparent);
}
/* 邮票锯齿边 */
.stamp-sticker::before {
  content: '';
  position: absolute;
  inset: -3px;
  background:
    radial-gradient(circle at 4px 4px, transparent 3px, #FFFCF2 3.5px) 0 0 / 8px 8px,
    radial-gradient(circle at 4px 4px, transparent 3px, #FFFCF2 3.5px) 0 0 / 8px 8px;
  z-index: -1;
  padding: 3px;
}
.stamp-sticker-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  filter: sepia(0.2);
}
.stamp-sticker-flag {
  text-align: center;
  font-size: 18px;
  padding: 2px 0;
}
.stamp-sticker-text {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #8B2635;
  letter-spacing: 1px;
  font-family: 'Playfair Display', serif;
  padding: 2px 0 1px;
  border-top: 1px solid rgba(139,38,53,0.2);
}
.stamp-sticker-value {
  text-align: center;
  font-size: 10px;
  color: #6B5D52;
  font-family: 'Playfair Display', serif;
}
/* 邮票飞入动画 */
.stamp-sticker.fly-in {
  animation: stampFlyIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.4s;
}
@keyframes stampFlyIn {
  0% {
    transform: translate(200px, -100px) rotate(45deg) scale(0.3);
    opacity: 0;
  }
  70% {
    transform: translate(0, 0) rotate(3deg) scale(1.1);
    opacity: 1;
  }
  85% {
    transform: rotate(7deg) scale(0.97);
  }
  100% {
    transform: rotate(6deg) scale(1);
    opacity: 1;
  }
}

/* ========== 拍立得甩出动效 ========== */
.photo-card {
  opacity: 0;
  transform: translateX(120px) rotate(8deg);
}
.photo-card.fly-in {
  animation: polaroidFlyIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.photo-card:nth-child(1).fly-in { animation-delay: 0.1s; }
.photo-card:nth-child(2).fly-in { animation-delay: 0.3s; }
.photo-card:nth-child(3).fly-in { animation-delay: 0.5s; }
@keyframes polaroidFlyIn {
  0% {
    transform: translateX(120px) rotate(8deg);
    opacity: 0;
  }
  60% {
    transform: translateX(-8px) rotate(-2deg);
    opacity: 1;
  }
  80% {
    transform: translateX(4px) rotate(1deg);
  }
  100% {
    transform: translateX(0) rotate(-0.8deg);
    opacity: 1;
  }
}
/* 拍立得底边（手写区） */
.photo-frame {
  position: relative;
}
.photo-frame::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    rgba(201,169,97,0.2) 0,
    rgba(201,169,97,0.2) 6px,
    transparent 6px,
    transparent 12px
  );
}
