.screenshot-block .sc_wrap {
    position: relative;
    display: table;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
}

.screenshot-block .img_caption{
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    margin-block: 12px 10px;
    background: transparent;
    color: inherit;
}

div.imgintxt.screenshot-block img{
    height: auto;
}

@media (max-width: 767px) {
    .screenshot-block .sc_wrap.sc_mobile {
        width: 162px;
        aspect-ratio: 162 / 350;
    }
    .screenshot-block .sc_wrap.sc_mobile img {
        height: auto;
    }
}

.screenshot-block__expand {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
    z-index: 2;
}

.screenshot-block__expand svg {
    width: 100%;
    height: 100%;
    display: block;
}

.screenshot-block__expand rect {
    transition: fill 0.15s ease, fill-opacity 0.15s ease;
}

.screenshot-block .sc_wrap:hover .screenshot-block__expand rect {
    fill: #404040;
    fill-opacity: 1;
}

@media (min-width: 1025px) {
    .screenshot-block__expand {
        width: 42px;
        height: 42px;
    }
}

.sc_wrap a {
    display: flex;
}

.sc_wrap a picture{
    display: contents;
    height: 0;
}

.screenshot-overlay {
    position: fixed;
    justify-content: flex-start;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: center;
    background: #252832;
    padding: 20px;
}

.screenshot-overlay.is-open {
    display: flex;
}

.screenshot-overlay__caption {
    color: #fff;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px;
    text-align: center;
    max-width: min(1200px, 90vw);
}

.screenshot-overlay__img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1200px, 90vw);
    max-height: 80vh;
    border: 1px solid #F1F1F1;
    border-radius: 11px;
}

.screenshot-overlay__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
}

.screenshot-overlay__close svg {
    width: 100%;
    height: 100%;
    display: block;
}

@media (min-width: 769px) {
    .screenshot-overlay {
        padding-top: 100px;
    }
    .screenshot-overlay__close {
        top: 100px;
        right: calc(((100% - min(1500px, 90vw)) / 2) - 80px);
    }
    .screenshot-overlay__img {
        max-width: min(1500px, calc(100vw - 80px));
    }
}


@media (max-width: 1700px) {
    .screenshot-overlay__close {
        top: 40px;
        right: 40px;
    }
}

@media (max-width: 769px) {
    .screenshot-overlay__close {
        top: 20px;
        right: 20px;
    }

    .screenshot-overlay {
        padding-top: 89px;
    }

    .screenshot-block .img_caption{
        margin-top: 10px;
    }
}

.screenshot-overlay__rotate {
    display: none;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 16px;
    line-height: 1.5;
}

.screenshot-overlay__rotate svg {
    flex-shrink: 0;
}

@media (orientation: portrait) and (max-width: 1024px) {
    .screenshot-overlay.is-open.has-rotate-hint .screenshot-overlay__rotate {
        display: flex;
        width: calc(100% - 40px);
        justify-content: center;
    }
}

@media (min-width: 768px) and (max-width: 958px) {
    .screenshot-overlay.is-open .screenshot-overlay__rotate {
        display: flex;
    }
}

@media (orientation: landscape) {
    .screenshot-overlay.is-open .screenshot-overlay__rotate {
        display: none;
    }
}

body.screenshot-overlay-open {
    overflow: hidden;
}

.screenshot-overlay.is-open {
    animation: screenshot-overlay-fade 0.25s ease-out;
}

.screenshot-overlay.is-open.is-closing {
    animation: screenshot-overlay-fade-out 0.4s ease-out forwards;
    pointer-events: none;
}

@media (orientation: landscape) and (max-height: 450px){
    .screenshot-overlay {
        padding-block: 16px 26px;
    }
    .screenshot-overlay__caption{
        margin-bottom: 8px;
    }
    .screenshot-overlay__img{
        max-height: calc(100vh - 74px);
    }
}

@keyframes screenshot-overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes screenshot-overlay-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.screenshot-overlay__img {
    opacity: 1;
    transition: opacity 0.25s ease-out;
}

.screenshot-overlay.is-loading .screenshot-overlay__img {
    opacity: 0;
}

.screenshot-overlay__loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: screenshot-loader-spin 0.8s linear infinite;
}

.screenshot-overlay.is-loading .screenshot-overlay__loader {
    display: block;
}

@keyframes screenshot-loader-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .screenshot-overlay.is-open,
    .screenshot-overlay.is-open.is-closing {
        animation: none;
    }

    .screenshot-overlay.is-open.is-closing {
        display: none;
    }
    .screenshot-overlay__img {
        transition: none;
    }
}
