:root {
    --ivory: #f7f3e9;
    --paper: #fbf8f0;
    --ink: #2f3128;
    --olive-900: #38402c;
    --olive-800: #475039;
    --olive-700: #596347;
    --olive-500: #7b8464;
    --sage: #a8ad91;
    --gold: #ad8c48;
    --gold-soft: #d5bf86;
    --baby-blue: #5d91c9;
    --baby-blue-soft: #eaf4fc;
    --baby-pink: #d37f9e;
    --baby-pink-soft: #fbeaf1;
    --error: #8e3d36;
    --shadow: 0 28px 80px rgba(54, 58, 42, 0.18);
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Baskerville, Georgia, serif;
    --script: "Snell Roundhand", "Segoe Script", "Apple Chancery", cursive;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #dde1d7;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 300px;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,.85), transparent 38%),
        linear-gradient(145deg, #e9ebe4, #d7dccf);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

body.dialog-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

svg {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 11px 16px;
    color: #fff;
    background: var(--olive-900);
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.setup-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px;
    color: #fff;
    background: var(--olive-900);
    font-size: .78rem;
    line-height: 1.35;
    text-align: center;
}

.setup-banner a {
    flex: 0 0 auto;
    color: #fff;
    font-weight: 700;
}

.invitation {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 100svh;
    padding: 28px;
}

.invitation-paper,
.thank-you-card {
    position: relative;
    isolation: isolate;
    width: min(100%, 720px);
    min-height: max(100svh - 56px, 1120px);
    overflow: hidden;
    background: var(--ivory);
    border: 1px solid rgba(173, 140, 72, 0.28);
    border-radius: 34px;
    box-shadow: var(--shadow);
}

.paper-art {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image: url("../images/botanical-frame.webp");
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.invitation-paper::after,
.thank-you-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(250, 248, 240, .86) 5%, rgba(250, 248, 240, .56) 50%, transparent 74%);
}

.invitation-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: inherit;
    padding: clamp(154px, 19vw, 192px) clamp(42px, 12vw, 102px) 118px;
    text-align: center;
}

.hero {
    max-width: 500px;
}

.monogram {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 24px;
    color: var(--olive-800);
    border: 1px solid rgba(173, 140, 72, .65);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 1.45rem;
    line-height: 66px;
    letter-spacing: -.08em;
    box-shadow: 0 0 0 4px rgba(213, 191, 134, .12);
}

.monogram i {
    margin: 0 3px;
    color: var(--gold);
    font-family: var(--script);
    font-size: .95rem;
    font-style: normal;
}

.eyebrow,
.occasion,
.rsvp-kicker,
.dialog-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .18em;
}

.eyebrow {
    color: var(--olive-800);
    font-family: var(--serif);
    font-size: clamp(.75rem, 2.8vw, .9rem);
    font-weight: 600;
    line-height: 1.65;
}

.occasion {
    margin-top: 6px;
    color: var(--olive-700);
    font-family: var(--script);
    font-size: clamp(1.65rem, 7vw, 2.5rem);
    line-height: 1.2;
    text-transform: none;
    letter-spacing: .01em;
}

.reveal-announcement {
    position: relative;
    width: min(100%, 360px);
    margin: 24px auto 0;
    padding: 15px 24px 17px;
    overflow: hidden;
    background: rgba(251, 249, 243, .72);
    border: 1px solid rgba(173, 140, 72, .28);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(65, 72, 52, .08);
    backdrop-filter: blur(5px);
}

.reveal-announcement::before,
.reveal-announcement::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    filter: blur(18px);
    opacity: .33;
    transform: translateY(-50%);
}

.reveal-announcement::before {
    left: -16px;
    background: var(--baby-blue);
}

.reveal-announcement::after {
    right: -16px;
    background: var(--baby-pink);
}

.reveal-join,
.reveal-title,
.reveal-question {
    position: relative;
    z-index: 1;
    margin: 0;
}

.reveal-join {
    color: #656757;
    font-family: var(--serif);
    font-size: .78rem;
    letter-spacing: .04em;
}

.reveal-title {
    margin-top: 1px;
    color: var(--olive-800);
    font-family: var(--script);
    font-size: clamp(1.62rem, 6vw, 2.15rem);
    line-height: 1.1;
}

.reveal-question {
    margin-top: 5px;
    color: #66685b;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1.35;
}

.reveal-spark {
    position: absolute;
    z-index: 2;
    font-size: .72rem;
}

.reveal-spark-blue {
    top: 11px;
    left: 18px;
    color: var(--baby-blue);
}

.reveal-spark-pink {
    right: 18px;
    bottom: 12px;
    color: var(--baby-pink);
}

.names-block {
    width: 100%;
    margin-top: clamp(38px, 8vw, 62px);
}

.couple-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(3.25rem, 13.8vw, 6.4rem);
    font-weight: 400;
    line-height: .82;
    letter-spacing: -.045em;
}

.couple-names > span:not(.ampersand) {
    text-shadow: 0 2px 0 rgba(255,255,255,.5);
}

.couple-names .ampersand {
    z-index: 1;
    margin: 9px 0 5px;
    color: var(--gold);
    font-family: var(--script);
    font-size: .55em;
    line-height: 1;
}

.flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(230px, 75%);
    margin: 30px auto 0;
    color: var(--gold);
}

.flourish span {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-soft));
}

.flourish span:last-child {
    background: linear-gradient(to left, transparent, var(--gold-soft));
}

.flourish i {
    font-size: .62rem;
    font-style: normal;
}

.event-details {
    width: 100%;
    margin-top: 38px;
}

.event-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(1.1rem, 4.4vw, 1.45rem);
    font-weight: 600;
    letter-spacing: .035em;
}

.event-date svg,
.schedule-card > svg,
.venue > svg {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedule-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: min(100%, 430px);
    margin: 23px auto 0;
    padding: 21px 22px;
    background: rgba(250, 247, 237, .78);
    border: 1px solid rgba(173, 140, 72, .32);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(72, 77, 56, .08);
    backdrop-filter: blur(6px);
}

.schedule-card .time {
    margin: 0;
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    line-height: 1;
}

.lunch-note {
    max-width: 270px;
    margin: 7px 0 0;
    color: #4d503f;
    font-family: var(--serif);
    font-size: .96rem;
    font-style: italic;
    line-height: 1.35;
}

.venue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

.venue-name,
.venue-detail,
.venue address {
    margin: 0;
}

.venue-name {
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(1.1rem, 4.5vw, 1.45rem);
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.venue-detail {
    margin-top: 2px;
    color: var(--olive-700);
    font-family: var(--script);
    font-size: 1.45rem;
}

.venue address {
    margin-top: 6px;
    color: #595b4c;
    font-family: var(--sans);
    font-size: .85rem;
    font-style: normal;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    color: var(--olive-800);
    font-size: .83rem;
    font-weight: 700;
    text-underline-offset: 4px;
}

.text-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.rsvp-callout {
    width: min(100%, 460px);
    margin-top: 54px;
    padding: 31px clamp(20px, 6vw, 36px);
    background: rgba(251, 249, 242, .86);
    border: 1px solid rgba(173, 140, 72, .4);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(59, 65, 45, .12);
    backdrop-filter: blur(8px);
}

.rsvp-kicker,
.dialog-kicker {
    color: var(--gold);
    font-size: .68rem;
    font-weight: 800;
}

.rsvp-callout h2 {
    margin: 10px 0 9px;
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(1.55rem, 6vw, 2rem);
    font-weight: 500;
    line-height: 1.15;
}

.rsvp-callout > p:not(.rsvp-kicker) {
    margin: 0;
    color: #626353;
    font-size: .88rem;
    line-height: 1.55;
}

.rsvp-callout .cta-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 13px;
    color: var(--olive-800);
    font-size: .72rem;
    font-weight: 800;
}

.cta-hint span {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: var(--baby-blue);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(93, 145, 201, .12);
}

.cta-hint span:last-child {
    background: var(--baby-pink);
    box-shadow: 0 0 0 3px rgba(211, 127, 158, .12);
}

.primary-button,
.secondary-button,
.floating-rsvp {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    margin-top: 23px;
    padding: 14px 23px 14px 27px;
    color: #fff;
    background: var(--olive-800);
    box-shadow: 0 12px 24px rgba(56, 64, 44, .25);
}

.attention-button {
    width: 100%;
    min-height: 66px;
    padding: 13px 24px 13px 28px;
    border: 2px solid rgba(255, 255, 255, .65);
    box-shadow:
        0 14px 28px rgba(56, 64, 44, .28),
        0 0 0 4px rgba(93, 145, 201, .11),
        0 0 0 8px rgba(211, 127, 158, .08);
}

.button-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.08;
    text-align: left;
}

.button-copy strong {
    font-size: 1.02rem;
    letter-spacing: .015em;
}

.button-copy small {
    margin-top: 5px;
    color: rgba(255, 255, 255, .76);
    font-size: .68rem;
    font-weight: 600;
}

.primary-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.primary-button:hover:not(:disabled),
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(56, 64, 44, .3);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.invitation-footer {
    margin-top: 62px;
    color: var(--olive-800);
}

.small-heart {
    color: var(--gold);
    font-size: .7rem;
}

.invitation-footer p {
    max-width: 330px;
    margin: 8px auto 0;
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.5;
}

.invitation-footer .signature {
    margin-top: 9px;
    font-family: var(--script);
    font-size: 1.45rem;
}

.floating-rsvp {
    position: fixed;
    z-index: 50;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    display: none;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 12px 19px;
    color: #fff;
    background: var(--olive-800);
    box-shadow: 0 12px 30px rgba(34, 39, 27, .32);
}

.floating-rsvp::before {
    content: "";
    position: absolute;
    inset: -5px;
    pointer-events: none;
    border: 2px solid rgba(93, 145, 201, .42);
    border-radius: inherit;
    box-shadow: 0 0 0 3px rgba(211, 127, 158, .22);
}

.floating-rsvp svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.floating-rsvp.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.rsvp-dialog {
    width: min(680px, calc(100% - 32px));
    max-width: none;
    max-height: min(900px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--paper);
    border: 0;
    border-radius: 28px;
    box-shadow: 0 32px 100px rgba(26, 29, 21, .32);
}

.rsvp-dialog::backdrop {
    background: rgba(35, 39, 29, .64);
    backdrop-filter: blur(5px);
}

.rsvp-dialog[open] {
    animation: dialog-in .28s ease-out both;
}

.dialog-panel {
    max-height: inherit;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dialog-header {
    position: sticky;
    z-index: 3;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 29px 32px 22px;
    background: rgba(251, 248, 240, .94);
    border-bottom: 1px solid rgba(89, 99, 71, .12);
    backdrop-filter: blur(12px);
}

.dialog-header h2,
.success-panel h2 {
    margin: 7px 0 4px;
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(1.75rem, 6vw, 2.4rem);
    font-weight: 500;
    line-height: 1.05;
}

.dialog-header p:last-child {
    margin: 6px 0 0;
    color: #68695a;
    font-size: .87rem;
}

.dialog-close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    color: var(--olive-800);
    background: rgba(89, 99, 71, .08);
    border: 1px solid rgba(89, 99, 71, .14);
    border-radius: 50%;
}

.dialog-close svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.rsvp-form {
    display: grid;
    gap: 25px;
    padding: 27px 32px max(34px, env(safe-area-inset-bottom));
}

.rsvp-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.rsvp-form legend,
.field > span {
    display: block;
    margin-bottom: 9px;
    color: var(--olive-900);
    font-size: .84rem;
    font-weight: 800;
}

.field > span small {
    color: #797a6a;
    font-weight: 500;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 13px;
    cursor: pointer;
    background: #fffdf7;
    border: 1px solid #dcd9ce;
    border-radius: 14px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.choice-card:has(input:checked),
.choice-card.is-selected {
    background: #f2f4e9;
    border-color: var(--olive-500);
    box-shadow: 0 0 0 2px rgba(123, 132, 100, .13);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card:has(input:focus-visible),
.choice-card.is-focused {
    outline: 3px solid rgba(173, 140, 72, .38);
    outline-offset: 2px;
}

.choice-icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--olive-800);
    background: rgba(89, 99, 71, .1);
    border-radius: 50%;
    font-size: 1.05rem;
    font-weight: 800;
}

.choice-card strong,
.choice-card small {
    display: block;
}

.reveal-guess-fieldset {
    padding: 20px !important;
    overflow: hidden;
    background:
        radial-gradient(circle at 0 40%, rgba(93, 145, 201, .13), transparent 38%),
        radial-gradient(circle at 100% 60%, rgba(211, 127, 158, .13), transparent 38%),
        #fffdf8;
    border: 1px solid rgba(173, 140, 72, .25) !important;
    border-radius: 16px;
}

.fieldset-intro {
    margin: -1px 0 14px;
    color: #707266;
    font-size: .73rem;
    line-height: 1.45;
}

.guess-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.guess-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 72px;
    padding: 12px 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, .82);
    border: 1px solid #dcd9ce;
    border-radius: 14px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.guess-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.guess-card:has(input:focus-visible),
.guess-card.is-focused {
    outline: 3px solid rgba(173, 140, 72, .35);
    outline-offset: 2px;
}

.guess-boy:has(input:checked),
.guess-boy.is-selected {
    background: var(--baby-blue-soft);
    border-color: var(--baby-blue);
    box-shadow: 0 0 0 3px rgba(93, 145, 201, .14);
    transform: translateY(-2px);
}

.guess-girl:has(input:checked),
.guess-girl.is-selected {
    background: var(--baby-pink-soft);
    border-color: var(--baby-pink);
    box-shadow: 0 0 0 3px rgba(211, 127, 158, .14);
    transform: translateY(-2px);
}

.guess-heart {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    font-size: .82rem;
}

.guess-boy .guess-heart {
    color: #fff;
    background: var(--baby-blue);
}

.guess-girl .guess-heart {
    color: #fff;
    background: var(--baby-pink);
}

.guess-card strong,
.guess-card small {
    display: block;
}

.guess-card strong {
    color: var(--ink);
    font-size: .86rem;
}

.guess-card small {
    margin-top: 3px;
    color: #747568;
    font-size: .67rem;
}

.choice-card strong {
    color: var(--ink);
    font-size: .79rem;
    line-height: 1.25;
}

.choice-card small {
    margin-top: 3px;
    color: #727466;
    font-size: .67rem;
    line-height: 1.25;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.field {
    display: block;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 49px;
    padding: 12px 13px;
    color: var(--ink);
    background: #fffdf8;
    border: 1px solid #d6d4c9;
    border-radius: 11px;
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.field textarea {
    min-height: 86px;
    resize: vertical;
    line-height: 1.45;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9a9a8d;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--olive-500);
    box-shadow: 0 0 0 3px rgba(123, 132, 100, .14);
}

.attending-only {
    display: grid;
    gap: 20px;
    padding: 21px;
    background: rgba(218, 222, 202, .25);
    border: 1px solid rgba(123, 132, 100, .2);
    border-radius: 16px;
}

.attending-only.is-hidden {
    display: none;
}

.companion-fields {
    display: grid;
    gap: 12px;
}

.companion-entry {
    animation: field-in .2s ease-out both;
}

.honeypot {
    position: fixed !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.privacy-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 0;
    color: #77786b;
    font-size: .75rem;
    line-height: 1.4;
}

.privacy-note svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--olive-500);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-message {
    display: none;
    margin: -4px 0;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: .82rem;
    line-height: 1.45;
}

.form-message.is-error {
    display: block;
    color: #73342f;
    background: #faeae7;
    border: 1px solid #ebc8c2;
}

.submit-button {
    width: 100%;
    margin-top: 0;
}

.submit-button.is-loading {
    cursor: wait;
}

.submit-button.is-loading svg {
    animation: loading 1s linear infinite;
}

.success-panel {
    position: relative;
    min-height: 500px;
    padding: 70px 40px;
    text-align: center;
}

.reveal-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.reveal-confetti i {
    position: absolute;
    top: -20px;
    left: calc(7% * var(--confetti-index, 1));
    width: 8px;
    height: 14px;
    background: var(--baby-blue);
    border-radius: 2px;
    opacity: 0;
}

.reveal-confetti i:nth-child(even) {
    background: var(--baby-pink);
}

.reveal-confetti i:nth-child(1) { --confetti-index: 1; --confetti-delay: .05s; }
.reveal-confetti i:nth-child(2) { --confetti-index: 2; --confetti-delay: .25s; }
.reveal-confetti i:nth-child(3) { --confetti-index: 3; --confetti-delay: .12s; }
.reveal-confetti i:nth-child(4) { --confetti-index: 4; --confetti-delay: .38s; }
.reveal-confetti i:nth-child(5) { --confetti-index: 5; --confetti-delay: .18s; }
.reveal-confetti i:nth-child(6) { --confetti-index: 6; --confetti-delay: .32s; }
.reveal-confetti i:nth-child(7) { --confetti-index: 7; --confetti-delay: .08s; }
.reveal-confetti i:nth-child(8) { --confetti-index: 8; --confetti-delay: .28s; }
.reveal-confetti i:nth-child(9) { --confetti-index: 9; --confetti-delay: .16s; }
.reveal-confetti i:nth-child(10) { --confetti-index: 10; --confetti-delay: .42s; }
.reveal-confetti i:nth-child(11) { --confetti-index: 11; --confetti-delay: .22s; }
.reveal-confetti i:nth-child(12) { --confetti-index: 12; --confetti-delay: .1s; }
.reveal-confetti i:nth-child(13) { --confetti-index: 13; --confetti-delay: .35s; }
.reveal-confetti i:nth-child(14) { --confetti-index: 14; --confetti-delay: .2s; }

.success-mark {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 0 auto 28px;
    place-items: center;
    color: #fff;
    background: var(--olive-700);
    border-radius: 50%;
    box-shadow: 0 14px 28px rgba(89, 99, 71, .24), 0 0 0 8px rgba(123, 132, 100, .1);
}

.success-mark svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-panel > p:not(.dialog-kicker) {
    max-width: 410px;
    margin: 13px auto 0;
    color: #68695a;
    line-height: 1.6;
}

.secondary-button {
    min-height: 48px;
    margin-top: 30px;
    padding: 12px 21px;
    color: var(--olive-900);
    background: transparent;
    border: 1px solid rgba(89, 99, 71, .42);
}

.thank-you-page {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 24px;
}

.thank-you-card {
    display: grid;
    min-height: min(820px, calc(100svh - 48px));
    place-items: center;
}

.thank-you-content {
    width: min(100% - 72px, 450px);
    padding: 40px 0;
    text-align: center;
}

.thank-you-content h1 {
    margin: 12px 0;
    color: var(--olive-900);
    font-family: var(--serif);
    font-size: clamp(2.2rem, 9vw, 3.5rem);
    font-weight: 500;
    line-height: 1.05;
}

.thank-you-content > p:not(.dialog-kicker) {
    margin: 0;
    color: #656757;
    line-height: 1.65;
}

.thank-you-content .primary-button {
    margin-top: 28px;
}

.success-mark.is-error {
    background: var(--error);
    font-family: var(--serif);
    font-size: 2rem;
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes field-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: none; }
}

@keyframes loading {
    to { transform: rotate(360deg); }
}

@keyframes reveal-color-breathe {
    0%, 100% { opacity: .2; transform: translateY(-50%) scale(.86); }
    50% { opacity: .5; transform: translateY(-50%) scale(1.16); }
}

@keyframes sparkle-float {
    0%, 100% { opacity: .45; transform: translateY(2px) rotate(0); }
    50% { opacity: 1; transform: translateY(-4px) rotate(20deg); }
}

@keyframes cta-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 16px 32px rgba(56, 64, 44, .34), 0 0 0 5px rgba(93, 145, 201, .14), 0 0 0 10px rgba(211, 127, 158, .1);
    }
    50% {
        transform: scale(1.035);
        box-shadow: 0 21px 42px rgba(56, 64, 44, .4), 0 0 0 9px rgba(93, 145, 201, .2), 0 0 0 15px rgba(211, 127, 158, .14);
    }
}

@keyframes floating-ring {
    0%, 100% { opacity: .55; transform: scale(.98); }
    50% { opacity: 1; transform: scale(1.06); }
}

@keyframes confetti-fall {
    0% { opacity: 0; transform: translate3d(0, -10px, 0) rotate(0); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(24px, 440px, 0) rotate(540deg); }
}

@media (max-width: 700px) {
    html,
    body {
        background: var(--ivory);
    }

    .setup-banner {
        align-items: flex-start;
        justify-content: space-between;
        text-align: left;
    }

    html.js body.home-page {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100vh;
        height: 100svh;
        min-height: 0;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .home-page .invitation {
        flex: 1 1 auto;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 0;
        overflow: hidden;
    }

    .home-page .invitation-paper {
        width: 100%;
        height: 100%;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .home-page .paper-art {
        background-position: center;
        background-size: cover;
    }

    .home-page .invitation-content {
        display: grid;
        grid-auto-rows: auto;
        align-content: space-around;
        justify-items: center;
        row-gap: 0;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: max(14px, env(safe-area-inset-top)) clamp(22px, 7vw, 32px) max(14px, env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .home-page .hero {
        width: 100%;
        max-width: 360px;
    }

    .home-page .monogram {
        width: 50px;
        height: 50px;
        margin: 0 auto 8px;
        font-size: 1.14rem;
        line-height: 48px;
    }

    .home-page .monogram i {
        font-size: .78rem;
    }

    .home-page .eyebrow {
        max-width: 345px;
        margin-inline: auto;
        font-size: .82rem;
        line-height: 1.32;
        letter-spacing: .12em;
    }

    .home-page .occasion {
        margin-top: 2px;
        font-size: 1.5rem;
        line-height: 1;
    }

    .home-page .reveal-announcement {
        width: min(100%, 340px);
        margin: 8px auto 0;
        padding: 9px 18px 10px;
        border-radius: 16px;
        -webkit-backdrop-filter: blur(5px);
    }

    .home-page .reveal-join {
        font-size: .84rem;
        line-height: 1.25;
    }

    .home-page .reveal-title {
        margin-top: 0;
        font-size: 1.55rem;
        line-height: 1;
    }

    .home-page .reveal-question {
        margin-top: 2px;
        font-size: .7rem;
        line-height: 1.2;
    }

    .home-page .reveal-spark-blue {
        top: 6px;
        left: 11px;
    }

    .home-page .reveal-spark-pink {
        right: 11px;
        bottom: 7px;
    }

    .home-page .names-block {
        margin: 0;
    }

    .home-page .couple-names {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: .16em;
        font-size: clamp(2.55rem, 10.8vw, 3.15rem);
        line-height: 1;
        white-space: nowrap;
    }

    .home-page .couple-names .ampersand {
        margin: 0;
        font-size: .5em;
        line-height: 1;
    }

    .home-page .flourish {
        width: 170px;
        margin: 6px auto 0;
    }

    .home-page .event-details {
        width: 100%;
        margin: 0;
    }

    .home-page .event-date {
        gap: 6px;
        font-size: 1.02rem;
        line-height: 1.2;
    }

    .home-page .event-date svg,
    .home-page .schedule-card > svg,
    .home-page .venue > svg {
        width: 20px;
        height: 20px;
    }

    .home-page .schedule-card {
        width: auto;
        margin: 4px auto 0;
        padding: 0;
        gap: 6px;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .home-page .schedule-card > div {
        display: flex;
        align-items: baseline;
        gap: 7px;
    }

    .home-page .schedule-card .time {
        font-size: 1rem;
        font-weight: 700;
    }

    .home-page .lunch-note {
        max-width: none;
        margin: 0;
        font-size: .82rem;
        line-height: 1.25;
    }

    .home-page .venue {
        gap: 6px;
        margin: 0;
    }

    .home-page .venue > div {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: center;
        gap: 0 6px;
    }

    .home-page .venue-name {
        font-size: .92rem;
        line-height: 1.15;
        letter-spacing: .055em;
    }

    .home-page .venue-detail {
        margin: 0;
        font-size: 1.35rem;
        line-height: 1;
    }

    .home-page .venue address {
        width: 100%;
        margin-top: 1px;
        font-size: .72rem;
    }

    .home-page .map-link {
        margin: 0;
        font-size: .72rem;
    }

    .home-page .rsvp-callout {
        width: min(100%, 370px);
        margin: 0;
        padding: 14px 15px 15px;
        border-radius: 16px;
        -webkit-backdrop-filter: blur(8px);
    }

    .home-page .rsvp-kicker {
        font-size: .62rem;
    }

    .home-page .rsvp-callout h2 {
        margin: 0;
        font-size: 1.18rem;
        line-height: 1.08;
    }

    .home-page .rsvp-callout > p:not(.rsvp-kicker) {
        font-size: .72rem;
        line-height: 1.25;
    }

    .home-page .rsvp-callout .cta-hint {
        display: none;
    }

    .home-page .attention-button {
        min-height: 64px;
        margin-top: 11px;
        padding: 11px 19px 11px 23px;
        background: linear-gradient(135deg, var(--olive-900), #4d5b40);
        border-width: 3px;
    }

    .home-page .button-copy {
        font-size: 1.12rem;
    }

    .home-page .button-copy strong {
        font-size: inherit;
    }

    .home-page .button-copy small {
        margin-top: 3px;
        font-size: .76rem;
    }

    .home-page .invitation-footer {
        margin: 0;
    }

    .home-page .invitation-footer p {
        margin-top: 2px;
        font-size: .75rem;
        line-height: 1.2;
    }

    .home-page .invitation-footer .signature {
        margin-top: 3px;
        font-size: 1rem;
    }

    .home-page .floating-rsvp {
        display: none !important;
    }

    .home-page .attention-button:focus-visible {
        outline: 3px solid var(--gold);
        outline-offset: 3px;
    }

    .thank-you-card {
        min-height: 100vh;
        min-height: 100svh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .rsvp-dialog {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border-radius: 0;
    }

    .dialog-panel {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dialog-header {
        padding: max(20px, env(safe-area-inset-top)) 20px 18px;
        -webkit-backdrop-filter: blur(12px);
    }

    .rsvp-form {
        padding: 24px 20px max(32px, calc(env(safe-area-inset-bottom) + 20px));
    }

    .choice-grid,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .guess-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .guess-card {
        min-width: 0;
        padding-inline: 11px;
    }

    .guess-card > span:last-child {
        min-width: 0;
    }

    .field input,
    .field select,
    .field textarea {
        font-size: 16px;
    }

    .choice-card {
        min-height: 68px;
    }

    .success-panel {
        min-height: calc(100dvh - 108px);
        padding: 72px 28px;
    }

    .thank-you-page {
        padding: 0;
    }
}

@media (max-width: 700px) and (max-height: 720px) and (orientation: portrait) {
    .home-page .invitation-content {
        row-gap: 0;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .home-page .monogram,
    .home-page .flourish {
        display: none;
    }

    .home-page .reveal-announcement {
        margin-top: 4px;
        padding-block: 7px 8px;
    }

    .home-page .rsvp-callout {
        padding: 11px 12px 12px;
    }

    .home-page .attention-button {
        margin-top: 7px;
    }
}

@media (max-width: 700px) and (min-height: 861px) and (max-height: 960px) and (orientation: portrait) {
    .home-page .invitation-content {
        row-gap: 0;
        padding-top: max(26px, env(safe-area-inset-top));
        padding-bottom: max(26px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 360px) {
    .invitation-content {
        padding-inline: 26px;
    }

    .schedule-card {
        align-items: flex-start;
        padding: 18px 16px;
    }

    .rsvp-callout {
        padding-inline: 18px;
    }

    .floating-rsvp span {
        font-size: .82rem;
    }

    .guess-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .js .reveal-item {
        animation: reveal-up .7s cubic-bezier(.2,.7,.2,1) both;
    }

    .js .names-block { animation-delay: .08s; }
    .js .event-details { animation-delay: .14s; }
    .js .venue { animation-delay: .2s; }
    .js .rsvp-callout { animation-delay: .26s; }
    .js .invitation-footer { animation-delay: .32s; }

    .reveal-announcement::before,
    .reveal-announcement::after {
        animation: reveal-color-breathe 3.2s ease-in-out infinite;
    }

    .reveal-announcement::after {
        animation-delay: -1.6s;
    }

    .reveal-spark {
        animation: sparkle-float 2.4s ease-in-out infinite;
    }

    .reveal-spark-pink {
        animation-delay: -1.2s;
    }

    .attention-button {
        animation: cta-pulse 2.25s ease-in-out infinite;
    }

    .floating-rsvp::before {
        animation: floating-ring 2s ease-in-out infinite;
    }

    .success-panel:not([hidden]) .reveal-confetti i {
        animation: confetti-fall 2.1s cubic-bezier(.2,.65,.35,1) var(--confetti-delay) both;
    }

    @keyframes reveal-up {
        from { opacity: 0; transform: translateY(12px); }
        to { opacity: 1; transform: none; }
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
