/* ==========================================================================
   Thiệp cưới — theme "minimalism dark red" (dựng lại bằng CSS thuần từ bản demo chungdoi.com)
   ========================================================================== */
:root {
  --red: #511419;
  --red-2: #590310;
  --red-deep: #380a0e;
  --cream: #ece4d8;
  --cream-70: rgba(236, 228, 216, .7);
  --paper: #fff7eb;
  --ink-72: rgba(81, 20, 25, .72);
  --serif: Cambria, "Baskerville", "Times New Roman", Times, serif;
  --times: Cambria, "Times New Roman", Times, serif;
  --script: "Viaoda Libre", "The Nautigal", "Times New Roman", serif;
  --page-w: 480px;
  --shadow-card: 4px 4px 10px rgba(0, 0, 0, .25);
  --ease-out: cubic-bezier(.22, .9, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--red);
  font-family: var(--times);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; font-weight: inherit; font-size: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@keyframes drFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float { display: block; animation: drFloat var(--fd, 6s) ease-in-out infinite; animation-delay: var(--fdl, 0s); will-change: transform; }

/* ---------- Khung trang ---------- */
.page {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  color: var(--red);
  min-height: 100vh;
}
.page__paper {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url(../theme/paper.webp) top center / 100% auto;
  mix-blend-mode: multiply; opacity: .5;
}

.castle {
  position: absolute; left: 50%; max-width: none; pointer-events: none;
  opacity: .1; transform: translateX(-50%); object-fit: contain; height: auto;
}

.h2 {
  position: relative; z-index: 1;
  font-family: var(--times); font-weight: 700; font-size: 20px;
  letter-spacing: .03em; text-transform: uppercase; text-align: center;
  color: var(--red);
}
.h2--light { color: var(--cream); }

/* Hoa trang trí */
.deco { position: absolute; z-index: 20; display: block; pointer-events: none; will-change: transform; }
.deco img { width: 100%; height: auto; max-width: none; filter: drop-shadow(3px 4px 3px rgba(0, 0, 0, .3)); }

/* ---------- Header (sau khi mở thiệp) ---------- */
.hero {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 36px 56px; text-align: center; overflow-x: clip;
}
.castle--hero { top: 26%; width: 170%; }
.hero__std {
  position: relative; z-index: 10;
  font-family: Cambria, "Cormorant Garamond", var(--times); font-weight: 400;
  font-size: clamp(18px, 5.4vw, 22px); letter-spacing: .16em; text-transform: uppercase; color: var(--red-2);
}
.env { position: relative; z-index: 10; margin-top: 96px; width: 82%; max-width: 330px; }
.env__box { position: relative; aspect-ratio: 333 / 384; }
.env__back { position: absolute; inset: 0; z-index: 10; width: 100%; height: auto; max-width: none; pointer-events: none; }
.env__front { position: absolute; left: 0; bottom: 0; z-index: 30; width: 100%; height: auto; max-width: none; pointer-events: none; }
.env__photo { position: absolute; left: 33%; top: -2%; z-index: 20; width: 64%; }
.env__frame {
  aspect-ratio: 221 / 309; transform: rotate(12deg);
  border: 7px solid #fff; background: #fff; box-shadow: 2px 2px 4px rgba(0, 0, 0, .25);
}
.env__frame img { width: 100%; height: 100%; object-fit: cover; }
.deco--env { left: -2%; top: -12%; z-index: 25; width: 42%; }
.deco--env img { transform: rotate(-17deg); }

/* Tên hai bạn trên MỘT dòng ngang: CAO BÁCH & TRẦN LOAN — cỡ chữ co theo bề rộng màn hình để luôn vừa một dòng */
.hero__names {
  position: relative; z-index: 10; margin-top: 64px; width: 100%;
  white-space: nowrap; font-size: calc((min(100vw, var(--page-w)) - 80px) / 13.3);
}
.hero__names p { font-family: var(--serif); font-weight: 400; font-size: 1em; line-height: 1.25; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
/* Trái tim nhỏ luôn ở CHÍNH GIỮA (thẳng hàng với trái tim/con dấu phía trên):
   3 cột bằng nhau hai bên — tên chú rể canh phải sát tim, tên cô dâu canh trái sát tim */
.hero__names, .cover__names { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: .3em; }
.hero__names > :first-child, .cover__names > :first-child { justify-self: end; margin-right: -.06em; }
.hero__names > :last-child, .cover__names > :last-child { justify-self: start; }
/* Trái tim đỏ thay cho dấu & (dùng chung cho dòng tên dưới phong bì và trên thẻ bìa) */
.hero__amp, .cover__names > .cover__amp { justify-self: center; display: inline-flex; width: .78em; height: .78em; color: #5e1620; filter: drop-shadow(0 1px 1px rgba(81, 20, 25, .25)); }
.hero__amp svg, .cover__amp svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- Thẻ đỏ ---------- */
.block { position: relative; z-index: 10; margin: 0 auto; width: 88%; max-width: 420px; }
.card { position: relative; overflow: hidden; text-align: center; box-shadow: var(--shadow-card); background: var(--red); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url(../theme/paper.webp) center / cover; mix-blend-mode: multiply; opacity: .4;
}
.card--r13 { border-radius: 13px; }
.card--r10 { border-radius: 10px; }
.card__inner { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.card--party { padding: 36px 20px; }

/* ---------- Thông tin lễ cưới: khung đỏ như bản gốc, bên trong 2 cột bố mẹ + ảnh chân dung ---------- */
.card--cp { padding: 36px 14px 40px; }
/* Lời mời: TRÂN TRỌNG KÍNH MỜI / tên khách (chữ viết tay) / ĐẾN DỰ LỄ THÀNH HÔN CỦA CHÚNG TÔI */
.cp-invite { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; text-align: center; }
.cp-invite__line {
  font-family: var(--serif); font-size: clamp(11px, 3.4vw, 14px); line-height: 1.6;
  letter-spacing: .12em; text-transform: uppercase; color: var(--cream);
}
.cp-invite__guest {
  padding: 2px 8px; font-family: "The Nautigal", var(--script); font-size: clamp(34px, 10vw, 46px); line-height: 1.25;
  color: #e6c992; overflow-wrap: anywhere;
}
.cp { width: 100%; display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; justify-items: center; align-items: start; }
.cp > * { min-width: 0; max-width: 100%; }
.cp > .l { grid-column: 1; }
.cp > .r { grid-column: 2; }
.cp__label {
  grid-row: 1; margin-bottom: 8px; font-family: var(--serif); font-weight: 700; font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--cream-70);
}
.cp__label:empty { margin: 0; }
.cp__f { grid-row: 2; }
.cp__m { grid-row: 3; }
.cp__parent {
  font-family: var(--serif); font-weight: 700; font-size: clamp(9.5px, 2.8vw, 11px); line-height: 1.45;
  text-transform: uppercase; white-space: nowrap; color: var(--cream);
}
.cp__addr { grid-row: 4; margin-top: 6px; padding: 0 2px; font-family: var(--serif); font-style: italic; font-size: clamp(9.5px, 2.7vw, 11px); line-height: 1.4; color: var(--cream-70); }
.cp__photo {
  grid-row: 5; margin-top: 16px; width: 100%; max-width: 160px; background: #fff; border: 4px solid #fff;
  box-shadow: 0 10px 20px -4px rgba(0, 0, 0, .45), 0 4px 8px -4px rgba(0, 0, 0, .3);
}
.cp__photo--groom { transform: rotate(-2deg); }
.cp__photo--bride { transform: rotate(2deg); }
.cp__photo img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #f1ebe4; }
.cp__heart {
  grid-column: 1 / 3; grid-row: 5; align-self: center; z-index: 2; margin-top: 16px; width: 28px; height: 28px;
  color: #f3e8de; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45)); animation: heartBeat 1.6s ease-in-out infinite;
}
.cp__heart svg { width: 100%; height: 100%; fill: currentColor; }
.cp__role { grid-row: 6; margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 16px; color: #dcbf8f; }
.cp__name { grid-row: 7; margin-top: 2px; font-family: var(--serif); font-size: clamp(12px, 3.5vw, 14px); letter-spacing: .05em; text-transform: uppercase; color: var(--cream); }

/* ---------- Album "Khoảnh khắc hạnh phúc": lưới 2 cột (máy tính 3 cột) + nút xem tất cả ---------- */
.album-wrap { position: relative; z-index: 10; overflow-x: clip; }
.castle--album { top: -6%; width: 150%; }
.album { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; padding: 48px 16px 40px; }
.album__grid {
  position: relative; z-index: 10; margin-top: 32px; width: 100%; max-width: 440px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.ag__cell { position: relative; overflow: hidden; border-radius: 8px; aspect-ratio: 3 / 4; cursor: pointer; background: rgba(81, 20, 25, .08); }
.ag__cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
@media (hover: hover) { .ag__cell:hover img { transform: scale(1.05); } }
.album__more {
  margin-top: 28px; padding: 12px 32px; border: 1px solid #b89564; border-radius: 999px; background: transparent;
  font-family: var(--serif); font-style: italic; font-size: 16px; color: #94703f; transition: background-color .3s, color .3s;
}
.album__more:hover, .album__more:active { background: #b89564; color: #fff; }

/* ---------- Tiệc cưới ---------- */
.block--party { margin-top: 40px; }
.deco--party { left: -18%; top: 10%; width: 24%; }
.party { display: flex; flex-direction: column; align-items: center; gap: 16px; font-family: var(--serif); color: var(--cream); width: 100%; }
.party__lead { font-size: min(20px, 5.25vw); text-transform: uppercase; white-space: nowrap; }
.party__tw {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-width: max-content; max-width: 130px; width: 100%;
  font-size: 13px; text-transform: uppercase; white-space: nowrap; color: var(--cream-70);
}
.party__date { display: flex; align-items: center; justify-content: center; gap: 16px; font-family: var(--times); }
.party__day { font-size: 40px; line-height: 1; }
.party__vr { width: 1px; height: 46px; background: rgba(236, 228, 216, .45); }
.party__my { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; font-size: 12px; text-transform: uppercase; }
.party__year { font-size: 18px; }
.party__lunar { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--cream-70); line-height: 1.6; }
.countdown { margin-top: 16px; display: flex; flex-direction: column; align-items: center; }
.countdown__title { font-size: 16px; color: var(--cream-70); }
.countdown__val { margin-top: 8px; font-size: 14px; color: var(--cream); font-variant-numeric: tabular-nums; }
.countdown__val b { font-weight: 700; font-size: 16px; }
.countdown__val.is-done { font-style: italic; max-width: 260px; line-height: 1.5; }

.calendar { margin-top: 12px; width: fit-content; max-width: 100%; overflow: hidden; border-radius: 10px; padding: 8px 16px 16px; background: var(--cream); }
.cal { width: 280px; max-width: 100%; color: var(--red); font-family: var(--serif); }
.cal__title { padding: 6px 0 8px; font-family: "The Nautigal", cursive; font-size: 25px; text-align: center; border-bottom: 1px solid rgba(81, 20, 25, .27); }
.cal__wd { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 2px solid var(--red); }
.cal__wd span { padding: 6px 0; text-align: center; font-size: 10px; font-weight: 500; opacity: .6; }
.cal__days { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; padding: 8px 4px; }
.cal__d { height: 30px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.cal__heart { position: relative; width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; }
.cal__heart svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--red); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15)); animation: heartBeat 1.6s ease-in-out infinite; }
.cal__heart b { position: relative; z-index: 1; font-size: 11px; font-weight: 700; color: #fff; }
@keyframes heartBeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
.party__addcal {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--times); font-size: 14px; color: var(--cream);
  text-decoration: underline; text-underline-offset: 4px;
}
.party__addcal svg { width: 16px; height: 16px; }

/* ---------- Nút chung ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font-family: var(--serif); font-size: 14px; letter-spacing: .02em; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.97); }
.btn--dark { background: var(--red); color: var(--cream); box-shadow: 0 4px 14px rgba(81, 20, 25, .3); }
.btn--line { border: 1px solid var(--red); color: var(--red); background: rgba(255, 247, 235, .6); }
.btn--sm { min-height: 38px; padding: 8px 18px; font-size: 13px; }
.linkbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 6px;
  font-family: var(--serif); font-size: 13px; color: var(--ink-72);
  text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn svg { width: 15px; height: 15px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  padding: 8px 24px; font-family: var(--serif); font-size: 14px; letter-spacing: .025em;
  transition: transform .2s;
}
.pill:active { transform: scale(.97); }
@media (hover: hover) { .pill:hover { transform: scale(1.03); } }
.pill--cream { background: var(--cream); color: var(--red); }

/* ---------- Tiêu đề mục kiểu "chữ giãn + gạch vàng" (Thông tin buổi tiệc, Album) ---------- */
.sec-title { font-weight: 400; font-size: 18px; line-height: 1.6; letter-spacing: .3em; }
.sec-line { display: block; width: 64px; height: 1px; margin-top: 16px; background: #b89564; }

/* ---------- Thông tin buổi tiệc: mỗi bên một thẻ (điện thoại xếp dọc, máy tính 2 cột) + bản đồ ---------- */
.venues { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; padding: 56px 16px 0; text-align: center; }
.venues__list { margin-top: 32px; width: 100%; max-width: 440px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.venue {
  display: flex; flex-direction: column; align-items: center; padding: 36px 16px 22px; border-radius: 24px;
  background: rgba(255, 253, 249, .8); border: 1px solid rgba(81, 20, 25, .07);
  box-shadow: 0 6px 24px -8px rgba(81, 20, 25, .14);
}
.venue__ev { width: 100%; }
.venue__ev + .venue__ev::before { content: ""; display: block; width: 72px; height: 1px; margin: 26px auto; background: rgba(81, 20, 25, .14); }
.venue__ttl { font-family: var(--serif); font-size: 17px; font-weight: 400; letter-spacing: .15em; text-transform: uppercase; color: #8e2a31; }
.venue__time { margin-top: 12px; font-family: var(--serif); font-size: 18px; color: #3a1a1d; }
.venue__date { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.5; color: #a5804d; }
.venue__place { margin-top: 28px; width: 100%; }
.venue__place:first-child { margin-top: 0; }
.venue__name { font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: .02em; text-transform: uppercase; color: #3a1a1d; }
.venue__addr { margin-top: 4px; font-family: var(--serif); font-style: italic; font-size: 14px; line-height: 1.5; color: rgba(81, 20, 25, .68); }
.venue__map {
  position: relative; width: 100%; margin-top: 22px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  background: #f3eadc; border: 5px solid #fff; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .2);
}
.venue__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .5s; }
.venue__map iframe.is-loaded { opacity: 1; }
.venue__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: #f6eee2; }
.venue__ph svg { width: 32px; height: 32px; color: var(--red); }
.venue__ph p { font-family: var(--serif); font-size: 13px; color: var(--ink-72); }
.venue__ph:not(.is-failed) .btn { display: none; }
.venue__btns { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.venue__btns .btn { padding: 10px 14px; font-size: 13px; gap: 6px; }
.venue__btns .btn svg { width: 16px; height: 16px; }
.venue .linkbtn { margin-top: 6px; }

/* ---------- Mừng cưới ---------- */
.gift-sec { position: relative; z-index: 10; margin: 48px auto 0; width: 88%; max-width: 420px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.gift-sec__intro { margin-top: 10px; font-family: var(--serif); font-size: 13px; line-height: 1.55; color: var(--ink-72); max-width: 320px; }
.gifts { margin-top: 18px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.gift { border-radius: 13px; }
.gift__head {
  position: relative; z-index: 10; width: 100%; min-height: 60px;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px; text-align: left; color: var(--cream);
}
.gift__head > svg:first-child { width: 26px; height: 26px; flex: none; opacity: .9; }
.gift__ttl { flex: 1; font-family: var(--serif); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.gift__chev { width: 20px; height: 20px; flex: none; transition: transform .3s var(--ease-out); }
.gift.is-open .gift__chev { transform: rotate(180deg); }
.gift__body { position: relative; z-index: 10; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.gift.is-open .gift__body { grid-template-rows: 1fr; }
.gift__clip { overflow: hidden; }
.gift__in { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 18px 22px; color: var(--cream); font-family: var(--serif); }
.gift__qr { width: 190px; aspect-ratio: 1; border-radius: 12px; background: #fff; padding: 8px; margin-bottom: 8px; object-fit: contain; }
.gift__bank { font-size: 13px; color: var(--cream-70); text-transform: uppercase; letter-spacing: .08em; }
.gift__no { font-family: var(--times); font-size: 24px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.gift__name { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.gift__copy { margin-top: 10px; }

/* ---------- RSVP ---------- */
.block--rsvp { margin-top: 48px; }
.card--rsvp { padding: 32px 22px; }
.card--rsvp .card__inner { gap: 16px; }
.rsvp-intro { font-family: var(--serif); font-size: 13px; line-height: 1.6; color: var(--cream-70); max-width: 300px; }
.rsvp-done { font-family: var(--serif); font-size: 14px; color: var(--cream); }

/* ---------- Gửi lời chúc (sổ lưu bút): thẻ form + danh sách lời chúc ---------- */
.wishes { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; padding: 56px 16px 48px; text-align: center; }
.wishes__grid { margin-top: 36px; width: 100%; max-width: 440px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.wf {
  padding: 28px 22px; border-radius: 24px; background: #fff; border: 1px solid #f3eee9; text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .04);
}
.wf__label { display: block; margin: 0 0 8px 4px; font-family: var(--serif); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(81, 20, 25, .5); }
.wf__input {
  display: block; width: 100%; margin-bottom: 18px; padding: 12px 16px; border: 0; border-radius: 12px;
  background: #f8f6f4; color: #2a1416; font-family: var(--serif); font-size: 16px; line-height: 1.45; outline: none; transition: box-shadow .2s;
}
.wf__input:focus { box-shadow: 0 0 0 2px rgba(184, 149, 100, .35); }
.wf__ta { min-height: 120px; margin-bottom: 6px; resize: vertical; }
.wf__suggest { margin: 0 0 18px 4px; padding: 4px 0; font-family: var(--serif); font-size: 13px; color: #94703f; text-decoration: underline; text-underline-offset: 3px; }
.wf__send {
  width: 100%; padding: 16px; border-radius: 12px; background: #a83232; color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 10px 15px -3px rgba(127, 29, 29, .22); transition: background-color .2s, transform .2s, opacity .2s;
}
.wf__send:hover { background: #8b2929; }
.wf__send:active { transform: scale(.99); }
.wf__send:disabled { opacity: .6; cursor: not-allowed; }
.wl { position: relative; }
.wl__list {
  max-height: 440px; overflow-y: auto; padding: 2px 6px 28px 2px; display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(184, 149, 100, .45) transparent;
}
.wl__list::-webkit-scrollbar { width: 4px; }
.wl__list::-webkit-scrollbar-thumb { background: rgba(184, 149, 100, .45); border-radius: 10px; }
.wl__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(to top, var(--paper), rgba(255, 247, 235, 0)); pointer-events: none; opacity: 0; transition: opacity .3s; }
.wl.is-overflow .wl__fade { opacity: 1; }
.wl__empty { padding: 40px 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: 15px; color: rgba(81, 20, 25, .45); }
.wish {
  padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid #f5f1ed; text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: box-shadow .2s;
}
@media (hover: hover) { .wish:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .08); } }
.wish__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.wish__name { font-family: var(--serif); font-weight: 700; font-size: 15px; color: #2a1416; overflow-wrap: anywhere; }
.wish__tag { flex: none; padding-top: 3px; font-family: var(--serif); font-size: 9px; font-style: italic; letter-spacing: .05em; text-transform: uppercase; color: #c9bfb8; }
.wish__msg { font-family: var(--serif); font-size: 15px; line-height: 1.65; color: #6b5e5f; white-space: pre-line; overflow-wrap: anywhere; }
.wish.is-new { border-color: rgba(184, 149, 100, .55); animation: wishIn .7s var(--ease-out); }
@keyframes wishIn { from { opacity: 0; transform: translateY(-10px); } }

.form-status { min-height: 0; margin-top: 10px; font-family: var(--serif); font-size: 13px; line-height: 1.45; text-align: center; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #2f6b3a; }
.form-status.is-err { color: #a3262f; }
.form-status.is-info { color: var(--ink-72); }

/* ---------- Lời kết ---------- */
/* Lời kết: MỘT dòng chữ viết tay mềm (Great Vibes), có ngoặc kép; JS tự thu nhỏ cho vừa một dòng.
   Chừa chỗ phía dưới cho nút nhạc. */
.foot { position: relative; z-index: 10; padding: 8px 16px calc(128px + env(safe-area-inset-bottom)); text-align: center; }
.foot__msg {
  display: inline-block; max-width: none; margin: 0 auto; white-space: nowrap;
  font-family: "Great Vibes", cursive; font-weight: 400; font-size: 26px; line-height: 1.5; color: #a83232;
}
.foot__msg::before { content: "\201C"; }
.foot__msg::after { content: "\201D"; }

/* ---------- Nút nhạc ---------- */
.music {
  position: fixed; z-index: 40; width: 48px; height: 48px; border-radius: 50%;
  bottom: calc(56px + env(safe-area-inset-bottom));
  right: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .25), 0 4px 6px -4px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.music:active { transform: scale(.95); }
.music__disc { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(to bottom right, rgba(81, 20, 25, .8), #511419, rgba(81, 20, 25, .87)); }
.music__disc i { position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); }
.music__disc b { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(to top right, rgba(255, 255, 255, .3), transparent 50%); }
.music.is-playing .music__disc { animation: spinCd 3s linear infinite; }
@keyframes spinCd { to { transform: rotate(360deg); } }
.music__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 16px 0; }
.music__bars i { width: 4px; border-radius: 4px; background: #fff; height: 30%; }
.music.is-playing .music__bars i { animation: dance .9s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-duration: .7s; animation-delay: -.2s; }
.music.is-playing .music__bars i:nth-child(3) { animation-duration: 1s; animation-delay: -.4s; }
.music.is-playing .music__bars i:nth-child(4) { animation-duration: .8s; animation-delay: -.1s; }
@keyframes dance { 0%, 100% { height: 20%; } 50% { height: 100%; } }
.music__off { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; transform: translate(-50%, -50%); color: #fff; opacity: 0; }
.music:not(.is-playing) .music__bars { opacity: 0; }
.music:not(.is-playing) .music__off { opacity: 1; }

/* ==========================================================================
   MÀN BÌA
   ========================================================================== */
.cover {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: linear-gradient(to bottom right, #6e1a20, #511419, #380a0e);
  touch-action: none; overscroll-behavior: contain;
  transition: opacity .7s ease;
}
.cover.is-fading { opacity: 0; pointer-events: none; }
.cover__hearts { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.cover__hearts > span { position: absolute; top: -30px; line-height: 0; animation: ambientFall var(--dur, 20s) ease-in-out var(--delay, 0s) infinite; }
.cover__hearts svg { width: 1em; height: 1em; fill: currentColor; }
@keyframes ambientFall {
  0% { transform: translateY(-8vh) translateX(0) rotate(0); opacity: 0; }
  10% { opacity: .5; }
  50% { transform: translateY(48vh) translateX(var(--sway, 20px)) rotate(180deg); opacity: .6; }
  92% { opacity: .45; }
  100% { transform: translateY(105vh) translateX(0) rotate(360deg); opacity: 0; }
}
.cover__wrap { position: relative; z-index: 10; width: 310px; opacity: 0; transform: translateY(14px); }
.is-ready .cover__wrap { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s var(--ease-out); }
@media (min-width: 640px) { .cover__wrap { width: 340px; } }
.cover__seal {
  position: absolute; left: 50%; top: 50px; z-index: 30; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #511419, #330000);
  box-shadow: 0 4px 20px rgba(81, 20, 25, .5), inset 0 2px 4px rgba(255, 255, 255, .3);
  transform: translate(-50%, -50%);
  animation: sealPulse 2s ease-in-out infinite;
}
.cover__seal svg { width: 28px; height: 28px; fill: #f3e8de; }
@keyframes sealPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 4px 20px rgba(81, 20, 25, .5), inset 0 2px 4px rgba(255, 255, 255, .3); }
  50% { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 6px 35px rgba(81, 20, 25, .5), inset 0 2px 4px rgba(255, 255, 255, .3); }
}
.cover__card {
  position: relative; border-radius: 8px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .2), 0 0 40px rgba(81, 20, 25, .15);
}
.cover__bg {
  position: absolute; inset: 0; overflow: hidden; border-radius: 8px;
  background: rgba(255, 250, 243, .96); border: 1px solid rgba(81, 20, 25, .15);
}
.cover__flower { position: absolute; height: 144px; width: auto; max-width: none; opacity: .8; pointer-events: none; }
.cover__flower--tl { top: -5%; left: -10px; transform: translateX(-6%) rotate(25deg); }
.cover__flower--br { bottom: -5%; right: -10px; transform: translateX(6%) rotate(-25deg) scaleX(-1); }
.cover__content { position: relative; z-index: 10; padding: 100px 24px 52px; text-align: center; }
.cover__std {
  margin-bottom: 14px; font-family: Cambria, "Cormorant Garamond", var(--times); font-weight: 400;
  font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: rgba(89, 3, 16, .85);
}
/* Tên trên thẻ bìa: MỘT dòng ngang CAO BÁCH & TRẦN LOAN (JS tự thu nhỏ nếu tên dài) */
.cover__names {
  margin: 4px 0 10px; width: 100%;
  white-space: nowrap; font-family: var(--serif); font-weight: 400; font-size: 19.5px; line-height: 1.3; color: var(--red);
}
@media (min-width: 640px) { .cover__names { font-size: 22px; } }
@media (min-width: 768px) { .cover__names { font-size: 26px; } }
@media (min-width: 1024px) { .cover__names { font-size: 28px; } }
.cover__names > span { letter-spacing: .06em; text-transform: uppercase; }
.cover__orn { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; color: var(--red); }
.cover__orn i { width: 40px; height: 1px; background: linear-gradient(to right, transparent, var(--red)); }
.cover__orn i:last-child { background: linear-gradient(to left, transparent, var(--red)); }
.cover__orn span { font-size: 14px; opacity: .7; }
.cover__date { margin-bottom: 18px; font-family: Cambria, "Lora", var(--times); font-size: 18px; letter-spacing: .06em; color: var(--ink-72); }
.cover__invite {
  margin: 0 auto 24px; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: Cambria, "Lora", var(--times); font-size: 16px; color: var(--ink-72);
}
/* Tên khách: cùng chữ viết tay The Nautigal với tên khách trong thiệp (thẻ đỏ) */
.cover__guest { font-family: "The Nautigal", var(--script); font-weight: 400; font-size: 38px; line-height: 1.2; color: var(--red); overflow-wrap: anywhere; }
.cover__btn {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  width: fit-content; margin: 0 auto; padding: 10px 32px; border-radius: 999px;
  background: var(--red); color: #f3e8de; box-shadow: 0 4px 14px rgba(81, 20, 25, .35);
  font-family: Cambria, "Lora", var(--times); font-size: 18px; font-weight: 600;
  -webkit-user-select: none; user-select: none; transition: transform .2s;
}
.cover__btn:active { transform: scale(.96); }
.cover__btn i {
  position: absolute; top: 0; left: -100%; width: 32px; height: 100%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine { 0% { left: -100%; } 50%, 100% { left: 100%; } }

/* Hiệu ứng mở thiệp */
.cover.is-opening .cover__wrap { animation: envelopeAway 1.15s cubic-bezier(.55, 0, .3, 1) forwards; }
.cover.is-opening .cover__seal { animation: sealBurst .55s ease-out forwards; }
@keyframes envelopeAway {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  15% { transform: translateY(10px) rotate(.5deg); opacity: 1; }
  100% { transform: translateY(-120vh) rotate(-2deg); opacity: 0; }
}
@keyframes sealBurst {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}
.burst { position: fixed; left: 50%; top: 50%; z-index: 60; pointer-events: none; line-height: 0; }
.burst svg { width: 1em; height: 1em; fill: currentColor; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lb {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center;
  height: 100vh; height: 100dvh; padding: 48px 0 calc(16px + env(safe-area-inset-bottom));
  background: rgba(8, 2, 3, .96); touch-action: none; overscroll-behavior: contain;
  animation: fadeIn .25s ease;
}
body.is-locked .music { opacity: 0; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lb__top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.lb__count { padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .4); color: #fff; font-family: system-ui, sans-serif; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.lb__close { width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 22px; font-family: system-ui, sans-serif; }
.lb__stage { position: relative; flex: 1; width: 100%; min-height: 0; overflow: hidden; }
.lb__track { position: absolute; inset: 0; display: flex; will-change: transform; }
.lb__track.is-anim { transition: transform .32s var(--ease-out); }
.lb__slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.lb__slide img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.lb__nav {
  position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%;
  color: #fff; font-size: 30px; line-height: 1; font-family: system-ui, sans-serif; background: rgba(0, 0, 0, .25);
}
.lb__nav--prev { left: 4px; }
.lb__nav--next { right: 4px; }
@media (hover: none) { .lb__nav { display: none; } }
.lb__thumbs {
  flex: none; display: flex; gap: 8px; margin-top: 12px; padding: 8px; max-width: 92vw;
  overflow-x: auto; border-radius: 8px; background: rgba(0, 0, 0, .3); scrollbar-width: none;
  touch-action: pan-x;
}
.lb__thumbs::-webkit-scrollbar { display: none; }
.lb__thumb { flex: none; width: 48px; height: 48px; border-radius: 6px; overflow: hidden; opacity: .55; transition: opacity .2s, transform .2s; }
.lb__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb__thumb[aria-current="true"] { opacity: 1; transform: scale(1.05); outline: 2px solid var(--cream); outline-offset: 2px; }
@media (min-width: 640px) {
  .lb__thumb { width: 64px; height: 64px; }
  .lb__slide { padding: 0 56px; }
}

/* ==========================================================================
   HỘP XÁC NHẬN THAM DỰ
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
.modal__box {
  position: relative; width: 100%; max-width: 420px; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  padding: 30px 22px 24px; border-radius: 24px; background: #fff; color: #2a1416;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .4); font-family: var(--serif);
  animation: popIn .3s var(--ease-out);
}
@keyframes popIn { from { transform: scale(.95); opacity: 0; } }
.modal__x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f3eee8; color: #6b5a5c; }
.modal__x svg { width: 16px; height: 16px; }
/* Form xác nhận tham dự — cùng kiểu với form "Gửi lời chúc" */
.modal__title { padding-right: 36px; font-family: var(--serif); font-size: 19px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.modal__title::after { content: ""; display: block; width: 48px; height: 1px; margin-top: 12px; background: #b89564; }
.modal__sub { margin: 14px 0 6px; font-size: 14px; line-height: 1.55; color: #7a6a6c; }
.f-label { display: block; margin: 18px 0 8px 4px; font-size: 10px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: rgba(81, 20, 25, .5); }
.f-opt { letter-spacing: .05em; text-transform: none; font-style: italic; color: #a99b9c; }
.f-input {
  display: block; width: 100%; padding: 12px 16px; border: 0; border-radius: 12px;
  background: #f8f6f4; color: #2a1416; font: inherit; font-size: 16px; outline: none; transition: box-shadow .2s;
}
.f-input:focus { box-shadow: 0 0 0 2px rgba(184, 149, 100, .35); }
.f-ta { resize: none; }
.f-choices { display: flex; flex-direction: column; gap: 8px; }
.f-choice {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; background: #f8f6f4; font-size: 15px; color: #3d2a2c;
  transition: border-color .2s, background-color .2s;
}
.f-choice__ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #ebe4de; color: #8a7a7c; transition: background-color .2s, color .2s; }
.f-choice__ic svg { width: 16px; height: 16px; }
.f-choice:has(input:checked), .f-choice.is-checked { border-color: #a83232; background: #fdf6f4; }
.f-choice:has(input:checked) .f-choice__ic, .f-choice.is-checked .f-choice__ic { background: #a83232; color: #fff; }
.f-choice:has(input:focus-visible) { outline: 2px solid #a83232; outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border-radius: 12px; overflow: hidden; background: #f8f6f4; }
.stepper button { width: 46px; height: 46px; font-size: 20px; color: #a83232; }
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 40px; text-align: center; font-size: 17px; font-weight: 700; }
.f-submit {
  margin-top: 22px; width: 100%; padding: 16px; border-radius: 12px; background: #a83232; color: #fff;
  font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 10px 15px -3px rgba(127, 29, 29, .22); transition: background-color .2s, transform .2s, opacity .2s;
}
.f-submit:not(:disabled):hover { background: #8b2929; }
.f-submit:disabled { opacity: .4; cursor: not-allowed; }
.f-submit:not(:disabled):active { transform: scale(.99); }

/* Thông báo nhỏ */
.toast {
  position: fixed; left: 50%; bottom: calc(120px + env(safe-area-inset-bottom)); z-index: 90;
  max-width: min(86vw, 360px); padding: 10px 18px; border-radius: 999px;
  background: rgba(42, 9, 12, .92); color: var(--cream); font-family: var(--serif); font-size: 14px; text-align: center;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   MÁY TÍNH / MÁY TÍNH BẢNG (≥768px) — theo đúng kích thước bản demo
   ========================================================================== */
@media (min-width: 768px) {
  :root { --page-w: 900px; }
  .page { border: 1px solid rgba(81, 20, 25, .13); }

  /* Màn bìa */
  .cover__wrap { width: 520px; }
  .cover__flower { height: 280px; }
  .cover__flower--tl { top: -2%; transform: translateX(-11%) rotate(25deg); }
  .cover__flower--br { bottom: 35%; transform: translateX(11%) rotate(-25deg) scaleX(-1); }
  .cover__content { padding: 96px 24px 32px; }
  .cover__invite { max-width: 380px; }
  .cover__guest { font-size: 44px; }

  /* Đầu thiệp */
  .hero__std { font-size: 26px; }
  .env { margin-top: 112px; max-width: 420px; }
  .hero__names { margin-top: 80px; font-size: 50px; }

  /* Thẻ thông tin */
  .block, .gift-sec { max-width: 560px; }
  .block--cp { max-width: 760px; }
  .card--cp { padding: 48px 40px 52px; }
  .cp-invite__line { font-size: 15px; }
  .cp-invite__guest { font-size: 54px; }
  .cp { margin-top: 8px; column-gap: 56px; }
  .cp__label { font-size: 14px; }
  .cp__parent { font-size: 18px; }
  .cp__addr { font-size: 13px; }
  .cp__photo { margin-top: 24px; max-width: 260px; border-width: 8px; }
  .cp__heart { margin-top: 24px; width: 40px; height: 40px; }
  .cp__role { margin-top: 20px; font-size: 22px; }
  .cp__name { font-size: 20px; }

  /* Album */
  .album { padding: 64px 24px 48px; }
  .sec-title { font-size: 28px; }
  .venues { padding: 72px 24px 0; }
  .venues__list { max-width: 840px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .venues__list.is-single { grid-template-columns: minmax(0, 440px); justify-content: center; }
  .venue { padding: 44px 28px 28px; }
  .venue__ttl { font-size: 20px; }
  .venue__time { font-size: 20px; }
  .venue__date { font-size: 17px; }
  .venue__name { font-size: 18px; }
  .venue__addr { font-size: 15px; }
  .album__grid { max-width: 760px; grid-template-columns: repeat(3, 1fr); }

  /* Tiệc cưới */
  .party { gap: 20px; }
  .party__lead { font-size: 26px; }
  .party__tw { font-size: 15px; }
  .party__day { font-size: 46px; }
  .party__my { font-size: 16px; }
  .party__year { font-size: 24px; }
  .party__lunar { font-size: 16px; }
  .countdown__val { font-size: 18px; }
  .countdown__val b { font-size: 20px; }
  .cal { width: 330px; }
  .cal__wd span { font-size: 11px; }
  .cal__d { height: 34px; font-size: 13px; }
  .cal__heart { width: 30px; height: 28px; }
  .cal__heart b { font-size: 12px; }

  /* Bản đồ, mừng cưới, xác nhận */
  .gift-sec__intro, .rsvp-intro { font-size: 14px; max-width: 420px; }

  /* Gửi lời chúc */
  .wishes { padding: 72px 24px 56px; }
  .wishes__grid { max-width: 860px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
  .wf { padding: 32px; }
  .wl__list { height: 450px; max-height: none; }

  /* Lời kết */
  .foot__msg { font-size: 40px; }
}
@media (min-width: 1024px) {
  .cover__wrap { width: 600px; }
  .cover__invite { max-width: 440px; }
}

/* ==========================================================================
   Giảm chuyển động
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .float, .cover__hearts, .cover__btn i { animation: none !important; }
  .cover__hearts { display: none; }
  .deco { transform: none !important; }
}
