:root{--cl-cream:#645747;--cl-gold:#a8916a;--cl-dark:#f4f0e8;color-scheme:light}body.cl-invitation{background:#f4f0e8;color:#645747}#invitation{max-width:528px;margin:auto;background:#f8f5ef}#petals-opening{position:fixed;inset:0;max-width:528px;margin:auto;z-index:100;background:#f4f0e8}#petals-opening video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}#petals-second{opacity:0;transition:opacity .7s}#petals-enter{position:absolute;inset:0;width:100%;padding-top:86svh;letter-spacing:.2em;text-transform:uppercase;font-size:13px;color:#675945}#petals-continue{position:absolute;bottom:4%;left:30%;width:40%;padding:12px;color:#645747;background:#fffcf5da;border-radius:30px;z-index:4}#petals-date{position:absolute;top:55%;left:20%;width:60%;text-align:center;letter-spacing:.18em;font-size:15px;background:#f4f0e8;padding:4px}#invitation section{text-align:center;padding:64px 32px;scroll-margin-top:10px}.petals-letter{min-height:100svh;background:url(petals/open.jpg) center/cover;display:flex;flex-direction:column;justify-content:space-around;align-items:center;gap:26px}.petals-letter p{font-size:23px;line-height:1.6}.petals-letter h1,.petals-script,.petals-initials{font-family:'Great Vibes',cursive;font-weight:400}.petals-letter h1{font-size:48px;line-height:1.3}.petals-initials{font-size:70px}.petals-sep{width:170px}.petals-next{font-size:36px;text-decoration:none}.petals-paper{background:#f4f0e8}.petals-paper>section{position:relative;isolation:isolate}.petals-paper>section::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url(petals/s345-bg.jpg) center/cover no-repeat;-webkit-mask-image:linear-gradient(transparent,#000 64px,#000 calc(100% - 64px),transparent);mask-image:linear-gradient(transparent,#000 64px,#000 calc(100% - 64px),transparent)}h2{font-family:'Cinzel',serif;font-size:26px;letter-spacing:.1em;font-weight:400;margin-bottom:24px}#invitation p{line-height:1.6}#invitation h3{font-weight:500;margin:24px 0 12px}.petals-script{font-size:42px}.petals-count{display:flex;gap:14px;justify-content:center;margin:32px 0}.petals-count>div{width:100px;aspect-ratio:1;background:url(petals/cadran.png) center/contain no-repeat;display:flex;flex-direction:column;justify-content:center}.petals-count b{font-size:32px;font-weight:400}.petals-count span{font-size:14px}.petals-program{list-style:none;padding:0;margin:32px auto;max-width:300px}.petals-program li{display:flex;text-align:left;align-items:center;gap:24px;margin:28px 0}.petals-program img{width:52px;height:52px;object-fit:contain}.petals-program b{font-weight:500;font-size:20px}.petals-program p{font-size:19px}#venue p{font-size:20px}.cl-gold-button{color:#574831;background:#eee4d3;border:1px solid #c2b294;box-shadow:none;margin-top:24px}.cl-form{margin:28px auto}.cl-form label,.cl-form legend{color:#645747!important}.cl-form input[type=text],.cl-form input[type=email],.cl-stepper,.cl-attendance-choice span{background:#fffaf2cc;color:#645747;border-color:#c4b59a}.cl-stepper input,.cl-voice-button{color:#645747}.cl-form input::placeholder{color:#8b7d6a}.cl-music{right:max(16px,calc((100vw - 528px)/2 + 16px));background:#fffcf0d9;color:#77654b;border-color:#cabb9f}.cl-receipt{background:#fffaf2;color:#645747}.petals-credit{font-size:11px;margin-top:48px}#thanks>a{font-size:13px}#rsvp>p{font-size:20px}.cl-rsvp-feedback{color:#783d2b}.cl-voice-status{color:#645747}@media(max-width:360px){#invitation section{padding:44px 24px}.petals-letter h1{font-size:40px}.petals-letter p{font-size:20px}.petals-count{gap:6px}.petals-count>div{width:85px}}

/* Keep one viewport-sized backdrop stationary, clipped to the invitation paper. */
.petals-paper{position:relative;isolation:isolate;clip-path:inset(0);background:transparent}
.petals-paper::before{content:"";position:fixed;inset:0;width:100%;max-width:528px;margin-inline:auto;z-index:-1;pointer-events:none;background:#f4f0e8 url(petals/s345-bg.jpg) center/cover no-repeat}
.petals-paper>section::before{content:none}
/* v1.1: reference-style overlapping panels and an independently scrolling paper. */
body.cl-invitation{overflow:hidden;color:#a08b6f;background:#f6f1e8}
#invitation{position:relative;isolation:isolate;height:100svh;height:100dvh;overflow:auto;scrollbar-width:none;scroll-behavior:smooth}
#invitation section{padding:0;scroll-margin-top:0}
#invitation .petals-letter{position:sticky;top:0;z-index:1;display:block;height:100%;min-height:0;overflow:hidden;background-color:#f6f1e8}
.petals-letter-scroll{height:100%;overflow-y:auto;scrollbar-width:none;padding:60px 12% 40px;display:flex;flex-direction:column;align-items:center;gap:22px}
.petals-letter-scroll>*{flex-shrink:0;max-width:100%}.petals-letter p{font-size:20px}.petals-letter h1{font-size:44px;overflow-wrap:anywhere}.petals-initials{font-size:84px;line-height:1.4}.petals-initials img{width:144px;max-height:160px;object-fit:contain}
.petals-sep{width:120px;height:auto;margin:12px auto}.petals-next{display:flex;justify-content:center;align-items:center;width:44px;min-height:44px}.petals-next img,.petals-paper-next img{width:17px}
.petals-paper{position:relative;z-index:2;height:100%;overflow:hidden;clip-path:none;background:#f6f1e8 url(petals/s345-bg.jpg) center/cover no-repeat}
.petals-paper::before,.petals-paper>section::before{content:none}
.petals-paper-scroll{position:absolute;inset:clamp(64px,10.25svh,96px) clamp(26px,15.8vw,62px) 72px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;scroll-behavior:smooth}
.petals-paper-next{position:absolute;bottom:12px;left:calc(50% - 22px);width:44px;height:44px;display:flex;align-items:center;justify-content:center}
#invitation h2{font-size:24px;line-height:1.3;letter-spacing:.04em;font-weight:500;margin:0;text-transform:uppercase}.petals-schedule{min-height:100%;display:flex;flex-direction:column;justify-content:center}.petals-subtitle{font-size:18px;margin-top:2px}
.petals-count{gap:12px;margin:10px 0 8px}.petals-count>div{width:78px;max-width:calc((100% - 24px)/3);aspect-ratio:78/107}.petals-count b{font-size:28px;line-height:1;font-weight:500}.petals-count span{font-size:11px;letter-spacing:.06em;margin-top:3px}.petals-divider{width:120px;margin:8px auto}
#invitation #program h2{margin-top:8px;font-size:22px;letter-spacing:.1em}.petals-program{position:relative;margin:12px auto 0;max-width:250px}.petals-program:before{content:"";position:absolute;left:80px;top:35px;bottom:35px;width:1px;background:#a08b6f66}.petals-program li{position:relative;gap:36px;min-height:70px;margin:12px 0 0}.petals-program li:before{content:"";position:absolute;left:76px;width:9px;height:9px;border:1px solid #a08b6f;border-radius:50%;background:#f6f1e8}.petals-program img{width:62px;height:62px;flex-shrink:0}.petals-program b{font-size:15px;font-weight:600}.petals-program p{font-size:18px}
#invitation #venue,#invitation #rsvp,#invitation #thanks{min-height:100%;padding:4px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:72px}
#invitation #venue h2,#invitation #rsvp h2{font-size:26px;letter-spacing:.14em}#venue p{font-size:15px}#invitation #venue h3{font-size:16px;font-weight:600;text-transform:uppercase;margin:14px 0 0}#venue h3+p{font-size:14px}.petals-venue-photo{width:260px;max-width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:12px;margin:16px auto 6px}
#venue .petals-floral-button{width:210px;max-width:100%;min-height:48px;padding:12px 24px 12px 32px;margin-top:12px;border:0;border-radius:0;background:transparent url(petals/btn.png) center/100% 100% no-repeat;font-family:'Cormorant Garamond',serif;font-size:12px;letter-spacing:.14em;font-weight:600}
#rsvp>p{font-size:14px}.cl-form{width:100%;margin:18px auto;text-align:left}.cl-music{z-index:30}#invitation #thanks h2{font-family:'Great Vibes',cursive;font-size:52px;letter-spacing:0;text-transform:none}
@media(max-width:360px){.petals-paper-scroll{inset-inline:28px}.petals-letter-scroll{padding-inline:28px}.petals-letter h1{font-size:38px}.petals-letter p{font-size:18px}}
@media(prefers-reduced-motion:reduce){#invitation,.petals-paper-scroll{scroll-behavior:auto}}
@media print{body.cl-invitation{overflow:visible}#invitation{height:auto;overflow:visible}.petals-letter-scroll,.petals-paper-scroll{position:static;height:auto;overflow:visible}#invitation .petals-letter,.petals-paper{position:relative;height:auto;overflow:visible}.petals-paper-next,#petals-opening{display:none!important}}
/* v1.1.1: permanent content windows, measured from the 430px reference canvas. */
#invitation{container-type:inline-size}
.petals-letter-scroll{position:absolute;inset:18.837cqw 14.419cqw 18.605cqw;height:auto;padding:0;gap:22px;overscroll-behavior-y:auto}
.petals-paper-scroll{inset:22.326cqw 14.419cqw 18.605cqw}
#petals-date{left:50%;top:58%;width:auto;max-width:70%;transform:translate(-50%,-50%);padding:0;background:transparent;border:0;box-shadow:none;text-decoration:none;white-space:nowrap;color:#6c5233;font-family:'Cormorant Garamond',serif;font-size:16px;font-weight:500;letter-spacing:.25em;line-height:1.5;pointer-events:none}
@media(max-width:360px){.petals-letter-scroll{padding:0}.petals-paper-scroll{inset-inline:14.419cqw}}
@media print{.petals-letter-scroll,.petals-paper-scroll{position:static;height:auto;overflow:visible}}

/* While the paper is entering, wheel/touch gestures belong to the outer panel. */
.petals-paper:not(.is-docked) .petals-paper-scroll{overflow-y:hidden;pointer-events:none}
.petals-paper:not(.is-docked) .petals-paper-next{pointer-events:none}
.petals-paper.is-docked .petals-paper-scroll{overflow-y:auto;pointer-events:auto}

/* ===== v1.2 — Sangho & Winnie: opening photo, invitation letter, attire, gallery ===== */
/* First paper section sits flush at the top of the scroll. */
.petals-paper-scroll>:first-child{margin-top:0}
#invitation #letter,#invitation #dress{min-height:100%;padding:4px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:72px}
#invitation #gallery{padding:18px 0 10px;display:flex;flex-direction:column;align-items:center;margin-top:72px}
#invitation #letter h2,#invitation #dress h2,#invitation #gallery h2{font-size:26px;letter-spacing:.14em}

/* Opening couple photo in the welcome letter */
.petals-couple{margin:0 auto}
.petals-couple img{width:min(200px,56%);aspect-ratio:3/4;object-fit:cover;object-position:center 28%;border-radius:14px;border:5px solid #fff;box-shadow:0 12px 30px #6c52331f}

/* Invitation letter (poem) */
#letter .petals-poem{font-size:19px;line-height:1.8;font-style:italic;max-width:300px}
#letter .petals-poem-sign{font-size:34px;line-height:1;margin-top:18px;color:#8a6a3c}

/* Attire / dress code */
.petals-dress-text{font-size:19px;line-height:1.65;max-width:300px}
.petals-swatches{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px auto 0;max-width:250px}
.petals-swatches span{width:34px;height:34px;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 8px #6c523326}
.petals-nowhite{display:inline-flex;align-items:center;gap:9px;margin:22px auto 0;padding:9px 18px;border:1px solid #c2b294;border-radius:30px;background:#fffaf2cc;font-family:'Cinzel',serif;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#6c5233;line-height:1.3}
.petals-nowhite-x{width:15px;height:15px;border-radius:50%;border:1px solid #c7857f;position:relative;flex-shrink:0}
.petals-nowhite-x::before,.petals-nowhite-x::after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1.5px;background:#c7857f}
.petals-nowhite-x::before{transform:translate(-50%,-50%) rotate(45deg)}
.petals-nowhite-x::after{transform:translate(-50%,-50%) rotate(-45deg)}

/* Gallery — true masonry so mixed portrait/landscape photos sit cleanly */
.petals-gallery{column-count:2;column-gap:8px;margin:16px auto 6px;width:100%}
.petals-shot{display:block;width:100%;break-inside:avoid;margin:0 0 8px;padding:0;border:0;border-radius:8px;overflow:hidden;background:#e8ddcd;cursor:pointer;line-height:0;box-shadow:0 6px 18px #6c523318}
.petals-shot img{width:100%;height:auto;display:block;transition:transform .8s cubic-bezier(.2,.7,.2,1)}
.petals-shot:hover img{transform:scale(1.05)}

/* Lightbox */
.petals-lightbox{position:fixed;inset:0;z-index:200;background:rgba(44,35,27,.93);display:flex;align-items:center;justify-content:center;padding:6vw}
.petals-lightbox[hidden]{display:none}
#petals-lb-img{max-width:100%;max-height:88vh;border-radius:6px;box-shadow:0 24px 70px #0007}
.petals-lb-close,.petals-lb-prev,.petals-lb-next{position:absolute;color:#6c5233;background:#fffcf5e6;border:1px solid #cabb9f;border-radius:50%;width:46px;height:46px;font-size:26px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .25s,background .25s}
.petals-lb-close:hover,.petals-lb-prev:hover,.petals-lb-next:hover{background:#fff;transform:scale(1.06)}
.petals-lb-close{top:18px;right:18px}
.petals-lb-prev{left:max(12px,3vw);top:50%;transform:translateY(-50%)}
.petals-lb-next{right:max(12px,3vw);top:50%;transform:translateY(-50%)}
.petals-lb-prev:hover{transform:translateY(-50%) scale(1.06)}
.petals-lb-next:hover{transform:translateY(-50%) scale(1.06)}
@media(max-width:360px){.petals-couple img{width:62%}#letter .petals-poem,.petals-dress-text{font-size:18px}}

/* ===== v1.3 — White with a touch of pastel green + polished framing ===== */
:root{
  --sg-ink:#44554a;        /* deep sage — headings */
  --sg-body:#5a6a59;       /* muted green-grey — body */
  --sg-accent:#80997c;     /* pastel sage accent */
  --sg-accent-deep:#5f7d5c;/* deeper sage — names/links */
  --sg-line:#baccb4;       /* soft green hairline */
  --sg-soft:#dce8d6;       /* very soft green */
}
/* Lighten everything toward white, cool it faintly green */
body.cl-invitation{background:#f3f7f1;color:var(--sg-body)}
#invitation{background:#fbfdf9}
#invitation .petals-letter{background-color:#fbfdf9}
.petals-paper{background-color:#fbfdf9;background-image:linear-gradient(rgba(251,253,249,.64),rgba(246,251,245,.64)),url(petals/s345-bg.jpg);background-size:cover;background-position:center;background-repeat:no-repeat}
/* Typography colours → sage */
#invitation h2,#invitation #venue h3{color:var(--sg-ink)}
#invitation p,.petals-letter p{color:var(--sg-body)}
.petals-letter h1,.petals-script,#letter .petals-poem-sign,#invitation #thanks h2{color:var(--sg-accent-deep)}
.petals-subtitle{color:var(--sg-accent)}
.petals-credit{color:var(--sg-accent)}
#petals-date{color:var(--sg-ink)}
/* Tint the gold floral ornaments to a soft sage */
.petals-sep,.petals-divider,.petals-count>div,.petals-program img,.petals-next img,.petals-paper-next img{filter:sepia(.42) hue-rotate(58deg) saturate(.6) brightness(1.04)}
.petals-program:before,.petals-program li:before{background:#fbfdf9;border-color:var(--sg-line)!important}
.petals-program li:before{border:1px solid var(--sg-line)}
/* Directions button → sage */
.petals-floral-button{filter:sepia(.4) hue-rotate(58deg) saturate(.55) brightness(1.04);color:#41563f}

/* Polished, larger opening couple photo — white mat + double sage frame */
.petals-couple{position:relative;margin:2px auto 6px;padding:9px;background:#fff;border:1px solid var(--sg-line);box-shadow:0 20px 46px rgba(68,85,74,.18);width:max-content;max-width:80%}
.petals-couple-frame{position:absolute;inset:4px;border:1px solid var(--sg-soft);pointer-events:none;z-index:1}
.petals-couple img{display:block;width:min(242px,66vw);aspect-ratio:4/5;object-fit:cover;object-position:center 20%}
.petals-intro{font-size:19px;letter-spacing:.01em;color:var(--sg-body)}
.petals-when{letter-spacing:.02em}

/* Framed venue (hotel) photo — portrait to suit the building */
.petals-venue-photo{width:228px;max-width:84%;aspect-ratio:auto;object-fit:initial;border-radius:0;margin:18px auto 8px;padding:8px;background:#fff;border:1px solid var(--sg-line);box-shadow:0 16px 36px rgba(68,85,74,.16)}
.petals-venue-photo img{display:block;width:100%;aspect-ratio:4/5;object-fit:cover;object-position:center 32%}

/* Attire: sage pill */
.petals-swatches span{border-color:#fff;box-shadow:0 2px 8px rgba(68,85,74,.18)}
.petals-nowhite{border-color:var(--sg-line);background:#fbfdf9e6;color:var(--sg-ink)}
.petals-nowhite-x{border-color:var(--sg-accent)}
.petals-nowhite-x::before,.petals-nowhite-x::after{background:var(--sg-accent)}

/* Gallery + lightbox accents */
.petals-shot{box-shadow:0 8px 20px rgba(68,85,74,.16);background:#eef3ec}
.petals-lightbox{background:rgba(38,48,40,.94)}
.petals-lb-close,.petals-lb-prev,.petals-lb-next{color:var(--sg-ink);background:#fbfdf9f2;border-color:var(--sg-line)}

/* Music button */
.cl-music{background:#fbfdf9e6;color:var(--sg-accent-deep);border-color:var(--sg-line)}

/* ===== v1.4 — refined matching sage, tighter heading spacing, venue name only ===== */
:root{
  --sg-ink:#4a564c;        /* deep desaturated sage — headings */
  --sg-body:#606a5f;       /* soft neutral green-grey — body */
  --sg-accent:#88a083;     /* sage accent */
  --sg-accent-deep:#6f8a69;/* clear muted sage — names/script */
  --sg-line:#bdcdb6;
  --sg-soft:#dde7d6;
}
/* One cohesive, cooler sage tint for all floral ornaments (no more olive/yellow) */
.petals-sep,.petals-divider,.petals-count>div,.petals-program img,.petals-next img,.petals-paper-next img{filter:grayscale(.66) sepia(.4) hue-rotate(66deg) saturate(.5) brightness(1.03)}
.petals-floral-button{filter:grayscale(.6) sepia(.38) hue-rotate(66deg) saturate(.5) brightness(1.04);color:#46543f}
/* Tighter spacing — content sits together, not floating across full-screen gaps */
.petals-schedule{min-height:auto;padding:8px 0}
#invitation #venue,#invitation #letter,#invitation #dress,#invitation #thanks{min-height:auto;padding:40px 0;margin-top:30px}
#invitation #gallery{min-height:auto;padding:30px 0 10px;margin-top:30px}
.petals-letter-scroll{gap:18px}
.petals-sep{margin:8px auto}
.petals-divider{margin:6px auto}
