/* thm04 — isolated Theme System v2 tokens and compatibility hardening. */
:where(.theme-thm04[data-theme-version="v2"]) {
    --theme-surface: #f8f4e8;
    --theme-surface-muted: #edf0e9;
    --theme-text: #18312b;
    --theme-text-muted: #526159;
    --theme-accent: #9b7a39;
    --theme-accent-strong: #786124;
    --theme-accent-contrast: #10251f;
    --theme-focus: #315d50;
    --theme-font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --theme-font-body: "Montserrat", "Segoe UI", sans-serif;
    --theme-type-xs: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
    --theme-type-sm: clamp(0.875rem, 0.84rem + 0.14vw, 0.95rem);
    --theme-type-body: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
    --theme-type-title: clamp(2rem, 1.55rem + 2.2vw, 4rem);
    --theme-space-1: 0.25rem;
    --theme-space-2: 0.5rem;
    --theme-space-3: 0.75rem;
    --theme-space-4: 1rem;
    --theme-space-5: 1.5rem;
    --theme-space-6: 2rem;
    --theme-space-7: 3rem;
    --theme-radius-sm: 0.25rem;
    --theme-radius-md: 0.5rem;
    --theme-radius-lg: calc(0.5rem * 1.75);
    --theme-shadow-sm: 0 0.5rem 1.5rem color-mix(in srgb, #18312b 12%, transparent);
    --theme-shadow-lg: 0 1.5rem 4rem color-mix(in srgb, #18312b 18%, transparent);
    --theme-motion-fast: 160ms;
    --theme-motion-normal: 320ms;
    --theme-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --theme-image-fit: cover;
    --theme-image-position: center;
    --theme-image-radius: 0.375rem;
    --theme-image-filter: saturate(0.82) contrast(1.045) brightness(1.01);
    accent-color: var(--theme-accent);
    background-color: var(--theme-surface);
    color: var(--theme-text);
    font-family: var(--theme-font-body);
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

:where(.theme-thm04[data-theme-version="v2"]).theme-v2-boundary {
    display: contents;
}

:where(.theme-thm04[data-theme-version="v2"]) .theme-v2-section {
    display: contents;
}

:where(.theme-thm04[data-theme-version="v2"]) :where(.container, .container-fluid, .container-xl, .container-xxl, .row, [class*="col-"]) {
    min-width: 0;
    max-width: 100%;
}

:where(.theme-thm04[data-theme-version="v2"]) :where(h1, h2, h3, h4, h5, h6) {
    text-wrap: balance;
}

:where(.theme-thm04[data-theme-version="v2"]) :where(p, li, address, blockquote, figcaption, label) {
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

:where(.theme-thm04[data-theme-version="v2"]) :where(img:not(.decoration), video, canvas, iframe) {
    height: auto;
    max-inline-size: 100%;
}

:where(.theme-thm04[data-theme-version="v2"]) iframe {
    inline-size: 100%;
}

/* Formal green-gold cover with a restrained invitation-frame hierarchy. */
body.theme-thm04[data-theme-version="v2"] section#opening {
    isolation: isolate;
}

body.theme-thm04[data-theme-version="v2"] section#opening::before {
    border: 1px solid rgba(216, 194, 126, 0.72);
    content: "";
    inset: clamp(0.9rem, 3vw, 2.5rem);
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

body.theme-thm04[data-theme-version="v2"] section#opening .container {
    background: rgba(16, 45, 34, 0.58);
    border-block: 1px solid rgba(216, 194, 126, 0.38);
    color: #fffdf5 !important;
    inline-size: min(calc(100% - 2.25rem), 46rem);
    padding: clamp(1.5rem, 5vw, 3.5rem);
    position: relative;
    z-index: 1;
}

body.theme-thm04[data-theme-version="v2"] section#opening h1.font-type-secondary {
    color: #fffdf5;
    font-family: var(--theme-font-display) !important;
    font-size: clamp(2.6rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.075em;
    line-height: 1.05;
    text-transform: uppercase;
}

body.theme-thm04[data-theme-version="v2"] section#opening img {
    filter: sepia(0.25) saturate(0.82) brightness(1.15);
    margin-block-end: clamp(1.5rem, 5vh, 4rem) !important;
}

body.theme-thm04[data-theme-version="v2"] section#opening :where(.font-bold, .mb-7) {
    font-family: var(--theme-font-body);
    letter-spacing: 0.055em;
    line-height: 1.6;
}

body.theme-thm04[data-theme-version="v2"] section#opening .font-bold {
    color: #e9d79e;
    font-size: 0.78rem;
    text-transform: uppercase;
}

body.theme-thm04[data-theme-version="v2"] section#opening .btn-secondary {
    background: #d6c07a !important;
    border: 1px solid #d6c07a !important;
    border-radius: 0;
    color: #18312b !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Let the cover lift like a curtain while the first invitation details reveal behind it. */
body#index.theme-thm04[data-theme-version="v2"].opening-hide section#opening {
    animation: thm04-opening-curtain 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
    will-change: transform, opacity;
}

/* The shared kernel normally hides covers immediately; keep this one paintable until its curtain exits. */
body#index.theme-thm04[data-theme-version="v2"][data-theme-state="open"].opening-hide
    .theme-v2-section--cover {
    display: contents !important;
    pointer-events: none;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready [data-thm04-hero-reveal] {
    opacity: 0;
    transform: translateY(18px);
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal] {
    animation: thm04-hero-detail-reveal 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="eyebrow"] {
    animation-delay: 340ms;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="title"] {
    animation-name: thm04-hero-title-reveal;
    animation-delay: 440ms;
    animation-duration: 820ms;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="ornament"] {
    animation-delay: 600ms;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="date"] {
    animation-delay: 680ms;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="time"] {
    animation-delay: 740ms;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="details"] {
    animation-delay: 820ms;
}

body.theme-thm04[data-theme-version="v2"].thm04-hero-reveal-ready.opening-hide
    [data-thm04-hero-reveal="action"] {
    animation-delay: 920ms;
}

@keyframes thm04-opening-curtain {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    18% {
        opacity: 1;
        transform: translate3d(0, 8px, 0) scale(0.998);
    }

    76% {
        opacity: 1;
        transform: translate3d(0, -88%, 0) scale(0.99);
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -103%, 0) scale(0.985);
    }
}

@keyframes thm04-hero-detail-reveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes thm04-hero-title-reveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

:where(.theme-thm04[data-theme-version="v2"]) :where(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
) {
    min-block-size: 44px;
    max-inline-size: 100%;
}

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

body.theme-thm04[data-theme-version="v2"] :where(
    section#opening,
    .thm04-nav,
    #thm04-livestream,
    #thm04-quote,
    .thm04-wishes__featured,
    #thm04-closing,
    .thm04-gallery-dialog
) :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline-color: #dbc98f !important;
}

:where(.theme-thm04[data-theme-version="v2"]) a {
    text-underline-offset: 0.18em;
}

:where(.theme-thm04[data-theme-version="v2"]) ::selection {
    background: var(--theme-accent);
    color: var(--theme-accent-contrast);
}

@supports (overflow: clip) {
    body.theme-thm04[data-theme-version="v2"] {
        overflow-x: clip;
    }
}

@media (max-width: 40rem) {
    :where(.theme-thm04[data-theme-version="v2"]) :where(section, header, footer) {
        max-inline-size: 100%;
        overflow-x: clip;
    }

    :where(.theme-thm04[data-theme-version="v2"]) :where(.container, .container-fluid, .container-xl, .container-xxl) {
        padding-inline: clamp(1rem, 4vw, 1.5rem);
    }

    :where(.theme-thm04[data-theme-version="v2"]) :where(button, .btn, [role="button"]) {
        max-inline-size: 100%;
        white-space: normal;
    }

    :where(.theme-thm04[data-theme-version="v2"]) :where(table, pre, code) {
        max-inline-size: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    :where(.theme-thm04[data-theme-version="v2"]),
    :where(.theme-thm04[data-theme-version="v2"]) *,
    :where(.theme-thm04[data-theme-version="v2"]) *::before,
    :where(.theme-thm04[data-theme-version="v2"]) *::after {
        scroll-behavior: auto !important;
        animation-delay: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-delay: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* --------------------------------------------------------------------------
   V2 art direction: Formal Forest
   -------------------------------------------------------------------------- */

body.theme-thm04[data-theme-version="v2"] {
    --thm04-forest-950: #10251f;
    --thm04-forest-900: var(--theme-text, #18312b);
    --thm04-forest-800: #23483d;
    --thm04-forest-700: #315d50;
    --thm04-sage-200: #dce4dc;
    --thm04-sage-100: #edf0e9;
    --thm04-ivory: var(--theme-surface, #f8f4e8);
    --thm04-paper: #fffdf8;
    --thm04-gold: var(--theme-accent, #a98a4c);
    --thm04-gold-ink: var(--theme-accent-strong, #786124);
    --thm04-gold-light: #dbc98f;
    --thm04-ink: #1a2924;
    --thm04-muted: #526159;
    --thm04-line: rgba(26, 41, 36, 0.16);
    /* The couple's own fonts (custom font add-on) take over when set; see x-theme-custom-fonts.
       The manifest tokens (Cormorant Garamond, Montserrat) stay the fallback. */
    --thm04-display: var(--invie-font-heading, var(--theme-font-display));
    --thm04-body: var(--invie-font-body, var(--theme-font-body));
    --thm04-photo-filter: var(--theme-image-filter, saturate(0.82) contrast(1.045) brightness(1.01));
    background: var(--thm04-ivory);
    color: var(--thm04-ink);
    font-family: var(--thm04-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.72;
    text-rendering: optimizeLegibility;
}

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

body.theme-thm04[data-theme-version="v2"] :where(p, li, address, label, input, select, textarea, button) {
    font-family: var(--thm04-body);
    font-size: inherit;
}

body.theme-thm04[data-theme-version="v2"] :where(h1, h2, h3, h4, h5, h6, .font-type-secondary) {
    color: inherit;
    font-family: var(--thm04-display) !important;
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.06;
}

body.theme-thm04[data-theme-version="v2"] p {
    font-size: inherit;
    line-height: 1.75;
}

body.theme-thm04[data-theme-version="v2"] a {
    color: inherit;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-boundary {
    background: var(--thm04-ivory);
    font-family: var(--thm04-body);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section > section,
body.theme-thm04[data-theme-version="v2"] .theme-v2-section > header {
    position: relative;
    width: 100%;
    max-width: 100%;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section > section > .container,
body.theme-thm04[data-theme-version="v2"] .theme-v2-section > header > .container,
body.theme-thm04[data-theme-version="v2"] #footer > .container {
    width: min(calc(100% - 36px), 760px) !important;
    max-width: none !important;
    margin-inline: auto;
    padding-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] :where(.mb-16) {
    margin-bottom: 44px !important;
}

body.theme-thm04[data-theme-version="v2"] :where(.mb-12) {
    margin-bottom: 34px !important;
}

body.theme-thm04[data-theme-version="v2"] :where(.mb-10, .mb-8) {
    margin-bottom: 26px !important;
}

body.theme-thm04[data-theme-version="v2"] :where(.mt-10, .mt-8) {
    margin-top: 28px !important;
}

.thm04-skip-link {
    position: fixed;
    z-index: 10050;
    top: 12px;
    left: 12px;
    padding: 11px 16px;
    border: 1px solid var(--thm04-gold);
    background: var(--thm04-paper);
    color: var(--thm04-forest-950) !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.thm04-skip-link:focus {
    transform: translateY(0);
}

body.theme-thm04[data-theme-version="v2"][data-theme-state="open"] .thm04-skip-link {
    display: none;
}

.thm04-eyebrow {
    margin: 0;
    color: var(--thm04-gold-ink);
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1.5 !important;
    text-transform: uppercase;
}

.thm04-button,
body.theme-thm04[data-theme-version="v2"] .btn-primary,
body.theme-thm04[data-theme-version="v2"] .btn-secondary {
    display: inline-flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border: 1px solid var(--thm04-forest-800) !important;
    border-radius: 2px !important;
    background: var(--thm04-forest-800) !important;
    box-shadow: none !important;
    color: #fffdf7 !important;
    font-family: var(--thm04-body) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.13em;
    line-height: 1.35;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.thm04-button:hover,
.thm04-button:focus-visible,
body.theme-thm04[data-theme-version="v2"] :where(.btn-primary, .btn-secondary):hover {
    border-color: var(--thm04-gold) !important;
    background: var(--thm04-gold) !important;
    color: var(--thm04-forest-950) !important;
    transform: translateY(-1px);
}

.thm04-button--gold {
    border-color: var(--thm04-gold-light) !important;
    background: var(--thm04-gold-light) !important;
    color: var(--thm04-forest-950) !important;
}

.thm04-button--outline {
    border-color: rgba(23, 55, 46, 0.42) !important;
    background: transparent !important;
    color: var(--thm04-forest-900) !important;
}

.thm04-text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--thm04-forest-800) !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--thm04-gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

/* Opening gate */
body.theme-thm04[data-theme-version="v2"] section#opening {
    min-height: 100dvh;
    padding: clamp(28px, 7dvh, 72px) 18px !important;
    background-position: center 44% !important;
    isolation: isolate;
}

body.theme-thm04[data-theme-version="v2"] section#opening::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 26, 21, 0.16), rgba(8, 26, 21, 0.54)),
        radial-gradient(circle at 50% 35%, transparent 0 24%, rgba(8, 26, 21, 0.3) 78%);
    content: "";
    pointer-events: none;
}

body.theme-thm04[data-theme-version="v2"] section#opening::before {
    z-index: 2;
    inset: clamp(12px, 2.3vw, 24px);
    border-color: rgba(219, 201, 143, 0.72);
}

body.theme-thm04[data-theme-version="v2"] section#opening .container {
    z-index: 1;
    display: grid;
    width: min(100%, 440px) !important;
    min-height: min(610px, calc(100dvh - 64px));
    align-content: center;
    justify-items: center;
    padding: clamp(34px, 7vw, 54px) clamp(22px, 6vw, 40px) !important;
    border: 1px solid rgba(219, 201, 143, 0.34);
    border-block-color: rgba(219, 201, 143, 0.62);
    background: rgba(16, 45, 36, 0.76);
    box-shadow: 0 24px 64px rgba(5, 17, 14, 0.24);
    color: #fffdf7 !important;
    backdrop-filter: blur(5px);
}

body.theme-thm04[data-theme-version="v2"] section#opening h1.font-type-secondary {
    max-width: 100%;
    margin: 0 0 13px !important;
    color: #fffdf7;
    font-family: var(--thm04-display) !important;
    font-size: clamp(40px, 11.5cqw, 62px);
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 0.98;
    overflow-wrap: anywhere;
    text-transform: none;
    text-wrap: normal;
}

body.theme-thm04[data-theme-version="v2"] section#opening .thm04-cover__name-group {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

body.theme-thm04[data-theme-version="v2"] section#opening h1.thm04-cover__title--long {
    font-size: clamp(30px, 9cqw, 38px);
    letter-spacing: 0.005em;
}

body.theme-thm04[data-theme-version="v2"] section#opening h1 .letter {
    display: inline;
}

body.theme-thm04[data-theme-version="v2"] section#opening img {
    width: min(250px, 78%) !important;
    margin: 6px 0 30px !important;
    filter: sepia(0.22) saturate(0.72) brightness(1.35);
}

body.theme-thm04[data-theme-version="v2"] section#opening .font-bold {
    margin-bottom: 9px !important;
    color: var(--thm04-gold-light);
    font-family: var(--thm04-body) !important;
    font-size: 12px;
    letter-spacing: 0.16em;
}

/* The guest's name is the largest line of the greeting. */
body.theme-thm04[data-theme-version="v2"] section#opening #guest {
    display: block;
    margin-top: 6px;
    color: #fffdf7;
    font-family: var(--thm04-display);
    font-size: 20px;
    letter-spacing: normal;
    line-height: 1.25;
    text-transform: none;
}

/* Wish cards use the shared utility sheet, whose root size is 9-10px. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .text-xs {
    font-size: 12px;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .text-sm {
    font-size: 15px;
    line-height: 1.6;
}

/* The small cover label sits on photography, so it must remain legible even
   when the configured focal area is brighter than the preview fixture. */
body.theme-thm04[data-theme-version="v2"] section#opening .thm04-eyebrow {
    color: #fffdf7;
    text-shadow: 0 1px 12px rgba(5, 17, 14, 0.72);
}

body.theme-thm04[data-theme-version="v2"] section#opening .mb-7 {
    max-width: 34em;
    margin-bottom: 28px !important;
    color: rgba(255, 253, 247, 0.88);
    font-size: 15px;
    line-height: 1.72;
}

body.theme-thm04[data-theme-version="v2"] section#opening .mb-7 i {
    display: block;
    margin-top: 12px;
    color: rgba(255, 253, 247, 0.68);
    font-family: var(--thm04-display);
    font-size: 14px;
}

body.theme-thm04[data-theme-version="v2"] section#opening .btn-secondary {
    min-width: min(210px, 100%);
    border-color: var(--thm04-gold-light) !important;
    background: var(--thm04-gold-light) !important;
    color: var(--thm04-forest-950) !important;
}

/* Compact, permanently mobile navigation inside both the viewport and panel. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--intro {
    display: contents !important;
}

body.theme-thm04[data-theme-version="v2"].legacy-theme-v2[data-theme-state="open"]
    [data-theme-section="intro"].theme-v2-section--intro {
    display: contents !important;
}

/* Keep anchor geometry stable; media remains lazy-loaded by the renderer. */
body.theme-thm04[data-theme-version="v2"].legacy-theme-v2[data-theme-state="open"]
    #thm04-invitation > [data-theme-section] {
    contain-intrinsic-size: none !important;
    content-visibility: visible !important;
}

.thm04-nav {
    position: sticky;
    z-index: 90;
    top: 0;
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right));
    border-bottom: 1px solid rgba(219, 201, 143, 0.26);
    background: rgba(16, 37, 31, 0.96);
    color: #fffdf7;
    box-shadow: 0 8px 28px rgba(7, 21, 17, 0.14);
    backdrop-filter: blur(12px);
}

.thm04-nav__monogram {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(219, 201, 143, 0.34);
    color: var(--thm04-gold-light) !important;
    font-family: var(--thm04-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
}

.thm04-nav__monogram span {
    margin-inline: 2px;
    font-size: 0.62em;
    font-style: italic;
}

.thm04-nav__links {
    display: flex;
    min-width: 0;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

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

.thm04-nav__links .nav-link {
    position: relative;
    display: inline-flex;
    min-width: max-content;
    min-height: 44px;
    align-items: center;
    padding: 9px 6px;
    color: rgba(255, 253, 247, 0.74);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-decoration: none;
    text-transform: uppercase;
}

.thm04-nav__links .nav-link::after {
    position: absolute;
    right: 11px;
    bottom: 6px;
    left: 11px;
    height: 1px;
    background: var(--thm04-gold);
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 160ms ease, transform 160ms ease;
}

.thm04-nav__links .nav-link:is(:hover, :focus-visible, .active) {
    color: #fffdf7;
}

.thm04-nav__links .nav-link:is(:hover, :focus-visible, .active)::after {
    opacity: 1;
    transform: scaleX(1);
}

@media (max-width: 1023px) {
    body.theme-thm04[data-theme-version="v2"][data-theme-state="open"] .thm04-nav {
        position: fixed;
        right: 0;
        left: 0;
    }

    body.theme-thm04[data-theme-version="v2"][data-theme-state="open"] .thm04-hero {
        margin-top: 65px;
    }
}

/* Native v2 hero */
body.theme-thm04[data-theme-version="v2"] .thm04-hero {
    position: relative;
    display: grid;
    min-height: calc(100dvh - 65px);
    place-items: center;
    padding: 54px 0 !important;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(9, 28, 22, 0.54), rgba(9, 28, 22, 0.78)),
        var(--thm04-hero-image) center 42% / cover no-repeat;
    color: #fffdf7;
    isolation: isolate;
}

.thm04-hero::before {
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(219, 201, 143, 0.46);
    content: "";
    pointer-events: none;
}

body.theme-thm04[data-theme-version="v2"] .thm04-hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    text-align: center;
}

body.theme-thm04[data-theme-version="v2"] .thm04-hero .thm04-eyebrow {
    color: var(--thm04-gold-light);
}

.thm04-hero h1 {
    max-width: 100%;
    margin: 10px auto 6px;
    color: #fffdf7 !important;
    font-size: clamp(44px, 13cqw, 70px);
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    line-height: 0.92 !important;
    overflow-wrap: anywhere;
}

.thm04-hero h1 span {
    color: var(--thm04-gold-light);
    font-size: 0.72em;
    font-style: italic;
    font-weight: 500;
}

.thm04-ornament {
    width: min(230px, 70%);
    margin: 18px auto 24px;
    filter: sepia(0.2) saturate(0.75) brightness(1.35);
}

.thm04-hero__date,
.thm04-hero__time {
    margin: 0;
    color: rgba(255, 253, 247, 0.88);
}

.thm04-hero__date {
    font-family: var(--thm04-display) !important;
    font-size: 20px !important;
    font-weight: 600;
}

.thm04-hero__time {
    margin-top: 2px;
    font-size: 13px !important;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.thm04-countdown {
    display: grid;
    width: min(100%, 380px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 32px auto 30px;
    border-block: 1px solid rgba(219, 201, 143, 0.36);
}

.thm04-event-complete {
    margin: 32px auto 30px !important;
    padding: 15px 12px;
    border-block: 1px solid rgba(219, 201, 143, 0.4);
    color: #fffdf7;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.thm04-countdown__item {
    display: grid;
    min-width: 0;
    gap: 1px;
    padding: 13px 3px 12px;
    border-right: 1px solid rgba(219, 201, 143, 0.24);
}

.thm04-countdown__item:last-child {
    border-right: 0;
}

.thm04-countdown strong {
    color: #fffdf7;
    font-family: var(--thm04-display);
    font-size: clamp(24px, 7cqw, 34px);
    font-weight: 600;
    line-height: 1;
}

.thm04-countdown span {
    color: rgba(255, 253, 247, 0.64);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

/* Shared section rhythm and editorial headings */
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--couple #thm04-couple,
    .theme-v2-section--dresscode #thm04-dresscode,
    .theme-v2-section--livestream #thm04-livestream,
    .theme-v2-section--story #thm04-story,
    .theme-v2-section--gallery #thm04-gallery,
    .theme-v2-section--video #thm04-video,
    .theme-v2-section--rsvp #thm04-rsvp,
    .theme-v2-section--wishes #thm04-wishes,
    .theme-v2-section--gift #thm04-gift,
    .theme-v2-section--gift-address #thm04-gift-address,
    .theme-v2-section--health #thm04-health,
    .theme-v2-section--closing #thm04-closing
) {
    padding: clamp(72px, 15cqw, 112px) 0 !important;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--couple,
    .theme-v2-section--story,
    .theme-v2-section--rsvp,
    .theme-v2-section--gift,
    .theme-v2-section--gift-address,
    .theme-v2-section--closing
) > section {
    background: var(--thm04-ivory);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--video > section {
    background:
        radial-gradient(circle at -8% 92%, rgba(219, 201, 143, 0.1) 0 140px, transparent 141px),
        var(--thm04-forest-950);
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--gallery,
    .theme-v2-section--wishes,
    .theme-v2-section--health
) > section {
    background: var(--thm04-sage-100);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section > section :where(
    .text-center.mb-12,
    .text-center.mb-16,
    .text-center.mb-12.mb-lg-16,
    .col-md-8.text-center.mb-16
) > img:first-child {
    width: min(190px, 58vw) !important;
    height: auto !important;
    margin-inline: auto;
    opacity: 0.78;
    filter: sepia(0.22) saturate(0.72);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section > section :where(
    .text-center.mb-12,
    .text-center.mb-16,
    .text-center.mb-12.mb-lg-16,
    .col-md-8.text-center.mb-16
) > h6 {
    margin: 13px 0 3px !important;
    color: var(--thm04-forest-700);
    font-family: var(--thm04-body) !important;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section > section :where(
    .text-center.mb-12,
    .text-center.mb-16,
    .text-center.mb-12.mb-lg-16,
    .col-md-8.text-center.mb-16
) > h5 {
    margin: 4px 0 0 !important;
    color: var(--thm04-forest-950);
    font-family: var(--thm04-display) !important;
    font-size: clamp(36px, 9cqw, 52px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.02;
}

/* Semantic v2 heading contract. Variants preserve the formal family while
   preventing the same foliage lock-up from repeating in every section. */
body.theme-thm04[data-theme-version="v2"] .thm04-section-heading {
    position: relative;
    width: min(100%, 620px);
    margin-right: auto;
    margin-left: auto;
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading--center {
    text-align: center;
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading > img:first-child {
    display: block;
    width: min(172px, 52vw) !important;
    height: auto !important;
    margin: 0 auto 15px;
    opacity: 0.76;
    filter: sepia(0.18) saturate(0.7);
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading > .thm04-eyebrow {
    margin-bottom: 7px;
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading > h2 {
    margin: 0;
    color: var(--thm04-forest-950);
    font-size: clamp(38px, 9cqw, 56px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.02;
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading > h2 + p {
    max-width: 47em;
    margin: 15px auto 0;
    color: var(--thm04-muted);
    font-size: 15px;
    line-height: 1.75;
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading--rule::before,
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--events,
    .theme-v2-section--story,
    .theme-v2-section--rsvp,
    .theme-v2-section--gift-address
) .thm04-section-heading::before {
    display: block;
    width: 68px;
    height: 1px;
    margin: 0 auto 22px;
    background: var(--thm04-gold);
    content: "";
}

body.theme-thm04[data-theme-version="v2"] .thm04-section-heading--minimal > img:first-child,
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--story,
    .theme-v2-section--rsvp,
    .theme-v2-section--livestream
) .thm04-section-heading > img:first-child {
    display: none;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .thm04-section-heading::before {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto 20px;
    border: 1px solid rgba(219, 201, 143, 0.62);
    border-radius: 50%;
    content: "";
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .thm04-section-heading > h2 {
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .thm04-section-heading .thm04-eyebrow {
    color: var(--thm04-gold-light);
}

/* Couple */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple #thm04-couple {
    overflow: hidden;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple #thm04-couple::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(240px, 56%);
    height: 1px;
    background: var(--thm04-gold);
    content: "";
    opacity: 0.7;
    transform: translateX(-50%);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-center.mb-12 {
    display: block;
    width: 100%;
    margin-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-center.mb-12 > div {
    float: none;
    width: min(100%, 620px);
    margin-inline: auto;
    padding-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-center.mb-12 p {
    color: var(--thm04-muted);
    font-family: var(--thm04-display) !important;
    font-size: clamp(18px, 4.3cqw, 23px) !important;
    line-height: 1.55;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-between {
    display: grid !important;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 68px;
    margin: 0;
}

/* Bootstrap 3 clearfix pseudo-elements become unintended grid items. */
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--couple .row.justify-content-between,
    .theme-v2-section--dresscode .row.justify-content-center:last-child,
    .theme-v2-section--health .row.justify-content-center:last-child,
    .theme-v2-section--story .col-lg-8 > .row,
    .theme-v2-section--gallery #row-lightgallery
)::before,
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--couple .row.justify-content-between,
    .theme-v2-section--dresscode .row.justify-content-center:last-child,
    .theme-v2-section--health .row.justify-content-center:last-child,
    .theme-v2-section--story .col-lg-8 > .row,
    .theme-v2-section--gallery #row-lightgallery
)::after {
    display: none !important;
    content: none !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-between > :where(div, article) {
    float: none;
    width: 100%;
    max-width: 380px;
    margin: 0 auto !important;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-between > article {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .obj-fit.rounded-circle {
    position: relative;
    width: min(74cqw, 280px) !important;
    height: min(90cqw, 340px) !important;
    margin-inline: auto !important;
    overflow: hidden;
    border: 1px solid rgba(184, 154, 91, 0.58);
    border-radius: 999px 999px 18px 18px !important;
    background: var(--thm04-sage-200);
    box-shadow: 0 20px 48px rgba(16, 37, 31, 0.13);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .obj-fit.rounded-circle::after {
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 253, 248, 0.54);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .obj-fit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--thm04-photo-filter);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .thm04-spouse-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        radial-gradient(circle at 50% 36%, rgba(184, 154, 91, 0.18), transparent 34%),
        var(--thm04-forest-900);
    color: var(--thm04-gold-light);
    font-family: var(--thm04-display);
    font-size: clamp(58px, 17cqw, 88px);
    font-weight: 600;
    letter-spacing: 0.06em;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple :where(h2, .row.justify-content-between h3) {
    max-width: 13em;
    margin: 24px auto 0 !important;
    color: var(--thm04-forest-950);
    font-size: clamp(34px, 8.2cqw, 46px);
    line-height: 0.98;
    overflow-wrap: anywhere;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-between :where(h6, .thm04-spouse-family) {
    max-width: 30em;
    margin: 14px auto 0 !important;
    color: var(--thm04-muted);
    font-family: var(--thm04-body) !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.65;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .btn-primary {
    margin-top: 18px !important;
}

/* Couple variants ---------------------------------------------------------
   Paired is the balanced formal default. Stacked reads like two editorial
   profiles, while portrait turns each profile into a photo-led keepsake. */
body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--paired .thm04-couple__list {
    align-items: start;
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--paired .thm04-couple__list > article {
    position: relative;
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--paired .thm04-couple__list > article + article::before {
    display: block;
    width: 42px;
    height: 1px;
    margin: -34px auto 34px;
    background: var(--thm04-gold);
    content: "";
    opacity: 0.58;
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article {
    width: min(100%, 680px);
    max-width: 680px;
    padding: 34px 0;
    border-top: 1px solid var(--thm04-line);
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article:last-child {
    border-bottom: 1px solid var(--thm04-line);
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--portrait .thm04-couple__list {
    gap: 28px;
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--portrait .thm04-couple__list > article {
    width: min(100%, 350px);
    max-width: 350px;
    padding: clamp(18px, 5cqw, 28px);
    border: 1px solid rgba(26, 41, 36, 0.12);
    background: var(--thm04-paper);
    box-shadow: 0 18px 44px rgba(16, 37, 31, 0.08);
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--portrait .obj-fit.rounded-circle {
    width: 100% !important;
    max-width: 270px;
    height: auto !important;
    aspect-ratio: 4 / 5;
    border-radius: 2px !important;
    box-shadow: none;
}

body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--portrait .obj-fit.rounded-circle::after {
    inset: 8px;
    border-radius: 0;
}

/* Native event list */
body.theme-thm04[data-theme-version="v2"] .thm04-events {
    padding: clamp(78px, 15cqw, 116px) 0 !important;
    background: var(--thm04-sage-200);
}

.thm04-section-heading {
    position: relative;
    max-width: 600px;
    margin-bottom: 44px;
}

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

.thm04-section-heading__index {
    display: inline-grid;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    place-items: center;
    border: 1px solid rgba(184, 154, 91, 0.62);
    border-radius: 50%;
    color: var(--thm04-forest-700);
    font-family: var(--thm04-display);
    font-size: 14px;
    font-weight: 600;
}

.thm04-section-heading h2 {
    margin: 7px 0 14px;
    color: var(--thm04-forest-950);
    font-size: clamp(42px, 10cqw, 62px);
    font-weight: 600 !important;
}

.thm04-section-heading > p:last-child {
    max-width: 47em;
    margin: 0 auto;
    color: var(--thm04-muted);
    font-size: 15px;
}

.thm04-event-list {
    display: grid;
    gap: 16px;
}

.thm04-event-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(26, 41, 36, 0.12);
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 16px 42px rgba(16, 37, 31, 0.06);
}

.thm04-event-card__date {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 28px 8px;
    border-right: 1px solid rgba(219, 201, 143, 0.36);
    background: var(--thm04-forest-900);
    color: #fffdf7;
    text-align: center;
}

.thm04-event-card__date strong {
    font-family: var(--thm04-display);
    font-size: clamp(34px, 8cqw, 46px);
    font-weight: 600;
    line-height: 0.94;
}

.thm04-event-card__date span {
    color: var(--thm04-gold-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.thm04-event-card__date-text {
    font-size: 18px !important;
    overflow-wrap: anywhere;
}

.thm04-event-card__copy {
    min-width: 0;
    padding: clamp(24px, 6cqw, 38px);
    text-align: center;
}

.thm04-event-card__copy h3 {
    margin: 5px 0 14px;
    color: var(--thm04-forest-950);
    font-size: clamp(32px, 7.6cqw, 44px);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.thm04-event-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--thm04-forest-700);
    font-size: 14px !important;
    font-weight: 700;
}

.thm04-event-card address {
    display: grid;
    gap: 3px;
    margin: 0;
    color: var(--thm04-muted);
    font-style: normal;
    line-height: 1.6;
    text-align: center;
}

.thm04-event-card address strong {
    color: var(--thm04-ink);
    font-size: 12px;
}

.thm04-event-card address span {
    font-size: 14px;
}

.thm04-event-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    margin-top: 20px;
}

/* Event variants --------------------------------------------------------- */
body.theme-thm04[data-theme-version="v2"] .thm04-events--cards .thm04-event-list {
    gap: 18px;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list {
    background: var(--thm04-ivory);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list .thm04-event-list {
    gap: 0;
    border-top: 1px solid var(--thm04-line);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list .thm04-event-card {
    grid-template-columns: clamp(72px, 23cqw, 96px) minmax(0, 1fr);
    border: 0;
    border-bottom: 1px solid var(--thm04-line);
    background: transparent;
    box-shadow: none;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list .thm04-event-card__date {
    justify-content: center;
    padding: 24px 8px;
    border-right-color: var(--thm04-gold);
    background: transparent;
    color: var(--thm04-forest-950);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list .thm04-event-card__date span {
    color: var(--thm04-forest-700);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list .thm04-event-card__copy {
    padding: clamp(24px, 6cqw, 36px);
    text-align: left;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list :where(
    .thm04-event-card__meta,
    .thm04-event-card__actions
) {
    justify-content: flex-start;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--list .thm04-event-card address {
    text-align: left;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial {
    background:
        linear-gradient(180deg, rgba(184, 154, 91, 0.08), transparent 30%),
        var(--thm04-sage-200);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-list {
    gap: 28px;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card {
    display: block;
    overflow: visible;
    border: 0;
    border-top: 2px solid var(--thm04-gold);
    background: var(--thm04-paper);
    box-shadow: 0 22px 52px rgba(16, 37, 31, 0.08);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card__date {
    min-height: 76px;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: 7px;
    padding: 18px clamp(22px, 6cqw, 36px) 0;
    border: 0;
    background: transparent;
    color: var(--thm04-forest-950);
    text-align: left;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card__date strong {
    font-size: clamp(44px, 11cqw, 62px);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card__date span {
    color: var(--thm04-forest-700);
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card__copy {
    padding-top: 12px;
    text-align: left;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card__copy h3 {
    max-width: 12em;
    font-size: clamp(38px, 9cqw, 54px);
    line-height: 0.98;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial :where(
    .thm04-event-card__meta,
    .thm04-event-card__actions
) {
    justify-content: flex-start;
}

body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card address {
    text-align: left;
}

/* Dress code and health guidance */
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .row.justify-content-center.mb-12 {
    display: block !important;
    width: 100%;
    margin-inline: 0 !important;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .row.justify-content-center.mb-12 > .col-lg-8 {
    float: none;
    width: min(100%, 620px);
    margin-inline: auto;
    padding-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .row.justify-content-center.mb-12 p {
    max-width: 42rem;
    margin-inline: auto;
    text-align: center !important;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .row.justify-content-center:last-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .row.justify-content-center:last-child > div {
    float: none;
    width: auto;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .feature-center {
    display: grid;
    min-height: 100%;
    float: none !important;
    gap: 14px;
    place-items: center;
    margin: 0 !important;
    padding: 22px 14px !important;
    border: 1px solid rgba(26, 41, 36, 0.1);
    background: rgba(255, 253, 248, 0.74);
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .feature-center .icon {
    display: grid !important;
    width: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    place-items: center;
    border: 1px solid rgba(184, 154, 91, 0.54);
    border-radius: 50%;
    background: transparent !important;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .feature-center .icon i {
    display: block !important;
    height: auto !important;
    color: var(--thm04-forest-700) !important;
    font-size: 22px !important;
    line-height: 1 !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--dresscode .thm04-dress-swatch {
    display: block;
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border: 5px solid var(--thm04-paper);
    border-radius: 50%;
    background: var(--thm04-swatch);
    box-shadow: 0 0 0 1px rgba(26, 41, 36, 0.28);
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--dresscode,
    .theme-v2-section--health
) .counter-label {
    color: var(--thm04-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    text-align: center;
}

/* Livestream */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream #thm04-livestream {
    background: var(--thm04-forest-900);
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .text-center.mb-16 h5 {
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] :is(
    #thm04-livestream,
    #thm04-rsvp,
    #thm04-wishes
) > .container > .row {
    margin-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .card {
    overflow: hidden;
    border: 1px solid rgba(219, 201, 143, 0.32);
    border-radius: 2px;
    background: var(--thm04-paper) !important;
    color: var(--thm04-ink);
    box-shadow: none;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .card-body {
    padding: clamp(28px, 7cqw, 46px) !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .text-dark {
    color: var(--thm04-muted) !important;
    line-height: 1.75;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .card img {
    width: min(170px, 58%) !important;
    height: 64px !important;
    margin: 28px auto 0;
    object-fit: contain;
}

/* Sacred quote */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote #thm04-quote {
    display: grid;
    min-height: min(72dvh, 680px);
    place-items: center;
    padding: clamp(78px, 17cqw, 126px) 0 !important;
    overflow: hidden;
    background: var(--thm04-forest-950) !important;
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote #thm04-quote::before {
    position: absolute;
    top: 34px;
    left: 50%;
    color: rgba(219, 201, 143, 0.22);
    content: "“";
    font-family: var(--thm04-display);
    font-size: 150px;
    line-height: 1;
    transform: translateX(-50%);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote .row {
    display: block;
    margin: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote .row > div {
    float: none;
    width: min(100%, 650px);
    margin-inline: auto;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote p {
    position: relative;
    margin: 0 0 26px !important;
    color: #fffdf7;
    font-family: var(--thm04-display) !important;
    font-size: clamp(24px, 5.7cqw, 34px) !important;
    font-weight: 500;
    line-height: 1.42;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote p + div {
    color: var(--thm04-gold-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* Story as a restrained editorial timeline */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story #thm04-story {
    background: var(--thm04-paper);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .row.justify-content-center {
    display: block;
    margin: 0;
    overflow: visible !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .row.justify-content-center > .col-lg-8 {
    float: none;
    width: 100%;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row {
    position: relative;
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center !important;
    margin: 0 0 18px !important;
    padding: 22px;
    overflow: hidden !important;
    border: 1px solid rgba(26, 41, 36, 0.1);
    background: var(--thm04-ivory);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--thm04-gold);
    content: "";
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row > .col-auto {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row > .col {
    display: block !important;
    grid-column: 2;
    grid-row: 1;
    width: auto;
    padding: 0;
    text-align: left !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row > .col-12 {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    margin: 0 !important;
    padding: 16px 0 0;
    border-top: 1px solid var(--thm04-line);
    color: var(--thm04-muted) !important;
    font-size: 15px;
    line-height: 1.75;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .obj-fit.rounded-circle {
    width: 92px !important;
    height: 116px !important;
    overflow: hidden;
    border-radius: 999px 999px 8px 8px !important;
    background: var(--thm04-sage-200);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .obj-fit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--thm04-photo-filter);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col img.w-2rem {
    display: none;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story h3.font-bold {
    margin: 0 0 8px !important;
    color: var(--thm04-forest-950);
    font-family: var(--thm04-display) !important;
    font-size: clamp(25px, 6.2cqw, 34px) !important;
    font-weight: 600;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .divider {
    width: 42px !important;
    height: 1px;
    background: var(--thm04-gold) !important;
}

/* Story variants ---------------------------------------------------------
   Alternating is an open editorial sequence, stacked prioritises imagery,
   and timeline keeps chronology explicit with one continuous guide. */
body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row {
    padding: 26px 0;
    overflow: visible !important;
    border: 0;
    border-top: 1px solid var(--thm04-line);
    background: transparent;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:last-child {
    border-bottom: 1px solid var(--thm04-line);
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row::before {
    top: -1px;
    bottom: auto;
    width: 48px;
    height: 1px;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--stacked .col-lg-8 > .row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
    padding: clamp(18px, 5cqw, 28px);
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--stacked .col-lg-8 > .row > .col-auto {
    grid-column: 1;
    grid-row: 1;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--stacked .col-lg-8 > .row > .col {
    grid-column: 1;
    grid-row: 2;
    padding-top: 22px;
    text-align: center !important;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--stacked .col-lg-8 > .row > .col-12 {
    grid-column: 1;
    grid-row: 3;
    text-align: center;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--stacked .obj-fit.rounded-circle {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    border-radius: 2px !important;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--stacked .divider {
    margin-inline: auto;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .row.justify-content-center > .col-lg-8 {
    position: relative;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .row.justify-content-center > .col-lg-8::before {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 38px;
    width: 1px;
    background: var(--thm04-gold);
    content: "";
    opacity: 0.62;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .col-lg-8 > .row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 20px;
    padding: 0 0 34px;
    overflow: visible !important;
    border: 0;
    background: transparent;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .col-lg-8 > .row::before {
    display: none;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .col-lg-8 > .row > .col-12 {
    grid-column: 2;
    padding-top: 13px;
}

body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .obj-fit.rounded-circle {
    position: relative;
    z-index: 1;
    width: 76px !important;
    height: 76px !important;
    border: 5px solid var(--thm04-paper);
    border-radius: 50% !important;
}

/* Gallery contact sheet */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #thm04-gallery {
    background: var(--thm04-sage-200);
}

/* Rows come from the shared gallery layout in theme-system.css, so every
   layout choice fills its rows; the couple's column choice caps a row. */
body.theme-thm04[data-theme-version="v2"] .thm04-gallery {
    --theme-gallery-gap: 10px;
    --theme-gallery-ar: 1;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery__grid {
    margin-top: 30px;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--thm04-photo-filter);
    transition: filter 240ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery__item:is(:hover, :focus-visible) img {
    filter: saturate(0.94) contrast(1.055) brightness(1.015);
    transform: scale(1.025);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 30px 0 0 !important;
    overflow: visible !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery > .col-4 {
    float: none;
    width: auto;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery > .col-4:first-child {
    grid-column: 1 / -1;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery .obj-fit {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 253, 248, 0.6);
    border-radius: 0;
    background: var(--thm04-ivory);
    cursor: zoom-in;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery > .col-4:first-child .obj-fit {
    aspect-ratio: 16 / 10;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--thm04-photo-filter);
    transition: filter 240ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery #row-lightgallery .obj-fit:hover img {
    filter: saturate(0.94) contrast(1.055) brightness(1.015);
    transform: scale(1.025);
}

body.theme-thm04[data-theme-version="v2"] [data-thm04-gallery-open] {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 253, 248, 0.62);
    border-radius: 0;
    background: var(--thm04-ivory);
    color: inherit;
    cursor: zoom-in;
}

body.theme-thm04[data-theme-version="v2"] [data-thm04-gallery-open]::after {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(219, 201, 143, 0.7);
    border-radius: 50%;
    background: rgba(16, 37, 31, 0.78);
    color: #fffdf7;
    content: "+";
    font-family: var(--thm04-body);
    font-size: 18px;
    font-weight: 400;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 180ms ease, transform 180ms ease;
}

body.theme-thm04[data-theme-version="v2"] [data-thm04-gallery-open]:is(:hover, :focus-visible)::after {
    opacity: 1;
    transform: none;
}

body.theme-thm04[data-theme-version="v2"].thm04-gallery-is-open {
    overflow: hidden;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog {
    width: min(calc(100% - 28px), 1080px);
    max-width: 1080px;
    max-height: calc(100dvh - 28px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(219, 201, 143, 0.54);
    border-radius: 2px;
    background: var(--thm04-forest-950);
    box-shadow: 0 32px 90px rgba(3, 12, 9, 0.54);
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog::backdrop {
    background: rgba(4, 15, 12, 0.82);
    backdrop-filter: blur(5px);
}

.thm04-gallery-dialog__bar,
.thm04-gallery-dialog__controls {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-color: rgba(219, 201, 143, 0.24);
    background: rgba(11, 29, 24, 0.96);
}

.thm04-gallery-dialog__bar {
    border-bottom-style: solid;
    border-bottom-width: 1px;
}

.thm04-gallery-dialog__bar p {
    margin: 0;
    color: var(--thm04-gold-light);
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.thm04-gallery-dialog__bar button,
.thm04-gallery-dialog__controls button {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(219, 201, 143, 0.38);
    border-radius: 0;
    background: transparent;
    color: #fffdf7;
    font-family: var(--thm04-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.thm04-gallery-dialog__bar button:is(:hover, :focus-visible),
.thm04-gallery-dialog__controls button:is(:hover, :focus-visible) {
    border-color: var(--thm04-gold-light);
    background: var(--thm04-gold-light);
    color: var(--thm04-forest-950);
}

.thm04-gallery-dialog__bar button {
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog figure {
    display: grid;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
    margin: 0;
    overflow: auto;
    background: #07130f;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog figure img {
    min-height: 0;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(72dvh, 820px, 100%);
    object-fit: contain;
    filter: var(--thm04-photo-filter);
}

body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog figcaption {
    width: 100%;
    padding: 10px 18px 12px;
    color: rgba(255, 253, 247, 0.72);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.thm04-gallery-dialog__controls {
    border-top-style: solid;
    border-top-width: 1px;
}

.thm04-gallery-dialog__controls [data-thm04-gallery-counter] {
    min-width: 64px;
    color: var(--thm04-gold-light);
    font-family: var(--thm04-display);
    font-size: 16px;
    text-align: center;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gallery iframe {
    width: 100%;
    min-height: 240px;
    border: 0;
}

/* Forms */
body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--rsvp #thm04-rsvp,
    .theme-v2-section--wishes #thm04-wishes
) {
    background: var(--thm04-ivory);
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--rsvp #rsvp-form,
    .theme-v2-section--wishes #wishes-form
) {
    width: min(100%, 620px);
    margin-inline: auto;
    padding: clamp(26px, 7cqw, 44px);
    border: 1px solid rgba(26, 41, 36, 0.12);
    background: var(--thm04-paper);
    box-shadow: 0 20px 52px rgba(16, 37, 31, 0.08);
}

body.theme-thm04[data-theme-version="v2"] :where(
    #rsvp-form,
    #wishes-form
) label {
    display: block;
    margin-bottom: 8px;
    color: var(--thm04-forest-900);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

body.theme-thm04[data-theme-version="v2"] :where(
    #rsvp-form,
    #wishes-form
) :where(.form-control, .form-select) {
    width: 100%;
    min-height: 48px;
    padding: 12px 13px;
    border: 1px solid #7a847f;
    border-radius: 0;
    background: #fff;
    color: var(--thm04-ink);
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

body.theme-thm04[data-theme-version="v2"] :where(
    #rsvp-form,
    #wishes-form
) :where(.form-control, .form-select)::placeholder {
    color: #6b746f;
    opacity: 1;
}

body.theme-thm04[data-theme-version="v2"] :where(
    #rsvp-form,
    #wishes-form
) textarea.form-control {
    min-height: 132px;
    resize: vertical;
}

body.theme-thm04[data-theme-version="v2"] :where(
    #rsvp-form,
    #wishes-form
) :where(.form-control, .form-select):focus {
    border-color: var(--thm04-forest-700);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(49, 93, 80, 0.13);
}

body.theme-thm04[data-theme-version="v2"] :where(
    #rsvp-form,
    #wishes-form
) .is-invalid {
    border-color: #7a847f;
    background-image: none;
}

body.theme-thm04[data-theme-version="v2"] #input-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.42fr);
    gap: 8px;
}

body.theme-thm04[data-theme-version="v2"] #input-total label {
    grid-column: 1 / -1;
}

body.theme-thm04[data-theme-version="v2"] #input-total #total.d-none {
    display: none !important;
}

body.theme-thm04[data-theme-version="v2"] #rsvp-form > .row.justify-content-center,
body.theme-thm04[data-theme-version="v2"] #wishes-form > .row.justify-content-center {
    display: flex;
    margin: 4px 0 0;
}

body.theme-thm04[data-theme-version="v2"] #rsvp-form > .row.justify-content-center > .col-auto,
body.theme-thm04[data-theme-version="v2"] #wishes-form > .row.justify-content-center > .col-auto {
    width: 100%;
    padding: 0;
}

body.theme-thm04[data-theme-version="v2"] #rsvp-form button,
body.theme-thm04[data-theme-version="v2"] #wishes-form button {
    width: 100%;
}

/* Featured wishes and live guestbook */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .thm04-wishes__featured {
    margin: 58px 0;
    padding: clamp(28px, 7cqw, 48px);
    background: var(--thm04-forest-900);
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .thm04-wishes__featured > .row {
    margin-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .thm04-wishes__featured > .row > .col-md-12 {
    padding-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .thm04-wishes__featured :where(h2, h3, h4, h5, h6) {
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .thm04-wishes__featured .thm04-eyebrow {
    color: var(--thm04-gold-light);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .wrap-testimony {
    width: min(100%, 640px);
    margin-inline: auto;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .testimony-slide {
    padding: clamp(24px, 6cqw, 42px);
    border: 1px solid rgba(219, 201, 143, 0.32);
    background: rgba(255, 253, 248, 0.07);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .testimony-slide figure {
    width: 74px !important;
    height: 74px !important;
    margin: 0 auto 14px !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .testimony-slide figure img {
    width: 100% !important;
    height: 100% !important;
    border: 2px solid var(--thm04-gold-light);
    border-radius: 50%;
    object-fit: cover;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .testimony-slide > span {
    color: var(--thm04-gold-light);
    font-size: 12px !important;
    letter-spacing: 0.16em;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .testimony-slide blockquote {
    width: 100% !important;
    margin: 22px auto 0 !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .testimony-slide blockquote p {
    color: #fffdf7 !important;
    font-family: var(--thm04-display) !important;
    font-size: clamp(22px, 5.5cqw, 31px) !important;
    font-style: normal !important;
    line-height: 1.45 !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .owl-dot span {
    background: rgba(255, 253, 248, 0.45) !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .owl-dot.active span {
    width: 26px;
    background: var(--thm04-gold-light) !important;
}

body.theme-thm04[data-theme-version="v2"] #list-wishes {
    width: min(100%, 620px);
    margin: 34px auto 0;
}

body.theme-thm04[data-theme-version="v2"] #section-11-list-message {
    max-height: 440px !important;
    padding: 0 !important;
    overflow-y: auto;
    list-style: none;
    /* Ruled above and below, so a message cut at the bottom reads as a scrolling pane rather than
       as text that stops mid-sentence. */
    border-top: 1px solid var(--thm04-line);
    border-bottom: 1px solid var(--thm04-line);
}

body.theme-thm04[data-theme-version="v2"] #section-11-list-message .list-item {
    padding: 18px 0 !important;
    border-bottom: 1px solid var(--thm04-line);
}

/* The wish items keep their legacy utility classes; their grays fail on ivory. */
body.theme-thm04[data-theme-version="v2"] #section-11-list-message .list-item .text-dark {
    color: var(--thm04-ink) !important;
}

body.theme-thm04[data-theme-version="v2"] #section-11-list-message .list-item .text-dark-500,
body.theme-thm04[data-theme-version="v2"] #section-11-list-message .list-item .text-gray {
    color: var(--thm04-muted) !important;
}

/* Gift card */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift #thm04-gift {
    overflow: hidden;
    background:
        radial-gradient(circle at 102% 14%, rgba(184, 154, 91, 0.13) 0 120px, transparent 121px),
        var(--thm04-ivory);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .row {
    margin-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .row > [class*="col-"] {
    float: none;
    width: min(100%, 620px);
    margin-inline: auto;
    padding-inline: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .card {
    max-width: 480px !important;
    overflow: hidden;
    border: 1px solid rgba(26, 41, 36, 0.13);
    border-radius: 0;
    background: var(--thm04-paper);
    box-shadow: 0 22px 52px rgba(16, 37, 31, 0.09);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .card-body {
    padding: 0 !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .gift-events {
    min-height: 0;
    padding: clamp(24px, 6cqw, 38px);
    background-position: right -22px bottom -18px !important;
    background-size: 116px !important;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .gift-events > div {
    padding: 0 !important;
}

/* The bank logo sits at the end of the label line instead of alone on a line of its own. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .thm04-gift__selector-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* The card keeps the middle of its column, as Kirim Kado's card does (it sat left on a tablet). */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .card {
    margin-inline: auto;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift #img-gift {
    flex: none;
    max-width: 112px;
    max-height: 30px !important;
    object-fit: contain;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift #optionRek {
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid rgba(26, 41, 36, 0.28);
    border-radius: 0;
    background: #fff;
    color: var(--thm04-ink);
    font-size: 13px;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift #desc-rek {
    margin-bottom: 0;
    color: var(--thm04-muted);
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift .thm04-gift__alias {
    display: block;
    margin-top: 8px;
}

/* The number is the largest line of the card; the button says what it does. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift #data-copy {
    display: block;
    color: var(--thm04-forest-950);
    font: 600 22px/1.2 var(--thm04-body);
    letter-spacing: 0.02em;
}

body.theme-thm04[data-theme-version="v2"] :is(.theme-v2-section--gift, .theme-v2-section--gift-address) :where(.thm04-copy-button, [data-thm04-gift-copy]) {
    display: inline-flex;
    min-height: 44px;
    margin-top: 10px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--thm04-forest-800) !important;
    border-radius: 999px !important;
    background: var(--thm04-forest-800);
    color: #fffdf7;
    font: 600 14px/1 var(--thm04-body);
    cursor: pointer;
}

/* Closing and colophon */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing #thm04-closing {
    min-height: min(72dvh, 700px);
    padding-bottom: 0 !important;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 24%, rgba(184, 154, 91, 0.12), transparent 32%),
        var(--thm04-forest-950);
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing #thm04-closing::before,
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing #thm04-closing::after {
    position: absolute;
    top: 24px;
    bottom: 24px;
    width: 1px;
    background: rgba(219, 201, 143, 0.28);
    content: "";
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing #thm04-closing::before {
    left: 18px;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing #thm04-closing::after {
    right: 18px;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing #thm04-closing > .container {
    display: grid;
    min-height: min(48dvh, 460px);
    margin-bottom: 0 !important;
    place-items: center;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing h4 {
    max-width: 15em;
    margin: 0 auto 14px !important;
    color: rgba(255, 253, 247, 0.76);
    font-family: var(--thm04-body) !important;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.6;
    text-transform: uppercase;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing h2 {
    max-width: 100%;
    margin: 0 auto 28px !important;
    color: #fffdf7;
    font-size: clamp(42px, 11cqw, 66px);
    font-weight: 600;
    line-height: 0.98;
    overflow-wrap: anywhere;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing .thm04-eyebrow {
    color: var(--thm04-gold-light);
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing img {
    display: block;
    width: min(250px, 72vw) !important;
    height: clamp(128px, 38cqw, 150px);
    margin-inline: auto;
    object-fit: contain;
    filter: invert(84%) sepia(26%) saturate(488%) hue-rotate(359deg) brightness(96%) contrast(86%);
    opacity: 0.82;
}

body.theme-thm04[data-theme-version="v2"] footer#footer {
    padding: 24px 0 max(82px, calc(24px + env(safe-area-inset-bottom))) !important;
    border-top: 1px solid rgba(219, 201, 143, 0.26);
    background: #0b1d18 !important;
    color: rgba(255, 253, 247, 0.66) !important;
}

.thm04-colophon {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 18px;
    /* The credit ends where the dock sits at the page end (a tablet put "Invie.id" under it). */
    padding-inline-end: 56px;
    font-size: 12px;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

.thm04-colophon > span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.thm04-colophon a {
    color: var(--thm04-gold-light) !important;
    font-weight: 700;
    text-decoration: none !important;
}

body.theme-thm04[data-theme-version="v2"] :where(
    .theme-v2-section--rsvp,
    .theme-v2-section--wishes,
    .theme-v2-section--livestream
) .row.justify-content-center > :where(.col-lg-8, .col-md-8) {
    float: none;
    width: 100%;
    margin-inline: auto;
    padding-inline: 0;
}

/* Natural document scrolling with a sticky companion, matching thm02 UX. */
@media (min-width: 1024px) {
    body.theme-thm04[data-theme-version="v2"].desktop-invitation-preview,
    body.theme-thm04[data-theme-version="v2"].desktop-invitation-presentation {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        overflow-x: clip;
        background: var(--thm04-forest-950);
    }

    body.theme-thm04[data-theme-version="v2"]:not([data-theme-state="open"]).desktop-invitation-preview,
    body.theme-thm04[data-theme-version="v2"]:not([data-theme-state="open"]).desktop-invitation-presentation {
        height: 100dvh;
        overflow: hidden;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell--enabled {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 100dvh;
        grid-template-rows: auto;
        align-items: start;
        overflow: visible;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell--enabled > .desktop-invitation-shell__visual {
        position: sticky;
        top: 0;
        height: 100dvh;
        min-height: 100dvh;
        align-self: start;
        background: var(--thm04-forest-950);
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell--enabled > .desktop-invitation-shell__invitation {
        position: relative;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        background: var(--thm04-ivory);
        container-name: thm04-page;
        container-type: inline-size;
    }

    body.theme-thm04[data-theme-version="v2"] .theme-v2-section--cover section#opening {
        position: absolute;
        right: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__photo {
        inset: clamp(28px, 4.5vw, 62px) clamp(28px, 4.6vw, 68px) clamp(186px, 23vh, 238px);
        border: 1px solid rgba(219, 201, 143, 0.42);
        background-position: var(--desktop-invitation-photo-position, center 44%);
        filter: grayscale(0.34) sepia(0.25) saturate(0.68) contrast(1.04) brightness(0.88);
        box-shadow: 0 24px 68px rgba(5, 17, 14, 0.28);
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__visual::before {
        z-index: 1;
        background:
            linear-gradient(180deg, rgba(16, 37, 31, 0.02), rgba(16, 37, 31, 0.18)),
            repeating-linear-gradient(90deg, rgba(219, 201, 143, 0.025) 0 1px, transparent 1px 18px);
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__visual::after {
        z-index: 1;
        inset: clamp(40px, 6vh, 72px) clamp(40px, 6vw, 88px);
        height: auto;
        border: 1px solid rgba(219, 201, 143, 0.19);
        background: transparent;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__copy {
        top: auto;
        right: clamp(28px, 4.6vw, 68px);
        bottom: clamp(34px, 5vh, 56px);
        left: clamp(28px, 4.6vw, 68px);
        width: auto;
        padding: 20px 22px;
        border-top: 1px solid rgba(219, 201, 143, 0.56);
        border-bottom: 1px solid rgba(219, 201, 143, 0.26);
        background: rgba(16, 37, 31, 0.78);
        color: #fffdf7;
        text-align: left;
        text-shadow: none;
        translate: 0 0;
        backdrop-filter: blur(12px);
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__eyebrow {
        margin-bottom: 7px;
        color: var(--thm04-gold-light);
        font-family: var(--thm04-body);
        font-size: 12px;
        letter-spacing: 0.17em;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__names {
        color: #fffdf7;
        font-family: var(--thm04-display);
        font-size: clamp(38px, 3.7vw, 62px);
        font-weight: 600;
        letter-spacing: -0.018em;
        line-height: 0.98;
        overflow-wrap: anywhere;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__date {
        margin-top: 10px;
        color: rgba(255, 253, 247, 0.7);
        font-family: var(--thm04-body);
        font-size: 12px;
        letter-spacing: 0.08em;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell__monogram {
        color: rgba(219, 201, 143, 0.16);
        font-family: var(--thm04-display);
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell--enabled:not(.desktop-invitation-shell--without-photo) .desktop-invitation-shell__monogram {
        opacity: 0;
    }

    body.theme-thm04[data-theme-version="v2"] .desktop-invitation-shell--without-photo .desktop-invitation-shell__copy {
        top: 50%;
        bottom: auto;
        text-align: center;
        translate: 0 -50%;
    }
}

@container thm04-page (min-width: 430px) {
    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article {
        display: grid !important;
        grid-template-columns: 160px minmax(0, 1fr);
        grid-template-rows: repeat(3, auto);
        column-gap: clamp(24px, 6cqw, 42px);
        align-items: center;
        text-align: left;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article > .obj-fit {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 160px !important;
        height: 210px !important;
        margin: 0 !important;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article > :where(h3, .thm04-spouse-family, .btn-primary) {
        grid-column: 2;
        margin-right: 0 !important;
        margin-left: 0 !important;
        justify-self: start;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article:nth-child(even) {
        grid-template-columns: minmax(0, 1fr) 160px;
        text-align: right;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article:nth-child(even) > .obj-fit {
        grid-column: 2;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--stacked .thm04-couple__list > article:nth-child(even) > :where(h3, .thm04-spouse-family, .btn-primary) {
        grid-column: 1;
        justify-self: end;
    }

    .thm04-event-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row {
        grid-template-columns: 112px minmax(0, 1fr);
        padding: 26px;
    }

    body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .obj-fit.rounded-circle {
        width: 112px !important;
        height: 140px !important;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) > .col-auto {
        grid-column: 2;
        justify-self: end;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) {
        grid-template-columns: minmax(0, 1fr) 112px;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) > .col {
        grid-column: 1;
        text-align: right !important;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) > .col .divider {
        margin-left: auto;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even)::before {
        right: 0;
        left: auto;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .row.justify-content-center > .col-lg-8::before {
        left: 44px;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .col-lg-8 > .row {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--timeline .obj-fit.rounded-circle {
        width: 88px !important;
        height: 88px !important;
    }
}

@container thm04-page (min-width: 620px) {
    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--paired .thm04-couple__list,
    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--portrait .thm04-couple__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(28px, 6cqw, 54px);
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--paired .thm04-couple__list > article + article::before {
        position: absolute;
        top: 12%;
        bottom: 12%;
        left: calc(clamp(28px, 6cqw, 54px) / -2);
        width: 1px;
        height: auto;
        margin: 0;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-couple.thm04-couple--portrait .thm04-couple__list > article {
        width: 100%;
    }

    body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    body.theme-thm04[data-theme-version="v2"] .thm04-events--editorial .thm04-event-card:first-child:nth-last-child(odd) {
        grid-column: 1 / -1;
    }
}

@container thm04-page (max-width: 520px) {
    .thm04-colophon {
        flex-direction: column;
        align-items: flex-start;
        padding-inline-end: 60px;
    }
}

@media (min-width: 720px) and (max-width: 1023px) {
    body.theme-thm04[data-theme-version="v2"] .theme-v2-section--couple .row.justify-content-between {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px;
    }

    body.theme-thm04[data-theme-version="v2"] :where(
        .theme-v2-section--dresscode,
        .theme-v2-section--health
    ) .row.justify-content-center:last-child {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) > .col-auto {
        grid-column: 2;
        justify-self: end;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) {
        grid-template-columns: minmax(0, 1fr) 92px;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) > .col {
        grid-column: 1;
        text-align: right !important;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even) > .col .divider {
        margin-left: auto;
    }

    body.theme-thm04[data-theme-version="v2"] #thm04-story.thm04-story--alternating .col-lg-8 > .row:nth-child(even)::before {
        right: 0;
        left: auto;
    }
}

@media (max-width: 380px) {
    .thm04-nav {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .thm04-nav__monogram {
        display: none;
    }

    .thm04-nav__links {
        width: 100%;
        justify-content: space-between;
        gap: 0;
        overflow-x: auto;
    }

    .thm04-nav__links .nav-link {
        flex: 0 0 auto;
        justify-content: center;
        padding-inline: 2px;
        white-space: nowrap;
    }

    .thm04-event-card {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .col-lg-8 > .row {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 14px;
        padding: 18px;
    }

    body.theme-thm04[data-theme-version="v2"] .theme-v2-section--story .obj-fit.rounded-circle {
        width: 78px !important;
        height: 104px !important;
    }
}

@media (max-width: 520px) {
    .thm04-colophon {
        flex-direction: column;
        align-items: flex-start;
        padding-inline-end: 56px;
    }
}

@media (max-width: 260px) {
    .thm04-nav__links {
        justify-content: flex-start;
        gap: 4px;
    }
}

@media (max-width: 560px) {
    body.theme-thm04[data-theme-version="v2"] .thm04-gallery {
        --theme-gallery-gap: 7px;
    }

    body.theme-thm04[data-theme-version="v2"] .thm04-gallery-dialog {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
    }

    .thm04-gallery-dialog__bar,
    .thm04-gallery-dialog__controls {
        padding: 9px 10px;
    }

    .thm04-gallery-dialog__controls button {
        padding-inline: 9px;
        font-size: 12px;
        letter-spacing: 0.045em;
    }

}

@media (max-height: 650px) {
    body.theme-thm04[data-theme-version="v2"] section#opening .container {
        min-height: calc(100dvh - 42px);
        padding-block: 22px !important;
    }

    body.theme-thm04[data-theme-version="v2"] section#opening h1.font-type-secondary {
        font-size: clamp(35px, 10.4cqw, 50px);
    }

    body.theme-thm04[data-theme-version="v2"] section#opening img {
        width: min(190px, 60%) !important;
        margin-block: 2px 16px !important;
    }

    body.theme-thm04[data-theme-version="v2"] section#opening .mb-7 {
        margin-bottom: 18px !important;
        line-height: 1.52;
    }

    .thm04-countdown {
        margin-block: 20px;
    }
}

/* Floating controls use the shared dock (theme-system.css), coloured for this theme. */
.thm04-dock {
    --theme-dock-bg: rgba(16, 37, 31, 0.92);
    --theme-dock-fg: #fffdf7;
    --theme-dock-border: rgba(219, 201, 143, 0.6);
    --theme-dock-bg-on-dark: rgba(255, 253, 247, 0.94);
    --theme-dock-fg-on-dark: #10251f;
    --theme-dock-border-on-dark: #dbc98f;
}

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

/* Phones give the links the monogram's width, so all of them, RSVP included,
   fit without hidden scrolling; the dock already returns to the top. */
@media (max-width: 479px) {
    .thm04-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .thm04-nav__monogram {
        display: none;
    }

    .thm04-nav__links {
        justify-content: space-between;
        gap: 0;
    }

    .thm04-nav__links .nav-link {
        padding-inline: 4px;
    }
}

/* The column beside the desktop companion is phone-narrow too (390px at 1024x768, 410px at
   1280x800), where the monogram pushed RSVP past the edge: the same treatment as phones. */
@container thm04-page (max-width: 479px) {
    .thm04-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .thm04-nav__monogram {
        display: none;
    }

    .thm04-nav__links {
        justify-content: space-between;
        gap: 0;
    }

    .thm04-nav__links .nav-link {
        padding-inline: 4px;
    }
}

/* Cover: the couple's photograph shows above a compact panel at the foot. */
body.theme-thm04[data-theme-version="v2"] section#opening {
    display: grid;
    align-items: end;
    justify-items: center;
}

body.theme-thm04[data-theme-version="v2"] section#opening::after {
    background:
        linear-gradient(180deg, rgba(8, 26, 21, 0.08) 0%, rgba(8, 26, 21, 0.12) 38%, rgba(8, 26, 21, 0.72) 78%, rgba(8, 26, 21, 0.88) 100%);
}

body.theme-thm04[data-theme-version="v2"] section#opening .container {
    min-height: 0;
    margin-bottom: clamp(18px, 4dvh, 40px);
    padding-block: clamp(26px, 5vw, 40px) !important;
    background: rgba(16, 45, 36, 0.86);
}

body.theme-thm04[data-theme-version="v2"] section#opening img {
    margin: 2px 0 18px !important;
}

/* Hero: the photograph stays clear; the copy sits in the lower part over a
   gradient that only darkens behind it. */
body.theme-thm04[data-theme-version="v2"] .thm04-hero {
    place-items: end center;
    padding: 54px 0 clamp(48px, 7dvh, 72px) !important;
    background:
        linear-gradient(180deg, rgba(9, 28, 22, 0.12) 0%, rgba(9, 28, 22, 0.08) 30%, rgba(9, 28, 22, 0.7) 62%, rgba(9, 28, 22, 0.92) 100%),
        var(--thm04-hero-image) center 30% / cover no-repeat;
}

/* Livestream: the empty gold ring above the heading reads as a missing icon. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--livestream .thm04-section-heading::before {
    display: none;
}

/* Verse: a calm reading size for the core lines. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote #thm04-quote {
    min-height: 0;
}

body.theme-thm04[data-theme-version="v2"] .theme-v2-section--quote p {
    font-size: clamp(21px, 5.2cqw, 28px) !important;
}

/* Closing: the gold foliage from the opening, and copy kept clear of the side rules. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--closing img.thm04-closing__foliage {
    width: min(220px, 64vw) !important;
    height: auto;
    filter: sepia(0.22) saturate(0.72) brightness(1.35);
    opacity: 0.9;
}

body.theme-thm04[data-theme-version="v2"] footer#footer .container {
    padding-inline: 32px;
}

/* A friend without a photo is shown by their initial, not a cartoon avatar. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--wishes .thm04-wish-initial {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border: 1px solid rgba(219, 201, 143, 0.62);
    border-radius: 50%;
    background: rgba(219, 201, 143, 0.14);
    color: var(--thm04-gold-light);
    font-family: var(--thm04-display);
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
}

/* Photo dialog: a label is never split mid-word; narrow phones show the arrows
   alone, and the buttons keep their spoken names. */
.thm04-gallery-dialog__controls button {
    overflow-wrap: normal;
    white-space: nowrap;
}

@media (max-width: 419px) {
    .thm04-gallery-dialog__label {
        display: none;
    }
}

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

/* The copy button shares the theme's squared, uppercase button language. */
body.theme-thm04[data-theme-version="v2"] :is(.theme-v2-section--gift, .theme-v2-section--gift-address) :where(.thm04-copy-button, [data-thm04-gift-copy]) {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 2px !important;
    font: 700 13px/1 var(--thm04-body);
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

/* Guest count spans the form until "Lainnya" reveals the number field beside it. */
body.theme-thm04[data-theme-version="v2"] #input-total:has(#total.d-none) #total_select {
    grid-column: 1 / -1;
}

/* Phones: 16px form text keeps iOS from zooming into the field on focus. */
@media (max-width: 767px) {
    body.theme-thm04[data-theme-version="v2"] :where(#rsvp-form, #wishes-form) :where(.form-control, .form-select) {
        font-size: 16px;
    }
}

/* Video ----------------------------------------------------------------------
   A dark forest screening band, like the livestream: gold foliage over the heading and each
   poster matted in gold hairlines, one per row in the narrow invitation. */
body.theme-thm04[data-theme-version="v2"] .thm04-video {
    --theme-video-gap: clamp(30px, 8cqw, 44px);
    --theme-video-max: 620px;
    --theme-video-radius: 0;
    --theme-video-border: rgba(219, 201, 143, 0.6);
    --theme-video-frame: #0b1a15;
    --theme-video-button: #fffdf7;
    --theme-video-button-text: var(--thm04-forest-900);
    --theme-focus: var(--thm04-gold-light);
}

body.theme-thm04[data-theme-version="v2"] .thm04-video .thm04-section-heading > h2 {
    color: #fffdf7;
}

body.theme-thm04[data-theme-version="v2"] .thm04-video .thm04-section-heading > .thm04-eyebrow {
    color: var(--thm04-gold-light);
}

body.theme-thm04[data-theme-version="v2"] .thm04-video .thm04-section-heading > h2 + p {
    color: rgba(255, 253, 247, 0.76);
}

body.theme-thm04[data-theme-version="v2"] .thm04-video .thm04-section-heading > img:first-child {
    opacity: 0.9;
    filter: none;
}

body.theme-thm04[data-theme-version="v2"] .thm04-video.theme-video .theme-video__list {
    display: flex;
    flex-direction: column;
}

body.theme-thm04[data-theme-version="v2"] .thm04-video .theme-video__item {
    padding: 9px;
    border: 1px solid rgba(219, 201, 143, 0.32);
}

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

body.theme-thm04[data-theme-version="v2"] .thm04-video .theme-video__play:focus-visible .theme-video__play-icon {
    box-shadow: 0 0 0 4px var(--thm04-forest-800), 0 12px 32px rgba(0, 0, 0, 0.3);
}

body.theme-thm04[data-theme-version="v2"] .thm04-video .theme-video__caption {
    margin: 12px 0 3px;
    color: #fffdf7;
    font-family: var(--thm04-display);
    font-size: clamp(20px, 5cqw, 24px);
    font-weight: 600;
}

/* Kirim Kado -----------------------------------------------------------------
   The gift continues on the same ivory ground: a gold rule over the minimal heading, and each
   address on a paper card like the transfer card, with the theme's forest copy button. */
body.theme-thm04[data-theme-version="v2"] .theme-v2-section--gift + .theme-v2-section--gift-address #thm04-gift-address {
    padding-top: 0 !important;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address {
    --theme-focus: var(--thm04-forest-700);
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__list {
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__card {
    flex: none;
    width: min(100%, 480px);
    gap: 4px;
    padding: clamp(26px, 7cqw, 38px) clamp(22px, 6cqw, 34px);
    border: 1px solid rgba(26, 41, 36, 0.13);
    background: var(--thm04-paper);
    box-shadow: 0 22px 52px rgba(16, 37, 31, 0.09);
    color: var(--thm04-ink);
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__label {
    color: var(--thm04-gold-ink);
    font: 700 12px/1.5 var(--thm04-body);
    letter-spacing: 0.2em;
    opacity: 1;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__name {
    margin: 2px 0 6px;
    color: var(--thm04-forest-950);
    font-family: var(--thm04-display);
    font-size: clamp(26px, 7cqw, 32px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

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

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__address {
    color: var(--thm04-muted);
    font-size: 14px;
    line-height: 1.8;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__note {
    width: 100%;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--thm04-line);
    color: var(--thm04-muted);
    font-size: 13px;
}

body.theme-thm04[data-theme-version="v2"] .thm04-gift-address .theme-gift-address__copy[data-copy-state="copied"] {
    border-color: var(--thm04-gold-ink) !important;
    background: var(--thm04-gold-ink);
}

/* Teks & Font: a longer button text the couple writes (cover, RSVP, wishes) wraps inside its card
   instead of running past it; Bootstrap's .btn keeps text on one line and its auto column grows
   with it. The theme's own words fit on one line, so they render as before. */
body.theme-thm04[data-theme-version="v2"] :where(section#opening, #thm04-rsvp, #thm04-wishes) .col-auto {
    max-width: 100%;
}

body.theme-thm04[data-theme-version="v2"] :where(#btn-open-opening, #tombol_rsvp, #btn-wishes) {
    white-space: normal;
}

/* Teks & Font: a text the couple writes may hold one long word (Bapak/Ibu/Saudara/i). This theme
   needs no extra wrapping rule: its text inherits overflow-wrap: anywhere from the body, which
   already breaks such a word, and a break-word rule here would change how the featured-wish
   carousel and the grids size their columns. */
