/*
 * Palembang Songket: the royal Aesan Gede wedding of Palembang. Rich lacquer red and gold foil.
 * Ornaments are inline SVG symbols (sections/_defs): songket bands of pucuk rebung teeth and
 * bintang berante stars, lacquer tendril corners, the Aesan Gede crown, the limas roof, the Ampera bridge.
 * Sections rotate between lacquer red (default tokens), ivory (.ps-section--ivory) and deep songket
 * (.ps-section--deep). Colors from the variant: --inv-primary, --inv-accent, --inv-background,
 * --inv-text, --inv-surface, --inv-ivory, --inv-ink, --inv-label. All classes start with "ps-".
 */

:root {
    --inv-primary: #9a1624;
    --inv-accent: #d4a646;
    --inv-background: #3a070e;
    --inv-text: #f8ecd6;
    --inv-surface: #4f0d17;
    --inv-ivory: #f8f0e1;
    --inv-ink: #230408;
    --inv-label: #e8c066;
    --inv-radius: 14px;

    --ps-w: 460px;
    /* distance from the viewport edge to the column (0 on phones) */
    --ps-edge: max(0px, calc((100vw - var(--ps-w)) / 2));
    --ps-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
    --ps-script: 'Pinyon Script', 'Great Vibes', 'Brush Script MT', cursive;
    --ps-serif: 'Cormorant Garamond', Garamond, Georgia, serif;
    --ps-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ps-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

    /* gold foil, as a background */
    --ps-gold-bg: linear-gradient(120deg, color-mix(in srgb, var(--inv-accent) 55%, #fff) 0%, var(--inv-accent) 28%, color-mix(in srgb, var(--inv-accent) 70%, #3b2000) 52%, color-mix(in srgb, var(--inv-accent) 68%, #fff) 78%, var(--inv-accent) 100%);
    --ps-deep: color-mix(in srgb, var(--inv-background) 78%, #000);
    --ps-red-deep: color-mix(in srgb, var(--inv-primary) 70%, var(--inv-ink));

    /* context tokens: lacquer red by default, redefined for ivory and deep sections */
    --ps-fg: var(--inv-text);
    --ps-muted: color-mix(in srgb, var(--inv-text) 82%, transparent);
    --ps-gold: var(--inv-label);
    --ps-title: var(--inv-label);
    --ps-line: color-mix(in srgb, var(--inv-accent) 55%, transparent);
    --ps-line-soft: color-mix(in srgb, var(--inv-accent) 24%, transparent);
    --ps-btn-bg: var(--ps-gold-bg);
    --ps-btn-fg: var(--inv-ink);
    --ps-card-bg: linear-gradient(170deg, color-mix(in srgb, var(--inv-surface) 92%, #fff 4%), color-mix(in srgb, var(--inv-surface) 80%, var(--inv-ink)));
    --ps-field-bg: color-mix(in srgb, var(--inv-ink) 45%, transparent);
    --ps-weave-c: color-mix(in srgb, var(--inv-accent) 12%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--inv-background); scroll-behavior: smooth; }

body.ps-body {
    margin: 0;
    background: var(--inv-background);
    color: var(--inv-text);
    font: 500 1.08rem/1.65 var(--ps-serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }

.ps-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ps-icon { width: 1.1em; height: 1.1em; flex: none; }

/* the woven songket lattice: thin gold diagonals crossing at small dots */
.ps-section, .ps-hero, .ps-event, .ps-backdrop::after {
    --ps-weave:
        radial-gradient(circle, var(--ps-weave-c) 0 1.4px, transparent 1.9px) 0 0 / 22px 22px,
        linear-gradient(45deg, transparent calc(50% - .6px), var(--ps-weave-c) calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)) 11px 11px / 22px 22px,
        linear-gradient(-45deg, transparent calc(50% - .6px), var(--ps-weave-c) calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)) 11px 11px / 22px 22px;
}

/* ---------- backdrop (wide screens) and the column ---------- */

.ps-backdrop {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background: var(--ps-deep);
}
.ps-backdrop::before {
    content: ''; position: absolute; inset: -60px;
    background: var(--ps-photo, none) center / cover no-repeat;
    filter: blur(26px) saturate(.7) brightness(.45);
}
.ps-backdrop::after {
    --ps-weave-c: color-mix(in srgb, var(--inv-accent) 20%, transparent);
    content: ''; position: absolute; inset: 0;
    background:
        var(--ps-weave),
        radial-gradient(ellipse at center, color-mix(in srgb, var(--inv-primary) 45%, transparent) 10%, color-mix(in srgb, var(--inv-ink) 90%, transparent) 100%);
}

.ps-page {
    position: relative; z-index: 1;
    width: min(100%, var(--ps-w)); min-height: 100vh; margin: 0 auto;
    background: var(--inv-background);
    overflow-x: clip;
}

@media (min-width: 520px) {
    .ps-page { box-shadow: 0 0 0 1px var(--ps-line-soft), 0 0 0 7px color-mix(in srgb, var(--inv-ink) 80%, transparent), 0 0 0 8px var(--ps-line), 0 0 90px rgb(0 0 0 / .6); }
}
@media (max-width: 519px) {
    .ps-backdrop { display: none; }
}

.ps-preview {
    position: fixed; z-index: 60; top: 0; left: 0; right: 0;
    width: min(100%, var(--ps-w)); margin: 0 auto; padding: .35rem .75rem;
    background: var(--ps-gold-bg); color: var(--inv-ink);
    font: 500 .68rem/1.3 var(--ps-sans); text-align: center; letter-spacing: .03em;
}

/* ---------- ornaments: songket band, corners, divider ---------- */

.ps-songket { height: 28px; line-height: 0; filter: drop-shadow(0 5px 8px rgb(0 0 0 / .35)); }
.ps-songket svg { display: block; }

.ps-corners { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; color: var(--ps-gold); }
.ps-corner { position: absolute; width: clamp(110px, 31vw, 146px); aspect-ratio: 1; }
.ps-corner svg {
    overflow: visible;
    display: block; width: 100%; height: 100%;
    transform-origin: 6% 6%;
    animation: ps-sway 7s ease-in-out infinite alternate;
    will-change: transform;
}
.ps-corner--tl { top: 0; left: 0; }
.ps-corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.ps-corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.ps-corner--br { bottom: 0; right: 0; transform: scale(-1, -1); }
.ps-corner--tr svg { animation-delay: -2.4s; animation-duration: 8s; }
.ps-corner--bl svg { animation-delay: -4s; animation-duration: 7.5s; }
.ps-corner--br svg { animation-delay: -1.3s; animation-duration: 8.5s; }

@keyframes ps-sway {
    from { transform: rotate(-1.6deg) scale(1); }
    to { transform: rotate(1.4deg) scale(1.03); }
}

.ps-divider { display: flex; align-items: center; justify-content: center; gap: .3rem; margin: .8rem auto 0; color: var(--ps-gold); }
.ps-divider__line { width: 4.2rem; height: 1px; background: linear-gradient(90deg, transparent, var(--ps-gold)); }
.ps-divider__line--end { transform: scaleX(-1); }
.ps-divider__rebung { width: .8rem; height: 1.2rem; overflow: visible; }
.ps-divider__star { width: 1.5rem; height: 1.5rem; margin: 0 .15rem; overflow: visible; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); }

/* small-caps label */
.ps-kicker {
    position: relative; z-index: 2;
    font: 600 .74rem/1.4 var(--ps-display); letter-spacing: .36em; text-transform: uppercase;
    color: var(--ps-gold);
}

/* ---------- buttons (shared components) ---------- */

.inv-button {
    gap: .55rem; padding: .85rem 1.5rem; border-radius: 999px;
    background: var(--ps-btn-bg); color: var(--ps-btn-fg);
    font: 600 .74rem/1.2 var(--ps-sans); letter-spacing: .16em; text-transform: uppercase;
    box-shadow: 0 10px 22px -12px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .35), inset 0 0 0 1px color-mix(in srgb, var(--inv-ink) 20%, transparent);
}
.inv-button--outline {
    background: transparent; color: var(--ps-gold);
    box-shadow: inset 0 0 0 1px var(--ps-line);
}
.inv-button--outline:hover { background: color-mix(in srgb, var(--inv-accent) 12%, transparent); }
.inv-button .ps-icon { width: 1.15rem; height: 1.15rem; }

.ps-pill {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; padding: .5rem 1.05rem;
    border-radius: 999px; color: var(--ps-gold); text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--ps-line);
    font: 500 .8rem/1 var(--ps-sans); letter-spacing: .04em;
    transition: background .25s ease;
}
.ps-pill:hover { background: color-mix(in srgb, var(--inv-accent) 12%, transparent); }

/* ---------- cover ---------- */

.ps-cover {
    position: fixed; inset: 0; z-index: 30;
    width: min(100%, var(--ps-w)); margin: 0 auto;
    display: flex; overflow-x: hidden; overflow-y: auto;
    background: var(--inv-background); color: var(--inv-text);
}
.ps-cover__photo { position: absolute; inset: 0; background: var(--ps-photo, none) center 30% / cover no-repeat; }
.ps-cover__photo::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(80% 45% at 50% 40%, color-mix(in srgb, var(--inv-primary) 35%, transparent), transparent 80%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-background) 90%, transparent) 0%,
            color-mix(in srgb, var(--inv-background) 66%, transparent) 36%,
            color-mix(in srgb, var(--inv-background) 86%, transparent) 62%,
            color-mix(in srgb, var(--inv-background) 97%, transparent) 100%);
}
.ps-cover__band { position: absolute; z-index: 2; left: 0; right: 0; }
.ps-cover__band--top { top: 0; }
.ps-cover__band--bottom { bottom: 0; }
.ps-cover__frame {
    position: absolute; inset: 40px 12px; z-index: 1; pointer-events: none;
    border: 1px solid var(--ps-line);
}
.ps-cover__frame::after { content: ''; position: absolute; inset: 5px; border: 1px solid var(--ps-line-soft); }
.ps-cover > .ps-corners { inset: 34px 6px; }
.ps-cover .ps-corner { width: clamp(96px, 27vw, 124px); }
.ps-cover__inner {
    position: relative; z-index: 2;
    width: 100%; margin: auto; padding: 3.6rem 1.8rem 3.8rem;
    display: flex; flex-direction: column; align-items: center; gap: .7rem;
    text-align: center;
}

/* crest: the Aesan Gede crown over a round red medallion with the monogram */
.ps-crest { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: .2rem; }
.ps-crest__crown {
    position: relative; z-index: 2; display: block; width: 9.5rem; aspect-ratio: 200 / 120; margin-bottom: -1.2rem; overflow: visible;
    filter: drop-shadow(0 8px 10px rgb(0 0 0 / .45));
}
.ps-mono {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    width: 5.6rem; height: 5.6rem; border-radius: 50%; padding-top: .35rem;
    font: 600 1.45rem/1 var(--ps-display); color: color-mix(in srgb, var(--inv-accent) 50%, #fff);
    border: 3px solid transparent;
    background:
        radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--inv-primary) 90%, #fff 8%), var(--ps-red-deep) 80%) padding-box,
        var(--ps-gold-bg) border-box;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--inv-ink) 60%, transparent), 0 0 0 5px var(--ps-line), 0 14px 24px -10px rgb(0 0 0 / .6);
}
.ps-mono__sep { width: 1px; height: 1.3rem; background: var(--inv-accent); transform: rotate(22deg); }

.ps-cover__names {
    display: flex; flex-direction: column; align-items: center;
    font: 400 clamp(2.9rem, 14vw, 3.8rem)/1.15 var(--ps-script); color: var(--ps-gold);
    text-shadow: 0 2px 14px color-mix(in srgb, var(--inv-background) 80%, transparent);
}
.ps-cover__amp { font: 500 .4em/1.3 var(--ps-display); color: var(--inv-text); }

.ps-cover__date {
    display: flex; align-items: center; gap: .7rem;
    font: 600 .76rem/1.4 var(--ps-display); letter-spacing: .2em; text-transform: uppercase;
}
.ps-cover__date::before, .ps-cover__date::after {
    content: ''; width: 7px; height: 7px; background: var(--inv-primary);
    box-shadow: 0 0 0 1px var(--inv-accent); transform: rotate(45deg);
}

.ps-cover__quote { max-width: 21rem; font: italic 500 1.02rem/1.5 var(--ps-serif); color: var(--ps-muted); }

.ps-guest {
    position: relative; width: min(100%, 19rem); margin-top: .3rem; padding: 1rem 1.2rem .95rem;
    border: 1px solid var(--ps-line); border-radius: 4px;
    outline: 1px solid var(--ps-line-soft); outline-offset: -6px;
    background: color-mix(in srgb, var(--inv-background) 72%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ps-guest::before, .ps-guest::after {
    content: ''; position: absolute; top: -5px; width: 9px; height: 9px;
    background: var(--inv-primary); box-shadow: 0 0 0 1px var(--inv-accent); transform: rotate(45deg);
}
.ps-guest::before { left: -5px; }
.ps-guest::after { right: -5px; }
.ps-guest__label { font: 600 .66rem/1.4 var(--ps-display); letter-spacing: .3em; text-transform: uppercase; color: var(--ps-gold); }
.ps-guest__name { margin-top: .35rem; font: 600 1.15rem/1.3 var(--ps-display); overflow-wrap: anywhere; }
.ps-guest__note { margin-top: .4rem; font: 500 .95rem/1.45 var(--ps-serif); color: var(--ps-muted); }

.ps-open { margin-top: .4rem; }

.ps-cover--leave { transition: transform 1.1s cubic-bezier(.7, 0, .3, 1), opacity 1.1s ease; }
.ps-cover--gone { transform: translateY(-100%); opacity: 0; }

/* ---------- hero (top of the page after opening) ---------- */

.ps-hero {
    position: relative; overflow: hidden;
    min-height: min(100vh, 900px); min-height: min(100svh, 900px); padding: 4.5rem 1.5rem 3.5rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    background:
        var(--ps-weave),
        radial-gradient(90% 55% at 50% 45%, color-mix(in srgb, var(--inv-primary) 40%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-background), var(--ps-deep));
}
.ps-hero > .ps-songket { position: absolute; z-index: 3; top: 0; left: 0; right: 0; }
.ps-hero > .ps-corners { top: 28px; }

/* the arch: the crown (or the limas roof) over the photo in a gold arch frame */
.ps-arch { position: relative; z-index: 2; width: min(64%, 240px); margin: 1rem auto 1.4rem; }
.ps-arch__crown {
    position: relative; z-index: 2; display: block;
    width: 74%; margin: 0 auto -2.4rem; aspect-ratio: 200 / 120; overflow: visible;
    filter: drop-shadow(0 8px 10px rgb(0 0 0 / .5));
}
.ps-arch__roof {
    position: relative; z-index: 2; display: block;
    width: 150%; margin: 0 -25% .2rem; aspect-ratio: 160 / 40; overflow: visible; color: var(--ps-gold);
}
.ps-arch__photo {
    position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4;
    border: 3px solid transparent; border-radius: 999px 999px 10px 10px;
    background:
        var(--ps-photo, none) center 25% / cover no-repeat padding-box,
        linear-gradient(160deg, var(--inv-primary), var(--inv-ink)) padding-box,
        var(--ps-gold-bg) border-box;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--inv-ink) 55%, transparent), 0 0 0 7px var(--ps-line), 0 28px 50px -24px rgb(0 0 0 / .75);
}
.ps-arch__mono { display: flex; gap: .3rem; font: 400 4rem/1 var(--ps-script); color: var(--inv-ivory); }

.ps-hero .ps-kicker { margin-bottom: .2rem; }
.ps-hero__names {
    position: relative; z-index: 2; margin-top: 1.2rem;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .45rem;
    font: 400 clamp(2.6rem, 12vw, 3.3rem)/1.25 var(--ps-script); color: var(--ps-gold);
}
.ps-hero__amp { font: 500 .42em/1 var(--ps-display); color: var(--inv-text); }
.ps-hero__date {
    position: relative; z-index: 2; margin-top: .3rem;
    font: 600 .76rem/1.4 var(--ps-display); letter-spacing: .22em; text-transform: uppercase; color: var(--ps-muted);
}

.ps-scroll { position: relative; z-index: 2; width: 1px; height: 3rem; margin-top: 1.6rem; background: var(--ps-line-soft); overflow: hidden; }
.ps-scroll span { position: absolute; left: 0; top: -1rem; width: 1px; height: 1rem; background: var(--inv-accent); animation: ps-drip 2.2s ease-in-out infinite; }
@keyframes ps-drip { to { transform: translateY(4rem); } }

/* ---------- sections ---------- */

.ps-main { position: relative; background: var(--inv-background); }

/* lacquer red: woven lattice over a red glow on the dark ground */
.ps-section {
    position: relative; overflow: hidden;
    padding: 4.5rem 1.5rem;
    text-align: center; color: var(--ps-fg);
    background:
        var(--ps-weave),
        radial-gradient(110% 55% at 50% 0%, color-mix(in srgb, var(--inv-primary) 42%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-background), var(--ps-deep));
}
/* ivory: cream silk with a faint gold weave */
.ps-section--ivory {
    --ps-fg: var(--inv-ink);
    --ps-muted: color-mix(in srgb, var(--inv-ink) 82%, transparent);
    --ps-gold: color-mix(in srgb, var(--inv-label) 58%, var(--inv-ink));
    --ps-title: var(--inv-primary);
    --ps-line: color-mix(in srgb, color-mix(in srgb, var(--inv-accent) 65%, var(--inv-ink)) 50%, transparent);
    --ps-line-soft: color-mix(in srgb, color-mix(in srgb, var(--inv-accent) 65%, var(--inv-ink)) 22%, transparent);
    --ps-btn-bg: linear-gradient(135deg, color-mix(in srgb, var(--inv-primary) 92%, #fff 8%), var(--ps-red-deep));
    --ps-btn-fg: #fff;
    --ps-card-bg: linear-gradient(170deg, #fff, color-mix(in srgb, #fff 70%, var(--inv-ivory)));
    --ps-field-bg: #fff;
    --ps-weave-c: color-mix(in srgb, var(--inv-accent) 22%, transparent);
    background:
        var(--ps-weave),
        linear-gradient(180deg, var(--inv-ivory), color-mix(in srgb, var(--inv-ivory) 88%, var(--inv-accent)));
}
/* deep songket: a denser gold weave on the darkest red */
.ps-section--deep {
    --ps-weave-c: color-mix(in srgb, var(--inv-accent) 20%, transparent);
    background:
        var(--ps-weave),
        radial-gradient(90% 60% at 50% 50%, color-mix(in srgb, var(--inv-primary) 55%, transparent), transparent 80%),
        linear-gradient(180deg, var(--ps-deep), var(--inv-background) 50%, var(--ps-deep));
}

.ps-section > * { position: relative; z-index: 1; }
.ps-section > .ps-corners { position: absolute; z-index: 0; }
.ps-section > .ps-corners .ps-corner { width: clamp(96px, 27vw, 124px); opacity: .85; }
/* a songket band across the top of a section */
.ps-section > .ps-songket { position: absolute; z-index: 2; top: 0; left: 0; right: 0; }
.ps-section:has(> .ps-songket) { padding-top: 6rem; }
.ps-section:has(> .ps-songket) > .ps-corners { top: 28px; }

.ps-heading { margin-bottom: 2.2rem; }
.ps-heading__label { font: 600 .7rem/1.4 var(--ps-display); letter-spacing: .34em; text-transform: uppercase; color: var(--ps-gold); }
.ps-heading__title { margin-top: .1rem; font: 400 clamp(2.4rem, 11vw, 2.9rem)/1.3 var(--ps-script); color: var(--ps-title); }

.ps-lead { max-width: 24rem; margin: -.6rem auto 1.6rem; color: var(--ps-muted); }

.ps-card {
    position: relative; overflow: hidden;
    background: var(--ps-card-bg);
    border: 1px solid var(--ps-line-soft); border-radius: 14px;
    box-shadow: 0 24px 44px -30px rgb(0 0 0 / .65);
}

/* opening */
.ps-arabic { font: 400 1.75rem/1.8 'Amiri', serif; color: var(--inv-primary); margin-bottom: .4rem; }
.ps-opening__star { display: block; width: 2rem; height: 2rem; margin: 0 auto 1rem; overflow: visible; }
.ps-opening__greeting { font: 600 1.05rem/1.45 var(--ps-display); color: var(--ps-title); }
.ps-opening__message { max-width: 24rem; margin: 1rem auto 0; color: var(--ps-muted); }
.ps-quote {
    position: relative; max-width: 24rem; margin: 2.6rem auto 0; padding: 0; overflow: hidden;
    background: #fff; border: 1px solid var(--ps-line-soft); border-radius: 4px;
    box-shadow: 0 22px 40px -30px rgb(0 0 0 / .55);
}
.ps-quote .ps-songket { filter: none; }
.ps-quote blockquote { margin: 0; padding: 1.5rem 1.5rem .3rem; font: italic 500 1.08rem/1.65 var(--ps-serif); color: var(--ps-fg); }
.ps-quote figcaption { padding: .6rem 1.5rem 1.4rem; font: 600 .68rem/1.4 var(--ps-display); letter-spacing: .24em; text-transform: uppercase; color: var(--inv-primary); }
.ps-quote:not(:has(figcaption)) blockquote { padding-bottom: 1.4rem; }

/* ---------- couple: zig-zag (R3) ---------- */
.ps-couple .ps-lead { margin-bottom: 2.2rem; }
.ps-person { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.ps-person--right { align-items: flex-end; text-align: right; }
/* a round photo in a woven songket ring */
.ps-person__frame {
    position: relative; flex: none; width: min(62%, 13rem); padding: 7px; border-radius: 50%;
    background:
        repeating-conic-gradient(var(--inv-accent) 0 5deg, var(--ps-red-deep) 5deg 7.5deg, color-mix(in srgb, var(--inv-accent) 60%, #fff) 7.5deg 10deg);
    box-shadow: 0 0 0 1px var(--ps-line), 0 26px 40px -16px rgb(0 0 0 / .7);
}
.ps-person__photo {
    display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
    border: 3px solid var(--inv-background);
}
.ps-person__photo--empty {
    display: grid; place-items: center;
    background: linear-gradient(160deg, var(--inv-primary), var(--inv-ink));
    font: 400 4.5rem/1 var(--ps-script); color: var(--inv-ivory);
}
.ps-person__star { position: absolute; right: 2%; bottom: 6%; width: 2.6rem; height: 2.6rem; overflow: visible; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .45)); }
.ps-person--right .ps-person__star { right: auto; left: 2%; }

.ps-person__text { margin-top: 1rem; padding: 0 .3rem; }
.ps-person__role { font: 600 .64rem/1.4 var(--ps-display); letter-spacing: .3em; text-transform: uppercase; color: var(--ps-muted); }
.ps-person__nick { margin-top: .1rem; font: 400 3rem/1.2 var(--ps-script); color: var(--ps-gold); }
.ps-person__name { font: 600 1.06rem/1.4 var(--ps-display); letter-spacing: .04em; overflow-wrap: anywhere; }
.ps-person__rule { display: block; width: 5rem; height: 1px; margin: .6rem 0 .55rem; background: linear-gradient(90deg, var(--ps-gold), transparent); }
.ps-person--right .ps-person__rule { margin-left: auto; transform: scaleX(-1); }
.ps-person__parents { font-size: 1.02rem; color: var(--ps-muted); }
.ps-person__parents strong { color: var(--ps-fg); font-weight: 700; }

.ps-amp { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.6rem 0 1.4rem; }
.ps-amp svg { width: 1.3rem; height: 1.3rem; overflow: visible; }
.ps-amp::before, .ps-amp::after { content: ''; order: -1; width: 3rem; height: 1px; background: linear-gradient(90deg, transparent, var(--ps-line)); }
.ps-amp::after { order: 5; transform: scaleX(-1); }
.ps-amp span { font: italic 500 3rem/1 var(--ps-serif); color: var(--ps-gold); }

/* ---------- countdown: gold-framed tiles ---------- */
.ps-countdown__date { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.6rem; font: 600 .78rem/1.4 var(--ps-display); letter-spacing: .1em; text-transform: uppercase; }
.ps-countdown__date .ps-icon { color: var(--ps-gold); width: 1.2rem; height: 1.2rem; }
.inv-countdown { gap: .55rem; }
.inv-countdown__item {
    position: relative;
    flex: 1; max-width: 5rem; min-width: 0; padding: 1.05rem .25rem 1rem;
    border-radius: 10px; color: var(--inv-ivory);
    border: 1px solid transparent;
    background:
        linear-gradient(170deg, color-mix(in srgb, var(--inv-primary) 75%, var(--inv-ink)), var(--inv-ink)) padding-box,
        var(--ps-gold-bg) border-box;
    box-shadow: inset 0 0 0 3px var(--inv-ink), inset 0 0 0 4px color-mix(in srgb, var(--inv-accent) 30%, transparent), 0 14px 24px -14px rgb(0 0 0 / .65);
}
/* a small gold lozenge pinned on top of each tile */
.inv-countdown__item::before {
    content: ''; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px;
    background: var(--ps-gold-bg); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--ps-deep);
}
.inv-countdown__value { font: 600 1.8rem/1.1 var(--ps-display); color: color-mix(in srgb, var(--inv-accent) 55%, #fff); }
.inv-countdown__label { margin-top: .3rem; font: 500 .6rem/1.2 var(--ps-sans); letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.inv-countdown__done { font-style: italic; color: var(--ps-muted); }
.inv-countdown__actions { margin-top: 1.6rem; }
.inv-countdown__actions .inv-button { padding: .7rem 1rem; font-size: .62rem; letter-spacing: .1em; }

/* ---------- events: lacquer cards on ivory ---------- */
.ps-events__list { display: grid; gap: 1.2rem; max-width: 24rem; margin: 0 auto; }
.ps-events__bridge { display: block; width: 11rem; height: 2.4rem; margin: .2rem auto; overflow: visible; color: var(--ps-gold); }
.ps-event {
    --ps-fg: var(--inv-text);
    --ps-muted: color-mix(in srgb, var(--inv-text) 84%, transparent);
    --ps-gold: var(--inv-label);
    --ps-line: color-mix(in srgb, var(--inv-accent) 55%, transparent);
    --ps-btn-bg: var(--ps-gold-bg);
    --ps-btn-fg: var(--inv-ink);
    --ps-weave-c: color-mix(in srgb, var(--inv-accent) 14%, transparent);
    overflow: hidden; color: var(--ps-fg);
    background:
        var(--ps-weave),
        radial-gradient(100% 60% at 50% 0%, color-mix(in srgb, var(--inv-primary) 70%, transparent), transparent 80%),
        linear-gradient(180deg, var(--inv-surface), var(--inv-ink));
    border-radius: 18px;
    box-shadow: 0 0 0 1px var(--ps-line), 0 0 0 5px var(--inv-ivory), 0 0 0 6px color-mix(in srgb, var(--inv-accent) 45%, transparent), 0 26px 44px -26px rgb(0 0 0 / .6);
}
.ps-event__photo {
    margin: 1.2rem 1.2rem 0; aspect-ratio: 16 / 10;
    border: 2px solid transparent; border-radius: 999px 999px 8px 8px / 160px 160px 8px 8px;
    background: var(--ps-photo) center 30% / cover no-repeat padding-box, var(--ps-gold-bg) border-box;
}
.ps-event__body { padding: 0 1.2rem 1.5rem; }
.ps-event__star { position: relative; display: block; width: 2.2rem; height: 2.2rem; margin: -1.1rem auto .5rem; overflow: visible; filter: drop-shadow(0 3px 5px rgb(0 0 0 / .45)); }
.ps-event:not(:has(.ps-event__photo)) .ps-event__star { margin-top: 1.4rem; }
.ps-event__name { font: 700 1.2rem/1.3 var(--ps-display); letter-spacing: .04em; color: var(--ps-gold); overflow-wrap: anywhere; }
.ps-event__rows {
    display: grid; gap: .6rem; max-width: 19rem; margin: 1rem auto 1.2rem; padding: 1rem 0 0; list-style: none; text-align: left;
    border-top: 1.5px dotted var(--ps-line);
}
.ps-event__rows li { display: flex; gap: .6rem; align-items: flex-start; font-size: 1.02rem; line-height: 1.4; }
.ps-event__rows .ps-icon { width: 1.15rem; height: 1.15rem; margin-top: .15rem; color: var(--ps-gold); }
.ps-event__rows li > span { min-width: 0; overflow-wrap: anywhere; }
.ps-event__venue { display: block; font-weight: 700; }
.ps-event__address { display: block; font-size: .96rem; color: var(--ps-muted); }
.ps-event .inv-maps .inv-button { padding: .7rem 1.2rem; font-size: .66rem; }
.ps-event > .ps-songket { filter: none; }

/* ---------- love story: vertical timeline ---------- */
.ps-timeline { position: relative; max-width: 24rem; margin: 0 auto; padding: 0; list-style: none; text-align: left; }
.ps-timeline::before {
    content: ''; position: absolute; left: .85rem; top: .5rem; bottom: .5rem; width: 1px;
    background: linear-gradient(180deg, transparent, var(--ps-gold) 6%, var(--ps-gold) 94%, transparent);
}
.ps-timeline__item { position: relative; padding-left: 2.6rem; }
.ps-timeline__item + .ps-timeline__item { margin-top: 1.6rem; }
.ps-timeline__dot {
    position: absolute; left: 0; top: .6rem; width: 1.7rem; height: 1.7rem; overflow: visible;
    filter: drop-shadow(0 0 3px var(--inv-background)) drop-shadow(0 4px 6px rgb(0 0 0 / .45));
}
.ps-timeline__card {
    overflow: hidden; border-radius: 14px;
    background: var(--ps-card-bg);
    box-shadow: inset 0 0 0 1px var(--ps-line-soft), 0 22px 36px -24px rgb(0 0 0 / .7);
}
.ps-timeline__photo { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 2px solid var(--inv-accent); }
.ps-timeline__body { padding: 1rem 1.1rem 1.15rem; }
.ps-timeline__date {
    display: inline-block; margin-bottom: .4rem; padding: .2rem .65rem; border-radius: 999px;
    background: var(--ps-gold-bg); color: var(--inv-ink);
    font: 600 .66rem/1.4 var(--ps-display); letter-spacing: .1em;
}
.ps-timeline__title { font: 600 1.05rem/1.35 var(--ps-display); color: var(--ps-gold); overflow-wrap: anywhere; }
.ps-timeline__story { margin-top: .35rem; font-size: 1rem; line-height: 1.55; color: var(--ps-muted); overflow-wrap: anywhere; }

/* ---------- gallery ---------- */
.inv-gallery { gap: .55rem; }
.inv-gallery__item {
    border-radius: 10px;
    box-shadow: 0 0 0 1px var(--ps-line), 0 0 0 4px #fff, 0 0 0 5px var(--ps-line-soft), 0 16px 26px -18px rgb(0 0 0 / .7);
}
.ps-gallery .inv-gallery { gap: .8rem; padding: .3rem; }
.inv-gallery__item:first-child,
.inv-gallery__item:first-child ~ .inv-gallery__item:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.ps-gallery .inv-gallery__item:first-child { border-radius: 999px 999px 10px 10px / 140px 140px 10px 10px; }
.inv-gallery__play { background: color-mix(in srgb, var(--inv-ink) 70%, transparent); color: var(--inv-ivory); }

/* ---------- live streaming ---------- */
.ps-live__card { max-width: 24rem; margin: 0 auto; padding: 1.7rem 1.4rem; }
.ps-live__badge {
    display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem;
    border-radius: 999px; background: var(--inv-primary); color: #fff;
    font: 600 .66rem/1 var(--ps-sans); letter-spacing: .2em;
    box-shadow: 0 0 0 1px var(--ps-line);
}
.ps-live__badge span { width: .45rem; height: .45rem; border-radius: 50%; background: #ff8a80; animation: ps-blink 1.4s ease-in-out infinite; }
@keyframes ps-blink { 50% { opacity: .25; } }
.ps-live__text { margin: 1rem 0 .5rem; }
.ps-live__note { margin-bottom: 1.2rem; font: 600 1.05rem/1.5 var(--ps-serif); color: var(--ps-gold); }
.ps-live__card .inv-button { margin-top: .6rem; }

/* ---------- gift: red-gold bank cards, two per row (a lonely last card spans both) ---------- */
.inv-gift { display: grid; gap: .9rem; max-width: 22rem; margin: 0 auto; }
.inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inv-gift__account {
    position: relative; overflow: hidden; isolation: isolate; min-width: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .45rem;
    grid-template-areas: "chip bank" "number number" "holder holder" "button button";
    margin: 0; padding: .8rem .8rem 1.3rem;
    border-radius: 16px; text-align: left; color: var(--inv-ivory);
    background:
        linear-gradient(118deg, transparent 22%, rgb(255 255 255 / .1) 36%, transparent 50%),
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--inv-primary) 85%, transparent), transparent 70%),
        linear-gradient(150deg, var(--ps-red-deep), var(--inv-ink) 78%);
    box-shadow: 0 18px 30px -18px rgb(0 0 0 / .8), inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 50%, transparent);
}
.inv-gift__account + .inv-gift__account { margin-top: 0; }
.inv-gift__account::before {
    content: ''; grid-area: chip; width: 1.7rem; height: 1.3rem; border-radius: .3rem;
    background:
        linear-gradient(90deg, transparent 31%, rgb(0 0 0 / .25) 31% 33%, transparent 33% 67%, rgb(0 0 0 / .25) 67% 69%, transparent 69%),
        linear-gradient(0deg, transparent 47%, rgb(0 0 0 / .25) 47% 53%, transparent 53%),
        linear-gradient(135deg, #f6e6c4, #c9a160 55%, #ead3a2);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2);
}
/* a songket stripe of gold teeth along the card's foot */
.inv-gift__account::after {
    content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: .7rem;
    background:
        conic-gradient(from 153.43deg at 50% 0, var(--inv-accent) 53.13deg, transparent 0) 0 3px / 10px 100% repeat-x,
        linear-gradient(180deg, var(--inv-accent) 0 2px, var(--ps-red-deep) 2px);
}
.inv-gift__bank {
    grid-area: bank; justify-self: end; min-width: 0; max-width: 100%; margin: 0;
    font: 600 .66rem/1.2 var(--ps-sans); letter-spacing: .06em; text-transform: uppercase; text-align: right; overflow-wrap: anywhere;
}
.inv-gift__logo { height: 1.5rem; max-width: 100%; padding: .2rem .45rem; border-radius: .35rem; }
.inv-gift__logo img { max-width: 4.6rem; }
.inv-gift__number {
    grid-area: number; margin: .75rem 0 .15rem;
    font: 500 .98rem/1.25 var(--ps-mono); letter-spacing: .03em; color: var(--inv-ivory);
    overflow-wrap: anywhere;
}
.inv-gift__holder { grid-area: holder; margin: 0; font: 600 .58rem/1.35 var(--ps-sans); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--inv-ivory) 85%, transparent); overflow-wrap: anywhere; }
.inv-gift__account .inv-button {
    grid-area: button; justify-self: start; margin-top: .6rem; padding: .35rem .7rem; border-radius: 999px;
    font-size: .6rem; letter-spacing: .06em; color: color-mix(in srgb, var(--inv-accent) 55%, #fff); background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 60%, transparent);
}

/* the gift address stays a plain card */
.inv-gift__account.inv-gift__address {
    display: block; min-height: 0; padding: 1.5rem 1.3rem; text-align: center; color: var(--ps-fg);
    background: var(--ps-card-bg);
    box-shadow: inset 0 0 0 1px var(--ps-line-soft), 0 20px 40px -28px rgb(0 0 0 / .8);
}
.inv-gift__address::before, .inv-gift__address::after { content: none; }
.inv-gift__address .inv-gift__bank { justify-self: auto; text-align: center; font: 600 .68rem/1.4 var(--ps-display); letter-spacing: .28em; color: var(--ps-gold); }
.inv-gift__address .inv-gift__holder { margin: .6rem 0 .2rem; font: 600 1.05rem/1.3 var(--ps-display); letter-spacing: .02em; text-transform: none; color: var(--ps-fg); }
.inv-gift__address p:not([class]) { color: var(--ps-muted); }
.inv-gift__address .inv-button {
    margin-top: 1rem; color: var(--ps-gold); background: transparent;
    box-shadow: inset 0 0 0 1px var(--ps-line);
}

/* ---------- rsvp & wishes forms ---------- */
.ps-form { max-width: 24rem; margin: 0 auto; padding: 0 1.25rem 1.5rem; text-align: left; }
.ps-form > .ps-songket { margin: 0 -1.25rem 1.4rem; filter: none; }
.inv-form { gap: .9rem; }
.inv-form label, .inv-form__choices legend { font: 500 .8rem/1.4 var(--ps-sans); letter-spacing: .03em; color: var(--ps-muted); }
.inv-form input:not([type=radio]):not([type=checkbox]), .inv-form select, .inv-form textarea {
    padding: .7rem .85rem; border-radius: 8px;
    border: 1px solid var(--ps-line);
    background: var(--ps-field-bg); color: var(--ps-fg);
    font: 400 1rem/1.4 var(--ps-sans);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.inv-form input::placeholder, .inv-form textarea::placeholder { color: color-mix(in srgb, var(--ps-fg) 45%, transparent); }
.inv-form input:focus, .inv-form select:focus, .inv-form textarea:focus {
    outline: none; border-color: var(--ps-gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-accent) 25%, transparent);
}
.inv-form option { background: #fff; color: var(--inv-ink); }
.inv-form input[type=radio], .inv-form input[type=checkbox] { accent-color: var(--inv-primary); }
.inv-form__choices label { color: var(--ps-fg); font-size: .92rem; }
.inv-form__notice { color: var(--ps-fg); background: color-mix(in srgb, var(--inv-accent) 16%, transparent); border: 1px solid var(--ps-line-soft); }
.inv-form .inv-button { justify-self: stretch; margin-top: .3rem; }
.inv-rsvp__deadline { font-style: italic; color: var(--ps-gold); }

/* wishes: compact cards in a scroll box of about three */
.inv-wishes { --inv-wishes-height: 20rem; }
.inv-wishes__list { gap: .6rem; margin-top: 1.4rem; }
.inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    padding: .5rem .45rem .5rem .5rem; border-radius: 10px;
    background: color-mix(in srgb, var(--ps-deep) 45%, transparent);
    box-shadow: inset 0 0 0 1px var(--ps-line-soft), inset 0 -14px 16px -14px rgb(0 0 0 / .5);
    scrollbar-color: color-mix(in srgb, var(--inv-accent) 50%, transparent) transparent;
}
.inv-wishes__empty { text-align: center; font-style: italic; }
.inv-wish {
    padding: .65rem .8rem; border-radius: 8px;
    background: color-mix(in srgb, var(--inv-background) 60%, transparent);
    border: 1px solid var(--ps-line-soft); border-left: 3px solid var(--inv-accent);
}
.inv-wish__name { font: 600 .86rem/1.3 var(--ps-display); color: var(--ps-gold); }
.inv-wish__message { font-size: 1rem; line-height: 1.5; }
.inv-wish__time { margin-top: .25rem; font: 400 .68rem/1.3 var(--ps-sans); letter-spacing: .04em; }
.inv-wish__reply { margin-top: .5rem; padding: .45rem .65rem; background: color-mix(in srgb, var(--inv-accent) 12%, transparent); }
.inv-wish__reply-text { font-size: .95rem; }
.inv-wishes__page-button { color: var(--ps-gold); }

/* ---------- closing ---------- */
.ps-closing { padding-top: 4rem; padding-bottom: 4.5rem; }
.ps-arch--closing { width: min(58%, 215px); margin: .4rem auto 2.4rem; }
.ps-closing__label { font: 600 .7rem/1.4 var(--ps-display); letter-spacing: .36em; text-transform: uppercase; color: var(--ps-gold); }
.ps-closing__thanks { margin-top: .1rem; font: 400 3.3rem/1.25 var(--ps-script); color: var(--ps-fg); }
.ps-closing__message { max-width: 24rem; margin: .8rem auto 0; color: var(--ps-muted); }
.ps-closing__sign { margin-top: 1.6rem; font: 600 .7rem/1.4 var(--ps-display); letter-spacing: .28em; text-transform: uppercase; color: var(--ps-gold); }
.ps-closing__names { margin-top: .3rem; font: 400 clamp(2.5rem, 11.5vw, 3.1rem)/1.3 var(--ps-script); color: var(--ps-gold); }
.ps-closing__names span { font: 500 .42em/1 var(--ps-display); color: var(--ps-fg); }
.ps-closing .ps-divider { margin-top: 1.4rem; }

/* ---------- shared components: nav, music, to-top, QR tab, branding ---------- */

.ps-nav.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-ink) 92%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-ivory) 78%, transparent);
    --inv-nav-active: var(--ps-gold-bg);
    border-color: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    box-shadow: 0 14px 34px -12px rgb(0 0 0 / .7), inset 0 -2px 0 color-mix(in srgb, var(--inv-primary) 80%, transparent);
    font-family: var(--ps-sans);
}
.ps-nav.inv-nav--icons .inv-nav__item.is-active { color: var(--inv-ink); box-shadow: 0 0 0 2px var(--inv-ink), 0 8px 18px -6px rgb(0 0 0 / .55); }

.inv-music { right: calc(var(--ps-edge) + 1rem); }
.inv-music__button { background: var(--ps-gold-bg); color: var(--inv-ink); box-shadow: 0 8px 22px -8px rgb(0 0 0 / .7), 0 0 0 3px color-mix(in srgb, var(--inv-ink) 55%, transparent); }
.inv-autoscroll { color: var(--inv-label); background: color-mix(in srgb, var(--inv-ink) 88%, transparent); border-color: color-mix(in srgb, var(--inv-accent) 50%, transparent); font-family: var(--ps-sans); }
.inv-autoscroll--running { background: var(--ps-gold-bg); color: var(--inv-ink); }

.inv-to-top {
    left: calc(var(--ps-edge) + 1rem); border-radius: 50%;
    background: var(--inv-ink); color: var(--inv-label);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 55%, transparent), 0 6px 16px -6px rgb(0 0 0 / .6);
}
.inv-qr-tab {
    right: var(--ps-edge); font-family: var(--ps-sans); color: var(--inv-label);
    background: color-mix(in srgb, var(--inv-ink) 94%, transparent);
    border-color: color-mix(in srgb, var(--inv-accent) 50%, transparent);
}
.inv-qr-sheet .inv-checkin { font-family: var(--ps-sans); color: var(--inv-ink); }
.inv-checkin__title { color: var(--inv-primary); }

.ps-page > .ps-songket { margin-top: 0; }
.ps-branding { position: relative; z-index: 1; color: var(--inv-text); font-family: var(--ps-sans); background: var(--ps-deep); }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ps-corner svg, .ps-scroll span, .ps-live__badge span { animation: none; }
    .ps-cover--leave { transition: opacity .3s ease; }
    .ps-cover--gone { transform: none; }
}

/* ---------- fit: the page end and the cover on every phone ---------- */

/* the page ends close under the closing divider (the menu covers the last ~90px) */
.ps-closing { padding-bottom: 1rem; }
.ps-closing .ps-divider { margin-top: 1rem; }
.ps-page .inv-music__space { height: calc(3.5rem + env(safe-area-inset-bottom)); }

/* the cover blocks share the screen height */
.ps-cover__inner { min-height: 100%; justify-content: space-evenly; }

@media (max-height: 760px) {
    .ps-cover__inner { padding: 3rem 1.6rem 3.1rem; gap: .55rem; }
    .ps-crest__crown { width: 7.6rem; margin-bottom: -1rem; }
    .ps-mono { width: 4.6rem; height: 4.6rem; font-size: 1.25rem; }
    .ps-cover__names { font-size: clamp(2.4rem, 11vw, 2.75rem); line-height: 1.1; }
    .ps-cover__quote { font-size: .95rem; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
    .ps-guest { padding-block: .7rem .7rem; }
    .ps-guest__note { display: none; }
    .ps-open { margin-top: .2rem; }
}
@media (max-height: 660px) {
    .ps-cover__inner { padding: 2.8rem 1.5rem 2.9rem; gap: .4rem; }
    .ps-crest__crown { width: 6.3rem; margin-bottom: -.85rem; }
    .ps-mono { width: 3.9rem; height: 3.9rem; font-size: 1.1rem; border-width: 2px; }
    .ps-cover__names { font-size: 2.2rem; line-height: 1.05; }
    .ps-cover__quote { font-size: .9rem; -webkit-line-clamp: 6; }
    .ps-guest { padding-block: .55rem .6rem; }
    .ps-guest__name { margin-top: .2rem; }
}
