/* Dedicated Guest View Modern Luxury Theme */
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

html,
body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow-x: hidden !important;
}

/* Background layers injected by guest.js from the part1BgImage setting: a looping video or a plain cover image.
   body's own background is the instant-load poster fallback. */
.bg-video,
.bg-image {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.bg-video {
  object-fit: cover;
}

.bg-image {
  background: center center / cover no-repeat;
}

body.guest-mode {
  background: #1a0508 url('/image/bg-loop-poster.jpg') center center / cover no-repeat fixed;
  color: #f7e0b5;
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.guest-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 32px 140px 32px;
}

.guest-container {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s;
}

body.overlay-active .guest-container {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s;
}

/* Top Header Bar */
.guest-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 5px;
  margin-bottom: 48px;
}

.guest-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-brand img {
  height: 44px;
  width: auto;
  filter: none;
}

.guest-brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #d4b483;
  letter-spacing: 2px;
  margin: 0;
  font-weight: 700;
}

.guest-brand-sub {
  font-size: 11px;
  color: rgba(247, 224, 181, 0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-host-switch {
  background: rgba(193, 154, 91, 0.18);
  color: #f7e0b5;
  border: 1px solid rgba(212, 180, 131, 0.45);
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-host-switch:hover {
  background: #c19a5b;
  color: #1a0507;
  transform: none;
  box-shadow: 0 4px 15px rgba(193, 154, 91, 0.3);
}

/* Hero Card */
.guest-hero {
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  margin-bottom: 56px;
  font-family: 'Kantumruy Pro', sans-serif;
}

.guest-hero::before {
  display: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(193, 154, 91, 0.15);
  border: 1px solid rgba(212, 180, 131, 0.35);
  color: #d4b483;
  border-radius: 5px;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: 'Kantumruy Pro', sans-serif;
}

.hero-heading {
  font-family: 'Moul', cursive;
  font-size: 15px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
  line-height: 1.5;
  text-shadow: none;
}

html[lang="en"] .hero-heading {
  font-family: 'Playfair Display', 'Moul', serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: none;
}

.hero-hosts {
  font-size: 17px;
  color: #d4b483;
  font-family: 'Kantumruy Pro', sans-serif;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}

html[lang="en"] .hero-hosts {
  font-family: 'Playfair Display', 'Kantumruy Pro', serif;
  font-style: italic;
}

.hero-invitation-msg,
#guest-invitation-msg-box {
  margin: 16px auto 24px auto;
  max-width: 650px;
  font-size: 15px;
  line-height: 1.8;
  font-family: 'Kantumruy Pro', sans-serif;
  font-style: normal;
  font-weight: 400;
  color: rgba(240, 235, 225, 0.85);
}

.event-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 24px auto 0 auto;
  max-width: 680px;
  font-family: 'Kantumruy Pro', sans-serif;
}

.detail-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 12px 14px;
  border-radius: 5px;
  text-align: center;
  transition: border 0.3s ease;
  font-family: 'Kantumruy Pro', sans-serif;
}

.detail-item:hover {
  border-color: #c19a5b;
}

.detail-icon {
  font-size: 20px;
  margin-bottom: 6px;
  color: #d4b483;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-icon svg {
  width: 18px;
  height: 18px;
}

.detail-title {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(247, 224, 181, 0.7);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
}

.detail-val {
  font-family: 'Kantumruy Pro', sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 13.5px;
  line-height: 1.4;
}

.countdown-box {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px auto 0 auto;
  max-width: 360px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Kantumruy Pro', sans-serif;
}

.count-unit {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 8px 6px;
  border-radius: 6px;
  flex: 1;
  min-width: 0;
  text-align: center;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-family: 'Kantumruy Pro', sans-serif;
}

.count-num {
  font-family: 'Playfair Display', 'Kantumruy Pro', serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.count-lbl {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: rgba(247, 224, 181, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 3px;
}

@media (min-width: 640px) {
  .countdown-box {
    gap: 14px;
    max-width: 420px;
    margin-top: 28px;
  }

  .count-unit {
    padding: 12px 14px;
    border-radius: 8px;
  }

  .count-num {
    font-size: 26px;
  }

  .count-lbl {
    font-size: 10.5px;
    margin-top: 4px;
  }
}

/* Section Cards */
.section-card {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 5px;
  padding: 36px 0;
  margin-bottom: 56px;
  box-shadow: none;
  font-family: 'Kantumruy Pro', sans-serif;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: none;
  padding-bottom: 0;
}

.section-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 24px;
  background: rgba(193, 154, 91, 0.18);
  color: #f7e0b5;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid rgba(212, 180, 131, 0.25);
}

.section-title {
  font-family: 'Moul', cursive;
  font-size: 20px;
  font-weight: 400;
  color: #f7f2e8;
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-shadow: none;
}

html[lang="en"] .section-title {
  font-family: 'Playfair Display', 'Moul', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

/* RSVP Form Elements */
.rsvp-form-group {
  margin-bottom: 20px;
}

.rsvp-label {
  display: block;
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #d4b483;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.guest-input,
.guest-select,
.guest-textarea {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 5px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 15px;
  font-family: 'Kantumruy Pro', sans-serif;
  outline: none;
  transition: border 0.3s, box-shadow 0.3s;
}

.guest-input:focus,
.guest-select:focus,
.guest-textarea:focus {
  border-color: #8a5a14;
  box-shadow: 0 0 0 3px rgba(138, 90, 20, 0.25);
}

.rsvp-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.rsvp-option-btn {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--ink);
  border-radius: 5px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.rsvp-option-btn:hover {
  border-color: rgba(154, 106, 28, 0.55);
}

/* selected: white tinted light green / red with dark green / red text */
.rsvp-option-btn.selected-yes {
  background: rgba(214, 243, 225, 0.75);
  border-color: #1f8a4c;
  color: #14532d;
}

.rsvp-option-btn.selected-no {
  background: rgba(253, 224, 224, 0.75);
  border-color: #c94040;
  color: #7f1d1d;
}

.opt-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.opt-text {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.btn-submit-rsvp,
.btn-submit-wish {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* buttons do not inherit the page font: without this a Khmer label falls back to a system font */
  font-family: 'Kantumruy Pro', 'Plus Jakarta Sans', sans-serif;
  line-height: 1.6;
  /* Khmer stacked vowels / subscripts need the room */
  white-space: nowrap;
  background: linear-gradient(135deg, #d4b483 0%, #c19a5b 50%, #b8935a 100%);
  color: #1a0507;
  border: none;
  padding: 14px 16px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(193, 154, 91, 0.3);
  margin-top: 12px;
}

.btn-submit-rsvp svg,
.btn-submit-wish svg {
  flex-shrink: 0;
}

.btn-submit-rsvp:hover,
.btn-submit-wish:hover {
  background: linear-gradient(135deg, #e2c48d 0%, #d4b483 50%, #c19a5b 100%);
  box-shadow: 0 6px 20px rgba(193, 154, 91, 0.45);
}

/* Wishes Feed Grid */
.wishes-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.guest-wish-card {
  background: rgba(25, 6, 9, 0.65);
  border: 1px solid rgba(212, 180, 131, 0.25);
  border-radius: 5px;
  padding: 20px;
  position: relative;
}

.g-wname {
  font-weight: 700;
  color: #d4b483;
  font-size: 15px;
}

.g-wdate {
  font-size: 12px;
  color: rgba(247, 224, 181, 0.5);
  margin-top: 2px;
}

.g-wtext {
  font-size: 14px;
  color: #f0ebe1;
  margin-top: 12px;
  line-height: 1.5;
}

/* Checklist Progress Bar in Guest View */
.guest-progress-bar-bg {
  background: rgba(0, 0, 0, 0.35);
  height: 14px;
  border: 1px solid rgba(212, 180, 131, 0.2);
  border-radius: 5px;
  overflow: hidden;
  margin: 16px 0;
  position: relative;
}

.guest-progress-bar-fill {
  background: linear-gradient(90deg, #c19a5b 0%, #4ade80 100%);
  height: 100%;
  width: 0%;
  border-radius: 5px;
  transition: width 0.8s ease;
}

.guest-checklist-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.guest-chk-item {
  background: rgba(45, 12, 16, 0.35);
  border: 1px solid rgba(212, 180, 131, 0.2);
  border-radius: 5px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-chk-icon {
  font-size: 18px;
}

.guest-chk-title {
  font-size: 14px;
  color: #f0ebe1;
}

.guest-chk-item.done .guest-chk-title {
  text-decoration: line-through;
  color: rgba(247, 224, 181, 0.45);
}

/* Success Alert Pill */
.toast-msg {
  display: none;
  background: var(--glass-bg);
  border: 1px solid #197a42;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: #14532d;
  padding: 14px 20px;
  border-radius: 5px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

/* Traditional Cambodian Luxury Opening Screen (Part 1) */
.opening-cover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 20px 40px 20px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.opening-cover-overlay.opened-out {
  transform: scale(1.06);
  opacity: 0;
  pointer-events: none;
}

.opening-frame-border {
  position: absolute;
  inset: 12px;
  border: 1.5px solid rgba(212, 180, 131, 0.4);
  border-radius: 5px;
  pointer-events: none;
  z-index: 1;
}

.kbach-corner {
  position: absolute;
  width: 65px;
  height: 65px;
  pointer-events: none;
  z-index: 2;
}

.kbach-top-left {
  top: 14px;
  left: 14px;
}

.kbach-top-right {
  top: 14px;
  right: 14px;
  transform: scaleX(-1);
}

.kbach-bottom-left {
  bottom: 14px;
  left: 14px;
  transform: scaleY(-1);
}

.kbach-bottom-right {
  bottom: 14px;
  right: 14px;
  transform: scale(-1);
}

.opening-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.kbach-top-emblem {
  width: 95px;
  height: 85px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(212, 180, 131, 0.35));
}

/* Custom emblem image (setting emblemImage) replaces the SVG crest, fitted inside the crest box */
.emblem-custom-img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.has-custom-emblem>svg {
  display: none;
}

.has-custom-emblem>.emblem-custom-img {
  display: block;
}

.center-kbach-emblem.has-custom-emblem {
  width: 65px;
  height: 60px;
}

.opening-photo-wrapper {
  position: relative;
  width: 240px;
  height: 310px;
  border-radius: 5px;
  overflow: hidden;
  border: 2px solid rgba(212, 180, 131, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 18px;
}

.opening-couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: slowPushIn 12s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes slowPushIn {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.16);
  }
}

.opening-photo-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(41, 11, 15, 0.85) 100%);
  pointer-events: none;
}

.opening-title-khmer {
  font-family: 'Moul', cursive;
  font-size: 22px;
  color: #f7e0b5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 0.5px;
  white-space: nowrap;
  /* one line always; guest.js shrinks the font to fit */
}

.opening-subtitle-khmer {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 15px;
  color: #d4b483;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 0.5px;
}

.opening-guest-label {
  font-family: 'Moul', cursive;
  font-size: 16px;
  color: #d4b483;
  margin-top: 6px;
  text-align: center;
}

.opening-guest-name {
  font-family: 'Kantumruy Pro', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #ffffff;
  margin-top: 4px;
  margin-bottom: 16px;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  min-height: 28px;
}

.opening-divider-line {
  width: 180px;
  height: 16px;
  margin-bottom: 20px;
}

.btn-open-invitation-khmer {
  background: linear-gradient(135deg, rgba(212, 180, 131, 0.25) 0%, rgba(154, 123, 69, 0.35) 100%);
  border: 1.5px solid rgba(247, 224, 181, 0.7);
  border-radius: 5px;
  padding: 12px 32px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 180, 131, 0.2);
  transition: all 0.3s ease;
  animation: pulseOpenBtn 2.2s infinite ease-in-out;
}

.btn-open-invitation-khmer:hover {
  background: rgba(212, 180, 131, 0.45);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 25px rgba(247, 224, 181, 0.4);
  transform: scale(1.03);
}

.btn-khmer-text {
  font-family: 'Kantumruy Pro', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.btn-en-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  color: rgba(247, 224, 181, 0.85);
  letter-spacing: 1px;
  margin-top: 2px;
}

@keyframes pulseOpenBtn {

  0%,
  100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(212, 180, 131, 0.2);
  }

  50% {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 24px rgba(247, 224, 181, 0.5);
  }
}

/* Part 2 Video Playing Section & Entrance Animation */
.part2-video-card {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 36px;
}

.part2-scale-fade-in {
  animation: scaleUpFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUpFade {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.part2-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(212, 180, 131, 0.15);
  border: 1px solid rgba(212, 180, 131, 0.35);
  color: #d4b483;
  border-radius: 5px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}

.part2-video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  border: 1.5px solid rgba(212, 180, 131, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #000000;
  aspect-ratio: 16 / 9;
}

/* Part 2: Save The Date Fullscreen Overlay & Staggered Animation */
.save-the-date-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 999998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 20px 40px 20px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
}

.save-the-date-overlay.active-show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.save-the-date-overlay.opened-out {
  transform: scale(1.06);
  opacity: 0;
  pointer-events: none;
}

.std-photo-wrapper {
  position: relative;
  width: 250px;
  height: 330px;
  border-radius: 5px;
  overflow: hidden;
  border: 2px solid rgba(212, 180, 131, 0.5);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 0 0 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

.std-couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: slowPushIn 12s ease-in-out infinite alternate;
  will-change: transform;
}

.std-calligraphy-name {
  font-family: 'Great Vibes', cursive;
  font-size: 46px;
  background: linear-gradient(135deg, #fff3d1 0%, #e2c48d 50%, #c19a5b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  margin-bottom: 6px;
  text-align: center;
  line-height: 1.2;
}

.std-label {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  letter-spacing: 4px;
  color: #d4b483;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-align: center;
  font-weight: 700;
}

.std-date {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #d4b483 0%, #c19a5b 50%, #b8935a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c19a5b;
  margin-bottom: 22px;
  text-align: center;
  font-weight: 700;
  text-shadow: none;
}

.btn-std-next {
  background: linear-gradient(135deg, rgba(212, 180, 131, 0.25) 0%, rgba(154, 123, 69, 0.35) 100%);
  border: 1.5px solid rgba(247, 224, 181, 0.7);
  border-radius: 5px;
  padding: 12px 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f7e0b5;
  font-family: 'Cinzel', 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 180, 131, 0.2);
  transition: all 0.3s ease;
  animation: pulseOpenBtn 2.2s infinite ease-in-out;
}

.btn-std-next:hover {
  background: rgba(212, 180, 131, 0.45);
  transform: scale(1.03);
}

/* Staggered Assembly Animations (Elements assemble one by one) */
.std-assemble-item {
  opacity: 0;
  transform: translateY(28px) scale(0.92);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.save-the-date-overlay.active-show .std-assemble-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.std-delay-1 {
  transition-delay: 0.15s;
}

.std-delay-2 {
  transition-delay: 0.45s;
}

.std-delay-3 {
  transition-delay: 0.75s;
}

.std-delay-4 {
  transition-delay: 1.05s;
}

.std-delay-5 {
  transition-delay: 1.35s;
}

/* Floating Particle Canvas */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999999;
}

/* Floating Audio Music Toggle Button */
.bg-music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999999;
  width: 44px;
  height: 44px;
  border-radius: 5px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  color: var(--ink-accent);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease;
}

.bg-music-toggle:hover {
  transform: scale(1.1);
}

.music-pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 5px;
  border: 1.5px solid rgba(212, 180, 131, 0.4);
  animation: musicPulse 2s infinite ease-out;
}

@keyframes musicPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Part 3: Main Formal Invitation Card & Motion Animations */
.main-invitation-card {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 48px 0 36px 0;
  box-shadow: none;
  margin-bottom: 56px;
  overflow: hidden;
  color: #f7e0b5;
  text-align: center;
  font-family: 'Kantumruy Pro', sans-serif;
}

.main-invitation-card .opening-frame-border {
  border: none;
}

.main-title-khmer {
  font-family: 'Moul', cursive;
  font-size: 24px;
  color: #f7e0b5;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
  margin: 0 0 24px 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
  /* one line always; guest.js shrinks the font to fit */
}

.parents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.parent-role {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 14px;
  color: #d4b483;
  margin-bottom: 4px;
}

.parent-name {
  font-family: 'Kantumruy Pro', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  line-height: 1.5;
}

.main-inv-greeting {
  max-width: 600px;
  margin: 0 auto 28px auto;
}

.main-inv-subtitle {
  font-family: 'Moul', cursive;
  font-size: 17px;
  color: #d4b483;
  margin-bottom: 12px;
}

.main-inv-message-khmer {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(247, 224, 181, 0.9);
  margin: 0;
}

.couple-names-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 28px 0;
}

.couple-name-box {
  flex: 1;
}

.couple-role-lbl {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 13px;
  color: #d4b483;
  margin-bottom: 4px;
}

.couple-khmer-name {
  font-family: 'Moul', cursive;
  font-size: 20px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.center-kbach-emblem {
  animation: emblemFloat 3.5s ease-in-out infinite alternate;
}

@keyframes emblemFloat {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-6px) scale(1.04);
  }
}

.ceremony-datetime-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 5px;
  padding: 20px 16px;
  margin-bottom: 28px;
}

.khmer-lunar-date {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 15px;
  color: #d4b483;
  font-weight: 600;
  margin-bottom: 6px;
}

.gregorian-date-time {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 15px;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 8px;
}

.venue-location-khmer {
  font-size: 13px;
  color: rgba(247, 224, 181, 0.8);
  line-height: 1.5;
}

.btn-add-calendar-khmer {
  background: linear-gradient(135deg, rgba(212, 180, 131, 0.25) 0%, rgba(154, 123, 69, 0.35) 100%);
  border: 1.5px solid rgba(247, 224, 181, 0.7);
  border-radius: 5px;
  padding: 12px 28px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 180, 131, 0.2);
  transition: all 0.3s ease;
  animation: pulseOpenBtn 2.2s infinite ease-in-out;
}

.btn-add-calendar-khmer:hover {
  background: rgba(212, 180, 131, 0.45);
  transform: scale(1.03);
}

.btn-cal-text {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.btn-cal-sub {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  color: rgba(247, 224, 181, 0.85);
  letter-spacing: 1px;
}

/* Event Agenda Section (Traditional Cambodian Timeline) */
.agenda-section {
  margin: 36px auto 32px auto;
  max-width: 620px;
  padding: 0 12px;
  text-align: left;
}

.agenda-header-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.agenda-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 180, 131, 0.6), transparent);
}

.agenda-main-title {
  font-family: 'Cinzel', 'Moul', serif;
  font-size: 15px;
  font-weight: 700;
  color: #f7e0b5;
  letter-spacing: 1.5px;
  text-align: center;
  white-space: nowrap;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* a large panel: white glass without backdrop blur (blurring a big area over the video is costly on phones) */
.agenda-day-block {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: var(--glass-shadow);
}

.agenda-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(212, 180, 131, 0.3);
}

.day-badge {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1a0507;
  background: linear-gradient(135deg, #f7e0b5 0%, #c19a5b 100%);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(193, 154, 91, 0.3);
}

.day-date-text {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #f7e0b5;
}

.agenda-timeline {
  position: relative;
  padding-left: 56px;
}

.agenda-timeline::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 10px;
  bottom: 10px;
  width: 1.5px;
  background: linear-gradient(180deg, rgba(212, 180, 131, 0.6) 0%, rgba(193, 154, 91, 0.8) 50%, rgba(212, 180, 131, 0.4) 100%);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 18px;
}

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

.timeline-icon {
  position: absolute;
  left: -54px;
  top: 0;
  width: 28px;
  height: 28px;
  color: #d4b483;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot {
  position: absolute;
  left: -23.5px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f7e0b5;
  border: 2px solid #290b0f;
  box-shadow: 0 0 6px #c19a5b;
}

.timeline-content {
  padding-left: 6px;
}

.agenda-time {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #d4b483;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.agenda-desc {
  font-family: 'Kantumruy Pro', sans-serif;
  font-size: 13.5px;
  color: #ffffff;
  line-height: 1.45;
}

.scroll-up-indicator {
  margin-top: 28px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.chevrons {
  animation: chevronsBounce 1.8s infinite ease-in-out;
}

@keyframes chevronsBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.scroll-lbl {
  font-size: 12px;
  color: rgba(247, 224, 181, 0.75);
  margin-top: 4px;
}

/* Fixed Bottom Navigation Dock */
.bottom-fixed-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 99999;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 5px;
  box-shadow: var(--glass-shadow);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s;
}

body.overlay-active .bottom-fixed-dock {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s;
}

.dock-btn {
  background: transparent;
  border: none;
  color: var(--ink-accent);
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* 6 buttons need ~360px: tighten the dock on 320px phones so its last button is not cut off */
@media (max-width: 359px) {
  .bottom-fixed-dock {
    gap: 2px;
    padding: 8px;
  }

  .dock-btn {
    padding: 8px 10px;
  }
}

/* light halo so the icons stay readable when the dock floats over the dark map or a photo */
.dock-btn svg {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}

.dock-btn:hover {
  background: rgba(122, 79, 14, 0.12);
  transform: scale(1.1);
}

/* Extra Guest Elements Border-Radius Overrides */
.guest-map-iframe {
  width: 100%;
  height: 320px;
  min-height: 280px;
  border: none;
  display: block;
  border-radius: 8px !important;
}

.guest-gallery-item {
  border-radius: 5px !important;
}

/* Responsive Mobile Photo Gallery Layout Variants & Lightbox Modal */
.guest-gallery-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  position: relative;
}

/* Base Item Interactive Styling */
.guest-gallery-item {
  position: relative;
  border-radius: 8px !important;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  background: var(--glass-bg);
}

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

/* no hover effect on photos (clicking still opens the lightbox); styles.css drops the shadow on hover, so pin it */
.guest-gallery-item:hover {
  box-shadow: var(--glass-shadow);
}

/* Variant 1: 2-Column Grid (grid-2) */
.guest-gallery-grid.layout-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.guest-gallery-grid.layout-grid-2 .guest-gallery-item {
  aspect-ratio: 4 / 3;
}

@media (min-width: 640px) {
  .guest-gallery-grid.layout-grid-2 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Variant 2: Horizontal Carousel Slider (slider) */
.guest-gallery-grid.layout-slider {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 4px;
}

.gallery-slider-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px 4px 16px 4px;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 180, 131, 0.4) transparent;
}

.gallery-slider-track::-webkit-scrollbar {
  height: 4px;
}

.gallery-slider-track::-webkit-scrollbar-thumb {
  background: rgba(212, 180, 131, 0.4);
  border-radius: 4px;
}

.guest-gallery-grid.layout-slider .guest-gallery-item {
  flex: 0 0 75%;
  max-width: 280px;
  aspect-ratio: 4 / 3;
  scroll-snap-align: center;
}

@media (min-width: 640px) {
  .guest-gallery-grid.layout-slider .guest-gallery-item {
    flex: 0 0 45%;
  }
}

.gallery-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.gallery-slider-btn:hover {
  background: #c19a5b;
  color: #1a0507;
}

.slider-prev {
  left: -12px;
}

.slider-next {
  right: -12px;
}

/* Variant 3: Staggered Masonry (masonry) */
.guest-gallery-grid.layout-masonry {
  display: block;
  column-count: 2;
  column-gap: 12px;
}

.guest-gallery-grid.layout-masonry .guest-gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  aspect-ratio: auto;
}

.guest-gallery-grid.layout-masonry .guest-gallery-item:nth-child(even) {
  aspect-ratio: 3 / 4;
}

.guest-gallery-grid.layout-masonry .guest-gallery-item:nth-child(odd) {
  aspect-ratio: 4 / 3;
}

@media (min-width: 640px) {
  .guest-gallery-grid.layout-masonry {
    column-count: 3;
  }
}

/* Variant 4: Full-Width Mobile Stack (stack) */
.guest-gallery-grid.layout-stack {
  grid-template-columns: 1fr;
}

.guest-gallery-grid.layout-stack .guest-gallery-item {
  aspect-ratio: 16 / 10;
  max-width: 600px;
  margin: 0 auto;
}

/* Variant 5: 3-Column Compact Grid (grid-3) */
.guest-gallery-grid.layout-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.guest-gallery-grid.layout-grid-3 .guest-gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: 6px !important;
}

@media (min-width: 640px) {
  .guest-gallery-grid.layout-grid-3 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Variant 6: single horizontal strip, swipeable with snapping (row) */
.guest-gallery-grid.layout-row {
  --row-photo-h: 200px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
  /* room for the photo shadows, which the scroll box would clip */
}

.guest-gallery-grid.layout-row .guest-gallery-item {
  flex: 0 0 auto;
  height: var(--row-photo-h);
  width: calc(var(--row-photo-h) * 0.8);
  /* 4:5 portrait tiles, so several stay in view */
  aspect-ratio: auto;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .guest-gallery-grid.layout-row {
    --row-photo-h: 250px;
  }
}

/* Variant 7: single vertical column, one photo per row (col) */
.guest-gallery-grid.layout-col {
  grid-template-columns: 1fr;
  gap: 16px;
}

.guest-gallery-grid.layout-col .guest-gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px !important;
}

@media (min-width: 640px) {
  .guest-gallery-grid.layout-col .guest-gallery-item {
    aspect-ratio: 3 / 2;
    /* keeps a full-width photo from filling the whole desktop screen */
  }
}

/* Lightbox Fullscreen Modal */
.gallery-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(12, 2, 4, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

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

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

.lightbox-content-wrapper img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(212, 180, 131, 0.4);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-counter {
  margin-top: 14px;
  color: #f7e0b5;
  font-size: 13px;
  letter-spacing: 1px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: rgba(41, 11, 15, 0.8);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(212, 180, 131, 0.3);
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(41, 11, 15, 0.85);
  border: 1px solid rgba(212, 180, 131, 0.5);
  color: #f7e0b5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.lightbox-close-btn:hover {
  background: #c19a5b;
  color: #1a0507;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(41, 11, 15, 0.85);
  border: 1px solid rgba(212, 180, 131, 0.5);
  color: #f7e0b5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.lightbox-nav-btn:hover {
  background: #c19a5b;
  color: #1a0507;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Text & Object Motion Keyframes */
.motion-item {
  animation: motionFadeUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Opening Section Staggered Smooth Fade Up Animation */
.opening-assemble-item {
  opacity: 0;
  transform: translateY(40px);
  animation: openingFadeUp 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes openingFadeUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.op-delay-1 {
  animation-delay: 0.2s;
}

.op-delay-2 {
  animation-delay: 0.45s;
}

.op-delay-3 {
  animation-delay: 0.7s;
}

.op-delay-4 {
  animation-delay: 0.95s;
}

.op-delay-5 {
  animation-delay: 1.2s;
}

.op-delay-6 {
  animation-delay: 1.45s;
}

@keyframes motionFadeUp {
  0% {
    opacity: 0;
    transform: translateY(36px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes motionFadeDown {
  0% {
    opacity: 0;
    transform: translateY(-24px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes motionScale {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =====================================================================
   Text colors for the light animated background
   ---------------------------------------------------------------------
   The page was designed for a dark maroon backdrop; the fixed background
   video is now bright cream + gold line art (~#ece7dd - #f6f3ec). Text that
   sits DIRECTLY on the video, and on the white glass panels below, is
   recolored to warm dark maroon/brown (all >= 4.5:1 on the cream).
   Panels (.detail-item, .count-unit, inputs, RSVP options, dock, ...) are
   white at 20% opacity (--glass-*); the solid dark call-to-action buttons
   below are kept. No overlay/tint is added over the background.
   ===================================================================== */
body.guest-mode {
  --ink: #4a1720;
  /* primary text             ~12:1 on cream */
  --ink-soft: #6b3036;
  /* secondary / muted text   ~8:1  on cream */
  --ink-accent: #7a4f0e;
  /* gold-brown headings      ~5.6:1 on cream */
  --lift-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  /* replaces dark halos meant for a dark bg */
  /* white glass panels: 20% white, light border, soft warm shadow, small blur (only on small panels) */
  --glass-bg: rgba(255, 255, 255, 0.20);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 4px 14px rgba(74, 23, 32, 0.08);
  --glass-blur: blur(6px);
  color: var(--ink);
}

/* --- Part 1: cover --- */
.opening-title-khmer {
  color: var(--ink);
  text-shadow: var(--lift-shadow);
}

.opening-subtitle-khmer {
  color: var(--ink-soft);
}

.opening-guest-label {
  color: var(--ink-accent);
}

.opening-guest-name {
  color: var(--ink);
  text-shadow: var(--lift-shadow);
}

/* Action buttons: a solid dark-maroon button with light text (their old pale-gold
   translucent fill made the light labels vanish on cream). Label colors are unchanged. */
.btn-open-invitation-khmer,
.btn-std-next,
.btn-add-calendar-khmer,
.btn-host-switch {
  background: linear-gradient(135deg, #5a1d27 0%, #3d1017 100%);
  border-color: #c19a5b;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 6px 18px rgba(74, 23, 32, 0.28);
}

.btn-open-invitation-khmer:hover,
.btn-std-next:hover,
.btn-add-calendar-khmer:hover,
.btn-host-switch:hover {
  background: linear-gradient(135deg, #6d2431 0%, #4a1720 100%);
  color: #f7e0b5;
  box-shadow: 0 8px 22px rgba(74, 23, 32, 0.38);
}

/* soft dark glow in the pulse animation instead of a gold one (gold glow is invisible on cream) */
@keyframes pulseOpenBtn {

  0%,
  100% {
    box-shadow: 0 6px 18px rgba(74, 23, 32, 0.28);
  }

  50% {
    box-shadow: 0 8px 24px rgba(74, 23, 32, 0.45);
  }
}

/* --- Part 2: save the date --- */
.std-calligraphy-name {
  /* gradient-clipped text: dark gold -> maroon; text-shadow would show through the transparent fill */
  background-image: linear-gradient(135deg, #6b3d08 0%, #8a5a14 45%, #5a1a24 100%);
  text-shadow: none;
}

.std-label {
  color: var(--ink-accent);
}

.std-date {
  background: linear-gradient(135deg, #d4b483 0%, #c19a5b 50%, #b8935a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c19a5b;
  font-weight: 700;
  text-shadow: none;
}

.std-tap-continue {
  color: var(--ink-soft);
}

/* --- Part 3: details screen / main invitation card --- */
.main-invitation-card {
  color: var(--ink);
}

.main-title-khmer {
  color: var(--ink);
  text-shadow: var(--lift-shadow);
}

.parent-role,
.couple-role-lbl {
  color: var(--ink-accent);
}

.parent-name,
.couple-khmer-name {
  color: var(--ink);
}

.couple-khmer-name {
  text-shadow: var(--lift-shadow);
}

.main-inv-subtitle {
  color: var(--ink-accent);
}

.main-inv-message-khmer {
  color: var(--ink);
}

.khmer-lunar-date {
  color: var(--ink-accent);
}

.gregorian-date-time {
  color: var(--ink);
}

.venue-location-khmer {
  color: var(--ink-soft);
}

.scroll-lbl {
  color: var(--ink-soft);
}

.scroll-up-indicator .chevrons svg {
  stroke: var(--ink-accent);
  /* overrides the stroke="#d4b483" presentation attribute */
}

/* --- Agenda --- */
.agenda-main-title {
  color: var(--ink);
  text-shadow: none;
}

.agenda-divider-line {
  background: linear-gradient(90deg, transparent, rgba(138, 90, 20, 0.7), transparent);
}

.agenda-day-title {
  border-bottom-color: rgba(122, 79, 14, 0.4);
}

.day-date-text {
  color: var(--ink);
}

.agenda-time {
  color: var(--ink-accent);
}

.agenda-desc {
  color: var(--ink);
}

.timeline-icon {
  color: var(--ink-accent);
}

.agenda-timeline::before {
  background: linear-gradient(180deg, rgba(138, 90, 20, 0.5) 0%, rgba(138, 90, 20, 0.8) 50%, rgba(138, 90, 20, 0.4) 100%);
}

.timeline-dot {
  background: var(--ink-accent);
  border-color: #fbf6ea;
  box-shadow: 0 0 4px rgba(138, 90, 20, 0.5);
}

/* --- Hero / invitation banner --- */
.hero-heading {
  color: var(--ink);
  text-shadow: none;
}

.hero-hosts {
  color: var(--ink-accent);
}

/* inline style="color: ..." in guest.html, hence !important */
#guest-invitation-msg-box {
  color: var(--ink-soft) !important;
}

/* --- Location --- */
.section-title {
  color: var(--ink);
}

#guest-map-venue-name {
  color: var(--ink) !important;
}

#guest-map-venue-addr {
  color: var(--ink-soft) !important;
}

/* --- RSVP --- */
.rsvp-label {
  color: var(--ink-accent);
}

.guest-input::placeholder,
.guest-textarea::placeholder {
  color: var(--ink-soft);
  opacity: 1;
  /* Firefox dims placeholders to 54% by default */
}

/* the native dropdown list gets an opaque light background (the glass select itself is see-through) */
.guest-select option {
  background: #fbf6ea;
  color: var(--ink);
}

/* --- White glass panels: dark text and gold-brown icons --- */
.detail-icon {
  color: var(--ink-accent);
}

.detail-icon svg {
  stroke: var(--ink-accent);
  /* overrides the stroke="#c19a5b" presentation attribute */
}

.detail-title {
  color: var(--ink-soft);
}

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

.count-num {
  color: var(--ink);
}

.count-lbl {
  color: var(--ink-soft);
}

.guest-brand-title {
  color: var(--ink-accent);
}

.guest-brand-sub {
  color: var(--ink-soft);
}

/* === Part 2 video (setting part2Video) ===
   guest.js adds .std-video-layer (a <video>, or an <img> for a typed image path) to the Save-The-Date overlay and .has-video on the overlay.
   The media fills the whole screen (cover, no letterboxing); the photo, names, label, frame and corner ornaments are hidden and ONLY the
   date stays, centered at ~70% of the screen height so it clears a title animated in the middle of the footage. */
.save-the-date-overlay.has-video {
  height: 100vh;
  height: 100dvh;
  /* mobile browser bars must not leave a gap */
  padding: 0;
  overflow: hidden;
}

.save-the-date-overlay.has-video>.opening-frame-border,
.save-the-date-overlay.has-video>.kbach-corner {
  display: none;
}

/* the text column becomes a full-screen layer above the media that ignores taps (a tap anywhere still continues) */
.save-the-date-overlay.has-video>.opening-content {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: block;
  max-width: none;
  margin: 0;
  pointer-events: none;
}

.save-the-date-overlay.has-video>.opening-content> :not(#std-event-date) {
  display: none;
}

/* hidden until Part 2 is shown (the overlay itself sits behind the cover from the start), then fades in under the cover */
.std-video-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 4;
  background: #000000;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.85s ease;
}

.save-the-date-overlay.active-show .std-video-layer {
  opacity: 1;
}

.std-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* the date: luxury floating pill badge ~70% down the screen; crystal clear on any background video or image.
   Dark tone: deep burgundy ink on frosted ivory glass with warm gold border.
   Light tone (.std-tone-light): luminous warm white text on rich deep maroon glass with gold border. */
.save-the-date-overlay.has-video .std-date {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24vh;
  bottom: 24svh;
  margin: 0 auto;
  width: fit-content;
  max-width: calc(100vw - 36px);
  box-sizing: border-box;
  font-family: 'Cinzel', serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(135deg, #d4b483 0%, #c19a5b 50%, #b8935a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c19a5b;
  text-shadow: none;
  filter: none;
  pointer-events: none;
  z-index: 10;
}

.save-the-date-overlay.has-video.std-tone-light .std-date {
  background: linear-gradient(135deg, #d4b483 0%, #c19a5b 50%, #b8935a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c19a5b;
  text-shadow: none;
  filter: none;
}

@media (max-width: 480px) {
  .save-the-date-overlay.has-video .std-date {
    font-size: 16px;
    letter-spacing: 2.5px;
    bottom: 22vh;
    bottom: 22svh;
  }
}

@media (max-width: 360px) {
  .save-the-date-overlay.has-video .std-date {
    font-size: 14px;
    letter-spacing: 1.8px;
  }
}