/* style.css — mobile-first. Bảng màu: burgundy + vàng gold + kem */
:root {
  --burgundy: #6e1423;
  --deep: #3b0a14;
  --rose: #8a1f33;
  --gold: #c9a45c;
  --gold-light: #e6c987;
  --cream: #fbf5ec;
  --blush: #f4e1d8;
  --ink: #3b0a14;
  --ink-soft: #6b3a42;

  --f-script: 'Great Vibes', 'Brush Script MT', cursive;
  --f-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-han: 'Noto Serif TC', 'Noto Serif CJK TC', 'PMingLiU', 'SimSun', 'Songti SC', serif;

  --ls: 0.28em;               /* letter-spacing chữ hoa: giảm trên màn nhỏ */
  --pad: 22px;
}
@media (max-width: 380px) { :root { --ls: 0.16em; --pad: 18px; } }
@media (min-width: 900px) { :root { --ls: 0.34em; --pad: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 16px/1.7 var(--f-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;   /* Cormorant mặc định dùng số kiểu cổ (1 giống I) */
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, blockquote, figure, ol { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.script { font-family: var(--f-script); font-weight: 400; letter-spacing: 0; }
.muted { opacity: 0.6; }
.center { text-align: center; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--pad); }
.wrap--narrow { max-width: 640px; }
.wrap--wide { max-width: 1200px; }
.orn { width: 150px; height: 11px; color: var(--gold); display: block; margin: 18px auto; }
.orn--gold { color: var(--gold); margin: 30px auto; }

/* ---------- Chữ ---------- */
.eyebrow {
  font: 500 0.78rem/1.6 var(--f-sans); text-transform: uppercase;
  letter-spacing: var(--ls); color: var(--gold-light);
}
.eyebrow--dark { color: var(--rose); }
.h2 {
  font: 500 clamp(2rem, 7.5vw, 3rem)/1.15 var(--f-serif);
  color: var(--burgundy); margin-top: 8px;
}
.h2--light { color: var(--cream); }
.lead { font-size: 1.02rem; color: var(--ink-soft); margin-top: 14px; }
.lead--light { color: rgba(251, 245, 236, 0.86); }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: 999px; cursor: pointer;
  font: 500 0.82rem/1.2 var(--f-sans); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: scale(0.97); }
.btn--gold { background: linear-gradient(180deg, #dcbb78, #c9a45c); color: var(--deep); box-shadow: 0 6px 22px rgba(0,0,0,.28); }
.btn--gold:hover { background: linear-gradient(180deg, #e8cd91, #d3b068); }
.btn--burgundy { background: var(--burgundy); color: var(--cream); }
.btn--burgundy:hover { background: var(--rose); }
.btn--outline { border-color: var(--burgundy); color: var(--burgundy); background: transparent; }
.btn--outline:hover { background: var(--burgundy); color: var(--cream); }

/* ---------- Màn hình mở thiệp ---------- */
.cover {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 20%, var(--rose) 0%, var(--burgundy) 45%, var(--deep) 100%);
  color: var(--cream); padding: 18px;
  transition: opacity .8s ease, transform .9s cubic-bezier(.7,0,.3,1);
}
.cover.is-gone { opacity: 0; transform: translateY(-6%) scale(1.02); pointer-events: none; }
.cover__frame {
  position: relative; width: 100%; max-width: 440px; min-height: min(720px, 100%);
  padding: 44px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 1px solid var(--gold); outline: 1px solid rgba(201,164,92,.45); outline-offset: 7px;
  margin: 8px;
}
.cover__hi {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 0;
  font: 700 clamp(14rem, 70vw, 24rem)/1 var(--f-han); color: var(--gold); opacity: 0.07; pointer-events: none; user-select: none;
}
.cover__frame > *:not(.cover__hi) { position: relative; z-index: 1; }
.cover__label { font: 500 0.78rem var(--f-sans); text-transform: uppercase; letter-spacing: var(--ls); color: var(--gold-light); }
.cover__names { font-size: clamp(3.6rem, 18vw, 5.4rem); line-height: 1.15; margin: 14px 0 0; color: var(--cream); text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.cover__sub { font: 500 1.35rem var(--f-serif); text-transform: uppercase; letter-spacing: var(--ls); color: var(--gold-light); }
.cover__guest { margin: 22px 0 6px; display: grid; gap: 4px; }
.cover__guest span { font: italic 400 1.1rem var(--f-serif); opacity: .9; }
.cover__guest strong { font: 600 1.55rem/1.3 var(--f-serif); color: var(--gold-light); overflow-wrap: anywhere; }
.cover .btn { margin-top: 30px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 6px 22px rgba(0,0,0,.28), 0 0 0 0 rgba(201,164,92,.5); } 50% { box-shadow: 0 6px 22px rgba(0,0,0,.28), 0 0 0 12px rgba(201,164,92,0); } }

/* ---------- Cánh hoa ---------- */
#petals { position: fixed; inset: 0; z-index: 150; pointer-events: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; place-items: end center;
  background: radial-gradient(110% 80% at 50% 0%, var(--rose) 0%, var(--burgundy) 50%, var(--deep) 100%);
  color: var(--cream); text-align: center; padding: 64px 0 96px;
}
.hero__media { position: absolute; inset: -4% 0 0; transform: translate3d(var(--tx, 0), var(--py, 0px), 0); will-change: transform; }
.hero__bg {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%;
  opacity: 0; transition: opacity 1.8s ease; transform-origin: 50% 30%;
}
.hero__bg.is-in { opacity: .96; animation: kenburns 22s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.08) translateY(-1%); } }
@media (min-width: 900px) {
  /* ảnh dọc trên màn rộng: giữ nguyên tỉ lệ ở cột giữa, mép mờ dần vào nền đỏ */
  .hero__media {
    left: 50%; right: auto; width: min(680px, 54vw); --tx: -50%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 26%, #000 74%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 26%, #000 74%, transparent);
  }
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 50% at 50% 78%, rgba(59,10,20,.7), rgba(59,10,20,0) 80%),
    linear-gradient(180deg, rgba(59,10,20,.35) 0%, rgba(110,20,35,0) 22%, rgba(59,10,20,.08) 45%, rgba(59,10,20,.8) 72%, rgba(59,10,20,.96) 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; z-index: 2; }
.hero::before { inset: 14px; border: 1px solid var(--gold); }
.hero::after { inset: 22px; border: 1px solid rgba(201,164,92,.5); }
.hero__hi {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; user-select: none;
  font: 700 clamp(18rem, 95vw, 40rem)/1 var(--f-han); color: var(--gold); opacity: .07;
}
.hero__inner { position: relative; z-index: 3; padding: 0 calc(var(--pad) + 14px); width: 100%; max-width: 760px; }
.hero__names { display: flex; flex-direction: column; align-items: center; line-height: 1.02; margin: 14px 0 0; font-size: clamp(4.4rem, 22vw, 8.5rem); text-shadow: 0 3px 26px rgba(0,0,0,.45); }
.hero__names i { font-style: normal; font-size: .5em; color: var(--gold-light); line-height: 1; margin: -.05em 0; }
@media (min-width: 760px) {
  .hero__names { flex-direction: row; justify-content: center; gap: .3em; font-size: 7.2rem; }
  .hero__names i { margin: 0; }
}
.hero__date { font: 500 1.1rem var(--f-serif); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); }
.hero__guest { margin-top: 26px; font: italic 400 1.1rem/1.5 var(--f-serif); }
.hero__guest strong { font: 600 1.55rem var(--f-serif); font-style: normal; color: var(--gold-light); overflow-wrap: anywhere; }
.hero__tag { margin-top: 20px; font: 400 .95rem var(--f-sans); letter-spacing: .16em; color: rgba(251,245,236,.8); }
.hero__scroll { position: absolute; z-index: 3; bottom: 34px; left: 50%; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid var(--gold); border-radius: 12px; }
.hero__scroll span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Section ---------- */
.sec { padding: 84px 0; position: relative; }
.sec--cream { background: var(--cream); }
.sec--blush { background: var(--blush); }
.sec--dark { background: radial-gradient(100% 70% at 50% 0%, var(--burgundy), var(--deep) 80%); color: var(--cream); }
.sec__head { margin-bottom: 40px; }

/* ---------- Lời mời ---------- */
.invite__guest { font-size: clamp(2.6rem, 11vw, 3.6rem); color: var(--rose); line-height: 1.25; margin-top: 6px; overflow-wrap: anywhere; }
#invite .lead { font-size: 1.08rem; }
.quote { font: italic 400 1.45rem/1.5 var(--f-serif); color: var(--burgundy); }
.quote footer { margin-top: 10px; font: 500 .78rem var(--f-sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Gia đình ---------- */
.fam-grid { display: grid; gap: 22px; max-width: 760px; margin: 0 auto; }
@media (min-width: 720px) { .fam-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.fam {
  position: relative; text-align: center; background: var(--cream); padding: 38px 24px 32px;
  border: 1px solid rgba(201,164,92,.7); outline: 1px solid rgba(201,164,92,.35); outline-offset: -8px;
}
.fam--host { background: #fffaf2; box-shadow: 0 10px 30px rgba(110,20,35,.12); }
.fam__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--burgundy); color: var(--gold-light); padding: 3px 18px; border-radius: 999px;
  font: 500 .72rem/1.7 var(--f-sans); letter-spacing: .22em; text-transform: uppercase;
}
.fam__title { font: 600 1.7rem var(--f-serif); color: var(--burgundy); text-transform: uppercase; letter-spacing: .12em; }
.fam__lines { margin-top: 12px; font: 500 1.28rem/1.6 var(--f-serif); }
.fam__addr { margin-top: 12px; font-size: .88rem; color: var(--ink-soft); line-height: 1.6; }

.couple { margin-top: 70px; }
.couple__photo {
  width: min(280px, 72vw); aspect-ratio: 3 / 4; margin: 0 auto 36px; position: relative;
  border-radius: 999px 999px 8px 8px; padding: 8px; border: 1px solid var(--gold); background: var(--cream);
}
.couple__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 4px 4px; }
.couple__names { display: grid; gap: 6px; align-items: center; }
@media (min-width: 860px) { .couple__names { grid-template-columns: 1fr auto 1fr; gap: 20px; max-width: 880px; margin: 0 auto; } }
.person__kind { font: 500 .76rem var(--f-sans); letter-spacing: var(--ls); text-transform: uppercase; color: var(--rose); }
.person__short { font-size: 4.2rem; line-height: 1.2; color: var(--burgundy); }
.person__full { font: 600 1.4rem var(--f-serif); letter-spacing: .06em; text-transform: uppercase; }
.person__role { margin-top: 6px; font: italic 400 1.1rem/1.5 var(--f-serif); color: var(--ink-soft); }
.couple__amp { font-size: 3.2rem; color: var(--gold); line-height: 1; }

/* ---------- Sự kiện ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 460px; margin: 0 auto 44px; text-align: center; }
.countdown div { border: 1px solid rgba(201,164,92,.55); padding: 14px 4px 10px; background: rgba(0,0,0,.14); }
.countdown b { display: block; font: 500 clamp(2rem, 9vw, 2.8rem)/1 var(--f-serif); color: var(--gold-light); font-variant-numeric: lining-nums tabular-nums; }
.countdown span { display: block; margin-top: 6px; font: 400 .66rem var(--f-sans); text-transform: uppercase; letter-spacing: .16em; color: rgba(251,245,236,.8); }

.ticket {
  position: relative; max-width: 520px; margin: 0 auto; color: var(--ink);
  background: var(--cream); border: 1px solid var(--gold); padding: 7px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.ticket::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(201,164,92,.6); pointer-events: none; }
.ticket__stub { position: relative; text-align: center; padding: 34px 20px 30px; background: var(--burgundy); color: var(--cream); }
.ticket__dow { font: 500 .85rem var(--f-sans); text-transform: uppercase; letter-spacing: var(--ls); color: var(--gold-light); }
.ticket__day { font: 500 6rem/1 var(--f-serif); color: var(--cream); margin: 6px 0 2px; }
.ticket__my { font: 500 1.15rem var(--f-serif); text-transform: uppercase; letter-spacing: .2em; color: var(--gold-light); }
.ticket__time { display: inline-block; margin-top: 16px; padding: 4px 22px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); font: 500 1.7rem var(--f-serif); letter-spacing: .12em; }
.ticket__lunar { margin-top: 14px; font: italic 400 1rem/1.5 var(--f-serif); color: rgba(251,245,236,.85); }
/* đường xé vé */
.ticket__body { position: relative; padding: 36px 24px 30px; text-align: center; border-top: 2px dashed rgba(201,164,92,.7); }
.ticket__body::before, .ticket__body::after {
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--deep); border: 1px solid var(--gold);
}
.ticket__body::before { left: -20px; } .ticket__body::after { right: -20px; }
.ticket__label { font: 500 .72rem var(--f-sans); text-transform: uppercase; letter-spacing: .22em; color: var(--rose); }
.ticket__venue { margin-top: 6px; font: 600 1.7rem/1.25 var(--f-serif); color: var(--burgundy); }
.ticket__addr { margin-top: 6px; font-size: .92rem; color: var(--ink-soft); }
.timeline { margin-top: 28px; }
.timeline ol { list-style: none; padding: 0; margin: 10px auto 0; max-width: 320px; text-align: left; position: relative; }
.timeline li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px dotted rgba(110,20,35,.25); }
.timeline li:last-child { border-bottom: 0; }
.tl__time { flex: 0 0 64px; font: 600 1.35rem var(--f-serif); color: var(--burgundy); font-variant-numeric: lining-nums tabular-nums; }
.tl__label { font-size: .95rem; }
.ticket__actions { margin-top: 30px; display: grid; gap: 12px; justify-items: center; }
.ticket__actions .btn { width: 100%; max-width: 360px; letter-spacing: .08em; font-size: .78rem; }
@media (min-width: 900px) {
  .ticket { max-width: 900px; display: grid; grid-template-columns: 300px 1fr; }
  .ticket__body { border-top: 0; border-left: 2px dashed rgba(201,164,92,.7); display: flex; flex-direction: column; justify-content: center; padding: 40px 40px; }
  .ticket__body::before, .ticket__body::after { left: -13px; right: auto; top: -20px; }
  .ticket__body::after { top: auto; bottom: -20px; }
  .ticket__stub { display: flex; flex-direction: column; justify-content: center; }
}

/* ---------- Album ---------- */
.gallery { column-count: 2; column-gap: 10px; }
@media (min-width: 700px) { .gallery { column-count: 3; column-gap: 14px; } }
@media (min-width: 1100px) { .gallery { column-count: 4; } }
.g-item, .ph { display: block; width: 100%; margin: 0 0 10px; break-inside: avoid; }
@media (min-width: 700px) { .g-item, .ph { margin-bottom: 14px; } }
.g-item { padding: 0; border: 0; background: var(--blush); cursor: zoom-in; overflow: hidden; position: relative; }
.g-item img { width: 100%; height: auto; opacity: 0; transition: opacity .6s, transform .6s ease; }
.g-item img.is-in { opacity: 1; }
@media (hover: hover) { .g-item:hover img { transform: scale(1.04); } }
.ph { display: grid; place-items: center; background: var(--blush); border: 1px solid var(--gold); font: 700 3rem var(--f-han); color: rgba(201,164,92,.5); }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(20,3,8,.96); display: grid; place-items: center; }
.lb__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 56px 8px; touch-action: pan-y; }
.lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb__btn {
  position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(59,10,20,.7); color: var(--gold-light); border: 1px solid rgba(201,164,92,.6); font: 300 2rem/1 var(--f-serif);
  display: grid; place-items: center; padding: 0 0 4px;
}
.lb__btn:hover { background: var(--burgundy); }
.lb__close { top: max(10px, env(safe-area-inset-top)); right: 10px; font-size: 2rem; }
.lb__prev, .lb__next { top: 50%; margin-top: -23px; }
.lb__prev { left: 8px; } .lb__next { right: 8px; }
@media (max-width: 600px) { .lb__prev, .lb__next { top: auto; bottom: 14px; margin: 0; } .lb__prev { left: 14px; } .lb__next { right: 14px; } }
.lb__count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--gold-light); font: 500 .85rem var(--f-sans); letter-spacing: .18em; }

/* ---------- RSVP ---------- */
.rsvp__frame { margin: 30px 0 22px; background: var(--cream); border: 1px solid var(--gold); padding: 6px; }
.rsvp__frame iframe { display: block; width: 100%; height: 760px; border: 0; background: var(--cream); }
.rsvp__soon { margin: 24px 0; color: var(--ink-soft); font-style: italic; }
#rsvp .btn { margin-top: 4px; }

/* ---------- Mừng cưới ---------- */
.gift__qr { margin: 28px auto 0; width: min(260px, 70vw); padding: 12px; background: #fff; border: 1px solid var(--gold); outline: 1px solid rgba(201,164,92,.5); outline-offset: 5px; }
.gift__qr img { width: 100%; height: auto; }
.gift__acc { margin-top: 24px; font-size: .98rem; line-height: 1.8; color: rgba(251,245,236,.9); }
.gift__acc strong { color: var(--gold-light); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--deep); color: var(--cream); padding: 64px 0 90px; }
.sec--dark + .footer { padding-top: 8px; }
.footer__hi { font: 700 3rem/1 var(--f-han); color: var(--gold); opacity: .8; }
.footer__names { font-size: 3.6rem; line-height: 1.3; margin-top: 6px; }
.footer__thanks { max-width: 440px; margin: 8px auto 0; font: italic 400 1.15rem/1.6 var(--f-serif); color: rgba(251,245,236,.85); }
.footer__tag { margin-top: 18px; color: var(--gold-light); letter-spacing: .14em; }
.footer__phone { margin-top: 10px; font-size: .92rem; }
.footer__phone a { color: var(--gold-light); }
.footer__other { display: inline-block; margin-top: 30px; font-size: .82rem; letter-spacing: .08em; color: rgba(251,245,236,.7); }
.footer__other:hover { color: var(--gold-light); }

/* ---------- Nút nhạc ---------- */
.music {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--burgundy); color: var(--gold-light); border: 1px solid var(--gold); box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.music svg { overflow: visible; }
.music__off { display: block; }
.music.is-on .music__off { display: none; }
.music.is-on svg { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.fam-grid .fam:nth-child(2), .couple__names .reveal:nth-child(2) { transition-delay: .12s; }
.couple__names .reveal:nth-child(3) { transition-delay: .24s; }

/* =====================================================================
   HIỆU ỨNG MỚI
   ===================================================================== */

/* ---------- Thanh tiến độ cuộn ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; opacity: 0; transition: opacity .6s; }
.cover-open .progress { opacity: 1; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--gold), #f6e3b0, var(--gold)); box-shadow: 0 0 10px rgba(230,201,135,.8); }

/* ---------- Bìa: khung vòm ảnh + hiệu ứng mở (mống mắt thu nhỏ) ---------- */
.cover { transition: clip-path 1.5s cubic-bezier(.7,0,.2,1), opacity .5s ease 1.1s; clip-path: circle(150% at 50% 60%); will-change: clip-path; }
.cover.is-gone { transform: none; opacity: 0; clip-path: circle(0% at 50% 60%); }
.cover::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 50% 38%, rgba(230,201,135,.22), transparent 70%);
  animation: glow 5s ease-in-out infinite alternate;
}
@keyframes glow { from { opacity: .5; } to { opacity: 1; } }
.cover__arch {
  position: relative; width: min(210px, 52vw, 30svh); aspect-ratio: 3 / 4; margin: 16px auto 4px;
  border-radius: 999px 999px 10px 10px; padding: 6px; border: 1px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(201,164,92,.16), 0 18px 50px rgba(0,0,0,.45), 0 0 60px rgba(230,201,135,.25);
  animation: floaty 6s ease-in-out infinite;
}
.cover__arch img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; border-radius: 999px 999px 5px 5px; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.cover__frame { animation: coverIn 1.2s cubic-bezier(.2,.7,.2,1) both; }
@keyframes coverIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.cover__names { background: linear-gradient(180deg, #fff6df 20%, var(--gold-light) 80%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 2px 14px rgba(0,0,0,.4)); }
@media (max-height: 700px) { .cover__frame { padding: 24px 20px; } .cover .btn { margin-top: 18px; } .cover__guest { margin-top: 12px; } }

/* ---------- Hero: chữ vàng lấp lánh ---------- */
.hero__names span, .hero__names i { background: linear-gradient(100deg, #fff6df 0%, #f2d9a0 40%, #fff 50%, #e0bd75 60%, #fff6df 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 6s linear infinite; filter: drop-shadow(0 3px 16px rgba(0,0,0,.5)); }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.hero__names i { animation-delay: -2s; }
.hero__scroll { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.hero::before { animation: frameGlow 4s ease-in-out infinite alternate; }
@keyframes frameGlow { from { box-shadow: inset 0 0 0 rgba(230,201,135,0); } to { box-shadow: inset 0 0 40px rgba(230,201,135,.22); } }

/* ---------- Khối ảnh đặc biệt ---------- */
.sec--feature { background: radial-gradient(90% 60% at 50% 20%, var(--rose), var(--burgundy) 45%, var(--deep) 100%); color: var(--cream); overflow: hidden; }
.sec--feature::before, .sec--feature::after { content: "囍"; position: absolute; font: 700 22rem/1 var(--f-han); color: var(--gold); opacity: .05; pointer-events: none; }
.sec--feature::before { top: -3rem; left: -4rem; } .sec--feature::after { bottom: -6rem; right: -4rem; }
.sec--feature .h2 { margin-bottom: 38px; }
.sec--feature .lead { margin-top: 38px; font: italic 400 1.3rem/1.6 var(--f-serif); }
.feature { position: relative; width: min(340px, 82vw); margin: 0 auto; perspective: 900px; }
.feature__btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.feature__tilt {
  position: relative; display: block; overflow: hidden; padding: 8px; background: linear-gradient(145deg, #f3dca2, #b8903f 55%, #e6c987);
  border-radius: 6px; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 80px rgba(230,201,135,.25); will-change: transform;
}
.feature__tilt img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.feature__shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.4) 50%, transparent 62%); background-size: 260% 100%; background-position: 140% 0; animation: shine 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 55% { background-position: 140% 0; } 100% { background-position: -60% 0; } }
.feature__corner { position: absolute; width: 34px; height: 34px; border: 2px solid var(--gold-light); pointer-events: none; }
.feature__corner.c1 { top: -14px; left: -14px; border-right: 0; border-bottom: 0; }
.feature__corner.c2 { top: -14px; right: -14px; border-left: 0; border-bottom: 0; }
.feature__corner.c3 { bottom: -14px; left: -14px; border-right: 0; border-top: 0; }
.feature__corner.c4 { bottom: -14px; right: -14px; border-left: 0; border-top: 0; }
.feature__hearts { position: absolute; left: 0; right: 0; bottom: 10px; height: 0; pointer-events: none; }
.heart-f { position: absolute; bottom: 0; color: var(--gold-light); opacity: 0; animation: heartUp var(--d, 5s) ease-in forwards; font-size: var(--s, 18px); text-shadow: 0 0 10px rgba(230,201,135,.7); }
@keyframes heartUp { 0% { opacity: 0; transform: translateY(0) scale(.5); } 15% { opacity: .95; } 100% { opacity: 0; transform: translate(var(--x, 0), -380px) scale(1.15) rotate(var(--r, 0deg)); } }

/* ---------- Album: câu chuyện cuộn (10 ảnh) ---------- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 26px; column-count: auto; max-width: 520px; margin: 0 auto; }
@media (min-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; gap: 34px 28px; max-width: 980px; } .gallery .g-item:nth-child(even) { margin-top: 70px; } }
.g-item, .ph { margin: 0; }
.g-item { aspect-ratio: 2 / 3; border-radius: 4px; box-shadow: 0 16px 40px rgba(110,20,35,.22); }
.g-item::before { content: ""; position: absolute; inset: 8px; z-index: 2; border: 1px solid rgba(255,255,255,.55); pointer-events: none; }
.g-item::after { content: attr(data-n); position: absolute; left: 18px; bottom: 14px; z-index: 2; font: italic 500 1.4rem var(--f-serif); color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.g-item img { height: 100%; object-fit: cover; transform: scale(1.18); transition: opacity .8s, transform 1.8s cubic-bezier(.2,.7,.2,1); }
.g-item.is-in img.is-in { transform: scale(1); }
.js .g-item.reveal { opacity: 1; transform: none; clip-path: inset(14% 8% 14% 8% round 6px); transition: clip-path 1.2s cubic-bezier(.2,.7,.2,1); }
.js .g-item.reveal.is-in { clip-path: inset(0 round 4px); }
@media (hover: hover) { .g-item.is-in:hover img.is-in { transform: scale(1.06); } }

/* ---------- Hiệu ứng chạm: tim/sao bay ---------- */
.tapfx { position: fixed; z-index: 160; pointer-events: none; font-size: var(--s, 16px); color: var(--c, #e6c987); text-shadow: 0 0 8px rgba(230,201,135,.7); animation: tapUp var(--d, 1.4s) ease-out forwards; will-change: transform, opacity; }
@keyframes tapUp { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.5); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x, 0px)), calc(-50% - var(--y, 90px))) scale(1.2) rotate(var(--r, 0deg)); } }

/* ---------- Nút nhạc: vòng sóng ---------- */
.music { overflow: visible; }
.music.is-on::before, .music.is-on::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--gold-light); animation: ripple 2.4s ease-out infinite; pointer-events: none; }
.music.is-on::after { animation-delay: 1.2s; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }

/* ---------- Tối ưu điện thoại ---------- */
body { -webkit-tap-highlight-color: transparent; }
.btn, .g-item, .lb__btn, .music, .feature__btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.cover__frame { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
.hero__inner { padding-left: max(calc(var(--pad) + 14px), env(safe-area-inset-left)); padding-right: max(calc(var(--pad) + 14px), env(safe-area-inset-right)); }
.footer { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
@media (max-width: 420px) { .sec { padding: 64px 0; } .hero { padding-bottom: 84px; } .rsvp__frame iframe { height: 680px; } }
.hero__inner .eyebrow { text-shadow: 0 1px 12px rgba(0,0,0,.85); font-weight: 600; }
.hero__date { text-shadow: 0 1px 12px rgba(0,0,0,.7); }

/* =====================================================================
   BẢN MỚI: album 5 ảnh, dải ảnh chạy, nhiều hiệu ứng, ít chữ
   ===================================================================== */

/* ---------- Tiêu đề: chữ hiện từng ký tự ---------- */
.h2.split .w { display: inline-block; white-space: nowrap; }
.js .h2.split .ch { display: inline-block; opacity: 0; transform: translateY(.7em) rotate(6deg); filter: blur(6px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1), filter .7s ease; transition-delay: calc(var(--i) * 45ms + .1s); }
.js .h2.split.is-in .ch { opacity: 1; transform: none; filter: none; }
.js .h2.split.reveal { opacity: 1; transform: none; }
.eyebrow { position: relative; display: inline-block; }
.js .eyebrow.reveal::after { content: ""; display: block; height: 1px; width: 0; margin: 6px auto 0; background: currentColor; opacity: .6; transition: width 1.1s cubic-bezier(.2,.7,.2,1) .3s; }
.js .eyebrow.reveal.is-in::after { width: 100%; }

/* ---------- Ánh sáng nền các khối tối ---------- */
.sec--dark, .sec--feature { --sx: 50%; --sy: 30%; }
.sec--dark::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(340px circle at var(--sx) var(--sy), rgba(230,201,135,.16), transparent 70%); }
.sec--dark > .wrap, .sec--feature > .wrap { position: relative; z-index: 1; }
.sec--feature::before, .sec--feature::after { z-index: 0; }
.sec--dark::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background:
    radial-gradient(3px 3px at 12% 22%, rgba(246,227,176,.9), transparent 60%),
    radial-gradient(2px 2px at 78% 14%, rgba(246,227,176,.8), transparent 60%),
    radial-gradient(3px 3px at 64% 70%, rgba(246,227,176,.7), transparent 60%),
    radial-gradient(2px 2px at 26% 82%, rgba(246,227,176,.8), transparent 60%),
    radial-gradient(2px 2px at 90% 48%, rgba(246,227,176,.7), transparent 60%);
  animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .15; transform: translateY(0); } to { opacity: .7; transform: translateY(-14px); } }
.sec--feature { padding-bottom: 96px; }
.sec--feature .h2 { margin-bottom: 44px; }

/* ---------- Ảnh đặc biệt: viền vàng xoay + nhịp thở ---------- */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.feature__tilt { background: conic-gradient(from var(--ang), #f3dca2, #b8903f, #fff3cc, #b8903f, #f3dca2); animation: spinBorder 7s linear infinite; }
@keyframes spinBorder { to { --ang: 360deg; } }
.feature__tilt img { animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.06); } }

/* ---------- Dải ảnh chạy ngang ---------- */
.strip { overflow: hidden; background: var(--deep); padding: 18px 0; border-block: 1px solid rgba(201,164,92,.5); transform: rotate(-1.4deg); margin: -10px -20px; position: relative; z-index: 2; box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.strip__track { display: flex; gap: 12px; width: max-content; animation: marquee 38s linear infinite; translate: 0 var(--sk, 0px); }
.strip:hover .strip__track { animation-play-state: paused; }
.strip img { max-width: none; flex: none; height: clamp(150px, 34vw, 230px); width: auto; border-radius: 3px; border: 1px solid rgba(201,164,92,.6); filter: saturate(1.08); transition: transform .5s, filter .5s; }
.strip img:nth-child(even) { transform: translateY(10px); }
@media (hover: hover) { .strip img:hover { transform: scale(1.06) translateY(-4px); filter: saturate(1.25) brightness(1.05); } }
@keyframes marquee { to { transform: translateX(-50%); } }
#families { padding-top: 110px; }

/* ---------- Album 5 ảnh: so le, nghiêng 3D, parallax ---------- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 44px; max-width: 560px; margin: 0 auto; column-count: auto; }
@media (min-width: 820px) {
  .gallery { grid-template-columns: repeat(6, 1fr); gap: 56px 34px; max-width: 1040px; }
  .gallery .g-item--wide { grid-column: span 6; }
  .gallery .g-item--tall { grid-column: span 3; }
  .gallery .g-item:nth-child(even) { margin-top: 0; }
  .gallery .g-item--tall.g-item--r { margin-top: 70px; }
}
.g-item { aspect-ratio: var(--ar, 2 / 3); border-radius: 6px; background: var(--blush); box-shadow: 0 22px 50px rgba(110,20,35,.28);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s ease-out, box-shadow .35s, clip-path 1.3s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.g-item__in { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: inherit; }
.g-item img { position: absolute; left: 0; top: -9%; width: 100%; height: 118%; object-fit: cover; transform: translate3d(0, var(--par, 0px), 0) scale(1.12); transition: opacity .8s, transform 1.6s cubic-bezier(.2,.7,.2,1); }
.g-item.is-in img.is-in { transform: translate3d(0, var(--par, 0px), 0) scale(1); }
@media (hover: hover) { .g-item.is-in:hover img.is-in { transform: translate3d(0, var(--par, 0px), 0) scale(1.07); } .g-item:hover { box-shadow: 0 30px 70px rgba(110,20,35,.4), 0 0 0 1px var(--gold); } }
.g-item__shine { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.32), transparent 65%); }
.g-item:hover .g-item__shine { opacity: 1; }
.g-item::before { z-index: 3; transition: inset .5s ease, border-color .5s; }
.g-item:hover::before { inset: 14px; border-color: rgba(255,255,255,.9); }
.g-item::after { z-index: 3; }
/* mỗi ảnh vào từ một hướng khác nhau (clip trên lớp trong để vẫn quan sát được khung ngoài) */
.js .g-item.reveal { clip-path: none; }
.js .g-item .g-item__in { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s cubic-bezier(.2,.7,.2,1); }
.js .g-item.g-item--r .g-item__in { clip-path: inset(0 0 0 100%); }
.js .g-item.is-in .g-item__in { clip-path: inset(0 0 0 0); }

/* ---------- Đếm ngược: nảy khi đổi số ---------- */
.countdown b.pop { animation: popNum .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes popNum { 0% { transform: translateY(-40%) scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
.countdown div { position: relative; overflow: hidden; }
.countdown div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 40%, rgba(230,201,135,.22) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 5s linear infinite; pointer-events: none; }

/* ---------- Vé + nút ---------- */
.ticket { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s; }
@media (hover: hover) { .ticket:hover { transform: translateY(-6px); box-shadow: 0 34px 80px rgba(0,0,0,.5), 0 0 60px rgba(230,201,135,.2); } }
.ticket__day { background: linear-gradient(100deg, #fff6df, #f2d9a0 45%, #fff 55%, #fff6df); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 6s linear infinite; }
.btn { position: relative; overflow: hidden; }
.btn .rip { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); animation: rip .7s ease-out forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.btn--gold::after, .btn--burgundy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); background-size: 260% 100%; background-position: 140% 0; animation: shine 4.5s ease-in-out infinite; pointer-events: none; }

/* ---------- Gia đình & cô dâu chú rể ---------- */
.fam { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s, opacity .9s; }
@media (hover: hover) { .fam:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 20px 44px rgba(110,20,35,.18); } }
.js .fam-grid .fam.reveal { transform: translateY(40px) rotate(-2deg); }
.js .fam-grid .fam:nth-child(2).reveal { transform: translateY(40px) rotate(2deg); }
.js .fam-grid .fam.reveal.is-in { transform: none; }
.person__short { background: linear-gradient(100deg, var(--burgundy), #b4344a 45%, var(--burgundy)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 7s linear infinite; }
.couple__amp { animation: beat 2.2s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }

/* ---------- Hero ---------- */
.hero__inner { opacity: var(--fade, 1); }
.js .hero__inner .reveal { transform: translateY(40px) scale(.96); filter: blur(8px); transition: opacity 1.1s ease, transform 1.2s cubic-bezier(.2,.8,.2,1), filter 1s ease; }
.js .hero__inner .reveal.is-in { transform: none; filter: none; }
.hero__hi { animation: slowSpin 60s linear infinite; }
@keyframes slowSpin { to { transform: rotate(360deg); } }

/* ---------- Bìa ---------- */
.cover__arch::before { content: ""; position: absolute; inset: -14px; border-radius: inherit; border: 1px dashed rgba(230,201,135,.55); animation: pulseRing 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes pulseRing { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.05); opacity: .3; } }
.gift__qr { animation: floaty 6s ease-in-out infinite; }

#main { overflow-x: clip; }
html { overflow-x: hidden; }

/* ---------- Sửa giật khi mở thiệp: bỏ clip-path/blur nặng, dùng mờ + phóng nhẹ (GPU) ---------- */
html { scrollbar-gutter: stable; }
.cover { clip-path: none !important; transition: opacity .9s ease, transform 1s cubic-bezier(.4,0,.2,1), visibility 0s linear 1s; will-change: opacity, transform; }
.cover.is-gone { opacity: 0; transform: scale(1.08); visibility: hidden; clip-path: none !important; }
.cover__names { filter: none; text-shadow: none; }
.js .hero__inner .reveal { filter: none; transform: translateY(28px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.js .hero__inner .reveal.is-in { transform: none; }
.hero__names span, .hero__names i { filter: none; }
.hero__hi { animation: none; }
.hero__bg.is-in { animation-duration: 30s; }

/* ---------- Tên dài hơn: thu cỡ chữ ---------- */
.cover__names { font-size: clamp(2.6rem, 11.5vw, 4.2rem); }
.hero__names { font-size: clamp(3.4rem, 15vw, 5.6rem); }
@media (min-width: 760px) { .hero__names { font-size: 4.8rem; gap: .35em; } .hero__inner { max-width: 1000px; } }
.footer__names { font-size: clamp(2.4rem, 10vw, 3.4rem); }

/* ---------- Ảnh đầu trang: hiện trọn hai người, căn giữa (điện thoại) ---------- */
@media (max-width: 899px) {
  .hero__media { inset: 0; }
  .hero__bg { height: auto; aspect-ratio: 2 / 3; object-fit: cover; object-position: 50% 30%; transform-origin: 50% 40%;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 96%); mask-image: linear-gradient(180deg, #000 62%, transparent 96%); }
}

/* =====================================================================
   ALBUM GỌN (bấm để xem) + FORM XÁC NHẬN RIÊNG
   ===================================================================== */

/* ---------- Album: xếp ảnh quạt + nút mở ---------- */
.album-teaser { display: grid; justify-items: center; gap: 30px; padding-top: 6px; }
.fan { position: relative; width: min(250px, 66vw); aspect-ratio: 4 / 4.6; }
.fan img { position: absolute; left: 50%; bottom: 0; width: 62%; aspect-ratio: 2 / 3; object-fit: cover; border: 5px solid #fff; border-radius: 4px;
  box-shadow: 0 14px 34px rgba(110,20,35,.28); transform-origin: 50% 110%; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.fan__0 { transform: translateX(-50%) rotate(-11deg) translateX(-30%); }
.fan__1 { transform: translateX(-50%) rotate(0deg) translateY(-6%); z-index: 2; }
.fan__2 { transform: translateX(-50%) rotate(11deg) translateX(30%); }
@media (hover: hover) {
  .album-teaser:hover .fan__0 { transform: translateX(-50%) rotate(-17deg) translateX(-42%); }
  .album-teaser:hover .fan__1 { transform: translateX(-50%) rotate(0deg) translateY(-12%); }
  .album-teaser:hover .fan__2 { transform: translateX(-50%) rotate(17deg) translateX(42%); }
}
.fan { animation: floaty 6s ease-in-out infinite; }
.album-teaser.is-open .fan { display: none; }
.album-teaser.is-open { gap: 0; }

.album-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s cubic-bezier(.2,.8,.2,1); }
.album-panel.is-open { grid-template-rows: 1fr; }
.album-panel__in { overflow: hidden; min-height: 0; }
.album-panel.is-open .album-panel__in { padding-top: 34px; }

/* lưới gọn: ảnh đầu trải 2 cột, còn lại 2 cột đều */
.gallery { grid-template-columns: 1fr 1fr; gap: 10px; max-width: 640px; }
.gallery .g-item, .gallery .g-item--tall, .gallery .g-item--wide { grid-column: auto; margin-top: 0 !important; aspect-ratio: 4 / 5; border-radius: 4px; box-shadow: 0 10px 26px rgba(110,20,35,.22); }
.gallery .g-item:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gallery .g-item::after { left: 12px; bottom: 8px; font-size: 1.1rem; }
.gallery .g-item::before { inset: 6px; }
.gallery .g-item img { object-position: 50% 40%; }
@media (min-width: 820px) { .gallery { grid-template-columns: repeat(3, 1fr); max-width: 760px; gap: 14px; } .gallery .g-item:first-child { grid-column: 1 / 3; grid-row: span 1; aspect-ratio: auto; } }
@media (min-width: 820px) { .gallery .g-item:first-child { aspect-ratio: 8 / 5; } }

/* ---------- Form xác nhận ---------- */
.rsvp-form { margin: 34px auto 0; max-width: 460px; text-align: left; display: grid; gap: 22px; background: var(--cream); padding: 30px 24px 26px;
  border: 1px solid rgba(201,164,92,.7); outline: 1px solid rgba(201,164,92,.35); outline-offset: -8px; box-shadow: 0 18px 44px rgba(110,20,35,.14); }
.fld { position: relative; display: block; }
.fld input, .fld textarea { width: 100%; font: 500 1.02rem/1.4 var(--f-sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid rgba(110,20,35,.35);
  padding: 20px 2px 8px; border-radius: 0; outline: 0; resize: none; transition: border-color .3s; }
.fld span { position: absolute; left: 2px; top: 20px; font: 400 1rem var(--f-sans); color: var(--ink-soft); pointer-events: none; transition: transform .3s cubic-bezier(.2,.8,.2,1), color .3s; transform-origin: 0 0; }
.fld input:focus, .fld textarea:focus { border-color: var(--burgundy); }
.fld input:focus + span, .fld input:not(:placeholder-shown) + span, .fld textarea:focus + span, .fld textarea:not(:placeholder-shown) + span { transform: translateY(-18px) scale(.78); color: var(--rose); }
.fld::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--gold), var(--burgundy)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.fld:focus-within::after { transform: scaleX(1); }

.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.choice legend { padding: 0; margin-bottom: 10px; font: 500 .72rem var(--f-sans); text-transform: uppercase; letter-spacing: .2em; color: var(--rose); }
.choice label { cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid rgba(110,20,35,.25); border-radius: 12px; font: 500 1rem var(--f-sans); background: #fff;
  transition: border-color .25s, background .25s, transform .25s, box-shadow .25s; }
.choice span i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(110,20,35,.4); position: relative; transition: background .25s, border-color .25s; }
.choice span i::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.choice input:checked + span { border-color: var(--burgundy); background: #fff7f1; box-shadow: 0 6px 18px rgba(110,20,35,.14); transform: translateY(-1px); }
.choice input:checked + span i { background: var(--burgundy); border-color: var(--burgundy); }
.choice input:checked + span i::after { transform: rotate(45deg) scale(1); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) { .choice label:hover span { border-color: var(--burgundy); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rsvp-err { color: #b3261e; font-size: .92rem; }
.rsvp-form .btn { width: 100%; margin-top: 4px; }
.rsvp-form .btn:disabled { opacity: .7; cursor: progress; }
.rsvp-form .btn.is-busy { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- Gửi xong ---------- */
.rsvp-ok { margin: 34px auto 0; max-width: 420px; padding: 36px 24px; background: var(--cream); border: 1px solid var(--gold); outline: 1px solid rgba(201,164,92,.35); outline-offset: -8px; display: grid; justify-items: center; gap: 8px; animation: okIn .7s cubic-bezier(.2,.9,.3,1.2) both; }
.rsvp-ok svg { width: 72px; height: 72px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-ok circle { stroke: var(--gold); stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .8s ease-out .1s forwards; }
.rsvp-ok path { stroke: var(--burgundy); stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s ease-out .7s forwards; }
.rsvp-ok h3 { font: 600 1.8rem var(--f-serif); color: var(--burgundy); }
.rsvp-ok p { color: var(--ink-soft); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes okIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- Hạn chót + nút sao chép số tài khoản ---------- */
.rsvp__deadline { margin-top: 10px; font: 600 .9rem var(--f-sans); letter-spacing: .04em; color: var(--rose); }
.gift__acc .copy { margin-left: 8px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--gold); background: transparent; color: var(--gold-light); font: 500 .74rem var(--f-sans); letter-spacing: .06em; cursor: pointer; transition: background .25s, color .25s; }
.gift__acc .copy:hover, .gift__acc .copy.is-done { background: var(--gold); color: var(--deep); }

/* ---------- Thiệp mừng: phong bì mở ra mới thấy mã QR ---------- */
.env { --W: min(300px, 84vw); width: var(--W); margin: 34px auto 0; padding-top: 0; transition: padding-top 1s cubic-bezier(.2,.8,.2,1) .45s; }
.env.is-open { padding-top: calc(var(--W) * .82); }
.env__box { position: relative; width: var(--W); height: calc(var(--W) * .66); perspective: 900px; cursor: pointer; filter: drop-shadow(0 22px 34px rgba(0,0,0,.45)); }
.env__back { position: absolute; inset: 0; background: #7a1a2b; border-radius: 6px; }
.env__front { position: absolute; inset: 0; z-index: 3; border-radius: 6px; pointer-events: none;
  background: linear-gradient(160deg, #8f2236, #6e1423); clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%); }
.env__front::after { content: ""; position: absolute; inset: 0; border-radius: 6px; border: 1px solid rgba(230,201,135,.55); }
.env__flap { position: absolute; left: 0; right: 0; top: 0; height: 46%; z-index: 4; transform-origin: 50% 0; clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #9b2a3f, #7a1a2b); transition: transform .7s cubic-bezier(.5,0,.2,1), z-index 0s linear .35s; }
.env.is-open .env__flap { transform: rotateX(180deg); z-index: 1; }
.env__seal { position: absolute; z-index: 5; left: 50%; top: 46%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #f3dca2, #c9a45c 60%, #a07a2e); box-shadow: 0 4px 12px rgba(0,0,0,.4); color: var(--burgundy); animation: sealPulse 2.2s ease-in-out infinite;
  transition: transform .5s, opacity .4s; }
.env__seal span { font: 700 1.5rem/1 var(--f-han); }
.env.is-open .env__seal { opacity: 0; transform: scale(.2) rotate(90deg); pointer-events: none; animation: none; }
@keyframes sealPulse { 0%,100% { box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 0 0 0 rgba(230,201,135,.55); } 50% { box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 0 0 14px rgba(230,201,135,0); } }

.env__card { position: absolute; z-index: 2; left: 8%; right: 8%; bottom: 6%; height: 50%; overflow: hidden; background: #fffaf2; border-radius: 4px; text-align: center; padding: 14px 14px 0;
  border: 1px solid rgba(201,164,92,.8); outline: 1px solid rgba(201,164,92,.4); outline-offset: -5px; color: var(--ink);
  transition: height 1s cubic-bezier(.2,.8,.2,1) .45s, bottom 1s cubic-bezier(.2,.8,.2,1) .45s; }
.env.is-open .env__card { height: calc(var(--W) * 1.1); bottom: 47%; }
.env__t { font: 600 1.35rem var(--f-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--burgundy); }
.env__card .gift__qr { width: 100%; margin: 10px 0 0; padding: 8px; outline: 0; border: 1px solid rgba(201,164,92,.5); animation: none; background: #fff; }
.env__hint { margin-top: 22px; font: italic 400 1.05rem var(--f-serif); color: rgba(251,245,236,.8); }
.gift__acc { transition: opacity .8s ease .9s, transform .8s ease .9s; }
.env:not(.is-open) ~ .gift__acc { opacity: 0; transform: translateY(14px); pointer-events: none; }
@media (hover: hover) { .env:not(.is-open) .env__box:hover .env__flap { transform: rotateX(14deg); } }