.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal-backdrop.is-active {
    display: flex;
}

.modal-window {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.modal-flex {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
}

.modal-left {
    flex: 1;
    background: #f1f5f9;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-left img {
    max-width: 100%;
    max-height: 25vh;
    object-fit: contain;
}

.modal-right {
    flex: 1;
    padding: 20px;
}

.m-title-bold {
    font-size: 1.2rem;
    font-weight: 800;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.m-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
}

.m-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
}

.m-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

#main-content-blur.is-blurred {
    filter: blur(10px);
    pointer-events: none;
}

@media (min-width: 768px) {
    .modal-flex {
        flex-direction: row;
    }

    .modal-window {
        max-height: 85vh;
    }

    .modal-left {
        min-height: 400px;
    }

    .modal-left img {
        max-height: 60vh;
    }

    .modal-right {
        padding: 35px;
    }

    .m-title-bold {
        font-size: 1.6rem;
    }
}


body.stamp-modal-open { overflow: hidden !important; }
.modal-window { position: relative; }
.stamp-modal-close { position: absolute; top: 0.65rem; right: 0.65rem; z-index: 1; width: 44px; height: 44px; border: 1px solid #dbe2ea; border-radius: 50%; background: #fff; color: #111; font-size: 1.5rem; cursor: pointer; }
.stamp-modal-close:focus-visible { outline: 3px solid #3366cc; outline-offset: 2px; }
.modal-right { padding-top: 3.5rem; }

.m-value { min-width: 0; overflow-wrap: anywhere; }

.stamp-illustration-note,
.stamp-illustration-context { margin: 0 0 1rem; font-size: 0.82rem; line-height: 1.6; color: var(--text-muted); }
#stempelModal [hidden] { display: none !important; }
