/* ============================================================
   모달
   마크업 :
     <div class="modal" data-modal="example">
        <div class="modal__dim" data-modal-close></div>
        <div class="modal__panel">
            <button class="modal__close" type="button" data-modal-close aria-label="닫기">
                <img src="./img/icon_close.png" alt="">
            </button>
            <div class="modal__body">…</div>
        </div>
     </div>

   열기 : <button data-modal-open="example">열기</button>
   닫기 : data-modal-close (딤/X버튼/사용자 정의)
   ============================================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 9999;
}
.modal.is-open { display: block; }

.modal__dim {
    position: absolute;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal__panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 4rem);
    max-width: 50rem;
    max-height: 80vh;
    box-sizing: border-box;
    padding: 2.4rem;
    background: #fff;
    border-radius: 1.6rem;
    overflow-y: auto;
}

.modal__close {
    position: absolute;
    right: 1.6rem;
    top: 1.6rem;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}
.modal__close img {
    width: 100%;
    height: 100%;
    display: block;
}

.modal__body {
    /* padding-top: 1.6rem; */
    font-family: Pretendard, 'NanumSquareNeo', sans-serif;
    font-size: 1.5rem;
    line-height: 1.5;
    color: #060B11;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 모달 열렸을 때 본문 스크롤 잠금 */
body.is-modal-open { overflow: hidden; }
