/* ================================================================
   THIỆP MỜI CƯỚI — NGUYỄN QUANG TÙNG & NGUYỄN HOÀNG CHÂU
   Phong cách: LUXURY WHITE — Nền Trắng Thuần Khiết Tinh Tế, Text Đỏ Đô (Burgundy), Điểm xuyết Vàng Kim (Gold)
   ================================================================ */

:root {
  /* ---- Bảng màu Luxury Đỏ Đô & Trắng Tinh Khiết & Vàng Kim ---- */
  --burgundy: #800020;            /* Đỏ đô hoàng gia chính */
  --burgundy-deep: #540015;       /* Đỏ đô trầm */
  --burgundy-light: #9c1c33;      /* Đỏ rượu vang sáng */
  --burgundy-soft: #fcf4f5;       /* Nền đỏ phớt nhẹ */
  --burgundy-tint: #fae8eb;       /* Nền đỏ thẻ phụ */
  
  --gold: #c5a059;                /* Vàng gold sang trọng */
  --gold-deep: #a07832;           /* Vàng gold đậm nét */
  --gold-light: #fbf7ee;          /* Nền vàng nhạt ngà */
  --gold-grad: linear-gradient(135deg, #dfbc77 0%, #c5a059 50%, #9e752d 100%);
  --burgundy-grad: linear-gradient(135deg, #9c1c33 0%, #800020 60%, #540015 100%);

  --white: #ffffff;               /* Nền trắng chủ đạo */
  --cream: #faf7f2;               /* Trắng ngà tự nhiên */
  --ink: #221a1c;                 /* Màu chữ chính đen ấm */
  --ink-soft: #5c4c50;            /* Màu chữ phụ */
  
  --line-soft: rgba(197, 160, 89, 0.45);
  --line-burgundy: rgba(128, 0, 32, 0.35);

  /* ---- Typography ---- */
  --font-script: 'Alex Brush', cursive;
  --font-artistic: 'Great Vibes', cursive;
  --font-display: 'Playfair Display', serif;
  --font-poem: 'EB Garamond', 'Lora', serif;
  --font-body: 'EB Garamond', 'Lora', serif;
  --font-num: 'Playfair Display', 'EB Garamond', serif; /* Font số phẳng, đồng đều, không lỗi cao thấp */

  --container: 480px;
  --ease-soft: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  /* Nền màu trắng tinh kết hợp vân giấy mỹ thuật cao cấp */
  background-color: #ffffff;
  background-image: url('../assets/images/bg_paper.png');
  background-repeat: repeat;
  background-size: 240px auto;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Font số cao cấp — đồng đều chiều cao, tuyệt đối không lệch baseline */
.num, .cd-num, .ec-daynum .num, .ws-num, .iq-date, .ec-time, .footer-date, .hero-date, .card-date, .tl-time, .gc-stk {
  font-family: var(--font-num);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* ---- Typography Helpers ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}

.section-title {
  font-family: var(--font-poem);
  font-weight: 700;
  font-size: 32px;
  color: var(--burgundy);
  letter-spacing: 1px;
}

.names-script {
  font-family: var(--font-artistic);
  font-size: 48px;
  color: var(--burgundy);
  line-height: 1.2;
  font-weight: 400;
}

/* ================================================================
   HOA VĂN TRANG TRÍ LUXURY
   ================================================================ */
.lotus-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px auto 26px;
  opacity: 0.95;
}
.lotus-divider svg { width: 44px; height: 28px; color: var(--burgundy); }
.lotus-divider .line { width: 42px; height: 1.2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.corner-flourish {
  position: absolute;
  width: 56px; height: 56px;
  color: var(--gold);
  opacity: 0.65;
  pointer-events: none;
}
.corner-flourish.tl { top: 10px; left: 10px; }
.corner-flourish.tr { top: 10px; right: 10px; transform: scaleX(-1); }
.corner-flourish.bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.corner-flourish.br { bottom: 10px; right: 10px; transform: scale(-1, -1); }
.corner-flourish.green { color: var(--gold); }

/* ================================================================
   1. INTRO — PHONG THƯ MỜI CƯỚI SANG TRỌNG (BURGUNDY & GOLD)
   ================================================================ */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background-color: #fcfbfa;
  background-image: url('../assets/images/bg_paper.png');
  background-repeat: repeat;
  background-size: 240px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.1s ease, filter 1.1s ease, visibility 1.4s ease;
  will-change: transform, opacity, filter;
}

/* Hiệu ứng phóng to mờ dần chuyển cảnh chậm rãi mượt mà */
.intro-screen.zooming-out {
  transform: scale(1.32);
  opacity: 0;
  filter: blur(5px);
  pointer-events: none;
}

.intro-screen.opened {
  opacity: 0;
  transform: scale(1.38);
  filter: blur(8px);
  pointer-events: none;
  visibility: hidden;
}

/* Họa tiết trang trí nền Intro */
.intro-decor {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

/* bg4: Cây hoa loa kèn trắng đặt sát góc dưới biên trái màn hình (khắc phục 100% khoảng hở trên mọi thiết bị kể cả iPhone 16 Pro Max) */
.intro-decor-bg4 {
  bottom: -40px;
  left: -50px;
  width: clamp(180px, 44vw, 250px);
  max-height: 58vh;
  object-fit: contain;
  object-position: bottom left;
  filter: drop-shadow(4px 4px 14px rgba(0, 0, 0, 0.08));
  opacity: 0.96;
}

/* bg2: Cánh hoa trắng rơi điểm xuyết góc trên BÊN TRÁI (chìm sâu qua biên trái màn hình ~30%) */
.intro-decor-bg2 {
  top: 10px;
  left: -38px;
  width: clamp(90px, 22vw, 140px);
  opacity: 0.75;
  transform: scaleX(-1);
}

/* bg1: Nhánh hoa trắng phớt nhẹ góc trên BÊN PHẢI (hoán đổi vị trí) */
.intro-decor-bg1 {
  top: -25px;
  right: -20px;
  width: clamp(110px, 25vw, 160px);
  opacity: 0.65;
  transform: rotate(-15deg);
}

.envelope-intro-container {
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tiêu đề phần đầu Intro */
.envelope-header-text {
  margin-bottom: 22px;
  transition: opacity 0.5s ease;
}

.env-eyebrow {
  font-family: var(--font-poem);
  font-size: 11.5px;
  letter-spacing: 4.5px;
  color: var(--burgundy);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.env-title {
  font-family: var(--font-artistic);
  font-size: clamp(44px, 11vw, 58px);
  color: var(--burgundy);
  font-weight: normal;
  line-height: 1.1;
  margin-bottom: 3px;
}

.env-subtitle {
  font-family: var(--font-poem);
  font-size: 11px;
  letter-spacing: 3.5px;
  color: var(--gold-deep);
  text-transform: uppercase;
  font-weight: 600;
}

/* Khối Phong Thư */
.envelope-wrapper {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 220px;
  cursor: pointer;
  perspective: 1200px;
  margin: 12px 0 22px;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.envelope-wrapper:hover {
  transform: scale(1.02);
}

/* Bướm bg5 đậu trên góc PHẢI phong thư (lật ngược ngang, nhích lên trên & qua phải) */
.envelope-butterfly-right {
  position: absolute;
  top: -38px;
  right: -24px;
  width: 54px;
  height: auto;
  z-index: 12;
  pointer-events: none;
  filter: drop-shadow(2px 6px 12px rgba(128, 0, 32, 0.2));
  transform: scaleX(-1) rotate(15deg);
  animation: envelopeButterflyFloatRight 4.5s ease-in-out infinite alternate;
}

@keyframes envelopeButterflyFloatRight {
  0% {
    transform: scaleX(-1) translate(0, 0) rotate(15deg);
  }
  50% {
    transform: scaleX(-1) translate(4px, -6px) rotate(10deg) scale(1.04);
  }
  100% {
    transform: scaleX(-1) translate(-3px, -10px) rotate(18deg) scale(0.97);
  }
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  border-radius: 10px;
  box-shadow: 0 18px 45px -8px rgba(45, 3, 10, 0.45), 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 1. Lòng bên trong phong thư đỏ đô sẫm chất liệu da bg-intro.jpg */
.envelope-back-wall {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background-color: #4a0614;
  background-image: linear-gradient(155deg, rgba(80, 8, 22, 0.65), rgba(40, 3, 10, 0.85)), url('../assets/images/bg-intro.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.95) contrast(0.95) saturate(1.1);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(212, 175, 95, 0.35);
  z-index: 1;
}

/* 2. Mặt trước túi phong thư hình chữ nhật da đỏ đô với khung chỉ may vàng kim bao quanh (chuẩn ảnh 2) */
.envelope-front-pocket {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
}

.pocket-texture {
  position: absolute;
  inset: 0;
  background-color: #560818;
  background-image: linear-gradient(155deg, rgba(92, 10, 26, 0.55), rgba(48, 4, 12, 0.75)), url('../assets/images/bg-intro.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(1.02) contrast(0.95) saturate(1.15);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.pocket-stitch-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* Thẻ tên khách mời góc dưới BÊN PHẢI của phong thư (chữ thanh mảnh, trang nhã) */
.envelope-guest-tag {
  position: absolute;
  bottom: 14px;
  right: 18px;
  left: auto;
  z-index: 6;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  max-width: calc(100% - 36px);
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.envelope-guest-tag .egt-label {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: 13px;
  font-weight: 300;
  font-style: italic;
  color: rgba(245, 230, 200, 0.85);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.envelope-guest-tag .egt-name {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 400;
  color: #dfbc77;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Nắp phong thư (Flap) tam giác lật mở lên trên theo nếp gấp, hoàn toàn sạch sẽ không có viền thừa */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 115px;
  transform-origin: top center;
  transition: transform 1.1s cubic-bezier(0.25, 1, 0.4, 1), z-index 0.1s step-end 0.45s;
  z-index: 6;
  pointer-events: none;
}

.flap-texture {
  position: absolute;
  inset: 0;
  border-radius: 10px 10px 0 0;
  background-color: #5c091a;
  background-image: linear-gradient(155deg, rgba(98, 12, 28, 0.55), rgba(52, 5, 14, 0.75)), url('../assets/images/bg-intro.jpg');
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: brightness(1.05) contrast(0.95) saturate(1.15) drop-shadow(0 6px 14px rgba(18, 1, 4, 0.55));
}

.flap-stitch-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 7;
}

/* Dòng chữ gợi ý bên dưới phong thư */
.envelope-hint {
  font-family: var(--font-poem);
  font-size: 14px;
  font-style: italic;
  color: var(--burgundy);
  letter-spacing: 0.5px;
  margin-top: 12px;
  animation: envHintPulse 2s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.4s ease;
  font-weight: 600;
}

@keyframes envHintPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Hiệu ứng tương tác Mở nắp phong thư chậm rãi mượt mà */
.envelope-wrapper.is-opening .envelope-flap {
  transform: rotateX(-180deg);
  z-index: 2;
}

/* ================================================================
   GIAO DIỆN MÁY TÍNH / TABLET CHO INTRO (TỶ LỆ LỚN SANG TRỌNG)
   ================================================================ */
@media (min-width: 768px) {
  .envelope-intro-container {
    max-width: 540px;
    padding: 36px 24px;
  }

  .envelope-header-text {
    margin-bottom: 28px;
  }

  .env-eyebrow {
    font-size: 13.5px;
    letter-spacing: 6px;
    margin-bottom: 6px;
  }

  .env-title {
    font-size: clamp(56px, 6.5vw, 76px);
    margin-bottom: 5px;
  }

  .env-subtitle {
    font-size: 13px;
    letter-spacing: 4.5px;
  }

  .envelope-wrapper {
    width: 420px;
    height: 270px;
    margin: 16px 0 28px;
  }

  .envelope-flap {
    height: 140px;
  }

  .envelope-butterfly-right {
    top: -46px;
    right: -30px;
    width: 66px;
  }

  .envelope-hint {
    font-size: 15.5px;
    margin-top: 16px;
  }

  .intro-decor-bg4 {
    bottom: -55px;
    left: -65px;
    width: clamp(230px, 25vw, 320px);
    max-height: 62vh;
  }

  .intro-decor-bg1 {
    top: -35px;
    right: -30px;
    width: 180px;
  }

  .intro-decor-bg2 {
    top: 15px;
    left: -50px;
    width: 150px;
  }
}

/* ================================================================
   MAIN PAGE
   ================================================================ */
#main-page {
  opacity: 0;
  transition: opacity 1.8s var(--ease-soft);
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: transparent;
}
#main-page.visible { opacity: 1; }

/* ================================================================
   MUSIC TOGGLE — LUXURY & MINIMALIST
   Nút điều khiển nhạc nốt nhạc viền vàng ngọc bích, xoay mượt mà
   ================================================================ */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 999;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 160, 89, 0.45);
  box-shadow: 0 4px 18px rgba(128, 0, 32, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-toggle:hover {
  transform: scale(1.08);
  background: #ffffff;
  border-color: rgba(197, 160, 89, 0.8);
  box-shadow: 0 6px 22px rgba(197, 160, 89, 0.3);
}

.music-toggle svg {
  width: 19px;
  height: 19px;
  color: var(--burgundy);
  transition: transform 0.4s ease, opacity 0.3s ease;
}

/* Khi phát nhạc: nốt nhạc xoay êm ái, chậm rãi sang trọng */
.music-toggle.is-playing svg {
  animation: luxurySpin 8s linear infinite;
}

/* Khi tạm dừng nhạc: mờ nhẹ tinh tế và đứng yên */
.music-toggle:not(.is-playing) {
  opacity: 0.7;
}

.music-toggle:not(.is-playing):hover {
  opacity: 1;
}

@keyframes luxurySpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ================================================================
   2. HERO (Không phủ màu đỏ, tên kéo dài chiều cao sang trọng lệch trái phải)
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding-bottom: 56px;
}
.hero-photo-frame { position: absolute; inset: 0; overflow: hidden; }
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.hero-photo-frame::after {
  content: "";
  position: absolute; inset: 0;
  /* Lớp phủ tự nhiên trong suốt, không pha đỏ, giúp làm rõ chữ */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.62) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; color: var(--white); padding: 0 20px; }

/* Tên Chú Rể & Cô Dâu chiều cao vừa vặn, không rớt hàng, so le trái - phải tinh tế */
.hero-names-staggered {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 14px;
  gap: 6px;
}
.hero-name-left {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(25px, 7.8vw, 42px);
  letter-spacing: clamp(2.5px, 1vw, 4.5px);
  text-transform: uppercase;
  text-align: left;
  padding-left: clamp(10px, 4vw, 24px);
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  display: block;
  white-space: nowrap;
  line-height: 1.2;
}
.hero-name-right {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(25px, 7.8vw, 42px);
  letter-spacing: clamp(2.5px, 1vw, 4.5px);
  text-transform: uppercase;
  text-align: right;
  padding-right: clamp(10px, 4vw, 24px);
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  display: block;
  white-space: nowrap;
  line-height: 1.2;
}

/* Ký tự & phong cách nghệ thuật, nhạt và thanh thoát */
.hero-amp {
  font-family: var(--font-artistic);
  font-weight: 300;
  font-style: italic;
  font-size: 1.22em;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  margin-right: 6px;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-2px);
  letter-spacing: 0;
}

.hero-date {
  font-family: var(--font-num);
  font-weight: 500;
  font-size: clamp(15px, 4vw, 18px);
  letter-spacing: 6px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
  margin-top: 12px;
  text-align: center;
}

.hero-guest-greeting {
  display: none;
  margin-top: 14px;
  font-size: 13.5px;
  font-family: var(--font-poem);
  letter-spacing: 1px;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.hero-scroll-cue {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--white); opacity: 0.9;
  animation: bob 2.4s ease-in-out infinite;
}
.hero-scroll-cue svg { width: 22px; height: 22px; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ================================================================
   3. INVITATION CARD (EDITORIAL STYLE — 2 ẢNH & BỐ CỤC MỚI)
   ================================================================ */
.editorial-invite-section {
  padding: 44px 12px 48px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  background: transparent;
}

/* 2 Ảnh Đôi Đặt Xéo Nhau (Zigzag) & Tên Dâu Rể Sát Dưới Mỗi Cột */
.editorial-showcase-wrap {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  margin-bottom: 18px;
  width: 100%;
}
.editorial-showcase-wrap .es-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.editorial-showcase-wrap .es-left {
  padding-top: 0; /* Ảnh 1 bắt đầu ngay trên cùng */
}
.editorial-showcase-wrap .es-right {
  padding-top: 0; /* Wedding of ở trên đỉnh, ảnh 2 hạ thấp xuống tạo độ xéo zigzag */
}
.ep-script-title {
  font-family: var(--font-artistic);
  font-size: clamp(38px, 10.5vw, 54px);
  color: var(--burgundy);
  text-align: left;
  padding-left: 2px;
  margin-bottom: 6px;
  line-height: 0.88;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.ep-frame {
  width: 100%;
  aspect-ratio: 1 / 1.48;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 10px 24px -6px rgba(128, 0, 32, 0.14);
  border: 2px solid #ffffff;
}
.ep-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.en-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 5.8vw, 27px);
  font-weight: 400;
  letter-spacing: clamp(2.5px, 0.8vw, 4px);
  color: var(--burgundy);
  text-transform: uppercase;
  margin-top: 10px;
  line-height: 1.15;
  white-space: nowrap;
}
.en-groom {
  text-align: left;
  padding-left: 2px;
}
.en-bride {
  text-align: right;
  padding-right: 2px;
}

/* Ký tự & nghệ thuật lớn, nét nhạt nằm chính giữa khoảng giao thoa 2 tên */
.en-center-amp {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, -15%);
  font-family: var(--font-artistic);
  font-style: italic;
  font-size: clamp(52px, 14vw, 76px);
  color: rgba(197, 160, 89, 0.42);
  font-weight: 300;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

/* Khối Bố Mẹ Nhà Trai & Nhà Gái với đường gạch dọc thanh thoát */
.editorial-family-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 22px;
  padding: 0 6px;
}
.editorial-family-grid .ef-col {
  flex: 1;
  min-width: 0;
  display: flex;
}
.ef-border-track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2px 10px;
}
.ef-left .ef-border-track {
  border-left: 1.2px solid rgba(128, 0, 32, 0.65);
  text-align: left;
}
.ef-right .ef-border-track {
  border-right: 1.2px solid rgba(128, 0, 32, 0.65);
  text-align: right;
}
.ef-title {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: var(--burgundy);
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.9;
}
.ef-parents-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
}
.ef-name {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: clamp(14px, 3.8vw, 15.5px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Lời mời thanh lịch: hỗ trợ chế độ mặc định và chế độ cá nhân hóa */
.editorial-invite-text {
  margin-top: 10px;
  margin-bottom: 26px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ei-default-text, .ei-line1, .ei-line2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(12px, 3.3vw, 14px);
  letter-spacing: clamp(0.5px, 0.2vw, 1.2px);
  color: var(--burgundy);
  font-weight: 400;
  line-height: 1.7;
  text-transform: uppercase;
  white-space: nowrap;
}
.ei-personalized-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.ei-guest-name {
  margin: 3px 0 8px;
  line-height: 1.3;
}
.ei-guest-name .guest-name-display {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-size: clamp(20px, 5.5vw, 27px);
  font-weight: 400;
  font-style: italic;
  color: var(--burgundy);
  letter-spacing: 0.6px;
  display: inline-block;
  position: relative;
  padding: 0 12px 6px;
}
.ei-guest-name .guest-name-display::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 68%;
  max-width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(223, 188, 119, 0.35) 15%, rgba(223, 188, 119, 0.75) 50%, rgba(223, 188, 119, 0.35) 85%, transparent 100%);
  border-radius: 999px;
  pointer-events: none;
}

/* Địa điểm */
.editorial-venue-wrap {
  margin-bottom: 26px;
}
.ev-venue-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(21px, 5.8vw, 28px);
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--burgundy);
  text-transform: uppercase;
  line-height: 1.25;
}
.ev-hall {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.2px;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-top: 6px;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.ev-address {
  font-family: 'EB Garamond', 'Lora', serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 5px;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

/* Khối Ngày Giờ — Sử dụng font số phẳng, thanh thoát */
.editorial-datetime-wrap {
  margin-bottom: 28px;
}
.ed-time-row {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: clamp(16px, 4.4vw, 20px);
  font-weight: 400;
  color: var(--burgundy);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.ed-sep {
  color: var(--gold);
  opacity: 0.7;
  font-weight: 300;
}
.ed-lunar {
  font-family: 'EB Garamond', 'Lora', serif;
  font-style: italic;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 5px;
  letter-spacing: 0.2px;
}

/* Nút chỉ đường */
.editorial-map-wrap {
  margin-bottom: 24px;
}
.editorial-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--burgundy);
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  padding: 7px 18px;
  border: 1px solid rgba(197, 160, 89, 0.5);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.25s var(--ease-soft);
}
.editorial-map-btn svg {
  width: 13px;
  height: 13px;
  color: var(--burgundy);
}
.editorial-map-btn:hover {
  background: #ffffff;
  border-color: var(--burgundy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(128, 0, 32, 0.12);
}

/* Câu kết */
.editorial-closing {
  margin-top: 4px;
}
.closing-script {
  font-family: var(--font-artistic);
  font-size: clamp(22px, 5.6vw, 28px);
  color: var(--burgundy);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* ================================================================
   6. SAVE THE DATE, CALENDAR & TIMELINE (LỤA SILK TỰ NHIÊN)
   ================================================================ */
.calendar-section {
  padding: 20px 0 0;
  text-align: center;
  background: transparent;
  overflow: visible !important;
}

/* Khung lụa nền bg_calendar.jpg hòa nhập mượt mà không phân cách thô */
.cal-silk-wrapper {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  background-color: #f7f5f2;
  background-image: url('../assets/images/bg_calendar.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 60px 20px 60px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: visible !important;
  /* Chuyển tiếp êm dịu, hòa tan viền trên và dưới vào nền giấy */
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 3%, black 6%, black 95%, rgba(0,0,0,0.8) 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 3%, black 6%, black 95%, rgba(0,0,0,0.8) 98%, transparent 100%);
}

/* Khung ảnh Polaroid "SAVE THE DATE" */
.cal-polaroid-card {
  background: #ffffff;
  padding: 14px 14px 20px;
  width: 100%;
  max-width: 300px;
  border-radius: 2px;
  box-shadow: 0 18px 40px -10px rgba(50, 20, 25, 0.2), 0 4px 14px rgba(0, 0, 0, 0.06);
  margin: 0 auto 34px;
  transition: transform 0.4s var(--ease-soft);
}
.cal-polaroid-card:hover {
  transform: translateY(-4px);
}
.cpc-photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  background: #f0ece6;
  border-radius: 1px;
}
.cpc-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
.cpc-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(15px, 4.2vw, 18px);
  font-weight: 400;
  letter-spacing: 5px;
  color: var(--burgundy);
  text-transform: uppercase;
  margin-top: 14px;
  text-align: center;
  line-height: 1;
}

/* Tiêu đề Tháng 9 chữ nghệ thuật bay bổng */
.cal-wedding-header {
  margin-bottom: 20px;
  text-align: center;
}
.cal-month-script {
  font-family: var(--font-artistic);
  font-size: clamp(56px, 14.5vw, 78px);
  color: var(--burgundy);
  font-weight: 400;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.5px;
}

/* Lưới Lịch Tháng 9/2026 */
.cal-month-board {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
}
.cal-days-header span {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.8;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 2px;
  align-items: center;
}
.cal-grid span {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.cal-grid .cal-empty {
  pointer-events: none;
}

/* Trái Tim Khoanh Ngày 16 To Hơn & Hiệu Ứng Nhịp Đập Liên Tục */
.cal-grid .cal-heart-highlight {
  position: relative;
  color: #ffffff;
  font-weight: 600;
}
.cal-grid .cal-heart-highlight .heart-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  color: var(--burgundy);
  filter: drop-shadow(0 4px 12px rgba(128, 0, 32, 0.48));
  animation: heartBeatContinuous 1.6s ease-in-out infinite;
  transform-origin: center;
}
.cal-grid .cal-heart-highlight .day-num {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
}

@keyframes heartBeatContinuous {
  0% { transform: translate(-50%, -50%) scale(1); }
  14% { transform: translate(-50%, -50%) scale(1.18); }
  28% { transform: translate(-50%, -50%) scale(1); }
  42% { transform: translate(-50%, -50%) scale(1.22); }
  70% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ================================================================
   TIMELINE TRONG KHỐI NỀN LỤA
   ================================================================ */
.timeline-container {
  max-width: 380px;
  width: 100%;
  margin: 50px auto 0;
  padding: 0 4px;
}

.tl-icons-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  margin-bottom: 12px;
}
.tl-icon-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.tl-icon {
  width: 36px;
  height: 36px;
  color: var(--burgundy);
  opacity: 0.95;
}

.tl-line-bar {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 16px;
  padding: 6px 0;
}
.tl-line-bar .tl-track {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--burgundy);
  transform: translateY(-50%);
  z-index: 0;
}
.tl-heart-point {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.tl-heart-point svg {
  width: 14px;
  height: 14px;
  color: var(--burgundy);
}

.tl-details-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}
.tl-detail-item {
  flex: 1;
  text-align: center;
  padding: 0 4px;
}
.tl-detail-item .tl-time {
  font-family: 'Playfair Display', serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.8px;
  color: var(--burgundy);
  margin-bottom: 3px;
}
.tl-detail-item .tl-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.4px;
  color: var(--ink);
  line-height: 1.3;
}
.tl-detail-item .tl-sub {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.3;
  margin-top: 2px;
}

/* ================================================================
   7. PHOTO 3 & COUNTDOWN (NỐI LIỀN TRÊN NỀN LỤA CALENDAR)
   ================================================================ */
.cal-countdown-wrap {
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-right: -20px;
  max-width: none;
  margin-top: clamp(56px, 12vw, 72px);
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cal-romantic-quote {
  font-family: var(--font-artistic);
  font-size: clamp(32px, 8vw, 42px);
  color: var(--burgundy);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 24px;
  text-align: center;
  opacity: 0.9;
}
.pc-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  /* Hòa tan nhẹ nhàng mép trên của ảnh vào nền lụa tự nhiên */
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 2%, black 5%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 2%, black 5%, black 100%);
}
.pc-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.pc-countdown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 5, 8, 0.45) 35%, rgba(10, 5, 8, 0.88) 100%);
  text-align: center;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.pc-countdown-tag {
  font-family: 'Playfair Display', serif;
  font-size: clamp(10.5px, 2.8vw, 12.5px);
  font-weight: 400;
  letter-spacing: 4.5px;
  color: #eeddbb;
  text-transform: uppercase;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  opacity: 0.9;
}
.countdown-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 3vw, 16px);
  width: 100%;
  max-width: 380px;
}
.cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.cd-num {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-size: clamp(34px, 9.5vw, 48px);
  font-weight: 300;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.cd-label {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-size: clamp(10.5px, 2.5vw, 12px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-top: 6px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.cd-sep {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 200;
  color: rgba(238, 221, 187, 0.6);
  margin-bottom: 20px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.countdown-past {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: #ffffff;
  font-weight: 400;
  letter-spacing: 2px;
}

/* ================================================================
   8. RSVP + QUÀ MỪNG CƯỚI
   ================================================================ */
.rsvp-section {
  padding: 56px 16px 40px;
  text-align: center;
  background: transparent;
}

.rsvp-header {
  margin-bottom: 28px;
}

.rsvp-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 5.5vw, 28px);
  letter-spacing: 4.5px;
  color: var(--burgundy);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}

.rsvp-subtitle {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: clamp(14px, 3.6vw, 15.5px);
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}

.rsvp-form {
  margin: 0 auto;
  max-width: 420px;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
  box-shadow: none !important;
  border: none !important;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 7px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 3px;
  border: 1px solid rgba(197, 160, 89, 0.45);
  background: #ffffff;
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: 15.5px;
  color: var(--ink);
  transition: all 0.25s var(--ease-soft);
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a0958d;
  font-style: italic;
  font-size: 14.5px;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23800020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.rsvp-submit-btn {
  width: 100%;
  padding: 15px 24px;
  border-radius: 3px;
  background: var(--burgundy);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 12.5px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid rgba(197, 160, 89, 0.5);
  box-shadow: 0 8px 24px -6px rgba(128, 0, 32, 0.35);
  cursor: pointer;
  transition: all 0.3s var(--ease-soft);
  margin-top: 10px;
}

.rsvp-submit-btn:hover {
  background: #6a001a;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(128, 0, 32, 0.5);
}

.rsvp-submit-btn:disabled {
  opacity: 0.6;
  transform: none;
}

.form-status {
  margin-top: 8px;
  font-size: 14px;
  font-family: 'EB Garamond', 'Lora', serif;
  text-align: center;
  font-weight: 600;
}

.form-status:empty {
  display: none;
  margin: 0;
}

/* Nút mở Modal Quà Mừng Cưới */
.gift-btn-wrap {
  margin-top: 8px;
  width: 100%;
}

.gift-modal-open-btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--burgundy);
  color: var(--burgundy);
  font-family: 'Playfair Display', serif;
  font-size: 11.5px;
  letter-spacing: 3px;
  font-weight: 400;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s var(--ease-soft);
  box-shadow: 0 4px 12px rgba(128, 0, 32, 0.08);
}

.gift-modal-open-btn .gmob-icon {
  width: 15px;
  height: 15px;
}

.gift-modal-open-btn:hover {
  background: var(--burgundy);
  color: var(--white);
  box-shadow: 0 8px 20px -4px rgba(128, 0, 32, 0.3);
  transform: translateY(-1px);
}

/* ================================================================
   MODAL QUÀ MỪNG CƯỚI (LUXURY POPUP DIALOG)
   ================================================================ */
.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gift-modal.open {
  opacity: 1;
  visibility: visible;
}

.gm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 8, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gm-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  background-image: url('../assets/images/bg_paper.png');
  background-size: cover;
  border-radius: 4px;
  padding: 34px 22px 26px;
  border: 1px solid rgba(197, 160, 89, 0.6);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s var(--ease-soft);
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}

.gift-modal.open .gm-dialog {
  transform: scale(1) translateY(0);
}

.gm-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.gm-close-btn:hover {
  color: var(--burgundy);
  background: rgba(128, 0, 32, 0.08);
}

.gm-header {
  margin-bottom: 20px;
}

.gm-icon-wrap {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--burgundy-soft);
  color: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 160, 89, 0.4);
}

.gm-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.gm-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--burgundy);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gm-subtitle {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: 13.5px;
  font-style: italic;
  font-weight: 400;
  color: #6e645a;
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

.gm-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.gm-card {
  background: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 3px;
  padding: 16px 18px;
  text-align: left;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.gmc-badge {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--burgundy);
  background: var(--burgundy-soft);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 5px;
  border: 1px solid rgba(128, 0, 32, 0.12);
}

.gmc-name {
  font-family: 'Playfair Display', serif;
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--ink);
  margin-bottom: 6px;
}

.gmc-info {
  display: flex;
  flex-direction: column;
}

.gmc-bank {
  font-family: 'EB Garamond', serif;
  font-size: 13.5px;
  font-weight: 400;
  color: #73695f;
}

.gmc-stk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(197, 160, 89, 0.4);
}

.gmc-stk {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--burgundy);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.btn-copy-stk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 2px;
  border: 1px solid rgba(197, 160, 89, 0.6);
  background: #fdfaf6;
  color: var(--burgundy);
  font-family: 'Playfair Display', serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-stk svg {
  width: 12px;
  height: 12px;
}

.btn-copy-stk:hover {
  background: var(--burgundy);
  color: #ffffff;
  border-color: var(--burgundy);
}

.btn-copy-stk.copied {
  background: #2e7d32;
  color: #ffffff;
  border-color: #2e7d32;
}

.gm-footer {
  padding-top: 4px;
}

.gm-thankyou {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: 13px;
  color: #70655c;
  font-weight: 400;
  font-style: italic;
  margin: 0;
}

/* ================================================================
   9. SỔ LƯU BÚT + FOOTER
   ================================================================ */
.guestbook-section {
  padding: 52px 16px 40px;
  text-align: center;
  background: transparent;
}

.gb-header {
  margin-bottom: 20px;
}

.gb-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 5.5vw, 28px);
  letter-spacing: 4.5px;
  color: var(--burgundy);
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
}

.gb-loading, .gb-empty {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 20px;
}

/* Khung Carousel Lời Chúc Cuộn Dọc Tự Động */
.gb-vertical-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 22px auto 0;
  height: 380px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
}

.gb-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  scroll-behavior: auto;
  padding: 10px 4px 20px;
  scrollbar-width: none;
}

.gb-track::-webkit-scrollbar {
  display: none;
}

.gb-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.42);
  border-radius: 3px;
  padding: 16px 18px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: border-color 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.gb-card:hover {
  border-color: var(--burgundy);
  transform: translateY(-1px);
}

.gb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 8px;
}

.gb-name {
  font-family: 'Playfair Display', serif;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--burgundy);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gb-time {
  font-size: 11.5px;
  color: var(--ink-soft);
  opacity: 0.8;
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  flex-shrink: 0;
}

.gb-msg {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 10px;
  font-family: 'EB Garamond', 'Lora', serif;
  font-style: italic;
  font-weight: 400;
}

.gb-footer {
  display: flex;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed rgba(197, 160, 89, 0.35);
}

.gb-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: 'Playfair Display', serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 400;
}

.gb-badge.a {
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.gb-badge.n {
  background: rgba(128, 0, 32, 0.08);
  color: var(--burgundy);
  border: 1px solid rgba(128, 0, 32, 0.2);
}

/* ================================================================
   SITE FOOTER — TALL LUXURY HERO PHOTO FRAME
   ================================================================ */
.site-footer {
  position: relative;
  width: 100%;
  min-height: clamp(380px, 52vh, 480px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding-bottom: 0;
  margin-top: 40px;
}

.footer-photo-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.footer-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1.02);
}

.footer-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.15) 35%, rgba(12, 5, 8, 0.88) 100%);
}

.footer-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 20px 24px;
}

.footer-names-staggered {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 6px;
  gap: 2px;
}

.footer-name-left {
  font-family: var(--font-artistic);
  font-size: clamp(34px, 9.5vw, 48px);
  color: #ffffff;
  text-align: left;
  padding-left: clamp(8px, 4.5vw, 20px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  line-height: 1.1;
  font-weight: 400;
  white-space: nowrap;
}

.footer-name-right {
  font-family: var(--font-artistic);
  font-size: clamp(34px, 9.5vw, 48px);
  color: #ffffff;
  text-align: right;
  padding-right: clamp(8px, 4.5vw, 20px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  line-height: 1.1;
  font-weight: 400;
  white-space: nowrap;
}

.footer-amp {
  font-family: var(--font-artistic);
  font-weight: 300;
  font-style: italic;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 4px;
}

.site-footer .footer-date {
  font-family: 'Playfair Display', serif;
  font-size: 13.5px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #eeddbb;
  margin-bottom: 8px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.site-footer .footer-thanks {
  font-family: 'Playfair Display', 'EB Garamond', serif;
  font-size: clamp(10px, 2.7vw, 12px);
  letter-spacing: clamp(1px, 0.4vw, 2.2px);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  font-weight: 300;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  margin: 0;
  white-space: nowrap;
  display: block;
}

.footer-copyright-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  padding: 4px 12px 5px;
  text-align: center;
  font-family: 'Be Vietnam Pro', 'Montserrat', sans-serif;
  font-size: 10.5px;
  color: #7d7268;
  letter-spacing: 0.2px;
  border-top: 1px solid rgba(197, 160, 89, 0.18);
  line-height: 1.25;
  opacity: 1 !important;
  display: block;
}

.footer-copyright-bar a {
  color: #60564d;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-copyright-bar a:hover {
  color: var(--burgundy);
}

/* ================================================================
   HỌA TIẾT NỀN TRANG TRÍ (BACKGROUND DECOR - MOBILE FIRST)
   ================================================================ */
.editorial-invite-section,
.calendar-section,
.rsvp-section,
.guestbook-section {
  position: relative;
}

.bg-decor {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  mix-blend-mode: multiply;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Section 3: Editorial Invite Section - Top Right (bg1) */
.bg-decor-1 {
  top: 10px;
  right: -25px;
  width: clamp(140px, 38vw, 240px);
  transform: rotate(-10deg);
}

/* Section 3: Center Flourish above 'Trân trọng kính mời...' (bg3) */
.editorial-invite-decor-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 6px;
  pointer-events: none;
}

.bg-decor-invite-center {
  width: clamp(75px, 20vw, 115px);
  height: auto;
  mix-blend-mode: multiply;
  opacity: 0.85;
  user-select: none;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Responsive Desktop (min-width: 768px): Phóng to và mở rộng sang hai bên viền */
@media (min-width: 768px) {
  .bg-decor,
  .bg-decor-invite-center {
    opacity: 0.9;
  }
  .bg-decor-1 {
    right: -40px;
    transform: scale(1.15) rotate(-10deg);
  }
  .bg-decor-invite-center {
    width: clamp(90px, 14vw, 130px);
  }
}

/* Gallery photos cursor pointer */
.hero-photo-frame img,
.ep-frame img,
.cpc-photo-frame img,
.pc-frame img {
  cursor: pointer;
}

/* ================================================================
   LIGHTBOX GALLERY (HERO ĐẾN PHOTO4)
   ================================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-soft), visibility 0.35s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 6, 9, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.lightbox-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 94vw;
  max-height: 94vh;
}

.lightbox-img-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: calc(82vh - 54px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: opacity 0.22s ease, transform 0.22s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-img-wrap img.switching {
  opacity: 0.3;
  transform: scale(0.98);
}

.lightbox-caption-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  box-sizing: border-box;
}

.lightbox-names {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #f7eee7;
  text-transform: uppercase;
}

.lightbox-counter {
  font-family: 'EB Garamond', serif;
  font-size: 14.5px;
  color: #e5be7a;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--burgundy);
  border: 1px solid rgba(197, 160, 89, 0.4);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: calc(50% - 20px);
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--burgundy);
  border: 1px solid rgba(197, 160, 89, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-nav:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: -20px;
}

.lightbox-next {
  right: -20px;
}

@media (max-width: 600px) {
  .lightbox-prev {
    left: -8px;
    width: 38px;
    height: 38px;
  }
  .lightbox-next {
    right: -8px;
    width: 38px;
    height: 38px;
  }
  .lightbox-close {
    top: -42px;
    right: 0;
  }
  .lightbox-names {
    font-size: 11.5px;
    letter-spacing: 1px;
  }
  .lightbox-counter {
    font-size: 13.5px;
  }
}

/* ================================================================
   HỆ THỐNG HIỆU ỨNG XUẤT HIỆN DẦN (ULTRA-SMOOTH & CINEMATIC SLOW REVEAL)
   Chuyển động siêu chậm rãi tăng thêm 20% (8.8s), cực kỳ đằm thắm, êm ái và sang trọng
   ================================================================ */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 8.8s;
  transition-timing-function: cubic-bezier(0.05, 1, 0.15, 1);
  will-change: opacity, transform;
}

[data-aos="fade-up"],
[data-aos=""] {
  transform: translate3d(0, 38px, 0);
}

[data-aos="fade-down"] {
  transform: translate3d(0, -38px, 0);
}

[data-aos="fade-right"] {
  transform: translate3d(-45px, 0, 0);
}

[data-aos="fade-left"] {
  transform: translate3d(45px, 0, 0);
}

[data-aos="fade-in"] {
  transform: translate3d(0, 16px, 0);
}

/* Trạng thái khi kích hoạt (khi mở phong thư hoặc khi cuộn tới thẻ) */
[data-aos].aos-in {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

/* Quy tắc độ trễ xuất hiện tuần tự (Stagger Delays - chậm hơn thêm 20%) */
[data-aos][data-aos-delay="50"] { transition-delay: 120ms; }
[data-aos][data-aos-delay="100"] { transition-delay: 240ms; }
[data-aos][data-aos-delay="150"] { transition-delay: 360ms; }
[data-aos][data-aos-delay="200"] { transition-delay: 480ms; }
[data-aos][data-aos-delay="250"] { transition-delay: 620ms; }
[data-aos][data-aos-delay="300"] { transition-delay: 780ms; }
[data-aos][data-aos-delay="350"] { transition-delay: 940ms; }
[data-aos][data-aos-delay="400"] { transition-delay: 1080ms; }
[data-aos][data-aos-delay="450"] { transition-delay: 1250ms; }
[data-aos][data-aos-delay="500"] { transition-delay: 1400ms; }
[data-aos][data-aos-delay="550"] { transition-delay: 1560ms; }
[data-aos][data-aos-delay="600"] { transition-delay: 1720ms; }
[data-aos][data-aos-delay="650"] { transition-delay: 1880ms; }
[data-aos][data-aos-delay="700"] { transition-delay: 2030ms; }
[data-aos][data-aos-delay="750"] { transition-delay: 2180ms; }
[data-aos][data-aos-delay="800"] { transition-delay: 2340ms; }
[data-aos][data-aos-delay="850"] { transition-delay: 2500ms; }
[data-aos][data-aos-delay="900"] { transition-delay: 2650ms; }
[data-aos][data-aos-delay="1000"] { transition-delay: 2960ms; }
[data-aos][data-aos-delay="1200"] { transition-delay: 3430ms; }

/* ================================================================
   RESPONSIVE — DESKTOP
   ================================================================ */
@media (min-width: 760px) {
  :root { --container: 620px; }
  .section-title { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

