/* ========================================
   婚礼邀请函 - 全局样式
   配色：柔和红金主题，移动端优先
   ======================================== */

/* ---- CSS 变量 ---- */
:root {
  --red: #CC3A4E;
  --red-dark: #A02D3E;
  --red-light: #E8A0AD;
  --gold: #C49A4B;
  --gold-light: #E2C98A;
  --gold-pale: #F5EDE0;
  --cream: #FFF9F2;
  --cream-warm: #FFF3E6;
  --brown: #5C3D2E;
  --brown-light: #8B6B5A;
  --pink-soft: #F9E4E8;
  --white-soft: rgba(255,255,255,0.85);
  --shadow-sm: 0 2px 12px rgba(160,45,62,0.06);
  --shadow-md: 0 6px 24px rgba(160,45,62,0.10);
  --shadow-lg: 0 12px 40px rgba(160,45,62,0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-cn: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
  --font-en: Georgia,"Times New Roman",serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-cn);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 15% 8%, rgba(204,58,78,0.03) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(196,154,75,0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 55%, rgba(204,58,78,0.02) 0%, transparent 40%),
    radial-gradient(circle at 20% 75%, rgba(196,154,75,0.03) 0%, transparent 45%),
    radial-gradient(circle at 75% 90%, rgba(204,58,78,0.025) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(196,154,75,0.035) 0%, transparent 55%);
  color: var(--brown);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ---- 背景装饰小点 ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 30px 80px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 70px 180px, var(--red) 1px, transparent 1px),
    radial-gradient(circle at 120px 320px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 90px 500px, var(--red-light) 1.5px, transparent 1.5px),
    radial-gradient(circle at 200px 150px, var(--gold-light) 1px, transparent 1px),
    radial-gradient(circle at 280px 400px, var(--red) 1px, transparent 1px),
    radial-gradient(circle at 340px 650px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 260px 900px, var(--red-light) 1.5px, transparent 1.5px),
    radial-gradient(circle at 180px 1100px, var(--gold-light) 1px, transparent 1px),
    radial-gradient(circle at 350px 1300px, var(--red) 1px, transparent 1px),
    radial-gradient(circle at 50px 1500px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 150px 1800px, var(--red-light) 1px, transparent 1px),
    radial-gradient(circle at 300px 2000px, var(--gold-light) 1px, transparent 1px),
    radial-gradient(circle at 80px 2200px, var(--red) 1px, transparent 1px),
    radial-gradient(circle at 220px 2500px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 320px 2800px, var(--red-light) 1px, transparent 1px),
    radial-gradient(circle at 160px 3100px, var(--gold-light) 1px, transparent 1px),
    radial-gradient(circle at 100px 3400px, var(--red) 1px, transparent 1px),
    radial-gradient(circle at 280px 3700px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 200px 4000px, var(--red-light) 1px, transparent 1px);
  background-size: 400px 4200px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(204,58,78,0.25); border-radius: 2px; }

/* ---- Utility ---- */
.container { max-width: 480px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* ========================================
   SECTION 1: 信封页
   ======================================== */
.envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(196,154,75,0.12) 0%, transparent 50%),
    linear-gradient(145deg, #8A1A2E 0%, var(--red) 35%, #A03045 65%, #801828 100%);
  transition: transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.6s;
  overflow: hidden;
}

/* 信封背景粒子 */
.envelope-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 50% 15%, rgba(255,255,255,0.2) 1.5px, transparent 1.5px),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,0.25) 1px, transparent 1px),
    radial-gradient(circle at 15% 70%, rgba(255,255,255,0.2) 1px, transparent 1px),
    radial-gradient(circle at 60% 80%, rgba(255,255,255,0.3) 1.5px, transparent 1.5px),
    radial-gradient(circle at 85% 65%, rgba(255,255,255,0.2) 1px, transparent 1px),
    radial-gradient(circle at 35% 55%, rgba(255,255,255,0.15) 1px, transparent 1px),
    radial-gradient(circle at 70% 25%, rgba(255,255,255,0.25) 1px, transparent 1px);
  background-size: 400px 400px;
  animation: envelopeParticles 20s linear infinite;
}

@keyframes envelopeParticles {
  0% { background-position: 0 0; }
  100% { background-position: 0 -400px; }
}

.envelope-overlay.open {
  transform: translateY(-110%) scale(0.95);
  opacity: 0;
  pointer-events: none;
}

.envelope-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, rgba(255,250,245,0.95), rgba(255,240,230,0.92));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(196,154,75,0.35);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 85%;
  max-width: 360px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.25),
    0 0 0 6px rgba(196,154,75,0.2),
    0 0 0 10px rgba(204,58,78,0.1),
    0 0 0 14px rgba(196,154,75,0.06);
  text-align: center;
  animation: cardEntry 0.8s ease-out;
}

@keyframes cardEntry {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 内框装饰线 */
.envelope-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(196,154,75,0.25);
  border-radius: 12px;
  pointer-events: none;
}

/* 角花装饰 */
.envelope-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: var(--radius-lg);
  pointer-events: none;
  background:
    linear-gradient(135deg, var(--gold) 2px, transparent 2px) 0 0 no-repeat,
    linear-gradient(225deg, var(--gold) 2px, transparent 2px) 100% 0 no-repeat,
    linear-gradient(315deg, var(--gold) 2px, transparent 2px) 100% 100% no-repeat,
    linear-gradient(45deg, var(--gold) 2px, transparent 2px) 0 100% no-repeat;
  background-size: 10px 10px;
  opacity: 0.5;
}

.envelope-seal {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  background: radial-gradient(circle at 40% 35%, var(--red) 0%, var(--red-dark) 100%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 16px rgba(204,58,78,0.35),
    0 0 0 4px rgba(196,154,75,0.12);
  animation: sealPulse 3s ease-in-out infinite;
}

@keyframes sealPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(204,58,78,0.35), 0 0 0 4px rgba(196,154,75,0.12); }
  50% { box-shadow: 0 4px 22px rgba(204,58,78,0.5), 0 0 0 8px rgba(196,154,75,0.08); }
}

.envelope-seal svg { width: 30px; height: 30px; fill: var(--gold); }

.envelope-label {
  font-size: 13px;
  color: var(--red);
  letter-spacing: 8px;
  margin-bottom: 10px;
}

.envelope-to {
  font-size: 24px;
  color: var(--red-dark);
  font-weight: 700;
  margin-bottom: 8px;
  min-height: 34px;
}

.envelope-names {
  font-size: 20px;
  color: var(--red);
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.envelope-date {
  font-size: 14px;
  color: var(--red-dark);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.envelope-lunar {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 20px;
}

.envelope-hint {
  font-size: 12px;
  color: var(--red);
  animation: hintPulse 2s infinite;
  letter-spacing: 2px;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-6px); }
}

.envelope-tip {
  display: inline-block;
  margin-top: 6px;
  font-size: 24px;
  animation: bounceDown 1.5s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ========================================
   装饰性分隔线（手绘波浪风格）
   ======================================== */
.wave-divider {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  overflow: visible;
}

.wave-divider svg {
  width: 100%;
  height: 40px;
}

/* 小花分隔 */
.flower-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
}

.flower-divider::before,
.flower-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 50px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.flower-divider-inner {
  font-size: 16px;
  color: var(--red);
  opacity: 0.7;
}

/* ========================================
   SECTION 2: 邀请语 + 倒计时
   ======================================== */
.invite-section {
  padding: 50px 20px 32px;
  text-align: center;
  position: relative;
}

.invite-section::after {
  content: '';
  display: block;
  margin: 24px auto 0;
  width: 100%;
  max-width: 320px;
  height: 24px;
  background:
    radial-gradient(circle at 50% 50%, var(--gold) 1.5px, transparent 1.5px) 0 50% / 8px 8px repeat-x,
    radial-gradient(circle at 50% 50%, var(--red-light) 1px, transparent 1px) 4px 50% / 8px 8px repeat-x;
  opacity: 0.45;
}

.invite-icon { margin-bottom: 20px; }
.invite-icon svg { width: 48px; height: 48px; }

.invite-names {
  font-size: 34px;
  font-weight: 700;
  color: var(--red-dark);
  letter-spacing: 5px;
  margin-bottom: 16px;
}

.invite-names .ampersand {
  color: var(--gold);
  font-family: var(--font-en);
  font-style: italic;
  font-weight: normal;
  font-size: 1.1em;
  margin: 0 10px;
}

.invite-poem {
  font-size: 15px;
  color: var(--red);
  line-height: 2.1;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.invite-message {
  font-size: 14px;
  color: var(--brown-light);
  line-height: 1.9;
  margin-bottom: 28px;
  padding: 0 16px;
}

/* 倒计时 */
.countdown-wrap { margin-top: 8px; }

.countdown-label {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 5px;
  margin-bottom: 14px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.countdown-item {
  background: linear-gradient(145deg, rgba(255,255,255,0.7), rgba(255,240,230,0.5));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(196,154,75,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  min-width: 62px;
  box-shadow:
    0 4px 16px rgba(204,58,78,0.12),
    0 0 20px rgba(204,58,78,0.04);
  position: relative;
}

.countdown-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.countdown-unit {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 5px;
}

/* ========================================
   SECTION 标题 + 装饰
   ======================================== */
.section-title {
  text-align: center;
  padding: 36px 20px 10px;
  font-size: 21px;
  color: var(--red-dark);
  font-weight: 700;
  letter-spacing: 4px;
  position: relative;
}

/* 标题下装饰：手绘波浪短线 */
.section-title::after {
  content: '';
  display: block;
  margin: 12px auto 0;
  width: 80px;
  height: 18px;
  background:
    radial-gradient(circle at 10px 4px, var(--gold) 1.5px, transparent 1.5px),
    radial-gradient(circle at 30px 10px, var(--red) 1.2px, transparent 1.2px),
    radial-gradient(circle at 50px 4px, var(--gold-light) 1.4px, transparent 1.4px),
    radial-gradient(circle at 70px 8px, var(--gold) 1px, transparent 1px);
  opacity: 0.6;
}

.section-subtitle {
  text-align: center;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

/* ---- 联系方式 ---- */
.contact-section { padding: 36px 0 20px; }

.contact-list {
  max-width: 380px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-person {
  background: rgba(255,250,245,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(196,154,75,0.15);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* 卡片左侧装饰线 */
.contact-person::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, transparent, var(--red-light), transparent);
  opacity: 0.6;
}

.contact-person-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-action { flex: 1; min-width: 0; }

.contact-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gold-pale);
  position: relative;
  flex-shrink: 0;
  border: 2px solid rgba(196,154,75,0.2);
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-avatar img.hidden { display: none; }

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.contact-avatar.fallback .avatar-fallback { display: flex; }

.contact-btn {
  display: block;
  width: 100%;
  padding: 10px 0;
  border: 1.5px solid var(--red);
  border-radius: 25px;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.3s;
}

.contact-btn:active {
  background: var(--red);
  color: #fff;
}

.contact-btn.hidden { display: none; }

.contact-info {
  display: none;
  text-align: center;
  cursor: pointer;
  padding: 8px 0;
}

.contact-info.show { display: block; }

.contact-phone {
  display: block;
  font-size: 14px;
  color: var(--red);
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.contact-backup { font-size: 12px; color: var(--gold); }

/* ---- 轮播图 ---- */
.carousel-section { padding: 0 0 8px; }

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4;
  max-height: 75vh;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(204,58,78,0.25);
  transition: all 0.35s;
}

.carousel-dot.active {
  background: var(--red);
  width: 22px;
  border-radius: 4px;
}

/* ---- 心形照片墙 ---- */
.grid-section { padding: 0; }

.heart-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.heart-photo {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(196,154,75,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: heartAppear 0.6s ease-out backwards,
             heartFloat 4s ease-in-out infinite;
  animation-play-state: paused;
}

.heart-container.visible .heart-photo {
  animation-play-state: running;
}

.heart-photo:active {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 10px 28px rgba(204,58,78,0.2);
  z-index: 10;
}

@keyframes heartAppear {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes heartFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%      { transform: translate(-50%, -50%) translateY(-7px); }
}

.heart-header { text-align: center; margin-top: 16px; }

.heart-header-couplet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.heart-header-main {
  font-size: 19px;
  color: var(--red);
  font-weight: bold;
  letter-spacing: 5px;
}

.heart-header-divider {
  font-size: 14px;
  color: var(--gold);
}

.heart-header-desc {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 2px;
}

/* ---- 故事墙 ---- */
.waterfall-section { padding: 0; }

.waterfall-container {
  max-width: 480px;
  margin: 0 auto;
}

.story-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.story-photo,
.story-text {
  flex: 1;
  min-height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.story-photo {
  cursor: pointer;
  background: var(--gold-pale);
  transition: transform 0.3s;
  box-shadow: var(--shadow-sm);
}

.story-photo:active { transform: scale(0.97); }

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: linear-gradient(135deg, rgba(204,58,78,0.04), rgba(196,154,75,0.06));
  border: 1px solid rgba(196,154,75,0.1);
  position: relative;
}

/* 故事文字卡角花 */
.story-text::before {
  content: '✦';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 12px;
  color: var(--gold);
  opacity: 0.5;
}

.story-text-inner {
  font-size: 13px;
  color: var(--red-dark);
  line-height: 1.9;
  text-align: center;
  letter-spacing: 1px;
}

/* ---- 堆叠卡片 ---- */
.stacked-section { padding: 0; position: relative; }

.stacked-container {
  position: relative;
  height: 420px;
  margin: 0 20px;
  cursor: pointer;
}

.stacked-card {
  position: absolute;
  width: 80%;
  left: 10%;
  height: 380px;
  border-radius: var(--radius-md);
  background: var(--gold-pale);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(196,154,75,0.12);
  overflow: hidden;
}

.stacked-card.swapping {
  box-shadow: var(--shadow-lg);
  border-color: rgba(196,154,75,0.3);
}

/* ---- 全屏画廊 Overlay ---- */
.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.gallery-overlay.active { display: flex; }

.gallery-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), transparent);
}

.gallery-counter {
  color: #fff;
  font-size: 14px;
}

.gallery-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.gallery-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  width: 100%;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.gallery-nav {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s;
}

.gallery-dot.active {
  background: var(--gold);
  width: 20px;
  border-radius: 3px;
}

/* ========================================
   SECTION 7: 婚礼详情
   ======================================== */
.details-section {
  padding: 36px 20px;
  text-align: center;
}

.detail-card {
  background: rgba(255,250,245,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(196,154,75,0.2);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}

/* 顶部装饰线 */
.detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

/* 角花 */
.detail-card::after {
  content: '❦';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 16px;
  color: var(--gold);
  opacity: 0.4;
}

.detail-icon { margin-bottom: 12px; }
.detail-icon svg { width: 32px; height: 32px; }

.detail-label {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 5px;
  margin-bottom: 6px;
}

.detail-value {
  font-size: 18px;
  color: var(--red-dark);
  font-weight: 500;
}

.detail-value small {
  font-size: 12px;
  color: var(--gold);
  display: block;
  margin-top: 2px;
}

.detail-value a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px dashed var(--red);
}

.venue-address {
  font-size: 14px;
  color: var(--brown-light);
  margin-top: 6px;
}

.detail-map {
  margin-top: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 200px;
  box-shadow: var(--shadow-sm);
}

.detail-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ========================================
   SECTION 8: 祝福弹幕 + 留言墙
   ======================================== */
.blessing-section { padding: 36px 0 20px; }

/* 弹幕 */
.danmaku-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 22vh;
  overflow: hidden;
  z-index: 100;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(204,58,78,0.025), transparent);
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 14px;
  color: var(--red);
  padding: 5px 16px;
  background: rgba(255,250,245,0.92);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  pointer-events: none;
  animation: danmakuFly linear forwards;
  box-shadow: 0 2px 10px rgba(204,58,78,0.08);
  border: 1px solid rgba(196,154,75,0.15);
}

@keyframes danmakuFly {
  from { transform: translateX(100vw); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}

/* 祝福输入 */
.blessing-form {
  padding: 0 20px;
  max-width: 400px;
  margin: 0 auto;
}

.blessing-form .form-group {
  margin-bottom: 12px;
}

.blessing-form input,
.blessing-form textarea {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid rgba(196,154,75,0.25);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  color: var(--brown);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.blessing-form input:focus,
.blessing-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,154,75,0.08);
}

.blessing-form textarea {
  height: 80px;
  resize: none;
}

.blessing-form .char-count {
  text-align: right;
  font-size: 11px;
  color: var(--gold);
  margin-top: 2px;
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(204,58,78,0.25);
}

.btn-submit:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(204,58,78,0.15);
}

.btn-submit:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

/* 祝福留言墙 */
.blessing-wall {
  padding: 0 20px;
  max-width: 400px;
  margin: 24px auto 0;
}

.wall-item {
  background: rgba(255,250,245,0.7);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin-bottom: 10px;
  position: relative;
  animation: fadeInUp 0.4s ease;
  box-shadow: var(--shadow-sm);
}

/* 左侧装饰点 */
.wall-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: linear-gradient(180deg, var(--red-light), var(--gold), var(--red-light));
  border-radius: 0 2px 2px 0;
}

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

.wall-nickname {
  font-size: 13px;
  color: var(--gold);
  font-weight: bold;
  margin-bottom: 4px;
}

.wall-message {
  font-size: 14px;
  color: var(--brown);
  line-height: 1.5;
}

.wall-time {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 6px;
  text-align: right;
}

.wall-empty {
  text-align: center;
  color: var(--gold);
  font-size: 13px;
  padding: 24px;
}

.wall-load-more {
  text-align: center;
  padding: 12px;
  color: var(--red);
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  border: 1px dashed rgba(196,154,75,0.3);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  transition: background 0.3s;
}

.wall-load-more:active {
  background: rgba(204,58,78,0.03);
}

/* ========================================
   SECTION 9: 感谢语
   ======================================== */
.thanks-section {
  padding: 48px 20px 80px;
  text-align: center;
  position: relative;
}

/* 顶部分隔线 - 波浪风格 */
.thanks-section::before {
  content: '';
  display: block;
  margin: 0 auto 28px;
  width: 120px;
  height: 20px;
  background:
    radial-gradient(circle at 15px 6px, var(--gold) 1.8px, transparent 1.8px),
    radial-gradient(circle at 35px 12px, var(--red) 1.2px, transparent 1.2px),
    radial-gradient(circle at 55px 4px, var(--gold-light) 1.5px, transparent 1.5px),
    radial-gradient(circle at 75px 10px, var(--gold) 1px, transparent 1px),
    radial-gradient(circle at 95px 5px, var(--red-light) 1.3px, transparent 1.3px),
    radial-gradient(circle at 110px 14px, var(--gold) 1.2px, transparent 1.2px);
  opacity: 0.55;
}

/* 底部波浪收尾 */
.thanks-section::after {
  content: '';
  display: block;
  margin: 28px auto 0;
  width: 140px;
  height: 30px;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 40%, rgba(196,154,75,0.12) 41%, transparent 60%) 0 22px / 20px 8px repeat-x;
  opacity: 0.6;
}

.thanks-title {
  font-size: 24px;
  color: var(--red-dark);
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 18px;
}

.thanks-text {
  font-size: 14px;
  color: var(--brown-light);
  line-height: 2.1;
  padding: 0 10px;
}

.thanks-sign {
  margin-top: 28px;
  font-size: 20px;
  color: var(--red-dark);
  font-weight: 700;
  letter-spacing: 6px;
}

/* ========================================
   音乐控制图标
   ======================================== */
.music-btn {
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(204,58,78,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(196,154,75,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  transition: all 0.35s;
  animation: musicRing 3s ease-in-out infinite;
}

@keyframes musicRing {
  0%, 100% { box-shadow: 0 4px 18px rgba(0,0,0,0.12), 0 0 0 0 rgba(204,58,78,0.2); }
  50% { box-shadow: 0 4px 18px rgba(0,0,0,0.12), 0 0 0 8px rgba(204,58,78,0); }
}

.music-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--gold);
}

.music-btn.muted {
  background: rgba(160,45,62,0.55);
  animation: none;
}

.music-btn.muted svg { fill: #ccc; }

.music-btn.muted::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 24px;
  background: #ccc;
  border-radius: 1px;
  transform: rotate(-45deg);
}

/* ========================================
   离线模式提示
   ======================================== */
.offline-hint {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  font-size: 11px;
  color: var(--brown-light);
  background: rgba(255,250,245,0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 14px;
  border-radius: 10px;
  display: none;
  letter-spacing: 1px;
  border: 1px solid rgba(196,154,75,0.15);
}

.offline-hint.show { display: block; }

/* ========================================
   Generate 页面
   ======================================== */
.gen-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(145deg, var(--red-dark), var(--red));
}

.gen-card {
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.gen-title {
  font-size: 20px;
  color: var(--red-dark);
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.gen-subtitle {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 24px;
}

.gen-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid rgba(196,154,75,0.35);
  border-radius: 14px;
  font-size: 16px;
  text-align: center;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 16px;
}

.gen-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,154,75,0.08);
}

.gen-result {
  margin-top: 20px;
  display: none;
}

.gen-result.show { display: block; }

.gen-link-box {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 16px;
  word-break: break-all;
  font-size: 13px;
  color: var(--red-dark);
  margin-bottom: 14px;
  border: 1px solid rgba(196,154,75,0.2);
}

.gen-copy-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--gold), #A07E30);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(196,154,75,0.25);
}

.gen-copy-btn:active { transform: scale(0.97); }

.gen-copied {
  display: none;
  font-size: 12px;
  color: #2E7D32;
  margin-top: 8px;
}

.gen-copied.show { display: block; }

.gen-back {
  margin-top: 24px;
  color: var(--cream);
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* ========================================
   Admin 页面
   ======================================== */
.admin-page {
  min-height: 100vh;
  padding: 40px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.admin-header { text-align: center; margin-bottom: 24px; }

.admin-header h1 {
  font-size: 20px;
  color: var(--red-dark);
  letter-spacing: 2px;
}

.admin-login {
  text-align: center;
  padding: 60px 20px;
}

.admin-login input {
  padding: 12px 18px;
  border: 1.5px solid rgba(196,154,75,0.35);
  border-radius: var(--radius-sm);
  font-size: 15px;
  text-align: center;
  outline: none;
  margin-bottom: 12px;
  width: 200px;
  font-family: inherit;
}

.admin-blessing-list { margin-top: 20px; }

.admin-blessing-item {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.admin-blessing-info { flex: 1; }

.admin-blessing-nickname {
  font-size: 14px;
  color: var(--gold);
  font-weight: bold;
}

.admin-blessing-msg {
  font-size: 14px;
  color: var(--brown);
  margin-top: 4px;
}

.admin-blessing-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.admin-delete-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}

.admin-total {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 12px;
}

.admin-logout { margin-top: 20px; text-align: center; }

.admin-logout button {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

/* ========================================
   响应式适配
   ======================================== */
@media (min-width: 481px) {
  .heart-container { max-width: 400px; }
  .stacked-container { max-width: 380px; margin: 0 auto; }
  .carousel-container { max-height: 70vh; }
  .detail-map { height: 240px; }
}

@media (min-width: 769px) {
  .container { max-width: 600px; }
  .heart-container { max-width: 440px; }
  .envelope-card { max-width: 440px; padding: 50px 42px; }
  .detail-map { height: 260px; }
}

/* ========================================
   动画辅助
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 漂浮装饰动画（可用于 JS 动态添加的元素） */
@keyframes floatDecor {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(2deg); }
  75% { transform: translateY(6px) rotate(-1deg); }
}

/* ========================================
   喜庆特效
   ======================================== */

/* ---- 撒花粒子容器 ---- */
.confetti-container {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  animation: confettiFall 2.5s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  20% { opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.3); opacity: 0; }
}

/* ---- 祝福绽放爱心粒子 ---- */
.burst-container {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
}

.burst-particle {
  position: absolute;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  animation: burstFly 1.2s ease-out forwards;
}

@keyframes burstFly {
  0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--bx), var(--by)) scale(1.2); opacity: 0; }
}

/* ========================================
   重构新增：Hero 主视觉 / heart-header / carousel-overlay
   （补充 8cf5420 基版未覆盖的 HTML 类名）
   ======================================== */

/* ---- Hero 主视觉（替换旧 invite-section） ---- */
.hero-section {
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
}

.hero-section::after {
  content: '';
  display: block;
  margin: 24px auto 0;
  width: 100%;
  max-width: 320px;
  height: 24px;
  background:
    radial-gradient(circle at 50% 50%, var(--gold) 1.5px, transparent 1.5px) 0 50% / 8px 8px repeat-x,
    radial-gradient(circle at 50% 50%, var(--red-light) 1px, transparent 1px) 4px 50% / 8px 8px repeat-x;
  opacity: 0.45;
}

.hero-badge { margin-bottom: 28px; }
.hero-badge svg { width: 52px; height: 52px; }

.hero-names {
  font-size: 40px;
  font-weight: 700;
  color: var(--red-dark);
  letter-spacing: 8px;
  margin-bottom: 28px;
  line-height: 1.3;
}

.hero-names .ampersand {
  color: var(--gold);
  font-family: var(--font-en);
  font-style: italic;
  font-weight: normal;
  font-size: 1.2em;
  margin: 0 14px;
}

.hero-date {
  font-size: 17px;
  color: var(--red);
  letter-spacing: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-date-line {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.hero-lunar {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 28px;
}

.hero-invite {
  font-size: 17px;
  color: var(--red-dark);
  line-height: 2.4;
  letter-spacing: 4px;
  margin-bottom: 28px;
}

.hero-divider {
  font-size: 18px;
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: 28px;
}

.hero-message {
  font-size: 14px;
  color: var(--brown-light);
  line-height: 2.2;
  margin-bottom: 40px;
  padding: 0 16px;
  letter-spacing: 1px;
}

/* ---- heart-header（替换旧 section-title / section-subtitle） ---- */
.heart-header { text-align: center; margin-bottom: 24px; }

.heart-header-couplet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.heart-header-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
}

.heart-header-main {
  font-size: 19px;
  color: var(--red);
  font-weight: bold;
  letter-spacing: 5px;
}

.heart-header-divider { font-size: 14px; color: var(--gold); }

.heart-header-desc {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 2px;
  text-align: center;
}

/* ---- Carousel 杂志风叠加层 ---- */
.carousel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px 24px;
  background: linear-gradient(0deg, rgba(0,0,0,0.45) 0%, transparent 50%);
  z-index: 2;
}

.carousel-overlay-text {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 5px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.carousel-overlay-en {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 4px;
  margin-top: 8px;
}

/* ---- Countdown 冒号分隔 ---- */
.countdown-sep {
  font-size: 22px;
  color: var(--gold);
  opacity: 0.5;
  font-weight: 300;
  margin-top: -8px;
}

/* ---- 故事墙 S 曲线 + 副文案 ---- */
.waterfall-wrap { position: relative; }

.story-s-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.story-text-sub {
  font-size: 15px;
  color: var(--red);
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  margin-bottom: 6px;
}

/* ---- 详情区间距 ---- */
.details-grid { gap: 16px; }

/* ---- 感谢区底部留白 ---- */
.thanks-section { padding-bottom: 70px; }

/* 倒计时数字跳动 */
@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.countdown-num.pop { animation: popIn 0.3s ease; }
