p {margin-top:0px;margin-bottom:0px;} 	

/*레이어팝업 */
.layer{position:absolute;z-index:9999999999999999999999999999999999999999;border:3px solid #282c2f;background:#fff;}
.layer .tith1{margin-bottom:10px;font-size:18px;color:#2c2c2c;letter-spacing:-1px;line-height:16px;text-align:center;font-weight:bold;}
.layer .tith2{margin-bottom:8px;margin-top:15px;font-size:13px;color:#2c2c2c;letter-spacing:-1px;line-height:16px;text-align:center;font-weight:bold;}
.layer .gnb{padding:17px 20px 0;}
.layer .text01{color:#7d7d7d;line-height:18px;font-size:12px;padding-top:7px;}
.layer .btn{clear:both;padding:5px 0;text-align:center}
.layer .btn img{vertical-align:top}
.layer .ly_footer{font-size:14px;color:#fff;height:20px;text-align:right;background:#003d75;border-top:1px solid #e3e9ec;}
.layer .clse{position:absolute;top:13px;right:8px}
.ms_popup_hover{background:#003d75;color:#FFFFFF;}

/* 팝업 내용 영역의 기본 스타일 */
.layer > div:first-child {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.layer > div:first-child img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media screen and (max-width: 979px) {	
    .layer{
        left:5% !important;
        width:90% !important;
        top:50% !important;
        transform: translateY(-50%);
    }
    
    /* 모바일에서 팝업 높이를 자동 조정 */
    .layer > div:first-child {
        height: auto !important;
        max-height: calc(100vh - 120px) !important;
        min-height: 200px !important;
    }
    
    .layer > div:first-child img {
        max-height: calc(100vh - 200px);
    }
}

@media screen and (max-width: 768px) {
    .layer{
        left:3% !important;
        width:94% !important;
        top:50% !important;
        transform: translateY(-50%);
    }
    
    /* 태블릿에서 팝업 높이를 자동 조정 */
    .layer > div:first-child {
        height: auto !important;
        max-height: calc(100vh - 100px) !important;
        min-height: 180px !important;
    }
    
    .layer > div:first-child img {
        max-height: calc(100vh - 180px);
    }
}

@media screen and (max-width: 480px) {
    .layer{
        left:2% !important;
        width:96% !important;
        top:50% !important;
        transform: translateY(-50%);
    }

    /* 모바일 폰에서 팝업 높이를 자동 조정 */
    .layer > div:first-child {
        height: auto !important;
        max-height: calc(100vh - 80px) !important;
        min-height: 150px !important;
    }
    
    .layer > div:first-child img {
        max-height: calc(100vh - 160px);
    }
    
    .ly_footer {
        font-size: 12px !important;
        height: 18px !important;
    }
}