.visa-load-container{
    width:100%;
    max-width:1440px;
    margin:0 auto;
}
:root{
    --yellow-fill:#FFF4D5;
    --yellow-border:#FCDD87;
    --yellow-text:#8B6A1B;

    --green-fill:#E8F8E7;
    --green-border:#74BC70;
    --green-text:#1F7A1A;

    --gray-fill:#ECECEE;
    --gray-border:#B9B9BE;
    --gray-text:#444448;

    --blue-fill:#1958D7;
    --blue-text:#FFFFFF;

    --legend-yellow:#FFBB00;
    --legend-green:#078600;
    --legend-black:#232328;
    --legend-blue:#195BD7;
}

*{box-sizing:border-box;}

.container{
    width:100%;
    max-width:var(--screen-1440);
    margin:0 auto;
}

.legend{
    position:relative;
    display:flex;
    min-width: var(--screen-1440);
    height:68px;
    gap:var(--size-20);
    margin-bottom:var(--size-48);
}

.diagram{
    position:relative;
    min-width: var(--screen-1440);
    aspect-ratio:1440/782;
    background:rgba(var(--gary-50));
    border-radius:40px;
    overflow:hidden;

    img{
        min-width: var(--screen-1440);
        padding: 70px 160px 70px 70px;
    }
}

.legend-item{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-weight:700;
    font-size:var(--size-22);
    letter-spacing:var(--size-1);
    border-radius:var(--size-10);
    box-shadow:0 var(--size-1) var(--size-4) rgba(0,0,0,.08);
}
.legend-item.yuchi   { background:var(--legend-yellow); }
.legend-item.chwieop { background:var(--legend-green); }
.legend-item.geoju   { background:var(--legend-black); }
.legend-item.yeongju { background:var(--legend-blue); }

.box{
    position:absolute;
    z-index:2;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    border-radius:var(--size-16);
    border:var(--size-1) solid transparent;
    padding:var(--size-16) var(--size-20);
    gap: var(--size-4);
}
.box .title{
    font-family: Pretendard;
    font-size:var(--size-14);
    font-weight: 500;
    line-height:  var(--size-22);
    letter-spacing: -0.28px;
    white-space:nowrap;
}
.box .code{
    font-family: Pretendard;
    text-align:center;
    font-style: normal;
    font-size:var(--size-24);
    font-weight:600;
    line-height: var(--size-36);
    letter-spacing: -0.48px;
    white-space:nowrap;
}

.box.yellow{ background:var(--yellow-fill); border-color:var(--yellow-border); }
.box.green { background:var(--green-fill);  border-color:var(--green-border); }
.box.gray  { background:var(--gray-fill);   border-color:var(--gray-border);  }
.box.blue  { background:var(--blue-fill);   border-color:var(--blue-fill);  color: rgb(var(--primary-WT));  }
.box.dim .code{ color:#D8B36A; }   /* 예정(미정) 표시용 */

/* E-7 특정활동 박스: 하위 3줄 리스트 */
.box .sublist{
    margin-top:var(--size-3);
    font-size:var(--size-14);
    font-weight:700;
}
.box .sublist div{ white-space:nowrap; }

/* 기업투자/무역경영 박스: 두 항목을 위아래로 */
.box.stacked{
    justify-content:space-evenly;
}
.box.stacked .group{
    display:flex;
    flex-direction:column;
    align-items:center;
}

/*모달*/

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--size-10) var(--size-10) 0 var(--size-10);
}

.custom-modal-title {
    flex: 1;
    text-align: start;
    font-size: var(--size-18);
    font-weight: 700;
}

.custom-modal-close-btn {
    background: transparent;
    border: none;
    color: rgb(var(--gary-400));
    cursor: pointer;
    padding: var(--size-4);
    line-height: 0;
}
.custom-modal-close-btn:hover {
    color: #1a1a1a;
}

.modal-manual-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--size-8);
    width: 100%;
    padding: var(--size-12) var(--size-16);
    border-radius: var(--size-8);
    text-decoration: none;
    background: rgb(var(--theme-100));
    color: rgb(var(--theme-900));
    font-weight: 500;
    font-size: var(--size-16);
    box-sizing: border-box;

}



.modal-manual-icon {
    width: var(--size-16);
    height: var(--size-16);
    vertical-align: middle;
}

.modal-manual-btn:hover {
    background: #f7f7f7;
}

.custom-modal-body {
    min-height: 250px;
    padding : 0 ;
    display: flex;
    flex-direction: column;

    p{
        text-align: left;
        padding-left: var(--size-10);
    }
    a{
        margin-top: var(--size-40);
    }

}
.modal-spacer {
    display: block;
    height: var(--size-12);
}

.custom-modal-body {
    margin-bottom: 0;


    .descp{
        color:rgb(var(--gary-800));
        font-family: Pretendard;
        font-size: 18px;
        font-style: normal;
    }
}

.modal-date {
    display: block;
    margin-top: var(--size-8);
    font-size: var(--size-13);
    color: #8a7f74;
    text-align: center;
}

.custom-modal-body p.modal-bottom-group-btn {
    text-align: center;
    margin-top: auto;
    padding-top: var(--size-20);
}

.custom-modal-body p.modal-bottom-group-date {
    margin-top: var(--size-6);
    margin-bottom: 0;
}

.visa-manual-downloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--size-16);
    margin-top: var(--size-40);
}

.visa-manual-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--size-10);
    min-height: var(--size-56);
    padding: var(--size-14) var(--size-20);
    border: var(--size-1) solid rgb(var(--theme-200));
    border-radius: var(--size-10);
    background: rgb(var(--theme-50));
    color: rgb(var(--theme-900));
    font-family: Pretendard;
    font-size: var(--size-16);
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}

.visa-manual-download-btn img {
    flex: 0 0 auto;
    width: var(--size-16);
    height: var(--size-16);
}

.custom-modal-overlay.visa-download-confirm-modal .custom-modal-wrapper {
    max-width: 380px;
    padding: var(--size-24) var(--size-20) var(--size-20);
    transform: translateY(-60px);
    animation: none;
}

.custom-modal-overlay.visa-download-confirm-modal .custom-modal-header {
    justify-content: center;
    padding: 0;
    margin-bottom: var(--size-14);
    font-size: var(--size-18);
}

.custom-modal-overlay.visa-download-confirm-modal .custom-modal-body {
    display: block;
    min-height: 0;
    padding: 0;
    margin-bottom: var(--size-20);
}

.custom-modal-overlay.visa-download-confirm-modal .custom-modal-body p {
    padding-left: 0;
    text-align: center;
    font-size: var(--size-14);
    line-height: 1.6;
}

.custom-modal-overlay.visa-download-confirm-modal .custom-modal-cancel-btn,
.custom-modal-overlay.visa-download-confirm-modal .custom-modal-confirm-btn {
    padding: var(--size-12);
    border-radius: var(--size-10);
    font-size: var(--size-14);
}

@media (max-width: 767px) {
    .visa-manual-downloads {
        grid-template-columns: 1fr;
    }
}



/* ===== 개별 박스 위치 (상단 legend 컬럼 기준 정렬 + 상하 여백 60px) ===== */
#d4      { left:0.98%;  top:4.86%;  width:10.88%; height:11.42%; }
#e910  { left:12.85%; top:4.86%;  width:10.88%; height:11.42%; }
#e74  { left:31.30%; top:4.86%;  width:10.82%; height:11.42%; }
#f299    { left:57%; top:4.86%;  width:10.82%; height:11.42%; }

#d2      { left:7.09%;  top:23.58%; width:10.88%; height:11.42%; }
#e7      { left:31.30%; top:24%; width:10.82%; height:18.58%; }
#f2r     { left:57%; top:24.58%; width:10.82%; height:11.42%; }

#jikdoin { left:7.09%;  top:43.17%; width:10.88%; height:11.42%; }
#d10     { left:26.09%; top:56.40%; width:10.70%; height:11.65%; }
#d8d9    { left:37.88%; top:52.12%; width:10.70%; height:21.73%; }
#f27     { left:57%; top:44.29%; width:10.82%; height:11.42%; }

#f5      { left:83%; top:43.50%; width:10.94%; height:11.87%; }

#c38     { left:7.09%;  top:83.71%; width:10.88%; height:11.42%; }
#h2      { left:31.92%; top:83.71%; width:10.82%; height:11.42%; }
#f4      { left:57%; top:83.71%; width:10.82%; height:11.42%; }
