:root {
    --forest: #0f432f;
    --forest-dark: #082f22;
    --forest-deep: #05271c;
    --cream: #f4ead2;
    --cream-light: #fffaf0;
    --gold: #c9a14c;
    --gold-light: #ecd18d;
    --ink: #17211b;
    --muted: #6a716b;
    --danger: #8b3d35;
    --shadow: 0 22px 65px rgba(4, 37, 26, .20);
    --paper-border: rgba(15, 67, 47, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); }
a { color: var(--forest); text-underline-offset: 3px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   PUBLIC INVITATION
   -------------------------------------------------------------------------- */
.invite-body {
    min-height: 100vh;
    margin: 0;
    background: var(--forest-deep);
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
}

.invite-page {
    min-height: 100vh;
    width: 100%;
    overflow-x: clip;
    background: var(--cream);
}

/* HERO -------------------------------------------------------------------- */
.party-hero {
    position: relative;
    z-index: 3;
    min-height: 790px;
    width: 100%;
    padding: 58px 24px 245px;
    overflow: visible;
    isolation: isolate;
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.party-hero::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 18%, rgba(255, 249, 232, .20) 0%, rgba(255,249,232,.07) 38%, transparent 62%),
        linear-gradient(180deg, transparent 72%, rgba(5,39,28,.12) 100%);
}

.hero-copy {
    position: relative;
    z-index: 3;
    width: min(800px, 72vw);
    margin: 0 auto;
    text-align: center;
    color: var(--forest-dark);
    text-shadow: 0 1px 0 rgba(255,255,255,.68);
}

.surprise-line {
    margin: 0 0 12px;
    font-size: clamp(1.18rem, 1.55vw, 1.72rem);
    font-weight: 800;
    letter-spacing: .055em;
}

.hero-kicker {
    margin: 0;
    font-size: clamp(1.72rem, 2.55vw, 2.85rem);
    font-weight: 900;
    letter-spacing: .045em;
}

.party-hero h1 {
    margin: 0;
    color: var(--forest);
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: clamp(5.4rem, 8.8vw, 9rem);
    line-height: .92;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(201,161,76,.24), 0 8px 25px rgba(4,39,27,.08);
}

.footprint {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex: 0 0 auto;
}

.hero-footprint {
    display: block;
    width: 30px;
    height: 30px;
    margin: 12px auto 4px;
    color: var(--forest);
}

.hero-subtitle {
    margin: 6px auto 0;
    color: #18251e;
    font-size: clamp(1.35rem, 1.9vw, 1.82rem);
    font-weight: 600;
}

.hero-balloons {
    position: absolute;
    z-index: 4;
    top: -86px;
    right: -18px;
    width: clamp(340px, 29vw, 500px);
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 14px 20px rgba(4, 34, 24, .15));
}

/* EVENT CARD --------------------------------------------------------------- */
.event-card,
.paper-card {
    background: rgba(255, 250, 240, .97);
    border: 1px solid var(--paper-border);
    box-shadow: var(--shadow);
}

.event-card {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: -145px;
    width: min(690px, calc(100% - 36px));
    padding: 24px 42px 23px;
    transform: translateX(-50%);
    border-radius: 24px;
}

.section-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 11px;
    color: var(--forest-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .28em;
}
.section-label span { flex: 1; height: 1px; background: rgba(15,67,47,.42); }

.event-list { width: min(520px, 100%); margin: 0 auto; }
.event-detail {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 6px 0;
}
.event-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--forest);
    color: #fff6df;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
}
.event-detail strong {
    display: block;
    color: var(--ink);
    font-size: clamp(1.1rem, 1.55vw, 1.34rem);
    font-weight: 700;
    line-height: 1.2;
}
.event-detail small {
    display: block;
    margin-top: 3px;
    color: #545d56;
    font-size: .88rem;
    line-height: 1.35;
}
.event-deadline strong { font-size: 1.02rem; }
.secret-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 13px;
    border-top: 1px solid rgba(15,67,47,.25);
    color: var(--ink);
    text-align: center;
    font-size: .98rem;
    font-weight: 800;
}
.note-footprint { width: 23px; height: 23px; color: var(--forest); }

/* CONTINUOUS JUNGLE RSVP STAGE -------------------------------------------- */
.rsvp-area {
    position: relative;
    z-index: 1;
    padding: 205px 20px 105px;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, rgba(244,234,210,.86) 0%, rgba(247,238,217,.90) 34%, rgba(244,234,210,.80) 77%, rgba(244,234,210,.52) 100%),
        linear-gradient(90deg,
            rgba(244,234,210,.08) 0%,
            rgba(244,234,210,.28) 12%,
            rgba(244,234,210,.93) 27%,
            rgba(244,234,210,.97) 50%,
            rgba(244,234,210,.93) 73%,
            rgba(244,234,210,.28) 88%,
            rgba(244,234,210,.08) 100%),
        url('../img/hero.jpg');
    background-size: cover, cover, cover;
    background-position: center, center, center 54%;
    background-repeat: no-repeat;
}

/* A soft leafy vignette keeps the form area visually connected to the hero. */
.rsvp-area::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(5,39,28,.12) 0, transparent 120px),
        linear-gradient(0deg, rgba(5,39,28,.24) 0, transparent 180px);
}

.rsvp-area-error { padding-top: 72px; }
.content-shell {
    position: relative;
    z-index: 2;
    width: min(900px, calc(100% - 12px));
    margin: 0 auto;
}

/* RSVP is one invitation panel, not two unrelated Bootstrap cards. */
.rsvp-form {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(15,67,47,.20);
    border-radius: 28px;
    background: rgba(255, 250, 240, .965);
    box-shadow: 0 28px 70px rgba(4,37,26,.22);
}

.rsvp-form::before,
.rsvp-form::after {
    content: '';
    position: absolute;
    z-index: 0;
    width: 180px;
    height: 180px;
    opacity: .12;
    pointer-events: none;
    background-image: url('../img/footprint.svg');
    background-size: contain;
    background-repeat: no-repeat;
}
.rsvp-form::before { top: -78px; left: -65px; transform: rotate(-22deg); }
.rsvp-form::after { bottom: -82px; right: -65px; transform: rotate(24deg); }

.paper-card { border-radius: 24px; }
.rsvp-form .paper-card {
    position: relative;
    z-index: 1;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.attendance-card {
    padding: 32px clamp(28px, 6vw, 64px) 32px;
    text-align: center;
    border-bottom: 1px solid rgba(15,67,47,.18) !important;
    background: linear-gradient(180deg, rgba(255,250,240,.86), rgba(244,234,210,.42)) !important;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--gold);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .2em;
}

.attendance-card h2,
.details-title,
.success-card h2,
.lost-card h2 { color: var(--forest-dark); }

.attendance-card h2 {
    margin: 0;
    font-size: clamp(2.35rem, 4.2vw, 3.4rem);
    line-height: 1.05;
}
.guest-greeting { margin: 8px 0 22px; color: #424a43; font-size: 1.05rem; }
.answer-fieldset { margin: 0; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.answer-button {
    position: relative;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 14px 22px;
    border: 2px solid var(--forest);
    border-radius: 14px;
    cursor: pointer;
    font-size: clamp(1.04rem, 1.55vw, 1.24rem);
    font-weight: 900;
    line-height: 1.18;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.answer-button input { position: absolute; opacity: 0; pointer-events: none; }
.answer-button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(6,45,31,.11); }
.answer-button:focus-within { outline: 4px solid rgba(201,161,76,.46); outline-offset: 3px; }
.answer-button.selected { outline: 4px solid rgba(201,161,76,.55); outline-offset: 3px; }
.yes-answer { background: linear-gradient(180deg, #174c36, #0a3525); color: #fff8e8; }
.no-answer { background: #fffaf0; color: var(--forest-dark); }
.button-footprint { width: 34px; height: 34px; }
.yes-answer .button-footprint { color: var(--gold-light); }
.no-answer .button-footprint { color: var(--forest); }

.details-card {
    padding: 34px clamp(30px, 7vw, 72px) 42px;
    background: rgba(255,250,240,.82) !important;
}
.details-title {
    margin: 0 0 27px;
    text-align: center;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
}

/* Stacked fields are cleaner, easier to scan, and much friendlier for older guests. */
.form-row-custom {
    display: block;
    padding: 0;
    margin: 0 0 21px;
}
.big-label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    color: var(--forest-dark);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
}
.big-label span { color: var(--muted); font-size: .9rem; font-weight: 400; }
.form-control,
.form-select {
    width: 100%;
    min-height: 60px;
    border: 1.5px solid rgba(15,67,47,.32);
    border-radius: 11px;
    background: rgba(255,255,255,.96);
    color: #222822;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.05rem;
    box-shadow: inset 0 1px 1px rgba(5,39,28,.03);
}
textarea.form-control { resize: vertical; padding-top: 14px; }
.form-control::placeholder { color: #7f8780; opacity: 1; }
.form-control:focus,
.form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 .25rem rgba(201,161,76,.18);
}
.form-text { margin-top: 6px; color: #656d66; font-size: .86rem; }

.btn-dino {
    width: 100%;
    min-height: 72px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(180deg, #174c36, #0a3525);
    color: #fff8e8;
    box-shadow: 0 10px 24px rgba(6,45,31,.18);
    font-size: 1.38rem;
    font-weight: 900;
    letter-spacing: .02em;
}
.btn-dino:hover,
.btn-dino:focus { background: var(--forest-deep); color: #fff8e8; }
.submit-footprint { width: 34px; height: 34px; color: var(--gold-light); }

.success-card,
.lost-card {
    width: min(820px, 100%);
    margin: 0 auto 24px;
    padding: 38px clamp(26px, 5vw, 54px);
    text-align: center;
    background: rgba(255,250,240,.96);
}
.success-card { border: 2px solid rgba(201,161,76,.72); }
.success-footprint,
.lost-footprint { width: 48px; height: 48px; color: var(--gold); margin-bottom: 5px; }
.success-card h2,
.lost-card h2 { margin: 0 0 8px; font-size: clamp(2rem, 3.5vw, 2.7rem); }
.secret-reminder {
    max-width: 610px;
    margin: 17px auto 0;
    padding: 11px 15px;
    border-radius: 9px;
    background: #f0dfaf;
    color: var(--forest-deep);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .92rem;
    font-weight: 900;
}

/* FOOTER ------------------------------------------------------------------ */
.footer-jungle {
    position: relative;
    z-index: 2;
    min-height: 385px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: -1px;
    padding: 70px 20px 125px;
    background-image: url('../img/footer.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.footer-jungle::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 110px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(244,234,210,.72), transparent);
}
.phone-callout {
    position: relative;
    z-index: 2;
    width: min(800px, calc(100% - 28px));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 19px;
    color: var(--forest-dark);
    text-align: left;
    padding: 15px 22px;
    border-radius: 18px;
    background: rgba(255,250,240,.78);
    backdrop-filter: blur(2px);
}
.phone-callout::before,
.phone-callout::after {
    content: '';
    width: 105px;
    height: 1px;
    background: rgba(15,67,47,.46);
}
.phone-icon-img {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    flex: 0 0 68px;
    object-fit: contain;
}
.phone-callout h3 { margin: 0; color: var(--forest-dark); font-size: 1.38rem; font-weight: 800; }
.phone-callout p { margin: 3px 0 0; font-size: 1.04rem; }
.phone-callout a { font-weight: 800; }

.invite-footer {
    position: relative;
    z-index: 3;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid rgba(201,161,76,.65);
    background: var(--forest-deep);
    color: var(--gold-light);
}
.footer-line {
    width: min(1000px, calc(100% - 30px));
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .18em;
}
.footer-line i { font-style: normal; }
.footer-footprint { width: 20px; height: 20px; color: var(--gold-light); }

.invite-missing .party-hero { min-height: 610px; padding-bottom: 95px; }

@media (max-width: 1100px) {
    .hero-balloons { right: -80px; width: 400px; }
    .hero-copy { width: min(760px, 78vw); }
    .rsvp-area {
        background-image:
            linear-gradient(180deg, rgba(244,234,210,.88), rgba(244,234,210,.84)),
            url('../img/hero.jpg');
        background-size: cover, cover;
        background-position: center, center center;
    }
}

@media (max-width: 820px) {
    .party-hero { min-height: 705px; padding: 48px 16px 228px; background-position: center center; }
    .hero-copy { width: 91%; }
    .hero-balloons { top: -72px; right: -105px; width: 330px; opacity: .97; }
    .party-hero h1 { font-size: clamp(4.4rem, 16vw, 7rem); }
    .event-card { bottom: -142px; padding: 23px 24px 20px; }
    .rsvp-area { padding: 190px 14px 78px; }
    .answer-grid { grid-template-columns: 1fr; }
    .answer-button { min-height: 74px; }
    .phone-callout::before, .phone-callout::after { width: 50px; }
}

@media (max-width: 560px) {
    .invite-body { font-size: 17px; }
    .party-hero { min-height: 665px; padding-top: 38px; padding-bottom: 220px; background-position: 50% center; }
    .hero-balloons { top: -48px; right: -104px; width: 260px; }
    .hero-copy { width: 96%; }
    .surprise-line { font-size: 1.04rem; letter-spacing: .025em; }
    .hero-kicker { font-size: clamp(1.5rem, 7vw, 2rem); }
    .party-hero h1 { font-size: clamp(4rem, 20vw, 5.8rem); }
    .hero-subtitle { max-width: 340px; font-size: 1.18rem; }
    .event-card { width: calc(100% - 24px); bottom: -145px; padding: 20px 17px 18px; border-radius: 17px; }
    .section-label { gap: 9px; letter-spacing: .18em; }
    .event-detail { grid-template-columns: 44px minmax(0, 1fr); gap: 9px; }
    .event-icon { width: 39px; height: 39px; }
    .event-detail strong { font-size: 1.08rem; }
    .event-detail small { font-size: .78rem; }
    .secret-note { font-size: .9rem; }
    .rsvp-area { padding: 194px 8px 60px; background: linear-gradient(180deg, #efe4c8, #f7eed9 58%, #e7dcc0); }
    .content-shell { width: calc(100% - 10px); }
    .rsvp-form { border-radius: 20px; }
    .attendance-card { padding: 25px 17px 26px; }
    .attendance-card h2 { font-size: 2.12rem; }
    .guest-greeting { font-size: .98rem; margin-bottom: 17px; }
    .answer-button { min-height: 72px; padding: 13px 14px; font-size: 1rem; gap: 10px; }
    .button-footprint { width: 29px; height: 29px; }
    .details-card { padding: 26px 17px 30px; }
    .details-title { margin-bottom: 20px; font-size: 1.75rem; }
    .form-row-custom { margin-bottom: 18px; }
    .big-label { font-size: 1.08rem; }
    .form-control, .form-select { min-height: 60px; font-size: 1.04rem; }
    .btn-dino { min-height: 72px; font-size: 1.18rem; }
    .footer-jungle { min-height: 315px; padding: 52px 15px 95px; background-position: 58% center; }
    .phone-callout { width: calc(100% - 18px); flex-direction: column; gap: 8px; text-align: center; padding: 16px 18px; }
    .phone-callout::before, .phone-callout::after { display: none; }
    .phone-icon-img { width: 62px !important; height: 62px !important; max-width: 62px !important; flex-basis: 62px; }
    .phone-callout h3 { font-size: 1.28rem; }
    .phone-callout p { font-size: 1rem; }
    .footer-line { min-height: 74px; flex-wrap: wrap; gap: 6px 10px; padding: 12px 0; letter-spacing: .09em; font-size: .66rem; }
    .footer-line i { display: none; }
    .footer-footprint { display: none; }
    .invite-missing .party-hero { min-height: 520px; }
    .rsvp-area-error { padding-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   ADMIN - preserved from the working system
   -------------------------------------------------------------------------- */
.admin-body {
    background: #f4f1e9;
    color: #20241f;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.admin-navbar { background: var(--forest-deep); }
.admin-navbar .navbar-brand { font-weight: 900; color: white; }
.admin-navbar .nav-link { color: rgba(255,255,255,.76); }
.admin-navbar .nav-link:hover, .admin-navbar .nav-link.active { color: var(--gold-light); }
.admin-card {
    background: white;
    border: 1px solid #e7e1d4;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(12,43,32,.06);
}
.metric-card { min-height: 128px; }
.metric-value { font-size: 2.45rem; line-height: 1; font-weight: 900; color: var(--forest); }
.metric-label { color: #687069; font-weight: 700; margin-top: 8px; }
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .82rem;
    font-weight: 800;
}
.status-yes { color: #185534; background: #e2f3e8; }
.status-no { color: #7b332c; background: #f7e4e1; }
.status-pending { color: #775c18; background: #f7efcf; }
.open-pill { color: #244a7a; background: #e7f0fb; }
.unopened-pill { color: #626a65; background: #edf0ed; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); display: inline-block; margin-right: 8px; }
.table > :not(caption) > * > * { padding: .9rem .75rem; vertical-align: middle; }
.copy-field { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; }
.danger-zone { border: 1px solid #e4aaa4; background: #fff8f7; }
