:root {
  --cream: #fff7eb;
  --red: #800000;
  --red-text: #800000;
  --gold-light: #ffeed2;
  --text-muted: #666666;
  --white: #ffffff;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Libre Baskerville', Baskerville, 'Times New Roman', serif;
  --font-script: 'Pinyon Script', cursive;
  --font-welcome-name: 'Pinyon Script', 'Great Vibes', cursive;
  --font-welcome-guest: 'Cormorant Garamond', 'Noto Serif VI', Georgia, serif;
  --font-welcome-label: 'Cinzel', 'Noto Serif VI', serif;
  --font-welcome-body: 'Cormorant Garamond', 'Noto Serif VI', serif;
  --font-hy: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  --welcome-open-dur: 1.2s;
  --welcome-fade-dur: 0.88s;
  --invite-enter-dur: 0.92s;
  --invite-enter-delay: 0s;
  --max-width: 480px;
  --max-width-md: 900px;
  --section-surface: #fff9f0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html.is-auto-scrolling {
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.welcome-active {
  overflow: hidden;
  height: 100dvh;
}

body.is-opening-invitation {
  background: var(--cream);
}

body.invitation-opened {
  background: var(--cream);
}

.hidden { display: none !important; }

/* Welcome overlay */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at center, #5a0000 0%, #2a0000 70%, #1a0000 100%);
  opacity: 1;
  overflow: hidden;
}

.welcome-overlay--opening {
  pointer-events: none;
}

.welcome-overlay--leaving {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--welcome-fade-dur) cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-overlay--opening .welcome-card {
  overflow: visible;
  will-change: transform, opacity;
  animation: welcome-card-open var(--welcome-open-dur) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.welcome-overlay--opening .welcome-card__corner--tl {
  animation: welcome-corner-tl var(--welcome-open-dur) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.welcome-overlay--opening .welcome-card__corner--br {
  animation: welcome-corner-br var(--welcome-open-dur) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.welcome-overlay--opening .welcome-seal {
  animation: welcome-seal-open var(--welcome-open-dur) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.welcome-overlay--opening .welcome-couple,
.welcome-overlay--opening .welcome-divider,
.welcome-overlay--opening .welcome-invite,
.welcome-overlay--opening .welcome-greeting,
.welcome-overlay--opening .welcome-guest,
.welcome-overlay--opening .welcome-guest-name,
.welcome-overlay--opening .welcome-btn {
  animation: welcome-part-fade 0.48s cubic-bezier(0.4, 0, 0.2, 1) 0.38s forwards;
}

.welcome-overlay--opening .welcome-bg-deco span {
  animation: welcome-hy-burst 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes welcome-card-open {
  0%, 72% {
    transform: scale(1) translateZ(0);
    opacity: 1;
  }
  100% {
    transform: scale(1.06) translateZ(0);
    opacity: 0;
  }
}

@keyframes welcome-corner-tl {
  0% {
    transform: rotate(-18deg) scale(1) translate(0, 0);
    opacity: 0.14;
  }
  40% {
    transform: rotate(-18deg) scale(2.2) translate(-8%, -8%);
    opacity: 0.22;
  }
  100% {
    transform: rotate(-18deg) scale(3) translate(-38%, -38%);
    opacity: 0;
  }
}

@keyframes welcome-corner-br {
  0% {
    transform: rotate(18deg) scale(1) translate(0, 0);
    opacity: 0.14;
  }
  40% {
    transform: rotate(18deg) scale(2.2) translate(10%, 10%);
    opacity: 0.22;
  }
  100% {
    transform: rotate(18deg) scale(3) translate(38%, 38%);
    opacity: 0;
  }
}

@keyframes welcome-seal-open {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  38% {
    transform: scale(1.08) rotate(360deg);
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

@keyframes welcome-part-fade {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
}

@keyframes welcome-hy-burst {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(30vh) scale(0.5) rotate(20deg);
  }
}

.welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.welcome-bg-deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.welcome-bg-deco span {
  position: absolute;
  top: -12%;
  font-family: var(--font-hy);
  line-height: 1;
  user-select: none;
  color: rgba(255, 228, 185, 0.5);
  text-shadow:
    0 1px 0 rgba(255, 248, 230, 0.55),
    0 2px 0 rgba(200, 120, 60, 0.25),
    0 4px 8px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(255, 190, 100, 0.18);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  animation: welcome-hy-fall linear infinite;
  will-change: transform, opacity;
}

@keyframes welcome-hy-fall {
  0% {
    transform: translateY(-20vh) rotate(-8deg);
    opacity: 0;
  }
  8% {
    opacity: 0.65;
  }
  85% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(115vh) rotate(12deg);
    opacity: 0;
  }
}

.welcome-bg-deco span:nth-child(1)  { left: 6%;   font-size: 2.6rem; animation-duration: 10s;  animation-delay: 0s;    }
.welcome-bg-deco span:nth-child(2)  { left: 18%;  font-size: 1.8rem; animation-duration: 13s;  animation-delay: -3s;   }
.welcome-bg-deco span:nth-child(3)  { left: 28%;  font-size: 2.2rem; animation-duration: 11s;  animation-delay: -6s;   opacity: 0.85; }
.welcome-bg-deco span:nth-child(4)  { left: 42%;  font-size: 1.5rem; animation-duration: 14s;  animation-delay: -1.5s; }
.welcome-bg-deco span:nth-child(5)  { left: 52%;  font-size: 2.8rem; animation-duration: 9s;   animation-delay: -4.5s; }
.welcome-bg-deco span:nth-child(6)  { left: 64%;  font-size: 2rem;   animation-duration: 12s;  animation-delay: -7s;   }
.welcome-bg-deco span:nth-child(7)  { left: 74%;  font-size: 1.6rem; animation-duration: 15s;  animation-delay: -2s;   opacity: 0.8; }
.welcome-bg-deco span:nth-child(8)  { left: 84%;  font-size: 2.4rem; animation-duration: 10.5s; animation-delay: -8s;  }
.welcome-bg-deco span:nth-child(9)  { left: 12%;  font-size: 1.4rem; animation-duration: 16s;  animation-delay: -5.5s; }
.welcome-bg-deco span:nth-child(10) { left: 36%;  font-size: 2rem;   animation-duration: 11.5s; animation-delay: -9s;  opacity: 0.75; }
.welcome-bg-deco span:nth-child(11) { left: 58%;  font-size: 1.7rem; animation-duration: 13.5s; animation-delay: -10s; opacity: 0.7; }
.welcome-bg-deco span:nth-child(12) { left: 92%;  font-size: 2.1rem; animation-duration: 12.5s; animation-delay: -11s; }

.welcome-card {
  position: relative;
  z-index: 2;
  width: min(100%, 330px);
  border-radius: 16px;
  background: linear-gradient(165deg, #a80000 0%, #8b0000 55%, #7a0000 100%);
  box-shadow:
    0 0 0 1px rgba(255, 238, 210, 0.08),
    0 0 48px rgba(255, 220, 180, 0.18),
    0 16px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.welcome-card__corner {
  position: absolute;
  z-index: 0;
  font-family: var(--font-hy);
  color: rgba(255, 238, 210, 0.14);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.welcome-card__corner--tl {
  top: -0.1em;
  left: -0.08em;
  font-size: clamp(4.25rem, 19vw, 5.75rem);
  transform: rotate(-18deg);
  transform-origin: top left;
}

.welcome-card__corner--br {
  right: -0.08em;
  bottom: -0.15em;
  font-size: clamp(4.25rem, 19vw, 5.75rem);
  transform: rotate(18deg);
  transform-origin: bottom right;
}

.welcome-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.75rem 2.15rem;
  color: var(--gold-light);
}

.welcome-seal {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  margin-bottom: 1.35rem;
  border-radius: 50%;
  background: linear-gradient(165deg, #950000 0%, #8b0000 45%, #720000 100%);
  border: 1px solid rgba(255, 238, 210, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 238, 210, 0.08),
    0 0 22px rgba(255, 230, 190, 0.45),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 248, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: translateY(-2px);
}

.welcome-seal__logo {
  width: 60%;
  object-fit: contain;
  display: block;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 6px rgba(255, 245, 225, 0.55));
}

.welcome-couple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 1.25rem;
}

.welcome-name {
  font-family: var(--font-welcome-name);
  font-size: clamp(2.25rem, 9vw, 2.95rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--cream);
  letter-spacing: 0.03em;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.28),
    0 0 32px rgba(255, 240, 210, 0.12);
}

.welcome-amp {
  font-family: var(--font-welcome-body);
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 247, 235, 0.7);
  margin: 0.3rem 0;
  letter-spacing: 0.2em;
}

.welcome-divider {
  flex-shrink: 0;
  width: min(180px, 62%);
  height: 1px;
  margin-bottom: 1.1rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 238, 210, 0.3) 18%,
    rgba(255, 238, 210, 0.8) 50%,
    rgba(255, 238, 210, 0.3) 82%,
    transparent 100%
  );
  position: relative;
}

.welcome-divider::after {
  content: '✦';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.5rem;
  color: var(--gold-light);
  background: #8b0000;
  padding: 0 0.4rem;
  line-height: 1;
}

.welcome-invite {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.welcome-greeting {
  font-family: var(--font-welcome-label);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(255, 238, 210, 0.9);
  margin: 0;
}

.welcome-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 22rem;
  padding: 0.15rem 0.75rem 0;
}

.welcome-guest-name {
  margin: 0;
  max-width: 100%;
  padding: 0 0.35rem;
  font-family: var(--font-welcome-guest);
  font-size: clamp(1.55rem, 6vw, 2rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: #fff8ee;
  text-shadow:
    0 0 20px rgba(255, 238, 210, 0.22),
    0 1px 10px rgba(0, 0, 0, 0.2);
  word-break: break-word;
}

.welcome-btn {
  position: relative;
  padding: 0.68rem 2rem;
  min-width: 148px;
  background: linear-gradient(180deg, #fff8ee 0%, #fff0d8 100%);
  border: none;
  color: var(--red);
  font-family: var(--font-welcome-body);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 999px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 0 16px rgba(255, 245, 225, 0.4),
    0 3px 12px rgba(0, 0, 0, 0.18);
  animation: welcome-btn-glow 2.4s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.welcome-btn::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 2px solid rgba(255, 245, 225, 0.5);
  animation: welcome-btn-ring 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes welcome-btn-glow {
  0%, 100% {
    box-shadow:
      0 0 16px rgba(255, 245, 225, 0.4),
      0 3px 12px rgba(0, 0, 0, 0.18);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 30px rgba(255, 245, 225, 0.7),
      0 4px 18px rgba(0, 0, 0, 0.22);
    transform: scale(1.04);
  }
}

@keyframes welcome-btn-ring {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  70%, 100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.welcome-btn:hover {
  animation: none;
  transform: translateY(-1px) scale(1.04);
  box-shadow:
    0 0 28px rgba(255, 245, 225, 0.6),
    0 6px 20px rgba(0, 0, 0, 0.25);
}

.welcome-btn:hover::before {
  animation: none;
  opacity: 0;
}

.welcome-btn:disabled {
  cursor: default;
  animation: none;
  opacity: 0.85;
}

.welcome-btn:disabled::before {
  animation: none;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-bg-deco span {
    animation: none;
    top: 12%;
    opacity: 0.35;
  }

  .welcome-btn,
  .welcome-btn::before {
    animation: none;
  }

  .welcome-overlay--opening,
  .welcome-overlay--leaving,
  .welcome-overlay--opening .welcome-card,
  .welcome-overlay--opening .welcome-card__corner--tl,
  .welcome-overlay--opening .welcome-card__corner--br,
  .welcome-overlay--opening .welcome-seal,
  .welcome-overlay--opening .welcome-bg-deco span {
    animation: none;
  }

  .welcome-overlay--opening,
  .welcome-overlay--leaving {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .invitation--enter {
    transition: none;
  }

  .invitation--waiting,
  .invitation--enter {
    opacity: 1;
    transform: none;
  }

  .invitation--enter .hero-enter {
    opacity: 1;
    animation: none;
  }

  .reveal,
  .reveal--bar h2,
  .reveal--line.ceremony-info__divider,
  .reveal--group .reveal-child,
  .reveal--group .schedule-tools__calendar,
  .reveal--group .party-info__calendar,
  .reveal--group .party-block__calendar {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .reveal--bar::after {
    width: min(72%, 280px);
    transition: none;
  }

  .carousel,
  .gallery-section.reveal .gallery-section__intro {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .carousel__item {
    transition: none;
  }

  .carousel__item-inner {
    transition: none;
  }
}

/* Music toggle */
.music-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 900;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.music-toggle.hidden { display: none; }

.music-toggle__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(128,0,0,0.8), var(--red), rgba(128,0,0,0.87));
  animation: spin 3s linear infinite;
}

.music-toggle__ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
}

.music-toggle:not(.playing) .music-toggle__ring { animation-play-state: paused; }
.music-toggle:not(.playing) .music-toggle__bars .bar { animation-play-state: paused; height: 30% !important; }

.music-toggle__bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding-block: 10px;
}

.music-toggle__bars .bar {
  width: 3px;
  background: white;
  border-radius: 2px;
  animation: dance 0.4s ease-in-out infinite;
}

.bar-1 { height: 60%; animation-delay: 0s; }
.bar-2 { height: 100%; animation-delay: 0.1s; }
.bar-3 { height: 40%; animation-delay: 0.2s; }
.bar-4 { height: 80%; animation-delay: 0.3s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dance {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* Page layout */
.page-wrap {
  display: flex;
  justify-content: center;
  overflow-x: clip;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(255, 210, 160, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(255, 180, 120, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at center, #6b1818 0%, #4a1212 42%, #2e0c0c 100%);
}

.invitation {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  background:
    linear-gradient(180deg, #fffaf2 0%, var(--cream) 6%, var(--cream) 94%, #fff4e4 100%);
  border: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(255, 238, 210, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 24px 56px rgba(0, 0, 0, 0.18);
}

.invitation::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110% 60% at 50% -8%, rgba(128, 0, 0, 0.04) 0%, transparent 58%),
    radial-gradient(circle at 8% 92%, rgba(128, 0, 0, 0.025) 0%, transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(128, 0, 0, 0.025) 0%, transparent 32%);
  opacity: 0.9;
}

.invitation-bg-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.invitation-bg-deco span {
  position: absolute;
  font-family: var(--font-hy);
  line-height: 1;
  user-select: none;
  color: rgba(128, 0, 0, 0.045);
  text-shadow: 0 0 40px rgba(128, 0, 0, 0.04);
}

.invitation-bg-deco span:nth-child(1) {
  top: 12%;
  left: -4%;
  font-size: clamp(5rem, 22vw, 7rem);
  transform: rotate(-12deg);
  opacity: 0.7;
}

.invitation-bg-deco span:nth-child(2) {
  top: 38%;
  right: -6%;
  font-size: clamp(4rem, 18vw, 5.5rem);
  transform: rotate(14deg);
  opacity: 0.55;
}

.invitation-bg-deco span:nth-child(3) {
  bottom: 22%;
  left: -2%;
  font-size: clamp(3.5rem, 16vw, 5rem);
  transform: rotate(8deg);
  opacity: 0.5;
}

.invitation-bg-deco span:nth-child(4) {
  bottom: 6%;
  right: -3%;
  font-size: clamp(4.5rem, 20vw, 6rem);
  transform: rotate(-10deg);
  opacity: 0.6;
}

.invitation > :not(.invitation-bg-deco) {
  position: relative;
  z-index: 1;
}

.invitation--waiting {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  pointer-events: none;
}

.invitation--enter {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity var(--invite-enter-dur) cubic-bezier(0.22, 1, 0.36, 1) var(--invite-enter-delay),
    transform var(--invite-enter-dur) cubic-bezier(0.22, 1, 0.36, 1) var(--invite-enter-delay);
}

.invitation--enter .hero-enter {
  opacity: 0;
  animation: hero-part-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.invitation--enter .hero-enter--1 { animation-delay: 0.22s; }
.invitation--enter .sunburst.hero-enter {
  animation-delay: 0.12s;
  animation-name: hero-sunburst-enter;
}
.invitation--enter .hero-enter--2 { animation-delay: 0.34s; animation-name: hero-part-enter-left; }
.invitation--enter .hero-enter--3 { animation-delay: 0.3s; animation-name: invitation-seal-reveal; }
.invitation--enter .hero-enter--4 { animation-delay: 0.4s; animation-name: hero-part-enter-right; }
.invitation--enter .hero-enter--5 { animation-delay: 0.52s; animation-name: hero-photo-enter; }

@keyframes invitation-seal-reveal {
  from {
    opacity: 0;
    transform: scale(0.15) rotate(-28deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes hero-sunburst-enter {
  from {
    opacity: 0;
    filter: brightness(1.4);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

@keyframes hero-part-enter {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-part-enter-left {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-part-enter-right {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-photo-enter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal--left {
  transform: translateX(-40px) translateY(12px);
}

.reveal--right {
  transform: translateX(40px) translateY(12px);
}

.reveal--scale {
  transform: translateY(24px) scale(0.9);
}

.reveal--pop {
  transform: translateY(20px) scale(0.82);
  transition: none;
}

.reveal--visible {
  opacity: 1;
  transform: none;
}

.reveal--bar {
  overflow: hidden;
  transform: none;
  opacity: 1;
}

.reveal--bar h2 {
  opacity: 0;
  transform: translateY(100%);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.reveal--bar.reveal--visible h2 {
  opacity: 1;
  transform: translateY(0);
}

.reveal--bar::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  margin: 0.35rem auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 238, 210, 0.85) 20%,
    rgba(255, 238, 210, 0.85) 80%,
    transparent
  );
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.reveal--bar.reveal--visible::after {
  width: min(72%, 280px);
}

.reveal--line.ceremony-info__divider {
  transform: scaleX(0);
  opacity: 1;
  transform-origin: center;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.reveal--line.ceremony-info__divider.reveal--visible {
  transform: scaleX(1);
}

.reveal--pop.reveal--visible {
  animation: reveal-pop 0.85s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes reveal-pop {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.82);
  }
  55% {
    opacity: 1;
    transform: translateY(-4px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal--group .reveal-child {
  opacity: 0;
  transform: translateY(20px) scale(0.94);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal--group.reveal--visible .reveal-child {
  opacity: 1;
  transform: none;
}

.reveal--group.reveal--visible .reveal-child:nth-child(1) { transition-delay: 0.08s; }
.reveal--group.reveal--visible .reveal-child:nth-child(2) { transition-delay: 0.16s; }
.reveal--group.reveal--visible .reveal-child:nth-child(3) { transition-delay: 0.24s; }
.reveal--group.reveal--visible .reveal-child:nth-child(4) { transition-delay: 0.32s; }

.reveal--group .schedule-tools__calendar,
.reveal--group .party-info__calendar,
.reveal--group .party-block__calendar {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.reveal--group.reveal--visible .schedule-tools__calendar,
.reveal--group.reveal--visible .party-info__calendar,
.reveal--group.reveal--visible .party-block__calendar {
  opacity: 1;
  transform: none;
}

@media (min-width: 768px) {
  .page-wrap {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .invitation {
    max-width: var(--max-width-md);
    margin: 0 auto;
    border: 1px solid rgba(255, 238, 210, 0.22);
    border-radius: 4px;
    box-shadow:
      0 0 0 1px rgba(255, 238, 210, 0.1),
      0 0 80px rgba(255, 200, 150, 0.08),
      0 12px 40px rgba(0, 0, 0, 0.32),
      0 32px 72px rgba(0, 0, 0, 0.22);
  }
}

/* Hero header */
.hero-header {
  position: relative;
  padding-bottom: clamp(72px, 20vw, 100px);
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(128, 0, 0, 0.04) 0%, transparent 62%),
    linear-gradient(180deg, #fff9f0 0%, var(--cream) 100%);
  overflow: hidden;
}

.hero-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 247, 235, 0.85) 55%, var(--cream) 100%);
  z-index: 0;
}

@media (min-width: 768px) {
  .hero-header { padding-bottom: 130px; }
  .hero-header::after { height: 100px; }
}

.sunburst {
  position: absolute;
  left: 50%;
  top: 0;
  width: 860px;
  aspect-ratio: 1;
  transform: translate(-50%, -48%);
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 72%, #b00000 0%, #8b0000 38%, #6a0000 68%, #4a0000 100%);
  border-radius: 50%;
  box-shadow:
    0 0 60px rgba(255, 200, 150, 0.12),
    0 0 120px rgba(128, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .sunburst {
    transform: translate(-50%, -50%);
  }
}

.sunburst img { width: 100%; height: 100%; }

.header-greeting {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 2.25rem 1.25rem 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(10px, 2.6vw, 11px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  line-height: 1.5;
}

.header-greeting__line {
  display: block;
}

@media (min-width: 768px) {
  .header-greeting {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.28em;
    padding-top: 3.25rem;
    font-size: 14px;
    letter-spacing: 0.35em;
  }

  .header-greeting__line { display: inline; }
}

.guest-block {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0.85rem auto 0;
  padding: 0.65rem 1rem 0.75rem;
  max-width: 18rem;
  border-radius: 4px;
  background: rgba(74, 0, 0, 0.18);
  border: 1px solid rgba(255, 238, 210, 0.12);
}

@media (min-width: 768px) {
  .guest-block {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    max-width: none;
  }
}

.guest-block__label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.85;
}

.guest-block__name {
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 5.5vw, 1.75rem);
  line-height: 1.25;
  color: var(--cream);
  word-break: break-word;
}

.header-couple {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    '. seal .'
    'first . second';
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-top: 2rem;
  padding: 0 1.25rem;
}

.header-couple__seal {
  grid-area: seal;
  justify-self: center;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.side-order-bride-first #bride-short-name {
  grid-area: first;
  text-align: right;
}

.side-order-bride-first #groom-short-name {
  grid-area: second;
  text-align: left;
}

.side-order-groom-first #groom-short-name {
  grid-area: first;
  text-align: right;
}

.side-order-groom-first #bride-short-name {
  grid-area: second;
  text-align: left;
}

.header-couple__short {
  min-width: 0;
  font-family: var(--font-body);
  font-size: clamp(15px, 4.2vw, 20px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .header-couple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2rem;
    padding: 0 2.5rem;
  }

  .header-couple__seal {
    width: 82px;
    height: 82px;
  }

  .header-couple__short,
  #bride-short-name,
  #groom-short-name {
    flex: 1;
    text-align: center;
    font-size: 20px;
    letter-spacing: 0;
    white-space: nowrap;
  }
}

/* Hero photo arch */
.hero-photo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
  padding: 0 1.25rem;
}

.hero-photo {
  position: relative;
  width: 100%;
  max-width: min(260px, 72vw);
  transform: translateY(36px);
}

@media (min-width: 768px) {
  .hero-photo-wrap {
    padding: 0 1.5rem;
  }

  .hero-photo {
    max-width: 372px;
    transform: translateY(73px);
  }
}

.hero-photo__img {
  position: relative;
  aspect-ratio: 286 / 481;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  background: #d9d9d9;
  box-shadow:
    0 8px 24px rgba(74, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-photo__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo__img .photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #e8e8e8;
  color: #999;
  font-size: 2rem;
}

.hero-photo__img .photo-placeholder small { font-size: 0.7rem; font-family: monospace; }

.hero-photo__img.has-image .photo-placeholder { display: none; }

.hero-photo__arc {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 2 / 1;
  transform: translateY(-14px);
  pointer-events: none;
  overflow: visible;
}

@media (min-width: 768px) {
  .hero-photo__arc { transform: translateY(-20px); }
}

.hero-photo__arc svg { width: 100%; height: 100%; overflow: visible; }

.hero-photo__arc-script {
  font-family: var(--font-script);
  font-size: 26px;
  opacity: 0.96;
}

.hero-photo__arc-label {
  font-size: 10px;
  opacity: 0.92;
}

@media (max-width: 767px) {
  .hero-photo__arc-script { font-size: 21px; }
  .hero-photo__arc-label { font-size: 8.5px; }
}

/* Section bars */
.section-bar {
  width: 100%;
  padding: 0.85rem 1rem;
  background: radial-gradient(circle at 50% 72%, #b00000 0%, #8b0000 38%, #6a0000 68%, #4a0000 100%);
  text-align: center;
}

@media (min-width: 768px) { .section-bar { padding: 1rem; } }

.section-bar h2 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-light);
}

@media (min-width: 768px) { .section-bar h2 { font-size: 24px; } }

.section-cream {
  --section-surface: #fff9f0;
  position: relative;
  padding: 1.75rem 1rem 2rem;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(128, 0, 0, 0.03) 0%, transparent 58%),
    var(--cream);
}

.section-cream > * {
  position: relative;
}

/* Thông tin tiệc cưới */
.party-info {
  --section-surface: #fff8ee;
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 80% 55% at 50% 35%, rgba(255, 255, 255, 0.35) 0%, transparent 62%),
    var(--cream);
}

.party-info__inner {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.party-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.party-block__label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.party-block__side-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.party-info__party-divider {
  margin-block: 0.5rem;
  opacity: 0.65;
}

.party-block--place {
  gap: 0.85rem;
}

.party-block--place .announcement {
  margin: 0 auto;
}

.party-block__addr {
  margin: 0;
  max-width: 24rem;
  padding: 0 0.5rem;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .party-block__addr { font-size: 14px; }
}

.party-block__map {
  width: 100%;
  margin-top: 0.25rem;
}

.party-block__map .map-iframe {
  width: 100%;
  height: 200px;
  margin: 0;
  border: none;
  border-radius: 10px;
}

@media (min-width: 768px) {
  .party-block__map .map-iframe { height: 220px; }
}

.party-block--when {
  gap: 0.25rem;
}

.party-block--reminder {
  gap: 0.85rem;
}

.party-block--reminder .countdown-grid {
  width: 100%;
  max-width: 300px;
}

.party-block__calendar {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  margin-top: 0.35rem;
}

.party-block__calendar .calendar {
  width: 100%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 10px;
}

.party-block__calendar .calendar__header {
  border-bottom: none;
  padding-bottom: 0.35rem;
}

.party-block__calendar .calendar__weekdays {
  border-bottom: none;
}

/* Thông tin lễ cưới */
.ceremony-info {
  --section-surface: #fff8ee;
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 80% 55% at 50% 35%, rgba(255, 255, 255, 0.35) 0%, transparent 62%),
    var(--cream);
}

.announcement {
  max-width: 26rem;
  margin: 32px auto;
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.75;
  color: var(--red);
  white-space: pre-line;
}

@media (min-width: 768px) { .announcement { font-size: 16px; } }

.ceremony-info__families {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin: 0 auto;
  position: relative;
}

@media (min-width: 768px) {
  .ceremony-info__families {
    gap: 1.25rem 2.5rem;
  }
}

.ceremony-info__families::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(128, 0, 0, 0.2) 12%,
    rgba(128, 0, 0, 0.2) 88%,
    transparent 100%
  );
  pointer-events: none;
}

.ceremony-info__family {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.5rem;
}

.ceremony-info__family-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.15rem;
}

.ceremony-info__family-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.ceremony-info__family-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--red);
  line-height: 1.45;
  margin: 0;
}

@media (min-width: 768px) { .ceremony-info__family-name { font-size: 15px; } }

.ceremony-info__family-addr {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0.4rem 0 0;
  max-width: 12rem;
}

@media (min-width: 768px) {
  .ceremony-info__family-addr {
    font-size: 11px;
    max-width: 15rem;
  }
}

.ceremony-info__divider {
  width: min(240px, 70%);
  height: 1px;
  margin: 1.75rem auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(128, 0, 0, 0.1) 20%,
    rgba(128, 0, 0, 0.28) 50%,
    rgba(128, 0, 0, 0.1) 80%,
    transparent 100%
  );
  position: relative;
}

.ceremony-info__divider::after {
  content: '✦';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.5rem;
  color: var(--red);
  background: var(--section-surface, var(--cream));
  padding: 0 0.5rem;
  line-height: 1;
  opacity: 0.6;
}

.ceremony-info .union-couple {
  margin-top: 0;
}

.ceremony-info__schedule {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
}

.ceremony-info__schedule {
  margin-top: 2rem;
}

.ceremony-info__schedule > .announcement {
  margin: 0 auto;
}

.schedule-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: center;
}

.schedule-hero__weekday {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .schedule-hero__weekday { font-size: 13px; }
}

.schedule-hero__main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.schedule-hero__day {
  margin: 0;
  font-family: var(--font-welcome-label);
  font-size: clamp(3.25rem, 14vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--red);
  font-variant-numeric: lining-nums;
}

.schedule-hero__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
}

.schedule-hero__month,
.schedule-hero__year {
  margin: 0;
  font-family: var(--font-welcome-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  font-variant-numeric: lining-nums;
}

.schedule-hero__month {
  font-size: 15px;
  line-height: 1.2;
}

.schedule-hero__year {
  font-size: 14px;
  line-height: 1.2;
  opacity: 0.78;
}

@media (min-width: 768px) {
  .schedule-hero__month { font-size: 16px; }
  .schedule-hero__year { font-size: 15px; }
}

.schedule-hero__lunar {
  margin: 0.35rem 0 0;
  max-width: 18rem;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .schedule-hero__lunar { font-size: 13px; }
}

.schedule-hero__time {
  margin: 0.15rem 0 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--red);
  font-variant-numeric: lining-nums;
}

@media (min-width: 768px) {
  .schedule-hero__time { font-size: 16px; }
}

.schedule-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  width: 100%;
}

.countdown-block {
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.schedule-tools__label {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.65rem 0.25rem;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 8px;
}

.countdown-unit__num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

@media (min-width: 768px) {
  .countdown-unit__num { font-size: 1.55rem; }
}

.countdown-unit__lbl {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-done {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  color: var(--red);
}

/* Khoảnh khắc */
.gallery-section {
  --section-surface: #fffaf4;
  padding: 1.75rem 1rem 2.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(255, 255, 255, 0.4) 0%, transparent 68%),
    var(--cream);
}

.gallery-section.reveal {
  opacity: 1;
  transform: none;
}

.gallery-section.reveal .gallery-section__intro {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-section.reveal--visible .gallery-section__intro {
  opacity: 1;
  transform: none;
}

.gallery-section .carousel {
  margin-top: 0.25rem;
}

.gallery-section__intro {
  max-width: 22rem;
  margin: 0 auto 1.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .gallery-section__intro { font-size: 1.15rem; }
}

/* Lời tri ân */
.tri-an-section {
  --section-surface: #fff8ee;
  padding: 2rem 1rem 3rem;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(128, 0, 0, 0.03) 0%, transparent 60%),
    var(--cream);
}

.tri-an-section__quote {
  max-width: 26rem;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--red);
  opacity: 0.85;
}

@media (min-width: 768px) {
  .tri-an-section__quote { font-size: 1.3rem; }
}

.tri-an-section__message {
  max-width: 30rem;
  margin: 1.25rem auto 0;
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .tri-an-section__message { font-size: 1.12rem; }
}

.tri-an-section__sign {
  margin-top: 1.5rem;
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--red);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .tri-an-section__sign { font-size: 2.35rem; }
}

.tri-an-section__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-top: 1.25rem;
  border-radius: 50%;
  background: linear-gradient(165deg, #950000 0%, #8b0000 45%, #720000 100%);
  border: 1px solid rgba(255, 238, 210, 0.35);
  box-shadow:
    0 0 0 3px rgba(255, 238, 210, 0.45),
    0 4px 16px rgba(128, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 248, 235, 0.2);
}

.tri-an-section__seal img {
  width: 58%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 5px rgba(255, 245, 225, 0.5));
}

@media (min-width: 768px) {
  .tri-an-section__seal {
    width: 72px;
    height: 72px;
  }
}

.union-couple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .union-couple {
    gap: 0.75rem;
    margin-top: 1.75rem;
  }
}

.union-couple__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.union-couple__name {
  margin: 0;
  font-size: clamp(1.5rem, 7vw, 2.5rem);
  line-height: 1.1;
}

.union-couple__role {
  margin: 0.15rem 0 0;
}

.union-couple__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0 0.25rem;
}

.union-couple__hy {
  font-family: var(--font-hy);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  color: var(--red);
  line-height: 1;
  opacity: 0.85;
}

.union-couple__amp {
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1;
}

@media (min-width: 768px) { .union-couple__amp { font-size: 1.5rem; } }

.script-name {
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 8vw, 2.75rem);
  font-weight: 400;
  color: var(--red);
  line-height: 1.15;
}

.script-role {
  margin-top: 0.35rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* Schedule (legacy helpers) */

.time-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.time-chip__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.time-chip__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.calendar-link {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.4rem 1rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red);
  border: 1px solid rgba(128, 0, 0, 0.3);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.calendar-link:hover {
  background: var(--red);
  color: var(--cream);
}

.date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  color: var(--red);
}

.date-display__side {
  width: 70px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (min-width: 768px) { .date-display__side { width: 85px; font-size: 15px; } }

.date-display__side:first-child { text-align: right; }
.date-display__side:last-child { text-align: left; }

.date-display__divider {
  width: 1px;
  height: 25px;
  background: var(--text-muted);
  opacity: 0.5;
  margin: 0 0.75rem;
}

@media (min-width: 768px) { .date-display__divider { margin: 0 1rem; } }

.date-display__day {
  font-size: 32px;
  font-weight: 400;
  color: var(--red);
}

@media (min-width: 768px) { .date-display__day { font-size: 38px; } }

.date-year {
  margin-top: 0.5rem;
  font-size: 20px;
  text-align: center;
}

@media (min-width: 768px) { .date-year { font-size: 22px; } }

.date-lunar {
  margin-top: 0.5rem;
  font-size: 13px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) { .date-lunar { font-size: 14px; } }

/* Gallery carousel */
.carousel {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-section.reveal--visible .carousel {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}

.carousel__stage {
  position: relative;
  height: 280px;
  perspective: 1000px;
  perspective-origin: 50% 42%;
  transform-style: preserve-3d;
  touch-action: pan-y;
  contain: layout style;
  isolation: isolate;
}

@media (min-width: 768px) {
  .carousel__stage {
    height: 360px;
    perspective-origin: 50% 45%;
  }
}

.carousel__item {
  --tx: 0;
  --tz: 0px;
  --ry: 0deg;
  --s: 1;
  --o: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(160px, 55%, 260px);
  aspect-ratio: 3 / 4;
  margin-left: calc(clamp(160px, 55%, 260px) / -2);
  margin-top: calc(clamp(160px, 55%, 260px) * 4 / 3 / -2);
  border-radius: 1rem;
  cursor: pointer;
  transform-style: preserve-3d;
  transform:
    translateX(calc(var(--tx) * 1%))
    translateZ(var(--tz))
    rotateY(var(--ry))
    scale(var(--s));
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: #e0e0e0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}

.carousel__item--active {
  pointer-events: auto;
}

.carousel__item--hidden {
  display: none;
}

.carousel__stage.is-sliding .carousel__item:not(.carousel__item--hidden) {
  will-change: transform;
}

.carousel__item-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  opacity: var(--o);
  transition: opacity 0.42s ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.carousel__item--active .carousel__item-inner {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: -2px;
}

.carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform: translateZ(0.01px);
}

.carousel__nav {
  display: flex;
  position: absolute;
  top: 50%;
  z-index: 200;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 238, 210, 0.5);
  border-radius: 50%;
  background: linear-gradient(165deg, #950000 0%, #8b0000 48%, #720000 100%);
  color: var(--gold-light);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 2px rgba(255, 238, 210, 0.22),
    0 4px 16px rgba(128, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 248, 235, 0.22);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.carousel__nav::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(128, 0, 0, 0.12);
  pointer-events: none;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.carousel__nav-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.carousel__nav--prev { left: 0.35rem; }
.carousel__nav--next { right: 0.35rem; }

.carousel__nav:hover {
  transform: translateY(-50%) scale(1.07);
  border-color: rgba(255, 238, 210, 0.75);
  box-shadow:
    0 0 0 3px rgba(255, 238, 210, 0.35),
    0 6px 20px rgba(128, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 248, 235, 0.3);
}

.carousel__nav:hover::before {
  border-color: rgba(128, 0, 0, 0.2);
  transform: scale(1.04);
}

.carousel__nav:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel__nav:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .carousel__nav {
    width: 2.75rem;
    height: 2.75rem;
  }

  .carousel__nav-icon {
    width: 1.2rem;
    height: 1.2rem;
  }

  .carousel__nav--prev { left: 0.5rem; }
  .carousel__nav--next { right: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__nav,
  .carousel__nav::before {
    transition: none;
  }
}

.carousel__counter {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.countdown-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--red);
}

/* Calendar */
.calendar {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(128,0,0,0.2);
  color: var(--red);
}

.calendar__header {
  text-align: center;
  padding: 0.6rem;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(128,0,0,0.27);
}

@media (min-width: 768px) { .calendar__header { font-size: 14px; } }

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid var(--red);
}

.calendar__weekdays span {
  text-align: center;
  padding: 0.35rem 0;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.6;
}

@media (min-width: 768px) { .calendar__weekdays span { font-size: 11px; } }

.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
  padding: 0.5rem 0.25rem;
}

.calendar__day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  font-size: 12px;
}

@media (min-width: 768px) { .calendar__day { height: 34px; font-size: 13px; } }

.calendar__day--wedding {
  position: relative;
}

.calendar__heart {
  position: relative;
  width: 26px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) { .calendar__heart { width: 30px; height: 28px; } }

.calendar__heart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.calendar__heart span {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

@media (min-width: 768px) { .calendar__heart span { font-size: 12px; } }

.calendar-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--red);
}

/* RSVP */
.rsvp-card {
  margin: 2rem 1rem 0;
  padding: 1.5rem;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  text-align: left;
}

.rsvp-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.rsvp-card__subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(128,0,0,0.15);
}

.form-textarea { resize: none; }

.rsvp-options { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }

.rsvp-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.rsvp-option:has(input:checked) {
  border-color: var(--red);
  background: rgba(128,0,0,0.04);
}

.rsvp-option input { position: absolute; opacity: 0; pointer-events: none; }

.rsvp-option__box {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #666;
  flex-shrink: 0;
}

.rsvp-option:has(input:checked) .rsvp-option__box {
  background: var(--red);
  color: white;
}

.btn-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--red);
  color: var(--gold-light);
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s, opacity 0.2s;
}

.btn-submit:hover { transform: scale(1.02); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-submit--round { border-radius: 999px; width: auto; padding: 0.6rem 2rem; margin-left: auto; display: block; }

.rsvp-success {
  text-align: center;
  color: var(--red);
  font-weight: 600;
  padding: 1rem 0;
}

.venue-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.venue-address {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.map-iframe {
  width: 100%;
  height: 220px;
  margin-top: 1.25rem;
  border: none;
  border-radius: 10px;
}

@media (min-width: 768px) { .map-iframe { height: 280px; } }

.contact-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--red);
  background: var(--cream);
  border: 1px solid rgba(128, 0, 0, 0.25);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.contact-btn:hover {
  background: var(--red);
  color: var(--cream);
}

.contact-btn__icon { font-size: 0.95rem; line-height: 1; }

/* Guestbook */
.guestbook-section { padding: 2rem 0.5rem; }

.guestbook-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
}

.wishes-list {
  max-width: 600px;
  margin: 2rem auto 0;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.wishes-empty {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.7;
}

.wish-card {
  background: white;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.wish-card__name {
  font-weight: 700;
  color: var(--red);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.wish-card__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.wish-card__time {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: 0.5rem;
}

/* Lightbox */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}

.lightbox::backdrop { background: rgba(0,0,0,0.85); }

.lightbox__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  width: 100vw;
}

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
}

.lightbox__close:hover { background: rgba(255,255,255,0.2); }

.lightbox__counter {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  color: white;
  font-size: 0.875rem;
  background: rgba(0,0,0,0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.lightbox__img {
  max-height: calc(100dvh - 120px);
  max-width: 90vw;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
}

.lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.lightbox__nav--prev { left: 0.25rem; }
.lightbox__nav--next { right: 1rem; }
