/* ==========================================================================
   BURGUNDI PREMIUM (M24) - STYLESHEET
   Deep Burgundy (#4f1219), Warm Gold (#c5a059), Cream (#fbf9f6)
   ========================================================================== */

:root,
[data-palette="do-burgundy"] {
  --color-burgundy-deep: #4f1219;
  --color-burgundy-dark: #3a0c12;
  --color-burgundy-rich: #5c1921;
  --color-burgundy-light: #7a1c27;
  --color-burgundy-subtle: #f7eff0;
  
  --color-gold-accent: #c5a059;
  --color-gold-light: #dfc282;
  --color-gold-border: rgba(197, 160, 89, 0.4);

  --color-bg-page: #fbf9f6;
  --color-bg-card: #ffffff;
  --color-bg-cream: #f6f1ea;

  --color-text-main: #2b2b2b;
  --color-text-muted: #555555;
  --color-text-light: #777777;

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
  --font-accent: 'Cormorant Garamond', serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(79, 18, 25, 0.12);
  --shadow-lg: 0 16px 36px rgba(79, 18, 25, 0.18);
}

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

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

body.template-m30 {
  background-color: var(--color-bg-page);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

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

button, input, select, textarea {
  font-family: inherit;
}

/* Max 480px Mobile Stage Centered on Desktop */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--color-bg-page);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* ==========================================================================
   FLOATING NOTIFICATION TOAST (TOP)
   ========================================================================== */
.wish-notify-top {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 380px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wish-toast-item {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-gold-border);
  box-shadow: 0 8px 20px rgba(79, 18, 25, 0.12);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s, transform 0.3s;
}

.toast-heart-badge {
  width: 32px;
  height: 32px;
  background: var(--color-burgundy-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-time {
  font-size: 10px;
  color: #999;
  font-weight: 400;
  margin-left: 4px;
}

.toast-msg {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   FLOATING BOTTOM CONTROLS (AUDIO & SCROLL TOP)
   ========================================================================== */
.floating-controls {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  pointer-events: none;
  z-index: 999;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
}

.btn-float {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-burgundy-deep);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(79, 18, 25, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-float:hover {
  transform: scale(1.08);
  background: var(--color-burgundy-rich);
}

.btn-float:active {
  transform: scale(0.95);
}

.btn-audio-float {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

body:not(.envelope-locked) .btn-audio-float {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-audio-float .icon-play {
  display: none;
  font-size: 14px;
  margin-left: 2px;
}

.btn-audio-float .icon-pause {
  display: block;
  font-size: 12px;
}

.btn-audio-float.is-paused .icon-play {
  display: block;
}

.btn-audio-float.is-paused .icon-pause {
  display: none;
}

.btn-scroll-top {
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.btn-scroll-top.is-visible {
  opacity: 0.9;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ==========================================================================
   SECTION 1: HERO BURGUNDY ENVELOPE (INTERACTIVE)
   ========================================================================== */
.section-envelope {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 20px;
  position: relative;
  background: radial-gradient(circle at center, #ffffff 0%, var(--color-bg-page) 100%);
  user-select: none;
}

.envelope-stage {
  position: relative;
  width: 350px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Envelope Opened State (Back pocket behind polaroids) */
.envelope-opened-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(79, 18, 25, 0.25));
  transition: opacity 0.6s ease;
}

/* Envelope Closed State (Front cover with closed flap & seal) */
.envelope-closed-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  filter: drop-shadow(0 12px 24px rgba(79, 18, 25, 0.25));
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.seal-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px dashed rgba(197, 160, 89, 0.5);
  animation: rotateGlow 12s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Burgundy Leaves Accent */
.envelope-leaves-wrap {
  position: absolute;
  bottom: 0px;
  left: -10px;
  width: 190px;
  z-index: 25;
  pointer-events: none;
  filter: drop-shadow(2px 6px 12px rgba(0, 0, 0, 0.15));
}

.leaves-img {
  width: 100%;
  display: block;
}

/* Polaroids inside envelope */
.envelope-polaroids {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 220px;
  z-index: 5;
  pointer-events: none;
}

.polaroid-card {
  position: absolute;
  top: 0;
  background: #ffffff;
  padding: 8px 8px 24px;
  border-radius: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #ebebeb;
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.polaroid-card-left {
  left: 10px;
  width: 150px;
  transform: translateY(40px) rotate(-5deg);
}

.polaroid-card-right {
  right: 10px;
  width: 165px;
  transform: translateY(40px) rotate(5deg);
}

.polaroid-photo-frame {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #eee;
}

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

/* Floating Hearts */
.polaroid-hearts {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  z-index: 30;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s, opacity 0.6s ease 0.5s;
  pointer-events: none;
}

.hearts-img {
  width: 140px;
  height: auto;
  animation: floatHeart 3s ease-in-out infinite alternate;
}

@keyframes floatHeart {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

/* Envelope Caption / Prompt */
.envelope-caption-wrap {
  margin-top: 24px;
  text-align: center;
  position: relative;
  min-height: 40px;
  cursor: pointer;
}

.prompt-open {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-burgundy-deep);
  letter-spacing: 1px;
  transition: opacity 0.4s ease;
}

.prompt-thanks {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-script);
  font-size: 38px;
  color: var(--color-burgundy-deep);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- ENVELOPE OPENED STATE --- */
.section-envelope.is-opened .envelope-closed-wrap {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.section-envelope.is-opened .envelope-opened-wrap {
  opacity: 1;
}

.section-envelope.is-opened .polaroid-card-left {
  opacity: 1;
  transform: translateY(-135px) rotate(-16deg);
}

.section-envelope.is-opened .polaroid-card-right {
  opacity: 1;
  transform: translateY(-160px) rotate(14deg);
}

.section-envelope.is-opened .polaroid-hearts {
  opacity: 1;
  transform: translateX(-50%) translateY(-60px) scale(1.1);
}

.section-envelope.is-opened .prompt-open {
  opacity: 0;
}

.section-envelope.is-opened .prompt-thanks {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   CONTENT SECTIONS (INITIAL STATE & SMOOTH TRANSITION)
   ========================================================================== */
html.envelope-locked,
body.envelope-locked {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100vh !important;
}

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

body.envelope-locked .floating-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-controls {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.invitation-content {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   SECTION 2: DOUBLE-ARCH INVITATION CARD & WEDDING CALENDAR
   ========================================================================== */
.section-invitation {
  padding: 40px 16px 50px;
  position: relative;
}

/* Double-Arch Card */
.invitation-arched-card {
  position: relative;
  background: var(--color-burgundy-deep);
  border-radius: 180px 180px 30px 30px;
  padding: 60px 24px 36px;
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: visible;
}

.card-floral-top {
  position: absolute;
  top: -30px;
  right: -25px;
  width: 170px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
}

.card-intro-block {
  margin-bottom: 16px;
}

.card-intro-text {
  font-family: var(--font-accent);
  font-size: 18px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.card-guest-name {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-gold-light);
  margin-bottom: 6px;
}

.card-invite-sub {
  font-family: var(--font-accent);
  font-size: 16px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}

.card-couple-names {
  margin: 12px 0 28px;
}

.couple-names-title {
  font-family: var(--font-script);
  font-size: 60px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.couple-names-title .names-separator {
  display: block;
  font-size: 32px;
  margin: -10px 0;
  color: var(--color-gold-light);
}

/* Cream Arch Badge with Ceremony Details */
.card-details-badge {
  background: var(--color-bg-card);
  color: var(--color-burgundy-deep);
  border-radius: 120px 120px 20px 20px;
  padding: 36px 18px 24px;
  margin-top: 10px;
  box-shadow: inset 0 0 0 1px var(--color-gold-border), 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
}

.ceremony-datetime {
  margin-bottom: 20px;
}

.ceremony-date-highlight {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
  letter-spacing: 1px;
}

.ceremony-lunar-date {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 2px 0 8px;
}

.ceremony-time-text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-burgundy-rich);
  letter-spacing: 1px;
}

.ceremony-venue-block .venue-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
  margin-bottom: 4px;
}

.ceremony-venue-block .venue-address {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-directions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-burgundy-deep);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(79, 18, 25, 0.25);
  transition: transform 0.2s, background-color 0.2s;
}

.btn-directions:hover {
  background: var(--color-burgundy-rich);
  transform: translateY(-2px);
}

/* Calendar Block */
.calendar-wrapper {
  margin-top: 50px;
  text-align: center;
  padding: 0 10px;
}

.calendar-header-typography {
  margin-bottom: 16px;
  position: relative;
}

.calendar-year {
  display: block;
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 400;
  color: var(--color-text-main);
  line-height: 1;
  letter-spacing: 2px;
}

.calendar-month {
  display: block;
  font-family: var(--font-script);
  font-size: 54px;
  color: var(--color-burgundy-deep);
  margin-top: -24px;
}

.calendar-grid-wrap {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.calendar-days-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-main);
}

.calendar-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
}

.calendar-day-cell {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.calendar-day-cell.is-wedding-day {
  background: var(--color-burgundy-deep);
  color: #ffffff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(79, 18, 25, 0.35);
  font-weight: 700;
}

/* Countdown Block */
.countdown-wrapper {
  margin-top: 40px;
  text-align: center;
}

.countdown-quote {
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.countdown-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.time-block {
  background: #ffffff;
  border: 1px solid var(--color-gold-border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  min-width: 62px;
  box-shadow: var(--shadow-sm);
}

.time-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
  line-height: 1;
}

.time-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.time-sep {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
}

/* ==========================================================================
   SECTION 3: RSVP BANNER, COUPLE POLAROIDS & DRESS CODE
   ========================================================================== */
.section-rsvp-couple {
  padding: 30px 16px 50px;
  position: relative;
}

.rsvp-banner-card {
  background: var(--color-burgundy-deep);
  color: #ffffff;
  border-radius: 140px 140px 24px 24px;
  padding: 50px 20px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  margin-bottom: 40px;
}

.rsvp-banner-script {
  font-family: var(--font-script);
  font-size: 42px;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 6px;
}

.rsvp-banner-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.rsvp-banner-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto 24px;
}

.rsvp-seal-trigger {
  display: flex;
  justify-content: center;
}

.btn-rsvp-seal {
  background: radial-gradient(circle, #7e1e28 0%, #4f1219 100%);
  border: 3px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-rsvp-seal:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Couple Polaroids Showcase */
.couple-polaroids-showcase {
  position: relative;
  min-height: 480px;
  margin: 20px 0 40px;
}

.polaroid-floral-accent {
  position: absolute;
  top: -25px;
  right: 0px;
  width: 150px;
  z-index: 5;
  pointer-events: none;
}

.couple-polaroid {
  position: absolute;
  background: #ffffff;
  padding: 10px 10px 24px;
  border-radius: 2px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #eaeaea;
  width: 200px;
}

.polaroid-groom {
  top: 130px;
  left: 10px;
  transform: rotate(-7deg);
  z-index: 2;
}

.polaroid-bride {
  top: 10px;
  right: 15px;
  transform: rotate(6deg);
  z-index: 3;
}

.polaroid-inner-frame {
  width: 100%;
}

.polaroid-inner-frame .couple-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: #eee;
}

.polaroid-name {
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--color-burgundy-deep);
  text-align: center;
  margin-top: 10px;
}

.polaroid-ribbon-accent {
  position: absolute;
  bottom: 10px;
  left: 170px;
  width: 90px;
  z-index: 10;
  pointer-events: none;
}

/* Dress Code Block */
.dresscode-wrapper {
  text-align: center;
  margin-top: 30px;
  padding: 0 10px;
}

.dresscode-title {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--color-burgundy-deep);
  margin-bottom: 8px;
}

.dresscode-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 20px;
}

.dresscode-palette {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.color-swatch {
  width: 44px;
  height: 70px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #ffffff;
}

.swatch-ivory { background-color: #f5f0eb; }
.swatch-black { background-color: #1a1a1a; }
.swatch-burgundy { background-color: #5c1921; }
.swatch-olive { background-color: #4b6043; }
.swatch-stone { background-color: #d9d7ce; }

/* ==========================================================================
   SECTION 4: WISHES STREAM (GỬI LỜI CHÚC)
   ========================================================================== */
.section-wishes {
  padding: 40px 16px 50px;
}

.wishes-heading-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.wishes-title {
  font-family: var(--font-script);
  font-size: 54px;
  color: var(--color-burgundy-deep);
  line-height: 1.1;
  margin-bottom: 8px;
}

.wishes-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 330px;
  margin: 0 auto;
}

.wish-form-card {
  background: var(--color-burgundy-deep);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  box-shadow: var(--shadow-md);
}

.wish-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.wish-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #ffffff;
  color: var(--color-text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wish-input:focus {
  border-color: var(--color-gold-accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}

.btn-send-wish {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--color-burgundy-deep);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

.btn-send-wish:hover {
  background: var(--color-gold-light);
  color: #ffffff;
}

.btn-send-wish:active {
  transform: scale(0.98);
}

.wish-stream-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  max-height: 340px;
  overflow-y: auto;
  padding: 14px;
}

.wish-stream-container::-webkit-scrollbar {
  width: 4px;
}

.wish-stream-container::-webkit-scrollbar-thumb {
  background: rgba(79, 18, 25, 0.2);
  border-radius: 4px;
}

.wish-stream-item {
  background: var(--color-bg-page);
  border-left: 4px solid var(--color-burgundy-deep);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  animation: fadeInWish 0.4s ease;
}

.wish-stream-item:last-child {
  margin-bottom: 0;
}

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

.wish-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
}

.wish-item-time {
  font-size: 11px;
  color: #999;
}

.wish-item-text {
  font-size: 13px;
  color: var(--color-text-main);
  line-height: 1.5;
  word-break: break-word;
}

@keyframes fadeInWish {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SECTION 5: WEDDING GIFT CTA (HỘP MỪNG CƯỚI)
   ========================================================================== */
.section-gift {
  padding: 40px 16px 50px;
  text-align: center;
}

.gift-section-title {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--color-burgundy-deep);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.gift-section-desc {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 28px;
}

.gift-box-cta {
  display: flex;
  justify-content: center;
}

.btn-gift-box {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
}

.gift-box-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(79, 18, 25, 0.25));
  animation: giftBounce 2.5s ease-in-out infinite;
}

@keyframes giftBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}

/* ==========================================================================
   SECTION 6: CIRCULAR WREATH PORTRAIT & THANK YOU
   ========================================================================== */
.section-thanks {
  padding: 30px 16px 50px;
  text-align: center;
}

.wreath-portrait-wrapper {
  position: relative;
  width: 320px;
  max-width: 88vw;
  aspect-ratio: 1 / 1;
  margin: 0 auto 28px;
}

.wreath-frame-inner {
  position: absolute;
  top: 59%;
  left: 48.8%;
  transform: translate(-50%, -50%);
  width: 69.5%;
  height: 69.5%;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  z-index: 1;
}

.wreath-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.wreath-graphic-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.wreath-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.16));
  display: block;
}

.thanks-message-block {
  max-width: 360px;
  margin: 0 auto 40px;
}

.thanks-title {
  font-family: var(--font-script);
  font-size: 54px;
  color: var(--color-burgundy-deep);
  line-height: 1.1;
  margin-bottom: 12px;
}

.thanks-text {
  font-size: 14px;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Shop Catalog Link (Required by TLNV TN-8) */
.shop-catalog-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.catalog-link {
  display: inline-block;
  color: #888888;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.catalog-link:hover {
  color: var(--color-burgundy-deep);
}

/* ==========================================================================
   MODALS (HỘP MỪNG CƯỚI & XÁC NHẬN THAM DỰ)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.is-active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 20px 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.btn-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  color: #555;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.btn-modal-close:hover {
  background: var(--color-burgundy-deep);
  color: #fff;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-title-script {
  font-family: var(--font-script);
  font-size: 44px;
  color: var(--color-burgundy-deep);
  line-height: 1.1;
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-muted);
}

/* Gift Modal Body */
.modal-gift-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gift-account-box {
  background: var(--color-bg-page);
  border: 1px solid var(--color-gold-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.gift-account-heading {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--color-burgundy-deep);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.qr-container {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

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

.gift-info-lines {
  font-size: 13px;
  color: var(--color-text-main);
  line-height: 1.6;
  margin-bottom: 12px;
}

.acc-num-val {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-burgundy-deep);
}

.gift-btn-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-gift-action {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-burgundy-deep);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.btn-download-qr {
  background: transparent;
  color: var(--color-burgundy-deep);
}

.btn-download-qr:hover {
  background: var(--color-burgundy-subtle);
}

.btn-copy-stk {
  background: var(--color-burgundy-deep);
  color: #ffffff;
}

.btn-copy-stk:hover {
  background: var(--color-burgundy-rich);
}

/* RSVP Modal Body */
.rsvp-question-group {
  margin-bottom: 18px;
}

.question-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-burgundy-deep);
  margin-bottom: 8px;
}

.radio-options-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-page);
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.2s, background-color 0.2s;
}

.radio-chip input[type="radio"] {
  accent-color: var(--color-burgundy-deep);
}

.radio-chip:hover {
  border-color: var(--color-burgundy-deep);
}

.rsvp-text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #ccc;
  font-size: 14px;
  outline: none;
}

.rsvp-text-input:focus {
  border-color: var(--color-burgundy-deep);
  box-shadow: 0 0 0 2px rgba(79, 18, 25, 0.15);
}

.btn-rsvp-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-burgundy-deep);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 18, 25, 0.3);
  transition: background-color 0.2s;
}

.btn-rsvp-submit:hover {
  background: var(--color-burgundy-rich);
}

.rsvp-success-box {
  text-align: center;
  padding: 20px 10px;
}

.rsvp-success-box .success-icon {
  font-size: 40px;
  color: var(--color-burgundy-deep);
  margin-bottom: 12px;
}

.rsvp-success-box .success-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-burgundy-deep);
  margin-bottom: 10px;
}

.rsvp-success-box .success-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.rsvp-success-box .success-script {
  font-family: var(--font-script);
  font-size: 36px;
  color: var(--color-burgundy-deep);
}

/* ==========================================================================
   FEEDBACK TOAST MESSAGE
   ========================================================================== */
.toast-message {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(43, 43, 43, 0.9);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  z-index: 11000;
  transition: opacity 0.3s, transform 0.3s;
}

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

/* Fireworks Container */
.fireworks-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  display: none;
}

#fireworksCanvas {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   REDUCED MOTION (REQUIRED FOR ACCESSIBILITY & TESTS)
   ========================================================================== */
@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;
  }
}
