.rgw-stage {
    --rgw-track-height: 220vh;
    --rgw-wall-width: 133vw;
    --rgw-gap: 12px;
    --rgw-image-ratio: 1.11;
    --rgw-hover-scale: 1.06;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: var(--rgw-track-height);
    min-height: 150vh;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 0;
    overflow: visible;
    background: #fff;
}

.rgw-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.rgw-grid {
    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-start;
    justify-content: center;
    width: var(--rgw-wall-width);
    max-width: none;
    gap: var(--rgw-gap);
    transform: translate3d(-50%, 0, 0);
    transform-origin: 50% 0;
    will-change: transform;
    backface-visibility: hidden;
}

.rgw-column {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: var(--rgw-gap);
    will-change: transform;
    backface-visibility: hidden;
}

.rgw-card {
    position: relative;
    width: 100%;
    aspect-ratio: var(--rgw-image-ratio);
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    transform: translateZ(0);
}

.rgw-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.rgw-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.001);
    transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1), filter 450ms ease;
}

.rgw-card:hover img {
    transform: scale(var(--rgw-hover-scale));
    filter: brightness(0.88);
}

.rgw-caption {
    position: absolute;
    right: 10px;
    bottom: 8px;
    left: 10px;
    z-index: 2;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
    white-space: nowrap;
    pointer-events: none;
}

.rgw-source[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .rgw-stage {
        --rgw-track-height: 200vh;
        --rgw-wall-width: 165vw;
        --rgw-gap: 10px;
    }
}

@media (max-width: 767px) {
    .rgw-stage {
        --rgw-track-height: 180vh;
        --rgw-wall-width: 235vw;
        --rgw-gap: 8px;
    }

    .rgw-sticky {
        height: 100svh;
        min-height: 100svh;
    }

    .rgw-caption {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rgw-grid,
    .rgw-column,
    .rgw-card img {
        transition: none !important;
    }
}
