/* Thiệp v2 — phong cách mẫu "Nhà Có Hỷ" (vowry t10), viết lại. Một cột tối đa 500px; desktop là cột
   đó nằm giữa. Font riêng của mẫu được thay bằng Google Fonts có subset tiếng Việt:
   Fz-Photograph -> Imperial Script, VIP High Spirited -> Great Vibes, Faugllin Balseyn -> Alex Brush,
   Sunshine Script -> Lobster, UVN Ai Cap Nhe / BrikeyMoura / Cormorant -> Cormorant Garamond. */

:root {
    --v2-red: #711c17;
    --v2-red-env: #9b2a2a;
    --v2-red-title: #7d1912;
    --v2-red-heading: #a00219;
    --v2-ink: #3d3b39;
    --v2-ink-dark: #322e2b;
    --v2-axis: #97938f;
    --v2-muted: #746b68;
    --v2-muted-2: #8b817f;
    --v2-gold: #d7b66b;
    --v2-pink: #e7caca;
    --v2-paper: #fffaf6;
    --v2-paper-2: #fff9f6;
    --v2-col: 500px;

    --f-display: 'Philosopher', Georgia, serif;
    --f-body: 'Quicksand', system-ui, sans-serif;
    --f-guest: 'Imperial Script', 'Great Vibes', cursive;
    --f-script: 'Great Vibes', cursive;
    --f-brush: 'Alex Brush', 'Great Vibes', cursive;
    --f-joy: 'Lobster', cursive;
    --f-serif: 'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html.v2-locked, html.v2-locked body { overflow: hidden; overscroll-behavior: none; }

body {
    background: #fff;
    color: #111;
    font-family: var(--f-body);
    font-variant-numeric: lining-nums; /* Cormorant mặc định dùng số kiểu cũ (old-style) */
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

p, h1, h2, h3, figure, ol, ul { margin: 0; }
img { max-width: 100%; }
button { font: inherit; }

/* ===== Khung cột ===== */
.v2-card {
    position: relative;
    width: 100%;
    max-width: var(--v2-col);
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(113, 28, 23, .05), 0 40px 80px rgba(0, 0, 0, .35);
}
/* Trước khi mở phong bì: dựng sẵn bố cục nhưng ẩn; mở xong hiện dần */
html.v2-locked .v2-card { visibility: hidden; }
.v2-card.is-entering { opacity: 0; transform: translateY(14px) scale(.985); transform-origin: 50% 0; }
.v2-card.is-shown { opacity: 1; transform: none; transition: opacity .58s cubic-bezier(.22, .7, .18, 1), transform .58s cubic-bezier(.22, .7, .18, 1); }

.v2-script-title {
    margin: 0 0 28px;
    color: var(--v2-red);
    font-family: var(--f-script);
    font-size: clamp(38px, 10.5vw, 52px); /* Great Vibes to nét hơn VIP High Spirited của mẫu */
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}

/* ===== Hiệu ứng vào khung (IntersectionObserver thêm .is-in; ra khỏi khung thì bỏ để chạy lại) ===== */
[data-reveal] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: var(--reveal-dur, 900ms);
    transition-timing-function: cubic-bezier(.25, .7, .3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
[data-reveal="fade-up"] { transform: translate3d(0, 40px, 0); }
[data-reveal="fade-left"] { transform: translate3d(40px, 0, 0); --reveal-dur: 1000ms; }
[data-reveal="fade-right"] { transform: translate3d(-40px, 0, 0); --reveal-dur: 1100ms; }
[data-reveal="soft"] { transform: translate3d(0, 18px, 0); --reveal-dur: 750ms; transition-timing-function: cubic-bezier(.215, .61, .355, 1); }
[data-reveal="monogram"] { transform: scale(.55) translateY(10px); --reveal-dur: 1200ms; --reveal-delay: 120ms; transition-timing-function: cubic-bezier(.175, .885, .32, 1.275); }
[data-reveal="rule"] { opacity: 1; transform: scaleX(0); transform-origin: 100% 50%; --reveal-dur: 1200ms; }
.v2-cover [data-reveal] { --reveal-dur: 1100ms; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ===== 0. Phong bì ===== */
.v2-envelope {
    position: fixed;
    inset: 0 auto 0 50%;
    z-index: 9999;
    width: min(100%, var(--v2-col));
    height: 100vh;
    height: 100dvh;
    transform: translateX(-50%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 6vh, 64px) 20px clamp(18px, 4vh, 42px);
    background:
        radial-gradient(circle at 50% 42%, rgba(155, 42, 42, .08) 0%, rgba(155, 42, 42, 0) 42%),
        linear-gradient(180deg, #fff 0%, var(--v2-paper) 100%);
    color: var(--v2-red-env);
    transition: opacity .72s cubic-bezier(.22, .7, .18, 1);
}
.v2-envelope.is-handoff { opacity: 0; pointer-events: none; }
.v2-envelope.is-done { display: none; }
.v2-envelope__bg {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%; max-width: none;
    object-fit: cover; opacity: .42; filter: saturate(72%) sepia(5%);
    pointer-events: none; user-select: none;
}
.v2-envelope__firework {
    position: absolute; z-index: 0;
    width: clamp(130px, 38vw, 190px); aspect-ratio: 1; object-fit: contain;
    opacity: 0; pointer-events: none; transition: opacity .6s ease;
}
.v2-envelope.is-opening .v2-envelope__firework { opacity: .55; }
.v2-envelope__firework--top { top: -24px; right: -38px; }
.v2-envelope__firework--bottom { bottom: 18px; left: -64px; transform: rotate(24deg); }

.v2-envelope__intro {
    position: relative; z-index: 6;
    display: flex; flex-direction: column; align-items: center;
    gap: clamp(18px, 2.8vh, 28px);
    width: 100%; max-width: 460px;
    margin: 0 auto clamp(28px, 4.5vh, 48px);
    text-align: center; pointer-events: none;
}
.v2-envelope__label, .v2-envelope__message {
    font-family: var(--f-display);
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.3;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.v2-envelope__message { max-width: 440px; line-height: 1.55; letter-spacing: .018em; }
.v2-envelope__guest {
    font-family: var(--f-guest);
    font-size: clamp(42px, 11vw, 58px);
    line-height: 1.2;
}

.v2-envelope__stage {
    position: relative; z-index: 1;
    width: min(calc(100% - 56px), 360px, 49vh);
    aspect-ratio: .91;
    container-type: inline-size;
    filter: drop-shadow(0 18px 24px rgba(75, 58, 24, .16));
    transform-origin: 50% 58%;
}
.v2-envelope__stage img { display: block; max-width: none; pointer-events: none; user-select: none; }
.v2-envelope.is-handoff .v2-envelope__stage { animation: v2-stage-exit .9s ease forwards; }

.v2-envelope__closed { position: absolute; inset: 0; z-index: 4; }
.v2-envelope__closed-img { position: absolute; left: 0; bottom: 7%; width: 100%; height: auto; filter: brightness(95%) contrast(104%); }
.v2-envelope__seal {
    position: absolute; z-index: 2; left: 50%; top: 70cqw;
    width: clamp(72px, 22%, 88px); aspect-ratio: 1;
    transform: translate(-50%, -50%);
}
.v2-envelope__seal img { width: 100%; height: auto; filter: drop-shadow(0 4px 7px rgba(75, 34, 29, .3)); }
.v2-envelope__cursor {
    position: absolute; z-index: 5; top: 72cqw; left: 61%;
    width: clamp(34px, 10cqw, 42px); height: clamp(34px, 10cqw, 42px);
    color: rgba(255, 255, 255, .96);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55));
    animation: v2-cursor-tap 1.6s ease-in-out infinite;
    pointer-events: none;
}
.v2-envelope__cursor svg { width: 100%; height: 100%; }
.v2-envelope__hint {
    position: absolute; z-index: 6; top: calc(100% + clamp(10px, 2vh, 20px)); left: 0; right: 0;
    text-align: center; font-family: var(--f-body); font-size: 12px; font-weight: 500;
    letter-spacing: .1em; text-transform: uppercase; color: var(--v2-red-env);
    animation: v2-tap-hint 2.4s ease-in-out infinite;
}

.v2-envelope__open {
    position: absolute; inset: 0; z-index: 3; opacity: 0;
    transform: scale(1.29); transform-origin: 50% 56%;
}
.v2-envelope__open::before {
    content: ''; position: absolute; z-index: 0; top: 41.57cqw; left: 12%;
    width: 76%; height: 24cqw; background: #68202b;
    clip-path: polygon(0 0, 100% 0, 91% 100%, 9% 100%);
}
.v2-envelope__flap, .v2-envelope__pocket { position: absolute; left: 0; width: 100%; height: auto; filter: brightness(95%) contrast(104%); }
.v2-envelope__flap { z-index: 1; top: 0; transform-origin: 50% 64.22%; backface-visibility: hidden; }
.v2-envelope__pocket { z-index: 3; top: 41.57cqw; }
.v2-envelope__viewport { position: absolute; z-index: 2; top: 0; left: 0; width: 100%; height: 89cqw; overflow: hidden; }
.v2-envelope__photo {
    position: absolute; top: 15cqw; left: 50%;
    width: 62cqw; height: 74cqw; overflow: hidden; opacity: 0;
    border: 1px solid rgba(255, 255, 255, .72); border-radius: 2px;
    background: var(--v2-paper); box-shadow: 0 9px 18px rgba(75, 34, 29, .2);
    transform: translate(-50%, 25cqw) scale(.92); transform-origin: 50% 60%;
}
.v2-envelope__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

.v2-envelope.is-opening .v2-envelope__closed { display: none; }
.v2-envelope.is-opening .v2-envelope__hint { opacity: 0; animation: none; }
.v2-envelope.is-opening .v2-envelope__open { opacity: 1; transition: opacity .1s ease; }
.v2-envelope.is-opening .v2-envelope__flap { animation: v2-flap-open 1.15s cubic-bezier(.2, .72, .18, 1) both; }
.v2-envelope.is-opening .v2-envelope__photo { animation: v2-photo-reveal 1.8s cubic-bezier(.18, .72, .16, 1) .6s both; }

.v2-envelope__open-control {
    position: absolute; inset: 0; z-index: 7; width: 100%; height: 100%;
    padding: 0; border: 0; background: transparent; cursor: pointer;
}
.v2-envelope__open-control:focus-visible { outline: 2px solid var(--v2-red-env); outline-offset: -4px; }

/* Ảnh "bay" từ phong bì vào banner mục 1 */
.v2-handoff-photo {
    position: fixed; z-index: 10001; top: 0; left: 0; overflow: hidden;
    border-radius: 2px; pointer-events: none; transform-origin: 0 0;
    transition: transform .9s cubic-bezier(.65, 0, .25, 1), border-radius .9s ease, opacity .35s ease;
}
.v2-handoff-photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 30%; }

@keyframes v2-flap-open {
    0% { opacity: .12; transform: perspective(900px) rotateX(-88deg) scaleY(.08); }
    25% { opacity: .4; }
    100% { opacity: 1; transform: perspective(900px) rotateX(0) scaleY(1); }
}
@keyframes v2-photo-reveal {
    0% { opacity: 0; transform: translate(-50%, 25cqw) scale(.92); }
    16% { opacity: 1; }
    100% { opacity: 1; transform: translate(-50%, 4cqw) scale(1); }
}
@keyframes v2-stage-exit { to { transform: translateY(1.5vh) scale(.975); } }
@keyframes v2-tap-hint { 0%, 100% { opacity: .45; transform: translateY(0); } 50% { opacity: .9; transform: translateY(-2px); } }
@keyframes v2-cursor-tap { 0%, 100% { opacity: .68; transform: translateY(3px) scale(1); } 50% { opacity: 1; transform: translateY(-2px) scale(.9); } }

/* ===== Nút nhạc ===== */
.v2-music {
    position: fixed; top: 10px; left: 50%; z-index: 10050;
    width: min(var(--v2-col), 100%); padding-left: 10px;
    transform: translateX(-50%); pointer-events: none;
}
.v2-music[hidden] { display: none; }
.v2-music__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0;
    border: 1px solid #d2d2d2; border-radius: 50%;
    color: #8f2019; background: rgba(255, 255, 255, .96);
    box-shadow: 0 3px 5px rgba(0, 0, 0, .18);
    cursor: pointer; pointer-events: auto;
}
.v2-music.is-playing .v2-music__toggle { animation: v2-music-pulse 2s ease-out infinite; }
.v2-music__icon { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; }
.v2-music__icon svg { width: 100%; height: 100%; }
.v2-music__icon--pause, .v2-music.is-playing .v2-music__icon--play { display: none; }
.v2-music.is-playing .v2-music__icon--pause { display: inline-flex; }
.v2-music__bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.v2-music__bars span {
    display: block; width: 3px; height: 12px; border-radius: 2px; background: currentColor;
    animation: v2-music-bar 1.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
.v2-music__bars span:nth-child(2) { animation-delay: -.5s; }
.v2-music__bars span:nth-child(3) { animation-delay: -1s; }
@keyframes v2-music-bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes v2-music-pulse {
    0% { box-shadow: 0 3px 5px rgba(0, 0, 0, .18), 0 0 0 0 rgba(143, 32, 25, .42); }
    70% { box-shadow: 0 3px 5px rgba(0, 0, 0, .18), 0 0 0 8px rgba(143, 32, 25, 0); }
    100% { box-shadow: 0 3px 5px rgba(0, 0, 0, .18), 0 0 0 0 rgba(143, 32, 25, 0); }
}

/* ===== 1. Banner đôi ===== */
.v2-couple { position: relative; height: 460px; overflow: hidden; }
@media (min-width: 421px) { .v2-couple { height: 520px; } }
.v2-couple__heading {
    position: relative; z-index: 3;
    display: grid; place-items: center; height: 48px; padding-left: .3em;
    background: #fff; color: var(--v2-red-heading);
    font-family: var(--f-serif); font-size: 21px; font-weight: 500;
    line-height: 1; letter-spacing: .3em;
}
.v2-couple__banner { position: absolute; inset: 48px 0 0; overflow: hidden; }
.v2-couple__banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.v2-couple__content {
    position: absolute; inset: auto 0 20px; z-index: 2;
    display: grid; grid-template-rows: minmax(88px, 1fr) auto; row-gap: 14px;
    padding: 16px 20px;
    background: rgba(12, 12, 12, .18);
    pointer-events: none; /* chạm/chụm xuyên xuống ảnh banner (pinch-zoom.js) */
}
.v2-couple__names { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 7px; align-items: center; }
.v2-couple__name, .v2-couple__divider, .v2-couple__date {
    color: #fff; font-weight: 400; text-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}
.v2-couple__name { min-width: 0; font-family: var(--f-brush); font-size: 34px; line-height: 1; white-space: nowrap; }
.v2-couple__name:first-child { justify-self: end; align-self: start; }
.v2-couple__name:last-child { justify-self: start; align-self: end; }
.v2-couple__divider { font-family: var(--f-guest); font-size: 40px; line-height: 1; }
.v2-couple__date { justify-self: start; font-family: var(--f-serif); font-size: 24px; font-weight: 500; line-height: 1; letter-spacing: .06em; }
@media (min-width: 421px) {
    .v2-couple__name { font-size: 40px; }
    .v2-couple__names { column-gap: 12px; }
}

/* ===== 2. Gia đình ===== */
.v2-family {
    position: relative; isolation: isolate; min-height: 440px;
    padding: 34px 28px 24px 38px; overflow: hidden; background: #fff; color: #111;
}
.v2-family__joy {
    position: absolute; top: 28px; left: 38px; z-index: 2;
    display: flex; flex-direction: column; align-items: flex-start;
    color: var(--v2-red); font-family: var(--f-joy);
    font-size: clamp(24px, 6vw, 30px); font-weight: 400; line-height: .98;
}
.v2-family__joy span:nth-child(2) { margin-left: 12px; }
.v2-family__joy span:nth-child(3) { margin-left: 5px; }
.v2-family__firework { position: absolute; top: -22px; right: 10px; width: 140px; height: 140px; object-fit: contain; opacity: .72; }
.v2-family__body {
    display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 22px;
    margin: 90px 0 0 16px;
}
.v2-family__list { display: flex; flex-direction: column; gap: 25px; min-width: 0; padding: 10px 0 0 16px; border-left: 4px solid var(--v2-red); }
.v2-family__title {
    margin-bottom: 11px; color: #1f2235;
    font-size: clamp(16px, 3.8vw, 20px); font-weight: 500; line-height: 1.15;
    letter-spacing: .015em; text-transform: uppercase;
}
.v2-family__parent, .v2-family__address { font-size: clamp(12px, 3vw, 15px); line-height: 1.4; letter-spacing: -.025em; }
.v2-family__parent { font-weight: 600; }
.v2-family__address { margin-top: 1px; font-weight: 400; }
.v2-family__ornament { position: relative; align-self: stretch; min-height: 180px; background: var(--v2-red); }
.v2-family__ornament::before {
    content: ''; position: absolute; top: 10px; left: 50%;
    width: 17px; height: 17px; border-radius: 50%; background: #fff; transform: translateX(-50%);
}
.v2-family__seal {
    position: absolute; left: 50%; bottom: 10px;
    display: grid; place-items: center; width: 48px; height: 48px;
    border: 2px solid var(--v2-gold); border-radius: 50%;
    color: var(--v2-gold); font-family: serif; font-size: 30px; font-weight: 700; line-height: 1;
    transform: translateX(-50%);
}
.v2-family__seal::before, .v2-family__seal::after { content: ''; position: absolute; inset: 3px; border: 1px dashed currentColor; border-radius: 50%; }
.v2-family__seal::after { inset: -5px; border-style: double; }
.v2-family__monogram {
    position: relative; display: grid; place-items: center;
    width: 126px; height: 80px; margin: 18px auto 0;
    color: var(--v2-red); font-family: var(--f-display); font-size: 54px; font-weight: 700;
    line-height: 1; letter-spacing: -.08em;
}
.v2-family__monogram img {
    position: absolute; top: 50%; left: 50%; z-index: 0;
    width: 180px; height: 120px; max-width: none; object-fit: contain; opacity: .065;
    transform: translate(-50%, -50%);
}
.v2-family__monogram span { position: relative; z-index: 1; }
@media (max-width: 390px) {
    .v2-family { padding-right: 20px; padding-left: 28px; }
    .v2-family__joy { left: 29px; }
    .v2-family__firework { top: -10px; right: 4px; width: 112px; height: 112px; }
    .v2-family__body { grid-template-columns: minmax(0, 1fr) 48px; gap: 14px; margin-top: 70px; margin-left: 14px; }
    .v2-family__list { gap: 22px; padding-left: 13px; }
    .v2-family__seal { width: 39px; height: 39px; font-size: 24px; }
}

/* ===== 3. Lời dẫn, đếm ngược, lịch ===== */
.v2-lovestory {
    container-type: inline-size;
    position: relative; overflow: hidden; padding: 20px 0 4px; background: #fff; color: var(--v2-red);
}
.v2-lovestory__intro {
    padding: 0 14px; font-size: clamp(11px, 2.9cqi, 15px); line-height: 1.9;
    text-align: center; text-transform: uppercase; overflow-wrap: anywhere;
}
.v2-lovestory__intro:empty { display: none; }
.v2-countdown { width: min(100% - 44px, 430px); margin: 0 auto; padding: clamp(28px, 7cqi, 38px) 0 clamp(30px, 8cqi, 44px); text-align: center; }
.v2-countdown__title {
    margin: 0 0 8px; font-family: var(--f-display); font-size: clamp(22px, 5.8cqi, 26px);
    font-weight: 400; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase;
}
.v2-countdown__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(18px, 5cqi, 26px); }
.v2-countdown__unit { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 4px; }
.v2-countdown__unit:not(:last-child)::after {
    content: ':'; position: absolute; top: 1px; right: -3px;
    color: rgba(113, 28, 23, .7); font-family: var(--f-serif); font-size: clamp(20px, 5.4cqi, 27px); line-height: 1;
}
.v2-countdown__num {
    font-family: var(--f-serif); font-size: clamp(25px, 7cqi, 34px); font-weight: 500;
    font-variant-numeric: tabular-nums lining-nums; line-height: 1;
}
.v2-countdown__label {
    margin-top: 8px; color: #8e473e; font-size: clamp(8px, 2.2cqi, 11px); font-weight: 500;
    letter-spacing: .08em; line-height: 1.25; text-transform: uppercase;
}
.v2-lovestory__card {
    display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center;
    gap: clamp(12px, 4cqi, 22px); width: calc(100% - 8px); margin: 0 4px;
    padding: clamp(20px, 6cqi, 32px) clamp(12px, 4cqi, 22px);
    border-radius: clamp(14px, 4cqi, 22px); background: var(--v2-red);
}
.v2-lovestory__portrait { min-width: 0; padding: clamp(8px, 2cqi, 11px); border-radius: 3px; background: var(--v2-paper-2); }
.v2-lovestory__portrait img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; }
.v2-lovestory__portrait figcaption {
    padding: clamp(8px, 2.5cqi, 14px) 0 clamp(1px, 1cqi, 5px);
    color: var(--v2-red); font-family: var(--f-guest); font-size: clamp(18px, 4.6cqi, 23px); line-height: 1; text-align: center;
}
.v2-calendar { min-width: 0; color: var(--v2-paper-2); }
.v2-calendar__month {
    margin: 0 4px 9px; font-family: var(--f-serif); font-size: clamp(22px, 5.6cqi, 30px);
    font-weight: 500; line-height: 1; text-align: right;
}
.v2-calendar__rule { position: relative; height: 2px; margin: 0 9px clamp(12px, 4cqi, 20px) 4px; background: rgba(255, 249, 246, .7); }
.v2-calendar__rule::after {
    content: ''; position: absolute; top: 50%; right: -5px; width: 11px; height: 11px;
    border-radius: 50%; background: var(--v2-paper-2); transform: translateY(-50%);
}
.v2-calendar__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.v2-calendar__table th {
    height: clamp(38px, 9cqi, 46px); padding: 0 0 2px; font-family: var(--f-serif);
    font-size: clamp(10px, 2.7cqi, 13px); font-weight: 600; text-transform: uppercase;
}
.v2-calendar__table td {
    position: relative; height: clamp(24px, 5.6cqi, 30px); padding: 0; text-align: center;
    font-size: clamp(11px, 2.8cqi, 14px); font-weight: 500; line-height: 1;
}
.v2-calendar__table td span { position: relative; z-index: 1; }
.v2-calendar__heart {
    position: absolute; top: 50%; left: 50%; width: clamp(27px, 7cqi, 34px); height: auto; overflow: visible;
    fill: none; stroke: var(--v2-paper-2); stroke-width: 2.5;
    transform: translate(-50%, -48%); animation: v2-heartbeat 1.6s ease-in-out infinite; pointer-events: none;
}
/* Ngày có lễ khác trong tháng: vòng tròn mảnh, nhẹ hơn trái tim */
.v2-calendar__table td.is-event::before {
    content: ''; position: absolute; top: 50%; left: 50%; width: clamp(22px, 5.6cqi, 27px); aspect-ratio: 1;
    border: 1px dashed rgba(255, 249, 246, .8); border-radius: 50%; transform: translate(-50%, -50%);
}
@keyframes v2-heartbeat {
    0%, 100% { transform: translate(-50%, -48%) scale(1); }
    14% { transform: translate(-50%, -48%) scale(1.14); }
    28% { transform: translate(-50%, -48%) scale(1); }
    42% { transform: translate(-50%, -48%) scale(1.09); }
    70% { transform: translate(-50%, -48%) scale(1); }
}

/* ===== 4. Thiệp mời sự kiện ===== */
.v2-events {
    container-type: inline-size;
    position: relative; isolation: isolate; overflow: hidden;
    padding: 36px 24px 44px; background: #fff; color: var(--v2-red); text-align: center;
}
.v2-events__header { position: relative; isolation: isolate; margin-bottom: clamp(22px, 5cqi, 30px); }
.v2-events__firework {
    position: absolute; z-index: -1; width: clamp(130px, 38cqi, 190px); aspect-ratio: 1;
    object-fit: contain; opacity: .65; pointer-events: none;
}
.v2-events__firework--top { top: 82px; left: -32px; }
.v2-events__firework--bottom { right: -32px; bottom: -22px; width: clamp(150px, 42cqi, 210px); }
.v2-events__salutation { margin-bottom: 10px; font-family: var(--f-display); font-size: clamp(16px, 4.2cqi, 21px); line-height: 1.6; text-transform: uppercase; }
.v2-events__guest { margin-bottom: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.v2-events__guest span { font-family: var(--f-guest); font-size: clamp(34px, 10cqi, 44px); }
.v2-events__description { font-family: var(--f-display); font-size: clamp(14px, 3.8cqi, 19px); line-height: 1.6; text-transform: uppercase; }
.v2-events__couple { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; }
.v2-events__name { flex: 1 1 0; min-width: 0; font-family: var(--f-script); font-size: clamp(40px, 11cqi, 58px); line-height: 1.55; overflow-wrap: anywhere; }
.v2-events__name:first-child { text-align: right; }
.v2-events__name:last-child { text-align: left; }
.v2-events__amp { flex: 0 0 auto; font-family: var(--f-guest); font-size: 40px; font-style: italic; }

.v2-events__list { display: grid; gap: clamp(18px, 4cqi, 24px); }
/* Một thẻ cho mỗi địa điểm: đầu thẻ là nơi tổ chức (địa chỉ một lần), dưới là từng lễ một dòng */
.v2-event {
    position: relative; isolation: isolate;
    padding: clamp(22px, 5.5cqi, 30px) clamp(16px, 4.5cqi, 24px) clamp(8px, 2cqi, 12px);
    border: 1px solid rgba(113, 28, 23, .2); border-radius: clamp(14px, 4cqi, 20px);
    background: linear-gradient(145deg, rgba(113, 28, 23, .045), transparent 42%), #fffdfc;
    box-shadow: 0 12px 30px rgba(71, 25, 21, .08);
    --reveal-dur: 800ms;
}
.v2-event__venue { display: flex; flex-direction: column; align-items: center; padding-bottom: clamp(18px, 4.5cqi, 22px); }
.v2-event__pin { width: 22px; height: 22px; margin-bottom: 8px; fill: currentColor; opacity: .8; }
.v2-event__place { margin-bottom: 8px; font-size: clamp(20px, 5.8cqi, 29px); font-weight: 500; line-height: 1.4; text-transform: uppercase; overflow-wrap: anywhere; }
.v2-event__address { color: var(--v2-ink); font-size: clamp(11px, 3cqi, 14px); line-height: 1.6; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.v2-event__map, .v2-event__calendar {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--v2-red); border-radius: 2px;
    color: var(--v2-red); font-weight: 500; line-height: 1.5; text-decoration: none;
    transition: background-color .2s, color .2s;
}
.v2-event__map { min-height: 38px; margin-top: 14px; padding: 7px 18px; font-size: 12px; }
.v2-event__arrow { transition: transform .2s; }
.v2-event__map:hover .v2-event__arrow { transform: translateX(3px); }
.v2-event__calendar {
    min-height: 32px; margin-top: 8px; padding: 4px 12px; border-color: rgba(113, 28, 23, .45);
    background: none; font-family: inherit; font-size: 11px; cursor: pointer;
}
.v2-event__map:hover, .v2-event__calendar:hover { background: var(--v2-red); color: #fff; }

.v2-event__list { margin: 0; padding: 0; list-style: none; }
.v2-event__item {
    display: grid; grid-template-columns: clamp(56px, 15cqi, 70px) minmax(0, 1fr); gap: clamp(12px, 3.5cqi, 18px);
    align-items: start; padding: clamp(16px, 4cqi, 20px) 0; border-top: 1px dotted var(--v2-ink); text-align: left;
}
.v2-event__date {
    display: flex; flex-direction: column; align-items: center; padding: 2px clamp(8px, 2.5cqi, 12px) 4px 0;
    border-right: 1px solid rgba(113, 28, 23, .2); text-align: center;
}
.v2-event__day { font-size: clamp(36px, 10.5cqi, 48px); font-weight: 500; line-height: 1.1; }
.v2-event__month { margin-top: 4px; color: var(--v2-ink); font-size: clamp(10px, 2.8cqi, 12px); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.v2-event__body { min-width: 0; }
.v2-event__name {
    margin-bottom: 2px; font-family: var(--f-display); font-size: clamp(15px, 4.1cqi, 19px);
    letter-spacing: .05em; line-height: 1.4; text-transform: uppercase; overflow-wrap: anywhere;
}
.v2-event__time { color: var(--v2-ink); font-family: var(--f-serif); font-size: clamp(16px, 4.4cqi, 20px); font-weight: 600; line-height: 1.5; letter-spacing: .04em; }
.v2-event__time.is-pending { font-weight: 500; font-style: italic; }
.v2-event__lunar { color: var(--v2-muted); font-size: clamp(12px, 3.2cqi, 14px); line-height: 1.6; font-style: italic; }
.v2-event__note { margin-top: 4px; color: #8e473e; font-size: clamp(12px, 3.2cqi, 14px); font-weight: 500; line-height: 1.5; }

/* ===== 5. Ảnh ghép WITH YOU ===== */
.v2-cover { padding: clamp(32px, 7vw, 44px) clamp(22px, 5vw, 30px) 10px; background: #fff; }
.v2-cover__layout {
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .96fr);
    column-gap: clamp(12px, 3vw, 16px); row-gap: clamp(12px, 3vw, 18px); align-items: start;
}
.v2-cover__photo { min-width: 0; overflow: hidden; background: #f5f1ee; }
.v2-cover__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.v2-cover__photo--hero { grid-column: 1 / -1; width: calc(100% - clamp(18px, 4vw, 22px)); aspect-ratio: 1.52 / 1; justify-self: center; }
.v2-cover__photo--hero img { object-position: center 30%; }
.v2-cover__photo--left { grid-column: 1; grid-row: 3; aspect-ratio: 1 / 1; }
.v2-cover__photo--right { grid-column: 2; grid-row: 2 / span 2; aspect-ratio: .75 / 1; }
.v2-cover__words {
    grid-column: 1; grid-row: 2; align-self: center; padding-left: clamp(10px, 4vw, 20px);
    color: var(--v2-pink); font-family: var(--f-serif); font-size: clamp(28px, 7.4vw, 38px);
    font-weight: 500; line-height: 1; letter-spacing: .075em; white-space: nowrap;
}

/* ===== 6. Timeline + Dresscode ===== */
.v2-timeline {
    container-type: inline-size;
    position: relative; isolation: isolate; overflow: hidden;
    padding: 36px 24px 32px; background: #fff; color: var(--v2-ink-dark);
}
.v2-timeline > :not(img) { position: relative; z-index: 1; }
.v2-timeline__firework {
    position: absolute; z-index: 0; width: clamp(130px, 38cqi, 190px); aspect-ratio: 1;
    object-fit: contain; opacity: .65; pointer-events: none;
}
.v2-timeline__firework--top { top: 82px; left: -32px; transform: scaleX(-1); }
.v2-timeline__firework--bottom { right: -32px; bottom: 24px; width: clamp(150px, 42cqi, 210px); }
.v2-timeline__list { max-width: 420px; margin: 0 auto; padding: 0; list-style: none; }
.v2-timeline__item {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    column-gap: 14px; align-items: start; min-height: clamp(80px, 24cqi, 118px); padding: 0 0 44px;
}
.v2-timeline__item:not(:last-child)::before {
    content: ''; position: absolute; top: 12px; bottom: -12px; left: 50%;
    width: 2px; background: var(--v2-axis); transform: translateX(-50%);
}
.v2-timeline__item:last-child { min-height: 0; padding-bottom: 0; }
.v2-timeline__marker { grid-column: 2; grid-row: 1; justify-self: center; width: 11px; height: 11px; margin-top: 6.5px; border-radius: 50%; background: var(--v2-red); position: relative; z-index: 1; }
.v2-timeline__content { grid-column: 1; grid-row: 1; min-width: 0; text-align: right; }
.v2-timeline__item:nth-child(even) .v2-timeline__content { grid-column: 3; text-align: left; }
.v2-timeline__meta { margin-bottom: 3px; color: var(--v2-red); font-size: clamp(14px, 3.6cqi, 18px); font-weight: 700; line-height: 1.5; }
.v2-timeline__meta small { font-size: .78em; font-weight: 600; opacity: .8; }
.v2-timeline__heading { font-size: clamp(13px, 3.8cqi, 19px); font-weight: 600; line-height: 1.45; text-transform: uppercase; overflow-wrap: anywhere; }
.v2-timeline__place { margin-top: 4px; color: #6d635e; font-size: clamp(11px, 2.9cqi, 13px); line-height: 1.5; }
.v2-timeline__icon {
    grid-column: 3; grid-row: 1; justify-self: start;
    width: clamp(48px, 14cqi, 68px); aspect-ratio: 1; margin-top: -16px;
}
.v2-timeline__item:nth-child(even) .v2-timeline__icon { grid-column: 1; justify-self: end; }
.v2-timeline__icon img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: .85; }

.v2-dresscode { margin-top: 48px; text-align: center; }
.v2-script-title--dresscode { margin-bottom: 22px; }
.v2-dresscode__rows { display: grid; gap: 18px; max-width: 400px; margin: 0 auto; }
.v2-dresscode__row { display: grid; gap: 10px; justify-items: center; }
.v2-dresscode__name { color: var(--v2-ink-dark); font-size: clamp(12px, 3.3cqi, 15px); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.v2-dresscode__palette { display: flex; justify-content: center; gap: clamp(14px, 6cqi, 26px); padding: 0; list-style: none; }
.v2-dresscode__swatch {
    width: clamp(28px, 8cqi, 38px); aspect-ratio: 1; border: 1px solid var(--v2-ink-dark);
    border-radius: 50%; background: var(--swatch, #fff);
}
/* Một hàng chung cho mọi lễ (như mẫu): chấm dàn đều trên bề rộng, không ghi tên lễ */
.v2-dresscode__palette--spread { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); justify-items: center; gap: 14px 0; width: 100%; }

/* ===== 6b. Chuyện tình ===== */
.v2-story { container-type: inline-size; padding: 20px 24px 40px; background: #fff; }
.v2-story__list { position: relative; max-width: 440px; margin: 0 auto; padding: 0; list-style: none; }
.v2-story__list::before {
    content: ''; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 2px;
    background: var(--v2-axis); transform: translateX(-50%);
}
.v2-story__item {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    column-gap: 14px; align-items: center; padding-bottom: 28px;
}
.v2-story__item:last-child { padding-bottom: 0; }
.v2-story__marker { grid-column: 2; grid-row: 1; justify-self: center; width: 11px; height: 11px; border-radius: 50%; background: var(--v2-red); box-shadow: 0 0 0 4px #fff; }
.v2-story__photo {
    grid-column: 1; grid-row: 1; justify-self: end; width: 100%; max-width: 180px; aspect-ratio: 3 / 4;
    padding: 6px 6px 18px; background: var(--v2-paper-2); box-shadow: 0 8px 20px rgba(75, 34, 29, .14);
    transform: rotate(-2deg);
}
.v2-story__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.v2-story__text { grid-column: 3; grid-row: 1; min-width: 0; text-align: left; }
.v2-story__item:nth-child(even) .v2-story__photo { grid-column: 3; justify-self: start; transform: rotate(2deg); }
.v2-story__item:nth-child(even) .v2-story__text { grid-column: 1; text-align: right; }
.v2-story__date { color: var(--v2-red); font-size: clamp(13px, 3.4cqi, 16px); font-weight: 700; line-height: 1.4; }
.v2-story__title { margin: 3px 0 6px; color: var(--v2-ink-dark); font-size: clamp(13px, 3.6cqi, 17px); font-weight: 600; line-height: 1.4; text-transform: uppercase; }
.v2-story__body { color: #6d635e; font-size: clamp(12px, 3cqi, 14px); line-height: 1.6; overflow-wrap: anywhere; }

/* ===== 7. Album 3D ===== */
.v2-album { position: relative; padding: 16px 0 28px; background: #fff; }
.v2-album__stage {
    position: relative; height: clamp(300px, 84vw, 400px); margin: 0 auto;
    perspective: 1100px; touch-action: pan-y; outline: none; user-select: none;
}
.v2-album__slide {
    position: absolute; top: 0; left: 50%; width: 62%; height: 100%; margin-left: -31%;
    padding: 0; border: 0; border-radius: clamp(18px, 6vw, 26px); overflow: hidden; background: #f5f1ee;
    cursor: pointer; transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.22, .7, .18, 1), opacity .6s ease, filter .6s ease;
    box-shadow: 0 14px 30px rgba(35, 12, 15, .12);
}
.v2-album__slide img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; -webkit-touch-callout: none; }
.v2-album__slide:focus-visible { outline: 2px solid var(--v2-red); outline-offset: 3px; }
.v2-album__nav {
    position: absolute; top: calc(16px + clamp(300px, 84vw, 400px) / 2); z-index: 20;
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .78);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12); transform: translateY(-50%); cursor: pointer;
}
.v2-album__nav svg { width: 22px; height: 22px; fill: none; stroke: #222; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.v2-album__nav--prev { left: 7%; }
.v2-album__nav--next { right: 7%; }
.v2-album__dots { display: flex; justify-content: center; gap: 9px; margin-top: 30px; }
.v2-album__dot {
    width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: #d4d0ce;
    cursor: pointer; transition: width .3s ease, background-color .3s ease;
}
.v2-album__dot.is-active { width: 30px; background: #6b6461; }

/* ===== 8. Hộp mừng cưới ===== */
.v2-gift { container-type: inline-size; padding: 48px 22px 56px; background: #fff; text-align: center; }
.v2-gift__title { margin-bottom: 4px; color: var(--v2-red-title); }
.v2-gift__subtitle { max-width: 440px; margin: 0 auto 30px; color: var(--v2-muted); font-size: clamp(12px, 3cqi, 15px); line-height: 1.45; letter-spacing: -.025em; text-wrap: balance; }
.v2-gift__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 420px; margin: 0 auto; }
.v2-gift__card { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; color: var(--v2-red-env); }
.v2-gift__role { color: #8e473e; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.v2-gift__qr {
    width: min(100%, 100px); padding: 0; border: 1px solid rgba(155, 42, 42, .14); border-radius: 8px;
    background: #fff; cursor: zoom-in;
}
.v2-gift__qr img { display: block; width: 100%; height: auto; padding: 8px; border-radius: 8px; }
.v2-gift__download {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
    background: rgba(155, 42, 42, .06); color: var(--v2-red-env);
    font-size: 11px; font-weight: 700; text-decoration: none;
}
.v2-gift__bank { font-size: clamp(12px, 3.2cqi, 15px); font-weight: 500; line-height: 1.4; }
.v2-gift__number { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: clamp(12px, 3.3cqi, 15px); font-weight: 700; }
.v2-gift__number span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-gift__copy {
    display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; padding: 0;
    border: 0; border-radius: 6px; background: rgba(155, 42, 42, .06); color: var(--v2-red-env); cursor: pointer;
}
.v2-gift__copy .is-done, .v2-gift__copy.is-copied .is-idle { display: none; }
.v2-gift__copy.is-copied .is-done { display: block; }
.v2-gift__name { max-width: 100%; font-size: clamp(11px, 3cqi, 13px); opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 421px) { .v2-gift__qr { width: min(100%, 120px); } }

/* ===== 9. Thank you ===== */
.v2-thanks {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 280px; padding: 0 clamp(26px, 7vw, 38px) 110px; background: #fff; color: var(--v2-muted-2); text-align: center;
}
.v2-thanks__title { margin: 0 0 clamp(8px, 2.5vw, 14px); color: #7b1d18; line-height: 1; }
.v2-thanks__message { max-width: 300px; margin-top: 8px; font-size: clamp(12px, 3.2vw, 15px); line-height: 1.45; letter-spacing: -.025em; text-wrap: balance; }

/* ===== Dock ===== */
.v2-dock {
    position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10040;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: min(var(--v2-col), 100%); padding: 0 16px;
    transform: translateX(-50%); pointer-events: none;
    transition: opacity .4s ease, transform .4s ease;
}
.v2-dock[hidden] { display: none; }
.v2-dock.is-entering { opacity: 0; transform: translate(-50%, 16px); }
.v2-dock > *, .v2-dock__items > * { pointer-events: auto; }
.v2-dock__items { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; max-width: 360px; transition: opacity .3s ease, transform .3s ease; }
.v2-dock.is-collapsed .v2-dock__items { opacity: 0; transform: translateX(20px); pointer-events: none; }
.v2-dock.is-collapsed .v2-dock__items > * { pointer-events: none; }
.v2-dock__wish {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 6px 0 15px;
    border: 1px solid rgba(113, 28, 23, .2); border-radius: 999px;
    background: rgba(255, 253, 249, .94); color: #9a8a86; box-shadow: 0 4px 14px rgba(75, 34, 29, .12);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font-size: 13px; text-align: left; cursor: pointer;
}
.v2-dock__badge {
    display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
    background: var(--v2-red); color: #fff; font-size: 11px; font-weight: 700;
}
.v2-dock__badge[hidden] { display: none; }
.v2-dock__button {
    position: relative; display: grid; place-items: center; flex: 0 0 auto;
    width: 42px; height: 42px; padding: 0; border: 1px solid rgba(113, 28, 23, .2); border-radius: 50%;
    background: rgba(255, 253, 249, .92); color: var(--v2-red); box-shadow: 0 4px 14px rgba(75, 34, 29, .12); cursor: pointer;
}
.v2-dock__button svg { width: 19px; height: 19px; }
.v2-dock__rsvp-wrap { position: relative; flex: 0 0 auto; }
.v2-dock__button--rsvp { animation: v2-action-glow 12s ease-in-out 3; }
.v2-dock__tooltip {
    position: absolute; bottom: calc(100% + 10px); left: 50%; padding: 6px 10px; border-radius: 8px;
    background: #4f1714; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
    opacity: 0; visibility: hidden; transform: translate(-50%, 8px) scale(.86);
    animation: v2-tooltip 12s ease-in-out 1.5s 3;
    pointer-events: none;
}
.v2-dock__tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; width: 9px; height: 9px; margin-top: -5px;
    background: inherit; transform: translateX(-50%) rotate(45deg);
}
.v2-dock__icon-menu, .v2-dock.is-collapsed .v2-dock__icon-close { display: none; }
.v2-dock.is-collapsed .v2-dock__icon-menu { display: block; }
@keyframes v2-action-glow {
    0%, 3%, 8%, 100% { box-shadow: 0 4px 14px rgba(75, 34, 29, .12), 0 0 0 0 rgba(113, 28, 23, 0); }
    6% { box-shadow: 0 7px 20px rgba(75, 34, 29, .2), 0 0 0 6px rgba(113, 28, 23, .11); }
}
@keyframes v2-tooltip {
    0%, 7.79%, 31%, 100% { opacity: 0; visibility: hidden; transform: translate(-50%, 8px) scale(.86); }
    9.4% { opacity: 1; visibility: visible; transform: translate(-50%, -2px) scale(1.055); }
    11.2%, 27% { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
}

/* ===== Bottom sheet: sổ lời chúc + xác nhận tham dự (bám cột 500px) ===== */
html.v2-sheet-open, html.v2-sheet-open body { overflow: hidden; }
.v2-sheet-backdrop {
    position: fixed; inset: 0; z-index: 10050;
    background: rgba(36, 17, 13, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    opacity: 0; transition: opacity .3s ease;
}
.v2-sheet-backdrop.is-open { opacity: 1; }
.v2-sheet-backdrop[hidden], .v2-sheet[hidden] { display: none; }
.v2-sheet {
    position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10051;
    display: flex; flex-direction: column;
    width: min(420px, calc(100% - 24px));
    max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
    border: 1px solid rgba(113, 28, 23, .12); border-radius: 26px;
    background: rgba(255, 250, 246, .98); color: var(--v2-ink); box-shadow: 0 -10px 40px rgba(36, 17, 13, .22);
    outline: none; overflow: hidden;
    transform: translate(-50%, calc(100% + 24px)); transition: transform .32s cubic-bezier(.22, .8, .3, 1);
}
.v2-sheet.is-open { transform: translate(-50%, 0); }
.v2-sheet__handle { flex: 0 0 auto; width: 40px; height: 4px; margin: 12px auto 0; border-radius: 4px; background: #e6d3d0; }
.v2-sheet__header {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto;
    padding: 6px 14px 12px 22px; border-bottom: 1px solid rgba(113, 28, 23, .08);
}
.v2-sheet__header--center { justify-content: center; padding: 10px 56px 16px; }
.v2-sheet__header--center .v2-sheet__close { position: absolute; top: 0; right: 14px; }
.v2-sheet__title { color: var(--v2-red); font-family: var(--f-body); font-size: 17px; font-weight: 600; line-height: 1.3; }
.v2-sheet__close {
    display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0;
    border: 0; border-radius: 50%; background: rgba(113, 28, 23, .07); color: var(--v2-red); cursor: pointer;
}
.v2-sheet__close svg { width: 16px; height: 16px; }
.v2-sheet__form { display: flex; flex-direction: column; gap: 10px; padding: 14px 22px 20px; }
.v2-field {
    display: block; width: 100%; min-height: 42px; padding: 10px 14px;
    border: 1px solid #ead6d2; border-radius: 14px; outline: none;
    background: #fff; color: var(--v2-ink); font: 400 14px/1.4 var(--f-body);
    -webkit-appearance: none; appearance: none;
}
.v2-field::placeholder { color: #a99a97; }
.v2-field:focus { border-color: rgba(113, 28, 23, .55); box-shadow: 0 0 0 3px rgba(113, 28, 23, .08); }
.v2-field--message { min-height: 44px; max-height: 120px; resize: none; }
.v2-sheet__status { min-height: 0; font-size: 12.5px; line-height: 1.45; text-align: center; }
.v2-sheet__status:empty { display: none; }
.v2-sheet__status[data-state="success"] { color: #2f7a43; }
.v2-sheet__status[data-state="error"] { color: #b3261e; }
.v2-sheet__status[data-state="pending"] { color: var(--v2-muted); }
.v2-sheet__submit {
    width: 100%; height: 42px; margin-top: 4px; padding: 0 16px; border: 0; border-radius: 14px;
    background: var(--v2-red); color: #fff; font-family: var(--f-body); font-size: 14px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background-color .2s ease;
}
.v2-sheet__submit:disabled { background: #b3837d; cursor: not-allowed; }
.v2-sheet__submit--strong { border-radius: 999px; }

/* Sổ lời chúc: danh sách bong bóng kiểu chat, mới nhất ở dưới */
.v2-guestbook { height: min(600px, calc(100vh - 96px)); height: min(600px, calc(100dvh - 96px)); }
.v2-guestbook__list {
    flex: 1 1 auto; min-height: 0; margin: 0; padding: 14px 22px 6px; list-style: none;
    overflow-y: auto; overscroll-behavior: contain;
}
.v2-guestbook__empty { flex: 1 1 auto; padding: 24px 22px; color: var(--v2-muted); font-size: 13px; text-align: center; }
.v2-guestbook__empty[hidden] { display: none; }
.v2-guestbook__list:empty { display: none; }
.v2-guestbook__form { flex: 0 0 auto; border-top: 1px solid rgba(113, 28, 23, .08); }
.v2-wish {
    margin: 0 0 10px; padding: 10px 14px; border: 1px solid rgba(113, 28, 23, .08); border-radius: 14px;
    background: rgba(246, 224, 221, .68);
}
.v2-wish.is-new { animation: v2-wish-in .45s cubic-bezier(.22, .8, .3, 1) both; }
.v2-wish__name { color: var(--v2-red); font-size: 11.5px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.v2-wish__message { margin-top: 2px; color: #5a302c; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes v2-wish-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* Xác nhận tham dự */
.v2-rsvp__form { min-height: 0; overflow-y: auto; overscroll-behavior: contain; gap: 8px; padding-top: 16px; }
.v2-rsvp__deadline { margin: 0 4px 6px; color: #a8746e; font-size: 13.5px; line-height: 1.55; text-align: center; text-wrap: balance; }
.v2-rsvp__deadline[hidden] { display: none; }
.v2-rsvp__label { margin-top: 4px; padding: 0; color: #5a1f1a; font-size: 13.5px; font-weight: 600; }
.v2-rsvp__group { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 4px 0 0; padding: 0; border: 0; }
.v2-rsvp__group[hidden], .v2-choice[hidden] { display: none; }
.v2-rsvp__group > legend { margin-bottom: 8px; }
.v2-rsvp__events { display: flex; flex-direction: column; gap: 6px; }
.v2-choice {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 16px;
    border: 1px solid #ead6d2; border-radius: 999px; background: #fff; color: #5a302c;
    font-size: 14px; line-height: 1.35; cursor: pointer; transition: border-color .2s ease, background-color .2s ease;
}
.v2-choice input {
    flex: 0 0 auto; width: 18px; height: 18px; margin: 0; border: 1.5px solid #c99d98; border-radius: 50%;
    background: #fff; -webkit-appearance: none; appearance: none; cursor: pointer;
    display: grid; place-content: center;
}
.v2-choice input::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--v2-red); transform: scale(0); transition: transform .15s ease; }
.v2-choice input:checked { border-color: var(--v2-red); }
.v2-choice input:checked::before { transform: scale(1); }
.v2-choice input:focus-visible { outline: 2px solid rgba(113, 28, 23, .45); outline-offset: 2px; }
.v2-choice:has(input:checked) { border-color: rgba(113, 28, 23, .55); background: rgba(246, 224, 221, .35); }
.v2-choice--check { min-height: 38px; padding: 7px 14px; border-radius: 12px; font-size: 13.5px; }
.v2-choice--check input { border-radius: 5px; }
.v2-choice--check input::before { width: 10px; height: 10px; border-radius: 2px; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
.v2-rsvp__count { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.v2-rsvp__count .v2-rsvp__label { margin: 0; }
.v2-stepper { display: inline-flex; align-items: center; gap: 6px; }
.v2-stepper__button {
    display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
    border: 1px solid #ead6d2; border-radius: 50%; background: #fff; color: var(--v2-red);
    font-size: 18px; line-height: 1; cursor: pointer;
}
.v2-stepper__input {
    width: 48px; height: 34px; padding: 0; border: 0; background: transparent;
    color: var(--v2-red); font: 600 17px/1 var(--f-body); text-align: center; -moz-appearance: textfield;
}
.v2-stepper__input::-webkit-outer-spin-button, .v2-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== LightGallery: trên nền cột, phủ toàn màn ===== */
.lg-backdrop { z-index: 10060; }
.lg-outer { z-index: 10070; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .v2-envelope__cursor, .v2-envelope__hint, .v2-calendar__heart, .v2-music__bars span,
    .v2-dock__button--rsvp, .v2-dock__tooltip, .v2-music.is-playing .v2-music__toggle { animation: none; }
    .v2-envelope.is-opening .v2-envelope__flap, .v2-envelope.is-opening .v2-envelope__photo { animation-duration: .01s; animation-delay: 0s; }
    .v2-album__slide, .v2-handoff-photo, .v2-sheet, .v2-sheet-backdrop { transition: none; }
    .v2-wish.is-new { animation: none; }
}
