/* ==========================================================
   THIỆP CƯỚI ONLINE - TRẦN PHƯỢNG & NGUYỄN HOÀ
   Chủ đề: Song Hỷ Đỏ (Imperial Crimson, Luxury Cream & Gold)
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-screen: #420000;
    --red-imperial: #8c0000;
    --red-dark: #5a0000;
    --red-wine: #3c0005;
    --cream-panel: #fff9e6;
    --cream-light: #fffdf7;
    --gold-text: #ffe8a4;
    --gold-accent: #e6b86a;
    --gold-bright: #fff2d6;
    --gold-border: rgba(255, 232, 164, 0.35);
    --text-burgundy: #8c0000;
    --text-dark: #3a0000;
}

body {
    min-height: 100vh;
    background-color: var(--bg-screen);
    background: #420000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    color: var(--gold-text);
    overflow-x: hidden;
    position: relative;
    padding: 16px;
}

/* ---------------- BACKGROUND KÝ TỰ CHỮ HỶ LƠ LỬNG ---------------- */
.bg-pattern-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-hy {
    position: absolute;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.07);
    user-select: none;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    animation: gentleDrift 7s ease-in-out infinite alternate;
}

@keyframes gentleDrift {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    100% {
        transform: translateY(-12px) rotate(2deg);
    }
}

@keyframes ambientRise {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: var(--max-op, 0.45);
    }

    85% {
        opacity: var(--max-op, 0.45);
    }

    100% {
        transform: translateY(-115vh) translateX(var(--sway, 20px)) rotate(15deg);
        opacity: 0;
    }
}

.ambient-hy {
    position: absolute;
    bottom: -40px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    user-select: none;
    line-height: 1;
    pointer-events: none;
    will-change: transform, opacity;
    animation: ambientRise var(--duration, 20s) ease-in-out var(--delay, 0s) infinite;
}

/* ---------------- HIỆU ỨNG ICON1 (CHIBI CÔ DÂU CHÚ RỂ) RƠI TỪ TRÊN XUỐNG ---------------- */
.falling-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    /* Dưới khung thiệp */
    overflow: hidden;
}

.falling-item {
    position: absolute;
    top: -140px;
    will-change: transform, opacity;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
    animation: fallDownAnimation linear infinite;
}

@keyframes fallDownAnimation {
    0% {
        transform: translateY(0) rotate(-6deg) scale(0.85);
        opacity: 0;
    }

    10% {
        opacity: 0.95;
    }

    55% {
        transform: translateY(55vh) rotate(10deg) scale(1);
        opacity: 0.9;
    }

    75% {
        opacity: 0.55;
        /* Bắt đầu mờ dần khi rơi qua nửa dưới */
    }

    90% {
        opacity: 0.18;
        /* Cận kề đáy mờ dần rõ rệt */
    }

    100% {
        transform: translateY(112vh) rotate(-12deg) scale(0.88);
        opacity: 0;
    }
}

/* ---------------- HIỆU ỨNG TRÁI TIM RƠI NHẸ NHÀNG TRONG LÒNG THIỆP ---------------- */
.falling-hearts-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    pointer-events: none;
    z-index: 95;
    overflow: hidden;
    display: block;
}

.falling-heart-item {
    position: absolute;
    top: -40px;
    will-change: transform, opacity;
    pointer-events: none;
    user-select: none;
    opacity: 0;
    animation: heartGentleFall var(--h-dur, 9.5s) linear var(--h-delay, 0s) infinite;
}

@keyframes heartGentleFall {
    0% {
        transform: translate3d(0, -20px, 0) rotate(-12deg) scale(0.85);
        opacity: 0;
    }
    10% {
        opacity: var(--h-op, 0.78);
    }
    35% {
        transform: translate3d(var(--h-sway, 18px), 36vh, 0) rotate(14deg) scale(1);
        opacity: var(--h-op, 0.78);
    }
    70% {
        transform: translate3d(calc(var(--h-sway, 18px) * -0.7), 72vh, 0) rotate(-10deg) scale(0.96);
        opacity: var(--h-op, 0.78);
    }
    92% {
        opacity: calc(var(--h-op, 0.78) * 0.45);
    }
    100% {
        transform: translate3d(calc(var(--h-sway, 18px) * 0.5), 106vh, 0) rotate(12deg) scale(0.88);
        opacity: 0;
    }
}

/* ---------------- MAIN CONTAINER ---------------- */
.main-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 720px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

/* ---------------- BÌA THIỆP MỜI (CARD ENVELOPE) ---------------- */
.card-envelope {
    width: 100%;
    aspect-ratio: 16 / 10.4;
    min-height: 380px;
    background-image: url('../images/card-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 35px rgba(180, 18, 30, 0.3);
    border: 1px solid rgba(255, 215, 140, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    position: relative;
    transform-style: preserve-3d;
}

/* Hiệu ứng thiệp mở tung 3D khi bấm Mở thiệp */
.card-envelope.burst-open {
    animation: envelope3dBurst 0.85s cubic-bezier(0.3, 1.4, 0.5, 1) forwards;
}

@keyframes envelope3dBurst {
    0% {
        transform: scale(1) translateZ(0) rotateX(0deg);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    }

    35% {
        transform: scale(1.08) translateZ(90px) rotateX(-12deg);
        box-shadow:
            0 0 80px rgba(255, 220, 130, 0.95),
            0 0 130px rgba(220, 20, 40, 0.7);
        filter: brightness(1.25);
    }

    70% {
        transform: scale(1.18) translateZ(180px) rotateX(25deg);
        opacity: 0.85;
    }

    100% {
        transform: scale(0.65) translateZ(-250px) rotateX(75deg) translateY(-90px);
        opacity: 0;
        pointer-events: none;
    }
}

.card-envelope.is-hidden {
    display: none;
}

.card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* HUY HIỆU SONG HỶ TRÒN ĐỈNH THIỆP */
.badge-hy-wrapper {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.badge-hy {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, #7e0712 25%, #460107 100%);
    border: 2px solid #ecd39d;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: default;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.5),
        0 0 14px rgba(236, 211, 157, 0.35);
    animation: sealAuraPulse 4s ease-in-out infinite alternate;
    transition: box-shadow 0.4s ease;
}

.badge-hy::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px dashed rgba(236, 211, 157, 0.75);
    pointer-events: none;
    animation: rotateDashedRing 30s linear infinite;
}

.badge-hy::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 80%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 245, 215, 0.35), transparent);
    transform: rotate(30deg);
    pointer-events: none;
    z-index: 1;
    animation: sealGlint 6s ease-in-out infinite;
}

.badge-hy:hover {
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(246, 210, 137, 0.65);
}

@keyframes sealAuraPulse {
    0% {
        box-shadow:
            0 4px 14px rgba(0, 0, 0, 0.5),
            0 0 12px rgba(236, 211, 157, 0.3);
    }

    100% {
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.55),
            0 0 22px rgba(236, 211, 157, 0.58);
    }
}

@keyframes rotateDashedRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes sealGlint {

    0%,
    45% {
        left: -150%;
    }

    60%,
    100% {
        left: 200%;
    }
}

.hy-symbol {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff0d2;
    line-height: 1;
    position: relative;
    z-index: 2;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(246, 210, 137, 0.35);
    user-select: none;
}

/* TÊN CHÚ RỂ VÀ CÔ DÂU */
.couple-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.couple-names .name {
    font-family: 'Charm', 'Dancing Script', cursive;
    font-size: 38px;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1.15;
    letter-spacing: 0.5px;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.75),
        0 0 12px rgba(255, 222, 160, 0.3);
}

.couple-names .ampersand {
    font-family: 'Charm', 'Dancing Script', cursive;
    font-size: 26px;
    font-weight: 700;
    color: var(--gold-accent);
    line-height: 0.85;
    margin: -1px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* HOA VĂN NGĂN CÁCH */
.ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 130px;
    margin: 6px 0 8px;
}

.ornament-divider .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(236, 211, 157, 0.75), transparent);
}

.ornament-divider .ornament-leaf {
    font-size: 13px;
    color: var(--gold-accent);
    line-height: 1;
}

/* NGÀY CƯỚI & DÒNG CHỮ THÂN MỜI */
.wedding-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--gold-text);
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.invitation-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: rgba(255, 238, 215, 0.9);
    margin-bottom: 14px;
}

/* NÚT BẤM "MỞ THIỆP" */
.action-wrap {
    margin-top: 2px;
}

.btn-open-card {
    background: linear-gradient(180deg, #fff7e0 0%, #fae2a5 50%, #f4d081 100%);
    color: #64060f;
    border: none;
    padding: 10px 36px;
    border-radius: 40px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-open-card:hover {
    background: linear-gradient(180deg, #fff9e8 0%, #fde8b4 50%, #f8d78d 100%);
    box-shadow:
        0 4px 22px rgba(246, 210, 137, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-open-card:active {
    opacity: 0.95;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 32px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: btnShineAnim 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnShineAnim {

    0%,
    25% {
        left: -100%;
    }

    50%,
    100% {
        left: 200%;
    }
}

/* ==========================================================
   TOÀN BỘ NỘI DUNG RUỘT THIỆP BÊN TRONG (CHUNGDoi SONG HỶ ĐỎ)
   ========================================================== */
.card-inside {
    display: none;
    width: 100%;
    max-width: 720px;
    background: transparent;
    border-radius: 16px;
    border: none;
    box-shadow: none;
    padding: 0;
    color: var(--gold-text);
    position: relative;
    /* sát mép trên màn hình (bù padding 16px của body) */
    margin-top: -16px;
}

.card-inside.is-visible {
    display: block;
    animation: inside3dUnfold 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Mobile: khung nền tràn viền toàn màn hình */
@media (max-width: 760px) {
    .card-inside {
        width: 100vw;
        max-width: 100vw;
        flex-shrink: 0;
        margin-top: 0;
        margin-left: calc(-50vw + 50%);
    }
}

@keyframes inside3dUnfold {
    0% {
        opacity: 0;
        transform: scale(0.7) translateZ(-160px) rotateX(-20deg);
        filter: blur(5px);
    }

    40% {
        opacity: 0.9;
        filter: blur(0px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateZ(0) rotateX(0deg);
    }
}

.inside-body-content {
    width: 100%;
    padding: 0 10px 0;
    background-color: #910201;
}

.btn-back-envelope {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(30, 0, 5, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 215, 140, 0.55);
    color: #ffd78c;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease;
}

.btn-back-envelope:hover {
    background: rgba(180, 18, 30, 0.95);
    border-color: #ffd78c;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(180, 18, 30, 0.6);
}

/* ---------------- 1. HEADER SONG HỶ (THEO MẪU) ---------------- */
.cd-hero {
    position: relative;
    width: 100%;
    height: 736px;
    background: #8c0000;
    border-radius: 0;
    overflow: hidden;
    isolation: isolate;
    container-type: inline-size;
    margin-bottom: 0;
    box-shadow: none;
}

.cd-hero-inner {
    position: relative;
    width: 100%;
    max-width: 441px;
    height: 100%;
    margin: 0 auto;
}

/* Cột nền kem giữa */
.cd-cream {
    position: absolute;
    left: -9px;
    top: 0;
    width: calc(100% + 18px);
    height: 688px;
    background: #fff9e6;
    z-index: 0;
}

/* Chữ Hỷ chìm trên nền kem */
.cd-hy-bg {
    position: absolute;
    left: -49px;
    top: -30px;
    width: 541px;
    height: 606px;
    max-width: none;
    object-fit: contain;
    opacity: 0.07;
    pointer-events: none;
    z-index: 1;
}

/* Tên Chú Rể & Cô Dâu */
.cd-names {
    position: absolute;
    top: 77px;
    left: 0;
    right: 0;
    padding: 0 22px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    z-index: 4;
}

.cd-person {
    flex: 1 1 0;
    max-width: 165px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cd-role {
    margin-bottom: 5px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #990000;
}

.cd-name {
    margin: 0;
    font-family: 'Fraunces', 'Times New Roman', serif;
    font-size: clamp(15.5px, 4.4vw, 19.5px);
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #990000;
}

.cd-hy-icon {
    width: 32px;
    height: 31px;
    margin: 0 4px 1px;
    max-width: none;
    flex-shrink: 0;
    object-fit: contain;
}

/* Khung ảnh cưới */
.cd-photo {
    position: absolute;
    left: 13.61%;
    top: 151px;
    width: 72.79%;
    aspect-ratio: 321 / 527;
    z-index: 2;
}

.cd-photo svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Sóng đỏ ôm chân ảnh */
.cd-wave {
    position: absolute;
    left: 50%;
    bottom: -281px;
    /* luôn rộng hơn toàn bộ khung để 2 mép dọc của sóng bị ẩn */
    width: max(155.76%, calc(100cqw + 40px));
    height: 509px;
    max-width: none;
    transform: translateX(-50%);
    pointer-events: none;
}

/* Chữ Hỷ mờ 2 góc dưới */
.cd-hy-corner {
    position: absolute;
    top: 581px;
    width: 163px;
    height: 155px;
    max-width: none;
    object-fit: contain;
    opacity: 0.1;
    pointer-events: none;
    z-index: 3;
}

.cd-hy-left {
    left: -80px;
}

.cd-hy-right {
    right: -80px;
}

/* 2. CÁC PANEL NỀN KEM CHỮ ĐỎ (THEO STYLE PANEL CHUNGDoi) */
.section-panel {
    background-color: var(--cream-panel);
    border-radius: 14px;
    padding: 24px 18px;
    color: var(--text-burgundy);
    margin-bottom: 22px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(230, 184, 106, 0.4);
    text-align: center;
    position: relative;
}

/* Khung nền ảnh riêng cho section Thông Tin Lễ Cưới */
.ceremony-section {
    background-color: #910201;
    background-image: url('../images/thanmoi.png');
    background-size: 100% calc(100% + 4px);
    background-repeat: no-repeat;
    background-position: center top;
    border: none;
    box-shadow: none;
    border-radius: 0;
    /* Mở rộng tràn ngang bằng với cd-hero và nối sát đáy cd-hero + phần dưới */
    width: calc(100% + 20px);
    margin: -2px -10px 0 -10px;
    padding: 55px 0 160px;
    overflow: hidden;
}

/* Toàn bộ nội dung nằm gọn ghẽ trong vùng kem giữa của thanmoi.png (~64% chiều rộng) */
.ceremony-section .panel-inner {
    width: 64%;
    max-width: 380px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
}

/* Giới hạn các thẻ thời gian nằm trong vùng kem của khung */
.ceremony-section .ceremony-time-card {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #8c0000;
    margin-bottom: 16px;
    text-align: center;
    text-transform: uppercase;
}

.gold-title {
    color: var(--gold-bright);
    margin-bottom: 16px;
}

.family-tree-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto 12px;
    gap: 8px;
    width: 100%;
    padding: 0 2px;
    box-sizing: border-box;
}

.family-side-item {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.family-side-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #8c0000;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.family-parent {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #8b0000;
    line-height: 1.55;
    margin: 2px 0;
    white-space: nowrap;
}

.family-parent b {
    font-weight: 700;
    color: #800000;
}

.family-role {
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-style: italic;
    font-weight: 500;
    color: #a52a2a;
    margin-top: 4px;
}

.family-sep-line {
    width: 1px;
    height: 54px;
    background-color: rgba(180, 20, 30, 0.35);
    margin: 2px 2px 0;
    flex-shrink: 0;
}

.announcement-quote {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #8b0000;
    line-height: 1.6;
    margin: 12px auto 10px;
    padding: 0;
    text-align: center;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Tên cô dâu chú rể thư pháp cực lớn chuẩn tiếng Việt */
.grand-calligraphy-names {
    margin: 12px 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.big-name {
    font-family: 'Charm', 'Dancing Script', cursive;
    font-size: clamp(32px, 8vw, 44px);
    font-weight: 700;
    color: var(--red-imperial);
    line-height: 1.25;
    text-shadow: 0 2px 6px rgba(140, 0, 0, 0.12);
}

.big-ampersand {
    font-family: 'Charm', 'Dancing Script', cursive;
    font-size: 28px;
    font-weight: 700;
    color: #8c0000;
    margin: -4px 0;
    line-height: 1;
}

/* Thời gian lễ và tiệc (không dùng khung trắng, hiển thị trực tiếp trên nền kem của ảnh) */
.ceremony-time-card {
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 6px 0;
    margin-bottom: 20px;
    backdrop-filter: none;
    box-shadow: none;
}

.ceremony-time-card:first-of-type {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(180, 20, 30, 0.2);
}

.ceremony-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #8c0000;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ceremony-location {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #5a0000;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-style: italic;
}

.ceremony-hours {
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #8c0000;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.ceremony-date-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.big-day {
    font-family: 'Montserrat', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #8c0000;
    line-height: 1;
    letter-spacing: -0.5px;
    font-variant-numeric: lining-nums tabular-nums;
}

.date-col {
    display: flex;
    flex-direction: column;
    text-align: left;
    border-left: 2px solid #8c0000;
    padding-left: 10px;
    gap: 2px;
}

.date-col .month-txt {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #8c0000;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.date-col .year-txt {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #8c0000;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.lunar-calendar-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-style: italic;
    color: #a52a2a;
    letter-spacing: 0.2px;
}

@media (max-width: 620px) {
    .ceremony-section,
    .section-panel.ceremony-section {
        background-size: 128% calc(100% + 4px);
        background-position: center top;
        padding: 75px 0 135px;
        overflow: hidden;
    }

    .ceremony-section .panel-inner {
        width: 78%;
    }

    .section-title {
        font-size: 16px;
        letter-spacing: 1.2px;
        margin-bottom: 14px;
    }

    .family-tree-grid {
        align-items: flex-start;
        margin-bottom: 12px;
        gap: 4px;
    }

    .family-side-title {
        font-size: 11.5px;
        margin-bottom: 4px;
    }

    .family-parent {
        font-size: clamp(9.5px, 2.55vw, 11.2px);
        white-space: nowrap;
        letter-spacing: -0.2px;
        line-height: 1.5;
        margin: 1px 0;
    }

    .family-role {
        font-size: 11px;
        margin-top: 3px;
    }

    .family-sep-line {
        height: 48px;
    }

    .announcement-quote {
        font-size: 10.5px;
        margin: 10px auto 10px;
        line-height: 1.55;
        letter-spacing: 0.3px;
    }

    .grand-calligraphy-names {
        margin: 10px 0 14px;
    }

    .big-name {
        font-size: 28px;
        line-height: 1.2;
    }

    .big-ampersand {
        font-size: 23px;
        margin: -2px 0;
    }

    .ceremony-time-card {
        padding: 3px 0;
        margin-bottom: 14px;
    }

    .ceremony-time-card:first-of-type {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .ceremony-tag {
        font-size: 13.5px;
        margin-bottom: 4px;
    }

    .ceremony-location {
        font-size: 10px;
        letter-spacing: 0.3px;
        margin-bottom: 4px;
    }

    .ceremony-hours {
        font-size: 11.5px;
        margin-bottom: 6px;
    }

    .big-day {
        font-size: 38px;
    }

    .ceremony-date-display {
        gap: 10px;
        margin-bottom: 4px;
    }

    .date-col .month-txt,
    .date-col .year-txt {
        font-size: 13px;
    }

    .lunar-calendar-text {
        font-size: 10.5px;
        margin-top: 2px;
    }
}

@media (max-width: 420px) {
    .ceremony-section,
    .section-panel.ceremony-section {
        background-size: 130% calc(100% + 4px);
        background-position: center top;
        padding: 72px 0 135px;
        overflow: hidden;
    }

    .ceremony-section .panel-inner {
        width: 79%;
    }

    .section-title {
        font-size: 15.5px;
        margin-bottom: 12px;
    }

    .family-parent {
        font-size: clamp(9.2px, 2.5vw, 10.6px);
        white-space: nowrap;
    }

    .family-side-title {
        font-size: 11px;
    }

    .family-role {
        font-size: 10.5px;
    }

    .announcement-quote {
        font-size: 10px;
        margin: 9px auto 10px;
    }

    .grand-calligraphy-names {
        margin: 8px 0 12px;
    }

    .big-name {
        font-size: 26px;
        line-height: 1.2;
    }

    .big-ampersand {
        font-size: 22px;
    }

    .ceremony-tag {
        font-size: 13px;
    }

    .ceremony-location {
        font-size: 9.5px;
    }

    .ceremony-hours {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .big-day {
        font-size: 36px;
    }

    .date-col .month-txt,
    .date-col .year-txt {
        font-size: 12.5px;
    }

    .lunar-calendar-text {
        font-size: 10px;
    }
}

/* 3. ALBUM ẢNH CƯỚI (3D COVERFLOW - THEO MẪU SONG HỶ) */
.album-section {
    position: relative;
    isolation: isolate;
    overflow-x: clip;
    /* Cùng màu đỏ với đáy khung thanmoi.png để nối liền với khung Thông Tin Lễ Cưới */
    background-color: #910201;
    /* Tràn ngang giống .ceremony-section và kéo sát lên khung phía trên */
    width: calc(100% + 20px);
    margin: -2px -10px 0;
}

.album-inner {
    position: relative;
    width: 100%;
    max-width: 441px;
    margin: 0 auto;
}

.album-deco {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.album-flower {
    position: absolute;
    max-width: none;
    width: 274px;
    height: 311px;
    object-fit: contain;
    opacity: 0.2;
    pointer-events: none;
    will-change: transform;
}

.album-flower-right {
    right: -62px;
    top: -17px;
}

.album-flower-left {
    left: -62px;
    top: 203px;
}

.album-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 35px 0;
}

.album-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    color: rgb(255, 232, 164);
    margin-bottom: 18px;
}

.album-wrap {
    width: 100%;
    max-width: 414px;
}

.album-stage {
    position: relative;
    height: 340px;
    touch-action: pan-y;
    user-select: none;
}

.album-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.album-card {
    position: absolute;
    height: 92%;
    aspect-ratio: 0.666504 / 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    transition: transform 1100ms ease-in-out, opacity 1100ms ease-in-out;
}

.album-card.is-active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.album-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    pointer-events: none;
    -webkit-user-drag: none;
}

.album-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255, 249, 230, 0.6);
    color: #5a0000;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.album-arrow svg {
    width: 16px;
    height: 16px;
}

.album-arrow:hover {
    background: rgba(255, 249, 230, 1);
}

.album-arrow.prev {
    left: 0;
}

.album-arrow.next {
    right: 0;
}

.album-counter {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.album-counter span {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: #fff;
    opacity: 0.6;
}

/* ---------- TRÌNH XEM ẢNH CHI TIẾT (LIGHTBOX) ---------- */
.album-card.is-active {
    cursor: zoom-in;
}

.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    background: rgba(20, 20, 20, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.album-lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lb-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #1c0002 0%, #0d0001 100%);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    padding: 24px 0 14px;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.album-lightbox.show .lb-panel {
    transform: scale(1);
}

.lb-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lb-main {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 44px;
}

.lb-img {
    max-width: 100%;
    max-height: calc(100dvh - 150px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    user-select: none;
    touch-action: pan-y;
}

.lb-img.is-in {
    animation: lbFadeIn 0.35s ease;
}

@keyframes lbFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lb-nav:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lb-nav svg {
    width: 18px;
    height: 18px;
}

.lb-nav.prev { left: 4px; }
.lb-nav.next { right: 4px; }

.lb-count {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.lb-thumbs {
    display: flex;
    gap: 6px;
    max-width: 100%;
    margin-top: 10px;
    padding: 4px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.lb-thumbs::-webkit-scrollbar {
    display: none;
}

.lb-thumb {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lb-thumb:hover {
    opacity: 0.9;
}

.lb-thumb.active {
    opacity: 1;
    border-color: #e6b86a;
    transform: scale(1.08);
}

@media (min-width: 768px) {
    .lb-panel { padding: 26px 0 16px; }
    .lb-main { padding: 0 60px; }
    .lb-nav { width: 40px; height: 40px; }
    .lb-thumb { width: 44px; height: 44px; }
}

@media (min-width: 768px) {
    .album-inner {
        max-width: 600px;
    }

    .album-flower {
        width: 373px;
        height: 423px;
    }

    .album-flower-right {
        right: -153px;
        top: -23px;
    }

    .album-flower-left {
        left: -153px;
        top: 276px;
    }

    .album-title {
        font-size: 27px;
    }

    .album-wrap {
        max-width: 563px;
    }

    .album-stage {
        height: 520px;
    }

    .album-arrow {
        display: flex;
    }
}


/* 4. THÔNG TIN TIỆC CƯỚI V2 — reference-image style */
.reception-section-v2 {
    padding: 0;
    background: #910201;
    position: relative;
    overflow: hidden;
    /* Tràn ngang bằng album-section và kéo sát lên không hở viền */
    width: calc(100% + 20px);
    margin: -2px -10px 0;
}

.rcv-panel {
    position: relative;
    margin: 0;
    max-width: none;
    width: 100%;
    /* Dùng thanmoi.png làm khung nền — co giãn theo nội dung */
    background-color: #910201;
    background-image: url('../images/thanmoi.png');
    background-size: 100% calc(100% + 4px);
    background-repeat: no-repeat;
    background-position: center top;
    /* Vùng kem giữa khung: 6% top, 21% hai bên, 28% dưới (đuôi nhọn khung) */
    padding: 5% 22% 28% 22%;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
}

/* Title */
.rcv-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #8c0000;
    letter-spacing: 1.5px;
    margin: 0 0 20px;
    text-transform: uppercase;
}

/* Event Info Block */
.rcv-event-info {
    margin-bottom: 18px;
}

.rcv-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #8c0000;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.rcv-time-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 6px;
}

.rcv-clock {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #8c0000;
}

.rcv-dayname {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #8c0000;
}

.rcv-big-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 4px 0 8px;
}

.rcv-day-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 58px;
    font-weight: 800;
    color: #8c0000;
    line-height: 1;
    padding-right: 14px;
    border-right: 2px solid #8c0000;
    font-variant-numeric: lining-nums tabular-nums;
}

.rcv-month-year {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 14px;
    gap: 2px;
}

.rcv-month {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #8c0000;
    letter-spacing: 0.5px;
}

.rcv-year {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #8c0000;
}

.rcv-lunar {
    font-size: 11px;
    color: #a52a2a;
    font-style: italic;
    margin: 0;
}

/* Schedule Row */
.rcv-schedule-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 14px 0 18px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

.rcv-sch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.rcv-sch-lbl {
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    color: #a52a2a;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rcv-sch-time {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #8c0000;
    letter-spacing: 0.5px;
}

.rcv-sch-sep {
    width: 1px;
    height: 36px;
    background: rgba(140,0,0,0.25);
}

/* Countdown inline text */
.rcv-countdown-wrap {
    margin-bottom: 20px;
}

.rcv-cd-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #a52a2a;
    letter-spacing: 1px;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.rcv-cd-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: #8c0000;
    margin: 0;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}

/* Calendar */
.rcv-calendar {
    border: 1px solid rgba(140,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
}

.rcv-cal-title {
    font-family: 'Dancing Script', cursive;
    font-size: 18px;
    font-weight: 700;
    color: #8c0000;
    padding: 8px 0 6px;
    border-bottom: 1px solid rgba(140,0,0,0.15);
}

.rcv-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.rcv-cal-head {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #8c0000;
    padding: 6px 0 4px;
    border-bottom: 1px solid rgba(140,0,0,0.1);
    background: rgba(140,0,0,0.04);
}

.rcv-cal-cell {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #333;
    padding: 6px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}

.rcv-cal-special {
    position: relative;
    overflow: visible;
}

/* ── Keyframes ── */
@keyframes heartbeat {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.2); }
    28%  { transform: scale(1); }
    42%  { transform: scale(1.15); }
    70%  { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes heartRipple {
    0%   { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(2.4); opacity: 0; }
}

@keyframes heartGlow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(200,20,20,0.6)); }
    50%       { filter: drop-shadow(0 0 10px rgba(255,80,80,0.95)) drop-shadow(0 0 18px rgba(255,60,60,0.45)); }
}

@keyframes floatSparkle {
    0%   { transform: translateY(0) scale(1);   opacity: 1; }
    100% { transform: translateY(-22px) scale(0); opacity: 0; }
}

/* Vòng ripple phía sau */
.rcv-cal-special::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(200, 20, 20, 0.35);
    animation: heartRipple 1.6s ease-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Vòng ripple thứ 2 lệch pha */
.rcv-cal-special::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(220, 40, 40, 0.25);
    animation: heartRipple 1.6s ease-out 0.55s infinite;
    pointer-events: none;
    z-index: 0;
}

/* Ngày đặc biệt: số nằm trong trái tim */
.rcv-heart-day {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    z-index: 2;
    animation: heartbeat 1.6s ease-in-out infinite, heartGlow 1.6s ease-in-out infinite;
    transform-origin: center;
}

/* Hình ♥ gradient đỏ rực */
.rcv-heart-day::before {
    content: '\2665';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    line-height: 1;
    /* gradient đỏ rực lãng mạn */
    background: linear-gradient(160deg, #e8192c 0%, #9b0000 55%, #6b0f0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: -1;
    text-align: center;
}

/* Số nằm trên ♥ */
.rcv-heart-day span {
    position: relative;
    z-index: 3;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    padding-top: 3px;
}

/* ✨ Tia sáng nhỏ bay lên — 3 hạt */
.rcv-heart-day .spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff6b6b;
    pointer-events: none;
    animation: floatSparkle 1.8s ease-out infinite;
}
.rcv-heart-day .spark:nth-child(1) { top: -2px; left: 6px;  animation-delay: 0s;    animation-duration: 1.6s; background: #ff8c8c; }
.rcv-heart-day .spark:nth-child(2) { top: 0px;  left: 25px; animation-delay: 0.5s;  animation-duration: 2s;   background: #ffaaaa; width: 3px; height: 3px; }
.rcv-heart-day .spark:nth-child(3) { top: -4px; left: 15px; animation-delay: 1s;    animation-duration: 1.4s; background: #ff6b6b; width: 5px; height: 5px; }

/* Actions */
.rcv-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.rcv-link-cal {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #333;
    text-decoration: underline;
    font-weight: 500;
}

.rcv-link-cal:hover {
    color: #8c0000;
}

.rcv-btn-rsvp {
    background: #8c0000;
    color: #fff;
    border: none;
    padding: 11px 36px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(140,0,0,0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rcv-btn-rsvp:hover {
    transform: translateY(-2px);
    background: #a30000;
}

/* Bottom icon */
.rcv-bottom-icon {
    display: flex;
    justify-content: center;
}

.rcv-bottom-icon img {
    width: 40px;
    height: 40px;
    opacity: 0.85;
}

@media (max-width: 620px) {
    .rcv-panel {
        background-size: 128% calc(100% + 4px);
        background-position: center top;
        padding: 75px 12% 145px 12%;
    }

    .rcv-title {
        font-size: 16px;
        letter-spacing: 1.2px;
        margin-bottom: 16px;
    }

    .rcv-cd-text {
        font-size: 14px;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .rcv-panel {
        background-size: 130% calc(100% + 4px);
        background-position: center top;
        padding: 72px 11% 140px 11%;
    }

    .rcv-title {
        font-size: 15.5px;
    }

    .rcv-cd-text {
        font-size: 13px;
        white-space: nowrap;
    }
}



/* 5. BẢN ĐỒ VÀ ĐỊA ĐIỂM TỔ CHỨC (NỀN ĐỒNG NHẤT NHƯ ALBUM ẢNH - SONG HỶ V2 RED) */
.map-section-v2 {
    position: relative;
    overflow-x: clip;
    /* Nền đỏ đồng nhất tuyệt đối như Album Ảnh, tràn ngang không viền đóng hộp */
    background-color: #910201;
    width: calc(100% + 20px);
    margin: -2px -10px 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.map-inner-v2 {
    position: relative;
    width: 100%;
    max-width: 441px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .map-inner-v2 {
        max-width: 600px;
    }
}

.map-deco-v2 {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.map-flower {
    position: absolute;
    width: 274px;
    height: 311px;
    object-fit: contain;
    opacity: 0.2;
    pointer-events: none;
}

.map-flower-right {
    right: -62px;
    top: -37px;
}

.map-flower-left {
    left: -62px;
    top: 233px;
    transform: scaleX(-1);
}

@media (min-width: 768px) {
    .map-flower {
        width: 373px;
        height: 423px;
    }
    .map-flower-right {
        right: -130px;
        top: -50px;
    }
    .map-flower-left {
        left: -130px;
        top: 290px;
    }
}

.map-content-v2 {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 32px 20px 28px;
    text-align: center;
}

.map-title-v2 {
    font-family: 'Times New Roman', Times, 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgb(255, 232, 164);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.map-venue-box-v2 {
    margin-bottom: 16px;
    color: rgb(255, 232, 164);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-align: center;
}

.map-venue-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    color: rgb(255, 232, 164);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.map-venue-address {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: rgb(255, 232, 164);
    opacity: 0.95;
    margin-top: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.map-iframe-wrap-v2 {
    width: 100%;
    max-width: 338px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 232, 164, 0.27);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
    line-height: 0;
}

.map-iframe-v2 {
    width: 100%;
    height: 267px;
    border: none;
    display: block;
}

.map-btn-dir-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: rgb(255, 232, 164);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 22px;
    border-radius: 30px;
    background: transparent;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.map-btn-dir-v2:hover {
    color: rgb(255, 232, 164);
    transform: scale(1.04);
    text-shadow: 0 0 12px rgba(255, 232, 164, 0.85);
}

.map-dir-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .map-title-v2 { font-size: 24px; }
    .map-venue-name { font-size: 18px; }
    .map-venue-address { font-size: 15px; }
    .map-iframe-wrap-v2 { max-width: 460px; }
    .map-iframe-v2 { height: 363px; }
    .map-btn-dir-v2 { font-size: 16px; }
}

/* 6. DRESS CODE */
.dresscode-section {
    padding: 10px 0 24px;
    text-align: center;
}

.dresscode-sub {
    font-size: 12.5px;
    color: rgba(255, 232, 164, 0.7);
    margin-bottom: 16px;
}

.color-swatches {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.color-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: block;
}

.swatch-name {
    font-size: 11.5px;
    color: var(--gold-text);
}

/* 7. LỊCH TRÌNH NGÀY CƯỚI (TIMELINE) */
.timeline-section .wedding-timeline {
    text-align: left;
    max-width: 360px;
    margin: 0 auto;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(140, 0, 0, 0.15);
}

.timeline-step:last-child {
    border-bottom: none;
}

.timeline-step .time-col {
    width: 55px;
    font-weight: 700;
    color: var(--red-imperial);
    font-size: 14px;
}

.timeline-step .marker-col .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red-imperial);
    display: block;
}

.timeline-step .desc-col {
    flex: 1;
    font-size: 13px;
    color: var(--text-dark);
}

.timeline-step.highlight .desc-col {
    font-weight: 700;
    color: var(--red-imperial);
}

/* 8. SỔ LƯU BÚT (SONG HỶ V2 RED - ĐỒNG BỘ VỚI ALBUM VÀ BẢN ĐỒ) */
.guestbook-section-v2 {
    position: relative;
    overflow-x: clip;
    /* Nền đỏ đồng nhất tuyệt đối như Album và Bản đồ, liền mạch sát nhau */
    background-color: #910201;
    width: calc(100% + 20px);
    margin: -1px -10px 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.guestbook-inner-v2 {
    position: relative;
    width: 100%;
    max-width: 441px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .guestbook-inner-v2 {
        max-width: 600px;
    }
}

.guestbook-deco-v2 {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.guestbook-flower {
    position: absolute;
    width: 274px;
    height: 311px;
    object-fit: contain;
    opacity: 0.2;
    pointer-events: none;
}

.guestbook-flower-right {
    right: -62px;
    top: -67px;
}

.guestbook-flower-left {
    left: -62px;
    top: 203px;
    transform: scaleX(-1);
}

@media (min-width: 768px) {
    .guestbook-flower {
        width: 373px;
        height: 423px;
    }
    .guestbook-flower-right {
        right: -153px;
        top: -91px;
    }
    .guestbook-flower-left {
        left: -153px;
        top: 276px;
    }
}

.guestbook-content-v2 {
    position: relative;
    z-index: 10;
    padding: 10px 37px 30px;
    color: rgb(255, 232, 164);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .guestbook-content-v2 {
        padding: 14px 50px 30px;
    }
}

.guestbook-heading-wrap {
    text-align: center;
}

.guestbook-title-v2 {
    font-family: "Times New Roman", Times, "Cormorant Garamond", serif;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
    color: rgb(255, 232, 164);
    letter-spacing: 0.02em;
    margin: 0 0 22px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
    .guestbook-title-v2 {
        font-size: 27px;
    }
}

.guestbook-form-v2 {
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guestbook-form-v2 .gb-input-group {
    width: 100%;
}

.guestbook-form-v2 .gb-input,
.guestbook-form-v2 .gb-textarea {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgb(255, 232, 164);
    background-color: transparent;
    color: rgb(255, 232, 164);
    padding: 8px 10px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guestbook-form-v2 .gb-input::placeholder,
.guestbook-form-v2 .gb-textarea::placeholder {
    color: rgba(255, 232, 164, 0.6);
}

.guestbook-form-v2 .gb-input:focus,
.guestbook-form-v2 .gb-textarea:focus {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 232, 164, 0.4);
}

.guestbook-form-v2 .gb-textarea {
    resize: none;
    line-height: 1.5;
}

.gb-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.gb-btn-ai {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background-color: rgba(255, 232, 164, 0.12);
    color: rgb(255, 232, 164);
    border: 1px solid rgba(255, 232, 164, 0.35);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.gb-btn-ai:hover {
    transform: scale(1.1);
    background-color: rgba(255, 232, 164, 0.2);
}

.gb-btn-submit {
    border-radius: 7px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: "Times New Roman", Times, "Cormorant Garamond", serif;
    background-color: rgb(255, 232, 164);
    color: rgb(146, 0, 2);
    border: none;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.gb-btn-submit:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.gb-btn-submit:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@media (min-width: 768px) {
    .gb-btn-submit {
        font-size: 18px;
        padding: 8px 22px;
    }
}

/* DANH SÁCH LỜI CHÚC (WISHES LIST) */
.wishes-list-v2 {
    margin-top: 32px;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

/* Tùy chỉnh thanh cuộn đẹp mắt màu vàng kim */
.wishes-list-v2::-webkit-scrollbar {
    width: 6px;
}

.wishes-list-v2::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.wishes-list-v2::-webkit-scrollbar-thumb {
    background: rgba(255, 232, 164, 0.4);
    border-radius: 6px;
}

.wishes-list-v2::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 232, 164, 0.7);
}

.wish-card-v2 {
    border-radius: 12px;
    border: 1px solid rgba(255, 232, 164, 0.4);
    background-color: rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-align: left;
    box-sizing: border-box;
}

.wish-head-v2 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.wish-sender {
    font-weight: 600;
    color: rgb(255, 232, 164);
    font-size: 14.5px;
}

.wish-time {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    color: rgb(255, 232, 164);
}

.wish-msg {
    margin: 8px 0 0 0;
    line-height: 1.6;
    color: #fff;
    font-size: 13.5px;
    word-break: break-word;
}

.wishes-empty-v2 {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 232, 164, 0.35);
    background-color: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}

.wishes-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.wishes-empty-title {
    font-weight: 600;
    font-size: 14.5px;
    color: rgb(255, 232, 164);
    margin-bottom: 4px;
}

.wishes-empty-desc {
    font-size: 12.5px;
    color: rgba(255, 232, 164, 0.75);
    line-height: 1.5;
    margin: 0;
}

/* 9. HỘP QUÀ MỪNG CƯỚI (SONG HỶ V2 RED - PHONG BAO LÌ XÌ ABC.PNG 3D) */
.gift-box-section-v2 {
    position: relative;
    overflow-x: clip;
    /* Nền ảnh nencuoi.png đồng nhất liền mạch, nối sát phần trên không hở viền */
    background-color: #8d0101;
    background-image:
        linear-gradient(to bottom, #910201 0%, rgba(145, 2, 1, 0) 90px),
        url('../images/nencuoi.png');
    background-size: 100% 90px, cover;
    background-position: center top, center bottom;
    background-repeat: no-repeat;
    width: calc(100% + 20px);
    margin: -1px -10px 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    text-align: center;
}

.gift-box-inner-v2 {
    position: relative;
    width: 100%;
    max-width: 441px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .gift-box-inner-v2 {
        max-width: 600px;
    }
}

.gift-box-content-v2 {
    position: relative;
    z-index: 10;
    padding: 28px 20px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gift-title-v2 {
    font-family: "Times New Roman", Times, "Cormorant Garamond", serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgb(255, 232, 164);
    letter-spacing: 0.02em;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
    .gift-title-v2 {
        font-size: 27px;
        margin-bottom: 22px;
    }
}

/* NÚT BẤM MỞ PHONG BAO LÌ XÌ 3D */
.btn-open-envelope-v2 {
    position: relative;
    width: 250px;
    height: 350px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 38px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-open-envelope-v2:hover {
    transform: scale(1.04) translateY(-4px);
}

.ienv-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Ngôi sao lấp lánh xung quanh phong bì */
.ienv-sparkle {
    position: absolute;
    color: rgb(255, 249, 230);
    pointer-events: none;
    z-index: 20;
    line-height: 1;
    animation: sparkleTwinkle 2.4s ease-in-out infinite alternate;
}

.ienv-sparkle-1 { top: 6%; left: 12%; font-size: 21px; animation-delay: 0s; }
.ienv-sparkle-2 { top: 14%; right: 8%; font-size: 15px; animation-delay: 0.6s; }
.ienv-sparkle-3 { top: 34%; left: 3%; font-size: 13px; animation-delay: 1.2s; }
.ienv-sparkle-4 { top: 24%; right: 3%; font-size: 14px; animation-delay: 1.8s; }

@keyframes sparkleTwinkle {
    0% { transform: scale(0.7) rotate(0deg); opacity: 0.4; }
    50% { transform: scale(1.2) rotate(45deg); opacity: 1; }
    100% { transform: scale(0.9) rotate(90deg); opacity: 0.6; }
}

/* Sân khấu 2 phong bao lì xì đặt lệch nghiêng */
.ienv-stage {
    position: relative;
    width: 190px;
    height: 275px;
    animation: envStageFloat 3.4s ease-in-out infinite;
}

/* Bóng đổ dưới đáy phong bì */
.ienv-shadow {
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 125px;
    height: 11px;
    margin-left: -62.5px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.45);
    filter: blur(4px);
    z-index: 0;
    animation: envShadowPulse 3.4s ease-in-out infinite;
}

/* Phong bao lì xì nằm sau (nghiêng nhẹ sang phải + xòe nhịp nhàng) */
.ienv-img.ienv-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transform-origin: 50% 100%;
    transform: translateX(20%) translateY(-10%) scale(-0.8, 0.8) rotate(-15deg);
    z-index: 1;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
    animation: envBackFan 3.4s ease-in-out infinite;
    transition: transform 0.35s ease;
}

/* Phong bao lì xì chính nằm trước (nghiêng sang trái -10deg + đung đưa nhẹ) */
.ienv-img.ienv-front {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transform-origin: 50% 90%;
    transform: rotate(-10deg);
    z-index: 2;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
    animation: envFrontSway 3.4s ease-in-out infinite;
    transition: transform 0.35s ease;
}

@keyframes envStageFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes envFrontSway {
    0%, 100% {
        transform: rotate(-10deg) scale(1);
        filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
    }
    50% {
        transform: rotate(-6.5deg) scale(1.025);
        filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 12px rgba(255, 232, 164, 0.22));
    }
}

@keyframes envBackFan {
    0%, 100% {
        transform: translateX(20%) translateY(-10%) scale(-0.8, 0.8) rotate(-15deg);
    }
    50% {
        transform: translateX(24%) translateY(-13.5%) scale(-0.82, 0.82) rotate(-19deg);
    }
}

@keyframes envShadowPulse {
    0%, 100% {
        transform: scaleX(1) scaleY(1);
        opacity: 0.9;
    }
    50% {
        transform: scaleX(0.84) scaleY(0.8);
        opacity: 0.55;
    }
}

.btn-open-envelope-v2:hover .ienv-img.ienv-front {
    transform: rotate(-8deg) translateY(-3px);
}

.btn-open-envelope-v2:hover .ienv-img.ienv-back {
    transform: translateX(23%) translateY(-13%) scale(-0.82, 0.82) rotate(-18deg);
}

/* Dòng chữ "Nhấn để mở" */
.ienv-hint {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 500;
    color: rgb(255, 232, 164);
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.ienv-hint span {
    display: inline-block;
    animation: envHintPulse 2.4s ease-in-out infinite;
}

@keyframes envHintPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.85;
    }
    50% {
        transform: translateY(-2px) scale(1.05);
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 232, 164, 0.65), 0 1px 4px rgba(0, 0, 0, 0.5);
    }
}

/* Lời cảm ơn gia đình */
.gift-thank-you-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 232, 164, 0.95);
    margin: 22px 0 12px;
    max-width: 380px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.gift-brand-credit {
    font-size: 11px;
    color: rgba(255, 232, 164, 0.45);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

/* 10. FOOTER LỜI CẢM ƠN */
.inside-footer-section {
    text-align: center;
    padding: 24px 0 10px;
    border-top: 1px dashed var(--gold-border);
}

.thank-you-msg {
    font-size: 13.5px;
    font-style: italic;
    color: rgba(255, 232, 164, 0.9);
    line-height: 1.5;
    margin: 8px 0 12px;
}

.bottom-couple-names {
    font-family: 'Great Vibes', cursive;
    font-size: 32px;
    color: var(--gold-bright);
}

.wedding-year {
    font-size: 12px;
    color: var(--gold-accent);
    margin-bottom: 16px;
}

.back-cover-wrap {
    margin-top: 10px;
}

/* ---------------- CUSTOM MODALS (RSVP & HỘP MỪNG CƯỚI) ---------------- */
.custom-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.custom-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    z-index: 10;
    background: #5a0000;
    border: 1px solid var(--gold-border);
    border-radius: 14px;
    padding: 26px 20px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    color: var(--gold-text);
    text-align: center;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--gold-bright);
    font-size: 20px;
    cursor: pointer;
}

.modal-title {
    font-family: 'Times New Roman', serif;
    font-size: 20px;
    color: #fff;
    margin-bottom: 6px;
}

.modal-sub {
    font-size: 12px;
    color: rgba(255, 232, 164, 0.75);
    margin-bottom: 18px;
}

.modal-form .form-group {
    margin-bottom: 14px;
    text-align: left;
}

.modal-form label {
    font-size: 12.5px;
    display: block;
    margin-bottom: 6px;
    color: var(--gold-bright);
}

.modal-form input[type="text"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.modal-form textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.5;
}

.modal-form textarea:focus,
.modal-form input[type="text"]:focus {
    border-color: var(--gold-bright);
}

/* Ô lý do: ẩn mặc định, trượt xuống khi chọn "bận mất rồi" */
.rsvp-reason-group {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transform: translateY(-6px);
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease, margin-bottom 0.3s ease;
}

.rsvp-reason-group.show {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 14px;
    transform: translateY(0);
}

.radio-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    cursor: pointer;
}

.btn-confirm-modal {
    width: 100%;
    background: linear-gradient(180deg, #fff2d0, #f6cf75);
    color: var(--red-dark);
    font-weight: 700;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-top: 6px;
    cursor: pointer;
}

/* QR Code Modal (Song Hỷ V2 Red Design) */
.gift-modal-content {
    max-width: 520px;
    padding: 0;
    overflow: hidden;
    background-color: rgb(90, 0, 0);
    border: 1px solid rgba(255, 232, 164, 0.4);
    border-radius: 18px;
}

.gift-modal-header {
    position: relative;
    padding: 18px 24px 14px;
    background-color: rgb(255, 232, 164);
    text-align: center;
}

.gift-modal-header .modal-close-btn {
    top: 14px;
    right: 14px;
    color: rgb(90, 0, 0);
    font-size: 18px;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.gift-modal-header .modal-close-btn:hover {
    background-color: rgba(90, 0, 0, 0.15);
}

.gift-modal-title {
    font-family: "Times New Roman", Times, "Cormorant Garamond", serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgb(146, 0, 2);
    letter-spacing: 0.03em;
    margin: 0;
}

.gift-modal-body {
    padding: 24px 18px 30px;
}

.qr-cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.qr-box-item {
    background: transparent;
    border: none;
    padding: 0;
    width: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-target-title {
    font-size: 13.5px;
    font-weight: 600;
    color: rgb(255, 232, 164);
    margin-bottom: 12px;
    line-height: 1.35;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-image-wrapper {
    width: 176px;
    height: 176px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    margin: 0 auto 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 232, 164, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.qr-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bank-details {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bank-details .bank-name {
    font-size: 12px;
    color: rgb(255, 232, 164);
    margin: 0;
}

.bank-details .bank-acc {
    font-size: 12.5px;
    font-family: monospace;
    font-weight: 600;
    color: rgb(255, 232, 164);
    letter-spacing: 0.5px;
    margin: 0;
}

.bank-details .bank-owner {
    font-size: 12px;
    font-weight: 700;
    color: rgb(255, 232, 164);
    margin: 0;
}

.btn-save-qr {
    margin-top: 10px;
    font-size: 12px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    border-radius: 20px;
    color: rgb(255, 232, 164);
    background-color: rgba(255, 232, 164, 0.12);
    border: 1px solid rgba(255, 232, 164, 0.3);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-save-qr:hover {
    background-color: rgba(255, 232, 164, 0.25);
    transform: translateY(-1px);
    color: #fff;
}

.w-save-icon {
    width: 14px;
    height: 14px;
}

/* ---------------- MODAL THÔNG BÁO SONG HỶ SANG TRỌNG ---------------- */
.notice-modal-content {
    max-width: 390px;
    padding: 32px 24px 26px;
    background: radial-gradient(circle at top, #8c0000 0%, #4e0002 100%);
    border: 1.5px solid rgba(255, 232, 164, 0.55);
    border-radius: 18px;
    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.85),
        0 0 30px rgba(255, 215, 130, 0.2),
        inset 0 0 0 4px rgba(255, 232, 164, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.notice-modal-content::before {
    content: '囍';
    position: absolute;
    right: -18px;
    bottom: -28px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 140px;
    font-weight: 700;
    color: rgba(255, 232, 164, 0.045);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.notice-seal-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-seal {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, #a80005 0%, #520003 100%);
    border: 2px solid #ffe8a4;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.5),
        0 0 18px rgba(255, 232, 164, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff2d6;
    position: relative;
    animation: sealPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notice-seal::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 232, 164, 0.65);
    animation: rotateDashedRing 25s linear infinite;
}

@keyframes sealPopIn {
    0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.notice-spark {
    position: absolute;
    color: #fff2d6;
    font-size: 14px;
    pointer-events: none;
    animation: sparkleTwinkle 2s ease-in-out infinite alternate;
}

.notice-spark-1 { top: -2px; right: -4px; }
.notice-spark-2 { bottom: 2px; left: -6px; font-size: 11px; animation-delay: 0.7s; }

.notice-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff2d6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 8px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.notice-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 120px;
    margin: 0 auto 12px;
}

.notice-divider .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 232, 164, 0.75), transparent);
}

.notice-divider .leaf {
    font-size: 12px;
    color: #e6b86a;
    line-height: 1;
}

.notice-msg {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 242, 214, 0.95);
    margin: 0 0 22px;
    padding: 0 6px;
}

.notice-msg b {
    color: #ffe8a4;
}

.btn-notice-ok {
    min-width: 150px;
    padding: 10px 28px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(180deg, #fff7e0 0%, #fae2a5 50%, #f4d081 100%);
    color: #64060f;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-notice-ok:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(255, 220, 130, 0.45);
    filter: brightness(1.05);
}

/* ---------------- HIỆU ỨNG PHÁO HOA & CHỮ HÁN 3D ---------------- */
.fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 60;
    display: none;
}

.fireworks-canvas.active {
    display: block;
}

.burst-3d-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 70;
    perspective: 1200px;
    transform-style: preserve-3d;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.burst-hy-main {
    position: absolute;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 150px;
    font-weight: 900;
    color: #fff5d8;
    line-height: 1;
    transform-origin: center center;
    text-shadow:
        0 0 20px #ffd700,
        0 0 45px #ffaa00,
        0 0 75px #ff2233,
        0 15px 40px rgba(0, 0, 0, 0.9);
    animation: shootMain3dHy 1.35s cubic-bezier(0.12, 0.9, 0.3, 1) forwards;
}

@keyframes shootMain3dHy {
    0% {
        transform: scale(0.1) translateZ(-400px) rotateX(45deg) rotateY(0deg);
        opacity: 0;
        filter: blur(8px);
    }

    25% {
        opacity: 1;
        filter: blur(0px);
    }

    65% {
        transform: scale(1.35) translateZ(350px) rotateX(0deg) rotateY(360deg) translateY(-50px);
        opacity: 1;
        filter: drop-shadow(0 0 40px #ffd700);
    }

    100% {
        transform: scale(2.4) translateZ(750px) rotateX(-20deg) rotateY(540deg) translateY(-120px);
        opacity: 0;
        filter: blur(14px);
    }
}

.burst-hy-spark {
    position: absolute;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    color: #ffe8b5;
    line-height: 1;
    user-select: none;
    text-shadow:
        0 0 16px rgba(255, 215, 0, 0.85),
        0 0 30px rgba(255, 60, 60, 0.6);
    animation: burstSparkChar 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes burstSparkChar {
    0% {
        transform: translate3d(0, 0, 0) scale(0.1) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    80% {
        opacity: 0.9;
    }

    100% {
        transform: translate3d(var(--tx), var(--ty), var(--tz)) scale(var(--scale, 1.3)) rotate(var(--rot, 360deg));
        opacity: 0;
    }
}

/* ---------------- NÚT ÂM NHẠC LÃNG MẠN ---------------- */
.music-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(45, 5, 10, 0.85);
    border: 1px solid rgba(246, 210, 137, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gold-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.music-toggle:hover {
    transform: scale(1.08);
    background: rgba(65, 8, 14, 0.95);
}

.music-toggle.is-playing .disc-icon {
    animation: spinDisc 4s linear infinite;
}

@keyframes spinDisc {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.equalizer {
    position: absolute;
    right: -8px;
    top: -4px;
    display: none;
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}

.music-toggle.is-playing .equalizer {
    display: flex;
}

.equalizer span {
    width: 2.5px;
    background: var(--gold-bright);
    border-radius: 2px;
    animation: waveBounce 0.8s ease-in-out infinite alternate;
}

.equalizer span:nth-child(1) {
    height: 6px;
    animation-delay: 0.1s;
}

.equalizer span:nth-child(2) {
    height: 12px;
    animation-delay: 0.3s;
}

.equalizer span:nth-child(3) {
    height: 8px;
    animation-delay: 0.2s;
}

@keyframes waveBounce {
    from {
        height: 3px;
    }

    to {
        height: 12px;
    }
}

/* ---------------- FLOATING MESSENGER WIDGET ---------------- */
.messenger-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.messenger-float:hover {
    transform: scale(1.1);
}

.close-msg-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #444;
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    cursor: pointer;
}

/* ---------------- RESPONSIVE CHO ĐIỆN THOẠI DI ĐỘNG ---------------- */
@media (max-width: 620px) {

    html,
    body {
        padding: 0;
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }

    body {
        padding: 0;
        align-items: flex-start;
        justify-content: center;
    }

    .main-container {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        justify-content: center;
        align-items: flex-start;
        min-height: 100vh;
    }

    .card-envelope {
        aspect-ratio: auto;
        min-height: 480px;
        padding: 24px 14px;
        margin: auto;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .card-inner {
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .action-wrap {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .couple-names .name {
        font-size: 26px;
    }

    .couple-names .ampersand {
        font-size: 17px;
    }

    .wedding-date {
        font-size: 14px;
    }

    .invitation-text {
        font-size: 13px;
    }

    .btn-open-card {
        padding: 8px 30px;
        font-size: 13.5px;
    }

    .card-inside {
        padding: 0;
        margin: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        left: 0;
        right: 0;
    }

    .section-panel:not(.ceremony-section) {
        padding: 18px 12px;
    }

    .hero-photo-arch {
        width: 210px;
        height: 300px;
    }

    .qr-cards-container {
        flex-direction: column;
        align-items: center;
    }

    .qr-box-item {
        width: 100%;
        max-width: 240px;
    }
}
