.gallery {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    width: 100%;

    box-sizing: border-box;
}

.gallery *,
.gallery ::before,
.gallery ::after {
    box-sizing: inherit;
}


.gallery__link {
    display: block;
}

.gallery__img {
    display: block;
    width: 100%;
}



/* *** */

.tinyx {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    animation: openTinyx 0.2s ease forwards;
    box-sizing: border-box;
    z-index: 9;
}
.tinyx.is-hidden {
    display: none;
}

.tinyx *,
.tinyx ::before,
.tinyx ::after {
    box-sizing: inherit;
}

.tinyx__close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 7;
}

.tinyx__close-btn {
    display: inline-block;
    margin: 0;
    padding: 10px 15px;
    font-family: sans-serif;
    font-size: 28px;
    color: #fff;
    line-height: 1;
    background-color: transparent;
    border: 0;
    transition: opacity 0.2s ease;
    opacity: 0.5;
    cursor: pointer;
}
.tinyx__close-btn:hover,
.tinyx__close-btn:focus {
    opacity: 1;
}

.tinyx__control-btn {
    display: inline-block;
    position: absolute;
    top: 0;
    margin: 0;
    padding: 10px 15px;
    width: 64px;
    height: 100%;
    font-family: sans-serif;
    font-size: 28px;
    color: #fff;
    line-height: 1;
    background-color: rgba(0, 0, 0, 0.5);
    border: 0;
    transition: opacity 0.2s ease;
    opacity: 0.1;
    cursor: pointer;
    z-index: 3;
}
.tinyx__control-btn:hover,
.tinyx__control-btn:focus {
    opacity: 1;
}
.tinyx__control-btn--prev {
    left: 0;
}
.tinyx__control-btn--next {
    right: 0;
}

.tinyx__cont {
    position: relative;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.25);
    animation: openTinyxCont 0.3s ease forwards;
}

.tinyx__img {
    display: block;
    max-width: 90vw;
    background: #fff;max-height: 90vh;
}

@keyframes openTinyx {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes openTinyxCont {
    0% {
        transform: scale(0.1);
    }
    100% {
        transform: scale(1);
    }
}