#popup_this {
    display: none;
    position: relative;
    width: min(88vw, 620px);
    max-height: 90vh;
    padding: 10px;
    background: #fff;
    border: 3px solid #510600;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    box-sizing: border-box;
    z-index: 10000;
}

#popup_this img {
    display: block;
    width: 100%;
    max-height: calc(90vh - 20px);
    object-fit: contain;
}

.b-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    background: #510600;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
    font-size: 30px;
    line-height: 34px;
    font-weight: 700;
    text-align: center;
    z-index: 1;
}

.b-close:hover,
.b-close:focus {
    background: #7a0a02;
    outline: 3px solid rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
    #popup_this {
        width: 92vw;
        padding: 6px;
    }

    .b-close {
        top: -12px;
        right: -10px;
    }
}
