:root {
  --paper: #fbf8f2;
  --cream: #f4eee4;
  --ink: #4c3528;
  --muted: #77685d;
  --gold: #b58b4b;
  --gold-soft: #d7bf93;
  --sage: #6f7d65;
  --line: #e8dfd2;
  --heading: "Cormorant Garamond", Georgia, serif;
  --body: "DM Sans", Arial, sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body)}
a{color:inherit}
a:focus-visible{outline:3px solid var(--gold);outline-offset:5px}
.skip{position:absolute;left:-9999px;top:10px;background:#fff;padding:12px;z-index:10}.skip:focus{left:10px}
.site-header{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px clamp(18px,5vw,90px);border-bottom:1px solid var(--line);background:rgba(251,248,242,.97);position:relative;z-index:2}
.brand{text-decoration:none;display:flex;align-items:center;gap:12px;font-size:11px;letter-spacing:.21em;color:#8b754f;white-space:nowrap}.cross{font-family:Georgia,serif;font-size:24px;color:var(--gold)}
.top-nav{display:flex;gap:clamp(12px,3vw,42px);flex-wrap:wrap;justify-content:center}.top-nav a{text-decoration:none;font-family:var(--heading);font-size:21px}.top-nav a:hover{color:var(--gold)}
.hero{min-height:640px;position:relative;display:flex;align-items:center;justify-content:center;padding:54px 20px 65px;background:radial-gradient(ellipse at 50% 70%,#fff9f0 0%,#faf4eb 58%,#f6efe5 100%);overflow:hidden;text-align:center}
.hero:after{content:"";position:absolute;inset:auto 0 0;height:100px;background:linear-gradient(transparent,var(--paper));pointer-events:none}
.hero-content{position:relative;z-index:1;width:100%;max-width:940px}
.floral{position:absolute;z-index:0;width:min(37vw,410px);height:min(52vw,580px);background:url('images/floral-corner.svg') no-repeat top left /contain;opacity:.84;pointer-events:none}
.floral-left{top:-15px;left:-18px}.floral-right{top:-15px;right:-18px;transform:scaleX(-1)}
.eyebrow,.section-eyebrow{font-size:12px;letter-spacing:.28em;color:#907246;font-weight:500}.eyebrow{display:flex;justify-content:center;align-items:center;gap:18px;margin:0 0 13px}.eyebrow span:first-child,.eyebrow span:last-child{height:1px;width:46px;background:var(--gold-soft)}
h1{font:italic 500 clamp(54px,7vw,98px)/1 var(--heading);margin:0;color:#56331f}
.dates{font:500 clamp(16px,2vw,22px)/1.5 var(--heading);letter-spacing:.15em;text-transform:uppercase;margin:12px 0 25px}
.portrait-wrap{width:clamp(200px,33vw,310px);aspect-ratio:1;border:3px solid var(--gold-soft);border-radius:50%;padding:7px;margin:0 auto 24px;background:#fff9f1;box-shadow:0 12px 36px #4c352819}
#portrait{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}#portrait[hidden]{display:none}
.message{max-width:700px;margin:0 auto;font:italic 400 clamp(22px,2.6vw,30px)/1.3 var(--heading);white-space:pre-line}
.cross-rule{display:flex;align-items:center;justify-content:center;gap:19px;color:var(--gold);font:26px Georgia,serif;margin-top:16px}.cross-rule span:first-child,.cross-rule span:last-child{font-size:13px}
.section-cards{width:min(1280px,calc(100% - 36px));margin:-26px auto 0;position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.section-card{min-height:205px;padding:28px 14px 18px;background:rgba(255,252,247,.96);border:1px solid #e8dfd4;border-radius:13px;box-shadow:0 8px 30px #6d4d2910;display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;text-decoration:none;transition:transform .2s,box-shadow .2s;overflow:hidden;position:relative}
.section-card:before{content:"";position:absolute;width:110px;height:110px;bottom:-40px;right:-45px;background:url('images/floral-corner.svg') no-repeat center/contain;opacity:.34;transform:rotate(180deg)}
.section-card:hover{transform:translateY(-4px);box-shadow:0 12px 35px #6d4d2920}
.card-icon{font:42px/1 Georgia,serif;color:#b08954;height:48px}.section-card strong{font:500 30px/1.15 var(--heading)}.section-card small{font:17px var(--heading);color:var(--muted)}.card-arrow{border:1px solid var(--gold-soft);border-radius:50%;font:21px/30px Arial,sans-serif;width:33px;height:33px;margin-top:11px;color:#956b35}
.lower-content{max-width:980px;margin:auto;padding:5px 24px 55px}.content-section{text-align:center;padding:78px 0 65px;border-bottom:1px solid var(--line);scroll-margin-top:12px}.content-section h2{font:500 clamp(40px,5vw,57px)/1.1 var(--heading);margin:12px 0}.section-eyebrow{font-size:11px;margin:0}.thin-rule{width:64px;height:1px;background:var(--gold);margin:20px auto 25px}.section-text{font:24px/1.5 var(--heading);max-width:740px;margin:0 auto;white-space:pre-line}.quiet{color:var(--muted);font:19px/1.5 var(--heading)}.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:13px}.gallery a{display:block}.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:5px;display:block}.service-info{font:23px/1.55 var(--heading);white-space:pre-line}.service-info p{margin:4px auto}.action-link{display:inline-block;margin-top:20px;padding:12px 24px;border:1px solid var(--gold);background:#f6ebdb;color:#674524;text-decoration:none;border-radius:4px;font-size:14px}.action-link:hover{background:#edddc6}footer{text-align:center;padding:32px 20px 44px;font:italic 23px var(--heading);color:var(--muted)}.footer-cross{color:var(--gold)}
@media(max-width:760px){.site-header{flex-direction:column;gap:8px}.top-nav{gap:9px 18px}.top-nav a{font-size:17px}.hero{min-height:unset;padding:65px 16px 66px}.floral{width:48vw;height:55vw;opacity:.42}.eyebrow{letter-spacing:.14em;font-size:10px}.eyebrow span:first-child,.eyebrow span:last-child{width:22px}h1{font-size:clamp(46px,10vw,68px)}.dates{letter-spacing:.08em}.section-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.section-card{min-height:168px;padding:19px 8px 13px}.section-card strong{font-size:25px}.section-card small{font-size:15px}.card-icon{font-size:34px;height:37px}.content-section{padding:62px 0 50px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.section-card{transition:none}}

/* Watercolor floral decorations — replaces original simplified SVG */
.floral {
  z-index: 2;
  opacity: .92;
  width: clamp(220px, 35vw, 520px);
  height: clamp(190px, 30vw, 390px);
  background-repeat: no-repeat;
  background-position: top left;
  background-size: contain;
  pointer-events: none;
}
.floral-left {
  top: 0;
  left: 0;
  background-image: url('images/floral-top-left.png');
  transform: none;
}
.floral-right {
  top: 0;
  right: 0;
  background-image: url('images/floral-top-right.png');
  background-position: top right;
  transform: none;
}
.hero-content { z-index: 3; }
.section-card::before { display: none; }
@media (max-width: 760px) {
  .floral { width: 43vw; height: 38vw; opacity: .60; }
  .hero-content { z-index: 3; }
}

/* Final overrides: only four navigation cards; functional actions in sections. */
[hidden]{display:none!important}
.section-card::before{display:none!important}
#rsvp-wrap,#memory-wrap,#photos-link-wrap,#photo-album-wrap{margin:20px auto 0}
#rsvp-link{background:#aa8047;color:white;border-color:#aa8047;font-weight:600}
#rsvp-link:hover{background:#8e6838}
.memories-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:30px auto;text-align:left}
.memory-card{margin:0;padding:22px;background:#fffdf9;border:1px solid var(--line);border-radius:10px;font:22px/1.4 var(--heading)}
.memory-card p{margin:0 0 12px;white-space:pre-line}.memory-card footer{padding:0;text-align:right;font:16px var(--body);color:var(--muted)}
#load-error{text-align:center;color:#8a2929;padding:20px}

/* Group service actions and deadline without disrupting navigation cards. */
#service-map-wrap,#rsvp-wrap{margin:12px auto}
#rsvp-deadline{font-size:18px;margin:18px auto 4px}
#service-map-link{background:transparent}

/* Album and remembrance previews */
.section-intro{font:22px/1.5 var(--heading);color:var(--muted);max-width:680px;margin:0 auto 30px}
.rail-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;text-align:left;margin:28px 0 12px}
.rail-heading h3{font:500 29px var(--heading);margin:0}
.text-button{font:500 13px var(--body);color:#956b35;background:none;border:0;cursor:pointer;text-align:right;padding:10px}
.rail-shell{position:relative}.preview-rail{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin;padding:0 2px 15px;overscroll-behavior-x:contain}
.album-preview,.memory-preview{border:1px solid var(--line);background:#fffdf9;border-radius:12px;cursor:pointer;scroll-snap-align:start;text-align:left;flex:0 0 clamp(205px,27vw,260px);padding:0 0 16px;overflow:hidden;box-shadow:0 6px 17px #6745240b;color:var(--ink)}
.album-preview:hover,.memory-preview:hover{box-shadow:0 7px 28px #67452422;transform:translateY(-2px)}
.album-cover{height:170px;background:linear-gradient(135deg,#e8d8cb,#f5e9df 50%,#dbe3d2);display:flex;align-items:center;justify-content:center;overflow:hidden}
.album-cover img{width:100%;height:100%;object-fit:cover}.empty-cover-mark{font:70px var(--heading);color:#b69d77;opacity:.55}
.album-preview strong,.album-preview span.album-count,.album-preview span.album-desc{display:block;margin:8px 14px 0}.album-name{font:500 23px var(--heading)}.album-count{color:var(--muted);font:13px var(--body)}.album-desc{font:16px var(--heading)}
.rail-arrow{position:absolute;z-index:4;top:39%;border:1px solid var(--line);background:#fffdf9;box-shadow:0 2px 8px #67452422;border-radius:50%;width:34px;height:34px;font-size:25px;cursor:pointer}.rail-arrow.prev{left:-15px}.rail-arrow.next{right:-15px}
.memory-preview{padding:20px;min-height:225px;display:flex;flex-direction:column}.quote-mark{font:40px var(--heading);color:var(--gold);height:29px}.memory-preview strong{font:500 24px var(--heading)}.memory-excerpt{font:19px/1.4 var(--heading);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;margin:12px 0}.memory-byline{font:13px var(--body);color:var(--muted);margin-top:auto}
.detail-dialog{width:min(940px,calc(100vw - 30px));max-height:88vh;border:1px solid var(--line);border-radius:14px;padding:24px;background:#fffbf6;color:var(--ink);box-shadow:0 25px 80px #392c263d;overflow-y:auto}.detail-dialog::backdrop{background:#241b1abb}.dialog-top{display:flex;justify-content:space-between;gap:20px;align-items:start;border-bottom:1px solid var(--line);padding-bottom:13px}.dialog-top h2{font:500 clamp(30px,5vw,46px) var(--heading);margin:6px 0}.dialog-close{font:32px Arial;color:var(--ink);background:none;border:0;cursor:pointer}.detail-content{padding:18px 0}.dialog-description{font:21px var(--heading)}.album-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:15px}.album-photo{margin:0}.album-photo img{width:100%;height:210px;object-fit:contain;background:#efe8df;border-radius:8px}.album-photo figcaption{font:17px/1.3 var(--heading);margin:8px 0 14px}.full-memory{font:clamp(20px,3vw,27px)/1.55 var(--heading);white-space:pre-line}.memory-author{text-align:right;color:var(--muted)}.all-albums-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:12px}.album-list-button,.memory-list-button{display:block;width:100%;padding:16px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:8px;color:var(--ink);cursor:pointer;font:21px var(--heading)}.all-memories-list{display:grid;gap:10px}.memory-list-button strong,.memory-list-button span{display:block}.memory-list-button span{font:17px var(--heading);margin-top:7px}.section-actions p{display:inline-block;margin:8px}
@media(max-width:760px){.rail-arrow{display:none}.album-preview,.memory-preview{flex-basis:215px}.rail-heading h3{font-size:24px}.detail-dialog{padding:16px}.album-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.album-photo img{height:150px}}
