.gx-gallery-actions,
.gx-gallery-actions *,
.gxg-modal,
.gxg-modal * {
    box-sizing: border-box;
}

.gx-striprow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 7px;
}

.gx-striprow > .gx-strip {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
}

.gx-gallery-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gx-gallery-actions button {
    min-height: 44px;
    border: 1px solid var(--gxline2, rgba(255, 255, 255, .14));
    border-radius: 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.12;
    cursor: pointer;
    transition: opacity .16s ease, transform .16s cubic-bezier(.22, 1, .36, 1);
}

.gx-ga-ico {
    display: inline-flex;
    flex: 0 0 auto;
}

.gx-ga-ico svg {
    display: block;
}

.gx-gallery-actions--dock {
    flex: 0 0 auto;
    align-self: stretch;
    padding: 2px 0 calc(6px + var(--gx-strip-gutter, 0px));
}

.gx-gallery-actions--dock > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 48px;
    height: 100%;
    padding: 0;
}

.gx-gallery-actions--dock > .gx-gallery-actions__all {
    color: var(--gxtx, #e4e4e7);
    background: var(--gxsurf, #1c1c24);
}

.gx-gallery-actions--dock > .gx-gallery-actions__all .gx-ga-ico {
    color: var(--gxtxd, #a1a1aa);
}

.gx-gallery-actions--dock > .gx-gallery-actions__all strong {
    color: var(--gxg, #22c55e);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.gx-gallery-actions--dock > .gx-gallery-actions__add {
    border-style: dashed;
    border-color: var(--gxg-line, rgba(34, 197, 94, .4));
    color: var(--gxg, #22c55e);
    background: rgba(34, 197, 94, .05);
}

.gx-gallery-actions--quiet {
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}

.gx-gallery-actions--quiet.gx-gallery-actions--only-add {
    justify-content: flex-end;
}

.gx-gallery-actions--quiet > button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 2px;
    border: 0;
    background: none;
    font-size: 12.5px;
}

.gx-gallery-actions--quiet > .gx-gallery-actions__all {
    color: var(--gxtxd, #a1a1aa);
}

.gx-gallery-actions--quiet > .gx-gallery-actions__all strong {
    display: inline-grid;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    place-items: center;
    border-radius: 6px;
    color: var(--gxg, #22c55e);
    background: var(--gxg-soft, rgba(34, 197, 94, .14));
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.gx-gallery-actions--quiet > .gx-gallery-actions__add {
    color: var(--gxg, #22c55e);
}

.gx-gallery-actions--quiet > .gx-gallery-actions__add .gx-ga-ico {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border: 1px dashed var(--gxg-line, rgba(34, 197, 94, .4));
    border-radius: 999px;
}

.gx-gallery-actions button:active:not(:disabled) {
    transform: scale(.97);
}

.gx-gallery-actions button:disabled,
.gx-gallery-actions button[aria-busy="true"] {
    opacity: .52;
    cursor: default;
}

.gx-gallery-actions button:focus-visible,
.gxg-modal button:focus-visible,
.gxg-modal a:focus-visible,
.gxg-modal input:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.gxg-modal__close,
.gxg-modal__add,
.gxg-gallery__tabs button,
.gxg-gallery__more,
.gxg-preview__back,
.gxg-preview__nav,
.gxg-preview__vote,
.gxg-drop__button,
.gxg-upload-file__remove,
.gxg-upload__footer button {
    transition: opacity .16s ease, transform .16s cubic-bezier(.22, 1, .36, 1);
}

.gxg-modal button:disabled,
.gxg-modal button[aria-busy="true"] {
    opacity: .52;
    cursor: default;
}

.gxg-modal__close:active:not(:disabled),
.gxg-modal__add:active:not(:disabled),
.gxg-gallery__tabs button:active:not(:disabled),
.gxg-gallery__more:active:not(:disabled),
.gxg-preview__back:active:not(:disabled),
.gxg-preview__nav:active:not(:disabled),
.gxg-preview__vote:active:not(:disabled),
.gxg-drop__button:active:not(:disabled),
.gxg-upload-file__remove:active:not(:disabled),
.gxg-upload__footer button:active:not(:disabled) {
    transform: scale(.97);
}

html.gxg-lock {
    overflow: hidden;
}

.gxg-modal[hidden] {
    display: none;
}

.gxg-modal {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    color: #e8edf5;
    opacity: 0;
    transition: opacity .18s ease;
}

.gxg-modal.is-open {
    opacity: 1;
}

.gxg-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(5, 8, 12, .84);
    cursor: default;
}

.gxg-modal__panel {
    position: relative;
    display: flex;
    width: min(1040px, 100%);
    max-height: min(88vh, 820px);
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: #10151c;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .52);
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity .18s ease, transform .18s ease;
}

.gxg-modal.is-open .gxg-modal__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gxg-modal__header {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: 70px;
    padding: 13px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #10151c;
}

.gxg-modal__heading {
    min-width: 0;
    flex: 1 1 auto;
}

.gxg-modal__header h2 {
    margin: 0;
    color: #f5f7fa;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
}

.gxg-modal__heading p {
    max-width: 680px;
    margin: 2px 0 0;
    overflow: hidden;
    color: #8f9cad;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gxg-modal__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.gxg-modal__add {
    display: inline-flex;
    min-height: 44px;
    padding: 0 13px;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(34, 197, 94, .36);
    border-radius: 8px;
    color: #9af0b8;
    background: rgba(34, 197, 94, .08);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.gxg-modal__add > span:first-child {
    color: var(--gxg, #22c55e);
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
}

.gxg-modal__close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    color: #dbe1e9;
    background: rgba(255, 255, 255, .05);
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.gxg-modal__add[hidden],
.gxg-view[hidden],
.gxg-card__badge[hidden],
.gxg-card__count[hidden],
.gxg-upload__limits[hidden] {
    display: none;
}

.gxg-gallery-view {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.gxg-gallery__toolbar {
    display: flex;
    min-height: 60px;
    padding: 10px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gxg-gallery__tabs {
    display: flex;
    gap: 6px;
}

.gxg-gallery__tabs button {
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    color: #9ca8b8;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.gxg-gallery__tabs button[aria-pressed="true"] {
    color: #06150b;
    background: var(--gxg, #22c55e);
}

.gxg-status {
    margin: 0;
    color: #94a1b2;
    font-size: 12px;
    line-height: 1.4;
}

.gxg-gallery__grid {
    display: grid;
    min-height: 0;
    max-height: min(58vh, 510px);
    padding: 0 18px 18px;
    align-content: start;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max-content;
    gap: 12px;
    overflow: auto;
    overscroll-behavior: contain;
}

.gxg-card {
    position: relative;
    display: block;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: #080c11;
    cursor: pointer;
}

.gxg-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.002);
    transition: transform .2s ease, opacity .2s ease;
}

.gxg-card:focus-visible .gxg-card__image {
    transform: scale(1.035);
}

.gxg-card__meta {
    position: absolute;
    right: 7px;
    bottom: 7px;
    left: 7px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    pointer-events: none;
}

.gxg-card__badge,
.gxg-card__count {
    display: inline-flex;
    min-height: 24px;
    padding: 4px 8px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 7px;
    color: #edf2f7;
    background: rgba(8, 12, 17, .83);
    font-size: 10px;
    font-weight: 800;
}

.gxg-card__count::before {
    margin-right: 4px;
    content: '▲';
    color: var(--gxg, #22c55e);
    font-size: 8px;
}

.gxg-card.is-leading {
    border-color: rgba(34, 197, 94, .62);
}

.gxg-card.is-selected::after {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #06150b;
    background: var(--gxg, #22c55e);
    content: '✓';
    font-size: 13px;
    font-weight: 900;
}

.gxg-gallery__more {
    min-height: 44px;
    margin: 0 auto 18px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 10px;
    color: #dfe5ed;
    background: rgba(255, 255, 255, .055);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.gxg-preview {
    display: grid;
    height: min(70vh, 680px);
    min-height: 0;
    flex: 1 1 auto;
    padding: 14px 18px 18px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    background: #0c1117;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity .18s ease, transform .18s ease;
}

.gxg-preview[hidden],
.gxg-preview__stage img[hidden] {
    display: none;
}

.gxg-preview.is-open {
    opacity: 1;
    transform: translateX(0);
}

.gxg-preview__toolbar {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gxg-preview__back {
    min-height: 44px;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    color: #b5c0ce;
    background: rgba(255, 255, 255, .05);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.gxg-preview__position {
    color: #9ca8b8;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.gxg-preview__stage {
    position: relative;
    display: grid;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    background: #05080c;
    touch-action: pan-y pinch-zoom;
}

.gxg-preview__stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gxg-preview__loader {
    color: #8995a5;
    font-size: 12px;
}

.gxg-preview__nav {
    position: absolute;
    top: 50%;
    display: grid;
    width: 44px;
    height: 52px;
    padding: 0 0 4px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: #f3f6f9;
    background: rgba(5, 8, 12, .76);
    font: inherit;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.gxg-preview__nav--prev {
    left: 10px;
}

.gxg-preview__nav--next {
    right: 10px;
}

.gxg-preview__nav:active:not(:disabled) {
    transform: translateY(-50%) scale(.96);
}

.gxg-preview__nav:disabled {
    opacity: .22;
}

.gxg-preview__footer {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gxg-preview__author {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.gxg-preview__author small {
    color: #7f8b9a;
    font-size: 10px;
}

.gxg-preview__author a,
.gxg-preview__author span {
    overflow: hidden;
    color: #e8edf5;
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gxg-preview__actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.gxg-preview__status {
    max-width: 360px;
    margin: 0;
    color: #a9b5c4;
    font-size: 11px;
    line-height: 1.35;
    text-align: right;
}

.gxg-preview__vote {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    color: #06150b;
    background: var(--gxg, #22c55e);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.gxg-preview__vote.is-selected,
.gxg-preview__vote:disabled {
    color: #b7c0cc;
    background: rgba(255, 255, 255, .08);
    opacity: 1;
    cursor: default;
}

.gxg-upload {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.gxg-upload__content {
    display: flex;
    width: min(720px, 100%);
    min-height: 0;
    margin: 0 auto;
    flex: 1 1 auto;
    flex-direction: column;
}

.gxg-upload__lead {
    margin: 16px 20px 8px;
    color: #b0bbc9;
    font-size: 13px;
    line-height: 1.45;
}

.gxg-upload__limits {
    margin: 0 20px 14px;
    padding: 10px 12px;
    border: 1px solid rgba(251, 191, 36, .24);
    border-radius: 10px;
    color: #cbd3dd;
    background: rgba(251, 191, 36, .07);
    font-size: 11px;
    line-height: 1.45;
}

.gxg-drop {
    min-height: 126px;
    margin: 0 20px 14px;
    overflow: hidden;
    border: 1px dashed rgba(255, 255, 255, .22);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
}

.gxg-drop.is-dragging {
    border-color: var(--gxg, #22c55e);
    transform: scale(.995);
}

.gxg-drop.is-disabled {
    opacity: .56;
}

.gxg-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.gxg-drop__button {
    display: grid;
    width: 100%;
    min-height: 124px;
    padding: 18px;
    place-items: center;
    align-content: center;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.gxg-drop__icon {
    display: grid;
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
    place-items: center;
    border-radius: 9px;
    color: #06150b;
    background: var(--gxg, #22c55e);
    font-size: 22px;
}

.gxg-drop strong {
    color: #edf2f7;
    font-size: 13px;
}

.gxg-drop small {
    margin-top: 2px;
    color: #8290a1;
    font-size: 10px;
}

.gxg-upload__files {
    display: grid;
    min-height: 0;
    max-height: 310px;
    flex: 1 1 auto;
    padding: 0 20px;
    align-content: start;
    gap: 8px;
    overflow: auto;
}

.gxg-upload-file {
    display: grid;
    min-height: 58px;
    padding: 7px;
    align-items: center;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
}

.gxg-upload-file__image {
    width: 76px;
    height: 43px;
    border-radius: 7px;
    object-fit: cover;
}

.gxg-upload-file__info {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.gxg-upload-file__info strong {
    overflow: hidden;
    color: #dce2ea;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gxg-upload-file__info small {
    color: #7e8997;
    font-size: 10px;
}

.gxg-upload-file__remove {
    min-height: 44px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    color: #c0c9d4;
    background: rgba(255, 255, 255, .055);
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.gxg-upload__footer {
    display: flex;
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 12px 20px 18px;
    justify-content: flex-end;
    gap: 8px;
}

.gxg-upload__status {
    min-height: 20px;
    padding: 8px 20px 0;
}

.gxg-upload__footer button {
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.gxg-upload__cancel {
    color: #bec7d2;
    background: rgba(255, 255, 255, .06);
}

.gxg-upload__submit {
    color: #06150b;
    background: var(--gxg, #22c55e);
}

.gxg-upload__submit:disabled {
    color: #798492;
    background: rgba(255, 255, 255, .055);
    cursor: default;
}

@media (hover: hover) and (pointer: fine) {
    .gx-gallery-actions--dock > button:not(:disabled):hover {
        border-color: var(--gxg, #22c55e);
        transform: translateY(-2px);
    }

    .gx-gallery-actions--quiet > button:not(:disabled):hover .gx-ga-lbl {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .gxg-modal__close:not(:disabled):hover,
    .gxg-modal__add:not(:disabled):hover,
    .gxg-gallery__tabs button:not(:disabled):hover,
    .gxg-gallery__more:not(:disabled):hover,
    .gxg-preview__back:not(:disabled):hover,
    .gxg-preview__vote:not(:disabled):hover,
    .gxg-drop__button:not(:disabled):hover,
    .gxg-upload-file__remove:not(:disabled):hover,
    .gxg-upload__footer button:not(:disabled):hover {
        opacity: .88;
        transform: translateY(-1px);
    }

    .gxg-preview__nav:not(:disabled):hover {
        opacity: .9;
        transform: translateY(-50%) scale(1.04);
    }

    .gxg-card:hover .gxg-card__image {
        transform: scale(1.035);
    }
}

@media (max-width: 900px) {
    .gxg-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .gx-gallery-actions--dock > button {
        width: 44px;
    }

    .gx-gallery-actions--quiet > button {
        font-size: 12px;
    }

    .gxg-modal {
        padding: 0;
        place-items: stretch;
    }

    .gxg-modal__panel {
        width: 100%;
        height: 100%;
        max-height: none;
        border: 0;
        border-radius: 0;
    }

    .gxg-modal__header {
        min-height: 68px;
        padding: 12px 14px;
        gap: 10px;
    }

    .gxg-modal__header h2 {
        font-size: 18px;
    }

    .gxg-modal__heading {
        max-width: calc(100vw - 112px);
    }

    .gxg-modal__add {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .gxg-modal__add-label {
        display: none;
    }

    .gxg-gallery__toolbar {
        min-height: 58px;
        padding: 8px 14px;
    }

    .gxg-gallery__tabs button {
        padding-right: 12px;
        padding-left: 12px;
    }

    .gxg-gallery__grid {
        max-height: none;
        flex: 1 1 auto;
        padding: 0 10px 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .gxg-card {
        border-radius: 9px;
    }

    .gxg-card__badge {
        max-width: 94px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gxg-preview {
        height: auto;
        flex: 0 0 auto;
        padding: 12px 10px 14px;
        grid-template-rows: auto auto auto;
    }

    .gxg-preview__stage {
        aspect-ratio: 16 / 9;
    }

    .gxg-preview__footer {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .gxg-preview__actions {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .gxg-preview__status {
        max-width: none;
        min-height: 0;
        text-align: left;
    }

    .gxg-preview__vote {
        width: 100%;
    }

    .gxg-upload__lead {
        margin: 14px 14px 7px;
    }

    .gxg-upload__limits,
    .gxg-drop {
        margin-right: 14px;
        margin-left: 14px;
    }

    .gxg-upload__files {
        max-height: none;
        padding: 0 14px;
    }

    .gxg-upload__footer {
        padding: 10px 14px 16px;
        border-top: 1px solid rgba(255, 255, 255, .07);
        background: #10151c;
    }

    .gxg-upload__footer button {
        flex: 1 1 0;
    }

    .gxg-upload__status {
        padding-right: 14px;
        padding-left: 14px;
    }
}

@media (max-width: 360px) {
    .gx-gallery-actions--quiet {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .gxg-gallery__grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gx-gallery-actions button,
    .gxg-modal,
    .gxg-modal__panel,
    .gxg-card__image,
    .gxg-preview,
    .gxg-preview__nav,
    .gxg-drop__button {
        transition-duration: .01ms;
    }
}
