/* OpenCanvas shared client stylesheet.
 * Theme copies still exist during the in-repo extraction, but this file is now
 * the module-owned home for reusable gallery layout/runtime styles.
 */

:is(#project_gallery, [data-gallery-root]) img {
    height: 100%;
    object-fit: cover;
}

:is(#project_gallery, [data-gallery-root]) .fe-image-lozenge {
    display: none !important;
}

@media (max-width: 767.98px), ((min-width: 768px) and (max-width: 1199.98px) and (orientation: portrait)), ((min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (max-height: 599.98px)) {
    :is(#project_gallery, [data-gallery-root]) .project_img_grid {
        display: grid !important;
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid > .project-image {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
    }
}

@media (min-width: 1200px), ((min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (min-height: 600px)) {
    :is(#project_gallery, [data-gallery-root]) .project_img_grid {
        --gallery-tablet-canvas-scale: clamp(.92, 100vw / 1200, 1);
        align-items: start;
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid > .project-image {
        align-self: start;
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode {
        display: block !important;
        position: relative;
        min-height: var(--canvas-height, 1px);
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image {
        position: absolute !important;
        left: var(--canvas-left, calc((var(--canvas-x, 0) / 12) * 100%)) !important;
        top: var(--canvas-y, 0px) !important;
        width: var(--canvas-width, calc((var(--canvas-w, 12) / 12) * 100%)) !important;
        margin: 0 !important;
        grid-column: auto !important;
        grid-row: auto !important;
        box-sizing: border-box;
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.is-canvas-positioned {
        z-index: var(--canvas-z, auto);
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image[style*="--canvas-h"] {
        height: var(--canvas-h) !important;
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > picture,
    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > .video-container,
    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > img.gallery-media-image,
    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > a.project-autoplay-lightbox-trigger {
        display: block;
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > picture > img.gallery-media-image,
    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > img.gallery-media-image,
    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > .video-container iframe,
    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image.layout-fixed-height > .video-container video {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: var(--media-crop-x, 50%) var(--media-crop-y, 50%);
        transform: scale(var(--media-crop-scale, 1));
        transform-origin: 50% 50%;
        clip-path: inset(0);
    }
}

@media (min-width: 1200px) and (max-width: 1599.98px), ((min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (min-height: 600px)) {
    :is(#project_gallery, [data-gallery-root]) .project_img_grid {
        column-gap: calc(var(--spacing-big) * .82);
        row-gap: calc(var(--spacing-big) * .82);
    }

    :is(#project_gallery, [data-gallery-root]) .project_img_grid.is-canvas-mode > .project-image {
        transform-origin: top left;
    }
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host:focus-visible {
    outline: 2px solid var(--constwhite);
    outline-offset: -2px;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-landscape .project-slide-stack {
    aspect-ratio: 16 / 9;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-standard .project-slide-stack {
    aspect-ratio: 4 / 3;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-square .project-slide-stack {
    aspect-ratio: 1 / 1;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-portrait .project-slide-stack {
    aspect-ratio: 3 / 4;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-landscape .project-slide-frame.is-active,
:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-standard .project-slide-frame.is-active,
:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-square .project-slide-frame.is-active,
:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-aspect-portrait .project-slide-frame.is-active {
    position: absolute;
    inset: 0;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame picture,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame .video-container,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame > a,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame > a > picture,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame > a > .video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame img,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame video,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame iframe,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame .gallery-media-image,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame > a > img,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame > a > .gallery-media-image,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame > a > picture > img.gallery-media-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame .video-container {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame .video-container iframe,
:is(#project_gallery, [data-gallery-root]) .project-slide-frame .video-container video {
    width: 100% !important;
    height: 100% !important;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-fit-contain .project-slide-frame img,
:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-fit-contain .project-slide-frame video,
:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-fit-contain .project-slide-frame iframe,
:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-fit-contain .project-slide-frame .gallery-media-image {
    object-fit: contain;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-frame [data-caption-element],
:is(#project_gallery, [data-gallery-root]) .project-slide-frame .theme-media-caption {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 0;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-pag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 30;
    color: var(--constwhite);
    font-size: 1.125rem;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 1rem;
    text-transform: uppercase;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-pagination-outside {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-pagination-outside .project-slide-stack {
    flex: 1 1 auto;
    min-height: 0;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.project-slide-pagination-outside .project-slide-pag {
    position: static;
    right: auto;
    bottom: auto;
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    width: 100%;
    padding: 0.8rem 0 0;
    color: var(--constblack);
}

:is(#project_gallery, [data-gallery-root]) .project-slide-host.is-black-caption .project-slide-pag {
    color: var(--constblack);
}

:is(#project_gallery, [data-gallery-root]) .project-slide-nav {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 0;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-nav:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

:is(#project_gallery, [data-gallery-root]) .project-slide-count {
    white-space: nowrap;
}

:is(#project_gallery, [data-gallery-root]) .is-slide-member-hidden {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    :is(#project_gallery, [data-gallery-root]) .project-slide-frame {
        transition: none;
    }
}

:is(#project_gallery, [data-gallery-root]) .project-image.layout-fixed-height {
    height: var(--layout-fixed-height);
}

:is(#project_gallery, [data-gallery-root]) .project-image.layout-fixed-height .gallery-media-image,
:is(#project_gallery, [data-gallery-root]) .project-image.layout-fixed-height picture img {
    height: 100% !important;
    width: 100%;
    object-fit: cover;
}

#projectImagesContainer .project-image {
    --device-phone-space-top: 0rem;
    --device-phone-space-bottom: 0rem;
    --device-tablet-portrait-space-top: 0rem;
    --device-tablet-portrait-space-bottom: 0rem;
    --device-tablet-landscape-space-top: 0rem;
    --device-tablet-landscape-space-bottom: 0rem;
}

#projectImagesContainer .project-image[data-layout-phone-space-top="std"] { --device-phone-space-top: var(--device-space-std); }
#projectImagesContainer .project-image[data-layout-phone-space-top="med"] { --device-phone-space-top: var(--device-space-med); }
#projectImagesContainer .project-image[data-layout-phone-space-top="lge"] { --device-phone-space-top: var(--device-space-lge); }
#projectImagesContainer .project-image[data-layout-phone-space-top="xl"] { --device-phone-space-top: var(--device-space-xl); }
#projectImagesContainer .project-image[data-layout-phone-space-bottom="std"] { --device-phone-space-bottom: var(--device-space-std); }
#projectImagesContainer .project-image[data-layout-phone-space-bottom="med"] { --device-phone-space-bottom: var(--device-space-med); }
#projectImagesContainer .project-image[data-layout-phone-space-bottom="lge"] { --device-phone-space-bottom: var(--device-space-lge); }
#projectImagesContainer .project-image[data-layout-phone-space-bottom="xl"] { --device-phone-space-bottom: var(--device-space-xl); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-top="std"] { --device-tablet-portrait-space-top: var(--device-space-std); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-top="med"] { --device-tablet-portrait-space-top: var(--device-space-med); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-top="lge"] { --device-tablet-portrait-space-top: var(--device-space-lge); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-top="xl"] { --device-tablet-portrait-space-top: var(--device-space-xl); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-bottom="std"] { --device-tablet-portrait-space-bottom: var(--device-space-std); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-bottom="med"] { --device-tablet-portrait-space-bottom: var(--device-space-med); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-bottom="lge"] { --device-tablet-portrait-space-bottom: var(--device-space-lge); }
#projectImagesContainer .project-image[data-layout-tablet-portrait-space-bottom="xl"] { --device-tablet-portrait-space-bottom: var(--device-space-xl); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-top="std"] { --device-tablet-landscape-space-top: var(--device-space-std); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-top="med"] { --device-tablet-landscape-space-top: var(--device-space-med); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-top="lge"] { --device-tablet-landscape-space-top: var(--device-space-lge); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-top="xl"] { --device-tablet-landscape-space-top: var(--device-space-xl); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-bottom="std"] { --device-tablet-landscape-space-bottom: var(--device-space-std); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-bottom="med"] { --device-tablet-landscape-space-bottom: var(--device-space-med); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-bottom="lge"] { --device-tablet-landscape-space-bottom: var(--device-space-lge); }
#projectImagesContainer .project-image[data-layout-tablet-landscape-space-bottom="xl"] { --device-tablet-landscape-space-bottom: var(--device-space-xl); }

@media (max-width: 767.98px) {
    #projectImagesContainer .project-image {
        margin-top: var(--device-phone-space-top);
        margin-bottom: var(--device-phone-space-bottom);
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) and (orientation: portrait) {
    #projectImagesContainer .project-image {
        margin-top: var(--device-tablet-portrait-space-top);
        margin-bottom: var(--device-tablet-portrait-space-bottom);
    }
}

@media (min-width: 768px) and (max-width: 1599.98px) and (orientation: landscape) and (min-height: 600px) {
    #projectImagesContainer .project-image {
        margin-top: var(--device-tablet-landscape-space-top);
        margin-bottom: var(--device-tablet-landscape-space-bottom);
    }
}

:is(#project_gallery, [data-gallery-root]).editor-preview-mode .drag-handle,
:is(#project_gallery, [data-gallery-root]).editor-preview-mode .preview-img,
:is(#project_gallery, [data-gallery-root]).editor-preview-mode .img-info,
:is(#project_gallery, [data-gallery-root]).editor-preview-mode .form-info-overlay,
:is(#project_gallery, [data-gallery-root]).editor-preview-mode .reorder-button,
:is(#project_gallery, [data-gallery-root]).editor-preview-mode figcaption span[data-editor-placeholder="1"] {
    display: none !important;
}

:is(#project_gallery, [data-gallery-root]).editor-preview-mode .project-image.has_video .preview-img {
    display: block !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

:is(#project_gallery, [data-gallery-root]).editor-preview-mode .project-image.is-layout-selected,
:is(#project_gallery, [data-gallery-root]).editor-preview-mode .project-image.is-layout-primary {
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}

:is(#project_gallery, [data-gallery-root]).editor-preview-mode .project-image::after {
    border-width: 0 !important;
}

:is(#project_gallery, [data-gallery-root]).editor-preview-mode [data-editor-placeholder="1"] {
    display: none !important;
}

body.stage-preview-no-motion .fade-up,
body.stage-preview-no-motion #hero-image img,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) .project-image,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) .gallery-media-image,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) picture img,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) .project-slide-frame,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) .project-slide-frame img,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) .project-slide-frame video,
body.stage-preview-no-motion :is(#project_gallery, [data-gallery-root]) .project-slide-frame iframe {
    animation: none !important;
    transition: none !important;
}

body.stage-preview-no-motion .fade-up {
    opacity: 1 !important;
    transform: none !important;
    visibility: inherit !important;
}

/* OpenCanvas editor chrome */
.reorder-button {
    transition: all 0.2s linear;
    text-align: center;
    z-index: 2147483000 !important;
    isolation: isolate;
    padding: 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.reorder-button form {
    margin: 0;
}

.reorder-button.reorder-button--draft-publish {
    align-items: center;
}

.reorder-button .reorder-button__status {
    display: grid;
    align-content: center;
    gap: 0.16rem;
    min-width: 8rem;
    padding: 0.2rem 0.55rem 0.2rem 0.15rem;
    text-align: left;
}

.reorder-button .reorder-button__status-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.reorder-button .reorder-button__state-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 1.35rem;
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.66);
    font-size: 9px;
    font-weight: 620;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.reorder-button .reorder-button__status-primary {
    color: rgba(0, 0, 0, 0.92);
    font-size: 12px;
    font-weight: 620;
    line-height: 1.2;
    min-width: 0;
}

.reorder-button .reorder-button__status-secondary,
.reorder-button .reorder-button__status-tertiary {
    min-height: 1.1em;
    font-size: 10px;
    line-height: 1.2;
}

.reorder-button .reorder-button__status-secondary {
    color: rgba(0, 0, 0, 0.54);
}

.reorder-button .reorder-button__status-tertiary {
    color: rgba(0, 0, 0, 0.48);
}

.reorder-button input,
.reorder-button .reorder-button__publish {
    align-self: center;
    min-height: 3.4rem;
    text-transform: uppercase;
    background-color: var(--black);
    border: 1px solid var(--black);
    font-weight: 400;
    border-radius: 4px;
    color: var(--white);
    padding: 0.8rem 1.6rem;
}

.reorder-button input:hover,
.reorder-button .reorder-button__publish:hover {
    cursor: pointer;
}

.reorder-button input[data-save-state="dirty"] {
    background-color: var(--black);
    color: var(--white);
    box-shadow: 0 0 0 2px var(--grey-light);
}

.reorder-button input[data-save-state="saving"] {
    background-color: var(--grey-mid);
    border-color: var(--grey-mid);
    color: var(--white);
    cursor: progress;
    opacity: 0.85;
}

.reorder-button input[data-save-state="clean"] {
    background-color: var(--white);
    color: var(--black);
    border-color: var(--grey-mid);
}

.reorder-button input[data-save-state="dirty"]:hover {
    background-color: rgba(0, 0, 0, 0.92) !important;
    color: var(--white) !important;
    border-color: rgba(0, 0, 0, 0.92) !important;
}

.reorder-button input[data-save-state="clean"]:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--black);
}

.reorder-button .reorder-button__publish {
    width: auto;
    min-width: 8.25rem;
}

.reorder-button .reorder-button__publish:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.92) !important;
    color: var(--white) !important;
    border-color: rgba(0, 0, 0, 0.92) !important;
}

.reorder-button .reorder-button__publish:disabled {
    background-color: var(--white);
    color: var(--black);
    border-color: var(--grey-mid);
    cursor: not-allowed;
    opacity: 0.4;
}

.reorder-button .message.good {
    background-color: rgba(0, 128, 0, 0.1);
    backdrop-filter: blur(9px);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    color: green;
}

.gallery-edit-help {
    max-width: 680px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.26s ease, transform 0.26s ease, border-color 0.22s ease;
    z-index: 2147483001 !important;
    isolation: isolate;
}

.gallery-edit-help.is-review-mode {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.gallery-edit-help.is-review-mode .open-canvas-topbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 238, 238, 0.7));
}

.gallery-edit-help.is-review-mode .gallery-edit-help__drag {
    opacity: 0.48;
}

.gallery-edit-help.is-review-mode .gallery-edit-help__selection-meta,
.gallery-edit-help.is-review-mode .gallery-workspace-state__meta {
    color: rgba(0, 0, 0, 0.5);
}

.gallery-edit-help.is-review-mode .gallery-edit-help__hints {
    opacity: 0.72;
}

.gallery-edit-help.is-review-mode .gallery-edit-help__meta {
    background: rgba(238, 238, 238, 0.82);
}

@media (min-width: 1200px) {
    .gallery-edit-help--floating {
        position: fixed;
        top: 0.75rem;
        right: 2rem;
        width: 600px;
        min-height: 24rem;
        max-height: calc(100vh - 1.5rem);
        z-index: 2147483001 !important;
        overflow: hidden;
    }
}

.gallery-edit-help__body {
    position: relative;
    overflow-y: scroll;
    max-height: calc(100vh - 4.5rem);
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    box-shadow: inset -7px 0 0 var(--grey-light);
    scrollbar-width: thin;
    scrollbar-color: var(--black) var(--grey-light);
}

.gallery-edit-help__body::-webkit-scrollbar {
    width: 7px;
}

.gallery-edit-help__body::-webkit-scrollbar-track {
    background: var(--grey-light);
    border-radius: 999px;
}

.gallery-edit-help__body::-webkit-scrollbar-thumb {
    background: var(--black);
    border-radius: 999px;
}

.gallery-edit-help__collapse {
    position: absolute;
    top: 50%;
    right: -1.7rem;
    transform: translateY(-50%);
    inline-size: 1.7rem;
    block-size: 3.2rem;
    border: 1px solid var(--grey-mid);
    border-left: none;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    background: var(--white);
    color: rgba(0, 0, 0, 0.68);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.gallery-edit-help__collapse span {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transform: translateX(1px);
}

.gallery-edit-help.is-collapsed {
    position: fixed !important;
    top: 50% !important;
    left: auto !important;
    right: 0 !important;
    bottom: auto !important;
    width: 0 !important;
    min-width: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    max-height: none !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    overflow: visible;
}

.gallery-edit-help.is-collapsed .gallery-edit-help__body {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.gallery-edit-help.is-collapsed .gallery-edit-help__collapse {
    right: 0;
    width: 45px;
    border-right: 0;
    border-left: 1px solid var(--grey-mid);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-radius: 8px 0 0 8px;
}

.gallery-edit-help.is-collapsed .gallery-edit-help__collapse span {
    transform: rotate(180deg);
}

.gallery-edit-help__drag {
    touch-action: none;
    position: sticky;
    top: 0;
    z-index: 4;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.1rem 0 0.35rem;
}

.gallery-edit-help.is-dragging .gallery-edit-help__drag {
    cursor: grabbing;
}

.gallery-edit-help__drag-dots {
    font-size: 12px;
    line-height: 1;
}

.gallery-edit-help__selection-meta {
    color: rgba(0, 0, 0, 0.68);
    line-height: 1.4;
}

.open-canvas-shellhead {
    display: grid;
    gap: 0.55rem;
}

.open-canvas-shellhead__rail {
    display: grid;
    align-content: start;
    gap: 0.22rem;
    padding: 0.55rem 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.open-canvas-shellhead__rail-kicker,
.gallery-edit-help__section-label,
.gallery-edit-help__utility-label {
    color: rgba(0, 0, 0, 0.58);
    font-size: 9px;
    font-weight: 620;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.open-canvas-shellhead__mode {
    color: rgba(0, 0, 0, 0.94);
    font-size: 1rem;
    font-weight: 620;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

.open-canvas-shellhead__mode-hint {
    color: rgba(0, 0, 0, 0.56);
    font-size: 10px;
    line-height: 1.3;
}

.open-canvas-shellhead__main,
.open-canvas-topbar__title-wrap,
.open-canvas-topbar__device {
    min-width: 0;
}

.open-canvas-topbar {
    display: grid;
    gap: 0.45rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 238, 238, 0.88));
}

.open-canvas-topbar__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.open-canvas-topbar__title {
    margin-bottom: 0;
    font-size: clamp(2rem, 2.6vw, 2.6rem);
    line-height: 0.98;
}

.open-canvas-topbar__sub,
.open-canvas-topbar__actions,
.gallery-workspace-state__summary,
.gallery-edit-help__history-summary {
    display: grid;
    gap: 0.45rem;
}

.open-canvas-topbar__device select,
.layout-field select,
[data-inspector-field="SubtitleSize"],
[data-inspector-field="ContentColumns"],
[data-inspector-field="TextBlockBg"],
[data-inspector-field="FigureBg"],
[data-inspector-field="TextBlockBgColourID"],
[data-inspector-field="SubtitleColourID"],
[data-inspector-field="ContentColourID"],
[data-inspector-field="FigureBgColourID"],
[data-inspector-field="TextAlignMode"],
[data-inspector-field-text="FigureBgColourID"],
[data-inspector-field="TextBlockPad"] {
    appearance: none;
    width: 100%;
    border: 1px solid var(--grey-mid);
    border-radius: 4px;
    padding: 0.5rem 1.45rem 0.5rem 0.35rem;
    font-size: 10px;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23131313' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.42rem center / 10px 7px;
}

.open-canvas-topbar__device select {
    min-height: 1.9rem;
    padding-inline: 0.6rem 2rem;
    background-color: rgba(255, 255, 255, 0.86);
}

.open-canvas-topbar__help {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
}

.gallery-edit-help__section-label {
    margin: 0.9rem 0 0.25rem;
    font-size: 10px;
}

.gallery-edit-help__section-label.is-mode-active,
.gallery-workspace-state__summary {
    color: rgba(0, 0, 0, 0.92);
}

.gallery-workspace-state {
    padding: 0.45rem 0;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.03);
}

.gallery-workspace-state__summary {
    font-size: 10px;
    font-weight: 620;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.gallery-workspace-state__meta {
    color: rgba(0, 0, 0, 0.6);
    font-size: 10px;
    line-height: 1.35;
}

.gallery-edit-help__hints {
    margin-top: -0.15rem;
}

.gallery-edit-help__hint-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.14rem 0;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: rgba(0, 0, 0, 0.76);
    font-size: 10px;
    font-weight: 520;
    line-height: 1.2;
    white-space: nowrap;
}

.gallery-edit-help__section.is-mode-active,
.layout-inspector-grid.is-mode-active,
.gallery-edit-help__meta.is-mode-active,
.layout-inspector-actions--toggles.is-mode-active {
    border-color: rgba(0, 0, 0, 0.2);
}

.layout-inspector-actions--toggles.is-mode-active,
.gallery-edit-help__meta.is-mode-active {
    background: rgba(0, 0, 0, 0.04);
}

.gallery-edit-breadcrumb {
    padding: 0.32rem 0.42rem;
}

.gallery-edit-breadcrumb__thumbs {
    max-width: 500px;
}

.gallery-edit-breadcrumb img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.gallery-edit-breadcrumb__thumb {
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.14);
}

.gallery-edit-breadcrumb__thumb--text,
.gallery-edit-breadcrumb__thumb--placeholder,
.gallery-edit-breadcrumb__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.28rem;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.82);
    color: rgba(0, 0, 0, 0.78);
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
}

@media (min-width: 900px) {
    .open-canvas-shellhead {
        grid-template-columns: minmax(116px, 136px) minmax(0, 1fr);
        align-items: start;
        gap: 0.75rem;
    }

    .open-canvas-shellhead__rail {
        min-height: 100%;
    }

    .open-canvas-topbar__actions {
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
    }
}

.gallery-edit-help:not(.is-advanced-mode) [data-advanced-control] {
    display: none !important;
}

.gallery-edit-help.is-locked-selection .gallery-edit-help__section,
.gallery-edit-help.is-locked-selection .gallery-edit-help__step {
    display: none !important;
}

.gallery-edit-help.is-locked-selection #galleryLockHint {
    display: block !important;
}

.layout-field {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin: 0;
}

.layout-field > span {
    letter-spacing: 0;
    white-space: nowrap;
}

.layout-field input[type="range"] {
    width: 100%;
    max-width: 100%;
    accent-color: var(--black);
}

.layout-field output {
    min-width: 36px;
    text-align: right;
    font-weight: 640;
    font-size: 12px;
    white-space: nowrap;
}

.layout-field.is-control-edited,
.text-xs.is-control-edited {
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.order-item {
    margin-bottom: 2px !important;
}

.layout-inspector-grid .layout-field,
.layout-batch-controls .layout-field {
    grid-template-columns: 7rem minmax(0, 1fr) 3.25rem;
}

.layout-batch-controls .layout-field > span {
    width: 7rem;
    display: inline-block;
}

.layout-field-row,
.layout-preset-picker,
.gallery-edit-help__section {
    margin: 0;
}

.gallery-edit-help__section {
    margin-top: 0.5rem;
}

.layout-toggle {
    min-height: 24px;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    letter-spacing: 0.06em;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.layout-toggle input[type="checkbox"] {
    inline-size: 14px;
    block-size: 14px;
    accent-color: var(--black);
}

.layout-toggle input[type="checkbox"]:disabled + span,
.layout-toggle input[type="checkbox"]:disabled ~ .layout-toggle-help {
    opacity: 0.4;
}

.layout-toggle input[type="checkbox"]:disabled ~ .layout-toggle-help {
    cursor: default;
    pointer-events: none;
}

.layout-toggle:has(input:checked) {
    border-color: rgba(0, 0, 0, 0.24);
    background: rgba(0, 0, 0, 0.06);
}

.layout-toggle-help {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(0, 0, 0, 0.32);
    border-radius: 50%;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.72);
}

.layout-reset-btn {
    appearance: none;
    -webkit-appearance: none;
    min-height: 26px;
    margin: 0;
    border: 1px solid var(--grey-mid);
    border-radius: 999px;
    padding: 0.42rem 0.86rem;
    background: var(--white);
    color: var(--black);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    text-decoration: none !important;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.layout-reset-btn--subtle.is-active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.layout-reset-btn--subtle.is-active:not(:disabled):hover {
    background: rgba(0, 0, 0, 0.92) !important;
    color: var(--white) !important;
    border-color: rgba(0, 0, 0, 0.92) !important;
}

.layout-reset-btn:disabled {
    opacity: 0.46;
}

.layout-reset-btn--chip {
    min-height: 20px;
    padding: 0.14rem 0.2rem;
    font-size: 8px;
    letter-spacing: 0.03em;
}

.layout-reset-btn:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.36);
    background-color: rgba(0, 0, 0, 0.02);
}

[data-layout-auto],
[data-layout-reset-spacing] {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

[data-layout-auto]:not(:disabled):hover,
[data-layout-reset-spacing]:not(:disabled):hover {
    background: rgba(0, 0, 0, 0.92) !important;
    color: var(--white) !important;
    border-color: rgba(0, 0, 0, 0.92) !important;
}

[data-layout-auto]:disabled,
[data-layout-reset-spacing]:disabled {
    background: var(--white);
    color: rgba(0, 0, 0, 0.4);
    border-color: var(--grey-mid);
}

.gallery-edit-help [data-layout-auto],
.gallery-edit-help [data-layout-reset-spacing] {
    background-color: var(--black) !important;
    background-image: none !important;
    color: var(--white) !important;
    border-color: var(--black) !important;
}

.gallery-edit-help [data-layout-auto]:not(:disabled):hover,
.gallery-edit-help [data-layout-auto]:not(:disabled):focus-visible,
.gallery-edit-help [data-layout-reset-spacing]:not(:disabled):hover,
.gallery-edit-help [data-layout-reset-spacing]:not(:disabled):focus-visible {
    background-color: rgba(0, 0, 0, 0.92) !important;
    background-image: none !important;
    color: var(--white) !important;
    border-color: rgba(0, 0, 0, 0.92) !important;
}

.layout-text-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: rgba(0, 0, 0, 0.76);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.layout-text-link:disabled {
    color: rgba(0, 0, 0, 0.34);
    text-decoration: none;
}

.gallery-edit-help__meta-actions {
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-edit-help__meta-actions > div {
    flex-wrap: wrap;
}

.gallery-edit-help__meta {
    position: sticky;
    bottom: 0;
    background: var(--grey-light);
    z-index: 2;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.gallery-edit-help__status {
    line-height: 1.35;
}

.gallery-edit-help__utility-block + .gallery-edit-help__utility-block {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gallery-edit-help.is-meta-sticky .gallery-edit-help__meta {
    box-shadow: 0 -10px 14px -12px rgba(0, 0, 0, 0.34);
}

.layout-preset-disclosure {
    border: 1px solid var(--grey-mid);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.66);
    padding: 0.4rem 0.5rem;
}

.layout-preset-disclosure > summary {
    list-style: none;
}

.layout-preset-disclosure > summary::-webkit-details-marker {
    display: none;
}

.layout-preset-disclosure > summary::before {
    content: "+";
    display: inline-flex;
    width: 12px;
    justify-content: center;
    font-weight: 700;
}

.layout-preset-disclosure[open] > summary::before {
    content: "-";
}

.layout-preset-picker {
    margin-bottom: 0.55rem;
}

.layout-preset-card {
    border: 1px solid var(--grey-mid);
    border-radius: 4px;
    padding: 0.35rem 0.42rem;
    background: var(--white);
    color: var(--black);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.layout-preset-card.is-active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.layout-preset-card.is-active:hover,
.layout-preset-card.is-active:focus-visible {
    background: rgba(0, 0, 0, 0.92) !important;
    color: var(--white) !important;
    border-color: rgba(0, 0, 0, 0.92) !important;
}

.layout-preset-card:disabled {
    display: none;
}

.layout-preset-card__mini {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1px;
    min-height: 12px;
    border: 1px solid var(--grey-mid);
    border-radius: 4px;
    padding: 1px;
    background: rgba(0, 0, 0, 0.04);
}

.layout-preset-card__mini > span {
    background: var(--black);
    border-radius: 2px;
}

.layout-preset-card.is-active .layout-preset-card__mini {
    border-color: var(--white);
    background: var(--grey-mid);
}

.layout-preset-card.is-active .layout-preset-card__mini > span {
    background: var(--white);
}

.layout-reset-btn:focus-visible,
.layout-preset-card:focus-visible,
.layout-toggle input:focus-visible,
.layout-toggle-help:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.75);
    outline-offset: 2px;
}

.layout-batch-controls {
    border: 1px solid rgba(0, 0, 0, 0.09);
    background: rgba(0, 0, 0, 0.02);
}

#projectImagesContainer.is-layout-locked .drag-handle {
    opacity: 0.25;
    pointer-events: none;
}

#projectImagesContainer {
    position: relative;
}

#projectImagesContainer .styled-number-input {
    font-weight: 400;
    padding: 4px;
    font-size: 15px;
    border-radius: 2px;
    width: 100%;
    background-color: var(--white);
    border: none;
    color: var(--black);
}

.preview-img {
    width: 90px;
    height: auto !important;
    position: absolute;
    z-index: 9;
    bottom: 0.55rem;
    right: 0.55rem;
    transition: all 0.2s linear;
}

.preview-img.with-caption {
    bottom: 60px;
}

.preview-img p {
    font-size: 0.75em;
}

.preview-img .file-name {
    display: none;
}

.preview-img img {
    border: 1px solid var(--constwhite);
}

.preview-img:hover {
    width: 140px;
}

#projectImagesContainer .grid-guides-layer {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

#projectImagesContainer.show-grid-guides .grid-guides-layer {
    opacity: 1;
}

#projectImagesContainer.show-grid-guides::before,
#projectImagesContainer.show-grid-guides::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.28);
    z-index: 8;
    pointer-events: none;
}

#projectImagesContainer.show-grid-guides::before {
    top: 0;
}

#projectImagesContainer.show-grid-guides::after {
    bottom: 0;
}

#projectImagesContainer .grid-guide-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.22);
}

#projectImagesContainer .grid-guide-line.is-col-end {
    background: rgba(0, 0, 0, 0.12);
}

.img-info {
    padding: 0.3rem 0.8rem 0.2rem;
    left: 0;
    background-color: var(--black);
    color: var(--white);
    font-size: 10px;
}

.form-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 1rem 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99;
}

.form-info-overlay input[type="text"] {
    font-size: 0.75em;
    color: var(--black);
    padding: 0.5rem 0.5rem 0.4rem;
    background-color: var(--white);
    border-radius: 4px;
}

.form-info-overlay input[type="text"]:focus {
    outline: none;
    border-bottom-color: var(--grey-mid);
}

.form-info-overlay label {
    color: var(--white);
    font-size: 0.75em;
}

.form-info-overlay button.styled-button-save {
    font-size: 0.75em;
    text-transform: uppercase;
    color: var(--white);
    padding: 0.5rem 0.5rem 0.4rem;
    background-color: blue;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-info-overlay button.styled-button-save:hover {
    background-color: darkblue;
}

.form-info-overlay button.close-alt-info {
    font-size: 20px;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
}

.menu-open .form-info-overlay,
.menu-open .img-info,
.menu-open .preview-img {
    opacity: 0;
}

.drag-handle {
    transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
    width: 24px;
    height: 24px;
    z-index: 9;
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    font-size: 0;
    border: 1px solid var(--grey-mid);
    border-radius: 0;
    cursor: grab;
    background: var(--constwhite) no-repeat center / 12px;
    background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZmlsbD0ibm9uZSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE1IDE1IiB3aWR0aD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNC40OTk5OSAyLjVDNC40OTk5OSAxLjk0NzcyIDQuOTQ3NyAxLjUgNS40OTk5OSAxLjVDNi4wNTIyNyAxLjUgNi40OTk5OSAxLjk0NzcyIDYuNDk5OTkgMi41QzYuNDk5OTkgMy4wNTIyOCA2LjA1MjI3IDMuNSA1LjQ5OTk5IDMuNUM0Ljk0NzcgMy41IDQuNDk5OTkgMy4wNTIyOCA0LjQ5OTk5IDIuNVpNOC40OTk5OSAyLjVDOC40OTk5OSAxLjk0NzcyIDguOTQ3NyAxLjUgOS40OTk5OSAxLjVDMTAuMDUyMyAxLjUgMTAuNSAxLjk0NzcyIDEwLjUgMi41QzEwLjUgMy4wNTIyOCAxMC4wNTIzIDMuNSA5LjQ5OTk5IDMuNUM4Ljk0NzcgMy41IDguNDk5OTkgMy4wNTIyOSA4LjQ5OTk5IDIuNVpNNC40OTk5OCA3LjVDNC40OTk5OCA2Ljk0NzcyIDQuOTQ3NyA2LjUgNS40OTk5OCA2LjVDNi4wNTIyNyA2LjUgNi40OTk5OCA2Ljk0NzcyIDYuNDk5OTggNy41QzYuNDk5OTggOC4wNTIyOCA2LjA1MjI3IDguNSA1LjQ5OTk4IDguNUM0Ljk0NzcgOC41IDQuNDk5OTggOC4wNTIyOCA0LjQ5OTk4IDcuNVpNOC40OTk5OCA3LjVDOC40OTk5OCA2Ljk0NzcxIDguOTQ3NyA2LjUgOS40OTk5OSA2LjVDMTAuMDUyMyA2LjUgMTAuNSA2Ljk0NzcyIDEwLjUgNy41QzEwLjUgOC4wNTIyOCAxMC4wNTIzIDguNSA5LjQ5OTk4IDguNUM4Ljk0NzcgOC41IDguNDk5OTggOC4wNTIyOCA4LjQ5OTk4IDcuNVpNNC40OTk5OCAxMi41QzQuNDk5OTggMTEuOTQ3NyA0Ljk0NzcgMTEuNSA1LjQ5OTk4IDExLjVDNi4wNTIyNyAxMS41IDYuNDk5OTggMTEuOTQ3NyA2LjQ5OTk4IDEyLjVDNi40OTk5OCAxMy4wNTIzIDYuMDUyMjcgMTMuNSA1LjQ5OTk4IDEzLjVDNC45NDc3IDEzLjUgNC40OTk5OCAxMy4wNTIzIDQuNDk5OTggMTIuNVpNOC40OTk5OCAxMi41QzguNDk5OTggMTEuOTQ3NyA4Ljk0NzcgMTEuNSA5LjQ5OTk4IDExLjVDMTAuMDUyMyAxMS41IDEwLjUgMTEuOTQ3NyAxMC41IDEyLjVDMTAuNSAxMy4wNTIzIDEwLjA1MjMgMTMuNSA5LjQ5OTk4IDEzLjVDOC45NDc3IDEzLjUgOC40OTk5OCAxMy4wNTIzIDguNDk5OTggMTIuNVoiIGZpbGw9ImJsYWNrIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=");
    opacity: 0.8;
}

.drag-handle:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.drag-handle.is-locked {
    cursor: not-allowed;
    opacity: 0.96 !important;
    border-color: rgba(0, 0, 0, 0.36);
    background-image: none;
    background-color: rgba(255, 255, 255, 0.96);
}

.drag-handle.is-locked::before {
    content: "";
    position: absolute;
    inset: 5px;
    background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23181818' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 1 1 8 0v3'/%3E%3C/svg%3E");
}

.gallery-selection-marquee {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100001;
    pointer-events: none;
    border: 1.5px solid rgba(0, 0, 0, 0.72);
    background: rgba(0, 0, 0, 0.12) !important;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    backdrop-filter: saturate(1.1);
}

body.is-marquee-selecting,
#projectImagesContainer.is-marquee-selecting {
    user-select: none;
}

#projectImagesContainer.is-marquee-selecting,
#projectImagesContainer.is-marquee-selecting * {
    cursor: crosshair !important;
}

#projectImagesContainer.is-marquee-selecting .project-image,
#projectImagesContainer.is-marquee-selecting .project-image * {
    opacity: 1 !important;
    filter: none !important;
    -webkit-user-drag: none;
}

#projectImagesContainer .project-image.sortable-selected,
#projectImagesContainer .project-image.sortable-chosen,
#projectImagesContainer .project-image.sortable-ghost,
#projectImagesContainer .project-image.sortable-drag,
#projectImagesContainer .project-image.sortable-fallback {
    opacity: 1 !important;
    filter: none !important;
    background: transparent !important;
}

.project-image {
    transition: box-shadow 0.24s ease, transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), margin 0.25s ease;
}

.project-image::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 0 solid transparent;
    border-radius: inherit;
    pointer-events: none;
    z-index: 20;
    transition: border-color 0.2s ease, border-width 0.2s ease;
}

.project-image.is-layout-selected {
    box-shadow: none;
    transform: none;
    opacity: 1 !important;
    filter: none !important;
}

.project-image.is-layout-selected::after {
    border-width: 2px !important;
    border-color: rgba(0, 0, 0, 0.9) !important;
}

.project-image.is-layout-primary {
    box-shadow: none;
    opacity: 1 !important;
    filter: none !important;
}

.project-image.is-layout-primary::after {
    border-width: 3px !important;
    border-color: rgba(0, 0, 0, 0.96) !important;
}

.project-image.is-auto-locked:not(.is-layout-selected):not(.is-layout-primary)::after {
    border-width: 2px !important;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.68);
}

.project-image.is-auto-locked::before {
    content: "";
    position: absolute;
    top: 0.46rem;
    right: 2.12rem;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.78);
    background: rgba(255, 255, 255, 0.98) no-repeat center / 11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23181818' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 1 1 8 0v3'/%3E%3C/svg%3E");
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82), 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 28;
    pointer-events: none;
}

.project-image.is-layout-updated {
    animation: layoutPulse 0.34s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-image.is-layout-deselecting {
    animation: layoutDeselectPulse 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-image.is-layout-deselecting::after {
    border-width: 1px !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
}

.project-image.is-drop-target::after {
    border-width: 2px !important;
    border-color: rgba(0, 0, 0, 0.34) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.88) !important;
}

.project-image.is-drop-target-before::before,
.project-image.is-drop-target-after::before {
    content: "";
    position: absolute;
    top: 0.7rem;
    bottom: 0.7rem;
    width: 0;
    border-left: 2px solid rgba(0, 0, 0, 0.82);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
    z-index: 29;
    pointer-events: none;
}

.project-image.is-drop-target-before::before {
    left: -0.35rem;
}

.project-image.is-drop-target-after::before {
    right: -0.35rem;
}

@media (min-width: 768px) {
    .project-image.layout-col-start-custom {
        grid-column-start: var(--layout-col-start) !important;
    }
}

@keyframes layoutPulse {
    0% { transform: translateY(-1px) scale(0.997); filter: saturate(0.985); }
    55% { transform: translateY(0) scale(1.004); filter: saturate(1.02); }
    100% { transform: translateY(0) scale(1); filter: saturate(1); }
}

@keyframes layoutDeselectPulse {
    0% { transform: translateY(-1px) scale(1); opacity: 1; }
    60% { transform: translateY(0) scale(0.998); opacity: 0.98; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-edit-help,
    .gallery-edit-help__drag,
    .layout-reset-btn,
    .project-image,
    .drag-handle,
    .loci-toast {
        transition: none !important;
        animation: none !important;
    }

    .project-image.is-layout-selected,
    .gallery-edit-help.is-updating {
        transform: none !important;
    }
}

.loci-toast {
    position: fixed;
    bottom: 6.5rem;
    right: 1.5rem;
    z-index: 9999999;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.03em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.loci-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.loci-toast--success {
    background: green;
    color: greenyellow;
}

.loci-toast--error {
    background: #c0392b;
    color: #fff;
}
