@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-red: #c41e3a;
  --color-red-dark: #8b1538;
  --color-gold: #d4af37;
  --color-gold-light: #f5e6a8;
  --color-gold-shine: #ffeaa0;
  --color-cream: #fff8f0;
  --color-blush: #ffe4e1;
  --color-text: #4a2c2a;
  --color-text-light: #8b6b6b;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-display: 'Cormorant Garamond', 'Noto Serif SC', serif;
  --shadow-soft: 0 8px 32px rgba(139, 21, 56, 0.12);
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.35);
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-serif);
  background: var(--color-cream);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

.hidden {
  display: none !important;
}

/* ========== 音乐按钮 ========== */
.music-btn {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1000;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 235, 0.9));
  color: var(--color-red);
  box-shadow:
    0 4px 18px rgba(139, 21, 56, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s, background 0.35s, color 0.35s;
}

.music-btn::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.75);
  pointer-events: none;
}

.music-btn__ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.45);
  opacity: 0;
  pointer-events: none;
}

.music-btn__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.music-btn__icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.music-btn:active {
  transform: scale(0.92);
}

.music-btn.is-playing {
  color: #fff;
  background: linear-gradient(145deg, var(--color-red), var(--color-red-dark));
  box-shadow:
    0 4px 20px rgba(196, 30, 58, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.music-btn.is-playing::before {
  border-color: rgba(255, 215, 160, 0.55);
}

.music-btn.is-playing .music-btn__ring {
  animation: musicRing 2.4s ease-out infinite;
}

.music-btn.is-playing .music-btn__ring--delay {
  animation-delay: 1.2s;
}

@keyframes musicRing {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.music-waves {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 22px;
  padding: 0 2px;
}

.music-waves i {
  display: block;
  width: 4px;
  background: currentColor;
  border-radius: 4px;
  transform-origin: center bottom;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 2px rgba(255, 255, 255, 0.6);
  animation: musicWave 0.65s ease-in-out infinite alternate;
}

.music-waves i:nth-child(1) { height: 8px; animation-delay: 0s; }
.music-waves i:nth-child(2) { height: 18px; animation-delay: 0.12s; }
.music-waves i:nth-child(3) { height: 12px; animation-delay: 0.24s; }
.music-waves i:nth-child(4) { height: 20px; animation-delay: 0.36s; }

@keyframes musicWave {
  from {
    transform: scaleY(0.35);
    opacity: 0.75;
  }
  to {
    transform: scaleY(1.15);
    opacity: 1;
  }
}

.music-btn.is-playing .music-waves i {
  background: #fff;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 4px rgba(255, 255, 255, 0.7);
}

.music-btn--toolbar {
  position: relative;
  top: auto;
  right: auto;
  flex-shrink: 0;
}

/* ========== 开屏 ========== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #1a0a0e;
  transition: opacity 0.8s, visibility 0.8s;
}

.cover__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translate3d(0, 0, 0) scale(1.04);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: coverKenBurns 18s ease-in-out infinite alternate;
}

@keyframes coverKenBurns {
  from { transform: translate3d(0, 0, 0) scale(1.04); }
  to { transform: translate3d(0, 0, 0) scale(1.1); }
}

.cover__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 10, 14, 0.12) 0%,
    rgba(26, 10, 14, 0.05) 40%,
    rgba(26, 10, 14, 0.45) 72%,
    rgba(26, 10, 14, 0.78) 100%
  );
}

.cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover__petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  contain: strict;
}

.cover.is-hidden .cover__bg,
.cover.is-hidden .petal,
.cover.is-hidden .petal__shape {
  animation-play-state: paused;
}

.main.hidden .carousel__slide,
.main.hidden .carousel__shine,
.main.hidden .carousel__text,
.main.hidden .carousel__progress-bar,
.main.hidden .carousel__img-wrap img {
  animation-play-state: paused;
}

body.is-tab-hidden .cover__bg,
body.is-tab-hidden .petal,
body.is-tab-hidden .petal__shape,
body.is-tab-hidden .carousel__slide,
body.is-tab-hidden .carousel__shine,
body.is-tab-hidden .carousel__text,
body.is-tab-hidden .carousel__progress-bar,
body.is-tab-hidden .carousel__img-wrap img,
body.is-tab-hidden .meteor,
body.is-tab-hidden .meteor-star,
body.is-tab-hidden .firework,
body.is-tab-hidden .firework__particle {
  animation-play-state: paused;
}

.petal {
  --petal-size: 14px;
  --peak-opacity: 0.75;
  --drift: 20px;
  --sway: 12px;
  --tilt: 10deg;
  --spin: 540deg;
  --sway-duration: 3.2s;
  position: absolute;
  top: -8%;
  width: var(--petal-size);
  height: calc(var(--petal-size) * 1.2);
  opacity: 0;
  animation: petalDrop var(--duration, 10s) var(--delay, 0s) linear infinite;
}

.petal__shape {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  animation: petalSway var(--sway-duration, 3.2s) var(--sway-delay, 0s) ease-in-out infinite;
}

.petal__shape::before,
.petal__shape::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50% 0 55% 50%;
  transform-origin: center bottom;
}

.petal__shape::before {
  background: var(--petal-color, rgba(255, 200, 210, 0.75));
  box-shadow:
    inset 2px -1px 8px rgba(255, 255, 255, 0.45),
    inset -1px 2px 6px rgba(196, 30, 58, 0.08),
    0 2px 10px rgba(196, 30, 58, 0.15);
}

.petal__shape::after {
  inset: 12% 18% 28% 8%;
  border-radius: 50% 0 60% 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  opacity: 0.85;
}

.petal--rose { --petal-color: rgba(255, 145, 170, 0.88); }
.petal--blush { --petal-color: rgba(255, 218, 228, 0.92); }
.petal--gold { --petal-color: rgba(255, 200, 140, 0.82); }
.petal--cream { --petal-color: rgba(255, 248, 250, 0.85); }
.petal--festive { --petal-color: rgba(220, 60, 80, 0.78); }

.petal--sm { --petal-size: 9px; }
.petal--md { --petal-size: 14px; }
.petal--lg { --petal-size: 22px; }

.petal--soft {
  filter: blur(0.8px);
}

.petal--soft .petal__shape {
  animation-name: petalSwaySoft;
}

.petal--flutter .petal__shape {
  animation-name: petalSwayFlutter;
}

.petal--sparkle {
  --petal-size: 5px;
  width: var(--petal-size);
  height: var(--petal-size);
}

.petal--sparkle .petal__shape::before {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 200, 1) 0%, rgba(255, 215, 140, 0.5) 55%, transparent 100%);
  box-shadow:
    0 0 8px rgba(255, 215, 140, 0.9),
    0 0 16px rgba(255, 180, 100, 0.4);
  animation: sparkleTwinkle 1.8s ease-in-out infinite;
}

.petal--sparkle .petal__shape::after {
  display: none;
}

@keyframes petalDrop {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
    opacity: 0;
  }
  5% { opacity: var(--peak-opacity); }
  90% { opacity: var(--peak-opacity); }
  100% {
    transform: translate3d(var(--drift), 108vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@keyframes petalSway {
  0% {
    transform: translateX(0) rotate(0deg) scale(0.88);
  }
  25% {
    transform: translateX(var(--sway)) rotate(var(--tilt)) scale(0.93);
  }
  50% {
    transform: translateX(0) rotate(0deg) scale(0.95);
  }
  75% {
    transform: translateX(calc(var(--sway) * -1)) rotate(calc(var(--tilt) * -1)) scale(0.9);
  }
  100% {
    transform: translateX(0) rotate(0deg) scale(0.88);
  }
}

@keyframes petalSwaySoft {
  0% {
    transform: translateX(0) rotate(0deg) scale(0.9);
  }
  33% {
    transform: translateX(calc(var(--sway) * 0.85)) rotate(calc(var(--tilt) * 0.7)) scale(0.94);
  }
  66% {
    transform: translateX(calc(var(--sway) * -0.75)) rotate(calc(var(--tilt) * -0.6)) scale(0.92);
  }
  100% {
    transform: translateX(0) rotate(0deg) scale(0.9);
  }
}

@keyframes petalSwayFlutter {
  0% {
    transform: translateX(calc(var(--sway) * -0.35)) rotate(calc(var(--tilt) * -0.8)) scale(0.86);
  }
  20% {
    transform: translateX(calc(var(--sway) * 0.95)) rotate(var(--tilt)) scale(0.94);
  }
  45% {
    transform: translateX(calc(var(--sway) * -0.2)) rotate(calc(var(--tilt) * -0.3)) scale(0.96);
  }
  70% {
    transform: translateX(calc(var(--sway) * -0.9)) rotate(calc(var(--tilt) * -1)) scale(0.9);
  }
  100% {
    transform: translateX(calc(var(--sway) * 0.35)) rotate(calc(var(--tilt) * 0.8)) scale(0.86);
  }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.cover__content {
  width: 100%;
  text-align: center;
  color: #fff;
  padding: 48px 24px calc(36px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 3;
}

.cover__content.is-enter .cover__tag {
  animation: coverFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.cover__content.is-enter .cover__name {
  animation: coverNameIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cover__content.is-enter #groomName { animation-delay: 0.3s; }
.cover__content.is-enter #brideName { animation-delay: 0.55s; }

.cover__content.is-enter .cover__and {
  animation:
    coverAndIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.42s both,
    coverAndGlow 2.8s ease-in-out 1.4s infinite;
}

.cover__content.is-enter .cover__subtitle {
  animation: coverFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

.cover__content.is-enter .cover__info {
  animation: coverInfoIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

.cover__content.is-enter .cover__open {
  animation:
    coverFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 1s both,
    coverBtnFloat 3.2s ease-in-out 2.2s infinite,
    coverBtnGlow 2.4s ease-in-out 2s infinite;
}

@keyframes coverFadeUp {
  from {
    opacity: 0;
    transform: translateY(36px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes coverNameIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.88);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes coverAndIn {
  from {
    opacity: 0;
    transform: scale(0) rotate(-120deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes coverAndGlow {
  0%, 100% {
    text-shadow: 0 0 6px rgba(255, 215, 160, 0.35);
  }
  50% {
    text-shadow:
      0 0 14px rgba(255, 215, 160, 0.9),
      0 0 24px rgba(255, 180, 120, 0.35);
  }
}

@keyframes coverInfoIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

@keyframes coverBtnFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes coverBtnGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(139, 21, 56, 0.35); }
  50% { box-shadow: 0 6px 28px rgba(196, 30, 58, 0.6); }
}

.cover__tag {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 20px;
  font-style: italic;
}

.cover__title {
  font-size: clamp(32px, 9vw, 48px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 20px;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.25em;
  white-space: nowrap;
  letter-spacing: 4px;
}

.cover__name {
  display: inline-block;
  background: linear-gradient(180deg, #fff 30%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cover__and {
  display: inline-block;
  margin: 0 10px;
  color: var(--color-gold-light);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.75em;
  text-shadow: 0 0 20px rgba(255, 215, 160, 0.5);
}

.cover__subtitle {
  font-size: 16px;
  opacity: 0.92;
  margin-bottom: 24px;
  letter-spacing: 3px;
  font-weight: 400;
}

.cover__info {
  width: min(100%, 320px);
  margin: 0 auto 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cover__info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}

.cover__info-item + .cover__info-item {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cover__info-label {
  flex-shrink: 0;
  min-width: 36px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--color-gold-light);
  opacity: 0.95;
}

.cover__info-value {
  flex: 1;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.cover__open {
  padding: 14px 48px;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(139, 21, 56, 0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}

.cover__open:active {
  transform: scale(0.97) !important;
}

/* 邀请函风格选择（仅影响开启后的页面，不改变开屏视觉） */
.cover__theme-picker {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cover__theme-label {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.65;
  margin-bottom: 10px;
}

.cover__theme-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cover__theme-btn {
  padding: 6px 14px;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.2s;
}

.cover__theme-btn.is-active {
  color: #fff;
  background: rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.cover__theme-btn:active {
  transform: scale(0.96);
}

/* ========== 开屏 · 浪漫星辰主题 ========== */
body.theme-romantic .cover {
  background: #120818;
}

body.theme-romantic .cover__overlay {
  background: linear-gradient(
    to bottom,
    rgba(18, 8, 24, 0.15) 0%,
    rgba(26, 18, 40, 0.08) 40%,
    rgba(26, 18, 40, 0.5) 72%,
    rgba(18, 8, 28, 0.82) 100%
  );
}

body.theme-romantic .cover__tag {
  color: rgba(240, 208, 224, 0.9);
  text-shadow: 0 0 12px rgba(212, 160, 184, 0.35);
}

body.theme-romantic .cover__title {
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(212, 160, 184, 0.2);
}

body.theme-romantic .cover__name {
  background: linear-gradient(180deg, #fff 25%, #f0d0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.theme-romantic .cover__and {
  color: #f0d0e0;
  text-shadow: 0 0 20px rgba(212, 160, 184, 0.55);
}

body.theme-romantic .cover__content.is-enter .cover__and {
  animation:
    coverAndIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.42s both,
    coverAndGlowRomantic 2.8s ease-in-out 1.4s infinite;
}

@keyframes coverAndGlowRomantic {
  0%, 100% { text-shadow: 0 0 6px rgba(240, 208, 224, 0.35); }
  50% {
    text-shadow:
      0 0 14px rgba(240, 208, 224, 0.9),
      0 0 24px rgba(212, 160, 184, 0.4);
  }
}

body.theme-romantic .cover__subtitle {
  color: rgba(255, 248, 255, 0.92);
}

body.theme-romantic .cover__info {
  background: rgba(58, 38, 72, 0.35);
  border-color: rgba(212, 160, 184, 0.28);
}

body.theme-romantic .cover__info-item + .cover__info-item {
  border-top-color: rgba(212, 160, 184, 0.15);
}

body.theme-romantic .cover__info-label {
  color: #f0d0e0;
}

body.theme-romantic .cover__open {
  background: linear-gradient(135deg, #c47a9a, #8b4a6b);
  box-shadow: 0 4px 20px rgba(139, 74, 107, 0.45);
}

body.theme-romantic .cover__content.is-enter .cover__open {
  animation:
    coverFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 1s both,
    coverBtnFloat 3.2s ease-in-out 2.2s infinite,
    coverBtnGlowRomantic 2.4s ease-in-out 2s infinite;
}

@keyframes coverBtnGlowRomantic {
  0%, 100% { box-shadow: 0 4px 20px rgba(139, 74, 107, 0.4); }
  50% { box-shadow: 0 6px 28px rgba(196, 122, 154, 0.65); }
}

body.theme-romantic .cover__theme-picker {
  border-top-color: rgba(212, 160, 184, 0.18);
}

body.theme-romantic .cover__theme-label {
  color: rgba(240, 208, 224, 0.7);
}

body.theme-romantic .cover__theme-btn {
  color: rgba(255, 248, 255, 0.85);
  background: rgba(58, 38, 72, 0.35);
  border-color: rgba(212, 160, 184, 0.25);
}

body.theme-romantic .cover__theme-btn.is-active {
  color: #fff;
  background: rgba(212, 160, 184, 0.28);
  border-color: rgba(212, 160, 184, 0.6);
  box-shadow: 0 0 14px rgba(212, 160, 184, 0.25);
}

body.theme-classic .cover__theme-btn.is-active {
  color: #fff;
  background: rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

body.theme-romantic .petal__shape::before {
  box-shadow:
    inset 2px -1px 8px rgba(255, 255, 255, 0.4),
    inset -1px 2px 6px rgba(139, 74, 107, 0.1),
    0 2px 10px rgba(139, 74, 107, 0.18);
}

.petal--lilac { --petal-color: rgba(210, 170, 230, 0.88); }
.petal--violet { --petal-color: rgba(185, 145, 215, 0.85); }
.petal--starlight { --petal-color: rgba(235, 215, 255, 0.9); }
.petal--moonlight { --petal-color: rgba(200, 180, 240, 0.82); }

.petal--sparkle-romantic .petal__shape::before {
  background: radial-gradient(circle, rgba(245, 230, 255, 1) 0%, rgba(210, 170, 230, 0.5) 55%, transparent 100%);
  box-shadow:
    0 0 8px rgba(212, 160, 184, 0.9),
    0 0 16px rgba(180, 140, 220, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .cover__bg,
  .petal,
  .petal__shape,
  .cover__content.is-enter .cover__tag,
  .cover__content.is-enter .cover__name,
  .cover__content.is-enter .cover__and,
  .cover__content.is-enter .cover__subtitle,
  .cover__content.is-enter .cover__info,
  .cover__content.is-enter .cover__open,
  .carousel__slide,
  .carousel__shine,
  .carousel__text,
  .carousel__img-wrap img,
  .invite__slide .text-slide__item,
  .meteor,
  .meteor-star,
  .firework,
  .firework__particle {
    animation: none !important;
    transition: opacity 0.3s ease !important;
  }

  .meteor,
  .meteor-star,
  .firework {
    opacity: 0 !important;
  }

  .cover__bg {
    transform: scale(1.04);
  }

  .carousel__slide {
    transform: translateZ(0);
  }

  .carousel__progress-bar {
    transform: none;
    width: 100%;
  }
}

/* ========== 主内容 ========== */
.main {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-cream);
}

.main__body {
  position: relative;
  z-index: 1;
}

.main__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 4px;
  max-width: 480px;
  margin: 0 auto;
}

.main__toolbar__music {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 48px;
  min-height: 48px;
}

.toolbar-btn {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 235, 0.9));
  color: var(--color-red);
  box-shadow:
    0 4px 18px rgba(139, 21, 56, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s, background 0.35s, color 0.35s;
  flex-shrink: 0;
}

.toolbar-btn::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  pointer-events: none;
}

.toolbar-btn__icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.toolbar-btn:active {
  transform: scale(0.92);
}

/* ========== 轮播 ========== */
.hero {
  position: relative;
  padding: 0;
  background: var(--color-cream);
}

.carousel {
  position: relative;
  width: 100%;
  height: min(78vh, 133.33vw);
  overflow: hidden;
  background: #0d0508;
  border-radius: 0;
  box-shadow:
    0 12px 48px rgba(139, 21, 56, 0.28),
    inset 0 0 80px rgba(0, 0, 0, 0.15);
  contain: layout style paint;
  isolation: isolate;
}

.carousel__track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateZ(0);
  transition: none;
  pointer-events: none;
  z-index: 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.carousel__slide.is-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.carousel__slide.is-entering {
  z-index: 3;
  transition: none;
  animation: slideCrossfadeIn 0.85s ease forwards;
}

.carousel__slide.is-leaving {
  z-index: 2;
  transition: none;
  animation: slideCrossfadeOut 0.85s ease forwards;
  pointer-events: none;
}

.carousel__slide.is-leaving .carousel__img-wrap img {
  animation-play-state: paused;
}

@keyframes slideCrossfadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideCrossfadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.carousel__img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0508;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.carousel__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, 0, 0) scale(1.08);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.carousel__slide.is-active .carousel__img-wrap.ken-burns--in img {
  animation: kenBurnsIn 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.carousel__slide.is-active .carousel__img-wrap.ken-burns--out img {
  animation: kenBurnsOut 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.carousel__slide.is-active .carousel__img-wrap.ken-burns--left img {
  animation: kenBurnsLeft 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.carousel__slide.is-active .carousel__img-wrap.ken-burns--right img {
  animation: kenBurnsRight 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.carousel__slide:not(.is-active) .carousel__img-wrap img {
  animation: none;
  transform: translate3d(0, 0, 0) scale(1.08);
}

@keyframes kenBurnsIn {
  from { transform: translate3d(0, 0, 0) scale(1.08); }
  to { transform: translate3d(0, 0, 0) scale(1.02); }
}

@keyframes kenBurnsOut {
  from { transform: translate3d(0, 0, 0) scale(1.02); }
  to { transform: translate3d(0, 0, 0) scale(1.1); }
}

@keyframes kenBurnsLeft {
  from { transform: translate3d(2%, 0, 0) scale(1.08); }
  to { transform: translate3d(-1.5%, 0, 0) scale(1.04); }
}

@keyframes kenBurnsRight {
  from { transform: translate3d(-2%, 0, 0) scale(1.08); }
  to { transform: translate3d(1.5%, 0, 0) scale(1.04); }
}

.carousel__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse at center, transparent 60%, rgba(13, 5, 8, 0.1) 100%),
    linear-gradient(
      to top,
      rgba(13, 5, 8, 0.28) 0%,
      rgba(74, 44, 42, 0.08) 18%,
      transparent 48%
    );
  pointer-events: none;
}

.carousel__shine {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(255, 235, 200, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 52%,
    transparent 65%
  );
  background-size: 250% 100%;
  animation: shineMove 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shineMove {
  0%, 100% { background-position: 250% 0; }
  50% { background-position: -250% 0; }
}

.carousel__frame {
  position: absolute;
  inset: 14px;
  z-index: 5;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 2px;
  pointer-events: none;
  box-shadow:
    inset 0 0 40px rgba(212, 175, 55, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.carousel__frame::before,
.carousel__frame::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--color-gold);
  border-style: solid;
  opacity: 0.65;
}

.carousel__frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.carousel__frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.carousel__caption {
  position: absolute;
  bottom: 56px;
  left: 16px;
  right: 16px;
  z-index: 6;
  text-align: center;
  color: #fff;
}

.carousel__caption-panel {
  position: relative;
  display: inline-block;
  width: min(100%, 360px);
  padding: 8px 12px 10px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  backdrop-filter: blur(1.5px) saturate(1.05);
  -webkit-backdrop-filter: blur(1.5px) saturate(1.05);
  box-shadow: none;
}

.carousel__text-slide {
  min-height: 2.6em;
}

.carousel__text {
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1.4;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    var(--color-gold-light) 45%,
    var(--color-gold-shine) 70%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 4s ease-in-out infinite;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.35));
}

@keyframes textShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ========== 文字左右切换 ========== */
.text-slide {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.text-slide__track {
  position: relative;
  width: 100%;
  min-height: 1.6em;
}

.text-slide__item {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0;
  white-space: nowrap;
  text-align: center;
  transform: translateY(-50%);
}

.text-slide__item.is-out-left {
  animation: textOutUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.text-slide__item.is-out-right {
  animation: textOutDown 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.text-slide__item.is-in-right {
  animation: textInFromBelow 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.text-slide__item.is-in-left {
  animation: textInFromAbove 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes textOutUp {
  from {
    transform: translateY(-50%) translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
  to {
    transform: translateY(-50%) translateY(-24px) scale(0.92);
    opacity: 0;
    filter: blur(4px);
  }
}

@keyframes textOutDown {
  from {
    transform: translateY(-50%) translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
  to {
    transform: translateY(-50%) translateY(24px) scale(0.92);
    opacity: 0;
    filter: blur(4px);
  }
}

@keyframes textInFromBelow {
  from {
    transform: translateY(-50%) translateY(28px) scale(0.9);
    opacity: 0;
    filter: blur(6px);
  }
  to {
    transform: translateY(-50%) translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes textInFromAbove {
  from {
    transform: translateY(-50%) translateY(-28px) scale(0.9);
    opacity: 0;
    filter: blur(6px);
  }
  to {
    transform: translateY(-50%) translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

.carousel__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 7;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.carousel__progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-shine), var(--color-gold-light));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
}

.carousel__dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.carousel__dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition:
    width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.35s,
    border-color 0.35s,
    box-shadow 0.35s;
}

.carousel__dot.is-active {
  width: 28px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

/* ========== 通用区块 ========== */
.section {
  padding: 20px 16px;
  text-align: center;
}

.section.content {
  padding: 8px 16px 32px;
}

/* ========== 文字卡片 ========== */
.section-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow:
    0 10px 40px rgba(139, 21, 56, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.section-card__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}

.section-card__fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  contain: strict;
  isolation: isolate;
}

/* ========== 浪漫星辰 · 流星雨 ========== */
.meteor {
  --meteor-head: rgba(255, 230, 180, 0.95);
  --meteor-glow: rgba(255, 215, 140, 0.55);
  --meteor-tail-color: rgba(255, 210, 150, 0.55);
  --meteor-tail: 80px;
  --meteor-tilt: -28deg;
  --meteor-drift: 160px;
  --peak-opacity: 0.85;
  position: absolute;
  top: var(--meteor-top, -5%);
  left: var(--meteor-left, 0);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--meteor-head);
  box-shadow:
    0 0 8px 2px var(--meteor-glow),
    0 0 18px 3px rgba(255, 255, 255, 0.25);
  opacity: 0;
  animation: meteorShoot var(--duration, 7s) var(--delay, 0s) linear infinite;
}

.meteor::before {
  content: '';
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  height: var(--meteor-tail);
  margin-left: -1px;
  transform-origin: center bottom;
  transform: rotate(var(--meteor-tilt));
  background: linear-gradient(to top, var(--meteor-head) 0%, var(--meteor-tail-color) 35%, transparent 100%);
  border-radius: 2px;
  filter: blur(0.5px);
}

.meteor--gold {
  --meteor-head: rgba(240, 208, 224, 0.95);
  --meteor-glow: rgba(212, 160, 184, 0.65);
  --meteor-tail-color: rgba(220, 170, 200, 0.55);
}

.meteor--rose {
  --meteor-head: rgba(255, 200, 220, 0.92);
  --meteor-glow: rgba(196, 122, 154, 0.55);
  --meteor-tail-color: rgba(255, 170, 200, 0.5);
}

.meteor--light {
  --meteor-head: rgba(255, 248, 255, 0.95);
  --meteor-glow: rgba(220, 200, 240, 0.5);
  --meteor-tail-color: rgba(240, 220, 255, 0.4);
}

.meteor--sm { --meteor-tail: 60px; width: 3px; height: 3px; }
.meteor--md { --meteor-tail: 90px; }
.meteor--lg { --meteor-tail: 120px; width: 5px; height: 5px; }

.meteor--soft {
  --peak-opacity: 0.65;
  filter: blur(0.3px);
}

@keyframes meteorShoot {
  0% {
    opacity: 0;
    transform: translate3d(0, -5vh, 0);
  }
  4% { opacity: var(--peak-opacity); }
  65% { opacity: calc(var(--peak-opacity) * 0.55); }
  100% {
    opacity: 0;
    transform: translate3d(var(--meteor-drift), 105vh, 0);
  }
}

.meteor-star {
  position: absolute;
  width: var(--star-size, 3px);
  height: var(--star-size, 3px);
  border-radius: 50%;
  background: rgba(255, 248, 255, 0.95);
  box-shadow:
    0 0 6px 2px rgba(212, 160, 184, 0.7),
    0 0 14px 3px rgba(240, 220, 255, 0.35);
  animation: meteorStarTwinkle var(--duration, 3s) var(--delay, 0s) ease-in-out infinite;
}

.meteor-star::before,
.meteor-star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.meteor-star::before {
  width: var(--star-size, 3px);
  height: 1px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.meteor-star::after {
  width: 1px;
  height: var(--star-size, 3px);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.meteor-star--lg {
  --star-size: 4px;
  box-shadow:
    0 0 8px 3px rgba(212, 160, 184, 0.8),
    0 0 18px 4px rgba(240, 220, 255, 0.45);
}

@keyframes meteorStarTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ========== 典雅喜庆 · 烟花 ========== */
.firework {
  --fw-color: rgba(255, 220, 140, 0.95);
  --fw-core: rgba(255, 230, 160, 1);
  --fw-glow: rgba(212, 175, 55, 0.65);
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
}

.firework::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--fw-core);
  box-shadow:
    0 0 20px 6px var(--fw-glow),
    0 0 40px 12px rgba(255, 255, 255, 0.25);
  opacity: 0;
  animation: fireworkCore var(--duration, 10s) var(--delay, 0s) ease-out infinite;
}

.firework__particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--fw-color);
  box-shadow:
    0 0 8px 2px var(--fw-glow),
    0 0 14px 3px rgba(255, 255, 255, 0.18);
  opacity: 0;
  animation:
    fireworkMove var(--duration, 10s) calc(var(--delay, 0s) + var(--particle-delay, 0s)) cubic-bezier(0.16, 0.84, 0.28, 1) infinite,
    fireworkFade var(--duration, 10s) calc(var(--delay, 0s) + var(--particle-delay, 0s)) linear infinite;
}

.firework__particle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: var(--trail, 32px);
  transform-origin: center top;
  transform: translate(-50%, 0) rotate(var(--trail-angle, 180deg));
  background: linear-gradient(to bottom, var(--fw-color) 0%, rgba(255, 255, 255, 0.12) 45%, transparent 100%);
  opacity: 0.7;
  border-radius: 1px;
}

.firework--gold {
  --fw-color: rgba(255, 220, 140, 0.95);
  --fw-core: rgba(255, 240, 180, 1);
  --fw-glow: rgba(212, 175, 55, 0.65);
}

.firework--red {
  --fw-color: rgba(255, 100, 110, 0.92);
  --fw-core: rgba(255, 160, 165, 0.98);
  --fw-glow: rgba(196, 30, 58, 0.55);
}

.firework--coral {
  --fw-color: rgba(255, 155, 110, 0.92);
  --fw-core: rgba(255, 195, 150, 0.98);
  --fw-glow: rgba(255, 120, 70, 0.48);
}

@keyframes fireworkCore {
  0%, 3% {
    opacity: 0;
    transform: scale(0);
  }
  14% {
    opacity: 0.75;
    transform: scale(0.85);
  }
  28% {
    opacity: 0.55;
    transform: scale(1.8);
  }
  42%, 100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@keyframes fireworkMove {
  0% {
    transform: translate3d(0, 0, 0) scale(0.15);
  }
  40% {
    transform: translate3d(var(--burst-x), var(--burst-y), 0) scale(0.72);
  }
  100% {
    transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(0.2);
  }
}

@keyframes fireworkFade {
  0%, 6% { opacity: 0; }
  16% { opacity: var(--peak-opacity, 0.82); }
  44% { opacity: var(--peak-opacity, 0.82); }
  100% { opacity: 0; }
}

.main.theme-classic .meteor,
.main.theme-classic .meteor-star {
  display: none;
}

.main.theme-romantic .firework {
  display: none;
}

.section-card__corner {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 1;
}

.section-card__corner::before,
.section-card__corner::after {
  content: '';
  position: absolute;
  background: var(--color-gold);
  opacity: 0.55;
}

.section-card__corner--tl { top: 10px; left: 10px; }
.section-card__corner--tl::before { top: 0; left: 0; width: 18px; height: 2px; }
.section-card__corner--tl::after { top: 0; left: 0; width: 2px; height: 18px; }

.section-card__corner--tr { top: 10px; right: 10px; }
.section-card__corner--tr::before { top: 0; right: 0; width: 18px; height: 2px; }
.section-card__corner--tr::after { top: 0; right: 0; width: 2px; height: 18px; }

.section-card__corner--bl { bottom: 10px; left: 10px; }
.section-card__corner--bl::before { bottom: 0; left: 0; width: 18px; height: 2px; }
.section-card__corner--bl::after { bottom: 0; left: 0; width: 2px; height: 18px; }

.section-card__corner--br { bottom: 10px; right: 10px; }
.section-card__corner--br::before { bottom: 0; right: 0; width: 18px; height: 2px; }
.section-card__corner--br::after { bottom: 0; right: 0; width: 2px; height: 18px; }

.section-card__content {
  position: relative;
  z-index: 2;
  padding: 32px 20px;
}

.section-card--content {
  background:
    linear-gradient(160deg, #fffaf6 0%, #fff0eb 38%, #ffe8e4 72%, #fff5f0 100%);
}

.section-card--content .section-card__pattern {
  background:
    radial-gradient(ellipse at 10% 15%, rgba(196, 30, 58, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 85%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(255, 182, 193, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(196, 30, 58, 0.06) 0%, transparent 35%);
}

.section-card--content::before {
  content: '囍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 140px;
  color: var(--color-red);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  text-shadow: 0 0 60px rgba(196, 30, 58, 0.08);
}

.section-card--content::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(196, 30, 58, 0.06) 0%, transparent 50%);
}

.section-card--content .section-card__content {
  padding: 28px 20px 24px;
}

.content-block__divider {
  height: 1px;
  margin: 20px 4px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.content-block--info .section__title {
  margin-bottom: 20px;
}

.content-block--footer {
  padding-top: 4px;
}

.section-card--invite {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 228, 225, 0.9) 100%);
}

.section-card--invite .section-card__pattern {
  background:
    radial-gradient(circle at 15% 20%, rgba(196, 30, 58, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(212, 175, 55, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 182, 193, 0.08) 0%, transparent 60%);
}

.section-card--invite::before {
  content: '囍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  color: var(--color-red);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.section-card--info {
  background:
    linear-gradient(160deg, #fff9f5 0%, #fff0eb 50%, #ffe8e4 100%);
}

.section-card--info .section-card__pattern {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(196, 30, 58, 0.08) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.06'%3E%3Cpath d='M30 30c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10zm-20 0c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.section-card--countdown {
  background:
    linear-gradient(155deg, #7a1230 0%, #a01838 45%, #c41e3a 100%);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow:
    0 12px 40px rgba(139, 21, 56, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.section-card--countdown .section-card__pattern {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.15) 0%, transparent 45%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 20px,
      rgba(255, 255, 255, 0.03) 20px,
      rgba(255, 255, 255, 0.03) 21px
    );
}

.section-card--footer {
  background:
    linear-gradient(180deg, rgba(255, 248, 240, 0.6) 0%, rgba(255, 228, 225, 0.85) 100%);
  border-color: rgba(212, 175, 55, 0.35);
}

.section-card--footer .section-card__pattern {
  background:
    radial-gradient(circle at 30% 40%, rgba(196, 30, 58, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
}

.section-card--footer .section-card__content {
  padding: 28px 20px;
}

.section__ornament {
  font-size: 36px;
  color: var(--color-red);
  margin-bottom: 8px;
  opacity: 0.9;
  animation: ornamentFloat 3s ease-in-out infinite;
  text-shadow: 0 2px 12px rgba(196, 30, 58, 0.15);
}

@keyframes ornamentFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}

.section__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-red-dark);
  margin-bottom: 28px;
  letter-spacing: 8px;
  position: relative;
  display: inline-block;
}

.section__title::before {
  content: '— ';
  color: var(--color-gold);
  opacity: 0.6;
  font-weight: 400;
}

.section__title::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), var(--color-gold-light), transparent);
  margin: 12px auto 0;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.reveal.is-visible .section__title::after {
  width: 64px;
}

/* ========== 滚动渐显 ========== */
.reveal-item {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible .reveal-item,
.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.is-visible .reveal-item:nth-child(1) { transition-delay: 0.05s; }
.reveal.is-visible .reveal-item:nth-child(2) { transition-delay: 0.15s; }
.reveal.is-visible .reveal-item:nth-child(3) { transition-delay: 0.25s; }
.reveal.is-visible .reveal-item:nth-child(4) { transition-delay: 0.35s; }
.reveal.is-visible .reveal-item:nth-child(5) { transition-delay: 0.45s; }

/* ========== 邀请语 ========== */
.invite__slide {
  margin-bottom: 8px;
  padding: 22px 26px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 252, 248, 0.38) 0%, rgba(255, 240, 235, 0.32) 50%, rgba(255, 248, 242, 0.35) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.28);
  box-shadow:
    inset 0 0 24px rgba(255, 182, 193, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 20px rgba(139, 21, 56, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
  contain: layout style;
}

.invite__slide .text-slide__track {
  height: 1.8em;
  min-height: 1.8em;
  max-height: 1.8em;
  font-size: 17px;
  line-height: 1.8;
  overflow: hidden;
  contain: layout style;
}

.invite__slide .text-slide__item {
  contain: layout style;
}

.invite__slide .text-slide__item.is-out-left {
  animation: inviteTextOutUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.invite__slide .text-slide__item.is-out-right {
  animation: inviteTextOutDown 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.invite__slide .text-slide__item.is-in-right {
  animation: inviteTextInFromBelow 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.invite__slide .text-slide__item.is-in-left {
  animation: inviteTextInFromAbove 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes inviteTextOutUp {
  from {
    transform: translateY(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-50%) translateY(-14px);
    opacity: 0;
  }
}

@keyframes inviteTextOutDown {
  from {
    transform: translateY(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-50%) translateY(14px);
    opacity: 0;
  }
}

@keyframes inviteTextInFromBelow {
  from {
    transform: translateY(-50%) translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes inviteTextInFromAbove {
  from {
    transform: translateY(-50%) translateY(-14px);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateY(0);
    opacity: 1;
  }
}

.invite__slide::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 3px;
  pointer-events: none;
  z-index: 0;
}

.invite__slide::after {
  content: '囍';
  position: absolute;
  right: -6px;
  bottom: -14px;
  font-size: 72px;
  color: var(--color-red);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}

.invite__quote {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 0.6;
  color: var(--color-gold);
  opacity: 0.35;
  margin-bottom: -8px;
  text-align: left;
  padding-left: 8px;
}

.invite__quote--end {
  text-align: right;
  padding-right: 8px;
  padding-left: 0;
  margin-bottom: 16px;
  margin-top: -4px;
  transform: rotate(180deg);
}

.invite__line {
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text);
  letter-spacing: 2px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.invite__names {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-red-dark);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.2em;
  letter-spacing: 3px;
  margin-top: 8px;
}

.invite__heart {
  color: var(--color-red);
  margin: 0 12px;
  animation: heartbeat 1.2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ========== 婚礼信息 ========== */
.info__card {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 8px 20px;
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.18);
  margin-bottom: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.info__item {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  gap: 4px;
}

.info__label {
  font-size: 12px;
  color: var(--color-gold);
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.info__value {
  font-size: 16px;
  color: var(--color-text);
  letter-spacing: 1px;
  font-weight: 500;
}

.info__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.info__map-btn {
  display: inline-block;
  padding: 12px 40px;
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 2px;
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.info__map-btn:active {
  transform: scale(0.97);
}

/* ========== 倒计时 ========== */
.countdown {
  background: var(--color-cream);
  color: #fff;
}

.countdown .section__title {
  color: #fff;
}

.countdown .section__title::after {
  background: linear-gradient(90deg, transparent, var(--color-gold-light), transparent);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

.countdown__item {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 16px 8px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.countdown__num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-gold-light);
  transition: transform 0.3s ease;
}

.countdown__item:has(.countdown__num) {
  animation: countdownPulse 2s ease-in-out infinite;
}

.countdown__item:nth-child(2) { animation-delay: 0.2s; }
.countdown__item:nth-child(3) { animation-delay: 0.4s; }
.countdown__item:nth-child(4) { animation-delay: 0.6s; }

@keyframes countdownPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.countdown__unit {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

/* ========== 底部 ========== */
.footer__text {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-red-dark);
  margin-bottom: 10px;
  letter-spacing: 4px;
}

.footer__sub {
  font-size: 14px;
  color: var(--color-text-light);
  letter-spacing: 3px;
  font-style: italic;
}

.footer__hearts {
  margin-top: 20px;
  color: var(--color-red);
  font-size: 14px;
  letter-spacing: 8px;
  opacity: 0.6;
}

/* ========== 安全区域 ========== */
@supports (padding: max(0px)) {
  .section.content {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

/* ========== 邀请函主题：浪漫星辰 ========== */
.main.theme-romantic {
  --color-red: #c47a9a;
  --color-red-dark: #8b4a6b;
  --color-gold: #d4a0b8;
  --color-gold-light: #f0d0e0;
  --color-gold-shine: #ffe0f0;
  --color-cream: #1a1228;
  --color-blush: #2a1a38;
  --color-text: #f0e8f4;
  --color-text-light: #b8a8c8;
  --shadow-soft: 0 8px 32px rgba(26, 18, 40, 0.35);
  --shadow-gold: 0 0 20px rgba(212, 160, 184, 0.35);
  background: var(--color-cream);
}

.main.theme-romantic .hero {
  background: var(--color-cream);
}

.main.theme-romantic .carousel {
  background: #0d0818;
  box-shadow:
    0 12px 48px rgba(139, 74, 107, 0.3),
    inset 0 0 80px rgba(0, 0, 0, 0.2);
}

.main.theme-romantic .carousel__img-wrap {
  background: #0d0818;
}

.main.theme-romantic .carousel__overlay {
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(26, 18, 40, 0.2) 100%),
    linear-gradient(
      to top,
      rgba(26, 18, 40, 0.45) 0%,
      rgba(139, 74, 107, 0.1) 20%,
      transparent 50%
    );
}

.main.theme-romantic .carousel__shine {
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 200, 230, 0.04) 48%,
    rgba(240, 208, 224, 0.12) 50%,
    rgba(255, 200, 230, 0.04) 52%,
    transparent 65%
  );
}

.main.theme-romantic .carousel__frame {
  border-color: rgba(212, 160, 184, 0.3);
  box-shadow:
    inset 0 0 50px rgba(212, 160, 184, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.main.theme-romantic .carousel__frame::before,
.main.theme-romantic .carousel__frame::after {
  border-color: var(--color-gold);
  opacity: 0.5;
}

.main.theme-romantic .carousel__text {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    var(--color-gold-light) 40%,
    #ffe8f4 65%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(139, 74, 107, 0.6)) drop-shadow(0 0 24px rgba(212, 160, 184, 0.3));
}

.main.theme-romantic .carousel__progress-bar {
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-shine), var(--color-gold-light));
  box-shadow: 0 0 14px rgba(212, 160, 184, 0.7);
}

.main.theme-romantic .carousel__dot.is-active {
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-color: var(--color-gold);
  box-shadow: 0 0 14px rgba(212, 160, 184, 0.6);
}

.main.theme-romantic .section-card {
  border-color: rgba(212, 160, 184, 0.35);
  box-shadow:
    0 10px 40px rgba(26, 18, 40, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.main.theme-romantic .section-card--content {
  background: linear-gradient(160deg, rgba(36, 24, 52, 0.98) 0%, rgba(48, 32, 64, 0.95) 50%, rgba(40, 28, 56, 0.97) 100%);
}

.main.theme-romantic .section-card--content .section-card__pattern {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(212, 160, 184, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(196, 122, 154, 0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 35%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4a0b8' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Ccircle cx='10' cy='10' r='1'/%3E%3Ccircle cx='50' cy='50' r='1'/%3E%3Ccircle cx='50' cy='10' r='1.5'/%3E%3Ccircle cx='10' cy='50' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

.main.theme-romantic .section-card--content::before {
  content: '♥';
  color: var(--color-gold);
  opacity: 0.09;
  font-size: 120px;
  text-shadow: 0 0 80px rgba(212, 160, 184, 0.15);
}

.main.theme-romantic .section-card--content::after {
  border-color: rgba(212, 160, 184, 0.2);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(212, 160, 184, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(196, 122, 154, 0.08) 0%, transparent 50%);
}

.main.theme-romantic .content-block__divider {
  background: linear-gradient(90deg, transparent, rgba(212, 160, 184, 0.35), transparent);
}

.main.theme-romantic .section-card__corner::before,
.main.theme-romantic .section-card__corner::after {
  background: var(--color-gold);
  opacity: 0.4;
}

.main.theme-romantic .section__ornament {
  color: var(--color-gold);
}

.main.theme-romantic .section__title {
  color: var(--color-gold-light);
}

.main.theme-romantic .section__title::before {
  color: var(--color-gold);
}

.main.theme-romantic .invite__slide {
  background: linear-gradient(135deg, rgba(62, 42, 78, 0.75) 0%, rgba(48, 32, 64, 0.65) 50%, rgba(54, 36, 70, 0.7) 100%);
  border-color: rgba(212, 160, 184, 0.4);
  box-shadow:
    inset 0 0 40px rgba(212, 160, 184, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 24px rgba(26, 18, 40, 0.3);
}

.main.theme-romantic .invite__slide::before {
  border-color: rgba(212, 160, 184, 0.28);
}

.main.theme-romantic .invite__slide::after {
  content: '♥';
  color: var(--color-gold);
  opacity: 0.08;
}

.main.theme-romantic .invite__quote {
  color: var(--color-gold);
  opacity: 0.45;
}

.main.theme-romantic .invite__line {
  color: var(--color-text);
}

.main.theme-romantic .invite__names {
  color: var(--color-gold-light);
}

.main.theme-romantic .invite__heart {
  color: var(--color-red);
}

.main.theme-romantic .info__card {
  background: rgba(58, 38, 72, 0.5);
  border-color: rgba(212, 160, 184, 0.25);
  box-shadow: inset 0 0 24px rgba(212, 160, 184, 0.06);
}

.main.theme-romantic .info__label {
  color: var(--color-gold);
}

.main.theme-romantic .info__value {
  color: var(--color-text);
}

.main.theme-romantic .info__divider {
  background: linear-gradient(90deg, transparent, rgba(212, 160, 184, 0.35), transparent);
}

.main.theme-romantic .footer__text {
  color: var(--color-gold-light);
}

.main.theme-romantic .footer__sub {
  color: var(--color-text-light);
}

.main.theme-romantic .footer__hearts {
  color: var(--color-red);
}

/* 浪漫星辰主题下页面背景 */
body.theme-romantic:has(.main:not(.hidden)) {
  background: #1a1228;
}

/* ========== 音乐按钮主题适配 ========== */
body.theme-classic .music-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 235, 0.9));
  color: #c41e3a;
  box-shadow:
    0 4px 18px rgba(139, 21, 56, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.theme-classic .music-btn::before {
  border-color: rgba(212, 175, 55, 0.75);
}

body.theme-classic .music-btn__ring {
  border-color: rgba(212, 175, 55, 0.45);
}

body.theme-classic .music-btn__icon {
  filter: drop-shadow(0 1px 3px rgba(139, 21, 56, 0.25));
}

body.theme-classic .music-btn.is-playing {
  background: linear-gradient(145deg, #c41e3a, #8b1538);
  box-shadow:
    0 4px 20px rgba(196, 30, 58, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-classic .music-btn.is-playing::before {
  border-color: rgba(255, 215, 160, 0.55);
}

body.theme-romantic .music-btn {
  background: linear-gradient(145deg, rgba(58, 38, 72, 0.92), rgba(42, 30, 58, 0.88));
  color: #f0d0e0;
  box-shadow:
    0 4px 18px rgba(26, 18, 40, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-romantic .music-btn::before {
  border-color: rgba(212, 160, 184, 0.55);
}

body.theme-romantic .music-btn__ring {
  border-color: rgba(212, 160, 184, 0.4);
}

body.theme-romantic .music-btn__icon {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
}

body.theme-romantic .music-btn.is-playing {
  background: linear-gradient(145deg, #c47a9a, #8b4a6b);
  box-shadow:
    0 4px 20px rgba(139, 74, 107, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.theme-romantic .music-btn.is-playing::before {
  border-color: rgba(240, 208, 224, 0.5);
}

/* ========== 工具栏按钮主题适配 ========== */
body.theme-classic .toolbar-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 235, 0.9));
  color: #c41e3a;
  box-shadow: 0 4px 18px rgba(139, 21, 56, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.theme-classic .toolbar-btn::before {
  border-color: rgba(212, 175, 55, 0.6);
}

body.theme-romantic .toolbar-btn {
  background: linear-gradient(145deg, rgba(58, 38, 72, 0.92), rgba(42, 30, 58, 0.88));
  color: #f0d0e0;
  box-shadow: 0 4px 18px rgba(26, 18, 40, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-romantic .toolbar-btn::before {
  border-color: rgba(212, 160, 184, 0.45);
}
