/* ========================================================
   BLUSH TULIP THEME — layout / colour / decoration only
   ======================================================== */
:root {
  --red-primary: #745543;
  --red-dark: #4c3328;
  --red-light: #9a7864;
  --red-card: #f8eee4;
  --gold: #a98568;
  --gold-light: #cfb49c;
  --gold-dark: #7d5d49;
  --paper-bg: #f8f0e7;
  --paper-card: #fffaf4;
  --cream-text: #4f362a;
  --cream-sub: #7a6254;
  --ink: #4b3429;
  --muted: #876f60;
  --border-red: rgba(105, 76, 58, .16);
  --border-gold: rgba(154, 120, 100, .24);
  --shadow-card: 0 18px 42px rgba(92, 68, 52, .10);
  --font-title: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-script: "Alex Brush", "Pattaya", cursive;
  --font-body: "Lora", "Cormorant Garamond", Georgia, serif;
}

html { background: #e9ddd0; }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.85), transparent 34rem),
    #e9ddd0;
  font-family: var(--font-body);
  line-height: 1.55;
}

.app-container {
  width: min(100%, 600px);
  max-width: 600px;
  padding: 0 0 42px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255,255,255,.82), transparent 34%),
    linear-gradient(180deg, #fbf4eb 0%, #f8eee3 46%, #fcf6ef 100%);
  box-shadow: 0 0 38px rgba(72, 52, 40, .12);
}

.app-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(110deg, transparent 0 46%, rgba(116,85,67,.03) 47%, transparent 48%),
    linear-gradient(78deg, transparent 0 64%, rgba(116,85,67,.025) 65%, transparent 66%);
  background-size: 88px 110px, 130px 160px;
}

.app-container > *:not(.lotus-bg-layers) { position: relative; z-index: 1; }

.reveal-section {
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 42px 34px;
}

/* Background tulips are sparse and soft, never an architectural frame. */
.lotus-bg-layers { z-index: 0; overflow: hidden; }
.lotus-bg-img { mix-blend-mode: multiply; filter: saturate(.78); }
.lotus-bg-top-left {
  top: 1150px;
  left: -72px;
  width: 245px;
  opacity: .13;
  transform: rotate(-13deg);
}
.lotus-bg-bottom-left {
  top: 3600px;
  left: -120px;
  width: 300px;
  opacity: .12;
  transform: rotate(12deg);
}
.lotus-bg-right {
  top: 2250px;
  right: -120px;
  width: 310px;
  opacity: .12;
  transform: rotate(-8deg);
}

/* -------------------- Opening cover -------------------- */
.envelope-screen {
  padding: 26px 18px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,.7), transparent 36%),
    radial-gradient(circle at 74% 78%, rgba(177,132,103,.1), transparent 40%),
    linear-gradient(145deg, #fbf4ec 0%, #f0dfcf 54%, #e7d1bd 100%);
  color: var(--ink);
}

.envelope-screen::before,
.envelope-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 14px 22px rgba(76, 51, 40, .12));
}

.envelope-screen::before {
  width: min(72vw, 780px);
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255,250,244,.34);
  filter: blur(90px);
}

.envelope-screen::after {
  display: none;
}

.envelope-box {
  z-index: 5;
  width: min(680px, calc(100vw - 40px));
  max-width: 680px;
  padding: 0;
}

.envelope-card {
  width: 100%;
  height: min(490px, calc(100svh - 48px));
  min-height: min(450px, calc(100svh - 48px));
  max-height: min(530px, calc(100svh - 32px));
  box-sizing: border-box;
  padding: 36px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.95), transparent 36%),
    linear-gradient(160deg, #fffef9 0%, #f9f8ed 100%);
  border: 9px solid rgba(255,255,255,.86);
  border-radius: 22px;
  box-shadow:
    inset 0 0 0 1px rgba(181,159,111,.62),
    0 26px 54px rgba(102,73,54,.2),
    0 8px 18px rgba(102,73,54,.1);
  overflow: hidden;
  text-align: center;
}

.envelope-card::before {
  content: "SAVE THE DATE";
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  display: block;
  z-index: 5;
  width: max-content;
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .34em;
  color: #80614e;
}

.envelope-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -20px;
  right: -20px;
  width: 195px;
  height: 260px;
  pointer-events: none;
  opacity: .35;
  background: url("../assets/1.webp") top right / contain no-repeat;
  filter: saturate(.88) drop-shadow(0 7px 12px rgba(102,73,54,.06));
  transform: rotate(7deg);
}

.envelope-flower-left {
  display: block !important;
  top: auto;
  left: -16px;
  bottom: -16px;
  width: 175px;
  z-index: 1;
  opacity: .38;
  filter: saturate(.90) drop-shadow(0 9px 15px rgba(102,73,54,.08));
  transform: rotate(-7deg);
  animation: none;
}

.ambient-particles { display: none; }

.envelope-seal {
  display: none !important;
}

.envelope-names {
  z-index: 4;
  width: min(380px, 86vw);
  margin: 0 auto;
  color: #654635;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 2px;
}
.envelope-name-line {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.7rem, 4.3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: .01em;
  color: #654635;
  text-shadow: 0 2px 0 rgba(255,255,255,.55);
}
.envelope-name-groom,
.envelope-names .envelope-name-line:first-child {
  align-self: flex-start;
  text-align: left;
  padding-left: clamp(24px, 5vw, 36px);
  margin-bottom: 2px;
  transform: translateY(-5px);
}
.envelope-name-amp {
  align-self: center;
  text-align: center;
  margin: 2px auto;
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  color: #b18461;
  line-height: 1;
}
.envelope-name-bride,
.envelope-names .envelope-name-line:last-child {
  align-self: flex-end;
  text-align: right;
  padding-right: clamp(24px, 5vw, 36px);
  margin-top: 2px;
  transform: translateY(5px);
}
.envelope-divider {
  z-index: 4;
  width: 130px;
  margin: 14px auto 12px;
}
.envelope-divider .line,
.envelope-divider .line:last-child { background: #aa8b75; opacity: .6; }
.envelope-divider .ornament { color: #80614e; font-size: 0.95rem; }
.envelope-date {
  z-index: 4;
  margin: 0;
  min-height: 22px;
  font-family: "Playfair Display", "Lora", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: none;
  color: #6c4d3c;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
}
.envelope-invite-text {
  z-index: 4;
  margin: 10px 0 0;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(1.2rem, 3.2vw, 1.45rem);
  font-style: italic;
  font-weight: 500;
  color: #644634;
  line-height: 1.35;
  text-align: center;
}
.btn-open {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  z-index: 4;
  min-width: 160px;
  padding: 10px 32px;
  border: 1px solid rgba(159,119,91,.38);
  border-radius: 999px;
  background: linear-gradient(180deg, #fffaf4, #e7cfbb);
  color: #674837;
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(102,73,54,.16), inset 0 1px 0 rgba(255,255,255,.72);
}
.btn-open::after { content: none; }
.btn-open:hover { background: #ddc1aa; color: #52382b; }

.envelope-card.no-guest .btn-open,
.envelope-card:not(.has-guest) .btn-open,
.envelope-invite-text[hidden] ~ .btn-open,
.envelope-invite-text[style*="none"] ~ .btn-open,
.envelope-invite-text:empty ~ .btn-open {
  margin: 0 auto;
}

/* -------------------- Oversized first detail hero -------------------- */
.hero-section {
  width: 100%;
  max-width: none;
  min-height: clamp(860px, 118svh, 1080px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  -webkit-mask-image: none;
  mask-image: none;
}

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

.hero-section::after {
  display: none;
}

.hero-kicker {
  position: absolute;
  z-index: 6;
  top: clamp(26px, 4vh, 38px);
  left: 0;
  right: 0;
  transform: none;
  width: max-content;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: var(--font-title);
  font-size: clamp(1.02rem, 3vw, 1.35rem);
  font-weight: 600;
  letter-spacing: .24em;
  color: #5a3d2e;
  text-transform: uppercase;
  box-shadow: none;
}
.hero-section.visible .hero-kicker,
.visible .hero-kicker {
  transform: none;
}

.envelope-stage,
.envelope-back,
.envelope-photo-wrap,
.photo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none !important;
  animation: none !important;
  overflow: hidden;
}

.envelope-stage:hover,
.envelope-back:hover,
.envelope-photo-wrap:hover,
.photo-frame:hover,
.photo-frame img:hover,
.hero-section:hover .envelope-photo-wrap,
.hero-section:hover .photo-frame,
.hero-section:hover .photo-frame img {
  transform: none !important;
  animation: none !important;
}
.envelope-back::before,
.envelope-front-flaps,
.hero-peony-deco { display: none !important; }
.photo-frame img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
  filter: saturate(.88) contrast(.96) brightness(1.02);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgba(0,0,0,0.95) 54%, rgba(0,0,0,0.8) 59%, rgba(0,0,0,0.55) 63%, rgba(0,0,0,0.25) 67%, rgba(0,0,0,0.08) 69%, transparent 71%);
  mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgba(0,0,0,0.95) 54%, rgba(0,0,0,0.8) 59%, rgba(0,0,0,0.55) 63%, rgba(0,0,0,0.25) 67%, rgba(0,0,0,0.08) 69%, transparent 71%);
}

.hero-title-box {
  position: absolute;
  z-index: 5;
  left: 26px;
  right: 26px;
  bottom: 54px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-title-box::after {
  content: "♥";
  order: 3;
  display: block;
  width: 140px;
  margin: 12px auto 10px;
  overflow: visible;
  color: #a48670;
  font-size: .72rem;
  letter-spacing: 0;
  background: linear-gradient(#bca38f,#bca38f) left center / 55px 1px no-repeat,
              linear-gradient(#bca38f,#bca38f) right center / 55px 1px no-repeat;
}
.hero-title-box::before {
  display: none;
}

.hero-edge-flowers {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-edge-flower {
  position: absolute;
  display: block;
  width: 245px;
  height: auto;
  opacity: .32;
  filter: saturate(.84) drop-shadow(0 8px 16px rgba(75,54,42,.06));
  transform-origin: center bottom;
}
.hero-edge-flower-left { transform: rotate(10deg); }
.hero-edge-flower-right { transform: rotate(-10deg); }
.hero-edge-flower-left-top {
  left: -75px;
  bottom: 30px;
  width: 170px;
}
.hero-edge-flower-left-bottom {
  display: none !important;
}
.hero-edge-flower-right-top {
  right: -68px;
  bottom: 150px;
  width: 185px;
}
.hero-edge-flower-right-bottom {
  right: -95px;
  bottom: -72px;
  width: 250px;
}
.hero-names {
  order: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(340px, 86vw);
  margin: 0 auto;
  font-family: var(--font-script, "Alex Brush", cursive);
  font-size: clamp(2.35rem, 7.8vw, 3.4rem);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: none;
  color: #553828;
  text-shadow: 0 2px 0 rgba(255,255,255,.55);
}
.hero-name-line {
  display: block;
  font-family: var(--font-script, "Alex Brush", cursive);
  font-size: clamp(2.35rem, 7.8vw, 3.4rem);
  line-height: 1.05;
  color: #553828;
}
.hero-name-groom {
  align-self: flex-start;
  text-align: left;
  padding-left: clamp(20px, 5vw, 32px);
}
.hero-names .amp,
.hero-name-amp {
  align-self: center;
  display: block;
  margin: -2px auto;
  font-family: var(--font-script, "Alex Brush", cursive);
  font-size: clamp(1.4rem, 4.6vw, 1.95rem);
  font-weight: 400;
  text-transform: none;
  color: #a87e5f;
  line-height: 1;
}
.hero-name-bride {
  align-self: flex-end;
  text-align: right;
  padding-right: clamp(20px, 5vw, 32px);
}
.hero-date {
  order: 1;
  margin: 5px auto 0;
  font-family: "Playfair Display", "Lora", Georgia, serif;
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 500;
  letter-spacing: .22em;
  color: #735543;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
}
.hero-invite-guest {
  order: 2;
  margin: 8px auto 0;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(1.18rem, 3.8vw, 1.45rem);
  font-style: italic;
  font-weight: 600;
  color: #55392b;
  line-height: 1.35;
  text-align: center;
}
.hero-quote {
  order: 4;
  display: block;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--font-serif, "Cormorant Garamond", "Lora", Georgia, serif);
  font-size: 1.05rem;
  line-height: 1.5;
  font-style: italic !important;
  font-weight: 500;
  letter-spacing: .01em;
  color: #745b4b;
  text-wrap: balance;
}
.hero-quote::before {
  content: "“";
  font-family: var(--font-serif, Georgia, serif);
  font-style: normal;
  font-size: 1em;
}
.hero-quote::after {
  content: "”";
  font-family: var(--font-serif, Georgia, serif);
  font-style: normal;
  font-size: 1em;
}

/* ========================================================
   CHINESE TYPOGRAPHY TUNING (TỐI ƯU KÍCH THƯỚC CHỮ TIẾNG TRUNG)
   ======================================================== */
:lang(zh) .hero-invite-guest,
html[lang^="zh"] .hero-invite-guest,
[data-lang="zh"] .hero-invite-guest {
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(1.2rem, 4.2vw, 1.55rem);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #55392b;
}

:lang(zh) .hero-quote,
html[lang^="zh"] .hero-quote,
[data-lang="zh"] .hero-quote {
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", "Source Han Serif SC", var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(1.02rem, 3.6vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: 0.08em;
  font-style: normal;
  font-weight: 500;
  max-width: 440px;
}

:lang(zh) .envelope-invite-text,
html[lang^="zh"] .envelope-invite-text,
[data-lang="zh"] .envelope-invite-text {
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(1.15rem, 3.8vw, 1.4rem);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #644634;
}

:lang(zh) .couple-side-quote,
html[lang^="zh"] .couple-side-quote,
[data-lang="zh"] .couple-side-quote {
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", var(--font-serif, "Cormorant Garamond", serif);
  font-size: 0.92rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* -------------------- Shared editorial sections -------------------- */
.red-card,
.reception-card,
.timeline-card,
.countdown-card,
.dresscode-card,
.guestbook-card,
.story-banner,
.venue-card {
  color: var(--ink);
  background: transparent;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

.red-card::before,
.red-card::after,
.reception-card::before,
.reception-card::after,
.timeline-card::before,
.timeline-card::after,
.countdown-card::before,
.countdown-card::after,
.dresscode-card::before,
.dresscode-card::after,
.story-banner::before,
.story-banner::after,
.venue-card::before,
.venue-card::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
}

.card-heading,
.reception-header h3,
.venue-heading,
.guestbook-heading,
.gift-heading,
.section-header h2,
.gallery-heading,
.countdown-card .card-heading,
.dresscode-card .card-heading {
  color: #5b3e30;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

.card-heading::after,
.section-header h2::after,
.gallery-heading::after,
.venue-heading::after,
.guestbook-heading::after,
.gift-heading::after {
  content: "♥";
  display: block;
  width: 140px;
  margin: 10px auto 0;
  overflow: visible;
  color: #a48670;
  font-size: .72rem;
  letter-spacing: 0;
  background: linear-gradient(#bca38f,#bca38f) left center / 55px 1px no-repeat,
              linear-gradient(#bca38f,#bca38f) right center / 55px 1px no-repeat;
}

#wedding-info {
  min-height: auto;
  display: flex;
  align-items: center;
  padding-top: 42px;
  padding-bottom: 24px;
}
.red-card {
  width: 100%;
  min-height: auto;
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.red-card > *:not(.card-flower-lotus-wrap):not(img) { z-index: 2; }
.red-card .card-heading { order: 0; width: 100%; margin-bottom: 20px; }
.parents-grid {
  order: 1;
  width: 100%;
  gap: 20px;
  min-height: 0;
  padding: 0 0 16px;
  margin: 0 0 12px;
  border-bottom: 0;
}
.parents-grid::after { display: none; }
.family-side small { font-size: .8rem; color: #694a3a; margin-bottom: 6px; display: block; }
.family-side h4 { font-size: 1.05rem; line-height: 1.5; color: #533a2d; margin: 0; }
.family-side p { margin-top: 5px; font-size: .84rem; color: #846b5b; }
.announcement-text {
  order: 3;
  max-width: 420px;
  margin: 0 auto 16px;
  font-size: .95rem;
  line-height: 1.5;
  color: #6b5041;
}
.couple-highlight-names {
  order: 4;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.groom-name,
.bride-name {
  font-family: var(--font-script);
  font-size: clamp(2.7rem, 9.5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 400;
  color: #6a4b39;
  margin: 0;
}
.role-badge {
  display: inline-block;
  font-family: var(--font-sans, "Montserrat", sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #92725d;
  text-transform: uppercase;
  margin: 1px 0 0;
}
.couple-highlight-names .amp {
  font-family: var(--font-script);
  font-size: 1.55rem;
  color: #977761;
  line-height: 1;
  margin: 2px 0;
}
.ceremony-note { order: 5; color: #5f4436; font-size: 1.02rem; margin-top: 4px; }
.ceremony-time-badge {
  order: 6;
  margin-top: 16px;
  padding: 16px 28px;
  border-block: 1px solid rgba(116,85,67,.22);
  background: rgba(255,255,255,.24);
}
.ceremony-time-badge .time,
.ceremony-time-badge .date-big,
.ceremony-time-badge .lunar { color: #664a3b; }
.ceremony-time-badge .date-big { font-size: 2rem; }
.card-flower-lotus-wrap {
  position: relative;
  order: 2;
  top: auto;
  right: auto;
  width: 190px;
  height: 125px;
  max-width: none;
  z-index: 1;
  margin: -45px auto 12px;
  transform: none;
  opacity: .88;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  pointer-events: none;
}
.card-flower-lotus-right {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(.84) drop-shadow(0 10px 17px rgba(83,61,48,.08));
  animation: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.red-card.visible .card-flower-lotus-wrap,
.visible .card-flower-lotus-wrap {
  opacity: .88;
  transform: none;
}

/* ========================================================
   COUPLE PORTRAITS & QUOTES (ẢNH RIÊNG CÔ DÂU CHÚ RỂ)
   ======================================================== */
.couple-sides-section {
  padding: 42px 20px 28px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.couple-sides-block {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.couple-side-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(214, 192, 175, 0.45);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(102, 73, 54, 0.07);
}

.couple-side-row--bride {
  grid-template-columns: 1.15fr 1fr;
}

.couple-side-photo {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #f7efe6;
  box-shadow: 0 6px 18px rgba(102, 73, 54, 0.12);
  border: 2px solid #fff;
  position: relative;
}

.couple-side-photo.is-empty {
  background: linear-gradient(145deg, #f7efe6 0%, #eee1d3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.couple-side-photo.is-empty .couple-side-img {
  opacity: 0;
  display: none;
}

.couple-side-row--groom .couple-side-photo {
  opacity: 0;
  transform: translateX(-40px) scale(0.95);
  transition: opacity var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1)),
              transform var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.couple-side-row--groom .couple-side-info {
  opacity: 0;
  transform: translateX(35px);
  transition: opacity var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1)),
              transform var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.couple-side-row--bride .couple-side-info {
  opacity: 0;
  transform: translateX(-35px);
  transition: opacity var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1)),
              transform var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.couple-side-row--bride .couple-side-photo {
  opacity: 0;
  transform: translateX(40px) scale(0.95);
  transition: opacity var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1)),
              transform var(--reveal-duration, 5s) var(--reveal-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.couple-sides-section.visible .couple-side-row--groom .couple-side-photo,
.visible .couple-side-row--groom .couple-side-photo,
.couple-sides-section.visible .couple-side-row--groom .couple-side-info,
.visible .couple-side-row--groom .couple-side-info,
.couple-sides-section.visible .couple-side-row--bride .couple-side-info,
.visible .couple-side-row--bride .couple-side-info,
.couple-sides-section.visible .couple-side-row--bride .couple-side-photo,
.visible .couple-side-row--bride .couple-side-photo {
  opacity: 1;
  transform: none;
}

.couple-sides-section.visible .couple-side-row--groom .couple-side-photo,
.visible .couple-side-row--groom .couple-side-photo {
  transition-delay: 0.1s;
}
.couple-sides-section.visible .couple-side-row--groom .couple-side-info,
.visible .couple-side-row--groom .couple-side-info {
  transition-delay: 0.2s;
}
.couple-sides-section.visible .couple-side-row--bride .couple-side-info,
.visible .couple-side-row--bride .couple-side-info {
  transition-delay: 0.3s;
}
.couple-sides-section.visible .couple-side-row--bride .couple-side-photo,
.visible .couple-side-row--bride .couple-side-photo {
  transition-delay: 0.4s;
}

.couple-side-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform;
}

#groom-portrait-img,
.couple-side-row--groom .couple-side-img {
  animation: couplePortraitGroom 6.2s ease-in-out infinite alternate !important;
}

#bride-portrait-img,
.couple-side-row--bride .couple-side-img {
  animation: couplePortraitBride 7.2s ease-in-out infinite alternate !important;
}

@keyframes couplePortraitGroom {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.08) translate3d(-2%, -1.5%, 0);
  }
  100% {
    transform: scale(1.18) translate3d(-3.5%, -3%, 0);
  }
}

@keyframes couplePortraitBride {
  0% {
    transform: scale(1.18) translate3d(3%, -2.5%, 0);
  }
  50% {
    transform: scale(1.09) translate3d(1.5%, -1.2%, 0);
  }
  100% {
    transform: scale(1) translate3d(0, 0, 0);
  }
}

.couple-side-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 4px;
  min-width: 0;
}

.couple-side-heart-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}

.couple-side-rule {
  flex: 1;
  max-width: 44px;
  height: 1px;
  background: #caa990;
  opacity: 0.6;
}

.couple-side-heart {
  color: #8c5a45;
  flex-shrink: 0;
  animation: coupleHeartPulse 2.2s ease-in-out infinite;
}

@keyframes coupleHeartPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.28); opacity: 1; }
}

.couple-side-role {
  font-family: "Playfair Display", "Lora", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7b5843;
  margin-bottom: 6px;
  display: block;
}

.couple-side-name {
  font-family: var(--font-script, "Alex Brush", cursive);
  font-size: clamp(2.2rem, 7vw, 2.75rem);
  line-height: 1.05;
  color: #654635;
  display: block;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.couple-side-quote {
  margin: 10px 0 0;
  max-width: 260px;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: #785743;
  white-space: pre-line;
}

.couple-side-quote[hidden] {
  display: none !important;
}

/* ========================================================
   ALBUM ẢNH CƯỚI (CẤU TRÚC ẢNH LỚN & THUMBNAIL DẢI DƯỚI - NHƯ THIỆP 5)
/* ========================================================
   SECTION 2: ALBUM ẢNH CƯỚI 3D COVERFLOW & THUMBNAILS
   ======================================================== */
#gallery {
  min-height: 0;
  padding: 26px 16px 28px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0 auto;
  width: 100%;
}

#gallery .section-header {
  margin: 0 auto 16px !important;
  padding: 0 !important;
  text-align: center;
}

#gallery .section-header h2,
#gallery .gallery-heading {
  margin: 0;
  font-family: var(--font-title);
  font-size: 18px;
  letter-spacing: .08em;
  color: #5b3e30;
  text-transform: uppercase;
  font-weight: 700;
}

#gallery .section-header h2::after,
#gallery .gallery-heading::after {
  content: "♥";
  display: block;
  width: 140px;
  margin: 10px auto 8px;
  overflow: visible;
  color: #a48670;
  font-size: .72rem;
  letter-spacing: 0;
  line-height: 1;
  background: linear-gradient(#bca38f,#bca38f) left center / 55px 1px no-repeat,
              linear-gradient(#bca38f,#bca38f) right center / 55px 1px no-repeat;
}

#gallery .gallery-subtitle,
#gallery .section-header p {
  display: block !important;
  font-family: var(--font-script, 'Alex Brush', cursive);
  font-size: 1.45rem;
  color: #846959;
  margin: 6px auto 0;
  font-style: normal;
  line-height: 1.3;
}

#gallery .gallery-carousel {
  position: relative;
  width: 100%;
  max-width: 760px;
  height: 420px !important;
  min-height: 420px !important;
  margin: 0 auto 12px;
  perspective: 1100px;
  -webkit-perspective: 1100px;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: max-width 0.38s cubic-bezier(0.25, 1, 0.5, 1);
}

#gallery .gallery-carousel.is-portrait {
  height: 420px !important;
  min-height: 420px !important;
  max-width: 640px;
}

#gallery .gallery-carousel.is-landscape {
  height: 420px !important;
  min-height: 420px !important;
  max-width: 760px;
}

#gallery .carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  display: block;
}

#gallery .carousel-slide {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  min-width: 0;
  border-radius: 16px;
  border: 4px solid #ffffff;
  box-shadow: 0 16px 40px rgba(73, 53, 41, 0.22);
  transition: transform 0.52s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.52s ease, filter 0.52s ease, width 0.38s ease;
  cursor: pointer;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform, opacity;
  overflow: hidden;
  box-sizing: border-box;
}

#gallery .gallery-carousel.is-portrait .carousel-slide {
  width: min(255px, 62vw);
  height: 100%;
}

#gallery .gallery-carousel.is-landscape .carousel-slide {
  width: min(460px, 92vw);
  height: 100%;
}

#gallery .carousel-slide img {
  border-radius: 9px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  display: block;
}

#gallery .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #5b3e30;
  border: 1px solid rgba(112, 81, 61, 0.15);
  box-shadow: 0 4px 14px rgba(73, 53, 41, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  z-index: 25;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#gallery .carousel-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(73, 53, 41, 0.28);
}

#gallery .carousel-btn.prev { left: 4px; }
#gallery .carousel-btn.next { right: 4px; }

/* Dots Pagination */
#gallery .carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 14px auto 14px;
  width: 100%;
  padding: 0;
}

#gallery .carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(112, 81, 61, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

#gallery .carousel-dot.active {
  width: 22px;
  border-radius: 999px;
  background: #8e6d58;
}

/* Thumbnail Strip Row */
#gallery .gallery-thumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 4px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#gallery .gallery-thumbs::-webkit-scrollbar { display: none; }

#gallery .gallery-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: all 0.22s ease;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
  box-sizing: border-box;
}

#gallery .gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  pointer-events: none;
}

#gallery .gallery-thumb:hover {
  opacity: 0.92;
}

#gallery .gallery-thumb.active {
  opacity: 1;
  border-color: #8e6d58;
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(85, 58, 42, 0.22);
  background: #ffffff;
}

/* Ceremony / reception cards mirror the airy printed layouts. */
/* Ceremony / reception cards mirror the airy printed layouts. */
#reception {
  min-height: auto;
  margin: 0;
  padding-top: 46px;
  padding-bottom: 40px;
}
#reception::before {
  top: 180px;
  right: -118px;
  width: 260px;
  height: 430px;
  opacity: .16;
  background: url("../assets/1.webp") right center / contain no-repeat;
  mix-blend-mode: multiply;
}
.reception-card { padding: 0; }
.reception-header h3 { margin-bottom: 6px; }
.reception-lead { margin-bottom: 18px; color: #836757; font-size: .93rem; }
.reception-day-time { color: #745443; }
.reception-date-num { font-size: 4.3rem; color: #644535; }
.reception-date-divider { background: rgba(103,73,55,.25); }
.reception-date-month-year span,
.reception-date-month-year strong,
.reception-lunar,
.reception-time-col small,
.reception-time-col strong { color: #6e5040; }
.reception-times {
  width: min(100%, 390px);
  margin: 18px auto;
  padding: 16px;
  border: 1px solid rgba(112,81,61,.15);
  border-radius: 18px;
  background: rgba(255,255,255,.4);
  box-shadow: 0 12px 28px rgba(82,58,43,.06);
}
.calendar-paper {
  max-width: 380px;
  padding: 20px 18px;
  background: rgba(255,252,248,.82);
  border: 1px solid rgba(112,81,61,.14);
  border-radius: 18px;
  box-shadow: 0 15px 34px rgba(76,55,43,.08);
}
.calendar-paper-title,
.calendar-grid-header,
.calendar-grid-days span { color: #694a39; }
.calendar-grid-days .wedding-day {
  background: #9a7864;
  color: #fff !important;
}
.calendar-grid-days .wedding-day::after { color: #bf8e86; }
.reception-actions { gap: 12px; margin-top: 16px; }
.btn-gold-outline {
  padding: 8px 20px;
  border: 0;
  color: #765744;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-cream-solid,
.reception-actions .btn-cream-solid,
#love-story .btn-cream-solid {
  padding: 12px 28px;
  border: 1px solid rgba(112,81,61,.22);
  background: linear-gradient(180deg, #fffaf5, #ead7c6) !important;
  color: #5f4334 !important;
  box-shadow: 0 10px 22px rgba(86,62,47,.12);
}

#venue {
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 44px 34px 38px;
  background: transparent;
}
.venue-card { padding: 0; }
.venue-heading { margin-bottom: 18px; }
.venue-name { color: #604333; font-size: 1.35rem; }
.venue-address { color: #806657; font-family: var(--font-body); }
.venue-location-icon { color: #8d6b55; stroke: #8d6b55; }
.map-embed-wrapper {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  height: 300px;
  margin-bottom: 18px;
  border: 6px solid rgba(255,255,255,.72);
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(76,56,44,.12);
  filter: sepia(.12) saturate(.72);
}
.venue-direction-btn,
.venue-direction-btn .direction-icon { color: #674938 !important; stroke: #674938; }

#timeline {
  min-height: auto;
  margin: 0;
  padding-top: 44px;
  padding-bottom: 44px;
  position: relative;
}
#timeline.has-bg {
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  overflow: hidden;
}
#timeline.has-bg.is-portrait {
  background-position: center 25% !important;
}
#timeline.has-bg.is-landscape {
  background-position: center center !important;
}
#timeline.has-bg::before {
  content: "" !important;
  position: absolute;
  inset: 0;
  background: rgba(255, 249, 242, 0.2);
  pointer-events: none;
  z-index: 0;
  display: block !important;
}
#timeline.has-bg .timeline-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 30px 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 24px rgba(92, 62, 48, 0.08);
}
#timeline.has-bg .timeline-time,
#timeline.has-bg .timeline-text,
#timeline.has-bg .timeline-card .card-heading {
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85);
  font-weight: 600;
}
.timeline-card { padding: 0; }
.timeline-card .card-heading {
  color: #5b3e30;
  font-size: 18px;
}
.timeline-list {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.timeline-list::before { background: rgba(111,80,61,.22); }
.timeline-item {
  opacity: 1 !important;
  transform: none !important;
}
.timeline-time,
.timeline-text { color: #6b4d3d; }
.timeline-dot { background: #b38e75; box-shadow: 0 0 0 3px rgba(179,142,117,.18); }

#countdown {
  min-height: auto;
  margin: 0;
  padding: 44px 28px 38px;
  background: transparent;
}
#countdown::before {
  left: -95px;
  bottom: -90px;
  top: auto;
  width: 250px;
  height: 360px;
  opacity: .16;
  background: url("../assets/2.webp") left bottom / contain no-repeat;
}
.countdown-card {
  padding: 0;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.countdown-card::before,
.countdown-card::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
}
.countdown-heart-icon {
  width: 36px;
  height: 36px;
  color: #9d7c66;
  background: rgba(157,124,102,.10);
}
.countdown-subtitle { color: #896c5a; }
.countdown-card .countdown-grid { gap: 8px; }
.countdown-card .count-box {
  padding: 16px 3px 11px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(111,80,61,.13);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(72,52,40,.06);
}
.countdown-card .count-box .num { color: #674837; text-shadow: none; }
.countdown-card .count-box .lbl { color: #8b6d5a; }
.countdown-quote { color: #765a49; margin-top: 18px; }

#dresscode {
  min-height: auto;
  margin: 0;
  padding: 40px 34px 40px;
}
.dresscode-card { padding: 0; }
.dresscode-icon-wrap { color: #8b6b56; background: rgba(139,107,86,.1); }
.dresscode-subtitle { color: #8c6e5a; }
.dresscode-note { color: #74594a; }
.dresscode-swatch { border-color: rgba(151,115,91,.25); }
.dresscode-name { color: #654939; }

#love-story {
  min-height: auto;
  margin: 0;
  padding: 44px 34px;
  background: transparent;
}
.story-banner { padding: 0; }
.story-banner .envelope-subtitle {
  font-family: var(--font-script);
  font-size: 3rem;
  color: #7b5d4a;
}
.story-banner blockquote { color: #654939; }
.story-banner p { color: #846959; }

#guestbook {
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 44px 34px 44px;
}
.guestbook-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 18px;
  padding: 26px 20px 20px;
  border: 1px solid rgba(111,80,61,.13);
  border-radius: 22px;
  background: rgba(255,252,248,.7);
  box-shadow: 0 14px 34px rgba(73,53,41,.07);
}
.guestbook-form {
  gap: 10px;
}
.guestbook-form .form-input,
.guestbook-form .form-textarea {
  border: 1px solid rgba(111,80,61,.22);
  background: rgba(255,255,255,.72);
  color: #52392c;
  font-size: 13.5px !important;
  padding: 8px 12px !important;
  border-radius: 9px;
}
.guestbook-form .form-input::placeholder,
.guestbook-form .form-textarea::placeholder {
  font-size: 13.5px;
  color: #9c8273;
}
.guestbook-form .form-textarea {
  min-height: 68px;
}
.guestbook-form .form-input:focus,
.guestbook-form .form-textarea:focus {
  border-color: #9b7962;
  box-shadow: 0 0 0 3px rgba(155,121,98,.1);
}
.btn-wish-icon {
  color: #6c4d3d;
  background: #ecded1;
  border-color: #ddc8b6;
  width: 38px;
  height: 38px;
  border-radius: 9px;
}
.btn-submit-wish {
  background: #a17c63;
  color: #fff;
  box-shadow: 0 7px 16px rgba(101,73,56,.18);
  font-size: 0.82rem;
  padding: 9px 18px;
  letter-spacing: 0.04em;
  border-radius: 9px;
}
.wishes-list {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  gap: 10px;
}
.wish-item {
  background: rgba(255, 251, 246, 0.74);
  border: 1px solid rgba(111, 80, 61, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(73, 53, 41, 0.03);
}
.wish-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}
.wish-author {
  font-family: var(--font-title);
  font-size: 0.88rem !important;
  font-weight: 700;
  color: #5c4133 !important;
}
.wish-time {
  font-family: var(--font-serif);
  font-size: 0.72rem !important;
  color: #927667 !important;
}
.wish-message {
  font-family: var(--font-body), "Lora", "Segoe UI", Arial, sans-serif;
  font-size: 0.84rem !important;
  font-weight: 400;
  color: #5c4133 !important;
  line-height: 1.48;
  margin: 0;
}

#gift {
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 46px 34px 32px;
  overflow: hidden;
  background: transparent;
}
#gift .gift-flower-right {
  top: auto;
  right: -74px;
  bottom: -50px;
  width: 230px;
  opacity: .28;
  mix-blend-mode: multiply;
  mask-image: none;
  -webkit-mask-image: none;
}
.gift-envelope-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 auto;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  outline: none;
}

.gift-envelope-box {
  position: relative;
  display: block;
  width: 260px;
  max-width: 82vw;
  height: auto;
  margin: 0 auto;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  animation: giftEnvelopeGentleFloat 3.2s ease-in-out infinite !important;
  transform-origin: center bottom;
  will-change: transform;
}
.gift-envelope-box::before {
  display: none !important;
}
.gift-envelope-box::after {
  content: "";
  position: absolute;
  inset: 10% 8% 8% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 165, 175, 0.4) 0%, rgba(245, 215, 205, 0.15) 55%, transparent 70%);
  filter: blur(14px);
  z-index: -1;
  animation: giftGlowPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes giftGlowPulse {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.1);
  }
}

.gift-envelope-img {
  display: block !important;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(85,61,47,.18));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center bottom;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

@keyframes giftEnvelopeGentleFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  16% {
    transform: translateY(-6px) rotate(-2.2deg) scale(1.02);
  }
  32% {
    transform: translateY(-9px) rotate(2.2deg) scale(1.03);
  }
  48% {
    transform: translateY(-6px) rotate(-1.5deg) scale(1.02);
  }
  64% {
    transform: translateY(-2px) rotate(1deg) scale(1.01);
  }
  80% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.gift-envelope-trigger:hover .gift-envelope-box,
.gift-envelope-trigger:active .gift-envelope-box {
  transform: translateY(-8px) scale(1.05) rotate(0deg) !important;
}
.gift-envelope-trigger:hover .gift-envelope-img,
.gift-envelope-trigger:active .gift-envelope-img {
  filter: drop-shadow(0 20px 38px rgba(85,61,47,.28));
}
.gift-sparkle {
  color: #cbb29b;
  text-shadow: 0 0 6px rgba(203, 178, 155, 0.8);
}
.gift-hint-text {
  font-family: var(--font-title, "Cormorant Garamond", serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #654939;
  margin-top: 10px;
  letter-spacing: .06em;
  animation: giftHintPulse 2.4s ease-in-out infinite;
}

@keyframes giftHintPulse {
  0%, 100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04) translateY(-1px);
    color: #85533f;
  }
}

.gift-thankyou-text { color: #654939; }
.gift-brand-footer { color: #8f7465; }

footer {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 12px 20px 28px;
  color: #806858;
  border-top: none;
  background: transparent;
}

/* Controls and dialogs inherit the softer palette. */
.floating-music {
  background: rgba(112,82,63,.9);
  border-color: rgba(255,245,236,.55);
  box-shadow: 0 7px 22px rgba(68,48,37,.22);
}
.lang-trigger-btn,
.lang-dropdown { border-color: rgba(137,104,82,.3); color: #684b3c; }
.lang-btn.active { background: #9a7864; box-shadow: none; }
body:not(.invite-open):not(.invite-opening) .lang-trigger-btn {
  background: rgba(255,248,240,.94);
  border-color: rgba(155,117,91,.34);
  color: #6b4c3a;
  box-shadow: 0 6px 16px rgba(102,73,54,.14);
}
body:not(.invite-open):not(.invite-opening) .floating-music {
  background: #80604d;
  border-color: #c5a77e;
}
.modal-box,
.gift-modal-box { background: #fff9f2; border-color: rgba(111,80,61,.18); }
.gift-modal-header { background: #8e6d58; }
.rsvp-radio-label:has(input:checked) { border-color: #9a7864; background: rgba(154,120,100,.08); color: #634737; }
.rsvp-radio-label input { accent-color: #9a7864; }
.toast { background: #735442; }

/* RSVP Modal — compact styles disabled; dùng css/rsvp-layout-from-8.css (chuẩn thiệp 8) */
/*
#rsvp-modal .modal-box {
  padding: 24px 18px 20px;
  max-width: 400px;
}

#rsvp-modal .modal-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: .05em;
  color: #5c3e30;
  margin-bottom: 5px;
}

#rsvp-modal .modal-subtitle {
  font-size: .78rem;
  line-height: 1.45;
  color: #7d6353;
  margin-bottom: 14px;
}

#rsvp-modal label {
  font-size: .8rem !important;
  font-weight: 600;
  color: #5c3e30;
  margin-bottom: 5px;
}

#rsvp-modal .form-input,
#rsvp-modal .form-textarea,
#rsvp-modal select {
  font-size: 13.5px !important;
  padding: 8px 12px !important;
  border-radius: 9px;
}

#rsvp-modal .rsvp-choices {
  gap: 7px;
  margin-bottom: 4px;
}

#rsvp-modal .rsvp-radio-label {
  font-size: .8rem;
  padding: 8px 12px;
  border-radius: 9px;
}

#rsvp-modal .btn-cream-solid {
  font-size: .82rem !important;
  padding: 10px 16px !important;
  border-radius: 10px;
}
*/

@media (max-width: 640px) {
  #gallery .gallery-carousel {
    height: 360px !important;
    min-height: 360px !important;
  }
  #gallery .gallery-carousel.is-portrait {
    height: 360px !important;
    min-height: 360px !important;
  }
  #gallery .gallery-carousel.is-portrait .carousel-slide {
    width: min(225px, 64vw);
  }
  #gallery .gallery-carousel.is-landscape {
    height: 360px !important;
    min-height: 360px !important;
  }
  #gallery .gallery-carousel.is-landscape .carousel-slide {
    width: min(355px, 92vw);
  }
  #gallery .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }
  #gallery .carousel-btn.prev { left: 0; }
  #gallery .carousel-btn.next { right: 0; }
  #gallery .gallery-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 767px) {
  .reveal-section { padding-left: 20px; padding-right: 20px; }
  .hero-section { min-height: 820px; }
  .hero-title-box { left: 20px; right: 20px; bottom: clamp(140px, 18vh, 170px); }
  .photo-frame img {
    height: 100%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 36%, rgba(0,0,0,0.95) 41%, rgba(0,0,0,0.8) 46%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.25) 53%, rgba(0,0,0,0.08) 55%, transparent 57%);
    mask-image: linear-gradient(180deg, #000 0%, #000 36%, rgba(0,0,0,0.95) 41%, rgba(0,0,0,0.8) 46%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.25) 53%, rgba(0,0,0,0.08) 55%, transparent 57%);
  }
  .hero-names {
    width: min(310px, 86vw);
    font-size: clamp(2.15rem, 7.5vw, 2.75rem);
    margin: 0 auto;
  }
  .hero-name-line {
    font-size: clamp(2.15rem, 7.5vw, 2.75rem);
    line-height: 1.05;
  }
  .hero-name-groom {
    padding-left: clamp(36px, 7vw, 44px);
  }
  .hero-name-bride {
    padding-right: clamp(36px, 7vw, 44px);
  }
  .hero-names .amp,
  .hero-name-amp {
    font-size: clamp(1.25rem, 4.2vw, 1.65rem);
    margin: -1px auto;
  }
  .hero-quote {
    font-size: 0.98rem;
    line-height: 1.45;
    font-style: italic !important;
  }
  :lang(zh) .hero-quote,
  html[lang^="zh"] .hero-quote,
  [data-lang="zh"] .hero-quote {
    font-size: clamp(0.92rem, 3.2vw, 1.08rem) !important;
    line-height: 1.5;
    letter-spacing: 0.08em;
  }
  :lang(zh) .hero-invite-guest,
  html[lang^="zh"] .hero-invite-guest,
  [data-lang="zh"] .hero-invite-guest {
    font-size: clamp(1.12rem, 3.8vw, 1.35rem) !important;
  }
  .hero-edge-flower-left-top { left: -55px; bottom: 45px; width: 140px; }
  .hero-edge-flower-left-bottom { display: none !important; }
  .hero-edge-flower-right-top { right: -55px; bottom: 145px; width: 145px; }
  .hero-edge-flower-right-bottom { right: -75px; bottom: -62px; width: 190px; }
  .envelope-screen { padding: 16px; }
  .envelope-box {
    width: min(390px, calc(100vw - 32px));
    min-width: min(300px, calc(100vw - 32px));
    max-width: 100%;
  }
  .envelope-card {
    width: 100%;
    min-width: min(300px, 100%);
    height: min(395px, calc(100svh - 36px));
    min-height: min(380px, calc(100svh - 36px));
    max-height: min(415px, calc(100svh - 28px));
    padding: 38px 16px 42px;
    border-width: 7px;
    border-radius: 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .envelope-card::before {
    position: absolute;
    display: block;
    top: 22px;
    left: 0;
    right: 0;
    transform: none;
    margin: 0 auto;
    font-size: .68rem;
    letter-spacing: .28em;
  }
  .envelope-card::after { top: -14px; right: -14px; width: 145px; height: 200px; }
  .envelope-seal { display: none !important; }
  .envelope-flower-left { left: -12px; bottom: -12px; width: 135px; }
  .envelope-names {
    width: min(240px, 72vw);
    min-height: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 3px;
  }
  .envelope-name-line { font-size: clamp(2.15rem, 7.5vw, 2.55rem); line-height: 1.05; }
  .envelope-name-groom,
  .envelope-names .envelope-name-line:first-child {
    padding-left: 12px;
    margin-bottom: 2px;
    transform: translateY(-4px);
  }
  .envelope-name-bride,
  .envelope-names .envelope-name-line:last-child {
    padding-right: 12px;
    margin-top: 2px;
    transform: translateY(4px);
  }
  .envelope-name-amp {
    align-self: center;
    text-align: center;
    margin: 2px auto;
    font-size: clamp(1.25rem, 4.2vw, 1.55rem);
    line-height: 1;
  }
  .envelope-divider { margin: 10px auto 10px; width: 105px; }
  .envelope-date { margin: 0; font-size: .92rem; min-height: 18px; letter-spacing: .14em; }
  .envelope-invite-text { margin: 8px 0 0; font-size: 1.08rem; line-height: 1.35; }
  .btn-open {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 8px 26px;
    font-size: .92rem;
    min-width: 135px;
  }
  .envelope-card.no-guest .btn-open,
  .envelope-card:not(.has-guest) .btn-open,
  .envelope-invite-text[hidden] ~ .btn-open,
  .envelope-invite-text[style*="none"] ~ .btn-open,
  .envelope-invite-text:empty ~ .btn-open {
    margin: 0 auto;
  }
  .card-flower-lotus-wrap { top: auto; right: auto; width: 170px; height: 115px; margin: -32px auto 10px; }
  .couple-sides-section { padding: 30px 14px 22px; }
  .couple-sides-block { gap: 18px; }
  .couple-side-row { gap: 12px; padding: 10px; border-radius: 16px; }
  .couple-side-name { font-size: clamp(1.9rem, 7.5vw, 2.3rem); }
  .couple-side-role { font-size: 0.85rem; margin-bottom: 4px; }
  .couple-side-quote { font-size: 0.92rem; line-height: 1.4; margin-top: 6px; }
  .couple-highlight-names { margin: 0 0 16px; }
  .countdown-card .countdown-grid { gap: 6px; }
  .countdown-card .count-box .num { font-size: 1.65rem; }
  .countdown-card .count-box .lbl { font-size: .64rem; letter-spacing: .05em; }
  #wedding-info { padding-top: 36px; padding-bottom: 20px; }
  #gallery { padding-top: 24px; padding-bottom: 24px; }
  #reception { padding-top: 38px; padding-bottom: 34px; }
  #venue { padding: 36px 20px 32px; }
  #timeline { padding-top: 36px; padding-bottom: 36px; }
  #countdown { padding: 36px 20px 32px; }
  #dresscode { padding: 34px 20px; }
  #love-story { padding: 36px 20px; }
  #guestbook { padding: 36px 20px 34px; }
  #gift { padding: 38px 20px 28px; }
}

@media (max-width: 360px) {
  .envelope-card {
    height: min(370px, calc(100svh - 20px));
    min-height: min(355px, calc(100svh - 20px));
    padding: 18px 12px;
    justify-content: center;
  }
  .envelope-card::before { top: 18px; margin: 0 auto; font-size: .62rem; }
  .envelope-card::after { top: -10px; right: -10px; width: 125px; height: 170px; }
  .envelope-flower-left { left: -10px; bottom: -10px; width: 120px; }
  .envelope-names { width: min(210px, 76vw); gap: 2px; }
  .envelope-name-line { font-size: 2.05rem; }
  .envelope-name-groom,
  .envelope-names .envelope-name-line:first-child { padding-left: 8px; transform: translateY(-3px); }
  .envelope-name-bride,
  .envelope-names .envelope-name-line:last-child { padding-right: 8px; transform: translateY(3px); }
  .envelope-name-amp { font-size: 1.15rem; margin: 1px auto; }
  .envelope-divider { margin: 8px auto 8px; width: 95px; }
  .envelope-date { font-size: .86rem; margin: 0; }
  .envelope-invite-text { margin: 6px 0 0; font-size: 0.98rem; }
  .btn-open { position: absolute; bottom: 16px; left: 0; right: 0; margin: 0 auto; padding: 7px 22px; font-size: .88rem; min-width: 120px; }
  .envelope-card.no-guest .btn-open,
  .envelope-card:not(.has-guest) .btn-open,
  .envelope-invite-text[hidden] ~ .btn-open,
  .envelope-invite-text[style*="none"] ~ .btn-open,
  .envelope-invite-text:empty ~ .btn-open {
    margin: 0 auto;
  }
}

@media (min-width: 768px) {
  body { background: #e9ddd0; }
  .app-container { width: min(100%, 900px); max-width: 900px; border: 0; }
  .envelope-box {
    width: min(680px, calc(100vw - 48px));
    max-width: 680px;
  }
  .envelope-card {
    height: min(490px, calc(100svh - 48px));
    min-height: min(450px, calc(100svh - 48px));
    max-height: min(530px, calc(100svh - 32px));
    padding: 50px 48px;
  }
  .envelope-card::before {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    margin: 0 auto;
    font-size: .82rem;
    letter-spacing: .36em;
  }
  .envelope-card::after {
    top: -24px;
    right: -24px;
    width: 225px;
    height: 300px;
  }
  .envelope-flower-left {
    left: -20px;
    bottom: -20px;
    width: 205px;
  }
  .envelope-names {
    width: 380px;
    margin: 0 auto 6px;
    gap: 6px;
  }
  .envelope-name-line {
    font-size: 3.35rem;
    line-height: 1.05;
  }
  .envelope-name-groom,
  .envelope-names .envelope-name-line:first-child {
    padding-left: 36px;
    margin-bottom: 4px;
    transform: translateY(-8px);
  }
  .envelope-name-bride,
  .envelope-names .envelope-name-line:last-child {
    padding-right: 36px;
    margin-top: 4px;
    transform: translateY(8px);
  }
  .envelope-name-amp {
    font-size: 1.95rem;
    margin: 4px auto;
  }
  .envelope-divider {
    margin: 16px auto 14px;
    width: 150px;
  }
  .envelope-date {
    font-size: 1.15rem;
  }
  .btn-open {
    position: absolute;
    bottom: 32px;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 12px 36px;
    font-size: 1.08rem;
    min-width: 180px;
  }
  .envelope-card.no-guest .btn-open,
  .envelope-card:not(.has-guest) .btn-open,
  .envelope-invite-text[hidden] ~ .btn-open,
  .envelope-invite-text[style*="none"] ~ .btn-open,
  .envelope-invite-text:empty ~ .btn-open {
    margin: 0 auto;
  }
  .photo-frame img {
    height: 100%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgba(0,0,0,0.95) 54%, rgba(0,0,0,0.8) 59%, rgba(0,0,0,0.55) 63%, rgba(0,0,0,0.25) 67%, rgba(0,0,0,0.08) 69%, transparent 71%);
    mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgba(0,0,0,0.95) 54%, rgba(0,0,0,0.8) 59%, rgba(0,0,0,0.55) 63%, rgba(0,0,0,0.25) 67%, rgba(0,0,0,0.08) 69%, transparent 71%);
  }
  .hero-edge-flower-left-top {
    left: -75px;
    bottom: 30px;
    width: 170px;
  }
  .hero-title-box { bottom: 58px; }
  .hero-names { width: 380px; font-size: 3.35rem; margin: 0 auto; }
  .hero-name-line { font-size: 3.35rem; line-height: 1.05; }
  .hero-name-groom { padding-left: 32px; }
  .hero-name-bride { padding-right: 32px; }
  .hero-names .amp,
  .hero-name-amp { font-size: 1.95rem; margin: -2px auto; }
  .hero-quote { font-size: 1.08rem; line-height: 1.55; font-style: italic !important; }
  :lang(zh) .hero-quote,
  html[lang^="zh"] .hero-quote,
  [data-lang="zh"] .hero-quote {
    font-size: 1.15rem !important;
    letter-spacing: 0.1em;
  }
  :lang(zh) .hero-invite-guest,
  html[lang^="zh"] .hero-invite-guest,
  [data-lang="zh"] .hero-invite-guest {
    font-size: 1.55rem !important;
  }
  #wedding-info { min-height: auto; padding-top: 48px; padding-bottom: 28px; padding-inline: 62px; }
  .card-flower-lotus-wrap { top: auto; right: auto; width: 220px; height: 145px; margin: -65px auto 14px; }
  #gallery {
    min-height: 0;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    padding: 28px 32px 28px;
  }
  #gallery .gallery-carousel {
    height: 470px !important;
    min-height: 470px !important;
  }
  #gallery .gallery-carousel.is-portrait {
    height: 470px !important;
    min-height: 470px !important;
    max-width: 760px;
  }
  #gallery .gallery-carousel.is-portrait .carousel-slide {
    width: min(295px, 50vw);
  }
  #gallery .gallery-carousel.is-landscape {
    height: 470px !important;
    min-height: 470px !important;
    max-width: 840px;
  }
  #gallery .gallery-carousel.is-landscape .carousel-slide {
    width: min(560px, 80vw);
  }
  #reception, #timeline, #countdown, #dresscode, #love-story, #guestbook, #gift, #venue { padding-inline: 62px; }
  .wishes-list { max-width: 560px; }
  .wish-author { font-size: 0.88rem !important; }
  .wish-time { font-size: 0.72rem !important; }
  .wish-message { font-size: 0.84rem !important; }
  #gift { max-width: none; }
  footer .gift-thankyou-text { white-space: normal; max-width: 470px; }
}

@media (prefers-reduced-motion: reduce) {
  .envelope-seal,
  .card-flower-lotus-right,
  .couple-side-img { animation: none !important; }
}
