:root {
    --gw-navy: #0b2a55;
    --gw-navy-2: #071b3a;
    --gw-ink: #102342;
    --gw-blue: #2aa7df;
    --gw-cyan: #67dcff;
    --gw-orange: #f47a2a;
    --gw-page: #f3f7fa;
    --gw-mat: #f8fafc
}

body[data-public-page="gallery"] {
    background: var(--gw-page)
}

.galleryWallPage {
    min-height: 100vh;
    background: var(--gw-page);
    color: var(--gw-ink);
    overflow: hidden
}

/* Header: keep the approved public-gallery treatment. */
.galleryWallIntro {
    position: relative;
    min-height: 323px;
    box-sizing: border-box;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(105deg, #292d72 0%, #264980 37%, #2384b5 72%, #20a0ca 100%)
}

.galleryWallIntro:before,
.galleryWallIntro:after {
    content: none !important
}

.galleryWallIntroInner {
    position: relative;
    z-index: 2;
    max-width: none;
    margin: 0;
    padding: 56px 7vw 46px;
    min-height: 323px;
    box-sizing: border-box
}

.galleryWallPlaque {
    position: relative;
    z-index: 5;
    max-width: 760px;
    text-align: left
}

.galleryWallBack {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .01em;
    opacity: 0;
    transform: translateY(8px);
    animation: gwHeroCopyIn .5s .02s ease-out forwards;
    transition: color .2s ease, transform .2s ease
}

.galleryWallBackArrow {
    font-size: 18px;
    line-height: 1;
    font-weight: 500;
    display: inline-block;
    transform: translateY(-1px);
    transition: transform .2s ease
}

.galleryWallBack:hover {
    color: #bcecff;
    transform: translateX(-2px)
}

.galleryWallBack:hover .galleryWallBackArrow {
    transform: translate(-4px, -1px)
}

.galleryWallBackTop {
    margin: 0 0 24px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none
}

.galleryWallPlaque>span {
    display: block;
    font-size: 10px;
    letter-spacing: .18em;
    font-weight: 800;
    color: #60c7ee;
    opacity: 0;
    transform: translateY(8px);
    animation: gwHeroCopyIn .55s .10s ease-out forwards
}

.galleryWallPlaque h1 {
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1.04;
    margin: 13px 0 10px;
    max-width: 760px;
    color: #fff;
    letter-spacing: -.025em;
    opacity: 0;
    transform: translateY(13px);
    animation: gwHeroCopyIn .65s .18s ease-out forwards
}

.galleryWallPlaque p {
    max-width: 700px;
    color: #edf7fb;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    opacity: 0;
    transform: translateY(12px);
    animation: gwHeroCopyIn .65s .26s ease-out forwards
}

.galleryWallMeta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 17px;
    opacity: 0;
    transform: translateY(10px);
    animation: gwHeroCopyIn .6s .34s ease-out forwards
}

.galleryWallMeta span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #eaf7fc;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .025em
}

.galleryWallMeta span+span:before {
    content: "•";
    margin-right: 7px;
    color: #71d2f0
}

.galleryWallMeta i {
    color: #8cdef5
}

@keyframes gwHeroCopyIn {
    to {
        opacity: 1;
        transform: none
    }
}

/* Court-line reveal: draw the pickleball court first, then reveal the logo. */
.galleryWallMotion {
    position: absolute;
    inset: 0 0 0 auto;
    width: 48%;
    pointer-events: none;
    z-index: 3
}

.galleryCourtReveal {
    position: absolute;
    right: 3.5%;
    top: 18px;
    width: min(540px, 96%);
    height: 285px;
    display: grid;
    place-items: center;
    perspective: 900px
}

.galleryCourtReveal:before {
    content: "";
    position: absolute;
    inset: 8% 2% 4%;
    background: radial-gradient(circle at 52% 52%, rgba(84, 218, 255, .18), transparent 46%);
    filter: blur(18px)
}

.galleryCourtSvg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 7px rgba(69, 216, 255, .52));
    transform: perspective(700px) rotateX(7deg)
}

.courtStroke {
    fill: none;
    stroke: #b8f2ff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round
}

.courtStroke>* {
    stroke-dasharray: 1;
    stroke-dashoffset: 1
}

.courtOuter>* {
    animation: gwCourtDraw 1.55s .12s cubic-bezier(.22, .7, .2, 1) forwards
}

.courtLines>* {
    animation: gwCourtDraw 1.45s .62s cubic-bezier(.22, .7, .2, 1) forwards
}

.galleryCourtLogo {
    position: relative;
    z-index: 2;
    width: 48%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(.88);
    animation: gwLogoReveal .8s 2.18s cubic-bezier(.2, .8, .2, 1) forwards
}

.galleryCourtLogo img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .28))
}

.galleryCourtLogo span {
    margin-top: -6px;
    color: #9ce6fb;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .2em
}

.galleryCourtBall {
    position: absolute;
    right: 13%;
    bottom: 24%;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #dfff62, #a7d91f 60%, #6c9710);
    box-shadow: 0 0 0 8px rgba(205, 245, 61, .08), 0 0 26px rgba(215, 251, 63, .68);
    opacity: 0;
    animation: gwBallIn .7s 2.82s ease-out forwards
}

.galleryCourtBall:before,
.galleryCourtBall:after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    background: #6d8f1a;
    border-radius: 50%
}

.galleryCourtBall:before {
    left: 4px;
    top: 5px
}

.galleryCourtBall:after {
    right: 4px;
    bottom: 5px
}

@keyframes gwCourtDraw {
    to {
        stroke-dashoffset: 0
    }
}

@keyframes gwLogoReveal {
    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes gwBallIn {
    0% {
        opacity: 0;
        transform: translate(38px, 20px) scale(.65)
    }

    100% {
        opacity: 1;
        transform: none
    }
}

/* Wall gallery: exact nine-frame composition inspired by the supplied reference. */
.galleryWallScene {
    position: relative;
    overflow: hidden;
    background: #f4f7fb;
    padding: 54px 3vw 98px;
    min-height: 780px
}

.galleryWallScene:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 92% 8%, rgba(43, 157, 218, .055), transparent 24%), radial-gradient(circle at 4% 46%, rgba(13, 64, 115, .028), transparent 25%), linear-gradient(180deg, #f4f7fb 0%, #f7f9fc 55%, #f2f6fa 100%);
    pointer-events: none
}

.galleryWallLighting {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.galleryWallLighting i {
    position: absolute;
    top: -145px;
    width: 30%;
    height: 400px;
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, .92), rgba(222, 238, 250, .16) 42%, transparent 72%);
    filter: blur(6px)
}

.galleryWallLighting i:nth-child(1) {
    left: 4%
}

.galleryWallLighting i:nth-child(2) {
    left: 35%
}

.galleryWallLighting i:nth-child(3) {
    right: 3%
}

.galleryWallCanvas {
    position: relative;
    z-index: 1;
    max-width: 1420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 78px
}

.galleryWallCluster {
    position: relative;
    width: 100%;
    aspect-ratio: 1.85/1;
    min-height: 620px
}

.galleryWallFrame {
    margin: 0;
    position: absolute;
    cursor: pointer;
    outline: none;
    opacity: 0;
    transform: translateY(22px) scale(.985);
    transition: opacity .55s ease, transform .55s cubic-bezier(.2, .75, .2, 1), filter .28s ease;
    z-index: 1
}

.galleryWallFrame.wallFrameIn {
    opacity: 1;
    transform: none
}

.galleryWallFrame:hover {
    filter: brightness(1.02);
    z-index: 8
}

.galleryWallFrame:hover .galleryWallFrameMount {
    transform: translateY(-7px) scale(1.018);
    box-shadow: 0 30px 48px rgba(6, 29, 63, .24)
}

.galleryWallFrame:focus-visible .galleryWallFrameMount {
    box-shadow: 0 0 0 4px rgba(42, 167, 223, .28), 0 22px 40px rgba(6, 34, 72, .22)
}

/* Main composition */
.galleryWallFrame.slot-center {
    left: 34%;
    top: 28%;
    width: 34%;
    z-index: 3
}

.galleryWallFrame.slot-left-top {
    left: 5%;
    top: 18%;
    width: 25%
}

.galleryWallFrame.slot-top-left {
    left: 32%;
    top: 0;
    width: 17%
}

.galleryWallFrame.slot-top-right {
    left: 52%;
    top: 2%;
    width: 17%
}

.galleryWallFrame.slot-right-top {
    right: 5%;
    top: 14%;
    width: 15%
}

.galleryWallFrame.slot-left-bottom {
    left: 12%;
    top: 49%;
    width: 16%
}

.galleryWallFrame.slot-right-bottom {
    right: 6%;
    top: 59%;
    width: 24%
}

.galleryWallFrame.slot-bottom-left {
    left: 31%;
    bottom: 0;
    width: 15%
}

.galleryWallFrame.slot-bottom-right {
    left: 51%;
    bottom: 1%;
    width: 20%
}

.galleryWallFrameMount {
    background: linear-gradient(145deg, #123d70 0%, #0a2c58 43%, #061b39 100%);
    padding: 10px;
    border-radius: 2px;
    box-shadow: 0 18px 34px rgba(8, 38, 78, .19), inset 0 0 0 1px rgba(255, 255, 255, .10), inset 0 0 0 4px rgba(0, 0, 0, .08);
    transition: .28s ease;
    position: relative
}

.galleryWallFrameMount:before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(86, 168, 224, .20);
    pointer-events: none
}

.galleryWallFrameMount:after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 6px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 206, 244, .4), transparent);
    pointer-events: none
}

.galleryWallFrameInner {
    background: var(--gw-mat);
    padding: 9px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e1e6ed
}

.galleryWallFrameInner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .38s ease, filter .38s ease
}

.slot-center .galleryWallFrameInner {
    aspect-ratio: 16/9
}

.slot-left-top .galleryWallFrameInner {
    aspect-ratio: 16/9
}

.slot-top-left .galleryWallFrameInner {
    aspect-ratio: 4/3
}

.slot-top-right .galleryWallFrameInner {
    aspect-ratio: 16/9
}

.slot-right-top .galleryWallFrameInner {
    aspect-ratio: 3/4
}

.slot-left-bottom .galleryWallFrameInner {
    aspect-ratio: 3/4
}

.slot-right-bottom .galleryWallFrameInner {
    aspect-ratio: 16/9
}

.slot-bottom-left .galleryWallFrameInner {
    aspect-ratio: 16/9
}

.slot-bottom-right .galleryWallFrameInner {
    aspect-ratio: 4/3
}

.galleryWallFrameHover {
    position: absolute;
    inset: auto 18px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 999px;
    color: #fff;
    background: rgba(7, 29, 61, .84);
    backdrop-filter: blur(8px);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
    opacity: 0;
    transform: translateY(8px);
    transition: .25s
}

.galleryWallFrame:hover .galleryWallFrameHover,
.galleryWallFrame:focus-visible .galleryWallFrameHover {
    opacity: 1;
    transform: none
}

.galleryWallFrame:hover img {
    transform: scale(1.025);
    filter: saturate(1.05)
}

.galleryWallFloorShadow {
    position: absolute;
    z-index: 0;
    left: 8%;
    right: 8%;
    bottom: 24px;
    height: 42px;
    background: radial-gradient(ellipse, rgba(9, 41, 82, .08), transparent 70%);
    filter: blur(8px)
}

/* Lightbox */
.galleryWallLightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(4, 10, 22, .96);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px 84px
}

.galleryWallLightbox.open {
    display: flex
}

.galleryWallLightboxClose,
.galleryWallLightboxNav {
    position: absolute;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: .2s
}

.galleryWallLightboxClose {
    right: 24px;
    top: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%
}

.galleryWallLightboxNav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 74px;
    border-radius: 14px
}

.galleryWallLightboxNav.prev {
    left: 22px
}

.galleryWallLightboxNav.next {
    right: 22px
}

.galleryWallLightboxClose:hover,
.galleryWallLightboxNav:hover {
    background: #fff;
    color: var(--gw-navy)
}

.galleryWallLightboxStage {
    width: min(1280px, 100%);
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px
}

.galleryWallLightboxFrame {
    max-width: 100%;
    max-height: 72vh;
    padding: 12px;
    background: linear-gradient(145deg, #123d70, #071f43);
    box-shadow: 0 35px 100px #000a
}

.galleryWallLightboxFrame img {
    display: block;
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    background: #f8fafc;
    padding: 9px
}

.galleryWallLightboxInfo {
    text-align: center;
    color: #fff
}

.galleryWallLightboxInfo b {
    font-size: 9px;
    letter-spacing: .18em;
    color: #79d5f2
}

.galleryWallLightboxInfo p {
    margin: 6px 0 0;
    max-width: 780px;
    font-size: 11px;
    color: #d5deeb
}

.galleryWallFilmstrip {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding: 5px 2px
}

.galleryWallFilmstrip button {
    width: 72px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    background: #15233d;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    opacity: .55;
    flex: 0 0 auto
}

.galleryWallFilmstrip button.active {
    border-color: var(--gw-orange);
    opacity: 1
}

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

.galleryWallEmpty,
.galleryWallMissing {
    max-width: 1050px;
    margin: auto;
    padding: 72px 24px;
    text-align: center
}

.galleryWallEmpty i {
    font-size: 48px;
    color: #8c9bac
}

.galleryWallEmpty h2 {
    margin: 14px 0 7px
}

.galleryWallEmpty p {
    color: #6d7d90
}

.galleryWallMissing {
    min-height: 70vh
}

.galleryWallMissing .galleryWallBack {
    color: var(--gw-navy);
    opacity: 1;
    transform: none;
    animation: none
}

.galleryWallMissingCard {
    max-width: 640px;
    margin: 26px auto 0;
    padding: 58px 30px;
    border-radius: 24px;
    color: #fff;
    background: radial-gradient(circle at 25% 25%, #1a5596, #0d2b61 52%, #081b40);
    box-shadow: 0 28px 80px rgba(9, 31, 73, .16)
}

.galleryWallMissingCard img {
    width: min(280px, 72%);
    height: 130px;
    object-fit: contain
}

.galleryWallMissingCard h1 {
    font-size: 35px;
    margin: 12px 0
}

.galleryWallMissingCard p {
    color: #d8e4f0
}

@media(max-width:1100px) {
    .galleryWallMotion {
        width: 44%
    }

    .galleryCourtReveal {
        right: -4%;
        transform: scale(.88);
        transform-origin: right center
    }

    .galleryWallCluster {
        min-height: 520px
    }

    .galleryWallFrame.slot-center {
        left: 32%;
        width: 38%
    }

    .galleryWallFrame.slot-left-top {
        left: 2%;
        width: 27%
    }

    .galleryWallFrame.slot-right-top {
        right: 2%;
        width: 17%
    }

    .galleryWallFrame.slot-left-bottom {
        left: 7%;
        width: 18%
    }

    .galleryWallFrame.slot-right-bottom {
        right: 3%;
        width: 25%
    }
}

@media(max-width:760px) {
    .galleryWallIntro {
        min-height: 330px
    }

    .galleryWallIntroInner {
        padding: 42px 24px 40px;
        min-height: 330px
    }

    .galleryWallPlaque h1 {
        font-size: 38px;
        max-width: 100%
    }

    .galleryWallPlaque p {
        max-width: 100%
    }

    .galleryWallMotion {
        width: 100%;
        opacity: .18
    }

    .galleryCourtReveal {
        right: -80px;
        top: 20px;
        transform: scale(.78)
    }

    .galleryWallScene {
        padding: 34px 14px 58px
    }

    .galleryWallLighting {
        display: none
    }

    .galleryWallCanvas {
        gap: 34px
    }

    .galleryWallCluster {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        aspect-ratio: auto;
        min-height: 0
    }

    .galleryWallFrame,
    .galleryWallFrame.slot-center,
    .galleryWallFrame.slot-left-top,
    .galleryWallFrame.slot-top-left,
    .galleryWallFrame.slot-top-right,
    .galleryWallFrame.slot-right-top,
    .galleryWallFrame.slot-left-bottom,
    .galleryWallFrame.slot-right-bottom,
    .galleryWallFrame.slot-bottom-left,
    .galleryWallFrame.slot-bottom-right {
        position: relative;
        inset: auto;
        width: auto;
        transform: translateY(18px) scale(.985)
    }

    .galleryWallFrame.wallFrameIn {
        transform: none
    }

    .galleryWallFrame.slot-center,
    .galleryWallFrame.slot-left-top,
    .galleryWallFrame.slot-right-bottom {
        grid-column: 1/-1
    }

    .galleryWallFrameMount {
        padding: 8px
    }

    .galleryWallFrameInner {
        padding: 7px
    }

    .slot-center .galleryWallFrameInner,
    .slot-left-top .galleryWallFrameInner,
    .slot-right-bottom .galleryWallFrameInner {
        aspect-ratio: 16/9
    }

    .slot-top-left .galleryWallFrameInner,
    .slot-top-right .galleryWallFrameInner,
    .slot-bottom-left .galleryWallFrameInner,
    .slot-bottom-right .galleryWallFrameInner {
        aspect-ratio: 4/3
    }

    .slot-left-bottom .galleryWallFrameInner,
    .slot-right-top .galleryWallFrameInner {
        aspect-ratio: 3/4
    }

    .galleryWallLightbox {
        padding: 70px 12px 20px
    }

    .galleryWallLightboxStage {
        height: 84vh
    }

    .galleryWallLightboxNav {
        top: auto;
        bottom: 18px;
        height: 44px
    }

    .galleryWallLightboxNav.prev {
        left: calc(50% - 58px)
    }

    .galleryWallLightboxNav.next {
        right: calc(50% - 58px)
    }

    .galleryWallFilmstrip {
        max-width: 92vw
    }

    .galleryWallLightboxFrame {
        padding: 8px
    }

    .galleryWallLightboxFrame img {
        padding: 6px
    }
}

@media(max-width:520px) {
    .galleryWallCluster {
        grid-template-columns: 1fr
    }

    .galleryWallFrame.slot-center,
    .galleryWallFrame.slot-left-top,
    .galleryWallFrame.slot-right-bottom {
        grid-column: auto
    }

    .galleryWallMotion {
        opacity: .12
    }

    .galleryCourtReveal {
        right: -120px;
        transform: scale(.66)
    }
}

@media(prefers-reduced-motion:reduce) {

    .galleryWallPlaque>span,
    .galleryWallPlaque h1,
    .galleryWallPlaque p,
    .galleryWallMeta,
    .galleryWallBack,
    .galleryWallFrame,
    .galleryCourtLogo,
    .galleryCourtBall {
        opacity: 1;
        transform: none !important;
        animation: none !important;
        transition: none
    }

    .courtStroke>* {
        stroke-dashoffset: 0;
        animation: none !important
    }
}

/* Album Details photo protection: discourages casual saving/dragging only. */
.galleryWallScene [data-gallery-protected] {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none
}
