.chacha-album-page {
    margin: 0;
    padding: 0;
    background: #111;
    color: #fff
}

.chacha-album {
    padding: 40px 40px 140px
}

.chacha-album__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px
}

.chacha-album__header h1 {
    margin: 0
}

.chacha-album__header p {
    margin: 8px 0 0;
    opacity: .6
}

.chacha-album__header a {
    color: inherit
}

.chacha-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px
}

.chacha-photo {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #222
}

.chacha-photo__image {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    overflow: hidden
}

.chacha-photo__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.23, 1, .32, 1)
}

.chacha-photo__image:hover img {
    transform: scale(1.03)
}

.chacha-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .15em;
    opacity: .2;
    transform: rotate(-25deg);
    pointer-events: none;
    user-select: none
}

.chacha-checkbox {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    cursor: pointer
}

.chacha-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.chacha-checkbox span {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    transition: .2s
}

.chacha-checkbox input:checked+span {
    background: #fff;
    box-shadow: inset 0 0 0 6px #111
}

.chacha-selection-bar {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 30px;
    background: rgba(17, 17, 17, .92);
    border-top: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(15px)
}

.chacha-save,
.chacha-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 0;
    background: #fff;
    color: #111;
    text-decoration: none;
    cursor: pointer;
    font: inherit
}

.chacha-save:disabled {
    opacity: .6;
    cursor: wait
}

.chacha-lightbox {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: rgba(0, 0, 0, .94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s, visibility .25s
}

.chacha-lightbox[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto
}

.chacha-lightbox img {
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 100px);
    object-fit: contain
}

.chacha-lightbox button {
    position: absolute;
    border: 0;
    background: none;
    color: #fff;
    font-size: 42px;
    cursor: pointer
}

.chacha-lightbox__close {
    top: 15px;
    right: 25px
}

.chacha-lightbox__prev {
    left: 25px
}

.chacha-lightbox__next {
    right: 25px
}

.chacha-login {
    display: flex;
    justify-content: center;
    padding: 80px 20px
}

.chacha-login__form {
    display: grid;
    width: 100%;
    max-width: 420px;
    gap: 10px
}

.chacha-login__form h1 {
    margin-bottom: 20px
}

.chacha-login__form input {
    padding: 14px;
    border: 1px solid #ccc
}

.chacha-login__form button {
    padding: 14px;
    border: 0;
    background: #111;
    color: #fff;
    cursor: pointer
}

.chacha-error {
    padding: 12px;
    background: #fee;
    color: #900
}

.chacha-albums {
    padding: 40px
}

.chacha-albums__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px
}

.chacha-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #ddd;
    gap: 20px
}

.chacha-row--head {
    font-weight: 700
}

.chacha-row .chacha-button {
    justify-self: start
}

@media(max-width:700px) {
    .chacha-album {
        padding: 25px 15px 120px
    }

    .chacha-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px
    }

    .chacha-album__header {
        align-items: flex-start;
        flex-direction: column
    }

    .chacha-selection-bar {
        padding: 14px 15px
    }

    .chacha-selection-count {
        font-size: 14px
    }

    .chacha-save {
        padding: 10px 12px
    }

    .chacha-lightbox {
        padding: 20px
    }

    .chacha-lightbox img {
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 80px)
    }

    .chacha-lightbox__prev {
        left: 5px
    }

    .chacha-lightbox__next {
        right: 5px
    }

    .chacha-row {
        grid-template-columns: 1fr;
        gap: 8px
    }

    .chacha-row--head {
        display: none
    }

    .chacha-albums {
        padding: 25px 15px
    }
}


.chacha-admin-selections {
    padding: 50px;
    max-width: 1400px;
    margin: auto
}

.chacha-admin-selections__header {
    margin-bottom: 40px
}

.chacha-admin-selection-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 1.2fr;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #ddd
}

.chacha-admin-selection-row--head {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .5
}

.chacha-button {
    display: inline-flex;
    padding: 11px 16px;
    background: #111;
    color: #fff;
    text-decoration: none
}

.chacha-admin-selection {
    padding: 50px;
    max-width: 1600px;
    margin: auto
}

.chacha-admin-selection__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 50px
}

.chacha-admin-selection__header h1 {
    margin: 20px 0 5px
}

.chacha-admin-selection__header p {
    margin: 0;
    opacity: .6
}

.chacha-back {
    color: inherit;
    text-decoration: none
}

.chacha-admin-selection__count {
    text-align: right
}

.chacha-admin-selection__count strong {
    font-size: 32px;
    display: block
}

.chacha-admin-selection__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
}

.chacha-admin-selection__photo {
    position: relative;
    overflow: hidden;
    background: #eee
}

.chacha-admin-selection__photo a {
    display: block
}

.chacha-admin-selection__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover
}

.chacha-admin-selection__filename {
    padding: 10px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff
}

@media(max-width:900px) {
    .chacha-admin-selection__grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .chacha-admin-selection-row {
        grid-template-columns: 1fr 1fr
    }

    .chacha-admin-selection-row--head {
        display: none
    }
}

@media(max-width:600px) {

    .chacha-admin-selections,
    .chacha-admin-selection {
        padding: 25px 15px
    }

    .chacha-admin-selection__grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .chacha-admin-selection__header {
        align-items: flex-start;
        flex-direction: column
    }

    .chacha-admin-selection__count {
        text-align: left
    }
}