/* ============================================================
   THÙY DƯƠNG & HOÀNG ANH - THIỆP NHÀ GÁI
   Tone trắng hồng pastel, cổng rèm lụa
   ============================================================ */
:root {
  --white: #FFFFFF;
  --cream: #FFFAFA;
  --blush-50: #FDF1F3;
  --blush-100: #FBE4E8;
  --blush-200: #F6CFD7;
  --rose: #E7A1AF;
  --rose-deep: #C7697D;
  --ink: #5B4348;
  --ink-soft: #8C7277;
  --champagne: #D9B98C;

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Quicksand', system-ui, -apple-system, sans-serif;

  --radius: 26px;
  --shadow: 0 18px 50px rgba(199, 105, 125, 0.14);
  --shadow-soft: 0 8px 24px rgba(199, 105, 125, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
main { overflow-x: clip; }

/* ---------- Hiệu ứng xuất hiện ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-revealed { opacity: 1; transform: none; }

.reveal-on-open { opacity: 0; transition: opacity 2.2s ease calc(var(--d, 0s) + 0.5s); }
body.invitation-open .reveal-on-open { opacity: 1; }

/* Cả trang hiện mờ dần sau tấm rèm */
main, .site-footer { transition: opacity 2.4s ease 0.3s; }
body:not(.invitation-open) main, body:not(.invitation-open) .site-footer { opacity: 0; }

/* ============================================================
   1. CỔNG RÈM LỤA
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 9999;
  overflow: hidden; cursor: pointer;
  background: transparent;
  transition: opacity 0.8s ease, visibility 0s 0.8s;
}
.gate.is-open { pointer-events: none; }
.gate.is-done { opacity: 0; visibility: hidden; }

/* Hai tấm rèm: nếp gấp lụa bằng gradient lặp, vén sang hai bên và co lại như được buộc */
.curtain {
  position: absolute; top: 0; bottom: 0; width: 51%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 30%, rgba(199, 105, 125, 0.12)),
    repeating-linear-gradient(90deg,
      #F9DCE2 0px, #FBE7EB 14px, #FFF5F7 26px, #F7D3DA 40px, #F2C3CD 52px, #F9DCE2 64px);
  box-shadow: inset 0 0 60px rgba(199, 105, 125, 0.18);
  transition: transform 2.2s cubic-bezier(0.7, 0, 0.2, 1), filter 2.2s ease;
  will-change: transform;
}
.curtain-left { left: 0; transform-origin: left center; border-right: 1px solid rgba(217, 185, 140, 0.6); }
.curtain-right { right: 0; transform-origin: right center; border-left: 1px solid rgba(217, 185, 140, 0.6); }
.gate.is-open .curtain-left { transform: translateX(-62%) scaleX(0.38) skewY(2deg); filter: brightness(1.03); }
.gate.is-open .curtain-right { transform: translateX(62%) scaleX(0.38) skewY(-2deg); filter: brightness(1.03); }

/* Diềm rèm phía trên: các vòng cung lượn sóng */
.valance {
  position: absolute; top: 0; left: 0; right: 0;
  height: calc(52px + env(safe-area-inset-top));
  background: linear-gradient(180deg, #EDB4C0, #F4C9D2);
  box-shadow: 0 4px 14px rgba(199, 105, 125, 0.15);
  transition: transform 1.6s cubic-bezier(0.7, 0, 0.2, 1) 0.5s;
}
.valance::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 20px;
  background: radial-gradient(circle at 20px 0, #F4C9D2 19px, transparent 20px) 0 0 / 40px 20px repeat-x;
  filter: drop-shadow(0 3px 3px rgba(199, 105, 125, 0.15));
}
.gate.is-open .valance { transform: translateY(calc(-100% - 24px)); }

.gate-center {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 0 24px; text-align: center;
  transition: opacity 0.6s ease, transform 0.9s ease;
}
.gate.is-open .gate-center { opacity: 0; transform: translateY(-50%) scale(1.15); }

.gate-kicker {
  font-family: var(--font-serif); font-style: italic; font-size: 1.05rem;
  letter-spacing: 4px; text-transform: uppercase; color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.75); padding: 6px 18px; border-radius: 999px;
}

/* Con dấu sáp hồng */
.seal {
  width: 132px; height: 132px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #F4B6C2, #DC8396 55%, #C7697D 100%);
  box-shadow:
    0 0 0 7px rgba(220, 131, 150, 0.35),
    0 0 0 14px rgba(255, 255, 255, 0.55),
    0 16px 36px rgba(199, 105, 125, 0.4),
    inset 0 -6px 14px rgba(120, 40, 60, 0.25),
    inset 0 6px 12px rgba(255, 255, 255, 0.35);
  animation: sealIn 1s var(--ease) both, sealPulse 2.4s ease-in-out 1s infinite;
}
.seal-mono {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-serif); font-size: 2.6rem; font-weight: 500; line-height: 1;
  color: #FFF4F6; text-shadow: 0 1px 2px rgba(120, 40, 60, 0.35);
}
.seal-mono i { font-style: normal; font-size: 1.2rem; }
@keyframes sealIn { from { opacity: 0; transform: scale(0.6) rotate(-20deg); } }
@keyframes sealPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.gate-guest { font-family: var(--font-serif); font-size: 1.15rem; color: var(--ink); background: rgba(255, 255, 255, 0.8); padding: 8px 20px; border-radius: 999px; }
.gate-guest strong { font-weight: 600; color: var(--rose-deep); }

.gate-hint {
  position: absolute; left: 0; right: 0; bottom: calc(10vh + env(safe-area-inset-bottom));
  text-align: center; font-size: 0.85rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--rose-deep); animation: hintFade 1.8s ease-in-out infinite; transition: opacity 0.4s ease;
}
.gate.is-open .gate-hint { opacity: 0; animation: none; }
.hint-heart { display: inline-block; margin-right: 6px; animation: beat 1.4s infinite; }
@keyframes hintFade { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* ============================================================
   CÁNH HOA, NHẠC, MENU
   ============================================================ */
#petal-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99; }

.music-toggle {
  position: fixed; z-index: 1000; top: calc(14px + env(safe-area-inset-top)); right: 14px;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--blush-200);
  background: rgba(255, 255, 255, 0.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--rose-deep); font-size: 1.1rem; cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: flex; align-items: center; justify-content: center;
}
.music-toggle.is-on .music-icon { display: inline-block; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-nav {
  position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; gap: 2px; padding: 6px;
  background: rgba(255, 255, 255, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--blush-100); border-radius: 999px; box-shadow: var(--shadow);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.site-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 0; padding: 6px 10px; border-radius: 999px; text-decoration: none;
  font-size: 0.64rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.site-nav a i { font-style: normal; font-size: 1.05rem; line-height: 1.2; }
.site-nav a.is-active { background: var(--blush-100); color: var(--rose-deep); }
body:not(.invitation-open) .site-nav { opacity: 0; pointer-events: none; }
body.is-typing .site-nav { opacity: 0; pointer-events: none; transform: translate(-50%, 20px); }

/* ============================================================
   CHUNG
   ============================================================ */
.section { padding: 84px 18px; }
.section-head { text-align: center; margin-bottom: 36px; }
.script-title { font-family: var(--font-script); font-size: 2.6rem; line-height: 1.2; color: var(--rose-deep); }
.script-title.light { color: #fff; }
.section-title {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.6rem, 6.5vw, 2.3rem);
  letter-spacing: 1px; color: var(--ink); margin-top: 2px;
}
.section-sub { max-width: 460px; margin: 10px auto 0; color: var(--ink-soft); font-size: 0.95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 28px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #EBA9B7, var(--rose-deep));
  color: #fff; font-weight: 700; letter-spacing: 0.5px; text-decoration: none;
  box-shadow: 0 10px 24px rgba(199, 105, 125, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; }

/* ============================================================
   2. ẢNH BÌA
   ============================================================ */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 250, 250, 0) 30%, rgba(253, 241, 243, 0.82) 52%, rgba(255, 250, 250, 0.96) 66%, var(--cream) 80%);
}
.hero-content {
  position: relative; width: 100%; text-align: center;
  padding: 0 20px calc(110px + env(safe-area-inset-bottom));
}
.hero-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 5px; text-transform: uppercase; color: var(--rose-deep); }
.hero-names { display: flex; flex-direction: column; align-items: center; font-weight: 400; margin: 6px 0 10px; }
.hero-names span { font-family: var(--font-script); font-size: clamp(3.2rem, 15vw, 5rem); line-height: 1.05; color: var(--ink); white-space: nowrap; padding: 0 8px; }
.hero-names i { font-style: normal; color: var(--rose-deep); font-size: 1.3rem; line-height: 1.4; }
.hero-date {
  display: inline-block; padding: 8px 22px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--blush-200);
  font-family: var(--font-serif); font-size: 1.1rem; letter-spacing: 3px; color: var(--ink);
}
.hero-sub { margin-top: 12px; font-size: 0.78rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-soft); }

/* ============================================================
   3. THƯ MỜI
   ============================================================ */
.invite-section { background: var(--cream); padding-top: 40px; }
.letter {
  position: relative; max-width: 560px; margin: 0 auto; text-align: center;
  padding: 46px 22px 40px; background: #fff; border-radius: 6px;
  box-shadow: var(--shadow);
}
/* Viền ren lượn sóng hai mép trên dưới */
.letter::before, .letter::after {
  content: ''; position: absolute; left: 0; right: 0; height: 14px;
  background: radial-gradient(circle at 10px 0, transparent 9px, #fff 10px) 0 0 / 20px 14px repeat-x;
}
.letter::before { top: -13px; transform: rotate(180deg); }
.letter::after { bottom: -13px; }
.letter { border-top: 4px solid var(--blush-100); border-bottom: 4px solid var(--blush-100); }

.guest-line { margin-top: 4px; font-family: var(--font-serif); font-size: 1.3rem; color: var(--rose-deep); }
.invite-text { margin-top: 12px; font-size: 0.95rem; color: var(--ink-soft); }
.invite-names {
  margin-top: 10px; font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(1.4rem, 6.6vw, 2.2rem); color: var(--ink); white-space: nowrap;
}
.invite-names i { font-style: normal; color: var(--rose-deep); font-size: 0.7em; padding: 0 4px; }
.family-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px;
  font-size: clamp(0.8rem, 3.5vw, 0.95rem);
}
.family-grid > div { background: var(--blush-50); border-radius: 16px; padding: 14px 6px; }
.family-grid p:not(.family-label) { white-space: nowrap; line-height: 1.7; }
.family-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--rose-deep); margin-bottom: 4px; }
.flourish { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 18px; color: var(--rose); }
.flourish span { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--rose)); }
.flourish span:last-child { transform: scaleX(-1); }
.quote { font-family: var(--font-serif); font-style: italic; font-size: 1rem; color: var(--ink-soft); }

/* ============================================================
   4. CẶP ĐÔI
   ============================================================ */
.couple-section { background: linear-gradient(180deg, var(--cream), var(--blush-50)); }
.couple-pair {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px;
  max-width: 640px; margin: 0 auto;
}
.person { text-align: center; }
.person-photo {
  aspect-ratio: 3 / 4; border-radius: 999px 999px 24px 24px; overflow: hidden;
  border: 5px solid #fff; box-shadow: var(--shadow);
  isolation: isolate; transform: translateZ(0);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.person figcaption { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.role { font-size: 0.7rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--rose-deep); }
.person strong { font-family: var(--font-script); font-weight: 400; font-size: clamp(1.9rem, 8.5vw, 2.6rem); line-height: 1.15; color: var(--ink); white-space: nowrap; }
.person small { font-size: 0.8rem; color: var(--ink-soft); }
.pair-heart {
  width: 40px; height: 40px; border-radius: 50%; margin-top: -60px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--rose-deep); font-size: 1.1rem; box-shadow: var(--shadow-soft);
  animation: beat 1.8s infinite;
}

/* ============================================================
   5. LỊCH TRÌNH
   ============================================================ */
.events-section { background: var(--blush-50); }
.timeline { list-style: none; max-width: 520px; margin: 0 auto; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 39px; top: 10px; bottom: 10px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--blush-200) 0 6px, transparent 6px 12px);
}
.tl-item { position: relative; display: flex; gap: 16px; align-items: stretch; margin-bottom: 18px; }
.tl-date {
  position: relative; z-index: 1; flex: 0 0 80px; height: 80px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--blush-200); box-shadow: var(--shadow-soft);
}
.tl-date b { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 500; line-height: 1; color: var(--ink); }
.tl-date span { font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.tl-body { flex: 1; background: #fff; border-radius: 20px; padding: 14px 18px; box-shadow: var(--shadow-soft); }
.tl-day { font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }
.tl-body h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; color: var(--ink); }
.tl-time { font-size: 1.15rem; font-weight: 700; color: var(--rose-deep); letter-spacing: 1px; }
.link-btn {
  margin-top: 4px; min-height: 36px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--blush-200); background: var(--blush-50);
  font-size: 0.8rem; font-weight: 700; color: var(--rose-deep);
}
.tl-item.main .tl-date { background: linear-gradient(135deg, #EBA9B7, var(--rose-deep)); border-color: transparent; }
.tl-item.main .tl-date b, .tl-item.main .tl-date span { color: #fff; }
.tl-item.main .tl-body { background: linear-gradient(135deg, #fff, var(--blush-100)); border: 1px solid var(--blush-200); }

.calendar-card {
  max-width: 400px; margin: 34px auto 0; padding: 24px 18px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-soft); text-align: center;
}
.cal-month { font-family: var(--font-serif); font-weight: 500; font-size: 1.3rem; margin-bottom: 14px; color: var(--ink); }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head span { font-size: 0.7rem; font-weight: 700; color: var(--ink-soft); padding-bottom: 6px; }
.cal-grid span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; border-radius: 50%; }
.cal-day.wedding { position: relative; color: #fff; font-weight: 700; z-index: 0; }
.cal-day.wedding::before {
  content: '♥'; position: absolute; inset: 0; z-index: -1;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.3rem; line-height: 1; color: var(--rose);
}
.cal-day.main::before { color: var(--rose-deep); }

.venue-card {
  max-width: 440px; margin: 34px auto 0; padding: 30px 22px; text-align: center;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--blush-100);
}
.venue-pin { width: 58px; height: 58px; margin: -58px auto 10px; border-radius: 50%; background: var(--blush-100); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; border: 4px solid #fff; }
.venue-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--rose-deep); }
.venue-name { font-family: var(--font-serif); font-weight: 500; font-size: 1.6rem; color: var(--ink); margin-top: 4px; }
.venue-addr { color: var(--ink-soft); margin: 4px 0 18px; }

/* ============================================================
   6. ĐẾM NGƯỢC
   ============================================================ */
.countdown-section {
  position: relative; padding: 90px 18px; text-align: center; overflow: hidden;
  background: url('assets/images/countdown-bg.jpg') center / cover no-repeat;
}
.countdown-section::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(199, 105, 125, 0.55), rgba(231, 161, 175, 0.7)); }
.countdown-inner { position: relative; }
.countdown-title { font-family: var(--font-serif); font-weight: 500; font-size: 1.6rem; color: #fff; margin-bottom: 26px; }
.countdown { display: flex; justify-content: center; gap: 10px; }
.cd-unit {
  width: 74px; height: 74px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 26px rgba(120, 40, 60, 0.2);
}
.cd-unit .num { font-family: var(--font-serif); font-size: 1.7rem; line-height: 1; color: var(--rose-deep); }
.cd-unit .txt { font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }

/* ============================================================
   7. ALBUM VUỐT NGANG
   ============================================================ */
.album-section { background: #fff; padding-left: 0; padding-right: 0; }
.album-section .section-head { padding: 0 18px; }
.album-quote { max-width: 520px; margin: 12px auto 0; font-family: var(--font-serif); font-style: italic; color: var(--ink-soft); }
.carousel-track {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 18px; padding: 6px 18px 18px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 auto; height: min(68vh, 520px); aspect-ratio: 2 / 3;
  scroll-snap-align: center; padding: 0; border: 4px solid #fff; border-radius: 22px; overflow: hidden;
  background: var(--blush-50); box-shadow: var(--shadow-soft); cursor: zoom-in;
  isolation: isolate; transform: translateZ(0);
}
.slide.wide { aspect-ratio: 3 / 2; max-width: 92vw; height: auto; align-self: center; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 6px; }
.car-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--blush-200);
  background: #fff; color: var(--rose-deep); font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.car-count { min-width: 64px; text-align: center; font-weight: 700; color: var(--ink-soft); letter-spacing: 1px; }

/* ============================================================
   8. XÁC NHẬN & LỜI CHÚC
   ============================================================ */
.rsvp-section { background: linear-gradient(180deg, var(--blush-50), var(--cream)); }
.form-card, .wishes-card {
  max-width: 560px; margin: 0 auto; padding: 26px 20px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.wishes-card { margin-top: 22px; }
.form-group { margin-bottom: 16px; border: none; }
.form-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
label, legend { display: block; font-size: 0.85rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
input[type="text"], input[type="tel"], select, textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--blush-100);
  background: var(--cream); font-family: inherit; font-size: 1rem; color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--rose-deep) 50%), linear-gradient(135deg, var(--rose-deep) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 32px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(231, 161, 175, 0.2); }
input.invalid { border-color: var(--rose-deep); }
textarea { resize: vertical; min-height: 90px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--blush-100);
  background: var(--cream); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  transition: all 0.2s ease;
}
.chip input:checked + span { background: var(--blush-100); border-color: var(--rose); color: var(--rose-deep); }
.chip input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }

.form-error { margin-top: 10px; color: var(--rose-deep); font-size: 0.88rem; font-weight: 600; text-align: center; }
.success-box { padding: 18px; border-radius: 18px; background: var(--blush-50); text-align: center; font-weight: 600; color: var(--rose-deep); }

.card-title { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; text-align: center; margin-bottom: 16px; color: var(--ink); }
.wishes { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 2px; }
.wishes-empty { text-align: center; color: var(--ink-soft); font-style: italic; padding: 20px 0; }
.wish-item { position: relative; background: var(--blush-50); border-radius: 4px 18px 18px 18px; padding: 12px 16px; }
.wish-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; margin-bottom: 2px; }
.wish-meta strong { color: var(--rose-deep); }
.wish-meta span { color: var(--ink-soft); white-space: nowrap; }
.wish-item p { font-size: 0.92rem; color: var(--ink); overflow-wrap: anywhere; }

/* ============================================================
   9. FOOTER
   ============================================================ */
.site-footer {
  text-align: center; padding: 70px 20px calc(120px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--cream), var(--blush-100));
}
.footer-photo {
  width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  border: 6px solid #fff; box-shadow: var(--shadow); isolation: isolate; transform: translateZ(0);
}
.footer-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.footer-thanks { margin-top: 18px; font-size: 0.78rem; font-weight: 700; letter-spacing: 6px; text-transform: uppercase; color: var(--rose-deep); }
.footer-names { display: flex; flex-direction: column; align-items: center; margin: 6px 0 12px; }
.footer-names span { font-family: var(--font-script); font-size: clamp(2.6rem, 12vw, 3.4rem); line-height: 1.1; color: var(--ink); white-space: nowrap; }
.footer-names i { font-style: normal; color: var(--rose-deep); font-size: 1.1rem; }
.footer-text { max-width: 420px; margin: 0 auto; font-family: var(--font-serif); font-style: italic; color: var(--ink-soft); }
.footer-copy { margin-top: 22px; font-size: 0.8rem; color: var(--ink-soft); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 10005; overscroll-behavior: contain; touch-action: pan-y;
  display: flex; align-items: center; justify-content: center;
  background: rgba(60, 35, 42, 0.92);
}
.lightbox[hidden] { display: none; }
.lb-figure { max-width: 92vw; max-height: 86vh; text-align: center; }
.lb-figure img { max-width: 92vw; max-height: 80vh; border-radius: 14px; margin: 0 auto; }
.lb-figure figcaption { color: #fff; margin-top: 10px; font-size: 0.85rem; letter-spacing: 2px; }
.lb-close, .lb-nav {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 1.8rem; line-height: 1;
}
.lb-close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   MÀN HÌNH LỚN
   ============================================================ */
@media (min-width: 769px) {
  .section { padding: 110px 24px; }
  .script-title { font-size: 3rem; }
  .hero-content { padding-bottom: 120px; }
  .letter { padding: 60px 48px 50px; }
  .couple-pair { gap: 30px; }
  .slide { height: min(64vh, 560px); }
  .cd-unit { width: 96px; height: 96px; }
  .cd-unit .num { font-size: 2.2rem; }
  .form-card, .wishes-card { padding: 34px 32px; }
  .site-nav a { min-width: 76px; font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
