/* Header (Index만 적용) */
#header { position: fixed; top: 0; left: 0; z-index: 9090; width: 100%; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } 
#header .notice { display: flex; align-items: center; justify-content: center; gap: 3rem; background-color: var(--pointcolor); padding: .3rem 0; color: #fff; } 
#header .wrapper { display: flex; align-items: center; justify-content: space-between; padding:0.8rem 0; } 
#header .h_logo { max-width: 11.25rem; } 
#header .h_logo a { display: block; } 
#header .nav .nav-list { display: flex; flex-direction: row; align-items: center; gap: 3rem; } 
#header .nav .nav-list a { color: #fff; } 
#header .nav .nav-list a.adm-btn { background: var(--pointcolor,#000); padding: .3em 0.6rem; border-radius: 5em;     min-width: 5em; display: block; text-align: center;}

@media (width <= 990px) {
    /* #header .nav li:not(:has(.adm-btn)) { display: none; } */
    #header {display: none;}
}

/* Footer */
#footer { background-color: #141413;; color: rgba(157, 157, 157,0.8); width: 100%; } 
#footer .container {max-width:1300px} 
#footer .ft_link { display: flex; gap:2em; justify-content: flex-end; } 
#footer .ft_link a { color: #535353; } 

/* Layout */
#Layout { display: flex; height: 100vh; overflow-y:auto; position: relative;} 
#contents { width:100%; min-width:0; }
#contents > .container { max-width:1300px; padding:10rem 0 } 

/* ==========================================================================

   Sidebar 동작 (/_inc/js/sidebar.js 와 연결)

   ========================================================================== */

#sideBar { background: #141413; padding:1.5rem 1rem; flex-shrink: 0; height:100%; display: flex; flex-direction: column; position: sticky; top: 0;border-right: 1px solid #1c1c1c; z-index: 99; width: 16rem; transition: width 0.5s;} 
#sideBar .sd_logo{max-width:12rem}
#sideBar .sideTop { position: relative;;display: flex; align-items: flex-end; gap:1rem } 
#sideBar .sideTop button { display: flex; align-items: center; justify-content: center;  width: 2rem; aspect-ratio: 1;}  

#sideBar .categoryList { flex-grow: 1; overflow-y: auto; margin: 2rem 0 } 
#sideBar .categoryList::-webkit-scrollbar { width: 2px; }
#sideBar .categoryList::-webkit-scrollbar-thumb { background-color: #f1f1f1; }
#sideBar .categoryList::-webkit-scrollbar-track { background-color: #2b2b2b;  }

#sideBar .categoryList > li + li {margin-top:.5rem}
#sideBar .categoryList > li .depth01 { display: flex; align-items: center; gap:1rem; color: #fff; padding:0.5em 0; font-size: 1.125rem; cursor: pointer;user-select: none; } 
#sideBar .categoryList > li .depth01 >img { max-width: 1.375rem; filter: grayscale(100%) brightness(1000%);-webkit-filter: grayscale(100%) brightness(1000%);} 

#sideBar .categoryList .submenu { padding:.5em 0 1em; padding-left:1.7rem;display: none; } 
#sideBar .categoryList .submenu li { position: relative; display: flex; align-items: center; gap:.5em; padding-right:1em } 
#sideBar .categoryList .submenu li:before { content:''; width: 4px; height: 4px; background:#fff; border-radius: 50%; flex-shrink: 0; } 
#sideBar .categoryList .submenu a { color: #9d9d9d; padding: 4px 0; display: block; } 
#sideBar .categoryList .submenu a:hover { color: #fff; } 
#sideBar .categoryList .submenu a.active { color: #fff; text-decoration: underline;}


#sideBar .categoryList li.active .depth01 span { position: relative; } 
#sideBar .categoryList li.active .depth01 span:after { content: ''; position: absolute; right: -0.8em; top: 50%; width: 5px; height: 5px; background: var(--pointcolor); border-radius: 50%; transform: translateY(-50%); } 
#sideBar .categoryList li:is(.active, .open) .depth01 > img { filter: none; }


/* 로그인 박스 (기존 .user-info-box 내용) */
#sideBar .userInfo { padding-top: 1rem; border-top: 1px solid #2b2b2b; flex-shrink: 0; }
#sideBar .userMenu {position: relative; margin:0}
#sideBar .ui-profile { display: flex; align-items: center; gap: .75rem; }
#sideBar .ui-img { display: block; width: 2.75rem; aspect-ratio: 1; flex-shrink: 0; overflow: hidden; border-radius: 50%; border: 1px solid var(--pointcolor); }
#sideBar .ui-img img { width: 100%; height: 100%; object-fit: cover; }
#sideBar .ui-detail { min-width: 0; color: #9d9d9d; font-size: .8125rem; line-height: 1.5; }
#sideBar .ui-detail b { color: #fff; font-weight: 500; }
#sideBar .userToggle{margin-left: auto; padding: 0.5em; aspect-ratio: 1; cursor: pointer;}
#sideBar .ui-name { font-size: .9375rem; }
#sideBar .ui-badge { display: inline-block; margin-left: .3em; padding: .05em .55em; border-radius: 2em; background: var(--pointcolor); color: #fff; font-size: .6875rem; vertical-align: middle; }
#sideBar .ui-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: 1rem; }
#sideBar .ui-btns .full { grid-column: 1 / -1; }
#sideBar .ui-btns a { display: block; padding: .55em .5em; border-radius: 4px; background: #2b2b2b; color: #fff; font-size: .8125rem; text-align: center; transition: background .2s; }
#sideBar .ui-btns a:hover { background: var(--pointcolor); }

#sideBar .ui-info {display: flex; align-items: center; justify-content: center;  border-top:1px solid #2b2b2b;margin-top: 1rem;padding:.8em; padding-bottom:0; gap:2em}
#sideBar .ui-info a {color:#9d9d9d;}

#sideBar .sideTop .m-menu-btn { display: none; }


/* sideBar 접혔을떄 */
#sideBar.collapsed {width: 4.75rem;}
#sideBar.collapsed .categoryList :is(li .depth01 > span, .submenu) { display: none; } 
#sideBar.collapsed .categoryList {padding:2em 0}
#sideBar.collapsed .categoryList li .depth01 > img{margin: auto;}
#sideBar.collapsed .categoryList > li + li {margin-top:3rem}
#sideBar.collapsed button#toggleSidebar{position: absolute;right: -18px;}
#sideBar.collapsed .sd_logo{transform: translateX(-2px);}

#sideBar.collapsed .categoryList .submenu:not(.is-flyout) { display: none !important; }
#sideBar .categoryList .submenu.is-flyout { display: block !important; position: fixed; z-index: 2; min-width: 13rem; padding: .75rem 1rem; background: #1c1c1c; border: 1px solid #2b2b2b; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
#sideBar.collapsed .categoryList li.active .depth01 img { opacity: 1; filter: drop-shadow(0 0 4px var(--pointcolor)); }
#sideBar.collapsed .categoryList .submenu.is-flyout::before { content: attr(data-cat); display: block; margin-bottom: .5rem; padding-bottom: .5rem; border-bottom: 1px solid #2b2b2b; color: #fff; font-size: 1.1em; font-weight: 500 }
#sideBar.collapsed .userInfo { border-top: 0; }
#sideBar.collapsed :is(.ui-detail, .ui-btns,.ui-info,.userToggle ) { display: none; }
#sideBar.collapsed .ui-profile { justify-content: center; }

@media (width <= 990px) {
    #sideBar { position: fixed; width: 100%; height: auto;left: 0; top: 0; z-index: 9000; padding: 1rem; border-right: 0; 
        background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px)
     }
    #sideBar :is(.categoryList,.userInfo,#toggleSidebar){display: none;}
    #sideBar .sideTop { align-items: center; justify-content: space-between; }
    #sideBar .sd_logo { max-width: 9rem; }
    #sideBar .sideTop .m-menu-btn { display: flex; align-items: center; justify-content: center; width: 2.25rem; aspect-ratio: 1; color: #fff; font-size: 1.375rem; }
    #sideBar.m-open { height: 100vh;  overflow:hidden;background: #141413;border-bottom: 1px solid #1c1c1c;}
    #sideBar.m-open :is(.categoryList, .userInfo) { display: block !important; } 
    #sideBar.m-open .categoryList { margin: 1.5rem 0; }
    #sideBar.m-open .userMenu { margin-top: 0; }
    body.m-menu-open #Layout { overflow: hidden; }
}

/* 펼쳐지는 동안 (sidebar.js 가 0.65초만 붙임) : 안쪽은 펼친 너비로 고정 → 글자 줄바꿈 없이 드러나고, 글자는 마지막에 서서히 */
#sideBar.sb-anim { overflow: hidden; }
#sideBar.sb-anim :is(.sideTop, .categoryList, .userInfo) { min-width: calc(16rem - 2rem - 1px); }
#sideBar.sb-anim :is(.categoryList .depth01 > span, .categoryList .submenu, .ui-detail, .ui-btns, .ui-info, .userToggle) { white-space: nowrap; animation: sbFade .35s ease .15s both; }
@keyframes sbFade { from { opacity: 0; } to { opacity: 1; } }

/* 알림 벨 (/_inc/noti-bell.php)  */

.noti-wrap { position: relative; display: inline-flex; }
.noti-wrap .btn-noti { position: relative; display: flex; align-items: center; justify-content: center; width: 2rem; aspect-ratio: 1; color: #fff; font-size: 1.125rem; }
.noti-wrap .noti-badge { position: absolute; top: -.2rem; right: -.35rem; min-width: 1.1rem; padding: 0 .3em; border-radius: 1em; background: var(--pointcolor); color: #fff; font-size: .625rem; line-height: 1.1rem; text-align: center; }
.noti-wrap .noti-panel { position: absolute; top: calc(100% + .5rem); left: 0; z-index: 9300; width: 20rem; background: #1c1c1c; border: 1px solid #2b2b2b; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.45); color: #fff; font-size: .8125rem; }
.noti-wrap.noti--up .noti-panel { top: auto; bottom: calc(100% + .5rem); }
.noti-wrap .noti-panel[hidden] { display: none; }
.noti-wrap .noti-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid #2b2b2b; }
.noti-wrap .noti-actions { display: flex; align-items: center; gap: .75rem; }
.noti-wrap .noti-actions button { color: #9d9d9d; }
.noti-wrap .noti-close { font-size: 1.125rem; line-height: 1; }
.noti-wrap .noti-list { max-height: 20rem; overflow-y: auto; }
.noti-wrap .noti-list li+li{border-top:1px dashed #9d9d9d}
.noti-wrap .noti-link { display: block; padding: .75rem 1rem; color: #fff; }
.noti-wrap .noti-link:hover { background: #2b2b2b; }
.noti-wrap .noti-title { display: block; font-weight: 500; font-size: 1.2em;color:#fff;white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noti-wrap .noti-title:before {    content: ''; display: inline-block; aspect-ratio: 1; width: .5em; background: #fff; border-radius: 50%; margin-right: 10px;}
.noti-wrap .noti-item.is-unread .noti-title:before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: .4em; border-radius: 50%; background: var(--pointcolor); vertical-align: middle; }
.noti-wrap .noti-item.is-read .noti-title { color: #9d9d9d; font-weight: 400; }
.noti-wrap .noti-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .25rem; color: #9d9d9d; }
.noti-wrap .noti-empty { padding: 1.5rem 1rem; color: #9d9d9d; text-align: center; }
.noti-wrap .noti-foot { padding: .6rem 1rem; border-top: 1px solid #2b2b2b; text-align: center; }
.noti-wrap .noti-more { color: #9d9d9d; }

/* 알림 벨 - 화면 오른쪽 위 고정 */
.noti-fixed { position: fixed; top: 1.25rem; right: 1.5rem; z-index: 9300; } 
.noti-fixed .noti-panel { left: auto; right: 0; } /* 패널을 오른쪽 기준으로 열기 */
@media (width <= 990px) {
    .noti-fixed { top: 1.1rem; right: 4rem; } /* 모바일: 메뉴(☰) 버튼 왼쪽 */
}

/* --------------------------------------------------------------------------

   약관 팝업 (하단 이용약관 · 개인정보처리방침 · 환불규정) - /_inc/js/rp-policy.js

   -------------------------------------------------------------------------- */

.rp-policy { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, .7); } 

.rp-policy[hidden] { display: none; } 

.rp-policy-box { display: flex; flex-direction: column; width: 100%; max-width: 760px; max-height: 85vh; background: #1c1c1c; border: 1px solid #535353; } 

.rp-policy-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid #535353; } 

.rp-policy-tabs { display: flex; flex-wrap: wrap; gap: .4rem; } 

.rp-policy-tabs button { padding: .4em 1em; border: 1px solid #535353; border-radius: 10em; color: #9d9d9d; font-size: .875rem; transition: background-color .2s, border-color .2s, color .2s; } 

.rp-policy-tabs button:hover { border-color: var(--pointcolor); } 

.rp-policy-tabs button.act { background: var(--pointcolor); border-color: var(--pointcolor); color: #fff; } 

.rp-policy-close { flex-shrink: 0; color: #fff; font-size: 1.75rem; line-height: 1; } 

.rp-policy-body { overflow-y: auto; padding: 1.5rem; color: #cfcfcf; font-size: .875rem; line-height: 1.7; } 

.rp-policy-msg { padding: 2rem 0; text-align: center; color: #9d9d9d; } 

.rp-policy-doc h4 { margin-bottom: 1.25rem; color: #fff; font-size: 1.25rem; font-weight: 500; } 

.rp-policy-doc h5 { margin: 1.75rem 0 .5rem; color: var(--pointcolor); font-size: 1rem; font-weight: 500; } 

.rp-policy-doc dl { margin-top: .5rem; } 

.rp-policy-doc dt { margin-top: .5rem; color: #fff; } 

.rp-policy-doc dd { margin-top: .25rem; } 

body.rp-policy-open { overflow: hidden; }

body.rp-policy-open #Layout { overflow: hidden; }



