/* Story pages layout — see story.js. Swipe = native horizontal scroll-snap. */
body.storymode { overflow: hidden; }
.story { position: fixed; inset: 0; z-index: 20; }
.story .rv { opacity: 1 !important; transform: none !important; }
.st-track { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.st-track::-webkit-scrollbar { display: none; }
.st-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; isolation: isolate; }
.st-in { position: relative; z-index: 1; height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 76px 28px 96px; text-align: center; max-width: 560px; margin: 0 auto; }
.st-in p { margin: 0; }
.st-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.st-bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* tones */
.st-dark { --st-ink: #f1cd7c; --st-text: #f3ead2; --st-gold: #e0b45e; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--env) 85%, #1d4a2e), var(--env-deep) 75%); color: var(--st-text); }
.st-light { --st-ink: #8a1f2b; --st-text: #5f4334; --st-gold: #b58a3a; background: linear-gradient(180deg, #fbf3e6, #f2e3c9); color: var(--st-text); }
.st-photo { --st-ink: #fff4dc; --st-text: #fff4dc; --st-gold: #f1cd7c; background: #000; color: var(--st-text); }
.st-photo .st-decor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.05) 40%, rgba(0,0,0,.55)); }
.st-photo .st-in { justify-content: flex-start; }
.st-k-venue.st-photo .st-in { justify-content: flex-end; }

/* type */
.st-bless { font-family: var(--f-verse); font-size: 15px; letter-spacing: .18em; color: var(--st-gold); }
.st-sym { font-family: var(--f-verse); font-size: 54px; line-height: 1; color: var(--st-gold); margin: 10px 0 !important; }
.st-greet { font-family: var(--f-script); font-size: calc(26px * var(--ss)); color: var(--st-gold); }
.st-eyebrow { font-size: 12.5px; letter-spacing: .3em; line-height: 1.7; color: var(--st-text); opacity: .92; margin: 6px 0 !important; }
.st-name { font-family: var(--f-body); font-weight: 500; font-size: calc(clamp(52px, 15vw, 76px) * var(--bs)); line-height: 1.04; color: var(--st-ink); }
.st-dark .st-name { background: linear-gradient(180deg, #fff3c9, #e6b85c 60%, #a8741f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-names.big .st-name { font-family: var(--f-script); font-weight: 400; font-size: calc(clamp(62px, 18vw, 92px) * var(--ss)); }
.st-and { font-family: var(--f-script); font-size: calc(30px * var(--ss)); color: var(--st-gold); margin: -4px 0 -6px !important; }
.st-sub { font-size: 12.5px; letter-spacing: .3em; margin-top: 10px !important; }
.st-title, .st-thanks { font-family: var(--f-script); font-size: calc(clamp(50px, 14vw, 68px) * var(--ss)); line-height: 1.1; color: var(--st-ink); }
.st-thanks { font-size: calc(clamp(60px, 17vw, 84px) * var(--ss)); }
.st-script { font-family: var(--f-script); font-size: calc(clamp(56px, 16vw, 78px) * var(--ss)); line-height: 1.1; color: var(--st-ink); margin: 2px 0 10px !important; }
.st-quote { font-family: var(--f-body); font-size: clamp(30px, 8.5vw, 40px); line-height: 1.25; color: var(--st-ink); margin-top: 20px !important; max-width: 330px; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.st-light .st-quote { text-shadow: none; }
.st-rule { display: block; width: 110px; height: 1px; margin: 14px 0; background: linear-gradient(90deg, transparent, var(--st-gold), transparent); }

/* rows, timeline, cards */
.st-rows { display: grid; gap: 18px; width: 100%; max-width: 330px; margin: 14px 0 18px; text-align: start; }
.st-rows > div { display: flex; align-items: center; gap: 16px; }
.st-rows b { display: block; font-size: 18px; font-weight: 600; color: var(--st-text); }
.st-rows span { font-size: 15px; opacity: .8; }
.st-i { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; color: var(--st-gold); }
.st-i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-i.sm { width: 16px; height: 16px; }
.st-i.big { width: 40px; height: 40px; margin-bottom: 4px; }
.st-i.bubble { width: 58px; height: 58px; padding: 14px; border-radius: 50%; background: color-mix(in srgb, var(--st-gold) 18%, transparent); border: 1px solid color-mix(in srgb, var(--st-gold) 40%, transparent); }
.st-i.heart { margin-top: 10px; }
.st-tl, .st-story { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 18px; width: 100%; max-width: 360px; text-align: start; position: relative; }
.st-tl::before, .st-story::before { content: ''; position: absolute; left: 29px; top: 20px; bottom: 20px; width: 1px; background: color-mix(in srgb, var(--st-gold) 45%, transparent); }
.st-tl li, .st-story li { display: flex; gap: 16px; align-items: flex-start; position: relative; }
.st-tl b, .st-story b { display: block; font-size: 18px; font-weight: 600; color: var(--st-ink); }
.st-tl span, .st-story span { display: block; font-size: 14.5px; line-height: 1.45; opacity: .85; }
.st-dark .st-tl b, .st-dark .st-story b { color: var(--st-ink); }
.st-card { display: grid; justify-items: center; gap: 6px; padding: 24px 22px; border-radius: 22px; background: rgba(20, 12, 4, .55); backdrop-filter: blur(8px); border: 1px solid color-mix(in srgb, var(--st-gold) 35%, transparent); color: #fff4dc; margin-top: 18px; min-width: 260px; }
.st-card b { font-size: 21px; }
.st-card span { font-size: 15px; opacity: .85; }
.st-gal { display: grid; gap: 8px; width: 100%; margin-top: 14px; }
.st-gal img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--st-gold) 35%, transparent); }
.st-gal.n1 img { aspect-ratio: 4 / 5; }
.st-gal.n2 { grid-template-columns: 1fr 1fr; } .st-gal.n2 img { aspect-ratio: 3 / 4; }
.st-gal.n3, .st-gal.n4 { grid-template-columns: repeat(3, 1fr); } .st-gal.n3 img:first-child, .st-gal.n4 img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; } .st-gal img { aspect-ratio: 3 / 4; }
.st-gal.n4 img:nth-child(n+2) { aspect-ratio: 3 / 4; }
.st-storyimg { width: min(80%, 320px); max-height: 30svh; object-fit: cover; border-radius: 18px; margin-top: 18px; }
.st-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font: 600 15px/1 var(--f-body); color: #2a1a06; background: linear-gradient(90deg, #f7dfa0, #e2b45c); box-shadow: 0 12px 28px -12px rgba(0,0,0,.5); }
.st-btn.ghost { background: transparent; color: var(--st-ink); border: 1.5px solid var(--st-gold); }
.st-slide .block { width: 100%; text-align: center; }
.st-slide .block .sec-title { color: var(--st-ink); }

/* decor */
.st-lamp { position: absolute; top: 0; width: 46px; height: 130px; }
.st-lamp.l { left: 8%; } .st-lamp.r { right: 8%; }
.st-strand { position: absolute; top: 0; width: 18px; height: 48%; }
.st-strand.l { left: 2%; } .st-strand.r { right: 2%; }
.st-fl { position: absolute; width: 44%; height: 24%; }
.st-fl.tl { left: -8%; top: -2%; } .st-fl.tr { right: -8%; top: -2%; transform: scaleX(-1); } .st-fl.br { right: -10%; bottom: -2%; transform: rotate(180deg); }
.st-arch { position: absolute; left: 7%; right: 7%; top: 5%; bottom: 7%; border-radius: 50% 50% 14px 14px / 24% 24% 14px 14px; border: 2px solid #c9a35a; box-shadow: inset 0 0 0 7px rgba(201,163,90,.12), inset 0 0 0 8px rgba(201,163,90,.5); }
.st-palm { position: absolute; bottom: 0; width: 46%; height: 40%; opacity: .45; }
.st-palm.l { left: -14%; } .st-palm.r { right: -14%; }

/* entrance: the page you land on settles in */
.st-slide .st-in > * { transition: opacity .7s ease, transform .7s ease; }
.st-slide:not(.on) .st-in > * { opacity: 0; transform: translate3d(0, 18px, 0); }

/* chrome */
.st-nav { position: absolute; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.28); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.st-nav .st-i { color: #fff; width: 20px; height: 20px; }
.st-nav.back { top: calc(14px + env(safe-area-inset-top)); left: 14px; }
.st-nav.menu { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.story.at-start .st-nav.back { opacity: 0; pointer-events: none; }
.st-foot { position: absolute; z-index: 30; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: center; pointer-events: none; }
.st-foot > * { pointer-events: auto; }
.st-count { font-family: var(--f-caps); font-size: 13px; letter-spacing: .2em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); padding: 6px 14px; border-radius: 99px; background: rgba(0,0,0,.25); }
.st-nav.next { position: absolute; right: 16px; bottom: -6px; width: 48px; height: 48px; border-color: color-mix(in srgb, var(--gold) 70%, transparent); }
.story.at-end .st-nav.next { opacity: 0; pointer-events: none; }
.st-menu { position: absolute; z-index: 31; top: calc(64px + env(safe-area-inset-top)); right: 14px; min-width: 200px; max-height: 70vh; overflow: auto; padding: 8px; border-radius: 16px; background: rgba(15, 10, 6, .92); border: 1px solid rgba(255,255,255,.15); display: grid; }
.st-menu button { text-align: start; padding: 11px 14px; border: 0; background: none; color: #f6ead2; font: 500 15px var(--f-body); border-radius: 10px; cursor: pointer; }
.st-menu button:hover { background: rgba(255,255,255,.08); }
.storymode .music { bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 32; }
.st-k-thanks .brand { background: none; color: var(--st-text); padding: 18px 0 0; }
.st-k-thanks .brand p { color: var(--st-text); }
.st-k-thanks .brand strong { color: var(--st-ink); }
@media (prefers-reduced-motion: reduce) { .st-slide .st-in > * { transition: none; } .st-slide:not(.on) .st-in > * { opacity: 1; transform: none; } }
.st-k-thanks .brand-links a { color: var(--st-ink); background: rgba(0,0,0,.06); }
.st-menu[hidden] { display: none; }
/* cream pages: the page's own sections (RSVP, wishes) use cream colours too */
.st-light { --paper: #fffaf2; --text: #5f4334; --ink: #8a1f2b; --muted: #8a6f5e; --gold: #b58a3a; --soft: rgba(181,138,58,.14); }
