/*
 * Template "Polaroid Scrapbook" (Pernikahan): a curated memory journal.
 * Colors from the variant (x-inv.head): --inv-primary (the leather), --inv-deep (darker leather: cover edge, closing),
 * --inv-accent (dusty rose: washi, ribbon, small accents), --inv-background (cream album paper), --inv-text (ink),
 * --inv-foil (foil stamping on the leather), --inv-card (polaroid & card white).
 * Leather sections (.ps-sec--leather|deep) and paper sections (.ps-sec--paper) set their own inks. Textures (img/,
 * see img/CREDITS.md): a leather grain and an album-paper grain (*-soft.webp: transparent light/dark grain laid over the
 * variant colors without blend modes, which iOS Safari draws as plain grey) and two
 * pressed botanicals. Tilts use the `rotate` property: the shared scroll reveal animates `transform`.
 */

:root {
    --inv-primary: #6e2329;
    --inv-accent: #d0938d;
    --inv-background: #f4ebdd;
    --inv-text: #2e1e1b;
    --inv-deep: #3c1417;
    --inv-foil: #dcb87f;
    --inv-card: #fcf8f1;
    --inv-radius: 4px;

    --ps-col: min(100vw, 460px);
    --ps-script: 'Mrs Saint Delafield', 'Segoe Script', cursive;
    --ps-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;

    /* foil stamping: a warm metallic sweep */
    --ps-foil: linear-gradient(100deg,
        color-mix(in srgb, var(--inv-foil) 72%, #4a2a10) 0%,
        color-mix(in srgb, var(--inv-foil) 55%, #fff) 28%,
        var(--inv-foil) 50%,
        color-mix(in srgb, var(--inv-foil) 70%, #4a2a10) 76%,
        color-mix(in srgb, var(--inv-foil) 60%, #fff) 100%);
    /* an ink between oxblood and rose: small labels and notes on paper (contrast ≥ 4.5:1 on the cream) */
    --ps-rose-ink: color-mix(in srgb, var(--inv-primary) 74%, var(--inv-accent));

    /* default section inks (paper) */
    --ps-bg: var(--inv-background);
    --ps-ink: var(--inv-text);
    --ps-soft: color-mix(in srgb, var(--inv-text) 86%, var(--inv-background));
    --ps-head: var(--inv-text);
    --ps-em: var(--inv-primary);
    --ps-label: var(--ps-rose-ink);
    --ps-note-ink: var(--ps-rose-ink);
    --ps-line: color-mix(in srgb, var(--inv-primary) 45%, var(--inv-background));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
p, h1, h2, h3, figure, blockquote, dl, dd, ol { margin: 0; }
a { color: inherit; }

body.ps-body {
    min-height: 100vh;
    color: var(--inv-text);
    font-family: var(--ps-serif);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* wide screens: the journal lies on dark leather */
    background-color: var(--inv-deep);
    background-image: var(--ps-leather-img), radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--inv-primary) 70%, transparent), transparent 80%);
    background-size: 380px, cover;
    background-attachment: fixed;
}

.ps-preview {
    position: fixed; top: 0; left: 50%; z-index: 60; translate: -50% 0; white-space: nowrap;
    padding: .3rem .9rem; border-radius: 0 0 10px 10px;
    background: var(--inv-deep); color: var(--inv-card); font: 600 .7rem/1.4 system-ui, sans-serif;
}

/* ---------- shared bits ---------- */
.ps-label {
    font: 700 .64rem/1.5 var(--ps-serif); letter-spacing: .28em; text-transform: uppercase; color: var(--ps-label);
}
.ps-note { font: 400 1.75rem/1.1 var(--ps-script); color: var(--ps-note-ink); }
.ps-lead { max-width: 22rem; margin: 0 auto; color: var(--ps-soft); font-size: .93rem; }
.ps-arabic { margin-bottom: .6rem; font: 1.85rem/1.8 'Amiri', 'Traditional Arabic', serif; color: var(--inv-foil); }
.ps-foil-text { background: var(--ps-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* the photo of a polaroid (img, or a div with --ps-photo) */
.ps-polaroid {
    position: relative; display: block; padding: 10px 10px 0; background: var(--inv-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / .14), 0 22px 34px -20px rgb(0 0 0 / .6);
}
.ps-polaroid__photo {
    display: block; width: 100%; aspect-ratio: 1 / 1.04; object-fit: cover; object-position: center 30%;
    background: var(--ps-photo, none) center 30% / cover no-repeat, color-mix(in srgb, var(--inv-primary) 20%, var(--inv-card));
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06);
}
.ps-polaroid__caption {
    padding: .45rem .3rem .7rem; min-height: 2.9rem; text-align: center;
    font: 400 1.95rem/1.15 var(--ps-script); color: var(--inv-text); overflow-wrap: anywhere;
}
.ps-polaroid--wide .ps-polaroid__photo { aspect-ratio: 16 / 10.5; }
.ps-polaroid--wide { padding-bottom: 2.1rem; }

/* no photo yet: a soft leather-and-rose gradient with the initials handwritten */
.ps-photo-empty {
    display: grid; place-items: center;
    background: radial-gradient(90% 70% at 30% 20%, color-mix(in srgb, var(--inv-accent) 70%, var(--inv-card)), var(--inv-primary) 120%);
}
.ps-initials { font: 400 4.2rem/1 var(--ps-script); color: var(--inv-card); text-shadow: 0 2px 8px rgb(0 0 0 / .25); white-space: nowrap; }

/* refined washi: one translucent dusty-rose strip with fine fibres and softly torn ends */
.ps-tape {
    position: absolute; z-index: 3; top: -13px; left: 50%; width: 92px; height: 26px; translate: -50% 0; rotate: -4deg;
    pointer-events: none; opacity: .88;
    background:
        linear-gradient(180deg, rgb(255 255 255 / .28), rgb(255 255 255 / 0) 60%),
        repeating-linear-gradient(100deg, rgb(255 255 255 / .16) 0 1px, transparent 1px 5px),
        color-mix(in srgb, var(--inv-accent) 82%, var(--inv-card));
    -webkit-mask: radial-gradient(2.5px at 0 50%, #0000 96%, #000) 0 0 / 51% 5px repeat-y, radial-gradient(2.5px at 100% 50%, #0000 96%, #000) 100% 0 / 51% 5px repeat-y;
    mask: radial-gradient(2.5px at 0 50%, #0000 96%, #000) 0 0 / 51% 5px repeat-y, radial-gradient(2.5px at 100% 50%, #0000 96%, #000) 100% 0 / 51% 5px repeat-y;
    box-shadow: 0 1px 2px rgb(0 0 0 / .1);
}

/* pressed botanicals: printed into the paper (multiply), a hairline shadow where they lift */
.ps-pressed { position: absolute; z-index: 0; display: block; height: auto; pointer-events: none; user-select: none; }
.ps-sec--paper .ps-pressed, .ps-page-card .ps-pressed { mix-blend-mode: multiply; opacity: .92; }
.ps-sec--leather .ps-pressed, .ps-sec--deep .ps-pressed, .ps-cover .ps-pressed { filter: saturate(.85) brightness(.92) drop-shadow(0 6px 8px rgb(0 0 0 / .35)); }

/* a satin ribbon marker with a swallowtail end */
.ps-ribbon {
    position: absolute; z-index: 2; top: 0; width: 26px; height: 140px; pointer-events: none;
    background:
        linear-gradient(90deg, rgb(0 0 0 / .18), rgb(255 255 255 / .22) 35%, rgb(255 255 255 / .05) 55%, rgb(0 0 0 / .2)),
        var(--inv-accent);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 14px), 0 100%);
    filter: drop-shadow(0 4px 4px rgb(0 0 0 / .35));
}

/* a cream page laid on leather (quote, RSVP, live streaming) */
.ps-page-card {
    position: relative; isolation: isolate; padding: 1.9rem 1.4rem; text-align: center; color: var(--inv-text);
    background-color: var(--inv-card); background-image: var(--ps-paper-img); background-size: 300px;
    box-shadow: 0 2px 0 -1px color-mix(in srgb, var(--inv-card) 80%, #000), 0 4px 0 -2px color-mix(in srgb, var(--inv-card) 70%, #000), 0 26px 44px -24px rgb(0 0 0 / .8);
    --ps-head: var(--inv-text); --ps-em: var(--inv-primary); --ps-label: var(--ps-rose-ink); --ps-soft: color-mix(in srgb, var(--inv-text) 86%, var(--inv-card));
}

/* the bookplate on the cover: an ex-libris label with a fine double rule */
.ps-bookplate {
    position: relative; padding: .7rem 1.4rem .75rem; min-width: min(15rem, 80%); max-width: 92%; text-align: center;
    background: var(--inv-card); color: var(--inv-text);
    box-shadow: inset 0 0 0 4px var(--inv-card), inset 0 0 0 5px color-mix(in srgb, var(--inv-primary) 55%, transparent), 0 14px 26px -16px rgb(0 0 0 / .8);
    border-radius: 2px;
}
.ps-bookplate__to { --ps-label: var(--ps-rose-ink); font-size: .58rem; }
.ps-bookplate__name { margin-top: .15rem; font: 700 1.08rem/1.3 var(--ps-serif); overflow-wrap: anywhere; }

/* headings */
.ps-heading { position: relative; z-index: 1; margin-bottom: 2rem; }
.ps-heading__title { margin-top: .4rem; font: 400 clamp(2rem, 9vw, 2.45rem)/1.15 var(--ps-serif); color: var(--ps-head); letter-spacing: -.01em; }
.ps-heading__title em { font-style: italic; color: var(--ps-em); }
.ps-heading__rule { position: relative; display: block; width: 7.5rem; height: 9px; margin: .75rem auto 0; }
.ps-heading__rule::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid var(--ps-line); }
.ps-heading__rule i { position: absolute; left: 50%; top: 0; width: 9px; height: 9px; translate: -50% 0; rotate: 45deg; background: var(--ps-bg); border: 1px solid var(--ps-line); }
.ps-heading__rule i::after { content: ''; position: absolute; inset: 2px; background: var(--inv-accent); }
.ps-heading__note { margin-top: .35rem; }
html.inv-anim .ps-heading__rule::before { transform: scaleX(.2); transition: transform 1.2s .35s cubic-bezier(.2, .8, .2, 1); }
html.inv-anim .is-revealed .ps-heading__rule::before, html.inv-anim .ps-heading__rule.is-revealed::before { transform: none; }

/* small pill link (Instagram) */
.ps-chip {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .8rem; padding: .32rem .8rem; border-radius: 999px;
    font: 700 .74rem/1.2 var(--ps-serif); color: var(--ps-em); text-decoration: none;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ps-em) 45%, transparent);
}

/* ---------- page column ---------- */
.ps-page { position: relative; width: var(--ps-col); min-height: 100vh; margin: 0 auto; overflow: hidden; background: var(--inv-background); }
@media (min-width: 520px) {
    .ps-page { box-shadow: 0 0 0 1px rgb(0 0 0 / .25), 0 30px 90px -20px rgb(0 0 0 / .8); }
}

/* ---------- sections: cream album pages and leather journal covers ---------- */
.ps-sec {
    position: relative; isolation: isolate; padding: 4.4rem 1.4rem 4.6rem; text-align: center; scroll-margin-top: .5rem;
    background-color: var(--ps-bg); color: var(--ps-ink);
}
.ps-sec > * { position: relative; z-index: 1; }
.ps-sec > .ps-bgphoto, .ps-sec > .ps-pressed { position: absolute; }
.ps-sec > .ps-bgphoto { z-index: 0; }
.ps-sec--paper {
    background-image: var(--ps-paper-img); background-size: 300px;
}
/* the stacked page edges along the top of an album page */
.ps-sec--paper::before {
    content: ''; position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 8px; pointer-events: none;
    background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--inv-text) 16%, transparent) 0 1px, transparent 1px 3px);
    -webkit-mask: linear-gradient(180deg, #000, #0000); mask: linear-gradient(180deg, #000, #0000);
}
.ps-sec--leather, .ps-sec--deep {
    --ps-bg: var(--inv-primary);
    --ps-ink: var(--inv-card);
    --ps-soft: color-mix(in srgb, var(--inv-card) 88%, var(--inv-primary));
    --ps-head: var(--inv-card);
    --ps-em: color-mix(in srgb, var(--inv-accent) 70%, var(--inv-card));
    --ps-label: var(--inv-foil);
    --ps-note-ink: color-mix(in srgb, var(--inv-accent) 75%, var(--inv-card));
    --ps-line: color-mix(in srgb, var(--inv-foil) 70%, var(--ps-bg));
    background-image: var(--ps-leather-img), radial-gradient(120% 80% at 50% 0%, rgb(255 255 255 / .06), transparent 60%), linear-gradient(180deg, rgb(0 0 0 / .12), transparent 30%, transparent 70%, rgb(0 0 0 / .2));
    background-size: 380px, cover, cover;
}
.ps-sec--deep { --ps-bg: var(--inv-deep); --ps-soft: color-mix(in srgb, var(--inv-card) 86%, var(--inv-deep)); }
/* saddle stitching along the leather's top and bottom */
.ps-sec--leather::before {
    content: ''; position: absolute; z-index: 1; left: 12px; right: 12px; top: 11px; bottom: 11px; pointer-events: none;
    border-top: 1.5px dashed color-mix(in srgb, var(--inv-card) 34%, transparent);
    border-bottom: 1.5px dashed color-mix(in srgb, var(--inv-card) 34%, transparent);
}

/* a client photo behind a leather section: toned into the leather, faint, under a gradient */
.ps-bgphoto { inset: 0; overflow: hidden; pointer-events: none; }
.ps-bgphoto img {
    position: absolute; inset: -40px 0; width: 100%; height: calc(100% + 80px); object-fit: cover;
    mix-blend-mode: luminosity; opacity: .34;
}
.ps-bgphoto::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--ps-bg) 72%, transparent) 0%,
        color-mix(in srgb, var(--ps-bg) 35%, transparent) 35%,
        color-mix(in srgb, var(--ps-bg) 65%, transparent) 70%,
        var(--ps-bg) 100%);
}
.ps-bgphoto--empty::after { background: radial-gradient(90% 55% at 50% 0%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 70%); }

/* ---------- cover: the leather journal ---------- */
.ps-cover {
    position: fixed; top: 0; bottom: 0; left: 50%; z-index: 30; width: var(--ps-col);
    transform: translateX(-50%); transform-origin: left center;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; isolation: isolate;
    background-color: var(--inv-primary);
    background-image:
        var(--ps-leather-img),
        radial-gradient(85% 55% at 50% 38%, rgb(255 255 255 / .08), transparent 70%),
        radial-gradient(140% 90% at 50% 50%, transparent 55%, rgb(0 0 0 / .45)),
        linear-gradient(90deg, rgb(0 0 0 / .35), transparent 7%);
    background-size: 380px, cover, cover, cover;
    box-shadow: 0 0 60px rgb(0 0 0 / .45);
    --ps-label: var(--inv-foil);
    /* fitCover keeps the button inside the foil frame */
    --inv-cover-foot: 26px;
}
/* the stitched edge and the foil-stamped frame with its corner ticks */
.ps-cover__frame {
    position: absolute; z-index: 0; inset: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)) 22px; pointer-events: none;
    border: 1.5px dashed color-mix(in srgb, var(--inv-card) 32%, transparent); border-radius: 10px;
}
.ps-cover__frame::before {
    content: ''; position: absolute; inset: 9px; border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--inv-foil) 75%, transparent);
    box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px color-mix(in srgb, var(--inv-foil) 38%, transparent), 0 1px 0 rgb(0 0 0 / .35);
}
/* foil corner ticks inside the frame */
.ps-cover__frame::after {
    --c: color-mix(in srgb, var(--inv-foil) 85%, transparent);
    content: ''; position: absolute; inset: 19px;
    background:
        linear-gradient(var(--c), var(--c)) 0 0 / 22px 1px, linear-gradient(var(--c), var(--c)) 0 0 / 1px 22px,
        linear-gradient(var(--c), var(--c)) 100% 0 / 22px 1px, linear-gradient(var(--c), var(--c)) 100% 0 / 1px 22px,
        linear-gradient(var(--c), var(--c)) 0 100% / 22px 1px, linear-gradient(var(--c), var(--c)) 0 100% / 1px 22px,
        linear-gradient(var(--c), var(--c)) 100% 100% / 22px 1px, linear-gradient(var(--c), var(--c)) 100% 100% / 1px 22px;
    background-repeat: no-repeat;
}
/* the spine fold on the left */
.ps-cover::before {
    content: ''; position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; width: 12px; pointer-events: none;
    background: linear-gradient(90deg, rgb(0 0 0 / .4), rgb(255 255 255 / .07) 70%, rgb(0 0 0 / .3));
}
.ps-cover__ribbon { right: 46px; height: min(150px, 20svh); }

.ps-cover__inner {
    position: relative; z-index: 1; min-height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .85rem;
    padding: calc(2.6rem + env(safe-area-inset-top)) 1.9rem calc(3.4rem + env(safe-area-inset-bottom)) 2.1rem;
    text-align: center; color: var(--inv-card);
}
.ps-cover__title { font-size: .66rem; letter-spacing: .34em; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .45)); }

.ps-cover__stage { --ps-pol: min(62vw, 260px, 35svh); position: relative; margin: .4rem 0 .2rem; }
.ps-cover__polaroid { width: var(--ps-pol); rotate: -3deg; padding: 11px 11px 0; box-shadow: 0 2px 3px rgb(0 0 0 / .25), 0 28px 44px -18px rgb(0 0 0 / .8); }
.ps-cover__photo { aspect-ratio: 1 / 1.06; }
.ps-cover__names {
    padding: .35rem .2rem .55rem; text-align: center;
    font: 400 clamp(2.1rem, min(7.4svh, 10.5vw), 2.85rem)/1.12 var(--ps-script); color: var(--inv-text);
    /* long names wrap onto a second line instead of being cut off with "…" */
    text-wrap: balance; overflow-wrap: anywhere;
}
.ps-cover__names span { color: var(--ps-rose-ink); }
.ps-cover__fern { left: -3.6rem; bottom: -1.8rem; width: calc(var(--ps-pol) * .78); rotate: -32deg; z-index: -1; }

.ps-cover__date { font: 700 .74rem/1.4 var(--ps-serif); letter-spacing: .2em; text-transform: uppercase; color: var(--inv-foil); }
.ps-cover__quote { max-width: 19rem; font: italic 400 .92rem/1.5 var(--ps-serif); color: color-mix(in srgb, var(--inv-card) 90%, var(--inv-primary)); text-wrap: balance; }

.ps-open.inv-button {
    gap: .55rem; margin-top: .25rem; padding: .85rem 1.7rem; border-radius: 999px;
    background: var(--inv-card); color: var(--inv-deep); font: 700 .8rem/1 var(--ps-serif); letter-spacing: .14em; text-transform: uppercase;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-foil) 70%, transparent), 0 0 0 5px color-mix(in srgb, var(--inv-card) 14%, transparent), 0 14px 26px -12px rgb(0 0 0 / .7);
}

/* opening the cover swings it open like a book */
.ps-cover--leave { transition: transform .85s cubic-bezier(.6, 0, .35, 1), opacity .85s ease; }
.ps-cover--gone { transform: translateX(-50%) perspective(1400px) rotateY(-95deg); opacity: 0; }

/* one opening moment: the polaroid develops (warm, soft, then clear) while the text comes in after it */
@keyframes ps-develop {
    from { filter: brightness(1.55) sepia(.55) blur(2.5px) contrast(.75); }
    to { filter: none; }
}
@keyframes ps-settle { from { rotate: 2deg; translate: 0 14px; } to { rotate: -3deg; translate: 0 0; } }
html.inv-anim .ps-cover__photo { animation: ps-develop 1.9s ease-out .35s both; }
html.inv-anim .ps-cover__polaroid { animation: ps-settle 1.1s cubic-bezier(.2, .8, .2, 1) .3s both; }

/* ---------- opening (first page): leather over a faint photo ---------- */
.ps-opening { padding-top: 4.6rem; padding-bottom: 4.8rem; }
.ps-opening__greeting { font: italic 400 clamp(1.45rem, 6.6vw, 1.75rem)/1.35 var(--ps-serif); color: var(--ps-head); text-wrap: balance; }
.ps-opening .ps-heading__rule { margin-bottom: 1.1rem; }
.ps-opening__quote { margin: 2.4rem .4rem 0; padding: 2.2rem 1.5rem 1.7rem; rotate: -1.2deg; }
.ps-opening__quote blockquote { font: italic 400 1.02rem/1.75 var(--ps-serif); color: var(--inv-text); }
.ps-opening__quote figcaption { margin-top: 1rem; }
.ps-opening__flower { top: -2.6rem; right: -1.4rem; width: 8rem; rotate: 14deg; opacity: 1 !important; }

/* ---------- couple: big polaroids on an album page ---------- */
.ps-couple__flower { top: -.8rem; right: -2.4rem; width: 10rem; rotate: 18deg; }
.ps-person { display: grid; justify-items: center; gap: 1.3rem; }
.ps-person__polaroid { width: min(72%, 270px); rotate: -2.5deg; }
.ps-person--bride .ps-person__polaroid { rotate: 2.5deg; }
.ps-person__polaroid .ps-tape { left: 30%; }
.ps-person--bride .ps-person__polaroid .ps-tape { left: 70%; rotate: 5deg; }
.ps-person__text { max-width: 21rem; }
.ps-person__name { margin-top: .35rem; font: 400 1.5rem/1.25 var(--ps-serif); color: var(--ps-head); text-wrap: balance; overflow-wrap: anywhere; }
.ps-person__parents { margin-top: .55rem; font-size: .9rem; color: var(--ps-soft); }
.ps-person__parents strong { color: var(--ps-ink); font-weight: 700; }
.ps-couple__and { margin: 1.4rem 0 1.2rem; }
.ps-couple__and span { display: inline-block; font: 400 3.6rem/1 var(--ps-script); color: var(--ps-rose-ink); }
/* polaroids are laid into the album: they settle into their tilt as they come in */
html.inv-anim .ps-person .ps-polaroid, html.inv-anim .ps-moment .ps-polaroid, html.inv-anim .ps-entry .ps-polaroid { transition: rotate 1.3s .25s cubic-bezier(.2, .8, .2, 1); }
html.inv-anim .ps-person:not(.is-revealed) .ps-polaroid, html.inv-anim .ps-moment:not(.is-revealed) .ps-polaroid, html.inv-anim .ps-entry:not(.is-revealed) .ps-polaroid { rotate: 0deg; }

/* ---------- countdown: leather, the date foil-stamped ---------- */
.ps-date { display: inline-flex; align-items: center; gap: .9rem; }
.ps-date__day { font: 400 5.4rem/.95 var(--ps-serif); filter: drop-shadow(0 2px 0 rgb(0 0 0 / .4)); padding: 0 .05em; }
.ps-date__side { display: grid; text-align: left; padding-left: .9rem; border-left: 1px solid var(--ps-line); }
.ps-date__month { font: italic 400 1.5rem/1.2 var(--ps-serif); color: var(--ps-head); }
.ps-date__year { font: 700 .74rem/1.5 var(--ps-serif); letter-spacing: .3em; color: var(--inv-foil); }
.ps-countdown__weekday { margin: .4rem 0 1.6rem; font-size: 2.5rem; color: color-mix(in srgb, var(--inv-accent) 45%, var(--inv-card)); }
.ps-countdown .inv-countdown { gap: .55rem; }
.ps-countdown .inv-countdown__item {
    position: relative; min-width: 0; flex: 1; max-width: 5rem; padding: .85rem .3rem .75rem; border-radius: 6px;
    background-color: color-mix(in srgb, var(--inv-deep) 70%, var(--inv-primary));
    background-image: var(--ps-leather-img); background-size: 300px;
    box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--inv-deep) 70%, var(--inv-primary)), inset 0 0 0 5px color-mix(in srgb, var(--inv-card) 30%, transparent), 0 12px 20px -12px rgb(0 0 0 / .7);
}
.ps-countdown .inv-countdown__item::before {
    content: ''; position: absolute; inset: 6px; border-radius: 3px; pointer-events: none;
    border: 1px dashed color-mix(in srgb, var(--inv-card) 30%, transparent);
}
.ps-countdown .inv-countdown__value { font: 400 2rem/1.1 var(--ps-serif); color: var(--inv-card); }
.ps-countdown .inv-countdown__label { margin-top: .1rem; font: 700 .55rem/1.3 var(--ps-serif); letter-spacing: .2em; text-transform: uppercase; color: var(--inv-foil); opacity: 1; }
.inv-countdown__done { font: italic 400 1.2rem/1.4 var(--ps-serif); }
.inv-countdown__actions { margin-top: 1.6rem; }

/* ---------- buttons (shared components) ---------- */
.inv-button {
    padding: .75rem 1.4rem; border-radius: 999px; font: 700 .76rem/1.2 var(--ps-serif); letter-spacing: .1em; text-transform: uppercase;
    background: var(--inv-primary); color: var(--inv-card);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15), 0 10px 20px -12px rgb(0 0 0 / .6);
}
.inv-button--outline { background: transparent; color: var(--inv-primary); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 60%, transparent); }
.ps-sec--leather .inv-button, .ps-sec--deep .inv-button { background: var(--inv-card); color: var(--inv-deep); box-shadow: 0 10px 20px -12px rgb(0 0 0 / .7); }
.ps-sec--leather .inv-button--outline, .ps-sec--deep .inv-button--outline { background: transparent; color: var(--inv-card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-card) 70%, transparent); }
.ps-sec .ps-page-card .inv-button:not(.inv-button--outline) { background: var(--inv-primary); color: var(--inv-card); }
.ps-sec .ps-page-card .inv-button--outline { color: var(--inv-primary); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 55%, transparent); }

/* ---------- events: journal entries ---------- */
.ps-events__fern { top: 11rem; left: -3.6rem; width: 8rem; rotate: 16deg; opacity: .5 !important; }
.ps-entry { position: relative; display: grid; justify-items: center; margin: 0 auto; max-width: 25rem; }
.ps-entry + .ps-entry { margin-top: 3rem; }
.ps-entry__photo { width: 88%; rotate: -2deg; z-index: 2; margin-bottom: -1.6rem; }
.ps-entry--flip .ps-entry__photo { rotate: 2deg; }
.ps-entry__card {
    position: relative; width: 100%; padding: 2.6rem 1.35rem 1.5rem; text-align: left; border-radius: 3px;
    background: var(--inv-card); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 22px 36px -24px rgb(0 0 0 / .55);
}
.ps-entry__card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--inv-primary); border-radius: 3px 0 0 3px; }
.ps-entry__name { margin-top: .2rem; font: italic 400 1.75rem/1.2 var(--ps-serif); color: var(--inv-primary); overflow-wrap: anywhere; }
.ps-entry__list { display: grid; gap: .55rem; margin-top: .9rem; }
.ps-entry__list > div { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .5rem; padding-top: .55rem; border-top: 1px solid color-mix(in srgb, var(--inv-text) 12%, transparent); }
.ps-entry__list dt { font: 700 .6rem/1.9 var(--ps-serif); letter-spacing: .2em; text-transform: uppercase; color: var(--ps-rose-ink); }
.ps-entry__list dd { font-size: .92rem; line-height: 1.55; overflow-wrap: anywhere; }
.ps-entry__list strong { display: block; }
.ps-entry__address { display: block; margin-top: .15rem; color: var(--ps-soft); font-size: .86rem; }
.ps-entry .inv-maps { margin-top: 1.1rem; }
.ps-entry .inv-maps .inv-button { width: 100%; }

/* ---------- love story: polaroids and cream notes on leather ---------- */
.ps-story__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem; }
.ps-moment { display: grid; grid-template-columns: 46% minmax(0, 1fr); align-items: center; gap: 0; text-align: left; }
.ps-moment__photo { z-index: 2; rotate: -3deg; padding: 8px 8px 0; }
.ps-moment__photo .ps-polaroid__caption { font-size: 1.55rem; min-height: 2.4rem; padding: .3rem .2rem .5rem; }
.ps-moment__photo .ps-tape { width: 64px; height: 20px; top: -10px; }
.ps-moment__note {
    position: relative; margin-left: -.8rem; padding: 1.2rem 1rem 1.15rem 1.6rem; border-radius: 3px;
    background-color: var(--inv-card); background-image: var(--ps-paper-img); background-size: 300px;
    color: var(--inv-text); box-shadow: 0 22px 34px -22px rgb(0 0 0 / .8);
    --ps-label: var(--ps-rose-ink); --ps-note-ink: var(--ps-rose-ink);
}
.ps-moment--flip { grid-template-columns: minmax(0, 1fr) 46%; }
.ps-moment--flip .ps-moment__photo { order: 2; rotate: 3deg; }
.ps-moment--flip .ps-moment__note { order: 1; margin-left: 0; margin-right: -.8rem; padding: 1.2rem 1.6rem 1.15rem 1rem; }
.ps-moment--text { grid-template-columns: minmax(0, 1fr); }
.ps-moment--text .ps-moment__note { margin: 0 auto; max-width: 22rem; padding: 1.3rem 1.3rem; }
.ps-moment__date { font-size: 1.6rem; }
.ps-moment__title { margin-top: .1rem; font: 400 1.12rem/1.3 var(--ps-serif); color: var(--inv-primary); overflow-wrap: anywhere; }
.ps-moment__story { margin-top: .4rem; font-size: .84rem; line-height: 1.6; color: color-mix(in srgb, var(--inv-text) 88%, var(--inv-card)); overflow-wrap: anywhere; }

/* ---------- gallery (x-inv.gallery variant="slider"): one big polaroid ---------- */
.ps-gallery__flower { bottom: 2rem; left: -2.6rem; width: 9.5rem; rotate: -28deg; }
.ps-slider .inv-gallery-slider { gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.ps-slider .inv-gallery-slider__thumbs { gap: .55rem; padding: .4rem .3rem .6rem; }
.ps-slider .inv-gallery-slider__thumb { width: 3.9rem; padding: 3px 3px 9px; border: 0; border-radius: 0; background: var(--inv-card); opacity: .7; box-shadow: 0 6px 10px -6px rgb(0 0 0 / .5); }
.ps-slider .inv-gallery-slider__thumb:nth-child(odd) { rotate: -2deg; }
.ps-slider .inv-gallery-slider__thumb:nth-child(even) { rotate: 2deg; }
.ps-slider .inv-gallery-slider__thumb.is-active { opacity: 1; rotate: 0deg; box-shadow: 0 0 0 2px var(--ps-rose-ink), 0 6px 10px -6px rgb(0 0 0 / .5); }
.ps-slider .inv-gallery-slider__arrow { background: var(--inv-primary); color: var(--inv-card); box-shadow: 0 6px 14px -8px rgb(0 0 0 / .6); }
.ps-slider .inv-gallery-slider__stage {
    grid-template-columns: minmax(0, 1fr); min-width: 0; aspect-ratio: auto; overflow: visible; border-radius: 0;
    padding: 12px 12px 3.4rem; background: var(--inv-card); rotate: -1deg;
    box-shadow: 0 1px 2px rgb(0 0 0 / .14), 0 28px 44px -22px rgb(0 0 0 / .65);
}
.ps-slider .inv-gallery-slider__slide { min-width: 0; aspect-ratio: 4 / 4.6; overflow: hidden; }
/* one washi strip across the top edge of the big polaroid */
.ps-slider .inv-gallery-slider__stage::before {
    content: ''; position: absolute; z-index: 3; top: -13px; left: 50%; width: 96px; height: 26px; translate: -50% 0; rotate: 3deg; opacity: .88;
    background:
        linear-gradient(180deg, rgb(255 255 255 / .28), rgb(255 255 255 / 0) 60%),
        repeating-linear-gradient(100deg, rgb(255 255 255 / .16) 0 1px, transparent 1px 5px),
        color-mix(in srgb, var(--inv-accent) 82%, var(--inv-card));
    -webkit-mask: radial-gradient(2.5px at 0 50%, #0000 96%, #000) 0 0 / 51% 5px repeat-y, radial-gradient(2.5px at 100% 50%, #0000 96%, #000) 100% 0 / 51% 5px repeat-y;
    mask: radial-gradient(2.5px at 0 50%, #0000 96%, #000) 0 0 / 51% 5px repeat-y, radial-gradient(2.5px at 100% 50%, #0000 96%, #000) 100% 0 / 51% 5px repeat-y;
}
/* the counter becomes the handwritten caption of the polaroid */
.ps-slider .inv-gallery-slider__count {
    left: 0; right: 0; bottom: .55rem; padding: 0; background: none; text-align: center;
    color: var(--inv-text); font: 400 1.9rem/1 var(--ps-script); letter-spacing: .02em;
}
.ps-slider .inv-gallery__play { margin-top: -1.7rem; }

/* ---------- live streaming ---------- */
.ps-live__card { max-width: 23rem; margin: 0 auto; rotate: 1deg; }
.ps-live__badge {
    display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .6rem; padding: .3rem .85rem; border-radius: 999px;
    background: var(--inv-primary); color: var(--inv-card); font: 700 .6rem/1.4 var(--ps-serif); letter-spacing: .2em; text-transform: uppercase;
}
.ps-live__badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--inv-accent); }
html.inv-anim .ps-live__badge span { animation: ps-blink 1.4s ease-in-out infinite; }
@keyframes ps-blink { 50% { opacity: .3; } }
.ps-live__title { font-size: clamp(1.7rem, 7.6vw, 2.05rem); }
.ps-live__text { margin-top: .6rem; font-size: .9rem; color: color-mix(in srgb, var(--inv-text) 86%, var(--inv-card)); }
.ps-live__note { margin-top: .5rem; font: italic 400 .95rem/1.5 var(--ps-serif); color: var(--inv-primary); }
.ps-live .inv-button { margin-top: 1.1rem; }

/* ---------- gift (x-inv.gift): white cards held by photo corners ---------- */
.ps-gift { overflow: hidden; }
.ps-gift__fern { top: 9rem; right: -3.8rem; width: 8rem; rotate: -150deg; opacity: .45 !important; }
.ps-gift .ps-lead { margin-bottom: 1.8rem; }
.ps-gift .inv-gift { display: grid; gap: 1.1rem; }
.ps-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.ps-gift .inv-gift__accounts > .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ps-gift .inv-gift__account + .inv-gift__account { margin-top: 0; }
.ps-gift .inv-gift__account {
    position: relative; min-width: 0; padding: 1.1rem .8rem 1rem; border-radius: 2px; text-align: center;
    background: var(--inv-card); color: var(--inv-text); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 18px 28px -20px rgb(0 0 0 / .55);
}
/* photo corners in the leather color */
.ps-gift .inv-gift__account::before, .ps-gift .inv-gift__account::after {
    content: ''; position: absolute; width: 18px; height: 18px; background: var(--inv-primary); pointer-events: none;
}
.ps-gift .inv-gift__account::before { top: -3px; left: -3px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.ps-gift .inv-gift__account::after { bottom: -3px; right: -3px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.ps-gift .inv-gift__bank { min-height: 1.6rem; margin: 0 0 .5rem; font: 700 .64rem/1.3 var(--ps-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ps-rose-ink); overflow-wrap: anywhere; }
.ps-gift .inv-gift__logo { height: 1.55rem; padding: .2rem .45rem; max-width: 100%; }
.ps-gift .inv-gift__logo img { max-width: 5rem; }
.ps-gift .inv-gift__number { margin: 0; font: 400 1rem/1.35 var(--ps-serif); letter-spacing: .06em; overflow-wrap: anywhere; }
.ps-gift .inv-gift__holder { margin: .2rem 0 .7rem; font: 700 .58rem/1.4 var(--ps-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--ps-soft); overflow-wrap: anywhere; }
.ps-gift .inv-gift__account .inv-button { padding: .45rem .8rem; font-size: .62rem; }
.ps-gift .inv-gift__address { padding: 1.5rem 1.3rem; }
.ps-gift .inv-gift__address .inv-gift__bank { font: italic 400 1.35rem/1.3 var(--ps-serif); letter-spacing: 0; text-transform: none; color: var(--inv-primary); }
.ps-gift .inv-gift__address .inv-gift__holder { font-size: .66rem; }
.ps-gift .inv-gift__address > p:not([class]) { margin: 0 0 .8rem; font-size: .9rem; }

/* ---------- RSVP & wishes (x-inv.rsvp, x-inv.wishes) ---------- */
.ps-rsvp .ps-page-card { max-width: 25rem; margin: 0 auto; padding: 1.8rem 1.3rem 1.6rem; }
.ps-form { text-align: left; }
.ps-form .inv-form { gap: .95rem; }
.ps-form .inv-form label, .ps-form .inv-form__choices legend { font: 700 .62rem/1.4 var(--ps-serif); letter-spacing: .18em; text-transform: uppercase; color: var(--ps-rose-ink); }
.ps-form .inv-form input:not([type=radio]):not([type=checkbox]), .ps-form .inv-form select, .ps-form .inv-form textarea {
    padding: .7rem .85rem; border: 1px solid color-mix(in srgb, var(--inv-primary) 28%, transparent); border-radius: 4px;
    background: #fff; color: var(--inv-text); font: 400 .95rem/1.4 var(--ps-serif); letter-spacing: 0; text-transform: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ps-form .inv-form input:focus, .ps-form .inv-form select:focus, .ps-form .inv-form textarea:focus {
    outline: none; border-color: var(--inv-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-accent) 35%, transparent);
}
.ps-form .inv-form__choices label {
    padding: .45rem .9rem; border-radius: 999px; background: #fff; cursor: pointer;
    font: 400 .88rem/1.3 var(--ps-serif); letter-spacing: 0; text-transform: none; color: var(--inv-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 30%, transparent);
}
.ps-form .inv-form__choices label:has(input:checked) { background: color-mix(in srgb, var(--inv-accent) 30%, #fff); box-shadow: inset 0 0 0 1.5px var(--inv-primary); }
.ps-form .inv-form > .inv-button { width: 100%; }
.ps-form .inv-rsvp__deadline { margin-bottom: .8rem; font-size: .84rem; text-align: center; }
.ps-form .inv-form__notice { background: color-mix(in srgb, var(--inv-accent) 22%, #fff); color: var(--inv-text); }
.ps-form--paper .inv-form { padding: 1.5rem 1.2rem; border-radius: 3px; background: var(--inv-card); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 20px 32px -22px rgb(0 0 0 / .5); }

.ps-wishes__flower { top: -1rem; left: -2.2rem; width: 9rem; rotate: -16deg; }
.ps-wishes .inv-wishes__list { gap: .7rem; margin-top: 1.5rem; padding: .3rem .35rem .5rem; }
.ps-wishes .inv-wish {
    position: relative; padding: .8rem .9rem .75rem 1.15rem; border-radius: 2px; background: var(--inv-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 10px 16px -12px rgb(0 0 0 / .45);
}
.ps-wishes .inv-wish:nth-child(odd) { rotate: -.6deg; }
.ps-wishes .inv-wish:nth-child(even) { rotate: .6deg; }
.ps-wishes .inv-wish::before { content: ''; position: absolute; left: 0; top: .7rem; bottom: .7rem; width: 3px; border-radius: 2px; background: var(--inv-accent); }
.ps-wishes .inv-wish__name { font: 700 .95rem/1.3 var(--ps-serif); color: var(--inv-primary); }
.ps-wishes .inv-wish__message { margin-top: .15rem; font-size: .88rem; line-height: 1.55; }
.ps-wishes .inv-wish__time { margin-top: .25rem; font-size: .7rem; opacity: .75; }
.ps-wishes .inv-wish__reply { border-left-color: var(--inv-primary); background: color-mix(in srgb, var(--inv-background) 70%, #fff); }
.ps-wishes .inv-wishes__empty { text-align: center; }

/* ---------- closing: full photo fading into the deep leather ---------- */
.ps-closing { padding: 0 0 2.4rem; overflow: hidden; }
.ps-closing__photo { position: relative; z-index: 0; height: min(96vw, 420px); overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 98%); mask-image: linear-gradient(180deg, #000 45%, transparent 98%); }
.ps-closing__photo img { position: absolute; inset: -30px 0; width: 100%; height: calc(100% + 60px); object-fit: cover; object-position: center 30%; }
.ps-closing__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 32%, color-mix(in srgb, var(--inv-deep) 50%, transparent) 62%, var(--inv-deep) 100%);
}
.ps-closing__photo--empty { height: 13rem; background: radial-gradient(90% 80% at 50% 0%, color-mix(in srgb, var(--inv-primary) 85%, var(--inv-accent)), var(--inv-deep) 75%); }
.ps-closing__photo--empty::after { display: none; }
.ps-closing__body { position: relative; z-index: 1; margin-top: -5.5rem; padding: 0 1.7rem; }
/* compact: the whole closing fits about one screen */
.ps-closing .ps-monogram { width: 3.7rem; height: 3.7rem; margin-bottom: .7rem; font-size: .88rem; }
.ps-closing__fern { top: .8rem; width: 5.2rem; }
.ps-closing__fern--l { left: -2.7rem; rotate: 18deg; }
.ps-closing__fern--r { right: -2.7rem; rotate: -18deg; scale: -1 1; }
.ps-monogram {
    display: inline-grid; place-items: center; width: 4.6rem; height: 4.6rem; margin: 0 auto 1rem; border-radius: 50%;
    font: 400 1.05rem/1 var(--ps-serif); letter-spacing: .1em; white-space: nowrap; color: var(--inv-foil);
    background: color-mix(in srgb, var(--inv-deep) 80%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-foil) 80%, transparent), inset 0 0 0 5px color-mix(in srgb, var(--inv-deep) 80%, transparent), inset 0 0 0 6px color-mix(in srgb, var(--inv-foil) 45%, transparent), 0 10px 22px -8px rgb(0 0 0 / .6);
}
.ps-closing__title { font-size: clamp(2rem, 9vw, 2.35rem); text-shadow: 0 2px 12px rgb(0 0 0 / .35); }
.ps-closing__message { margin-top: .7rem; max-width: 20rem; font-size: .88rem; line-height: 1.6; }
.ps-closing__sign { margin-top: .9rem; }
.ps-closing__names {
    margin-top: .1rem; padding: 0 .25em; font: 400 clamp(2.3rem, 10.5vw, 2.7rem)/1.2 var(--ps-script);
    filter: drop-shadow(0 2px 0 rgb(0 0 0 / .35));
}
.ps-closing__end { margin-top: .5rem; font-size: 1.35rem; }

/* ---------- platform bits ---------- */
.ps-foot { padding: 0 1.2rem; background: var(--inv-deep); color: var(--inv-card); }
.ps-foot .inv-checkin { position: relative; z-index: 1; margin-top: 0; color: var(--inv-text); }
.ps-branding { position: relative; z-index: 1; color: color-mix(in srgb, var(--inv-card) 82%, var(--inv-deep)); opacity: 1; }
.inv-music { right: max(1rem, calc(50vw - 230px + 1rem)); }
.inv-music__button { background: var(--inv-primary); color: var(--inv-card); box-shadow: 0 0 0 2px var(--inv-card), 0 8px 18px -6px rgb(0 0 0 / .5); }
.inv-autoscroll { background: var(--inv-card); }
.inv-to-top.ps-to-top { left: max(1rem, calc(50vw - 230px + 1rem)); background: var(--inv-card); color: var(--inv-primary); box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-primary) 35%, transparent), 0 6px 14px -4px rgb(0 0 0 / .35); }

/* bottom menu (x-inv.nav, labelled) */
.inv-nav.ps-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-card) 95%, transparent);
    --inv-nav-text: var(--inv-text);
    --inv-nav-active: var(--inv-primary);
    max-width: min(calc(100vw - 1.5rem), 440px);
    border-color: color-mix(in srgb, var(--inv-primary) 30%, transparent);
    box-shadow: 0 12px 30px -12px rgb(0 0 0 / .45);
    font-family: var(--ps-serif);
}
.inv-nav.ps-nav .inv-nav__item.is-active { color: var(--inv-card); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html .ps-cover__photo, html .ps-cover__polaroid, .ps-live__badge span { animation: none !important; }
    .ps-cover--leave { transition: opacity .3s ease; }
    .ps-cover--gone { transform: translateX(-50%); }
}

/* ---------- cover fit: everything up to "Buka jurnal kami" on one phone screen ---------- */
@media (max-height: 760px) {
    .ps-cover__inner { gap: .7rem; }
    .ps-cover__stage { --ps-pol: min(58vw, 240px, 33svh); }
    .ps-cover__quote { font-size: .88rem; line-height: 1.45; }
}
@media (max-height: 680px) {
    .ps-cover__inner { gap: .55rem; padding-top: calc(2.1rem + env(safe-area-inset-top)); padding-bottom: calc(2.9rem + env(safe-area-inset-bottom)); }
    .ps-cover__stage { --ps-pol: min(54vw, 220px, 31svh); margin-top: .2rem; }
    .ps-cover__names { font-size: clamp(1.9rem, min(6.8svh, 10vw), 2.4rem); padding-bottom: .4rem; }
    .ps-cover__quote { font-size: .84rem; line-height: 1.4; }
    .ps-bookplate { padding-top: .55rem; padding-bottom: .6rem; }
    .ps-open.inv-button { padding: .78rem 1.5rem; }
}
@media (max-height: 600px) {
    .ps-cover__inner { gap: .45rem; padding-top: calc(1.8rem + env(safe-area-inset-top)); padding-bottom: calc(2.6rem + env(safe-area-inset-bottom)); }
    .ps-cover__stage { --ps-pol: min(50vw, 200px, 30svh); }
    .ps-cover__ribbon { height: 15svh; }
    .ps-cover__quote { font-size: .8rem; line-height: 1.36; max-width: 17rem; }
    .ps-bookplate__name { font-size: 1rem; }
    .ps-cover__names { font-size: 1.75rem; padding-top: .25rem; padding-bottom: .35rem; }
}

/* ---------- page end: the closing, then the nav's room ---------- */
/* the music player leaves 4.5rem under the page for the nav; without it, the footer keeps that room itself */
body:not(:has(.inv-music__space)) .ps-foot { padding-bottom: 4.5rem; }

/* ---------- intro scene "Halaman Album" (scene.json + sections/_scene; the intro lives in <body>, outside the page) ---------- */
.ps-scene-leather {
    position: absolute; inset: 0; background-color: var(--inv-primary);
    background-image: var(--ps-leather-img), radial-gradient(85% 55% at 50% 40%, rgb(255 255 255 / .08), transparent 70%), radial-gradient(140% 90% at 50% 50%, transparent 55%, rgb(0 0 0 / .45));
    background-size: 380px, cover, cover;
}
.ps-scene-page {
    position: absolute; inset: 0; border-radius: 3px 8px 8px 3px;
    background-color: var(--inv-background); background-image: var(--ps-paper-img), linear-gradient(90deg, rgb(0 0 0 / .16), transparent 6%, transparent 94%, rgb(0 0 0 / .05));
    background-size: 300px, cover;
    box-shadow: 0 2px 0 color-mix(in srgb, var(--inv-card) 70%, var(--inv-background)), 0 4px 0 color-mix(in srgb, var(--inv-background) 80%, #000), 0 30px 50px -20px rgb(0 0 0 / .7);
}
.ps-scene-page::before { content: ''; position: absolute; inset: 12px; border: 1px dashed color-mix(in srgb, var(--inv-primary) 28%, transparent); border-radius: 4px; }
.ps-scene-pol {
    position: relative; height: 100%; aspect-ratio: .84; margin: 0 auto; padding: 7% 7% 0; rotate: var(--ps-scene-tilt);
    display: flex; flex-direction: column; background: var(--inv-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 20px 30px -16px rgb(0 0 0 / .55);
}
.ps-scene-pol .ps-tape { width: 46%; height: 13%; top: -6%; }
.ps-scene-pol__photo { position: relative; flex: 1; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.ps-scene-pol__photo .ps-initials { font-size: min(9vw, 5.6svh); }
.ps-scene-pol__photo i { position: absolute; inset: 0; background: var(--ps-photo) center 30% / cover no-repeat; animation: ps-develop 1.8s ease-out var(--ps-scene-dev) both; }
.ps-scene-pol__foot { display: block; height: 22%; }
.ps-scene-flora { width: 100%; height: auto; filter: saturate(.9) drop-shadow(0 5px 5px rgb(40 20 10 / .25)); }
.ps-scene-ribbon { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the titles on a cream bookplate (the names always handwritten: this template has no font choice, so the
   engine's heading-font fallback is overridden) and held by washi, like a label pasted on the album page */
body.ps-body .inv-intro--scene .inv-scene__card {
    top: 52%; aspect-ratio: auto; width: min(var(--scene-card-w, 70vw), 19rem); padding: 1.7rem 1.3rem 1.5rem; rotate: -1.5deg;
    -webkit-mask: none; mask: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    background-color: var(--inv-card); background-image: var(--ps-paper-img); background-size: 300px;
    border-radius: 3px; box-shadow: inset 0 0 0 6px var(--inv-card), inset 0 0 0 7px color-mix(in srgb, var(--inv-primary) 35%, transparent), 0 18px 30px -14px rgb(0 0 0 / .5);
}
body.ps-body .inv-intro--scene .inv-scene__card::before {
    content: ''; position: absolute; top: -12px; left: 50%; width: 96px; height: 24px; translate: -50% 0; rotate: 3deg; opacity: .88;
    background: linear-gradient(180deg, rgb(255 255 255 / .28), transparent 60%), repeating-linear-gradient(100deg, rgb(255 255 255 / .16) 0 1px, transparent 1px 5px), color-mix(in srgb, var(--inv-accent) 82%, var(--inv-card));
}
body.ps-body .inv-scene__card .inv-intro__label { font: 700 .62rem/1.5 var(--ps-serif); letter-spacing: .3em; text-transform: uppercase; color: var(--ps-rose-ink); }
body.ps-body .inv-scene__card .inv-intro__names { margin: .3rem 0 .1rem; font: 400 clamp(2.4rem, 11vw, 3.1rem)/1.12 var(--ps-script); font-family: var(--ps-script) !important; color: var(--inv-text); text-wrap: balance; overflow-wrap: anywhere; }
body.ps-body .inv-scene__card .inv-intro__rule { background: linear-gradient(90deg, transparent, var(--ps-line), transparent); }
body.ps-body .inv-scene__card .inv-intro__date { font: 700 min(.7rem, 3.2vw)/1.5 var(--ps-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
body.ps-body .inv-intro--scene .inv-intro__skip { background: color-mix(in srgb, var(--inv-card) 88%, transparent); border-color: var(--ps-line); color: var(--inv-primary); font-family: var(--ps-serif); }
