/* =====================================================================
   THIỆP CƯỚI ONLINE — style.css
   Mỹ Linh & Thanh Dy — Phong cách cổ điển Việt Nam
   Bảng màu: Đỏ đô / Đỏ son / Vàng kim / Kem ngà
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. RESET & BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Khoá cuộn trang khi màn hình phong bì còn hiển thị */
body.locked { overflow: hidden; height: 100vh; }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }

/* Focus rõ ràng cho điều hướng bàn phím */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-maroon);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   2. DESIGN TOKENS
   --------------------------------------------------------------------- */
:root {
  --color-maroon: #6b1424;
  --color-maroon-dark: #4a0e19;
  --color-red: #a31f2d;
  --color-gold: #c9a227;
  --color-gold-dark: #9c7a1a;
  --color-gold-light: #e8d6a0;
  --color-gold-soft: #f1e4c2;
  --color-ivory: #fbf3e3;
  --color-cream: #fdf8ee;
  --color-paper: #f7ecd9;
  --color-text: #3d2416;
  --color-text-soft: #7a5c48;
  --color-white: #fffdf9;
  --color-blossom: #f3aebb;
  --color-symbol-warm: #d9822f;

  --font-script: 'Great Vibes', cursive;
  --font-round: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  --font-serif: 'Noto Serif', serif;

  --container: min(1080px, 90vw);
  --section-pad-y: clamp(4rem, 10vw, 7rem);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: .3s;
  --dur-base: .6s;
  --dur-slow: 1s;

  --shadow-soft: 0 20px 50px -20px rgba(74, 14, 25, .28);
  --shadow-gold: 0 6px 24px rgba(201, 162, 39, .35);
}

/* ---------------------------------------------------------------------
   3. TYPOGRAPHY DÙNG CHUNG
   --------------------------------------------------------------------- */
.section-kicker {
  display: inline-block;
  font-size: .74rem;
  letter-spacing: .3em;
  color: var(--color-gold-dark);
  font-weight: 600;
  margin-bottom: .6rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  color: var(--color-maroon);
  font-weight: 600;
  margin-bottom: .3rem;
}
.ornament-divider { color: var(--color-gold); margin: .6rem auto 1.4rem; width: fit-content; }

/* ---------------------------------------------------------------------
   4. LAYOUT CHUNG CỦA SECTION
   --------------------------------------------------------------------- */
.section {
  position: relative;
  padding: var(--section-pad-y) 1.5rem;
  text-align: center;
  overflow: hidden;
}
.section-inner { max-width: var(--container); margin-inline: auto; position: relative; z-index: 1; }
.section.intro, .section.gallery, .section.location, .section.gift { background: var(--color-paper); }

/* Vân giấy mỹ thuật rất nhẹ, không ảnh hưởng hiệu năng */
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 25%, rgba(201, 162, 39, .06) 0, transparent 40%),
    radial-gradient(circle at 82% 75%, rgba(107, 20, 36, .05) 0, transparent 40%);
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   5. HIỆU ỨNG XUẤT HIỆN KHI CUỘN (Fade In / Reveal)
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  .petal, .vinyl, .li-xi-envelope, .li-xi-coin, .scroll-cue span, .invite-card-badge, .music-item-eq span, .firework-particle { animation: none !important; display: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------
   6. CÁNH HOA RƠI
   --------------------------------------------------------------------- */
.petals-field { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.petal {
  position: absolute;
  top: -5%;
  background: linear-gradient(135deg, #ffe3ec, #ff8fab);
  border-radius: 150% 0 150% 0;
  will-change: transform;
  animation: petal-fall linear forwards;
}
@keyframes petal-fall {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(var(--drift, 30px), 112vh) rotate(360deg); }
}

/* ---------------------------------------------------------------------
   7. MÀN HÌNH THIỆP MỜI (ĐÓNG)
   --------------------------------------------------------------------- */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 40% 38%, var(--color-red) 0%, var(--color-maroon) 55%, var(--color-maroon-dark) 100%);
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}
.envelope-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.envelope-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2.5rem 1.5rem;
}

/* Nét doodle hoa mai + trái tim quanh thiệp */
/* Pháo hoa bừng sáng khi mở thiệp */
.fireworks-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; }
.firework-particle {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px 1px currentColor;
  animation: firework-burst .95s cubic-bezier(.15, .7, .3, 1) forwards;
}
@keyframes firework-burst {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(.25); opacity: 0; }
}

/* Thẻ thiệp mời */
.invite-card {
  position: relative;
  width: min(380px, 88vw);
  background: linear-gradient(165deg, var(--color-white) 0%, var(--color-cream) 55%, var(--color-gold-soft) 135%);
  border-radius: clamp(20px, 6vw, 28px);
  padding: clamp(2.6rem, 9vw, 3.4rem) clamp(1.4rem, 6vw, 2.2rem) clamp(2rem, 6vw, 2.6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(20, 3, 8, .55);
  transition: transform .7s var(--ease), opacity .7s var(--ease);
}
.invite-card.is-open { transform: scale(.9) translateY(-14px); opacity: 0; }

/* Hoa văn viền 4 góc thẻ */
.invite-card-corner { position: absolute; width: clamp(30px, 8vw, 40px); height: clamp(30px, 8vw, 40px); color: var(--color-gold); opacity: .6; pointer-events: none; }
.invite-card-corner--tl { top: .7rem; left: .7rem; }
.invite-card-corner--tr { top: .7rem; right: .7rem; transform: scaleX(-1); }
.invite-card-corner--bl { bottom: .7rem; left: .7rem; transform: scaleY(-1); }
.invite-card-corner--br { bottom: .7rem; right: .7rem; transform: rotate(180deg); }

.invite-card-badge {
  position: absolute;
  top: clamp(-34px, -9vw, -40px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(64px, 18vw, 80px);
  height: clamp(64px, 18vw, 80px);
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 10px rgba(255, 250, 244, .55), 0 10px 26px -6px rgba(163, 31, 45, .45);
  animation: badge-glow 3.2s ease-in-out infinite;
}
.invite-card-badge-symbol {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--color-symbol-warm);
}
@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 10px rgba(255, 250, 244, .55), 0 10px 26px -6px rgba(163, 31, 45, .45); }
  50%      { box-shadow: 0 0 0 14px rgba(255, 250, 244, .35), 0 10px 30px -4px rgba(163, 31, 45, .55); }
}

.invite-card-names {
  margin-top: 2.4rem;
  font-family: var(--font-round);
  color: var(--color-red);
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
}
.invite-card-name { display: block; }
.invite-card-amp {
  display: block;
  font-family: var(--font-serif);
  font-size: .9rem;
  font-weight: 400;
  color: var(--color-text-soft);
  margin: .15rem 0;
}

.invite-card-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 1.1rem 0;
  color: var(--color-gold-dark);
  font-size: .8rem;
}
.invite-card-divider::before, .invite-card-divider::after { content: ''; width: 32px; height: 1px; background: var(--color-gold); }

.invite-card-date { font-family: var(--font-serif); color: var(--color-text-soft); font-size: 1rem; }
.invite-card-tagline { font-family: var(--font-serif); color: var(--color-text-soft); font-size: .95rem; margin-top: .3rem; margin-bottom: 1.8rem; }

.btn-open-invitation {
  padding: .85rem 2.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-red), var(--color-maroon));
  color: var(--color-white);
  letter-spacing: .1em;
  font-size: .92rem;
  font-weight: 500;
  box-shadow: 0 12px 24px -8px rgba(163, 31, 45, .6);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.btn-open-invitation:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -8px rgba(163, 31, 45, .7); }
.btn-open-invitation:disabled { opacity: .5; pointer-events: none; transform: none; }

/* ---------------------------------------------------------------------
   8. NÚT NHẠC — ĐĨA THAN XOAY + BẢNG CHỌN BÀI
   --------------------------------------------------------------------- */
.music-widget { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 50; }
.music-btn {
  position: relative; z-index: 2;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--color-maroon);
  box-shadow: var(--shadow-soft);
  display: flex; align-items: center; justify-content: center;
}
.vinyl {
  width: 40px; height: 40px; border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--color-gold) 0 2px, var(--color-maroon-dark) 2px 4px);
  display: flex; align-items: center; justify-content: center;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
}
.vinyl-hole { width: 9px; height: 9px; border-radius: 50%; background: var(--color-ivory); }
.music-btn.is-playing .vinyl { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bảng chọn bài hát — hiện khi bấm vào đĩa than */
.music-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .7rem);
  width: min(260px, 72vw);
  background: var(--color-white);
  border: 1px solid var(--color-gold-light);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: .8rem .6rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.97);
  transform-origin: bottom right;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), visibility var(--dur-base) var(--ease);
}
.music-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.music-panel-title {
  font-family: var(--font-serif);
  color: var(--color-maroon);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .2rem .5rem .5rem;
  border-bottom: 1px solid var(--color-gold-soft);
  margin-bottom: .3rem;
}
.music-list { list-style: none; max-height: 220px; overflow-y: auto; }
.music-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .5rem;
  border-radius: 9px;
  font-size: .85rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease);
}
.music-item:hover { background: var(--color-paper); }
.music-item.is-active { color: var(--color-maroon); font-weight: 600; background: var(--color-gold-soft); }
.music-item-eq { display: flex; align-items: flex-end; gap: 2px; width: 12px; height: 12px; flex-shrink: 0; }
.music-item-eq span {
  width: 2.5px; background: var(--color-gold-dark); border-radius: 1px;
  height: 4px; animation: eq-bounce 1s ease-in-out infinite; animation-play-state: paused;
}
.music-item-eq span:nth-child(2) { animation-delay: .15s; }
.music-item-eq span:nth-child(3) { animation-delay: .3s; }
.music-item.is-active .music-item-eq span { animation-play-state: paused; height: 8px; }
.music-item.is-active.is-playing .music-item-eq span { animation-play-state: running; }
@keyframes eq-bounce { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.music-item-title { flex: 1; line-height: 1.3; }

/* ---------------------------------------------------------------------
   9. NÚT LÊN ĐẦU TRANG
   --------------------------------------------------------------------- */
.to-top-btn {
  position: fixed; right: 1.1rem; bottom: 5.1rem; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--color-white); color: var(--color-maroon);
  border: 1px solid var(--color-gold-light);
  box-shadow: var(--shadow-soft);
  font-size: 1.1rem;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), visibility var(--dur-base) var(--ease);
}
.to-top-btn.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------------------------------------------------------------------
   10. HERO
   --------------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--color-ivory), var(--color-cream));
  padding-top: 5rem; padding-bottom: 3rem;
}
.hero-corner { position: absolute; width: 70px; height: 70px; color: var(--color-gold-light); opacity: .8; }
.hero-corner--tl { top: 1.2rem; left: 1.2rem; }
.hero-corner--br { bottom: 1.2rem; right: 1.2rem; transform: rotate(180deg); }

.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; position: relative; z-index: 1; }
.eyebrow { letter-spacing: .38em; font-size: .9rem; color: var(--color-gold-dark); font-weight: 600; }

.hero-photo {
  position: relative;
  width: clamp(210px, 58vw, 300px);
  height: clamp(266px, 73vw, 380px);
  border-radius: 12px;
  overflow: hidden;
  border: 7px solid var(--color-white);
  box-shadow: 0 16px 30px -12px rgba(74, 14, 25, .4), 0 0 0 1px var(--color-gold-light);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: var(--color-gold-soft); color: var(--color-text-soft);
  font-size: .68rem; text-align: center; padding: 1rem;
}
.photo-fallback-icon { width: 30px; height: 30px; }
.photo-fallback code { font-size: .62rem; background: rgba(0, 0, 0, .06); padding: .1rem .3rem; border-radius: 4px; }

/* Cặp ảnh cô dâu + chú rể kiểu scrapbook, đặt lệch và nghiêng nhẹ như một trang ảnh dán tay */
.hero-scrapbook {
  position: relative;
  width: min(480px, 96vw);
  min-height: clamp(480px, 170vw, 690px);
  margin: 3.8rem auto .4rem;
}
.hero-scrapbook-title {
  position: absolute; top: -3.6rem; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  font-family: var(--font-round); font-weight: 800; color: var(--color-red);
  font-size: clamp(1.6rem, 6.5vw, 2.15rem); letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
  z-index: 5;
}
.hero-scrapbook-symbol {
  position: absolute; top: -1.3rem; right: 0;
  font-family: var(--font-serif); font-weight: 700; color: var(--color-symbol-warm);
  font-size: clamp(1.8rem, 6vw, 2.3rem); opacity: .92; transform: rotate(4deg);
  z-index: 5;
}
.hero-scrapbook-doodle { position: absolute; color: var(--color-blossom); pointer-events: none; }
.hero-scrapbook-doodle--swirl { width: clamp(44px, 12vw, 58px); top: 10%; right: 6%; }
.hero-scrapbook-doodle--heart { width: clamp(24px, 7vw, 30px); bottom: 2%; left: 1%; }

/* Ảnh minh hoạ dễ thương, hoà vào nền kem bằng chế độ blend multiply (chỉ giữ lại nét vẽ) */
.hero-scrapbook-cute {
  position: absolute;
  width: clamp(110px, 30vw, 165px);
  height: auto;
  mix-blend-mode: multiply;
  opacity: .9;
  pointer-events: none;
  filter: saturate(.9);
  z-index: 1;
}
/* Đặt vào 2 khoảng trống không bị 2 ảnh che: góc trên-phải và góc dưới-trái của khối scrapbook */
.hero-scrapbook-cute--girl { bottom: 10%; left: -4%; transform: rotate(-6deg); }
.hero-scrapbook-cute--boy  { top: 15%; right: -5%; transform: rotate(5deg); }

.hero-scrap-card { position: absolute; text-align: center; }
.hero-scrap-card--bride { left: 0; top: 0; transform: rotate(-7deg); z-index: 2; }
.hero-scrap-card--groom { right: -2%; top: clamp(205px, 54vw, 290px); transform: rotate(6deg); z-index: 3; }

.hero-title {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  color: var(--color-maroon);
  display: flex; align-items: center; gap: .45em;
  line-height: 1;
}
.hero-title-amp { color: var(--color-gold); font-size: .7em; }
.hero-date { font-family: var(--font-serif); font-size: 1rem; letter-spacing: .08em; color: var(--color-text-soft); }

.countdown { display: flex; align-items: center; gap: .55rem; margin-top: .4rem; }
.countdown-box {
  display: flex; flex-direction: column; align-items: center;
  min-width: 54px; padding: .6rem .3rem;
  background: var(--color-white); border: 1px solid var(--color-gold-light); border-radius: 10px;
}
.countdown-num { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; color: var(--color-maroon); }
.countdown-label { font-size: .6rem; letter-spacing: .1em; color: var(--color-text-soft); margin-top: .15rem; }
.countdown-sep { color: var(--color-gold); font-weight: 700; }

.scroll-cue {
  margin-top: 1.4rem; width: 22px; height: 36px;
  border: 1.5px solid var(--color-gold); border-radius: 20px;
  position: relative; display: block;
}
.scroll-cue span {
  position: absolute; top: 6px; left: 50%; width: 4px; height: 4px;
  background: var(--color-gold); border-radius: 50%; transform: translateX(-50%);
  animation: scroll-cue-move 1.6s ease infinite;
}
@keyframes scroll-cue-move {
  0% { top: 6px; opacity: 1; }
  70%, 100% { top: 20px; opacity: 0; }
}

/* ---------------------------------------------------------------------
   11. LỜI NGỎ
   --------------------------------------------------------------------- */
.intro-quote {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.3rem, 4vw, 1.7rem); color: var(--color-maroon);
  max-width: 42ch; margin: 0 auto;
}
.intro-body { max-width: 58ch; margin: 1.3rem auto 0; color: var(--color-text-soft); font-size: 1.18rem; line-height: 1.8; }

/* Khối trang trọng: hai gia đình + tên cô dâu chú rể, kiểu thiệp cưới truyền thống */
.parents-formal {
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center;
  gap: 1.6rem; margin-top: 2.8rem;
}
.parents-col { flex: 1 1 220px; max-width: 280px; text-align: center; }
.parents-heading { font-family: var(--font-serif); font-size: 1rem; color: var(--color-text-soft); margin-bottom: .5rem; }
.parents-names { font-family: var(--font-serif); font-weight: 700; color: var(--color-red); font-size: clamp(1.05rem, 2.6vw, 1.25rem); line-height: 1.5; margin-bottom: .5rem; }
.parents-address { font-size: .85rem; color: var(--color-maroon); opacity: .8; }
.parents-divider { width: 1px; align-self: stretch; background: var(--color-red); opacity: .45; min-height: 90px; }
@media (max-width: 560px) {
  .parents-divider { display: none; }
  .parents-col { border-bottom: 1px solid var(--color-gold-soft); padding-bottom: 1.4rem; }
  .parents-col:last-child { border-bottom: none; padding-bottom: 0; }
}

.formal-announcement {
  font-family: var(--font-serif); font-weight: 700; color: var(--color-red);
  font-size: clamp(1.05rem, 2.8vw, 1.3rem); line-height: 1.6;
  margin-top: 2.6rem; letter-spacing: .02em;
}

.formal-couple { margin-top: 1.6rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.formal-couple-name { font-family: var(--font-round); font-weight: 700; color: var(--color-red); font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.15; }
.formal-couple-role { font-size: .78rem; letter-spacing: .2em; color: var(--color-text-soft); text-transform: uppercase; margin-top: -.2rem; margin-bottom: .6rem; }
.formal-couple-amp { color: var(--color-gold-dark); font-family: var(--font-serif); font-size: 1.6rem; margin: .1rem 0; }

/* ---------------------------------------------------------------------
   12. THÔNG TIN TIỆC CƯỚI — thẻ giờ/ngày + lịch tháng mini (thay cho timeline cũ)
   --------------------------------------------------------------------- */
.btn-outline {
  display: inline-block; padding: .65rem 1.6rem;
  border: 1px solid var(--color-maroon); border-radius: 999px;
  color: var(--color-maroon); font-size: .84rem; letter-spacing: .04em;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-outline:hover { background: var(--color-maroon); color: var(--color-white); }

.ceremony-cc {
  max-width: 480px; margin: 2rem auto 0;
  background: var(--color-white); border: 1px solid var(--color-gold-light); border-radius: 24px;
  padding: 2.8rem 2.3rem 2.6rem; box-shadow: var(--shadow-soft);
}
.ceremony-cc .btn-outline { margin-top: 1.8rem; padding: .85rem 2.1rem; font-size: 1.05rem; }
.ceremony-cc-time { font-family: var(--font-serif); font-weight: 700; color: var(--color-red); font-size: clamp(2.8rem, 9vw, 3.5rem); }
.ceremony-cc-daterow {
  display: flex; align-items: baseline; justify-content: center; gap: .75rem;
  margin-top: .4rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-text-soft); font-size: 1.05rem;
}
.ceremony-cc-day { font-family: var(--font-serif); color: var(--color-maroon); font-size: 2.3rem; font-weight: 700; letter-spacing: 0; }
.ceremony-cc-year { color: var(--color-text-soft); font-size: 1.1rem; margin-top: .15rem; }
.ceremony-cc-hours {
  margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px dashed var(--color-gold-light);
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  font-size: 1.1rem; color: var(--color-text-soft);
}
.ceremony-cc-hours strong { color: var(--color-maroon); }
.ceremony-cc-hours-sep { color: var(--color-gold); }
.ceremony-cc-countdown-label { margin-top: 1.7rem; font-size: .9rem; letter-spacing: .25em; color: var(--color-gold-dark); font-weight: 600; }
.ceremony-cc-countdown-text { margin-top: .45rem; font-family: var(--font-serif); color: var(--color-red); font-size: 1.35rem; font-weight: 600; }

/* Lịch tháng mini kiểu sổ tay treo tường */
.mini-calendar {
  position: relative; margin: 2.1rem auto 0; max-width: 400px;
  background: var(--color-cream); border: 1px solid var(--color-gold-light); border-radius: 16px;
  padding: 2.3rem 1.3rem 1.5rem;
}
.mini-calendar::before {
  content: ''; position: absolute; top: -11px; left: 18%; right: 18%; height: 20px;
  background-image: radial-gradient(circle, var(--color-white) 0 6.5px, transparent 7px);
  background-repeat: repeat-x; background-size: 32px 20px; background-position: center;
  border-top: 3px solid var(--color-gold-light);
}
.mini-calendar-header { font-family: var(--font-serif); color: var(--color-maroon); font-weight: 700; font-size: 1.25rem; margin-bottom: .9rem; }
.mini-calendar-weekdays, .mini-calendar-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem;
}
.mini-calendar-weekdays span {
  font-size: .82rem; letter-spacing: .04em; color: var(--color-gold-dark); font-weight: 600;
}
.mini-calendar-days span {
  position: relative; font-size: 1.05rem; color: var(--color-text-soft);
  padding: .4rem 0; border-radius: 8px;
}
.mini-calendar-days span.is-empty { visibility: hidden; }
.mini-calendar-days span.is-event {
  color: var(--color-red); font-weight: 700; background: var(--color-gold-soft);
}
.mini-calendar-days span.is-event::after { content: '♥'; display: block; font-size: .7rem; line-height: 1; margin-top: 1px; }

.ceremony-address { margin-top: 1.6rem; color: var(--color-text-soft); font-size: 1.15rem; }

/* ---------------------------------------------------------------------
   13. ALBUM ẢNH + LIGHTBOX
   --------------------------------------------------------------------- */
.gallery-carousel {
  position: relative; margin-top: 2.5rem;
  height: clamp(320px, 52vw, 520px);
  display: flex; align-items: center; justify-content: center;
}

.carousel-track { position: relative; width: 100%; height: 100%; }

.carousel-slide {
  position: absolute; top: 50%; left: 50%;
  width: clamp(210px, 42vw, 380px); aspect-ratio: 3 / 4;
  border-radius: 14px; overflow: hidden; display: block;
  border: 1px solid var(--color-gold-light);
  box-shadow: 0 25px 50px rgba(59, 20, 12, .3);
  will-change: transform, opacity;
  transition: transform .6s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback--sm { font-size: .6rem; gap: .3rem; }
.photo-fallback--sm .photo-fallback-icon { width: 22px; height: 22px; }

/* Vị trí theo khoảng cách tới ảnh đang active — gán bằng JS qua data-pos */
.carousel-slide[data-pos="0"]  { transform: translate(-50%, -50%) scale(1);    opacity: 1;   z-index: 5; filter: none; cursor: default; box-shadow: 0 30px 60px -18px rgba(59, 20, 12, .4); }
.carousel-slide[data-pos="-1"] { transform: translate(-145%, -50%) scale(.78); opacity: .6;  z-index: 3; filter: blur(2px) brightness(.75); }
.carousel-slide[data-pos="1"]  { transform: translate(45%, -50%) scale(.78);   opacity: .6;  z-index: 3; filter: blur(2px) brightness(.75); }
.carousel-slide[data-pos="-2"] { transform: translate(-215%, -50%) scale(.6); opacity: .35;  z-index: 2; filter: blur(3.5px) brightness(.6); }
.carousel-slide[data-pos="2"]  { transform: translate(115%, -50%) scale(.6);  opacity: .35;  z-index: 2; filter: blur(3.5px) brightness(.6); }
.carousel-slide[data-pos="hidden"] { transform: translate(-50%, -50%) scale(.5); opacity: 0; z-index: 1; pointer-events: none; }

@media (min-width: 640px) {
  .carousel-slide[data-pos="-1"] { transform: translate(-155%, -50%) scale(.82); }
  .carousel-slide[data-pos="1"]  { transform: translate(55%, -50%) scale(.82); }
  .carousel-slide[data-pos="-2"] { transform: translate(-250%, -50%) scale(.68); }
  .carousel-slide[data-pos="2"]  { transform: translate(150%, -50%) scale(.68); }
}

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-white); color: var(--color-maroon);
  box-shadow: 0 8px 20px rgba(59, 20, 12, .18);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-arrow:hover { background: var(--color-gold-soft); transform: translateY(-50%) scale(1.06); }
.carousel-arrow--prev { left: 0; }
.carousel-arrow--next { right: 0; }
@media (min-width: 640px) { .carousel-arrow--prev { left: .5rem; } .carousel-arrow--next { right: .5rem; } }

.carousel-counter {
  text-align: center; margin-top: 1.1rem;
  font-family: var(--font-serif); font-size: .85rem; letter-spacing: .06em;
  color: var(--color-text-soft);
}

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 8, 10, .92);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) var(--ease), visibility var(--dur-base) var(--ease);
}
.lightbox.is-active { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 90vw; max-height: 80vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: scale(.92);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  will-change: transform, opacity;
}
.lightbox.is-active .lightbox-img { opacity: 1; transform: scale(1) translateX(0); }
/* Trượt + mờ theo hướng khi bấm ảnh trước/sau */
.lightbox-img.is-switching-next { opacity: 0; transform: scale(.96) translateX(-26px); }
.lightbox-img.is-switching-prev { opacity: 0; transform: scale(.96) translateX(26px); }
.lightbox-close, .lightbox-nav {
  position: absolute; color: var(--color-gold-light); font-size: 1.5rem;
  background: rgba(255, 255, 255, .1); width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease);
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .2); }
.lightbox-close { top: 1.2rem; right: 1.2rem; }
.lightbox-prev { left: .8rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .8rem; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------------
   14. CHUYỆN TÌNH YÊU (Timeline)
   --------------------------------------------------------------------- */
.timeline { position: relative; margin-top: 3rem; padding-left: 1.6rem; }
.timeline::before {
  content: ''; position: absolute; left: 1.6rem; top: 4px; bottom: 4px; width: 2px;
  background: linear-gradient(var(--color-gold-light), var(--color-gold));
}
.timeline-item { position: relative; padding: 0 0 2.5rem 2rem; text-align: left; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -.42rem; top: .3rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-white); border: 2px solid var(--color-red);
}
.timeline-date { font-size: .74rem; letter-spacing: .1em; color: var(--color-gold-dark); font-weight: 600; }
.timeline-content h3 { font-family: var(--font-serif); color: var(--color-maroon); margin: .3rem 0 .4rem; font-size: 1.1rem; }
.timeline-content p { color: var(--color-text-soft); font-size: .92rem; max-width: 46ch; }

@media (min-width: 860px) {
  .timeline { padding-left: 0; }
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline-item { width: 50%; padding: 0 2.6rem 2.6rem; }
  .timeline-item--left { margin-right: auto; text-align: right; }
  .timeline-item--right { margin-left: auto; text-align: left; }
  .timeline-item--left .timeline-content p { margin-left: auto; }
  .timeline-item--left .timeline-dot { right: -7px; left: auto; }
  .timeline-item--right .timeline-dot { left: -7px; }
}

/* ---------------------------------------------------------------------
   15. BẢN ĐỒ
   --------------------------------------------------------------------- */
.location-address { color: var(--color-text-soft); margin-bottom: 1.6rem; font-family: var(--font-serif); }
.map-frame {
  border-radius: 16px; overflow: hidden; margin-bottom: 1.6rem;
  box-shadow: var(--shadow-soft); border: 1px solid var(--color-gold-light);
}
.map-frame iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------------------------------------------------------------------
   16. RSVP
   --------------------------------------------------------------------- */
.rsvp-note { color: var(--color-text-soft); max-width: 46ch; margin: 0 auto 1rem; font-size: .92rem; }
.rsvp-form { max-width: 460px; margin: 1.6rem auto 0; text-align: left; display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .82rem; color: var(--color-text-soft); font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  padding: .75rem .9rem; border: 1px solid var(--color-gold-light); border-radius: 10px;
  background: var(--color-white); font-size: .95rem; color: var(--color-text); resize: vertical;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--color-maroon); }
.radio-group { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 400; color: var(--color-text); }
.btn-submit {
  padding: .9rem; border-radius: 999px; background: var(--color-maroon); color: var(--color-white);
  font-size: .95rem; letter-spacing: .05em; transition: background var(--dur-fast) var(--ease);
}
.btn-submit:hover { background: var(--color-maroon-dark); }
.rsvp-success { margin-top: 1.6rem; color: var(--color-maroon); font-family: var(--font-serif); font-size: 1.05rem; }

/* ---------------------------------------------------------------------
   17. MỪNG CƯỚI — BAO LÌ XÌ TƯƠNG TÁC (Điểm nhấn chính)
   --------------------------------------------------------------------- */
.gift-message { max-width: 50ch; margin: 0 auto 1rem; color: var(--color-text-soft); }

.li-xi {
  position: relative; width: 150px; margin: 2rem auto 0;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.li-xi-envelope {
  position: relative; width: 128px; height: 168px;
  background: linear-gradient(160deg, var(--color-red), var(--color-maroon));
  border: 2px solid var(--color-gold); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  animation: li-xi-glow 2.6s ease-in-out infinite;
}
@keyframes li-xi-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .3), var(--shadow-soft); }
  50%      { box-shadow: 0 0 28px 4px rgba(201, 162, 39, .45), var(--shadow-soft); }
}
.li-xi-seal {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-gold); color: var(--color-maroon-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem;
}
.li-xi-coin {
  position: absolute; color: var(--color-gold); font-size: .9rem;
  animation: li-xi-float 3s ease-in-out infinite; pointer-events: none;
}
.li-xi-coin--1 { top: -8px;  left: -16px; animation-delay: 0s; }
.li-xi-coin--2 { top: 34%;  right: -20px; animation-delay: .6s; }
.li-xi-coin--3 { bottom: 8%; left: -22px; animation-delay: 1.2s; }
@keyframes li-xi-float {
  0%, 100% { transform: translateY(0); opacity: .65; }
  50%      { transform: translateY(-8px); opacity: 1; }
}
.li-xi-hint { font-size: .78rem; letter-spacing: .1em; color: var(--color-text-soft); transition: opacity var(--dur-fast) var(--ease); }
.li-xi:hover .li-xi-envelope { transform: translateY(-4px); }
.li-xi.is-open .li-xi-envelope { transform: scale(.92) rotateX(18deg); opacity: .8; animation: none; }
.li-xi.is-open .li-xi-hint { opacity: 0; }
.li-xi.is-open .li-xi-coin { animation: none; opacity: 0; }

.gift-cards {
  display: grid; gap: 1.5rem; margin-top: 0;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .8s var(--ease), opacity .6s var(--ease), margin-top .6s var(--ease);
}
.gift-cards.is-open { max-height: 2200px; opacity: 1; margin-top: 1.8rem; }
@media (min-width: 640px) { .gift-cards { grid-template-columns: 1fr 1fr; } }

.gift-card {
  background: var(--color-white); border: 1px solid var(--color-gold-light); border-radius: 16px;
  padding: 2rem 1.4rem; box-shadow: var(--shadow-soft);
}
.gift-card h3 { font-family: var(--font-serif); color: var(--color-maroon); margin-bottom: 1rem; }
.qr-placeholder {
  width: 136px; height: 136px; margin: 0 auto 1rem;
  border: 1px dashed var(--color-gold); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  color: var(--color-text-soft); font-size: .64rem; padding: .5rem; text-align: center;
}
.qr-placeholder svg { width: 28px; height: 28px; }
.qr-placeholder code { font-size: .58rem; background: rgba(0, 0, 0, .06); padding: .05rem .25rem; border-radius: 4px; }
.bank-name { font-weight: 600; color: var(--color-text); }
.account-name { font-size: .85rem; color: var(--color-text-soft); margin: .2rem 0 .8rem; letter-spacing: .03em; }
.account-number { display: flex; align-items: center; justify-content: center; gap: .6rem; font-family: var(--font-serif); font-size: .98rem; flex-wrap: wrap; }
.btn-copy {
  font-size: .7rem; padding: .35rem .7rem; border: 1px solid var(--color-maroon); border-radius: 999px;
  color: var(--color-maroon); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-copy:hover { background: var(--color-maroon); color: var(--color-white); }
.btn-copy.is-copied { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-maroon-dark); }

/* ---------------------------------------------------------------------
   18. FOOTER
   --------------------------------------------------------------------- */
.footer { padding: 4rem 1.5rem 3rem; text-align: center; background: var(--color-maroon); color: var(--color-ivory); }
.footer-ornament { font-family: var(--font-serif); font-size: 1.7rem; color: var(--color-gold-light); margin-bottom: 1rem; }
.footer-thanks { max-width: 40ch; margin: 0 auto 1.2rem; opacity: .92; }
.footer-names { font-family: var(--font-script); font-size: 1.9rem; color: var(--color-gold-light); }
.footer-date { font-size: .78rem; letter-spacing: .2em; opacity: .75; margin-top: .3rem; }

/* ---------------------------------------------------------------------
   19. TINH CHỈNH RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 480px) {
  .countdown { gap: .34rem; }
  .countdown-box { min-width: 46px; padding: .5rem .2rem; }
  .li-xi-envelope { width: 108px; height: 142px; }
}