/* ==========================================================================
   YIM CHEARATHNAK & BUN BOSOMATIN — WEDDING E-INVITATION
   Theme: Blush-Ivory, Pastel Floral, Burgundy & Champagne-Gold Embossed
   Inspired by physical invitation (LYMEY-FLORAL-1) & demo interactive layout
   ========================================================================== */

:root {
  /* Core Palette extracted from physical wedding card */
  --bg-desktop: #e8dbd7;
  --paper-ivory: #fbf4f3;
  --paper-blush: #f6e8e9;
  --paper-pearl: rgba(255, 250, 249, 0.88);
  --paper-glass: rgba(255, 248, 247, 0.82);

  --burgundy: #7e2436;
  --burgundy-deep: #5c1827;
  --burgundy-soft: #a14456;
  --ink-primary: #472129;
  --ink-muted: #78545c;

  --gold: #c39a5d;
  --gold-bright: #e6c68a;
  --gold-pale: #f5e6c8;
  --gold-deep: #99723a;
  --rose-border: rgba(161, 68, 86, 0.28);

  --stage-max: 460px;
  --frame-inset: 10px;
  --radius-card: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 12px 32px rgba(92, 24, 39, 0.11);
  --shadow-gold: 0 8px 24px rgba(153, 114, 58, 0.22);

  /* Typography */
  --font-kh-display: 'Moul', 'Noto Serif Khmer', serif;
  --font-kh-serif: 'Noto Serif Khmer', 'Kantumruy Pro', serif;
  --font-kh-ui: 'Kantumruy Pro', system-ui, -apple-system, sans-serif;
  --font-en-script: 'Great Vibes', cursive;
  --font-en-serif: 'Cormorant Garamond', Georgia, serif;
}

[hidden] {
  display: none !important;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-kh-ui);
  color: var(--ink-primary);
  line-height: 1.72;
  background-color: var(--bg-desktop);
  /* Subtle blush diamond lattice inspired by photo_1 outer border */
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 250, 248, 0.72), transparent 65%),
    repeating-linear-gradient(
      45deg,
      rgba(161, 68, 86, 0.055) 0,
      rgba(161, 68, 86, 0.055) 1px,
      transparent 1px,
      transparent 22px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(161, 68, 86, 0.055) 0,
      rgba(161, 68, 86, 0.055) 1px,
      transparent 1px,
      transparent 22px
    );
  overflow-x: clip;
}

html[lang='en'] body {
  font-family: var(--font-en-serif);
  font-size: 1.05rem;
}

body.is-cover-active {
  overflow: hidden;
  height: 100dvh;
}

/* Visually hidden helper (canonical accessibility recipe) */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--burgundy);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Focus outline styling */
:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

/* ==========================================================================
   MOBILE-FIRST LUXURY STAGE & CHAMPAGNE-GOLD HAIRLINE FRAME
   ========================================================================== */
.stage-shell {
  position: relative;
  width: 100%;
  max-width: var(--stage-max);
  min-height: 100dvh;
  margin-inline: auto;
  background-color: var(--paper-ivory);
  box-shadow: 0 0 60px rgba(71, 33, 41, 0.2);
  overflow-x: clip;
}

/* Subtle gilded foil side hairline inspired by physical card outer border */
.gold-inset-frame {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(0px, calc(50% - var(--stage-max) / 2));
  width: min(100vw, var(--stage-max));
  z-index: 35;
  pointer-events: none;
  box-shadow:
    inset 6px 0 0 0 rgba(251, 244, 243, 0.12),
    inset -6px 0 0 0 rgba(251, 244, 243, 0.12);
}

.gold-inset-frame::before,
.gold-inset-frame::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  pointer-events: none;
  border-radius: 14px;
}

.gold-inset-frame::before {
  left: 6px;
  right: 6px;
  border: 1px solid rgba(212, 175, 114, 0.45);
}

.gold-inset-frame::after {
  left: 10px;
  right: 10px;
  top: 12px;
  bottom: 12px;
  border: 1px solid rgba(161, 68, 86, 0.16);
  border-radius: 11px;
}

/* Ambient Rose Petals & Shimmer Canvas */
.petals-canvas {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(0px, calc(50% - var(--stage-max) / 2));
  width: min(100vw, var(--stage-max));
  height: 100dvh;
  z-index: 32;
  pointer-events: none;
}

/* Floating Top-Right Controls (Language, Audio, Motion) */
.floating-controls {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: calc(max(0px, calc(50% - var(--stage-max) / 2)) + 18px);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-pill,
.ctrl-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  border: 1px solid rgba(230, 198, 138, 0.72);
  background: rgba(255, 250, 249, 0.9);
  backdrop-filter: blur(8px);
  color: var(--burgundy-deep);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(71, 33, 41, 0.16);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-kh-ui);
  font-size: 0.78rem;
  font-weight: 600;
}

.ctrl-pill {
  padding: 0 12px;
}

.ctrl-circle {
  width: 38px;
  height: 38px;
  padding: 0;
}

.ctrl-pill:hover,
.ctrl-circle:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(126, 36, 54, 0.22);
}

.ctrl-pill:active,
.ctrl-circle:active {
  transform: scale(0.95);
}

/* Audio & Motion icon toggle states */
#btn-audio .icon-sound-on {
  display: none;
}

#btn-audio.is-playing .icon-sound-on {
  display: block;
}

#btn-audio.is-playing .icon-sound-off {
  display: none;
}

#btn-audio.is-playing {
  background: linear-gradient(135deg, #fff9f2, #f8e5cc);
  border-color: var(--gold);
}

#btn-motion .icon-petals-off {
  display: none;
}

#btn-motion.is-paused .icon-petals-on {
  display: none;
}

#btn-motion.is-paused .icon-petals-off {
  display: block;
  opacity: 0.7;
}

/* ==========================================================================
   SCREEN 1: INTERACTIVE COVER / ENVELOPE SPLASH SCREEN
   ========================================================================== */
.cover-screen {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(0px, calc(50% - var(--stage-max) / 2));
  width: min(100vw, var(--stage-max));
  height: 100dvh;
  z-index: 30;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.85s ease, transform 0.85s ease, visibility 0.85s ease;
}

.cover-screen.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .cover-screen.is-dismissed {
    transform: scale(1.06);
  }
}

.cover-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .cover-bg-photo {
    animation: gentle-ken-burns 18s ease-in-out infinite alternate;
  }
}

@keyframes gentle-ken-burns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.065);
  }
}

.cover-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(66, 22, 33, 0.56) 0%,
    rgba(66, 22, 33, 0.14) 29%,
    rgba(66, 22, 33, 0.08) 54%,
    rgba(66, 22, 33, 0.62) 81%,
    rgba(52, 16, 25, 0.82) 100%
  );
}

/* Subtle Flying Doves Motif */
.cover-birds {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  color: rgba(255, 245, 232, 0.82);
}

.bird {
  position: absolute;
  filter: drop-shadow(0 2px 5px rgba(52, 16, 25, 0.35));
}

.bird-1 {
  top: 14%;
  right: 17%;
}

.bird-2 {
  top: 19%;
  right: 26%;
  opacity: 0.78;
}

@media (prefers-reduced-motion: no-preference) {
  .bird-1 {
    animation: dove-glide 9s ease-in-out infinite alternate;
  }
  .bird-2 {
    animation: dove-glide 11s ease-in-out infinite alternate-reverse;
  }
}

@keyframes dove-glide {
  0% {
    transform: translate(0, 0) rotate(-4deg);
  }
  50% {
    transform: translate(-18px, -10px) rotate(4deg);
  }
  100% {
    transform: translate(-32px, 4px) rotate(-2deg);
  }
}

.cover-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding:
    calc(env(safe-area-inset-top) + 68px)
    24px
    calc(env(safe-area-inset-bottom) + 38px);
}

.cover-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cover-eyebrow {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--gold-pale);
  text-shadow: 0 1px 8px rgba(45, 12, 20, 0.65);
}

.cover-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 6vw, 1.9rem);
  line-height: 1.5;
  background: linear-gradient(180deg, #fff6df 0%, #f1d396 52%, #cfa25a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(48, 12, 22, 0.68));
}

html[lang='en'] .cover-title {
  font-family: var(--font-en-script);
  font-size: clamp(2.4rem, 9vw, 3rem);
  line-height: 1.15;
}

.cover-couple-sub {
  margin: 6px 0 0;
  font-family: var(--font-kh-serif);
  font-size: 0.96rem;
  font-weight: 500;
  color: #fff6f2;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 10px rgba(48, 12, 22, 0.72);
}

html[lang='en'] .cover-couple-sub {
  font-family: var(--font-en-serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.cover-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cover-invite-label {
  margin: 0;
  font-family: var(--font-kh-display);
  font-size: 0.96rem;
  color: var(--gold-bright);
  text-shadow: 0 2px 8px rgba(42, 10, 18, 0.75);
}

html[lang='en'] .cover-invite-label {
  font-family: var(--font-en-serif);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Pearl-Ivory & Gold Guest Ribbon Pill (matching demo_video 00:00) */
.guest-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(86%, 290px);
  max-width: 96%;
  padding: 11px 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 251, 249, 0.96), rgba(248, 236, 234, 0.94));
  border: 1.5px solid var(--gold-bright);
  box-shadow:
    0 8px 26px rgba(45, 12, 20, 0.45),
    inset 0 0 0 3px rgba(195, 154, 93, 0.2);
}

.ribbon-flourish {
  color: var(--gold);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.guest-ribbon-name {
  font-family: var(--font-kh-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--burgundy-deep);
  word-break: break-word;
}

html[lang='en'] .guest-ribbon-name {
  font-family: var(--font-en-serif);
  font-size: 1.25rem;
}

.cover-open-label {
  margin: 6px 0 0;
  font-family: var(--font-kh-display);
  font-size: 0.88rem;
  color: var(--gold-pale);
  text-shadow: 0 2px 8px rgba(42, 10, 18, 0.78);
}

html[lang='en'] .cover-open-label {
  font-family: var(--font-en-serif);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Circular Glowing Play/Open Button (matching demo_video) */
.btn-open-circle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold-bright);
  background: radial-gradient(circle at 30% 30%, #fffaf2, #e9c98c);
  color: var(--burgundy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 6px 22px rgba(45, 12, 20, 0.5),
    0 0 0 5px rgba(230, 198, 138, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-open-circle:hover {
  transform: scale(1.07);
  box-shadow:
    0 10px 28px rgba(45, 12, 20, 0.55),
    0 0 0 8px rgba(230, 198, 138, 0.34);
}

.btn-open-circle:active {
  transform: scale(0.96);
}

.btn-open-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(245, 230, 200, 0.75);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .btn-open-pulse {
    animation: open-ring-pulse 2.2s ease-out infinite;
  }
}

@keyframes open-ring-pulse {
  0% {
    transform: scale(0.94);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

/* ==========================================================================
   SCREEN 2: FULL-VIEWPORT ROMANTIC HERO REVEAL
   ========================================================================== */
.main-invitation {
  position: relative;
  z-index: 10;
}

.hero-stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 620px;
  max-height: 920px;
  overflow: hidden;
  background: #3d1621;
}

/* Soft seamless transition melting the hero photo into the floral paper below */
.hero-stage::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(251, 244, 243, 0.72) 65%, var(--paper-ivory) 100%);
}

.hero-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(60, 18, 28, 0.55) 0%,
    rgba(60, 18, 28, 0.08) 32%,
    rgba(60, 18, 28, 0.08) 58%,
    rgba(60, 18, 28, 0.65) 84%,
    rgba(60, 18, 28, 0.86) 100%
  );
}

.hero-overlay {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding:
    calc(env(safe-area-inset-top) + 68px)
    24px
    calc(env(safe-area-inset-bottom) + 96px);
}

.hero-crest-wrap {
  opacity: 0;
  transition: opacity 1.1s ease 0.25s, transform 1.1s ease 0.25s;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-crest-wrap {
    transform: translateY(-14px) scale(0.92);
  }
}

.main-invitation.is-revealed .hero-crest-wrap {
  opacity: 1;
  transform: none;
}

.hero-monogram {
  width: 128px;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(42, 10, 18, 0.65));
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 1.1s ease 0.55s, transform 1.1s ease 0.55s;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-bottom {
    transform: translateY(18px);
  }
}

.main-invitation.is-revealed .hero-bottom {
  opacity: 1;
  transform: none;
}

.hero-ceremony-tag {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--gold-pale);
  text-shadow: 0 1px 8px rgba(42, 10, 18, 0.72);
}

.hero-couple-names {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: clamp(1.38rem, 5.5vw, 1.75rem);
  line-height: 1.5;
  background: linear-gradient(180deg, #fff9ea 0%, #f1d396 55%, #cf9e54 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(42, 10, 18, 0.75));
}

html[lang='en'] .hero-couple-names {
  font-family: var(--font-en-script);
  font-size: clamp(2.15rem, 8vw, 2.75rem);
  line-height: 1.18;
}

.hero-amp {
  font-family: var(--font-en-script);
  font-size: 1.65rem;
  line-height: 1;
  color: var(--gold-bright);
  -webkit-text-fill-color: var(--gold-bright);
}

.hero-date-bar {
  margin: 4px 0 6px;
  padding: 6px 18px;
  border-top: 1px solid rgba(230, 198, 138, 0.6);
  border-bottom: 1px solid rgba(230, 198, 138, 0.6);
  font-family: var(--font-kh-serif);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: #fff6f2;
  text-shadow: 0 1px 6px rgba(42, 10, 18, 0.75);
}

.hero-scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  color: var(--gold-pale);
  text-decoration: none;
  font-size: 0.78rem;
  opacity: 0.92;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-cue svg {
    animation: cue-bounce 1.8s ease-in-out infinite;
  }
}

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

/* ==========================================================================
   PAPER CANVAS & SHARED SECTION STYLES (Blush Watercolor Cotton Paper)
   ========================================================================== */
.paper-canvas {
  position: relative;
  background-color: var(--paper-ivory);
  background-image:
    linear-gradient(to bottom, rgba(251, 244, 243, 0.52), rgba(251, 244, 243, 0.44)),
    url('../assets/images/floral-bg.jpg');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
  padding: 20px 22px 118px;
}

.inv-section {
  padding-block: 26px;
  scroll-margin-top: 20px;
}

/* Modern Web Guidance: content-visibility on heavy off-screen sections */
.perf-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 560px;
}

/* Modern Web Guidance: Scroll-Driven Entry Animations with IntersectionObserver fallback */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes section-reveal {
      from {
        opacity: 0.12;
        transform: translateY(28px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .reveal-block {
      animation: section-reveal auto ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 34%;
    }
  }
}

.reveal-block.is-io-hidden {
  opacity: 0;
  transform: translateY(24px);
}

.reveal-block.is-io-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.section-badge-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--burgundy);
  background: linear-gradient(145deg, #fffaf9, #f4dfe2);
  border: 1.5px solid rgba(195, 154, 93, 0.65);
  box-shadow: 0 6px 18px rgba(126, 36, 54, 0.1);
}

.section-heading {
  margin: 0 0 6px;
  text-align: center;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: 1.24rem;
  line-height: 1.6;
  color: var(--burgundy);
}

html[lang='en'] .section-heading {
  font-family: var(--font-en-serif);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: 0.03em;
}

.section-sub {
  margin: 0 auto 18px;
  max-width: 340px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* ==========================================================================
   SECTION 1: FORMAL INVITATION CARD (Matching photo_1 & photo_2)
   ========================================================================== */
.scalloped-card {
  position: relative;
  padding: 26px 18px 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 251, 250, 0.93) 0%, rgba(250, 239, 240, 0.91) 100%);
  border: 1.5px solid var(--gold);
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 5px rgba(255, 252, 251, 0.85),
    inset 0 0 0 6.5px rgba(126, 36, 54, 0.36);
  text-align: center;
}

.card-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--gold);
  pointer-events: none;
}

.card-corner.tl {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 10px;
}

.card-corner.tr {
  top: 10px;
  right: 10px;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 10px;
}

.card-corner.bl {
  bottom: 10px;
  left: 10px;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 10px;
}

.card-corner.br {
  bottom: 10px;
  right: 10px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 10px;
}

.floral-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--gold);
}

.floral-divider span {
  display: block;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.floral-divider i {
  font-style: normal;
  font-size: 0.9rem;
}

.formal-title {
  margin: 0;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: 1.28rem;
  line-height: 1.65;
  color: var(--burgundy);
}

html[lang='en'] .formal-title {
  font-family: var(--font-en-script);
  font-size: 2.3rem;
  line-height: 1.15;
}

.formal-subtitle-en {
  margin: 2px 0 18px;
  font-family: var(--font-en-script);
  font-size: 1.4rem;
  color: var(--burgundy-soft);
}

html[lang='en'] .formal-subtitle-en {
  display: none;
}

.parents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(195, 154, 93, 0.45);
}

.parent-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.parent-name {
  margin: 0;
  font-family: var(--font-kh-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--burgundy-deep);
  line-height: 1.55;
}

html[lang='en'] .parent-name {
  font-family: var(--font-en-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.invite-lead {
  margin: 0 0 10px;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: 0.96rem;
  color: var(--burgundy);
}

html[lang='en'] .invite-lead {
  font-family: var(--font-en-serif);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.formal-guest-banner {
  margin: 0 auto 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(126, 36, 54, 0.06);
  border: 1px solid rgba(195, 154, 93, 0.55);
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
}

.formal-guest-prefix {
  color: var(--ink-muted);
}

.formal-guest-name {
  color: var(--burgundy);
  font-family: var(--font-kh-serif);
}

.formal-paragraph {
  margin: 0 0 20px;
  font-family: var(--font-kh-serif);
  font-size: 0.86rem;
  line-height: 1.85;
  color: var(--ink-primary);
}

html[lang='en'] .formal-paragraph {
  font-family: var(--font-en-serif);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* Couple Showcase with Real Monogram Crest */
.couple-showcase {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-block: 16px 20px;
}

.couple-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.person-role {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.person-name {
  margin: 2px 0 0;
  font-family: var(--font-kh-display);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--burgundy);
}

html[lang='en'] .person-name {
  font-family: var(--font-en-script);
  font-size: 1.42rem;
  line-height: 1.15;
}

.person-name-alt {
  margin: 0;
  font-family: var(--font-en-serif);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--burgundy-soft);
}

html[lang='en'] .person-name-alt {
  display: none;
}

.crest-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.formal-monogram {
  width: 96px;
  height: auto;
  filter: drop-shadow(0 3px 8px rgba(126, 36, 54, 0.14));
}

/* Date Lockup (inspired by photo_2 right panel + demo_video) */
.date-lockup {
  margin: 18px auto 16px;
  max-width: 300px;
  padding: 12px 10px;
  border-top: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  background: linear-gradient(90deg, transparent, rgba(245, 230, 200, 0.32), transparent);
}

.date-month {
  margin: 0 0 4px;
  font-family: var(--font-kh-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--burgundy);
  letter-spacing: 0.06em;
}

.date-middle-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.date-side {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-primary);
  padding-block: 5px;
  border-top: 1px solid var(--rose-border);
  border-bottom: 1px solid var(--rose-border);
}

.date-day-num {
  font-family: var(--font-kh-display);
  font-size: 2.05rem;
  line-height: 1.15;
  color: var(--burgundy);
  padding-inline: 8px;
}

html[lang='en'] .date-day-num {
  font-family: var(--font-en-serif);
  font-weight: 700;
  font-size: 2.5rem;
}

.date-year {
  margin: 5px 0 0;
  font-family: var(--font-kh-display);
  font-size: 1rem;
  color: var(--burgundy-deep);
  letter-spacing: 0.08em;
}

.formal-venue-note {
  margin: 12px 0 16px;
  font-family: var(--font-kh-serif);
  font-size: 0.84rem;
  line-height: 1.85;
  color: var(--ink-primary);
}

html[lang='en'] .formal-venue-note {
  font-family: var(--font-en-serif);
  font-size: 1rem;
  line-height: 1.55;
}

/* Host Phone Chips */
.contact-chips {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.phone-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid rgba(195, 154, 93, 0.55);
  color: var(--burgundy);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 36px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.phone-chip:hover {
  background: var(--paper-blush);
  transform: translateY(-1px);
}

/* Primary & Secondary Luxury Pill Buttons */
.calendar-actions,
.location-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-primary-pill,
.btn-secondary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary-pill {
  border: 1.5px solid var(--gold-bright);
  background: linear-gradient(135deg, var(--burgundy) 0%, #9b3347 100%);
  color: #fff9f5;
  box-shadow: 0 6px 18px rgba(126, 36, 54, 0.28);
}

.btn-primary-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(126, 36, 54, 0.34);
}

.btn-primary-pill:active,
.btn-secondary-pill:active {
  transform: scale(0.98);
}

.btn-secondary-pill {
  border: 1.5px solid var(--gold);
  background: rgba(255, 251, 250, 0.92);
  color: var(--burgundy-deep);
  box-shadow: 0 4px 12px rgba(92, 24, 39, 0.08);
}

.btn-secondary-pill:hover {
  background: #ffffff;
  border-color: var(--burgundy-soft);
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   SECTION 2: GRATITUDE & APOLOGY PANEL
   ========================================================================== */
.frosted-panel {
  padding: 26px 20px;
  border-radius: var(--radius-card);
  background: var(--paper-pearl);
  border: 1.5px solid rgba(195, 154, 93, 0.65);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.panel-heading {
  margin: 0 0 4px;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: 1.08rem;
  color: var(--burgundy);
}

html[lang='en'] .panel-heading {
  font-family: var(--font-en-serif);
  font-weight: 700;
  font-size: 1.38rem;
}

.lotus-ornament {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.86rem;
  letter-spacing: 0.25em;
}

.panel-body {
  margin: 0;
  font-family: var(--font-kh-serif);
  font-size: 0.87rem;
  line-height: 1.9;
  color: var(--ink-primary);
}

html[lang='en'] .panel-body {
  font-family: var(--font-en-serif);
  font-size: 1.05rem;
  line-height: 1.62;
}

.ornate-hr {
  border: 0;
  height: 1px;
  margin: 22px auto;
  width: 68%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ==========================================================================
   SECTION 3: VENUE & INTERACTIVE MAP
   ========================================================================== */
.venue-address-lead {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink-primary);
}

.venue-address-lead strong {
  color: var(--burgundy);
  font-family: var(--font-kh-serif);
  font-size: 1rem;
}

.map-frame-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 2px solid rgba(195, 154, 93, 0.72);
  box-shadow: var(--shadow-soft);
  background: #f0e3e4;
  margin-bottom: 16px;
}

.map-frame-card iframe {
  display: block;
  width: 100%;
  height: 250px;
  border: 0;
}

/* ==========================================================================
   SECTION 4: 9-PART WEDDING CEREMONY SCHEDULE TIMELINE (photo_5)
   ========================================================================== */
.schedule-date-sub {
  font-family: var(--font-kh-serif);
  color: var(--burgundy-soft);
  font-weight: 500;
}

.schedule-timeline {
  list-style: none;
  margin: 18px 0 0;
  padding: 20px 14px;
  border-radius: var(--radius-card);
  background: var(--paper-pearl);
  border: 1.5px solid rgba(195, 154, 93, 0.65);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding-block: 12px;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 25px;
  top: 56px;
  bottom: -10px;
  width: 1.5px;
  background: linear-gradient(to bottom, rgba(161, 68, 86, 0.42), rgba(195, 154, 93, 0.42));
}

.timeline-icon-box {
  position: relative;
  z-index: 2;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--burgundy);
  background: linear-gradient(145deg, #fffafa, #f7e6e8);
  border: 1.5px solid rgba(195, 154, 93, 0.65);
  box-shadow: 0 4px 10px rgba(126, 36, 54, 0.08);
}

.timeline-item.is-highlight .timeline-icon-box {
  background: linear-gradient(135deg, var(--burgundy), #9a3346);
  color: var(--gold-pale);
  border-color: var(--gold-bright);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(195, 154, 93, 0.34);
}

.timeline-item:last-child .timeline-content {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-time {
  font-family: var(--font-kh-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--burgundy);
}

.timeline-desc {
  margin: 2px 0 0;
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--ink-primary);
}

.timeline-item.is-highlight .timeline-desc {
  font-weight: 600;
  color: var(--burgundy-deep);
}

/* ==========================================================================
   SECTION 5: PHOTO GALLERY COLLAGE
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-card {
  position: relative;
  border: 1.5px solid rgba(195, 154, 93, 0.65);
  border-radius: 14px;
  overflow: hidden;
  background: #f5e6e8;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(71, 33, 41, 0.11);
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.gallery-card.is-wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

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

.gallery-card:hover img {
  transform: scale(1.045);
}

.gallery-card-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 250, 249, 0.86);
  color: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(45, 12, 20, 0.2);
}

/* ==========================================================================
   SECTION 6: LIVE COUNTDOWN (Matching demo_video 01:06)
   ========================================================================== */
.countdown-couple {
  margin: 0;
  text-align: center;
  font-family: var(--font-kh-display);
  font-size: 1.15rem;
  color: var(--burgundy);
}

html[lang='en'] .countdown-couple {
  font-family: var(--font-en-script);
  font-size: 2rem;
}

.countdown-date {
  margin: 4px 0 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.countdown-panel {
  padding: 20px 16px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255, 251, 250, 0.94), rgba(246, 232, 233, 0.92));
  border: 1.5px solid var(--gold);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.countdown-title {
  margin: 0 0 14px;
  font-family: var(--font-kh-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--burgundy);
}

.countdown-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cd-sub-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cd-card {
  padding: 12px 8px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--burgundy) 0%, #983246 100%);
  border: 1px solid var(--gold-bright);
  color: #fffaf5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(126, 36, 54, 0.22);
}

.cd-card.cd-days {
  padding-block: 16px;
}

.cd-num {
  font-family: var(--font-kh-display);
  font-size: 1.65rem;
  line-height: 1.25;
  color: var(--gold-pale);
}

.cd-days .cd-num {
  font-size: 2.35rem;
}

.cd-unit {
  font-size: 0.78rem;
  opacity: 0.92;
  margin-top: 2px;
}

.countdown-celebration {
  margin: 12px 0 0;
  font-weight: 600;
  color: var(--burgundy);
}

/* ==========================================================================
   SECTION 7: DIGITAL GIFT / KHQR BLESSING CARDS
   ========================================================================== */
.gift-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gift-cards-grid.is-single {
  grid-template-columns: 1fr;
  max-width: 248px;
  margin-inline: auto;
}

.gift-cards-grid.is-single .gift-card-qr-img,
.gift-cards-grid.is-single .gift-qr-placeholder {
  max-width: 176px;
}

.gift-card {
  border: 1.5px solid rgba(195, 154, 93, 0.72);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 0;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.gift-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(92, 24, 39, 0.16);
}

.gift-card-head {
  padding: 9px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.gift-card.theme-khqr .gift-card-head {
  background: linear-gradient(135deg, #a61c2e, var(--burgundy));
  color: #fffaf5;
}

.gift-card.theme-aba .gift-card-head {
  background: linear-gradient(135deg, #005b7f, #003e5c);
}

.gift-card.theme-acleda .gift-card-head {
  background: linear-gradient(135deg, #1b365d, #244775);
  color: #f4d06f;
}

.gift-card-qr-wrap {
  padding: 12px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fffdfb;
}

.gift-card-qr-img {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
}

.gift-qr-placeholder {
  width: 100%;
  max-width: 132px;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1.5px dashed rgba(126, 36, 54, 0.3);
  background: #fdf6f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  color: var(--burgundy-soft);
}

.gift-qr-placeholder span {
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--ink-muted);
}

.gift-card-foot {
  padding: 6px 8px 11px;
  background: #fffaf9;
  border-top: 1px solid rgba(195, 154, 93, 0.25);
}

.gift-acct-name {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--burgundy-deep);
}

.gift-tap-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   SECTIONS 8 & 9: ACCESSIBLE FORMS (RSVP & WEDDING WISHES)
   Modern Web Guidance: :user-invalid / :user-valid, >= 48px targets, >= 1rem
   ========================================================================== */
.glass-form {
  padding: 22px 18px;
  border-radius: var(--radius-card);
  background: var(--paper-pearl);
  border: 1.5px solid rgba(195, 154, 93, 0.7);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Printed Guest Nameplate (replaces manual name input when opened via unique guest URL) */
.guest-nameplate {
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 252, 250, 0.96), rgba(246, 232, 233, 0.72));
  border: 1px solid rgba(195, 154, 93, 0.65);
  box-shadow: inset 0 0 0 3px rgba(255, 252, 251, 0.75);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.nameplate-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nameplate-name {
  font-family: var(--font-kh-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--burgundy);
  word-break: break-word;
}

html[lang='en'] .nameplate-name {
  font-family: var(--font-en-serif);
  font-size: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--burgundy-deep);
  padding: 0;
}

.req-star {
  color: #b42336;
  margin-inline-start: 2px;
}

.glass-form input[type='text'],
.glass-form textarea {
  width: 100%;
  font: inherit;
  font-size: max(1rem, 1em);
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(126, 36, 54, 0.34);
  background: #ffffff;
  color: var(--ink-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.glass-form textarea {
  min-height: 96px;
  resize: vertical;
}

.glass-form input[type='text']:focus,
.glass-form textarea:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(195, 154, 93, 0.28);
  outline: none;
}

/* Validation AFTER user interaction (:user-invalid with JS fallback) */
.glass-form :is(input, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: #c62828;
  background-color: #fff4f4;
}

.glass-form :is(input, textarea):is(:user-valid, .user-valid-fallback) {
  border-color: #2e7d52;
}

.error-msg {
  display: none;
  font-size: 0.84rem;
  color: #b71c1c;
  gap: 5px;
  align-items: center;
}

.glass-form :is(input, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg,
.stepper-control:has(:is(:user-invalid, .user-invalid-fallback)) ~ .error-msg {
  display: flex;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Attendance Radio Pills */
.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-pill {
  position: relative;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.radio-pill label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1.5px solid rgba(126, 36, 54, 0.3);
  background: #ffffff;
  color: var(--ink-primary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.radio-pill input:checked + label {
  background: linear-gradient(135deg, var(--burgundy), #9a3346);
  border-color: var(--gold-bright);
  color: #fff9f5;
  box-shadow: 0 4px 12px rgba(126, 36, 54, 0.22);
}

.radio-pill input:focus-visible + label {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

/* Guest Count Stepper (- 1 +) */
.stepper-control {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 8px;
  align-items: center;
}

.stepper-control input {
  text-align: center;
  font-weight: 700;
}

.stepper-btn {
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(180deg, #fffaf6, #f5e5e7);
  color: var(--burgundy-deep);
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.stepper-btn:hover {
  background: #fff;
}

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

.form-feedback {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  background: #eef8f1;
  border: 1px solid #81c79c;
  color: #1e5b37;
}

.form-feedback.is-error {
  background: #fff2f2;
  border-color: #e59898;
  color: #9e1c26;
}

/* Wishes Wall */
.wishes-wall {
  margin-top: 18px;
}

.wishes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.wish-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 251, 250, 0.92);
  border: 1px solid rgba(195, 154, 93, 0.5);
  box-shadow: 0 3px 10px rgba(71, 33, 41, 0.06);
}

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

.wish-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--burgundy);
}

.wish-date {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.wish-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   SECTION 10: CREDITS & THANK YOU FOOTER
   ========================================================================== */
.inv-footer {
  padding: 28px 0 22px;
  text-align: center;
}

.sampeah-icon {
  color: var(--burgundy);
  margin-bottom: 6px;
}

.footer-thanks {
  margin: 0 0 18px;
  font-family: var(--font-kh-display);
  font-weight: 400;
  font-size: 1.24rem;
  color: var(--burgundy);
}

html[lang='en'] .footer-thanks {
  font-family: var(--font-en-script);
  font-size: 2.2rem;
}

.credits-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.credit-card {
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--paper-pearl);
  border: 1px solid rgba(195, 154, 93, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.credit-role {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.credit-val {
  font-size: 0.92rem;
  color: var(--burgundy-deep);
}

.footer-monogram {
  width: 82px;
  height: auto;
  margin: 4px auto 8px;
  display: block;
}

.footer-couple-sign {
  margin: 0;
  font-family: var(--font-en-script);
  font-size: 1.85rem;
  color: var(--burgundy);
}

.footer-date-sign {
  margin: 0 0 18px;
  font-family: var(--font-en-serif);
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  color: var(--gold-deep);
}

.footer-host-tools {
  padding-top: 14px;
  border-top: 1px dashed rgba(195, 154, 93, 0.5);
}

.host-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(195, 154, 93, 0.45);
  background: rgba(255, 251, 250, 0.72);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.host-tool-link:hover {
  color: var(--burgundy);
  background: #ffffff;
}

/* ==========================================================================
   FLOATING BOTTOM NAVIGATION DOCK (matching demo_video.mp4)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 250, 249, 0.94);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(195, 154, 93, 0.72);
  box-shadow: 0 10px 28px rgba(71, 33, 41, 0.2);
  max-width: calc(min(100vw, var(--stage-max)) - 32px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 44px;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  text-decoration: none;
  gap: 1px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-tip {
  font-size: 0.64rem;
  line-height: 1.1;
  font-weight: 600;
}

.nav-item:hover {
  color: var(--burgundy);
}

.nav-item.is-active {
  background: linear-gradient(135deg, var(--burgundy), #983246);
  color: #fff9f5;
  box-shadow: 0 4px 12px rgba(126, 36, 54, 0.25);
}

/* ==========================================================================
   NATIVE <dialog closedby="any"> MODALS (Lightbox, Printed Map, Gift QR)
   Modern Web Guidance: @starting-style, overlay, allow-discrete, overscroll-behavior
   ========================================================================== */
.modal-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 520px);
  max-height: 92dvh;
  width: 100%;
  color: var(--ink-primary);
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
  .modal-dialog {
    transform: scale(0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-dialog {
    transition-duration: 0.1s;
  }
}

.modal-dialog:modal {
  overscroll-behavior: contain;
}

.modal-dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgb(32 10 16 / 0);
  backdrop-filter: blur(4px);
  transition-property: background-color, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

.modal-dialog[open]:where(:not([data-closing])) {
  opacity: 1;

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(1);

    @starting-style {
      transform: scale(0.94);
    }
  }

  &::backdrop {
    background-color: rgb(32 10 16 / 0.8);

    @starting-style {
      background-color: rgb(32 10 16 / 0);
    }
  }
}

/* Lightbox specific layout */
.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  margin: 0;
  width: 100%;
  text-align: center;
}

.lightbox-figure img {
  display: block;
  margin-inline: auto;
  max-width: 100%;
  max-height: 74dvh;
  border-radius: 14px;
  border: 2px solid rgba(230, 198, 138, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 10px;
  color: #fff6f2;
  font-size: 0.9rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}

.lightbox-counter {
  margin: 0;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 250, 249, 0.16);
  color: var(--gold-pale);
  font-size: 0.82rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(230, 198, 138, 0.65);
  background: rgba(45, 14, 22, 0.65);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(126, 36, 54, 0.92);
}

.lightbox-nav.prev {
  left: 6px;
}

.lightbox-nav.next {
  right: 6px;
}

.dialog-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(230, 198, 138, 0.7);
  background: rgba(255, 250, 249, 0.92);
  color: var(--burgundy-deep);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lightbox-inner > .dialog-close-btn {
  align-self: flex-end;
}

/* Sheet Modals (Printed Map & Gift QR) */
.sheet-inner {
  border-radius: 20px;
  background: var(--paper-ivory);
  border: 1.5px solid var(--gold);
  box-shadow: 0 22px 54px rgba(32, 10, 16, 0.48);
  overflow: hidden;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(195, 154, 93, 0.4);
  background: linear-gradient(180deg, #fffaf9, #f7e9eb);
}

.sheet-header h3 {
  margin: 0;
  font-family: var(--font-kh-serif);
  font-size: 1rem;
  color: var(--burgundy);
}

.sheet-body {
  padding: 16px;
  text-align: center;
}

.printed-map-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(195, 154, 93, 0.6);
  display: block;
}

.printed-map-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.qr-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-dialog-body img {
  max-width: 260px;
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(195, 154, 93, 0.6);
}

.qr-dialog-acct {
  margin: 0;
  font-weight: 700;
  color: var(--burgundy-deep);
}

.qr-dialog-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
  max-width: 300px;
}

/* ==========================================================================
   SMALL SCREEN POLISH
   ========================================================================== */
@media (max-width: 370px) {
  .paper-canvas {
    padding-inline: 16px;
  }
  .scalloped-card {
    padding: 20px 12px 22px;
  }
  .formal-monogram {
    width: 78px;
  }
  .nav-item {
    min-width: 44px;
    padding: 4px 5px;
  }
}
