:root {
    color-scheme: light;
    --ink: #202c36;
    --muted: #63716e;
    --line: #e1e6df;
    --paper: #fffefa;
    --cream: #f4f1e9;
    --green: #315c4c;
    --lime: #d9ebbb;
    --rose: #9a5d5b;
    --shadow: 0 18px 50px #23372912;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--green); text-underline-offset: 3px; }

main {
    width: min(980px, calc(100% - 32px));
    margin: 32px auto 72px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

header a { text-decoration: none; font-weight: 750; }
.brand { color: var(--green); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }

.card {
    margin-bottom: 18px;
    padding: clamp(20px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.narrow { max-width: 580px; margin: 8vh auto; }
.eyebrow { color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 500 clamp(2.3rem, 7vw, 4.7rem)/1.05 Georgia, serif; letter-spacing: -.04em; }
h2 { font: 500 clamp(1.65rem, 4vw, 2.2rem)/1.2 Georgia, serif; }
h3 { margin-bottom: 8px; font-size: 1.02rem; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 4px 11px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: .84rem; }

label { display: block; margin: 14px 0 5px; font-weight: 700; }
input, textarea, select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd3cb;
    border-radius: 9px;
    background: white;
    color: var(--ink);
    font: inherit;
}
textarea { resize: vertical; }
input[type="radio"], input[type="checkbox"] { width: auto; }
.btn, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 0;
    border-radius: 30px;
    background: var(--green);
    color: white;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.btn.secondary, button.secondary { border: 1px solid var(--green); background: transparent; color: var(--green); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.flash { margin: 12px 0; padding: 12px 16px; border-radius: 10px; background: #e6f1dd; }
.flash.error { background: #f7e6e3; }
.linkbox { overflow-wrap: anywhere; padding: 12px; border-radius: 9px; background: #f2f5ef; font-family: ui-monospace, monospace; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.status { font-weight: 750; }
.status.revoked { color: var(--rose); }
.fine { color: var(--muted); font-size: .88rem; }
.rsvp-options { display: flex; gap: 16px; flex-wrap: wrap; margin: 14px 0; }
.rsvp-options label { display: flex; align-items: center; gap: 7px; margin: 0; }
.rsvp-options input { width: auto; }
.safe-note { padding-left: 14px; border-left: 3px solid var(--lime); color: var(--muted); }
.form-errors, .errors { color: var(--rose); }
.invitation-request-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.invitation-request button { margin-top: 8px; }

.public-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 430px;
    overflow: hidden;
    margin-bottom: 36px;
    padding: clamp(22px, 4vw, 38px);
    border-radius: 24px;
    background: #263d33;
}
.public-hero::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(20, 34, 28, .76) 0%, rgba(20, 34, 28, .58) 38%, rgba(20, 34, 28, .18) 54%, transparent 70%); content: ''; }
.hero-copy { position: relative; z-index: 2; max-width: 560px; padding: 8px 0 8px 8px; }
.hero-copy h1 { max-width: 540px; color: #fffefa; text-shadow: 0 2px 18px #17251f66; }
.hero-lede { max-width: 520px; color: #f3f2e9; font-size: 1.12rem; }
.hero-copy .safe-note { max-width: 540px; }
.hero-copy .safe-note { color: #f3f2e9; }
.keep-quiet { display: inline-block; margin-top: 10px; padding: 7px 12px; border-radius: 30px; background: #f7f3e7e8; color: #34483e; font-size: .92rem; }
.hero-photo { position: absolute; z-index: 0; inset: 0; margin: 0; overflow: hidden; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 68% 46%; }
.guest-steps { margin: 0 0 38px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.step-card { min-height: 170px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf5; }
.step-card h3 { margin: 18px 0 7px; color: #315c4c; }
.step-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.step-number { color: #9a5d5b; font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.hero-stamp { position: relative; display: grid; width: 104px; height: 104px; place-items: center; margin-top: 22px; transform: rotate(8deg); border: 1px solid #fff9; border-radius: 50%; color: #fffefa; text-align: center; text-transform: uppercase; letter-spacing: .16em; text-shadow: 0 2px 12px #17251f99; }
.hero-heart span { color: #f08a83; font: 400 3.8rem/1 ui-sans-serif, system-ui, sans-serif; filter: drop-shadow(0 4px 10px #170e0e66); animation: heartbeat 1.2s ease-in-out infinite; transform-origin: center; }
.photo-section { margin: 0 0 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { max-width: 260px; margin-bottom: 4px; }
.photo-wall { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: center; gap: 18px; }
.photo-card { margin: 0; padding: 10px 10px 16px; transform: rotate(-2deg); background: var(--paper); box-shadow: var(--shadow); }
.photo-card--2 { z-index: 1; transform: rotate(2deg) translateY(-8px); }
.photo-card--3 { transform: rotate(-1deg); }
.photo-card img, .photo-placeholder { display: grid; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; place-items: center; }
.photo-placeholder { position: relative; overflow: hidden; background: linear-gradient(145deg, #d9e3d4, #f0e4d1 55%, #dfc7bb); color: #38564a; text-align: center; }
.photo-card--2 .photo-placeholder { background: linear-gradient(145deg, #e9d7c7, #f4e9da 55%, #c8d9ce); }
.photo-card--3 .photo-placeholder { background: linear-gradient(145deg, #d9e3d4, #d8d8c6 55%, #e7d0c1); }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.16); } 28% { transform: scale(.98); } 42% { transform: scale(1.12); } 70% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-heart span { animation: none; } }
.photo-placeholder > span:last-child { font: 500 1.08rem Georgia, serif; }
.photo-placeholder small { display: block; margin-top: 7px; font: 500 .74rem/1.4 ui-sans-serif, system-ui, sans-serif; color: #61736a; }
.placeholder-sparkle { position: absolute; top: 10%; right: 12%; color: #fff8df; font-size: 2rem; }
.photo-card figcaption { padding: 13px 5px 0; color: #59675e; font: italic 1rem Georgia, serif; text-align: center; }
.public-note { display: flex; align-items: start; gap: 16px; margin: 20px 0 34px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 16px; background: #fffefa9c; }
.public-note p:last-child { max-width: 720px; margin-bottom: 0; color: #4e5d54; }
.note-mark { color: #bb795e; font-size: 1.6rem; }
.public-footer { padding: 22px 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* Private guest invitation */
main:has(.guest-page) { width: min(1920px, calc(100% - 56px)); margin-top: 22px; }
.guest-page { display: grid; grid-template-columns: minmax(260px, 300px) minmax(0, 980px) minmax(320px, 365px); align-items: start; justify-content: space-between; gap: clamp(32px, 3vw, 56px); }
.guest-mobile-nav { display: none; }
.guest-event-card, .guest-wall, #guest-rsvp, #guest-contributions, #guest-album, #guest-discussion, #guest-tribute, #guest-private-note { scroll-margin-top: 82px; }
.guest-wall { position: sticky; top: 22px; display: flex; flex-direction: column; align-items: center; gap: 17px; padding: 20px 18px 18px; border: 1px solid #e2ddcf; border-radius: 20px; background: #eee9dd; box-shadow: inset 0 0 35px #78694b0a; }
.guest-wall-heading { align-self: stretch; padding: 2px 5px 0; text-align: center; }
.guest-wall-heading .eyebrow { margin-bottom: 7px; font-size: .67rem; }
.guest-wall-heading > p:last-child { margin-bottom: 0; color: #657269; font: italic 1.08rem Georgia, serif; }
.guest-photo { position: relative; width: min(100%, 290px); margin: 0; padding: 9px 9px 13px; background: #fffefa; box-shadow: 0 8px 20px #25332618; }
.guest-photo img { display: block; width: 100%; height: 180px; object-fit: cover; }
.guest-photo--portrait { transform: rotate(-2deg); }
.guest-photo--portrait img { height: 220px; object-position: 45% 39%; }
.guest-photo--stone { width: min(86%, 250px); margin-top: -5px; transform: rotate(2.4deg); }
.guest-photo--stone img { height: 155px; object-position: 50% 38%; }
.guest-photo--smile { width: min(90%, 260px); margin-top: -4px; transform: rotate(-1.4deg); }
.guest-photo--smile img { height: 165px; object-position: 66% 42%; }
.guest-photo figcaption { padding: 9px 4px 0; color: #667167; font: italic .9rem Georgia, serif; text-align: center; }
.guest-photo--upload { width: min(100%, 290px); }
.guest-photo--upload-1 { width: min(90%, 270px); transform: rotate(1.5deg); }
.guest-photo--upload-2 { width: min(86%, 260px); transform: rotate(-1.8deg); }
.guest-photo--upload figcaption { font-size: .82rem; }
.guest-photo--upload-1 .guest-photo-pin { background: #bc8b58; }
.guest-photo--upload-2 .guest-photo-pin { background: #789384; }
.guest-memory-form { position: relative; }
.guest-memory-canvas { display: grid; width: 100%; aspect-ratio: 4 / 3; place-items: center; margin: 0; overflow: hidden; border: 1px solid #e7e4d9; background: linear-gradient(145deg, #e5ebdf, #f4e9da 58%, #ead5cc); color: #536a5c; cursor: pointer; }
.guest-memory-canvas img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guest-memory-plus { display: grid; width: 40px; height: 40px; place-items: center; border: 1px dashed #829888; border-radius: 50%; font-size: 1.45rem; }
.guest-memory-prompt { padding: 8px 10px 0; color: #657269; font: italic .92rem Georgia, serif; text-align: center; }
.guest-memory-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.guest-memory-input:focus-visible + .guest-memory-canvas { outline: 3px solid #91ad91; outline-offset: 3px; }
.guest-memory-pin-button { position: absolute; z-index: 2; top: -19px; left: calc(50% + 14px); width: 29px; height: 29px; padding: 0; border: 2px solid #fffefa; border-radius: 50%; background: #315c4c; box-shadow: 0 2px 5px #242b2440; font-size: 1.05rem; line-height: 1; }
.guest-memory-pin-button:hover { background: #244738; }
.album-consent { display: flex; align-items: flex-start; gap: 5px; margin: 8px 1px 0; color: #68756c; font-size: .67rem; line-height: 1.35; cursor: pointer; }
.album-consent input { width: 13px; height: 13px; flex: 0 0 13px; margin: 1px 0 0; accent-color: var(--green); }
.guest-photo-pin { position: absolute; z-index: 1; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; border: 2px solid #fffefa; border-radius: 50%; background: #ad7360; box-shadow: 0 2px 5px #242b2440; }
.guest-photo--stone .guest-photo-pin { background: #6b8a78; }
.guest-photo--smile .guest-photo-pin { background: #c2a058; }
.guest-wall-signoff { margin: 0; color: #52675b; font: italic 1rem Georgia, serif; }
.guest-wall-signoff span { padding-right: 5px; color: #bd736b; }
.guest-content { min-width: 0; }
.guest-tools { position: sticky; top: 18px; display: grid; max-height: calc(100vh - 36px); align-content: start; gap: 14px; overflow-y: auto; padding: 2px 4px 8px 0; scrollbar-color: #c6cec3 transparent; scrollbar-width: thin; }
.guest-tools > .card { margin: 0; }
.guest-tools .guest-form-card, .guest-tools .guest-discussion-card { padding: 20px; }
.guest-tools h2 { font-size: clamp(1.45rem, 2vw, 1.8rem); }
.guest-tools .rsvp-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.guest-tools .rsvp-choice { min-width: 0; }
.guest-tools .rsvp-choice span { padding: 8px; font-size: .8rem; }
.guest-tools .discussion-feed { max-height: min(34vh, 330px); margin: 12px 0; }
.guest-tools .discussion-post { padding: 10px 11px; }
.guest-tools .discussion-post-header { flex-wrap: wrap; gap: 5px 7px; }
.guest-tools .discussion-post-header time { font-size: .7rem; }
.guest-tools .discussion-post-body { font-size: .9rem; line-height: 1.45; }
.guest-tools .discussion-composer { padding: 12px; }
.guest-tools .discussion-composer textarea { min-height: 72px; }
.guest-tools .discussion-composer button { width: 100%; justify-content: center; }
.guest-tools .discussion-refresh-note { margin-bottom: 0; }
.guest-quick-note { padding: 0; overflow: hidden; }
.guest-quick-note summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; }
.guest-quick-note summary::-webkit-details-marker { display: none; }
.guest-quick-note summary > span:first-child { display: grid; }
.guest-quick-note summary strong { color: #31473b; font-size: .9rem; }
.guest-quick-note summary small { color: var(--muted); font-size: .76rem; }
.quick-note-plus { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); transition: transform .16s ease; }
.guest-quick-note[open] .quick-note-plus { transform: rotate(45deg); }
.guest-quick-note > p, .guest-quick-note > form { margin-right: 18px; margin-left: 18px; }
.guest-quick-note > p { margin-bottom: 12px; font-size: .84rem; }
.guest-quick-note > form { margin-bottom: 18px; }
.guest-event-card { padding: clamp(24px, 4vw, 42px); border-radius: 22px; }
.guest-event-card .eyebrow { margin-bottom: 14px; }
.guest-event-card h1 { margin-bottom: 13px; font-size: clamp(2.5rem, 5.8vw, 4rem); }
.guest-description { max-width: 590px; margin-bottom: 26px; color: var(--muted); font-size: 1.05rem; }
.guest-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guest-detail { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfaf5; }
.detail-icon { display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; border-radius: 50%; background: #edf2e8; color: var(--green); font-size: 1.2rem; }
.guest-detail p { margin: 0; overflow-wrap: anywhere; }
.guest-detail .detail-label { margin-bottom: 3px; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.map-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: .86rem; font-weight: 750; text-decoration: none; }
.map-link:hover { text-decoration: underline; }
.guest-map-wrap { overflow: hidden; margin-top: 17px; border: 1px solid var(--line); border-radius: 15px; background: #f4f1e9; box-shadow: 0 7px 18px #23372910; }
.guest-map { display: block; width: 100%; height: 235px; border: 0; }
.event-date { margin: 0 0 7px !important; }
.event-time-range { display: flex; flex-wrap: wrap; gap: 8px 14px; color: #59675e; font-size: .83rem; }
.event-time-range > span { display: inline-flex; align-items: baseline; gap: 5px; }
.event-time-range strong { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.event-time-range em { color: #9a5d5b; font: italic 700 1rem Georgia, serif; }
.guest-practical { margin: 17px 0 0; padding: 12px 15px; border-radius: 0 10px 10px 0; background: #f8f6ef; }
.guest-form-card { padding: clamp(22px, 3.3vw, 32px); }
.guest-form-card .eyebrow { margin-bottom: 7px; font-size: .69rem; }
.guest-form-card h2 { margin-bottom: 5px; }
.guest-form-card .muted { margin-bottom: 17px; }
.rsvp-options { gap: 9px; }
.rsvp-choice { position: relative; flex: 1 1 155px; min-height: 48px; }
.rsvp-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rsvp-choice span { display: flex; height: 100%; min-height: 48px; align-items: center; justify-content: center; padding: 9px 12px; border: 1px solid #d9dfd5; border-radius: 12px; background: #fff; color: #45534b; font-size: .9rem; font-weight: 650; text-align: center; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.rsvp-choice input:checked + span { border-color: var(--green); background: #edf3e9; color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.rsvp-choice input:focus-visible + span { outline: 3px solid #91ad91; outline-offset: 2px; }
.guest-form-card button { gap: 10px; }
.guest-form-card button span { font-size: 1.2rem; line-height: 1; }
.guest-discussion-card h2 { margin-bottom: 6px; }
.discussion-filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.discussion-filter-tab { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #45534b; font-size: .82rem; font-weight: 700; cursor: pointer; }
.discussion-filter-tab[aria-pressed="true"] { border-color: var(--green); background: #edf3e9; color: var(--green); }
.discussion-filter-tab span { display: inline-grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 50%; background: #e9eee4; font-size: .74rem; }
.discussion-post[hidden], .discussion-filter-empty[hidden] { display: none; }
.discussion-feed { display: flex; max-height: 540px; flex-direction: column; gap: 10px; overflow-y: auto; margin: 18px 0 22px; padding: 3px 5px 3px 1px; }
.discussion-post { padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfaf5; }
.discussion-post--idea { border-left: 4px solid #b28b54; background: #fcf8ef; }
.discussion-post-header { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.discussion-post-header strong { color: #31473b; font-size: .9rem; }
.discussion-post-header time { margin-left: auto; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.discussion-kind-pill { padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: .69rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.discussion-post--idea .discussion-kind-pill { border-color: #ead9b8; background: #f7edda; color: #806333; }
.discussion-post-body { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.discussion-vote-form { margin-top: 11px; }
.discussion-vote-button { gap: 9px; padding: 7px 12px; font-size: .83rem; }
.discussion-vote-button span { display: inline-grid; min-width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #ffffff35; font-size: .76rem; }
.discussion-vote-button.is-voted { background: #a06e36; }
.discussion-empty { margin: 0; padding: 22px; border: 1px dashed #d5dbd0; border-radius: 13px; color: var(--muted); font: italic 1rem Georgia, serif; text-align: center; }
.discussion-composer { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf5; }
.discussion-kind-options { margin-bottom: 13px; }
.discussion-kind-options > label { margin: 0 0 7px; font-size: .83rem; }
.discussion-kind-options > div { display: grid; grid-template-columns: 18px max-content; align-items: center; justify-content: start; column-gap: 4px; row-gap: 8px; }
.discussion-kind-options > div label { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 8px 11px; border: 1px solid #d9dfd5; border-radius: 22px; background: #fff; color: #45534b; font-size: .84rem; cursor: pointer; }
.discussion-kind-options input[type="radio"] { width: auto; margin: 0; padding: 0; }
.discussion-kind-options input[type="radio"]:checked + label { border-color: var(--green); background: #edf3e9; color: var(--green); }
.discussion-composer textarea { min-height: 95px; }
.discussion-composer button { margin-top: 3px; }
.discussion-refresh-note { margin: 10px 0 0; color: var(--muted); font-size: .75rem; text-align: right; }
.error-card { max-width: 680px; margin: clamp(42px, 9vh, 100px) auto; padding: clamp(28px, 6vw, 58px); }
.error-card h1 { margin-bottom: 14px; font-size: clamp(2.4rem, 6vw, 4rem); }
.error-card .muted { max-width: 520px; margin-bottom: 24px; line-height: 1.7; }
.guest-message-card textarea { min-height: 115px; }
.guest-countdown { margin: 19px 0 21px; padding: 16px 18px 13px; border: 1px solid #e4e1d4; border-radius: 15px; background: linear-gradient(120deg, #f3f4e9, #fbf3e9); }
.guest-countdown > .eyebrow { margin-bottom: 9px; font-size: .68rem; }
.countdown-clock { display: flex; align-items: center; gap: 11px; color: #315c4c; }
.countdown-clock > span { display: grid; min-width: 54px; text-align: center; }
.countdown-clock strong { font: 700 1.6rem Georgia, serif; font-variant-numeric: tabular-nums; }
.countdown-clock small { color: var(--muted); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.countdown-clock > b { color: #af8164; font-weight: 400; transform: translateY(-6px); }
.countdown-caption { margin: 7px 0 2px; color: var(--muted); font-size: .82rem; }
.guest-countdown > .map-link { margin-top: 8px; }
.guest-contribution-card h2, .guest-tribute-card h2, .guest-album-preview h2 { margin-bottom: 5px; }
.contribution-list { display: grid; gap: 7px; margin: 17px 0; padding: 0; list-style: none; }
.contribution-list > li:not(.contribution-empty) { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfaf5; }
.contribution-check { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: #eaf0e6; color: var(--green); }
.contribution-list li > span:nth-child(2) { display: grid; min-width: 0; }
.contribution-list strong { overflow-wrap: anywhere; }
.contribution-list small { color: var(--muted); font-size: .77rem; }
.contribution-list form { margin-left: auto; }
.contribution-remove { width: 28px; height: 28px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.25rem; }
.contribution-remove:hover { background: #f1e8e3; color: #8d4d47; }
.contribution-empty, .album-empty { padding: 16px; border: 1px dashed #d5dbd0; border-radius: 12px; color: var(--muted); font: italic .95rem Georgia, serif; text-align: center; }
.contribution-composer { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfaf5; }
.contribution-composer form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.contribution-composer form > div { margin-bottom: 0; }
.contribution-composer button { min-height: 43px; white-space: nowrap; }
.album-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.album-section-heading .muted { max-width: 570px; margin-bottom: 0; }
.album-section-heading .btn { flex: 0 0 auto; }
.guest-album-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 17px; }
.album-mini-photo { position: relative; display: block; padding: 6px 6px 22px; transform: rotate(-1deg); background: #fffefa; box-shadow: 0 5px 14px #25332614; color: #617065; font: italic .72rem Georgia, serif; text-align: center; text-decoration: none; }
.album-mini-photo:nth-child(even) { transform: rotate(1.5deg); }
.album-mini-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.album-mini-photo span { position: absolute; right: 3px; bottom: 5px; left: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-mini-photo:hover { transform: translateY(-3px) rotate(0); }
.tribute-status { margin: 12px 0; padding: 10px 13px; border-radius: 9px; background: #f7f2e5; color: #6e6049; font-size: .86rem; }
.tribute-status--shared { background: #edf3e9; color: var(--green); }
.guest-tribute-card textarea { min-height: 110px; }
.tribute-gallery { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.tribute-gallery > .detail-label { margin-bottom: 11px; }
.tribute-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tribute-note { margin: 0; padding: 17px; border: 1px solid #e8e1d2; border-radius: 4px 13px 13px 13px; background: #fbf8f0; box-shadow: 0 4px 14px #2533260b; }
.tribute-note > p { margin: 0 0 12px; color: #4b5b50; font: italic 1rem/1.55 Georgia, serif; overflow-wrap: anywhere; }
.tribute-note footer { color: var(--muted); font-size: .78rem; text-align: right; }
main:has(.shared-album-page) { width: min(1050px, calc(100% - 40px)); }
.shared-album-page { padding: clamp(24px, 5vw, 52px); }
.shared-album-page > .eyebrow { margin-top: 28px; }
.shared-album-page h1 { margin-bottom: 8px; }
.shared-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; gap: 24px; margin-top: 32px; }
.shared-album-photo { position: relative; margin: 0; padding: 10px 10px 14px; transform: rotate(-1.2deg); background: #fffefa; box-shadow: 0 8px 22px #25332618; }
.shared-album-photo:nth-child(3n + 2) { transform: rotate(1.8deg); }
.shared-album-photo:nth-child(3n) { transform: rotate(-.2deg); }
.shared-album-photo > a { display: block; }
.shared-album-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shared-album-photo figcaption { display: flex; justify-content: space-between; gap: 7px; padding: 10px 2px 0; color: #617065; font: italic .82rem Georgia, serif; }
.shared-album-photo time { color: var(--muted); font: .72rem system-ui, sans-serif; white-space: nowrap; }
.album-empty--large { display: grid; justify-items: center; margin-top: 30px; padding: 45px 20px; }
.album-empty--large > span { color: #b98c64; font-size: 2rem; }
.album-empty--large h2 { margin: 11px 0 5px; font: 1.45rem Georgia, serif; }
.album-empty--large p { max-width: 430px; margin-bottom: 15px; }
.admin-contribution-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.admin-contribution-list > li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.admin-contribution-list > li > span { display: grid; }
.admin-contribution-list small { color: var(--muted); }
.admin-discussion-post { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf5; }
.admin-discussion-post.is-hidden { opacity: .65; background: #f5eeee; }
.admin-discussion-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-discussion-post > p { margin: 7px 0 11px; overflow-wrap: anywhere; }
.admin-memory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; }
.admin-memory-card { padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: #fbfaf5; }
.admin-memory-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.admin-memory-card p { margin: 9px 0 2px; font-size: .88rem; }
.admin-memory-card > a.fine { font-size: .78rem; }

@media (max-width: 760px) {
    main:has(.guest-page) { width: min(680px, calc(100% - 28px)); margin-top: 18px; }
    .guest-page { grid-template-columns: 1fr; gap: 18px; }
    .guest-mobile-nav { position: sticky; z-index: 30; top: 6px; display: block; grid-column: 1; margin: 0 0 -7px; }
    .guest-mobile-nav details { position: relative; border: 1px solid #dfe4da; border-radius: 13px; background: #fffefaed; box-shadow: 0 6px 18px #23372912; backdrop-filter: blur(12px); }
    .guest-mobile-nav summary { display: flex; min-height: 48px; align-items: center; gap: 11px; padding: 9px 14px; color: #31473b; font-size: .87rem; font-weight: 750; cursor: pointer; list-style: none; }
    .guest-mobile-nav summary::-webkit-details-marker { display: none; }
    .mobile-burger { display: grid; width: 20px; gap: 4px; }
    .mobile-burger i { display: block; width: 19px; height: 2px; border-radius: 2px; background: var(--green); transition: transform .16s ease, opacity .16s ease; }
    .guest-mobile-nav details[open] .mobile-burger i:first-child { transform: translateY(6px) rotate(45deg); }
    .guest-mobile-nav details[open] .mobile-burger i:nth-child(2) { opacity: 0; }
    .guest-mobile-nav details[open] .mobile-burger i:last-child { transform: translateY(-6px) rotate(-45deg); }
    .mobile-nav-chevron { margin-left: auto; color: var(--muted); transition: transform .16s ease; }
    .guest-mobile-nav details[open] .mobile-nav-chevron { transform: rotate(180deg); }
    .mobile-nav-links { position: absolute; top: calc(100% + 7px); right: 0; left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; border: 1px solid #dfe4da; border-radius: 13px; background: #fffefa; box-shadow: 0 12px 28px #23372920; }
    .mobile-nav-links a { padding: 9px 10px; border-radius: 8px; color: #405b4d; font-size: .82rem; font-weight: 650; text-decoration: none; }
    .mobile-nav-links a:hover, .mobile-nav-links a:focus-visible { background: #edf3e9; outline: none; }
    .guest-tools { position: static; grid-column: auto; display: grid; max-height: none; grid-template-columns: 1fr; gap: 14px; overflow: visible; padding: 0; }
    .guest-wall { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 12px; }
    .guest-wall-heading, .guest-wall-signoff { grid-column: 1 / -1; }
    .guest-photo, .guest-photo--stone, .guest-photo--smile { width: 100%; margin: 0; padding: 6px 6px 9px; }
    .guest-photo img, .guest-photo--portrait img, .guest-photo--stone img, .guest-photo--smile img { height: auto; aspect-ratio: 4 / 5; }
    .guest-photo figcaption { padding-top: 7px; font-size: .76rem; }
    .guest-wall-signoff { text-align: center; }
}
@media (min-width: 761px) and (max-width: 1180px) {
    main:has(.guest-page) { width: min(1100px, calc(100% - 40px)); }
    .guest-page { grid-template-columns: minmax(230px, .68fr) minmax(0, 1.32fr); gap: 22px; }
    .guest-tools { position: static; grid-column: 2; display: grid; max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0; }
    .guest-tools .guest-discussion-card { grid-row: span 2; }
    .guest-tools .discussion-feed { max-height: 290px; }
    .guest-tools .guest-quick-note { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .guest-details { grid-template-columns: 1fr; }
    .rsvp-options { display: grid; grid-template-columns: 1fr; }
    .guest-map { height: 210px; }
    .contribution-composer form { grid-template-columns: 1fr; gap: 4px; }
    .contribution-composer button { justify-self: start; }
    .album-section-heading { align-items: flex-start; flex-direction: column; }
    .guest-album-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shared-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .shared-album-photo { padding: 7px 7px 10px; }
    .shared-album-photo figcaption { flex-direction: column; gap: 3px; font-size: .75rem; }
}

@media (max-width: 600px) {
    main { margin-top: 18px; }
    .card { border-radius: 14px; }
    header { align-items: flex-start; }
    .table-wrap { margin: 0 -8px; }
    th, td { padding: 9px 7px; }
    .public-hero { min-height: 500px; padding: 22px; border-radius: 18px; }
    .public-hero::before { background: linear-gradient(90deg, rgba(20, 34, 28, .76), rgba(20, 34, 28, .56) 54%, rgba(20, 34, 28, .12) 78%, transparent); }
    .hero-copy { max-width: 78%; padding: 2px 0; }
    .hero-photo img { object-position: 68% 44%; }
    .hero-stamp { width: 82px; height: 82px; margin-top: 16px; }
    .hero-stamp b { top: -15px; right: -5px; font-size: 2.3rem; }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 8px; }
    .step-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
    .step-card { min-height: 0; padding: 16px; }
    .step-card h3 { margin-top: 10px; }
    .photo-wall { grid-template-columns: 1fr 1fr; gap: 12px; }
    .photo-card--2 { transform: rotate(2deg); }
    .photo-card--3 { grid-column: 1 / -1; width: min(75%, 280px); justify-self: center; }
}
