.back {
    width: 2rem;
    height: 2rem;
    position: sticky;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem;
    box-shadow: 0.5rem 0.5rem 0.5rem #0003;
    z-index: 1;
}
.image-grid {
    grid-area: image-grid;
    width: 90%;
    margin: 0 auto;
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
}
.title {
    margin: 3vh auto;
    border-bottom: 1px solid #3d4657;
    padding: 1rem;
}
.column {
    flex: 25%;
    max-width: calc(25% - 0.5em);
    padding: 0 0.25em;
}
.image-grid img {
    margin-top: 0.5em;
    vertical-align: middle;
    width: 100%;
    height: auto;
    box-shadow: 0.2em 0.2em 0.3em #0006;
    outline: none;
    background: #88add0;
    cursor: pointer;
}
.image-grid img:nth-of-type(3n + 1) {
    background: #a4a3e2;
}
.image-grid img:nth-of-type(3n + 2) {
    background: #cb97c1;
}
.imageviewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    background: #000;
    transition: all 0.3s ease-in-out;
    transition-property: width, height;
    touch-action: none;
    z-index: 5;
}
.imageviewer .close {
    padding: 0.2rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}
.imageviewer .control-btn {
    position: absolute;
    background: none;
    color: var(--text-primary);
    border-radius: 50%;
    width: var(--ui-btn-size);
    height: var(--ui-btn-size);
    transition:
        background-color 0.2s ease-in-out,
        opacity 0.3s ease-in-out;
    z-index: 9;
}
.control-btn > .link-icon {
    padding: 0;
}
.imageviewer .prev,
.imageviewer .next {
    top: 50%;
    transform: translateY(-50%);
}
.imageviewer .prev {
    left: 1rem;
}
.imageviewer .next {
    right: 1rem;
}
.imageviewer .control-btn:hover,
.imageviewer .control-btn:active {
    background: #ffffff4d;
}
.imageviewer .pagination {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translate(-50%);
    height: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6;
}
.imageviewer .pagination button {
    border: none;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    margin: 0 0.5rem;
    background: #e1ecff80;
    box-shadow: 0.2rem 0.2rem 0.5rem #00000080;
    transition: background-color 0.1s ease-in-out;
}
.imageviewer .pagination button:hover {
    background: #e1ecffb3;
}
.imageviewer .pagination button[selected],
.imageviewer .pagination button:active {
    background: #e1ecff;
}
.imageviewer .info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border-radius: 1.5rem;
    background: none;
    border: 2px solid #e1ecff;
    color: #e1ecff;
    max-width: var(--ui-btn-size);
    max-height: var(--ui-btn-size);
    transition:
        max-width 0.3s ease-in-out,
        max-height 0.3s ease-in-out,
        background-color 0.2s ease-in-out;
    box-shadow: 0 0 5rem #000;
    overflow: hidden;
    z-index: 6;
}
.imageviewer .info:not([open]):hover,
.imageviewer .info:not([open]):active {
    background: #e1ecff4d;
}
.imageviewer .info[open] {
    max-width: 40rem;
    max-height: 70vh;
    cursor: default;
    background: #00000080;
}
@media (max-width: 800px) {
    .imageviewer .info[open] {
        max-width: 70%;
    }
}
.imageviewer .info p {
    padding: 0.5rem;
    overflow: hidden;
}
.imageviewer .info span {
    display: block;
    top: 0;
    right: 0;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    font-size: 1.5rem;
    pointer-events: none;
}
.imageviewer .footer {
    position: absolute;
    bottom: 0;
    height: 20%;
    width: 100%;
    background: linear-gradient(#0000, #000000e6);
    pointer-events: none;
    z-index: 7;
}
.imageviewer .footer .img-title {
    width: 70%;
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    font-size: var(--fs-image-title);
}
.imageviewer .full-img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    transition:
        opacity 0.1s ease-in-out,
        transform 0.3s ease-in-out;
}
::-webkit-scrollbar,
::-webkit-scrollbar-thumb {
    width: 5px;
    height: 5px;
    border-radius: 2.5px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
    background: #121317;
}
::-webkit-scrollbar-thumb {
    background: #e1ecff;
}
::-webkit-scrollbar-thumb:hover {
    background: #d8dee9;
}
::selection {
    background: #5e81ac4d;
}
.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
