/*
 * Base styles of the shared x-inv components. Every template may override them.
 * Colors come from the template's color variant as CSS variables (set by <x-inv.head>):
 *   --inv-primary, --inv-accent, --inv-background, --inv-text (+ any other color names)
 */

:root {
    --inv-primary: #7d8f69;
    --inv-accent: #c9a96e;
    --inv-background: #ffffff;
    --inv-text: #333333;
    --inv-radius: 12px;
}

[x-cloak] { display: none !important; }

/* Before "Buka undangan" is pressed the page does not scroll */
html:not(.inv-opened) body.inv-locked { overflow: hidden; }

.inv-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.5rem; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--inv-primary); color: #fff; font: inherit; text-decoration: none;
}
.inv-button--outline { background: transparent; color: var(--inv-primary); box-shadow: inset 0 0 0 1px var(--inv-primary); }
.inv-button:focus-visible { outline: 2px solid var(--inv-accent); outline-offset: 2px; }

/* countdown */
.inv-countdown { display: flex; justify-content: center; gap: .75rem; }
.inv-countdown__item { min-width: 4rem; padding: .75rem .5rem; border-radius: var(--inv-radius); background: color-mix(in srgb, var(--inv-primary) 12%, transparent); text-align: center; }
.inv-countdown__value { display: block; font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.inv-countdown__label { display: block; font-size: .75rem; opacity: .75; }
.inv-countdown__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1rem; }

/* maps */
.inv-maps__frame { width: 100%; height: 220px; border: 0; border-radius: var(--inv-radius); margin-top: .75rem; }

/* gallery */
.inv-gallery { display: grid; grid-template-columns: repeat(var(--inv-gallery-columns, 2), 1fr); gap: .5rem; }
.inv-gallery__item { padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--inv-radius) / 2); }
.inv-gallery__item { position: relative; }
/* tiles crop the photo: aim at its upper part, where the faces are in portrait photos (landscape ones are cut at the sides) */
.inv-gallery__item img, .inv-gallery__item video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
/* x-inv.gallery variant="slider": thumbnails with ‹ › on top, one large photo below (cross-fade) */
.inv-gallery-slider { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.inv-gallery-slider__strip { display: flex; align-items: center; gap: .35rem; }
.inv-gallery-slider__thumbs { display: flex; gap: .45rem; flex: 1; min-width: 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: .25rem .1rem; }
.inv-gallery-slider__thumbs::-webkit-scrollbar { display: none; }
.inv-gallery-slider__thumb {
    flex: 0 0 auto; width: 4.2rem; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: .5rem; overflow: hidden;
    background: none; cursor: pointer; opacity: .55; scroll-snap-align: center; transition: opacity .3s ease, border-color .3s ease, transform .18s ease;
}
.inv-gallery-slider__thumb.is-active { opacity: 1; border-color: var(--inv-primary); }
.inv-gallery-slider__thumb img, .inv-gallery-slider__thumb video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.inv-gallery-slider__arrow {
    flex: 0 0 auto; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0 0 .15rem; border: 0; border-radius: 999px; cursor: pointer;
    background: color-mix(in srgb, var(--inv-primary) 85%, transparent); color: #fff; font-size: 1.3rem; line-height: 1;
}
.inv-gallery-slider__stage { position: relative; display: grid; aspect-ratio: 4 / 5; border-radius: calc(var(--inv-radius) / 1.5); overflow: hidden; box-shadow: 0 18px 40px -22px rgb(0 0 0 / .45); }
.inv-gallery-slider__slide {
    grid-area: 1 / 1; padding: 0; border: 0; background: none; cursor: zoom-in; opacity: 0; visibility: hidden;
    transition: opacity .6s ease, visibility 0s linear .6s, transform 1.2s cubic-bezier(.2, .7, .2, 1); transform: scale(1.04);
}
.inv-gallery-slider__slide.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.inv-gallery-slider__slide img, .inv-gallery-slider__slide video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.inv-gallery-slider__count {
    position: absolute; right: .6rem; bottom: .6rem; margin: 0; padding: .15rem .55rem; border-radius: 999px;
    background: rgb(0 0 0 / .45); color: #fff; font: 600 .7rem/1.6 system-ui, sans-serif; letter-spacing: .05em; pointer-events: none;
}
.inv-gallery__play {
    position: absolute; inset: 50% auto auto 50%; width: 2.75rem; height: 2.75rem; margin: -1.375rem 0 0 -1.375rem;
    display: grid; place-items: center; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; font-size: 1rem;
}
/* page behind the lightbox does not scroll (iOS included) */
html.inv-no-scroll, html.inv-no-scroll body { overflow: hidden; }
/* lightbox: teleported to <body>, always above everything (menu, music, cover) and always full screen */
html body .inv-lightbox {
    position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
    padding: calc(3.75rem + env(safe-area-inset-top)) .5rem calc(3.75rem + env(safe-area-inset-bottom));
    background: rgb(0 0 0 / .92); overscroll-behavior: contain; touch-action: pan-y pinch-zoom;
}
.inv-lightbox img, .inv-lightbox video {
    display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
    border-radius: 4px; box-shadow: 0 10px 40px rgb(0 0 0 / .5);
}
/* round dark buttons: visible on light and dark photos alike */
.inv-lightbox__button {
    position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
    border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff;
    font: 400 1.6rem/1 system-ui, sans-serif; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.inv-lightbox__button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.inv-lightbox__close { top: calc(.6rem + env(safe-area-inset-top)); right: .6rem; font-size: 1.15rem; }
.inv-lightbox__counter {
    position: absolute; top: calc(1.35rem + env(safe-area-inset-top)); left: 1rem; margin: 0; padding: .3rem .6rem; border-radius: 999px;
    background: rgb(0 0 0 / .45); color: #fff; font: 500 .8rem/1 system-ui, sans-serif; letter-spacing: .08em;
}
.inv-lightbox__prev, .inv-lightbox__next { top: 50%; transform: translateY(-50%); }
.inv-lightbox__prev { left: .5rem; }
.inv-lightbox__next { right: .5rem; }

/* forms (rsvp, wishes) */
.inv-form { display: grid; gap: .75rem; text-align: left; }
.inv-form label { display: grid; gap: .25rem; font-size: .875rem; }
.inv-form input:not([type=radio]):not([type=checkbox]), .inv-form select, .inv-form textarea {
    width: 100%; padding: .625rem .75rem; border: 1px solid color-mix(in srgb, var(--inv-text) 25%, transparent);
    border-radius: calc(var(--inv-radius) / 2); background: #fff; color: #222; font: inherit; box-sizing: border-box;
}
.inv-form input[type=radio], .inv-form input[type=checkbox] { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--inv-primary); }
.inv-form__choices { border: 0; padding: 0; margin: 0; }
.inv-form__choices legend { margin-bottom: .375rem; font-size: .875rem; }
.inv-form__choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.inv-form__choices label { display: inline-flex; align-items: center; gap: .375rem; }
.inv-form__notice { padding: .75rem; border-radius: calc(var(--inv-radius) / 2); background: color-mix(in srgb, var(--inv-accent) 18%, transparent); font-size: .875rem; }
.inv-form__error { padding: .75rem; border-radius: calc(var(--inv-radius) / 2); background: #fdecea; color: #a12a1f; font-size: .875rem; }
.inv-form__trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.inv-button:disabled { opacity: .6; cursor: wait; }

/* wishes */
.inv-wishes__list { display: grid; gap: .6rem; margin-top: 1rem; text-align: left; }
/* about three wishes in view, the rest scrolls inside the box (newest first) */
.inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    max-height: var(--inv-wishes-height, 21rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .25rem;
    scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--inv-primary) 45%, transparent) transparent;
}
.inv-wishes__pager { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: .75rem; }
.inv-wishes__page-button {
    width: 2.1rem; height: 2.1rem; border-radius: 999px; cursor: pointer; font-size: 1.1rem; line-height: 1;
    border: 1px solid color-mix(in srgb, var(--inv-primary) 40%, transparent); background: transparent; color: var(--inv-primary);
}
.inv-wishes__page-button:disabled { opacity: .35; cursor: default; }
.inv-wishes__page { min-width: 3.5rem; text-align: center; font-size: .8rem; opacity: .8; }
.inv-wishes__empty { opacity: .7; font-size: .875rem; }
.inv-wish { padding: .7rem .85rem; border-radius: var(--inv-radius); background: color-mix(in srgb, var(--inv-primary) 8%, transparent); font-size: .9rem; line-height: 1.45; }
.inv-wish__name { margin: 0; font-weight: 600; font-size: .92rem; }
.inv-wish__message { margin: .2rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.inv-wish__time { margin: .3rem 0 0; font-size: .7rem; opacity: .65; }
.inv-wishes__more { justify-self: center; }
.inv-wish__reply { margin-top: .6rem; padding: .55rem .75rem; border-left: 2px solid var(--inv-accent); border-radius: 0 calc(var(--inv-radius) / 2) calc(var(--inv-radius) / 2) 0; background: color-mix(in srgb, var(--inv-accent) 12%, transparent); }
.inv-wish__reply-label { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .04em; opacity: .75; }
.inv-wish__reply-text { margin: .15rem 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: .9rem; }

/* gift */
/* the accounts' box changes nothing unless a template makes it a grid (e.g. two cards per row) */
.inv-gift__accounts { display: contents; }
.inv-gift__account { padding: 1rem; border-radius: var(--inv-radius); background: color-mix(in srgb, var(--inv-primary) 8%, transparent); }
.inv-gift__account + .inv-gift__account { margin-top: .75rem; }
.inv-gift__number { font-size: 1.25rem; font-weight: 600; letter-spacing: .05em; }
.inv-gift__logo { display: inline-flex; align-items: center; justify-content: center; height: 2.25rem; padding: .3rem .65rem; border-radius: .5rem; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .06); vertical-align: middle; }
.inv-gift__logo img { display: block; height: 100%; width: auto; max-width: 7rem; object-fit: contain; }
.inv-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* music player */
/* floating buttons (music, auto scroll, photobooth, to top): one small size, like other invitation sites */
:root { --inv-fab: 2.4rem; --inv-fab-small: 2.15rem; }
.inv-music { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
/* music and auto scroll start after "Buka undangan", so they stay out of the cover until then */
html:not(.inv-opened) body.inv-locked .inv-music { visibility: hidden; }
/* auto scroll control (x-inv.music-player): a round play/pause with a reading ring, a speed panel while it runs */
.inv-scroller { display: flex; flex-direction: column; align-items: center; gap: .5rem; transition: opacity .3s ease, transform .3s ease; }
.inv-scroller.is-away { opacity: 0; pointer-events: none; transform: translateY(6px); }
.inv-scroller__toggle {
    position: relative; display: grid; place-items: center; width: var(--inv-fab); height: var(--inv-fab); border: 0; border-radius: 999px; cursor: pointer;
    background: color-mix(in srgb, #fff 92%, transparent); color: var(--inv-primary);
    box-shadow: 0 4px 12px rgb(0 0 0 / .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.inv-scroller.is-running .inv-scroller__toggle { background: var(--inv-primary); color: #fff; }
.inv-scroller__toggle svg:not(.inv-scroller__ring) { width: 15px; height: 15px; }
.inv-scroller__ring { position: absolute; inset: -.15rem; width: calc(100% + .3rem); height: calc(100% + .3rem); transform: rotate(-90deg); pointer-events: none; }
.inv-scroller__ring circle { fill: none; stroke-width: 2.4; }
.inv-scroller__ring-track { stroke: color-mix(in srgb, var(--inv-primary) 16%, transparent); }
.inv-scroller__ring-bar { stroke: var(--inv-accent, var(--inv-primary)); stroke-linecap: round; stroke-dasharray: 138.2; transition: stroke-dashoffset .2s linear; }
.inv-scroller__panel {
    display: grid; justify-items: center; gap: .35rem; width: var(--inv-fab); padding: .6rem 0 .35rem; border-radius: 999px;
    background: color-mix(in srgb, #fff 92%, transparent); box-shadow: 0 4px 14px rgb(0 0 0 / .16);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.inv-scroller__track {
    --v: 35%;
    position: relative; width: .35rem; height: 5rem; margin: .3rem 0; border-radius: 999px; cursor: pointer; touch-action: none;
    background: color-mix(in srgb, var(--inv-primary) 16%, transparent);
}
/* a wider area to grab than the thin bar */
.inv-scroller__track::before { content: ''; position: absolute; inset: -.4rem -1rem; }
.inv-scroller__track:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 4px; }
.inv-scroller__fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); border-radius: 999px; background: var(--inv-primary); }
.inv-scroller__thumb {
    position: absolute; left: 50%; bottom: calc(var(--v) - .5rem); width: 1rem; height: 1rem; border-radius: 999px;
    background: var(--inv-primary); border: 2px solid #fff; transform: translateX(-50%); box-shadow: 0 2px 6px rgb(0 0 0 / .25);
}
.inv-scroller__value {
    min-width: 1.8rem; padding: .25rem 0; border-radius: 999px; text-align: center;
    background: color-mix(in srgb, var(--inv-primary) 10%, #fff); color: var(--inv-primary); font: 700 .66rem/1 system-ui, -apple-system, sans-serif;
}
.inv-scroller__step {
    display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 999px; cursor: pointer; padding: 0;
    background: color-mix(in srgb, var(--inv-primary) 10%, #fff); color: var(--inv-primary); font: 700 1rem/1 system-ui, sans-serif;
}
.inv-music__button {
    width: var(--inv-fab); height: var(--inv-fab); border: 0; border-radius: 999px; cursor: pointer;
    background: var(--inv-primary); color: #fff; box-shadow: 0 3px 10px rgb(0 0 0 / .2);
}
.inv-music__button { display: grid; place-items: center; }
.inv-music__icon { display: block; width: 16px; height: 16px; }
/* playing: three bars moving like an equalizer */
.inv-music__bars { display: flex; align-items: flex-end; gap: 2.5px; height: 13px; }
.inv-music__bars i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: inv-eq .9s ease-in-out infinite; }
.inv-music__bars i:nth-child(2) { animation-delay: -.3s; }
.inv-music__bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes inv-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .inv-music__bars i { animation: none; transform: scaleY(.7); } }

/* branding */
/* platform credit (x-inv.branding): one slim "Powered by" line with the logo; it takes the colour at the
   bottom of the section above (--inv-end-bg, set by the component), so the room under it for the fixed
   menu and music button reads as the end of that section, not as an empty strip */
.inv-branding {
    display: flex; justify-content: center; padding: .55rem 1rem; text-align: center;
    background: var(--inv-end-bg, transparent);
}
.inv-branding__link {
    display: inline-flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; opacity: .88;
    font-size: .6rem; font-weight: 500; line-height: 1; letter-spacing: .16em; text-transform: uppercase;
    transition: opacity .2s ease;
}
.inv-branding__link:hover, .inv-branding__link:focus-visible { opacity: 1; }
.inv-branding__logo { display: inline-flex; align-items: center; gap: .3rem; }
.inv-branding__mark, .inv-branding__word { display: inline-block; flex: none; background: currentColor; }
.inv-branding__mark {
    width: 2rem; height: 1.15rem;
    -webkit-mask: var(--inv-logo-mark) center / contain no-repeat; mask: var(--inv-logo-mark) center / contain no-repeat;
}
.inv-branding__word {
    width: 7.6rem; height: .56rem; overflow: hidden; color: inherit; font-size: 0; line-height: 0;
    -webkit-mask: var(--inv-logo-word) center / contain no-repeat; mask: var(--inv-logo-word) center / contain no-repeat;
}
@supports not ((mask-image: url("")) or (-webkit-mask-image: url(""))) {
    .inv-branding__word { width: auto; height: auto; background: none; font-size: .7rem; line-height: 1; letter-spacing: .08em; }
}
/* the room for the fixed music button below the credit continues the end colour */
.inv-branding ~ .inv-music__space { background: var(--inv-end-bg, transparent); }
/* room at the bottom so the fixed music button never covers the last line */
.inv-music__space { height: calc(4rem + env(safe-area-inset-bottom)); }

/* bottom menu (x-inv.nav): a floating pill; templates restyle it with the variables */
.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-background) 88%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 70%, transparent);
    --inv-nav-active: var(--inv-primary);
    position: fixed; left: 50%; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 35;
    display: flex; gap: .15rem; max-width: calc(100vw - 1.5rem); padding: .35rem;
    transform: translateX(-50%); border-radius: 999px;
    background: var(--inv-nav-bg); color: var(--inv-nav-text);
    border: 1px solid color-mix(in srgb, var(--inv-text) 10%, transparent);
    box-shadow: 0 10px 30px -10px rgb(0 0 0 / .35);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.inv-nav__item {
    -webkit-tap-highlight-color: transparent;
    display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 2.9rem;
    padding: .4rem .45rem .3rem; border-radius: 999px; color: inherit; text-decoration: none;
    font-size: .62rem; line-height: 1; transition: background .25s ease, color .25s ease;
}
.inv-nav__icon { width: 1.25rem; height: 1.25rem; }
.inv-nav__item.is-active { background: var(--inv-nav-active); color: #fff; }
.inv-nav--enter { transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .5s ease; }
.inv-nav--from { transform: translate(-50%, 150%); opacity: 0; }
@media (max-width: 359px) { .inv-nav__label { display: none; } .inv-nav__item { min-width: 2.5rem; padding: .55rem; } }
/* icons only: a white bar, the active icon in a dark square that rises a little */
.inv-nav--icons { gap: .35rem; padding: .45rem .6rem; border-radius: 1.1rem; overflow: visible; }
.inv-nav--icons .inv-nav__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inv-nav--icons .inv-nav__item { min-width: 2.75rem; padding: .6rem; border-radius: .85rem; transition: transform .45s cubic-bezier(.2, .8, .2, 1), background-color .35s ease, color .3s ease, box-shadow .35s ease; }
.inv-nav--icons .inv-nav__icon { width: 1.35rem; height: 1.35rem; }
.inv-nav--icons .inv-nav__item.is-active { transform: translateY(-.45rem); box-shadow: 0 8px 18px -6px rgb(0 0 0 / .45); }

/* x-inv.checkin-qr variant="tab": a tab on the right edge + a sheet with the QR */
.inv-qr-tab {
    position: fixed; right: 0; top: 55%; z-index: 36; display: flex; flex-direction: column; align-items: center; gap: .45rem;
    padding: .75rem .45rem; border: 1px solid color-mix(in srgb, var(--inv-text) 12%, transparent); border-right: 0;
    border-radius: .75rem 0 0 .75rem; background: color-mix(in srgb, #fff 94%, transparent); color: var(--inv-text);
    box-shadow: -4px 6px 18px -8px rgb(0 0 0 / .35); cursor: pointer; font: 600 .68rem/1 system-ui, sans-serif; letter-spacing: .14em;
}
.inv-qr-tab span { writing-mode: vertical-rl; }
.inv-qr-sheet { position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; padding: 1rem; background: rgb(0 0 0 / .55); }
.inv-qr-sheet__card { position: relative; margin: 0; width: min(20rem, 100%); }
.inv-qr-sheet__close { position: absolute; top: .5rem; right: .5rem; width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: rgb(0 0 0 / .06); cursor: pointer; }

/* x-inv.to-top */
.inv-to-top {
    position: fixed; left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 36; display: grid; place-items: center;
    width: var(--inv-fab-small); height: var(--inv-fab-small); border: 0; border-radius: .7rem; cursor: pointer;
    background: color-mix(in srgb, var(--inv-text) 18%, var(--inv-background)); color: var(--inv-text); box-shadow: 0 3px 10px rgb(0 0 0 / .18);
}
.inv-to-top svg { width: 15px; height: 15px; }
body:has(.inv-nav) .inv-to-top { bottom: calc(5.25rem + env(safe-area-inset-bottom)); }
/* with a menu the music buttons sit above it, and the page ends above it */
body:has(.inv-nav) .inv-music { bottom: calc(5.25rem + env(safe-area-inset-bottom)); }
/* the fixed menu also needs room below the credit; without music there is no music spacer */
body:has(.inv-nav):not(:has(.inv-music__space)) .inv-branding { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }

/* free trial ribbon (x-inv.branding): always on top, cannot be hidden by a template */
.inv-trial {
    position: fixed !important; z-index: 2147483000 !important; inset: 0 0 auto 0 !important;
    display: block !important; visibility: visible !important; opacity: 1 !important;
    padding: .4rem .75rem; text-align: center;
    font: 600 .72rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .02em;
    color: #fff; background: rgba(43, 91, 224, .92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.inv-trial a { color: inherit; text-decoration: underline; }

/*
 * Motion (only with html.inv-anim, set by <x-inv.head> when "reduce motion" is off).
 * Scroll reveal: data-reveal / data-reveal-children / data-reveal-sections, see invitation.js.
 * Entrance on load: class "inv-enter" with --enter-delay (e.g. on the cover text).
 */
html.inv-anim [data-reveal] {
    opacity: 0;
    transition:
        opacity .9s cubic-bezier(.2, .7, .2, 1),
        transform 1s cubic-bezier(.2, .7, .2, 1),
        clip-path 1.1s cubic-bezier(.65, 0, .35, 1);
    transition-delay: var(--reveal-delay, 0ms);
}
html.inv-anim [data-reveal="up"], html.inv-anim [data-reveal=""] { transform: translateY(26px); }
html.inv-anim [data-reveal="zoom"] { transform: scale(.92); }
html.inv-anim [data-reveal="left"] { transform: translateX(-32px); }
html.inv-anim [data-reveal="right"] { transform: translateX(32px); }
html.inv-anim [data-reveal="draw"] { opacity: 1; transform: scaleX(0); }
/* clipped effects never start fully hidden: Chrome does not report a fully clipped element as visible, so it would never reveal */
html.inv-anim [data-reveal="wipe"] { opacity: 1; clip-path: inset(92% 0 0 0); }
html.inv-anim [data-reveal].is-revealed { opacity: 1; transform: var(--reveal-own, none); }
/* the end state reaches far outside the box, so ornaments that stick out are not cut off */
html.inv-anim [data-reveal="wipe"].is-revealed { clip-path: inset(-100vh -100vw -100vh -100vw); }
/* elements sliding in from the side must never make the page scroll sideways on a phone */
html.inv-anim body { overflow-x: clip; }
/* more styles, so templates do not all move alike (pick one with <main data-reveal-sections="…">) */
html.inv-anim [data-reveal="blur"] { filter: blur(10px); transform: translateY(14px) scale(.985); transition-property: opacity, transform, filter; }
html.inv-anim [data-reveal="blur"].is-revealed { filter: none; }
html.inv-anim [data-reveal="rise"] { transform: translateY(64px) scale(.96); transition-duration: 1.15s, 1.3s; transition-timing-function: cubic-bezier(.16, 1, .3, 1); }
html.inv-anim [data-reveal="tilt"] { transform: perspective(900px) rotateX(16deg) translateY(30px); transform-origin: 50% 100%; }
html.inv-anim [data-reveal="flip"] { transform: perspective(900px) rotateY(-24deg) translateX(-12px); transform-origin: 0 50%; }
html.inv-anim [data-reveal="pop"] { transform: scale(.82); transition-timing-function: ease-out, cubic-bezier(.34, 1.56, .64, 1); }
html.inv-anim [data-reveal="curtain"] { opacity: 1; clip-path: inset(0 42% 0 42%); }
html.inv-anim [data-reveal="curtain"].is-revealed { clip-path: inset(-100vh -100vw -100vh -100vw); }

/* data-parallax: drifts a little slower than the page while it passes (browsers with scroll-driven animations) */
@supports (animation-timeline: view()) {
    html.inv-anim [data-parallax] { animation: inv-parallax linear both; animation-timeline: view(); }
    @keyframes inv-parallax { from { transform: translateY(var(--inv-parallax, 40px)); } to { transform: translateY(calc(var(--inv-parallax, 40px) * -1)); } }
}

/* tap feedback on buttons and photos: a small press, so the page feels alive */
html.inv-anim .inv-button, html.inv-anim .inv-gallery__item, html.inv-anim .inv-gallery-slider__thumb { transition: transform .18s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease; }
html.inv-anim .inv-button:active, html.inv-anim .inv-gallery__item:active, html.inv-anim .inv-gallery-slider__thumb:active { transform: scale(.96); }

@keyframes inv-enter {
    from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
}
html.inv-anim .inv-enter { animation: inv-enter 1.1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--enter-delay, 0s); }

/* "Buka undangan": a soft glow that breathes, so guests know where to tap */
@keyframes inv-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--inv-accent) 55%, transparent); }
    70% { box-shadow: 0 0 0 14px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
html.inv-anim .inv-open-button { animation: inv-pulse 2.4s ease-out 1.6s infinite; }
/* both: appear first, then breathe */
html.inv-anim .inv-open-button.inv-enter {
    animation:
        inv-enter 1.1s cubic-bezier(.2, .7, .2, 1) var(--enter-delay, 0s) both,
        inv-pulse 2.4s ease-out calc(var(--enter-delay, 0s) + 1.4s) infinite;
}
.inv-button { transition: transform .2s ease, filter .2s ease, background-color .2s ease; }
.inv-button:hover { filter: brightness(1.06); }
.inv-button:active { transform: scale(.97); }

/* gallery: photos zoom gently on hover; the grid fills in one by one */
.inv-gallery__item img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.inv-gallery__item:hover img { transform: scale(1.06); }

/* countdown boxes lift a little */
.inv-countdown__item { transition: transform .3s ease; }
.inv-countdown__item:hover { transform: translateY(-3px); }

/* guest check-in QR (<x-inv.checkin-qr>) */
.inv-checkin { max-width: 20rem; margin: 2rem auto; padding: 1.5rem; border-radius: var(--inv-radius); background: #fff; text-align: center; box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--inv-primary) 50%, transparent); }
.inv-checkin__title { margin: 0; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; color: var(--inv-primary); }
.inv-checkin__text { margin: .35rem 0 1rem; font-size: .85rem; opacity: .8; }
.inv-checkin__code { display: grid; place-items: center; width: 13rem; height: 13rem; margin: 0 auto; padding: .5rem; border-radius: .75rem; background: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 20%, transparent); }
.inv-checkin__code svg { width: 100%; height: 100%; }
.inv-checkin__loading { font-size: .75rem; opacity: .6; }
.inv-checkin__name { margin: .9rem 0 0; font-weight: 600; }

/* x-inv.calendar: the wedding month with the day circled */
.inv-cal {
    --inv-cal-bg: color-mix(in srgb, #fff 82%, var(--inv-background));
    --inv-cal-text: var(--inv-text);
    --inv-cal-mark: var(--inv-accent);
    width: min(100%, 22rem); margin: 0 auto; padding: 1.2rem 1.1rem 1rem; border-radius: calc(var(--inv-radius) / 1.5);
    background: var(--inv-cal-bg); color: var(--inv-cal-text); box-shadow: 0 16px 36px -24px rgb(0 0 0 / .45);
}
.inv-cal__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid color-mix(in srgb, var(--inv-cal-text) 18%, transparent); }
.inv-cal__month { margin: 0; font-family: var(--inv-font-display, inherit); font-size: 1.6rem; line-height: 1.1; }
.inv-cal__year { margin: 0; font-weight: 700; letter-spacing: .14em; font-size: .8rem; opacity: .8; }
.inv-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem .1rem; margin-top: .75rem; text-align: center; font-variant-numeric: tabular-nums; }
.inv-cal__dow { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.inv-cal__dow:first-child, .inv-cal__grid > :nth-child(7n + 1) { color: var(--inv-cal-mark); }
.inv-cal__day { position: relative; display: grid; place-items: center; height: 2rem; font-size: .95rem; }
.inv-cal__day--mark { color: var(--inv-cal-mark); font-weight: 700; }
.inv-cal__circle { position: absolute; inset: -.15rem -.05rem; width: calc(100% + .1rem); height: calc(100% + .3rem); color: var(--inv-cal-mark); }
html.inv-anim .inv-cal__circle path { stroke-dasharray: 130; stroke-dashoffset: 130; }
html.inv-anim .inv-cal.is-revealed .inv-cal__circle path { animation: inv-cal-draw 1.2s .5s ease-out forwards; }
@keyframes inv-cal-draw { to { stroke-dashoffset: 0; } }
.inv-cal__note { margin: .8rem 0 0; padding-top: .7rem; border-top: 1px dashed color-mix(in srgb, var(--inv-cal-text) 22%, transparent); text-align: center; font-size: .9rem; }

/* x-inv.photo-marquee: gallery photos sliding sideways */
.inv-marquee { --inv-marquee-height: 9rem; overflow: hidden; width: 100%; }
.inv-marquee__track { display: flex; gap: .6rem; width: max-content; }
.inv-marquee__track img { height: var(--inv-marquee-height); width: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: .5rem; flex: 0 0 auto; }
html.inv-anim .inv-marquee__track { animation: inv-marquee calc(var(--inv-marquee-count, 6) * 6s) linear infinite; }
html.inv-anim .inv-marquee--reverse .inv-marquee__track { animation-direction: reverse; }
@keyframes inv-marquee { to { transform: translateX(calc(-50% - .3rem)); } }

/* x-inv.ambient: drifting particles above the page, never catching taps */
.inv-ambient {
    --inv-ambient-1: var(--inv-accent);
    --inv-ambient-2: var(--inv-primary);
    position: fixed; inset: 0; width: 100%; height: 100%; z-index: 35; pointer-events: none; display: none;
}
html.inv-anim .inv-ambient { display: block; }

/* x-inv.demo-colors: demo only, a neutral glass pill top right (a tool of the demo, not part of the design) */
/* !important: a template rule for its column's children ("main > * { position: relative }") must never move it */
.inv-demo-colors { position: fixed !important; inset: calc(.75rem + env(safe-area-inset-top)) .75rem auto auto !important; z-index: 48 !important; margin: 0 !important; font: 500 .75rem/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif; color: #2b211a; }
.inv-demo-colors__toggle {
    display: inline-flex; align-items: center; gap: .4rem; height: 2rem; padding: 0 .7rem 0 .45rem; border: 0; border-radius: 999px; cursor: pointer;
    background: rgb(255 255 255 / .9); color: inherit; font: inherit; font-weight: 600;
    box-shadow: 0 0 0 1px rgb(0 0 0 / .08), 0 4px 14px rgb(0 0 0 / .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.inv-demo-colors__dots { display: inline-flex; }
.inv-demo-colors__dots i { width: .95rem; height: .95rem; border-radius: 999px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgb(0 0 0 / .1); }
.inv-demo-colors__dots i + i { margin-left: -.3rem; }
.inv-demo-colors__panel {
    position: absolute; top: calc(100% + .45rem); right: 0; width: 13.5rem; max-height: min(24rem, 70vh); overflow-y: auto; padding: .55rem;
    border-radius: 1rem; background: rgb(255 255 255 / .97); box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 14px 34px -8px rgb(0 0 0 / .35);
}
.inv-demo-colors__title { margin: .15rem .4rem .45rem; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a7b6c; }
.inv-demo-colors__option {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .5rem; border: 0; border-radius: .65rem; cursor: pointer;
    background: transparent; color: inherit; font: inherit; text-align: left;
}
.inv-demo-colors__option:hover { background: rgb(0 0 0 / .04); }
.inv-demo-colors__option.is-active { background: rgb(0 0 0 / .06); font-weight: 600; }
.inv-demo-colors__option.is-active::after { content: '✓'; margin-left: auto; color: #2b211a; }
.inv-demo-colors__note { margin: .4rem .4rem .15rem; font-size: .66rem; color: #8a7b6c; }
@media (prefers-color-scheme: dark) {
    .inv-demo-colors__toggle, .inv-demo-colors__panel { background: rgb(36 30 26 / .94); }
    .inv-demo-colors { color: #f6f0e4; }
    .inv-demo-colors__option.is-active::after { color: #f6f0e4; }
    .inv-demo-colors__option:hover, .inv-demo-colors__option.is-active { background: rgb(255 255 255 / .08); }
    .inv-demo-colors__dots i { box-shadow: 0 0 0 1.5px rgb(36 30 26), 0 0 0 2.5px rgb(255 255 255 / .15); }
}
html.inv-pb-open .inv-demo-colors { display: none; }

/* x-inv.demo-back: "Kembali" top left on demos, the same pill as the colour picker */
.inv-demo-back {
    position: fixed !important; inset: calc(.75rem + env(safe-area-inset-top)) auto auto .75rem !important; z-index: 48 !important; margin: 0 !important;
    display: inline-flex; align-items: center; gap: .25rem; height: 2rem; padding: 0 .8rem 0 .5rem; border-radius: 999px;
    font: 600 .75rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; color: #2b211a; text-decoration: none;
    background: rgb(255 255 255 / .9); box-shadow: 0 0 0 1px rgb(0 0 0 / .08), 0 4px 14px rgb(0 0 0 / .18);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.inv-demo-back svg { width: 1rem; height: 1rem; }
@media (prefers-color-scheme: dark) {
    .inv-demo-back { background: rgb(36 30 26 / .94); color: #f6f0e4; }
}
html.inv-pb-open .inv-demo-back { display: none; }

/* x-inv.photobooth: a "Foto" pill on the left, the camera full screen; the wrapper takes no room in the page */
.inv-pb-root { display: contents; }
.inv-pb-button {
    position: fixed; left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 40;
    display: grid; place-items: center; width: var(--inv-fab); height: var(--inv-fab); padding: 0; cursor: pointer;
    border: 0; border-radius: 999px; background: var(--inv-primary); color: #fff;
    box-shadow: 0 3px 10px rgb(0 0 0 / .22), inset 0 0 0 1.5px color-mix(in srgb, var(--inv-accent, #fff) 55%, transparent);
}
.inv-pb-button svg { width: 16px; height: 16px; }
body:has(.inv-nav) .inv-pb-button { bottom: calc(5.25rem + env(safe-area-inset-bottom)); }
body:has(.inv-to-top) .inv-pb-button { bottom: calc(1.5rem + var(--inv-fab-small) + env(safe-area-inset-bottom)); }
body:has(.inv-nav):has(.inv-to-top) .inv-pb-button { bottom: calc(5.75rem + var(--inv-fab-small) + env(safe-area-inset-bottom)); }
html.inv-pb-open, html.inv-pb-open body { overflow: hidden; }

/* the booth: a near-black camera app, lit softly by the invitation's colors; glass buttons, white active states */
.inv-pb {
    --pb-accent: #c9a96e; --pb-primary: #3a3a3a;
    --pb-glass: rgb(255 255 255 / .1); --pb-line: rgb(255 255 255 / .14);
    position: fixed; inset: 0; z-index: 2147482500; display: flex; flex-direction: column;
    background:
        radial-gradient(90% 50% at 15% -10%, color-mix(in srgb, var(--pb-primary) 45%, transparent), transparent 70%),
        radial-gradient(80% 45% at 100% 110%, color-mix(in srgb, var(--pb-accent) 22%, transparent), transparent 70%),
        #09090b;
    color: #fff; font: 500 .9rem/1.4 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.inv-pb button, .inv-pb label { -webkit-tap-highlight-color: transparent; font: inherit; }
.inv-pb__glass {
    background: var(--pb-glass); color: #fff; border: 0;
    box-shadow: inset 0 0 0 1px var(--pb-line);
    -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
.inv-pb__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .8rem .45rem; }
.inv-pb__heading { min-width: 0; text-align: center; }
.inv-pb__title { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 700; font-size: .78rem; letter-spacing: .04em; }
.inv-pb__dot { width: .5rem; height: .5rem; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 10px #ff3b5c; animation: inv-pb-live 1.6s ease-in-out infinite; }
@keyframes inv-pb-live { 50% { opacity: .35; } }
.inv-pb__subtitle { margin: .05rem 0 0; font-size: .74rem; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.inv-pb__tools { display: flex; align-items: center; gap: .4rem; min-width: 2.6rem; justify-content: flex-end; }
.inv-pb__icon {
    position: relative; display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 999px; cursor: pointer;
    transition: transform .15s;
}
.inv-pb__icon:active { transform: scale(.92); }
.inv-pb__icon--blank { background: none; box-shadow: none; cursor: default; }
.inv-pb__icon.is-hidden { visibility: hidden; }
.inv-pb__timer {
    display: inline-flex; align-items: center; gap: .3rem; height: 2.3rem; padding: 0 .75rem; border-radius: 999px; cursor: pointer;
    font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums;
}
.inv-pb__timer:disabled { opacity: .5; }

.inv-pb__stage { position: relative; flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; margin: 0 .75rem; touch-action: pan-y; }
.inv-pb__video { position: absolute; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
/* centered in the stage and shrunk to fit it (percent heights in a flex/grid item fail on iOS, an absolute box does not) */
.inv-pb__canvas {
    position: absolute; inset: 0; margin: auto; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%;
    border-radius: 1rem; box-shadow: 0 24px 60px -18px rgb(0 0 0 / .85), 0 0 0 1px rgb(255 255 255 / .08);
}
/* the first result "develops" like an instant print */
.inv-pb__canvas.is-developing { animation: inv-pb-develop 1.3s ease-out both; }
@keyframes inv-pb-develop {
    0% { filter: brightness(1.9) saturate(0) blur(6px); transform: scale(.96); }
    60% { filter: brightness(1.15) saturate(.7) blur(0); }
    100% { filter: none; transform: none; }
}
.inv-pb__sparkles { position: absolute; inset: 0; pointer-events: none; }
.inv-pb__sparkles i {
    position: absolute; width: .6rem; height: .6rem; background: #fff; opacity: 0;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    animation: inv-pb-sparkle 1.6s ease-out forwards;
}
.inv-pb__sparkles i:nth-child(3n) { background: var(--pb-accent); }
.inv-pb__sparkles i:nth-child(1) { left: 12%; top: 18%; animation-delay: .5s; }
.inv-pb__sparkles i:nth-child(2) { left: 84%; top: 14%; animation-delay: .65s; width: .9rem; height: .9rem; }
.inv-pb__sparkles i:nth-child(3) { left: 50%; top: 6%; animation-delay: .8s; }
.inv-pb__sparkles i:nth-child(4) { left: 8%; top: 52%; animation-delay: .7s; width: .9rem; height: .9rem; }
.inv-pb__sparkles i:nth-child(5) { left: 90%; top: 48%; animation-delay: .9s; }
.inv-pb__sparkles i:nth-child(6) { left: 20%; top: 84%; animation-delay: .75s; }
.inv-pb__sparkles i:nth-child(7) { left: 78%; top: 86%; animation-delay: .6s; width: 1rem; height: 1rem; }
.inv-pb__sparkles i:nth-child(8) { left: 36%; top: 30%; animation-delay: 1s; }
.inv-pb__sparkles i:nth-child(9) { left: 64%; top: 66%; animation-delay: 1.05s; }
.inv-pb__sparkles i:nth-child(10) { left: 30%; top: 70%; animation-delay: .95s; }
.inv-pb__sparkles i:nth-child(11) { left: 70%; top: 26%; animation-delay: .85s; width: .9rem; height: .9rem; }
.inv-pb__sparkles i:nth-child(12) { left: 48%; top: 92%; animation-delay: 1.1s; }
@keyframes inv-pb-sparkle {
    0% { opacity: 0; transform: scale(.2) rotate(0); }
    35% { opacity: 1; transform: scale(1.2) rotate(45deg); }
    100% { opacity: 0; transform: scale(.4) rotate(90deg) translateY(-12px); }
}
.inv-pb__note { margin: 0; opacity: .75; }
.inv-pb__error { max-width: 20rem; display: grid; gap: .7rem; text-align: center; }
.inv-pb__error p { margin: 0 0 .3rem; opacity: .9; }
/* the filter's name (or the timer) for a moment, big in the middle */
.inv-pb__toast {
    position: absolute; left: 50%; top: 42%; margin: 0; translate: -50% -50%; pointer-events: none;
    font: 700 1.9rem/1 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.01em; text-shadow: 0 4px 24px rgb(0 0 0 / .6);
    animation: inv-pb-toast .9s ease-out both;
}
@keyframes inv-pb-toast { 0% { opacity: 0; scale: .8; } 18% { opacity: 1; scale: 1.04; } 70% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1; } }
.inv-pb__prompt {
    position: absolute; left: 50%; top: .9rem; transform: translateX(-50%); margin: 0; padding: .5rem 1.05rem; max-width: 90%;
    border-radius: 999px; background: rgb(0 0 0 / .45); color: #fff; font-weight: 700; font-size: .95rem; text-align: center; white-space: nowrap;
    box-shadow: inset 0 0 0 1px var(--pb-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.inv-pb__count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.inv-pb__count-inner { display: grid; place-items: center; animation: inv-pb-tick .9s cubic-bezier(.2, .8, .2, 1) both; }
.inv-pb__count span { grid-area: 1 / 1; font: 700 6rem/1 'Space Grotesk', system-ui, sans-serif; font-variant-numeric: tabular-nums; text-shadow: 0 6px 30px rgb(0 0 0 / .55); }
.inv-pb__ring { grid-area: 1 / 1; width: 10rem; height: 10rem; transform: rotate(-90deg); filter: drop-shadow(0 4px 14px rgb(0 0 0 / .5)); }
.inv-pb__ring circle { fill: rgb(0 0 0 / .25); stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; animation: inv-pb-ring .9s linear forwards; }
@keyframes inv-pb-ring { to { stroke-dashoffset: 0; } }
@keyframes inv-pb-tick { 0% { opacity: 0; scale: 1.5; } 25% { opacity: 1; scale: 1; } 85% { opacity: 1; } 100% { opacity: .2; scale: .92; } }
.inv-pb__flash { position: absolute; inset: 0; background: #fff; opacity: .95; pointer-events: none; animation: inv-pb-flash .32s ease-out forwards; }
@keyframes inv-pb-flash { to { opacity: 0; } }

/* the panel: two tabs over a sideways list, then the shutter row */
.inv-pb__bottom { padding: .5rem .6rem .35rem; display: grid; gap: .5rem; }
.inv-pb__panel { display: grid; gap: .45rem; }
.inv-pb__tabs {
    justify-self: center; display: inline-flex; gap: .2rem; padding: .22rem; border-radius: 999px;
    background: rgb(255 255 255 / .07); box-shadow: inset 0 0 0 1px var(--pb-line);
}
.inv-pb__tab {
    min-width: 5.2rem; padding: .38rem .9rem; border: 0; border-radius: 999px; cursor: pointer;
    background: transparent; color: rgb(255 255 255 / .7); font-weight: 700; font-size: .78rem; transition: background .2s, color .2s;
}
.inv-pb__tab.is-active { background: #fff; color: #0b0b0d; }
.inv-pb__scroller {
    display: flex; gap: .45rem; overflow-x: auto; padding: .2rem .9rem .3rem; scrollbar-width: none; justify-content: safe center;
    scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
}
.inv-pb__scroller > * { scroll-snap-align: center; }
.inv-pb__scroller::-webkit-scrollbar { display: none; }
.inv-pb__frame, .inv-pb__filter {
    position: relative; flex: none; display: grid; justify-items: center; gap: .3rem; padding: .3rem .2rem .35rem; cursor: pointer;
    border: 0; border-radius: .9rem; background: transparent; color: rgb(255 255 255 / .72); transition: color .2s, transform .2s;
}
.inv-pb__frame { width: 4.2rem; }
.inv-pb__filter { width: 3.9rem; }
.inv-pb__frame:disabled, .inv-pb__filter:disabled { opacity: .5; }
.inv-pb__frame.is-active, .inv-pb__filter.is-active { color: #fff; }
.inv-pb__thumb { position: relative; display: block; width: 3.5rem; height: 4.3rem; border-radius: .6rem; transition: box-shadow .2s; }
.inv-pb__thumb canvas { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; border-radius: .35rem; box-shadow: 0 3px 10px rgb(0 0 0 / .5); }
.inv-pb__frame.is-active .inv-pb__thumb { box-shadow: 0 0 0 2px #09090b, 0 0 0 4px #fff; }
.inv-pb__frame-shots {
    position: absolute; right: .1rem; top: .05rem; padding: .12rem .3rem; border-radius: 999px;
    background: #fff; color: #0b0b0d; font: 800 .56rem/1 system-ui, sans-serif;
}
.inv-pb__swatch { display: block; width: 3.2rem; height: 3.2rem; border-radius: 50%; overflow: hidden; background: rgb(255 255 255 / .08); transition: box-shadow .2s; }
.inv-pb__swatch canvas { display: block; width: 100%; height: 100%; }
.inv-pb__filter.is-active .inv-pb__swatch { box-shadow: 0 0 0 2px #09090b, 0 0 0 4px #fff; }
.inv-pb__frame-name { font-weight: 600; font-size: .62rem; line-height: 1.15; text-align: center; }

/* stickers: a layer exactly over the result picture; the selected one gets a dashed outline, × and a turn handle */
.inv-pb__layer { position: absolute; touch-action: none; }
.inv-pb__sticker { position: absolute; touch-action: none; cursor: grab; }
.inv-pb__sticker img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.inv-pb__sticker.is-selected { outline: 1.5px dashed rgb(255 255 255 / .9); outline-offset: 4px; border-radius: 6px; }
.inv-pb__sticker-del, .inv-pb__sticker-handle {
    position: absolute; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: 999px;
    background: #fff; color: #0b0b0d; box-shadow: 0 2px 8px rgb(0 0 0 / .45); cursor: pointer; touch-action: none;
}
.inv-pb__sticker-del { left: -.95rem; top: -.95rem; }
.inv-pb__sticker-handle { right: -.95rem; bottom: -.95rem; cursor: nwse-resize; }
.inv-pb__scroller--stickers { align-items: center; }
.inv-pb__sticker-pick {
    flex: none; display: grid; place-items: center; height: 4.4rem; padding: .3rem .35rem; border: 0; border-radius: .9rem; cursor: pointer;
    background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px var(--pb-line); transition: transform .15s, background .2s;
}
.inv-pb__sticker-pick:active { transform: scale(.9); background: rgb(255 255 255 / .14); }
.inv-pb__sticker-pick img { display: block; max-height: 2.6rem; max-width: 7.5rem; width: auto; pointer-events: none; }
.inv-pb__sticker-pick.is-emoji img, .inv-pb__sticker-pick.is-initials img { max-height: 3rem; }
/* the boomerang: a gradient pill under the result buttons, a progress ring while it records */
.inv-pb__video-btn {
    justify-self: center; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: 0 1.1rem; border: 0; border-radius: 999px;
    cursor: pointer; color: #fff; font-weight: 700; font-size: .8rem;
    background: linear-gradient(100deg, #ff3b5c, #ff8a2b 55%, #ffc93c); box-shadow: 0 8px 22px -8px rgb(255 90 60 / .7);
}
.inv-pb__video-btn:disabled { opacity: .7; }
.inv-pb__making { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .6rem; background: rgb(0 0 0 / .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.inv-pb__making p { margin: 0; font-weight: 700; }
.inv-pb__making-ring { width: 5.5rem; height: 5.5rem; transform: rotate(-90deg); }
.inv-pb__making-ring circle { fill: none; stroke: rgb(255 255 255 / .2); stroke-width: 7; }
.inv-pb__making-ring circle + circle { stroke: #fff; stroke-linecap: round; stroke-dasharray: 327; transition: stroke-dashoffset .1s linear; }
.inv-pb__row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; max-width: 19rem; margin: 0 auto; width: 100%; }
.inv-pb__row--result { justify-content: center; max-width: 24rem; }
/* the shutter: a white ring around a white button that squeezes when pressed and turns red while shooting */
.inv-pb__shutter {
    position: relative; display: grid; place-items: center; width: 4.6rem; height: 4.6rem; padding: 0; border-radius: 999px; cursor: pointer;
    border: 4px solid #fff; background: transparent; box-shadow: 0 8px 24px rgb(0 0 0 / .45);
}
.inv-pb__shutter-core { width: 3.6rem; height: 3.6rem; border-radius: 999px; background: #fff; transition: transform .15s, border-radius .25s, background .25s; }
.inv-pb__shutter:active .inv-pb__shutter-core { transform: scale(.86); }
.inv-pb__shutter.is-busy .inv-pb__shutter-core { transform: scale(.55); border-radius: .5rem; background: #ff3b5c; }
.inv-pb__shutter:disabled { cursor: default; }
.inv-pb__shutter-badge {
    position: absolute; right: -.4rem; top: -.4rem; padding: .18rem .42rem; border-radius: 999px;
    background: var(--pb-accent); color: var(--pb-on-accent, #111); font: 800 .66rem/1 system-ui, sans-serif;
}
.inv-pb__action {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.9rem; padding: 0 1.15rem; cursor: pointer;
    border-radius: 999px; font-weight: 700; font-size: .86rem; transition: transform .15s;
}
.inv-pb__action:active { transform: scale(.95); }
.inv-pb__action--primary { flex: 1; max-width: 10rem; border: 0; background: #fff; color: #0b0b0d; box-shadow: 0 8px 22px -6px rgb(255 255 255 / .35); }
.inv-pb__btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 2.7rem; padding: 0 1.1rem; cursor: pointer;
    border: 1px solid var(--pb-line); border-radius: 999px; background: var(--pb-glass); color: #fff; font-weight: 700; font-size: .85rem;
}
.inv-pb__btn--primary { background: #fff; color: #0b0b0d; border-color: #fff; }
.inv-pb__privacy { margin: 0; text-align: center; font-size: .64rem; opacity: .45; }
@media (max-height: 640px) {
    .inv-pb__thumb { width: 3rem; height: 3.6rem; }
    .inv-pb__swatch { width: 2.7rem; height: 2.7rem; }
    .inv-pb__shutter { width: 4rem; height: 4rem; }
    .inv-pb__shutter-core { width: 3.1rem; height: 3.1rem; }
    .inv-pb__privacy { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .inv-pb__flash, .inv-pb__canvas.is-developing, .inv-pb__sparkles i, .inv-pb__ring circle, .inv-pb__count-inner, .inv-pb__toast, .inv-pb__dot { animation: none; }
    .inv-pb__flash, .inv-pb__sparkles i { opacity: 0; }
    .inv-pb__ring circle { stroke-dashoffset: 0; }
}

/* x-inv.opening: the copies of the cover during the transition, and the cinematic intro */
.inv-opening-root { display: contents; }
.inv-opening-copy, .inv-opening-copy * { pointer-events: none !important; }
html.inv-intro-on, html.inv-intro-on body { overflow: hidden; }
.inv-intro {
    --intro-primary: #222; --intro-accent: #c9a96e; --intro-slide: 2600ms; --intro-start: 800ms;
    position: fixed; inset: 0; z-index: 2147481000; overflow: hidden; background: #0b0b0d; color: #fff;
}
/*
 * The intro's exit into the page (OpeningScene::EXITS, data-exit): the same default for every template
 * (config invitation.intro_exit, "cahaya"), the client may pick another.
 * Common to all: the photo or scene pushes in, the titles lift off, the controls fade. Masks and clip-paths reveal
 * the page underneath; the three custom properties below let masks animate (browsers without @property simply
 * jump to the end, and the intro is removed after 1.5 s anyway).
 */
@property --exit-p { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --exit-d { syntax: '<length>'; inherits: false; initial-value: 0px; }
.inv-intro.is-ending { pointer-events: none; }
.inv-intro.is-ending .inv-intro__slide.is-active .inv-intro__photo { animation: none; transform: scale(1.16); filter: brightness(1.1); transition: transform 1.6s cubic-bezier(.4, 0, .2, 1), filter 1.6s ease; }
.inv-intro.is-ending .inv-intro__text { transition: transform .9s cubic-bezier(.5, 0, .3, 1), opacity .7s ease; transform: translateY(-3rem) scale(1.04); opacity: 0; }
.inv-intro.is-ending .inv-intro__dots, .inv-intro.is-ending .inv-intro__skip { transition: opacity .3s; opacity: 0; }
.inv-intro::after { content: ''; position: absolute; pointer-events: none; opacity: 0; }

/* 0 cahaya (default): a warm soft light blooms from the middle, the picture blurs gently into it and fades away */
.inv-intro.is-ending[data-exit="cahaya"] { animation: inv-exit-light 1.7s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes inv-exit-light {
    0% { opacity: 1; filter: none; }
    45% { opacity: 1; filter: blur(3px) brightness(1.2); }
    100% { opacity: 0; filter: blur(12px) brightness(1.4); }
}
.inv-intro[data-exit="cahaya"]::after {
    inset: -15%; mix-blend-mode: screen;
    background: radial-gradient(60% 50% at 50% 45%, color-mix(in srgb, var(--intro-accent) 30%, #fff) 0%, color-mix(in srgb, var(--intro-accent) 55%, #fff) 40%, transparent 78%);
}
.inv-intro.is-ending[data-exit="cahaya"]::after { animation: inv-exit-glow 1.7s ease forwards; }
@keyframes inv-exit-glow { 0% { opacity: 0; transform: scale(.75); } 45% { opacity: .85; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.35); } }
.inv-intro.is-ending[data-exit="cahaya"] .inv-intro__slide.is-active .inv-intro__photo { transform: scale(1.06); }

/* 1 sapu: a soft edge sweeps it away from the bottom, a glint of light riding the edge */
.inv-intro.is-ending[data-exit="sapu"] {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 64%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 64%, transparent 100%);
    -webkit-mask-size: 100% 300%; mask-size: 100% 300%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    animation: inv-exit-sapu 1.4s cubic-bezier(.65, 0, .35, 1) forwards;
}
@keyframes inv-exit-sapu { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 0 100%; mask-position: 0 100%; } }
.inv-intro[data-exit="sapu"]::after {
    left: 0; right: 0; height: 30%; bottom: -30%; mix-blend-mode: screen; filter: blur(14px);
    background: linear-gradient(0deg, transparent, color-mix(in srgb, var(--intro-accent) 55%, #fff) 50%, transparent);
}
.inv-intro.is-ending[data-exit="sapu"]::after { animation: inv-exit-glint 1.4s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes inv-exit-glint { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translateY(-400%); } }

/* 2 lubang: a hole opens from the centre and grows to the edges */
.inv-intro.is-ending[data-exit="lubang"] {
    -webkit-mask-image: radial-gradient(ellipse at 50% 45%, transparent var(--exit-p), #000 calc(var(--exit-p) + 8%));
    mask-image: radial-gradient(ellipse at 50% 45%, transparent var(--exit-p), #000 calc(var(--exit-p) + 8%));
    animation: inv-exit-hole 1.3s cubic-bezier(.6, 0, .3, 1) forwards;
}
@keyframes inv-exit-hole { from { --exit-p: 0%; } to { --exit-p: 110%; } }

/* 3 iris: the picture closes into a circle at the centre, like an old film */
.inv-intro.is-ending[data-exit="iris"] { animation: inv-exit-iris 1.3s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes inv-exit-iris { from { clip-path: circle(80% at 50% 45%); } 70% { clip-path: circle(14% at 50% 45%); } to { clip-path: circle(0% at 50% 45%); } }

/* 4 tirai: it closes from both sides into a line in the middle */
.inv-intro.is-ending[data-exit="tirai"] { animation: inv-exit-curtain 1.25s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes inv-exit-curtain { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 50% 0 50%); } }

/* 5 cakrawala: it closes into a bright line at the horizon, like a screen switching off */
.inv-intro.is-ending[data-exit="cakrawala"] { animation: inv-exit-horizon 1.2s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes inv-exit-horizon {
    from { clip-path: inset(0 0 0 0); filter: none; }
    75% { clip-path: inset(49.6% 0 49.6% 0); filter: brightness(1.8); }
    to { clip-path: inset(50% 50% 50% 50%); filter: brightness(2.2); }
}

/* 6 diagonal: a slanted edge wipes it towards the top right corner */
.inv-intro.is-ending[data-exit="diagonal"] { animation: inv-exit-diagonal 1.3s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes inv-exit-diagonal {
    from { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    to { clip-path: polygon(100% 0, 100% 0, 100% 0, 100% 0); }
}

/* 7 kabut: it melts into a bright haze */
.inv-intro.is-ending[data-exit="kabut"] { animation: inv-exit-haze 1.3s ease-in forwards; }
@keyframes inv-exit-haze { from { opacity: 1; filter: none; transform: none; } to { opacity: 0; filter: blur(16px) brightness(1.5); transform: scale(1.3); } }

/* 8 kartu: it shrinks into a rounded card and flies up, like closing an app */
.inv-intro.is-ending[data-exit="kartu"] { animation: inv-exit-card 1.2s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes inv-exit-card {
    from { transform: none; border-radius: 0; opacity: 1; }
    55% { transform: scale(.62); border-radius: 2rem; opacity: 1; }
    to { transform: translateY(-120%) scale(.42) rotate(-4deg); border-radius: 2.5rem; opacity: 0; }
}

/* 9 halaman: it turns away like the page of a book */
.inv-intro.is-ending[data-exit="halaman"] { transform-origin: left center; animation: inv-exit-page 1.4s cubic-bezier(.55, 0, .3, 1) forwards; }
@keyframes inv-exit-page {
    from { transform: perspective(1600px) rotateY(0); opacity: 1; }
    80% { opacity: 1; }
    to { transform: perspective(1600px) rotateY(-105deg); opacity: 0; }
}

/* 10 rebah: it tips over backwards, hinged at the bottom */
.inv-intro.is-ending[data-exit="rebah"] { transform-origin: center bottom; animation: inv-exit-fall 1.3s cubic-bezier(.6, 0, .4, 1) forwards; }
@keyframes inv-exit-fall { from { transform: perspective(1400px) rotateX(0); opacity: 1; } to { transform: perspective(1400px) rotateX(82deg) translateY(10%); opacity: 0; } }

/* 11 bokeh: round holes open all over it and swallow it */
.inv-intro.is-ending[data-exit="bokeh"] {
    -webkit-mask-image: radial-gradient(circle, transparent var(--exit-d), #000 calc(var(--exit-d) + 1.5px));
    mask-image: radial-gradient(circle, transparent var(--exit-d), #000 calc(var(--exit-d) + 1.5px));
    -webkit-mask-size: 52px 52px; mask-size: 52px 52px;
    animation: inv-exit-bokeh 1.3s cubic-bezier(.55, 0, .45, 1) forwards;
}
@keyframes inv-exit-bokeh { from { --exit-d: 0px; } to { --exit-d: 40px; } }

/* 12 krey: horizontal blinds close */
.inv-intro.is-ending[data-exit="krey"] {
    -webkit-mask-image: repeating-linear-gradient(180deg, transparent 0 var(--exit-d), #000 var(--exit-d) 64px);
    mask-image: repeating-linear-gradient(180deg, transparent 0 var(--exit-d), #000 var(--exit-d) 64px);
    animation: inv-exit-blinds 1.25s cubic-bezier(.6, 0, .4, 1) forwards;
}
@keyframes inv-exit-blinds { from { --exit-d: 0px; } to { --exit-d: 64px; } }

/* 13 bilah: vertical slats close, one after another from the left */
.inv-intro.is-ending[data-exit="bilah"] {
    -webkit-mask-image: repeating-linear-gradient(90deg, transparent 0 var(--exit-d), #000 var(--exit-d) 56px);
    mask-image: repeating-linear-gradient(90deg, transparent 0 var(--exit-d), #000 var(--exit-d) 56px);
    animation: inv-exit-slats 1.25s cubic-bezier(.6, 0, .4, 1) forwards;
}
@keyframes inv-exit-slats { from { --exit-d: 0px; } to { --exit-d: 56px; } }

/* 14 pusaran: it twirls away into the distance */
.inv-intro.is-ending[data-exit="pusaran"] { animation: inv-exit-twirl 1.3s cubic-bezier(.6, 0, .4, 1) forwards; }
@keyframes inv-exit-twirl { from { transform: none; opacity: 1; filter: none; } to { transform: rotate(-22deg) scale(1.9); opacity: 0; filter: blur(8px); } }

/* 15 geser: it glides off to the left while sinking back */
.inv-intro.is-ending[data-exit="geser"] { transform-origin: right center; animation: inv-exit-slide 1.25s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes inv-exit-slide {
    from { transform: none; opacity: 1; }
    35% { transform: scale(.9); opacity: 1; }
    to { transform: translateX(-115%) scale(.85); opacity: .6; }
}

/* 16 kilau: a burst of light from the centre washes it out */
.inv-intro.is-ending[data-exit="kilau"] { animation: inv-exit-flash-out .7s ease-in .55s forwards; }
@keyframes inv-exit-flash-out { to { opacity: 0; } }
.inv-intro[data-exit="kilau"]::after {
    left: 50%; top: 45%; width: 40vmax; height: 40vmax; margin: -20vmax 0 0 -20vmax; border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, color-mix(in srgb, var(--intro-accent) 45%, #fff) 35%, transparent 70%);
}
.inv-intro.is-ending[data-exit="kilau"]::after { animation: inv-exit-burst 1.2s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes inv-exit-burst { 0% { opacity: 0; transform: scale(.1); } 40% { opacity: 1; transform: scale(2.4); } 100% { opacity: 0; transform: scale(5); } }
/* the slideshow: each photo melts into the next (slow fade with a slight blur), never a hard cut */
.inv-intro__slide { position: absolute; inset: 0; opacity: 0; filter: blur(4px); transition: opacity 1.8s cubic-bezier(.4, 0, .2, 1), filter 1.8s ease; }
.inv-intro__slide.is-active { opacity: 1; filter: none; }
.inv-intro__slide.is-past { opacity: 0; }
.inv-intro__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transform: scale(1.04); }
/* Ken Burns, gentle: slowly in on one photo, slowly out on the next */
.inv-intro__slide.is-active .inv-intro__photo { animation: inv-kb-in calc(var(--intro-slide) + 2.4s) linear forwards; }
.inv-intro__slide.is-active .inv-intro__photo--out { animation-name: inv-kb-out; }
@keyframes inv-kb-in { from { transform: scale(1.03) translate(0, 0); } to { transform: scale(1.11) translate(-1%, -1.2%); } }
@keyframes inv-kb-out { from { transform: scale(1.11) translate(1%, -.6%); } to { transform: scale(1.03) translate(0, 0); } }
.inv-intro__shade {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(180deg, rgb(0 0 0 / .45), transparent 28%, transparent 48%, color-mix(in srgb, var(--intro-primary) 70%, #000) 100%),
        radial-gradient(120% 80% at 50% 50%, transparent 55%, rgb(0 0 0 / .45));
}
/* film titles, one after another once the cover is out of the way */
.inv-intro__text { position: absolute; left: 1.5rem; right: 1.5rem; bottom: calc(4.5rem + env(safe-area-inset-bottom)); text-align: center; }
.inv-intro__label, .inv-intro__names, .inv-intro__rule, .inv-intro__date { opacity: 0; }
.inv-intro.is-playing .inv-intro__label { animation: inv-intro-rise 1s ease-out calc(var(--intro-start) + .1s) forwards; }
.inv-intro.is-playing .inv-intro__names { animation: inv-intro-title 1.4s cubic-bezier(.2,.7,.2,1) calc(var(--intro-start) + .5s) forwards; }
.inv-intro.is-playing .inv-intro__rule { animation: inv-intro-rule 1s ease-out calc(var(--intro-start) + 1.2s) forwards; }
.inv-intro.is-playing .inv-intro__date { animation: inv-intro-rise 1s ease-out calc(var(--intro-start) + 1.5s) forwards; }
.inv-intro__label { margin: 0 0 .7rem; font: 600 .74rem/1.3 system-ui, -apple-system, sans-serif; letter-spacing: .32em; text-transform: uppercase; color: var(--intro-accent); }
.inv-intro__names { margin: 0; font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1.08; text-shadow: 0 6px 30px rgb(0 0 0 / .45); overflow-wrap: anywhere; }
.inv-intro__rule { display: block; width: 6rem; height: 1px; margin: 1rem auto .85rem; background: linear-gradient(90deg, transparent, var(--intro-accent), transparent); }
.inv-intro__date { margin: 0; font: 500 .92rem/1.3 system-ui, -apple-system, sans-serif; letter-spacing: .08em; opacity: 0; }
@keyframes inv-intro-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes inv-intro-title { from { opacity: 0; transform: translateY(18px) scale(.96); filter: blur(6px); letter-spacing: .06em; } to { opacity: 1; transform: none; filter: none; letter-spacing: 0; } }
@keyframes inv-intro-rule { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
.inv-intro__dots { position: absolute; left: 50%; bottom: calc(2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: .4rem; }
.inv-intro__dots span { width: 1.4rem; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .3); transition: background .4s; }
.inv-intro__dots span.is-on { background: var(--intro-accent); }
.inv-intro__skip {
    position: absolute; top: calc(1rem + env(safe-area-inset-top)); right: 1rem; padding: .45rem .95rem; border-radius: 999px; cursor: pointer;
    border: 1px solid rgb(255 255 255 / .4); background: rgb(0 0 0 / .3); color: #fff; font: 600 .78rem/1 system-ui, sans-serif;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
@media (prefers-reduced-motion: reduce) {
    .inv-intro.is-ending[data-exit] { animation: none; -webkit-mask-image: none; mask-image: none; clip-path: none; transform: none; filter: none; opacity: 0; transition: opacity .6s; }
    .inv-intro.is-ending[data-exit]::after { animation: none; }
    .inv-intro__slide.is-active .inv-intro__photo { animation: none; }
    .inv-intro__slide { filter: none; transition: opacity .6s; }
    .inv-intro.is-playing .inv-intro__label, .inv-intro.is-playing .inv-intro__names, .inv-intro.is-playing .inv-intro__rule, .inv-intro.is-playing .inv-intro__date { animation: none; opacity: 1; }
}

/* a scene intro: painted layers a camera glides through, butterflies, the titles on a frosted card */
.inv-intro--scene { background: var(--scene-bg, #e9eef4); color: var(--scene-ink, #2f4f7a); }
.inv-scene__stage { position: absolute; inset: 0; overflow: hidden; }
.inv-scene__layer { position: absolute; will-change: transform, opacity; }
.inv-scene__layer img { display: block; max-width: none; user-select: none; pointer-events: none; }
.inv-scene__sway { transform-origin: inherit; animation: inv-scene-sway 6s ease-in-out var(--sway-delay, 0s) infinite alternate; }
@keyframes inv-scene-sway { from { transform: rotate(calc(var(--sway) * -1)) translateY(0); } to { transform: rotate(var(--sway)) translateY(-1.2%); } }
.inv-scene__butterfly { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.inv-scene__butterfly svg { display: block; width: 2.9rem; height: auto; fill: #c9a46a; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .2)); }
.inv-scene__butterfly:nth-child(even) svg { fill: color-mix(in srgb, var(--scene-ink) 70%, #fff); }
.inv-scene__wing { transform-origin: 20px 16px; animation: inv-scene-flap .32s ease-in-out infinite alternate; }
.inv-scene__wing--right { animation-delay: 0s; }
@keyframes inv-scene-flap { from { transform: scaleX(1); } to { transform: scaleX(.25); } }
/* the frosted card: a scalloped "cloud" from an SVG mask, the titles on it */
.inv-scene__card {
    position: absolute; left: 50%; top: 44%; width: min(var(--scene-card-w, 78vw), 21rem); aspect-ratio: 5 / 6; display: grid; place-content: center;
    padding: 2.4rem 1.8rem; text-align: center; color: var(--scene-ink);
    background: color-mix(in srgb, #fff 58%, transparent); -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 360'%3E%3Cg%3E%3Crect x='40' y='40' width='220' height='280' rx='30'/%3E%3Ccircle cx='60' cy='60' r='48'/%3E%3Ccircle cx='150' cy='38' r='42'/%3E%3Ccircle cx='240' cy='60' r='48'/%3E%3Ccircle cx='38' cy='180' r='38'/%3E%3Ccircle cx='262' cy='180' r='38'/%3E%3Ccircle cx='60' cy='300' r='48'/%3E%3Ccircle cx='150' cy='322' r='42'/%3E%3Ccircle cx='240' cy='300' r='48'/%3E%3Ccircle cx='38' cy='110' r='30'/%3E%3Ccircle cx='262' cy='110' r='30'/%3E%3Ccircle cx='38' cy='250' r='30'/%3E%3Ccircle cx='262' cy='250' r='30'/%3E%3Ccircle cx='105' cy='42' r='30'/%3E%3Ccircle cx='195' cy='42' r='30'/%3E%3Ccircle cx='105' cy='318' r='30'/%3E%3Ccircle cx='195' cy='318' r='30'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 360'%3E%3Cg%3E%3Crect x='40' y='40' width='220' height='280' rx='30'/%3E%3Ccircle cx='60' cy='60' r='48'/%3E%3Ccircle cx='150' cy='38' r='42'/%3E%3Ccircle cx='240' cy='60' r='48'/%3E%3Ccircle cx='38' cy='180' r='38'/%3E%3Ccircle cx='262' cy='180' r='38'/%3E%3Ccircle cx='60' cy='300' r='48'/%3E%3Ccircle cx='150' cy='322' r='42'/%3E%3Ccircle cx='240' cy='300' r='48'/%3E%3Ccircle cx='38' cy='110' r='30'/%3E%3Ccircle cx='262' cy='110' r='30'/%3E%3Ccircle cx='38' cy='250' r='30'/%3E%3Ccircle cx='262' cy='250' r='30'/%3E%3Ccircle cx='105' cy='42' r='30'/%3E%3Ccircle cx='195' cy='42' r='30'/%3E%3Ccircle cx='105' cy='318' r='30'/%3E%3Ccircle cx='195' cy='318' r='30'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
    opacity: 0; transform: translate(-50%, -50%) scale(.86);
}
.inv-intro--scene.is-playing .inv-scene__card { animation: inv-scene-card 1.4s cubic-bezier(.2, .7, .2, 1) var(--scene-card-at, 3.5s) forwards; }
@keyframes inv-scene-card {
    from { opacity: 0; transform: translate(-50%, -46%) scale(.86); filter: blur(8px); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
}
.inv-scene__card .inv-intro__label { color: color-mix(in srgb, var(--intro-accent) 70%, var(--scene-ink)); }
.inv-scene__card .inv-intro__names { font-size: clamp(2.1rem, 9.5vw, 3rem); text-shadow: none; color: var(--scene-ink); }
.inv-scene__card .inv-intro__date { color: var(--scene-ink); }
.inv-scene__card .inv-intro__rule { background: linear-gradient(90deg, transparent, var(--intro-accent), transparent); }
/* the scene's titles come in with the card */
.inv-intro--scene.is-playing .inv-intro__label { animation-delay: calc(var(--scene-card-at, 3.5s) + .4s); }
.inv-intro--scene.is-playing .inv-intro__names { animation-delay: calc(var(--scene-card-at, 3.5s) + .7s); }
.inv-intro--scene.is-playing .inv-intro__rule { animation-delay: calc(var(--scene-card-at, 3.5s) + 1.2s); }
.inv-intro--scene.is-playing .inv-intro__date { animation-delay: calc(var(--scene-card-at, 3.5s) + 1.4s); }
.inv-intro--scene .inv-intro__skip { border-color: color-mix(in srgb, var(--scene-ink) 35%, transparent); background: rgb(255 255 255 / .55); color: var(--scene-ink); }
/* its exit: the camera pushes into the painting while the sweep clears it */
.inv-intro--scene.is-ending .inv-scene__stage { transition: transform 1.4s cubic-bezier(.5, 0, .3, 1), filter 1.4s ease; transform: scale(1.22); filter: brightness(1.12); }
.inv-intro--scene.is-ending[data-exit="cahaya"] .inv-scene__stage { transition-duration: 1.7s; transition-timing-function: cubic-bezier(.4, 0, .2, 1); transform: scale(1.06); }
.inv-intro--scene.is-ending .inv-scene__card { transition: transform .9s cubic-bezier(.5, 0, .3, 1), opacity .7s ease; transform: translate(-50%, -62%) scale(1.06); opacity: 0; animation: none; }
@media (prefers-reduced-motion: reduce) {
    .inv-scene__sway, .inv-scene__wing { animation: none; }
    .inv-intro--scene.is-playing .inv-scene__card { animation: none; opacity: 1; transform: translate(-50%, -50%); }
}

/* a template's own scene: its ornaments (inline SVG) fill their layer box */
.inv-scene__art { width: 100%; height: 100%; }
.inv-scene__art > svg, .inv-scene__art > img { display: block; width: 100%; height: 100%; }

/* iPhone & iPad (Safari and Chrome are both WebKit there) zoom the page in when a field with text smaller than 16px
   is tapped, and the page stays zoomed. Fields get at least 16px on those devices only; elsewhere the design is
   unchanged and pinch-zoom still works everywhere. */
@supports (-webkit-touch-callout: none) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
    select,
    textarea {
        font-size: max(16px, 1em) !important;
    }
}
