/*
    Template 1 - Elegant Premium
    Vibe: Navy blue, white, script accents (nhacohy.vn/mau-elegant-prenium)
*/

:root {
    --navy: #1e3a5f;
    --navy-dark: #152a45;
    --navy-light: #2a4d7a;
    --accent-blue: #8ba4c4;
    --text-dark: #1e3a5f;
    --text-muted: #6b7c93;
    --bg-white: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-page: #eceff4;
    --border-light: #e2e8f0;
    --shell-max: 430px;

    --font-script: 'Dancing Script', cursive;
    --font-serif: 'Yeseva One', serif;
    --font-display: 'Judson', serif;
    --font-sans: 'Niramit', 'Quicksand', sans-serif;
    --font-body: 'Roboto', 'Open Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body.elegant-template {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    background: var(--bg-page);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Mobile-first shell: narrow column like nhacohy */
.template-shell {
    width: 100%;
    max-width: var(--shell-max);
    margin: 0 auto;
    background: var(--bg-white);
    box-shadow: 0 0 40px rgba(30, 58, 95, 0.08);
    overflow-x: hidden;
    position: relative;
    padding-bottom: 88px;
}

.texture-layer {
    position: absolute;
    inset: 0;
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 280px auto;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.template-shell > section,
.template-shell > .section-divider,
.template-shell > .footer-bar {
    position: relative;
    z-index: 1;
}

.texture-accent {
    display: block;
    width: 72px;
    height: auto;
    margin: 0 auto 20px;
    opacity: 0.55;
    filter: sepia(0.3);
    transition: transform 0.6s ease, opacity 0.4s;
}

.texture-accent:hover {
    transform: scale(1.08) rotate(-2deg);
    opacity: 0.75;
}

.texture-accent--invite {
    width: 48px;
    margin: 0 auto 16px;
}

/* Text hover — titles & names (shared template 1/2/3) */
.hover-script,
.script-title,
.couple-title,
.couple-title span,
.label-script,
.hero-name,
.hero-tagline,
.invite-guest,
.invite-label,
.invite-sub,
.event-intro,
.venue-label,
.timeline-title,
.timeline-time,
.family-name,
.polaroid-label,
.gift-name,
.golden-hero-tag,
.golden-portrait-names .names,
.golden-card-name,
.golden-chapter-title,
.golden-chapter-sub,
.golden-invite-side .name,
.golden-date-strip .day-name,
.seal-profile-name,
.seal-thanks-title,
.seal-envelope-title,
.seal-envelope-names,
.seal-invite-names .name,
.seal-date-big,
.seal-date-row .part,
.gallery-quote {
    transition: letter-spacing 0.4s ease, transform 0.4s ease, color 0.35s ease, text-shadow 0.35s ease;
}

/* Script / display titles */
.hover-script:hover,
.script-title:hover,
.couple-title:hover,
.label-script:hover,
.golden-chapter-title:hover,
.golden-hero-tag:hover,
.seal-thanks-title:hover,
.seal-profile-name:hover,
.seal-envelope-names:hover,
.golden-portrait-names .names:hover,
.golden-card-name:hover,
.gift-name:hover,
.family-name:hover {
    letter-spacing: 0.05em;
    transform: scale(1.03);
}

.script-title.light:hover {
    color: #fff;
    text-shadow: 0 4px 28px rgba(255, 255, 255, 0.4);
}

.hero-name:hover {
    transform: scale(1.05);
    letter-spacing: 0.03em;
    text-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

.hero-tagline:hover {
    letter-spacing: 0.22em;
    transform: scale(1.02);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.invite-guest:hover {
    letter-spacing: 0.06em;
    transform: scale(1.04);
    color: var(--navy-light);
}

/* Uppercase labels */
.invite-label:hover,
.invite-sub:hover,
.event-intro:hover,
.timeline-title:hover,
.venue-label:hover,
.seal-envelope-title:hover,
.seal-date-row .part:hover,
.golden-chapter-sub:hover,
.golden-date-strip .day-name:hover,
.polaroid-label:hover {
    letter-spacing: 0.32em;
    color: var(--navy);
}

.timeline-time:hover {
    letter-spacing: 0.12em;
    color: var(--navy);
    transform: scale(1.02);
}

.seal-invite-names:hover .name {
    letter-spacing: 0.04em;
    transform: scale(1.04);
    color: var(--navy-light);
}

.seal-date-big:hover {
    transform: scale(1.04);
    text-shadow: 0 6px 24px rgba(107, 20, 36, 0.22);
}

.gallery-quote:hover {
    color: var(--navy-light);
    transform: scale(1.01);
    letter-spacing: 0.02em;
}

/* Image hover */
.img-hover-wrap {
    position: relative;
    overflow: hidden;
    display: block;
}

.img-hover-wrap img {
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s;
    width: 100%;
    display: block;
}

.img-hover-wrap:hover img {
    transform: scale(1.08);
    filter: brightness(1.05) saturate(1.1);
}

.img-hover-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 70%
    );
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.img-hover-wrap:hover .img-hover-shine {
    transform: translateX(120%);
}

/* Wish toast alerts */
.wish-toast-stack {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(380px, calc(100vw - 32px));
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.wish-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.18);
    border: 1px solid rgba(30, 58, 95, 0.08);
    animation: toastSlideIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.wish-toast.is-leaving {
    animation: toastSlideOut 0.4s ease forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideOut {
    to { opacity: 0; transform: translateY(-12px) scale(0.95); }
}

.wish-toast-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--accent-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-script);
    font-size: 1rem;
    flex-shrink: 0;
}

.wish-toast-body { flex: 1; min-width: 0; }

.wish-toast-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--navy);
    margin-bottom: 2px;
}

.wish-toast-msg {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.wish-toast-emoji { font-size: 0.9rem; margin-left: 4px; }

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

/* Chỉ center khi cần — timeline, form căn trái */
.section--center { text-align: center; }

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    background: var(--bg-white);
}

.section-divider span {
    display: block;
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    position: relative;
}

.section-divider span::after {
    content: '♥';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.45rem;
    color: var(--accent-blue);
    background: var(--bg-white);
    padding: 0 6px;
    animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

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

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

@keyframes countPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.anim-float { animation: floatSoft 4s ease-in-out infinite; }

.couple-title {
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
}

.couple-title .amp { font-size: 0.9em; }

.script-title {
    font-family: var(--font-script);
    font-size: clamp(2rem, 9vw, 2.8rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 16px;
}

.script-title.light { color: #fff; }

.amp {
    font-family: var(--font-script);
    font-style: italic;
}

.section {
    padding: 48px 0;
}

@media (max-width: 380px) {
    .section {
        padding: 36px 0;
    }

    .calendar-grid {
        max-width: 238px;
    }

    .cal-num {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -5%;
    background: inherit;
    background-size: cover;
    background-position: center top;
    animation: kenBurns 18s ease-in-out infinite alternate;
    z-index: 0;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.hero-scroll-hint span {
    display: block;
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 24px;
    color: #fff;
}

.hero-names {
    font-family: var(--font-script);
    font-size: clamp(2rem, 10vw, 3.2rem);
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
}

.hero-name {
    display: block;
    max-width: 100%;
    word-break: break-word;
}

.hero-names .amp {
    font-size: 0.85em;
    line-height: 1;
    margin: 0.1em 0;
}

.hero-tagline {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 2;
    text-transform: uppercase;
    opacity: 0.95;
}

/* ── Save The Date ── */
.save-date {
    background: var(--bg-white);
    padding-top: 48px;
}

.label-script {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--navy);
    text-align: center;
    margin-bottom: 8px;
}

.date-big {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 6px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.calendar-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.calendar-photo {
    width: 160px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(30, 58, 95, 0.12);
}

.calendar-photo img {
    width: 100%;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.calendar-wrap {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-month {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    text-align: center;
    color: var(--navy);
    margin-bottom: 14px;
    font-style: italic;
    width: 100%;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    max-width: 266px;
    margin: 0 auto;
    gap: 4px 0;
}

.cal-head {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
    text-align: center;
}

.cal-day {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    color: var(--text-dark);
    aspect-ratio: 1;
    max-width: 38px;
    max-height: 38px;
    width: 100%;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 1;
}

.cal-day.empty {
    visibility: hidden;
    pointer-events: none;
}

.cal-day.highlight {
    background: transparent;
    animation: none;
}

.cal-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.cal-day.highlight .cal-num {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
}

.cal-day .heart {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.42rem;
    color: #f0b4c4;
    line-height: 1;
    animation: none;
}

/* ── Polaroids ── */
.couple-section {
    background: var(--bg-soft);
}

.polaroid-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.polaroid {
    background: #fff;
    padding: 8px 8px 24px;
    box-shadow: 0 6px 24px rgba(30, 58, 95, 0.1);
    width: min(140px, 42vw);
    text-align: center;
}

@media (max-width: 360px) {
    .polaroid-left,
    .polaroid-right { transform: none; }
}

.polaroid-left { transform: rotate(-4deg); }
.polaroid-right { transform: rotate(4deg); }

.polaroid img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.polaroid-label {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 1px;
}

/* ── Invitation ── */
.invitation-section {
    padding: 48px 0;
}

.floral-deco {
    width: 100px;
    height: auto;
    color: var(--accent-blue);
    margin: 0 auto 24px;
    display: block;
    opacity: 0.7;
}

.invite-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--navy);
    margin-bottom: 8px;
    text-align: center;
}

.invite-sub {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.invite-guest {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--navy);
    text-align: center;
}

/* ── Family ── */
.family-section {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.family-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
    max-width: 340px;
    margin: 0 auto;
}

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

.family-tag {
    font-family: var(--font-script);
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 10px;
    text-transform: lowercase;
    line-height: 1.2;
}

.family-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 10px;
    word-break: break-word;
}

.family-name {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    letter-spacing: 0.5px;
    word-break: break-word;
}

.family-christian {
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.family-rank {
    display: inline-block;
    font-size: 0.65rem;
    background: var(--navy);
    color: #fff;
    padding: 2px 8px;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ── Event Date ── */
.event-date-section {
    padding: 56px 0;
}

.event-intro {
    font-size: 0.7rem;
    letter-spacing: 2px;
    line-height: 2;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.event-intro strong {
    color: var(--navy);
    font-weight: 600;
}

.date-display {
    margin-bottom: 20px;
}

.date-line {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.date-number {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 18vw, 5rem);
    font-weight: 400;
    color: var(--navy);
    line-height: 1;
    margin: 8px 0;
}

.lunar-date {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.monogram {
    width: 100px;
    height: 100px;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--navy);
    gap: 4px;
}

.rings-icon {
    width: 56px;
    height: auto;
    opacity: 0.85;
}

.monogram-letters {
    font-family: var(--font-script);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.monogram-amp {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ── Venue ── */
.venue-section {
    background: var(--bg-soft);
}

.venue-photo {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 8px 30px rgba(30, 58, 95, 0.1);
}

.venue-photo img {
    width: 100%;
    display: block;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.venue-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 10px;
}

.venue-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.count-num.is-tick {
    animation: countPop 0.35s ease;
}

.btn-navy {
    display: inline-block;
    padding: 12px 36px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    border-radius: 24px;
    transition: background 0.3s, transform 0.3s;
}

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

.btn-full { width: 100%; margin-top: 8px; }

/* ── Timeline ── */
.timeline-section {
    padding: 56px 0;
}

.timeline-section .script-title {
    margin-bottom: 28px;
}

.timeline {
    position: relative;
    padding-left: 52px;
    margin-top: 8px;
    text-align: left;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
    transition: transform 0.4s ease;
}

.timeline-item:hover {
    transform: translateX(6px);
}

.timeline-item:hover .timeline-icon {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.25);
}

.timeline-item:hover .timeline-time {
    color: var(--navy-light);
}

.timeline-item.is-active .timeline-icon {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.timeline-icon {
    transition: transform 0.35s ease, background 0.35s, color 0.35s, box-shadow 0.35s;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-icon {
    position: absolute;
    left: -48px;
    width: 36px;
    height: 36px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
}

.timeline-icon svg { width: 18px; height: 18px; }

.timeline-time {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 4px;
}

.timeline-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Dress Code ── */
.dresscode-section {
    background: var(--bg-soft);
    padding: 48px 0;
}

.dresscode-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

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

.swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Guestbook ── */
.guestbook-section {
    background: var(--navy);
    color: #fff;
    padding: 56px 0;
}

.guestbook-intro {
    font-size: 0.85rem;
    line-height: 1.8;
    opacity: 0.85;
    text-align: center;
    margin-bottom: 28px;
}

.wish-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.wish-form input,
.wish-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    resize: vertical;
}

.wish-form input::placeholder,
.wish-form textarea::placeholder {
    color: var(--text-muted);
}

.btn-wish {
    align-self: flex-end;
    padding: 10px 24px;
    background: #fff;
    color: var(--navy);
    border: none;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-wish:hover { opacity: 0.9; }

.wishes-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wishes-loading {
    text-align: center;
    opacity: 0.6;
    font-size: 0.85rem;
}

.wish-form-label {
    font-family: var(--font-script);
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-align: left;
}

.guestbook-intro.section--center {
    text-align: center;
}

.wish-bubble {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 14px 16px;
    animation: fadeSlideIn 0.5s ease-out;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.wish-bubble .wish-author {
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.wish-bubble .wish-text {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ── Gallery ── */
.gallery-section {
    padding: 56px 0;
    background: var(--bg-white);
}

.gallery-quote {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.9;
    margin-bottom: 32px;
    padding: 0 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 6px;
}

.gallery-item-1 { grid-row: span 2; }
.gallery-item-3 { grid-row: span 2; }
.gallery-item-4 { grid-column: span 2; }
.gallery-item-6 { grid-column: span 2; aspect-ratio: 2/1; }

.gallery-item-1 img,
.gallery-item-2 img,
.gallery-item-3 img,
.gallery-item-5 img { aspect-ratio: 3/4; }

.gallery-item-4 img,
.gallery-item-6 img { aspect-ratio: 16/9; }

.gallery-grid.is-collapsed .gallery-extra {
    display: none;
}

.btn-gallery-more {
    display: block;
    margin: 24px auto 0;
    padding: 0;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-gallery-more:hover { opacity: 0.7; }
.btn-gallery-more.is-hidden { display: none; }

.gallery-item:hover {
    transform: none;
    z-index: 2;
}

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

/* ── RSVP ── */
.rsvp-section {
    background: var(--bg-soft);
    padding: 56px 0;
}

.rsvp-intro {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

.rsvp-form .form-group {
    margin-bottom: 16px;
}

.rsvp-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="tel"],
.rsvp-form input[type="number"],
.rsvp-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

.rsvp-form textarea {
    resize: vertical;
    min-height: 80px;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--navy);
    margin: 20px 0 12px;
}

.rsvp-attend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color 0.3s;
}

.radio-card:has(input:checked) {
    border-color: var(--navy);
    background: rgba(30, 58, 95, 0.04);
}

.radio-card input { accent-color: var(--navy); }

.rsvp-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.side-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: border-color 0.3s;
}

.side-card:has(input:checked) {
    border-color: var(--navy);
    background: rgba(30, 58, 95, 0.04);
}

.side-card img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.side-card input { display: none; }

.rsvp-success {
    text-align: center;
    padding: 32px 16px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin-top: 16px;
}

.rsvp-success p {
    font-size: 0.9rem;
    color: var(--navy);
    margin-bottom: 8px;
}

/* ── Countdown ── */
.countdown-section {
    padding: 56px 0;
    background: var(--bg-white);
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 24px 0 40px;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.count-num {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    color: var(--navy);
    line-height: 1;
}

.count-label {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

.count-sep {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--navy);
    padding-bottom: 16px;
}

.signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sig-groom,
.sig-bride {
    font-family: var(--font-script);
    font-size: clamp(1.5rem, 7vw, 2rem);
    color: var(--navy);
}

.sig-amp {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--accent-blue);
}

/* ── Thank You ── */
.thankyou-section {
    padding: 0;
}

.thankyou-photo {
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thankyou-overlay {
    text-align: center;
    color: #fff;
    padding: 48px 24px;
    background: rgba(30, 58, 95, 0.45);
    width: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.thankyou-overlay p {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-top: 8px;
}

/* ── Gift ── */
.gift-section {
    padding: 56px 0;
    background: var(--bg-soft);
}

.gift-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.gift-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 380px) {
    .gift-cards {
        grid-template-columns: 1fr;
    }
}

.gift-card {
    background: #fff;
    padding: 24px 16px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.gift-side {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--navy);
    line-height: 1.6;
    margin-bottom: 16px;
}

.gift-bank {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.gift-stk {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--navy);
    font-weight: 500;
    margin-bottom: 4px;
}

.gift-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.btn-outline {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--navy);
    color: var(--navy);
    font-size: 0.7rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--navy);
    color: #fff;
}

/* ── Footer bar (nhacohy style) ── */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--shell-max);
    z-index: 300;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 24px rgba(30, 58, 95, 0.1);
    backdrop-filter: blur(8px);
}

.footer-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px 12px;
    gap: 10px;
    min-height: 52px;
}

.footer-bar-social {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    position: absolute;
    left: 10px;
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.footer-icon:hover {
    transform: scale(1.12) translateY(-2px);
}

.footer-icon img {
    width: 28px;
    height: 28px;
    display: block;
}

.footer-bar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.footer-bar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--navy);
    min-width: 0;
    padding: 0 4px;
    transition: opacity 0.3s;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-bottom: 1px solid var(--navy);
    padding-bottom: 2px;
    max-width: 100%;
}

.footer-bar-brand:hover {
    opacity: 0.8;
}

.footer-copyright {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.footer-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.85;
    flex-shrink: 0;
}

/* ── Floating buttons ── */
.floating-left,
.floating-right {
    position: fixed;
    z-index: 350;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-left {
    left: max(16px, calc(50% - var(--shell-max) / 2 + 12px));
    bottom: 64px;
}

.floating-right {
    right: max(16px, calc(50% - var(--shell-max) / 2 + 12px));
    bottom: 64px;
}

.float-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.4);
    transition: transform 0.3s, background 0.3s, opacity 0.3s;
    cursor: pointer;
    padding: 0;
}

.float-btn:hover {
    background: var(--navy-dark);
    transform: scale(1.06);
}

.float-music.is-playing .icon-play { display: none; }
.float-music.is-playing .icon-pause { display: block !important; }
.float-music:not(.is-playing) .icon-pause { display: none !important; }

.float-top {
    border: 2px solid #fff;
}

@media (max-width: 480px) {
    .floating-left { left: 16px; }
    .floating-right { right: 16px; }
}

/* ── Desktop: centered phone frame ── */
@media (min-width: 480px) {
    body.elegant-template {
        padding: 0;
    }

    .template-shell {
        min-height: 100vh;
    }
}

@media (min-width: 768px) {
    body.elegant-template { font-size: 15px; }

    .hero-names { font-size: 3.5rem; }

    .calendar-block {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 32px;
    }

    .calendar-photo { width: 150px; }

    .polaroid { width: 150px; }
}
