:root {
    --cream: #fff8ef;
    --paper: #fffdf8;
    --blush: #f7c8d4;
    --rose: #d96b8b;
    --wine: #6d2740;
    --gold: #d8a94f;
    --sage: #96b79f;
    --ink: #342536;
    --shadow: 0 24px 70px rgba(85, 42, 64, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--ink);
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(247,200,212,.7), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(216,169,79,.25), transparent 30rem),
        linear-gradient(135deg, #fff8ef, #fff0f4 48%, #f8fff7);
    min-height: 100vh;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .9rem clamp(1rem, 4vw, 3rem);
    background: rgba(255,253,248,.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(109,39,64,.08);
}
.brand { font-weight: 800; text-decoration: none; font-size: 1.25rem; color: var(--wine); }
.topbar nav { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { text-decoration: none; padding: .55rem .8rem; border-radius: 999px; color: var(--wine); }
.topbar nav a:hover { background: rgba(247,200,212,.45); }
.hero {
    min-height: 82vh;
    display: grid; place-items: center;
    padding: 5rem 1rem;
    position: relative;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .75;
}
.hero::before { width: 23rem; height: 23rem; background: rgba(247,200,212,.75); left: -5rem; top: 5rem; }
.hero::after { width: 18rem; height: 18rem; background: rgba(216,169,79,.42); right: -3rem; bottom: 3rem; }
.glass, .panel, .info-card, .stat {
    background: rgba(255,253,248,.78);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.hero-card { width: min(920px, 94vw); text-align: center; border-radius: 38px; padding: clamp(2rem, 5vw, 4rem); position: relative; z-index: 2; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; color: var(--rose); font-weight: 800; font-size: .78rem; }
h1 { font-size: clamp(2.8rem, 9vw, 6.6rem); line-height: .95; margin: .25rem 0 1rem; color: var(--wine); }
h2 { color: var(--wine); margin-top: 0; }
h3 { margin: 0 0 .35rem; color: var(--wine); }
.subtitle { font-size: clamp(1.1rem, 2.2vw, 1.55rem); max-width: 720px; margin: 0 auto 1.5rem; }
.date-pill { display: inline-flex; padding: .8rem 1.2rem; border-radius: 999px; background: linear-gradient(135deg, var(--gold), #fff2b9); color: #5b3a04; font-weight: 800; margin-bottom: 1rem; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); gap: .75rem; max-width: 520px; margin: 1rem auto 2rem; }
.countdown div { background: #fff; border-radius: 22px; padding: .8rem; box-shadow: 0 10px 25px rgba(109,39,64,.10); }
.countdown strong { display: block; font-size: 1.8rem; color: var(--rose); }
.countdown span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.access-form { max-width: 560px; margin: 0 auto; }
.inline-form { display: flex; gap: .7rem; margin-top: .5rem; }
input, textarea, select { width: 100%; border: 1px solid rgba(109,39,64,.18); background: rgba(255,255,255,.86); border-radius: 18px; padding: .9rem 1rem; color: var(--ink); }
textarea { min-height: 95px; resize: vertical; }
button, .button { border: 0; border-radius: 999px; padding: .9rem 1.25rem; text-decoration: none; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.primary, button[type=submit] { background: linear-gradient(135deg, var(--rose), var(--wine)); color: white; box-shadow: 0 15px 35px rgba(217,107,139,.32); }
.ghost { background: white; color: var(--wine); border: 1px solid rgba(109,39,64,.18); }
.button-row { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.cards-section, .content-grid, .form-shell, .gallery-toolbar, .photo-grid, .dashboard-actions, .stats-grid, .table-panel, .upload-panel, .admin-login { width: min(1160px, 94vw); margin: 2rem auto; }
.cards-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.info-card { border-radius: 28px; padding: 1.4rem; min-height: 150px; position: relative; overflow: hidden; }
.spark { font-size: 2rem; color: var(--gold); }
.page-hero { width: min(1160px, 94vw); margin: 2.2rem auto 0; border-radius: 34px; padding: clamp(2rem, 4vw, 3.3rem); background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(247,200,212,.45)); box-shadow: var(--shadow); }
.page-hero.compact h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); }
.content-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.2rem; align-items: start; }
.panel { border-radius: 30px; padding: clamp(1.2rem, 3vw, 2rem); }
.timeline { display: grid; gap: 1rem; }
.timeline-item { display: grid; grid-template-columns: 84px 1fr; gap: 1rem; padding: 1rem; background: rgba(255,255,255,.74); border-radius: 24px; border: 1px dashed rgba(217,107,139,.35); }
.timeline-item time { color: var(--rose); font-weight: 900; font-size: 1.2rem; }
dl { display: grid; gap: .8rem; }
dt { color: var(--rose); font-weight: 900; }
dd { margin: -.6rem 0 .6rem; }
.note { padding: 1rem; border-radius: 20px; background: rgba(150,183,159,.18); }
.wide { width: 100%; }
.field-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.field-row.two { grid-template-columns: 1fr 1fr; }
.rsvp-form label, .upload-form label { display: grid; gap: .35rem; font-weight: 800; color: var(--wine); margin-bottom: 1rem; }
.choice-row { grid-template-columns: 1fr 1fr; }
.choice-card { background: rgba(255,255,255,.72); border: 2px solid rgba(217,107,139,.22); border-radius: 24px; padding: 1rem; display: flex !important; flex-direction: row !important; align-items: center; }
.choice-card input, .checkline input { width: auto; }
.checkline { display: flex !important; flex-direction: row !important; align-items: center; }
.success { color: #2f7a4d; background: rgba(150,183,159,.22); padding: 1rem; border-radius: 20px; }
.error { color: #b5294d; font-weight: 800; }
.dropzone { border: 2px dashed rgba(217,107,139,.5); border-radius: 26px; padding: 1.5rem; text-align: center; background: rgba(255,255,255,.62); }
.dropzone input { border: 0; background: transparent; box-shadow: none; padding: 0; }
.dropzone input::file-selector-button,
.dropzone input::-webkit-file-upload-button {
    margin-right: .8rem;
    padding: .85rem 1.15rem;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--rose), var(--wine));
    box-shadow: 0 14px 28px rgba(217,107,139,.26);
    cursor: pointer;
}
.gallery-toolbar, .dashboard-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.photo-card { border-radius: 26px; overflow: hidden; background: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(28px) scale(.97); transition: .7s ease; position: relative; }
.photo-card.is-visible, .reveal-card.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.photo-card img { width: 100%; height: 210px; object-fit: cover; display: block; filter: saturate(1.08); }
.photo-card div { padding: 1rem; display: grid; gap: .35rem; }
.photo-card span { font-size: .85rem; opacity: .75; }
.photo-card a { color: var(--rose); font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { border-radius: 26px; padding: 1.4rem; text-align: center; }
.stat strong { display: block; font-size: 2.4rem; color: var(--rose); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 20px; overflow: hidden; }
th, td { padding: .9rem; border-bottom: 1px solid rgba(109,39,64,.09); vertical-align: top; text-align: left; }
th { background: rgba(247,200,212,.45); color: var(--wine); }
small { opacity: .72; }
.link-danger { background: transparent !important; color: #b5294d !important; box-shadow: none !important; padding: .2rem; }
.admin-photo-list { display: grid; gap: .75rem; }
.admin-photo-list article { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; background: white; border-radius: 20px; padding: .75rem; }
.admin-photo-list img { width: 84px; height: 64px; object-fit: cover; border-radius: 14px; }
.footer { padding: 3rem 1rem; text-align: center; color: var(--wine); display: flex; gap: .5rem; justify-content: center; }
.floating-hearts { pointer-events: none; position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.floating-hearts span { position: absolute; color: rgba(217,107,139,.25); font-size: clamp(2rem, 5vw, 5rem); animation: floaty 16s infinite linear; }
.floating-hearts span:nth-child(1) { left: 7%; animation-delay: -2s; }
.floating-hearts span:nth-child(2) { left: 27%; animation-delay: -7s; }
.floating-hearts span:nth-child(3) { left: 51%; animation-delay: -5s; }
.floating-hearts span:nth-child(4) { left: 72%; animation-delay: -10s; }
.floating-hearts span:nth-child(5) { left: 88%; animation-delay: -1s; }
main, .topbar, .footer { position: relative; z-index: 1; }
.reveal-card { opacity: 0; transform: translateY(32px); transition: .7s ease; }
.confetti-piece { position: fixed; width: 8px; height: 14px; border-radius: 3px; pointer-events: none; z-index: 999; animation: confettiFall 900ms ease-out forwards; }
@keyframes floaty { from { transform: translateY(105vh) rotate(0deg); } to { transform: translateY(-20vh) rotate(360deg); } }
@keyframes confettiFall { to { transform: translate(var(--dx), var(--dy)) rotate(680deg); opacity: 0; } }
@media (max-width: 760px) {
    .hero {
        width: 100%;
        min-height: auto;
        justify-items: center;
        padding: 4.5rem 16px 3rem;
    }

    .hero::before {
        left: -9rem;
    }

    .hero::after {
        right: -8rem;
    }

    .hero-card {
        width: 100%;
        max-width: calc(100vw - 32px);
        margin: 0 auto;
        border-radius: 30px;
        padding: clamp(1.65rem, 7vw, 2.3rem);
    }

    .date-pill {
        width: 100%;
        justify-content: center;
        border-radius: 28px;
        padding-inline: 1rem;
    }

    .button-row {
        align-items: center;
        flex-direction: column;
    }

    .button-row .button {
        width: min(100%, 210px);
    }

    .cards-section,
    .content-grid,
    .form-shell,
    .gallery-toolbar,
    .photo-grid,
    .dashboard-actions,
    .stats-grid,
    .table-panel,
    .upload-panel,
    .admin-login,
    .page-hero {
        width: min(100% - 32px, 1160px);
    }

    .topbar { align-items: flex-start; flex-direction: column; }
    .content-grid, .field-row.two, .choice-row, .stats-grid { grid-template-columns: 1fr; }
    .inline-form { flex-direction: column; }
    .countdown { grid-template-columns: repeat(2, 1fr); }
    .timeline-item { grid-template-columns: 1fr; }
    .admin-photo-list article { grid-template-columns: 72px 1fr; }
}
/* Wedding Modal */
body.wedding-modal-open { overflow: hidden; }
.wedding-modal[hidden] { display: none !important; }
.wedding-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
}
.wedding-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(52, 37, 54, 0.4);
    backdrop-filter: blur(4px);
}
.wedding-modal-card {
    position: relative; z-index: 10;
    background: var(--paper);
    padding: clamp(2rem, 6vw, 4rem);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    max-width: 32rem;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(216, 169, 79, .15);
}
.wedding-modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 2rem; color: var(--ink); opacity: .4;
    cursor: pointer; padding: .5rem;
    transition: opacity .3s; line-height: 1;
}
.wedding-modal-close:hover { opacity: 1; }
