/* =====================================================================
   Thiệp cưới Đức Dương & Cẩm Ly — style dựng lại theo mẫu traditional-01
   ===================================================================== */
:root {
  --red: #8E0101;
  --red-dark: #6B0000;
  --door-red: #820000;
  --gold: #DAA520;
  --gold-soft: #C9A24C;
  --pink-bg: #FFF8F8;
  --pink-bg-2: #FFFAFA;
  --ink: #000;
  --ink-85: rgba(0, 0, 0, .85);
  --ink-78: rgba(0, 0, 0, .78);
  --ink-68: rgba(0, 0, 0, .68);
  --ink-62: rgba(0, 0, 0, .62);
  --font-sans: 'Montserrat', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-script: 'Imperial Script', 'Ephesis', 'Dancing Script', cursive;
  --gutter: clamp(32px, 9vw, 40px); /* lề trong, tránh đè dải hoa văn 2 bên */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: #FCFCFC;
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
img { user-select: none; -webkit-user-drag: none; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: rgba(142, 1, 1, .18); }

.script { font-family: var(--font-script); font-weight: 400; }

/* ---------- Trái tim bay (canvas) ---------- */
.hearts {
  position: fixed; inset: 0; z-index: 40;
  pointer-events: none;
}

/* ---------- Nút vàng (màn mở thiệp) ---------- */
.btn-gold {
  padding: 12px 36px;
  font: 600 14px/1.2 var(--font-sans);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--door-red); background: var(--gold);
  border: 0; border-radius: 9999px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .45), 0 0 18px rgba(218, 165, 32, .25);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s;
}
.btn-gold:hover { transform: scale(1.05); }
.btn-gold:active { transform: scale(.95); }

/* ---------- Màn mở thiệp (cửa đôi) ---------- */
.door { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; }
.door__inner { position: relative; width: 100%; max-width: 430px; height: 100%; overflow: hidden; }
.door__panel {
  position: absolute; top: 0; height: 100%; width: 50%;
  background: var(--door-red);
  transition: transform .85s cubic-bezier(.33, 1, .68, 1);
}
.door__panel--left { left: 0; }
.door__panel--right { right: 0; overflow: hidden; }
.door__pattern {
  position: absolute; inset: 0; pointer-events: none;
  background: url('../img/deco/cloud.svg') repeat;
  background-size: 120px auto;
  opacity: .1;
}
.door__panel--right .door__pattern { left: -100%; }
.door.open .door__panel--left { transform: translateX(calc(-100% - 40px)); }
.door.open .door__panel--right { transform: translateX(100%); }
/* Mặt trước thiệp: thông tin + ấn 囍 (mờ dần khi cửa mở) */
.door__front {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 28px 150px; text-align: center; pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.door.open .door__front { opacity: 0; transform: scale(.96); }
.door__eyebrow {
  font: 500 12px/1.4 var(--font-sans); letter-spacing: .34em; text-transform: uppercase;
  color: rgba(218, 165, 32, .9);
}
.door__names {
  margin-top: 10px; padding: 0 6px;
  font-size: calc(clamp(2.1rem, 9.2vw, 2.6rem) * var(--fit-scale, 1)); line-height: 1.2; white-space: nowrap;
  color: var(--gold); text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
.door__divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 14px; }
.door__divider span { width: 44px; height: 1px; background: rgba(218, 165, 32, .55); }
.door__divider i { font-style: normal; font-size: 10px; color: var(--gold); }
.door__event {
  margin-bottom: 8px;
  font: 600 13.5px/1.4 var(--font-sans); letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 1px 8px rgba(0, 0, 0, .25);
}
.door__time {
  font: 500 12.5px/1.5 var(--font-sans); letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 244, 214, .85);
}
.door__day {
  margin-top: 4px;
  font: 700 clamp(1.45rem, 6vw, 1.7rem)/1.2 var(--font-sans); letter-spacing: .12em;
  color: #FFF6E3; text-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}
.door__venue {
  margin-top: 8px; font: 400 11.5px/1.5 var(--font-sans); letter-spacing: .06em;
  color: rgba(255, 244, 214, .6);
}
.door__seal {
  position: relative; margin-top: 30px;
  background: none; border: 0; pointer-events: auto;
}
.door__seal-box {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: var(--door-red);
  border: 2.5px solid var(--gold); border-radius: 4px;
  outline: 1.5px solid rgba(218, 165, 32, .4); outline-offset: 3px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform .2s;
}
.door__seal:hover .door__seal-box { transform: scale(1.1); }
.door__seal:active .door__seal-box { transform: scale(.95); }
.door__hy {
  font: 700 52px/1 'Songti SC', 'STSong', 'SimSun', 'Noto Serif CJK SC', serif;
  color: var(--gold);
}
.door.is-shaking .door__seal-box { animation: seal-shake .55s ease-in-out; }
.door__seal-glow {
  position: absolute; inset: -26px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(218, 165, 32, .35) 0%, transparent 70%);
  opacity: 0; transform: scale(.85);
}
.door.is-shaking .door__seal-glow { animation: seal-glow .55s ease-in-out infinite; }
.door__cta {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: center;
  padding-bottom: 56px;
  transition: opacity .4s ease, transform .4s ease;
}
.door.open .door__cta { opacity: 0; transform: translateY(8px); pointer-events: none; }
.door.gone { display: none; }

@keyframes seal-shake {
  0%, 40%, 100% { transform: rotate(0); }
  5% { transform: rotate(-7deg); }
  10% { transform: rotate(5deg); }
  15% { transform: rotate(-4deg); }
  20% { transform: rotate(3deg); }
  25% { transform: rotate(-1.5deg); }
  30% { transform: rotate(1deg); }
}
@keyframes seal-glow {
  0%, 100% { opacity: 0; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ---------- Khung thiệp ---------- */
.card {
  max-width: 430px; margin: 0 auto;
  position: relative; overflow: hidden;
  background: #fff;
  border-left: 1px solid #F4F4F5; border-right: 1px solid #F4F4F5;
  isolation: isolate;
}
.card__frame {
  position: absolute; inset: 0; z-index: -1;
  background: url('../img/deco/greek-key.svg') repeat-y;
  background-size: 100% auto;
  pointer-events: none; user-select: none;
}

/* ---------- Reveal khi cuộn ---------- */
.rv { opacity: 0; transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
.rv[data-reveal="up"] { transform: translateY(40px); }
.rv[data-reveal="down"] { transform: translateY(-40px); }
.rv[data-reveal="left"] { transform: translateX(-40px); }
.rv[data-reveal="right"] { transform: translateX(40px); }
.rv[data-reveal="scale"] { transform: scale(.95); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Tiêu đề section ---------- */
.sec { position: relative; overflow: hidden; }
.sec__head { text-align: center; margin-bottom: 28px; }
.sec__title {
  font: 600 clamp(1.05rem, 4.4vw, 1.2rem)/1.3 var(--font-sans);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--red);
}
.sec__sub { font-style: italic; font-size: 13px; margin-top: 6px; color: rgba(0, 0, 0, .65); }

.eyebrow {
  font: 500 13.5px/1.4 var(--font-sans);
  letter-spacing: .3em; text-transform: uppercase;
  text-align: center;
}
.eyebrow--red { color: var(--red); padding: 20px 0 8px; }

/* ============ 1. COUPLE ============ */
.sec--couple { padding: 16px 0 4px; }
.couple__names {
  text-align: center; padding: 8px 24px 8px;
  font-size: calc(clamp(1.85rem, 7.5vw, 2.35rem) * var(--fit-scale, 1));
  line-height: 1.25; white-space: nowrap; color: var(--ink);
}
.couple__hy { display: flex; justify-content: center; margin: 8px 0; }
.couple__hy img { width: 80px; height: 80px; }
.couple__date { position: relative; text-align: center; padding: 0 80px; margin: 4px 0 16px; }
.couple__knot {
  position: absolute; top: 50%; width: 64px; height: auto;
  opacity: .85; transform: translateY(-70%);
}
.couple__knot--l { left: 32px; }
.couple__knot--r { right: 32px; transform: translateY(-70%) scaleX(-1); }
.couple__time { font: 500 13.5px/1.5 var(--font-sans); color: var(--ink-78); }
.couple__day {
  font: 700 clamp(1.3rem, 5vw, 1.7rem)/1.3 var(--font-sans);
  letter-spacing: .1em; color: var(--ink);
}
.photo { overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo--3x4 { aspect-ratio: 3 / 4; }
.photo--4x3 { aspect-ratio: 4 / 3; }
.photo--b3 { border: 3px solid var(--red); border-radius: 4px; }
.couple__photo { width: 60%; margin: 0 auto; }
.couple__invite { text-align: center; margin-top: 20px; padding: 0 var(--gutter); }
.couple__invite-label {
  font: 600 13.5px/1.5 var(--font-sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(0, 0, 0, .82); margin-bottom: 4px;
}
.couple__invite-guest { font-size: 1.55rem; color: rgba(0, 0, 0, .82); }

/* ============ 2. FAMILY ============ */
.sec--family { padding: 0 var(--gutter) 32px; }
.family__ornament { display: flex; justify-content: center; margin-bottom: 8px; }
.family__ornament img { width: 144px; height: auto; }
.family__cols {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px;
  align-items: center; text-align: center;
}
.family__cols > * { min-width: 0; }
.family__parents { display: flex; flex-direction: column; justify-content: center; align-self: center; }
.family__label {
  font: 700 12px/1.4 var(--font-sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 12px; align-self: end;
}
.family__member {
  font-size: calc(13.5px * var(--fit-scale, 1));
  line-height: 1.375; white-space: nowrap; color: var(--ink);
}
.family__member + .family__member { margin-top: 4px; }
.family__concai { font-size: calc(12.5px * var(--fit-scale, 1)); white-space: nowrap; font-style: italic; color: rgba(0, 0, 0, .7); margin-top: 10px; align-self: start; }
.family__addr { font-size: 12px; line-height: 1.55; color: rgba(0, 0, 0, .62); margin-top: 12px; align-self: start; }
.family__map {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin-top: 6px; align-self: start;
  font: 500 12px/1.4 var(--font-sans);
  color: var(--red); text-decoration: underline; text-underline-offset: 2px;
  transition: opacity .2s;
}
.family__map:hover { opacity: .7; }

/* ============ 3. HOME ============ */
.sec--home { padding: 24px 0; width: 100%; }
.home__intro { text-align: center; padding: 0 var(--gutter); margin-bottom: 20px; }
.home__lead {
  font: 600 12.5px/1.8 var(--font-sans);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); white-space: pre-line;
}
.home__lead--mt { margin-top: 12px; }
.home__names { margin-top: 4px; }
.home__name {
  font-size: calc(clamp(2.2rem, 8vw, 2.75rem) * var(--fit-scale, 1));
  line-height: 1.15; white-space: nowrap; color: var(--ink);
}
.home__amp {
  font-size: calc(clamp(1.2rem, 4vw, 1.5rem) * var(--fit-scale, 1));
  letter-spacing: .1em; margin: 6px 0; color: rgba(0, 0, 0, .62);
}
.home__photo { margin: 0 var(--gutter); }
.home__photo .photo--b3 { border-radius: 3px; }
.home__mono { display: flex; flex-direction: column; align-items: center; margin: 20px 0; }
.mono { position: relative; width: 148px; height: 148px; }
.mono__frame { position: absolute; inset: 0; width: 100%; height: 100%; transform: translate(6px, -6px); }
.mono__letters { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mono__letters p { font-size: 1.9rem; line-height: 1; color: var(--red); }
.mono__l1 { margin-bottom: -.15em; }
.mono__l2 { margin-left: .4em; }
.home__trio { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 0 var(--gutter) 16px; }
.home__trio .photo { flex: 1; aspect-ratio: 3 / 4; border: 2.5px solid var(--red); border-radius: 3px; }
.home__trio .photo:nth-child(2) { margin-bottom: 20px; }

/* ============ 4. INVITATION ============ */
.sec--invitation { padding: 8px 0 32px; }
.invitation__fan {
  position: absolute; bottom: 108px; right: -10px; width: 160px;
  opacity: .15; transform: rotate(-45deg); transform-origin: right bottom; z-index: 0;
  pointer-events: none;
}
.invitation__wrap { margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 10px 20px; border-radius: 9999px;
  font: 500 13px/1.4 var(--font-sans);
  border: 1px solid rgba(142, 1, 1, .55);
  background: #fff; color: var(--red);
  transition: all .25s;
}
.tab:hover { background: #FFF5F5; }
.tab.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.events { border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .6); }
.event { text-align: center; padding: 20px 16px; }
.event + .event { border-top: 1px solid rgba(0, 0, 0, .08); }
.event__name {
  font: 700 16px/1.4 var(--font-sans);
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--red); margin-bottom: 12px;
}
.event__time {
  font: 500 14px/1.5 var(--font-sans);
  color: var(--ink); text-decoration: underline; text-underline-offset: 2px;
  margin-bottom: 8px;
}
.event__wday { font-size: 13.5px; color: var(--ink-78); margin-bottom: 8px; }
.event__date { display: inline-flex; align-items: center; font: 700 16px/1.3 var(--font-sans); color: var(--ink); text-transform: uppercase; }
.event__date .m { margin: 0 8px; color: rgba(0, 0, 0, .45); }
.event__date .d { color: var(--red); font-size: 1.35em; }
.event__lunar { font-size: 13px; font-style: italic; margin-top: 6px; color: rgba(0, 0, 0, .68); }
.event__addr { margin-top: 12px; font-size: 13px; line-height: 1.625; white-space: pre-line; word-break: break-word; color: var(--ink-78); }
.event__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-top: 14px; align-items: start; }
.event__col { min-width: 0; text-align: center; padding: 0 2px; }
.event__col + .event__col { border-left: 1px solid rgba(142, 1, 1, .15); }
.event__col-label { font: 700 11.5px/1.4 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.event__col-time { margin-top: 3px; font: 600 14px/1.4 var(--font-sans); color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.event__col .event__addr { margin-top: 6px; font-size: 12.5px; line-height: 1.55; }
.event__col .event__map { font-size: 12.5px; }
.event__map {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; padding: 8px 0;
  font: 500 13px/1.4 var(--font-sans);
  color: var(--red); text-decoration: underline; text-underline-offset: 2px;
  transition: opacity .2s;
}
.event__map:hover { opacity: .7; }
.dress {
  margin-top: 20px; padding: 20px 16px; text-align: center;
  border: 1px solid rgba(142, 1, 1, .38); background: rgba(255, 255, 255, .75);
}
.dress__line { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.dress__line span { height: 1px; width: 40px; background: rgba(142, 1, 1, .35); }
.dress__line i { font-style: normal; font-size: 12px; color: var(--red); }
.dress__title { font-size: 1.6rem; letter-spacing: .06em; color: var(--red); }
.dress__sub { margin-top: 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(0, 0, 0, .55); }
.dress__swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.dress__swatches i {
  display: block; width: 32px; height: 32px; border-radius: 2px;
  border: 1px solid rgba(142, 1, 1, .38);
  box-shadow: 0 2px 6px rgba(92, 0, 0, .1);
}

/* ============ 5. TIMELINE ============ */
.sec--timeline { padding: 32px var(--gutter); }
.timeline__wrap { max-width: 384px; margin: 0 auto; }
.cal { position: relative; border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.cal__bg { position: absolute; inset: 0; background-size: cover; background-position: 50% 50%; }
.cal__bg::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .8); }
.cal__box { position: relative; border: 1px solid rgba(142, 1, 1, .2); border-radius: 12px; overflow: hidden; }
.cal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(142, 1, 1, .2);
}
.cal__month { font-size: clamp(1.5rem, 5vw, 1.8rem); color: var(--ink); }
.cal__year { font: 700 clamp(1rem, 4vw, 1.2rem)/1.3 var(--font-sans); letter-spacing: .05em; color: var(--red); }
.cal__dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid rgba(142, 1, 1, .2); }
.cal__dow span { padding: 8px 0; text-align: center; font: 600 12px/1.4 var(--font-sans); letter-spacing: .02em; color: rgba(0, 0, 0, .62); }
.cal__dow .is-wknd { color: var(--red); }
.cal__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px; }
.day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.day span { font: 500 13px/1 var(--font-sans); color: rgba(0, 0, 0, .75); }
.day.is-wknd span { color: var(--red); }
.day.is-empty { visibility: hidden; }
.day--mark2 span { font-weight: 700; }
.day--mark2::before {
  content: ''; position: absolute; inset: 2%;
  border: 1.5px dashed rgba(142, 1, 1, .5); border-radius: 50%;
}
.day__mark {
  position: relative; width: 80%; height: 80%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px solid var(--red); border-radius: 50%;
}
.day__mark::before {
  content: ''; position: absolute; inset: -9%;
  border: 1.5px dashed rgba(142, 1, 1, .55); border-radius: 50%;
}
.day__mark b { font: 700 12px/1 var(--font-sans); color: var(--red); }
.day__mark svg { margin-top: 2px; color: var(--red); }

.count { text-align: center; margin-bottom: 32px; }
.count__lead { font-style: italic; font-size: 13.5px; margin-bottom: 16px; color: rgba(0, 0, 0, .65); }
.count__boxes { display: flex; justify-content: center; gap: 10px; }
.count__item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.count__box {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(142, 1, 1, .3); border-radius: 4px;
  background: rgba(142, 1, 1, .1);
}
.count__box span { font: 700 1.3rem/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.count__lbl { font: 600 12px/1.4 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: rgba(0, 0, 0, .68); }
.count__done { margin-top: 12px; font-style: italic; font-size: 13.5px; color: var(--red); }

.sched { position: relative; border-radius: 12px; padding: 32px 20px; background: var(--pink-bg); }
.sched__lanterns { position: absolute; top: 0; right: 0; width: 110px; opacity: .12; transform: scaleX(-1); }
.sched__title { text-align: center; letter-spacing: .06em; font-size: clamp(2rem, 8vw, 2.6rem); color: var(--red); margin-bottom: 28px; position: relative; }
.sched__list { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto; }
.sched__list::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 88px; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(142, 1, 1, .3), transparent);
}
.sched__item {
  position: relative; display: grid; grid-template-columns: 3.5rem 2.5rem 1fr;
  align-items: center; gap: 12px;
}
.sched__time { display: flex; flex-direction: column; align-items: flex-end; font: 600 14px/1.4 var(--font-sans); font-variant-numeric: tabular-nums; text-align: right; color: var(--red); }
.sched__date { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: rgba(142, 1, 1, .65); }
.sched__icons { position: relative; display: flex; align-items: center; justify-content: center; z-index: 1; }
.sched__icons::before { content: ''; position: absolute; width: 36px; height: 36px; border-radius: 50%; background: var(--pink-bg); }
.sched__icons::after { content: ''; position: absolute; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(142, 1, 1, .2); }
.sched__icons i {
  position: relative; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(142, 1, 1, .1); border: 1px solid rgba(142, 1, 1, .3);
  color: var(--red);
}
.sched__icons i svg { width: 11px; height: 11px; }
.sched__text { font-size: 14px; line-height: 1.375; color: rgba(0, 0, 0, .85); }
.sched__end { display: flex; justify-content: center; margin-top: 28px; color: var(--red); opacity: .35; }

/* ============ 6. GALLERY ============ */
.sec--gallery { padding: 24px var(--gutter); }
.gallery { max-width: 384px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.gal { position: relative; overflow: hidden; cursor: pointer; }
.gal img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s; display: block;
}
.gal:hover img { transform: scale(1.05); }
.gal--wide { aspect-ratio: 16 / 9; }
.gal--34 { aspect-ratio: 3 / 4; }
.gal--span2 { grid-column: 1 / 3; }
.gal__grid2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px;
  grid-template-rows: clamp(120px, 37vw, 148px) clamp(48px, 15vw, 60px) clamp(48px, 15vw, 60px) clamp(96px, 30vw, 120px);
}
.gal__grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.gal__label {
  grid-row: 1; grid-column: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--pink-bg-2); border: 1px solid rgba(142, 1, 1, .08);
}
.gal__label .t { font-size: clamp(1.4rem, 6vw, 1.9rem); line-height: 1.2; text-align: center; color: var(--red); }
.gal__label hr { width: 16px; height: 1px; border: 0; background: rgba(142, 1, 1, .2); }
.gal__label .s { font-style: italic; letter-spacing: .02em; font-size: clamp(.85rem, 3.8vw, .95rem); color: rgba(142, 1, 1, .85); }

/* ============ 7. GUESTBOOK ============ */
.sec--guestbook { padding: 32px var(--gutter); }
.gb { max-width: 384px; margin: 0 auto; }
.gb__board { position: relative; overflow: hidden; }
.gb__board > img { width: 100%; height: auto; max-height: 280px; object-fit: cover; display: block; }
.gb__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }
.gb__pill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gb__pill span {
  font: 500 14px/1.4 var(--font-sans); color: rgba(255, 255, 255, .85);
  background: rgba(0, 0, 0, .3); padding: 8px 16px; border-radius: 9999px;
}
.gb__list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gb__item { background: var(--pink-bg-2); border: 1px solid rgba(142, 1, 1, .14); border-radius: 10px; padding: 12px 14px; }
.gb__item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gb__item-name { font: 600 13.5px/1.4 var(--font-sans); color: var(--red); }
.gb__item-time { font-size: 11px; color: rgba(0, 0, 0, .5); white-space: nowrap; }
.gb__item-msg { font-size: 13.5px; line-height: 1.55; color: var(--ink-85); margin-top: 4px; overflow-wrap: break-word; }
.gb__form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid rgba(142, 1, 1, .25); border-radius: 10px;
  padding: 10px 12px; font: 400 13.5px/1.5 var(--font-sans); color: var(--ink);
  background: #fff; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid rgba(142, 1, 1, .3); border-color: var(--red);
}
.field ::placeholder { color: rgba(0, 0, 0, .4); }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }
.btn-red {
  align-self: center;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: 0; border-radius: 9999px;
  background: linear-gradient(135deg, #B93232, var(--red));
  color: #fff; font: 600 13.5px/1.2 var(--font-sans);
  letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(142, 1, 1, .3);
  transition: transform .2s, box-shadow .2s;
}
.btn-red:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(142, 1, 1, .45); }
.btn-red:active { transform: scale(.97); }
.btn-red[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ============ 8. RSVP ============ */
.sec--rsvp { padding: 32px var(--gutter); }
.rsvp__wrap { max-width: 384px; margin: 0 auto; }
.rsvp__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }
.choice {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 20px 12px; border-radius: 4px;
  border: 1px solid rgba(142, 1, 1, .3); background: var(--pink-bg-2);
  transition: all .3s;
}
.choice__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: transparent; border: 1.5px solid rgba(142, 1, 1, .3);
  transition: all .3s;
}
.choice__txt span { display: block; font: 500 12.5px/1.4 var(--font-sans); letter-spacing: .02em; color: var(--ink-62); }
.choice__txt b { display: block; font: 600 12.5px/1.4 var(--font-sans); color: rgba(0, 0, 0, .85); }
.choice.sel { border: 2px solid var(--red); background: rgba(142, 1, 1, .1); }
.choice.sel .choice__dot { background: var(--red); border-color: var(--red); }
.choice.sel .choice__txt b { color: var(--red); }
.rsvp__form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp__msg { text-align: center; font-style: italic; font-size: 13px; margin-top: 16px; color: var(--ink-68); }

/* ============ 9. GIFT ============ */
.sec--gift { padding: 32px var(--gutter); }
.gift__lanterns { position: absolute; top: 0; right: 0; width: 90px; opacity: .08; transform: scaleX(-1); }
.gift__wrap { max-width: 384px; margin: 0 auto; position: relative; }
.gift__body { display: flex; flex-direction: column; align-items: center; }
.gift__btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: none; border: 0; margin-bottom: 20px;
}
.gift__glow {
  position: absolute; inset: -18px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(142, 1, 1, .1) 0%, transparent 70%);
  animation: gift-glow 3s ease-in-out infinite;
}
.gift__env { position: relative; display: block; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .15)); transform-origin: center bottom; animation: gift-shake 4.5s ease-in-out infinite; transition: transform .3s; }
.gift__btn:hover .gift__env { transform: scale(1.05); }
.gift__label {
  font: 600 12.5px/1.4 var(--font-sans);
  letter-spacing: .2em; text-transform: uppercase; color: var(--red);
  transition: opacity .2s;
}
.gift__btn:hover .gift__label { opacity: .6; }
.gift__note { font-size: 13px; text-align: center; padding: 0 16px; max-width: 340px; line-height: 1.6; color: var(--ink-68); }

@keyframes gift-shake {
  0%, 40%, 100% { transform: rotate(0); }
  5% { transform: rotate(-3deg); }
  10% { transform: rotate(2.4deg); }
  15% { transform: rotate(-1.6deg); }
  20% { transform: rotate(1.2deg); }
  25% { transform: rotate(-.6deg); }
  30% { transform: rotate(.4deg); }
}
@keyframes gift-glow {
  0%, 100% { opacity: 0; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ============ 9b. NHẠC NỀN (YouTube) ============ */
.sec--music { padding: 4px var(--gutter) 32px; }
.sec__head--music { margin-bottom: 12px; }
.sec__head--music .sec__title { font-size: 13px; letter-spacing: .22em; }
.sec__head--music .sec__sub { font-size: 12px; margin-top: 4px; }
.yt {
  max-width: 356px; margin: 0 auto; aspect-ratio: 16 / 9; /* 356×200 = cỡ tối thiểu YouTube cho phép */
  border: 3px solid var(--red); border-radius: 4px; overflow: hidden; background: #000;
}
.yt iframe, .yt > div { width: 100%; height: 100%; display: block; }

/* ============ 10. FOOTER ============ */
.footer { position: relative; overflow: hidden; }
.footer__media { position: relative; width: 100%; }
.footer__media > img { width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block; }
.footer__overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 64px 16px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, transparent 100%);
  text-align: center;
}
.footer__thanks { font-size: clamp(2.4rem, 10vw, 3.1rem); letter-spacing: .05em; color: rgba(255, 255, 255, .95); text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.footer__line { font-style: italic; font-size: 14px; margin-top: 4px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.footer__credit { margin-top: 10px; font-size: 10px; letter-spacing: .04em; color: rgba(255, 255, 255, .6); }

/* ---------- Nút nhạc ---------- */
.music {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(142, 1, 1, .3);
  background: rgba(142, 1, 1, .15);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: var(--red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transition: transform .3s, background .3s;
}
.music:hover { transform: scale(1.1); background: rgba(142, 1, 1, .7); color: #fff; }
.door:not(.gone) ~ .music, .door:not(.gone) ~ .music-cap, .door:not(.gone) ~ .phone { display: none; }

/* ---------- Nút gọi điện nhấp nháy ---------- */
.phone {
  position: fixed; left: 16px; bottom: 70px; z-index: 60;
  display: flex; align-items: center; gap: 0;
  width: 42px; height: 42px; border-radius: 9999px;
  background: linear-gradient(135deg, #B93232, var(--red)); color: #fff;
  box-shadow: 0 4px 14px rgba(142, 1, 1, .35);
  text-decoration: none; overflow: visible;
  animation: phone-ring 2.6s ease-in-out infinite;
  transition: width .3s;
}
.phone svg { flex: 0 0 auto; width: 42px; height: 19px; }
.phone::before, .phone::after {
  content: ''; position: absolute; inset: 0; border-radius: 9999px;
  border: 2px solid rgba(142, 1, 1, .55); pointer-events: none;
  animation: phone-ping 2.6s ease-out infinite;
}
.phone::after { animation-delay: .6s; }
.phone__label {
  display: none; padding-right: 14px; white-space: nowrap;
  font: 600 12px/1.2 var(--font-sans); letter-spacing: .02em;
}
@media (hover: hover) {
  .phone:hover { width: auto; }
  .phone:hover .phone__label { display: inline; }
}
@keyframes phone-ping {
  0% { transform: scale(1); opacity: .8; }
  70%, 100% { transform: scale(1.75); opacity: 0; }
}
@keyframes phone-ring {
  0%, 62%, 100% { transform: rotate(0); }
  66% { transform: rotate(-14deg); }
  70% { transform: rotate(12deg); }
  74% { transform: rotate(-9deg); }
  78% { transform: rotate(6deg); }
  82% { transform: rotate(0); }
}
.music-cap {
  position: fixed; left: 66px; bottom: 26px; z-index: 60; max-width: 62vw;
  padding: 6px 12px; border-radius: 9999px;
  background: rgba(142, 1, 1, .86); color: #fff;
  font: 500 11px/1.3 var(--font-sans); letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15); pointer-events: none;
  opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s;
}
.music-cap.show { opacity: 1; transform: none; }
.music__bars { display: none; align-items: flex-end; gap: 2px; height: 16px; }
.music__bars i { width: 3px; background: currentColor; border-radius: 2px; animation: bar 1s ease-in-out infinite; }
.music__bars i:nth-child(1) { height: 6px; }
.music__bars i:nth-child(2) { height: 12px; animation-delay: .2s; }
.music__bars i:nth-child(3) { height: 8px; animation-delay: .4s; }
.music.playing .music__icon { display: none; }
.music.playing .music__bars { display: flex; }
@keyframes bar { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1.4); } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .92);
}
.lightbox__fig { max-width: 94vw; max-height: 82vh; }
.lightbox__fig img { max-width: 100%; max-height: 82vh; object-fit: contain; display: block; }
.lightbox__close {
  position: absolute; top: 12px; right: 16px;
  width: 40px; height: 40px; border: 0; background: none;
  color: #fff; font-size: 34px; line-height: 1; opacity: .8;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 64px; border: 0; background: none;
  color: rgba(255, 255, 255, .8); font-size: 42px; line-height: 1;
}
.lightbox__nav--prev { left: 6px; }
.lightbox__nav--next { right: 6px; }
.lightbox__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: 13px; }

/* ---------- Modal (mừng cưới) ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); animation: fade-in .25s; }
.modal__box {
  position: relative; width: calc(100% - 32px); max-width: 400px;
  max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 12px; padding: 22px 16px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  animation: pop-in .25s cubic-bezier(.4, 0, .2, 1);
}
.modal__close {
  position: absolute; top: 10px; right: 14px;
  width: 32px; height: 32px; border: 0; background: none;
  font-size: 26px; color: rgba(0, 0, 0, .55); line-height: 1;
}
.modal__title {
  text-align: center; margin-bottom: 16px;
  font: 600 1.1rem/1.3 var(--font-sans);
  letter-spacing: .18em; text-transform: uppercase; color: var(--red);
}
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qr-grid.single { grid-template-columns: 1fr; max-width: 240px; margin: 0 auto; }
.qr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.qr-item__label { font: 500 12px/1.4 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-68); }
.qr-item__card { width: 100%; background: #fff; border: 1px solid rgba(142, 1, 1, .2); border-radius: 12px; padding: 8px; }
.qr-item__card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.qr-item__bank { font: 600 11.5px/1.45 var(--font-sans); color: var(--ink); text-align: center; margin-top: 2px; }
.qr-item__bank small { display: block; font-weight: 500; color: var(--ink-68); letter-spacing: .02em; }
.qr-item__stk { display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 12.5px/1.4 var(--font-sans); color: var(--ink-85); font-variant-numeric: tabular-nums; }
.qr-item__btn {
  border: 1px solid rgba(142, 1, 1, .3); background: var(--pink-bg-2); color: var(--red);
  border-radius: 9999px; padding: 4px 10px; font: 500 11px/1.3 var(--font-sans); white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.qr-item__btn:hover { background: var(--red); color: #fff; }
.qr-item__name { font-size: 1.35rem; color: var(--ink-85); margin-top: 2px; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: 92vw; pointer-events: none;
}
.toast {
  background: rgba(20, 20, 20, .88); color: #fff;
  font: 500 13px/1.4 var(--font-sans);
  padding: 10px 18px; border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: toast-in .3s cubic-bezier(.4, 0, .2, 1);
}
.toast--ok { background: rgba(142, 1, 1, .92); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 360px) {
  .couple__date { padding: 0 64px; }
  .couple__knot { width: 52px; }
  .couple__knot--l { left: 20px; }
  .couple__knot--r { right: 20px; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Tôn trọng reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rv { transition: none; opacity: 1; transform: none; }
  .gift__env, .gift__glow, .door.is-shaking .door__seal-box, .door.is-shaking .door__seal-glow { animation: none; }
  .gal img, .btn-gold, .choice { transition: none; }
  .phone, .phone::before, .phone::after { animation: none; }
}
