/* ======================================================== */
/* 0. HỆ THỐNG MÀU SẮC CHUẨN MẪU THỦY LINH (THANH MAI)       */
/* ======================================================== */
:root {
  /* Tông màu viền ngoài Desktop: Xanh Sage dịu mắt, nhẹ nhàng */
  --tm-backdrop: #E5EDE8;

  /* MÀU GIỮA (NỀN THIỆP CHÍNH): Giấy mỹ thuật trắng kem sang trọng như thiệp Thùy Linh */
  --tm-paper: #FAF8F5;          /* Trắng kem ngà mỹ thuật cao cấp */
  --tm-card: #FFFFFF;           /* Thẻ trắng tinh khôi */
  --tm-card-soft: #F4F7F5;      /* Thẻ xám xanh siêu nhẹ */
  
  /* Điểm nhấn xanh Sage Green (tone sáng, nhạt, thanh thoát hơn) */
  --tm-sage: #668D77;           /* Xanh xô thơm nhẹ nhàng, thanh lịch */
  --tm-sage-hover: #537763;     /* Xanh khi di chuột */
  --tm-sage-dark: #375344;      /* Xanh rêu tiêu đề (mềm mại, không bị gắt) */
  --tm-sage-light: #F0F6F2;     /* Nền xanh pastel mềm mại */
  --tm-sage-border: #A3C5B2;    /* Đường viền xanh sage dịu mát */

  /* Điểm nhấn cam quả mơ ấm áp */
  --tm-apricot: #E48A53;        /* Cam quả mơ */
  --tm-apricot-light: #FDF3EB;  /* Nền cam quả mơ nhạt */
  
  /* Màu mực chữ */
  --tm-ink: #454F49;            /* Mực xám than sang trọng */
  --tm-ink-dark: #202E26;       /* Chữ đen rêu đậm */
  --tm-ink-muted: #738078;      /* Chữ phụ, ngày giờ */

  /* Con dấu sáp & triện */
  --tm-seal-green: #375743;     /* Sáp niêm phong xanh rêu nhã nhặn */
  --tm-seal-gold: #FFEAA7;      /* Dấu triện vàng kim */
  --tm-h-seal-red: #B83B3B;     /* Dấu song hỷ đỏ son mini */

  --tm-border: #E0E8E3;         /* Viền thanh lịch */
  --tm-border-light: #F0F5F2;   /* Viền mờ */

  /* Phông chữ */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-garamond: 'Cormorant Garamond', serif;
  --font-sans: 'Be Vietnam Pro', -apple-system, sans-serif;
  --font-script: 'Allura', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--tm-backdrop);
  font-family: var(--font-sans);
  color: var(--tm-ink);
  line-height: 1.65;
  overflow-x: hidden;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* ======================================================== */
/* 1. MÀN HÌNH PHONG BÌ TƯƠNG TÁC (XEM ENVELOPE_THANHMAI.CSS) */
/* ======================================================== */

/* ======================================================== */
/* 2. CƠ CHẾ "SCROLL ĐẾN ĐÂU HIỆN ĐẾN ĐẤY" (SCROLL-REVEAL)  */
/* ======================================================== */
.rv {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv-left {
  opacity: 0;
  transform: translateX(-35px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv-right {
  opacity: 0;
  transform: translateX(35px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv.is-revealed,
.rv-left.is-revealed,
.rv-right.is-revealed {
  opacity: 1;
  transform: translate(0, 0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

/* ======================================================== */
/* 3. NỘI DUNG THIỆP CHÍNH (MAIN INVITATION)                 */
/* ======================================================== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--tm-sage), var(--tm-apricot));
  z-index: 999;
  transition: width 0.1s ease;
}

/* Nút nhạc nổi */
.music-floating-btn {
  position: fixed;
  bottom: 22px;
  right: 18px;
  z-index: 990;
  background: #FFF;
  border: 1.5px solid var(--tm-sage);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(42, 71, 54, 0.18);
  cursor: pointer;
  transition: all 0.25s ease;
}

.music-floating-btn:hover {
  transform: translateY(-2px);
  background: var(--tm-sage-light);
}

.disc-icon {
  width: 24px;
  height: 24px;
  background: var(--tm-sage);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #FFF;
  animation: spinDisc 3s linear infinite;
}

.music-floating-btn.paused .disc-icon {
  animation-play-state: paused;
  background: #90A097;
}

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

.music-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tm-sage-dark);
}

/* Nút tự động cuộn trang (Auto-scroll floating button) */
.autoscroll-floating-btn {
  position: fixed;
  bottom: 70px;
  right: 18px;
  z-index: 990;
  background: #FFF;
  border: 1.5px solid var(--tm-sage);
  border-radius: 30px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(42, 71, 54, 0.14);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tm-sage-dark);
}

.autoscroll-floating-btn:hover {
  transform: translateY(-2px);
  background: var(--tm-sage-light);
}

.autoscroll-floating-btn.active {
  background: var(--tm-sage);
  color: #FFF;
  border-color: var(--tm-sage);
  box-shadow: 0 4px 18px rgba(82, 120, 99, 0.35);
}

.autoscroll-floating-btn.active .scroll-icon {
  display: inline-block;
  animation: scrollIconBob 1.4s infinite ease-in-out;
}

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

/* KHUNG BAO CHÍNH: NỀN TRẮNG KEM NGÀ MỸ THUẬT CAO CẤP NHƯ MẪU THÙY LINH */
.invitation-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--tm-paper); /* #FAF8F5 */
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(42, 71, 54, 0.14);
  position: relative;
  overflow: hidden;
}

/* Phong cách Section chung */
.section {
  padding: 44px 24px;
  text-align: center;
  position: relative;
}

/* Botanical Section Tag */
.botanical-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  background: var(--tm-sage-light);
  border: 1px solid var(--tm-border);
  padding: 4px 14px;
  border-radius: 20px;
}

.flourish-leaf {
  font-size: 12px;
}

.flourish-leaf.right {
  transform: scaleX(-1);
}

.tag-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--tm-sage-dark);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--tm-sage-dark);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.section-desc {
  font-size: 13.5px;
  color: var(--tm-ink-muted);
  max-width: 380px;
  margin: 0 auto 22px;
  line-height: 1.6;
}

/* ---------------- HERO SECTION: THEO ĐÚNG MẪU THÙY LINH ---------------- */
.hero-section {
  padding-top: 40px;
  background: radial-gradient(circle at 50% 15%, #FFFFFF 0%, var(--tm-paper) 100%);
  border-bottom: 1px solid var(--tm-border);
}

.hero-arch-outer {
  margin: 0 auto 20px;
}

/* Khung vòm ảnh cưới lớn như mẫu Thùy Linh */
.hero-arch-frame {
  position: relative;
  width: 290px;
  height: 385px;
  margin: 0 auto;
  border-radius: 155px 155px 16px 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(42, 71, 54, 0.22);
  border: 5px solid #FFF;
}

.hero-couple-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-arch-border {
  position: absolute;
  inset: 6px;
  border-radius: 148px 148px 10px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

/* Tên cô dâu chú rể đặt dưới ảnh theo chuẩn font mẫu Thùy Linh */
.hero-names-block {
  margin: 14px 0 6px;
  text-align: center;
}

.hero-groom-name, .hero-bride-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 6vw, 30px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #56595B;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}

.hero-amp-script {
  font-family: 'Parisienne', 'Allura', cursive;
  font-size: clamp(20px, 4.6vw, 24px);
  color: #E48A53;
  margin: 4px 0;
  line-height: 1.25;
}

.hero-divider-gold {
  margin: 6px auto 0;
  width: 130px;
  line-height: 0;
}

.gold-divider-img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.88;
}

.hero-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 8px 24px 14px;
}

.hero-date-panel-box {
  position: relative;
  width: clamp(150px, 40vw, 164px);
  aspect-ratio: 2089 / 613;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.65;
  filter: drop-shadow(0 0 0.5px rgba(158, 128, 96, 0.65));
}

.date-panel-text {
  position: relative;
  z-index: 1;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 500;
  color: #8BA396;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.08em;
  line-height: 1;
}

.hy-seal-img {
  width: 21px;
  height: auto;
  opacity: 0.85;
}

/* Khung chào đón cá nhân hóa */
.personal-welcome-box {
  background: #FFF;
  border: 1.5px solid var(--tm-border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 6px 22px;
  box-shadow: 0 4px 16px rgba(82, 120, 99, 0.08);
}

.welcome-text {
  font-size: 12px;
  color: var(--tm-sage-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.welcome-guest {
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--tm-sage-dark);
  font-weight: 700;
  margin: 4px 0;
}

.welcome-sub {
  font-size: 13.5px;
  color: var(--tm-ink);
  line-height: 1.5;
}

.scroll-down-prompt {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--tm-sage-dark);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.arrow-down {
  font-size: 16px;
  color: var(--tm-sage);
  animation: gentleBounce 1.6s infinite ease-in-out;
}

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

/* ---------------- SECTION HAI GIA ĐÌNH ---------------- */
.family-section {
  background: #FFF;
  border-bottom: 1px solid var(--tm-border-light);
}

.quote-text {
  font-style: italic;
  font-size: 13.5px;
  color: var(--tm-ink);
  line-height: 1.7;
  margin-bottom: 26px;
  padding: 0 8px;
}

.family-columns {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.family-card {
  background: var(--tm-card-soft);
  border: 1.5px solid var(--tm-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.avatar-ring {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  border: 3px solid #FFF;
  box-shadow: 0 4px 14px rgba(42, 71, 54, 0.16);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.avatar-ring img.avatar-groom {
  object-position: 50% 34%;
  transform: scale(2.15);
  transform-origin: 50% 35%;
}

.avatar-ring img.avatar-bride {
  object-position: 48% 36%;
  transform: scale(1.65);
  transform-origin: 48% 36%;
}

.family-side {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--tm-sage);
  font-weight: 700;
  margin-bottom: 8px;
}

.parent-title {
  font-size: 13.5px;
  color: var(--tm-ink);
  margin-bottom: 3px;
}

.role-divider {
  width: 32px;
  height: 1.5px;
  background: var(--tm-sage);
  opacity: 0.5;
  margin: 10px auto;
}

.child-role {
  font-size: 11.5px;
  color: var(--tm-ink-muted);
}

.child-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--tm-sage-dark);
  margin-top: 2px;
}

.center-heart {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- SECTION ĐẾM NGƯỢC & LỊCH ---------------- */
.countdown-section {
  background: var(--tm-paper);
}

.event-time-highlight {
  margin-bottom: 22px;
}

.main-time {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--tm-sage-dark);
}

.solar-date {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--tm-sage-dark);
  margin: 4px 0;
}

.lunar-date {
  font-size: 13px;
  color: var(--tm-ink-muted);
  font-style: italic;
}

/* Đồng hồ số */
.countdown-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.clock-item {
  background: #FFF;
  border: 1px solid var(--tm-border);
  border-radius: 10px;
  width: 68px;
  padding: 10px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.clock-digit {
  display: block;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 700;
  color: var(--tm-apricot);
  line-height: 1.1;
}

.clock-label {
  font-size: 10.5px;
  color: var(--tm-ink-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.clock-sep {
  font-size: 18px;
  font-weight: 700;
  color: var(--tm-sage);
}

/* Lịch tháng 12/2026 */
.mini-calendar-card {
  background: #FFF;
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  margin-bottom: 22px;
}

.calendar-header {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--tm-sage-dark);
  margin-bottom: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  font-size: 13px;
}

.cal-day {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--tm-ink);
}

.cal-day.head {
  font-weight: 700;
  font-size: 11px;
  color: var(--tm-sage-dark);
}

/* Ngày cưới khoanh tròn màu cam quả mơ ấm */
.cal-day.wedding-highlight {
  background: var(--tm-apricot);
  color: #FFF !important;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(228, 138, 83, 0.4);
}

/* Nút bấm */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--tm-sage);
  color: #FFF;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: 25px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(82, 120, 99, 0.35);
}

.btn-primary:hover {
  background: var(--tm-sage-hover);
  transform: translateY(-1px);
}

.btn-primary.full-width {
  width: 100%;
}

.btn-outline-small {
  display: inline-block;
  font-size: 12px;
  color: var(--tm-sage-dark);
  border: 1.5px solid var(--tm-sage);
  background: #FFF;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 6px;
  transition: all 0.2s;
}

.btn-outline-small:hover {
  background: var(--tm-sage);
  color: #FFF;
}

/* ---------------- SECTION SỰ KIỆN & BẢN ĐỒ 2 NHÀ ---------------- */
.events-section {
  background: #FFF;
}

.events-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
  text-align: left;
}

.timeline-card {
  background: var(--tm-card-soft);
  border: 1.5px solid var(--tm-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 14px;
}

.event-pin-icon {
  width: 40px;
  height: 40px;
  background: #FFF;
  border: 1px solid var(--tm-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.event-type {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--tm-sage);
  letter-spacing: 1px;
}

.event-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--tm-sage-dark);
  margin: 2px 0 4px;
}

.event-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--tm-apricot);
}

.event-location {
  font-size: 12.5px;
  color: var(--tm-ink);
  margin-top: 2px;
}

/* Khung bản đồ kép cho 2 nhà */
.dual-map-container {
  background: var(--tm-paper);
  border: 1.5px solid var(--tm-border);
  border-radius: 16px;
  padding: 16px;
  margin-top: 20px;
}

.map-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.map-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 20px;
  border: 1px solid var(--tm-border);
  background: #FFF;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--tm-sage-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.map-tab-btn.active {
  background: var(--tm-sage);
  color: #FFF;
  border-color: var(--tm-sage);
  box-shadow: 0 2px 8px rgba(82, 120, 99, 0.25);
}

.map-frame-box {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--tm-border);
  background: #FFF;
}

.map-caption {
  padding: 8px 12px;
  background: #FFF;
  font-size: 12px;
  color: var(--tm-sage-dark);
  font-weight: 600;
  text-align: center;
}

/* ---------------- SECTION LOVE STORY ---------------- */
.story-section {
  background: var(--tm-paper);
}

.story-single-feature {
  background: #FFF;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--tm-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.story-img-card {
  height: 230px;
  background: var(--tm-sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.story-img-card img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.story-body-prose {
  padding: 22px 20px;
  text-align: left;
}

.story-body-prose p {
  font-size: 13.5px;
  color: var(--tm-ink);
  line-height: 1.7;
  margin-bottom: 12px;
  font-style: italic;
}

.story-closing {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--tm-sage-dark);
  margin-top: 16px;
  font-style: normal !important;
  font-weight: 600;
}

/* ---------------- SECTION ALBUM ẢNH ---------------- */
.gallery-section {
  background: #FFF;
}

/* Album dạng thu gọn 6 ảnh (+34 ảnh) mặc định & mở rộng masonry 2 cột */
.photo-grid {
  column-count: 2;
  column-gap: 8px;
}

.photo-grid.photo-grid--collapsed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  column-count: initial;
}

.photo-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--tm-sage-light);
  transition: transform 0.25s ease;
}

.photo-grid.photo-grid--collapsed .photo-card {
  margin-bottom: 0;
  aspect-ratio: 3 / 4;
}

.photo-grid.photo-grid--collapsed .photo-card.is-album-hidden {
  display: none;
}

.photo-card:hover {
  transform: scale(1.02);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-grid.photo-grid--collapsed .photo-card img {
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.photo-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 38, 30, 0.56);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFF;
  pointer-events: none;
  transition: background 0.25s ease;
}

.photo-grid:not(.photo-grid--collapsed) .photo-more-overlay {
  display: none;
}

.photo-card:hover .photo-more-overlay {
  background: rgba(24, 38, 30, 0.42);
}

.photo-more-count {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.photo-more-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  opacity: 0.94;
  margin-top: 4px;
  text-transform: uppercase;
}

.album-toggle-wrap {
  margin-top: 16px;
  text-align: center;
}

.album-toggle-btn {
  padding: 8px 20px;
  font-size: 12.5px;
  cursor: pointer;
}

/* ---------------- SECTION RSVP FORM ---------------- */
.rsvp-section {
  background: var(--tm-paper);
}

.custom-form {
  background: #FFF;
  border: 1.5px solid var(--tm-border);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--tm-sage-dark);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--tm-border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--tm-ink-dark);
  background: #FFF;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--tm-sage);
}

.radio-group {
  display: flex;
  gap: 8px;
}

.radio-pill {
  flex: 1;
  border: 1.5px solid var(--tm-border);
  border-radius: 8px;
  padding: 9px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.radio-pill input {
  display: none;
}

.radio-pill:has(input:checked) {
  border-color: var(--tm-sage);
  background: var(--tm-sage-light);
  color: var(--tm-sage-dark);
  font-weight: 700;
}

/* Lựa chọn phân loại khách 2 nhà theo chiều dọc */
.radio-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-pill-wide {
  border: 1.5px solid var(--tm-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tm-ink);
  cursor: pointer;
  background: #FFF;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.radio-pill-wide input {
  margin-right: 8px;
  accent-color: var(--tm-sage);
}

.radio-pill-wide:has(input:checked) {
  border-color: var(--tm-sage);
  background: var(--tm-sage-light);
  color: var(--tm-sage-dark);
  font-weight: 700;
}

.alert-box {
  margin-top: 16px;
  padding: 14px;
  background: #EDF5F0;
  border: 1px solid #C9E2D2;
  border-radius: 10px;
  color: var(--tm-sage-dark);
  font-size: 13px;
}

.alert-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.rsvp-stats-badge {
  margin-top: 12px;
  font-size: 12px;
  color: var(--tm-sage-dark);
  font-weight: 600;
  background: #FFF;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed var(--tm-sage);
}

/* ---------------- SECTION GUESTBOOK ---------------- */
.guestbook-section {
  background: #FFF;
}

.wishes-scroll-box {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  text-align: left;
}

.wishes-scroll-box:empty {
  display: none;
  margin-top: 0;
}

.wishes-scroll-box::-webkit-scrollbar {
  width: 3.5px;
}

.wishes-scroll-box::-webkit-scrollbar-thumb {
  background: var(--tm-border);
  border-radius: 4px;
}

.wish-item {
  background: var(--tm-card-soft);
  border: 1px solid var(--tm-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.wish-header {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--tm-sage-dark);
  font-weight: 600;
  margin-bottom: 4px;
}

.wish-time {
  font-size: 11px;
  color: var(--tm-ink-muted);
  font-weight: normal;
}

.wish-body {
  font-size: 13px;
  color: var(--tm-ink);
  line-height: 1.5;
}

/* ---------------- SECTION HỘP MỪNG CƯỚI ---------------- */
.gift-section {
  background: var(--tm-paper);
}

.gift-tabs {
  display: flex;
  background: #EAF2EC;
  padding: 3px;
  border-radius: 25px;
  margin-bottom: 18px;
}

.gift-tab-btn {
  flex: 1;
  padding: 9px;
  border-radius: 22px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--tm-sage-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.gift-tab-btn.active {
  background: #FFF;
  color: var(--tm-sage-dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.gift-card {
  background: #FFF;
  border: 1.5px solid var(--tm-border);
  border-radius: 16px;
  padding: 22px;
}

.bank-qr-box {
  width: 190px;
  height: 190px;
  margin: 0 auto 16px;
  border: 1px solid var(--tm-border);
  border-radius: 10px;
  padding: 6px;
  background: #FFF;
}

.bank-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bank-qr-box.qr-screenshot-fit {
  width: 230px;
  height: 270px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.bank-qr-box.qr-screenshot-fit img {
  object-fit: cover;
  object-position: center 22%;
}

.bank-details p {
  font-size: 13px;
  margin-bottom: 5px;
  color: var(--tm-ink);
}

.copyable-stk {
  color: var(--tm-sage-dark);
  letter-spacing: 0.5px;
}

.btn-copy {
  margin-top: 8px;
  background: var(--tm-sage-light);
  color: var(--tm-sage-dark);
  border: 1.5px solid var(--tm-sage);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: var(--tm-sage);
  color: #FFF;
}

/* ---------------- SECTION TẠO LINK KHÁCH & SHARE ---------------- */
.share-tool-section {
  background: #FFF;
}

.link-generator-box {
  background: var(--tm-paper);
  border: 1.5px dashed var(--tm-sage);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}

.link-generator-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--tm-border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  margin-bottom: 10px;
  outline: none;
}

.link-preview-text {
  margin-top: 8px;
  font-size: 11.5px;
  word-break: break-all;
  color: var(--tm-sage-dark);
  font-weight: 600;
}

.social-share-buttons {
  display: flex;
  gap: 10px;
}

.btn-share {
  flex: 1;
  padding: 10px;
  border-radius: 25px;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #FFF;
  cursor: pointer;
}

.btn-share.zalo {
  background: #0068FF;
}

.btn-share.fb {
  background: #1877F2;
}

/* ---------------- FOOTER ---------------- */
.footer-section {
  background: var(--tm-paper);
  padding: 44px 20px;
  border-top: 1px solid var(--tm-border);
}

.closing-mark {
  margin-bottom: 10px;
}

.clover-icon {
  font-size: 22px;
  color: var(--tm-sage);
}

.footer-names {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--tm-sage-dark);
  margin-bottom: 6px;
}

.thank-you-text {
  font-size: 13px;
  color: var(--tm-ink-muted);
  max-width: 300px;
  margin: 0 auto 14px;
  line-height: 1.6;
}

.footer-date {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--tm-sage-dark);
  font-weight: 700;
}

/* ======================================================== */
/* 4. LIGHTBOX & TOAST                                      */
/* ======================================================== */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(20, 25, 22, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.photo-lightbox.hidden {
  display: none;
}

.lb-stage {
  position: absolute;
  inset: 0 0 64px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lb-stage img {
  max-width: 94vw;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 6px;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  will-change: transform;
}

.lb-stage.is-zoomed img { cursor: grab; }
.lb-stage img.loading { opacity: 0.35; }

.lb-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
}

.lb-counter {
  min-width: 56px;
  text-align: center;
  color: #FFF;
  font-size: 13px;
  letter-spacing: 2px;
}

.lb-zoom {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFF;
  font-size: 22px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

/* Ảnh có thể bấm để phóng to */
img.zoomable { cursor: zoom-in; }

.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFF;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFF;
  font-size: 32px;
  width: 42px;
  height: 56px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10020;
  background: rgba(42, 71, 54, 0.95);
  color: #FFF;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
}

.hidden {
  display: none !important;
}

/* ======================================================== */
/* 5. BADGE LỄ CƯỚI RIÊNG & TRANG CHỌN THIỆP (PORTAL)       */
/* ======================================================== */
.hero-ceremony-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 16px;
  border-radius: 20px;
  background: var(--tm-sage-light);
  border: 1px solid var(--tm-border);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--tm-sage-dark);
  text-transform: uppercase;
}

.single-map-wrap {
  margin-top: 18px;
}

.single-gift-card {
  max-width: 360px;
  margin: 0 auto;
}

.side-switch-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--tm-ink-muted);
}

.side-switch-hint a {
  color: var(--tm-sage);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--tm-sage-border);
  padding-bottom: 1px;
}

.side-switch-hint a:hover {
  color: var(--tm-sage-dark);
}

/* Trang Cổng Chọn Thiệp (index.html) */
.portal-section {
  padding: 36px 22px 44px;
  background: radial-gradient(circle at 50% 10%, #FFFFFF 0%, var(--tm-paper) 100%);
  min-height: 100vh;
}

.portal-arch-frame {
  width: 210px;
  height: 275px;
  margin-bottom: 16px;
}

.portal-subtitle {
  font-size: 13px;
  color: var(--tm-ink-muted);
  margin: 4px auto 22px;
  max-width: 340px;
}

.portal-choices {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 auto 28px;
}

.portal-choice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #FFF;
  border: 1.5px solid var(--tm-border);
  border-radius: 16px;
  text-decoration: none;
  text-align: left;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(55, 83, 68, 0.06);
}

.portal-choice-card:hover {
  border-color: var(--tm-sage);
  background: var(--tm-sage-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(55, 83, 68, 0.14);
}

.portal-choice-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tm-sage-light);
  border: 1px solid var(--tm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.portal-choice-info {
  flex: 1;
}

.portal-choice-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--tm-sage);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.portal-choice-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--tm-sage-dark);
  margin-bottom: 2px;
}

.portal-choice-meta {
  font-size: 12px;
  color: var(--tm-ink-muted);
}

.portal-choice-arrow {
  font-size: 20px;
  color: var(--tm-sage);
  font-weight: 600;
}

.portal-side-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.portal-side-pill {
  flex: 1;
  padding: 8px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--tm-border);
  background: #FFF;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--tm-sage-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.portal-side-pill.active {
  background: var(--tm-sage);
  color: #FFF;
  border-color: var(--tm-sage);
}

/* ======================================================== */
/* 6. LỜI CHÚC HIỆN LẦN LƯỢT RỒI MỜ DẦN                      */
/* ======================================================== */
.wishes-stage {
  margin-top: 20px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  overflow: hidden;
}

.wish-float {
  max-height: 280px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.wish-float.is-in {
  opacity: 1;
  transform: translateY(0);
}

.wish-float.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 1.8s ease, transform 1.8s ease;
}

.wish-float.is-gone {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
}

.wish-float .wish-body {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wish-empty {
  text-align: center;
  font-size: 13px;
  color: var(--tm-ink-muted);
  padding: 20px 0;
}

.wish-count {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--tm-ink-muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .wish-float,
  .wish-float.is-leaving { transition-duration: 0.01s; transform: none; }
}