/* ====================================================
   LOCAL WEDDING FONT DEFINITIONS (Guaranteed Offline / Local)
   ==================================================== */
@font-face {
  font-family: 'Housemail';
  src: url('downloaded_fonts/Housemail.otf') format('opentype'),
       url('housemail_script/Housemail Script Trial.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Great Vibes Local';
  src: url('downloaded_fonts/Great Vibes.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Amiri Local';
  src: url('downloaded_fonts/Amiri.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display Local';
  src: url('downloaded_fonts/Playfair Display.ttf') format('truetype');
  font-style: italic;
  font-weight: 400 700;
}
@font-face {
  font-family: 'Bodoni Moda Local';
  src: url('downloaded_fonts/Bodoni Moda.ttf') format('truetype');
  font-style: italic;
  font-weight: 400 800;
}
@font-face {
  font-family: 'Libre Bodoni Local';
  src: url('downloaded_fonts/Libre Bodoni.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Cormorant Garamond Local';
  src: url('downloaded_fonts/Cormorant Garamond.ttf') format('truetype');
  font-style: italic;
  font-weight: 400 700;
}
@font-face {
  font-family: 'Pinyon Script Local';
  src: url('downloaded_fonts/Pinyon Script.ttf') format('truetype');
}
@font-face {
  font-family: 'Luxurious Script Local';
  src: url('downloaded_fonts/Luxurious Script.ttf') format('truetype');
}
@font-face {
  font-family: 'Italianno Local';
  src: url('downloaded_fonts/Italianno.ttf') format('truetype');
}

:root {
  --burgundy-deep: #3b080d;
  --burgundy-main: #58111a;
  --burgundy-rich: #6f1622;
  --gold-light: #f7e2a9;
  --gold-primary: #d4af37;
  --gold-dark: #aa8214;
  --ivory-cream: #faf5ed;
  --ivory-dark: #f0e6d2;
  --card-width: min(390px, 88vw);
  --card-height: min(655px, 82vh);
  --gate-open-timing: 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  --couple-font: 'Housemail', 'Great Vibes Local', 'Great Vibes', cursive;
  --main-english-font: 'Housemail', 'Cormorant Garamond', serif;
}

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

html {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: radial-gradient(circle at 50% 40%, #2a0509 0%, #150204 55%, #080002 100%);
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

/* Ambient Canvas Background */
#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Top Toolbar */
.top-toolbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 100;
  background: rgba(45, 8, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 8px 16px;
  border-radius: 40px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-btn {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold-light);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.tool-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--gold-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.tool-btn.active {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #260508;
  border-color: var(--gold-light);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.admin-top-btn {
  border-color: rgba(212, 175, 55, 0.45);
  color: var(--gold-light);
  background: rgba(88, 17, 26, 0.65);
  text-decoration: none;
}
.admin-top-btn:hover {
  background: linear-gradient(135deg, #7a1420 0%, #4a0911 100%);
  border-color: var(--gold-primary);
  color: #fff;
  transform: translateY(-1px);
}
/* Stage & Perspective Container */
.scene {
  perspective: 1600px;
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* The Envelope / Gate Wrapper */
.invitation-container {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.85),
              0 0 50px rgba(88, 17, 26, 0.35),
              inset 0 0 0 1px rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  transition: box-shadow 0.8s ease;
}

.invitation-container.opened {
  box-shadow: 0 35px 85px -10px rgba(0, 0, 0, 0.92),
              0 0 70px rgba(212, 175, 55, 0.25);
}

/* ====================================================
   INNER WEDDING INVITATION CARD
   ==================================================== */
.inner-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ivory-cream);
  background-image: 
    radial-gradient(#e5d8c7 1px, transparent 1px),
    linear-gradient(135deg, #faf5ed 0%, #f4ebdb 100%);
  background-size: 20px 20px, 100% 100%;
  border-radius: 14px;
  padding: 26px 18px 60px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #3b2820;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  z-index: 1;
  transform: scale(0.92);
  -webkit-transform: scale(0.92);
  will-change: scroll-position, transform, opacity;
  user-select: auto;
  -webkit-user-select: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, visibility 0.8s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.45) transparent;
}

.inner-card::-webkit-scrollbar {
  width: 5px;
}
.inner-card::-webkit-scrollbar-track {
  background: rgba(212, 175, 55, 0.06);
  border-radius: 4px;
}
.inner-card::-webkit-scrollbar-thumb {
  background: rgba(180, 136, 30, 0.45);
  border-radius: 4px;
}
.inner-card::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 136, 30, 0.7);
}

.invitation-container.opened .inner-card {
  transform: scale(1);
  -webkit-transform: scale(1);
  opacity: 1;
  visibility: visible;
  z-index: 25;
  pointer-events: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Ensure doors and flaps do not block scrolling or interaction when opened */
.invitation-container.opened .gate-door,
.invitation-container.opened .gate-door *,
.invitation-container.opened .flaps-wrapper,
.invitation-container.opened .flaps-wrapper *,
.invitation-container.opened .wax-seal-container {
  pointer-events: none !important;
}

/* Card Decorative Gold Foil Borders */
.card-border-outer {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1.5px solid var(--gold-primary);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: inset 0 0 8px rgba(212, 175, 55, 0.2);
}

.card-border-inner {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px dashed rgba(170, 130, 20, 0.4);
  border-radius: 7px;
  pointer-events: none;
}

/* Monogram Badge (Luxury Double Circle) */
.monogram-badge {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  position: relative;
  background: radial-gradient(circle at 35% 35%, #fffefb 0%, #faf4e6 55%, #f2e3be 100%);
  border: 1.5px solid #d4af37;
  box-shadow:
    0 0 0 2px #fff8ee,
    0 0 0 3.5px #c5a059,
    0 4px 14px rgba(184, 134, 11, 0.2),
    inset 0 1px 3px rgba(255, 255, 255, 0.9),
    inset 0 -1px 4px rgba(184, 134, 11, 0.15);
  flex-shrink: 0;
  overflow: visible;
}
.monogram-badge::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(180, 136, 30, 0.6);
  border-radius: 50%;
  pointer-events: none;
}
.monogram-badge::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 0.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 50%;
  pointer-events: none;
}
.monogram-text {
  font-family: 'Housemail', 'Great Vibes Local', cursive;
  font-size: 32px;
  font-weight: 400;
  color: #5c0e18;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.85);
  z-index: 1;
  position: relative;
  margin-top: -3px;
  -webkit-font-smoothing: antialiased;
}

/* Card Typography */
.card-header-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #9f7d4b;
  margin-bottom: 6px;
}

.couple-names-wrapper {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  padding: 2px 4px;
  margin-bottom: 8px;
}

.couple-names {
  font-family: var(--couple-font);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(42px, 11vw, 56px);
  line-height: 1.25;
  letter-spacing: 0.5px;
  color: #5c0e18;
  text-shadow: 0 1px 2px rgba(88, 17, 26, 0.15);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  white-space: nowrap;
  text-align: center;
  display: inline-block;
  padding: 4px 2px;
  text-transform: capitalize;
}

.ampersand {
  font-family: 'Housemail', cursive;
  font-style: normal;
  font-weight: 400;
  font-size: 0.95em;
  color: var(--gold-primary);
  margin: 0 8px;
}

/* Event Date & Time Pill Badges */
.event-pill-container {
  margin: 10px 0 6px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.event-pill-badge {
  display: inline-block;
  border: 1.5px solid #d4af37;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #faf3e5 100%);
  border-radius: 30px;
  padding: 7px 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: #2b0b10;
  box-shadow: 0 3px 12px rgba(184, 134, 11, 0.14);
}

.event-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(197, 160, 89, 0.5);
  background: rgba(253, 248, 237, 0.95);
  border-radius: 20px;
  padding: 4px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #5c0e18;
  box-shadow: 0 2px 8px rgba(92, 14, 24, 0.08);
}

.time-clock-icon {
  font-size: 13px;
}

.venue-time-highlight {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(220, 185, 80, 0.75);
  border-radius: 12px;
  padding: 8px 18px;
  font-family: 'Montserrat', 'Amiri', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  margin: 10px auto 16px auto;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

.venue-time-highlight span {
  color: #fcd34d;
  font-size: 11px;
}

.venue-subtitle {
  font-family: 'Amiri Local', 'Amiri', 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 16.5px;
  font-weight: 600;
  color: #6a5342;
  letter-spacing: 0.5px;
  margin: 6px 0 14px 0;
}

/* Romantic Couple Polaroids */
.polaroids-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 10px 0 20px 0;
  padding: 6px 0;
}

.polaroid-card {
  background: #ffffff;
  padding: 6px 6px 14px 6px;
  border-radius: 4px;
  box-shadow: 0 10px 22px rgba(60, 20, 10, 0.14), 0 3px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(225, 215, 200, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 142px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.35s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.polaroid-left {
  transform: rotate(-3.5deg);
  z-index: 2;
}

.polaroid-right {
  transform: rotate(3.5deg);
  margin-left: -14px;
  z-index: 3;
}

.polaroid-card:hover {
  transform: translateY(-6px) rotate(0deg) scale(1.05);
  box-shadow: 0 16px 30px rgba(60, 20, 10, 0.22), 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.polaroid-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1.2;
  overflow: hidden;
  border-radius: 2px;
  background: #e8ded2;
}

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

.polaroid-caption {
  font-family: 'Housemail', 'Great Vibes Local', 'Great Vibes', cursive;
  color: #60121d;
  font-size: 24px;
  margin-top: 6px;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
  -webkit-font-smoothing: antialiased;
}

/* ====================================================
   QURAN AYAH & BLESSINGS CARD (Image 1)
   ==================================================== */
.quran-card {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 22px;
  padding: 8px;
  margin: 18px auto 20px auto;
  box-shadow: 
    0 12px 32px rgba(60, 15, 20, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  text-align: center;
}

.quran-card-inner {
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  padding: 22px 18px 24px 18px;
  background: radial-gradient(circle at 50% 15%, #ffffff 0%, #fdfbf7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quran-quote-icon {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 38px;
  line-height: 0.8;
  color: #c99c3d;
  margin-bottom: 12px;
  opacity: 0.9;
  user-select: none;
}

.quran-arabic {
  font-family: 'Amiri Local', 'Amiri', 'Traditional Arabic', serif;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 2;
  color: #4a0d14;
  direction: rtl;
  margin: 0 0 14px 0;
  text-align: center;
  word-spacing: 2px;
  text-shadow: 0 1px 1px rgba(74, 13, 20, 0.08);
}

.quran-translation {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: #3b2820;
  margin-bottom: 10px;
  max-width: 290px;
}

.quran-citation {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #a48252;
  margin-bottom: 6px;
}

.gold-star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 200px;
  margin: 14px auto 16px auto;
}

.star-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
}

.star-icon {
  color: #c99c3d;
  font-size: 11px;
  line-height: 1;
}

.quran-message {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: #5c4338;
  max-width: 280px;
  margin: 0 auto;
}

/* ====================================================
   SAVE THE DATE & CALENDAR SECTION (Image 2)
   ==================================================== */
.save-date-section {
  width: 100%;
  max-width: 340px;
  margin: 22px auto 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.save-date-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #a48252;
  margin-bottom: 4px;
}

.save-date-title {
  font-family: 'Housemail', 'Playfair Display', cursive, serif;
  font-size: 34px;
  font-weight: 600;
  color: #4a0d14;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Calendar Strip Card */
.calendar-strip-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 18px 14px 20px 14px;
  width: 100%;
  box-shadow: 
    0 12px 30px rgba(60, 15, 20, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  margin: 12px 0 22px 0;
}

.calendar-month-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #58111a;
  margin-bottom: 14px;
  text-align: center;
}

.calendar-days-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.calendar-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.day-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7d6550;
}

.day-num-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: #fdfbf7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', 'Cinzel', serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #2c0e13;
  position: relative;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.day-num-box.selected-wedding-day {
  background: linear-gradient(135deg, #440a10 0%, #63121d 100%);
  color: #ffffff;
  border-color: #8c1e2b;
  box-shadow: 0 8px 20px rgba(74, 13, 20, 0.45);
  transform: translateY(-2px);
}

.day-heart-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 12px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(197, 45, 58, 0.5));
  animation: pulseHeart 1.8s infinite ease-in-out;
}

@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* Luxury Countdown Moments */
.countdown-header-italic {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-style: italic;
  font-size: 18px;
  color: #6a5342;
  margin-bottom: 12px;
}

.countdown-luxury-grid {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  margin: 0 0 10px 0;
}

.countdown-luxury-tile {
  flex: 1;
  max-width: 72px;
  height: 80px;
  background: linear-gradient(145deg, #3d070c 0%, #520f18 60%, #2f0509 100%);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 
    0 8px 20px rgba(45, 8, 12, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 0 15px rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: transform 0.3s ease;
}
.countdown-luxury-tile:hover {
  transform: translateY(-2px);
}

.countdown-num {
  font-family: 'Montserrat', 'Cinzel', serif;
  font-size: 25px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.countdown-lbl {
  font-family: 'Montserrat', sans-serif;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #d4af37;
  margin-top: 4px;
}

/* Venue Section */
.venue-details {
  margin-bottom: 14px;
}
.venue-name {
  font-family: 'Amiri Local', 'Amiri', 'Cinzel', serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #2b1a13;
  letter-spacing: 0.5px;
}
.venue-address {
  font-family: 'Amiri Local', 'Amiri', 'Montserrat', sans-serif;
  font-size: 12.5px;
  color: #6a5342;
  line-height: 1.4;
  margin-top: 3px;
}

/* Actions inside Card */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 250px;
  margin-top: 2px;
}

.primary-rsvp-btn {
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-rich) 100%);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(88, 17, 26, 0.35);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary-rsvp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 17, 26, 0.5);
  background: linear-gradient(135deg, #6c1622 0%, #871f2d 100%);
}

.secondary-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.sub-link-btn {
  background: transparent;
  border: none;
  color: #8c6843;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.8px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.sub-link-btn:hover {
  color: var(--burgundy-main);
}

/* ====================================================
   GATEFOLD DOORS (Royal Gatefold Mode)
   ==================================================== */
.gate-door {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 10;
  transform-style: preserve-3d;
  transition: transform var(--gate-open-timing);
  will-change: transform;
}

.gate-door.left {
  left: 0;
  transform-origin: 0% 50%;
  border-radius: 14px 0 0 14px;
}

.gate-door.right {
  left: 50%;
  transform-origin: 100% 50%;
  border-radius: 0 14px 14px 0;
}

/* Outer & Inner faces of the gate doors */
.door-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
}

/* Front Face: Burgundy embossed pattern */
.door-front {
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

.gate-door.left .door-front {
  background-image: url('gate_left_2x.jpg');
}
.gate-door.right .door-front {
  background-image: url('gate_right_2x.jpg');
}

/* Center Seam Gold Foil Edge Trim */
.door-front::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(212, 175, 55, 0.4) 15%, 
    rgba(247, 226, 169, 0.9) 50%, 
    rgba(212, 175, 55, 0.4) 85%, 
    transparent 100%);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}
.gate-door.left .door-front::after {
  right: 0;
}
.gate-door.right .door-front::after {
  left: 0;
}

/* Diagonal Creases Overlay matching the reference image folds */
.door-creases {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.65;
}
.gate-door.left .door-creases {
  background: 
    linear-gradient(to bottom right, transparent calc(50% - 1.5px), rgba(0,0,0,0.55) 50%, transparent calc(50% + 1.5px)),
    linear-gradient(to top right, transparent calc(50% - 1.5px), rgba(0,0,0,0.55) 50%, transparent calc(50% + 1.5px));
}
.gate-door.right .door-creases {
  background: 
    linear-gradient(to bottom left, transparent calc(50% - 1.5px), rgba(0,0,0,0.55) 50%, transparent calc(50% + 1.5px)),
    linear-gradient(to top left, transparent calc(50% - 1.5px), rgba(0,0,0,0.55) 50%, transparent calc(50% + 1.5px));
}

/* Dynamic Shadow Overlay that deepens as doors swing */
.door-lighting {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity var(--gate-open-timing);
  opacity: 0;
}
.gate-door.left .door-lighting {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
}
.gate-door.right .door-lighting {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
}

/* Back Face of Gate: Luxurious inner gold lining */
.door-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #420d13 0%, #29060a 100%);
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.door-back::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
}

/* ====================================================
   GATE OPENING TRANSFORMS
   ==================================================== */
.invitation-container.gate-mode.opened .gate-door.left {
  transform: rotateY(-125deg);
}
.invitation-container.gate-mode.opened .gate-door.right {
  transform: rotateY(125deg);
}
.invitation-container.gate-mode.opened .door-lighting {
  opacity: 1;
}

/* ====================================================
   4-FLAP ENVELOPE MODE (Origami Unfold)
   ==================================================== */
.flaps-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  transform-style: preserve-3d;
  display: none;
}
.invitation-container.envelope-mode .flaps-wrapper {
  display: block;
}
.invitation-container.envelope-mode .gate-door {
  display: none;
}

.origami-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('card_clean_texture_2x.jpg');
  background-size: 100% 100%;
  background-position: center;
  transform-style: preserve-3d;
  transition: transform 1.3s cubic-bezier(0.2, 0.95, 0.3, 1), filter 0.8s ease;
  will-change: transform;
}

.origami-flap.flap-top {
  clip-path: polygon(0 0, 100% 0, 50% 50%);
  transform-origin: 50% 0%;
  border-radius: 14px 14px 0 0;
  z-index: 4;
}
.origami-flap.flap-bottom {
  clip-path: polygon(0 100%, 100% 100%, 50% 50%);
  transform-origin: 50% 100%;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.origami-flap.flap-left {
  clip-path: polygon(0 0, 50% 50%, 0 100%);
  transform-origin: 0% 50%;
  border-radius: 14px 0 0 14px;
  z-index: 2;
}
.origami-flap.flap-right {
  clip-path: polygon(100% 0, 100% 100%, 50% 50%);
  transform-origin: 100% 50%;
  border-radius: 0 14px 14px 0;
  z-index: 1;
}

.origami-flap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* Flap open transitions */
.invitation-container.envelope-mode.opened .origami-flap.flap-top {
  transform: rotateX(160deg);
  filter: brightness(0.85);
}
.invitation-container.envelope-mode.opened .origami-flap.flap-bottom {
  transform: rotateX(-160deg);
  filter: brightness(0.85);
}
.invitation-container.envelope-mode.opened .origami-flap.flap-left {
  transform: rotateY(-155deg);
  filter: brightness(0.8);
}
.invitation-container.envelope-mode.opened .origami-flap.flap-right {
  transform: rotateY(155deg);
  filter: brightness(0.8);
}

/* ====================================================
   WAX SEAL (Center piece)
   ==================================================== */
.wax-seal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.wax-seal-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.wax-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.8))
          drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s ease, filter 0.4s ease;
}

/* Wax Seal Breathing / Pulsing Glow */
.wax-seal-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 226, 169, 0.5) 0%, rgba(212, 175, 55, 0.2) 50%, transparent 70%);
  animation: pulseGlow 2.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.95); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.85; }
}

/* Hover effects */
.wax-seal-container:hover .wax-seal-wrapper {
  transform: scale(1.08);
}
.wax-seal-container:hover .wax-seal-img {
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.9))
          drop-shadow(0 0 22px rgba(212, 175, 55, 0.65));
}

/* Instruction Prompt under Seal */
.seal-prompt {
  margin-top: 10px;
  background: rgba(30, 4, 7, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  animation: floatBounce 2.5s infinite ease-in-out;
  display: flex;
  align-items: center;
  gap: 6px;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Seal Disappearing / Breaking on Open */
.invitation-container.opened .wax-seal-container {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.35);
  pointer-events: none;
  filter: blur(4px);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1), filter 0.5s ease;
}

/* Sparks Burst Effect Canvas */
#sparkCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  pointer-events: none;
  z-index: 35;
}

/* ====================================================
   BOTTOM ACTION BAR (Once Opened)
   ==================================================== */
.bottom-controls {
  position: fixed;
  bottom: 25px;
  display: flex;
  gap: 12px;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-controls.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-action-btn {
  background: rgba(30, 4, 7, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}
.floating-action-btn:hover {
  background: var(--gold-primary);
  color: #260508;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

/* ====================================================
   MODALS (RSVP & Customize)
   ==================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 1, 2, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 20px;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #faf5ed;
  color: #3b2820;
  border: 2px solid var(--gold-primary);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #7d6550;
  cursor: pointer;
  transition: color 0.2s ease;
}
.modal-close-btn:hover {
  color: var(--burgundy-main);
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--burgundy-main);
  text-align: center;
  margin-bottom: 6px;
}
.modal-subtitle {
  font-size: 13px;
  text-align: center;
  color: #7d6550;
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #553e30;
  margin-bottom: 5px;
}
.form-input, .form-select, .form-textarea {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  padding: 8px 12px;
  border: 1px solid #dcd1be;
  border-radius: 8px;
  background: #fff;
  color: #2b1a13;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

.modal-submit-btn {
  background: linear-gradient(135deg, var(--burgundy-main) 0%, var(--burgundy-rich) 100%);
  color: #fff;
  border: 1px solid var(--gold-primary);
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 11px;
  border-radius: 25px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 15px rgba(88, 17, 26, 0.3);
  transition: all 0.3s ease;
}
.modal-submit-btn:hover {
  background: #6c1622;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 17, 26, 0.45);
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  :root {
    --card-width: min(375px, 94vw);
    --card-height: min(640px, 86dvh);
  }
  .top-toolbar {
    top: 10px;
    padding: 6px 10px;
    gap: 6px;
    width: 95%;
    justify-content: center;
  }
  .tool-btn {
    font-size: 9.5px;
    padding: 5px 8px;
    letter-spacing: 0.4px;
  }
  .wax-seal-wrapper {
    width: 110px;
    height: 110px;
  }
  .couple-names-artwork {
    max-width: 100%;
  }
  .couple-names {
    font-size: clamp(34px, 9.2vw, 46px);
  }
  .inner-card {
    padding: 22px 14px 75px 14px;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ====================================================
   SLIDE AUTHENTICATION COMPONENT
   ==================================================== */
.slide-auth-container {
  width: 100%;
  max-width: 320px;
  margin: 16px auto 8px auto;
  user-select: none;
  -webkit-user-select: none;
  direction: ltr !important;
}

.slide-auth-track {
  position: relative;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, rgba(38, 5, 8, 0.9) 0%, rgba(20, 2, 4, 0.95) 100%);
  border: 1.5px solid var(--gold-primary);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.7),
              0 6px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: pan-y;
  direction: ltr !important;
}

/* Radiant Gold Progress Fill */
.slide-auth-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, 
    rgba(88, 17, 26, 0.9) 0%, 
    rgba(170, 130, 20, 0.8) 70%, 
    rgba(212, 175, 55, 0.95) 100%);
  border-radius: 30px;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* Shimmering Text Label */
.slide-auth-label {
  position: relative;
  z-index: 2;
  font-family: 'Amiri Local', 'Amiri', 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, 
    #8c7361 0%, 
    #d4af37 35%, 
    #fff9e6 50%, 
    #d4af37 65%, 
    #8c7361 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: slideTextShine 3s linear infinite;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

@keyframes slideTextShine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Draggable Slider Thumb / Handle */
.slide-auth-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff1c4 0%, #d4af37 50%, #856108 100%);
  border: 1.5px solid #fff5cf;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6),
              0 0 10px rgba(212, 175, 55, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  z-index: 3;
  transform: translateX(0);
  transition: transform 0.05s linear, box-shadow 0.2s ease, background 0.3s ease;
}

.slide-auth-thumb:active {
  cursor: grabbing;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8),
              0 0 18px rgba(247, 226, 169, 0.8);
}

.slide-auth-thumb .slide-icon {
  font-size: 14px;
  font-weight: 700;
  color: #260508;
  transition: all 0.3s ease;
  line-height: 1;
}

/* Authenticated State */
.slide-auth-track.authenticated {
  border-color: #55b76b;
  box-shadow: 0 0 25px rgba(85, 183, 107, 0.5);
}

.slide-auth-track.authenticated .slide-auth-fill {
  width: 100% !important;
  background: linear-gradient(90deg, #184b25 0%, #2f8e43 100%);
}

.slide-auth-track.authenticated .slide-auth-label {
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  animation: none;
}

.slide-auth-track.authenticated .slide-auth-thumb {
  background: radial-gradient(circle at 35% 35%, #9eedb0 0%, #34a853 100%);
  border-color: #c4f7d4;
  box-shadow: 0 0 15px rgba(85, 183, 107, 0.8);
}

.slide-auth-track.authenticated .slide-auth-thumb .slide-icon {
  color: #fff;
  font-size: 16px;
}

/* ====================================================
   ADMIN GUEST LIST & DATABASE DASHBOARD
   ==================================================== */
.admin-modal-content {
  max-width: 680px;
  background: #faf6f0;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.admin-stat-card {
  background: #fff;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-val {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--burgundy-main);
}

.stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7d6550;
  margin-top: 2px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-search-input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid #dcd1be;
  border-radius: 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  outline: none;
}
.admin-search-input:focus {
  border-color: var(--gold-primary);
}

.admin-export-btn {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #260508;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.2s ease;
}
.admin-export-btn:hover {
  transform: translateY(-1px);
}

.guest-table-container {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e0d7c7;
  border-radius: 8px;
  background: #fff;
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.guest-table th {
  background: #f2ece0;
  color: #553e30;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.guest-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0e9dc;
  color: #3b2820;
}

.guest-table tr:hover {
  background: #fdfbf7;
}

.attendance-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
}
.attendance-badge.attending {
  background: #e6f7ec;
  color: #1b6833;
}
.attendance-badge.declined {
  background: #fdebee;
  color: #931d2c;
}

.delete-rsvp-btn {
  background: transparent;
  border: none;
  color: #b33948;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.delete-rsvp-btn:hover {
  background: #fee7ea;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #8c7361;
  font-style: italic;
}

/* ====================================================
   LOCATION & VENUE (Image 1)
   ==================================================== */
.location-venue-section {
  width: 100%;
  max-width: 340px;
  margin: 24px auto 20px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.venue-section-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #a48252;
  margin-bottom: 4px;
}

.venue-section-title {
  font-family: 'Playfair Display', 'Bodoni Moda', serif;
  font-size: 29px;
  font-weight: 600;
  color: #4a0d14;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.venue-luxury-card {
  width: 100%;
  border-radius: 22px;
  padding: 8px;
  margin-top: 12px;
  position: relative;
  background: linear-gradient(135deg, rgba(58, 8, 14, 0.88), rgba(28, 4, 7, 0.94)),
              url('gate_left_2x.jpg') center/cover no-repeat;
  box-shadow: 
    0 16px 36px rgba(45, 6, 11, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(212, 175, 55, 0.2);
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  overflow: hidden;
}

.venue-card-border-outer {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 17px;
  pointer-events: none;
}

.venue-card-border-inner {
  position: absolute;
  inset: 10px;
  border: 0.8px dashed rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  pointer-events: none;
}

.venue-card-content {
  padding: 24px 18px 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.venue-card-script {
  font-family: 'Housemail', 'Great Vibes Local', 'Great Vibes', cursive;
  font-size: 34px;
  font-weight: 400;
  color: #fef5e7;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 6px;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
}

.venue-card-heading {
  font-family: 'Amiri Local', 'Amiri', 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.venue-card-address {
  font-family: 'Amiri Local', 'Amiri', 'Montserrat', sans-serif;
  font-size: 12px;
  color: #f2dec0;
  line-height: 1.4;
  margin-bottom: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.venue-maps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f5da8e 0%, #d4af37 50%, #b88d2d 100%);
  color: #2b0509;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 
    0 8px 22px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(212, 175, 55, 0.4);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
  cursor: pointer;
}
.venue-maps-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 26px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(212, 175, 55, 0.6);
  background: linear-gradient(135deg, #fff0ba 0%, #e0bd4d 50%, #c49935 100%);
}

/* ====================================================
   INLINE RSVP FORM WITH SWIPE TO SUBMIT & TOKEN (Image 2)
   ==================================================== */
.rsvp-embedded-section {
  width: 100%;
  max-width: 340px;
  margin: 24px auto 20px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsvp-section-sub {
  font-family: 'Amiri Local', 'Amiri', 'Montserrat', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #a48252;
  margin-bottom: 4px;
}

.rsvp-section-title {
  font-family: 'Amiri Local', 'Amiri', 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: #4a0d14;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.inline-rsvp-card {
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 20px;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  box-shadow: 
    0 12px 32px rgba(60, 15, 20, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  margin-top: 12px;
  direction: rtl;
  text-align: right;
}

.inline-rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  direction: rtl;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.inline-field-label {
  font-family: 'Amiri Local', 'Amiri', 'Montserrat', serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: #4a0d14;
  text-align: right;
}

.inline-text-input {
  width: 100%;
  padding: 12px 14px;
  background: #faf6f0;
  border: 1.2px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 14.5px;
  color: #3b2820;
  outline: none;
  direction: rtl;
  text-align: right;
  transition: all 0.3s ease;
}
.inline-text-input:focus {
  background: #ffffff;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.attendance-btn-group {
  display: flex;
  gap: 8px;
  width: 100%;
  direction: rtl;
}

.att-option-btn {
  flex: 1;
  padding: 11px 8px;
  border-radius: 12px;
  border: 1.2px solid rgba(212, 175, 55, 0.35);
  background: #fdfaf5;
  color: #5c4338;
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.att-option-btn.active {
  background: linear-gradient(135deg, #440a10 0%, #63121d 100%);
  color: #ffffff;
  border-color: #8c1e2b;
  box-shadow: 0 6px 16px rgba(74, 13, 20, 0.4);
}

.inline-select-input {
  width: 100%;
  padding: 12px 14px;
  background: #faf6f0;
  border: 1.2px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 14.5px;
  color: #3b2820;
  outline: none;
  cursor: pointer;
  direction: rtl;
  text-align: right;
}

.inline-swipe-wrapper {
  margin-top: 8px;
}

.inline-slide-auth {
  margin: 0;
  width: 100%;
}

/* Success Confirmation Pass */
.inline-rsvp-success {
  text-align: center;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  direction: rtl;
}

.success-badge-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b6833 0%, #29934c 100%);
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(27, 104, 51, 0.35);
  animation: popBadge 0.5s cubic-bezier(0.2, 1.2, 0.3, 1);
}

@keyframes popBadge {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 24px;
  font-weight: 700;
  color: #4a0d14;
  margin-bottom: 4px;
}

.success-subtitle {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-style: normal;
  font-size: 15px;
  color: #6a5342;
  margin-bottom: 16px;
}

.token-pass-card {
  width: 100%;
  background: radial-gradient(circle at 50% 30%, #fffefa 0%, #faf3e5 100%);
  border: 1.5px dashed #d4af37;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(184, 134, 11, 0.12);
  direction: rtl;
  text-align: center;
}

.token-label {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #a48252;
  margin-bottom: 6px;
}

.token-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #58111a;
  margin-bottom: 8px;
  background: rgba(212, 175, 55, 0.15);
  padding: 4px 12px;
  border-radius: 6px;
  display: inline-block;
  direction: ltr;
}

.token-guest {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 18px;
  font-weight: 700;
  color: #2b1a13;
}

.token-meta {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 13.5px;
  color: #7d6550;
  margin-top: 2px;
}

.token-cal-btn {
  background: linear-gradient(135deg, #58111a 0%, #781724 100%);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 10px 22px;
  border-radius: 25px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  direction: rtl;
}
.token-cal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(88, 17, 26, 0.4);
}

/* ====================================================
   RSVP MODAL ARABIC ENHANCEMENTS
   ==================================================== */
#rsvpModal .modal-content {
  direction: rtl;
  text-align: right;
}
#rsvpModal .modal-close-btn {
  right: auto;
  left: 18px;
}
#rsvpModal .modal-title {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}
#rsvpModal .modal-subtitle {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 14.5px;
}
#rsvpModal .form-group label {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-align: right;
}
#rsvpModal .form-input,
#rsvpModal .form-select,
#rsvpModal .form-textarea {
  font-family: 'Amiri Local', 'Amiri', serif;
  font-size: 15px;
  direction: rtl;
  text-align: right;
}

/* ====================================================
   YOUR PRESENCE IS OUR PRESENT & CLOSING (Image 3)
   ==================================================== */
.presence-gift-section {
  width: 100%;
  max-width: 340px;
  margin: 22px auto 40px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.presence-dashed-card {
  width: 100%;
  border: 1.5px dashed rgba(197, 160, 89, 0.65);
  border-radius: 20px;
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 18px rgba(60, 15, 20, 0.04);
  margin-bottom: 24px;
}

.presence-card-title {
  font-family: 'Housemail', 'Playfair Display', cursive, serif;
  font-size: 26px;
  font-weight: 600;
  color: #4a0d14;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.presence-card-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: #5c4338;
  max-width: 285px;
  margin: 0 auto;
}

.bottom-couple-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}

.closing-couple-names {
  font-family: 'Housemail', 'Great Vibes Local', 'Great Vibes', cursive;
  font-size: 46px;
  color: #5c0e18;
  line-height: 1.15;
  margin-bottom: 6px;
  -webkit-font-smoothing: antialiased;
}

.closing-gratitude {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: #6a5342;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.closing-hashtag {
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #a48252;
  opacity: 0.85;
}

/* ====================================================
   WEDDING PHOTO GALLERY SECTION
   ==================================================== */
.wedding-gallery-section {
  width: 100%;
  margin: 32px 0 20px 0;
  text-align: center;
}

.gallery-section-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #9f7d4b;
  margin-bottom: 4px;
}

.gallery-section-title {
  font-family: 'Cinzel', 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  color: #4a0d14;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.gallery-luxury-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
  margin-top: 16px;
  padding: 0 4px;
}

.gallery-item-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 8px 12px 8px;
  box-shadow: 0 6px 18px rgba(60, 15, 20, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(197, 160, 89, 0.35);
  cursor: default !important;
  pointer-events: none !important;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-img-wrapper {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #f7f3eb;
  cursor: default !important;
  pointer-events: none !important;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none !important;
}

.gallery-item-caption {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-style: italic;
  font-size: 14.5px;
  color: #5c0e18;
  margin-top: 8px;
  text-align: center;
  line-height: 1.25;
}

/* ====================================================
   LIGHTBOX FULLSCREEN MODAL
   ==================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 3, 5, 0.92);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.25s ease;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  border: 2px solid #c5a059;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-caption {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
  color: #f7e6c4;
  margin-top: 14px;
  text-align: center;
  letter-spacing: 0.5px;
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(197, 160, 89, 0.4);
  color: #ffffff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-close-btn:hover {
  background: #c5a059;
  color: #2c0e13;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(197, 160, 89, 0.4);
  color: #ffffff;
  font-size: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-nav-btn:hover {
  background: #c5a059;
  color: #2c0e13;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

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