/* Consolidated viewport, short-height, landscape, and motion queries. */


@media (max-width: 360px) {
    .closing-family-grid {
        gap: .55rem;
    }

    .closing-family-panel {
        padding-top: .9rem;
    }
}


@media screen and (max-width: 992px) {
    .width-loading {
        width: 50%;
    }
}


@media screen and (max-width: 576px) {
    .width-loading {
        width: 75%;
    }
}


@media (max-width: 575.98px) {
    body {
        min-width: 0;
        min-height: 100dvh;
    }

    #root {
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
    }

    #root > .col-sm-7,
    #root > .col-md-6,
    #root > .col-lg-5,
    #root > .col-xl-4,
    #root > .col-xxl-3 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    main > section {
        width: 100%;
        overflow-x: hidden;
    }

    main section .container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #home > .bg-overlay-auto {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding-left: 1rem;
        padding-right: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .loading-page > .d-flex {
        padding: 1rem;
    }

    .loading-page .d-flex.flex-column {
        width: min(100%, 24rem);
        margin: 0 auto;
    }

    .img-center-crop {
        width: clamp(7.5rem, 42vw, 10.5rem);
        height: clamp(7.5rem, 42vw, 10.5rem);
    }

    #home .img-center-crop,
    .loading-page .img-center-crop {
        width: clamp(8.25rem, 48vw, 11.25rem);
        height: clamp(8.25rem, 48vw, 11.25rem);
    }

    main .font-esthetic {
        line-height: 1.05;
    }

    main p,
    main small,
    main label,
    main .btn,
    main .form-control,
    main .form-select {
        font-size: clamp(.82rem, 3.6vw, .95rem);
    }

    main .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        line-height: 1.2;
    }

    main .btn i {
        flex: 0 0 auto;
    }

    .bg-theme-auto,
    .bg-overlay-auto,
    main .border.rounded-5.shadow,
    main .border.rounded-pill.shadow {
        min-width: 0;
    }

    main .rounded-5 {
        border-radius: 1rem !important;
    }

    main .rounded-pill[data-countdown-target],
    main [data-countdown-target] {
        border-radius: 1rem !important;
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    [data-countdown-target] .row {
        row-gap: .25rem;
    }

    [data-countdown-target] .col-3 {
        padding: .25rem !important;
    }

    [data-countdown-target] p,
    [data-countdown-target] small {
        display: block !important;
        margin: 0 !important;
        line-height: 1.1;
    }

    [data-countdown-target] p {
        font-size: clamp(.95rem, 4.6vw, 1.1rem) !important;
    }

    [data-countdown-target] small {
        font-size: clamp(.58rem, 2.9vw, .68rem);
    }

    #gallery .carousel .gallery-photo {
        aspect-ratio: 4 / 5;
        max-height: 52dvh;
    }

    #gallery .row.g-2.mt-3 {
        margin-left: 0;
        margin-right: 0;
    }

    #gallery .row.g-2.mt-3 > .col-6 {
        min-width: 0;
    }

    .overflow-y-scroll.with-scrollbar {
        height: min(15rem, 48dvh) !important;
    }

    .bg-theme-auto .d-flex.justify-content-between.align-items-center,
    main .border.rounded-5.shadow .d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .bg-theme-auto .d-flex.justify-content-between.align-items-center > p,
    main .border.rounded-5.shadow .d-flex.justify-content-between.align-items-center > p {
        min-width: 0;
        flex: 1 1 10rem;
        overflow-wrap: anywhere;
    }

    .form-control,
    .form-select,
    textarea {
        font-size: 16px;
    }

    .navbar#navbar-menu {
        width: 100%;
        max-width: 100%;
        border-radius: 0 !important;
    }

    #navbar-menu .navbar-nav {
        width: 100%;
        min-width: 0;
    }

    #navbar-menu .nav-item {
        min-width: 0;
    }

    #navbar-menu .nav-link {
        min-height: 3.65rem;
        padding: .48rem .12rem .42rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .16rem;
        line-height: 1.05;
        text-align: center;
    }

    #navbar-menu .nav-link i {
        font-size: 1rem;
        line-height: 1;
    }

    #navbar-menu .nav-link span {
        width: 100%;
        max-width: 100%;
        font-size: clamp(.56rem, 2.65vw, .68rem) !important;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #navbar-menu .nav-link::before {
        top: 0;
        width: 46%;
    }

    .audio-float {
        right: .75rem;
        bottom: 4.8rem;
    }

    body.is-paged .audio-float {
        bottom: 4.7rem;
    }

    #theme-ornaments {
        overflow: hidden;
    }

    body.is-paged #theme-ornaments {
        z-index: 1;
    }

    .petal,
    .leaf {
        transform: scale(.82);
    }

    .lantern {
        font-size: 2.4rem;
    }

    .lantern.left {
        left: 7%;
    }

    .lantern.right {
        left: auto;
        right: 7%;
        font-size: 3rem;
    }

    .royal-frame {
        inset: 10px;
        padding-top: 28px;
        border-width: 2px;
    }

    .royal-crown {
        font-size: 2.7rem;
    }

    .minimalist-circle {
        width: 80vw;
        height: 80vw;
        left: -42vw;
    }

    .vintage-flourish {
        height: 90px;
    }
}


/* Shared short landscape mode: retain important content and scroll only panels. */
@media (orientation: landscape) and (max-height: 500px) {
    :root {
        --invitation-nav-height: 54px;
    }

body.is-paged main,
body.theme-wayang-kencana.is-paged main {
        width: min(100vw, 760px);
        max-width: min(100vw, 760px);
    }

    body.is-paged main > section {
        justify-content: center;
        padding-top: max(.35rem, var(--invitation-safe-top)) !important;
        padding-right: max(.75rem, var(--invitation-safe-right)) !important;
        padding-bottom: calc(var(--invitation-nav-height) + .35rem + var(--invitation-safe-bottom)) !important;
        padding-left: max(.75rem, var(--invitation-safe-left)) !important;
    }

    body.is-paged main > section > [data-inner-scroll],
    body.is-paged main > section .overflow-y-auto,
    body.is-paged main > section .overflow-y-scroll {
        max-height: calc(100dvh - var(--invitation-nav-height) - var(--invitation-safe-top) - var(--invitation-safe-bottom) - .7rem);
    }

    body.is-paged #home h1.font-esthetic,
    body.is-paged #home h2.font-esthetic,
    body.is-paged main h2.font-esthetic {
        margin-block: .25rem !important;
        padding-block: .2rem !important;
        font-size: clamp(1.35rem, 5.8dvh, 2rem) !important;
    }

    body.is-paged #home .img-center-crop,
    body.is-paged .welcome-photo {
        width: clamp(4.4rem, 21dvh, 6.4rem) !important;
        height: clamp(4.4rem, 21dvh, 6.4rem) !important;
        margin-block: .3rem !important;
    }

    #navbar-menu .nav-link {
        min-height: 48px;
        padding: .25rem .2rem;
        font-size: .7rem;
    }

    #navbar-menu .nav-link i {
        font-size: .86rem;
    }

    .audio-float {
        bottom: calc(var(--invitation-nav-height) + .3rem + var(--invitation-safe-bottom));
    }

    .audio-float .btn {
        width: 2rem;
        height: 2rem;
        margin-top: .3rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto;
    }
}


@media (max-width: 575.98px) and (max-height: 720px) {
    body.theme-burgundy-portrait.is-paged #gallery .gallery-panel {
        padding: .65rem !important;
    }

    body.theme-burgundy-portrait #gallery .gallery-title {
        font-size: clamp(1.8rem, 8vw, 2.15rem) !important;
    }

    body.theme-burgundy-portrait.is-paged #carousel-gallery {
        margin-top: .45rem !important;
    }

    body.theme-burgundy-portrait.is-paged #gallery .carousel .gallery-photo {
        height: min(36vh, 15.5rem);
        height: min(36dvh, 15.5rem);
    }

    body.theme-burgundy-portrait.is-paged #gallery .gallery-thumbnails {
        margin-top: .4rem !important;
        padding: .32rem;
    }

    body.theme-burgundy-portrait.is-paged #gallery .gallery-thumbnails .gallery-photo {
        height: clamp(44px, 13vw, 54px);
    }
}


@media (max-width: 575.98px) {
    body.theme-burgundy-portrait.is-paged #gallery .gallery-thumbnails {
        padding-right: 3.35rem;
    }
}


@media (max-width: 375px) {
    body.theme-burgundy-portrait:has(#gallery.is-active-section) .audio-float {
        right: .25rem;
    }

    body.theme-burgundy-portrait:has(#gallery.is-active-section) .audio-float .btn {
        width: 2.3rem;
        height: 2.3rem;
    }
}


@media (max-height: 500px) and (orientation: landscape) {
    body.theme-burgundy-portrait.is-paged #gallery {
        padding: .3rem 2.5rem calc(var(--burgundy-nav-height) + .3rem) !important;
    }

    body.theme-burgundy-portrait.is-paged #gallery > .container {
        width: min(100%, 35rem);
        padding: 0;
    }

    body.theme-burgundy-portrait.is-paged #gallery .gallery-panel {
        padding: .45rem !important;
        border-radius: 1.2rem !important;
    }

    body.theme-burgundy-portrait #gallery .gallery-title {
        padding: 0 0 .25rem !important;
        font-size: 1.75rem !important;
    }

    body.theme-burgundy-portrait #gallery .gallery-stage {
        display: grid;
        grid-template-columns: minmax(0, 1.8fr) minmax(9rem, .9fr);
        gap: .55rem;
        align-items: center;
    }

    body.theme-burgundy-portrait.is-paged #carousel-gallery {
        height: 46dvh;
        margin-top: 0 !important;
    }

    body.theme-burgundy-portrait.is-paged #gallery .carousel .gallery-photo {
        height: 46vh;
        height: 46dvh;
    }

    body.theme-burgundy-portrait.is-paged #gallery .gallery-thumbnails {
        display: flex;
        margin-top: 0 !important;
        padding: .3rem;
        flex-wrap: wrap;
        align-content: center;
    }

    body.theme-burgundy-portrait.is-paged #gallery .gallery-thumbnails > .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: .15rem;
    }

    body.theme-burgundy-portrait.is-paged #gallery .gallery-thumbnails .gallery-photo {
        height: calc(23dvh - .65rem);
        min-height: 0;
        border-radius: .55rem !important;
    }

    body.theme-burgundy-portrait #gallery .carousel-control-prev,
    body.theme-burgundy-portrait #gallery .carousel-control-next {
        width: 1.9rem;
        height: 1.9rem;
        margin: 0 .35rem;
    }
}


@media (max-width: 575.98px) {
    .theme-burgundy-portrait {
        --burgundy-nav-height: 82px;
    }

    body.theme-burgundy-portrait #navbar-menu {
        border-radius: 0 !important;
    }

    body.theme-burgundy-portrait #navbar-menu .nav-link {
        min-height: calc(var(--burgundy-nav-height) - .65rem);
        margin: .32rem 0;
    }

    body.theme-burgundy-portrait .audio-float {
        right: .65rem;
    }

    body.theme-burgundy-portrait .audio-float .btn {
        width: 2.8rem;
        height: 2.8rem;
    }

    .theme-burgundy-portrait .burgundy-arch-frame {
        width: min(72%, 20rem);
    }

    .theme-burgundy-portrait .burgundy-salam-note {
        width: calc(100% - 3.6rem);
    }
}


@media (max-height: 720px) {
    .theme-burgundy-portrait .burgundy-cover-title {
        margin-top: 3.2rem;
    }

    .theme-burgundy-portrait .burgundy-guest-card {
        padding-top: .75rem;
        padding-bottom: .85rem;
        border-radius: .55rem .55rem 1.3rem .8rem;
    }

    .theme-burgundy-portrait .burgundy-open-button {
        margin-top: .85rem;
        margin-bottom: 1.6rem;
    }

    .theme-burgundy-portrait .burgundy-arch-frame img {
        height: 13.5rem;
    }

    .theme-burgundy-portrait .burgundy-profile-photo {
        width: min(44%, 10.125rem);
    }

    .theme-burgundy-portrait .burgundy-quote {
        margin-top: 1.45rem;
    }

    .theme-burgundy-portrait .burgundy-profile-name {
        margin-top: 1.1rem;
    }
}


@media (max-height: 500px) and (orientation: landscape) {
    .theme-burgundy-portrait {
        --burgundy-nav-height: 62px;
    }

    body.theme-burgundy-portrait #welcome .d-flex.flex-column {
        padding: .45rem 1rem !important;
    }

    body.theme-burgundy-portrait .burgundy-cover-ornament-canvas .burgundy-ornament.top-left,
    body.theme-burgundy-portrait .burgundy-cover-ornament-canvas .burgundy-ornament.top-right,
    body.theme-burgundy-portrait.is-paged .burgundy-ornament.top-left,
    body.theme-burgundy-portrait.is-paged .burgundy-ornament.top-right {
        width: calc(42% - 1.5rem);
    }

    body.theme-burgundy-portrait .burgundy-cover-ornament-canvas .burgundy-ornament.bottom,
    body.theme-burgundy-portrait.is-paged #theme-ornaments .burgundy-ornament.bottom {
        display: none;
    }

    .theme-burgundy-portrait .burgundy-cover-title {
        margin-top: .45rem;
    }

    .theme-burgundy-portrait .burgundy-opening-layer {
        padding-bottom: .75rem;
    }

    .theme-burgundy-portrait .burgundy-cover-title p {
        margin-bottom: 0;
        font-size: .78rem;
    }

    .theme-burgundy-portrait .burgundy-cover-title h1 {
        font-size: clamp(2.15rem, 7.2vw, 2.85rem);
        line-height: .84;
    }

    .theme-burgundy-portrait .burgundy-guest-card {
        width: min(54%, 18rem);
        padding: .42rem .75rem .55rem;
        border-radius: .45rem .45rem 1rem .65rem;
        backdrop-filter: blur(10px) saturate(125%);
        -webkit-backdrop-filter: blur(10px) saturate(125%);
    }

    .theme-burgundy-portrait .burgundy-guest-card small {
        font-size: .7rem;
    }

    .theme-burgundy-portrait .burgundy-guest-card span {
        margin-top: .1rem;
        font-size: .82rem;
    }

    .theme-burgundy-portrait .burgundy-guest-card strong {
        margin-top: .2rem;
        font-size: 1rem;
    }

    .theme-burgundy-portrait .burgundy-open-button {
        margin-top: .6rem;
        margin-bottom: .65rem;
        padding: .38rem .95rem;
        font-size: .82rem;
    }

    body.theme-burgundy-portrait #navbar-menu,
    body.theme-burgundy-portrait #navbar-menu .navbar-nav {
        min-height: var(--burgundy-nav-height);
    }

    body.theme-burgundy-portrait #navbar-menu .nav-link {
        min-height: 54px;
        margin: .2rem 0;
        padding: .28rem .08rem .22rem;
        gap: .15rem;
    }

    body.theme-burgundy-portrait #navbar-menu .nav-link span {
        font-size: .62rem !important;
    }

    body.theme-burgundy-portrait .audio-float {
        bottom: calc(var(--burgundy-nav-height) + .35rem);
    }

    body.theme-burgundy-portrait .audio-float .btn {
        width: 2.2rem;
        height: 2.2rem;
        margin-top: .35rem !important;
        font-size: .72rem;
    }

    .theme-burgundy-portrait .burgundy-salam-copy {
        padding: 4.25rem 1.25rem 1rem;
    }

    .theme-burgundy-portrait .burgundy-display-name {
        font-size: clamp(2.1rem, 8dvh, 3rem);
    }

    .theme-burgundy-portrait .burgundy-salam-note {
        font-size: .82rem !important;
    }

    .theme-burgundy-portrait .burgundy-quotes-content,
    .theme-burgundy-portrait .burgundy-profile-page .container {
        padding-top: 3.75rem;
        padding-bottom: .75rem;
    }

    .theme-burgundy-portrait .burgundy-arch-frame img {
        height: 10rem;
    }

    .theme-burgundy-portrait .burgundy-profile-photo {
        width: min(28%, 7.5rem);
    }
}


@media (prefers-reduced-motion: reduce) {
    body.theme-burgundy-portrait #navbar-menu .nav-link {
        transition: none;
    }

    body.theme-burgundy-portrait #theme-ornaments.ornaments-enter .burgundy-ornament {
        animation: none !important;
        opacity: 1;
    }

    body.theme-burgundy-portrait #theme-ornaments.ornaments-enter .burgundy-ornament.top-left {
        transform: scaleX(-1);
    }

    body.theme-burgundy-portrait #theme-ornaments.ornaments-enter .burgundy-ornament.top-right,
    body.theme-burgundy-portrait #theme-ornaments.ornaments-enter .burgundy-ornament.bottom {
        transform: none;
    }
}


@media (max-width: 575.98px) {
    body.theme-wayang-kencana #root > .col-sm-7,
    body.theme-wayang-kencana #root > .col-md-6,
    body.theme-wayang-kencana #root > .col-lg-5,
    body.theme-wayang-kencana #root > .col-xl-4,
    body.theme-wayang-kencana #root > .col-xxl-3,
    body.theme-wayang-kencana main,
    body.theme-wayang-kencana .navbar {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.theme-wayang-kencana #home > .bg-overlay-auto {
        padding: clamp(3rem, 10vh, 4.8rem) .9rem clamp(11rem, 28vh, 15rem);
    }

    body.theme-wayang-kencana #welcome .d-flex.flex-column {
        padding-top: clamp(7rem, 17dvh, 9rem) !important;
        padding-right: .9rem !important;
        padding-bottom: calc(61px + 1rem) !important;
        padding-left: .9rem !important;
    }

    .wayang-title-ornament {
        width: min(100%, 21rem);
        height: clamp(2.9rem, 13vw, 4.2rem);
    }

    .wayang-title-small {
        font-size: clamp(.82rem, 3.75vw, 1.08rem);
        letter-spacing: .2em;
        padding-left: .2em;
    }

    .wayang-title-name {
        font-size: clamp(3.35rem, 17vw, 5.1rem);
    }

    .wayang-welcome-title .wayang-title-name {
        max-width: 100%;
        font-size: clamp(3rem, 15.5vw, 4.75rem);
        line-height: 1;
        overflow-wrap: normal;
        white-space: nowrap;
    }

    .wayang-guest-box {
        margin-top: clamp(1.4rem, 4dvh, 2rem);
        font-size: clamp(1rem, 4.6vw, 1.25rem);
    }

    .wayang-corner {
        top: .85rem;
        width: clamp(112px, 34vw, 150px);
        height: clamp(112px, 34vw, 150px);
    }

    .wayang-corner.top-left {
        left: .75rem;
    }

    .wayang-corner.top-right {
        right: .75rem;
    }

    .wayang-ornament-line.top {
        top: clamp(5.6rem, 16vh, 7.4rem);
    }

    .wayang-ornament-line.bottom {
        top: clamp(15.3rem, 35vh, 18rem);
    }

    .wayang-puppet {
        bottom: calc(61px + max(.35rem, env(safe-area-inset-bottom)));
    }

    body.theme-wayang-kencana #theme-ornaments {
        --wayang-puppet-height: clamp(225px, 31vh, 290px);
    }

    body.theme-wayang-kencana:not(.is-paged) #theme-ornaments {
        --wayang-puppet-height: clamp(225px, 31dvh, 290px);
    }

    body.theme-wayang-kencana:not(.is-paged) .wayang-puppet {
        bottom: calc(61px + max(.35rem, env(safe-area-inset-bottom)));
    }

    .wayang-puppet.wayang-sinta {
        left: -.15rem;
    }

    .wayang-puppet.wayang-rama {
        right: -.15rem;
    }
}


@media (max-height: 720px) {
    body.theme-wayang-kencana #welcome .d-flex.flex-column {
        justify-content: flex-start;
        padding-top: clamp(5rem, 12.5dvh, 5.75rem) !important;
        padding-bottom: calc(66px + .75rem) !important;
    }

    .wayang-title-ornament {
        height: 2.85rem;
    }

    .wayang-title-small {
        font-size: clamp(.86rem, 4.5vw, 1.16rem);
    }

    .wayang-title-name {
        font-size: clamp(2.9rem, 14vw, 4.25rem);
    }

    .wayang-guest-box {
        margin-top: clamp(1.15rem, 3.5dvh, 1.6rem);
        font-size: clamp(.95rem, 2.2vw, 1.2rem);
    }

    body.theme-wayang-kencana #button-open-invitation {
        padding: .45rem 1.05rem;
    }

    body.theme-wayang-kencana:not(.is-paged) #theme-ornaments {
        --wayang-puppet-height: clamp(260px, 36vh, 320px);
    }
}


@media (max-width: 575.98px) and (max-height: 720px) {
    body.theme-wayang-kencana #welcome .d-flex.flex-column {
        padding-top: clamp(4.5rem, 12dvh, 5.75rem) !important;
        padding-bottom: calc(61px + .5rem) !important;
    }

    .wayang-welcome-title .wayang-title-name {
        font-size: clamp(2.65rem, 14vw, 3.65rem);
    }

    .wayang-guest-box {
        margin-top: clamp(.85rem, 2.8dvh, 1.25rem);
    }

    body.theme-wayang-kencana:not(.is-paged) #theme-ornaments {
        --wayang-puppet-height: clamp(190px, 31dvh, 225px);
    }
}


@media (min-width: 768px) and (max-height: 840px) {
    body.theme-wayang-kencana #home > .bg-overlay-auto {
        justify-content: flex-start;
        padding-top: clamp(3.2rem, 8vh, 4.4rem);
        padding-bottom: 9rem;
    }

    .wayang-title-ornament {
        width: min(100%, 31rem);
        height: 3.25rem;
    }

    .wayang-title-small {
        font-size: clamp(1rem, 1.6vw, 1.28rem);
        letter-spacing: .24em;
    }

    .wayang-title-name {
        font-size: clamp(4.2rem, 7.6vw, 5.65rem);
        line-height: .9;
    }

    .wayang-date {
        margin-top: 1rem;
        font-size: 1.2rem;
    }

    .wayang-corner {
        width: clamp(128px, 13vw, 160px);
        height: clamp(128px, 13vw, 160px);
    }

    body.theme-wayang-kencana #theme-ornaments {
        --wayang-puppet-height: clamp(260px, 36vh, 320px);
    }
}


@media (prefers-reduced-motion: reduce) {
    body.theme-wayang-kencana #theme-ornaments::before,
    body.theme-wayang-kencana #theme-ornaments::after,
    body.theme-wayang-kencana #theme-ornaments.ornaments-enter .wayang-corner,
    body.theme-wayang-kencana #theme-ornaments.ornaments-enter .wayang-ornament-line,
    body.theme-wayang-kencana #theme-ornaments.ornaments-enter .wayang-puppet {
        animation: none !important;
    }

    body.theme-wayang-kencana #theme-ornaments.ornaments-enter .wayang-corner,
    body.theme-wayang-kencana #theme-ornaments.ornaments-enter .wayang-ornament-line,
    body.theme-wayang-kencana #theme-ornaments.ornaments-enter .wayang-puppet {
        opacity: 1;
    }
}


@media (prefers-reduced-motion: reduce) {body.is-paged main,
body.is-paged main > section.is-active-section .invitation-reveal-item {
        transition: none !important;
        animation: none !important;
    }

body.is-paged .invitation-reveal-item {
        opacity: 1;
        filter: none;
        transform: none;
    }
}


@media (max-width: 575.98px) {body.is-paged main {
        max-width: 100%;
    }

body.is-paged #navbar-menu {
        max-width: 100%;
        border-radius: 0 !important;
    }
    body.is-paged main section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

body.is-paged main > section {
        padding-top: 1.5rem !important;
        padding-bottom: 60px !important;
    }
}


/* Mobile (< 576px) */
@media (max-width: 575.98px) {
    body.theme-full-photo main { max-width: 100%; }
    body.theme-full-photo #navbar-menu { max-width: 100%; border-radius: 0 !important; }
    body.theme-full-photo main section .container { padding-left: 1rem; padding-right: 1rem; }
    body.theme-full-photo main > section {
        padding-top: 1.5rem !important;
        padding-bottom: 60px !important;
    }
    body.theme-full-photo #bride {
        gap: .5rem;
    }
    body.theme-full-photo #bride .font-arabic,
    body.theme-full-photo #bride > .font-esthetic {
        font-size: 1.6rem !important;
        padding-top: .5rem !important;
        padding-bottom: .5rem !important;
    }
    body.theme-full-photo #bride > p,
    body.theme-full-photo #bride .pb-1,
    body.theme-full-photo #bride .overflow-x-hidden {
        padding-bottom: .25rem !important;
    }
    body.theme-full-photo #bride .img-center-crop {
        width: 7.8rem;
        height: 7.8rem;
        margin-top: .5rem !important;
        margin-bottom: .5rem !important;
    }
    body.theme-full-photo #bride .overflow-x-hidden > .font-esthetic {
        font-size: 2.45rem !important;
        margin-top: .35rem !important;
        margin-bottom: 0 !important;
    }
    body.theme-full-photo #bride h2[style*="2.125rem"] {
        font-size: 1.8rem !important;
    }
    body.theme-full-photo #bride p {
        font-size: .86rem !important;
        line-height: 1.35;
    }
    body.theme-full-photo #gallery .carousel .gallery-photo {
        height: min(42vh, 360px);
    }
    body.theme-full-photo #gallery .row.g-2.mt-3 .gallery-photo {
        height: clamp(58px, 18vw, 76px);
    }
    body.theme-full-photo .audio-float {
        left: auto;
        right: 2vh;
        transform: none;
    }
}


/* Tablet (576px - 991px) */
@media (min-width: 576px) and (max-width: 991.98px) {
    body.theme-full-photo main { max-width: 550px; }
    body.theme-full-photo #navbar-menu { max-width: 550px; }
    body.theme-full-photo #bride .overflow-x-hidden {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: .75rem;
    }
    body.theme-full-photo #bride .img-center-crop {
        width: 8.5rem;
        height: 8.5rem;
    }
    body.theme-full-photo .audio-float {
        transform: translateX(255px); /* 550/2 minus offset */
    }
}


/* Desktop (>= 992px) */
@media (min-width: 992px) {
    body.theme-full-photo main { max-width: 650px; }
    body.theme-full-photo #navbar-menu { max-width: 650px; }
    body.theme-full-photo #bride .overflow-x-hidden {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 1rem;
    }
    body.theme-full-photo .audio-float {
        transform: translateX(305px); /* 650/2 minus offset */
    }
}


/* Large Desktop (>= 1200px) */
@media (min-width: 1200px) {
    body.theme-full-photo main { max-width: 700px; }
    body.theme-full-photo #navbar-menu { max-width: 700px; }
    body.theme-full-photo .audio-float {
        transform: translateX(330px); /* 700/2 minus offset */
    }
}


/* Final mobile guard for theme-specific ornaments declared later in the file */
@media (max-width: 575.98px) {
    .petal,
    .theme-zedlabs-editorial .petal {
        width: 14px;
        height: 14px;
    }

    .leaf {
        font-size: 1.35rem;
    }

    .lantern {
        font-size: 2.4rem;
    }

    .lantern.left {
        left: 7%;
    }

    .lantern.right {
        left: auto;
        right: 7%;
        font-size: 3rem;
    }

    .royal-frame {
        inset: 10px;
        padding-top: 28px;
        border-width: 2px;
    }

    .royal-crown {
        font-size: 2.7rem;
    }

    .minimalist-circle {
        width: 80vw;
        height: 80vw;
        left: -42vw;
    }

    .vintage-flourish {
        height: 90px;
    }

    .theme-signature {
        top: clamp(2.6rem, 6.8vh, 4.25rem);
        width: clamp(78px, 24vw, 112px);
        height: clamp(78px, 24vw, 112px);
        filter: drop-shadow(0 10px 14px rgba(31, 21, 8, .14));
    }

    .signature-sakura-jepang,
    .signature-vintage-classic,
    .signature-zedlabs-editorial {
        width: clamp(108px, 34vw, 146px);
        height: clamp(62px, 19vw, 86px);
    }

    body.is-paged #theme-ornaments:not([data-active-section="0"]) .theme-signature {
        top: .8rem;
    }

}


@media (min-width: 576px) {body.is-paged #bride {
        gap: .65rem;
    }

body.is-paged #bride .font-arabic,
body.is-paged #bride > .font-esthetic {
        padding-top: .5rem !important;
        padding-bottom: .5rem !important;
        line-height: 1.2;
    }

body.is-paged #bride > p {
        padding-bottom: .4rem !important;
    }

body.is-paged #bride > .overflow-x-hidden {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: .85rem;
        padding-bottom: .25rem !important;
    }

body.is-paged #bride .img-center-crop {
        width: clamp(7rem, 17vh, 9rem) !important;
        height: clamp(7rem, 17vh, 9rem) !important;
        margin-top: .7rem !important;
        margin-bottom: .7rem !important;
    }

body.is-paged #bride .overflow-x-hidden > .font-esthetic {
        font-size: clamp(2.4rem, 7vh, 3.5rem) !important;
        line-height: .9;
        margin: 0 !important;
    }
}


@media (max-width: 575.98px) {body.is-paged #bride {
        justify-content: center;
        gap: .12rem !important;
        padding-top: .5rem !important;
        padding-bottom: 3.75rem !important;
    }

body.is-paged #bride .font-arabic {
        width: min(100%, 18rem);
        max-width: calc(100% - 1rem);
        align-self: center;
        font-size: clamp(1.04rem, 4.9vw, 1.32rem) !important;
        line-height: 1.2 !important;
        padding-top: 0 !important;
        padding-bottom: .18rem !important;
        white-space: normal;
        text-wrap: balance;
    }

body.is-paged #bride > .font-esthetic {
        width: min(100%, 18rem);
        max-width: calc(100% - 1rem);
        align-self: center;
        font-size: clamp(1.02rem, 4.95vw, 1.36rem) !important;
        line-height: 1.05 !important;
        padding-top: .05rem !important;
        padding-bottom: .18rem !important;
        margin: 0 !important;
        white-space: normal;
        text-wrap: balance;
    }

body.is-paged #bride > p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        font-size: clamp(.68rem, 2.95vw, .78rem) !important;
        line-height: 1.26 !important;
        margin: 0 !important;
        padding: 0 .7rem .15rem !important;
    }

body.is-paged #bride > .overflow-x-hidden {
        padding-bottom: 0 !important;
    }

body.is-paged #bride .overflow-x-hidden > .position-relative {
        margin: 0 !important;
    }

body.is-paged #bride .pb-1 {
        padding-bottom: 0 !important;
    }

body.is-paged #bride .img-center-crop {
        width: clamp(6rem, 32vw, 7.25rem) !important;
        height: clamp(6rem, 32vw, 7.25rem) !important;
        margin-top: .18rem !important;
        margin-bottom: .2rem !important;
    }

body.is-paged #bride h2[style*="2.125rem"] {
        font-size: clamp(1.35rem, 6.6vw, 1.75rem) !important;
        line-height: 1.02 !important;
        margin: 0 !important;
    }

body.is-paged #bride .overflow-x-hidden > .font-esthetic {
        font-size: clamp(2.25rem, 10vw, 3rem) !important;
        line-height: .78 !important;
        margin-top: .02rem !important;
        margin-bottom: .02rem !important;
    }

body.is-paged #bride .overflow-x-hidden p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: clamp(.62rem, 2.7vw, .72rem) !important;
        line-height: 1.18 !important;
        margin-top: .16rem !important;
        margin-bottom: 0 !important;
        padding-left: .5rem !important;
        padding-right: .5rem !important;
    }

body.is-paged #bride .animate-love {
        font-size: 1.28rem !important;
    }
}


@media (max-width: 575.98px) {body.is-paged #gallery {
        padding-top: .75rem !important;
        padding-bottom: 3.75rem !important;
    }

body.is-paged #gallery .border.rounded-5.shadow {
        max-height: calc(100vh - 86px);
        max-height: calc(100dvh - 86px);
        padding: .75rem !important;
        border-radius: 1rem !important;
    }

body.is-paged #gallery h2 {
        font-size: clamp(1.55rem, 7.2vw, 2rem) !important;
        line-height: 1;
        padding-top: .1rem !important;
        padding-bottom: .1rem !important;
    }

body.is-paged #carousel-gallery {
        margin-top: .55rem !important;
    }

body.is-paged #gallery .carousel .gallery-photo {
        height: min(48vh, 360px);
        height: min(48dvh, 360px);
    }

    body.is-paged #gallery .carousel-indicators {
        margin-bottom: .2rem;
    }

body.is-paged #gallery .row.g-2.mt-3 {
        --bs-gutter-x: .4rem;
        margin-top: .45rem !important;
    }

body.is-paged #gallery .row.g-2.mt-3 .gallery-photo {
        height: clamp(48px, 15vw, 64px);
        border-radius: .65rem !important;
    }
}


@media (min-width: 576px) and (max-width: 991.98px) {body.is-paged main,
body.is-paged #navbar-menu {
        max-width: min(100vw, 560px);
    }

body.is-paged main > section {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    .theme-signature {
        width: clamp(102px, 16vw, 138px);
        height: clamp(102px, 16vw, 138px);
    }

}


@media (max-width: 575.98px) {body.is-paged main > section {
        padding-top: clamp(.85rem, 4.6dvh, 1.45rem) !important;
        padding-bottom: calc(58px + max(.45rem, env(safe-area-inset-bottom))) !important;
    }

body.is-paged main > section > .container {
        padding-left: clamp(.75rem, 3.8vw, 1rem);
        padding-right: clamp(.75rem, 3.8vw, 1rem);
    }

body.is-paged #home h1.font-esthetic {
        font-size: clamp(1.75rem, 8.2vw, 2.15rem) !important;
        line-height: .98;
        padding-top: clamp(2.35rem, 7.6dvh, 4rem) !important;
        padding-bottom: clamp(.6rem, 2dvh, 1rem) !important;
    }

body.is-paged #home h2.font-esthetic {
        font-size: clamp(1.95rem, 9vw, 2.45rem) !important;
        line-height: .96;
        margin-top: clamp(.8rem, 2.3dvh, 1.2rem) !important;
        margin-bottom: clamp(.75rem, 2.3dvh, 1.15rem) !important;
    }

body.is-paged #home .img-center-crop {
        width: clamp(7.6rem, 42vw, 10rem) !important;
        height: clamp(7.6rem, 42vw, 10rem) !important;
        margin-top: clamp(.85rem, 2.8dvh, 1.25rem) !important;
        margin-bottom: clamp(.85rem, 2.8dvh, 1.25rem) !important;
    }

body.is-paged main h2.font-esthetic {
        font-size: clamp(1.72rem, 7.8vw, 2.14rem) !important;
        line-height: 1;
    }

body.is-paged main .rounded-5 {
        border-radius: 1rem !important;
    }

body.is-paged .audio-float {
        right: .7rem;
        bottom: calc(4.45rem + env(safe-area-inset-bottom));
    }

    .theme-signature {
        max-width: calc(100vw - 2rem);
    }

    .floral-burgundy-border {
        height: clamp(82px, 17dvh, 145px);
    }

    .floral-burgundy-border.bottom {
        height: clamp(92px, 18dvh, 156px);
    }

    body.is-paged .floral-burgundy-border.bottom {
        bottom: calc(58px + max(.35rem, env(safe-area-inset-bottom)));
    }

    .royal-corner,
    .luxury-diamond-frame,
    .royal-frame {
        opacity: .48;
    }

    .sakura-sun {
        width: 92px;
        height: 92px;
    }

    .sakura-branch {
        width: 152px;
    }

    .batik-corner {
        width: clamp(38px, 13vw, 60px);
        opacity: .08;
    }

    .garden-vine {
        height: clamp(48px, 9dvh, 70px);
    }

    .minimalist-line {
        right: 12%;
    }

}


@media (max-width: 380px) {body.is-paged main > section {
        padding-top: .75rem !important;
        padding-bottom: calc(56px + max(.35rem, env(safe-area-inset-bottom))) !important;
    }

body.is-paged main p,
body.is-paged main small {
        font-size: clamp(.76rem, 3.5vw, .88rem) !important;
        line-height: 1.35;
    }

body.is-paged #home h1.font-esthetic {
        padding-top: 2.15rem !important;
    }

body.is-paged #home .img-center-crop {
        width: clamp(6.9rem, 39vw, 8.8rem) !important;
        height: clamp(6.9rem, 39vw, 8.8rem) !important;
    }

    #navbar-menu .nav-link {
        min-height: 3.45rem;
        padding-left: .05rem;
        padding-right: .05rem;
    }

    #navbar-menu .nav-link span {
        font-size: clamp(.5rem, 2.55vw, .62rem) !important;
    }
}


@media (max-height: 720px) and (max-width: 575.98px) {body.is-paged #home h1.font-esthetic {
        padding-top: 1.8rem !important;
        padding-bottom: .45rem !important;
    }

body.is-paged #home .img-center-crop {
        width: clamp(6.4rem, 33vw, 8rem) !important;
        height: clamp(6.4rem, 33vw, 8rem) !important;
        margin-top: .55rem !important;
        margin-bottom: .55rem !important;
    }

body.is-paged #home .mouse-animation,
body.is-paged #home .mouse-animation + * {
        display: none !important;
    }

    .theme-signature {
        --signature-opacity: .16;
        top: 1.4rem !important;
        transform: translate3d(-50%, -18px, 0) scale(.82);
    }

}


@media (prefers-reduced-motion: reduce) {
    #theme-ornaments::before,
    #theme-ornaments::after,
    #theme-ornaments.ornaments-enter .theme-signature,
    #theme-ornaments.ornaments-enter .theme-signature span,
    body.theme-full-photo .full-photo-bg-layer {
        animation: none !important;
    }

    #theme-ornaments.ornaments-enter .theme-signature {
        opacity: var(--signature-opacity);
        transform: translate3d(-50%, 0, 0) scale(1);
    }
}


/* Shared mobile refinement for the primary Home composition in every theme. */
@media (max-width: 575.98px) {
    body:not(.theme-javanese-wayang) #home > .home-primary-content {
        transform: translateY(clamp(1rem, 2.4dvh, 1.35rem));
    }

    body:not(.theme-javanese-wayang) #home .home-couple-name {
        font-size: clamp(1.8rem, 8.2vw, 2.2rem) !important;
        line-height: .96;
    }

    body.theme-wayang-kencana #home .home-couple-name {
        font-size: clamp(3rem, 15.5vw, 4.65rem) !important;
        line-height: .92;
    }
}


@media (prefers-reduced-motion: reduce) {body.is-paged main > section.is-active-section,
body.is-paged main > section.is-leaving-section,
html.performance-lite #theme-ornaments > .wayang-puppet,
html.performance-lite .scroll-animation,
html.performance-lite .animate-love,
html.performance-lite #button-open-invitation,
body:not(.theme-wayang-kencana) #theme-ornaments.ornaments-enter,
html.performance-lite body.is-paged main > section.is-active-section .invitation-reveal-item {
        animation: none !important;
    }#welcome > .d-flex > .d-flex.flex-column > *,
html.performance-lite #theme-ornaments > .wayang-puppet,
html.performance-lite body.is-paged .invitation-reveal-item {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* Compact landscape composition. Keep the page locked and reflow its content. */
@media (orientation: landscape) and (max-height: 720px) {
    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content {
        display: grid;
        width: 100%;
        min-height: 0;
        height: calc(100dvh - var(--invitation-nav-height) - .7rem);
        padding: .35rem max(1rem, var(--invitation-safe-right)) .35rem max(1rem, var(--invitation-safe-left)) !important;
        grid-template-columns: minmax(7rem, 34%) minmax(0, 1fr);
        grid-auto-rows: min-content;
        align-content: center;
        align-items: center;
        column-gap: clamp(.75rem, 3vw, 1.5rem);
    }

    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > p:first-of-type,
    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > h2,
    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > p:not(.home-scroll-hint),
    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > a {
        grid-column: 2;
    }

    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > .img-center-crop {
        width: clamp(6.5rem, 34dvh, 8rem) !important;
        height: clamp(6.5rem, 34dvh, 8rem) !important;
        margin: 0 auto !important;
        grid-column: 1;
        grid-row: 1 / span 5;
    }

    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > p:first-of-type {
        margin: 0 !important;
        padding: 0 !important;
        font-size: clamp(1.15rem, 6dvh, 1.6rem) !important;
    }

    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > h2 {
        margin: .2rem 0 !important;
        font-size: clamp(1.35rem, 7dvh, 1.9rem) !important;
    }

    body.is-paged:not(.theme-wayang-kencana):not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #home .home-primary-content > p:not(:first-of-type):not(.home-scroll-hint) {
        margin: .15rem 0 !important;
        font-size: clamp(.75rem, 3.8dvh, 1rem) !important;
    }

    body.is-paged #home .home-primary-content > .d-flex,
    body.is-paged #home .home-scroll-hint {
        display: none !important;
    }

    body.is-paged:not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #quotes > .container {
        display: grid;
        min-height: 0;
        height: calc(100dvh - var(--invitation-nav-height) - .7rem);
        padding: .35rem max(.75rem, var(--invitation-safe-right)) .35rem max(.75rem, var(--invitation-safe-left));
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto 1fr;
        align-content: center;
        gap: .4rem;
    }

    body.is-paged:not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #quotes > .container > h2 {
        margin: 0 !important;
        padding: 0 !important;
        grid-column: 1 / -1;
        font-size: clamp(1rem, 5.2dvh, 1.35rem) !important;
    }

    body.is-paged:not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #quotes > .container > .theme-line {
        display: none;
    }

    body.is-paged:not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #quotes > .container > .bg-theme-auto {
        height: 100%;
        margin: 0 !important;
        padding: .4rem .55rem !important;
        align-content: center;
    }

    body.is-paged:not(.theme-javanese-wayang):not(.theme-burgundy-portrait) #quotes > .container > .bg-theme-auto p {
        margin: 0 0 .2rem !important;
        padding: 0 !important;
        font-size: clamp(.63rem, 3.15dvh, .78rem) !important;
        line-height: 1.2;
    }

    body.theme-burgundy-portrait.is-paged #quotes .burgundy-quotes-content {
        display: grid;
        min-height: 0;
        height: calc(100dvh - var(--invitation-nav-height));
        padding: .4rem max(1rem, var(--invitation-safe-right)) .4rem max(1rem, var(--invitation-safe-left)) !important;
        grid-template-columns: minmax(8rem, 42%) minmax(0, 1fr);
        align-items: center;
        gap: 1rem;
    }

    body.theme-burgundy-portrait.is-paged #quotes .burgundy-arch-frame {
        width: min(100%, 10.5rem);
        padding: .3rem;
        justify-self: center;
    }

    body.theme-burgundy-portrait.is-paged #quotes .burgundy-arch-frame img {
        height: min(50dvh, 9.5rem);
    }

    body.theme-burgundy-portrait.is-paged #quotes .burgundy-quote {
        width: 100%;
        margin: 0 !important;
    }

    body.theme-burgundy-portrait.is-paged #quotes .burgundy-quote p {
        font-size: clamp(.68rem, 3.5dvh, .86rem) !important;
        line-height: 1.25;
    }

    body.theme-burgundy-portrait.is-paged #quotes .burgundy-quote cite {
        margin-top: .4rem;
        font-size: clamp(.62rem, 3dvh, .76rem);
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .gallery-panel {
        display: grid;
        height: calc(100dvh - var(--invitation-nav-height) - .7rem);
        padding: .35rem !important;
        grid-template-rows: auto minmax(0, 1fr);
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .gallery-title {
        padding: 0 !important;
        font-size: clamp(1rem, 5dvh, 1.35rem) !important;
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .gallery-stage {
        display: grid;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) minmax(5.5rem, 24%);
        gap: .45rem;
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery #carousel-gallery {
        min-height: 0;
        height: 100%;
        margin: 0 !important;
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .carousel-inner,
    body.is-paged:not(.theme-burgundy-portrait) #gallery .carousel-item,
    body.is-paged:not(.theme-burgundy-portrait) #gallery .carousel .gallery-photo {
        height: 100% !important;
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .gallery-thumbnails {
        display: grid;
        min-height: 0;
        max-height: 100%;
        margin: 0 !important;
        padding-right: .2rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y proximity;
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .gallery-thumbnails > .col-6 {
        width: 100%;
        max-width: none;
        flex: none;
    }

    body.is-paged:not(.theme-burgundy-portrait) #gallery .gallery-thumbnails .gallery-photo {
        height: clamp(2.5rem, 17dvh, 3.4rem) !important;
    }
}
