/* 기본 스타일 */
:root {
    --primary-color: #15392d;
    --secondary-color: #6a7c92;
    --dark-color: #2b2b2b;
    --light-color: #f4f7ff;
    --body-color: #637381;
    --heading-color: #212b36;
    --transition: all 0.3s ease-out 0s;
}

.layout-container,
.header,
.header *,
.nav-container,
.nav-container *,
.footer,
.footer *,
.sidebar,
.sidebar *,
.dropdown-menu,
.dropdown-menu *,
.floating-buttons,
.floating-buttons * {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-style: normal;
    overflow-x: hidden;
    background-color: #adadad;
    /* 뒤쪽 레이어: 아주 살짝 어두워진 회색 배경 */
}

/* 앞쪽 레이어 1: 반투명 종이 질감이 회색 배경 위에 덮임 */
body::before {
    content: "";
    position: fixed;
    /* 스크롤을 내려도 화면 가득 고정되게 */
    inset: 0;
    background-image: url('../img/bg_pp.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    opacity: 0.16;
    /* 투명도를 조정하여 뒤의 #adadad와 섞이게 함 */
    z-index: -999;
    /* 제일 뒤쪽 영역에 고정 */
    pointer-events: none;
}

/* 중간 레이어 2: 은은하고 세련된 네모 박스 그물 격자 패턴 오버레이 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center top;
    z-index: -998;
    pointer-events: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* 레이아웃 컨테이너 */
.layout-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: calc(100% - 32px);
    max-width: 1320px;
    margin: 25px auto 0;
    /* 상단 여백 25px, 하단 여백 0 (푸터와 밀착) */
    padding-top: 15px;
    box-sizing: border-box;
}

/* 콘텐츠 너비 옵션 */
.layout-container.boxed {
    width: calc(100% - 32px);
    max-width: 1320px;
}

.layout-container.full {
    width: calc(100% - 32px);
    max-width: 1400px;
}

/* 헤더 스타일 */
.header {
    padding: 0;
    position: relative;
    border-radius: 3px 3px 0px 0px;
    /* 상단 모서리 둥글게 */
    z-index: 100;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 헤더 구역 분리 (단일 객체 마스크 기반 지그제그 찢어짐 효과) */
.header-top {
    width: 100%;
    height: 165px; /* 시각적으로 좀 더 넉넉하고 프리미엄한 높이 배정 */
    background-image: var(--header-bg, url('../img/bg_pp.webp'));
    background-size: contain;
    background-color: var(--header-bg-color, #ababab);
    background-blend-mode: overlay;
    padding: 15px 0 0 0; /* 지그제그 오프셋(15px)만큼 상단 패딩 부여해 내부 콘텐츠 균형 보정 */
    display: flex;
    justify-content: center; /* 수평 완벽 중앙 정렬 */
    align-items: center; /* 수직 완벽 중앙 정렬 */
    border-bottom: 1px solid rgb(33 29 29);
    position: relative;
    /* 상하 입체 그림자 생성 (mask-image로 인해 기존 테두리/box-shadow는 필터로 대체) */
    filter: drop-shadow(0px -2px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0px 3px 6px rgba(160, 160, 160, 0.1));

    /* 단일 요소 다중 마스크 기법 (상단 15px 지그제그 텍스처 + 하단 100% 박스 채움) */
    -webkit-mask-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='15'%3E%3Cpolygon points='0,15 3,5 11,10 18,2 26,11 36,4 45,13 52,6 58,12 67,2 74,9 82,4 92,11 100,15'/%3E%3C/svg%3E"),
        linear-gradient(to bottom, #000, #000);
    -webkit-mask-position: 0 0, 0 15px;
    -webkit-mask-repeat: repeat-x, no-repeat;
    -webkit-mask-size: 100px 15px, 100% calc(100% - 15px);

    mask-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='15'%3E%3Cpolygon points='0,15 3,5 11,10 18,2 26,11 36,4 45,13 52,6 58,12 67,2 74,9 82,4 92,11 100,15'/%3E%3C/svg%3E"),
        linear-gradient(to bottom, #000, #000);
    mask-position: 0 0, 0 15px;
    mask-repeat: repeat-x, no-repeat;
    mask-size: 100px 15px, 100% calc(100% - 15px);
}

/* 관리자가 별도 배경 이미지를 설정한 경우 프리미엄 오버레이(Scrim) 효과 */
.header-top.has-custom-bg {
    background-image: linear-gradient(to bottom, rgba(0,0,0,var(--header-scrim, 0.5)) 0%, rgba(0,0,0,calc(var(--header-scrim, 0.5) * 1.2)) 100%), var(--header-bg, url('../img/bg_pp.webp'));
    background-size: cover;
    background-position: center;
    background-blend-mode: normal; /* 오버레이 블렌딩 제거하여 원본 색상 유지 */
    background-color: transparent; /* 배경색 간섭 제거 */
}

/* 헤더 액션 스타일 */
.header-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #adadad;
    padding: 8px 0px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-right span {
    display: none;
    /* | 구분자 제거 */
}

.current-date {
    font-size: 14px;
    color: #000000;
    font-weight: 500;
}

.header-actions a {
    font-size: 14px;
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-actions a:hover {
    color: var(--primary-color);
}

/* Guest Language Menu (Freedom) */
.freedom-lang-wrap{position:relative; display:inline-flex; align-items:center}
.freedom-lang-menu{
    position:absolute;
    right:0;
    top:calc(100% + 6px);
    min-width:140px;
    background:#ffffff;
    border:1px solid rgba(0,0,0,0.12);
    box-shadow:none;
    display:none;
    z-index:9999;
}
.freedom-lang-wrap.is-open .freedom-lang-menu{display:block}
.freedom-lang-item{
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.freedom-lang-item:hover{background:rgba(0,0,0,0.05)}
.freedom-lang-item.is-active{
    font-weight: 800; 
    color: var(--primary-color);
    background-color: rgba(0,0,0,0.03);
    position: relative;
    padding-right: 35px;
}
.freedom-lang-item.is-active::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
}

.freedom-sns-wrap{position:relative; display:inline-flex; align-items:center}
.freedom-sns-menu{
    position:absolute;
    right:0;
    top:calc(100% + 6px);
    min-width:180px;
    background:#ffffff;
    border:1px solid rgba(0,0,0,0.12);
    box-shadow:none;
    display:none;
    z-index:9999;
    overflow:hidden;
}
.freedom-sns-wrap.is-open .freedom-sns-menu{display:block}
.freedom-sns-item{
    display:flex;
    align-items:center;
    padding:10px 14px;
    font-size:13px;
    color:#333;
    text-decoration:none;
    white-space:nowrap;
    transition:background 0.2s;
    gap:8px;
}
.freedom-sns-item:hover{background:rgba(0,0,0,0.05)}
.freedom-sns-item i{font-size:14px; width:16px; text-align:center}
.freedom-sns-item.is-sub{font-weight:700; opacity:0.9}
.freedom-sns-empty{padding:10px 14px; font-size:12px; color:#777}

.header-actions span {
    color: #000000;
    margin: 0 5px;
}

.write-btn {
    background-color: #15803d;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.write-btn:hover {
    background-color: #14532d;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.write-btn i {
    font-size: 12px;
}

.header-bottom {
    width: 100%;
    background-color: #ffffff;
    padding: 0;
}

/* 로고 스타일 (하드코딩 제거 및 플렉스 박스로 완벽 중앙 정렬) */
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: none;
    margin-bottom: -2px;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.logo:active {
    transform: scale(0.95);
}

.logo img {
    max-height: 110px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}
.logo a {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: block;
}

.logo span {
    font-size: 55px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: -2px;
    line-height: 1;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* 관리자가 커스텀 배경을 넣은 경우 로고 부각 (텍스트 흰색화 및 입체 그림자 강조) */
.header-top.has-custom-bg .logo span {
    color: #ffffff !important;
    text-shadow: 0 0px 0px rgb(0 0 0 / 0.1),0 1px 1px rgb(0 0 0 / .6);
}

.header-top.has-custom-bg .logo img {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* 메뉴 스타일 */
.nav-container {
    width: 100%;
    background-color: #eff0ef;
    padding: 0;
    position: relative;
    z-index: 100;
    transition: var(--transition);
}

/* 기본 메뉴 스타일 */
#mn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 좌측과 우측으로 요소 분리 */
    width: 100%;
    padding-left: 9px;
    padding-right: 15px;
    border-top: 1px solid rgb(33 29 29);
    border-bottom: 1px solid rgb(33 29 29);
    box-shadow:
        0px 3px 6px rgba(160, 160, 160, 0.1),
        2px 0px 0px rgba(160, 160, 160, 0.1),
        -2px 0px 0px rgba(160, 160, 160, 0.1);
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.5) 15%, transparent 15%, transparent 100%),
        linear-gradient(105deg, transparent 0%, transparent 65%, rgba(255, 255, 255, 0.4) 65%, rgba(255, 255, 255, 0.4) 80%, transparent 80%, transparent 100%),
        linear-gradient(105deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 40%, transparent 40%, transparent 100%),
        linear-gradient(135deg, #f5f6f5 0%, #dbdbdb 100%);
}

.grid-icon {
    margin-right: 10px;
    margin-left: 10px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-icon:active {
    transform: scale(0.96);
}

.grid-icon img {
    width: 24px;
    /* 아이콘 크기 조정 */
    height: 24px;
    vertical-align: middle;
    transition: opacity 0.2s ease;
}

.grid-icon:hover img {
    opacity: 0.6;
}

.grid-icon i {
    font-size: 24px;
    /* FontAwesome 아이콘 크기 */
    color: #1d1d1d;
    /* 기본 색상 */
    transition: color 0.3s ease;
}

.grid-icon i:hover {
    color: var(--primary-color);
    /* 호버 시 색상 변경 */
}

#mn .mn01 {
    flex-grow: 1;
}

#mn .mn01 ul {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

#mn .mn01 ul li {
    position: relative;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

#mn .mn01 ul li:not(:last-child)::after {
    content: "/";
    /* 구분선 추가 */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    /* 연한 회색 */
    font-size: 14px;
    font-weight: 400;
}

#mn .mn01 ul li a {
    display: block;
    font-size: 16px;
    line-height: 30px;
    color: #1d1d1d;
    text-decoration: none;
    padding: 10px 0;
    transition: var(--transition);
}

#mn .mn01 ul li a:hover {
    color: var(--primary-color);
    font-weight: bold;
}

#mn .mn01 ul li.act_mn a {
    color: var(--primary-color);
    font-weight: bold;
}

/* Sticky 네비게이션 스타일 (Native Sticky & Smooth Transition) */
.nav-container {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    width: 100%;
    z-index: 999;
    box-sizing: border-box;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-container nav {
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    box-sizing: border-box;
}

.nav-container.sticky {
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.06);
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.35) 15%, transparent 15%, transparent 100%),
        linear-gradient(105deg, transparent 0%, transparent 65%, rgba(255, 255, 255, 0.22) 65%, rgba(255, 255, 255, 0.22) 80%, transparent 80%, transparent 100%),
        linear-gradient(105deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 40%, transparent 40%, transparent 100%),
        rgba(245, 246, 245, 0.58) !important;
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
}

.nav-container.sticky #mn {
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    padding-left: 0;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
    background: transparent;
}

/* 기본 상태에서는 스티키 로고 닫힘 (너비 0, 투명) */
.sticky-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    max-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin 0.3s ease, padding 0.3s ease;
    pointer-events: none !important;
}

/* 스티키 활성화 시 로고 스르르 자연스럽게 슬라이드 펼침 */
.nav-container.sticky .sticky-logo {
    max-width: 140px !important;
    opacity: 1 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-left: 14px !important;
    padding-right: 12px !important;
    border-right: 1px solid rgba(0, 0, 0, 0.12) !important;
    pointer-events: auto !important;
}

.nav-container.sticky .sticky-logo a,
.nav-container.sticky .sticky-logo img {
    display: block !important;
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
    border: none !important;
    outline: none !important;
    filter: none !important; /* 드롭쉐도우/글로우 효과 박멸 */
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* 닉네임 및 유틸 아이콘 기본 컬러 (일반 상태 - 연한 회색 배경 대비 어두운 텍스트) */
.user-nickname {
    color: #1d1d1d !important;
    transition: color 0.3s ease;
}
.grid-icon i {
    color: #1d1d1d !important;
    transition: color 0.3s ease;
}

/* 스티키 네비게이션 활성화 시 닉네임 및 아이콘 이전 색상 복구 (밝은 배경 대응) */
.nav-container.sticky .user-nickname {
    color: #1d1d1d !important;
}
.nav-container.sticky .grid-icon i {
    color: #1d1d1d !important;
}
.nav-container.sticky .user-nickname i {
    color: #1d1d1d !important;
}

.nav-container .nav-user-actions {
    display: flex;
    align-items: center;
    gap: 10px !important;
    margin-left: auto;
}

.nav-container .header-right-util-group {
    gap: 4px !important;
}

.nav-container .noti-wrap {
    margin-right: 0 !important;
}

.nav-container.sticky #mn .mn01 ul {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.nav-container.sticky #mn .mn01 ul li {
    position: relative;
    margin: 0;
    padding: 0 10px;
}

/* 한국어일 때는 조금 덜 좁게 (가독성 확보) */
:lang(ko) .nav-container.sticky #mn .mn01 ul li {
    padding: 0 12px;
}

.nav-container.sticky #mn .mn01 ul li:not(:last-child)::after {
    content: "|";
}

.nav-container.sticky #mn .mn01 ul li a {
    display: block;
    font-size: 16px;
    line-height: 30px;
    color: #1d1d1d;
    text-decoration: none;
    padding: 10px 0;
    transition: var(--transition);
}

.nav-container.sticky #mn .mn01 ul li a:hover {
    color: var(--primary-color);
    font-weight: bold;
}

.nav-container.sticky #mn .mn01 ul li.act_mn a {
    color: var(--primary-color);
    font-weight: bold;
}

/* 스크롤 이동 애니메이션 */
@keyframes slideDown {
    from {
        transform: translateY(-100%) translateX(-50%);
    }

    to {
        transform: translateY(0) translateX(-50%);
    }
}

/* 헤더 스타일 */
.header.sticky {
    position: relative;
    /* fixed에서 변경 */
    box-shadow: none;
}

.header.sticky .header-top,
.header.sticky .header-bottom {
    border-bottom: none;
    padding: 0;
    height: 50px;
    display: flex;
    align-items: center;
}

.header.sticky .header-top {
    width: auto;
    margin-right: 20px;
    background-color: transparent;
}

.header.sticky .header-bottom {
    width: auto;
    background-color: transparent;
}

.header.sticky .header-actions {
    display: none;
    /* sticky 헤더에서 숨김 */
}

.header.sticky .logo {
    margin: 0 20px 0 0;
}

.header.sticky .logo img {
    max-height: 40px;
}

.header.sticky #mn {
    width: auto;
}

/* 메인 콘텐츠 */
.main-content {
    flex: none;
    border-radius: 2px;
    position: relative;
    z-index: 10;
    background-color: #ffffff;
    /* 1계층: 기본 하얀색 배경 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15),
        /* 하단 은은한 그림자 */
        -2px 0px 15px rgba(0, 0, 0, 0.03),
        /* 좌측 미세한 그림자 */
        2px 0px 15px rgba(0, 0, 0, 0.03);
    /* 우측 미세한 그림자 */
}

/* 2계층: 반투명한 종이 질감 배경 (흰색 위에 덧씌움) */
.main-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/bg_pp.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    opacity: 10%;
    /* 이 수치를 높일수록 이미지가 진해지고, 낮출수록 흰색이 더 비침 */
    border-radius: 2px;
    z-index: -1;
    /* 글씨(콘텐츠)보다는 아래에, 1계층 흰 배경보다는 위에 위치 */
    pointer-events: none;
    /* 마우스 클릭을 가로채지 않도록 함 */
}

.content-wrapper {
    display: flex;
    gap: 30px;
    padding: 20px;
}

.content-main {
    flex: 1;
    min-width: 0;
}

/* 사이드바 */
.sidebar {
    width: 300px;
    background-color: #fff;
    padding: 20px;
    border-radius: 2px;
    box-shadow: var(--box-shadow);
}

.widget-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    padding: 15px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e0e0e0;
}

.widget:last-child {
    border-bottom: none;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--heading-color);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.widget-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-content ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.widget-content ul li:last-child {
    border-bottom: none;
}

/* 푸터 상단 그림자 레이어 (푸터 요소 내부에 위치) */
.footer-top-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    /* 실질적 면적 최소화 및 투명화로 짝대기 제거 */
    background-color: transparent;
    z-index: 9;
    /* 푸터 배경(z-index:10) 인지 여부와 상관없이 투명하여 그림자만 남음 */
    /* 스프레드 값을 -3px 정도로 주어 좌우로 삐져나오는 그림자 너비 조정 */
    box-shadow: 0 -3px 15px -3px rgb(0 0 0 / 95%);
    pointer-events: none;
}

.footer-top-shadow.boxed,
.footer-top-shadow.full {
    max-width: none;
    /* 푸터 내부에 종속되므로 별도 max-width 불필요 */
}

/* 푸터 */
.footer {
    width: calc(100% - 32px);
    max-width: 1320px;
    margin: 0 auto 50px;
    background-color: var(--dark-color);
    color: #fff;
    padding: 0;
    border-top: 2.5px solid #ffffff;
    border-radius: 0 0 6px 6px;
    position: relative;
    z-index: 0;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.22));
    box-sizing: border-box;
}

.footer.boxed {
    width: calc(100% - 32px);
    max-width: 1320px;
}

.footer.full {
    width: calc(100% - 32px);
    max-width: 1400px;
}

/* 푸터 배경 */
.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    top: -2.5px;
    background-color: var(--dark-color);
    border-radius: 0 0 6px 6px;
    z-index: -1;
}

.footer::after {
    display: none !important;
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
}

.footer-logo {
    margin: 0 16px 0 0;
}
.footer-logo:empty {
    display: none;
}

.footer-logo img {
    max-width: 140px;
    height: auto;
    margin: 0;
}

/* 푸터 1줄 나란히 레이아웃 (Inline Footer Bar) */
.footer-info-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}
.footer-info-inline a {
    color: #cbd5e1;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.2s ease;
}
.footer-info-inline a:hover {
    color: #ffffff;
    text-decoration: none !important;
}
.footer-info-inline .sep {
    color: rgba(255, 255, 255, 0.25);
    font-size: 11px;
}
.footer-info-inline .dot {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}
.footer-info-inline .copyright {
    color: #cbd5e1;
    font-size: 12.5px;
}

/* 전체화면 프리로더 */
#preloader.full-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    /* 하얀 화면이 오래 지속되지 않게 투명도 상향 */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* 기본적으로 완벽히 숨김 (플래시 마스킹) */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader.full-preloader.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sticky 네비게이션 로고 스타일 */
.sticky-logo {
    display: none;
    /* 기본적으로 숨김 */
    padding: 0 20px;
    height: 100%;
    align-items: center;
}

.nav-container.sticky .sticky-logo {
    display: flex;
    /* 스티키 상태에서만 표시되며 중앙 정렬 */
    background: rgba(0, 0, 0, 0.8);
    /* 검은색 반투명 효과 */
}

.sticky-logo a {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    /* 검정 배경이므로 텍스트를 흰색으로 */
    text-decoration: none;
}

.sticky-logo img {
    max-height: 50px;
    width: auto;
}

/* 플로팅 버튼 스타일 */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #333333;
    /* 위/아래 이동 버튼: 진한 챠콜 */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.floating-btn.write-btn {
    background-color: #15803d;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-btn.write-btn:hover {
    background-color: #14532d;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.floating-btn.edit-btn {
    background-color: #3a4a5e; /* 뮤트 인디고 */
}

.floating-btn.edit-btn:hover {
    background-color: #2e3b4a;
}

.floating-btn.challenge-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
    animation: challengePulse 3s infinite;
}

@keyframes challengePulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35); }
    50% { transform: scale(1.08); box-shadow: 0 0 20px rgba(124, 58, 237, 0.55); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35); }
}

.floating-btn.wallet-btn {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35) !important;
    text-decoration: none !important;
}

.floating-btn.wallet-btn:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.45) !important;
    color: #ffffff !important;
}

.floating-btn.list-btn {
    background-color: #4e3830;
    /* 목록 버튼: 포근한 황토색 */
}

.floating-btn.list-btn:hover {
    background-color: #3f2f29;
}

.floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background-color: #444444;
}

.floating-btn i {
    font-size: 20px;
}

.floating-btn.comment-btn {
    position: relative;
    background-color: #4c3232;
}

.floating-btn.comment-btn:hover {
    background-color: #3f2929;
}

.comment-cnt {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #967c16;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

/* 헤더 버튼 스타일 개선 - 다크 딥 브라운 톤앤매너 디자인 시스템 */
div.guest-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: 35px !important;
}

.header-btn {
    height: 32px !important;
    padding: 0 13px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* 1. Masuk (로그인) */
a.header-btn-login {
    color: #374151 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}
a.header-btn-login:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #111827 !important;
}
a.header-btn-login i {
    color: #6b7280 !important;
    font-size: 12px !important;
}

/* 2. Daftar (회원가입 CTA - 딥 포레스트 에메랄드) */
a.header-btn-signup {
    color: #ffffff !important;
    background: linear-gradient(135deg, #15392d 0%, #1e4d3d 100%) !important;
    border: 1px solid rgba(21, 57, 45, 0.3) !important;
    box-shadow: 0 2px 8px rgba(21, 57, 45, 0.25) !important;
    font-weight: 700 !important;
}
a.header-btn-signup:hover {
    background: linear-gradient(135deg, #1a4d3e 0%, #226350 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(21, 57, 45, 0.35) !important;
}
a.header-btn-signup i {
    color: #fef3c7 !important;
    font-size: 12px !important;
}

/* 3. Login SNS */
#freedomSnsBtn {
    color: #374151 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
#freedomSnsBtn:hover {
    background: #ffffff !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}
#freedomSnsBtn i {
    color: #2563eb !important;
    font-size: 13px !important;
}

/* 4. Bahasa */
.freedom-lang-btn {
    color: #374151 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.freedom-lang-btn:hover {
    background: #ffffff !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}
.freedom-lang-btn i {
    color: #6b7280 !important;
    font-size: 13px !important;
}

.header-btn.write-btn {
    border: 1px solid #353232;
    border-radius: 3px;
    background-color: #325147;
    color: #ffffff !important;
}

.header-btn.write-btn:hover {
    background-color: #2c3e37;
    color: #ffffff !important;
}

/* 스크롤 프로세스 바 스타일 */
.progress-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1320px;
    /* Match layout container width */
    height: 4px;
    background: transparent;
    z-index: 1000;
}

/* For full width layout */
.layout-container.full .progress-container {
    width: calc(100% - 32px);
    max-width: 1400px;
}

.progress-bar {
    height: 4px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* 기존 sticky-title 제거 (사용하지 않음) */
.sticky-title {
    display: none;
}

/* 네비게이션 컨테이너 기본 설정 */
.nav-container nav {
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    /* 높이 고정 */
}

/* 스티키 로고 영역 */
.nav-container .sticky-logo {
    margin-right: 20px;
    /* 로고와 메뉴 사이 간격 */
}

/* mn01 메뉴 영역 기본 스타일 - 왼쪽 정렬 */
.nav-container .mn01 {
    margin-left: 0;
    /* 자동 마진 제거하여 왼쪽으로 정렬 */
}

/* 게시글 제목 스타일 */
.nav-container .article-title {
    display: none;
    font-size: 22px;
    color: #3f3f3f;
    font-weight: 500;
}

/* 게시글 정보 컨테이너 */
.article-info {
    display: none !important;
}

/* 카테고리 스타일링 */
.article-category {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 18px;
    margin-right: 4px;
    text-decoration: none;
}

.article-category:hover {
    color: var(--primary-color);
    opacity: 0.8;
}

/* 구분자 스타일링 */
.separator {
    color: #999;
    font-size: 16px;
    margin: 0 10px 0 4px;
}

/* 게시글 제목 스타일링 */
.article-title {
    color: var(--heading-color);
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-title:hover {
    color: var(--primary-color);
}

/* 댓글 링크 스타일링 */
.nav-actions {
    display: none !important;
}

/* 스티키 모드에서만 표시 */
.nav-container.sticky .article-info {
    display: flex;
    align-items: center;
    margin-right: auto;
    padding-left: 20px;
}

.nav-container.sticky .nav-actions {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

/* 게시글 모드에서도 스티키 로고 유지 */
.nav-container.article-mode.sticky .sticky-logo {
    display: flex;
}

/* 게시글 모드에서 게시글 정보 스타일링 */
.nav-container.article-mode.sticky .article-info {
    margin-left: 14px !important;
    padding-left: 0 !important;
}

/* 모바일 조정 */
@media (max-width: 768px) {
    .article-info {
        max-width: 60%;
    }

    .article-category,
    .separator {
        display: none;
    }
}

/* 메뉴 토글 버튼 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--heading-color);
    font-size: 20px;
    cursor: pointer;
    padding: 0 15px;
    margin-left: auto;
    height: 50px;
    /* 높이 맞춤 */
    transition: color 0.3s;
}

.menu-toggle:hover {
    color: var(--primary-color);
    /* 호버 시 원래 테마 색상 */
}

/* 스티키 상태이면서 게시글 모드일 때 제목 표시 */
.nav-container.sticky.article-mode .article-title {
    display: block;
    margin-left: 0;
}

/* 스티키 상태이면서 게시글 모드일 때 메뉴 토글 표시 */
.nav-container.sticky.article-mode .menu-toggle {
    display: inline-block;
}

/* 게시글 모드에서 메뉴 숨기기 */
.nav-container.article-mode.sticky .mn01 {
    display: none;
}

/* 게시글 모드에서도 스티키 기본 스타일 그대로 적용 */
.nav-container.article-mode.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: calc(100% - 40px);
    max-width: 1320px;
    margin: 0 auto;
    box-sizing: border-box;
    animation: freedomStickySlideDown 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: 0px 2px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #b4b4b4;
    z-index: 999;
    border-top: none;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.35) 15%, transparent 15%, transparent 100%),
        linear-gradient(105deg, transparent 0%, transparent 65%, rgba(255, 255, 255, 0.25) 65%, rgba(255, 255, 255, 0.25) 80%, transparent 80%, transparent 100%),
        linear-gradient(105deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 40%, transparent 40%, transparent 100%),
        rgba(239, 240, 239, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-container.article-mode.sticky #mn {
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.5) 15%, transparent 15%, transparent 100%),
        linear-gradient(105deg, transparent 0%, transparent 65%, rgba(255, 255, 255, 0.4) 65%, rgba(255, 255, 255, 0.4) 80%, transparent 80%, transparent 100%),
        linear-gradient(105deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 40%, transparent 40%, transparent 100%),
        transparent;
}

/* boxed 레이아웃에서 sticky 위치 조정 */
.layout-container.boxed .nav-container.article-mode.sticky {
    width: calc(100% - 32px);
    max-width: 1320px;
    left: 50%;
    right: auto;
}

/* full 레이아웃에서 sticky 너비 조정 */
.layout-container.full .nav-container.article-mode.sticky {
    width: calc(100% - 32px);
    max-width: 1400px;
}

.nav-container.article-mode.sticky nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    /* 높이 고정 */
}

/* 게시글 모드에서도 로고는 항상 표시 */
.nav-container.article-mode .sticky-logo {
    display: block;
}

/* 드롭다운 메뉴 스타일 - 원래 스타일과 일관되게 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    z-index: 1000;
    min-width: 200px;
    border: 1px solid #b4b4b4;
    box-shadow: 0px 2px 50px rgba(203, 203, 203, 0.2);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu ul li {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid rgba(33, 29, 29, 0.05);
}

.dropdown-menu ul li:last-child {
    border-bottom: none;
}

.dropdown-menu ul li a {
    display: block;
    padding: 12px 15px;
    color: var(--heading-color);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-menu ul li a:hover {
    background: rgba(33, 29, 29, 0.09);
    color: var(--primary-color);
}

/* 모바일 환경에서 제목 크기 조절 */
@media (max-width: 768px) {
    .nav-container .article-title {
        font-size: 16px;
        max-width: 50%;
    }
}

/* 스티키 모드이면서 게시글 읽기 모드일 때만 표시 */
.nav-container.sticky.article-mode .article-info,
.nav-container.sticky.article-mode .nav-actions,
.nav-container.sticky.article-mode .article-category,
.nav-container.sticky.article-mode .separator,
.nav-container.sticky.article-mode .comment-link,
.nav-container.sticky.article-mode .comment-count {
    display: flex !important;
    align-items: center;
}

/* 카테고리가 없을 때 구분자와 여백 숨기기 */
.nav-container.sticky.article-mode .article-category:empty,
.nav-container.sticky.article-mode .article-category:empty+.separator {
    display: none !important;
}

/* 마지막 강제 표시 규칙 수정 - 조건부 표시로 변경 */
.nav-container.sticky.article-mode .article-category:not(:empty),
.nav-container.sticky.article-mode .article-category:not(:empty)+.separator {
    display: flex !important;
}

.foot-gerim {
    display: none !important;
}

.foot-gerim2 {
    display: none !important;
}

/* 프로필 레이어 팝업 스타일 */
.grid-wrap {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 0px;
    margin-left: 0;
}

.grid-wrap::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: rgba(0,0,0,0.1);
}

.grid-popup {
    display: none;
    position: absolute;
    top: calc(100% - 6px);
    right: -10px;
    width: 280px;
    z-index: 9999;
    animation: popupFadeIn 0.2s ease forwards;
    /* 클립패스를 개별 영역으로 분리: 그림자만 부모에서 처리 */
    filter: drop-shadow(0 0 1px #d3d3d3) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    background: transparent !important;
}

.grid-wrap.active .grid-popup {
    display: block;
}

/* 애니메이션 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 위쪽 화살표 제거됨 */

.popup-profile {
    display: flex;
    align-items: center;
    padding: 38px 22px 20px 22px; 
    background: linear-gradient(135deg, #5b5f6a 0%, #343844 55%, #171a21 100%);
    gap: 16px; 
    position: relative;
    overflow: hidden;
    /* 테두리 효과를 위해 1px drop-shadow 추가 */
    filter: drop-shadow(0 0 0.5px rgba(0,0,0,0.1)) drop-shadow(0 0 0.5px rgba(0,0,0,0.05));
    /* mask-image를 사용하여 매끄러운 곡선 모서리 구현 */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 V20 Q0,10 10,10 H225 L235,0 L245,10 H270 Q280,10 280,20 V100 Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 V20 Q0,10 10,10 H225 L235,0 L245,10 H270 Q280,10 280,20 V100 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    clip-path: none;
}



/* 배경 이미지가 있을 때의 프리미엄 효과 (Scrim & Layered Background) */
.popup-profile.has-bg-img {
    padding: 38px 22px 20px 22px; /* 하단 여백을 살짝 줄여 경험치 영역과 밀착되게 조화 */
    gap: 16px; 
    background: transparent !important;
}

.popup-profile.has-bg-img::before {
    content: "";
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    background-image: var(--profile-bg, none), linear-gradient(135deg, #5b5f6a 0%, #343844 55%, #171a21 100%);
    background-size: cover;
    background-position: center;
    filter: blur(0px) brightness(0.9) saturate(1.05);
    z-index: 0;
}

/* Scrim Layer (Color Overlay for text readability) */
.popup-profile.has-bg-img::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.28) 100%);
    z-index: 1;
}

.popup-profile[data-bg-type="color"]::before,
.popup-profile[data-bg-type="color"]::after {
    display: none !important;
}

.popup-profile.has-bg-img > * {
    position: relative;
    z-index: 2;
}

/* 프로필 사진을 둥근 네모 형태(Squircle)로 재설계 */
.popup-profile.has-bg-img .profile-img-wrap {
    width: 62px;
    height: 62px;
    border-radius: 18px; /* 고급스러운 라운드 스퀘어 */
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.popup-profile.has-bg-img .profile-img-wrap .profile-initial {
    border-radius: 0 !important; /* 부모(img-wrap)의 border-radius와 overflow:hidden에 의해 자동으로 채워짐 */
}

/* 텍스트 타이포그래피 보정 및 말줄임 효과 유지 */
.popup-profile.has-bg-img .profile-name {
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 3px; /* 중앙 정렬 보정을 위해 위아래 간격 축소 */
    letter-spacing: -0.4px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.popup-profile.has-bg-img .profile-email {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 11.5px;
    font-weight: 500;
}

.profile-initial.large {
    width: 100%;
    height: 100%;
    font-size: 24px;
    border-radius: 0 !important; 
}


.grid-icon img {
    background-color: #ffffff;
}

.profile-img-wrap {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    flex-shrink: 0;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.profile-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important; /* Force remove circle from image itself */
}

.profile-no-img {
    font-size: 24px;
    color: #999;
}

.profile-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color, #131313);
    color: #ffffff;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
}

.profile-initial.small {
    width: 28px;
    height: 28px;
    font-size: 13px;
    margin-right: 0;
}

.profile-initial.large {
    width: 100%;
    height: 100%;
    font-size: 20px;
    border-radius: 0 !important; /* 팝업 등 부모가 원형이 아닐 때를 위해 강제 초기화 */
}

.profile-info-wrap {
    flex: 1;
    min-width: 0; /* 자식 요소 텍스트 말줄임(ellipsis) 적용을 위해 필수 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 텍스트 그룹을 사진 중앙에 수직 정렬 */
    transform: translateY(-2px); /* 사용자 요청: 1px 위로 보정 */
}

.profile-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.profile-email {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: block;
}

.profile-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.4;
}

/* 레벨 배지 영역 */
.profile-level {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.level-badge {
    flex-shrink: 0; /* 이메일이 길어질 때 배지가 찌그러지지 않도록 보호 */
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: #fff;
    transition: all 0.2s;
}

/* 레벨별 색상 (Specificity 향상) */
.level-badge.level-low, .has-bg-img .level-badge.level-low {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
}

.level-badge.level-mid, .has-bg-img .level-badge.level-mid {
    background: #e1f5fe !important; /* 조금 더 밝은 연두색 계열로 보정 */
    background-color: #e9f7df !important;
    color: #3f6212 !important;
}

.level-badge.level-high, .has-bg-img .level-badge.level-high {
    background: #e0f2fe !important;
    color: #0369a1 !important;
}

.level-badge.level-master, .has-bg-img .level-badge.level-master {
    background: #ede9fe !important;
    color: #6d28d9 !important;
    box-shadow: 0 0 12px rgba(109, 40, 217, 0.2); /* 마스터 레벨 후광 효과 */
}

/* 배경 이미지가 있을 때 (Scrim) */
.popup-profile.has-bg-img .level-badge {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* 경험치 섹션 */
.popup-exp {
    margin-top: 2.1px;
    margin-bottom: 2.3px;
    padding: 12px 20px 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    position: relative;
    z-index: 5;
}

.popup-exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.popup-exp-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

.popup-exp-value {
    font-size: 11px;
    color: #555;
}

.popup-exp-value b {
    font-weight: 700;
    color: var(--primary-color);
}

.popup-exp-value em {
    font-style: normal;
    font-size: 10px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 2px;
}

.popup-exp-bar-bg {
    width: 100%;
    height: 6px;
    background: #e8edf2;
    border-radius: 4px;
    overflow: hidden;
}

.popup-exp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

/* 레벨별 프로그레스 바 색상 */
.popup-exp-bar-fill.level-low {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.popup-exp-bar-fill.level-mid {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.popup-exp-bar-fill.level-high {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.popup-exp-bar-fill.level-master {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.popup-exp-hint {
    margin-top: 5px;
    font-size: 10px;
    color: #94a3b8;
    text-align: right;
    font-weight: 500;
}

.popup-exp-hint b {
    color: #64748b;
    font-weight: 700;
}

/* 버튼 액션 영역 - 프로필과 분리된 느낌을 주도록 조정 */
.popup-actions {
    background: #fff;
    margin-top: 0; /* 모든 섹션이 하나로 이어지게 무여백 처리 */
    border: 1px solid #e2e8f0;
    border-top: none;
    border-bottom: none;
}

.popup-btn {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    color: #333;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #d3d3d3;
    transition: background 0.2s, color 0.2s;
}

.popup-btn:last-child {
    border-bottom: none;
}

.popup-btn i {
    width: 24px;
    font-size: 16px;
    color: #888;
    margin-right: 8px;
    text-align: center;
    transition: color 0.2s;
}

.popup-btn:hover {
    background: #f4f6f8;
    color: var(--primary-color);
}

.popup-btn:hover i {
    color: var(--primary-color);
}

.popup-btn.logout-btn:hover {
    background: #fff1f2;
    color: #e11d48;
}

.popup-btn.logout-btn:hover i {
    color: #e11d48;
}

.popup-btn.login-btn {
    background: var(--primary-color);
    color: #fff;
    justify-content: center;
    margin-bottom: 8px;
}

.popup-btn.login-btn i {
    color: #fff;
}

.popup-btn.login-btn:hover {
    background: #2c3e37;
}

/* 하단 푸터 */
.popup-footer {
    display: flex;
    background: #fdfdfd;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0;
    border-top: 1px solid #d3d3d3;
    overflow: hidden;
}

.popup-footer a {
    flex: 1;
    padding: 10px 8px;
    font-size: 12.5px;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s, color 0.2s;
    border-right: 1px solid #d3d3d3;
}

.popup-footer a:last-child {
    border-right: none;
}

.popup-footer a:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

/* 알림 아이콘 & 애니메이션 */
.noti-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: -7px;
}

.noti-wrap.active .noti-tabs {
    border-top: 1px solid #d3d3d3 !important;
    border-bottom: 1px solid #d3d3d3 !important;
    background: #fafafa !important;
    padding: 0 14px !important;
}

.noti-wrap.active .noti-popup {
    display: block !important;
    z-index: 10001 !important;
}

.noti-icon {
    position: relative;
    font-size: 20px;
    color: #444;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.noti-icon:active {
    transform: scale(0.85);
}

.noti-icon:hover {
    color: #ad980b;
}

.noti-count {
    position: absolute;
    top: 0;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
    box-sizing: border-box;
    z-index: 2;
}

.noti-icon.has-new i {
    color: #ad980b;
    animation: ringX 2s ease-in-out infinite;
    transform-origin: top center;
    display: inline-block;
}

@keyframes ringX {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-10deg);
    }

    30% {
        transform: rotate(5deg);
    }

    40% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}

.noti-icon {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 30px;
}

.noti-icon .noti-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: bold;
    z-index: 10;
}

/* 알림 팝업 */
/* 알림 팝업 */
.noti-popup {
    display: none;
    position: absolute;
    width: 420px;
    right: -18px;
    top: calc(100% - 3px);
    z-index: 10001;
    filter: drop-shadow(0 0 1px #cecece) drop-shadow(0 10px 25px rgba(0,0,0,0.12));
    background: transparent !important;
}

@keyframes notiFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.noti-wrap.active .noti-popup {
    display: block !important;
    animation: notiFadeIn 0.2s ease-out;
}

.noti-popup .popup-header {
    padding: 25px 20px 14px 20px; /* 상단 꼬리 공간 10px 추가 */
    border-bottom: none;
    font-weight: 700;
    color: #080808;
    background: #fefefe;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 테두리 효과를 위해 1px drop-shadow 추가 */
    filter: drop-shadow(0 0 0.5px rgba(0,0,0,0.12));
    /* 헤더 영역을 말풍선으로 처리 */
    /* mask-image를 사용하여 매끄러운 곡선 모서리 구현 */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 V20 Q0,10 10,10 H326 L336,0 L346,10 H370 Q380,10 380,20 V100 Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 V20 Q0,10 10,10 H326 L336,0 L346,10 H370 Q380,10 380,20 V100 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    clip-path: none;
}

.noti-tabs {
    display: flex;
    padding: 0 14px;
    border-top: none !important;
    border-bottom: 1px solid #eee !important;
    gap: 14px;
    margin-top: 2px; /* 말풍선 헤더와 분리 */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #fff !important;
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
}

.noti-wrap.active .noti-tabs.has-overflow.show-hint {
    padding-right: 72px !important;
}

.noti-tabs.has-overflow.show-hint::after {
    content: '›';
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 18px;
    box-sizing: border-box;
    background: linear-gradient(to left,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.95) 35%,
        rgba(255,255,255,0.55) 70%,
        rgba(255,255,255,0.15) 100%
    );
    color: #9ca3af;
    font-size: 20px;
    animation: freedom-scroll-hint 1.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes freedom-scroll-hint {
    0%, 100% { transform: translateX(0); opacity: 0.65; }
    50%      { transform: translateX(4px); opacity: 1; }
}

#mb-noti-sub-filters {
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
}

#mb-noti-sub-filters.has-overflow.show-hint {
    padding-right: 72px !important;
}

#mb-noti-sub-filters.has-overflow.show-hint::after {
    content: '›';
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 18px;
    box-sizing: border-box;
    background: linear-gradient(to left,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.95) 35%,
        rgba(255,255,255,0.55) 70%,
        rgba(255,255,255,0.15) 100%
    );
    color: #9ca3af;
    font-size: 20px;
    animation: freedom-scroll-hint 1.2s ease-in-out infinite;
    pointer-events: none;
}

.noti-tabs .noti-tab {
    padding: 11px 2px; /* 간격 더 좁힘 */
    font-size: 13.5px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent; /* 밑줄 더 굵게 */
    transition: all 0.2s;
    position: relative;
    bottom: -1px;
}

.noti-tabs .noti-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 700;
}

.noti-tabs::-webkit-scrollbar {
    display: none;
}

.popup-body {
    padding: 0;
    background: #fff;
}

.noti-item {
    transition: all 0.2s ease;
}

.noti-item:hover {
    background-color: #f8fafc;
}

.noti-item-link {
    display: flex;
    padding: 14px 15px;
    color: #333;
    text-decoration: none;
    text-align: left;
    align-items: center;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.noti-item:hover .noti-item-link {
    border-left-color: var(--primary-color);
    background: #f8fafc;
}

/* 프로필 이니셜 업그레이드 */
.profile-initial.mb-initial-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: var(--member-color, #5c6bc0);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.2);
}

.profile-initial.mb-initial-profile[data-nick="?"],
.profile-initial.mb-initial-profile[data-nick="SISTEM"],
.profile-initial.mb-initial-profile[data-nick="SYSTEM"],
.profile-initial.mb-initial-profile[data-nick="SYSTEM_BOT"] {
    background: #ab47bc !important;
}

/* 알림 배지 아이콘 */
.noti-badge-icon {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border: 2px solid #fff;
    z-index: 2;
}

.noti-badge-icon i {
    transform: scale(0.9);
}

/* 스크롤바 커스텀 */
.noti-list::-webkit-scrollbar {
    width: 10px;
}

.noti-list::-webkit-scrollbar-track {
    background: transparent;
}

.noti-list::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d0d0d0 0%, #fcfcfc 100%);
    border-radius: 3px;
}

.noti-list::-webkit-scrollbar-thumb:hover {
    background: #bbbbbb;
}



/* 모바일 알림 팝업 보정 */
@media screen and (max-width: 768px), (hover: none) and (pointer: coarse) {
    .noti-popup {
        width: calc(100vw - 40px) !important;
        right: -60px !important;
        background: #fff !important;
        clip-path: none !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 18px 45px rgba(0,0,0,0.14) !important;
        filter: none !important;
    }
    .noti-popup .popup-header {
        border-radius: 0 !important;
        border: none !important;
        filter: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }
    .noti-tabs {
        border-top: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .popup-body {
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .popup-footer {
        border: none !important;
        border-radius: 0 !important;
    }
    .noti-list {
        padding: 8px 0 !important;
    }
    .noti-item {
        border-bottom: none !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        margin: 10px 12px !important;
        background: #fff !important;
        box-shadow: 0 8px 18px rgba(0,0,0,0.06) !important;
    }
    .noti-item:hover {
        background-color: #fff !important;
    }
    .noti-popup::before {
        display: none !important; /* 클립패스로 통합되었으므로 기존 꼬리 제거 */
    }
}

/* ���� ȸ�� �˾� �޴� Ŀ���� (��ä��/����) */
#popup_menu_area {
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 4px 0 !important;
    background: #ffffff !important;
    min-width: 120px !important;
}

#popup_menu_area li a {
    padding: 8px 16px !important;
    font-size: 13px !important;
    color: #333 !important;
    text-decoration: none !important;
}

/* ?뚯썝 ?앹뾽 硫붾돱 而ㅼ뒪? (臾댁콈???ы뵆) */
#popup_menu_area {
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #ffffff !important;
    min-width: 120px !important;
    overflow: hidden;
}

#popup_menu_area li {
    border-bottom: 1px solid #f1f1f1 !important;
}

#popup_menu_area li:last-child {
    border-bottom: none !important;
}

#popup_menu_area li a {
    padding: 10px 16px !important;
    font-size: 13px !important;
    color: #333 !important;
    text-decoration: none !important;
    display: block !important;
}

/* ?뚯썝 ?앹뾽 硫붾돱 而ㅼ뒪? (臾댁콈???ы뵆/諛李? */
#popup_menu_area {
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important; /* ?됰꽕?꾩뿉 諛李?*/
    background: #ffffff !important;
    min-width: 130px !important;
    overflow: hidden;
    z-index: 10000 !important;
}

#popup_menu_area li {
    border-bottom: 1px solid #f1f1f1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#popup_menu_area li:last-child {
    border-bottom: none !important;
}

#popup_menu_area li a {
    padding: 10px 16px !important;
    font-size: 13px !important;
    color: #333 !important;
    text-decoration: none !important;
    display: block !important;
    white-space: nowrap !important;
}

#popup_menu_area li a:hover {
    background-color: #f8f8f8 !important;
    color: #2b2b2b !important;
}

/* Rhymix Content Blockquote Style (Synced with Simple Editor) */
.rhymix_content blockquote, .rx_mb_editor blockquote { border-left: 4px solid #aaaaaa !important; color: #777777 !important; font-style: italic !important; background-color: #fafafa !important; padding: 12px 20px !important; margin: 15px 0 !important; border-radius: 0 4px 4px 0; }

/* Rhymix Content Base Line Height */
.rhymix_content { line-height: 1.5; }
.rhymix_content p, .rhymix_content div { line-height: inherit; }

/* AI 기자 및 게시글 이미지 중앙 정렬 */
.ai-reporter-article img,
.rhymix_content .ai-reporter-article img,
.xe_content .ai-reporter-article img,
.read_body .ai-reporter-article img,
p[style*="text-align:center"] img,
p[style*="text-align: center"] img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 모바일/소형 화면 접속 시 여백 최적화 */
@media screen and (max-width: 768px) {
    .layout-container,
    .layout-container.boxed,
    .layout-container.full,
    .footer,
    .footer.boxed,
    .footer.full,
    .progress-container,
    .layout-container.full .progress-container,
    .nav-container.sticky,
    .layout-container.full .nav-container.sticky,
    .nav-container.article-mode.sticky,
    .layout-container.boxed .nav-container.article-mode.sticky,
    .layout-container.full .nav-container.article-mode.sticky {
        width: calc(100% - 16px) !important;
    }
}

