/*
 * thm02 identity refresh
 *
 * Keeps the native v2 structure and scroll behaviour, while restoring the
 * original theme's airy coral photography DNA. This layer intentionally
 * avoids thm01's warm stationery grammar: wine/ivory surfaces, inset photo
 * frames, dried botanical backdrops, and oversized Cormorant typography.
 */

body.theme-thm02 {
    --thm02-ivory: #f6faf7;
    --thm02-paper: #ffffff;
    --thm02-blush: #fde8e6;
    --thm02-rose: #f69d9d;
    --thm02-wine: #b94351;
    /* Wine text on ivory, blush and sage panels; text on coral uses ink. */
    --thm02-wine-text: #a13a46;
    --thm02-wine-dark: #39413f;
    --thm02-sage: #ddebe6;
    --thm02-ink: #39413f;
    --thm02-muted: #535d5a;
    --thm02-line: rgba(57, 65, 63, 0.16);
    /* The couple's own fonts (custom font add-on) take over when set; see x-theme-custom-fonts. */
    --thm02-display: var(--invie-font-heading, "Noto Serif"), Georgia, "Times New Roman", serif;
    --thm02-body: var(--invie-font-body, "Montserrat"), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--thm02-ivory);
    color: var(--thm02-ink);
    font-family: var(--thm02-body);
}

.thm02-page,
.thm02-invitation {
    background: var(--thm02-ivory);
}

/* Keep the first screen fully composed behind the opaque cover. The shared
   kernel still owns aria-hidden/inert, so this only changes paint readiness. */
.thm02-invitation {
    opacity: 1;
    transition: none;
}

body.theme-thm02:not([data-theme-state="open"]) {
    height: 100dvh;
    overflow: hidden;
}

body.theme-thm02:not([data-theme-state="open"]) .thm02-invitation[aria-hidden="true"] {
    visibility: visible;
}

.thm02-intro {
    content-visibility: visible !important;
}

.thm02-page {
    background-image:
        radial-gradient(circle at 104% 12%, rgba(246, 157, 157, 0.24), transparent 20rem),
        radial-gradient(circle at -8% 42%, rgba(221, 235, 230, 0.9), transparent 24rem);
}

.thm02-kicker {
    color: var(--thm02-wine-text);
    font-size: clamp(12px, 1.7vw, 13px);
    letter-spacing: 0.13em;
}

.thm02-heading {
    width: min(100%, 660px);
    margin-bottom: clamp(38px, 7vw, 68px);
}

.thm02-heading h2,
.thm02-dresscode h2,
.thm02-health h2 {
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(38px, 7.6cqw, 60px);
    font-weight: 400;
    letter-spacing: -0.012em;
    line-height: 1.08;
}

.thm02-heading > p:last-child {
    color: var(--thm02-muted);
    line-height: 1.8;
}

.thm02-button {
    min-height: 48px;
    border-radius: 14px;
    letter-spacing: 0.1em;
}

.thm02-button--primary {
    background: var(--thm02-wine);
    color: #fff;
}

.thm02-button--primary:hover {
    background: #983542;
}

.thm02-button--outline {
    border-color: rgba(185, 67, 81, 0.42);
    color: var(--thm02-wine);
}

.thm02-text-link {
    color: var(--thm02-wine);
    letter-spacing: 0.09em;
}

/* Opening: photography and invitation copy share the viewport without obscuring each other */
.thm02-cover {
    grid-template: minmax(220px, 48dvh) minmax(0, 1fr) / minmax(0, 1fr);
    grid-template-areas:
        "media"
        "copy";
    place-items: stretch;
    background: var(--thm02-rose);
    color: var(--thm02-ink);
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 760ms;
    will-change: transform;
}

body.theme-thm02[data-theme-state="open"] .thm02-cover {
    visibility: hidden;
    opacity: 1;
    transform: translate3d(0, -100%, 0);
}

.thm02-cover__media {
    position: relative;
    grid-area: media;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(155deg, #eef3f0, #cfd8d4);
    isolation: isolate;
}

.thm02-cover__image,
.thm02-cover__wash,
.thm02-cover__grain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.thm02-cover__image {
    z-index: 0;
    object-fit: cover;
    filter: saturate(0.92) contrast(0.98) brightness(1.02);
}

.thm02-cover__wash {
    z-index: 1;
    background: linear-gradient(180deg, rgba(57, 65, 63, 0.02) 30%, rgba(57, 65, 63, 0.08) 74%, rgba(57, 65, 63, 0.2));
}

.thm02-cover__grain,
.thm02-cover__frame::before,
.thm02-cover__frame::after,
.thm02-cover__monogram {
    display: none;
}

.thm02-cover__frame {
    z-index: 2;
    grid-area: copy;
    width: 100%;
    height: calc(100% + 26px);
    min-height: 0;
    align-items: flex-start;
    justify-content: center;
    margin: -26px 0 0;
    padding: clamp(22px, 4dvh, 36px) clamp(22px, 5vw, 42px) max(22px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 34px 34px 0 0;
    background: var(--thm02-rose);
    box-shadow: 0 -18px 44px rgba(57, 65, 63, 0.1);
    text-align: left;
    backdrop-filter: none;
}

.thm02-cover .thm02-kicker {
    color: #593036;
}

.thm02-cover h1 {
    margin: 8px 0 10px;
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(37px, 9cqw, 58px);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.03;
    text-align: left;
}

.thm02-cover__date {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(246, 250, 247, 0.88);
    color: var(--thm02-ink);
    letter-spacing: 0.15em;
}

.thm02-cover__guest {
    align-items: flex-start;
    margin: 14px 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 16px;
    background: rgba(246, 250, 247, 0.78);
    text-align: left;
}

.thm02-cover__guest span,
.thm02-cover__guest small {
    color: #535e5a;
}

.thm02-cover__guest strong {
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-weight: 400;
}

.thm02-cover .thm02-button--light {
    border: 0;
    background: var(--thm02-wine);
    color: #fff;
    box-shadow: none;
}

/* Intro: one photographic column plus a floating information card */
.thm02-intro {
    min-height: 0;
    background: var(--thm02-ivory);
}

.thm02-nav {
    min-height: 64px;
    border-bottom-color: #d8e5df;
    background: rgba(255, 255, 255, 0.92);
}

.thm02-nav__brand {
    color: var(--thm02-wine);
    font-family: var(--thm02-display);
    font-size: 23px;
    font-weight: 400;
}

.thm02-nav__brand i {
    color: var(--thm02-rose);
}

.thm02-nav__links a {
    color: var(--thm02-ink);
    letter-spacing: 0.1em;
}

.thm02-intro__canvas {
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) !important;
    background: var(--thm02-ivory);
}

.thm02-intro__portrait {
    min-height: clamp(430px, 64dvh, 650px) !important;
    border-radius: 0 0 58px 0;
    background: var(--thm02-blush);
}

.thm02-intro__portrait img {
    filter: saturate(0.92) contrast(0.98) brightness(1.02);
}

.thm02-intro__portrait::after {
    background: linear-gradient(180deg, transparent 64%, rgba(57, 65, 63, 0.3));
}

.thm02-intro__portrait figcaption {
    font-family: var(--thm02-body);
    font-size: 12px;
    font-style: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.thm02-intro__copy {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 32px), 600px);
    align-items: flex-start;
    margin: -76px auto 0;
    padding: clamp(34px, 6vw, 52px);
    border-radius: 30px 30px 10px 10px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(57, 65, 63, 0.12);
}

.thm02-intro__copy h2 {
    margin: 9px 0 20px;
    font-family: var(--thm02-display);
    font-size: clamp(42px, 8.8vw, 70px);
    font-weight: 400;
    letter-spacing: -0.012em;
    line-height: 1.04;
}

.thm02-intro__lead {
    color: var(--thm02-muted);
}

.thm02-intro__event {
    margin-top: 26px;
    padding: 15px 16px;
    border: 0;
    border-radius: 14px;
    background: var(--thm02-blush);
}

.thm02-intro__event time {
    font-family: var(--thm02-display);
    font-size: 19px;
    font-weight: 400;
}

.thm02-countdown {
    width: 100%;
    grid-column: 1 / -1;
    margin: 30px 0 0;
    padding: clamp(18px, 4vw, 30px) var(--thm02-gutter);
    border: 0;
    background: var(--thm02-rose);
    color: var(--thm02-ink);
}

.thm02-countdown > div {
    border-right-color: rgba(57, 65, 63, 0.22);
}

.thm02-countdown strong {
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-weight: 400;
}

.thm02-countdown span {
    color: var(--thm02-ink);
}

/* Couple: the original circular portrait signature, rebuilt responsively */
.thm02-couple {
    background: #fff;
}

.thm02-couple__diptych {
    gap: clamp(48px, 8vw, 76px);
}

.thm02-person {
    text-align: center;
}

.thm02-person__portrait {
    width: min(100%, 320px);
    aspect-ratio: 1;
    margin-inline: auto;
    overflow: hidden;
    border-radius: 50%;
    background: var(--thm02-blush);
    box-shadow: 0 0 0 12px var(--thm02-blush);
}

.thm02-person:nth-child(2) .thm02-person__portrait {
    box-shadow: 0 0 0 12px var(--thm02-sage);
}

.thm02-person__portrait::after,
.thm02-person__portrait > span,
.thm02-couple__ampersand {
    display: none !important;
}

.thm02-person__portrait img {
    border-radius: 50% !important;
    filter: saturate(0.92) contrast(0.98) brightness(1.02);
}

.thm02-person__fallback {
    border-radius: 50%;
    background: linear-gradient(145deg, var(--thm02-blush), var(--thm02-sage));
    color: var(--thm02-wine);
}

.thm02-person__copy {
    padding-top: 30px;
    text-align: center;
}

.thm02-person__role {
    color: var(--thm02-wine);
    letter-spacing: 0.12em;
}

.thm02-person h3,
.thm02-person--medium h3,
.thm02-person--long h3,
.thm02-person--xlong h3 {
    margin: 10px auto 14px;
    font-family: var(--thm02-display);
    font-size: clamp(28px, 5.8cqw, 42px);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.13;
}

.thm02-person--long h3 {
    font-size: clamp(21px, 3.9cqw, 26px);
    overflow-wrap: anywhere;
}

.thm02-person--xlong h3 {
    font-size: clamp(20px, 3.5cqw, 23px);
    overflow-wrap: anywhere;
}

.thm02-person__copy > p:not(.thm02-person__role) {
    color: var(--thm02-muted);
}

/* Events: a quiet photographic chapter before the coral celebration field */
.thm02-events {
    background: var(--thm02-rose);
    color: var(--thm02-ink);
}

.thm02-events__hero {
    display: grid;
    min-height: 0;
    align-content: center;
    justify-items: center;
    gap: clamp(24px, 5cqw, 34px);
    padding: clamp(54px, 10cqw, 76px) var(--thm02-gutter) clamp(62px, 11cqw, 86px);
    border-radius: 0;
    background:
        radial-gradient(circle at 13% 17%, rgba(246, 157, 157, 0.2) 0 44px, transparent 45px),
        radial-gradient(circle at 106% 72%, rgba(221, 235, 230, 0.78) 0 64px, transparent 65px),
        var(--thm02-ivory);
    isolation: isolate;
}

.thm02-events__hero img {
    position: relative;
    z-index: 1;
    inset: auto;
    width: min(72cqw, 360px);
    height: clamp(170px, 45cqw, 240px);
    border: 6px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px 999px 24px 24px / 82% 82% 18px 18px !important;
    object-fit: cover;
    filter: saturate(0.92) contrast(0.98) brightness(1.02);
    box-shadow: 0 16px 36px rgba(57, 65, 63, 0.09) !important;
}

.thm02-events__hero::after {
    z-index: 0;
    inset: 38px 9% auto auto;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(246, 157, 157, 0.28);
}

.thm02-events__hero figcaption {
    position: relative;
    z-index: 1;
    right: auto;
    bottom: auto;
    left: auto;
    width: min(100%, 460px);
    padding: 0;
    background: transparent;
    color: var(--thm02-ink);
    text-align: center;
}

.thm02-events__hero figcaption::after {
    display: block;
    width: 52px;
    height: 3px;
    margin: 22px auto 0;
    border-radius: 999px;
    background: var(--thm02-rose);
    content: "";
}

.thm02-events__hero .thm02-kicker {
    color: var(--thm02-ink);
}

.thm02-events__hero h2 {
    margin-top: 7px;
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(34px, 9.8cqw, 52px);
    font-weight: 400;
    letter-spacing: -0.012em;
    line-height: 1.08;
    text-wrap: balance;
}

.thm02-events__cards {
    display: grid;
    gap: 18px;
    padding-block: clamp(46px, 8vw, 86px);
}

.thm02-event,
.thm02-event:last-child {
    padding: clamp(26px, 5vw, 42px);
    border: 0;
    border-radius: 24px;
    background: #fff;
}

.thm02-event__date strong {
    color: var(--thm02-wine);
    font-family: var(--thm02-display);
    font-size: clamp(62px, 14cqw, 82px);
    font-weight: 400;
}

.thm02-event__date span,
.thm02-event__copy > p,
.thm02-event__copy address {
    color: var(--thm02-muted);
}

.thm02-event__date span,
.thm02-event__copy > p {
    white-space: nowrap;
}

.thm02-event__copy h3 {
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(32px, 6.4cqw, 44px);
    font-weight: 400;
    line-height: 1.08;
}

.thm02-events .thm02-button--outline,
.thm02-events .thm02-text-link {
    border-color: rgba(185, 67, 81, 0.45);
    color: var(--thm02-wine);
}

.thm02-event__map iframe {
    border-radius: 16px;
    filter: saturate(0.75);
}

/* Colour guidance and livestream */
.thm02-dresscode {
    background: var(--thm02-ivory);
}

.thm02-dresscode__palette {
    align-items: end;
}

.thm02-dresscode__palette span {
    aspect-ratio: 3 / 5;
    border-radius: 999px 999px 20px 20px;
    box-shadow: inset 0 0 0 1px rgba(57, 65, 63, 0.1);
}

.thm02-livestream {
    background: var(--thm02-blush);
}

.thm02-livestream__mark {
    width: 100%;
    min-height: 170px;
    aspect-ratio: auto;
    border: 0;
    border-radius: 28px 28px 8px 8px;
    background: var(--thm02-rose);
    color: var(--thm02-ink);
    font-family: var(--thm02-body);
    font-size: clamp(22px, 5vw, 34px);
    font-style: normal;
    font-weight: 600;
}

.thm02-livestream__copy h2,
.thm02-livestream dd {
    font-family: var(--thm02-display);
    font-weight: 400;
}

/* Quote remains centered, but becomes a signature coral field */
.thm02-quote {
    min-height: min(72dvh, 680px);
    box-sizing: border-box;
    padding-block: clamp(76px, 13cqw, 112px);
    background: var(--thm02-rose);
    color: var(--thm02-ink);
}

.thm02-quote__floral {
    display: none;
}

.thm02-quote blockquote > span {
    height: 42px;
    color: #7c303b;
    font-family: var(--thm02-display);
    font-size: 82px;
}

.thm02-quote blockquote p {
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(28px, 5.6cqw, 40px);
    font-weight: 400;
    letter-spacing: -0.008em;
    line-height: 1.24;
}

.thm02-quote cite {
    color: #593036;
    letter-spacing: 0.14em;
}

/* One-column photographic diary */
.thm02-story {
    background: #fff;
}

.thm02-story-card,
.thm02-story-card--reverse {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
    overflow: hidden;
    border-radius: 30px 30px 10px 10px;
    background: var(--thm02-ivory);
}

.thm02-story-card__media,
.thm02-story-card--reverse .thm02-story-card__media {
    grid-row: auto;
    grid-column: auto;
    aspect-ratio: 16 / 10;
}

.thm02-story-card__media img {
    filter: saturate(0.92) contrast(0.98) brightness(1.01);
}

.thm02-story-card__media span {
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm02-rose);
    color: var(--thm02-ink);
    font-family: var(--thm02-body);
    font-size: 12px;
    font-weight: 650;
}

.thm02-story-card__copy,
.thm02-story-card--reverse .thm02-story-card__copy {
    grid-row: auto;
    grid-column: auto;
    padding: clamp(28px, 6vw, 54px);
}

.thm02-story-card__copy h3 {
    font-family: var(--thm02-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

/* Gallery: rounded square tiles in the shared full rows (theme-system.css);
   a photo that takes a whole row gets the featured shape. */
.thm02-gallery {
    --theme-gallery-ar: 1;
    --theme-gallery-gap: clamp(10px, 2vw, 18px);
    background: var(--thm02-sage);
}

.thm02-gallery__item {
    border-radius: 18px;
}

@container theme-gallery (max-width: 543.98px) {
    .thm02-gallery__item[data-gallery-r2="1"] {
        border-radius: 34px 34px 10px 10px;
    }
}

.theme-v2-gallery[data-gallery-count="1"] .thm02-gallery__item {
    border-radius: 34px 34px 10px 10px;
}

.thm02-gallery__item img {
    filter: saturate(0.94) contrast(0.99);
}

.thm02-gallery__item > span {
    background: rgba(246, 157, 157, 0.92);
    color: var(--thm02-ink);
}

/* RSVP: coral field with a short image banner and raised form */
.thm02-rsvp {
    display: block !important;
    background: var(--thm02-rose);
}

.thm02-rsvp__photo {
    min-height: clamp(260px, 42dvh, 420px) !important;
    border-radius: 0 0 58px 0;
}

.thm02-rsvp__photo img {
    filter: saturate(0.92) contrast(0.98) brightness(1.02);
}

.thm02-rsvp__photo::after {
    background: linear-gradient(180deg, transparent 58%, rgba(57, 65, 63, 0.34));
}

.thm02-rsvp__photo figcaption {
    font-family: var(--thm02-body);
    font-size: 12px;
    font-style: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* The intro and RSVP cards overlap the bottom of their photos, which hides these captions on
   phones and desktop; on a tablet the wider photo let a cut fragment ("…I DI SINI.") peek out
   beside the card. They stay for screen readers, out of sight at every width. */
.thm02-intro__portrait figcaption,
.thm02-rsvp__photo figcaption {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    width: 1px;
}

.thm02-rsvp__form-wrap {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 32px), 700px);
    margin: -54px auto 0;
    padding: clamp(34px, 7vw, 60px);
    border-radius: 30px 30px 10px 10px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(57, 65, 63, 0.14);
}

.thm02-field :where(input, select, textarea) {
    padding: 12px 13px;
    border: 1px solid var(--thm02-line);
    border-radius: 12px;
    background: var(--thm02-ivory);
}

.thm02-field :where(input, select, textarea):focus {
    border-color: var(--thm02-wine);
    box-shadow: 0 0 0 3px rgba(185, 67, 81, 0.14);
}

/* Featured wishes retain coral cards in a manually navigated carousel. */
.thm02-wishes {
    background: var(--thm02-ivory);
}

body.theme-thm02 .thm02-wishes__featured {
    display: block;
    margin: 0 auto clamp(54px, 9cqw, 100px);
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
}

body.theme-thm02 .thm02-wishes__track {
    grid-auto-columns: 100%;
    gap: 20px;
}

body.theme-thm02 .thm02-wishes__dots {
    margin-top: 20px;
    color: var(--thm02-wine);
}

body.theme-thm02 .thm02-wishes__dots button::before {
    opacity: 0.74;
}

body.theme-thm02 .thm02-wishes__dots button:is(:hover, :focus-visible, [aria-current="true"])::before {
    opacity: 1;
}

body.theme-thm02 .thm02-wishes__dots button:focus-visible {
    border-radius: 12px;
    outline: 2px solid var(--thm02-wine);
    outline-offset: -4px;
}

.thm02-wishes__guestbook {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
}

.thm02-wish-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    flex: none;
    padding: clamp(24px, 5vw, 38px);
    border: 0;
    border-left: 6px solid var(--thm02-rose);
    border-radius: 0 20px 20px 0;
    background: #fff;
}

.thm02-wish-card blockquote,
.thm02-wishes__messages li strong {
    font-family: var(--thm02-display);
    font-weight: 400;
}

.thm02-wish-card blockquote {
    font-size: clamp(20px, 2.6cqw, 28px);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.thm02-wish-card figcaption > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.thm02-wish-card__initial {
    background: var(--thm02-wine);
}

.thm02-wishes__messages li {
    padding-left: 18px;
    border-bottom-color: var(--thm02-line);
    border-left: 3px solid var(--thm02-blush);
}

/* Gift: solid digital-envelope panel without a repeated photo */
.thm02-gift {
    background: var(--thm02-ivory);
}

.thm02-gift__canvas {
    display: block !important;
    overflow: hidden;
    border-radius: 34px 34px 10px 10px;
    background: var(--thm02-rose);
}

.thm02-gift__photo {
    display: none;
}

.thm02-gift__copy {
    padding: clamp(34px, 7vw, 70px);
}

.thm02-gift__copy > h2 {
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-weight: 400;
    line-height: 1.08;
}

.thm02-gift__copy > p:not(.thm02-kicker) {
    color: var(--thm02-ink);
}

.thm02-gift-card {
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.thm02-gift-card__select select {
    width: 100%;
    min-width: 0;
}

.thm02-gift-card__account {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid var(--thm02-line);
    border-left: 0;
}

.thm02-gift-card__account .thm02-button {
    white-space: nowrap;
}

.thm02-gift-card__account strong {
    font-family: var(--thm02-display);
    font-weight: 400;
}

/* Health chips */
.thm02-health {
    background: var(--thm02-sage);
}

.thm02-health__copy > p:not(.thm02-kicker) {
    color: #52605b;
}

.thm02-health ol {
    display: grid;
    gap: 12px;
    border: 0;
}

.thm02-health li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    border: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.thm02-health li span {
    color: var(--thm02-wine);
    font-family: var(--thm02-body);
    font-weight: 650;
}

/* Closing: a distinct photographic finale followed by a compact coral colophon */
.thm02-closing {
    grid-template: minmax(300px, 58dvh) auto / minmax(0, 1fr);
    place-items: stretch;
    background: var(--thm02-rose);
    color: var(--thm02-ink);
}

.thm02-closing__media {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(155deg, #eef3f0, #cfd8d4);
    isolation: isolate;
}

.thm02-closing__media > img,
.thm02-closing__veil {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.thm02-closing__media > img {
    z-index: 0;
    object-fit: cover;
    filter: saturate(0.92) contrast(0.98) brightness(1.02);
}

.thm02-closing__veil {
    z-index: 1;
    background: linear-gradient(180deg, transparent 38%, rgba(246, 157, 157, 0.08) 72%, rgba(246, 157, 157, 0.42));
}

.thm02-closing__copy {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 0;
    align-items: flex-start;
    margin: -30px 0 0;
    padding: clamp(30px, 5dvh, 46px) var(--thm02-gutter) max(30px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 34px 34px 0 0;
    background: var(--thm02-rose);
    color: var(--thm02-ink);
    text-align: left;
    backdrop-filter: none;
}

.thm02-closing .thm02-kicker,
.thm02-closing small {
    color: #593036;
}

.thm02-closing__thanks,
.thm02-closing h2 {
    font-family: var(--thm02-display);
    font-style: normal;
    font-weight: 400;
}

.thm02-closing h2 {
    margin: 7px 0 10px;
    font-size: clamp(38px, 8.4cqw, 58px);
    letter-spacing: -0.012em;
    line-height: 1.04;
    text-align: left;
}

.thm02-closing small {
    margin-top: 22px;
    /* The last line shares the page end with the dock (bottom right): a long organiser name
       wraps before it reaches the two controls. */
    max-width: calc(100% - 56px);
}

.thm02-audio__toggle,
.thm02-to-top {
    border-color: rgba(185, 67, 81, 0.3);
    background: rgba(246, 250, 247, 0.94);
    color: var(--thm02-wine);
}

@container thm02-page (min-width: 560px) {
    .thm02-intro__canvas {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .thm02-intro__portrait {
        min-height: clamp(480px, 66dvh, 680px) !important;
    }

    .thm02-couple__diptych {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(34px, 6vw, 66px);
        align-items: start;
    }

    .thm02-person__portrait {
        width: min(100%, 280px);
    }

    .thm02-event {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 22px;
    }

    .thm02-event__date {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .thm02-event__date strong {
        font-size: clamp(62px, 11cqw, 76px);
    }

    .thm02-livestream {
        grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1.28fr);
    }

    .thm02-story-card,
    .thm02-story-card--reverse {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .thm02-dresscode,
    .thm02-health {
        grid-template-columns: minmax(0, 1fr);
    }

    .thm02-dresscode__palette {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .thm02-health ol {
        grid-template-columns: minmax(0, 1fr);
    }

    .thm02-health li {
        grid-template-columns: 42px minmax(0, 1fr);
    }
}

@container thm02-page (min-width: 780px) {
    body.theme-thm02 .thm02-wishes__track:not(.thm02-wishes__track--single) {
        grid-auto-columns: calc((100% - 20px) / 2);
    }

    .thm02-rsvp,
    .thm02-gift__canvas {
        display: block !important;
    }

    .thm02-rsvp__photo {
        min-height: clamp(300px, 44dvh, 440px) !important;
    }
}

@media (min-width: 1024px) {
    body.theme-thm02.desktop-invitation-preview,
    body.theme-thm02.desktop-invitation-presentation {
        background: var(--thm02-rose);
    }

    body.theme-thm02 .desktop-invitation-shell--enabled > .desktop-invitation-shell__visual {
        overflow: hidden;
        background: var(--thm02-rose);
    }

    body.theme-thm02 .desktop-invitation-shell__photo {
        inset: clamp(28px, 4.5vw, 66px) clamp(30px, 5vw, 74px) clamp(178px, 22vh, 230px);
        border-radius: 48% 48% 28px 28px / 30% 30% 18px 18px;
        filter: saturate(0.92) contrast(0.98) brightness(1.02);
        box-shadow: 0 22px 55px rgba(57, 65, 63, 0.18);
    }

    body.theme-thm02 .desktop-invitation-shell__visual::before {
        background:
            radial-gradient(circle at 8% 8%, rgba(246, 250, 247, 0.74) 0 54px, transparent 55px),
            radial-gradient(circle at 92% 46%, rgba(221, 235, 230, 0.82) 0 82px, transparent 83px);
    }

    body.theme-thm02 .desktop-invitation-shell__copy {
        top: auto;
        right: clamp(26px, 4.5vw, 68px);
        bottom: clamp(30px, 5vh, 52px);
        left: clamp(26px, 4.5vw, 68px);
        width: auto;
        padding: 20px 22px;
        border-radius: 22px 22px 7px 7px;
        background: rgba(246, 250, 247, 0.92);
        color: var(--thm02-ink);
        text-align: left;
        translate: 0 0;
        backdrop-filter: blur(10px);
    }

    body.theme-thm02 .desktop-invitation-shell__eyebrow {
        color: var(--thm02-wine);
        font-family: var(--thm02-body);
        font-size: 12px;
        letter-spacing: 0.13em;
    }

    body.theme-thm02 .desktop-invitation-shell__names {
        color: var(--thm02-ink);
        font-family: var(--thm02-display);
        font-size: clamp(34px, 3.5vw, 58px);
        font-weight: 400;
        letter-spacing: -0.012em;
        line-height: 1.06;
    }

    body.theme-thm02 .desktop-invitation-shell__date {
        color: var(--thm02-muted);
        font-family: var(--thm02-body);
    }

    body.theme-thm02 .desktop-invitation-shell__monogram {
        color: rgba(57, 65, 63, 0.16);
        font-family: var(--thm02-display);
    }

    body.theme-thm02 .desktop-invitation-shell--enabled:not(.desktop-invitation-shell--without-photo) .desktop-invitation-shell__monogram {
        opacity: 0;
    }

    body.theme-thm02 .desktop-invitation-shell--without-photo .desktop-invitation-shell__copy {
        top: 50%;
        bottom: auto;
        text-align: center;
        translate: 0 -50%;
    }
}

@media (max-width: 559px) {
    .thm02-cover {
        grid-template-rows: minmax(220px, 45dvh) minmax(0, 1fr);
    }

    .thm02-cover__frame {
        width: 100%;
        height: calc(100% + 24px);
        margin: -24px 0 0;
        padding: 20px 22px max(20px, env(safe-area-inset-bottom));
    }

    .thm02-intro__portrait {
        min-height: clamp(390px, 58dvh, 530px) !important;
        border-radius: 0 0 42px 0;
    }

    .thm02-intro__copy {
        width: calc(100% - 24px);
        margin-top: -48px;
        padding: 30px 22px;
        border-radius: 24px 24px 8px 8px;
    }

    .thm02-countdown {
        padding-inline: 12px;
    }

    .thm02-person__portrait {
        width: min(82vw, 290px);
    }

    .thm02-events__hero {
        gap: 24px;
        padding: 48px 20px 58px;
    }

    .thm02-events__hero img {
        width: min(78cqw, 300px);
    }

    .thm02-events__hero figcaption {
        left: auto;
        width: min(100%, 360px);
    }

    .thm02-event {
        padding: 25px 22px;
    }

    .thm02-dresscode__palette {
        gap: 10px;
    }

    .thm02-gallery {
        --theme-gallery-gap: 8px;
    }

    .thm02-gallery__item {
        border-radius: 12px;
    }

    .thm02-gallery__item[data-gallery-r2="1"],
    .theme-v2-gallery[data-gallery-count="1"] .thm02-gallery__item {
        border-radius: 24px 24px 8px 8px;
    }

    .thm02-rsvp__form-wrap {
        width: calc(100% - 20px);
        margin-top: -38px;
        padding: 30px 22px;
        border-radius: 24px 24px 8px 8px;
    }

    .thm02-gift__copy {
        padding: 30px 22px;
    }

    .thm02-closing__copy {
        width: 100%;
        margin: -26px 0 0;
        padding: 28px 22px max(28px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 559px) and (max-height: 640px) {
    .thm02-cover {
        grid-template-rows: minmax(190px, 41dvh) minmax(0, 1fr);
    }

    .thm02-cover__frame {
        padding-block: 16px max(16px, env(safe-area-inset-bottom));
    }

    .thm02-cover h1 {
        margin-block: 4px 7px;
    }

    .thm02-cover__date {
        padding-block: 5px;
    }

    .thm02-cover__guest {
        margin-block: 8px;
        padding-block: 9px;
    }
}

@media (max-width: 359px) {
    .thm02-cover h1,
    .thm02-intro__copy h2 {
        font-size: 37px;
    }

    .thm02-countdown > div {
        padding-inline: 2px;
    }

    .thm02-person h3,
    .thm02-person--medium h3 {
        font-size: 25px;
    }

    .thm02-person--long h3 {
        font-size: 21px;
    }

    .thm02-person--xlong h3 {
        font-size: 20px;
    }
}

/* Coral is a surface colour: labels set on it use ink (5.2:1). */
:is(.thm02-cover__frame, .thm02-quote, .thm02-rsvp, .thm02-gift__canvas) .thm02-kicker {
    color: var(--thm02-ink);
}

/* Revisions after the 2026-10-12 review ------------------------------------ */

/* A fine dotted grain marks Prim's coral bands as its own. */
.thm02-events,
.thm02-quote,
.thm02-rsvp {
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1.1px, transparent 1.35px);
    background-size: 16px 16px;
}

/* Dress palette: one row of small arches with names; no colour codes. */
.thm02-dresscode__palette {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)) !important;
    gap: 12px;
    width: min(100%, 560px);
}

.thm02-dresscode__palette span {
    width: 100%;
    max-height: 120px;
    aspect-ratio: 3 / 4;
    box-shadow: inset 0 0 0 1px rgba(57, 65, 63, 0.2);
}

/* Livestream: a photograph in the arch with a live badge. */
.thm02-livestream__mark {
    position: relative;
    overflow: hidden;
}

.thm02-livestream__mark--photo {
    min-height: 0;
    aspect-ratio: 5 / 4;
    padding: 0;
}

.thm02-livestream__mark--photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thm02-livestream__mark:not(.thm02-livestream__mark--photo) {
    width: auto;
    min-height: 0;
    justify-self: start;
    background: none;
}

.thm02-livestream__badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border-radius: 999px;
    background: #fff;
    color: var(--thm02-ink);
    font: 700 12px/1 var(--thm02-body);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.thm02-livestream__mark--photo .thm02-livestream__badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
}

@media (min-width: 760px) {
    .thm02-livestream__mark--photo {
        aspect-ratio: 4 / 5;
    }
}

/* Story: chapters swipe sideways on phones and sit two by two on wider screens. */
.thm02-story__hint {
    display: none;
}

.thm02-story-card,
.thm02-story-card:first-child {
    margin-top: 0;
}

@media (max-width: 759px) {
    .thm02-story__hint {
        display: flex;
        gap: 8px;
        margin: 0 0 16px;
        color: var(--thm02-wine);
        font: 700 12px/1.4 var(--thm02-body);
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .thm02-story__chapters {
        display: grid;
        grid-auto-columns: 86%;
        grid-auto-flow: column;
        gap: 14px;
        margin-inline: calc(-1 * var(--thm02-gutter));
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding: 0 var(--thm02-gutter) 8px;
        scroll-padding-inline: var(--thm02-gutter);
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .thm02-story__chapters::-webkit-scrollbar {
        display: none;
    }

    .thm02-story-card {
        scroll-snap-align: start;
    }
}

@media (min-width: 760px) {
    .thm02-story__chapters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(24px, 3.5vw, 40px);
    }
}

.thm02-story__chapters:focus-visible {
    outline: 2px solid var(--thm02-wine);
    outline-offset: 6px;
}

/* One map control per event. */
.thm02-map .theme-v2-map__panel iframe {
    border-radius: 18px;
    filter: grayscale(0.4) sepia(0.12);
}

/* The companion is the photograph alone; names already open the invitation. */
@media (min-width: 1024px) {
    body.theme-thm02 .desktop-invitation-shell--enabled:not(.desktop-invitation-shell--without-photo) .desktop-invitation-shell__copy {
        display: none;
    }

    body.theme-thm02 .desktop-invitation-shell--enabled:not(.desktop-invitation-shell--without-photo) .desktop-invitation-shell__photo {
        bottom: clamp(28px, 4.5vw, 66px);
    }
}

/* Revisions after the 2026-10-14 review ------------------------------------ */

/* Phones: story chapters keep a comfortable reading measure inside the swipe card. */
@media (max-width: 759px) {
    .thm02-story__chapters {
        grid-auto-columns: 88%;
    }

    .thm02-story-card__copy,
    .thm02-story-card--reverse .thm02-story-card__copy {
        padding: 24px 22px 28px;
    }

    .thm02-story-card__copy p {
        color: var(--thm02-ink);
        font-size: 15px;
        line-height: 1.75;
    }
}

/* Tablet: two-up story cards and the livestream column get headings sized for them. */
@media (min-width: 760px) and (max-width: 1023px) {
    .thm02-story-card__copy h3 {
        font-size: clamp(30px, 4.2vw, 40px);
    }
}

@container thm02-page (min-width: 560px) and (max-width: 1023px) {
    .thm02-livestream__copy h2 {
        font-size: clamp(38px, 6cqw, 52px);
    }
}

/* Beside the desktop companion the column is about 576px wide: a slimmer photograph leaves the
   words room for "Buka YouTube Live" on one line. */
@container thm02-page (min-width: 560px) and (max-width: 700px) {
    .thm02-livestream {
        grid-template-columns: minmax(140px, 0.56fr) minmax(0, 1.44fr);
    }
}

/* Swatches line up by their top edge whatever the length of their names. */
.thm02-dresscode__palette {
    align-items: start;
}

/* Story beyond phones --------------------------------------------------------
   Beside the companion photograph the invitation is a narrow column, so chapters read one per
   row with the photograph beside the words, alternating sides. A wide page sets them two by two,
   and an odd last chapter spans the row instead of standing alone. Phones keep the swipe rail. */
@media (min-width: 760px) {
    .thm02-story__chapters {
        grid-template-columns: minmax(0, 1fr);
    }

    .thm02-story-card,
    .thm02-story-card--reverse {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) !important;
        align-items: stretch;
    }

    .thm02-story-card--reverse .thm02-story-card__media {
        order: 2;
    }

    /* Mirrored, so the words keep the wider column on both sides; otherwise every other
       chapter squeezed its heading against the photograph. */
    .thm02-story-card--reverse {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
    }

    .thm02-story-card__media,
    .thm02-story-card--reverse .thm02-story-card__media {
        aspect-ratio: auto;
        min-height: 250px;
    }

    .thm02-story-card__media img {
        position: absolute;
        inset: 0;
    }

    .thm02-story-card__copy,
    .thm02-story-card--reverse .thm02-story-card__copy {
        padding: clamp(26px, 5cqw, 40px) clamp(24px, 5cqw, 38px);
    }

    .thm02-story-card__copy h3 {
        font-size: clamp(28px, 6cqw, 38px);
    }
}

/* A small laptop leaves the column beside the companion under 560px (461px at 1024x768): too
   narrow to share a row, so the photograph sits above the words, as in each tablet card. */
@media (min-width: 760px) {
    @container thm02-page (max-width: 559px) {
        .thm02-story-card,
        .thm02-story-card--reverse {
            grid-template-columns: minmax(0, 1fr) !important;
        }

        .thm02-story-card--reverse .thm02-story-card__media {
            order: 0;
        }
    }
}

@container thm02-page (min-width: 760px) {
    .thm02-story__chapters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .thm02-story-card,
    .thm02-story-card--reverse {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto 1fr;
    }

    .thm02-story-card--reverse .thm02-story-card__media {
        order: 0;
    }

    .thm02-story-card__copy,
    .thm02-story-card--reverse .thm02-story-card__copy {
        align-self: start;
    }

    .thm02-story-card__media,
    .thm02-story-card--reverse .thm02-story-card__media {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .thm02-story-card__media img {
        position: static;
    }

    .thm02-story-card:last-child:nth-child(odd) .thm02-story-card__media img {
        position: absolute;
    }

    .thm02-story-card__copy h3 {
        font-size: clamp(30px, 4.2cqw, 44px);
    }

    .thm02-story-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-rows: auto;
    }

    .thm02-story-card:last-child:nth-child(odd) .thm02-story-card__copy {
        align-self: center;
    }

    .thm02-story-card:last-child:nth-child(odd) .thm02-story-card__media {
        aspect-ratio: auto;
        min-height: 300px;
    }
}

/* Video ----------------------------------------------------------------------
   Posters sit in white arched frames like the events photograph; rose play buttons echo the
   story numbers. One film per row in the invitation column, two by two on a wide page. */
.thm02-video {
    --theme-video-gap: clamp(22px, 4cqw, 34px);
    --theme-video-radius: 28px 28px 12px 12px;
    --theme-video-border: #fff;
    --theme-video-frame: var(--thm02-ink);
    --theme-video-button: var(--thm02-rose);
    --theme-video-button-text: var(--thm02-ink);
    --theme-focus: var(--thm02-wine);
    background: var(--thm02-paper);
}

.thm02-video.theme-video .theme-video__list {
    --theme-video-max: 880px;
    display: flex;
    flex-direction: column;
}

.thm02-video .theme-video__frame {
    border-width: 6px;
    box-shadow: 0 22px 50px rgba(57, 65, 63, 0.16);
}

.thm02-video .theme-video__play {
    --theme-focus: #fff;
}

.thm02-video .theme-video__play:focus-visible .theme-video__play-icon {
    box-shadow: 0 0 0 4px var(--thm02-wine), 0 12px 32px rgba(0, 0, 0, 0.28);
}

body[data-theme-version="v2"] .thm02-video .theme-video__play,
body[data-theme-version="v2"] .thm02-video .theme-video__frame--link {
    font-family: var(--thm02-body);
    font-weight: 700;
}

body[data-theme-version="v2"] .thm02-video .theme-video__caption {
    margin-top: 16px;
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(19px, 3cqw, 24px);
}

@container thm02-page (min-width: 760px) {
    .thm02-video.theme-video:not([data-video-count="1"]) .theme-video__list {
        --theme-video-max: 1040px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .thm02-video:not([data-video-count="1"]) .theme-video__item {
        flex: 0 1 calc((100% - var(--theme-video-gap)) / 2);
    }
}

/* Kirim Kado -----------------------------------------------------------------
   The digital envelope's lighter twin: a blush canvas of the same arched shape, with the
   addresses on white cards like the transfer card. */
.thm02-gift-address {
    --theme-focus: var(--thm02-wine);
    background: var(--thm02-ivory);
}

.thm02-gift + .thm02-gift-address {
    padding-top: 0;
}

.thm02-gift-address__canvas {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: clamp(34px, 7vw, 70px);
    border-radius: 34px 34px 10px 10px;
    background: var(--thm02-blush);
}

.thm02-gift-address__heading .thm02-kicker {
    color: var(--thm02-wine-text);
}

.thm02-gift-address__heading > h2 {
    margin: 8px 0 20px;
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(45px, 9vw, 78px);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.08;
    text-wrap: balance;
}

.thm02-gift-address__heading > p:last-child {
    max-width: 580px;
    color: var(--thm02-ink);
}

.thm02-gift-address .theme-gift-address__list {
    justify-content: flex-start;
    gap: 18px;
    width: 100%;
    margin-top: 36px;
}

.thm02-gift-address .theme-gift-address__card {
    flex: 1 1 260px;
    align-items: flex-start;
    gap: 4px;
    padding: clamp(24px, 5vw, 42px);
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--thm02-ink);
    text-align: left;
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__label {
    color: var(--thm02-wine-text);
    font-family: var(--thm02-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    opacity: 1;
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__name {
    margin-bottom: 6px;
    color: var(--thm02-ink);
    font-family: var(--thm02-display);
    font-size: clamp(26px, 5cqw, 34px);
    font-weight: 400;
    line-height: 1.15;
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__phone a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--thm02-wine-text);
    font-weight: 700;
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__address {
    max-width: 40ch;
    color: var(--thm02-muted);
    font-size: 15px;
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__note {
    width: 100%;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--thm02-line);
    color: var(--thm02-muted);
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__copy {
    margin-top: auto;
}

body[data-theme-version="v2"] .thm02-gift-address .theme-gift-address__card > :nth-last-child(2) {
    margin-bottom: 18px;
}

body.theme-thm02 .thm02-gift-address .theme-gift-address__copy[data-copy-state="copied"] {
    border-color: var(--thm02-wine);
    background: var(--thm02-wine);
    color: #fff;
}
