/* ===================================================
   WEDDING INVITATION - VIỆT CƯỜNG & LÊ MAI
   Compact, Elegant, Mobile-First Design
   =================================================== */

:root,
body.theme-vintage {
  /* Vintage Theme (Concept Tường Loang Warm Sand & Roasted Mocha) */
  --bg-wall: #E8E2D8;
  --bg-card: #FAF8F5;
  --bg-card-subtle: #F2ECE2;
  --bg-card-glass: rgba(250, 248, 245, 0.94);
  --text-main: #4A3528; /* Warm roasted mocha / vintage espresso brown */
  --text-muted: #826D5F; /* Warm earthy taupe / soft sepia */
  --primary: #7A5B43; /* Vintage warm terracotta / roasted chestnut */
  --primary-hover: #634731;
  --primary-light: #EFE6DC;
  --accent-gold: #B89047;
  --accent-gold-light: #E8D8B6;
  --border-color: #DCD2C5;
  --shadow-sm: 0 4px 12px rgba(74, 53, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(74, 53, 40, 0.08);
  --shadow-lg: 0 16px 40px rgba(74, 53, 40, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-title: 'Playfair Display', Georgia, serif;
  --font-cinzel: 'Playfair Display', Georgia, serif;
  --font-script: 'MonteCarlo', cursive;
  --font-sans: 'Plus Jakarta Sans', 'Montserrat', system-ui, -apple-system, sans-serif;
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-wall);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* COMPACT INVITATION CONTAINER (MAX 440px) */
.invitation-wrapper {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: var(--bg-card);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0,0,0,0.15);
  position: relative;
  overflow-x: hidden;
}

/* FLOATING CONTROLS */
.floating-actions {
  position: fixed;
  bottom: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  right: calc(18px + env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.floating-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(184, 144, 71, 0.45);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(74, 53, 40, 0.22);
  font-size: 1.15rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.floating-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent-gold);
  box-shadow: 0 6px 18px rgba(74, 53, 40, 0.28);
}

.floating-btn:active {
  transform: scale(0.92);
}

.floating-btn.music-playing {
  animation: pulse-music 2s infinite;
}

.music-disc-svg {
  display: block;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.floating-btn.music-playing .music-disc-svg {
  animation: spin-record 3.5s linear infinite;
}

@keyframes spin-record {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-music {
  0% { box-shadow: 0 0 0 0 rgba(184, 144, 71, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(184, 144, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 144, 71, 0); }
}



/* ===================================================
   1. ENVELOPE COVER SCREEN (MÀN HÌNH BÌA NGANG VINTAGE - CHUẨN ẢNH 1)
   =================================================== */
html.envelope-locked,
body.envelope-locked {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

.envelope-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #8C5740; /* Vintage Terracotta Background */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  text-align: center;
  transition: opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1), transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
  touch-action: none;
}

.envelope-screen.opened {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

/* FLOATING GENTLE BLOSSOM PETALS */
.envelope-petals-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.envelope-petals-layer .petal {
  position: absolute;
  font-size: 1.25rem;
  opacity: 0.45;
  filter: blur(0.3px);
  animation: floatPetal 9s infinite ease-in-out;
}

.petal.p1 { top: 8%; left: 10%; animation-delay: 0s; }
.petal.p2 { top: 18%; right: 12%; animation-delay: 2.2s; }
.petal.p3 { bottom: 16%; left: 14%; animation-delay: 4.5s; }
.petal.p4 { bottom: 10%; right: 16%; animation-delay: 6.8s; }

@keyframes floatPetal {
  0% { transform: translateY(0) rotate(0deg) scale(0.9); opacity: 0.35; }
  50% { transform: translateY(-15px) rotate(20deg) scale(1.1); opacity: 0.6; }
  100% { transform: translateY(0) rotate(0deg) scale(0.9); opacity: 0.35; }
}

/* HORIZONTAL VINTAGE CARD (RATIO ~16:10.5) */
.vintage-landscape-envelope {
  position: relative;
  width: 92%;
  max-width: 620px;
  min-height: 380px;
  background-color: #FAF5ED;
  border-radius: 18px;
  padding: 38px 28px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* CORNER BOTANICAL WATERMARK */
.envelope-corner-art {
  position: absolute;
  width: 140px;
  height: 140px;
  pointer-events: none;
  z-index: 1;
}

.envelope-corner-art.top-left {
  top: 0;
  left: 0;
}

.envelope-corner-art.bottom-right {
  bottom: 0;
  right: 0;
}

.envelope-corner-art svg {
  width: 100%;
  height: 100%;
}

/* WAX SEAL BADGE (TOP CENTER) */
.vintage-wax-seal-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #8C5740;
  box-shadow: 0 4px 14px rgba(140, 87, 64, 0.38), inset 0 2px 4px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.wax-seal-hy-symbol {
  font-family: var(--font-cinzel), serif;
  font-size: 1.55rem;
  color: #FFE6B0;
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  display: block;
  transform: translateY(-1px);
}

.wax-seal-heart-icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* ENVELOPE BODY CONTENT */
.vintage-envelope-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.envelope-couple-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vintage-name-line {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  font-weight: 600;
  color: #7A5137;
  letter-spacing: 0.5px;
  line-height: 1.25;
  white-space: nowrap;
}

.vintage-amp-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  color: #B89047;
  line-height: 1;
  margin: 1px 0;
}

/* ORNAMENT DIVIDER */
.vintage-ornament-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 140px;
  margin: 12px auto 10px;
}

.vintage-sep-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, rgba(168, 120, 85, 0.5), transparent);
}

.vintage-sep-leaf {
  font-size: 0.95rem;
  color: #8C5740;
}

/* WEDDING DATE */
.vintage-date-line {
  font-family: var(--font-serif);
  font-size: clamp(0.88rem, 2.2vw, 1.05rem);
  color: #7A5B43;
  margin-bottom: 12px;
  white-space: nowrap;
}

/* GUEST SALUTATION */
.vintage-guest-container {
  margin-bottom: 18px;
}

.vintage-guest-caption {
  font-size: 0.88rem;
  color: #8A7B6D;
  margin-bottom: 4px;
  white-space: nowrap;
}

.vintage-guest-target {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.8vw, 1.32rem);
  font-weight: 600;
  color: #5A3E2B;
  white-space: nowrap;
}

/* PILL OPEN BUTTON */
.vintage-open-pill-btn {
  background: #8C5740;
  color: #FFFFFF;
  border: none;
  padding: 10px 36px;
  border-radius: 50px;
  font-size: 0.96rem;
  font-weight: 600;
  font-family: var(--font-serif);
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(140, 87, 64, 0.35);
  transition: all 0.25s ease;
  white-space: nowrap;
  animation: pulse-scale 2.5s infinite;
}

.vintage-open-pill-btn:hover {
  background: #75442F;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(140, 87, 64, 0.45);
}

@media (max-width: 480px) {
  .vintage-landscape-envelope {
    padding: 26px 16px 20px;
    min-height: 350px;
  }
  .envelope-corner-art {
    width: 100px;
    height: 100px;
  }
  .vintage-wax-seal-badge {
    width: 42px;
    height: 42px;
    margin-bottom: 8px;
  }
  .wax-seal-heart-icon {
    width: 18px;
    height: 18px;
  }
  .vintage-ornament-sep {
    margin: 8px auto 8px;
  }
  .vintage-guest-container {
    margin-bottom: 14px;
  }
  .vintage-open-pill-btn {
    padding: 8px 28px;
    font-size: 0.9rem;
  }
}

/* ===================================================
   2. MAIN CARD LAYOUT (MATCHING REFERENCE IMAGE)
   =================================================== */
.main-invitation-content {
  display: flex;
  flex-direction: column;
}

/* ===================================================
   HERO POLAROID & BOTANICAL VINTAGE SECTION
   (EXACT MATCH TO REFERENCE PHOTO & CHUNGDOI DEMO)
   =================================================== */
.hero-polaroid-section {
  position: relative;
  width: 100%;
  padding: 40px 20px 24px;
  text-align: center;
  overflow: hidden;
  background: var(--bg-card);
  box-sizing: border-box;
}

/* Botanical branch on left edge (translucent watercolor from ChungDoi) */
.hero-botanical-branch {
  position: absolute;
  top: 15px;
  left: -70px;
  width: 155px;
  height: auto;
  max-height: 520px;
  opacity: 0.32;
  pointer-events: none;
  z-index: 1;
  filter: brightness(0.96) sepia(0.12);
  transform: rotate(-3deg);
  transition: opacity 0.3s ease;
}

/* Header typography on top */
.hero-typography-header {
  position: relative;
  z-index: 5;
  margin-bottom: 24px;
  padding: 0 16px;
}

.hero-pretitle {
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.88;
}

.hero-couple-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1.25;
  margin: 0;
}

.hero-amp-sign {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
  margin: 0 4px;
  font-size: 0.95em;
}

/* Polaroid wrapper & realistic instant photo frame */
.hero-polaroid-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0 16px;
}

.polaroid-card {
  position: relative;
  width: 86%;
  max-width: 365px;
  background: #FFFFFF;
  padding: 14px 14px 44px 14px;
  border-radius: 3px;
  box-shadow: 
    0 18px 40px rgba(47, 42, 40, 0.14),
    0 6px 14px rgba(47, 42, 40, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  transform: rotate(-2.8deg);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
  box-sizing: border-box;
}

.polaroid-card:hover {
  transform: rotate(-1.5deg) translateY(-5px) scale(1.01);
  box-shadow: 
    0 26px 52px rgba(47, 42, 40, 0.2),
    0 10px 22px rgba(47, 42, 40, 0.12);
}

/* Kraft washi masking tape with realistic jagged torn edges */
.washi-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(1.2deg);
  width: 100px;
  height: 28px;
  background: rgba(228, 214, 192, 0.88);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.12) 2px,
    transparent 2px,
    transparent 6px
  );
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 6px rgba(47, 42, 40, 0.1);
  clip-path: polygon(
    0% 0%, 
    96% 0%, 100% 12%, 97% 28%, 100% 45%, 96% 62%, 100% 78%, 97% 92%, 100% 100%, 
    0% 100%, 
    3% 88%, 0% 72%, 4% 52%, 0% 36%, 3% 18%
  );
  z-index: 10;
  pointer-events: none;
}

/* The photo frame inside Polaroid */
.polaroid-photo-frame {
  position: relative;
  width: 100%;
  background: #F3EFE9;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
}

.polaroid-photo-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 4.9;
  object-fit: cover;
  object-position: center top;
  border-radius: 1px;
  cursor: pointer;
  transition: transform 0.6s ease;
}

.polaroid-card:hover .polaroid-photo-img {
  transform: scale(1.025);
}

/* Dried baby's breath botanical sprig at bottom-left corner */
.polaroid-dried-flower {
  position: absolute;
  bottom: -22px;
  left: -32px;
  width: 135px;
  height: auto;
  z-index: 15;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(47, 42, 40, 0.22));
  transform: rotate(-10deg);
  transition: transform 0.4s ease;
}

.polaroid-card:hover .polaroid-dried-flower {
  transform: rotate(-7deg) scale(1.03);
}

/* Organic 3D melted gold wax seal stamp with heart at bottom-right */
.polaroid-gold-seal {
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 76px;
  height: 76px;
  z-index: 16;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(80, 55, 20, 0.32));
  transform: rotate(8deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.polaroid-card:hover .polaroid-gold-seal {
  transform: rotate(14deg) scale(1.08);
}

/* Mobile responsive adjustments for Polaroid hero & 3D Coverflow */
@media (max-width: 480px) {
  .hero-polaroid-section {
    padding: 34px 14px 20px;
  }
  .hero-botanical-branch {
    width: 130px;
    left: -76px;
    top: 10px;
    opacity: 0.28;
    transform: rotate(-5deg);
  }
  .hero-typography-header {
    margin-bottom: 20px;
    padding: 0 10px;
  }
  .hero-couple-title {
    font-size: 1.95rem;
    line-height: 1.25;
  }
  .polaroid-card {
    width: 88%;
    padding: 11px 11px 38px 11px;
  }
  .washi-tape {
    width: 85px;
    height: 25px;
    top: -12px;
  }
  .polaroid-dried-flower {
    width: 112px;
    bottom: -18px;
    left: -24px;
  }
  .polaroid-gold-seal {
    width: 65px;
    height: 65px;
    bottom: -13px;
    right: -12px;
  }
}

/* COMPACT HEADER SECTION */
.compact-header-section {
  padding: 24px 20px 18px;
  text-align: center;
}

.salute-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.guest-salute-name {
  font-family: var(--font-script);
  font-size: 2.35rem;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 12px;
  font-weight: 500;
}

.header-divider-line {
  width: 85%;
  height: 1px;
  background: var(--border-color);
  margin: 0 auto 16px;
}

.monogram-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px auto 10px;
}

.mono-letter {
  font-family: var(--font-script);
  font-size: 3.8rem;
  font-weight: 500;
  color: var(--primary);
  line-height: 0.95;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(184, 144, 71, 0.18);
  display: inline-block;
  transition: transform 0.3s ease;
}

.mono-letter:hover {
  transform: scale(1.06);
}

.mono-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-10deg);
  filter: drop-shadow(0 1px 2px rgba(184, 144, 71, 0.25));
}

.couple-headline {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 7vw, 3rem);
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  line-height: 1.2;
  text-align: center;
}

.ceremony-badge-tag {
  display: inline-block;
  font-family: var(--font-cinzel);
  font-size: 0.76rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.header-announce-block {
  margin-bottom: 12px;
  text-align: center;
}

.announce-lead {
  display: block;
  font-family: var(--font-cinzel);
  font-size: 0.96rem;
  letter-spacing: 2px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.announce-sub {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.5px;
}

.calendar-intro-block {
  margin-top: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.calendar-ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.calendar-ornament-line::before,
.calendar-ornament-line::after {
  content: "";
  height: 1px;
  width: 45px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.ornament-leaf {
  color: var(--accent-gold);
  font-size: 1rem;
  line-height: 1;
}

.calendar-section-title {
  font-family: var(--font-cinzel);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.calendar-ceremony-sub {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.calendar-ceremony-sub strong {
  color: var(--primary);
  font-weight: 600;
}

/* ===================================================
   WEDDING TIME BADGE & MONTHLY CALENDAR CARD
   =================================================== */
.wedding-time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.wedding-calendar-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  max-width: 360px;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-sm);
}

.wcal-header {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.wcal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding: 7px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 2px solid var(--primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.wcal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 10px;
  padding-top: 14px;
  text-align: center;
}

.wcal-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.wcal-day-cell.empty {
  pointer-events: none;
}

.wcal-day-cell.heart-marked {
  position: relative;
}

.wcal-heart-svg {
  position: absolute;
  width: 34px;
  height: 34px;
  fill: var(--primary);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

.wcal-heart-num {
  position: relative;
  z-index: 1;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  transform: translateY(-1px);
}

.lunar-note-text {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* COUNTDOWN MINI STRIP */
.countdown-mini-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.cd-item {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.cd-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.cd-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cd-sep {
  color: var(--border-color);
  font-weight: bold;
}

/* ===================================================
   3. VENUE SECTION (ĐỊA ĐIỂM TỔ CHỨC)
   Matching User Sample Image with Merged Direction Button
   =================================================== */
.compact-venue-section {
  padding: 20px 20px 24px;
  text-align: center;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.venue-main-title {
  font-family: var(--font-cinzel);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text-main);
  margin-bottom: 18px;
}

.venue-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.venue-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
}

.venue-side-badge {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.venue-owner-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

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

/* SINGLE MERGED DIRECTION BUTTON */
.direction-merged-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 24px;
  border: 1.5px solid var(--primary);
  background: var(--bg-card);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.direction-merged-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.venue-middle-sep {
  width: 50px;
  height: 1px;
  background: var(--border-color);
  margin: 0 auto;
}

/* INTERACTIVE MAP PREVIEW TABS */
.map-embed-wrapper {
  margin-top: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.map-switch-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.map-tab-btn {
  flex: 1;
  padding: 8px;
  background: var(--bg-card-subtle);
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.map-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.map-frame {
  width: 100%;
  height: 200px;
  border: none;
  display: block;
}

/* ===================================================
   4. TIMELINE SECTION (STREAMLINED & CONNECTED)
   =================================================== */
.compact-timeline-section {
  padding: 24px 20px;
  text-align: center;
}

.timeline-main-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-main);
  margin-bottom: 18px;
  text-transform: uppercase;
}

/* CONNECTED TIMELINE STEPPER */
.timeline-stepper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 18px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tl-step-item {
  display: flex;
  gap: 14px;
  position: relative;
}

.tl-step-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.tl-step-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FAF5ED;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 14px rgba(122, 91, 67, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.tl-step-node.special-highlight {
  border-color: var(--primary);
  background: #FFFDF9;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(122, 91, 67, 0.28), 0 0 14px rgba(212, 175, 55, 0.35);
}

.tl-svg-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.tl-step-line {
  width: 2px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(180deg, var(--accent-gold) 0%, var(--border-color) 100%);
  margin: 4px 0;
  border-radius: 2px;
}

.tl-step-body {
  padding-bottom: 22px;
  flex: 1;
  padding-top: 2px;
}

.tl-step-item:last-child .tl-step-body {
  padding-bottom: 4px;
}

.tl-step-time {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1.5px;
  margin-bottom: 2px;
  line-height: 1.1;
}

.tl-step-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3px;
  line-height: 1.25;
}

.tl-step-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===================================================
   5. 3D COVERFLOW WEDDING ALBUM (CHUẨN SANG TRỌNG NHƯ CHUNGĐÔI)
   =================================================== */
.compact-album-section {
  padding: 28px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.album-header-wrap {
  text-align: center;
  margin-bottom: 18px;
}

.album-badge-tag {
  display: inline-block;
  font-family: var(--font-cinzel);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.album-main-heading {
  font-family: var(--font-cinzel);
  font-size: 1.25rem;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.album-ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.album-ornament-line::before,
.album-ornament-line::after {
  content: "";
  height: 1px;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

/* ==================================================
   3D COVERFLOW ALBUM — Exact Chungdoi formula
   JS applies transforms as inline styles per card.
   CSS handles container sizing and transition timing.
   ================================================== */
.coverflow-album-container {
  position: relative;
  width: 100%;
  max-width: 432px;
  height: 330px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: pan-y;
}

.cf-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;  /* Exact Chungdoi value */
}

.cf-card {
  position: absolute;
  height: 92%;          /* Exact Chungdoi value */
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  outline: none;
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  /* Chungdoi-style: transition-all 1100ms ease-in-out bao gồm cả z-index */
  transition: all 1100ms ease-in-out;
  will-change: transform, opacity, z-index;
}

.cf-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hiệu ứng hover sang trọng, tinh tế: zoom nhẹ ảnh không che mặt, không dùng kính lúp */
@media (hover: hover) and (pointer: fine) {
  .cf-card.is-active:hover img {
    transform: scale(1.035);
  }
}

/* Nav arrows — hidden on mobile (swipe only, mirrors Chungdoi) */
.cf-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.8);
  border: 1px solid var(--border-color);
  color: var(--primary);
  display: none;         /* hidden by default (mobile-first) */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.cf-nav-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.1);
}

.cf-nav-btn.cf-prev {
  left: 4px;
}

.cf-nav-btn.cf-next {
  right: 4px;
}

/* Dots Indicator */
.cf-dots-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.cf-dot {
  padding: 0;
  border: none;
  height: 6px;
  width: 6px;
  border-radius: 9999px;
  background-color: #D1C7BD;
  opacity: 1;
  cursor: pointer;
  /* Chuyển trực tiếp từ Nâu sang Xám 1100ms ease-in-out, không bị lóa trắng */
  transition: width 1100ms ease-in-out, background-color 1100ms ease-in-out;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.cf-dot.active {
  width: 22px;
  background-color: var(--primary);
}

/* ===================================================
   RESPONSIVE: Chuẩn cho màn 380px và màn to Desktop
   =================================================== */
@media (max-width: 380px) {
  .coverflow-album-container {
    height: 305px; /* Chiều cao cân đối giúp card không chiếm quá nhiều diện tích trên màn 380px */
  }
}

@media (min-width: 576px) {
  .coverflow-album-container {
    max-width: 460px;
    height: 375px; /* Tỉ lệ vàng ~54% card/stage như trang mẫu Chungdoi */
  }

  .cf-nav-btn {
    display: flex; /* Hiện nút điều hướng desktop */
  }
}

.album-open-slide-btn {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 22px;
  border-radius: 24px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.album-open-slide-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

/* LIGHTBOX MODAL */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

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

.lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 75vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  color: #FFFFFF;
}

.lightbox-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #FFFFFF;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

/* ===================================================
   6. RSVP SECTION (MỞ POPUP ẢNH 1)
   =================================================== */
.compact-rsvp-section {
  padding: 24px 20px;
  text-align: center;
}

.rsvp-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
}

.rsvp-card-title {
  font-family: var(--font-cinzel);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.rsvp-card-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.rsvp-trigger-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent-gold));
  color: #FFFFFF;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(122, 91, 67, 0.25);
  transition: all 0.2s;
}

.rsvp-trigger-btn:hover {
  transform: translateY(-2px);
}

/* MODAL RSVP (EXACT IMAGE 1 REPRODUCTION) */
.rsvp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rsvp-modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.rsvp-modal-box {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 26px 22px;
  width: 100%;
  max-width: 390px;
  position: relative;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.rsvp-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.rsvp-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--primary);
  margin-bottom: 6px;
}

.rsvp-modal-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.rsvp-field-group {
  margin-bottom: 18px;
}

.rsvp-field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.rsvp-input-text {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card-subtle);
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.rsvp-input-text:focus {
  border-color: var(--primary);
}

.rsvp-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsvp-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-card-subtle);
}

.rsvp-option-item.selected {
  border: 1.5px solid var(--primary);
  background: var(--primary-light);
}

.rsvp-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-wall);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rsvp-option-item.selected .rsvp-icon-circle.accept {
  background: #48BB78;
  color: #FFFFFF;
}

.rsvp-option-item.selected .rsvp-icon-circle.decline {
  background: #E53E3E;
  color: #FFFFFF;
}

.rsvp-option-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
}

.rsvp-submit-btn {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
  transition: background 0.2s;
}

.rsvp-submit-btn:hover {
  background: var(--primary-hover);
}

/* ===================================================
   7. GUESTBOOK (SỔ LƯU BÚT - CHUẨN ẢNH 2)
   With clear text for Anonymous button
   =================================================== */
.compact-guestbook-section {
  padding: 22px 20px;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.guestbook-box-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
}

.gb-title {
  font-family: var(--font-cinzel);
  font-size: 1.25rem;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 700;
}

.gb-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.gb-input-row {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}

.gb-textarea-row {
  width: 100%;
  height: 80px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  resize: none;
}

.gb-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Anonymous Button with Clear Text */
.gb-anon-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.gb-anon-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.gb-send-btn {
  background: #8F6655;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
}

.gb-send-btn:hover {
  background: #7B5444;
}

.wishes-list-container {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.wish-item-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
}

.wish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.wish-sender-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wish-avatar {
  font-size: 0.95rem;
}

.wish-sender-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
}

.wish-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.wish-message {
  font-size: 0.86rem;
  color: var(--text-main);
  line-height: 1.45;
}

/* ===================================================
   8. GIFT BOX - REALISTIC LUXURY WEDDING ENVELOPES (LÌ XÌ NGOÀI ĐỜI)
   =================================================== */
.compact-gift-section {
  padding: 28px 20px 24px;
  text-align: center;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}

.gift-header-title {
  font-family: var(--font-cinzel);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.gift-header-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  text-wrap: pretty;
}

/* REALISTIC ENVELOPES STAGE */
.vintage-gift-stage {
  position: relative;
  padding: 12px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vintage-envelopes-wrapper {
  position: relative;
  width: 300px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* INDIVIDUAL PHYSICAL ENVELOPE CARD */
.vintage-envelope-card {
  position: absolute;
  width: 152px;
  height: 232px;
  background: linear-gradient(155deg, #FFFDF8 0%, #FAF3E5 100%);
  border: 1.5px solid #D4AF37;
  border-radius: 12px;
  box-shadow: 0 18px 38px rgba(70, 45, 30, 0.22), 0 4px 12px rgba(70, 45, 30, 0.1);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* LEFT ENVELOPE (GROOM) - ALWAYS HIGHER THAN IDLE BRIDE */
.vintage-envelope-card.env-groom {
  left: 24px;
  top: 10px;
  transform: rotate(-13deg);
  z-index: 3;
}

.vintage-envelope-card.env-groom:hover,
.vintage-envelope-card.env-groom:focus-visible {
  transform: rotate(-13deg) translateY(-10px) scale(1.05);
  z-index: 4;
  box-shadow: 0 24px 50px rgba(70, 45, 30, 0.32), 0 0 25px rgba(212, 175, 55, 0.4);
  border-color: #B89047;
  outline: none;
}

/* RIGHT ENVELOPE (BRIDE) - BEHIND GROOM UNLESS ACTIVELY HOVERED */
.vintage-envelope-card.env-bride {
  right: 24px;
  top: 22px;
  transform: rotate(14deg);
  z-index: 1;
}

.vintage-envelope-card.env-bride:hover,
.vintage-envelope-card.env-bride:focus-visible {
  transform: rotate(14deg) translateY(-10px) scale(1.05);
  z-index: 5;
  box-shadow: 0 24px 50px rgba(70, 45, 30, 0.32), 0 0 25px rgba(212, 175, 55, 0.4);
  border-color: #B89047;
  outline: none;
}

/* REALISTIC FOLDED TOP FLAP */
.env-flap-tri {
  position: relative;
  width: 100%;
  height: 58px;
  background: linear-gradient(180deg, #FAF4E6 0%, #F3E5CD 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 2.5px solid #C49A45;
  filter: drop-shadow(0 3px 5px rgba(122, 91, 67, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
}

.env-flap-seal {
  font-size: 0.92rem;
  color: #B89047;
  transform: translateY(-8px);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

.env-card-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 8px 10px;
  position: relative;
}

/* INNER GOLD EMBOSSED FRAME */
.env-gold-frame {
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 6px;
  padding: 8px 4px 6px;
  width: calc(100% - 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 8px rgba(212, 175, 55, 0.08);
}

/* CREST SEAL (RED & GOLD DOUBLE HAPPINESS) */
.env-crest-seal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #B52B3A;
  border: 1.5px solid #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(181, 43, 58, 0.35);
  margin-bottom: 4px;
}

.env-crest-symbol {
  font-size: 1.05rem;
  color: #FFE6B0;
  line-height: 1;
  font-weight: 700;
}

.env-role-badge {
  font-family: var(--font-cinzel);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7A5B43;
  margin-bottom: 2px;
}

.env-char-name {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.env-touch-cue {
  font-size: 0.7rem;
  color: #7A5B43;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* BOTANICAL WATERMARK AT BOTTOM */
.env-botanical-bottom {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  opacity: 0.55;
  pointer-events: none;
}

.env-botanical-bottom svg {
  width: 100%;
  height: auto;
}

/* SOFT SPARKLES */
.sparkle {
  position: absolute;
  color: #D4AF37;
  font-size: 1.05rem;
  pointer-events: none;
  animation: sparkleTwinkle 2.5s infinite ease-in-out;
}

.sparkle-1 { top: 8px; left: 14%; animation-delay: 0s; }
.sparkle-2 { top: 30px; right: 15%; animation-delay: 0.9s; }
.sparkle-3 { top: 2px; right: 35%; font-size: 0.8rem; animation-delay: 1.7s; }

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); filter: drop-shadow(0 0 8px #D4AF37); }
}

.vintage-gift-hint {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: #8C6A53;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* QR MODAL */
.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.qr-modal-backdrop.active {
  display: flex;
}

.qr-modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  position: relative;
  border: 1px solid var(--border-color);
}

.qr-modal-image {
  width: 190px;
  height: 190px;
  margin: 12px auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  padding: 6px;
}

.qr-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bank-info-table {
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px 0 16px;
  text-align: left;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
}

.bank-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.bank-info-row:last-child {
  margin-bottom: 0;
}

.bank-info-row span.label {
  color: var(--text-muted);
}

.bank-info-row span.value {
  font-weight: 600;
  color: var(--text-main);
}

.qr-modal-action-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-download-qr {
  flex: 1;
  padding: 10px 12px;
  border-radius: 24px;
  background: #634731;
  color: #FFFFFF;
  border: 1px solid var(--accent-gold);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-download-qr:hover {
  background: #4E3423;
  transform: translateY(-1px);
}

.btn-copy-account {
  flex: 1;
  padding: 10px 12px;
  border-radius: 24px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

/* ===================================================
   9. LINK GENERATOR TOOL (DÂU RỂ TẠO LINK 1 PARAM)
   =================================================== */
.link-gen-btn {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 9px 20px;
  border-radius: 30px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(74, 53, 40, 0.3);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.link-gen-btn:hover {
  background: var(--primary-hover);
  transform: translateX(-50%) translateY(-2px);
}

.generator-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.generator-modal-backdrop.active {
  display: flex;
}

.generator-modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 100%;
  max-width: 400px;
  position: relative;
  border: 1px solid var(--border-color);
}

.gen-form-group {
  margin-bottom: 12px;
}

.gen-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.gen-select, .gen-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
}

.gen-preview-box {
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin: 14px 0;
  text-align: center;
}

.gen-preview-box small {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.gen-preview-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--primary);
  font-weight: 600;
}

.gen-copy-btn {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ===================================================
   10. FOOTER
   =================================================== */
.compact-footer {
  text-align: center;
  padding: 30px 20px 64px;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
}

.footer-couple-script {
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.footer-message {
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 300px;
  margin: 0 auto;
}

.footer-heart {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 14px;
  letter-spacing: 1px;
}

/* TOAST */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: #5A3E2B;
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 3000;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   TYPOGRAPHY BALANCING & ANTI-AWKWARD WORD BREAKING
   =================================================== */
.no-wrap {
  white-space: nowrap !important;
}

h1, h2, h3, .venue-main-title, .timeline-main-title, .gift-header-title, .rsvp-card-title, .gb-title {
  text-wrap: balance;
}

p, .venue-addr-text, .tl-step-desc, .rsvp-modal-subtitle, .gift-header-desc, .footer-message {
  text-wrap: pretty;
  line-height: 1.55;
}

/* ===================================================
   DESKTOP RESPONSIVE BREAKPOINT (EXPANDED TO 580px)
   =================================================== */
@media (min-width: 768px) {
  .invitation-wrapper {
    max-width: 580px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18), 0 0 2px rgba(0, 0, 0, 0.2);
  }

  .compact-venue-section,
  .compact-timeline-section,
  .compact-guestbook-section,
  .compact-rsvp-section,
  .compact-gift-section {
    padding-left: 32px;
    padding-right: 32px;
  }

  .vintage-envelopes-wrapper {
    width: 320px;
    height: 270px;
  }

  .vintage-envelope-card {
    width: 160px;
    height: 235px;
  }

  .vintage-envelope-card.env-groom {
    left: 30px;
  }

  .vintage-envelope-card.env-bride {
    right: 30px;
  }
}
