/* ==========================================================================
   WEDDING E-INVITATION — FINE-ART BURGUNDY & CHAMPAGNE DESIGN SYSTEM
   Mobile-First Editorial Layout + Responsive Desktop Polish
   ========================================================================== */

:root {
  /* Core Palette — Phương án A: Burgundy & Champagne */
  --wine: #681f30;
  --wine-dark: #4f1422;
  --wine-deep: #241116;
  --wine-soft: #fdf4f6;
  --wine-border: rgba(104, 31, 48, 0.22);

  --gold: #b88a44;
  --gold-light: #e7cb92;
  --gold-soft: #f5ebd6;
  --gold-ink: #8f6528;

  --paper: #fbf7ef;
  --paper-alt: #f4ede2;
  --card: #fffdf9;
  --border: #e4d8c5;

  --ink: #241a17;
  --ink-soft: #5c4b45;

  /* Typography — Khôi phục nguyên bản trước cuộc chat */
  --font-display: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Be Vietnam Pro', sans-serif;
  --font-script: 'Great Vibes', cursive;

  /* Layout & Surfaces */
  --container-max: 70rem;
  --container-medium: 58rem;
  --container-narrow: 56rem;
  --gutter: clamp(1rem, 4.5vw, 3rem);
  --radius-sm: 0.625rem;
  --radius-md: 1rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  --shadow-card: 0 10px 28px -8px rgba(52, 24, 28, 0.08), 0 1px 2px rgba(52, 24, 28, 0.04);
  --shadow-seal: 0 8px 20px -4px rgba(104, 31, 48, 0.34);
  --shadow-envelope: 0 28px 64px -16px rgba(45, 16, 22, 0.26);

  scroll-padding-top: 1.25rem;
}

/* Base Reset & Resiliency */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.font-serif {
  font-family: var(--font-serif) !important;
}

.font-script,
.wedding-inv-script {
  font-family: var(--font-script);
  color: var(--wine);
  font-weight: 400;
  line-height: 1.25;
}

.wedding-inv-script {
  font-size: clamp(2.15rem, 6vw, 2.85rem);
  display: inline-block;
}

.section-script {
  font-family: var(--font-script);
  font-size: clamp(1.85rem, 5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--gold-ink);
  display: inline-block;
}

.stationery-card {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 203, 146, 0.14) 0%, transparent 55%),
    var(--card);
  border: 1px solid rgba(184, 138, 68, 0.42);
  overflow: hidden;
}

.stationery-card::after,
.schedule-card::after,
.guestbook-stationery::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184, 138, 68, 0.24);
  border-radius: calc(var(--radius-lg) - 5px);
  pointer-events: none;
}

.corner-ornament {
  display: none;
}

.section-head h2,
.story-heading,
.story-item-title,
.portrait-name,
.schedule-card-head h2,
.schedule-info h3,
.calendar-head h2,
.venue-card-head h3,
.gift-person-info h3,
.form-card-head h3,
.guestbook-titles h3,
.cover-names {
  font-family: var(--font-display);
  font-style: normal;
}

body.invitation-closed {
  overflow: hidden;
  height: 100dvh;
}

body.invitation-closed .invitation-main {
  visibility: hidden;
  height: 100dvh;
  overflow: hidden;
}

::selection {
  background: rgba(104, 31, 48, 0.16);
  color: var(--wine);
}

img,
svg,
iframe {
  display: block;
}

button,
a,
input,
textarea {
  font: inherit;
}

.sr-svg {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* Focus rings */
:is(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ==========================================================================
   SHARED EDITORIAL COMPONENTS
   ========================================================================== */

.invitation-main {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  background: var(--paper);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.inv-section {
  position: relative;
  width: 100%;
  padding-block: clamp(3rem, 7vw, 5.25rem);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--border);
}

.inv-section--ivory {
  background: var(--paper);
}

.inv-section--cream {
  background: var(--paper-alt);
}

.inv-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  min-inline-size: 0;
}

.inv-container--medium {
  max-width: var(--container-medium);
}

.inv-container--narrow {
  max-width: var(--container-narrow);
}

/* Unified Section Header */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
}

.section-eyebrow,
.card-eyebrow {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.18;
  color: var(--wine);
}

.section-lead {
  margin: 0.25rem 0 0;
  max-width: 34rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.02rem, 2.3vw, 1.15rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.flourish-divider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-block: 0.15rem;
}

.flourish-divider>span:first-child,
.flourish-divider>span:last-child {
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.75));
}

.flourish-divider>span:last-child {
  transform: scaleX(-1);
}

.flourish-mark {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1;
}

.lotus-ornament {
  width: 2.15rem;
  height: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
  display: block;
}

.lotus-ornament--sm {
  width: 1.55rem;
  height: 0.9rem;
}

.lotus-ornament--light {
  color: var(--gold-light);
}

.mini-diamond {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  opacity: 0.85;
}

.mini-diamond--light {
  background: var(--gold-light);
}

/* Cards */
.fine-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  min-inline-size: 0;
}

.deckle-border::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(184, 138, 68, 0.28);
  border-radius: calc(var(--radius-lg) - 5px);
  pointer-events: none;
}

/* Buttons */
.btn-primary,
.btn-outline,
.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--wine);
  color: #fff7ea;
  border: 1px solid rgba(231, 203, 146, 0.32);
  box-shadow: var(--shadow-seal);
}

.btn-primary:hover {
  background: var(--wine-dark);
}

.btn-primary:active,
.btn-outline:active,
.btn-copy:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--wine-border);
}

.btn-outline:hover {
  background: var(--wine-soft);
  border-color: var(--wine);
}

.btn-copy {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  background: var(--paper);
  color: var(--wine);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.btn-copy:hover {
  background: var(--wine-soft);
  border-color: var(--wine);
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
}

.btn-text {
  background: none;
  border: 0;
  padding: 0.4rem 0.25rem;
  color: var(--wine);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.btn-primary .material-symbols-outlined,
.btn-outline .material-symbols-outlined,
.btn-copy .material-symbols-outlined {
  font-size: 1.125rem;
}

.inline-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--wine);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.inline-link:hover {
  color: var(--wine-dark);
}

/* ==========================================================================
   SECTION 00: OPENING ENVELOPE GATE
   ========================================================================== */

.envelope-gate {
  position: fixed;
  inset: 0;
  z-index: 150;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 0;
  background: radial-gradient(ellipse at 50% 35%, #f1e7db, #dfc8bf);
  user-select: none;
  transition: opacity 0.55s ease, visibility 0s linear 0.55s;
}

.envelope-gate.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-gate .gf-vibes {
  font-family: var(--font-script);
}

.envelope-gate .fine-art-canvas {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 100dvh;
  margin: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.65rem, 2.2dvh, 1.5rem);
  padding: max(clamp(1.25rem, 3.5dvh, 2.25rem), env(safe-area-inset-top, 0px)) 1.25rem max(clamp(1.1rem, 2.8dvh, 1.75rem), env(safe-area-inset-bottom, 0px));
  background-color: #faf6ee;
  background-image:
    linear-gradient(180deg, #faf6ee 0%, #faf6ee 15%, rgba(250, 246, 238, 0.78) 25%, rgba(250, 246, 238, 0.16) 40%, rgba(250, 246, 238, 0.24) 64%, rgba(250, 246, 238, 0.94) 100%),
    url("../images/envelope-dsc-0743.jpg");
  background-position: center top, center clamp(4.5rem, 11dvh, 6.25rem);
  background-repeat: no-repeat;
  background-size: 100% 100%, cover;
  box-shadow: var(--shadow-envelope), 0 0 0 1px rgba(184, 138, 68, 0.28);
  overflow: hidden;
}

.envelope-frame {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.envelope-frame-outer {
  inset: 10px;
  border: 1px solid rgba(184, 138, 68, 0.36);
  border-radius: 26px;
}

.envelope-frame-inner {
  inset: 15px;
  border: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 22px;
}

.envelope-portrait {
  display: none;
}

.envelope-heading {
  position: relative;
  z-index: 10;
  width: 100%;
  text-align: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.envelope-eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.envelope-heading h1 {
  margin: 0;
  font-size: clamp(2.15rem, 6.8dvh, 3.25rem);
  line-height: 1.12;
  font-weight: 400;
  color: var(--wine);
  text-shadow: 0 1px 10px rgba(255, 250, 242, 0.8);
}

.envelope-heading h1 .block {
  display: block;
}

.envelope-ampersand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-block: 0.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  line-height: 1;
  color: var(--gold-ink);
}

.envelope-ampersand::before,
.envelope-ampersand::after {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.envelope-ampersand::after {
  transform: scaleX(-1);
}

.envelope-perspective {
  position: relative;
  z-index: 12;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  margin-block: clamp(3.75rem, 15dvh, 8.5rem) 0;
}

.envelope-perspective:has(.envelope-container.is-open),
.envelope-gate.gate-is-open .envelope-perspective {
  z-index: 25;
}

.envelope-container {
  --wax-seal-size: clamp(3.75rem, 16vw, 4.5rem);
  position: relative;
  width: min(326px, calc(100% - 12px), max(13.5rem, 42dvh));
  aspect-ratio: 342 / 216;
  cursor: pointer;
}

.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: #280509;
  border: 1px solid rgba(197, 160, 89, 0.32);
  z-index: 0;
}

.inner-invitation-card {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  top: 0.625rem;
  height: 90%;
  border-radius: 12px;
  z-index: 5;
  padding: 0.65rem 0.9rem 0.75rem;
  border: 1px solid rgba(184, 138, 68, 0.52);
  background: linear-gradient(180deg, #fffefb 0%, #faf3e6 100%);
  box-shadow: 0 4px 18px rgba(30, 5, 10, 0.14);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: 0.15rem;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 0.85s cubic-bezier(0.25, 1, 0.5, 1) 0.48s, box-shadow 0.6s ease;
}

.inner-invitation-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 8px;
  pointer-events: none;
}

.inner-card-header {
  position: relative;
  width: 100%;
  text-align: center;
  padding-bottom: 0.35rem;
}

.inner-card-header::after {
  content: '';
  display: block;
  width: 5.5rem;
  height: 1px;
  margin: 0.3rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.65), transparent);
}

.inner-card-header span {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.envelope-greeting {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding-inline: 0.2rem;
}

.envelope-greeting-text {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  text-align: center;
  overflow-wrap: anywhere;
}

#envelope-guest-name {
  margin: 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: clamp(1.75rem, 6.8vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--wine);
  letter-spacing: 0.01em;
}

.envelope-greeting-note {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.125rem, 4.4vw, 1.28rem);
  line-height: 1.3;
  color: var(--wine);
  text-wrap: balance;
}

.envelope-chibi {
  position: absolute;
  inset: auto 0 calc(100% - 5px);
  width: min(clamp(7.25rem, 34vw, 10rem), max(4rem, calc(40dvh - 10rem)));
  height: auto;
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 6px 10px rgba(45, 10, 16, 0.16));
}

.envelope-velvet-base {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(145deg, #6e1627 0%, #520d1a 52%, #390610 100%);
  box-shadow:
    0 24px 38px -10px rgba(35, 4, 10, 0.45),
    0 8px 18px -4px rgba(35, 4, 10, 0.25),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.22),
    inset 0 -2px 3px rgba(0, 0, 0, 0.45);
}

.envelope-velvet-rim {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid rgba(197, 160, 89, 0.45);
}

.envelope-folds,
.envelope-flap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.envelope-hinge {
  position: absolute;
  inset: 0 0 auto 0;
  height: 58.3%;
  z-index: 20;
  pointer-events: none;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.45, 0.05, 0.22, 1), z-index 0s linear 0.34s;
}

.envelope-top-flap {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  background: linear-gradient(180deg, #7d1b2c 0%, #5b0f1d 65%, #440812 100%);
  filter: drop-shadow(0 6px 10px rgba(20, 2, 5, 0.45));
}

.wax-seal {
  position: absolute;
  top: 98.5%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  width: var(--wax-seal-size);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 49% 51% 48% 52% / 51% 48% 52% 49%;
  background:
    radial-gradient(ellipse at 35% 18%, #ffe8a6 0%, transparent 56%),
    linear-gradient(150deg, #d0a248 8%, #a97527 55%, #76501d 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 242, 197, 0.74),
    inset 0 -3px 4px rgba(101, 66, 21, 0.7),
    0 6px 14px rgba(40, 4, 8, 0.55);
  backface-visibility: hidden;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.wax-seal:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.wax-seal-face {
  width: 79%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px double #f4d385;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 26%, #d5af61, #a16e25 75%);
  box-shadow: 0 1px 2px #78521c, inset 0 1px 3px #78521c;
}

.wax-seal-character {
  color: #fff0b5;
  font-family: "PingFang SC", "Noto Serif CJK SC", serif;
  font-size: clamp(1.6rem, 7.5vw, 2rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 -1px #fff7da, 0 2px 1px #78501d;
}

.wax-seal-cue {
  position: absolute;
  top: calc(57.4% + var(--wax-seal-size) / 2 + 0.16rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.wax-seal-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #f6e0a8;
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0.92;
  text-shadow: 0 1px 4px rgba(24, 3, 6, 0.75);
}

.wax-seal-chevron {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 0.55rem;
  color: #f6e0a8;
  opacity: 0.88;
}

.wax-seal-chevron::before {
  content: '';
  width: 0.36rem;
  height: 0.36rem;
  border-right: 1.25px solid currentColor;
  border-bottom: 1.25px solid currentColor;
  transform: rotate(45deg);
}

.envelope-container.is-open .wax-seal-cue {
  opacity: 0;
  visibility: hidden;
}

.envelope-container.is-open .envelope-hinge {
  transform: rotateX(176deg);
  z-index: 5;
}

.envelope-container.is-open .wax-seal {
  pointer-events: none;
}

.envelope-container.is-open .wax-seal-chevron {
  visibility: hidden;
}

.envelope-container.is-open .inner-invitation-card {
  transform: translateY(-30%);
  box-shadow: 0 24px 45px -12px rgba(45, 10, 16, 0.38), 0 0 0 1px rgba(197, 160, 89, 0.38);
  z-index: 15;
}

.sparkle-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -10px 0 0 -10px;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) 0.38s, opacity 0.65s ease 0.38s;
}

.envelope-container.is-open~.sparkle-1 {
  opacity: 0.95;
  transform: translate(-70px, -180px) scale(1) rotate(-15deg);
}

.envelope-container.is-open~.sparkle-2 {
  opacity: 0.95;
  transform: translate(75px, -195px) scale(0.95) rotate(20deg);
}

.envelope-container.is-open~.sparkle-3 {
  opacity: 0.85;
  transform: translate(-95px, -120px) scale(1.1) rotate(35deg);
}

.envelope-container.is-open~.sparkle-4 {
  opacity: 0.95;
  transform: translate(98px, -130px) scale(1.05) rotate(-30deg);
}

.envelope-container.is-open~.sparkle-5 {
  opacity: 0.95;
  transform: translate(0, -215px) scale(1.2) rotate(12deg);
}

.envelope-flower-burst {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 30;
  pointer-events: none;
}

.envelope-flower-burst span {
  position: absolute;
  width: 0.65rem;
  height: 0.9rem;
  border-radius: 80% 12% 75% 32%;
  background: linear-gradient(140deg, #ffe2e6, #cc657e);
  opacity: 0;
}

.envelope-flower-burst span:nth-child(even) {
  background: linear-gradient(140deg, #fff4d9, #e8ae88);
}

.envelope-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.envelope-poem {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.05rem, 3.8vw, 1.18rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--wine);
}

.gate-event {
  margin: 0.1rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--wine);
}

.gate-event-sub {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ==========================================================================
   FLOATING MUSIC BUTTON (TOP-RIGHT) + PETALS + QUICK ACTIONS
   ========================================================================== */

.petal-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.petal {
  position: fixed;
  pointer-events: none;
  z-index: 45;
  background: radial-gradient(ellipse at 30% 20%, #fff2f4 10%, #f4b4bd 55%, #df8d99 100%);
  border-radius: 80% 0 80% 20%;
  opacity: 0;
  animation: fallPetal linear both;
}

@keyframes fallPetal {
  0% {
    transform: translate(0, -10vh) rotate(0deg);
    opacity: 0;
  }

  15% {
    opacity: 0.85;
  }

  85% {
    opacity: 0.7;
  }

  100% {
    transform: translate(80px, 110vh) rotate(380deg);
    opacity: 0;
  }
}

.invitation-auto-scrolling {
  overflow-anchor: none;
}

.invitation-auto-scrolling .petal {
  animation-play-state: paused;
}

/* Floating Vertical Glass Pill Dock (Bottom-Right: Music over Section Menu) */
.invitation-actions {
  position: fixed;
  z-index: 60;
  inset: auto max(0.875rem, env(safe-area-inset-right, 0px)) max(0.875rem, env(safe-area-inset-bottom, 0px)) auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.22rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(104, 31, 48, 0.34);
  background: rgba(104, 31, 48, 0.16);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0 6px 18px rgba(104, 31, 48, 0.12);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.invitation-actions:hover,
.invitation-actions:has(.invitation-actions-menu[open]) {
  background: rgba(104, 31, 48, 0.28);
  border-color: rgba(104, 31, 48, 0.52);
}

.invitation-actions[inert] {
  display: none;
}

.invitation-actions-menu {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-block-start: 0.2rem;
  padding-block-start: 0.2rem;
  border-top: 1px solid rgba(104, 31, 48, 0.24);
}

.invitation-actions-menu.is-off-cover-hidden {
  display: none;
}

.top-music-btn {
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--wine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.2s ease;
}

.top-music-btn:hover {
  background: rgba(104, 31, 48, 0.1);
}

.top-music-btn:active {
  transform: scale(0.9);
}

.top-music-btn:focus:not(:focus-visible) {
  outline: none;
}

.top-music-btn[hidden] {
  display: none;
}

.music-bars {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 16px;
}

.top-music-btn[aria-pressed="true"] .music-bars {
  display: inline-flex;
}

.top-music-btn[aria-pressed="true"] .top-music-icon {
  display: none;
}

.top-music-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.soundbar {
  display: inline-block;
  width: 2.5px;
  background: var(--wine);
  border-radius: 2px;
  animation: soundwave 1.1s ease-in-out infinite;
}

.soundbar:nth-child(1) {
  height: 8px;
  animation-delay: 0.1s;
}

.soundbar:nth-child(2) {
  height: 14px;
  animation-delay: 0.3s;
}

.soundbar:nth-child(3) {
  height: 10px;
  animation-delay: 0.15s;
}

@keyframes soundwave {

  0%,
  100% {
    transform: scaleY(0.45);
  }

  50% {
    transform: scaleY(1.1);
  }
}

.invitation-actions-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  list-style: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.16s ease;
}

.invitation-actions-trigger:hover {
  background: rgba(104, 31, 48, 0.1);
}

.invitation-actions-trigger:active {
  transform: scale(0.9);
}

.invitation-actions-trigger:focus:not(:focus-visible) {
  outline: none;
}

.invitation-actions-trigger .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}

.invitation-actions-menu[open] .invitation-actions-trigger {
  background: var(--wine);
  color: var(--gold-light);
}

.invitation-actions-trigger::-webkit-details-marker {
  display: none;
}

.toc-icon-close {
  display: none;
}

.invitation-actions-menu[open] .toc-icon-open {
  display: none;
}

.invitation-actions-menu[open] .toc-icon-close {
  display: inline-flex;
}

.invitation-actions-panel {
  position: absolute;
  inset: auto 0 calc(100% + 0.65rem) auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 14.75rem;
  max-width: calc(100vw - 2rem);
  padding: 0.55rem;
  border: 1px solid rgba(184, 138, 68, 0.45);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 40px rgba(45, 16, 22, 0.22);
}

.toc-panel-title {
  padding: 0.3rem 0.65rem 0.45rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid rgba(184, 138, 68, 0.24);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 38px;
  padding: 0.35rem 0.6rem;
  border-radius: 11px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.toc-link:hover {
  background: var(--wine-soft);
  color: var(--wine);
}

.toc-link-icon {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--paper-alt);
  color: var(--wine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.toc-link-icon .material-symbols-outlined {
  font-size: 1rem;
  line-height: 1;
}

.toc-link:hover .toc-link-icon {
  background: var(--wine);
  color: var(--gold-light);
}

.toc-link--accent {
  margin-top: 0.15rem;
  background: var(--wine);
  color: #fff8ee;
}

.toc-link--accent:hover {
  background: var(--wine-dark);
  color: #fff8ee;
}

.toc-link--accent .toc-link-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--gold-light);
}

.toc-link--accent:hover .toc-link-icon {
  background: rgba(255, 255, 255, 0.22);
  color: var(--gold-light);
}

/* ==========================================================================
   SECTION 01: HERO COVER
   ========================================================================== */

.hero-section {
  position: relative;
  width: 100%;
  overflow: clip;
  background: var(--wine-deep);
  color: #fff8ee;
}

#hero:focus {
  outline: none;
}

.cover-layout {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-photo picture,
.cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(28, 12, 16, 0.18) 0%,
      rgba(28, 12, 16, 0.04) 36%,
      rgba(28, 12, 16, 0.56) 68%,
      rgba(28, 12, 16, 0.9) 100%);
  pointer-events: none;
}

.cover-zoom-button {
  position: absolute;
  inset-block-start: max(1rem, env(safe-area-inset-top, 0px));
  inset-inline-start: max(1rem, env(safe-area-inset-left, 0px));
  z-index: 10;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(36, 17, 22, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff6e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.cover-zoom-button:hover {
  background: rgba(104, 31, 48, 0.8);
}

.cover-zoom-button .material-symbols-outlined {
  font-size: 1.2rem;
}

.cover-caption {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.25rem calc(4.25rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.cover-eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.cover-names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 4.35rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: #fff8ee;
  text-shadow: 0 2px 14px rgba(20, 8, 12, 0.48);
}

.cover-names>span {
  display: inline-block;
  white-space: nowrap;
}

.cover-amp {
  font-family: var(--font-script);
  font-size: 0.82em;
  color: var(--gold-light);
  margin-inline: 0.12em;
}

.cover-date-wrap {
  margin-top: 0.9rem;
  padding-block: 0.6rem;
  padding-inline: 1.25rem;
  border-block: 1px solid rgba(231, 203, 146, 0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.cover-date {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3.8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #fff8ee;
}

.cover-date-sub {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #f4dfc0;
}

.cover-quote {
  margin: 1rem 0 0;
  max-width: 24rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255, 245, 232, 0.92);
  text-shadow: 0 1px 10px rgba(20, 8, 12, 0.45);
}

.cover-scroll-button {
  position: absolute;
  z-index: 3;
  bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  inset-inline: 0;
  margin-inline: auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(231, 203, 146, 0.35);
  border-radius: 50%;
  background: rgba(36, 17, 22, 0.42);
  color: #fff7e9;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cover-scroll-button:hover {
  background: var(--wine);
  transform: translateY(2px);
}

/* ==========================================================================
   SECTION 02: GRAND INVITATION SHEET (Cách 3), LỊCH TRÌNH & ĐẾM NGƯỢC
   ========================================================================== */

.invitation-sheet {
  width: 100%;
  padding: clamp(1.75rem, 4.4vw, 3rem) clamp(1rem, 4vw, 3.25rem) clamp(1.65rem, 4vw, 2.85rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 1.9rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 203, 146, 0.16) 0%, transparent 46%),
    var(--card);
}

.invitation-sheet .invitation-intro {
  max-width: 38rem;
}

.invitation-ln-logo {
  width: clamp(5.75rem, 18vw, 7.75rem);
  height: auto;
  margin-top: 0.25rem;
}

.invitation-sheet-rule {
  width: min(100%, 44rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.45) 22%, rgba(184, 138, 68, 0.45) 78%, transparent);
}

.invitation-sheet-rule--sm {
  width: min(100%, 26rem);
  opacity: 0.72;
}

.families-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.5rem minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(0.5rem, 3vw, 2.5rem);
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
}

.family-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.family-divider {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.family-divider::before,
.family-divider::after {
  content: '';
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(184, 138, 68, 0.5));
}

.family-divider::after {
  background: linear-gradient(180deg, rgba(184, 138, 68, 0.5), transparent);
}

.family-divider-mark {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  line-height: 1;
}

.family-role {
  font-family: var(--font-sans);
  font-size: clamp(0.66rem, 1.8vw, 0.76rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 0.22rem;
}

.family-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 3.2vw, 1.42rem);
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
}

.family-address {
  margin: 0.22rem 0 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(0.76rem, 2vw, 0.9rem);
  color: var(--ink-soft);
}

/* Equal-scale Portraits */
.couple-portraits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 5.5vw, 4.25rem);
  padding-block: 0.25rem;
}

.portrait-pill {
  background: none;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.portrait-ring {
  width: clamp(6.5rem, 25vw, 10rem);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--wine), var(--gold));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: block;
}

.portrait-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--paper);
  object-fit: cover;
  transition: transform 0.45s ease;
}

.portrait-img--groom {
  object-position: center 12%;
}

.portrait-img--bride {
  object-position: center 15%;
}

.portrait-pill:hover .portrait-img {
  transform: scale(1.06);
}

.portrait-role {
  margin-top: 0.25rem;
  font-family: var(--font-sans);
  font-size: clamp(0.68rem, 1.8vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.portrait-name {
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 3.8vw, 1.9rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--wine);
  line-height: 1.2;
}

.couple-medallion {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--wine);
  border: 2px solid var(--gold-light);
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-seal);
  flex-shrink: 0;
  margin-bottom: 2.2rem;
}

/* Schedule + Calendar Balanced Grid */
.schedule-calendar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
}

.schedule-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-inline-size: 0;
}

.schedule-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.35rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 203, 146, 0.14) 0%, transparent 55%),
    var(--card);
  border-color: rgba(184, 138, 68, 0.42);
  overflow: hidden;
}

.schedule-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.schedule-script {
  font-family: var(--font-script);
  font-size: 1.85rem;
  line-height: 1.1;
  color: var(--gold-ink);
}

.schedule-card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--wine);
}

.schedule-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  flex: 1;
  justify-content: center;
}

.schedule-event-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.schedule-event-block h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.ceremonial-date {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 19.5rem;
  margin-block: 0.1rem;
}

.ceremonial-side {
  padding-block: 0.35rem;
  border-block: 1px solid rgba(184, 138, 68, 0.38);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.ceremonial-day {
  font-family: var(--font-serif);
  font-size: 2.65rem;
  font-weight: 600;
  line-height: 0.95;
  color: var(--wine);
  padding-inline: 0.2rem;
}

.schedule-meta {
  margin: 0.1rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.schedule-meta .material-symbols-outlined {
  font-size: 1rem;
  color: var(--gold-ink);
}

.schedule-venue-btn {
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(184, 138, 68, 0.48);
  background: var(--paper);
  color: var(--wine);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.schedule-venue-btn:hover {
  background: var(--wine-soft);
  border-color: var(--wine);
}

.schedule-venue-btn:active {
  transform: scale(0.97);
}

.schedule-venue-btn .material-symbols-outlined {
  font-size: 1rem;
  color: var(--wine);
}

.schedule-ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 15rem;
  margin-block: 0.1rem;
}

.schedule-ornament-divider>span:first-child,
.schedule-ornament-divider>span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.55));
}

.schedule-ornament-divider>span:last-child {
  transform: scaleX(-1);
}

.schedule-ornament-seal {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--wine-soft);
  border: 1px solid rgba(184, 138, 68, 0.5);
  color: var(--wine);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.schedule-note {
  margin: 0.1rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--gold-ink);
}

/* Countdown Card */
.countdown-card {
  text-align: center;
  padding-block: 1.25rem;
}

.countdown-label {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold-ink);
}

.countdown-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.countdown-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.25rem;
  border: 1px solid rgba(184, 138, 68, 0.45);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #7c263b, var(--wine));
  box-shadow: 0 6px 14px rgba(104, 31, 48, 0.18);
}

.countdown-number {
  color: #fff8ee;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Calendar Card */
.wedding-calendar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  overflow: hidden;
}

.calendar-table {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.calendar-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calendar-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  padding-bottom: 0.45rem;
}

.calendar-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vw, 1.85rem);
  font-weight: 500;
  color: var(--wine);
  letter-spacing: 0.04em;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  align-items: center;
}

.calendar-weekdays {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--paper-alt);
}

.calendar-days {
  row-gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  padding-block: 0.25rem;
}

.calendar-weekdays .is-sunday,
.calendar-days .is-sunday {
  color: var(--wine);
  font-weight: 600;
}

.calendar-days .is-muted {
  color: #bfb5a6;
  font-weight: 400;
}

.calendar-event {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.05rem;
  width: 2.35rem;
  height: 2.35rem;
  margin-inline: auto;
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
}

.calendar-event-party {
  background: var(--gold-soft);
  color: var(--wine);
  border: 1.5px solid var(--gold);
}

.calendar-event-procession {
  background: var(--wine);
  color: #fff7ea;
  border: 1.5px solid var(--wine);
}

.calendar-event-procession .material-symbols-outlined {
  font-size: 0.7rem;
  color: var(--gold-light);
  font-variation-settings: "FILL" 1;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding-block: 0.65rem;
  border-block: 1px solid var(--paper-alt);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot--party {
  background: var(--gold-soft);
  border: 1.5px solid var(--gold);
}

.legend-dot--procession {
  background: var(--wine);
}

/* ==========================================================================
   SECTION 03: LOVE STORY (1-column left rail on Mobile, alternating on Desktop)
   ========================================================================== */

.story-timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.story-timeline::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 1.1rem;
  width: 1.5px;
  background: linear-gradient(180deg, rgba(184, 138, 68, 0.15), rgba(184, 138, 68, 0.65) 15%, rgba(184, 138, 68, 0.65) 85%, rgba(184, 138, 68, 0.15));
}

.story-item {
  position: relative;
  padding-inline-start: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.story-node {
  position: absolute;
  left: 0;
  top: 0.35rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--wine);
  border: 2px solid var(--gold-light);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-seal);
}

.story-node .material-symbols-outlined {
  font-size: 1rem;
}

.story-node--gold {
  background: linear-gradient(145deg, #e5c37a, var(--gold));
  border-color: var(--wine);
  color: var(--wine-dark);
}

.story-node-char {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.story-text {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-card);
}

.story-date {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--wine-soft);
  border: 1px solid var(--wine-border);
  color: var(--wine);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.story-date--gold {
  background: var(--gold-soft);
  border-color: rgba(184, 138, 68, 0.45);
  color: var(--gold-ink);
}

.story-text h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--wine);
  line-height: 1.2;
}

.story-text p {
  margin: 0.4rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.story-media {
  width: 100%;
}

.story-photo {
  width: 100%;
  padding: 0.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: zoom-in;
  display: block;
}

.story-photo--landscape {
  aspect-ratio: 3 / 2;
}

.story-photo--portrait {
  aspect-ratio: 4 / 5;
}

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px);
  transition: transform 0.5s ease;
}

.story-photo:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   SECTION 04: VENUE (Tabs on Mobile, 2-Column Side-by-Side on Desktop)
   ========================================================================== */

.venue-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.venue-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.venue-tab {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.venue-tab.is-active {
  background: var(--wine);
  color: #fff8ee;
  box-shadow: var(--shadow-seal);
}

.venue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.venue-card {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.venue-card.is-visible {
  display: flex;
}

.venue-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.venue-head-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.venue-head-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.venue-seal {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--wine);
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.venue-seal--gold {
  background: var(--gold-soft);
  color: var(--wine);
  border: 1px solid rgba(184, 138, 68, 0.55);
}

.venue-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.2vw, 1.48rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

.venue-time-pill {
  padding: 0.22rem 0.68rem;
  border-radius: var(--radius-pill);
  background: var(--wine-soft);
  border: 1px solid var(--wine-border);
  color: var(--wine);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
}

.venue-address {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.venue-address .material-symbols-outlined {
  color: var(--wine);
  font-size: 1.2rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.venue-map {
  width: 100%;
  margin-top: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--paper-alt);
}

.venue-map iframe {
  width: 100%;
  height: 210px;
  border: 0;
}

/* ==========================================================================
   SECTION 05: GALLERY (Featured Slideshow + Orientation-Aware Editorial Grid)
   ========================================================================== */

.gallery-showcase {
  width: 100%;
  max-width: 54rem;
  margin-inline: auto;
  padding: clamp(0.75rem, 2.2vw, 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.slideshow-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background: var(--wine-deep);
  cursor: zoom-in;
  user-select: none;
}

.slideshow-backdrop {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(24px) brightness(0.42) saturate(0.95);
  transform: scale(1.05);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.slideshow-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.45s ease;
}

.slideshow-scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(24, 10, 14, 0.78));
  pointer-events: none;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(24, 10, 14, 0.48);
  backdrop-filter: blur(6px);
  color: #fff8ee;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.slideshow-nav:hover {
  background: var(--wine);
}

.slideshow-nav:active {
  transform: translateY(-50%) scale(0.92);
}

.slideshow-nav--prev {
  left: 0.75rem;
}

.slideshow-nav--next {
  right: 0.75rem;
}

.slideshow-overlay-caption {
  position: absolute;
  inset: auto 1rem 0.9rem 1rem;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  color: #fff8ee;
  pointer-events: none;
}

.slideshow-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.slideshow-title {
  margin: 0.15rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  font-weight: 500;
  line-height: 1.25;
}

.slideshow-zoom-pill {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(24, 10, 14, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.slideshow-zoom-pill .material-symbols-outlined {
  font-size: 1.1rem;
}

.slideshow-progress-track {
  width: 100%;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--paper-alt);
  overflow: hidden;
}

.slideshow-progress-fill {
  height: 100%;
  width: 0;
  background: var(--wine);
  transition: width 0.08s linear;
}

.slideshow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-inline: 0.25rem;
}

.slideshow-counter {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
}

.slideshow-play-btn,
.slideshow-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.slideshow-play-btn:hover,
.slideshow-all-btn:hover {
  border-color: var(--wine);
  color: var(--wine);
  background: var(--wine-soft);
}

.slideshow-play-btn .material-symbols-outlined {
  font-size: 1rem;
}

/* Editorial Photo Grid (zero-orphan 2-col mobile + 3-col desktop) */
.gallery-editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.65rem, 2vw, 1.15rem);
  width: 100%;
}

.gallery-tile {
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.gallery-tile--portrait {
  aspect-ratio: 2 / 3;
}

.gallery-tile--landscape {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-tile:hover img {
  transform: scale(1.04);
}

.gallery-tile-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 0.75rem 0.65rem;
  background: linear-gradient(180deg, transparent, rgba(24, 10, 14, 0.72));
  color: #fff8ee;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.25;
  pointer-events: none;
}

/* ==========================================================================
   SECTION 06: GIFT BOX TRIGGER (1 Elegant Box -> Opens Dual-Person Popup)
   ========================================================================== */

.gift-trigger-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.gift-box-trigger {
  width: 100%;
  max-width: 24.5rem;
  padding: clamp(1.75rem, 4.5vw, 2.35rem) clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  cursor: pointer;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gift-box-trigger:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(184, 138, 68, 0.75);
}

.gift-box-emblem {
  width: 4.35rem;
  height: 4.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #85283d, var(--wine) 68%, var(--wine-deep));
  border: 2px solid rgba(231, 203, 146, 0.75);
  box-shadow: 0 0 0 5px rgba(184, 138, 68, 0.14), 0 10px 24px rgba(104, 31, 48, 0.24);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  margin-bottom: 0.15rem;
  transition: transform 0.25s ease;
}

.gift-box-trigger:hover .gift-box-emblem {
  transform: scale(1.06);
}

.gift-box-emblem .material-symbols-outlined {
  font-size: 2rem;
}

.gift-box-avatars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.gift-box-avatars img {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2.5px solid var(--card);
  box-shadow: 0 3px 10px rgba(52, 24, 28, 0.14);
}

.gift-box-avatars img:last-child {
  margin-inline-start: -0.65rem;
}

.gift-box-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 1.7rem);
  font-weight: 500;
  color: var(--wine);
  line-height: 1.2;
}

.gift-box-sub {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: -0.25rem;
}

.gift-box-cta {
  margin-top: 0.55rem;
  padding-inline: 1.5rem;
  pointer-events: none;
}

.gift-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.gift-tab {
  min-height: 40px;
  padding-inline: 0.65rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.gift-tab.is-active {
  background: var(--wine);
  color: #fff8ee;
  box-shadow: var(--shadow-seal);
}

.gift-bank-name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  line-height: 1.25;
}

.gift-account-number {
  margin: 0.08rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--wine);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.gift-holder {
  margin: 0.06rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.gift-divider {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 0.5rem;
}

.gift-divider-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(184, 138, 68, 0.52), transparent);
}

.gift-divider-mark {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid rgba(184, 138, 68, 0.45);
  color: var(--wine);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   SECTION 07: UNIFIED RSVP & GUESTBOOK (2-Column Side-by-Side on Desktop)
   ========================================================================== */

.rsvp-guestbook-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.form-card-head--between {
  justify-content: space-between;
}

.form-card-head-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.form-card-head h3 {
  margin: 0.1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--wine);
  line-height: 1.2;
}

.wishes-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--paper-alt);
  border: 1px solid var(--border);
  color: var(--wine);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
}

.wishes-counter .material-symbols-outlined {
  font-size: 1rem;
}

.inv-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field-group,
.field-fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}

.field-input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid #d4c5af;
  background: var(--paper);
  color: var(--ink);
  font-size: max(1rem, 1em);
  line-height: 1.45;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-input:focus {
  border-color: var(--wine);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(104, 31, 48, 0.12);
  outline: none;
}

.field-input:user-invalid {
  border-color: #b51e47;
}

.field-input--short {
  max-width: 7rem;
}

.field-textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.radio-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.radio-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(184, 138, 68, 0.36);
  background: rgba(251, 247, 239, 0.78);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.radio-card input[type="radio"] {
  accent-color: var(--wine);
  color: var(--wine);
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
}

.radio-card:has(input:checked) {
  background: var(--wine-soft);
  border-color: var(--wine);
  color: var(--wine);
  font-weight: 600;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.form-status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--wine);
  font-weight: 500;
}

.rsvp-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--wine-soft);
  border: 1px solid var(--wine-border);
}

.rsvp-confirmation-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--wine);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-seal);
}

.rsvp-confirmation h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wine);
}

.rsvp-confirmation p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 24rem;
}

/* ==========================================================================
   RSVP BURGUNDY VELVET HIGHLIGHT CARD (Cách 1)
   ========================================================================== */

.rsvp-velvet-card {
  background: radial-gradient(circle at 50% 0%, #80273c 0%, var(--wine) 52%, var(--wine-deep) 100%);
  border-color: rgba(231, 203, 146, 0.45);
  box-shadow: 0 22px 48px rgba(74, 18, 32, 0.26);
  color: #fff8ee;
  padding: clamp(1.65rem, 4.2vw, 2.35rem) clamp(1.35rem, 3.8vw, 2rem);
}

.rsvp-velvet-card::after {
  border-color: rgba(231, 203, 146, 0.34);
}

.rsvp-velvet-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.rsvp-velvet-crest {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  background: rgba(231, 203, 146, 0.14);
  border: 1.5px solid rgba(231, 203, 146, 0.65);
  box-shadow: 0 0 0 4px rgba(231, 203, 146, 0.08);
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
}

.rsvp-velvet-script {
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  font-weight: 400;
  color: var(--gold-light);
  line-height: 1.15;
}

.rsvp-velvet-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.4vw, 1.95rem);
  font-weight: 500;
  color: #fff9f0;
  line-height: 1.18;
}

.rsvp-velvet-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: min(11rem, 58%);
  margin-block: 0.45rem;
}

.rsvp-velvet-divider>span:first-child,
.rsvp-velvet-divider>span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 203, 146, 0.58));
}

.rsvp-velvet-divider>span:last-child {
  transform: scaleX(-1);
}

.rsvp-velvet-divider .flourish-mark {
  color: var(--gold-light);
  font-size: 0.9rem;
}

.rsvp-velvet-intro {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.5;
  color: rgba(255, 245, 232, 0.84);
  max-width: 24rem;
}

.rsvp-velvet-card .field-label {
  color: #f6e6c6;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.rsvp-velvet-card .field-input {
  background: rgba(255, 250, 242, 0.1);
  border: 1px solid rgba(231, 203, 146, 0.36);
  color: #fffaf2;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.rsvp-velvet-card .field-input::placeholder {
  font-style: italic;
  color: rgba(255, 240, 218, 0.55);
}

.rsvp-velvet-card .field-input:focus {
  background: rgba(255, 250, 242, 0.16);
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(231, 203, 146, 0.22);
}

.rsvp-velvet-card input:-webkit-autofill,
.rsvp-velvet-card input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #5e1d2d inset;
  -webkit-text-fill-color: #fffaf2;
  caret-color: #fffaf2;
  transition: background-color 9999s ease-in-out 0s;
}

.rsvp-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.rsvp-choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.3rem;
  min-height: 4.5rem;
  padding: 0.75rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(231, 203, 146, 0.34);
  background: rgba(255, 250, 242, 0.08);
  color: rgba(255, 248, 238, 0.92);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.rsvp-choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.rsvp-choice-icon {
  font-size: 1.35rem;
  color: var(--gold-light);
  transition: color 0.2s ease, transform 0.2s ease;
}

.rsvp-choice-text {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.25;
}

.rsvp-choice-card:hover {
  background: rgba(255, 250, 242, 0.14);
  border-color: rgba(231, 203, 146, 0.65);
}

.rsvp-choice-card:has(input:focus-visible) {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.rsvp-choice-card:has(input:checked) {
  background: linear-gradient(135deg, #f5dfa8 0%, #e4c178 100%);
  border-color: #fff3d2;
  color: var(--wine-deep);
  box-shadow: 0 10px 24px rgba(24, 6, 10, 0.3);
  transform: translateY(-1px);
}

.rsvp-choice-card:has(input:checked) .rsvp-choice-icon {
  color: var(--wine);
  font-variation-settings: "FILL" 1;
}

.rsvp-choice-card:has(input:checked) .rsvp-choice-text {
  font-weight: 600;
}

.rsvp-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, 0.08);
  border: 1px solid rgba(231, 203, 146, 0.32);
}

.rsvp-stepper-label-group {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.rsvp-stepper-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(255, 240, 218, 0.66);
}

.rsvp-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem;
  border-radius: var(--radius-pill);
  background: rgba(36, 9, 16, 0.36);
  border: 1px solid rgba(231, 203, 146, 0.36);
}

.rsvp-stepper-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(231, 203, 146, 0.42);
  background: rgba(255, 250, 242, 0.1);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.rsvp-stepper-btn:hover:not(:disabled) {
  background: var(--gold-light);
  color: var(--wine-deep);
}

.rsvp-stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rsvp-stepper-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

.rsvp-stepper-input {
  width: 2.5rem;
  border: 0;
  background: transparent;
  color: #fff9f0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  -moz-appearance: textfield;
}

.rsvp-stepper-input::-webkit-inner-spin-button,
.rsvp-stepper-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rsvp-stepper-input:focus {
  outline: none;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.78rem 1.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid #fae8bc;
  background: linear-gradient(135deg, #f4dda2 0%, #deb668 100%);
  color: var(--wine-deep);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22, 6, 10, 0.32);
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-gold:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(22, 6, 10, 0.38);
}

.btn-gold:active {
  transform: scale(0.985);
}

.btn-gold:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-gold .material-symbols-outlined {
  font-size: 1.15rem;
}

.rsvp-velvet-card .form-status {
  color: var(--gold-light);
  text-align: center;
}

.rsvp-velvet-card .rsvp-confirmation {
  background: rgba(255, 250, 242, 0.08);
  border-color: rgba(231, 203, 146, 0.36);
}

.rsvp-velvet-card .rsvp-confirmation-icon {
  background: linear-gradient(135deg, #f4dda2, #deb668);
  color: var(--wine-deep);
}

.rsvp-velvet-card .rsvp-confirmation h4 {
  color: #fff9f0;
}

.rsvp-velvet-card .rsvp-confirmation p {
  color: rgba(255, 245, 232, 0.84);
}

/* ==========================================================================
   RESTORED PRE-CHAT LOVE STORY & GALLERY STYLES + REDESIGNED GUESTBOOK
   ========================================================================== */

.story-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.65rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--wine);
  line-height: 1.18;
}

.story-legacy-wrap {
  width: 100%;
  max-width: 47rem;
  margin-inline: auto;
  gap: 0.75rem;
}

.story-row + .story-row {
  margin-top: clamp(-1.35rem, -3vw, -0.75rem);
}

.story-photo-card {
  aspect-ratio: 4 / 5;
}

.story-milestone-text {
  gap: 0.15rem;
}

.story-chapter-num {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 8.5vw, 3.85rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.04em;
  color: rgba(184, 138, 68, 0.28);
  margin-bottom: 0.15rem;
  user-select: none;
}

.story-pill {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--wine);
  color: #f5dfa8;
  font-family: var(--font-sans);
  font-size: clamp(0.64rem, 1.9vw, 0.72rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.story-pill--gold {
  background: var(--gold-soft);
  color: var(--wine);
  border: 1px solid rgba(184, 138, 68, 0.45);
}

.story-item-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.22rem, 3.8vw, 1.65rem);
  color: var(--wine);
  line-height: 1.2;
}

.story-item-script {
  font-family: var(--font-script);
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--gold-ink);
  margin-top: 0.1rem;
}

.story-item-flourish {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  color: var(--gold);
  font-size: 0.8rem;
}

.story-item-flourish > span {
  display: inline-block;
  width: clamp(2rem, 7vw, 3.5rem);
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 138, 68, 0.58), transparent);
}

.story-item-flourish--right > span {
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.58));
}

@media (min-width: 48rem) {
  .story-legacy-wrap {
    gap: 0;
  }

  .story-row + .story-row {
    margin-top: -3.25rem;
  }
}

.story-item-desc {
  margin: 0.3rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.78rem, 2.3vw, 0.94rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.story-mid-node {
  position: relative;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #83293e, var(--wine));
  border: 2px solid var(--gold-light);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-seal);
  flex-shrink: 0;
}

.story-mid-node--gold {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(145deg, #f3d488, var(--gold));
  border-color: var(--wine);
  color: var(--wine-dark);
}

/* Restored Gallery Helpers */
.slideshow-arch-card {
  --arch-top: clamp(4.75rem, 18vw, 7.75rem);
  border-radius: var(--arch-top) var(--arch-top) 1.25rem 1.25rem;
}

.slideshow-arch-viewport {
  border-radius: calc(var(--arch-top) - 0.95rem) calc(var(--arch-top) - 0.95rem) 0.75rem 0.75rem;
}

.slideshow-arch-stage {
  border-radius: calc(var(--arch-top) - 1.35rem) calc(var(--arch-top) - 1.35rem) 0.5rem 0.5rem;
}

.slide-fade {
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-film {
  min-width: 0;
}

.scroll-filmstrip {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #b88a71 transparent;
}

.scroll-filmstrip>div {
  scroll-snap-align: center;
  width: clamp(9.5rem, 60vw, 13.75rem);
}

.portrait-collage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  padding: 0.375rem 0.5rem 0.75rem;
}

.portrait-collage-bride {
  grid-area: 1 / 1 / 2 / 8;
}

.portrait-collage-groom {
  grid-area: 1 / 6 / 2 / -1;
  margin-top: clamp(1.25rem, 5vw, 2.5rem);
}

/* Ensure HTML [hidden] always hides even on flex/inline-flex components */
[hidden] {
  display: none !important;
}

/* Redesigned Luxury Keepsake Guestbook (Twin to Burgundy Velvet RSVP) */
.guestbook-stationery {
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 203, 146, 0.14) 0%, transparent 48%),
    var(--card);
  border: 1px solid rgba(184, 138, 68, 0.42);
  padding: clamp(1.65rem, 4.2vw, 2.35rem) clamp(1.35rem, 3.8vw, 2rem);
}

.guestbook-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.guestbook-crest {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  background: var(--wine-soft);
  border: 1.5px solid rgba(184, 138, 68, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 138, 68, 0.08);
  color: var(--wine);
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
}

.guestbook-crest .material-symbols-outlined {
  font-size: 1.2rem;
  font-variation-settings: "FILL" 1;
}

.guestbook-script {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--gold-ink);
}

.guestbook-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.4vw, 1.95rem);
  font-weight: 500;
  color: var(--wine);
  line-height: 1.18;
}

.guestbook-head-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: min(11rem, 58%);
  margin-block: 0.45rem;
}

.guestbook-head-divider>span:first-child,
.guestbook-head-divider>span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.52));
}

.guestbook-head-divider>span:last-child {
  transform: scaleX(-1);
}

.guestbook-head-divider .flourish-mark {
  color: var(--gold);
  font-size: 0.9rem;
}

.guestbook-intro {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.04rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 24rem;
}

.field-input--stationery {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  background: #fbf7ef;
  border-color: rgba(184, 138, 68, 0.36);
}

.field-input--stationery::placeholder {
  font-style: italic;
  color: #9c8c80;
}

.guestbook-stationery input:-webkit-autofill,
.guestbook-stationery input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fbf7ef inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}

.wish-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.wish-chip {
  padding: 0.3rem 0.72rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(184, 138, 68, 0.35);
  background: rgba(251, 247, 239, 0.9);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wish-chip:hover {
  background: var(--wine-soft);
  border-color: var(--wine);
  color: var(--wine);
}

.guestbook-status {
  text-align: center;
  min-height: 0;
}

.guestbook-status:empty {
  display: none;
}

/* Feed Header Bar */
.guestbook-feed-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(184, 138, 68, 0.28);
}

.guestbook-feed-title {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.guestbook-feed-head .wishes-counter {
  padding: 0.25rem 0.68rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--wine-soft);
  border-color: var(--wine-border);
}

.guestbook-feed-head .wishes-counter strong {
  font-weight: 700;
}

.guestbook-feed-head .wishes-counter .material-symbols-outlined {
  font-size: 0.88rem;
  font-variation-settings: "FILL" 1;
}

/* Guestbook List (Clean Editorial Keepsake Entries) */
.guestbook-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wish-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(184, 138, 68, 0.24);
  background: linear-gradient(180deg, #fffdf9 0%, #fbf6ed 100%);
  padding: 0.9rem 1.05rem;
  box-shadow: 0 3px 12px rgba(52, 24, 28, 0.04);
  overflow-wrap: break-word;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wish-card::after {
  content: '”';
  position: absolute;
  bottom: -0.55rem;
  right: 0.75rem;
  font-family: var(--font-display);
  font-size: 3.1rem;
  line-height: 1;
  color: rgba(184, 138, 68, 0.14);
  pointer-events: none;
}

.wish-card--editing {
  border-color: var(--wine);
  background: var(--wine-soft);
  box-shadow: 0 0 0 2px rgba(104, 31, 48, 0.1);
}

.wish-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.wish-author-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.38rem;
  min-inline-size: 0;
}

.wish-ornament {
  font-size: 0.65rem;
  color: var(--gold);
  line-height: 1;
  transform: translateY(-1px);
}

.wish-author {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--wine);
  line-height: 1.2;
}

.wish-date {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: #9b8a7d;
}

.wish-state {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-ink);
}

.wish-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.wish-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 28px;
  min-width: 28px;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(184, 138, 68, 0.26);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wish-action-btn:hover {
  background: var(--wine-soft);
  border-color: var(--wine-border);
  color: var(--wine);
}

.wish-action-btn[aria-pressed="true"] {
  background: var(--wine-soft);
  border-color: rgba(181, 30, 71, 0.3);
  color: #b51e47;
}

.wish-action-btn--icon {
  padding: 0;
  width: 28px;
  height: 28px;
}

.wish-message {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 0;
  padding-inline-start: 0.95rem;
  white-space: pre-wrap;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.04rem;
  line-height: 1.56;
  color: var(--ink);
}

.guestbook-more-btn {
  margin-top: 0.15rem;
}

.guestbook-footer-note {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(184, 138, 68, 0.2);
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   SECTION 08: FOOTER
   ========================================================================== */

.inv-footer {
  width: 100%;
  padding: clamp(2.85rem, 6.5vw, 4.25rem) var(--gutter);
  background: radial-gradient(circle at 50% 0%, #5b1828 0%, var(--wine-deep) 65%);
  color: #fff8ee;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-ln-logo {
  width: clamp(6.75rem, 20vw, 9.25rem);
  height: auto;
  margin-bottom: 0.15rem;
}

.footer-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.footer-title-group h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.footer-names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 7vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: #fff8ee;
}

.footer-amp {
  font-family: var(--font-script);
  font-size: 0.9em;
  color: var(--gold-light);
  margin-inline: 0.1em;
}

.footer-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: min(10.5rem, 52%);
  margin-block: 0.15rem;
}

.footer-divider > span:first-child,
.footer-divider > span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 203, 146, 0.55));
}

.footer-divider > span:last-child {
  transform: scaleX(-1);
}

.footer-divider .flourish-mark {
  color: var(--gold-light);
  font-size: 0.85rem;
}

.footer-thanks {
  margin: 0;
  max-width: 22rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.08rem, 3.2vw, 1.24rem);
  line-height: 1.5;
  color: rgba(255, 246, 234, 0.88);
  text-wrap: balance;
}

.footer-dates {
  margin: 0.4rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(231, 203, 146, 0.22);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  color: rgba(231, 203, 146, 0.78);
}

/* ==========================================================================
   NATIVE DIALOGS (QR MODAL & LIGHTBOX) — Modern Web Guidance Compliant
   ========================================================================== */

.inv-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff8ee;
  max-width: none;
  max-height: none;
}

.inv-dialog:not([open]) {
  display: none;
}

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

.inv-dialog::backdrop {
  background: rgba(22, 9, 13, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  overscroll-behavior: contain;
}

/* QR Gift Box Modal (Dual-Person Popup) */
.qr-dialog[open] {
  width: min(calc(100vw - 1.5rem), 25rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  overflow: visible;
}

.qr-dialog-card {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.45rem 1.35rem 1.35rem;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.dialog-close-btn {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper-alt);
  color: var(--wine);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dialog-close-btn:hover {
  background: var(--wine-soft);
}

.qr-dialog-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding-inline: 2rem;
}

.qr-dialog-script {
  font-size: clamp(1.35rem, 3.6vw, 1.65rem);
}

.qr-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  font-weight: 500;
  color: var(--wine);
  line-height: 1.15;
}

.qr-dialog-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 1.25rem;
}

.qr-person-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.qr-person-panel.is-visible {
  display: flex;
}

.qr-person-head {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
}

.qr-person-avatar {
  width: 3.15rem;
  height: 3.15rem;
  padding: 2.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine), var(--gold));
  flex-shrink: 0;
  display: block;
}

.qr-person-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--card);
  object-fit: cover;
  object-position: center 15%;
}

.qr-person-meta h3 {
  margin: 0.05rem 0 0;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}

.qr-dialog-frame {
  width: min(12.75rem, 62vw);
  aspect-ratio: 1;
  background: #ffffff;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(184, 138, 68, 0.45);
  box-shadow: 0 6px 18px rgba(52, 24, 28, 0.07);
}

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

.qr-dialog-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-person-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: auto;
}

.qr-action-btn {
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.qr-action-btn .material-symbols-outlined {
  font-size: 1rem;
}

.qr-dialog-toast {
  margin: 0;
  min-height: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--wine);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.qr-dialog-toast.is-shown {
  opacity: 1;
}

/* Restored Pre-Chat Lightbox Styles (explicit dark background so icons are crystal clear) */
#lightbox-modal {
  background-color: rgba(26, 12, 9, 0.94) !important;
  color: #fef9ee;
  border: 0;
}

#lightbox-modal::backdrop {
  background: rgba(18, 8, 6, 0.92);
}

#lightbox-modal.lightbox-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#lightbox-modal.lightbox-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Single-photo mode: only hide slideshow play button, prev/next arrows & slideshow hint */
#lightbox-modal.lightbox-single #lightbox-slideshow-btn,
#lightbox-modal.lightbox-single .lightbox-nav-btn,
#lightbox-modal.lightbox-single .lightbox-hint {
  display: none !important;
}

#lightbox-modal .lightbox-close-icon-btn {
  background-color: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

#lightbox-modal .lightbox-close-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.34);
}

#lightbox-modal .lightbox-stage {
  min-height: 0;
  max-width: 78rem;
}

#lightbox-modal .lightbox-content {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#lightbox-modal .lightbox-photo-frame {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #1a0c09;
}

#lightbox-modal #lightbox-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#lightbox-thumbnails {
  scrollbar-width: none;
}

#lightbox-thumbnails::-webkit-scrollbar {
  display: none;
}

.pb-safe {
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
}

/* Explicit Fine-Art Burgundy & Champagne utility classes for restored Gallery & Story */
.bg-\[\#2a1519\] {
  background-color: #2a1519;
}

.bg-\[\#f4ede2\] {
  background-color: #f4ede2;
}

.bg-\[\#fffdf9\] {
  background-color: #fffdf9;
}

.bg-\[\#681f30\] {
  background-color: #681f30;
}

.bg-\[\#681f30\]\/85 {
  background-color: rgba(104, 31, 48, 0.85);
}

.bg-\[\#681f30\]\/90 {
  background-color: rgba(104, 31, 48, 0.9);
}

.hover\:bg-\[\#681f30\]:hover {
  background-color: #681f30;
}

.hover\:bg-\[\#681f30\]\/50:hover {
  background-color: rgba(104, 31, 48, 0.5);
}

.group:hover .group-hover\:bg-\[\#681f30\] {
  background-color: #681f30;
}

.group:hover .group-hover\:text-\[\#681f30\] {
  color: #681f30;
}

.text-\[\#241a17\] {
  color: #241a17;
}

.text-\[\#5c4b45\] {
  color: #5c4b45;
}

.text-\[\#681f30\] {
  color: #681f30;
}

.text-\[\#8f6528\] {
  color: #8f6528;
}

.text-\[\#e7cb92\] {
  color: #e7cb92;
}

.text-\[\#f5dfa8\] {
  color: #f5dfa8;
}

.border-\[\#681f30\] {
  border-color: #681f30;
}

.border-\[\#b88a44\] {
  border-color: #b88a44;
}

.border-\[\#e4d8c5\] {
  border-color: #e4d8c5;
}

.border-\[\#e7cb92\] {
  border-color: #e7cb92;
}

.border-\[\#e7cb92\]\/40 {
  border-color: rgba(231, 203, 146, 0.4);
}

.border-\[\#e7cb92\]\/80 {
  border-color: rgba(231, 203, 146, 0.8);
}

.from-\[\#681f30\]\/10 {
  --tw-gradient-from: rgba(104, 31, 48, 0.1) var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(104, 31, 48, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-\[\#681f30\]\/40 {
  --tw-gradient-to: rgba(104, 31, 48, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgba(104, 31, 48, 0.4) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

.to-\[\#681f30\]\/10 {
  --tw-gradient-to: rgba(104, 31, 48, 0.1) var(--tw-gradient-to-position);
}

/* Global Toast */
.global-toast {
  position: fixed;
  top: max(4.25rem, calc(env(safe-area-inset-top, 0px) + 3.5rem));
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 180;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--wine);
  color: #fff7ea;
  border: 1px solid rgba(231, 203, 146, 0.5);
  box-shadow: 0 12px 28px rgba(24, 10, 14, 0.28);
  font-size: 0.84rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 2rem);
}

.global-toast .material-symbols-outlined {
  font-size: 1rem;
  color: var(--gold-light);
}

/* ==========================================================================
   DESKTOP & TABLET RESPONSIVE (>= 48rem / 768px)
   ========================================================================== */

@media (min-width: 48rem) {

  /* Envelope Gate Desktop: Balanced 2-Column Editorial */
  .envelope-gate {
    padding: 1.25rem;
  }

  .envelope-gate .fine-art-canvas {
    display: grid;
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
    grid-template-rows: auto 1fr auto;
    align-items: center;
    width: min(58rem, 100%);
    max-width: none;
    min-height: min(41rem, calc(100dvh - 2.5rem));
    padding: clamp(1.75rem, 3.8dvh, 3.25rem) clamp(1.75rem, 4vw, 3.5rem);
    column-gap: clamp(1.5rem, 4vw, 3rem);
    row-gap: 0.85rem;
    border-radius: 36px;
    background: #fbf6ed;
  }

  .envelope-frame-outer {
    inset: 12px;
    border-radius: 28px;
  }

  .envelope-frame-inner {
    inset: 17px;
    border-radius: 24px;
  }

  .envelope-portrait {
    display: block;
    position: absolute;
    inset: 0 auto 0 0;
    width: 54%;
    pointer-events: none;
    overflow: hidden;
    mask-image: linear-gradient(90deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.72) 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.72) 85%, transparent 100%);
  }

  .envelope-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(251, 246, 237, 0.65) 0%, rgba(251, 246, 237, 0.1) 25%, rgba(251, 246, 237, 0.15) 68%, rgba(251, 246, 237, 0.72) 100%);
  }

  .envelope-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
  }

  .envelope-heading {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0.5rem;
  }

  .envelope-heading h1 {
    font-size: clamp(2.5rem, min(5vw, 6.2dvh), 4rem);
  }

  .envelope-perspective {
    grid-column: 2;
    grid-row: 2;
    margin-block: 0;
    padding-block: 0.5rem;
  }

  .envelope-container {
    width: min(336px, 95%);
  }

  .envelope-container.is-open .inner-invitation-card {
    transform: translateY(-26%);
  }

  .envelope-chibi {
    width: min(52%, clamp(6.75rem, 20dvh, 9.75rem));
  }

  .envelope-footer {
    grid-column: 2;
    grid-row: 3;
  }

  /* Hero Desktop: Clean right-side feathered scrim over hero.jpg negative space */
  .cover-photo img {
    object-position: 34% 38%;
  }

  .cover-shade {
    background: linear-gradient(90deg,
        rgba(26, 12, 16, 0.06) 0%,
        rgba(26, 12, 16, 0.08) 44%,
        rgba(26, 12, 16, 0.46) 72%,
        rgba(26, 12, 16, 0.72) 100%);
  }

  .cover-layout {
    justify-content: center;
    align-items: flex-end;
  }

  .cover-caption {
    width: min(46%, 36rem);
    margin-inline-end: clamp(1.5rem, 5vw, 5rem);
    padding: 2rem 1.5rem;
  }

  .cover-names {
    font-size: clamp(2.35rem, 4.3vw, 3.85rem);
  }

  /* Section 02: Balanced 2-Column Schedule + Calendar */
  .schedule-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .calendar-days {
    row-gap: 1rem;
    padding-block: 0.45rem;
  }

  /* Section 03: Alternating 2-Column Editorial Love Story */
  .story-timeline {
    gap: 3rem;
  }

  .story-timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .story-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
    padding-inline-start: 0;
  }

  .story-node {
    position: relative;
    left: auto;
    top: auto;
    grid-column: 2;
    grid-row: 1;
    margin-inline: auto;
    width: 2.5rem;
    height: 2.5rem;
  }

  .story-text {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
    padding: 1.5rem 1.65rem;
  }

  .story-media {
    grid-column: 3;
    grid-row: 1;
  }

  .story-item--reverse .story-text {
    grid-column: 3;
    text-align: left;
  }

  .story-item--reverse .story-media {
    grid-column: 1;
  }

  /* Section 04: Side-by-Side Venues on Desktop (No Tabs needed!) */
  .venue-tabs {
    display: none;
  }

  .venue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .venue-card {
    display: flex !important;
  }

  .venue-map iframe {
    height: 255px;
  }

  /* Section 05: Restored Pre-Chat Desktop Gallery Grid */
  .inv-gallery-legacy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    padding-inline: max(var(--gutter), calc((100% - var(--container-max)) / 2 + var(--gutter)));
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
  }

  .inv-gallery-legacy> :first-child {
    grid-column: 1 / -1;
  }

  .inv-gallery-legacy>.gallery-film {
    grid-area: 3 / 1 / auto / -1;
    margin-inline: 0;
    padding-inline: 0;
  }

  .inv-gallery-legacy> :last-child> :first-child {
    aspect-ratio: 4 / 5;
  }

  #slideshow-viewport {
    max-width: 27rem;
  }

  .inv-story-section {
    padding-inline: max(var(--gutter), calc((100% - var(--container-max)) / 2 + var(--gutter)));
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
  }

  /* Section 06 Popup: Side-by-Side Bride & Groom inside Gift Dialog on Desktop */
  .qr-dialog[open] {
    width: min(calc(100vw - 2.5rem), 46rem);
  }

  .qr-dialog-card {
    padding: 1.85rem 2.25rem 1.45rem;
  }

  .qr-dialog .gift-tabs {
    display: none;
  }

  .qr-dialog-grid {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1.65rem;
  }

  .qr-person-panel {
    display: flex !important;
  }

  .qr-dialog .gift-divider {
    display: flex;
  }

  .qr-dialog-frame {
    width: 11.25rem;
  }

  /* Restored Pre-Chat Desktop Lightbox */
  #lightbox-modal .lightbox-stage {
    padding-inline: 4rem;
    container-type: size;
  }

  #lightbox-modal .lightbox-content {
    width: min(100%, calc((100cqh - 4.5rem) * 16 / 9));
    min-width: min(100%, 18rem);
    justify-content: center;
  }

  #lightbox-modal .lightbox-photo-frame {
    flex: 0 1 auto;
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 56rem) {

  /* Section 07: Side-by-Side RSVP + Guestbook on Desktop */
  .rsvp-guestbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

/* ==========================================================================
   MOTION & ACCESSIBILITY PREFERENCES
   ========================================================================== */

@media (hover: hover) {
  .envelope-container:not(.is-open):hover .wax-seal {
    filter: brightness(1.1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body:not(.invitation-closed) .cover-caption {
    animation: cover-arrival 0.85s 0.16s cubic-bezier(0.2, 0.65, 0.3, 1) both;
  }

  @keyframes cover-arrival {
    from {
      opacity: 0;
      transform: translateY(0.85rem);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .envelope-container.is-open .envelope-chibi {
    visibility: visible;
    transform-origin: center bottom;
    animation:
      envelope-chibi-arrival 0.42s 0.48s ease-out both,
      envelope-chibi-wave 0.9s 1.05s ease-in-out;
  }

  @keyframes envelope-chibi-arrival {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes envelope-chibi-wave {

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

    28% {
      transform: rotate(-6deg);
    }

    70% {
      transform: rotate(5deg);
    }
  }

  .envelope-container.is-open~.envelope-flower-burst span {
    animation: envelope-flower-flight 1.65s calc(0.65s + var(--delay, 0s)) ease-out both;
  }

  @keyframes envelope-flower-flight {
    0% {
      opacity: 0;
      transform: scale(0.4);
    }

    15% {
      opacity: 1;
    }

    65% {
      opacity: 0.9;
    }

    100% {
      opacity: 0;
      transform: translate(var(--flight-x), var(--flight-y)) rotate(var(--turn));
    }
  }

  .invitation-intro-arrived {
    animation: invitation-intro-arrival 0.65s ease-out both;
  }

  @keyframes invitation-intro-arrival {
    from {
      opacity: 0.45;
      transform: translateY(0.5rem);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

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

  body *,
  body *::before,
  body *::after {
    animation: none !important;
    transition: none !important;
  }

  #petal-container {
    display: none;
  }
}