@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Source+Sans+3:wght@300;400;500&display=swap');

*, *::before, *::after {
    --clr-darker: color-mix(in srgb, var(--clr-accent), black 15%);
    --clr-lighter: color-mix(in srgb, var(--clr-accent), white 50%);
    --clr-transp-10: color-mix(in srgb, var(--clr-accent), transparent 90%);
    --clr-lightgrey: #707070;
    --clr-grey: #444444;
    --clr-greysat: color-mix(in srgb, color-mix(in srgb, var(--clr-accent), hsl(0deg 0% 70%) 35%), black 40%);
    --clr-accent-rgb: 129, 202, 218;
    --clr-text: var(--clr-textColor, rgb(51, 51, 51));
    --clr-muted: #777;
    --clr-bg: var(--clr-backgroundColor, #fff);
    --font-accent: var(--ft-accent, 'Cormorant Garamond', Georgia, serif);
    --font-body: var(--ft-default, 'Source Sans 3', sans-serif);
    --section-width: var(--pg-width, 1050px);
    --pg-width: 1050px;
    --pg-gutter: 20px;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

html, body {
    width: 100%;
    font-family: var(--font-body);
    font-weight: var(--weight-default, 300);
    font-size: 15px;
    color: var(--clr-textColor, rgb(51, 51, 51));
    background: var(--clr-backgroundColor, #fff);
    -webkit-font-smoothing: antialiased;
}

body.indiv { overflow-x: hidden; line-height: 1.45; }

h1, h2, h3, h4, h5 { font-family: var(--font-accent); line-height: 1.3; }
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; margin-right: 0.5em; stroke-width: 1.5; stroke: var(--clr-accent); fill: none; stroke-linecap: round; stroke-linejoin: round; }

#background {
    height: 400px;
    box-shadow: 1px 1px 10px 5px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
#background img { width: 100%; height: 100%; object-fit: cover; }

main { width: var(--pg-width); max-width: 100%; margin: auto; position: relative; z-index: 1; }

header {
    margin-top: -50px;
    display: grid;
    grid-template: auto / auto auto;
    grid-gap: 100px;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 3;
    transition: grid-gap 0.3s;
    padding-inline: 25px;
}

#photo {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    width: 300px;
    height: 300px;
    aspect-ratio: 1;
    box-shadow: 0 0.875rem 1.5rem 0 rgba(32, 46, 66, 0.08);
    border-radius: 5px;
    background: white;
    border: 5px solid white;
    z-index: 2;
    transition: width 0.3s, filter 0.3s;
    overflow: hidden;
}

#photo.square,
#photo.square .photo-container,
#photo.square img[data-photo],
#photo.square ~ #header-small #photo_small,
#photo.square ~ #header-small img {
    border-radius: 0;
}

#photo img, #photo_small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 2px;
    display: block;
    filter: grayscale(100%);
}

#photo .photo-container {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

#info-text {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    justify-content: end;
    display: flex;
    flex-direction: column;
    line-height: 2;
    gap: 5px;
}

#info-text svg { margin-right: 0.5em; min-width: 1em; }

#name {
    font-family: var(--font-accent);
    font-size: calc(50px * var(--ft-accent-size, 1));
    line-height: calc(1 * var(--ft-accent-lineheight, 1));
    margin-bottom: 18px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: font-size 0.3s;
}

.dates, #location {
    color: color-mix(in srgb, var(--clr-textColor, rgb(51, 51, 51)), transparent 30%);
    display: flex;
    font-size: 20px;
    align-items: center;
    transition: font-size 0.3s, opacity 0.3s;
}
.dates a { color: var(--clr-accent); margin-inline: 10px; text-decoration: none; }

#intro { white-space: pre-line; }

#header-small {
    grid-area: 1 / 1 / -1 / -1;
    margin: 0 auto auto;
    display: grid;
    grid-auto-flow: column;
    grid-gap: 20px;
    align-items: center;
    top: 20px;
    transform: translateY(-5px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    position: relative;
    z-index: 4;
}

#photo_small {
    width: 50px;
    height: 50px;
    aspect-ratio: 1;
    box-shadow: 0 0.875rem 1.5rem 0 rgba(32, 46, 66, 0.08);
    border-radius: 5px;
    overflow: hidden;
    background: white;
    border: 2px solid white;
}

#name_small {
    font-family: var(--font-accent);
    font-size: calc(35px * var(--ft-accent-size, 1));
    line-height: calc(1 * var(--ft-accent-lineheight, 1));
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

header.mini { overflow: hidden; pointer-events: none; }
header.mini #header-small { transform: translateY(0); opacity: 1; pointer-events: initial; }
header.mini #header-small:after {
    content: '';
    background: linear-gradient(0, color-mix(in srgb, var(--clr-backgroundColor, #fff), transparent 10%), var(--clr-backgroundColor, #fff) 75%);
    inset: -20px -50vw -20px;
    position: absolute;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}
header :is(#photo, #info-text) { transform: translateY(0); opacity: 1; transition: transform 0.3s, opacity 0.3s; }
header.mini :is(#photo, #info-text) { transform: translateY(10px); opacity: 0; pointer-events: none; }

menu {
    color: var(--clr-grey);
    margin-top: 150px;
    position: sticky;
    top: 90px;
    z-index: 3;
    display: block;
    background: transparent;
    border: none;
    padding-inline: 25px;
}

menu ul {
    display: flex;
    width: 100%;
    justify-content: space-between;
    list-style: none;
    gap: 10px;
    padding-inline: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
menu ul::-webkit-scrollbar { display: none; }

menu li {
    display: flex;
    align-items: center;
    font-size: 18px;
    border-radius: 4px;
    padding: 1em 2em;
    background: white;
    box-shadow: 0 0.875rem 1.5rem 0 rgba(32, 46, 66, 0.08);
    cursor: pointer;
    color: var(--clr-grey);
    white-space: nowrap;
    flex-direction: row;
    min-width: unset;
    transition: color 0.3s;
}

menu li:hover,
menu li.active { color: var(--clr-accent); }

menu li svg {
    width: 1em;
    height: 1em;
    margin-bottom: 0;
    margin-right: 0.5em;
    stroke: currentColor;
}

.menu-title {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: inherit;
    text-transform: none;
    cursor: pointer;
    transition: color 0.3s;
}
.menu-title:hover { color: var(--clr-darker); }

menu:after {
    content: '';
    background: linear-gradient(0, color-mix(in srgb, var(--clr-backgroundColor, #fff), transparent 40%), color-mix(in srgb, var(--clr-backgroundColor, #fff), transparent 10%) 75%);
    inset: 0 -20px -20px;
    position: absolute;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}

.section-container { display: flex; flex-direction: column; }

section[data-module] {
    padding-inline: 25px;
    margin-top: 110px;
    scroll-margin-top: 100px;
}

section h2 {
    font-family: var(--font-accent);
    font-size: calc(28px * var(--ft-accent-size, 1));
    line-height: calc(1.3 * var(--ft-accent-lineheight, 1));
    margin-bottom: 60px;
    text-align: left;
    font-weight: 400;
    color: var(--clr-text);
}

section h2:after {
    content: '';
    display: block;
    position: absolute;
    margin-top: 15px;
    background-color: var(--clr-accent);
    height: 3px;
    width: 50px;
}

#intro,
h2#intro {
    font-family: var(--font-accent);
    font-size: calc(1.6em * var(--ft-accent-size, 1));
    line-height: calc(1.45 * var(--ft-accent-lineheight, 1));
    margin-inline: auto;
    margin-bottom: 0;
    width: fit-content;
    max-width: min(650px, 80%);
    color: var(--clr-greysat);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-style: normal;
    border: none;
}

#intro:before {
    content: '\201F';
    font-family: 'Times New Roman', serif;
    position: absolute;
    font-size: 4.8rem;
    color: var(--clr-lighter);
    top: -0.3em;
    left: -0.8em;
}

#intro:after { content: unset; }

main p { line-height: 1.8; font-size: 1.1rem; }

.scroll-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-fade.visible { opacity: 1; transform: none; }

/* Celebration of Life */
[data-module="obituary"] .obituary-subtitle {
    font-family: var(--font-accent);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgb(51, 51, 51);
    text-align: center;
    margin: -0.5rem auto 1.75rem;
    max-width: 36rem;
}

[data-module="obituary"] .obituary-body,
[data-module="obituary"] p {
    font-size: 15px;
    line-height: 1.85;
    color: rgb(51, 51, 51);
    text-align: left;
}

/* Favorites */
.favorites { display: grid; gap: 1.25rem; }
.fav-question {
    padding: 0 0 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.fav-question:last-child { border-bottom: none; }
.fav-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: .6rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    color: var(--clr-text);
}
.fav-title svg {
    width: 20px;
    height: 20px;
    stroke: var(--clr-accent);
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
    margin-top: 2px;
}
.fav-desc {
    color: #555;
    font-size: 15px;
    padding-left: 1.65rem;
}

/* Timeline */
.timeline-event {
    display: grid;
    grid-template-columns: 90px 44px 1fr;
    gap: 1rem 1.25rem;
    margin-bottom: 2.25rem;
    align-items: start;
}
.timeline-date { text-align: right; padding-top: .15rem; }
.timeline-date .year {
    font-family: var(--font-accent);
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--clr-accent);
    line-height: 1;
}
.timeline-date .date {
    font-size: .82rem;
    color: var(--clr-muted);
    margin-top: .2rem;
}
.timeline-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 100%;
}
.timeline-line::after {
    content: '';
    position: absolute;
    top: 38px;
    bottom: -2.25rem;
    width: 2px;
    background: rgba(var(--clr-accent-rgb), .35);
}
.timeline-event:last-child .timeline-line::after { display: none; }
.timeline-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--clr-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.timeline-icon svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.6;
}
.timeline-title {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: .3rem;
}
.timeline-desc,
.timeline-location {
    font-size: 14px;
    color: var(--clr-muted);
    line-height: 1.6;
}

/* Buttons */
button.white,
button.sz-regular,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .55rem 1.15rem;
    border: 1px solid #ddd;
    border-radius: 28px;
    background: #fff;
    color: var(--clr-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
    line-height: 1.2;
}
button.white:hover,
button.sz-regular:hover,
.btn:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
}
button.white.active,
.btn.active {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
    background: rgba(var(--clr-accent-rgb), .08);
}
button.sz-regular:not(.white),
.btn-primary,
button[data-action="wall-contribute"],
button[data-action="submitRSVP"] {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #fff;
}
button.sz-regular:not(.white):hover,
.btn-primary:hover {
    background: rgb(100, 185, 205);
    border-color: rgb(100, 185, 205);
    color: #fff;
}
button.white svg,
button.sz-regular svg,
.btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

/* Gallery */
.gallery-folders {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem;
}
.gallery-folders + button.sz-regular {
    display: flex;
    margin: 0 auto 1.75rem;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.gallery-img {
    aspect-ratio: 3 / 4;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #f2f2f2;
    display: block;
}
.gallery-img.hidden { display: none; }
.gallery-img img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform .35s ease;
    object-fit: cover;
    object-position: top;
}
.gallery-img:hover img { transform: scale(1.03); }

@media (min-width: 900px) {
    .gallery-grid { gap: 24px; }
    .gallery-img { aspect-ratio: 3 / 4; }
}

/* Grandpa's Words */
.words-intro {
    text-align: center;
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin: -0.5rem auto 2rem;
    max-width: 34rem;
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.word-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(32, 46, 66, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.word-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}

.word-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #111;
}

.word-text {
    padding: 1.25rem 1.35rem 0.75rem;
    font-size: 15px;
    line-height: 1.75;
    color: #444;
    font-style: italic;
}

.word-date {
    padding: 0 1.35rem 1.25rem;
    font-size: 13px;
    color: color-mix(in srgb, var(--clr-accent), #666 35%);
    letter-spacing: 0.02em;
}

/* Memory wall */
.desc {
    text-align: center;
    color: var(--clr-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}
.memory-sticky {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0 2rem;
}
.memory-sort select,
.memory-search input {
    height: 40px;
    padding: 0 .9rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--clr-text);
}
.memory-search input { min-width: 200px; }
.memory-card {
    background: #fafafa;
    border: 1px solid rgba(0,0,0,.05);
    border-radius: 8px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
}
.memory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .85rem;
}
.memory-date { font-size: 13px; color: var(--clr-muted); }
.memory-like {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    color: var(--clr-muted);
    font-size: 13px;
}
.memory-like svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.memory-like:hover,
.memory-like.liked { color: #e07070; }
.memory-like.liked svg { fill: #e07070; stroke: #e07070; }
.memory-desc {
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: .85rem;
}
.memory-author {
    font-size: 14px;
    font-weight: 500;
    color: var(--clr-accent);
}

/* Family tree - photos only */
.family-shadow {
    overflow-x: auto;
    padding: 1rem 0 2rem;
}
.family-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.25rem;
    justify-items: center;
}
.family-photo {
    width: 100%;
    max-width: 130px;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    cursor: pointer;
    background: #eee;
}
.family-photo.featured {
    max-width: 160px;
    border-color: var(--clr-accent);
    box-shadow: 0 6px 24px rgba(var(--clr-accent-rgb), .35);
    grid-column: span 1;
}
.family-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Service */
.service-section {
    max-width: 760px;
    margin: 0 auto;
}

.service-intro {
    text-align: center;
    font-size: 15px;
    line-height: 1.85;
    color: #555;
    margin-bottom: 2rem;
}

.rsvp-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(32, 46, 66, 0.12);
    padding: 2rem 2.25rem 2.25rem;
}

.service-address {
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.service-address-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
    font-size: 14px;
    color: var(--clr-text);
    margin-bottom: .65rem;
}

.service-address-label svg {
    width: 18px;
    height: 18px;
    stroke: var(--clr-accent);
    fill: none;
    stroke-width: 1.5;
}

.service-address-text {
    font-size: 17px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.rsvp-card-heading {
    font-family: var(--font-accent);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    color: var(--clr-text);
}

.event-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
    font-size: 14px;
    color: var(--clr-text);
    margin: 1.25rem 0 .4rem;
}
.event-label svg {
    width: 18px;
    height: 18px;
    stroke: var(--clr-accent);
    fill: none;
    stroke-width: 1.5;
}
.event-content {
    font-size: 15px;
    color: #555;
    line-height: 1.65;
    margin-bottom: .5rem;
}

/* RSVP */
.rsvp-guest {
    display: grid;
    grid-template-columns: 1fr 1fr 150px 36px;
    gap: .75rem;
    align-items: center;
    margin-bottom: .85rem;
}
.rsvp-guest input,
.rsvp-contact input {
    width: 100%;
    height: 52px;
    padding: 0 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
}
.rsvp-guest select {
    height: 52px;
    padding: 0 .75rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
}
.rsvp-actions-row {
    margin: .5rem 0 1.25rem;
}
.rsvp-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: .25rem;
}
.rsvp-submit-row {
    margin-top: 1.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}
.img-delete {
    cursor: pointer;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-delete:hover { color: #c44; }
.img-delete svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
.rsvp-msg {
    margin-left: .75rem;
    font-size: 14px;
    color: #2e7d32;
}

/* Popup */
#popup-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 300;
}
#popup-bg.show { display: block; }
#popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 301;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    pointer-events: none;
}
#popup.show {
    display: flex;
    pointer-events: auto;
}
.popup-container {
    background: #fff;
    border-radius: 10px;
    max-width: 720px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.popup-container.image-mode {
    max-width: min(95vw, 1100px);
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}
.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    color: #999;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.image-mode .popup-close {
    top: -12px;
    right: -12px;
}
.popup-close svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}
.popup-image-view {
    width: 100%;
}
.popup-image-toolbar {
    display: flex;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 1rem;
}
.popup-tool {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: color 0.2s, transform 0.2s;
}
.popup-tool:hover {
    color: var(--clr-accent);
    transform: translateY(-2px);
}
.popup-tool svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    margin: 0;
}
.popup-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    max-height: 80vh;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 1rem;
}
#popup-image {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: transform 0.25s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* Memory wall modal */
.wall-modal-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.wall-modal-header svg {
    width: 22px;
    height: 22px;
    stroke: var(--clr-accent);
    margin: 0;
}
.wall-modal-header h3 {
    font-family: var(--font-accent);
    font-size: 1.35rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--clr-accent);
    margin: 0;
}
.wall-modal-intro {
    color: #666;
    font-size: .95rem;
    margin-bottom: 1.5rem;
}
.wall-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.wall-field { margin-bottom: 1rem; }
.wall-field label {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--clr-accent);
    margin-bottom: .45rem;
}
.wall-input-wrap {
    position: relative;
}
.wall-input-wrap > svg {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #bbb;
    margin: 0;
    pointer-events: none;
}
.wall-textarea-wrap > svg {
    top: 1rem;
    transform: none;
}
.wall-input-wrap input,
.wall-input-wrap textarea {
    width: 100%;
    padding: .75rem .85rem .75rem 2.6rem;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    font-family: inherit;
    font-size: .95rem;
    margin-bottom: 0;
    background: #fff;
}
.wall-input-wrap textarea {
    min-height: 140px;
    resize: vertical;
}
.wall-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.25rem;
}
.wall-photo-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.wall-submit { margin-left: auto; }
.wall-form-error {
    margin-top: 1rem;
    color: #c62828;
    font-size: .9rem;
}
.memory-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.memory-photo-preview img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}
.memory-media {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: .85rem 0;
}
.memory-photo {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #f2f2f2;
}
.memory-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#popup-content h3 {
    font-family: var(--font-accent);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}
#popup-content label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: .35rem;
}
#popup-content input,
#popup-content textarea {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 1rem;
}
#popup-content textarea { min-height: 130px; resize: vertical; }

@media (max-width: 640px) {
    .wall-form-row { grid-template-columns: 1fr; }
    .wall-form-actions { flex-direction: column; align-items: stretch; }
    .wall-submit { width: 100%; }
}

/* Share */
#share {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
}
.share-initial {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--clr-accent);
    color: #fff;
    padding: .7rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(var(--clr-accent-rgb), .45);
    font-size: 14px;
    user-select: none;
}
.share-initial svg {
    width: 17px;
    height: 17px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}
.share-more-container {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.14);
    overflow: hidden;
    min-width: 170px;
}
.share-more-container.show { display: block; }
.share-sns {
    padding: .7rem 1rem;
    font-size: 14px;
    cursor: pointer;
}
.share-sns:hover { background: #f5f5f5; }

/* CTA */
#cta {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 90;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--clr-accent);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(var(--clr-accent-rgb), .45);
    display: flex;
    align-items: center;
    justify-content: center;
}
#cta svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.5;
}

.scrolltop {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    z-index: 89;
}
.scrolltop.visible {
    opacity: 1;
    pointer-events: auto;
}
.scrolltop::before {
    content: '↑';
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--clr-accent);
    font-size: 18px;
}

.footerlogo {
    text-align: center;
    padding: 2.5rem 1.5rem 4rem;
    color: var(--clr-muted);
    font-size: 13px;
}

/* Slideshow */
#slideshow {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0,0,0,.92);
    align-items: center;
    justify-content: center;
}
#slideshow.show { display: flex; }
#slideshow img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
}
.slideshow-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    cursor: pointer;
    color: #fff;
    z-index: 2;
}
.slideshow-close svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
}

/* Responsive */
@media (min-width: 600px) and (max-width: 1100px) {
    main { max-width: 100%; }
    #name { font-size: calc(45px * var(--ft-accent-size, 1)); }
    .dates, #location { font-size: 1em; }
    #photo { width: 230px; height: 230px; }
    header { gap: 60px; }
    menu ul { overflow-x: auto; padding-inline: 0; gap: 15px; }
    menu li { padding: 0.7em 1em; font-size: 17px; box-shadow: 0 0.4rem 0.6rem 0 rgba(32, 46, 66, 0.08); }
}

@media (max-width: 900px) {
    .event { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    html, body { font-size: 18px; }
    #background { height: 200px; }
    main { width: 100vw; }
    main p { font-size: 1rem; }
    header { grid-gap: 35px; padding-inline: 25px; }
    #photo {
        grid-column: 1 / -1;
        grid-row: 1 / 2;
        width: calc(55vw - 2 * var(--pg-gutter));
        height: calc(55vw - 2 * var(--pg-gutter));
        justify-self: center;
    }
    #info-text {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        height: fit-content;
        width: fit-content;
        margin-inline: auto;
    }
    #name {
        font-size: calc(35px * var(--ft-accent-size, 1));
        text-align: center;
    }
    .dates, #location { font-size: 1em; }
    menu { margin-top: 30px; overflow: hidden; }
    menu ul { overflow-x: scroll; padding-bottom: 25px; gap: 15px; }
    menu li { padding: 0.7em 1em; font-size: 17px; box-shadow: 0 0.4rem 0.6rem 0 rgba(32, 46, 66, 0.08); }
    #intro { font-size: calc(1.4em * var(--ft-accent-size, 1)); margin-top: -40px; margin-bottom: -30px; }
    #intro:before { left: -0.6em; font-size: 4.2rem; }
    header.mini { pointer-events: none; }
    #name_small { font-size: calc(25px * var(--ft-accent-size, 1)); }
    .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
    .gallery-img { aspect-ratio: 3 / 4; }
    .words-grid { grid-template-columns: 1fr; gap: 18px; }
    .timeline-event { grid-template-columns: 70px 36px 1fr; }
    .rsvp-card { padding: 1.5rem 1.25rem 1.75rem; }
    .rsvp-guest { grid-template-columns: 1fr; }
    .rsvp-contact { grid-template-columns: 1fr; }
    .family-photos-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}
