/* ==========================================================================
   Template M21: Đỏ Đô Sang Trọng (Clone 100% ZenLove 132 Premium)
   Tone: Deep Ruby Red (#800d1b, #6a0613, #52020b), Paper Cream (#faf8f5), Warm White
   Typography: Playfair Display, Cormorant Garamond, Alex Brush, Montserrat
   ========================================================================== */

/* Design Tokens & CSS Reset */
:root,
[data-palette="do-do"] {
  --m21-ruby: #800d1b;
  --m21-ruby-dark: #6a0613;
  --m21-ruby-deep: #52020b;
  --m21-ruby-light: #9e1424;
  --m21-bg-paper: #faf8f5;
  --m21-bg-card: #ffffff;
  --m21-text-ruby: #800d1b;
  --m21-text-dark: #3b050c;
  --m21-text-body: #5c4749;
  --m21-text-light: #ffffff;
  --m21-border-color: rgba(128, 13, 27, 0.15);

  --font-script: 'Alex Brush', cursive;
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-serif-luxury: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.template-m21 {
  background-color: #e8e4dc;
  color: var(--m21-text-dark);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Subtle Desktop Blurred Backdrop */
.desktop-bg-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #f0ece3 0%, #ded9ce 100%);
  z-index: -1;
  pointer-events: none;
}

/* Central Mobile Frame Container (Max 440px like ZenLove) */
.invitation-main {
  max-width: 440px;
  margin: 0 auto;
  background-color: var(--m21-bg-paper);
  box-shadow: 0 0 50px rgba(60, 10, 15, 0.18);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   FLOATING AUDIO PLAYER
   ========================================================================== */
.audio-control {
  position: fixed;
  top: 18px;
  right: calc(50% - 200px);
  z-index: 99;
}
@media (max-width: 480px) {
  .audio-control {
    right: 16px;
  }
}
.music-disc-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: var(--m21-ruby);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease;
}
.music-disc-btn.is-playing .disc-vinyl {
  animation: disc-spin 3.5s linear infinite;
}
.disc-vinyl {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
@keyframes disc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================================
   ENVELOPE SCROLL LOCK STATE
   ======================================================== */
html.envelope-locked,
body.envelope-locked {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100vh !important;
  touch-action: none;
}

body.envelope-locked .invitation-main {
  opacity: 0;
  visibility: hidden;
  max-height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

body.envelope-locked .bottom-floating-dock,
body.envelope-locked .floating-toasts-container,
body.envelope-locked .audio-control {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   ENVELOPE SCREEN (INITIAL OVERLAY - FULLSCREEN VIBRANT RED)
   ========================================================================== */
.envelope-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: radial-gradient(circle at center, #6b0512 0%, #3e0108 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  touch-action: none;
  overscroll-behavior: none;
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.8s ease, visibility 0.8s ease;
}
.envelope-screen.is-opened {
  transform: translateY(-100vh) scale(0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Floating Song Hỷ Golden Particles */
.songhy-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.floating-particle {
  position: absolute;
  color: rgba(230, 185, 120, 0.45);
  font-size: 18px;
  user-select: none;
  animation: particle-float-up 7s linear infinite;
}
@keyframes particle-float-up {
  0% { transform: translateY(105vh) rotate(0deg); opacity: 0; }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

.envelope-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
}
.red-envelope-card {
  position: relative;
  background: linear-gradient(145deg, #7c0a17 0%, #52020b 100%);
  border-radius: 16px;
  padding: 40px 24px 35px;
  text-align: center;
  color: #fff;
  box-shadow: 0 20px 50px rgba(30, 0, 4, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.card-watermark-songhy {
  position: absolute;
  font-size: 130px;
  color: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.card-watermark-songhy.top-left {
  top: -20px;
  left: -25px;
}
.card-watermark-songhy.bottom-right {
  bottom: -20px;
  right: -25px;
}

.envelope-medallion-badge {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  background: #fdfaf2;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.envelope-medallion-badge:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 24px rgba(230, 185, 120, 0.45);
}
.medallion-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.envelope-couple-names {
  font-family: var(--font-serif-luxury);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.3;
  margin-bottom: 12px;
}
.envelope-couple-names .name-and {
  display: block;
  font-size: 18px;
  font-style: italic;
  opacity: 0.85;
}

.envelope-ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 16px;
  opacity: 0.6;
}
.line-wing {
  width: 40px;
  height: 1px;
  background: #fff;
}
.line-knot {
  font-size: 14px;
}

.envelope-date {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 1px;
  opacity: 0.95;
  margin-bottom: 18px;
}
.envelope-invite-label {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 8px;
}
.envelope-guest-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 18px;
  border-radius: 20px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.envelope-sub-invite {
  font-family: var(--font-serif);
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 25px;
}

.open-card-btn {
  position: relative;
  overflow: hidden;
  background: #fdfaf2;
  color: var(--m21-ruby);
  border: none;
  padding: 12px 38px;
  border-radius: 30px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.open-card-btn:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(255, 230, 180, 0.45);
}
.open-card-btn .btn-text {
  position: relative;
  z-index: 2;
}
.open-card-btn .btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-20deg);
  animation: btn-shine-sweep 3s infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes btn-shine-sweep {
  0%, 60% { left: -100%; }
  100% { left: 160%; }
}

/* ==========================================================================
   SECTION 1: COVER / HERO
   ========================================================================== */
.section-hero-inner {
  position: relative;
  width: 100%;
}
.hero-photo-wrap {
  width: 100%;
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
}
.hero-main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-top-quote {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--font-script);
  color: rgba(255, 255, 255, 0.9);
  font-size: 24px;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, transparent 40%, rgba(0,0,0,0.65) 100%);
  display: flex;
  align-items: flex-end;
  padding: 30px 20px;
}
.hero-text-block {
  width: 100%;
  text-align: center;
}
.hero-script-names {
  font-family: var(--font-script);
  color: #fff;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  margin-bottom: 6px;
}
.hero-date-tag {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   SECTION 2: ENVELOPE POLAROID & COUNTDOWN TIMER
   ========================================================================== */
.section-envelope-countdown {
  padding: 40px 16px 30px;
  text-align: center;
  position: relative;
  background: var(--m21-bg-paper);
}
.envelope-display-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* Pocket Envelope Graphic */
.pocket-envelope-wrap {
  position: relative;
  width: 310px;
  height: 310px;
  margin: 0 auto 30px;
}

.envelope-flap-back {
  position: absolute;
  top: 15px;
  left: 20px;
  right: 20px;
  height: 120px;
  background: #62040e;
  clip-path: polygon(0 100%, 50% 0%, 100% 100%);
  z-index: 1;
}

.envelope-polaroid-card {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 215px;
  background: #fff;
  padding: 10px 10px 32px 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  z-index: 2;
  border-radius: 2px;
}
.polaroid-img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 1px;
}
.polaroid-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.polaroid-overlay-doodle {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.polaroid-script-word {
  font-family: var(--font-script);
  font-size: 26px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  line-height: 1;
}
.polaroid-doodle-heart {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.envelope-pocket-front {
  position: absolute;
  bottom: 10px;
  left: 20px;
  right: 20px;
  height: 150px;
  background: linear-gradient(135deg, #780916 0%, #52020b 100%);
  clip-path: polygon(0 0, 50% 36%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.calla-left-decor {
  position: absolute;
  top: -10px;
  left: -5px;
  width: 85px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.floral-bouquet-decor {
  position: absolute;
  bottom: -20px;
  right: -15px;
  width: 125px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}

.countdown-eyebrow-heading {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--m21-ruby);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.countdown-boxes-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.count-box {
  width: 65px;
  height: 68px;
  background: var(--m21-ruby);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(128, 13, 27, 0.3);
}
.count-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}
.count-lbl {
  font-family: var(--font-sans);
  font-size: 11px;
  opacity: 0.9;
  text-transform: lowercase;
  margin-top: 2px;
}

/* ==========================================================================
   SECTION 3: THIS DAY BANNER & TWO FAMILIES
   ========================================================================== */
.feature-banner-block {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.feature-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
}
.feature-script-title {
  font-family: var(--font-script);
  font-size: 44px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.feature-caps-subtitle {
  font-family: var(--font-serif);
  font-size: 12.5px;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 6px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.invitation-intro-content {
  padding: 30px 20px 20px;
  text-align: center;
}
.formal-invitation-heading {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--m21-ruby);
  letter-spacing: 1.5px;
  line-height: 1.6;
  text-transform: uppercase;
  margin-bottom: 25px;
}

.two-families-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: center;
  margin-bottom: 30px;
}
.side-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--m21-ruby);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.parent-entry {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--m21-ruby-deep);
  line-height: 1.6;
}
.side-addr-line {
  font-family: var(--font-sans);
  font-size: 11px;
  color: #777;
  margin-top: 6px;
  line-height: 1.4;
}

.signature-couple-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0 10px;
}
.name-first,
.name-second {
  font-family: var(--font-serif-luxury);
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--m21-ruby);
  text-transform: uppercase;
  line-height: 1.2;
}
.ampersand-luxury {
  font-family: var(--font-serif-luxury);
  font-size: 26px;
  font-style: italic;
  color: var(--m21-ruby);
  line-height: 1;
  margin: 2px 0;
}

/* ==========================================================================
   SECTION 4: EVENTS TIMELINE
   ========================================================================== */
.section-events-timeline {
  padding: 10px 20px 25px;
}
.single-event-item {
  text-align: center;
  padding: 20px 0;
}
.event-main-name {
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--m21-ruby);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.event-time-line {
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: var(--m21-ruby);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.event-triptych-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 15px auto;
}
.triptych-col.month-col,
.triptych-col.year-col {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--m21-ruby);
  letter-spacing: 1px;
  border-top: 1px solid var(--m21-ruby);
  border-bottom: 1px solid var(--m21-ruby);
  padding: 4px 8px;
}
.triptych-col.day-col {
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 400;
  color: var(--m21-ruby);
  line-height: 1;
}

.event-lunar-line {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  color: var(--m21-ruby);
  margin-bottom: 14px;
}
.event-place-name {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--m21-ruby);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.event-addr-text {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--m21-ruby-deep);
  margin-bottom: 18px;
}

.red-pill-action-btn {
  display: inline-block;
  background: var(--m21-ruby);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 25px;
  box-shadow: 0 4px 12px rgba(128, 13, 27, 0.25);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.red-pill-action-btn:hover {
  transform: translateY(-2px);
  background: var(--m21-ruby-dark);
}

.calla-divider-wrap {
  text-align: center;
  margin: 12px auto;
}
.calla-divider-img {
  width: 170px;
  max-width: 60%;
  display: inline-block;
}

/* ==========================================================================
   SECTION 5: COUPLE STORY & CARDS
   ========================================================================== */
.story-banner-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.story-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
}
.story-small-script {
  font-family: var(--font-script);
  font-size: 20px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.story-large-script {
  font-family: var(--font-script);
  font-size: 36px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.staggered-polaroids-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px 20px;
}
.polaroid-person {
  width: 48%;
  position: relative;
}
.bride-polaroid {
  transform: rotate(-3deg);
}
.groom-polaroid {
  transform: rotate(3deg);
}

.person-card-frame {
  background: #fff;
  padding: 8px 8px 24px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 2px;
}
.person-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.person-caption {
  text-align: center;
  margin-top: 8px;
}
.person-caption.top-caption {
  margin-top: 0;
  margin-bottom: 8px;
}
.person-role-script {
  font-family: var(--font-script);
  font-size: 24px;
  color: #9c2738;
  line-height: 1;
}
.person-name-serif {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--m21-ruby);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.center-floral-cluster {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 120px;
  z-index: 5;
  pointer-events: none;
}
.cluster-img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.love-story-text-passage {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--m21-ruby-dark);
  text-align: center;
  padding: 20px 25px 35px;
}

/* ==========================================================================
   SECTION 6: WEDDING CALENDAR
   ========================================================================== */
.calendar-script-month {
  font-family: var(--font-script);
  font-size: 44px;
  color: var(--m21-ruby);
  text-align: center;
  margin: 10px 0 20px;
  font-weight: 400;
}
.calendar-ruby-card {
  background: var(--m21-ruby);
  color: #fff;
  border-radius: 12px;
  margin: 0 20px;
  padding: 22px 16px;
  box-shadow: 0 8px 24px rgba(128, 13, 27, 0.3);
}
.calendar-grid-header,
.calendar-days-matrix {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 8px 4px;
}
.calendar-grid-header span {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
  padding-bottom: 8px;
}
.calendar-days-matrix span {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}
.wedding-days-highlight-group {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 8px;
}
.heart-connection-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  stroke: #fff;
}
.marked-day {
  font-weight: 700;
  z-index: 2;
}
.calendar-bottom-note {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  color: var(--m21-ruby-dark);
  text-align: center;
  padding: 20px 25px;
  line-height: 1.6;
}

/* ==========================================================================
   SECTION 7: GOLDEN HOUR OF LOVE (GALLERY)
   ========================================================================== */
.gallery-ruby-bg-wrap {
  background: var(--m21-ruby);
  color: #fff;
  padding: 45px 14px 40px;
}
.gallery-title-header {
  text-align: center;
  margin-bottom: 25px;
}
.gallery-serif-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
}
.gallery-script-of {
  font-family: var(--font-script);
  text-transform: lowercase;
  font-size: 32px;
  font-style: italic;
  margin: 0 4px;
}
.gallery-english-sub {
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

.mosaic-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}
.mosaic-item.wide {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}
.mosaic-item.top .mosaic-img {
  object-position: center 25%;
}
.mosaic-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.mosaic-item:hover .mosaic-img {
  transform: scale(1.04);
}
.mosaic-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(82, 2, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mosaic-item:hover .mosaic-hover-overlay {
  opacity: 1;
}
.mosaic-zoom-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--m21-ruby);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(0.85);
  transition: transform 0.3s ease;
}
.mosaic-item:hover .mosaic-zoom-icon {
  transform: scale(1);
}

.rsvp-transition-note {
  padding: 30px 20px 10px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--m21-ruby);
  line-height: 1.6;
}

/* ==========================================================================
   SECTION 8: RSVP CARD
   ========================================================================== */
.section-rsvp-form {
  padding: 20px;
}
.rsvp-white-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.rsvp-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--m21-ruby);
  text-align: center;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--m21-ruby-deep);
  margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d4c7c9;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #333;
  background: #fafafa;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--m21-ruby);
  background: #fff;
}
.radio-options-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--m21-ruby-deep);
  cursor: pointer;
}
.choice-text {
  font-size: 13px;
}
.rsvp-submit-btn {
  width: 100%;
  background: var(--m21-ruby);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(128, 13, 27, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.rsvp-submit-btn:hover {
  transform: translateY(-2px);
  background: var(--m21-ruby-dark);
}
.rsvp-alert-msg {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}
.rsvp-alert-msg.success {
  background: #e8f5e9;
  color: #2e7d32;
}

/* ==========================================================================
   SECTION 9: THANK YOU FOOTER
   ========================================================================== */
.section-thank-you {
  width: 100%;
}
.thanks-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
}
.thanks-bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thanks-dark-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 24px 30px;
  text-align: center;
  color: #fff;
}
.thanks-script-title {
  font-family: var(--font-script);
  font-size: 46px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  margin-bottom: 12px;
}
.thanks-sincere-text {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 25px;
}
.shop-credit-footer {
  margin-top: 10px;
}
.shop-backlink {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  letter-spacing: 1px;
}

/* ==========================================================================
   FLOATING DOCK & TOASTS
   ========================================================================== */
.floating-toasts-container {
  position: fixed;
  bottom: 80px;
  left: calc(50% - 200px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 280px;
}
@media (max-width: 480px) {
  .floating-toasts-container {
    left: 16px;
  }
}
.toast-bubble {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  color: #400008;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  animation: toast-slide-in 0.4s ease forwards, toast-fade-out 0.4s ease 4.6s forwards;
  border-left: 3px solid var(--m21-ruby);
}
@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.bottom-floating-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 410px;
  z-index: 999;
}
.dock-actions-container {
  background: rgba(40, 5, 10, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.dock-btn-rsvp {
  text-decoration: none;
}
.dock-rsvp-badge {
  background: #ff5252;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 14px;
  display: inline-block;
}

.dock-capsule-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.dock-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px;
}
.heart-count-pill {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ff2a44;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
}

/* ==========================================================================
   MODALS (GIFT, WISH, LIGHTBOX)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px 20px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #777;
}

.modal-gift-header {
  text-align: center;
  margin-bottom: 20px;
}
.gift-header-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 4px;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--m21-ruby);
}
.modal-subtitle {
  font-size: 12.5px;
  color: #777;
  margin-top: 4px;
}

.gift-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gift-account-card {
  background: #faf7f5;
  border: 1px solid rgba(128, 13, 27, 0.15);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.account-badge {
  background: var(--m21-ruby);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.account-bank-name {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.qr-image-frame {
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  background: #fff;
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.qr-code-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.account-owner-name {
  font-weight: 700;
  color: var(--m21-ruby-deep);
  font-size: 13.5px;
  margin-bottom: 4px;
}
.account-number-line {
  font-size: 13px;
  color: #444;
  margin-bottom: 10px;
}
.btn-copy-stk {
  background: #fff;
  color: var(--m21-ruby);
  border: 1px solid var(--m21-ruby);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-copy-stk:hover {
  background: var(--m21-ruby);
  color: #fff;
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.lightbox-overlay.is-active {
  opacity: 1;
  visibility: visible;
}
.lightbox-content-box {
  max-width: 90vw;
  max-height: 85vh;
}
.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav-btn.prev { left: 16px; }
.lightbox-nav-btn.next { right: 16px; }

/* Reveal Animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Celebratory Song Hỷ Burst on Open */
.songhy-burst-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}
.burst-particle {
  position: absolute;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
}
@keyframes burst-fly {
  0% {
    transform: translate(0, 0) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  70% {
    opacity: 0.95;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(1.15) rotate(240deg);
    opacity: 0;
  }
}

