/* thm09 v2 — Sunset Social. Native, dependency-free warm playful editorial. */

body.theme-thm09[data-theme-version="v2"] {
    --thm09-paper: #fff8f1;
    --thm09-paper-strong: #fffdf9;
    --thm09-blush: #faddcf;
    --thm09-ink: #3b2420;
    --thm09-muted: #5f4741;
    --thm09-coral: #e16f5d;
    --thm09-coral-dark: #bd5145;
    --thm09-berry: #853b51;
    --thm09-berry-dark: #66273b;
    --thm09-marigold: #f0b348;
    /* Marigold text on berry needs a lighter tint (4.7:1). */
    --thm09-marigold-text: #f6c46a;
    --thm09-line: rgba(59, 36, 32, 0.18);
    --thm09-shadow: 0 24px 64px rgba(59, 36, 32, 0.14);
    --thm09-shadow-small: 0 12px 30px rgba(59, 36, 32, 0.12);
    --theme-surface: var(--thm09-paper);
    --theme-surface-muted: var(--thm09-blush);
    --theme-text: var(--thm09-ink);
    --theme-text-muted: var(--thm09-muted);
    --theme-accent: var(--thm09-coral);
    --theme-accent-contrast: #fff;
    --theme-focus: var(--thm09-berry);
    /* The couple's own fonts (custom font add-on) take over when set; see x-theme-custom-fonts. */
    --theme-font-display: var(--invie-font-heading, "Manrope"), system-ui, sans-serif;
    --theme-font-body: var(--invie-font-body, "Montserrat"), system-ui, sans-serif;
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    background: var(--thm09-paper);
    color: var(--thm09-ink);
    font-family: var(--theme-font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: clip;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.theme-thm09[data-theme-version="v2"] *,
body.theme-thm09[data-theme-version="v2"] *::before,
body.theme-thm09[data-theme-version="v2"] *::after {
    box-sizing: border-box;
}

/* Keep the reset below component spacing rules in the cascade. */
:where(body.theme-thm09[data-theme-version="v2"]) :where(h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul) {
    margin: 0;
}

body.theme-thm09[data-theme-version="v2"] :where(ol, ul) {
    padding: 0;
}

body.theme-thm09[data-theme-version="v2"] :where(img, video, iframe) {
    display: block;
    max-width: 100%;
}

body.theme-thm09[data-theme-version="v2"] :where(a) {
    color: inherit;
}

body.theme-thm09[data-theme-version="v2"] :where(button, input, select, textarea) {
    border-radius: 0;
}

body.theme-thm09[data-theme-version="v2"] :where(button, a, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--thm09-berry) !important;
    outline-offset: 4px !important;
}

body.theme-thm09[data-theme-version="v2"] :where(h1, h2, h3) {
    font-family: var(--theme-font-display);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.02;
    overflow-wrap: normal;
    text-wrap: balance;
    word-break: normal;
}

body.theme-thm09[data-theme-version="v2"] h2 {
    font-size: clamp(2.15rem, 7cqw, 5.5rem);
}

body.theme-thm09[data-theme-version="v2"] h3 {
    font-size: clamp(1.55rem, 4.5cqw, 3rem);
}

.thm09-page {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    background: var(--thm09-paper);
    container-name: thm09-page;
    container-type: inline-size;
    isolation: isolate;
}

.thm09-invitation {
    width: 100%;
    min-width: 0;
    background: var(--thm09-paper);
    /* The invitation is visually precomposed behind the opaque cover. Inert
       and aria-hidden still keep it out of the accessibility tree. */
    visibility: visible !important;
}

.thm09-section {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: clamp(4.75rem, 11cqw, 9rem) clamp(1.25rem, 5cqw, 5rem);
    overflow: clip;
}

.thm09-heading {
    width: min(100%, 720px);
}

.thm09-heading--center {
    margin-inline: auto;
    text-align: center;
}

.thm09-heading > h2,
.thm09-heading > p + h2 {
    margin-top: 0.65rem;
}

.thm09-heading > h2 + p {
    max-width: 58ch;
    margin-top: 1.35rem;
    color: var(--thm09-muted);
    font-size: clamp(0.98rem, 1.6cqw, 1.15rem);
}

.thm09-heading--center > h2 + p {
    margin-inline: auto;
}

.thm09-kicker {
    font-family: var(--theme-font-body);
    font-size: clamp(0.75rem, 1.3cqw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.45;
    text-transform: uppercase;
}

.thm09-script {
    color: var(--thm09-berry);
    font-family: var(--invie-font-heading, "Noto Serif"), Georgia, serif;
    font-size: clamp(1.25rem, 3.5cqw, 2.15rem);
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.thm09-button {
    display: inline-flex;
    min-width: 44px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.9rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--theme-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.thm09-button:hover {
    transform: translateY(-2px);
}

.thm09-button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.thm09-button--berry {
    background: var(--thm09-berry);
    color: #fff;
    box-shadow: 0 10px 24px rgba(102, 39, 59, 0.18);
}

body.theme-thm09[data-theme-version="v2"] :where(a, button).thm09-button--berry {
    color: #fff;
}

.thm09-button--berry:hover {
    background: var(--thm09-berry-dark);
}

.thm09-button--paper {
    border-color: var(--thm09-ink);
    background: var(--thm09-paper-strong);
    color: var(--thm09-ink);
}

body.theme-thm09[data-theme-version="v2"] :where(a, button).thm09-button--paper {
    color: var(--thm09-ink);
}

.thm09-button--paper:hover {
    background: var(--thm09-marigold);
}

.thm09-text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    color: var(--thm09-berry);
    font: 700 0.78rem/1.4 var(--theme-font-body);
    letter-spacing: 0.1em;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.35em;
    text-transform: uppercase;
    cursor: pointer;
}

.thm09-sr-status {
    position: fixed;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Opening — image and content are both composed before the curtain moves. */
body.theme-thm09[data-theme-version="v2"]:not([data-theme-state="open"]) {
    overflow: hidden;
}

.thm09-cover {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    grid-template-rows: minmax(250px, 53svh) auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--thm09-coral);
    color: var(--thm09-ink);
    transform: translateY(0);
    transition: transform 780ms cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 780ms;
    will-change: transform;
}

body.theme-thm09[data-theme-version="v2"][data-theme-state="open"] .thm09-cover {
    visibility: hidden;
    transform: translateY(-102%);
}

.thm09-cover__media {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 24%, rgba(240, 179, 72, 0.72) 0 13%, transparent 13.4%),
        linear-gradient(145deg, var(--thm09-berry), var(--thm09-coral));
}

.thm09-cover__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.01) sepia(0.04);
}

.thm09-cover--monogram .thm09-cover__media {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 18% 22%, rgba(240, 179, 72, 0.96) 0 13%, transparent 13.4%),
        radial-gradient(circle at 84% 72%, rgba(250, 221, 207, 0.34) 0 18%, transparent 18.4%),
        repeating-linear-gradient(135deg, rgba(255, 248, 241, 0.08) 0 2px, transparent 2px 22px),
        linear-gradient(145deg, var(--thm09-berry-dark), var(--thm09-coral));
}

.thm09-cover__monogram {
    position: relative;
    z-index: 1;
    color: rgba(255, 248, 241, 0.88);
    font: 800 clamp(7rem, 34cqw, 15rem)/1 var(--theme-font-display);
    letter-spacing: -0.09em;
    text-shadow: 0 18px 44px rgba(59, 36, 32, 0.24);
    transform: translateX(-0.04em) rotate(-5deg);
}

.thm09-cover__wash {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(59, 36, 32, 0.04), rgba(59, 36, 32, 0.12));
    pointer-events: none;
}

.thm09-cover__date-badge {
    position: absolute;
    z-index: 2;
    top: calc(53svh - 48px);
    right: clamp(1.15rem, 5cqw, 3rem);
    display: grid;
    width: 94px;
    min-height: 94px;
    place-content: center;
    border: 5px solid var(--thm09-paper);
    border-radius: 50%;
    background: var(--thm09-marigold);
    text-align: center;
    transform: rotate(7deg);
    box-shadow: var(--thm09-shadow-small);
}

.thm09-cover__date-badge strong {
    font: 800 2rem/0.95 var(--theme-font-display);
}

.thm09-cover__date-badge span {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.thm09-cover__panel {
    position: relative;
    display: flex;
    min-height: calc(47svh + 1px);
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.5rem, 7cqw, 4.5rem) clamp(1.35rem, 6cqw, 4rem) max(1.5rem, env(safe-area-inset-bottom));
    overflow: hidden;
    border-top-right-radius: clamp(3.75rem, 15cqw, 7rem);
    background: var(--thm09-coral);
}

.thm09-cover__panel::after {
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 132px;
    height: 132px;
    border: 18px solid rgba(255, 248, 241, 0.19);
    border-radius: 50%;
    content: "";
}

.thm09-cover__eyebrow {
    max-width: calc(100% - 88px);
    color: var(--thm09-ink);
}

.thm09-cover h1 {
    display: flex;
    max-width: 12ch;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.28em;
    margin-top: 0.7rem;
    color: var(--thm09-paper);
    font-size: clamp(2.2rem, 10cqw, 5.75rem);
}

.thm09-cover h1 span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.thm09-cover h1 i {
    color: var(--thm09-marigold-text);
    font-family: var(--invie-font-heading, "Noto Serif"), Georgia, serif;
    font-size: 0.8em;
    font-style: italic;
    font-weight: 500;
}

.thm09-cover--names-long h1 {
    font-size: clamp(1.92rem, 8.5cqw, 4.9rem);
}

.thm09-cover--names-xlong h1 {
    font-size: clamp(1.65rem, 7.2cqw, 4.1rem);
    line-height: 1.08;
}

.thm09-cover time {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--thm09-berry-dark);
    color: var(--thm09-paper);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.thm09-cover__actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
    margin-top: clamp(1.5rem, 4cqw, 2.5rem);
}

.thm09-cover__guest {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(59, 36, 32, 0.18);
    border-radius: 1rem 1rem 0.3rem 1rem;
    background: rgba(255, 248, 241, 0.9);
}

.thm09-cover__guest span {
    color: var(--thm09-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.thm09-cover__guest strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(0.95rem, 3cqw, 1.15rem);
    word-break: normal;
}

.thm09-confetti {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 76px;
    height: 42px;
    pointer-events: none;
}

.thm09-confetti i {
    position: absolute;
    width: 7px;
    height: 14px;
    border-radius: 99px;
    background: var(--thm09-marigold);
    transform: rotate(28deg);
}

.thm09-confetti i:nth-child(1) { top: 2px; left: 5px; }
.thm09-confetti i:nth-child(2) { top: 22px; left: 22px; width: 10px; height: 10px; background: var(--thm09-paper); }
.thm09-confetti i:nth-child(3) { top: 4px; left: 39px; transform: rotate(-32deg); }
.thm09-confetti i:nth-child(4) { top: 26px; left: 55px; width: 9px; height: 9px; background: var(--thm09-berry); }
.thm09-confetti i:nth-child(5) { top: 8px; right: 0; height: 11px; background: var(--thm09-paper); transform: rotate(65deg); }

/* Intro */
.thm09-intro {
    padding: 0;
    background: var(--thm09-paper);
}

.thm09-nav {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem clamp(1rem, 4cqw, 3rem);
    border-bottom: 1px solid var(--thm09-line);
    background: rgba(255, 248, 241, 0.94);
    backdrop-filter: blur(14px);
}

.thm09-nav__brand {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    gap: 0.65rem;
    color: var(--thm09-ink);
    text-decoration: none;
}

.thm09-nav__brand span {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-marigold);
    font: 800 0.82rem/1 var(--theme-font-display);
    letter-spacing: 0.04em;
}

.thm09-nav__brand strong {
    display: none;
    font-size: 0.75rem;
    letter-spacing: 0.13em;
    white-space: nowrap;
}

.thm09-nav__links {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: clamp(0.6rem, 2cqw, 1.4rem);
    overflow-x: auto;
    scrollbar-width: none;
}

.thm09-nav__links::-webkit-scrollbar {
    display: none;
}

.thm09-nav__links a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding-inline: 0.25rem;
    flex: 0 0 auto;
    color: var(--thm09-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
}

.thm09-intro__grid {
    display: grid;
    gap: clamp(2rem, 6cqw, 5rem);
    padding: clamp(4.75rem, 11cqw, 9rem) clamp(1.25rem, 5cqw, 5rem);
}

.thm09-intro__copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.thm09-intro__copy h2 {
    margin-top: 0.7rem;
}

.thm09-intro__copy > p:not(.thm09-script) {
    max-width: 56ch;
    margin-top: 1.25rem;
    color: var(--thm09-muted);
}

.thm09-intro__calendar {
    display: grid;
    width: min(100%, 250px);
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.2rem 1rem;
    margin-top: 2rem;
    padding: 1rem 1.2rem;
    border: 2px solid var(--thm09-ink);
    border-radius: 1.5rem 1.5rem 0.35rem 1.5rem;
    background: var(--thm09-marigold);
    box-shadow: 7px 7px 0 var(--thm09-berry);
    transform: rotate(-1deg);
}

.thm09-intro__calendar strong {
    grid-row: 1 / 3;
    font: 800 clamp(3.5rem, 10cqw, 5.5rem)/0.85 var(--theme-font-display);
}

.thm09-intro__calendar span,
.thm09-intro__calendar small {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.thm09-intro__postcard {
    position: relative;
    width: min(92%, 540px);
    justify-self: center;
    padding: clamp(0.65rem, 2cqw, 1rem);
    border: 1px solid var(--thm09-line);
    background: var(--thm09-paper-strong);
    box-shadow: var(--thm09-shadow);
    transform: rotate(2deg);
}

.thm09-intro__postcard::before {
    position: absolute;
    z-index: 2;
    top: -16px;
    left: 50%;
    width: 92px;
    height: 30px;
    background: rgba(250, 221, 207, 0.88);
    content: "";
    transform: translateX(-50%) rotate(-3deg);
}

.thm09-intro__postcard img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.03) sepia(0.03);
}

.thm09-intro__postcard--monogram {
    background:
        radial-gradient(circle at 82% 18%, rgba(240, 179, 72, 0.92) 0 14%, transparent 14.4%),
        radial-gradient(circle at 18% 82%, rgba(225, 111, 93, 0.72) 0 18%, transparent 18.4%),
        repeating-linear-gradient(135deg, rgba(59, 36, 32, 0.045) 0 2px, transparent 2px 20px),
        var(--thm09-blush);
}

.thm09-intro__monogram {
    display: grid;
    width: 100%;
    aspect-ratio: 4 / 5;
    place-items: center;
    color: var(--thm09-berry);
    font: 800 clamp(6rem, 28cqw, 12rem)/1 var(--theme-font-display);
    letter-spacing: -0.08em;
    transform: translateX(-0.04em) rotate(-4deg);
}

.thm09-intro__postcard figcaption {
    padding: 1rem 0.35rem 0.45rem;
    color: var(--thm09-berry);
    font: italic 500 clamp(1rem, 3cqw, 1.35rem)/1.35 var(--invie-font-heading, "Noto Serif"), Georgia, serif;
    text-align: center;
}

.thm09-intro__ticker {
    width: 100%;
    padding: 0.78rem 0;
    overflow: hidden;
    background: var(--thm09-berry);
    color: #fff;
    white-space: nowrap;
}

.thm09-intro__ticker span {
    display: block;
    width: max-content;
    padding-left: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

/* Couple */
.thm09-couple {
    background: var(--thm09-blush);
}

.thm09-couple__cards {
    position: relative;
    display: grid;
    width: min(100%, 1120px);
    gap: clamp(3rem, 8cqw, 6rem);
    margin: clamp(3.5rem, 8cqw, 6.5rem) auto 0;
}

.thm09-profile {
    min-width: 0;
}

.thm09-profile__media {
    position: relative;
    width: min(100%, 500px);
    margin-inline: auto;
    aspect-ratio: 4 / 5;
    border: 7px solid var(--thm09-paper);
    border-radius: 2.4rem 2.4rem 0.55rem 2.4rem;
    background: var(--thm09-coral);
    box-shadow: var(--thm09-shadow-small);
}

.thm09-profile:nth-child(2) .thm09-profile__media {
    border-radius: 2.4rem 2.4rem 2.4rem 0.55rem;
    background: var(--thm09-marigold);
}

.thm09-profile__media::before {
    position: absolute;
    z-index: -1;
    inset: 1.2rem -0.8rem -0.8rem 1.2rem;
    border: 2px solid var(--thm09-berry);
    border-radius: inherit;
    content: "";
}

.thm09-profile__media img {
    width: 100%;
    height: 100%;
    border-radius: calc(2.4rem - 7px) calc(2.4rem - 7px) calc(0.55rem - 2px) calc(2.4rem - 7px);
    object-fit: cover;
    object-position: center top;
}

.thm09-profile:nth-child(2) .thm09-profile__media img {
    border-radius: calc(2.4rem - 7px) calc(2.4rem - 7px) calc(2.4rem - 7px) calc(0.55rem - 2px);
}

.thm09-profile__media > span {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-paper);
    color: var(--thm09-ink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.thm09-profile__monogram {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: inherit;
    color: rgba(59, 36, 32, 0.76);
    font: 800 clamp(6rem, 24cqw, 13rem)/1 var(--theme-font-display);
}

.thm09-profile__copy {
    width: min(100%, 500px);
    margin: 1.8rem auto 0;
    padding-inline: 0.4rem;
}

.thm09-profile__copy .thm09-kicker {
    color: var(--thm09-berry);
}

body.theme-thm09[data-theme-version="v2"] .thm09-profile__copy h3 {
    margin-top: 0.6rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

body.theme-thm09[data-theme-version="v2"] .thm09-profile--name-medium .thm09-profile__copy h3 {
    font-size: clamp(1.42rem, 4.1cqw, 2.65rem);
}

body.theme-thm09[data-theme-version="v2"] .thm09-profile--name-long .thm09-profile__copy h3 {
    font-size: clamp(1.25rem, 3.65cqw, 2.35rem);
    line-height: 1.08;
}

body.theme-thm09[data-theme-version="v2"] .thm09-profile--name-xlong .thm09-profile__copy h3 {
    font-size: clamp(1.1rem, 3.25cqw, 2rem);
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.thm09-profile__copy > p:not(.thm09-kicker) {
    max-width: 45ch;
    margin-top: 1rem;
    color: var(--thm09-muted);
}

.thm09-profile__copy .thm09-text-link {
    margin-top: 0.8rem;
}

.thm09-couple__ampersand {
    position: absolute;
    z-index: 3;
    top: calc(50% - 1.5rem);
    left: 50%;
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border: 5px solid var(--thm09-blush);
    border-radius: 50%;
    background: var(--thm09-berry);
    color: #fff;
    font: italic 500 2.35rem/1 var(--invie-font-heading, "Noto Serif"), Georgia, serif;
    transform: translate(-50%, -50%) rotate(-7deg);
}

/* Events */
.thm09-events {
    background: var(--thm09-paper);
}

.thm09-events__lead {
    display: grid;
    width: min(100%, 1160px);
    gap: clamp(2.5rem, 6cqw, 5rem);
    margin-inline: auto;
}

.thm09-events__lead figure {
    position: relative;
    width: min(100%, 500px);
    justify-self: center;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 0.6rem 3rem 3rem 3rem;
    background: var(--thm09-marigold);
    box-shadow: var(--thm09-shadow);
}

.thm09-events__lead figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.06) contrast(0.98) sepia(0.04);
}

.thm09-events__lead figure::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(59, 36, 32, 0.42));
    content: "";
}

.thm09-events__lead figure span {
    position: absolute;
    z-index: 1;
    right: 1rem;
    bottom: 1rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.8rem 0.8rem 0.2rem 0.8rem;
    background: var(--thm09-marigold);
    font: 800 0.75rem/1.25 var(--theme-font-display);
    letter-spacing: 0.12em;
    text-align: center;
}

.thm09-countdown {
    display: grid;
    width: min(100%, 920px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: clamp(3.5rem, 8cqw, 6rem) auto 0;
    overflow: hidden;
    border: 2px solid var(--thm09-ink);
    border-radius: 2rem 2rem 0.45rem 2rem;
    background: var(--thm09-berry);
    color: #fff;
    box-shadow: 9px 9px 0 var(--thm09-marigold);
}

.thm09-countdown > div {
    display: grid;
    min-height: 108px;
    place-content: center;
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    text-align: center;
}

.thm09-countdown > div:nth-child(2n) { border-right: 0; }
.thm09-countdown > div:nth-last-child(-n + 2) { border-bottom: 0; }

.thm09-countdown strong {
    font: 800 clamp(2rem, 7cqw, 3.8rem)/1 var(--theme-font-display);
}

.thm09-countdown span {
    margin-top: 0.45rem;
    color: var(--thm09-blush);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.thm09-events__list {
    display: grid;
    width: min(100%, 980px);
    gap: clamp(1.5rem, 4cqw, 2.5rem);
    margin: clamp(4rem, 9cqw, 7rem) auto 0;
}

.thm09-event {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(82px, 0.33fr) minmax(0, 1fr);
    overflow: hidden;
    border: 2px solid var(--thm09-ink);
    border-radius: 1.6rem 1.6rem 0.4rem 1.6rem;
    background: var(--thm09-paper-strong);
    box-shadow: var(--thm09-shadow-small);
}

.thm09-event::before,
.thm09-event::after {
    position: absolute;
    z-index: 2;
    left: calc(33% - 12px);
    width: 24px;
    height: 24px;
    border: 2px solid var(--thm09-ink);
    border-radius: 50%;
    background: var(--thm09-paper);
    content: "";
}

.thm09-event::before { top: -14px; }
.thm09-event::after { bottom: -14px; }

.thm09-event__date {
    display: grid;
    min-width: 0;
    place-items: center;
    padding: 1.35rem 0.7rem;
    border-right: 2px dashed rgba(59, 36, 32, 0.48);
    background: var(--thm09-marigold);
    text-align: center;
}

.thm09-event:nth-child(even) .thm09-event__date {
    background: var(--thm09-coral);
}

.thm09-event__date time {
    display: grid;
}

.thm09-event__date strong {
    font: 800 clamp(2.7rem, 8cqw, 4.6rem)/0.88 var(--theme-font-display);
}

.thm09-event__date span,
.thm09-event__date small {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.thm09-event__copy {
    min-width: 0;
    padding: clamp(1.35rem, 4cqw, 2.5rem);
}

.thm09-event__copy .thm09-kicker {
    color: var(--thm09-berry);
}

.thm09-event__copy h3 {
    margin-top: 0.45rem;
}

.thm09-event__time {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.2rem;
    font-weight: 700;
}

.thm09-event__copy > strong {
    display: block;
    margin-top: 1.2rem;
    font-size: 0.95rem;
}

.thm09-event address {
    margin-top: 0.35rem;
    color: var(--thm09-muted);
    font-style: normal;
    overflow-wrap: anywhere;
}

.thm09-event__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.1rem;
    margin-top: 1.35rem;
}

.thm09-event__map {
    grid-column: 1 / -1;
    padding: 1rem clamp(1rem, 4cqw, 2rem) 1.5rem;
    border-top: 1px solid var(--thm09-line);
}

.thm09-event__map summary {
    min-height: 44px;
    color: var(--thm09-berry);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 44px;
    text-transform: uppercase;
    cursor: pointer;
}

.thm09-event__map iframe {
    width: 100%;
    min-height: 280px;
    margin-top: 0.8rem;
    border: 0;
    border-radius: 1.2rem;
}

/* Dress code */
.thm09-dresscode {
    display: grid;
    gap: clamp(2.5rem, 7cqw, 5rem);
    background: var(--thm09-marigold);
}

.thm09-dresscode__copy h2 {
    max-width: 12ch;
    margin-top: 0.6rem;
}

.thm09-dresscode__copy > p:not(.thm09-script) {
    max-width: 54ch;
    margin-top: 1.25rem;
}

.thm09-dresscode__copy small {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
}

.thm09-dresscode__palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    list-style: none;
}

.thm09-dresscode__palette li {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid rgba(59, 36, 32, 0.2);
    border-radius: 1.3rem 1.3rem 0.35rem 1.3rem;
    background: rgba(255, 248, 241, 0.7);
}

.thm09-dresscode__palette li > span {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid rgba(59, 36, 32, 0.16);
    border-radius: 1rem 1rem 0.25rem 1rem;
    background: var(--thm09-swatch);
}

.thm09-dresscode__palette strong,
.thm09-dresscode__palette small {
    display: block;
    margin-top: 0.65rem;
    overflow-wrap: normal;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    word-break: normal;
}

.thm09-dresscode__palette small {
    margin-top: 0.1rem;
    color: var(--thm09-muted);
    font-size: 0.75rem;
}

/* Livestream */
.thm09-livestream {
    display: grid;
    gap: 2rem;
    background: var(--thm09-berry);
    color: #fff;
}

.thm09-livestream__signal {
    position: relative;
    display: grid;
    width: 130px;
    height: 130px;
    place-content: center;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.thm09-livestream__signal strong {
    position: relative;
    z-index: 2;
    font: 800 1rem/1 var(--theme-font-display);
    letter-spacing: 0.15em;
}

.thm09-livestream__signal span {
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
}

.thm09-livestream__signal span:nth-child(2) { inset: 28px; }
.thm09-livestream__signal span:nth-child(3) { inset: 40px; background: var(--thm09-coral); }

.thm09-livestream__copy .thm09-kicker {
    color: var(--thm09-marigold-text);
}

.thm09-livestream__copy h2 {
    max-width: 11ch;
    margin-top: 0.65rem;
}

.thm09-livestream__copy > p:not(.thm09-kicker) {
    max-width: 54ch;
    margin-top: 1.25rem;
    color: var(--thm09-blush);
}

.thm09-livestream__access {
    align-self: end;
    min-width: 0;
    padding: 1.4rem;
    border-radius: 1.7rem 1.7rem 0.4rem 1.7rem;
    background: rgba(255, 248, 241, 0.11);
}

.thm09-livestream__access dl {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.thm09-livestream__access dl div {
    display: grid;
    gap: 0.25rem;
}

.thm09-livestream__access dt {
    color: var(--thm09-blush);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.thm09-livestream__access dd {
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Quote */
.thm09-quote {
    display: grid;
    min-height: min(760px, 88svh);
    place-items: center;
    background: var(--thm09-coral);
}

.thm09-quote__sun {
    position: absolute;
    top: clamp(2rem, 7cqw, 5rem);
    right: 0;
    width: clamp(150px, 30cqw, 320px);
    aspect-ratio: 1;
    border: clamp(18px, 4cqw, 42px) solid rgba(255, 248, 241, 0.18);
    border-radius: 50%;
}

.thm09-quote__sun::before,
.thm09-quote__sun::after {
    position: absolute;
    inset: 20%;
    border: 1px solid rgba(59, 36, 32, 0.25);
    border-radius: 50%;
    content: "";
}

.thm09-quote__sun::after { inset: 38%; background: var(--thm09-marigold); }

.thm09-quote blockquote {
    position: relative;
    z-index: 1;
    width: min(100%, 950px);
    text-align: center;
}

.thm09-quote blockquote > span {
    display: block;
    height: 0.65em;
    color: var(--thm09-marigold-text);
    font: 500 clamp(6rem, 18cqw, 13rem)/0.8 var(--invie-font-heading, "Noto Serif"), Georgia, serif;
}

.thm09-quote blockquote p {
    font: 500 clamp(1.65rem, 5.5cqw, 4.1rem)/1.22 var(--invie-font-heading, "Noto Serif"), Georgia, serif;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.thm09-quote cite {
    display: block;
    margin-top: 1.8rem;
    font: normal 700 0.75rem/1.5 var(--theme-font-body);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* Story */
.thm09-story {
    background: var(--thm09-paper);
}

.thm09-story__heading {
    margin-inline: auto;
    text-align: center;
}

.thm09-story__timeline {
    display: grid;
    width: min(100%, 1040px);
    gap: clamp(2rem, 5cqw, 4rem);
    margin: clamp(3.75rem, 8cqw, 6rem) auto 0;
}

.thm09-story-card {
    position: relative;
    display: grid;
    min-width: 0;
    border: 2px solid var(--thm09-ink);
    border-radius: 2rem 2rem 0.45rem 2rem;
    background: var(--thm09-blush);
    box-shadow: var(--thm09-shadow-small);
}

.thm09-story-card:nth-child(3n + 2) { background: var(--thm09-marigold); }
.thm09-story-card:nth-child(3n) { background: var(--thm09-paper-strong); }

.thm09-story-card figure {
    position: relative;
    min-width: 0;
    margin: 0.75rem;
    overflow: hidden;
    border-radius: 1.4rem 1.4rem 0.3rem 1.4rem;
    background: var(--thm09-berry);
}

.thm09-story-card figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: saturate(1.03) sepia(0.03);
}

.thm09-story-card figure span {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-marigold);
    font-size: 0.75rem;
    font-weight: 800;
}

.thm09-story-card__number {
    padding: 1.2rem 1.4rem 0;
    color: var(--thm09-berry);
    font: 800 clamp(4rem, 15cqw, 8rem)/1 var(--theme-font-display);
    opacity: 0.32;
}

.thm09-story-card__copy {
    min-width: 0;
    padding: clamp(1.35rem, 4cqw, 2.5rem);
}

.thm09-story-card__copy .thm09-kicker {
    color: var(--thm09-berry);
}

.thm09-story-card__copy time {
    display: block;
    margin-top: 0.5rem;
    color: var(--thm09-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.thm09-story-card__copy h3 {
    margin-top: 0.75rem;
}

.thm09-story-card__copy h3 + p {
    margin-top: 1rem;
    color: var(--thm09-muted);
    overflow-wrap: anywhere;
}

/* Gallery */
/* Rows come from the shared gallery layout in theme-system.css; the couple's
   column choice caps a row. */
.thm09-gallery {
    --theme-gallery-gap: clamp(0.65rem, 2cqw, 1.15rem);
    background: var(--thm09-ink);
    color: #fff;
}

.thm09-gallery__heading .thm09-kicker {
    color: var(--thm09-marigold-text);
}

.thm09-gallery__heading > h2 + p {
    color: var(--thm09-blush);
}

.thm09-gallery__grid {
    width: min(100%, 1160px);
    margin: clamp(3rem, 7cqw, 5rem) auto 0;
}

.thm09-gallery__item {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 4px solid var(--thm09-paper);
    border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
    background: var(--thm09-blush);
    color: var(--thm09-ink);
    cursor: zoom-in;
}

.thm09-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease;
}

.thm09-gallery__item:hover img,
.thm09-gallery__item:focus-visible img {
    filter: saturate(1.12);
    transform: scale(1.035);
}

.thm09-gallery__item span {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-marigold);
    font-size: 0.75rem;
    font-weight: 800;
}

.thm09-gallery-dialog {
    width: min(94cqw, 1100px);
    max-width: 1100px;
    max-height: 92vh;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 1.4rem;
    background: var(--thm09-ink);
    color: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.thm09-gallery-dialog::backdrop {
    background: rgba(29, 15, 16, 0.82);
    backdrop-filter: blur(8px);
}

.thm09-gallery-dialog[data-gallery-fallback] {
    box-shadow: 0 0 0 100vmax rgba(29, 15, 16, 0.82);
}

.thm09-gallery-dialog__bar,
.thm09-gallery-dialog__controls {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.8rem;
}

.thm09-gallery-dialog__bar p {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.thm09-gallery-dialog__bar button,
.thm09-gallery-dialog__controls button {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.thm09-gallery-dialog__bar button {
    font-size: 1.7rem;
}

.thm09-gallery-dialog__controls button {
    padding: 0.65rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.thm09-gallery-dialog > figure {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    height: min(70vh, 740px);
    place-items: center;
    background: #120a0c;
}

.thm09-gallery-dialog > figure img {
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Forms */
.thm09-form {
    display: grid;
    min-width: 0;
    gap: 1.25rem;
}

.thm09-field {
    display: grid;
    min-width: 0;
    gap: 0.5rem;
}

.thm09-field > label,
.thm09-field > legend {
    padding: 0;
    color: var(--thm09-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    line-height: 1.45;
    text-transform: uppercase;
}

.thm09-field :where(input, select, textarea) {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 2px solid rgba(59, 36, 32, 0.45);
    background: transparent;
    color: var(--thm09-ink);
    font: 500 1rem/1.5 var(--theme-font-body);
}

.thm09-field textarea {
    min-height: 124px;
    resize: vertical;
}

.thm09-field :where(input, select, textarea)::placeholder {
    color: rgba(118, 91, 84, 0.72);
    opacity: 1;
}

.thm09-field :where(input, select, textarea):focus {
    border-bottom-color: var(--thm09-berry);
}

.thm09-form__status {
    min-height: 1.5em;
    color: var(--thm09-berry);
    font-size: 0.8rem;
    font-weight: 600;
}

.thm09-form__status[data-status="error"] {
    color: #9d1f2f;
}

/* RSVP */
.thm09-rsvp {
    display: grid;
    gap: clamp(2.5rem, 7cqw, 5rem);
    background: var(--thm09-berry);
    color: #fff;
}

.thm09-rsvp__intro,
.thm09-rsvp__form {
    width: min(100%, 48rem);
    margin-inline: auto;
}

.thm09-rsvp__intro {
    position: relative;
    min-width: 0;
}

.thm09-rsvp__intro .thm09-script {
    color: var(--thm09-marigold-text);
}

.thm09-rsvp__intro h2 {
    max-width: 20ch;
    margin-top: 0.65rem;
}

.thm09-rsvp__intro > p:not(.thm09-script) {
    max-width: 50ch;
    margin-top: 1.25rem;
    color: var(--thm09-blush);
}

.thm09-rsvp__intro > small {
    display: block;
    margin-top: 1rem;
    color: var(--thm09-marigold-text);
    font-weight: 700;
}

.thm09-rsvp__stamp {
    display: grid;
    width: 108px;
    height: 108px;
    place-content: center;
    gap: 0.2rem;
    margin-top: 2.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.64);
    border-radius: 50%;
    color: var(--thm09-marigold-text);
    text-align: center;
    transform: rotate(-8deg);
}

.thm09-rsvp__stamp span {
    font: 800 1rem/1 var(--theme-font-display);
    letter-spacing: 0.15em;
}

.thm09-rsvp__form {
    padding: clamp(1.4rem, 5cqw, 3rem);
    border-radius: 2rem 2rem 0.5rem 2rem;
    background: var(--thm09-paper);
    color: var(--thm09-ink);
    box-shadow: var(--thm09-shadow);
}

.thm09-attendance {
    min-width: 0;
    padding: 0;
    border: 0;
}

.thm09-attendance__options {
    display: grid;
    gap: 0.55rem;
}

.thm09-attendance__options label {
    position: relative;
    display: grid;
    min-height: 48px;
    align-items: center;
    cursor: pointer;
}

.thm09-attendance__options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.thm09-attendance__options span {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--thm09-line);
    border-radius: 999px;
    background: var(--thm09-paper-strong);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.thm09-attendance__options input:checked + span {
    border-color: var(--thm09-berry);
    background: var(--thm09-berry);
    color: #fff;
}

.thm09-attendance__options input:focus-visible + span {
    outline: 3px solid var(--thm09-berry);
    outline-offset: 3px;
}

/* Wishes */
.thm09-wishes {
    background: var(--thm09-blush);
}

.thm09-wishes__featured {
    display: flex;
    width: min(100%, 1120px);
    gap: 1rem;
    margin: clamp(3rem, 7cqw, 5rem) auto 0;
    padding: 0.5rem 0.25rem 1.5rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--thm09-berry) transparent;
}

.thm09-wish-card {
    display: grid;
    min-width: min(82cqw, 340px);
    min-height: 270px;
    align-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 2px solid var(--thm09-ink);
    border-radius: 1.8rem 1.8rem 0.4rem 1.8rem;
    background: var(--thm09-paper-strong);
    box-shadow: 6px 6px 0 var(--thm09-coral);
    scroll-snap-align: start;
}

.thm09-wish-card:nth-child(even) {
    box-shadow: 6px 6px 0 var(--thm09-marigold);
}

.thm09-wish-card blockquote {
    font: 500 clamp(1.05rem, 3cqw, 1.35rem)/1.55 var(--invie-font-body, "Noto Serif"), Georgia, serif;
}

.thm09-wish-card figcaption {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.thm09-wish-card figcaption > img,
.thm09-wish-card figcaption > span:first-child {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-marigold);
    object-fit: cover;
    font-weight: 800;
}

.thm09-wish-card figcaption > span:last-child {
    display: grid;
    min-width: 0;
}

.thm09-wish-card figcaption strong {
    overflow-wrap: anywhere;
    font-size: 0.82rem;
}

.thm09-wish-card figcaption small {
    color: var(--thm09-muted);
    font-size: 0.75rem;
}

.thm09-wishes__guestbook {
    display: grid;
    align-items: start;
    width: min(100%, 48rem);
    gap: clamp(1.25rem, 4cqw, 2rem);
    margin: clamp(3.5rem, 8cqw, 6rem) auto 0;
}

.thm09-wishes__form,
.thm09-wishes__messages {
    min-width: 0;
    padding: clamp(1.4rem, 5cqw, 2.6rem);
    border: 2px solid var(--thm09-ink);
    border-radius: 2rem 2rem 0.45rem 2rem;
    background: var(--thm09-paper-strong);
}

.thm09-wishes__form .thm09-script {
    margin-bottom: 0.3rem;
}

.thm09-wishes__messages {
    background: var(--thm09-marigold);
}

.thm09-wishes__messages-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(59, 36, 32, 0.24);
}

.thm09-wishes__messages ul {
    display: grid;
    max-height: 440px;
    gap: 1rem;
    margin-top: 1rem;
    overflow-y: auto;
    list-style: none;
}

.thm09-wishes__messages li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(59, 36, 32, 0.2);
}

.thm09-wishes__messages li > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-berry);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.thm09-wishes__messages li > div {
    display: grid;
    min-width: 0;
    gap: 0.2rem;
}

.thm09-wishes__messages li strong,
.thm09-wishes__messages li p {
    overflow-wrap: anywhere;
}

.thm09-wishes__messages li time {
    color: var(--thm09-muted);
    font-size: 0.75rem;
}

.thm09-wishes__messages li p {
    margin-top: 0.25rem;
    font-size: 0.9375rem;
}

.thm09-wishes__empty {
    display: block !important;
    color: var(--thm09-muted);
}

/* Gift */
.thm09-gift {
    display: grid;
    gap: clamp(2.5rem, 7cqw, 5rem);
    background: var(--thm09-marigold);
}

.thm09-gift__heading {
    position: relative;
    min-width: 0;
}

.thm09-gift__heading h2 {
    max-width: 11ch;
    margin-top: 0.65rem;
}

.thm09-gift__heading > p:not(.thm09-script) {
    max-width: 54ch;
    margin-top: 1.25rem;
}

.thm09-gift__bow {
    position: relative;
    display: block;
    width: 92px;
    height: 56px;
    margin-top: 2rem;
}

.thm09-gift__bow::before,
.thm09-gift__bow::after {
    position: absolute;
    top: 4px;
    width: 48px;
    height: 38px;
    border: 3px solid var(--thm09-berry);
    border-radius: 70% 15% 70% 20%;
    content: "";
}

.thm09-gift__bow::before { left: 0; transform: rotate(18deg); }
.thm09-gift__bow::after { right: 0; transform: scaleX(-1) rotate(18deg); }

.thm09-gift-card {
    min-width: 0;
    container-type: inline-size;
    padding: clamp(1.4rem, 5cqw, 2.75rem);
    border: 2px solid var(--thm09-ink);
    border-radius: 2rem 2rem 0.45rem 2rem;
    background: var(--thm09-berry);
    color: #fff;
    box-shadow: 9px 9px 0 var(--thm09-paper);
}

.thm09-gift-card .thm09-field > label {
    color: var(--thm09-blush);
}

.thm09-gift-card__select {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.thm09-gift-card__select select {
    border: 0;
    color: #fff;
}

.thm09-gift-card__select select option {
    background: var(--thm09-berry);
    color: #fff;
}

.thm09-gift-card__select img {
    width: 72px;
    max-height: 34px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.thm09-gift-card__account {
    display: grid;
    min-width: 0;
    gap: 0.55rem;
    margin-top: 2rem;
}

.thm09-gift-card__account > span {
    color: var(--thm09-blush);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Sized to the card, so a 10-16 digit number stays on one line; wrapping is
   only the fallback for unusually long numbers. */
.thm09-gift-card__account > strong {
    max-width: 100%;
    color: var(--thm09-marigold-text);
    font: 800 clamp(1.2rem, 11cqi, 2.25rem)/1.2 var(--theme-font-display);
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.thm09-gift-card__account > small {
    overflow-wrap: anywhere;
}

.thm09-gift-card__account .thm09-button {
    width: fit-content;
    margin-top: 1rem;
}

/* Health */
.thm09-health {
    display: grid;
    gap: clamp(2.5rem, 6cqw, 4rem);
    background: var(--thm09-paper);
}

.thm09-health__copy h2 {
    max-width: 12ch;
    margin-top: 0.65rem;
}

.thm09-health__copy > p:not(.thm09-kicker) {
    max-width: 54ch;
    margin-top: 1.2rem;
    color: var(--thm09-muted);
}

.thm09-health__list {
    display: grid;
    gap: 1rem;
    list-style: none;
}

.thm09-health__list li {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--thm09-line);
    border-radius: 1.4rem 1.4rem 0.35rem 1.4rem;
    background: var(--thm09-blush);
}

.thm09-health__list li:nth-child(even) { background: rgba(240, 179, 72, 0.42); }

.thm09-health__list span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--thm09-berry);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.thm09-health__list p {
    overflow-wrap: anywhere;
}

/* Closing */
.thm09-closing {
    position: relative;
    display: grid;
    min-height: max(720px, 100svh);
    overflow: hidden;
    background: var(--thm09-coral);
    color: #fff;
}

.thm09-closing > figure {
    position: absolute;
    inset: 0;
    background: var(--thm09-berry);
}

.thm09-closing > figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.02) sepia(0.05);
}

.thm09-closing > figure span {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(59, 36, 32, 0.05) 15%, rgba(59, 36, 32, 0.78) 82%, rgba(59, 36, 32, 0.92));
}

.thm09-closing__monogram {
    position: absolute;
    top: 14%;
    left: 50%;
    color: rgba(255, 248, 241, 0.26);
    font: 800 clamp(9rem, 38cqw, 20rem)/1 var(--theme-font-display);
    letter-spacing: -0.08em;
    transform: translateX(-50%);
}

.thm09-closing__copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(3.5rem, 10cqw, 7rem) clamp(1.35rem, 6cqw, 5rem) max(2rem, env(safe-area-inset-bottom));
}

.thm09-closing__copy .thm09-script {
    color: var(--thm09-marigold-text);
}

.thm09-closing__copy h2 {
    display: flex;
    max-width: 13ch;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.22em;
    margin-top: 0.6rem;
    color: #fff;
}

.thm09-closing__copy h2 span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.thm09-closing__copy h2 i {
    color: var(--thm09-marigold-text);
    font-family: var(--invie-font-heading, "Noto Serif"), Georgia, serif;
    font-size: 0.78em;
    font-style: italic;
    font-weight: 500;
}

.thm09-closing--names-long .thm09-closing__copy h2 { font-size: clamp(1.95rem, 7.5cqw, 4.7rem); }
.thm09-closing--names-xlong .thm09-closing__copy h2 { font-size: clamp(1.65rem, 6.2cqw, 3.9rem); line-height: 1.09; }

.thm09-closing__copy > p:not(.thm09-script) {
    max-width: 52ch;
    margin-top: 1.4rem;
    color: var(--thm09-blush);
}

.thm09-closing__copy time {
    margin-top: 1.25rem;
    color: var(--thm09-marigold-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.thm09-closing__copy > small {
    margin-top: clamp(3rem, 9cqw, 6rem);
    font-size: 0.75rem;
}

.thm09-closing__copy > small a {
    text-underline-offset: 0.25em;
}

/* Container-responsive composition. The desktop invitation pane responds to
   its actual 460–680px width, not the outer browser viewport. */
@container thm09-page (min-width: 540px) {
    .thm09-nav__brand strong { display: block; }

    .thm09-cover__actions { align-items: stretch; }

    .thm09-intro__grid,
    .thm09-events__lead {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }

    .thm09-dresscode,
    .thm09-health {
        grid-template-columns: minmax(0, 0.82fr) minmax(280px, 1.18fr);
        align-items: center;
    }

    .thm09-intro__postcard { width: min(100%, 520px); }

    .thm09-couple__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: clamp(1.5rem, 4cqw, 4rem);
    }

    .thm09-profile:nth-child(2) { margin-top: clamp(3rem, 8cqw, 6rem); }

    .thm09-couple__ampersand { top: 43%; }

    .thm09-countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .thm09-countdown > div { border-bottom: 0; }
    .thm09-countdown > div:nth-child(2n) { border-right: 1px solid rgba(255, 255, 255, 0.25); }
    .thm09-countdown > div:last-child { border-right: 0; }

    .thm09-event { grid-template-columns: 150px minmax(0, 1fr); }
    .thm09-event::before, .thm09-event::after { left: 138px; }

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

    .thm09-livestream { grid-template-columns: auto minmax(0, 1fr); }
    .thm09-livestream__access { grid-column: 2; }

    .thm09-story-card--with-media { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); align-items: stretch; }
    .thm09-story-card--with-media:nth-child(even) { grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr); }
    .thm09-story-card--with-media:nth-child(even) figure { grid-column: 2; grid-row: 1; }
    .thm09-story-card--with-media:nth-child(even) .thm09-story-card__copy { grid-column: 1; grid-row: 1; }
    .thm09-story-card figure img { height: 100%; aspect-ratio: auto; }

    .thm09-rsvp__form,
    .thm09-wishes__form { grid-template-columns: minmax(0, 1fr); }
    .thm09-field--wide { grid-column: auto; }
    .thm09-attendance__options { grid-template-columns: minmax(0, 1fr); }

    .thm09-health__list { grid-template-columns: minmax(0, 1fr); }
}

@container thm09-page (min-width: 900px) {
    .thm09-intro__grid,
    .thm09-events__lead {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
        align-items: center;
    }

    .thm09-cover {
        grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
        grid-template-rows: minmax(100vh, auto);
    }

    .thm09-cover__media { grid-column: 1; grid-row: 1; }
    .thm09-cover__panel { grid-column: 2; grid-row: 1; min-height: 100vh; border-top-right-radius: 0; border-bottom-left-radius: 7rem; }
    .thm09-cover__date-badge { top: 3rem; right: calc(45% - 47px); }

    .thm09-couple__cards { gap: clamp(3rem, 6cqw, 6rem); }
    .thm09-profile:nth-child(2) { margin-top: 5rem; }

    .thm09-story-card { min-height: 420px; }

    .thm09-dresscode__palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .thm09-rsvp__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .thm09-field--wide { grid-column: 1 / -1; }
    .thm09-attendance__options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .thm09-attendance__options span { justify-content: center; text-align: center; }
    .thm09-health__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop cinematic split: the outer canvas is intentionally locked while
   the invitation pane owns vertical scrolling. */
@media (min-width: 1024px) {
    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell--enabled > .desktop-invitation-shell__invitation {
        contain: layout paint;
        transform: translateZ(0);
    }

    body.theme-thm09[data-theme-version="v2"] .thm09-page {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow-x: clip;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        scroll-behavior: smooth;
    }

    body.theme-thm09[data-theme-version="v2"] .thm09-cover {
        position: fixed;
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__visual {
        background: var(--thm09-paper);
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__photo {
        filter: saturate(1.05) sepia(0.08) contrast(1.02);
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__visual::before {
        background:
            radial-gradient(circle at 12% 15%, rgba(240, 179, 72, 0.25) 0 7%, transparent 7.3%),
            radial-gradient(circle at 88% 24%, rgba(225, 111, 93, 0.22) 0 9%, transparent 9.3%),
            linear-gradient(180deg, rgba(59, 36, 32, 0.02) 20%, rgba(59, 36, 32, 0.72) 100%);
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__visual::after {
        height: 42%;
        background: linear-gradient(180deg, transparent, rgba(59, 36, 32, 0.52));
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__monogram {
        top: clamp(30px, 5vh, 64px);
        color: var(--thm09-marigold-text);
        font-family: var(--theme-font-display);
        font-weight: 800;
        opacity: 0.34;
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__copy {
        top: auto;
        bottom: clamp(2.5rem, 7vh, 6rem);
        width: min(78%, 720px);
        text-align: left;
        text-shadow: 0 2px 22px rgba(59, 36, 32, 0.56);
        transform: none;
        translate: -50% 0;
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__eyebrow {
        color: var(--thm09-marigold-text);
        font-family: var(--theme-font-body);
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__names {
        font-family: var(--theme-font-display);
        font-weight: 800;
        letter-spacing: -0.035em;
        line-height: 1.03;
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell__date {
        font-family: var(--theme-font-body);
        font-size: clamp(12px, 0.92vw, 17px);
        font-weight: 700;
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell--without-photo .desktop-invitation-shell__visual {
        background:
            radial-gradient(circle at 22% 22%, var(--thm09-marigold) 0 11%, transparent 11.3%),
            radial-gradient(circle at 82% 66%, var(--thm09-coral) 0 15%, transparent 15.3%),
            var(--thm09-blush);
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell--without-photo .desktop-invitation-shell__visual::before {
        background: repeating-linear-gradient(135deg, rgba(59, 36, 32, 0.035) 0 2px, transparent 2px 18px);
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell--without-photo .desktop-invitation-shell__monogram {
        color: var(--thm09-berry);
        opacity: 0.82;
    }

    body.theme-thm09[data-theme-version="v2"] .desktop-invitation-shell--without-photo .desktop-invitation-shell__copy {
        color: var(--thm09-ink);
        text-shadow: none;
    }
}

@media (max-width: 389px) {
    .thm09-section { padding-inline: 1rem; }
    .thm09-nav { padding-inline: 0.75rem; gap: 0.6rem; }
    .thm09-nav__links { gap: 0.5rem; }
    .thm09-nav__links a { font-size: 0.75rem; }
    .thm09-cover { grid-template-rows: minmax(220px, 47svh) auto; }
    .thm09-cover__date-badge { top: calc(47svh - 40px); width: 80px; min-height: 80px; border-width: 4px; }
    .thm09-cover__date-badge strong { font-size: 1.65rem; }
    .thm09-cover__panel { min-height: calc(53svh + 1px); padding-top: 2.8rem; }
    .thm09-cover__eyebrow { max-width: calc(100% - 68px); }
    .thm09-cover h1 { font-size: clamp(1.85rem, 9.7cqw, 2.55rem); }
    .thm09-cover--names-long h1 { font-size: clamp(1.6rem, 8.2cqw, 2.2rem); }
    .thm09-cover--names-xlong h1 { font-size: clamp(1.38rem, 7.1cqw, 1.9rem); }
    .thm09-cover__guest { padding: 0.65rem 0.75rem; }
    .thm09-event { grid-template-columns: 78px minmax(0, 1fr); }
    .thm09-event::before, .thm09-event::after { left: 66px; }
    .thm09-event__copy { padding-inline: 1rem; }
    .thm09-event__actions .thm09-button { width: 100%; }
    .thm09-gallery-dialog__controls button { padding-inline: 0.55rem; font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .thm09-cover,.thm09-gallery__item img,.thm09-button {
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    body.theme-thm09[data-theme-version="v2"] :focus-visible {
        outline-color: Highlight !important;
    }

    .thm09-button,
    .thm09-event,
    .thm09-story-card,
    .thm09-profile__media,
    .thm09-rsvp__form {
        border: 2px solid CanvasText;
    }
}

@media print {
    .thm09-cover,.thm09-nav,.thm09-gallery-dialog {
        display: none !important;
    }

    .thm09-invitation[aria-hidden="true"] {
        visibility: visible !important;
    }
}

/* Floating controls use the shared dock (theme-system.css), coloured for this theme. */
.thm09-dock {
    --theme-dock-bg: #853b51;
    --theme-dock-fg: #fffdf9;
    --theme-dock-border: rgba(255, 253, 249, 0.35);
    --theme-dock-bg-on-dark: rgba(255, 253, 249, 0.94);
    --theme-dock-fg-on-dark: #853b51;
    --theme-dock-border-on-dark: rgba(59, 36, 32, 0.18);
}

/* Berry text on marigold surfaces uses the darker berry (5.9:1). */
.thm09-story-card:nth-child(3n + 2) .thm09-kicker,
.thm09-dresscode .thm09-script {
    color: var(--thm09-berry-dark);
}

/* The gift card needs room for the account number: two columns only on wide pages. */
@container thm09-page (min-width: 760px) {
    .thm09-gift {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }
}


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

/* Verse: the sun sits behind the words instead of filling a screen on its own. */
.thm09-quote {
    min-height: 0;
}

.thm09-quote__sun {
    top: clamp(1rem, 4cqw, 3rem);
    width: clamp(110px, 24cqw, 260px);
    opacity: 0.85;
}

.thm09-quote blockquote > span {
    font-size: clamp(4.5rem, 12cqw, 9rem);
}

.thm09-quote blockquote p {
    font-size: clamp(1.45rem, 4.6cqw, 3.2rem);
}

/* The time reads with a clock, not an empty radio circle. */
.thm09-event__time svg {
    flex: none;
}

/* One map control per event. */
.thm09-map .theme-v2-map__panel iframe {
    border-radius: 18px;
}

/* Desktop: the companion photograph carries no second set of names. */
@media (min-width: 1024px) {
    body.theme-thm09 .desktop-invitation-shell--enabled:not(.desktop-invitation-shell--without-photo) .desktop-invitation-shell__copy,
    body.theme-thm09 .desktop-invitation-shell--enabled:not(.desktop-invitation-shell--without-photo) .desktop-invitation-shell__monogram {
        display: none;
    }
}

/* Narrow phones: the photo dialog's arrows stand alone so the controls keep to
   one line inside the dialog; the buttons keep their spoken names. */
@media (max-width: 379px) {
    .thm09-gallery-dialog__label {
        display: none;
    }
}

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

/* Phones: the "&" seal sits in its own row between the two profiles,
   so it never covers the groom's Instagram link. */
@container thm09-page (max-width: 539px) {
    .thm09-couple__cards .thm09-profile:nth-child(2) {
        order: 2;
    }

    .thm09-couple__ampersand {
        position: relative;
        top: auto;
        left: auto;
        order: 1;
        justify-self: center;
        margin-block: -1.75rem;
        transform: rotate(-7deg);
    }
}

/* Tablet columns: headings sized for half the page instead of the full width. */
@container thm09-page (min-width: 540px) and (max-width: 899px) {
    body.theme-thm09[data-theme-version="v2"] :is(
        .thm09-intro__copy,
        .thm09-dresscode__copy,
        .thm09-gift__heading,
        .thm09-health__copy
    ) h2 {
        max-width: none;
        font-size: clamp(2.1rem, 5cqw, 2.9rem);
    }
}

/* LIVE label: white on the darker coral reaches 4.7:1. */
.thm09-livestream__signal span:nth-child(3) {
    background: var(--thm09-coral-dark);
}

/* Script line on the marigold gift band uses the darker berry (5.9:1). */
.thm09-gift .thm09-script {
    color: var(--thm09-berry-dark);
}

/* Tight display tracking keeps its character, but words stay visibly apart. */
body.theme-thm09[data-theme-version="v2"] :where(h1, h2, h3) {
    word-spacing: 0.08em;
}

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

/* Video: each clip is a framed sticker with the theme's offset shadow, on paper
   between the dark gallery and the berry RSVP. One clip is centred; several pair
   up or sit three to a row, and an odd number never leaves a clip alone. */
.thm09-video {
    --theme-video-gap: clamp(1.1rem, 3cqw, 1.9rem);
    --theme-video-radius: 1.6rem 1.6rem 0.4rem 1.6rem;
    --theme-video-border: var(--thm09-ink);
    --theme-video-frame: var(--thm09-berry);
    --theme-video-button: var(--thm09-marigold);
    --theme-video-button-text: var(--thm09-ink);
    background: var(--thm09-paper);
}

.thm09-video .thm09-video__reel {
    display: grid;
    width: min(100%, 1040px);
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem var(--theme-video-gap);
    margin: clamp(3rem, 7cqw, 5rem) auto 0;
    counter-reset: thm09-film;
}

.thm09-video[data-video-count="1"] .thm09-video__reel {
    width: min(100%, 880px);
}

.thm09-video .theme-video__item {
    container-type: inline-size;
    counter-increment: thm09-film;
}

.thm09-video .theme-video__frame {
    border-width: 2px;
    box-shadow: 9px 9px 0 var(--thm09-marigold);
}

.thm09-video .theme-video__item:nth-child(even) .theme-video__frame {
    box-shadow: 9px 9px 0 var(--thm09-coral);
}

.thm09-video .theme-video__poster {
    filter: saturate(1.04) sepia(0.04);
}

/* The whole frame is the play button: a guest taps the clip, not a small target. */
body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__play {
    z-index: 2;
    align-self: stretch;
    justify-self: stretch;
    justify-content: center;
}

body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__play,
body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__frame--link {
    font-family: var(--theme-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

/* The play mark is a sticker too, and grows with its frame. */
.thm09-video .theme-video__play-icon {
    width: clamp(3.25rem, 14cqi, 4.75rem);
    border: 2px solid var(--thm09-ink);
    box-shadow: 4px 4px 0 rgba(59, 36, 32, 0.55);
}

.thm09-video :is(.theme-video__play, .theme-video__frame--link):is(:hover, :focus-visible) {
    --theme-video-button: var(--thm09-berry);
    --theme-video-button-text: #fff;
}

/* Focus rings the whole frame in berry. The frame clips its button, so the ring is
   drawn on the frame; browsers without :has() keep an inner ring. */
body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__play:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: -0.6rem !important;
}

body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__frame--link:focus-visible {
    outline: 3px solid var(--thm09-berry) !important;
    outline-offset: 4px !important;
}

.thm09-video .theme-video__frame:has(.theme-video__play:focus-visible) {
    outline: 3px solid var(--thm09-berry);
    outline-offset: 4px;
}

@supports selector(:has(*)) {
    body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__play:focus-visible {
        outline-color: transparent !important;
    }
}

body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__caption {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.1rem;
    font-family: var(--theme-font-display);
    font-size: clamp(1.05rem, 2.4cqw, 1.3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: left;
}

body.theme-thm09[data-theme-version="v2"] .thm09-video .theme-video__caption::before {
    display: grid;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 2px solid var(--thm09-ink);
    border-radius: 50%;
    background: var(--thm09-marigold);
    content: counter(thm09-film, decimal-leading-zero);
    font-size: 0.75rem;
    letter-spacing: 0;
}

@container thm09-page (min-width: 540px) {
    .thm09-video:not([data-video-count="1"]) .thm09-video__reel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Clips pair up; an odd last one is centred under the pairs. */
    .thm09-video:not([data-video-count="1"]) .theme-video__item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - var(--theme-video-gap)) / 2);
    }
}

@container thm09-page (min-width: 900px) {
    .thm09-video:not([data-video-count="1"]) .thm09-video__reel {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    /* Three clips to a row; two, four and the first pair of five sit two to a row. */
    .thm09-video:not([data-video-count="1"]) .theme-video__item {
        grid-column: span 2;
    }

    .thm09-video:is([data-video-count="2"], [data-video-count="4"]) .theme-video__item,
    .thm09-video[data-video-count="5"] .theme-video__item:nth-child(-n + 2) {
        grid-column: span 3;
    }

    .thm09-video:not([data-video-count="1"]) .theme-video__item:last-child:nth-child(odd) {
        grid-column: span 2;
        justify-self: stretch;
        width: auto;
    }
}

/* Kirim Kado: the marigold gift band's sibling on blush. Each address is a parcel
   label with a stamp, under the gift's bow. */
.thm09-gift-address {
    display: grid;
    gap: clamp(2.5rem, 7cqw, 5rem);
    background: var(--thm09-blush);
}

.thm09-gift-address__heading {
    position: relative;
    min-width: 0;
}

.thm09-gift-address__heading h2 {
    max-width: 13ch;
    margin-top: 0.65rem;
}

.thm09-gift-address__heading > p:not(.thm09-script) {
    max-width: 54ch;
    margin-top: 1.25rem;
}

.thm09-gift-address .thm09-gift-address__labels {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.75rem, 4cqw, 2.5rem) clamp(1.5rem, 4cqw, 2.5rem);
}

.thm09-gift-address .theme-gift-address__card {
    position: relative;
    align-items: flex-start;
    gap: 0;
    padding: clamp(1.4rem, 5cqw, 2.5rem);
    border: 2px solid var(--thm09-ink);
    border-radius: 2rem 2rem 0.45rem 2rem;
    background: var(--thm09-paper-strong);
    box-shadow: 9px 9px 0 var(--thm09-berry);
    color: var(--thm09-ink);
    text-align: left;
}

/* A stamp with the theme's sun in the label's corner. */
.thm09-gift-address .theme-gift-address__card::before {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 2.9rem;
    height: 3.3rem;
    border: 2px dashed var(--thm09-coral-dark);
    border-radius: 0.35rem;
    background:
        radial-gradient(circle at 50% 44%, var(--thm09-marigold) 0 34%, transparent 35%),
        var(--thm09-paper);
    content: "";
    rotate: 6deg;
}

body.theme-thm09[data-theme-version="v2"] .thm09-gift-address .theme-gift-address__label {
    color: var(--thm09-berry);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    opacity: 1;
}

body.theme-thm09[data-theme-version="v2"] .thm09-gift-address .theme-gift-address__name {
    max-width: calc(100% - 3.75rem);
    margin: 0.5rem 0 0.2rem;
    font-family: var(--theme-font-display);
    font-size: clamp(1.6rem, 6cqw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    overflow-wrap: break-word;
}

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

body.theme-thm09[data-theme-version="v2"] .thm09-gift-address .theme-gift-address__address {
    max-width: 44ch;
    line-height: 1.65;
}

body.theme-thm09[data-theme-version="v2"] .thm09-gift-address .theme-gift-address__note {
    margin-top: 0.6rem;
    color: var(--thm09-muted);
    font-size: 0.85rem;
    opacity: 1;
}

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

body.theme-thm09[data-theme-version="v2"] .thm09-gift-address .theme-gift-address__copy[data-copy-state="copied"] {
    background: var(--thm09-berry-dark);
}

/* One address mirrors the gift band: the label first, the heading beside it. Two
   sit side by side under the heading; three put the first centred over two. */
@container thm09-page (min-width: 760px) {
    .thm09-gift-address[data-address-count="1"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }

    .thm09-gift-address[data-address-count="1"] .thm09-gift-address__heading {
        grid-column: 2;
        grid-row: 1;
    }

    .thm09-gift-address[data-address-count="1"] .thm09-gift-address__labels {
        grid-column: 1;
        grid-row: 1;
    }

    .thm09-gift-address:not([data-address-count="1"]) .thm09-gift-address__labels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .thm09-gift-address[data-address-count="3"] .theme-gift-address__card:first-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 1.25rem);
    }
}

/* Teks & Font: a text the couple writes may hold one long word (Bapak/Ibu/Saudara/i). Body text
   breaks instead of pushing past its column (headings shrink first: text-fit.js). Zero
   specificity, so the theme's own wrapping rules win. */
:where(body.theme-thm09) :where(h4, p, small, li, blockquote, figcaption) {
    overflow-wrap: break-word;
}

/* Teks & Font: the short measures (11–13ch) are set for the theme's own titles. A title the
   couple writes (no data-copy-fit="off") takes its column: in ch the box shrank with the type as
   text-fit shrank it, so a long word never fitted and broke mid-word in a narrow strip. */
:is(.thm09-dresscode__copy, .thm09-livestream__copy, .thm09-gift__heading, .thm09-health__copy, .thm09-gift-address__heading) h2:not([data-copy-fit="off"]) {
    max-width: 100%;
}
