/* ========================================================
   TEMPLATE M29: HOÀNG KIM XANH (ROYAL_GREEN)
   Opulent royal gold filigree border frames on deep imperial
   emerald forest green background.
   ======================================================== */

:root,
[data-palette="hoang-kim-xanh"] {
  --color-primary: #E1BC7C;
  --color-secondary: #d4a85c;
  --color-light-gold: #f5e6c8;
  --color-bg: #001A08;
  --color-bg-deep: rgba(0, 14, 6, 0.98);
  --color-card-bg: linear-gradient(135deg, #001A08 0%, #003F1E 50%, #001A08 100%);
  --color-gold-border: rgba(225, 188, 124, 0.35);
  --font-serif: "EB Garamond", "Times New Roman", Times, serif;
  --font-baskerville: "Libre Baskerville", "Baskerville", "Times New Roman", serif;
  --font-calligraphy: "The Nautigal", cursive;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --corner-size: clamp(56px, 11.9vw, 91px);
}

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

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

/* ========================================================
   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.template-m29 {
  font-family: var(--font-baskerville);
  background-color: var(--color-bg);
  color: var(--color-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Sparkle Particles */
.ambient-sparkles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.sparkle-item {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  animation: floatSparkle linear infinite;
}

@keyframes floatSparkle {
  0% {
    transform: translateY(105vh) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  80% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-10vh) scale(1.1) rotate(180deg);
    opacity: 0;
  }
}

/* ========================================================
   SECTION 0: ENVELOPE / ROYAL COVER
   ======================================================== */
.envelope-cover {
  position: fixed;
  inset: 0;
  background-color: var(--color-bg-deep);
  background-image: radial-gradient(circle at center, #003314 0%, #000d04 100%);
  z-index: 1000;
  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-cover.envelope-opened {
  transform: translateY(-100vh) scale(0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-card-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.envelope-flower-decor {
  position: absolute;
  width: 80%;
  max-width: 320px;
  height: auto;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  left: 50%;
  transform: translateX(-50%);
}

.flower-top {
  top: -45px;
}

.flower-bottom {
  bottom: -45px;
  transform: translateX(-50%) scaleY(-1);
}

.seal-badge {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  background-color: #001A08;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  z-index: 10;
  color: var(--color-primary);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.seal-badge:hover {
  transform: translateX(-50%) scale(1.12);
  box-shadow: 0 6px 22px rgba(225, 188, 124, 0.4);
}

.seal-heart-svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.envelope-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-gold-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(0, 0, 0, 0.4);
  border-radius: 14px;
  padding: 45px 24px 35px;
  text-align: center;
  position: relative;
  z-index: 5;
}

.royal-filigree-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.filigree-emblem {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.gold-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

.gold-line {
  flex: 1;
  max-width: 50px;
  height: 1px;
  background-color: var(--color-primary);
  opacity: 0.6;
}

.envelope-badge-top {
  font-family: var(--font-baskerville);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-secondary);
  margin-bottom: 14px;
}

.envelope-couple-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-calligraphy);
  color: var(--color-primary);
  font-size: 46px;
  line-height: 1.15;
  margin-bottom: 10px;
}

.royal-amp {
  font-family: var(--font-baskerville);
  font-size: 26px;
  color: var(--color-secondary);
  line-height: 1;
  margin: 2px 0;
}

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px auto;
  width: 75%;
  color: var(--color-primary);
}

.ornament-divider .div-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary), transparent);
}

.ornament-divider .div-diamond {
  font-size: 10px;
}

.envelope-date {
  font-family: var(--font-baskerville);
  font-size: 13px;
  color: var(--color-light-gold);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.envelope-guest-badge {
  background-color: rgba(225, 188, 124, 0.08);
  border: 1px dashed rgba(225, 188, 124, 0.35);
  border-radius: 6px;
  padding: 8px 16px;
  margin-bottom: 24px;
  display: inline-block;
}

.guest-text {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 500;
}

.btn-open-envelope {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: #001A08;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  border: none;
  border-radius: 25px;
  padding: 12px 36px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(225, 188, 124, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.btn-open-envelope:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(225, 188, 124, 0.5);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: btnShine 2.5s infinite;
}

@keyframes btnShine {
  0% { left: -100%; }
  40% { left: 150%; }
  100% { left: 150%; }
}

/* ========================================================
   FLOATING CONTROLS
   ======================================================== */
.floating-controls {
  position: fixed;
  top: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.btn-float {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 26, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, background-color 0.2s;
}

.btn-float:hover {
  transform: scale(1.08);
  background: rgba(0, 45, 16, 0.95);
}

.icon-disc {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

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

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

.sound-wave { display: none; }

.btn-scroll-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
  font-size: 18px;
}

.btn-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================================
   MAIN CONTAINER (STAGE)
   ======================================================== */
.page-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--color-bg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
  transition: opacity 0.6s ease;
}

@media (min-width: 768px) {
  .page-container {
    max-width: 600px;
    border-left: 1px solid var(--color-gold-border);
    border-right: 1px solid var(--color-gold-border);
  }
}

.damask-bg-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.damask-bg-img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  min-width: 130%;
  height: auto;
  opacity: 0.3;
}

.royal-flower-crown {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 90%;
  pointer-events: none;
  z-index: 1;
}

.crown-flower-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================================
   SECTION 1: HERO HEADER
   ======================================================== */
.section-hero {
  position: relative;
  z-index: 5;
  text-align: center;
  padding-top: clamp(140px, 28vw, 220px);
  padding-bottom: 40px;
}

.invitation-subtitle {
  font-family: var(--font-baskerville);
  font-size: clamp(13px, 2.2vw, 16px);
  letter-spacing: 0.25em;
  color: var(--color-primary);
  opacity: 0.85;
  margin-bottom: 12px;
}

.hero-couple-calligraphy {
  font-family: var(--font-calligraphy);
  color: var(--color-primary);
  line-height: 1.25;
}

.callig-groom,
.callig-bride {
  font-size: clamp(52px, 11.5vw, 88px);
}

.callig-amp {
  font-family: var(--font-baskerville);
  font-size: clamp(26px, 5.5vw, 42px);
  color: var(--color-secondary);
  line-height: 1;
  margin: 4px 0;
}

/* ========================================================
   ROYAL GOLD FRAME 9-SLICE GRID
   ======================================================== */
.royal-frame-wrapper {
  position: relative;
  width: 94%;
  margin: 0 auto;
  z-index: 10;
}

.royal-frame-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-rows: var(--corner-size) 1fr var(--corner-size);
  grid-template-columns: var(--corner-size) 1fr var(--corner-size);
  z-index: 1;
}

.frame-corner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.corner-tl { align-self: start; justify-self: start; }
.corner-tr { align-self: start; justify-self: end; transform: scaleX(-1); }
.corner-bl { align-self: end; justify-self: start; transform: scaleY(-1); }
.corner-br { align-self: end; justify-self: end; transform: scale(-1); }

/* Horizontal Edges */
.frame-edge-h {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.edge-top { justify-content: flex-start; align-items: flex-start; }
.edge-bottom { justify-content: flex-end; align-items: flex-end; }

.edge-dots-line {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 4px;
  gap: 4px;
}

.edge-top .edge-dots-line { margin-top: 1px; }
.edge-bottom .edge-dots-line { margin-bottom: 1px; }

.dot-lg {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary);
  flex-shrink: 0;
}

.dot-sm {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--color-primary);
  margin: 0 2px;
  flex-shrink: 0;
}

.line-h {
  flex: 1;
  height: 1px;
  background-color: var(--color-primary);
}

.emblem-h {
  flex-shrink: 0;
  width: clamp(65px, 13.8vw, 106px);
  height: auto;
}

.emblem-h.flip-v {
  transform: scaleY(-1);
}

/* Vertical Edges */
.frame-edge-v {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.edge-left { align-items: flex-start; }
.edge-right { align-items: flex-end; }

.edge-dots-line-v {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 4px 0;
  gap: 4px;
}

.edge-left .edge-dots-line-v { margin-left: 1px; }
.edge-right .edge-dots-line-v { margin-right: 1px; }

.line-v {
  flex: 1;
  width: 1px;
  background-color: var(--color-primary);
}

.emblem-v {
  flex-shrink: 0;
  height: clamp(65px, 13.8vw, 106px);
  width: auto;
}

.edge-right .emblem-v {
  transform: scaleX(-1);
}

.frame-center-empty {
  /* empty middle slot in 3x3 grid */
}

/* Royal Frame Inner Content */
.royal-frame-inner {
  position: relative;
  z-index: 2;
  padding-top: var(--corner-size);
  padding-bottom: var(--corner-size);
  padding-left: calc(var(--corner-size) * 0.35);
  padding-right: calc(var(--corner-size) * 0.35);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Common Gold Section Heading */
.section-gold-header {
  text-align: center;
  margin-bottom: 22px;
}

.gold-heading {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.06em;
}

@media (min-width: 768px) {
  .gold-heading {
    font-size: 26px;
  }
}

.gold-sub-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 120px;
  margin: 6px auto 0;
}

.gold-sub-divider span:not(.diamond) {
  flex: 1;
  height: 1px;
  background-color: rgba(225, 188, 124, 0.4);
}

.gold-sub-divider .diamond {
  color: var(--color-primary);
  font-size: 9px;
}

/* ========================================================
   SECTION 2: CEREMONY & FAMILY INFO
   ======================================================== */
.section-ceremony {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.family-info-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 20px 0 16px;
}

.family-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.family-label {
  font-family: var(--font-baskerville);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.parent-line {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-light-gold);
}

.parent-line strong {
  color: var(--color-primary);
  font-weight: 600;
}

.family-address {
  font-size: 10px;
  color: rgba(225, 188, 124, 0.8);
  margin-top: 4px;
  line-height: 1.35;
}

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

.ceremony-announcement {
  font-family: var(--font-baskerville);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  line-height: 1.5;
}

.royal-couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.couple-name-text {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.25;
}

@media (min-width: 768px) {
  .couple-name-text {
    font-size: 40px;
  }
}

.couple-amp-text {
  font-family: var(--font-baskerville);
  font-size: 24px;
  color: var(--color-secondary);
  line-height: 1;
  margin: -2px 0;
}

/* Ceremony Events List */
.ceremony-events-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.ceremony-card-item {
  background: rgba(225, 188, 124, 0.05);
  border: 1px solid rgba(225, 188, 124, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
}

.ceremony-event-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.ceremony-venue-text {
  font-size: 12px;
  color: var(--color-light-gold);
  margin-bottom: 8px;
}

.ceremony-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
}

.meta-sep {
  opacity: 0.5;
}

.ceremony-lunar-text {
  font-size: 11px;
  color: rgba(225, 188, 124, 0.75);
  margin-top: 4px;
}

/* ========================================================
   SECTION 3: WEDDING GALLERY
   ======================================================== */
.section-gallery {
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

.gallery-item:hover .gallery-thumb {
  transform: scale(1.08);
}

.frame-gold-border {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-gold-border);
  border-radius: 8px;
  pointer-events: none;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.icon-zoom {
  color: var(--color-primary);
  font-size: 22px;
}

/* ========================================================
   SECTION 4: RECEPTION & CALENDAR
   ======================================================== */
.section-reception {
  text-align: center;
}

.venue-main-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.venue-address-text {
  font-size: 12px;
  color: var(--color-light-gold);
  line-height: 1.45;
  margin-bottom: 12px;
}

.reception-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(225, 188, 124, 0.1);
  border: 1px solid rgba(225, 188, 124, 0.3);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 14px;
}

.time-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
}

.time-highlight {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.stacked-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 4px;
}

.date-side-part {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.date-day-huge {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.lunar-date-row {
  font-size: 11px;
  color: rgba(225, 188, 124, 0.75);
}

/* Calendar Container */
.calendar-container {
  width: 100%;
  max-width: 320px;
  margin: 18px auto 0;
  padding: 16px 12px;
  background: rgba(0, 26, 8, 0.6);
  border: 1px solid rgba(225, 188, 124, 0.3);
  border-radius: 10px;
}

.calendar-script-title {
  font-family: var(--font-calligraphy);
  font-size: 32px;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.wedding-calendar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 12px;
}

.wedding-calendar-table th {
  padding: 4px 0;
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 11px;
}

.wedding-calendar-table td {
  padding: 5px 0;
  color: var(--color-light-gold);
  position: relative;
}

.wedding-calendar-table td.active-day {
  font-weight: 800;
  color: #001A08;
  z-index: 2;
}

.calendar-gold-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  background-color: var(--color-primary);
  border-radius: 50%;
  z-index: -1;
  box-shadow: 0 0 10px rgba(225, 188, 124, 0.6);
}

.calendar-actions {
  margin-top: 12px;
}

.btn-cal-sync {
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s;
}

.btn-cal-sync:hover {
  opacity: 0.75;
}

/* Countdown Widget */
.countdown-widget {
  margin-top: 22px;
  width: 100%;
}

.countdown-heading {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
}

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

.count-box {
  background: rgba(225, 188, 124, 0.08);
  border: 1px solid rgba(225, 188, 124, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  min-width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.count-num {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.count-label {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: 0.06em;
}

.count-sep {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.rsvp-btn-wrap {
  margin-top: 22px;
}

.btn-rsvp-action {
  background-color: var(--color-primary);
  color: #001A08;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 20px;
  padding: 10px 26px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(225, 188, 124, 0.35);
  transition: transform 0.2s;
}

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

/* ========================================================
   SECTION 5: VENUE & MAP
   ======================================================== */
.section-map {
  position: relative;
  z-index: 10;
  padding: 10px 20px 25px;
  text-align: center;
}

.map-card-wrap {
  background: rgba(225, 188, 124, 0.06);
  border: 1px solid rgba(225, 188, 124, 0.25);
  border-radius: 12px;
  padding: 22px 18px;
  max-width: 380px;
  margin: 0 auto;
}

.venue-name-highlight {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.venue-addr-sub {
  font-size: 13px;
  color: var(--color-light-gold);
  line-height: 1.45;
  margin-bottom: 16px;
}

.btn-map-guide {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-primary);
  color: #001A08;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  padding: 9px 22px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.btn-map-guide:hover {
  transform: translateY(-2px);
}

/* ========================================================
   SECTION 6: DRESS CODE
   ======================================================== */
.section-dresscode {
  position: relative;
  z-index: 10;
  padding: 15px 20px 25px;
  text-align: center;
}

.dresscode-sub {
  font-size: 12px;
  color: var(--color-light-gold);
  max-width: 330px;
  margin: 6px auto 16px;
  line-height: 1.5;
}

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

.dresscode-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.swatch-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.swatch-name {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--color-light-gold);
}

/* ========================================================
   SECTION 7: TIMELINE
   ======================================================== */
.section-timeline {
  position: relative;
  z-index: 10;
  padding: 15px 20px 30px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

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

.timeline-badge-time {
  width: 56px;
  padding: 6px 0;
  background: rgba(225, 188, 124, 0.15);
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

.timeline-content-card {
  flex: 1;
  background: rgba(225, 188, 124, 0.05);
  border: 1px solid rgba(225, 188, 124, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
}

.timeline-title {
  font-size: 13px;
  color: var(--color-light-gold);
}

/* ========================================================
   SECTION 8: GUESTBOOK
   ======================================================== */
.section-guestbook {
  position: relative;
  z-index: 10;
  padding: 15px 20px 35px;
}

.guestbook-form-wrap {
  max-width: 380px;
  margin: 0 auto;
}

.guestbook-form {
  background: rgba(0, 26, 8, 0.7);
  border: 1px solid rgba(225, 188, 124, 0.3);
  border-radius: 12px;
  padding: 20px 18px;
  margin-bottom: 22px;
}

.form-group {
  margin-bottom: 12px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--color-primary);
  margin-bottom: 4px;
  font-weight: 600;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(225, 188, 124, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--color-light-gold);
  font-family: inherit;
  font-size: 13px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(225, 188, 124, 0.4);
}

.wish-chips-wrap {
  margin-bottom: 14px;
  text-align: left;
}

.chips-label {
  font-size: 11px;
  color: var(--color-secondary);
  display: block;
  margin-bottom: 6px;
}

.chips-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chip-item {
  background: rgba(225, 188, 124, 0.1);
  border: 1px solid rgba(225, 188, 124, 0.2);
  border-radius: 14px;
  padding: 5px 10px;
  color: var(--color-light-gold);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.chip-item:hover {
  background: rgba(225, 188, 124, 0.25);
}

.btn-submit-wish {
  width: 100%;
  background-color: var(--color-primary);
  color: #001A08;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-submit-wish:hover {
  transform: translateY(-2px);
}

.guestbook-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guest-card {
  background: rgba(225, 188, 124, 0.06);
  border: 1px solid rgba(225, 188, 124, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
}

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

.guest-name-text {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 13px;
}

.guest-time {
  font-size: 10px;
  color: rgba(225, 188, 124, 0.6);
}

.guest-comment {
  font-size: 12px;
  color: var(--color-light-gold);
  line-height: 1.45;
}

/* ========================================================
   SECTION 9: GIFT BOX
   ======================================================== */
.section-gift {
  position: relative;
  z-index: 10;
  padding: 15px 20px 35px;
  text-align: center;
}

.gift-sub-desc {
  font-size: 12px;
  color: var(--color-light-gold);
  max-width: 320px;
  margin: 6px auto 18px;
  line-height: 1.5;
}

.btn-open-gift {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-primary);
  color: #001A08;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: none;
  border-radius: 25px;
  padding: 12px 32px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(225, 188, 124, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn-open-gift:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(225, 188, 124, 0.5);
}

.gift-btn-icon {
  font-size: 18px;
}

/* ========================================================
   SECTION 10: FOOTER
   ======================================================== */
.section-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(225, 188, 124, 0.2);
  padding: 35px 20px 20px;
  text-align: center;
}

.footer-thank-text {
  font-size: 13px;
  color: var(--color-light-gold);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto 16px;
}

.footer-couple-sig {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.sig-amp {
  color: var(--color-secondary);
}

.footer-brand {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(225, 188, 124, 0.6);
}

.catalog-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

/* ========================================================
   MODALS: LIGHTBOX & GIFT
   ======================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(225, 188, 124, 0.2);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.arrow-prev { left: 15px; }
.arrow-next { right: 15px; }

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

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--color-primary);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
}

.lightbox-counter {
  margin-top: 10px;
  color: var(--color-primary);
  font-size: 13px;
}

/* Gift Modal */
.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.gift-modal.active {
  opacity: 1;
  pointer-events: auto;
}

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

.gift-modal-dialog {
  position: relative;
  background-color: #001A08;
  border: 1.5px solid var(--color-primary);
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.9);
  border-radius: 14px;
  padding: 30px 20px 25px;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 10;
  text-align: center;
}

.gift-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 22px;
  cursor: pointer;
}

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

.gift-modal-desc {
  font-size: 12px;
  color: var(--color-light-gold);
  line-height: 1.45;
  margin-bottom: 18px;
}

.gift-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-card-box {
  background: rgba(225, 188, 124, 0.05);
  border: 1px dashed rgba(225, 188, 124, 0.4);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.gift-card-badge {
  font-family: var(--font-baskerville);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.gift-qr-wrap {
  width: 150px;
  height: 150px;
  margin: 0 auto 10px;
  background: #fff;
  padding: 6px;
  border-radius: 6px;
}

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

.gift-bank-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}

.bank-row {
  display: flex;
  justify-content: space-between;
}

.bank-label {
  color: rgba(225, 188, 124, 0.7);
}

.bank-val {
  font-weight: 600;
  color: var(--color-primary);
}

.font-mono {
  font-family: Consolas, monospace;
}

.btn-copy-acc {
  width: 100%;
  background: rgba(225, 188, 124, 0.15);
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  padding: 7px;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-copy-acc:hover {
  background: rgba(225, 188, 124, 0.3);
}

/* Toast Notification */
.copy-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--color-primary);
  color: #001A08;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 3000;
}

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