/* ==========================================
   CSS CHỦ ĐẠO - THIỆP CƯỚI ĐIỆN TỬ
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #eaeaea;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Định hình giao diện bao bọc dạng màn hình điện thoại di động */
.mobile-wrapper {
    width: 100%;
    max-width: 450px;
    background-color: #fdfaf7;
    min-height: 100vh;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 40px;
}

/* ==========================================
   1. MÀN HÌNH CHÀO MỪNG (HERO SECTION - PREMIUM UPGRADE)
   ========================================== */
.hero-section {
    position: relative;
    background-color: #fdfaf7;
    overflow: hidden;
}

.hero-img-container {
    width: 100%;
    height: 560px;
    position: relative;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lớp phủ chuyển màu mờ dần xuống dưới giúp phần chữ hòa nhập với nền */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(253,250,247,0) 70%, rgba(253,250,247,1) 100%);
    z-index: 1;
}

/* Khung tên nghệ thuật dạng kính mờ (Glow Glassmorphism) */
.hero-names-box-modern {
    position: absolute;
    top: 17px;
    right: 12px;
    width: 120px;
    background: rgba(255,255,255,0.72);
    padding: 8px 6px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    z-index: 5;
}

.wedding-badge {
    font-size: 0.45rem;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 3px;
    display: block;
}

.couple-names-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.script-font-premium {
    font-family: 'Great Vibes', cursive;
    font-size: 1.2rem;
    color: #6e1618;
    line-height: 1;
    margin: 0;
}

/* Thanh phân cách tim tinh xảo */
.heart-separator {
    width: 60%;
    margin: 2px 0;
}

.heart-separator .line-left,
.heart-separator .line-right {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(110,22,24,0), rgba(110,22,24,0.4));
}

.heart-separator .line-right {
    background: linear-gradient(to left, rgba(110,22,24,0), rgba(110,22,24,0.4));
}

.pulse-heart {
    color: #cc2b33;
    font-size: 0.55rem;
    margin: 0 5px;
    animation: heartBeatCustom 1.5s infinite;
}

/* Thẻ thông tin chi tiết (Modern Card) */
.hero-info-card-modern {
    background-color: #ffffff;
    margin: -40px 24px 0 24px;
    position: relative;
    z-index: 5;
    padding: 25px 20px;
    box-shadow: 0 15px 35px rgba(110, 22, 24, 0.06);
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(110, 22, 24, 0.04);
}

.title-invite-modern {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6e1618;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.divider-modern {
    height: 1px;
    background: linear-gradient(to right, rgba(110,22,24,0.1), rgba(110,22,24,0.6), rgba(110,22,24,0.1));
    width: 50%;
    margin: 12px auto;
}

.time-main-modern {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.date-main-modern {
    font-size: 1.6rem;
    font-weight: 800;
    color: #6e1618;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

/* ==========================================
   2. ĐỒNG HỒ ĐẾM NGƯỢC
   ========================================== */
.countdown-title {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.countdown-box {
    background-color: #6e1618;
    color: white;
    width: 75px;
    padding: 10px 0;
    border-radius: 6px;
}

.countdown-box span {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}

.countdown-box small {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* ==========================================
   3. GIA ĐÌNH HAI BÊN
   ========================================== */
.family-title-top {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: #6e1618;
    margin-bottom: 25px;
    position: relative;
}

.family-title-top::after {
    content: "";
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, transparent, #6e1618, transparent);
    display: block;
    margin: 8px auto 0 auto;
}

.family-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 10px;
}

.family-box {
    background: #fff;
    border-radius: 18px;
    padding: 18px 18px;
    position: relative;
    box-shadow: 0 8px 24px rgba(110,22,24,0.06);
    border: 1px solid rgba(110,22,24,0.08);
    overflow: hidden;
}

.family-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 4px;
    height: 70px;
    background: linear-gradient(to bottom, #6e1618, #c94750);
    border-radius: 20px;
}

.family-side-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #6e1618;
    margin-bottom: 10px;
    padding-left: 10px;
    letter-spacing: 1px;
}

.parent-name {
    font-size: 0.92rem;
    margin-bottom: 5px;
    color: #333;
    padding-left: 10px;
}

.address-text {
    font-size: 0.82rem;
    color: #777;
    line-height: 1.5;
    padding-left: 10px;
    margin-top: 8px;
}

.announcement {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #444;
}

.couple-name-accent {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: #6e1618;
    margin-bottom: 0;
}

.sub-invite-text {
    font-size: 0.82rem;
    line-height: 1.7;
    letter-spacing: 1px;
    color: #555;
    font-weight: 600;
}

/* ==========================================
   4. THẺ SỰ KIỆN NÂNG CẤP (ELEGANT & MODERN)
   ========================================== */
.events-section {
    background-color: #fbf6f0;
}

.wedding-events-title {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: #6e1618;
    display: block;
}

.heart-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: -5px;
}

.heart-line .line {
    height: 1px;
    width: 50px;
    background-color: #6e1618;
    opacity: 0.5;
}

.heart-line i {
    color: #6e1618;
    font-size: 0.8rem;
}

.custom-event-card {
    background-color: #ffffff;
    border: 1px solid rgba(110, 22, 24, 0.1);
    border-radius: 16px;
    padding: 30px 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(110, 22, 24, 0.05);
}

.card-decor-top {
    width: 50px;
    height: 50px;
    background-color: #6e1618;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -55px auto 15px auto;
    border: 4px solid #fbf6f0;
    box-shadow: 0 4px 10px rgba(110, 22, 24, 0.15);
}

.event-icon-top {
    color: #ffffff;
    font-size: 1.2rem;
}

.event-card-title-new {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6e1618;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.event-side-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.event-time-box {
    background-color: #fff9f9;
    border-top: 1px dashed rgba(110, 22, 24, 0.15);
    border-bottom: 1px dashed rgba(110, 22, 24, 0.15);
    padding: 12px 0;
}

.event-time-new {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 2px;
}

.event-date-new {
    font-size: 1.5rem;
    font-weight: 800;
    color: #6e1618;
    margin-bottom: 2px;
}

.lunar-date-new {
    font-size: 0.8rem;
    color: #777;
    font-style: italic;
    margin-bottom: 0;
}

.event-location-box {
    margin-top: 15px;
}

.event-location-new {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.event-address-new {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 0;
}

.text-gold {
    color: #bfa15f !important;
}

.btn-map-custom {
    display: inline-flex;
    align-items: center;
    background-color: #6e1618;
    color: #ffffff !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(110, 22, 24, 0.2);
    transition: all 0.3s ease;
}

.btn-map-custom:hover {
    background-color: #8d2023;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(110, 22, 24, 0.3);
}

/* ==========================================
   5. HỘP QUÀ MỪNG CƯỚI
   ========================================== */
.gift-section {
    border-top: 1px rgba(110, 22, 24, 0.1) solid;
}

.gift-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #6e1618;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.gift-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
}

.gift-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-gift-box {
    width: 70px;
    height: 65px;
    background: #cc2b33; 
    position: relative;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 20px rgba(110, 22, 24, 0.2);
}

.gift-lid {
    width: 78px;
    height: 16px;
    background: #e63942;
    position: absolute;
    top: -14px;
    left: -4px;
    border-radius: 4px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

.gift-ribbon-v {
    width: 14px;
    height: 100%;
    background: #ffcc00;
    position: absolute;
    top: 0;
    left: 28px;
}

.gift-bow {
    width: 24px;
    height: 12px;
    border: 4px solid #ffcc00;
    border-radius: 50%;
    position: absolute;
    top: -24px;
    left: 23px;
    z-index: 1;
}

.gift-bow::after {
    content: '';
    width: 24px;
    height: 12px;
    border: 4px solid #ffcc00;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    left: -16px;
}

.btn-open-gift {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6e1618, #9c2427);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(110, 22, 24, 0.3);
    transition: all 0.3s ease;
}

.gift-box-clickable:hover .btn-open-gift {
    transform: scale(1.05);
    background: linear-gradient(135deg, #9c2427, #6e1618);
    box-shadow: 0 6px 16px rgba(110, 22, 24, 0.4);
}

.heart-bg-decor {
    position: absolute;
    color: rgba(230, 57, 66, 0.2);
    font-size: 1.2rem;
}

.left-heart { top: 20%; left: 10%; }
.right-heart { bottom: 25%; right: 10%; }

/* ==========================================
   6. ALBUM HÌNH ẢNH
   ========================================== */
.album-text-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.big-title-album {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.of-text {
    font-family: 'Great Vibes', cursive;
    font-size: 1.8rem;
    margin-left: 60px;
}

.main-preview-container {
    position: relative;
}

#mainAlbumPreview {
    height: 420px;
    object-fit: cover;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.prev-btn { left: 25px; }
.next-btn { right: 25px; }

.thumbnail-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 0 16px;
    overflow-x: auto;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumb-img.active-thumb {
    opacity: 1;
    border-color: #ffffff;
}

/* ==========================================
   7. HIỆU ỨNG CHUYỂN ĐỘNG & GIAO DIỆN PHỤ
   ========================================== */
@keyframes heartBeatCustom {
    0% { transform: scale(1); }
    14% { transform: scale(1.2); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
}

@keyframes fadeInUpCustom {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-up {
    animation: fadeInUpCustom 1s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.delay-1 {
    animation-delay: 0.3s;
}

@keyframes pulseGift {
    0% { transform: scale(1); }
    30% { transform: scale(1.08) rotate(-3deg); }
    40% { transform: scale(1.08) rotate(3deg); }
    50% { transform: scale(1.08) rotate(-3deg); }
    60% { transform: scale(1.08) rotate(3deg); }
    70% { transform: scale(1); }
    100% { transform: scale(1); }
}

.animate-pulse-gift {
    animation: pulseGift 2.5s infinite ease-in-out;
}

@keyframes heartPop {
    0% { transform: translateY(10px) scale(0.5); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-40px) scale(1.2); opacity: 0; }
}

.heart-pop-up {
    position: absolute;
    top: 10px;
    font-size: 1rem;
    animation: heartPop 2s infinite ease-in-out;
    z-index: 3;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(15deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.animate-float { animation: float 3s infinite ease-in-out; }
.animate-float-delayed { animation: float 3.5s infinite ease-in-out; animation-delay: 0.7s; }

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

.animate-bounce {
    animation: bounce 2s infinite;
}

html {
    scroll-behavior: smooth;
}

.music-toggle {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    width: 50px;
    height: 50px;
    background: #6e1618;
    color: white;
    border-radius: 50%;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    cursor: pointer;
}

.intro-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, #6e1618, #2c090a);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    transition: all 0.8s ease;
}

.intro-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.intro-sub {
    color: rgba(255,255,255,0.7);
    letter-spacing: 3px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.intro-title {
    font-family: 'Great Vibes', cursive;
    color: white;
    font-size: 3rem;
    margin-bottom: 30px;
}

.open-invite-btn {
    border: none;
    background: white;
    color: #6e1618;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.open-invite-btn:hover {
    transform: scale(1.05);
}

.copy-btn {
    border: none;
    background: #6e1618;
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.thumbnail-row::-webkit-scrollbar {
    display: none;
}

.thumbnail-row {
    scrollbar-width: none;
}

.love-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px 0;
}

.love-divider span {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(110,22,24,0.5), transparent);
}

.love-divider i {
    color: #d84b57;
    font-size: 0.8rem;
    animation: heartBeatCustom 1.5s infinite;
}

.couple-image-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    padding: 6px;
    background: white;
}

.couple-image-custom {
    border-radius: 18px;
    width: 100%;
    object-fit: cover;
    transition: 0.4s ease;
}

.couple-image-custom:hover {
    transform: scale(1.02);
}

/* ==========================================
   8. HIỆU ỨNG CUỘN TRANG (ON-SCROLL ANIMATIONS)
   ========================================== */
.scroll-animate {
    opacity: 0;
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

.scroll-animate[data-animate="fade-up"] {
    transform: translate3d(0, 40px, 0);
}

.scroll-animate[data-animate="slide-left"] {
    transform: translate3d(-50px, 0, 0);
}

.scroll-animate[data-animate="slide-right"] {
    transform: translate3d(50px, 0, 0);
}

.scroll-animate[data-animate="zoom-in"] {
    transform: scale3d(0.9, 0.9, 1);
}

.scroll-animate.animated {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

/* =====================================================
   ELEGANT EDITION — ivory paper, burgundy, antique gold
   Kept as an override so the existing layout/data remain intact.
   ===================================================== */
:root {
  --wine: #6e1618;
  --wine-deep: #471012;
  --rose: #b76e72;
  --gold: #c7a66a;
  --gold-light: #ead8ad;
  --paper: #fffaf3;
  --ink: #403333;
}
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(ellipse at top, #fffaf3 0%, #eee3d7 70%, #e6d7c8 100%);
  color: var(--ink);
}
.mobile-wrapper {
  background: var(--paper);
  box-shadow: 0 25px 80px rgba(54, 22, 20, .22);
  border-inline: 1px solid rgba(199,166,106,.35);
}
.hero-section { isolation: isolate; }
.hero-img-container { height: clamp(500px, 116vw, 620px); overflow: hidden; }
.hero-img {
  animation: heroKenBurns 18s ease-in-out infinite alternate;
  filter: saturate(.91) contrast(1.02);
}
.hero-overlay {
  background: linear-gradient(180deg, rgba(30,12,12,.08) 0%, rgba(30,12,12,0) 42%, rgba(255,250,243,.2) 65%, var(--paper) 100%);
}
.hero-names-box-modern {
  top: 24px; right: 18px; width: 145px; padding: 13px 10px 15px;
  border: 1px solid rgba(199,166,106,.8); border-radius: 90px 90px 16px 16px;
  background: rgba(255,250,243,.82); box-shadow: 0 12px 35px rgba(40,15,15,.12);
}
.wedding-badge { color: var(--wine); font-size: .5rem; letter-spacing: 2px; }
.script-font-premium { font-size: 1.45rem; text-shadow: 0 1px 0 #fff; }
.pulse-heart { color: var(--gold); }
.hero-info-card-modern {
  margin: -54px 20px 0; padding: 28px 18px 25px; border-radius: 4px;
  border: 1px solid var(--gold); outline: 1px solid rgba(199,166,106,.35); outline-offset: 5px;
  background: linear-gradient(135deg, #fffdf8, #fff7ed);
  box-shadow: 0 18px 42px rgba(77,24,24,.1);
}
.title-invite-modern { letter-spacing: 1.5px; }
.date-main-modern { font-family: Georgia, serif; font-weight: 500; letter-spacing: 2px; }
.countdown-section { padding: 42px 14px !important; background: linear-gradient(180deg, var(--paper), #f7eee5); }
.countdown-title { font-family: 'Great Vibes', cursive; font-size: 1.65rem; color: var(--wine); }
.countdown-box {
  width: 70px; padding: 13px 0; border-radius: 4px;
  background: linear-gradient(145deg, var(--wine), var(--wine-deep));
  border: 1px solid var(--gold); box-shadow: 0 7px 16px rgba(80,20,20,.12);
}
.family-section { background: var(--paper) !important; position: relative; }
.family-title-top { font-size: 3rem; }
.family-box {
  border-radius: 4px; border: 1px solid rgba(199,166,106,.55);
  background: linear-gradient(135deg, #fffefa, #fbf1e7);
  box-shadow: 0 12px 28px rgba(80,30,25,.07);
}
.family-box::before { background: linear-gradient(to bottom, var(--gold), var(--wine)); }
.family-side-title { letter-spacing: 2px; }
.couple-name-accent { font-family: 'Great Vibes', cursive; font-size: 2.5rem; font-weight: 400; color: var(--wine); }
.couple-image-frame {
  margin-inline: 8px; padding: 10px; border-radius: 2px;
  border: 1px solid var(--gold); background: #fffdf8;
  box-shadow: 0 15px 32px rgba(67,25,20,.16);
}
.couple-image-frame::before, .couple-image-frame::after {
  content: '✦'; position: absolute; z-index: 2; color: var(--gold); font-size: 1.1rem;
}
.couple-image-frame::before { top: 2px; left: 3px; }
.couple-image-frame::after { bottom: 2px; right: 3px; }
.couple-image-custom { border-radius: 0; display: block; }
.events-section {
  padding-top: 48px !important; padding-bottom: 38px !important;
  background: linear-gradient(180deg, #f7eee5, #fffaf3 55%, #f5e8dc);
}
.wedding-events-title { color: var(--wine); font-family: 'Great Vibes', cursive; font-size: 2.65rem; }
.heart-line .line { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.heart-line i { color: var(--gold); }
.custom-event-card {
  position: relative; overflow: hidden; border-radius: 3px;
  border: 1px solid rgba(199,166,106,.8);
  background: linear-gradient(145deg, #fffefa, #fff7ee);
  box-shadow: 0 14px 30px rgba(70,20,20,.08);
  padding: 25px 20px 24px;
}
.custom-event-card::before {
  content: ''; position: absolute; inset: 7px; border: 1px solid rgba(199,166,106,.28); pointer-events: none;
}
.card-decor-top { color: var(--gold); }
.event-card-title-new { color: var(--wine); letter-spacing: 1.7px; }
.event-time-box { border-block: 1px solid rgba(199,166,106,.45); padding: 13px 0; }
.event-date-new { color: var(--wine); font-family: Georgia, serif; letter-spacing: 2px; }
.btn-map-custom { border-radius: 30px; background: var(--wine); border: 1px solid var(--gold); }
.gift-section { background: linear-gradient(180deg, #fffaf3, #f6e8dc); }
.gift-title { font-family: 'Great Vibes', cursive; font-size: 2rem; color: var(--wine); }
.btn-open-gift { border-radius: 30px; background: var(--wine); border: 1px solid var(--gold); }
.album-section {
  background: linear-gradient(155deg, #4b0d10, #7c2225 55%, #4b0d10) !important;
  padding: 45px 0 38px !important; position: relative; isolation: isolate;
}
.album-section::before, .album-section::after {
  content: '✦'; position: absolute; color: rgba(234,216,173,.55); font-size: 2rem; z-index: -1;
}
.album-section::before { top: 30px; right: 22px; }
.album-section::after { bottom: 24px; left: 20px; }
.album-text-title { max-width: 290px; margin-inline: auto; }
.big-title-album { letter-spacing: 5px; font-size: 2.4rem; }
.of-text { color: var(--gold-light) !important; margin-left: 32px; }
.album-photo-mat {
  padding: 10px 10px 18px; background: #fffaf3; border: 1px solid var(--gold);
  box-shadow: 0 18px 40px rgba(0,0,0,.28); transform: rotate(-.4deg);
}
#mainAlbumPreview {
  display: block; height: 430px; object-fit: cover; border-radius: 0 !important;
  transition: opacity .35s ease, transform .7s ease; box-shadow: none !important;
}
.main-preview-container { padding-inline: 26px !important; }
.nav-btn { width: 38px; height: 38px; border: 1px solid var(--gold); background: rgba(59,9,12,.78); }
.prev-btn { left: 13px; } .next-btn { right: 13px; }
.thumbnail-row { padding-bottom: 4px; gap: 10px !important; }
.thumb-img {
  flex: 0 0 68px; width: 68px; height: 78px; padding: 3px; border-radius: 2px;
  background: #fffaf3; border: 1px solid rgba(234,216,173,.6); opacity: .62;
  transition: transform .3s ease, opacity .3s ease, border-color .3s ease;
}
.thumb-img.active-thumb { opacity: 1; border-color: var(--gold-light); transform: translateY(-5px) rotate(-2deg); }
.music-toggle {
  border: 1px solid var(--gold) !important; background: var(--wine) !important;
  box-shadow: 0 5px 18px rgba(70,12,12,.25); color: #fff7e8 !important;
}
.modal-content { border: 1px solid var(--gold); border-radius: 5px; background: var(--paper); }
.qr-container { border-color: var(--gold) !important; background: white !important; }
.copy-btn { background: var(--wine); border: 1px solid var(--gold); border-radius: 24px; color: white; }
.intro-loader {
  background: radial-gradient(ellipse at center, rgba(117,39,41,.78), rgba(48,10,13,.97)), url('images/anh-chinh.jpg') center/cover;
}
.intro-content { padding: 28px; border: 1px solid rgba(234,216,173,.75); outline: 1px solid rgba(234,216,173,.25); outline-offset: 7px; }
.intro-sub { color: var(--gold-light); letter-spacing: 4px; }
.intro-title { font-family: 'Great Vibes', cursive; font-weight: 400; }
.open-invite-btn { border: 1px solid var(--gold-light); border-radius: 30px; background: #fff8e9; color: var(--wine); }
/* reveal motion is slower and more graceful, with reduced-motion support */
.scroll-animate { transition-duration: .9s; }
.custom-event-card:nth-of-type(2) { transition-delay: .05s; }
.custom-event-card:nth-of-type(3) { transition-delay: .12s; }
.custom-event-card:nth-of-type(4) { transition-delay: .18s; }
@keyframes heroKenBurns { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes goldShimmer { 0%,100% { box-shadow: 0 0 0 rgba(199,166,106,0); } 50% { box-shadow: 0 0 22px rgba(199,166,106,.22); } }
.hero-info-card-modern { animation: goldShimmer 5s ease-in-out infinite; }
@media (min-width: 700px) {
  .mobile-wrapper { margin: 24px auto; border-radius: 5px; overflow: hidden; }
}
@media (max-width: 360px) {
  .hero-names-box-modern { width: 126px; }
  .countdown-box { width: 62px; }
  #mainAlbumPreview { height: 350px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .scroll-animate { opacity: 1 !important; transform: none !important; }
}


/* FIX: không cắt biểu tượng ở đầu thẻ sự kiện */
.events-section { overflow: visible; }
.custom-event-card { overflow: visible !important; margin-top: 42px; }
.custom-event-card:first-of-type { margin-top: 0; }
.card-decor-top {
  position: relative; z-index: 2; flex: 0 0 50px;
  width: 50px; height: 50px; min-width: 50px;
  margin: -52px auto 15px !important;
  border: 4px solid #fbf6f0;
  box-sizing: content-box;
}
.custom-event-card::before { z-index: 0; }
.custom-event-card > * { position: relative; z-index: 1; }
.custom-event-card .card-decor-top { z-index: 2; }

/* Lịch cưới - đồng bộ tông đỏ rượu vang, kem và vàng champagne */
.wedding-calendar-section {
  padding: 38px 20px 42px;
  background: linear-gradient(180deg, #fffaf3, #f5e8dc);
  color: #4b3630;
}
.calendar-heading { text-align: center; margin: 0 auto 22px; }
.calendar-kicker {
  display: block; margin-bottom: 8px; color: var(--gold);
  font-size: .68rem; font-weight: 800; letter-spacing: 3px;
}
.calendar-heading h2 {
  margin: 0; color: var(--wine); font-size: 1.45rem;
  font-weight: 800; letter-spacing: 3px;
}
.calendar-heading p { margin: 9px 0 0; color: #82746c; font-size: .78rem; line-height: 1.6; }
.wedding-calendar-card {
  max-width: 365px; margin: 0 auto; overflow: hidden;
  border: 1px solid rgba(199,166,106,.48); border-radius: 15px;
  background: rgba(255,255,255,.75); box-shadow: 0 14px 32px rgba(70,20,20,.07);
}
.calendar-month-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 16px; background: var(--wine); color: #fff8e9; font-size: .92rem;
}
.calendar-month-bar strong { color: var(--gold-light); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.calendar-weekdays { padding: 13px 8px 7px; color: #9b7770; font-size: .67rem; font-weight: 800; }
.calendar-days { padding: 0 8px 12px; row-gap: 5px; }
.calendar-days > span {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; width: 100%; max-width: 37px; justify-self: center;
  border-radius: 50%; color: #4c514b; font-size: .78rem;
}
.calendar-days .calendar-empty { pointer-events: none; }
.calendar-days .calendar-event-day { color: var(--wine); font-weight: 800; background: #f5e8dc; }
.calendar-days .calendar-event-day i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); bottom: 3px; left: calc(50% - 2px);
}
.calendar-days .calendar-main-day {
  color: #fffaf0; background: var(--wine); font-weight: 800;
  box-shadow: 0 4px 10px rgba(110,22,24,.22);
}
.calendar-legend { border-top: 1px solid rgba(199,166,106,.28); padding: 13px 16px 8px; }
.calendar-legend p { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #766a63; font-size: .7rem; line-height: 1.5; }
.calendar-legend strong { color: var(--wine); white-space: nowrap; }
.legend-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }
.legend-dot-event { background: var(--gold); }
.legend-dot-main { background: var(--wine); }
@media (max-width: 360px) {
  .wedding-calendar-section { padding-inline: 14px; }
  .calendar-month-bar { padding-inline: 13px; }
  .calendar-legend { padding-inline: 12px; }
  .calendar-legend p { font-size: .65rem; }
}


/* ==============================
   RSVP + SỔ LỜI CHÚC (Firebase)
   Đồng bộ đỏ rượu vang / kem / vàng champagne
================================ */
.guestbook-section { padding: 42px 22px 48px; background: linear-gradient(180deg,#fffdf9 0%,#f6e9dc 100%); color:#4b3630; }
.guestbook-heading { text-align:center; max-width:440px; margin:0 auto 24px; }
.guestbook-kicker { display:block; color:var(--gold,#c7a66a); font-size:.72rem; font-weight:800; letter-spacing:2.4px; margin-bottom:9px; }
.guestbook-heading h2,.wishes-form-wrap h2 { color:var(--wine,#6e1618); font-family:'Great Vibes',cursive; font-size:2rem; font-weight:400; margin:0 0 12px; }
.guestbook-heading p { font-size:.78rem; line-height:1.65; color:#776c65; margin:0 0 7px; }
.guestbook-note { font-weight:600; }
.guest-form { max-width:440px; margin:0 auto; padding:18px 16px 20px; border:1px solid rgba(199,166,106,.58); background:rgba(255,255,255,.7); }
.guest-form > label:not(.visually-hidden) { display:block; margin:0 0 7px; color:#6c5148; font-size:.78rem; font-weight:600; }
.guest-form input[type="text"],.guest-form input[type="email"],.guest-form input:not([type="radio"]),.guest-form select,.guest-form textarea { display:block; width:100%; border:1px solid #eadcc6; border-radius:8px; padding:12px 13px; margin:0 0 12px; background:#fffdf9; color:#44342f; font:inherit; font-size:.85rem; outline:none; }
.guest-form input:focus,.guest-form select:focus,.guest-form textarea:focus { border-color:var(--gold,#c7a66a); box-shadow:0 0 0 3px rgba(199,166,106,.13); }
.attendance-options { border:0; padding:0; margin:0 0 13px; min-width:0; }
.attendance-options legend { font-size:.78rem; font-weight:700; color:#6c5148; margin-bottom:8px; }
.attendance-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.attendance-options legend { grid-column:1/-1; }
.attendance-options label { position:relative; cursor:pointer; }
.attendance-options input { position:absolute; opacity:0; inset:0; }
.attendance-options span { display:flex; min-height:42px; align-items:center; justify-content:center; padding:7px 3px; text-align:center; border:1px solid #eadcc6; border-radius:7px; color:#6b5046; font-size:.72rem; font-weight:700; background:#fffdf9; }
.attendance-options input:checked + span { background:var(--wine,#6e1618); color:#fffaf3; border-color:var(--wine,#6e1618); }
.attendance-options input:focus-visible + span { outline:2px solid var(--gold,#c7a66a); outline-offset:2px; }
.guest-submit { width:100%; border:0; border-radius:7px; padding:13px 15px; background:#b99b2b; color:white; font-weight:800; letter-spacing:.5px; font-size:.82rem; transition:filter .2s,transform .2s; }
.guest-submit:hover { filter:brightness(.96); transform:translateY(-1px); }
.guest-submit:disabled { opacity:.65; cursor:wait; transform:none; }
.form-feedback { margin:10px 0 0; font-size:.8rem; line-height:1.5; color:var(--wine,#6e1618); }
.form-feedback:empty { display:none; }
.wishes-form-wrap { margin:72px auto 0; max-width:440px; }
.wishes-form-wrap h2 { text-align:center; margin-bottom:18px; }
.wishes-form { padding:0; border:0; background:transparent; }
.wishes-form textarea { resize:vertical; min-height:108px; }
.published-wishes-heading { text-align:center; margin:34px 0 15px; }
.published-wishes-heading h3 { color:var(--wine,#6e1618); font-size:1rem; font-weight:800; margin:0 0 5px; }
.published-wishes-heading p,.wishes-loading { color:#84766e; font-size:.76rem; }
.published-wishes { display:grid; gap:12px; }
.wish-card { border:1px solid rgba(199,166,106,.48); border-radius:10px; background:rgba(255,255,255,.8); padding:14px 15px; overflow-wrap:anywhere; }
.wish-card h4 { margin:0 0 7px; color:var(--wine,#6e1618); font-size:.84rem; font-weight:800; }
.wish-card p { margin:0; white-space:pre-wrap; color:#64574f; font-size:.82rem; line-height:1.65; }
.wish-card time { display:block; margin-top:8px; color:#9b8c80; font-size:.68rem; }
@media(max-width:360px) { .guestbook-section { padding-inline:15px; } .guest-form { padding:15px 12px 17px; } .attendance-options span { font-size:.66rem; } }
