body.pie-modal-open { overflow: hidden; }

.pie-wrapper {
    display: inline-block;
    position: relative;
}

.pie-image {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    display: inline-block;
}

.pie-image-html img,
.pie-image-html svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.pie-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 20px;
}

.pie-modal.open {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.pie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.pie-modal-dialog {
    position: relative;
    background: #ffffff;
    max-width: 480px;
    width: 90%;
    padding: 20px;
    border-radius: 12px;
    z-index: 2;
    box-sizing: border-box;
}

.pie-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.pie-modal-title {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
}

.pie-modal-content {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.pie-modal-video-wrapper {
    margin-top: 8px;
}

.pie-modal-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .pie-modal-dialog {
        padding: 16px;
        border-radius: 10px;
    }
    .pie-modal-title {
        font-size: 1.2rem;
    }
    .pie-modal-content {
        font-size: 0.9rem;
    }
}
