
*, *::before, *::after {
    box-sizing: border-box;
}

.header-info-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex-shrink: 0;
    min-height: 100px;
    max-height: 200px;
    margin: 0 auto;
    /*padding-top: 10px;*/
    /*padding-bottom: 10px;*/
    position: relative;
    overflow: visible;
}

.header-mmz-logo {
    flex-shrink: 0;
    width: 109px;
    height: 48px;
    position: relative;
    object-fit: cover;
    cursor: pointer;
}

.header-top-support-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex-shrink: 0;
    width: 100%;
    max-width: 1100px;
    height: auto;
    padding-top: 10px; padding-bottom: 10px;
    background-color: #FFFFFF;
    background-image: url("/images/BETA VERSION.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 140px auto;
    position: relative;
    overflow: visible;
}


*, *::before, *::after {
    box-sizing: border-box;
}

.menu-container {
    background: var(--theme-mmz);
    padding: 0 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    overflow: visible;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.left-menu-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    width: 50px;
    height: auto;
    position: relative;
    overflow: visible;
}

.center-menu-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    width: 100%;
    @media only screen and (max-width: 500px) {
        justify-content: space-between;
        gap: 0;
    }
}

.right-menu-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    width: 50px;
    position: relative;
    overflow: hidden;
}

.menu-icon {
    cursor: pointer;
}

.mobile-menu-icon {
    position: relative;
}

.home-icon {
    color: var(--theme-menubar-text);
    text-align: left;
    font-family: "Pretendard", sans-serif;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.gallery-icon {
    color: var(--theme-menubar-text);
    text-align: left;
    font-family: "Pretendard", sans-serif;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.board-icon {
    color: var(--theme-menubar-text);
    text-align: left;
    font-family: "Pretendard", sans-serif;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.timeline-icon {
    color: var(--theme-menubar-text);
    text-align: left;
    font-family: "Pretendard", sans-serif;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.noti-container {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    width: auto;
    cursor: pointer;
}

.noti-icon {
    flex-shrink: 0;
    width: 16px;
    height: 20px;
    position: relative;
    overflow: visible;
    aspect-ratio: 16/20;
}

.noti-counter-container {
    color: var(--theme-mmz);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    gap: 0px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    overflow: hidden;
    font-family: "Pretendard", sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.noti-counter-container:not(:empty):not(:contains("0")) {
    background: #ffffff;
    color: #01263a;
}

.login-icon {
    flex-shrink: 0;
    width: 24px;
    height: auto;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

/* ============================================== */
/* header menu */
/* ============================================== */

.menu_style {
    color: var(--theme-menubar-text);
    text-align: left;
    font-family: "Pretendard", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 공통 래퍼 */
.has-submenu {
    position: relative; /* 기본: 래퍼 기준 배치 */
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 트리거 버튼을 텍스트처럼 */
.menu-btn {
    all: unset;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    color: var(--theme-menubar-text);Z
}

/* 서브메뉴 기본 박스 */
.submenu {
    position: absolute;
    top: 100%; /* 트리거 바로 아래 */
    left: 0; /* .align-right 쓰면 오른쪽 정렬 */
    width: auto;
    min-width: 160px;
    max-width: 100%;
    background: var(--theme-mmz);
    color: var(--theme-menubar-text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    border-radius: 6px;

    /* 처음엔 숨김 + 클릭 막힘 */
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 200000;

    /* 내부 스크롤 (핵심) */
    max-height: 70vh; /* 필요하면 조절 */
    overflow: auto;
    -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE, Edge 구버전 */
}

/* 오른쪽 정렬 옵션 */
.align-right > .submenu {
    left: auto;
    right: 0;
}

/* 열렸을 때 표시 */
.is-open > .submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 리스트 기본 */
.submenu ul {
    margin: 0;
    padding: 6px 0;
    list-style: none;
}

.submenu li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.submenu li a:hover {
    color: #01263a;
    background: #d1cece;
}

/* 포털 모드에서 .submenu는 화면 기준으로 고정 */
.submenu.portal {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
}

/* Body 스크롤 잠금 (position:fixed로 점프 방지 + 스크롤 위치 보존은 JS가 처리) */
.body-no-scroll {
    overflow: hidden !important;
    width: 100%;
    position: fixed; /* 스크롤 완전 차단 */
}


/* ===== 모달 오버레이 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none; /* openNotificationModal()에서 flex로 변경 */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30000;
}

/* ===== 모달 박스: 350px x 70vh ===== */
.modal-box {
    width: 400px;
    height: 70vh;
    max-height: 70vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
}

/* ===== 모바일: 화면 폭이 좁을 때 전체 화면 덮기 ===== */
@media (max-width: 768px) {
    .modal-box {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0; /* 둥근 모서리 제거 */
    }

    .modal-header {
        background: var(--theme-mmz);
        border-bottom: 1px solid #ddd;
    }

    .modal-iframe {
        height: calc(100% - 48px); /* 헤더 높이를 뺀 영역 차지 */
    }
}

/* 헤더 */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    background: #f7f7f7;
}

.modal-title {
    font-weight: 700;
    font-size: 15px;
}

.modal-close {
    width: 32px;
    height: 32px;
    line-height: 28px;
    font-size: 20px;
    text-align: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

/* 본문 (iframe이 내용 전체 차지) */
.modal-body {
    flex: 1;
    overflow: hidden;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* 모달 열릴 때 바디 스크롤 잠금 (선택) */
body.modal-open {
    overflow: hidden;
}


/* ========== 쪽지 모달 스타일 (알림과 별개로 분리) ========== */
.msg-modal-overlay {
    position: fixed;
    inset: 0;
    display: none; /* JS에서 flex로 변경 */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30000;
}

.msg-modal-box {
    width: 800px;
    height: 85vh;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 768px) {
    .msg-modal-box {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-iframe {
        height: calc(100% - 48px);
    }
}

div#mobile-home-menu {
    min-width: 250px;
    height: auto;
    padding: 1px 1px;
    margin-top: 10px;
    background: var(--theme-mmz);
}