/* ==========================================================================
   MẪU 4: DUYÊN LÀNH BẮC BỘ (BESPOKE HERITAGE SILK & WAX SEAL STATIONERY)
   - Lấy cảm hứng từ các xưởng thiệp cưới thủ công cao cấp (Peonies, Traqué, Mộc Bản)
   - Chất liệu: Nền giấy mỹ thuật tơ tằm dập chìm Song Hỷ (Blind Debossing) thanh nhã
   - Mở thiệp: Bao thư lụa bã trầu cao cấp & Dấu sáp son niêm phong (Wax Seal 囍)
   - Hòa tấu dân gian: Đàn Tranh, Đàn Bầu, Sáo Trúc (100% Web Audio API Dual-Engine)
   ========================================================================== */

:root {
  /* Bảng màu truyền thống Bắc Bộ nhã nhặn & quý phái */
  --bg-main: #FAF7F2;             /* Nền giấy mỹ thuật kem ngà */
  --bg-silk-peach: #F6EDE6;       /* Nền tơ tằm phấn nhẹ */
  --bg-card-silk: #FFFDF9;        /* Nền thẻ lụa trắng ngà */
  
  --color-batrau: #7E282D;        /* Đỏ bã trầu trầm cổ điển */
  --color-batrau-light: #A8484E;  /* Hồng bã trầu nhạt */
  --color-batrau-deep: #5A161B;   /* Đỏ bã trầu đậm quý phái */
  
  --color-gold-dust: #C5A880;      /* Vàng đồng mờ antique */
  --color-gold-light: #E6D8C4;     /* Vàng tơ tằm nhạt */
  --color-men-lam: #52756D;        /* Xanh ngọc men lam Bát Tràng */
  
  --color-text-main: #2C221E;      /* Nâu mực nho trang nhã */
  --color-text-muted: #6B5B52;     /* Nâu trầm ấm áp */
  --color-border-silk: #E8DCCF;    /* Đường chỉ lụa */
  --color-border-accent: #D4BFA6;  /* Viền vàng đồng mộc */

  /* Đổ bóng êm dịu, không gắt */
  --shadow-soft: 0 8px 24px rgba(126, 40, 45, 0.06);
  --shadow-card: 0 16px 45px rgba(44, 34, 30, 0.08), 0 2px 8px rgba(126, 40, 45, 0.04);
  --shadow-seal: 0 12px 30px rgba(90, 22, 27, 0.35);

  --font-display: 'Playfair Display', 'Cormorant Garamond', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  /* HOA VĂN GIẤY TƠ TẰM DẬP CHÌM SONG HỶ (BLIND DEBOSSING / WATERMARK) SIÊU NHẸ NHÃ NHẶN */
  --pattern-silk-song-hy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cdefs%3E%3Cpattern id='linen' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 4 L8 4 M4 0 L4 8' stroke='%237E282D' stroke-width='0.3' stroke-opacity='0.025'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='160' height='160' fill='url(%23linen)'/%3E%3Cg fill='%237E282D' fill-opacity='0.035'%3E%3Cpath d='M80 22 C72 35 72 43 80 48 C88 43 88 35 80 22 Z M80 138 C72 125 72 117 80 112 C88 117 88 125 80 138 Z M22 80 C35 72 43 72 48 80 C43 88 35 88 22 80 Z M138 80 C125 72 117 72 112 80 C117 88 125 88 138 80 Z'/%3E%3Ccircle cx='80' cy='80' r='44' fill='none' stroke='%237E282D' stroke-width='0.8' stroke-opacity='0.04' stroke-dasharray='2 3'/%3E%3Ctext x='80' y='92' font-family='serif' font-size='38' font-weight='normal' text-anchor='middle'%3E囍%3C/text%3E%3C/g%3E%3C/svg%3E");
}

/* Reset & Toàn Trang */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(135deg, rgba(250, 247, 242, 0.95) 0%, rgba(246, 237, 230, 0.9) 50%, rgba(250, 247, 242, 0.97) 100%),
    var(--pattern-silk-song-hy);
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--color-text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100dvh;
  word-break: normal;
  overflow-wrap: break-word;
}

/* ==================== SEMANTIC TYPOGRAPHY & CHUNKING ==================== */
.name-nowrap,
.text-nowrap {
  display: inline-block;
  white-space: nowrap;
}

.parent-chunk,
.addr-chunk,
.time-chunk,
.badge-chunk {
  display: inline-block;
  white-space: nowrap;
}

.role-lbl {
  font-weight: 500;
  color: var(--color-text-muted);
}

.family-sep {
  display: inline-block;
  margin: 0 4px;
  color: var(--color-gold-dust);
}

h1, h2, h3, .head-main-title, .envelope-couple-title, .couple-names-silk, .head-sub-title, .poem-line {
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: break-word;
}

p, .letter-body-text, .couple-personal-quote, .gift-sub-desc, .wish-text-do {
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
}

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

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Canvas Cánh Hoa Sen Phấn & Hoa Bưởi Rơi Nhẹ */
.petals-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 5;
}

/* ==================== NÚT NHẠC NỔI: NHẠC CƯỚI TRUYỀN THỐNG ==================== */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FFFDF9;
  border: 1.5px solid var(--color-border-accent);
  color: var(--color-batrau);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(126, 40, 45, 0.22);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
  outline: none;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(126, 40, 45, 0.32);
}

.music-note-icon {
  display: block;
  stroke: var(--color-batrau);
  transition: transform 0.4s var(--ease-spring);
}

.music-toggle.playing .music-note-icon {
  animation: rotateMusicDisc 5s linear infinite;
}

@keyframes rotateMusicDisc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.music-waves {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 10px;
}

.music-waves span {
  width: 2px;
  height: 3px;
  background-color: var(--color-gold-dust);
  border-radius: 1px;
}

.music-toggle.playing .music-waves span:nth-child(1) {
  animation: waveBar 0.8s ease-in-out infinite alternate;
}
.music-toggle.playing .music-waves span:nth-child(2) {
  animation: waveBar 0.6s ease-in-out infinite alternate 0.2s;
}
.music-toggle.playing .music-waves span:nth-child(3) {
  animation: waveBar 0.9s ease-in-out infinite alternate 0.4s;
}

@keyframes waveBar {
  0% { height: 2px; }
  100% { height: 10px; }
}

/* ==================== MÀN HÌNH MỞ THIỆP: PHONG BÌ LỤA & DẤU SÁP SON ==================== */
.envelope-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 26, 23, 0.88);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.8s var(--ease-smooth), visibility 0.8s;
}

.envelope-overlay.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-bespoke-card {
  width: 100%;
  max-width: 440px;
  background: #FFFDF9;
  border-radius: 16px;
  border: 1px solid var(--color-border-accent);
  box-shadow: 
    0 25px 65px rgba(0, 0, 0, 0.4),
    0 0 0 6px rgba(246, 237, 230, 0.6);
  position: relative;
  overflow: hidden;
  padding: 42px 30px 48px;
  text-align: center;
  transition: transform 0.6s var(--ease-spring), opacity 0.6s ease;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55px;
  background: linear-gradient(180deg, #F3ECE2 0%, #FAF7F2 100%);
  border-bottom: 1px dashed var(--color-border-accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-inner-content {
  position: relative;
  z-index: 2;
  margin-top: 15px;
}

.envelope-top-seal-symbol {
  font-size: 1.1rem;
  color: var(--color-batrau);
  letter-spacing: 4px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.envelope-sub-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-batrau-light);
  margin-bottom: 12px;
}

.envelope-couple-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4.4vw, 1.65rem);
  font-weight: 700;
  color: var(--color-batrau-deep);
  line-height: 1.35;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.envelope-couple-title .name-nowrap {
  white-space: nowrap;
}

.envelope-amp {
  color: var(--color-gold-dust);
  font-style: italic;
  font-weight: 400;
  margin: 0 clamp(2px, 1vw, 8px);
  font-size: 0.9em;
}

.envelope-date-tag {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 1px;
  margin-bottom: 30px;
}

/* Dải Ruy Băng Lụa Vàng Đồng */
.envelope-silk-ribbon {
  position: absolute;
  top: 60%;
  left: 0;
  right: 0;
  height: 22px;
  background: linear-gradient(90deg, #D4BFA6 0%, #EADDCF 50%, #D4BFA6 100%);
  opacity: 0.7;
  border-top: 1px solid rgba(126, 40, 45, 0.1);
  border-bottom: 1px solid rgba(126, 40, 45, 0.1);
}

/* Dấu Sáp Son Niêm Phong (Wax Seal Button) */
.wax-seal-btn {
  position: relative;
  z-index: 5;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  outline: none;
  margin-top: 10px;
}

.wax-seal-outer {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9E353B 0%, #7E282D 60%, #501317 100%);
  box-shadow: 
    0 10px 25px rgba(80, 19, 23, 0.45),
    0 0 0 3px rgba(212, 191, 166, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.wax-seal-core {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px dashed rgba(242, 213, 155, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wax-monogram-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  line-height: 1;
}

.monogram-initials {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #F8E6C8;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 -1px 1px rgba(255, 255, 255, 0.25);
  margin-bottom: 0;
}

.monogram-heart {
  font-size: 0.85em;
  color: #E29D52;
  margin: 0 1px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.monogram-sub {
  font-family: var(--font-body);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #E5C384;
  text-transform: uppercase;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wax-ribbon-tails {
  display: flex;
  gap: 12px;
  margin-top: -8px;
}

.wax-tail {
  width: 8px;
  height: 28px;
  background: var(--color-batrau);
  border-radius: 2px;
  opacity: 0.85;
}
.tail-left { transform: rotate(-12deg); }
.tail-right { transform: rotate(12deg); }

.wax-seal-btn:hover .wax-seal-outer {
  transform: scale(1.1) rotate(4deg);
  box-shadow: 0 14px 32px rgba(80, 19, 23, 0.55);
}

.wax-seal-hint {
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-batrau-deep);
  background: var(--bg-silk-peach);
  border: 1px solid var(--color-border-silk);
  padding: 6px 18px;
  border-radius: 20px;
}

/* ==================== BỐ CỤC THIỆP CHÍNH (MAIN CONTENT) ==================== */
.main-content {
  position: relative;
  z-index: 10;
  padding: 45px 0 60px;
}

/* TẤM THIỆP CHÍNH: NỀN GIẤY TƠ TẰM DẬP CHÌM SONG HỶ */
.silk-proclamation-card {
  background-color: #FFFDF9;
  background-image: 
    linear-gradient(135deg, rgba(255, 253, 249, 0.95) 0%, rgba(246, 237, 230, 0.9) 50%, rgba(255, 253, 249, 0.98) 100%),
    var(--pattern-silk-song-hy);
  background-repeat: repeat;
  border: 1px solid var(--color-border-accent);
  border-radius: 20px;
  padding: 48px 36px 40px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Đường may viền chỉ tơ kép bên trong */
.silk-proclamation-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(197, 168, 128, 0.45);
  border-radius: 12px;
  pointer-events: none;
}

/* ==================== HERO SECTION: VẺ ĐẸP ÁO DÀI TRUYỀN THỐNG ==================== */
.hero-header {
  text-align: center;
  margin-bottom: 45px;
  position: relative;
  z-index: 2;
}

.hero-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-batrau);
}

.badge-text {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-batrau);
  text-transform: uppercase;
}

.couple-names-silk {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.8vw, 2.75rem);
  font-weight: 700;
  color: var(--color-batrau-deep);
  line-height: 1.3;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.couple-names-silk .name-nowrap {
  white-space: nowrap;
}

.couple-names-silk .ampersand {
  color: var(--color-gold-dust);
  font-style: italic;
  font-weight: 400;
  margin: 0 clamp(4px, 1.2vw, 12px);
  font-size: 0.9em;
}

/* Khung Ảnh Vòm Lụa Mềm Nhã Nhặn (Heritage Arch) */
.hero-photo-wrap {
  max-width: 420px;
  margin: 0 auto 30px;
}

.photo-heritage-arch {
  position: relative;
  border-radius: 140px 140px 16px 16px;
  overflow: hidden;
  border: 1px solid var(--color-border-accent);
  box-shadow: 0 16px 36px rgba(44, 34, 30, 0.12);
  background: #FFFDF9;
  padding: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-heritage-arch:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px rgba(44, 34, 30, 0.16);
}

.hero-portrait-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 132px 132px 10px 10px;
  display: block;
  filter: contrast(1.02) brightness(1.01);
}

/* Dải Tag Ribbon ở Chân Khung Ảnh */
.photo-caption-tag {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 253, 249, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid var(--color-border-accent);
  color: var(--color-batrau-deep);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 6px 18px;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(126, 40, 45, 0.12);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-hy {
  color: var(--color-batrau);
  font-size: 0.9rem;
}

/* Thơ Duyên Bắc Bộ */
.poem-banner-box {
  background: var(--bg-silk-peach);
  border: 1px solid var(--color-border-silk);
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 480px;
  margin: 0 auto 20px;
}

.poem-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.92rem, 3.8vw, 1.05rem);
  color: var(--color-batrau);
  line-height: 1.6;
  white-space: nowrap;
}

/* Ngày Tháng Dương & Âm Lịch */
.date-display-box {
  text-align: center;
  margin-top: 10px;
}

.solar-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  padding: 6px 24px;
  border-radius: 24px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-soft);
}

.date-sep {
  color: var(--color-gold-dust);
}

.lunar-sub {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ==================== HỆ THỐNG CHUYỂN ĐỘNG CUỘN ĐA CHIỀU (ADVANCED SCROLL MOTION) ==================== */
.reveal-item,
.reveal-fade-up,
.reveal-fade-down,
.reveal-zoom-in,
.reveal-slide-left,
.reveal-slide-right {
  opacity: 0;
  transition: 
    opacity 0.9s cubic-bezier(0.19, 1, 0.22, 1),
    transform 0.9s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.9s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform, filter;
}

/* 1. Trượt lên & Mở sáng (Cards & Content Blocks) */
.reveal-fade-up {
  transform: translate3d(0, 32px, 0) scale(0.98);
  filter: blur(4px);
}
.reveal-fade-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* 2. Trượt xuống êm dịu (Headers, Badges & Symbols) */
.reveal-fade-down {
  transform: translate3d(0, -18px, 0);
  filter: blur(3px);
}
.reveal-fade-down.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* 3. Nở nhẹ từ tâm (Hero Portrait & Arch Frames) */
.reveal-zoom-in {
  transform: scale(0.93) translate3d(0, 16px, 0);
  filter: blur(5px);
}
.reveal-zoom-in.is-visible {
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
  filter: blur(0);
}

/* 4. Trượt lướt từ trái sang (Groom Card / Vu Quy) */
.reveal-slide-left {
  transform: translate3d(-30px, 0, 0) scale(0.98);
  filter: blur(3px);
}
.reveal-slide-left.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* 5. Trượt lướt từ phải sang (Bride Card / Thành Hôn) */
.reveal-slide-right {
  transform: translate3d(30px, 0, 0) scale(0.98);
  filter: blur(3px);
}
.reveal-slide-right.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* Nhịp điệu xuất hiện so le (Staggered Delays) */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

/* ==================== SECTION TIÊU ĐỀ CHUẨN MỰC ==================== */
.section-block {
  margin-top: 50px;
  text-align: center;
}

.section-head {
  margin-bottom: 28px;
}

.head-hy-symbol {
  color: var(--color-batrau);
  font-size: 1.2rem;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.head-sub-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-batrau-light);
  text-transform: uppercase;
}

.head-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.8vw, 2rem);
  font-weight: 700;
  color: var(--color-batrau-deep);
  margin-top: 4px;
}

.silk-line {
  width: 50px;
  height: 2px;
  background: var(--color-gold-dust);
  margin: 10px auto 0;
  border-radius: 1px;
}

/* LỜI NGỎ */
.letter-body-text {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--color-text-main);
  line-height: 1.85;
  text-align: center;
}

/* ==================== ĐÔI UYÊN ƯƠNG: TÂN LANG & TÂN NƯƠNG ==================== */
.couple-silk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 25px;
}

.couple-portrait-card {
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  border-radius: 18px;
  padding: 28px 22px 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.couple-portrait-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(126, 40, 45, 0.1);
}

.couple-avatar-arch {
  width: 100%;
  max-width: 220px;
  border-radius: 110px 110px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--color-border-accent);
  box-shadow: 0 8px 20px rgba(44, 34, 30, 0.08);
  background: #FFFDF9;
  padding: 5px;
  margin-bottom: 16px;
}

.couple-avatar-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 105px 105px 8px 8px;
  display: block;
}

.couple-role-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-batrau);
  background: var(--bg-silk-peach);
  border: 1px solid var(--color-border-silk);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.couple-card-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  margin-bottom: 16px;
}

.couple-personal-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 0 8px;
}

.couple-family-info {
  width: 100%;
  background: var(--bg-silk-peach);
  border: 1px solid var(--color-border-silk);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: auto;
}

.family-side-title {
  display: block;
  font-weight: 700;
  color: var(--color-batrau-deep);
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}

.family-names {
  color: var(--color-text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  line-height: 1.45;
}

.family-addr {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ==================== SỰ KIỆN HỶ SỰ (TRÁP LỄ) ==================== */
.events-3d-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 25px;
}

.trap-event-card {
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trap-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(126, 40, 45, 0.1);
}

.card-top-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.tag-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-batrau);
}

.tag-side {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.event-time-pill {
  background: var(--bg-silk-peach);
  border: 1px solid var(--color-border-silk);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.time-highlight {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  line-height: 1.2;
}

.time-date-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.venue-place-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  margin-bottom: 6px;
}

.venue-place-addr {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.event-action-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-silk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s var(--ease-spring);
}

.btn-batrau {
  background: var(--color-batrau);
  color: #FFFFFF;
  border: 1px solid var(--color-batrau-deep);
}
.btn-batrau:hover {
  background: var(--color-batrau-deep);
  transform: translateY(-2px);
}

.btn-menlam {
  background: var(--bg-silk-peach);
  color: var(--color-batrau-deep);
  border: 1px solid var(--color-border-silk);
}
.btn-menlam:hover {
  background: #FFFDF9;
  border-color: var(--color-batrau);
  transform: translateY(-2px);
}

/* ==================== ĐẾM NGƯỢC THỜI GIAN ==================== */
.countdown-silk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 540px;
  margin: 0 auto;
}

.wooden-tile {
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  border-radius: 12px;
  padding: 14px 8px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.digit-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  line-height: 1.1;
}

.unit-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-batrau-light);
  margin-top: 4px;
}

/* ==================== BỘ TAM ẢNH LỤA THẮM (TRIPTYCH GALLERY) ==================== */
.triptych-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
}

.silk-photo-item {
  position: relative;
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}

.silk-photo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(126, 40, 45, 0.16);
}

/* Ảnh Trung Tâm: Khung Vòm Lụa Kiêu Sa Nổi Bật */
.silk-photo-item.featured-center {
  border: 1.5px solid var(--color-gold);
  border-radius: 120px 120px 16px 16px;
  padding: 12px;
  box-shadow: 
    0 16px 36px rgba(126, 40, 45, 0.14),
    0 0 0 4px rgba(245, 230, 210, 0.5);
  transform: translateY(-6px);
}

.silk-photo-item.featured-center:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 
    0 22px 42px rgba(126, 40, 45, 0.2),
    0 0 0 5px rgba(245, 230, 210, 0.8);
}

.photo-inner-wrap {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.arch-inner {
  border-radius: 110px 110px 8px 8px;
}

.gallery-art-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-spring);
}

.silk-photo-item:hover .gallery-art-photo {
  transform: scale(1.05);
}

.photo-caption-silk {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-style: italic;
  font-weight: 600;
  color: var(--color-batrau-deep);
  margin-top: 10px;
  text-align: center;
}

/* ==================== HỘP MỪNG CƯỚI (VIETQR) ==================== */
.gift-silk-wrapper {
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  border-radius: 16px;
  padding: 36px 24px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow-soft);
}

.gift-sub-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto 22px;
  line-height: 1.6;
}

.silk-bank-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.tab-btn-silk {
  padding: 8px 20px;
  min-height: 40px;
  border-radius: 20px;
  background: var(--bg-silk-peach);
  border: 1px solid var(--color-border-silk);
  color: var(--color-batrau-deep);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.tab-btn-silk.active {
  background: var(--color-batrau);
  color: #FFFFFF;
  border-color: var(--color-batrau-deep);
  box-shadow: 0 4px 12px rgba(126, 40, 45, 0.2);
}

.bank-tab-panel {
  display: none;
}
.bank-tab-panel.active {
  display: block;
}

.bank-card-silk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-main);
  border: 1px solid var(--color-border-silk);
  border-radius: 12px;
  padding: 18px;
  max-width: 500px;
  margin: 0 auto;
}

.qr-box-silk {
  flex-shrink: 0;
}

.qr-code-silk {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  border: 1px solid var(--color-border-silk);
  background: #FFFFFF;
  padding: 5px;
}

.bank-info-content {
  text-align: left;
  flex: 1;
}

.bank-field-row {
  margin-bottom: 6px;
}

.bank-field-row .lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.bank-field-row .val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
}

.btn-copy-silk {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 4px;
  background: var(--color-batrau-light);
  border: none;
  color: #FFFFFF;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== SỔ LƯU BÚT GIẤY DÓ ==================== */
.wishes-do-box {
  max-width: 600px;
  margin: 0 auto;
}

.wish-form-do {
  margin-bottom: 22px;
  text-align: left;
}

.do-input-group {
  margin-bottom: 12px;
}

.do-input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-batrau);
  margin-bottom: 5px;
}

.do-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border-silk);
  background: #FFFDF9;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--color-text-main);
  outline: none;
}

.do-input:focus {
  border-color: var(--color-batrau);
  box-shadow: 0 0 0 3px rgba(126, 40, 45, 0.1);
}

.wishes-list-do {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  text-align: left;
}

.wish-card-do {
  background: #FFFDF9;
  border: 1px solid var(--color-border-silk);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.wish-name-do {
  font-weight: 700;
  color: var(--color-batrau);
  font-size: 0.9rem;
}

.wish-text-do {
  font-size: 0.86rem;
  color: var(--color-text-main);
  margin-top: 3px;
}

/* ==================== FOOTER ==================== */
.folk-footer {
  text-align: center;
  padding: 40px 20px 15px;
  color: var(--color-text-muted);
}

.footer-seal-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.footer-seal-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFFDF9 0%, #F5EAE0 100%);
  border: 1.5px solid var(--color-gold);
  box-shadow: 
    0 4px 14px rgba(126, 40, 45, 0.12),
    inset 0 0 0 3px rgba(255, 253, 249, 0.9),
    inset 0 0 0 4.5px rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.footer-seal-ring:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 
    0 8px 24px rgba(126, 40, 45, 0.2),
    inset 0 0 0 3px rgba(255, 253, 249, 0.9),
    inset 0 0 0 4.5px rgba(212, 175, 55, 0.6);
}

.footer-seal-initials {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 3px;
  text-shadow: 0 1px 2px rgba(212, 175, 55, 0.3);
}

.seal-heart {
  font-size: 0.85em;
  color: var(--color-gold);
  filter: drop-shadow(0 1px 1px rgba(126, 40, 45, 0.2));
}

.footer-seal-flourish {
  font-size: 0.68rem;
  letter-spacing: 4px;
  color: var(--color-gold);
  margin-top: 6px;
  opacity: 0.85;
}

.footer-couple-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-batrau-deep);
  margin-bottom: 3px;
}

/* ==================== LIGHTBOX MODAL ==================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(36, 26, 23, 0.95);
  backdrop-filter: blur(10px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-smooth), visibility 0.4s;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2.5rem;
  color: #FFFFFF;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--color-border-accent);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: #FFFFFF;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  margin-top: 10px;
}

/* ==================== RESPONSIVE & MOBILE / IPAD SCROLL OPTIMIZATIONS ==================== */
@media (max-width: 820px) {
  .couple-silk-grid {
    grid-template-columns: 1fr;
  }
  .events-3d-grid {
    grid-template-columns: 1fr;
  }
  .triptych-gallery-grid {
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 12px;
  }

  /* Tối ưu Scroll Reveal trên iPad / Tablet: Chuyển động rõ nét, sang trọng, êm dịu */
  .reveal-item,
  .reveal-fade-up,
  .reveal-fade-down,
  .reveal-zoom-in,
  .reveal-slide-left,
  .reveal-slide-right {
    opacity: 0;
    transition: 
      opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .reveal-fade-up {
    transform: translate3d(0, 30px, 0) scale(0.98);
    filter: blur(3.5px);
  }

  .reveal-fade-down {
    transform: translate3d(0, -16px, 0);
    filter: blur(3px);
  }

  .reveal-zoom-in {
    transform: scale(0.94) translate3d(0, 16px, 0);
    filter: blur(4px);
  }

  /* Khi 2 cột chuyển thành 1 cột trên iPad, chuyển trượt ngang thành trượt dọc rõ ràng */
  .reveal-slide-left,
  .reveal-slide-right {
    transform: translate3d(0, 26px, 0) scale(0.98);
    filter: blur(3.5px);
  }

  .reveal-fade-up.is-visible,
  .reveal-fade-down.is-visible,
  .reveal-zoom-in.is-visible,
  .reveal-slide-left.is-visible,
  .reveal-slide-right.is-visible,
  .reveal-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }

  .stagger-1 { transition-delay: 0.08s; }
  .stagger-2 { transition-delay: 0.16s; }
  .stagger-3 { transition-delay: 0.24s; }
  .stagger-4 { transition-delay: 0.32s; }
  .stagger-5 { transition-delay: 0.40s; }
  .stagger-6 { transition-delay: 0.48s; }
}

@media (max-width: 600px) {
  .silk-proclamation-card {
    padding: 32px 16px 24px;
    border-radius: 16px;
  }
  .couple-names-silk {
    font-size: clamp(1.2rem, 5.2vw, 1.65rem);
    gap: 4px 8px;
  }
  .countdown-silk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bank-card-silk {
    flex-direction: column;
    text-align: center;
  }
  .bank-info-content {
    text-align: center;
  }

  /* Tối ưu Đỉnh Cao Trên Điện Thoại (Mobile): 
     Chuyển động hiển thị rõ rệt (26px), mở sáng mềm mại (blur 3px -> 0),
     mang lại trải nghiệm thị giác cao cấp ngay trước mắt khi cuộn */
  .reveal-item,
  .reveal-fade-up,
  .reveal-fade-down,
  .reveal-zoom-in,
  .reveal-slide-left,
  .reveal-slide-right {
    opacity: 0;
    transition: 
      opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.75s cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: opacity, transform, filter;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .reveal-fade-up {
    transform: translate3d(0, 26px, 0) scale(0.98) !important;
    filter: blur(3px) !important;
  }

  .reveal-fade-down {
    transform: translate3d(0, -14px, 0) !important;
    filter: blur(2.5px) !important;
  }

  .reveal-zoom-in {
    transform: scale(0.94) translate3d(0, 14px, 0) !important;
    filter: blur(3px) !important;
  }

  .reveal-slide-left,
  .reveal-slide-right {
    transform: translate3d(0, 24px, 0) scale(0.98) !important;
    filter: blur(3px) !important;
  }

  .reveal-fade-up.is-visible,
  .reveal-fade-down.is-visible,
  .reveal-zoom-in.is-visible,
  .reveal-slide-left.is-visible,
  .reveal-slide-right.is-visible,
  .reveal-item.is-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: blur(0) !important;
  }

  /* Nhịp điệu xuất hiện từng lớp rõ rệt */
  .stagger-1 { transition-delay: 0.08s !important; }
  .stagger-2 { transition-delay: 0.16s !important; }
  .stagger-3 { transition-delay: 0.24s !important; }
  .stagger-4 { transition-delay: 0.32s !important; }
  .stagger-5 { transition-delay: 0.40s !important; }
  .stagger-6 { transition-delay: 0.48s !important; }
}

@media (max-width: 640px) {
  .triptych-gallery-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    gap: 16px;
  }
  .silk-photo-item.featured-center {
    order: -1; /* Đưa ảnh vòm nụ cười cô dâu lên đầu tiên trên điện thoại */
    transform: none;
  }
  .silk-photo-item.featured-center:hover {
    transform: translateY(-4px);
  }
}

/* A11Y Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-item,
  .reveal-fade-up,
  .reveal-fade-down,
  .reveal-zoom-in,
  .reveal-slide-left,
  .reveal-slide-right {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .petals-canvas { display: none; }
}
