/* 번역본 비교·관련 구절·주석 공용 모달 */
#pop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 34, 38, .52);
    backdrop-filter: blur(2px);
    box-sizing: border-box;
}

#pop-overlay.is-open {
    display: flex;
}

#pop {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: min(78vh, 760px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d6e1de;
    border-radius: 14px;
    background: #fff;
    color: #263c43;
    box-shadow: 0 24px 70px rgba(13, 35, 40, .28);
    font-size: inherit;
}

.pop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    min-height: 54px;
    padding: 0 12px 0 18px;
    border-bottom: 1px solid #dce7e4;
    background: #f5f9f8;
}

.pop-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #244b45;
    font-size: 1rem;
    font-weight: 700;
}

#pop-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #586a66;
    font-size: 1.15rem;
    cursor: pointer;
}

#pop-close:hover,
#pop-close:focus {
    background: #e7f0ee;
    color: #244b45;
    outline: none;
}

#pop-content {
    flex: 1 1 auto;
    padding: 20px;
    overflow: auto;
    line-height: 1.75;
    overscroll-behavior: contain;
}

#pop-content a {
    color: #315f58;
    font-weight: 600;
    text-decoration: none;
}

#pop-content a:hover {
    text-decoration: underline;
}

.pop-loading,
.pop-error {
    padding: 24px 10px;
    color: #687b80;
    text-align: center;
}

body.pop-open {
    overflow: hidden;
}

@media screen and (max-width: 600px) {
    #pop-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    #pop {
        width: 100%;
        max-height: 84vh;
        border-radius: 14px 14px 10px 10px;
    }

    .pop-header {
        min-height: 50px;
        padding-left: 15px;
    }

    #pop-content {
        padding: 16px;
    }
}
