/* ========================================================
   TƠ DUYÊN - XANH (m27) - STYLESHEET
   Hoa Rum Trắng & Dải Lụa Xanh Tối Giản
   ======================================================== */

:root {
  --color-primary: #5e813c;
  --color-dark: #1a3500;
  --color-frame: #d1db9c;
  --color-on-dark: #fefbf4;
  --color-cream: #f3dfc3;
  --color-page-bg: #ffffff;
  --color-card-bg: #ffffff;
  --color-text-muted: rgba(26, 53, 0, 0.7);

  --font-serif: 'EB Garamond', 'Times New Roman', serif;
  --font-body: 'Baskerville', 'Times New Roman', serif;
  --font-calligraphy: 'Carattere', cursive;
  --font-cursive: 'Great Vibes', cursive;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(94, 129, 60, 0.18);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.15);
}

/* Palette scope required by wedding backend profile validator */
[data-palette="to-duyen-xanh"] {
  --theme-primary: var(--color-primary);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #f2f6ea;
}

/* ========================================================
   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 .page-container {
  opacity: 0;
  visibility: hidden;
  max-height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

body.envelope-locked .floating-controls {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body {
  font-family: var(--font-body);
  color: var(--color-primary);
  background-color: #f2f6ea;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

/* Main Container: Mobile phone simulator style (max 480px) */
.page-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--color-page-bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding-bottom: 40px;
  transition: opacity 0.6s ease;
}

@media (min-width: 768px) {
  .page-container {
    max-width: 520px;
    margin: 20px auto;
    border-radius: 12px;
  }
}

/* Text alignments */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* Decorative Assets */
.bg-decor-line {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

.bg-decor-flower {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
}

.bg-decor-ribbon {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  width: 140%;
  max-width: none;
  height: auto;
}

/* ========================================================
   SECTION 0: AMBIENT FALLING PARTICLES
   ======================================================== */
.ambient-leaves-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.leaf-particle {
  position: absolute;
  top: -30px;
  opacity: 0.75;
  border-radius: 70% 0 70% 0;
  animation-name: fallPetals;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes fallPetals {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.75;
  }
  85% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(105vh) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

/* ========================================================
   SECTION 1: ENVELOPE COVER SCREEN
   ======================================================== */
.envelope-cover {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(to bottom right, #ffffff, #f2f6ea, #e3ecd2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  touch-action: none;
  overscroll-behavior: none;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease, visibility 0.8s ease;
}

.envelope-cover.is-opened {
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-card-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seal-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(94, 129, 60, 0.4);
  position: absolute;
  top: -25px;
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.seal-badge:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(94, 129, 60, 0.6);
}

.seal-heart-icon {
  width: 24px;
  height: 24px;
}

.envelope-card {
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 45px 24px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(26, 53, 0, 0.14);
  border: 1px solid rgba(94, 129, 60, 0.2);
  text-align: center;
}

.card-decor-corner {
  position: absolute;
  width: 130px;
  height: auto;
  opacity: 0.85;
  pointer-events: none;
}

.decor-top-left {
  top: -25px;
  left: -25px;
  transform: rotate(45deg);
}

.decor-bottom-right {
  bottom: -25px;
  right: -25px;
  transform: scaleX(-1) rotate(-45deg);
}

.envelope-couple-title {
  font-family: var(--font-calligraphy);
  color: var(--color-primary);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.envelope-couple-title .amp-symbol {
  font-family: var(--font-cursive);
  font-size: 2.2rem;
  color: var(--color-primary);
  line-height: 0.8;
}

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--color-primary);
}

.ornament-divider .div-line {
  width: 40px;
  height: 1px;
  background-color: var(--color-frame);
}

.ornament-divider .div-symbol {
  font-size: 1.1rem;
}

.envelope-date {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.envelope-guest-badge {
  background: rgba(94, 129, 60, 0.08);
  border: 1px dashed var(--color-primary);
  border-radius: 20px;
  padding: 6px 16px;
  display: inline-block;
  margin-bottom: 22px;
}

.envelope-guest-badge .guest-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-dark);
  font-weight: 500;
}

.btn-open-envelope {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-on-dark);
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 36px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(94, 129, 60, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pulseButton 2.2s infinite ease-in-out;
}

.btn-open-envelope:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(94, 129, 60, 0.5);
}

.btn-open-envelope .btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: shineMove 2.6s infinite ease-in-out;
}

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

@keyframes shineMove {
  0% { left: -100%; }
  60%, 100% { left: 160%; }
}

/* ========================================================
   FLOATING CONTROLS
   ======================================================== */
.floating-controls {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-float {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid rgba(94, 129, 60, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.btn-float:hover {
  transform: scale(1.08);
}

.btn-audio-float.is-playing .icon-disc {
  animation: rotateDisc 4s linear infinite;
}

.btn-audio-float .sound-wave {
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}

.btn-audio-float.is-playing .sound-wave {
  display: flex;
}

.btn-audio-float.is-playing .sound-wave span {
  width: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: soundBar 1s infinite ease-in-out;
}

.btn-audio-float.is-playing .sound-wave span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.btn-audio-float.is-playing .sound-wave span:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.btn-audio-float.is-playing .sound-wave span:nth-child(3) { height: 8px; animation-delay: 0.2s; }

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

@keyframes soundBar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* ========================================================
   SECTION 1: HERO COVER
   ======================================================== */
.section-hero {
  position: relative;
  z-index: 10;
  padding: 50px 20px 40px;
  overflow: hidden;
}

.line-hero-top {
  right: -40px;
  top: -50px;
  width: 180px;
  height: auto;
}

.flower-hero-top {
  right: -15px;
  top: 15px;
  width: 170px;
  height: auto;
}

.hero-photos-wrap {
  position: relative;
  z-index: 10;
  width: 80%;
  max-width: 330px;
  aspect-ratio: 331 / 395;
  margin: 30px auto 0;
}

.tilted-photo-card {
  position: absolute;
  width: 65%;
  aspect-ratio: 200 / 250;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-groom {
  left: 0;
  top: 0;
  transform: rotate(-8.25deg) skewX(-0.57deg);
}

.card-bride {
  right: 0;
  bottom: 0;
  transform: rotate(12.17deg) skewX(0.83deg);
}

.tilted-photo-inner {
  width: 100%;
  height: 100%;
  border: 5px solid var(--color-frame);
  background-color: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 53, 0, 0.16);
  overflow: hidden;
}

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

.ribbon-hero-bottom {
  bottom: 50px;
  left: -20%;
  height: 140px;
}

.hero-names-staggered {
  position: relative;
  z-index: 10;
  margin-top: 35px;
  padding: 0 10%;
  display: flex;
  flex-direction: column;
}

.giant-whisper-amp {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-cursive);
  font-size: 11rem;
  color: rgba(11, 46, 0, 0.08);
  line-height: 0.5;
  pointer-events: none;
  user-select: none;
}

.name-row-left {
  text-align: left;
}

.name-row-right {
  text-align: right;
  margin-top: 4px;
}

.name-groom-text, .name-bride-text {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 7.5vw, 2.5rem);
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-primary);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

/* ========================================================
   SECTION 2: CEREMONY & FAMILY (LEFT ALIGNED)
   ======================================================== */
.section-ceremony {
  position: relative;
  z-index: 10;
  padding: 30px 10% 40px;
  overflow: hidden;
}

.line-ceremony {
  right: -90px;
  top: 140px;
  width: 180px;
  height: auto;
  transform: rotate(5deg);
}

.flower-ceremony {
  right: -90px;
  top: 190px;
  width: 220px;
  height: auto;
  transform: rotate(130deg) scaleY(-1);
}

.ribbon-ceremony-bottom {
  bottom: -20px;
  left: -30%;
  height: 140px;
}

.ceremony-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  font-family: var(--font-serif);
  color: var(--color-primary);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.family-info-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 12px;
  font-family: var(--font-body);
}

.family-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.family-parent-title {
  font-size: 0.78rem;
  color: var(--color-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.parent-name {
  font-size: 0.88rem;
  color: var(--color-primary);
}

.family-address {
  margin-top: 3px;
  font-size: 0.7rem;
  line-height: 1.25;
  color: var(--color-dark);
}

.child-status {
  margin-top: 6px;
}

.child-rank {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-dark);
}

.child-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-primary);
}

.family-divider {
  width: 1px;
  height: 60px;
  background-color: var(--color-primary);
}

.announcement-banner {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calligraphy-couple-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-calligraphy);
  font-size: 2.3rem;
  line-height: 1.05;
  color: var(--color-primary);
}

.calligraphy-couple-block .calligraphy-amp {
  font-family: var(--font-cursive);
  font-size: 1.8rem;
  line-height: 0.8;
  margin-left: 20px;
}

.ceremony-stacked-date {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.ceremony-header-note {
  font-size: 0.82rem;
  color: var(--color-primary);
  line-height: 1.35;
}

.date-row-stacked {
  display: flex;
  align-items: center;
  gap: 12px;
}

.giant-day-num {
  font-family: var(--font-body);
  font-size: 3.6rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1;
}

.date-stacked-divider {
  width: 1px;
  height: 48px;
  background-color: var(--color-primary);
}

.date-stacked-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stacked-weekday {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.stacked-month-year {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--color-primary);
  text-transform: uppercase;
}

.ceremony-lunar-note, .party-lunar-note {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--color-dark);
}

/* ========================================================
   SECTION 3: PHOTO GALLERY (RIGHT ALIGNED TITLE)
   ======================================================== */
.section-gallery {
  position: relative;
  z-index: 10;
  padding: 30px 10%;
}

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

.gallery-item {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(94, 129, 60, 0.05);
}

.gallery-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(94, 129, 60, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #ffffff;
  font-size: 1.4rem;
}

.gallery-item:hover .gallery-hover-overlay {
  opacity: 1;
}

/* ========================================================
   SECTION 4: RECEPTION CARD (RIGHT ALIGNED)
   ======================================================== */
.section-party {
  position: relative;
  z-index: 10;
  padding: 30px 10% 40px;
  overflow: hidden;
}

.line-party {
  left: -50px;
  top: 120px;
  width: 160px;
  height: auto;
  transform: rotate(-177deg);
}

.flower-party {
  left: -60px;
  top: 120px;
  width: 150px;
  height: auto;
  transform: rotate(50deg);
}

.ribbon-party-bottom {
  bottom: -20px;
  left: -40%;
  height: 140px;
}

.party-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.party-time-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.party-time-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-dark);
  text-transform: uppercase;
}

.date-row-right {
  justify-content: flex-end;
  margin-top: 6px;
}

/* Custom Mini Calendar Box with Border */
.calendar-box-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.calendar-box {
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--color-dark);
  border-radius: 19px;
  padding: 12px 14px 16px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 53, 0, 0.08);
}

.calendar-box-header {
  font-family: var(--font-cursive);
  font-size: 1.8rem;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 6px;
  line-height: 1;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 6px;
  opacity: 0.85;
}

.calendar-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 0;
  text-align: center;
  font-size: 0.85rem;
  font-family: var(--font-serif);
}

.calendar-day-cell {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-primary);
}

.calendar-day-cell.is-wedding-day {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(94, 129, 60, 0.4);
}

.btn-add-calendar-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--color-dark);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 4px 0;
}

/* RSVP Button */
.rsvp-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.btn-rsvp-pill {
  background-color: var(--color-primary);
  color: var(--color-on-dark);
  border: none;
  border-radius: 7px;
  padding: 10px 26px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(94, 129, 60, 0.3);
  transition: transform 0.25s ease;
}

.btn-rsvp-pill:hover {
  transform: scale(1.04);
}

/* Venue Information */
.venue-info-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.venue-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.venue-address {
  font-size: 0.85rem;
  color: var(--color-dark);
  line-height: 1.45;
}

.btn-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(94, 129, 60, 0.1);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.btn-map-link:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* ========================================================
   SECTION 5: DRESS CODE (LEFT ALIGNED)
   ======================================================== */
.section-dresscode {
  position: relative;
  z-index: 10;
  padding: 24px 10% 30px;
}

.dresscode-subtitle {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--color-dark);
  margin-top: 4px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.dresscode-palette-row {
  display: flex;
  gap: 16px;
}

.color-swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.swatch-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: 2px solid #ffffff;
}

.swatch-name {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-family: var(--font-body);
}

/* ========================================================
   SECTION 6: TIMELINE (CHƯƠNG TRÌNH TIỆC)
   ======================================================== */
.section-timeline {
  position: relative;
  z-index: 10;
  padding: 30px 10% 40px;
  overflow: hidden;
}

.line-timeline {
  right: -70px;
  top: 10px;
  width: 170px;
  height: auto;
}

.flower-timeline {
  right: -80px;
  top: 60px;
  width: 190px;
  height: auto;
  transform: rotate(130deg) scaleY(-1);
}

.ribbon-timeline-bottom {
  bottom: -20px;
  left: -20%;
  height: 140px;
}

.timeline-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 290px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.timeline-icon-wrap {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.timeline-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-serif);
}

.timeline-time {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
}

.timeline-label {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--color-dark);
  text-transform: uppercase;
}

/* ========================================================
   SECTION 7: GUESTBOOK (RIGHT ALIGNED)
   ======================================================== */
.section-guestbook {
  position: relative;
  z-index: 10;
  padding: 24px 10% 36px;
  overflow: hidden;
}

.line-guestbook {
  left: -70px;
  top: 60px;
  width: 150px;
  height: auto;
  transform: rotate(167deg);
}

.guestbook-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wish-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  background: rgba(242, 246, 234, 0.45);
  border-radius: 8px;
  border: 1px solid rgba(94, 129, 60, 0.25);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  padding: 10px 14px;
  background-color: transparent;
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--color-dark);
  background-color: rgba(255, 255, 255, 0.85);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn-magic-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 6px;
}

.btn-submit-wish {
  background-color: var(--color-primary);
  color: var(--color-on-dark);
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 0.85rem;
  cursor: pointer;
}

.wishes-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 8px;
}

.wish-card {
  border: 1px solid rgba(94, 129, 60, 0.35);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.88rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

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

.wish-author {
  color: var(--color-primary);
  font-weight: 600;
}

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

.wish-body {
  color: var(--color-dark);
  line-height: 1.4;
}

/* ========================================================
   SECTION 8: WEDDING GIFT BOX (RIGHT ALIGNED)
   ======================================================== */
.section-giftbox {
  position: relative;
  z-index: 10;
  padding: 24px 10% 36px;
  overflow: hidden;
}

.line-giftbox {
  left: -70px;
  top: -30px;
  width: 150px;
  height: auto;
}

.flower-giftbox {
  left: -80px;
  top: -20px;
  width: 180px;
  height: auto;
  transform: rotate(50deg);
}

.giftbox-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.giftbox-prompt {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-primary);
  margin-top: 2px;
  margin-bottom: 20px;
}

.giftbox-stage {
  position: relative;
  width: 240px;
  height: 250px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-giftbox-wrap {
  position: relative;
  width: 160px;
  height: 170px;
  animation: giftBob 3s ease-in-out infinite;
}

.main-giftbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(26, 53, 0, 0.2));
}

.giftbox-shadow {
  position: absolute;
  bottom: -12px;
  left: 10%;
  width: 80%;
  height: 16px;
  background: radial-gradient(ellipse at center, rgba(26, 53, 0, 0.25) 0%, transparent 70%);
  animation: shadowPulse 3s ease-in-out infinite;
}

.mini-decor {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.mini-decor-1 { width: 30px; top: 15px; left: 10px; transform: rotate(-22deg); animation: miniFloat 3.8s ease-in-out infinite; }
.mini-decor-2 { width: 32px; top: 10px; right: 15px; transform: rotate(20deg); animation: miniFloat 4.2s ease-in-out infinite 0.5s; }
.mini-decor-3 { width: 24px; top: 100px; left: 5px; transform: rotate(-18deg); animation: miniFloat 3.6s ease-in-out infinite 1s; }
.mini-decor-4 { width: 22px; top: 105px; right: 8px; transform: rotate(14deg); animation: miniFloat 4s ease-in-out infinite 0.2s; }
.mini-decor-5 { width: 34px; bottom: 30px; left: 20px; transform: rotate(8deg); animation: miniFloat 4.5s ease-in-out infinite 0.8s; }

.giftbox-tap-hint {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(94, 129, 60, 0.3);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  white-space: nowrap;
}

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

@keyframes shadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(0.85); opacity: 0.3; }
}

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

/* ========================================================
   SECTION 9: FOOTER
   ======================================================== */
.section-footer {
  position: relative;
  z-index: 10;
  padding: 30px 20px 20px;
  text-align: center;
}

.footer-couple-name {
  font-family: var(--font-calligraphy);
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1;
}

.footer-thank-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-primary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.footer-ribbon-decor {
  width: 100%;
  overflow: hidden;
  margin: 10px 0;
}

.footer-ribbon-img {
  width: 120%;
  margin-left: -10%;
  height: auto;
  transform: scaleX(-1);
}

.shop-catalog-footer {
  margin-top: 10px;
}

.catalog-link {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

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

/* ========================================================
   MODALS: GIFT, RSVP & LIGHTBOX
   ======================================================== */
.modal-dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog-wrap[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 28px 20px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-btn-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-primary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Gift Modal Styles */
.gift-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.gift-modal-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.gift-modal-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.gift-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-account-card {
  border: 1px solid rgba(94, 129, 60, 0.25);
  border-radius: 12px;
  padding: 16px;
  background-color: #fbfcfa;
}

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

.badge-role {
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.account-bank-name {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.account-qr-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(94, 129, 60, 0.2);
}

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

.account-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  color: var(--color-dark);
}

.detail-val {
  color: var(--color-primary);
}

.acc-num-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-num {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-copy-acc {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: rgba(94, 129, 60, 0.12);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-copy-acc:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* RSVP Modal Styles */
.rsvp-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.rsvp-modal-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.rsvp-modal-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

.rsvp-radio-options {
  display: flex;
  gap: 10px;
}

.radio-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(94, 129, 60, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  background-color: #fafcf8;
}

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

.btn-rsvp-submit {
  width: 100%;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(94, 129, 60, 0.35);
  margin-top: 6px;
}

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

.rsvp-success-box .success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: #eef3e6;
  color: var(--color-primary);
  font-size: 1.5rem;
  border-radius: 50%;
  margin-bottom: 12px;
}

.rsvp-success-box h5 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 6px;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-modal[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-btn-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 20;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

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

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Toast */
.toast-notify {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-dark);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  z-index: 99999999;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
