:root {
    --green: #4e633a;
    --green-dark: #2e3c27;
    --sage: #cbd2c2;
    --cream: #f5f0e5;
    --paper: #fbf8f0;
    --ink: #263022;
    --gold: #b49a64;
    --white: #fff;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: Montserrat, Arial, sans-serif;
    --script: Allura, cursive
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.55
}

body.locked {
    overflow: hidden
}

img {
    display: block;
    width: 100%
}

button,
input,
textarea,
select {
    font: inherit
}

button,
a {
    outline-offset: 4px
}

.opening {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--green-dark);
    color: #fff;
    transition: opacity .8s ease, visibility .8s;
}

.opening.is-open {
    opacity: 0;
    visibility: hidden;
}

.opening__wash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(46, 60, 39, .6), rgba(46, 60, 39, .95)), url("/img/BEO06843.jpg") center 15% / cover no-repeat;
    filter: saturate(.7);
}

.opening__card {
    position: relative;
    width: min(88vw, 480px);
    padding: 48px 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(46, 60, 39, .54);
    backdrop-filter: blur(6px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28)
}

.opening__card:before,
.opening__card:after {
    content: "";
    position: absolute;
    width: 62px;
    height: 62px;
    border-color: rgba(255, 255, 255, .55)
}

.opening__card:before {
    left: 12px;
    top: 12px;
    border-left: 1px solid;
    border-top: 1px solid
}

.opening__card:after {
    right: 12px;
    bottom: 12px;
    border-right: 1px solid;
    border-bottom: 1px solid
}

.opening h1 {
    margin: 16px 0 8px;
    font: 400 clamp(48px, 12vw, 76px)/.86 var(--script)
}

.opening h1 span {
    display: block
}

.opening h1 i {
    font: 400 25px var(--serif);
    color: #d8caa9
}

.guest {
    margin: 4px 0;
    font: 600 22px var(--serif);
    letter-spacing: .03em
}

.opening__copy {
    font-size: 15px
}

.date-line {
    font: 500 14px var(--sans);
    letter-spacing: .35em
}

.eyebrow {
    margin: 0 0 12px;
    font: 600 11px var(--sans);
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--green)
}

.eyebrow.light {
    color: #e4dac0
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 18px;
    padding: 12px 24px;
    border: 1px solid var(--green);
    background: var(--green);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font: 600 11px var(--sans);
    letter-spacing: .16em;
    cursor: pointer;
    transition: .25s
}

.btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px)
}

.btn--cream {
    border-color: var(--cream);
    background: var(--cream);
    color: var(--green-dark)
}

.btn--cream:hover {
    background: #fff
}

.btn--outline {
    background: transparent;
    color: var(--green)
}

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: end center;
    overflow: hidden;
    color: #fff;
    background: #172212
}

.hero__photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateY(-43.33%)
}

.hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 20, 8, .08) 20%, rgba(23, 34, 18, .2) 50%, rgba(23, 34, 18, .82) 100%)
}

.hero__content {
    position: relative;
    padding: 0 20px 42px;
    text-align: center
}

.hero h2,
.footer h2 {
    margin: 0;
    font: 400 clamp(52px, 13vw, 88px)/.9 var(--script)
}

.hero h2 i,
.footer h2 i {
    color: #d8caa9;
    font-size: .55em
}

.hero__date {
    font: 500 13px var(--sans);
    letter-spacing: .38em
}

.scroll-cue {
    display: block;
    width: 34px;
    height: 34px;
    margin: 16px auto 0;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 26px;
    line-height: 25px;
    animation: float 1.8s ease-in-out infinite
}

.section {
    position: relative;
    padding: 60px max(24px, calc((100vw - 1050px)/2));
    text-align: center;
    overflow: hidden
}

.intro {
    background: var(--paper)
}

.script {
    margin: 6px 0 16px;
    font: 400 clamp(48px, 8vw, 72px)/.95 var(--script);
    color: var(--green)
}

.lead,
.section-copy {
    max-width: 690px;
    margin: 0 auto;
    color: #596052
}

.rule {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(260px, 70vw);
    margin: 8px auto;
    color: var(--gold)
}

.rule:before,
.rule:after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--gold)
}

.leaf {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(78, 99, 58, .16);
    border-radius: 100% 0
}

.leaf--one {
    right: -100px;
    top: -80px;
    transform: rotate(25deg)
}

.section--green {
    background: var(--green);
    color: #fff
}

.couple {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 22px;
    align-items: center
}

.person {
    max-width: 400px;
    margin: auto
}

.person__photo {
    aspect-ratio: 4/5;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 220px 220px 12px 12px;
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 8px
}

.person__photo img {
    height: 100%;
    object-fit: cover;
    border-radius: inherit
}

.person h3 {
    margin: 0;
    font: 400 54px var(--script);
    color: #f4e9cf
}

.person p:last-child {
    font-size: 16px;
    color: rgba(255, 255, 255, .78)
}

.couple__and {
    font: 400 70px var(--script);
    color: #dac99e
}

.family-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 760px;
    margin: 30px auto 0;
    background: transparent;
    border: none;
}

.family-grid>div {
    display: flex;
    flex-direction: column;
    padding: 20px 18px;
    background: transparent;
}

.family-grid>div:first-child {
    border-right: 2px solid #856a4b;
}

.family-grid b {
    margin-bottom: 10px;
    font: 600 12px var(--sans);
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--green)
}

.family-grid small {
    margin-top: 6px;
    color: #777268
}

.photo-break,
.countdown,
.footer {
    position: relative;
    min-height: 55vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

.photo-break {
    min-height: 72vh;
    /* Tăng 30% chiều cao trên máy tính (55vh * 1.3 ≈ 72vh) */
}

/* Tùy chỉnh vị trí ảnh riêng cho từng block trên máy tính */
.photo-break--just-married img {
    object-position: center 45%;
    /* Đẩy ảnh lên 15% (50% + 15%) để thấy rõ cô dâu & chú rể đang bước đi */
}

.photo-break--love-story img {
    object-position: center 32%;
    /* Dịch ảnh xuống trên máy tính để thấy rõ khuôn mặt cô dâu & chú rể */
}

.photo-break img,
.countdown>img,
.footer>img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover
}

.photo-break:after,
.countdown__shade,
.footer__shade {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(35, 47, 29, .48)
}

.photo-break>div,
.countdown__content,
.footer__content {
    position: relative;
    z-index: 1
}

.photo-break h2,
.countdown h2 {
    margin: 0;
    font: 400 clamp(62px, 12vw, 96px) var(--script)
}

.event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px
}

.event-card {
    position: relative;
    padding: 32px 24px;
    background: #fff;
    border: 1px solid #d9d2c5;
    box-shadow: 0 14px 40px rgba(44, 53, 37, .07)
}

.event-card__no {
    position: absolute;
    left: 20px;
    top: 12px;
    color: #d9d2c5;
    font: 500 44px var(--serif)
}

.event-card h3 {
    margin: 10px 0 0;
    font: 500 50px var(--serif);
    color: var(--green)
}

.event-card__date {
    font-style: italic
}

.event-card__rule {
    width: 50px;
    height: 1px;
    margin: 16px auto;
    background: var(--gold)
}

.event-card b {
    display: block;
    text-transform: uppercase;
    font: 600 12px var(--sans);
    letter-spacing: .1em
}

.countdown {
    min-height: 380px
}

.countdown>img {
    object-position: center calc(50% - 15px);
}

.countdown__shade {
    background: rgba(28, 40, 24, .62)
}

.timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-top: 22px
}

.timer div {
    min-width: 80px;
    padding: 10px 6px;
    border: 1px solid rgba(255, 255, 255, .38);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(3px)
}

.timer b,
.timer span {
    display: block
}

.timer b {
    font: 500 36px var(--serif)
}

.timer span {
    font: 500 9px var(--sans);
    text-transform: uppercase;
    letter-spacing: .15em
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 24px;
    width: 100%;
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
}

.gallery__item {
    border: 0;
    padding: 0;
    overflow: hidden;
    background: #e9ecef;
    cursor: zoom-in;
    border-radius: 12px;
    aspect-ratio: 3 / 4;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Hiệu ứng xuất hiện mượt mà (100% GPU, 60fps, không gây lag) */
.gallery__item.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.gallery__item.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Xuất hiện so le nhẹ nhàng lần lượt */
.gallery__item:nth-child(1) {
    transition-delay: 0.04s;
}

.gallery__item:nth-child(2) {
    transition-delay: 0.10s;
}

.gallery__item:nth-child(3) {
    transition-delay: 0.16s;
}

.gallery__item:nth-child(4) {
    transition-delay: 0.22s;
}

.gallery__item:nth-child(5) {
    transition-delay: 0.28s;
}

.gallery__item:nth-child(6) {
    transition-delay: 0.34s;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
    backface-visibility: hidden;
}

.gallery__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(38, 48, 34, 0.12);
}

.gallery__item:hover img {
    transform: scale(1.04);
}

.gallery__item--tall,
.gallery__item--wide {
    grid-row: auto;
    grid-column: auto;
}

.wishes .script {
    color: #f3e7ca
}

.section-copy {
    color: rgba(255, 255, 255, .78)
}

.form {
    display: grid;
    gap: 10px;
    max-width: 650px;
    margin: 24px auto 0;
    text-align: left
}

.form label {
    display: grid;
    gap: 4px
}

.form label span {
    font: 600 10px var(--sans);
    letter-spacing: .12em;
    text-transform: uppercase
}

.form input,
.form textarea,
.form select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .09);
    color: inherit;
    padding: 9px 12px;
    border-radius: 0
}

.form textarea {
    resize: vertical
}

.form input::placeholder,
.form textarea::placeholder {
    color: rgba(255, 255, 255, .55)
}

.form__row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px
}

.form--paper {
    padding: 22px;
    background: #fff;
    border: 1px solid #d9d2c5;
    color: var(--ink);
    box-shadow: 0 15px 45px rgba(44, 53, 37, .08)
}

.form--paper input,
.form--paper textarea,
.form--paper select {
    border-color: #d9d2c5;
    background: #faf8f2
}

.form__status {
    text-align: center;
    margin: 0;
    color: var(--green);
    font-style: italic
}

.wish-marquee-wrapper {
    position: relative;
    max-width: 650px;
    height: 260px;
    margin: 22px auto 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(216, 202, 169, 0.4) transparent;
    border-radius: 4px;
    mask-image: linear-gradient(to bottom, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 8%, black 92%, transparent);
}

.wish-marquee-wrapper::-webkit-scrollbar {
    width: 4px;
}

.wish-marquee-wrapper::-webkit-scrollbar-thumb {
    background: rgba(216, 202, 169, 0.35);
    border-radius: 4px;
}

.wish-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 4px;
    text-align: left;
}

.wish {
    padding: 11px 14px;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-left: 3px solid #d8caa9;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, transform 0.3s ease;
}

.wish:hover {
    background: rgba(255, 255, 255, .15);
    transform: translateX(4px);
}

.wish b {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f2e6c8;
    font-size: 15px;
    font-family: var(--serif);
    letter-spacing: 0.02em;
}

.wish b::before {
    content: "♥";
    color: #d8caa9;
    font-size: 12px;
}

.wish p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
}

.footer {
    min-height: 78vh
}

.footer__shade {
    background: linear-gradient(0deg, rgba(24, 35, 20, .8), rgba(24, 35, 20, .2))
}

.footer__content {
    align-self: end;
    padding: 60px 20px
}

.sound {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
    cursor: pointer
}

.sound__bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 16px
}

.sound__bars i {
    display: block;
    width: 2px;
    height: 5px;
    background: #fff
}

.sound.playing i {
    animation: bars .75s ease-in-out infinite alternate
}

.sound.playing i:nth-child(2) {
    animation-delay: .25s
}

.sound.playing i:nth-child(3) {
    animation-delay: .5s
}

.lightbox {
    width: min(92vw, 900px);
    padding: 0;
    border: 0;
    background: transparent
}

.lightbox::backdrop {
    background: rgba(12, 16, 10, .9)
}

.lightbox img {
    max-height: 86vh;
    object-fit: contain
}

.lightbox button {
    position: fixed;
    right: 24px;
    top: 15px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 44px;
    cursor: pointer
}

.toast {
    position: fixed;
    z-index: 1200;
    left: 50%;
    bottom: 25px;
    transform: translate(-50%, 30px);
    padding: 12px 18px;
    background: var(--green-dark);
    color: #fff;
    font: 500 12px var(--sans);
    opacity: 0;
    visibility: hidden;
    transition: .3s
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0)
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s ease, transform .8s ease
}

.reveal.visible {
    opacity: 1;
    transform: none
}

@keyframes bars {
    to {
        height: 16px
    }

}

@keyframes float {
    50% {
        transform: translateY(7px)
    }

}

@media(max-width:760px) {
    .hero {
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
    }

    .hero__photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        transform: none;
    }

    .hero__shade {
        z-index: 1;
        background: linear-gradient(180deg, rgba(10, 20, 8, .05) 0%, rgba(23, 34, 18, .2) 50%, rgba(23, 34, 18, .85) 100%);
    }

    .hero__content {
        position: relative;
        z-index: 2;
        padding: 0 20px calc(env(safe-area-inset-bottom, 20px) + 36px);
        text-align: center;
    }

    /* Giảm 25% kích thước heroTitle & footerTitle khi xem trên điện thoại */
    #heroTitle,
    .hero h2,
    #footerTitle,
    .footer h2 {
        font-size: clamp(38px, 9.8vw, 44px);
    }

    body {
        font-size: 17px
    }

    .section {
        padding: 46px 18px
    }

    .couple {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .couple__and {
        margin: -18px 0
    }

    .family-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0;
        border: none;
        background: transparent;
    }

    .family-grid>div {
        padding: 14px 8px;
        text-align: center;
        background: transparent;
    }

    .family-grid>div:first-child {
        border-right: 2px solid #856a4b;
    }

    .family-grid b {
        font-size: 11px;
        margin-bottom: 6px;
        letter-spacing: .12em;
    }

    .family-grid span {
        font-size: 13px;
        line-height: 1.4;
    }

    .family-grid small {
        font-size: 10.5px;
        line-height: 1.35;
        margin-top: 4px;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }

    .photo-break {
        min-height: 38vh
    }

    .photo-break img,
    .photo-break--just-married img,
    .photo-break--love-story img {
        object-position: center center;
        /* Giữ nguyên vị trí ảnh trên điện thoại */
    }

    .timer {
        gap: 5px
    }

    .timer div {
        min-width: 0
    }

    .timer b {
        font-size: 28px
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 8px;
        margin-top: 18px;
    }

    .gallery__item {
        border-radius: 10px;
        aspect-ratio: 3 / 4;
    }

    .gallery__item:hover {
        transform: none;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    }

    .gallery__item::before {
        display: none !important;
    }

    .form__row {
        grid-template-columns: 1fr
    }

    .event-card {
        padding: 50px 24px
    }

    .opening {
        height: 100dvh;
        min-height: 100dvh;
    }

    .opening__wash {
        background: linear-gradient(145deg, rgba(46, 60, 39, .62), rgba(46, 60, 39, .95)), url("/img/BEO06843.jpg") center center / cover no-repeat;
    }

    .opening__card {
        padding: 40px 22px;
    }

}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important
    }

    .reveal {
        opacity: 1;
        transform: none
    }

}

/* ====================================================
   Style bổ sung cho Route Chú Rể / Cô Dâu & API RSVP
   ==================================================== */
.event-grid--single {
    grid-template-columns: minmax(auto, 540px);
    justify-content: center;
}

.rsvp-guest-wrapper {
    max-width: 650px;
    margin: 20px auto 0;
}

.rsvp-guest-card {
    padding: 24px 20px;
    text-align: center;
}

.rsvp-guest-header {
    margin-bottom: 14px;
}

.rsvp-guest-name {
    font: 500 clamp(26px, 5vw, 32px) var(--serif);
    color: var(--green);
    margin: 6px 0;
}

.rsvp-guest-intro {
    color: #596052;
    font-size: 14px;
    margin: 4px 0 0;
}

.rsvp-checkbox-group {
    display: grid;
    gap: 9px;
    text-align: left;
    margin: 15px 0 12px;
}

.rsvp-custom-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 15px;
    background: #faf8f2;
    border: 2px solid #e2dbce;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.rsvp-custom-check:hover {
    border-color: var(--green);
    background: #f4f6f0;
}

.rsvp-custom-check.is-selected {
    border-color: var(--green);
    background: #edf3e8;
    box-shadow: 0 4px 14px rgba(79, 96, 60, 0.12);
}

.rsvp-custom-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
}

.rsvp-check-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rsvp-check-title {
    font: 600 15px var(--sans);
    color: var(--ink);
}

.rsvp-check-sub {
    font-size: 12px;
    color: #6d7565;
}

/* Trạng thái đã xác nhận (Locked) */
.rsvp-locked-badge {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 14px rgba(79, 96, 60, 0.2);
}

.rsvp-status-pill {
    display: inline-block;
    margin: 10px auto;
    padding: 8px 18px;
    background: #eef3e8;
    border: 1px solid #c9d8bd;
    border-radius: 30px;
    color: #354728;
    font-size: 14px;
}

.rsvp-status-pill b {
    color: #244116;
}

.rsvp-locked-message {
    color: #666;
    font-size: 13px;
    margin: 8px auto 0;
    max-width: 480px;
    line-height: 1.45;
}

/* Thẻ thiệp mời dành riêng cho Nhóm họ hàng / Gia đình (không form) */
.rsvp-family-card {
    position: relative;
    border: 2px solid #d8caa9;
    background: #fff;
    box-shadow: 0 12px 35px rgba(79, 96, 60, 0.08);
}

.rsvp-family-badge {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    background: #d8caa9;
    color: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.rsvp-family-rel {
    font: italic 500 14px var(--serif);
    color: var(--green);
    margin: -2px 0 10px;
}

.rsvp-family-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.rsvp-family-chip {
    padding: 6px 12px;
    background: #faf8f2;
    border: 1px solid #e5decb;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
}

.rsvp-family-chip b {
    color: var(--green);
    font-weight: 600;
}

.rsvp-family-welcome {
    max-width: 500px;
    margin: 10px auto 0;
    font: 400 14px var(--sans);
    line-height: 1.5;
    color: #4f5a43;
}

.rsvp-loading-spinner {
    font-size: 34px;
    margin: 0 0 12px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }

}

/* ====================================================
   Màn hình Chào mừng /greeting
   ==================================================== */
.greeting-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(145deg, rgba(35, 47, 29, 0.78), rgba(23, 34, 18, 0.92)), url("/img/BEO06843.jpg") center/cover no-repeat fixed;
    color: #fff;
    text-align: center;
    position: relative;
    overflow-x: hidden;
}

.greeting-wrapper {
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.greeting-card {
    position: relative;
    padding: 48px 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(46, 60, 39, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.greeting-card:before,
.greeting-card:after {
    content: "";
    position: absolute;
    width: 62px;
    height: 62px;
    border-color: rgba(255, 255, 255, 0.55);
}

.greeting-card:before {
    left: 14px;
    top: 14px;
    border-left: 1px solid;
    border-top: 1px solid;
}

.greeting-card:after {
    right: 14px;
    bottom: 14px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

.greeting-card h1 {
    margin: 16px 0 8px;
    font: 400 clamp(48px, 10vw, 76px)/0.88 var(--script);
}

.greeting-card h1 span {
    display: inline-block;
}

.greeting-card h1 i {
    font: 400 25px var(--serif);
    color: #d8caa9;
    margin: 0 10px;
}

.greeting-countdown {
    margin: 28px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 480px;
}

.greeting-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
    text-align: center;
}

.greeting-events-grid .event-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    color: var(--ink);
    padding: 38px 24px;
    border: 1px solid #d9d2c5;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    margin: 0;
}

.greeting-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.greeting-actions .btn {
    min-height: 48px;
    padding: 14px 28px;
    font-size: 12px;
    margin-top: 0;
}

/* ==========================================================================
   NÚT QUÀ MỪNG CƯỚI DUY NHẤT & POPUP VIETQR
   ========================================================================== */
.wedding-gift-single {
    display: flex;
    justify-content: center;
    padding: 0 24px 70px;
    margin: -30px auto 0;
    text-align: center;
}

.btn-gift {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 38px;
    background: #fff;
    color: var(--green);
    border: 2px solid #d8caa9;
    border-radius: 40px;
    font: 600 15px/1 var(--sans);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(79, 96, 60, 0.12);
    cursor: pointer;
    transition: all .3s ease;
}

.btn-gift:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(79, 96, 60, 0.22);
}

.btn-gift__icon {
    font-size: 20px;
    line-height: 1;
}

/* Popup Modal Quà Mừng Cưới */
.gift-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.gift-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.gift-modal__wash {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 17, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gift-modal__card {
    position: relative;
    z-index: 1;
    background: #ffffff !important;
    border-radius: 24px;
    padding: 16px;
    max-width: 390px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    border: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: scale(0.92);
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.gift-modal.is-open .gift-modal__card {
    transform: scale(1);
}

.gift-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
    z-index: 3;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.gift-modal__close:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
    transform: rotate(90deg);
}

.gift-modal__qr-wrap {
    width: 100%;
    max-width: 350px;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff !important;
}

.gift-modal__loading {
    font: italic 500 14px var(--serif);
    color: #777268;
    text-align: center;
}

.gift-modal__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    background: #ffffff !important;
}

.gift-modal__info {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 2px 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #ffffff !important;
}

.gift-modal__name {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.25;
}

.gift-modal__acc-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent !important;
    border: none !important;
    padding: 2px 0;
    margin: 2px 0;
}

.gift-modal__acc {
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.06em;
}

.gift-modal__copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: #6b7280;
    border: none !important;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
    line-height: 1;
}

.gift-modal__copy-btn:hover {
    color: var(--ink);
    transform: scale(1.12);
}

.gift-modal__copy-btn:active {
    transform: scale(0.92);
}

.gift-modal__copy-btn.copied {
    color: #16a34a !important;
}

.gift-modal__bank {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   DESKTOP TYPOGRAPHY ENHANCEMENTS (>= 761px)
   Tăng kích thước chữ trang trọng trên máy tính - Giữ nguyên trên điện thoại
   ========================================================================== */
@media (min-width: 761px) {

    /* Màn mở đầu: căn tiêu điểm ảnh nền xuống 15% để không bị cắt đầu trên máy tính */
    .opening__wash {
        background-position: center 35% !important;
    }

    /* 1. Phần mở đầu (Intro Story) */
    .intro .eyebrow {
        font-size: 15px;
        letter-spacing: .32em;
        margin-bottom: 14px;
    }

    .intro .lead {
        font-size: 22px;
        line-height: 1.7;
        max-width: 820px;
    }

    /* 2. Phần Cô dâu & Chú rể */
    .couple .eyebrow {
        font-size: 15px;
        letter-spacing: .32em;
        margin-bottom: 10px;
    }

    .person h3 {
        font-size: 62px;
    }

    .couple__and {
        font-size: 80px;
    }

    /* 3. Phần Trân trọng kính mời & Nhà trai / Nhà gái */
    .invitation .eyebrow {
        font-size: 15px;
        letter-spacing: .32em;
        margin-bottom: 14px;
    }

    .invitation .lead {
        font-size: 21px;
        line-height: 1.65;
        max-width: 760px;
    }

    .family-grid {
        max-width: 820px;
    }

    .family-grid b {
        font-size: 16px;
        letter-spacing: .22em;
        margin-bottom: 12px;
    }

    .family-grid span {
        font-size: 22px;
        line-height: 1.65;
        font-weight: 500;
    }

    .family-grid small {
        font-size: 17px;
        margin-top: 8px;
    }

    /* 4. Khối sự kiện cưới (Wedding Event Cards) */
    .event-card {
        padding: 40px 32px;
    }

    .event-card__no {
        font-size: 50px;
        left: 24px;
        top: 16px;
    }

    .event-card .eyebrow {
        font-size: 14px;
        letter-spacing: .28em;
    }

    .event-card h3 {
        font-size: 58px;
        margin: 12px 0 2px;
    }

    .event-card__date {
        font-size: 22px;
        margin: 6px 0;
    }

    .event-card b {
        font-size: 16px;
        letter-spacing: .14em;
        margin-top: 8px;
    }

    .event-card p {
        font-size: 19px;
        line-height: 1.55;
    }

    .event-card .btn {
        font-size: 14px;
        font-weight: 600;
        letter-spacing: .18em;
        padding: 13px 30px;
    }

    /* 5. Khối Đếm ngược đến ngày */
    .countdown {
        min-height: 540px;
        /* Tăng 30% chiều cao trên máy tính (380px * 1.3 ≈ 495px) */
        padding: 50px 20px;
    }

    .countdown .eyebrow {
        font-size: 16px;
        letter-spacing: .35em;
        margin-bottom: 16px;
    }

    .countdown h2 {
        font-size: 52px;
        /* Tăng 30% cỡ chữ tiêu đề (40px * 1.3 ≈ 52px) */
    }

    .countdown .timer {
        gap: 14px;
        margin-top: 26px;
    }

    .countdown .timer div {
        min-width: 104px;
        /* Tăng 30% kích thước ô đếm ngược (80px * 1.3 ≈ 104px) */
        padding: 14px 10px;
    }

    .countdown .timer b {
        font-size: 47px;
        /* Tăng 30% số đếm (36px * 1.3 ≈ 47px) */
    }

    .countdown .timer span {
        font-size: 11px;
    }

    /* 6. Khối Xác nhận tham dự (Khách mời / Thiệp mời) */
    .rsvp-guest-wrapper {
        max-width: 720px;
    }

    .rsvp-guest-card {
        padding: 32px 36px;
    }

    .rsvp-guest-header .eyebrow {
        font-size: 14px;
        letter-spacing: .3em;
        margin-bottom: 12px;
    }

    .rsvp-guest-name {
        font-size: 36px;
        font-weight: 600;
        margin: 8px 0;
    }

    .rsvp-guest-intro {
        font-size: 18px;
        line-height: 1.6;
        margin-top: 8px;
    }

    .rsvp-custom-check {
        padding: 15px 20px;
        gap: 15px;
    }

    .rsvp-custom-check input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .rsvp-check-title {
        font-size: 18px;
    }

    .rsvp-check-sub {
        font-size: 15px;
        line-height: 1.45;
    }

    #btnSubmitGuestRsvp {
        min-height: 52px;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: .15em;
    }

    .rsvp-family-welcome {
        font-size: 19px;
        line-height: 1.6;
    }

    .rsvp-family-chip {
        font-size: 16px;
        padding: 8px 16px;
    }
}