@charset "utf-8";

/* ============================================================
   테마 포인트 컬러 (관리자 편집 모달의 "색상" 탭에서 프리셋 선택 시
   head.sub.php 가 이 값을 인라인 <style> 로 덮어쓴다. portal.settings.php
   의 PORTAL_THEME_COLOR_PRESETS 참고. 기본값은 항상 원래 그린 색상.)
   ============================================================ */
:root {
    --portal-primary: #03c75a;
    --portal-primary-hover: #02b050;

    /* 다크모드 팔레트 (핵심 레이아웃 범위만 — 헤더/GNB/사이드바/홈 카드/푸터/게시판 기본 배경.
       글쓰기 폼·관리자 편집 모달·portal-search-page 는 범위 밖이라 라이트 고정.
       #dark_mode_toggle 클릭 시 html 태그에 data-theme="dark" 를 붙이면 아래로 전환된다.
       자세한 배경은 theme/portal/CLAUDE.md "다크모드" 절 참고.) */
    --portal-bg:           #f4f5f7;
    --portal-surface:      #fff;
    --portal-surface-alt:  #f8f9fa;
    --portal-border:       #ebebeb;
    --portal-text:         #1a1a1a;
    --portal-text-sub:     #888;
}

html[data-theme="dark"] {
    --portal-bg:           #16181d;
    --portal-surface:      #1e2128;
    --portal-surface-alt:  #23262e;
    --portal-border:       #34373f;
    --portal-text:         #e8e9ec;
    --portal-text-sub:     #9498a2;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, ul, ol, p { margin: 0; padding: 0; }
ul, ol { list-style: none; }
li { list-style: none; }

/* ================================================================
   그누보드 코어 CSS 강제 덮어쓰기
   ★ 이 포털 테마 CSS 는 add_stylesheet(order=0) → html_end() 로
     gnuboard default.css 바로 다음에 삽입되므로 동일 명도에서
     아래 규칙이 항상 우선적용 됨. 게시판 스킨 style.css 는
     더 나중에 삽입(order=0, 인서트 순서 후순위)되어 스킨별 커스텀이 가능.
   ================================================================ */

/* ── 동적 레이어 초기 강제 숨김 ──────────────────────────────────
   사이드뷰 옵션 메뉴와 임시저장 팝업은 JS 토글로만 노출되어야 함.
   코어 CSS 가 block 등으로 설정할 경우를 !important 로 차단.          */
#sv_option,
.sv_option,
#autosave_pop { display: none !important; }

/* 리스트 불릿 전체 제거 */
#portal_wrap ul,
#portal_wrap ol,
#portal_wrap li,
#portal_wrap .lat,
#portal_wrap .latest,
#portal_wrap .board_list ul,
#portal_wrap .board_list ol,
#portal_wrap .board_list li,
#bo_list ul, #bo_list ol, #bo_list li,
#bo_view ul, #bo_view ol, #bo_view li,
.widget_box ul, .widget_box ol, .widget_box li,
.sl_list, .sl_list li,
.pl_list, .pl_list li,
.nv_news_list, .nv_news_list li,
.popular_list, .popular_list li,
.visit_list, .visit_list li {
    list-style:      none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

/* 게시판 컨테이너 여백 초기화 */
#bo_list ul, #bo_list ol, #bo_list li,
#bo_view ul, #bo_view ol, #bo_view li {
    margin:  0 !important;
    padding: 0 !important;
}

/* 테이블 기본값 통일 */
#portal_wrap table,
#bo_list table, #bo_view table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 게시판 테이블 좌우 테두리 제거 */
#portal_wrap .tbl_head01 table,
#portal_wrap .tbl_head01 th,
#portal_wrap .tbl_head01 td,
#bo_list .tbl_head01 table,
#bo_list .tbl_head01 th,
#bo_list .tbl_head01 td {
    border-left:  0 !important;
    border-right: 0 !important;
}

/* 페이지네이션 — 불릿 제거, 중앙 정렬 */
#portal_wrap .pg, #portal_wrap .pg li,
#bo_list .pg,     #bo_list .pg li {
    list-style: none !important;
    margin:     0 !important;
    padding:    0 !important;
}
#bo_list .pg_wrap { float: none; display: block; width: 100%; text-align: center; margin: 16px 0; }
#bo_list .pg      { display: inline-block; }

/* 게시판 검색창 팝업 — 코어 .bo_sch_wrap 이 기본 block 이면 숨김 유지 */
.bo_sch_wrap { display: none; }

/* ================================================================
   게시판 테이블 너비 고정 & 네이버 카페 스타일 디테일
   ================================================================ */

/* 게시판 컨테이너가 부모(.grid_left) 너비를 넘지 않도록 */
#bo_list,
#bo_list .tbl_wrap,
#bo_list .tbl_head01 { width: 100% !important; max-width: 100%; }

/* table-layout: fixed → 열 너비를 텍스트 길이가 아닌 CSS 지정값으로 고정
   width: 100% → 부모 컨테이너에 꽉 채움 */
#bo_list table,
.board_list table {
    width:        100% !important;
    max-width:    100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

/* 헤더 셀: 좌우 테두리 제거, nowrap */
#bo_list table th {
    border-left:  none !important;
    border-right: none !important;
    white-space:  nowrap;
    overflow:     hidden;
    text-overflow: ellipsis;
}

/* 일반 셀: 좌우 테두리 제거 */
#bo_list table td {
    border-left:  none !important;
    border-right: none !important;
    overflow:     hidden;
}

/* ── 열 너비 고정 (번호 60 / 작성자 120 / 날짜 100 / 조회 60) ──── */
#bo_list table .td_num2 {
    width: 60px !important;
    white-space: nowrap;
    text-align: center;
}
#bo_list table .td_name {
    width: 120px !important;
    white-space: nowrap;
    overflow: visible;
    text-align: center;
}
#bo_list table .td_name .sv_member {
    display: inline-block;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
/* 조회수 열 (.td_num): 날짜 열과 동일 클래스가 혼재할 수 있으므로 별도 지정 */
#bo_list table .td_num {
    width: 60px !important;
    white-space: nowrap;
    text-align: center;
}
#bo_list table .td_datetime {
    width: 100px !important;
    white-space: nowrap;
    text-align: center;
}

/* 제목 열: 남는 공간 전부 차지 + 말줄임표 */
#bo_list table .td_subject {
    width: auto !important;
    max-width: 0;          /* table-layout:fixed 에서 남는 공간 자동 할당 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#bo_list table .td_subject .bo_tit {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#bo_list table .td_subject .bo_tit a {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* 체크박스 열 */
#bo_list table .td_chk,
#bo_list table .all_chk  { width: 32px !important; }

/* 작성자 레벨 아이콘 / 프로필 이미지 크기 고정 */
#bo_list table .td_name img,
.td_name img {
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 2px;
}

/* 사이드뷰(글쓴이 클릭 드롭다운) */
#portal_wrap .sv_wrap,
.sv_wrap {
    position: relative !important;
    display: inline-block !important;
}
/* display:none 은 그누보드 코어 .sv_wrap .sv 룰에 맡기고 위치/디자인만 지정 */
#portal_wrap .sv_wrap .sv,
.sv_wrap .sv {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    z-index: 9999 !important;
    min-width: 128px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    padding: 4px 0;
    white-space: nowrap;
}
/* common.js가 .sv_on 클래스를 추가하면 표시 */
.sv_wrap .sv.sv_on,
#portal_wrap .sv_wrap .sv.sv_on {
    display: block !important;
}
/* JS가 sv_zfix 클래스를 붙인 행/아이템을 최상위로 올림 */
tr.sv_zfix,
li.sv_zfix,
.nv_news_item.sv_zfix {
    position: relative !important;
    z-index: 50 !important;
}
#portal_wrap .sv_wrap .sv a,
.sv_wrap .sv a {
    display: block !important;
    width: auto;
    padding: 8px 16px;
    font-size: 12px;
    color: #333;
    box-sizing: border-box;
    text-decoration: none;
}
#portal_wrap .sv_wrap .sv a:hover,
.sv_wrap .sv a:hover {
    background: #f5f5f5;
    color: var(--portal-primary);
}

body {
    font-family: -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: var(--portal-bg);
    color: var(--portal-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.15s, color 0.15s;
}
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; }
img { max-width: 100%; vertical-align: middle; }

/* ============================================================
   Layout
   ============================================================ */
.inner { width: 1130px; max-width: 100%; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
#portal_wrap { min-width: 320px; }

/* ── 최상단 광고 영역 ── */
#portal_top_ad {
    width: 100%;
    text-align: center;
    background: #f8f8f8;
    padding: 8px 0;
    line-height: 0;
    font-size: 0;
}
#portal_top_ad ins,
#portal_top_ad > * { display: inline-block; }

/* ============================================================
   Top Header
   ============================================================ */
#portal_top_header {
    background: var(--portal-surface-alt);
    border-bottom: 1px solid var(--portal-border);
}
#portal_top_header .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}
#portal_top_header .top_header_left,
#portal_top_header .top_header_right {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}
#portal_top_header a {
    font-size: 12px;
    color: var(--portal-text-sub);
    transition: color 0.12s;
}
#portal_top_header a:hover { color: var(--portal-primary); text-decoration: none; }

/* ============================================================
   Header
   ============================================================ */
#portal_header {
    background: var(--portal-surface);
    padding: 22px 0;
    border-bottom: 1px solid var(--portal-border);
}
#portal_header .inner {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* 로고 */
#portal_header .logo a {
    font-size: 34px;
    font-weight: 900;
    color: var(--portal-primary);
    letter-spacing: -1.5px;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
#portal_header .logo .logo_img {
    height: 48px;
    max-width: 180px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* 검색창 */
#portal_header .search_wrap form {
    display: flex;
    border: 1.5px solid var(--portal-primary);
    border-radius: 24px;
    overflow: hidden;
}
#portal_header .search_wrap input {
    width: 380px;
    padding: 10px 18px;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a1a;
    background: transparent;
}
#portal_header .search_wrap button {
    padding: 0 22px;
    background: var(--portal-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
    font-weight: 700;
    transition: background 0.15s;
}
#portal_header .search_wrap button:hover { background: var(--portal-primary-hover); }

/* 음성 검색 버튼 (검색창 안, 검색 버튼 왼쪽) */
#portal_header .search_wrap .sch_voice_btn {
    background: transparent !important;
    color: #999 !important;
    padding: 0 12px !important;
    border-left: 1px solid #e4e8eb !important;
}
#portal_header .search_wrap .sch_voice_btn:hover { color: var(--portal-primary) !important; }
#portal_header .search_wrap .sch_voice_btn.listening {
    color: #fff !important;
    background: #ff4747 !important;
    animation: pts_voice_pulse 1.2s ease-in-out infinite;
}
@keyframes pts_voice_pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* 입력도구(화면 키보드) 버튼 (검색창 안, 음성 검색 버튼 왼쪽) */
#portal_header .search_wrap .sch_keyboard_btn {
    background: transparent !important;
    color: #999 !important;
    padding: 0 12px !important;
    border-left: 1px solid #e4e8eb !important;
}
#portal_header .search_wrap .sch_keyboard_btn:hover { color: var(--portal-primary) !important; }

/* 입력도구 화면 키보드 패널 (테마/플러그인 공용 클래스, js/search-tools.js 가 생성) */
.pts_kbd_panel {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #dadddf;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 10px;
    width: 420px;
    max-width: calc(100vw - 16px);
}
.pts_kbd_panel.open { display: block; }
.pts_kbd_row { display: flex; gap: 4px; margin-bottom: 4px; justify-content: center; }
.pts_kbd_row:last-child { margin-bottom: 0; }
.pts_kbd_key {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 1px solid #e4e8eb;
    border-radius: 4px;
    background: #f8f9fa;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    text-align: center;
}
.pts_kbd_key:hover { background: #eef0f2; }
.pts_kbd_key.active { background: var(--portal-primary); border-color: var(--portal-primary); color: #fff; }
.pts_kbd_row_bottom .pts_kbd_key { font-size: 12.5px; }
.pts_kbd_wide { flex: 1.2 !important; }
.pts_kbd_space { flex: 3 !important; }
.pts_kbd_close { color: #999; }

/* 검색 플러그인 관리자 설정 버튼 (검색창 옆, 최고관리자에게만 노출) */
#portal_header .search_admin_btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    color: #666;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.15s;
}
#portal_header .search_admin_btn:hover { background: #e4e8eb; color: var(--portal-primary); }

/* 헤더 배너 (검색창 옆, 120x60) — 있을 때만 우측으로 밀착, 없으면 레이아웃에 영향 없음 */
#portal_header .header_banner {
    flex-shrink: 0;
    width: 120px;
    height: 60px;
    margin-left: auto;
}
#portal_header .header_banner a,
#portal_header .header_banner img {
    display: block;
    width: 120px;
    height: 60px;
}

/* 다크모드 토글 — 항상 헤더 우측 끝. .header_banner 가 있으면 그 옆에, 없으면 자기 스스로
   margin-left:auto 로 밀린다(둘 다 있어도 뒤쪽 요소는 자동으로 여백이 0이 되어 겹치지 않음). */
#portal_header .dark_mode_toggle {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    margin-left: auto;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
#portal_header .dark_mode_toggle:hover { background: #e4e8eb; color: var(--portal-primary); }
html[data-theme="dark"] #portal_header .dark_mode_toggle { background: var(--portal-surface-alt); color: var(--portal-text-sub); }
html[data-theme="dark"] #portal_header .dark_mode_toggle:hover { color: var(--portal-primary); }
#portal_header .header_banner img {
    object-fit: cover;
    border-radius: 4px;
}

/* ============================================================
   GNB
   ============================================================ */
#portal_gnb {
    background: var(--portal-surface);
    border-bottom: 1px solid var(--portal-border);
    position: relative;
    z-index: 100;
}
#portal_gnb .gnb_list {
    display: flex;
    height: 52px;
    align-items: stretch;
}

/* 1depth 아이템 */
#portal_gnb .gnb_item {
    position: relative;
    display: flex;
    align-items: stretch;
}
#portal_gnb .gnb_item > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--portal-text);
    position: relative;
    transition: color 0.12s;
    white-space: nowrap;
}
#portal_gnb .gnb_item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--portal-primary);
    transition: width 0.18s ease;
}
#portal_gnb .gnb_item > a:hover,
#portal_gnb .gnb_item:hover > a { color: var(--portal-primary); }
#portal_gnb .gnb_item > a:hover::after,
#portal_gnb .gnb_item:hover > a::after { width: calc(100% - 24px); }

/* 드롭다운 화살표 */
.gnb_arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 3.5px 0 3.5px;
    border-color: #aaa transparent transparent transparent;
    margin-top: 1px;
    transition: transform 0.15s;
}
#portal_gnb .gnb_item:hover .gnb_arrow {
    border-color: var(--portal-primary) transparent transparent transparent;
    transform: rotate(180deg);
}

/* 2depth 드롭다운 */
.gnb_sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-top: 2px solid var(--portal-primary);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 200;
    padding: 4px 0;
}
#portal_gnb .gnb_item:hover .gnb_sub { display: block; }

.gnb_sub li { display: block; }
.gnb_sub li a {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--portal-text);
    white-space: nowrap;
    transition: background 0.1s, color 0.1s;
}
.gnb_sub li a:hover {
    background: #f6fff9;
    color: var(--portal-primary);
}
.gnb_sub li + li { border-top: 1px solid var(--portal-border); }

.gnb_empty a { color: #e84040 !important; }

/* ============================================================
   Outlogin 스킨
   ============================================================ */

/* 공통 래퍼 */
.ol_wrap { padding: 16px; }

/* ── 비로그인 ── */
.ol_inputs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ol_input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dde1e5;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s;
}
.ol_input:focus { border-color: var(--portal-primary); }

.ol_btn_login {
    display: block;
    width: 100%;
    padding: 10px 0;
    background: var(--portal-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 10px;
}
.ol_btn_login:hover { background: var(--portal-primary-hover); color: #fff; text-decoration: none; }

/* 안내 문구 (버튼형 아웃로그인 상단) */
.ol_notice { margin: 0 0 10px; font-size: 12px; color: var(--portal-text-sub); text-align: center; line-height: 1.4; }

.ol_foot {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

/* 자동로그인 체크박스 */
.ol_auto {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--portal-text-sub);
    user-select: none;
}
.ol_auto input[type="checkbox"] { display: none; }
.ol_chk_box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #ccc;
    border-radius: 2px;
    position: relative;
    flex-shrink: 0;
    background: #fff;
    transition: border-color 0.12s, background 0.12s;
}
.ol_auto input:checked + .ol_chk_box {
    background: var(--portal-primary);
    border-color: var(--portal-primary);
}
.ol_auto input:checked + .ol_chk_box::after {
    content: '';
    position: absolute;
    top: 1px; left: 3px;
    width: 5px; height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.ol_links { display: flex; align-items: center; gap: 6px; color: var(--portal-text-sub); }
.ol_links a { font-size: 12px; color: var(--portal-text-sub); transition: color 0.1s; }
.ol_links a:hover { color: var(--portal-primary); }
.ol_divider { color: #ddd; font-size: 11px; }

/* ── 로그인 후 ── */
.ol_after { padding: 14px 16px; }

.ol_profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f2f2;
}
.ol_avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ebebeb;
}
.ol_greeting { font-size: 13px; color: var(--portal-text-sub); line-height: 1.4; }
.ol_nick { font-size: 15px; font-weight: 700; color: var(--portal-text); margin-right: 2px; }
.ol_admin_link {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #e84040;
    padding: 1px 6px;
    border-radius: 3px;
    vertical-align: middle;
    transition: background 0.1s;
}
.ol_admin_link:hover { background: #c73030; color: #fff; }

.ol_stats {
    display: flex;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}
.ol_stats li { flex: 1; }
.ol_stats li + li { border-left: 1px solid #f0f0f0; }
.ol_stats a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    text-decoration: none;
    transition: background 0.1s;
}
.ol_stats a:hover { background: #f6fff9; }
.ol_stat_label { font-size: 11px; color: var(--portal-text-sub); margin-bottom: 4px; }
.ol_stat_val { font-size: 15px; font-weight: 700; color: var(--portal-text); }
.ol_stat_new { color: #e84040; }

.ol_actions {
    display: flex;
    gap: 6px;
}
.ol_action_link {
    flex: 1;
    display: block;
    text-align: center;
    padding: 7px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--portal-text-sub);
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.12s, color 0.12s;
}
.ol_action_link:hover { border-color: var(--portal-primary); color: var(--portal-primary); }
.ol_logout { color: var(--portal-text-sub); }
.ol_logout:hover { border-color: #e84040; color: #e84040; }

/* ============================================================
   Main Container
   ============================================================ */
#portal_container { padding: 24px 0; min-height: 600px; }

/* Grid */
.portal_main_grid { display: flex; gap: 24px; width: 100%; }
/* min-width: 0 이 핵심: flex 아이템이 table 등 내부 콘텐츠에 의해
   부모를 터뜨리는 현상 방지 (flex 기본값 min-width:auto 대신 0 지정) */
.portal_main_grid .grid_left  { flex: 1; min-width: 0; width: 0; overflow: visible; }
.portal_main_grid .grid_right { width: 336px; flex-shrink: 0; }

/* ── 게시판 사이드바 레이아웃 ── */
.portal_board_layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}
.portal_board_main {
    flex: 1;
    min-width: 0;
    overflow: visible;
}
.portal_board_side {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── 게시판 사이드바 광고 ── */
.brd_side_ad {
    width: 100%;
    overflow: hidden;
    text-align: center;
}

/* ── 게시판 사이드바 위젯 ── */
.brd_side_widget {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    overflow: hidden;
}
.brd_side_whead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 2px solid var(--portal-primary);
}
.brd_side_wtitle {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}
.brd_side_wbadge {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 20px;
    background: #e8f9ef;
    color: var(--portal-primary);
    font-weight: 600;
}

/* ── 게시판 목록 위젯 ── */
.brd_side_board_list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.brd_side_board_item a {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.brd_side_board_item a:hover { background: #f5fdf9; color: var(--portal-primary); }
.brd_side_board_cur a {
    font-weight: 700;
    color: var(--portal-primary) !important;
    background: #f0fdf7;
}
.brd_side_board_cur .fa { margin-right: 4px; font-size: 11px; }

/* ── 게시글 목록 위젯 (최신글 / 인기글) ── */
.brd_side_post_list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}
.brd_side_post_item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-bottom: 1px solid #f4f4f4;
    min-height: 36px;
}
.brd_side_post_item:last-child { border-bottom: none; }
.brd_side_post_link {
    flex: 1;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.brd_side_post_link:hover { color: var(--portal-primary); }
.brd_side_post_date {
    flex-shrink: 0;
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}
.brd_side_rank {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    background: #eee;
    color: #888;
}
.brd_side_rank_top { background: var(--portal-primary); color: #fff; }

/* ============================================================
   Left – 상단 배너
   ============================================================ */
.main_banner {
    height: 240px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
    position: relative;
    background: #e8eaed;
}

/* 배너 슬라이더 */
.banner_slider { width: 100%; height: 100%; position: relative; }
.banner_track  {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}
.banner_slide { flex: 0 0 100%; height: 100%; }
.banner_slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner_slide a   { display: block; height: 100%; }

.banner_arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.35); border: none; color: #fff;
    width: 36px; height: 36px; border-radius: 50%;
    font-size: 16px; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.banner_arrow:hover { background: rgba(0,0,0,.6); }
.banner_prev { left: 10px; }
.banner_next { right: 10px; }

.banner_dots {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 10;
}
.banner_dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.5); border: none; cursor: pointer;
    padding: 0; transition: background .2s;
}
.banner_dot.on { background: #fff; }

/* 배너 미등록 플레이스홀더 */
.banner_placeholder {
    height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
}
.banner_ph_txt { font-size: 14px; color: #aaa; }
.banner_ph_btn {
    padding: 7px 18px; background: var(--portal-primary); color: #fff;
    border: none; border-radius: 4px; cursor: pointer; font-size: 13px;
}
.banner_ph_btn:hover { background: var(--portal-primary-hover); }

/* 관리자 편집 트리거 버튼 */
.widget_editor_trigger { padding: 0; border: none; background: transparent; box-shadow: none; }
.editor_open_btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 12px; background: #f7f8f9;
    border: 1px solid #dde1e5; border-radius: 6px; cursor: pointer;
    font-size: 13px; color: #555; font-weight: 600;
    transition: background .1s;
}
.editor_open_btn:hover { background: #eef0f2; }
.editor_open_btn .fa { color: var(--portal-primary); font-size: 15px; }

/* ============================================================
   포털 편집 모달 (.pe_*)
   ============================================================ */
.pe_overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 9000;
    align-items: center; justify-content: center;
}
.pe_overlay.open { display: flex; }
body.pe_lock { overflow: hidden; }

.pe_modal {
    background: #fff; border-radius: 10px; width: 520px; max-width: calc(100vw - 32px);
    max-height: calc(100vh - 60px); display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    animation: pe_fadein .18s ease;
}
@keyframes pe_fadein { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }

.pe_header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 0;
}
.pe_title { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.pe_close  {
    background: none; border: none; font-size: 22px; cursor: pointer;
    color: #aaa; line-height: 1; padding: 2px 4px;
}
.pe_close:hover { color: #333; }

.pe_tabs {
    display: flex; border-bottom: 2px solid #f0f0f0;
    padding: 10px 20px 0; gap: 4px;
}
.pe_tab {
    padding: 8px 16px; background: none; border: none; cursor: pointer;
    font-size: 13px; color: #888; border-bottom: 2px solid transparent;
    margin-bottom: -2px; font-weight: 600; transition: color .1s;
}
.pe_tab.active { color: var(--portal-primary); border-bottom-color: var(--portal-primary); }
.pe_tab:hover  { color: #333; }

.pe_body { flex: 1; overflow-y: auto; padding: 18px 20px; }

.pe_pane { display: none; }
.pe_pane.active { display: block; }

.pe_label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 4px; }
.pe_hint  { font-size: 11px; color: #aaa; font-weight: 400; }

.pe_input {
    width: 100%; box-sizing: border-box;
    height: 36px; border: 1px solid #dde1e5; border-radius: 4px;
    padding: 0 10px; font-size: 13px; color: #333;
    margin-bottom: 12px; outline: none; transition: border-color .15s;
}
.pe_input:focus { border-color: var(--portal-primary); }

.pe_color_swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pe_color_swatch {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px 8px 10px; border: 2px solid transparent; border-radius: 20px;
    background-color: #ccc; color: #fff; font-size: 12px; font-weight: 700;
    cursor: pointer; transition: border-color .15s, box-shadow .15s;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.pe_color_swatch i { font-size: 12px; visibility: hidden; }
.pe_color_swatch.selected { border-color: #333; }
.pe_color_swatch.selected i { visibility: visible; }
.pe_color_swatch_label { text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }

.pe_textarea {
    width: 100%; box-sizing: border-box;
    border: 1px solid #dde1e5; border-radius: 4px;
    padding: 8px 10px; font-size: 13px; color: #333;
    margin-bottom: 4px; outline: none; resize: vertical;
    transition: border-color .15s; font-family: inherit;
}
.pe_textarea:focus { border-color: var(--portal-primary); }

.pe_logo_url_row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
}
.pe_logo_url_row .pe_input { margin-bottom: 0; flex: 1; min-width: 0; }
.pe_btn_svg_upload {
    flex-shrink: 0;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--portal-primary);
    border-radius: 4px;
    background: none;
    color: var(--portal-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .1s, color .1s;
}
.pe_btn_svg_upload:hover { background: var(--portal-primary); color: #fff; }

.pe_preview_wrap {
    height: 70px; border: 1px dashed #dde1e5; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; background: #fafafa;
}

/* 배너 목록 */
.pe_banner_row {
    display: flex; gap: 10px; align-items: flex-start;
    border: 1px solid #eee; border-radius: 6px; padding: 10px;
    margin-bottom: 8px; background: #fafafa;
}
.pe_banner_num {
    width: 20px; height: 20px; border-radius: 50%; background: var(--portal-primary);
    color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    margin-top: 8px;
}
.pe_banner_fields { flex: 1; }
.pe_banner_fields .pe_input { margin-bottom: 6px; }
.pe_banner_fields label { font-size: 12px; color: #666; cursor: pointer; }
.pe_bn_pos_row { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pe_bn_pos_label {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #666; white-space: nowrap;
}
.pe_bn_pos_label input[type=range] { flex: 1; accent-color: var(--portal-primary); cursor: pointer; }
.pe_bn_pos_val { min-width: 22px; text-align: right; font-weight: 600; color: #333; }
.pe_banner_del {
    background: none; border: none; color: #ccc; font-size: 18px;
    cursor: pointer; padding: 0 4px; line-height: 1; margin-top: 4px;
}
.pe_banner_del:hover { color: #e74c3c; }

/* 푸터 메뉴 편집 행 */
.pe_fmenu_row {
    display: flex; gap: 6px; align-items: center;
    margin-bottom: 6px;
}
.pe_fmenu_drag {
    color: #ccc; cursor: grab; font-size: 14px; flex-shrink: 0; padding: 0 2px;
    user-select: none; -webkit-user-select: none;
}
.pe_fmenu_drag:active { cursor: grabbing; }
.pe_fmenu_row .pe_input { flex: 1; min-width: 0; }
.pe_fmenu_dragging { opacity: 0.4; background: #f0fff7; border-radius: 4px; }

.pe_btn_add {
    width: 100%; padding: 8px; border: 1px dashed var(--portal-primary);
    border-radius: 4px; background: none; color: var(--portal-primary);
    font-size: 13px; cursor: pointer; transition: background .1s;
}
.pe_btn_add:hover { background: #f0fff7; }

.pe_footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 12px 20px; border-top: 1px solid #f0f0f0;
}
.pe_msg     { font-size: 12px; flex: 1; }
.pe_msg.ok  { color: var(--portal-primary); }
.pe_msg.err { color: #e74c3c; }

.pe_btn_save {
    height: 36px; padding: 0 20px; background: var(--portal-primary); border: none;
    color: #fff; border-radius: 4px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: background .1s;
    display: flex; align-items: center; gap: 6px;
}
.pe_btn_save:hover    { background: var(--portal-primary-hover); }
.pe_btn_save:disabled { background: #aaa; cursor: not-allowed; }

/* ============================================================
   Left – 탭 게시판 (.portal_tabs)
   ============================================================ */
.portal_tabs {
    margin-bottom: 18px;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    overflow: visible;
}

.tab_nav {
    display: flex;
    border-bottom: 1px solid var(--portal-border);
    background: var(--portal-surface);
    padding: 0 4px;
}
.tab_nav button {
    flex: none;
    padding: 0 16px;
    height: 48px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--portal-text-sub);
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
    margin-bottom: -1px;
}
.tab_nav button:hover { color: var(--portal-text); }
.tab_nav button.active {
    color: var(--portal-primary);
    border-bottom-color: var(--portal-primary);
    font-weight: 700;
}

.tab_content { display: none; }
.tab_content.active { display: block; }

/* ============================================================
   Left – 갤러리
   ============================================================ */
.gallery_section {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 18px;
}
.gallery_section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--portal-text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--portal-border);
}
.gallery_section h3 a { color: inherit; }
.gallery_section h3 a:hover { color: var(--portal-primary); }

/* ============================================================
   Left – 하단 2단 게시판
   ============================================================ */
.board_section { display: flex; gap: 18px; margin-bottom: 18px; }
.half_col { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.half_board {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    overflow: visible;
}
.half_board h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-text);
    padding: 13px 16px;
    border-bottom: 1px solid var(--portal-border);
}
.half_board h3 a { color: inherit; }
.half_board h3 a:hover { color: var(--portal-primary); }

/* ── 이용 가이드 바로가기 ── */
.guide_bar {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    margin: 4px 0 16px;
    padding: 13px 20px;
}
.guide_bar_inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.guide_bar_icon { color: var(--portal-primary); font-size: 17px; flex-shrink: 0; }
.guide_bar_text { flex: 1; font-size: 14px; color: #333; font-weight: 500; }
.guide_bar_btn {
    display: inline-block;
    background: var(--portal-primary);
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.guide_bar_btn:hover { background: var(--portal-primary-hover); color: #fff; text-decoration: none; }

/* ── 사이트 히어로 배너 ── */
.site_hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    border-radius: 14px;
    padding: 38px 40px;
    margin-bottom: 24px;
    color: #fff;
}
.site_hero_title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 26px;
    color: #fff;
    letter-spacing: -0.3px;
}
.site_hero_stats {
    display: flex;
    align-items: stretch;
}
.hero_stat {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}
.hero_stat + .hero_stat { border-left: 1px solid rgba(255,255,255,0.15); }
.hero_stat_value {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: var(--portal-primary);
    line-height: 1;
    margin-bottom: 7px;
}
.hero_stat_label {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.3px;
}

/* ============================================================
   portal/basic latest skin – 하단 게시판·사이드 위젯 공통
   ============================================================ */
.pl_list { margin: 0; padding: 0; }

.pl_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #f2f2f2;
    padding: 0 16px;
    min-height: 38px;
}
.pl_item:last-child { border-bottom: none; }

.pl_link {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--portal-text);
    text-decoration: none;
    transition: color 0.1s;
    padding: 8px 0;
}
.pl_link:hover { color: var(--portal-primary); }
.pl_link:hover .pl_tit { color: var(--portal-primary); }

.pl_tit {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--portal-text);
}
.pl_notice .pl_tit { color: var(--portal-text); font-weight: 600; }

/* 공지 뱃지 */
.pl_badge {
    flex-shrink: 0;
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 16px;
}
.pl_badge_notice { background: #e8f3ff; color: #0068c8; }

/* 자물쇠 아이콘 */
.pl_icon_lock { flex-shrink: 0; font-size: 11px; color: #aaa; }

/* 새글 점 */
.pl_new_dot {
    flex-shrink: 0;
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--portal-primary);
    border-radius: 50%;
    margin-bottom: 1px;
}

/* 댓글 수 */
.pl_cmt {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--portal-primary);
}

/* 날짜 */
.pl_date {
    flex-shrink: 0;
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
}

/* 더보기 */
.pl_more {
    display: block;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #bbb;
    border-top: 1px solid #f2f2f2;
    text-decoration: none;
    transition: color 0.12s;
}
.pl_more:hover { color: var(--portal-primary); }

/* 빈 목록 */
.pl_empty {
    padding: 16px;
    font-size: 13px;
    color: #bbb;
    text-align: center;
}

/* ============================================================
   portal/pic_block latest skin – 포토 갤러리
   ============================================================ */
.pl_gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
}

.pl_gal_link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pl_gal_thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
    aspect-ratio: 3 / 2;
}
.pl_gal_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.pl_gal_link:hover .pl_gal_thumb img { transform: scale(1.04); }

/* 새글 N 뱃지 */
.pl_gal_new {
    position: absolute;
    top: 5px;
    left: 5px;
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--portal-primary);
    border-radius: 3px;
}

.pl_gal_tit {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--portal-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.pl_gal_link:hover .pl_gal_tit { color: var(--portal-primary); }

.pl_gal_empty {
    grid-column: 1 / -1;
    padding: 30px;
    text-align: center;
    color: #bbb;
    font-size: 13px;
}

/* ============================================================
   Right – 위젯 박스
   ============================================================ */
.widget_box {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    margin-bottom: 14px;
    overflow: visible; /* hidden → visible: 아웃로그인 드롭다운 잘림 방지 */
    position: relative;
}
.widget_login { min-height: 110px; }

/* 위젯 타이틀 */
.widget_title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 14px 16px 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-text);
    border-bottom: 1px solid var(--portal-border);
    background: none;
}
.widget_title a { color: inherit; }
.widget_title a:hover { color: var(--portal-primary); }

.widget_content { padding: 0; }

/* ============================================================
   인기 검색어 위젯 (popular/basic)
   ============================================================ */
.popular_list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    counter-reset: popular-rank;
}
.popular_item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-bottom: 1px solid #f5f5f5;
}
.popular_item:last-child { border-bottom: none; }
.popular_rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    color: var(--portal-text-sub);
    flex-shrink: 0;
}
.popular_item.top3 .popular_rank { color: var(--portal-primary); }
.popular_word {
    font-size: 13px;
    color: var(--portal-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.popular_word:hover { color: var(--portal-primary); }

/* ============================================================
   방문 현황 위젯 (visit/basic)
   ============================================================ */
.visit_list {
    list-style: none;
    margin: 0;
    padding: 10px 0 6px;
}
.visit_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 16px;
    font-size: 13px;
}
.visit_label {
    color: var(--portal-text-sub);
    flex-shrink: 0;
}
.visit_label::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ddd;
    margin-right: 7px;
    vertical-align: middle;
}
.visit_item:first-child .visit_label::before { background: var(--portal-primary); }
.visit_item:nth-child(2) .visit_label::before { background: #74b9ff; }
.visit_val {
    font-weight: 700;
    color: var(--portal-text);
}
.visit_total { color: var(--portal-primary); }
.visit_admin_link {
    display: block;
    text-align: center;
    margin: 4px 14px 10px;
    font-size: 11px;
    color: var(--portal-text-sub);
    text-decoration: none;
    padding: 4px;
    border: 1px solid #eee;
    border-radius: 3px;
    transition: background 0.1s;
}
.visit_admin_link:hover { background: #f5f5f5; color: var(--portal-text); }

/* ============================================================
   news_portal latest skin (뉴스/스포츠/연예 탭)
   ============================================================ */
.nv_news_list { list-style: none; margin: 0; padding: 0; }

.nv_news_item {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid var(--portal-border);
    padding: 10px 18px;
    transition: background 0.1s;
    gap: 12px;
}
.nv_news_item:last-child { border-bottom: none; }
.nv_news_item:hover { background: var(--portal-surface-alt); }

.nv_news_link {
    flex: 1;
    min-width: 0;
    text-decoration: none;
}

.nv_news_tit {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--portal-text);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nv_news_item:hover .nv_news_tit { color: var(--portal-primary); }

.is_notice .nv_news_tit { color: #0068c8; }
.is_notice:hover .nv_news_tit { color: #0052a3; }

.nv_news_meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--portal-text-sub);
    line-height: 1;
    white-space: nowrap;
}
.nv_source { color: var(--portal-text-sub); font-weight: 600; }
.nv_cmt_cnt { color: var(--portal-primary); font-weight: 700; }
.nv_dot_sep { color: var(--portal-text-sub); font-size: 11px; }
.nv_time { color: var(--portal-text-sub); }

.nv_badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
    line-height: 16px;
}
.badge_notice { background: #e8f3ff; color: #0068c8; }
.badge_hot    { background: #fff0f0; color: #e84040; }

.nv_new_dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--portal-primary);
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 4px;
    margin-bottom: 1px;
}

.nv_more_btn {
    display: block;
    text-align: center;
    padding: 9px 0;
    font-size: 12px;
    font-weight: 600;
    color: #bbb;
    border-top: 1px solid #f2f2f2;
    text-decoration: none;
    transition: color 0.12s;
    letter-spacing: 0.02em;
}
.nv_more_btn:hover { color: var(--portal-primary); }

.nv_news_empty { padding: 20px; text-align: center; color: #bbb; font-size: 13px; }

/* ============================================================
   그룹 페이지 (group.php)
   ============================================================ */
.group_page_header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #1a1a1a;
}
.group_breadcrumb {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
}
.group_breadcrumb a { color: #aaa; text-decoration: none; }
.group_breadcrumb a:hover { color: var(--portal-primary); }
.bc_sep { margin: 0 6px; }
.bc_current { color: #555; }

.group_page_title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.group_board_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.group_board_section {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    overflow: hidden;
}

.group_board_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #f2f2f2;
    background: #fafafa;
}
.group_board_name {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}
.group_board_name a { color: #1a1a1a; text-decoration: none; }
.group_board_name a:hover { color: var(--portal-primary); }
.group_board_more {
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
    white-space: nowrap;
}
.group_board_more:hover { color: var(--portal-primary); }

.group_board_body { padding: 2px 0; }

.group_empty {
    padding: 60px 20px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
    border: 1px dashed #dde1e5;
    border-radius: 6px;
}
.group_empty a {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 16px;
    background: var(--portal-primary);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

/* ============================================================
   위젯 타이틀 뱃지 / sub 텍스트
   ============================================================ */
.wtitle_badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 3px;
    letter-spacing: .5px;
    background: var(--portal-primary);
    color: #fff;
    flex-shrink: 0;
}
.wtitle_badge.hot { background: #ff3a48; }
.widget_title_sub {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
    margin-left: auto;
}
.widget_title a { color: var(--portal-text); }

/* ============================================================
   사이드 최신글 위젯 (side_latest 스킨)
   ============================================================ */
.sl_list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}
.sl_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 14px;
    border-bottom: 1px solid #f5f5f5;
}
.sl_item:last-child { border-bottom: none; }

.sl_link {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: var(--portal-text);
    font-size: 13px;
}
.sl_link:hover .sl_tit { color: var(--portal-primary); }

.sl_board {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    background: #f0f4ff;
    color: #4466cc;
    border: 1px solid #ccd7f5;
    border-radius: 3px;
    white-space: nowrap;
}

.sl_tit {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.sl_badge {
    display: inline-block;
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    background: #eef6fb;
    color: #1a73e8;
    border: 1px solid #c8dff9;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sl_cmt {
    font-size: 11px;
    color: #ff3a48;
    font-weight: 700;
    flex-shrink: 0;
}
.sl_new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 9px;
    font-weight: 800;
    background: #ff4747;
    color: #fff;
    border-radius: 2px;
    flex-shrink: 0;
}
.sl_date {
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
    flex-shrink: 0;
}
.sl_empty {
    padding: 16px 14px;
    color: #bbb;
    font-size: 13px;
}

/* ============================================================
   인기 기사 위젯 (.popular_art_*)
   ============================================================ */
.popular_art_list {
    list-style: none;
    margin: 0;
    padding: 6px 0 2px;
    counter-reset: pa-rank;
}
.popular_art_item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-bottom: 1px solid #f5f5f5;
}
.popular_art_item:last-child { border-bottom: none; }

.pa_rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 800;
    color: #ccc;
    flex-shrink: 0;
}
.popular_art_item:nth-child(1) .pa_rank { color: #ff3a48; }
.popular_art_item:nth-child(2) .pa_rank { color: #ff7b00; }
.popular_art_item:nth-child(3) .pa_rank { color: #f5a623; }

.pa_title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--portal-text);
    text-decoration: none;
}
.pa_title:hover { color: var(--portal-primary); }

.pa_hit {
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
    flex-shrink: 0;
}

.widget_more {
    display: block;
    text-align: right;
    padding: 6px 14px 10px;
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
}
.widget_more:hover { color: var(--portal-primary); }

/* ============================================================
   Footer
   ============================================================ */
#portal_footer {
    background: var(--portal-surface-alt);
    border-top: 1px solid var(--portal-border);
    padding: 36px 0;
    margin-top: 10px;
}
#portal_footer .footer_links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin-bottom: 16px;
    align-items: center;
}
#portal_footer .footer_links li + li::before {
    content: '|';
    margin: 0 10px;
    color: var(--portal-border);
    font-size: 11px;
}
#portal_footer .footer_links li + li { margin-left: 0; }
#portal_footer .footer_links a { font-size: 12px; color: var(--portal-text-sub); transition: color 0.1s; }
#portal_footer .footer_links a:hover { color: var(--portal-text); }
#portal_footer .footer_links a.privacy { font-weight: 700; color: var(--portal-text-sub); }

#portal_footer .footer_info { font-size: 12px; color: var(--portal-text-sub); line-height: 2; }
#portal_footer .footer_info span { margin-right: 12px; }
#portal_footer .copyright { margin-top: 8px; color: var(--portal-text-sub); font-family: tahoma, sans-serif; font-size: 12px; }

/* ============================================================
   ToTop 버튼
   ============================================================ */
.portal_totop_btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--portal-primary);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.15s;
    z-index: 500;
}
.portal_totop_btn:hover { background: var(--portal-primary-hover); }
.portal_totop_btn.show { opacity: 1; visibility: visible; transform: translateY(0); }

@media (max-width: 768px) {
    .portal_totop_btn { right: 14px; bottom: 14px; width: 40px; height: 40px; font-size: 18px; }
}

/* ============================================================
   Board Skins — Common (bsk_*)
   ============================================================ */

/* Category nav */
.bsk_cate_nav { margin-bottom: 16px; border-bottom: 2px solid var(--portal-primary); }
.bsk_cate_nav ul { display: flex; flex-wrap: wrap; gap: 2px; }
.bsk_cate_nav li { list-style: none; }
.bsk_cate_nav a {
    display: inline-block; padding: 7px 14px;
    font-size: 13px; font-weight: 600; color: #555;
    border-radius: 4px 4px 0 0; text-decoration: none;
    transition: background 0.1s, color 0.1s;
}
.bsk_cate_nav a:hover,
.bsk_cate_nav a.on { background: var(--portal-primary); color: #fff; }

/* Toolbar */
.bsk_toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid #ebebeb; margin-bottom: 4px;
}
.bsk_toolbar_bottom { border-top: 1px solid #ebebeb; border-bottom: none; margin-top: 8px; padding-top: 10px; }
.bsk_total { font-size: 13px; color: var(--portal-text-sub); }
.bsk_total strong { color: var(--portal-text); font-weight: 700; }
.bsk_btn_group { display: flex; align-items: center; gap: 4px; }

/* Buttons */
.bsk_btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; font-size: 13px; font-weight: 600;
    color: #444; background: #f7f8f9; border: 1px solid #dde1e5;
    border-radius: 4px; text-decoration: none; cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
    line-height: 1.4;
}
.bsk_btn:hover { background: #eef0f2; color: #222; }
.bsk_btn_icon { padding: 6px 9px; }
.bsk_btn_write { background: var(--portal-primary); color: #fff; border-color: var(--portal-primary); }
.bsk_btn_write:hover { background: var(--portal-primary-hover); color: #fff; border-color: var(--portal-primary-hover); }
.bsk_btn_submit { background: var(--portal-primary); color: #fff; border-color: var(--portal-primary); }
.bsk_btn_submit:hover { background: var(--portal-primary-hover); color: #fff; }
.bsk_btn_admin { color: #888; }
.bsk_btn_danger { color: #e74c3c; }
.bsk_btn_danger:hover { background: #fdf0ef; border-color: #e74c3c; }
.bsk_btn_sm { padding: 4px 8px; font-size: 12px; }

/* Badges */
.bsk_badge {
    display: inline-block; padding: 1px 6px;
    font-size: 11px; font-weight: 700; border-radius: 3px;
    vertical-align: middle; line-height: 1.6;
}
.bsk_badge_notice { background: #ff6b35; color: #fff; }
.bsk_badge_new    { background: var(--portal-primary); color: #fff; }
.bsk_badge_hot    { background: #e74c3c; color: #fff; }
.bsk_badge_cate   { background: #eef6fb; color: #1a73e8; border: 1px solid #c8dff9; }
.bsk_badge_current { background: #555; color: #fff; }

/* Select */
.bsk_select {
    padding: 5px 8px; font-size: 13px; border: 1px solid #dde1e5;
    border-radius: 4px; background: #fff; color: #444;
}

/* Input */
.bsk_input {
    padding: 7px 10px; font-size: 13px; border: 1px solid #dde1e5;
    border-radius: 4px; background: #fff; color: #333;
    transition: border-color 0.15s;
}
.bsk_input:focus { outline: none; border-color: var(--portal-primary); }
.bsk_input_sm  { width: 140px; }
.bsk_input_full { width: 100%; box-sizing: border-box; }

/* Admin opt menu */
.bsk_admin_opt_toggle { position: relative; }
.bsk_admin_opt_menu {
    position: absolute; right: 0; top: 100%; margin-top: 4px; z-index: 200;
    background: #fff; border: 1px solid #dde1e5; border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 100px; overflow: hidden;
    list-style: none; padding: 4px 0;
}
.bsk_admin_opt_menu li { list-style: none; }
.bsk_admin_opt_menu button {
    display: block; width: 100%; padding: 8px 14px;
    font-size: 13px; text-align: left; background: none;
    border: none; cursor: pointer; color: #333;
    transition: background 0.1s;
}
.bsk_admin_opt_menu button:hover { background: #f5f5f5; }

/* Pager */
.bsk_pager {
    display: flex; justify-content: center; align-items: center;
    gap: 3px; padding: 16px 0; flex-wrap: wrap;
}
.bsk_pager a, .bsk_pager strong, .bsk_pager span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 6px;
    font-size: 13px; border-radius: 4px; text-decoration: none;
    color: #555; border: 1px solid transparent; transition: all 0.1s;
}
.bsk_pager strong {
    background: var(--portal-primary); color: #fff; border-color: var(--portal-primary); font-weight: 700;
}
.bsk_pager a:hover { background: #f2f2f2; border-color: #dde1e5; }

/* Search panel */
.bsk_search_wrap {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 80px;
}
.bsk_search_overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.bsk_search_box {
    position: relative; z-index: 1;
    background: #fff; border-radius: 10px;
    padding: 20px; width: 460px; max-width: 94vw;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
}
.bsk_select_sm { margin-bottom: 8px; }
.bsk_search_input_row { display: flex; gap: 6px; margin-bottom: 10px; }
.bsk_search_input { flex: 1; }
.bsk_search_close {
    display: block; width: 100%; padding: 8px; font-size: 13px;
    background: #f7f8f9; border: 1px solid #dde1e5; border-radius: 4px;
    cursor: pointer; color: #666;
}
.bsk_search_close:hover { background: #eef0f2; }

/* Comment count link */
.bsk_list_cmt { font-size: 12px; color: var(--portal-primary); font-weight: 600; margin-left: 2px; }

/* Meta separator */
.bsk_meta_sep { color: #ddd; margin: 0 4px; font-size: 11px; }

/* Empty state */
.bsk_empty { padding: 48px 20px; text-align: center; color: #bbb; font-size: 14px; }


/* ============================================================
   목록형 (list)
   ============================================================ */

#bsk_list_wrap { font-size: 14px; }

.bsk_list_header {
    display: flex; align-items: center;
    padding: 8px 10px; background: var(--portal-surface-alt);
    border-top: 1px solid #ccc; border-bottom: 1px solid var(--portal-border);
    font-size: 12px; color: var(--portal-text-sub); font-weight: 600;
}
.bsk_list { }
.bsk_list > li { list-style: none; }

.bsk_list_item {
    display: flex; align-items: center;
    padding: 11px 10px; border-bottom: 1px solid var(--portal-border);
    transition: background 0.08s;
}
.bsk_list_item:hover { background: var(--portal-surface-alt); }
.bsk_notice_item { background: #fffdf5; }
.bsk_notice_item:hover { background: #fffaed; }
.bsk_current_item { background: color-mix(in srgb, var(--portal-primary) 8%, #fff) !important; }

.bsk_list_col_chk  { flex: 0 0 32px; text-align: center; }
.bsk_list_col_num  { flex: 0 0 56px; text-align: center; font-size: 13px; color: #999; }
.bsk_list_col_subj { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-right: 10px; }
.bsk_list_col_meta { flex: 0 0 260px; display: flex; align-items: center; font-size: 12px; color: #999; }
.bsk_list_col_author { flex: 0 0 90px; overflow: visible; white-space: nowrap; text-align: center; }
.bsk_list_col_author .sv_member { display: inline-block; max-width: 80px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.bsk_list_col_date   { flex: 0 0 90px; text-align: center; }
.bsk_list_col_hit    { flex: 0 0 70px; text-align: center; }

.bsk_list_tit {
    font-size: 14px; color: #222; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.1s;
}
.bsk_list_tit:hover { color: var(--portal-primary); }
.bsk_icon_lock { color: #aaa; font-size: 12px; }
.bsk_icon_file { color: #aaa; font-size: 12px; margin-left: 3px; }

/* Checkbox all */
.bsk_list_col_chk input[type=checkbox] { cursor: pointer; }

/* sort link tag left open in header — close in CSS is not possible; these match gnuboard output */
.bsk_list_col_date a,
.bsk_list_col_hit  a { color: inherit; text-decoration: none; }
.bsk_list_col_date a:hover,
.bsk_list_col_hit  a:hover { color: var(--portal-primary); }

@media (max-width: 767px) {
    .bsk_list_col_meta { display: none; }
    .bsk_list_header .bsk_list_col_meta { display: none; }
    .bsk_list_col_num { flex: 0 0 40px; }
}


/* ============================================================
   갤러리형 (gallery)
   ============================================================ */

#bsk_gall_wrap { font-size: 14px; }

.bsk_gall_allchk {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 0; font-size: 13px; color: #555;
}

.bsk_gall_grid {
    display: grid;
    gap: 16px;
    margin: 16px 0;
}
.bsk_gall_cols_2 { grid-template-columns: repeat(2, 1fr); }
.bsk_gall_cols_3 { grid-template-columns: repeat(3, 1fr); }
.bsk_gall_cols_4 { grid-template-columns: repeat(4, 1fr); }
.bsk_gall_cols_5 { grid-template-columns: repeat(5, 1fr); }
.bsk_gall_cols_6 { grid-template-columns: repeat(6, 1fr); }

/* 카드 테두리·호버 효과를 <li>로 이동: <a> 안 sv_use 중첩앵커 방지
   overflow: hidden 제거 → sv_wrap 드롭다운이 카드 밖으로 표시 가능 */
.bsk_gall_item {
    position: relative;
    display: flex; flex-direction: column;
    border: 1px solid #ebebeb; border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.15s, transform 0.15s;
}
.bsk_gall_item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }
/* sv_zfix: 사이드뷰 열린 카드를 인접 카드 위로 올림 */
li.bsk_gall_item.sv_zfix { z-index: 50 !important; }

.bsk_gall_chk { position: absolute; top: 8px; left: 8px; z-index: 2; }
.bsk_gall_chk label { display: block; }

/* overflow:hidden을 <a>로 내려 썸네일 모서리 클리핑 처리 */
.bsk_gall_link {
    display: block; text-decoration: none;
    border-radius: 8px 8px 0 0; overflow: hidden;
}

.bsk_gall_thumb {
    display: block; position: relative;
    aspect-ratio: 3/2; overflow: hidden;
    background: #f2f2f2;
}
.bsk_gall_thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.25s;
}
.bsk_gall_item:hover .bsk_gall_thumb img { transform: scale(1.04); }

.bsk_gall_notice_cover {
    position: absolute; inset: 0;
    background: #f8f9fa;
    display: flex; align-items: center; justify-content: center;
}
.bsk_gall_no_img {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 28px;
}
.bsk_gall_badge_new {
    position: absolute; top: 6px; right: 6px;
    background: var(--portal-primary); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 1px 5px; border-radius: 3px;
}
.bsk_gall_badge_lock {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,.45); color: #fff;
    font-size: 11px; padding: 2px 6px; border-radius: 3px;
}

.bsk_gall_info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bsk_gall_tit_link { display: block; text-decoration: none; color: #222; }
.bsk_gall_tit {
    display: block; font-size: 13px; font-weight: 600; color: #222;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bsk_gall_tit_link:hover .bsk_gall_tit { text-decoration: underline; }
.bsk_gall_meta { display: flex; flex-wrap: wrap; gap: 3px; font-size: 11px; color: #aaa; align-items: center; margin-top: auto; }
.bsk_gall_meta .sv_use .sv_wrap { display: inline; }
.bsk_gall_meta .sv_use .sv { overflow: visible; }

@media (max-width: 767px) {
    .bsk_gall_cols_4,
    .bsk_gall_cols_5,
    .bsk_gall_cols_6 { grid-template-columns: repeat(2, 1fr); }
    .bsk_gall_cols_3 { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   웹진형 (webzine)
   ============================================================ */

#bsk_wz_wrap { font-size: 14px; }
.bsk_wz_empty { padding: 48px 20px; text-align: center; color: #bbb; font-size: 14px; }

.bsk_wz_allchk {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 0; font-size: 13px; color: #555;
}

/* Notice strip */
.bsk_wz_notices { margin-bottom: 16px; border: 1px solid #fffaed; border-radius: 6px; overflow: hidden; }
.bsk_wz_notices > li { list-style: none; }
.bsk_wz_notice_item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; background: #fffdf5; border-bottom: 1px solid #fff3cc;
    font-size: 13px;
}
.bsk_wz_notice_item:last-child { border-bottom: none; }
.bsk_wz_notice_link {
    flex: 1; color: #333; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bsk_wz_notice_link:hover { color: var(--portal-primary); }
.bsk_wz_notice_date { flex-shrink: 0; font-size: 12px; color: #bbb; }

/* Checkbox overlay */
.bsk_wz_chk { position: absolute; top: 10px; left: 10px; z-index: 3; }

/* Featured post */
.bsk_wz_featured {
    position: relative; margin: 16px 0; border-radius: 10px;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.15s;
}
.bsk_wz_featured:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.bsk_wz_featured_link {
    display: flex;
    min-height: 260px;
}
/* 썸네일만 <a>로 감쌈 — sv_use 중첩앵커 방지 */
.bsk_wz_featured_thumb_link {
    display: block; flex: 0 0 55%; position: relative;
    overflow: hidden; border-radius: 10px 0 0 10px;
}
.bsk_wz_featured_thumb {
    display: block; position: relative; width: 100%; height: 100%;
    background: #f2f2f2;
}
.bsk_wz_featured_thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.bsk_wz_featured:hover .bsk_wz_featured_thumb img { transform: scale(1.03); }
.bsk_wz_no_img {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    color: #ccc; font-size: 36px; background: #f8f9fa;
}
/* 정보 영역: <a> 바깥에 위치해야 sv_use 사이드뷰 정상 동작 */
.bsk_wz_featured_info {
    flex: 1; min-width: 0; padding: 24px 24px 20px;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff; border-radius: 0 10px 10px 0;
}
.bsk_wz_featured_tit_link { display: block; text-decoration: none; color: #111; }
.bsk_wz_featured_tit_link:hover .bsk_wz_featured_tit { color: var(--portal-primary); }
.bsk_wz_featured_tit {
    font-size: 20px; font-weight: 700; line-height: 1.45;
    margin: 8px 0 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.bsk_wz_featured_excerpt {
    font-size: 13px; color: #777; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 16px;
}
.bsk_wz_featured_meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 2px; font-size: 12px; color: #aaa; margin-top: auto;
}

/* Grid of remaining posts */
.bsk_wz_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
    margin: 20px 0;
}
.bsk_wz_grid > li { list-style: none; }

.bsk_wz_item {
    position: relative;
    border-radius: 8px; border: 1px solid #ebebeb;
    background: #fff;
    transition: box-shadow 0.15s, transform 0.15s;
}
.bsk_wz_item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); transform: translateY(-2px); }

/* 썸네일만 <a>로 감쌈 — sv_use 중첩앵커 방지 */
.bsk_wz_item_thumb_link { display: block; border-radius: 8px 8px 0 0; overflow: hidden; }
.bsk_wz_item_thumb {
    display: block; position: relative; aspect-ratio: 16/9; overflow: hidden;
    background: #f2f2f2;
}
.bsk_wz_item_thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.25s;
}
.bsk_wz_item:hover .bsk_wz_item_thumb img { transform: scale(1.04); }

/* 정보 영역: <a> 바깥에 위치해야 sv_use 사이드뷰 정상 동작 */
.bsk_wz_item_info { padding: 10px 12px 14px; }
.bsk_wz_item_tit_link { display: block; text-decoration: none; color: #222; }
.bsk_wz_item_tit_link:hover .bsk_wz_item_tit { color: var(--portal-primary); }
.bsk_wz_item_tit {
    font-size: 13px; font-weight: 600; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 6px;
}
.bsk_wz_item_meta { display: flex; flex-wrap: wrap; gap: 3px; font-size: 11px; color: #aaa; align-items: center; }

@media (max-width: 900px) {
    .bsk_wz_featured_link { flex-direction: column; min-height: auto; }
    .bsk_wz_featured_thumb_link { flex: none; aspect-ratio: 16/9; width: 100%; border-radius: 10px 10px 0 0; }
    .bsk_wz_featured_info { border-radius: 0 0 10px 10px; }
    .bsk_wz_featured_tit { font-size: 17px; }
    .bsk_wz_grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .bsk_wz_grid { grid-template-columns: 1fr; }
}


/* ============================================================
   게시물 보기 (view)
   ============================================================ */

#bsk_view_wrap { font-size: 14px; }

.bsk_view_header { padding: 16px 0 10px; border-bottom: 1px solid var(--portal-border); margin-bottom: 12px; }
.bsk_view_tit { font-size: 22px; font-weight: 700; color: var(--portal-text); line-height: 1.45; margin: 6px 0 0; }

.bsk_view_info {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px; padding: 10px 0;
    border-bottom: 1px solid #f0f0f0; margin-bottom: 12px;
    font-size: 13px; color: #888;
}
.bsk_view_author { display: flex; align-items: center; gap: 8px; }
.bsk_view_avatar img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.bsk_view_name { font-weight: 600; color: var(--portal-text); }
.bsk_view_ip { font-size: 11px; color: #bbb; }
.bsk_view_stats { display: flex; gap: 14px; }
.bsk_view_stat { display: flex; align-items: center; gap: 4px; }
.bsk_view_stat a { color: inherit; text-decoration: none; }
.bsk_view_stat a:hover { color: var(--portal-primary); }

.bsk_view_actions {
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 6px; padding: 8px 0; border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.bsk_view_body { padding: 16px 0; border-bottom: 1px solid var(--portal-border); min-height: 160px; }
.bsk_view_content { line-height: 1.9; font-size: 15px; color: var(--portal-text); word-break: break-word; }
.bsk_view_content img { max-width: 100%; height: auto; }
.bsk_view_sig { border-top: 1px dashed #e5e5e5; margin-top: 20px; padding-top: 14px; font-size: 13px; color: #aaa; }

/* React buttons */
/* SNS 공유 */
.bsk_share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.bsk_share_label {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.bsk_share_btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bsk_share_btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: opacity .12s, transform .1s;
}
.bsk_share_btn:hover { opacity: .85; transform: translateY(-1px); }
.bsk_share_btn .fa,
.bsk_share_icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    font-size: 14px;
    flex-shrink: 0;
}
.bsk_share_kakao  { background: #FEE500; color: #3A1D1D; }
.bsk_share_fb     { background: #1877F2; color: #fff; }
.bsk_share_x      { background: #000;    color: #fff; }
.bsk_share_naver  { background: var(--portal-primary); color: #fff; }
.bsk_share_pin    { background: #E60023; color: #fff; }

.bsk_view_react {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 0; border-bottom: 1px solid #f0f0f0;
}
.bsk_react_btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px; font-size: 14px; font-weight: 600;
    border-radius: 24px; text-decoration: none;
    border: 1px solid #dde1e5; color: #555; background: #fff;
    transition: all 0.12s;
}
.bsk_react_good:hover  { border-color: var(--portal-primary); color: var(--portal-primary); background: #f0faf5; }
.bsk_react_nogood:hover { border-color: #e74c3c; color: #e74c3c; background: #fdf0ef; }
.bsk_react_msg { font-size: 12px; color: #aaa; display: none; }

/* Attachments */
.bsk_view_files { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.bsk_view_files h3 { font-size: 13px; font-weight: 700; color: #555; margin-bottom: 8px; }
.bsk_view_files ul { display: flex; flex-direction: column; gap: 6px; }
.bsk_view_files li { list-style: none; display: flex; align-items: center; gap: 10px; }
.bsk_file_link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: #1a73e8; text-decoration: none;
}
.bsk_file_link:hover { text-decoration: underline; }
.bsk_file_size { color: #aaa; font-size: 12px; }
.bsk_file_info { font-size: 12px; color: #bbb; }

/* Related links */
.bsk_view_links { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.bsk_view_links h3 { font-size: 13px; font-weight: 700; color: #555; margin-bottom: 8px; }
.bsk_view_links ul { display: flex; flex-direction: column; gap: 5px; }
.bsk_view_links li { list-style: none; }
.bsk_link_item {
    font-size: 13px; color: #1a73e8; text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
}
.bsk_link_item:hover { text-decoration: underline; }

/* Prev/Next nav */
.bsk_view_nav {
    display: flex; flex-direction: column;
    border: 1px solid #f0f0f0; border-radius: 6px;
    overflow: hidden; margin: 16px 0;
}
.bsk_nav_item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; text-decoration: none; color: #333;
    border-bottom: 1px solid #f5f5f5; font-size: 13px;
    transition: background 0.08s;
}
.bsk_nav_item:last-child { border-bottom: none; }
.bsk_nav_item:hover { background: #f9fafb; }
.bsk_nav_label { flex: 0 0 60px; font-size: 12px; color: #aaa; display: flex; align-items: center; gap: 4px; }
.bsk_nav_tit { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ============================================================
   댓글 (view_comment)
   ============================================================ */

.bsk_cmt_toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 0; font-size: 15px; font-weight: 700; color: #333;
    background: none; border: none; cursor: pointer;
    margin-top: 20px;
}
.bsk_cmt_toggle strong { color: var(--portal-primary); }
.bsk_cmt_toggle::after { content: ' ▾'; font-size: 11px; color: #aaa; }
.bsk_cmt_toggle_open::after { content: ' ▴'; }

.bsk_cmt_section { border-top: 2px solid #333; padding-top: 10px; }

.bsk_cmt_item {
    display: flex; gap: 12px; padding: 16px 0;
    border-bottom: 1px solid #f2f2f2; position: relative;
}
.bsk_cmt_reply { background: #fafafa; padding-left: 12px; }
.bsk_cmt_avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.bsk_cmt_body { flex: 1; min-width: 0; }

.bsk_cmt_header {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px; margin-bottom: 6px; position: relative;
}
.bsk_cmt_name { font-size: 13px; font-weight: 700; color: #333; }
.bsk_cmt_ip   { font-size: 11px; color: #bbb; }
.bsk_cmt_date { font-size: 12px; color: #aaa; }

.bsk_cmt_content { font-size: 14px; color: #333; line-height: 1.75; word-break: break-word; }
.bsk_icon_lock { color: #aaa; font-size: 12px; }

.bsk_cmt_actions { flex-shrink: 0; position: relative; }
.bsk_cmt_opt_btn {
    background: none; border: none; cursor: pointer;
    padding: 4px 8px; color: #bbb; font-size: 16px;
    border-radius: 4px; transition: background 0.1s;
}
.bsk_cmt_opt_btn:hover { background: #f2f2f2; color: #666; }
.bsk_cmt_opt_menu {
    position: absolute; right: 0; top: 100%; z-index: 200;
    background: #fff; border: 1px solid #dde1e5;
    border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.1);
    min-width: 80px; overflow: hidden; display: none;
    list-style: none; padding: 4px 0;
}
.bsk_cmt_opt_menu li { list-style: none; }
.bsk_cmt_opt_menu a {
    display: block; padding: 7px 14px; font-size: 13px;
    color: #333; text-decoration: none; transition: background 0.1s;
}
.bsk_cmt_opt_menu a:hover { background: #f5f5f5; }

.bsk_cmt_empty { padding: 24px; text-align: center; color: #bbb; font-size: 13px; }

/* Comment write form */
.bsk_cmt_form_wrap {
    margin-top: 16px; border: 1px solid #ebebeb;
    border-radius: 8px; overflow: hidden;
}
.bsk_cmt_form_body { padding: 12px; }
.bsk_cmt_form_body textarea {
    width: 100%; min-height: 90px; resize: vertical;
    padding: 10px; font-size: 14px; border: 1px solid #dde1e5;
    border-radius: 4px; box-sizing: border-box; line-height: 1.6;
    font-family: inherit; transition: border-color 0.15s;
}
.bsk_cmt_form_body textarea:focus { outline: none; border-color: var(--portal-primary); }
.bsk_cmt_charcount { font-size: 12px; color: #aaa; margin-top: 4px; text-align: right; }

.bsk_cmt_form_footer {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    padding: 10px 12px; background: #f9fafb;
    border-top: 1px solid #ebebeb;
}
.bsk_cmt_form_info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bsk_cmt_form_actions { display: flex; align-items: center; gap: 10px; }
.bsk_cmt_secret_chk { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #666; cursor: pointer; }


/* ============================================================
   글쓰기 (write)
   ============================================================ */

#bsk_write_wrap {
    max-width: 960px;
    margin: 0 auto;
    font-size: 14px;
}

/* 페이지 헤더 */
.bsk_write_header {
    margin-bottom: 20px;
}
.bsk_write_bc {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}
.bsk_write_bc a { color: #888; text-decoration: none; }
.bsk_write_bc a:hover { color: var(--portal-primary); }
.bsk_write_bc .bc_sep { margin: 0 5px; }
.bsk_write_bc .bc_current { color: #333; font-weight: 600; }

.bsk_write_title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

/* 카드 컨테이너 */
.bsk_write_card {
    background: #fff;
    border: 1px solid #e8eaed;
    border-top: 3px solid var(--portal-primary);
    border-radius: 0 0 8px 8px;
    padding: 28px 32px 24px;
}

/* 행 공통 — 레이블 + 필드 2열 */
.bsk_write_row {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: start;
    gap: 0 16px;
    padding: 13px 0;
    border-bottom: 1px solid #f2f2f2;
}
.bsk_write_row:last-of-type { border-bottom: none; }

/* 본문 행은 레이블 없이 단일 컬럼 */
.bsk_write_row_content {
    grid-template-columns: 1fr;
    padding: 16px 0;
}

/* 제목 행 */
.bsk_write_row_subject { align-items: center; }

.bsk_write_label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    padding-top: 8px;
    white-space: nowrap;
}
.bsk_write_row_subject .bsk_write_label { padding-top: 0; }

.bsk_required { color: #e74c3c; font-size: 12px; }

/* 필드 영역 */
.bsk_write_field { display: flex; flex-direction: column; gap: 6px; }
.bsk_write_inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }

/* 셀렉트 커스텀 */
.bsk_select {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #d0d5da;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: border-color 0.15s;
}
.bsk_select_arrow {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}
.bsk_select:focus { outline: none; border-color: var(--portal-primary); }

/* 인풋 공통 */
.bsk_input {
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    border: 1px solid #d0d5da;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.bsk_input:focus { outline: none; border-color: var(--portal-primary); }
.bsk_input_sm   { width: 140px; }
.bsk_input_full { width: 100%; }

/* 옵션 체크박스 */
.bsk_write_options { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 0; }
.bsk_write_options li { list-style: none; }
.bsk_write_options label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #555; cursor: pointer;
    padding: 0;
}
.bsk_write_options input[type="checkbox"] {
    position: static !important;
    opacity: 1 !important;
    width: 15px; height: 15px;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
}
/* chk_box 내부의 장식용 <span>은 숨김 (네이티브 체크박스를 그대로 사용) */
.bsk_write_options .chk_box label span { display: none; }

/* 단축키 일람 버튼 (smarteditor2) */
.cke_sc { margin: 4px 0 8px; text-align: right; }
.btn_cke_sc {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    color: #555;
    background: #f7f8f9;
    border: 1px solid #d0d5da;
    border-radius: 4px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.1s;
}
.btn_cke_sc:hover { background: #eef0f2; }

/* 제목 + 임시저장 래퍼 */
#autosave_wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#autosave_wrapper .bsk_input_full { flex: 1; min-width: 200px; }

.bsk_btn_autosave {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 38px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #f7f8f9;
    border: 1px solid #d0d5da;
    border-radius: 4px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.1s;
    flex-shrink: 0;
}
.bsk_btn_autosave:hover { background: #eef0f2; }
.bsk_autosave_cnt { color: var(--portal-primary); font-weight: 700; }

/* 임시저장 팝업 — 기본 숨김은 파일 상단 !important 로 처리.
   jQuery .show() 가 inline style 을 심으면 아래 [style] 선택자가 허용. */
#autosave_pop[style*="block"] {
    display: block !important;
}
#autosave_pop {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 300px;
    background: #fff;
    border: 1px solid #dde1e5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    overflow: hidden;
}
#autosave_pop strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
}
#autosave_pop ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
}
#autosave_pop ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #f5f5f5;
    gap: 10px;
    font-size: 13px;
}
#autosave_pop ul li:last-child { border-bottom: none; }
#autosave_pop ul li a.autosave_load {
    color: #333; text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
#autosave_pop ul li a.autosave_load:hover { color: var(--portal-primary); }
#autosave_pop ul li span { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 11px; color: #aaa; }
#autosave_pop ul li button.autosave_del {
    font-size: 11px; padding: 2px 7px;
    border: 1px solid #ddd; border-radius: 3px;
    background: #f7f7f7; cursor: pointer; color: #888; transition: all 0.1s;
}
#autosave_pop ul li button.autosave_del:hover { background: #fee; border-color: #f5a0a0; color: #e74c3c; }
.bsk_autosave_foot {
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

/* 파일 첨부 */
.bsk_write_file_inner { display: flex; flex-direction: column; gap: 8px; }

.bsk_file_label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #f7f8f9;
    border: 1px solid #d0d5da;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
    width: fit-content;
}
.bsk_file_label:hover { background: #eef0f2; }
.bsk_file_input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.bsk_file_chosen {
    font-size: 12px;
    color: #333;
    font-weight: 400;
    margin-left: 4px;
}
.bsk_file_limit { font-size: 11px; color: #aaa; }

.bsk_file_del {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #e74c3c;
    cursor: pointer;
}
.bsk_file_del label { cursor: pointer; display: flex; align-items: center; gap: 5px; }

/* 글자수 */
.bsk_charcount_desc { font-size: 12px; color: #aaa; margin-bottom: 6px; }
.bsk_charcount { font-size: 12px; color: #aaa; text-align: right; margin-top: 6px; }

/* 제출 버튼 영역 */
.bsk_write_submit {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 20px 0 4px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}
.bsk_btn_cancel {
    display: inline-flex; align-items: center; gap: 5px;
    height: 42px; padding: 0 20px; font-size: 13px; font-weight: 600;
    color: #555; background: #f7f8f9; border: 1px solid #d0d5da;
    border-radius: 4px; text-decoration: none; cursor: pointer; transition: background 0.1s;
}
.bsk_btn_cancel:hover { background: #eef0f2; }
.bsk_btn_submit {
    display: inline-flex; align-items: center; gap: 6px;
    height: 42px; padding: 0 28px; font-size: 14px; font-weight: 700;
    color: #fff; background: var(--portal-primary); border: 1px solid var(--portal-primary);
    border-radius: 4px; cursor: pointer; transition: background 0.1s;
}
.bsk_btn_submit:hover { background: var(--portal-primary-hover); border-color: var(--portal-primary-hover); }
.bsk_btn_submit:disabled { background: #b0e8cc; border-color: #b0e8cc; cursor: not-allowed; }


/* ============================================================
   반응형 (Responsive)
   PC 기준 1130px → 태블릿 → 모바일 순으로 축소
   ============================================================ */

/* ── 태블릿 (1200px 이하) ── */
@media (max-width: 1200px) {
    .inner { width: 100%; padding: 0 20px; }
}

/* ── 좁은 태블릿 (900px 이하) ── */
@media (max-width: 900px) {
    /* 2단 그리드 → 1단 세로 스택 */
    .portal_main_grid { flex-direction: column; }
    /* 세로 스택에서 양쪽 모두 전체 너비 */
    .portal_main_grid .grid_left  { width: 100%; min-width: 0; overflow: visible; }
    .portal_main_grid .grid_right { width: 100%; }

    /* 게시판 사이드바 → 하단으로 */
    .portal_board_layout { flex-direction: column; }
    .portal_board_main   { width: 100%; }
    .portal_board_side   { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .portal_board_side .brd_side_widget { flex: 1; min-width: 240px; }
    .portal_board_side .brd_side_ad     { width: 100%; }

    /* 그룹 그리드: 태블릿에서 1열 */
    .group_board_grid { grid-template-columns: 1fr; }

    /* GNB 가로 스크롤 */
    #portal_gnb .inner { overflow-x: auto; }
    #portal_gnb .gnb_list { flex-wrap: nowrap; }

    /* 검색창 축소 */
    #portal_header .search_wrap input { width: 220px; }
}

/* ── 모바일 (768px 이하) ── */
@media (max-width: 768px) {
    .inner { padding: 0 12px; }
    .portal_board_side { display: none; }

    /* 헤더 세로 스택 */
    #portal_top_header { display: none; }
    #portal_header .inner { flex-wrap: wrap; justify-content: space-between; gap: 10px; }
    #portal_header .logo a { font-size: 26px; }
    #portal_header .search_wrap { order: 4; width: 100%; }
    #portal_header .search_wrap form { width: 100%; }
    #portal_header .search_wrap input { width: 100%; }
    #portal_header .header_banner { display: none; }
    #portal_header .search_admin_btn { order: 2; }
    #portal_header .dark_mode_toggle { order: 2; margin-left: 0; }

    /* 검색 버튼 — 아이콘만 표시 */
    .sch_text { display: none; }
    #sch_submit { padding: 0 14px; }

    /* 햄버거 버튼 */
    .mobile_menu_btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 3;
        width: 38px;
        height: 38px;
        background: none;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
        color: #333;
        flex-shrink: 0;
        transition: color 0.15s, border-color 0.15s;
    }
    .mobile_menu_btn.is_open { color: var(--portal-primary); border-color: var(--portal-primary); }

    /* 모바일 GNB — 기본 숨김, .mobile_open 시 세로 드롭다운 */
    #portal_gnb { display: none; }
    #portal_gnb.mobile_open {
        display: block;
        border-top: 2px solid var(--portal-primary);
        box-shadow: 0 4px 16px rgba(0,0,0,.1);
    }

    /* 햄버거 메뉴 상단 사용자 버튼 영역 */
    .gnb_mobile_user {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
        background: #fafafa;
        flex-wrap: wrap;
    }
    .gnb_user_btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 16px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        line-height: 1;
        transition: opacity 0.15s;
    }
    .gnb_user_btn:hover { opacity: 0.85; text-decoration: none; }
    .gnb_user_login  { background: var(--portal-primary); color: #fff !important; }
    .gnb_user_join   { background: #fff; border: 1.5px solid var(--portal-primary); color: var(--portal-primary) !important; }
    .gnb_user_logout { background: #f0f0f0; color: #555 !important; }
    .gnb_user_mypage { background: #f0f0f0; color: #555 !important; }
    .gnb_user_admin  { background: #fff3e0; border: 1.5px solid #ffb74d; color: #e65100 !important; }

    #portal_gnb.mobile_open .gnb_list {
        flex-direction: column;
        height: auto;
        gap: 0;
    }
    #portal_gnb.mobile_open .gnb_item {
        border-bottom: 1px solid #f0f0f0;
        display: block;
    }
    #portal_gnb.mobile_open .gnb_item > a {
        padding: 13px 20px;
        font-size: 14px;
        height: auto;
        line-height: 1.4;
    }
    #portal_gnb.mobile_open .gnb_item > a::after { display: none; }
    #portal_gnb.mobile_open .gnb_sub {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid #f0f0f0;
        background: #f8f9fa;
        border-radius: 0;
        padding: 4px 0;
    }
    #portal_gnb.mobile_open .gnb_sub li a { padding: 10px 34px; font-size: 13px; }
    #portal_gnb.mobile_open .gnb_item:hover .gnb_sub { display: block; } /* hover 유지 */

    /* 그리드 */
    .portal_main_grid { gap: 14px; }
    .board_section { flex-direction: column; gap: 12px; }
    .half_col { gap: 12px; }

    /* 갤러리 2열 */
    .pl_gallery { grid-template-columns: repeat(2, 1fr); }

    /* 게시판 폰트/패딩 축소 */
    #bo_list .tbl_head01.tbl_wrap thead th,
    #bo_list .tbl_head01.tbl_wrap tbody td { font-size: 12px; padding: 6px 4px !important; }
    #bo_list .td_subject { max-width: 160px; }

    /* 푸터 */
    #portal_footer .footer_links { gap: 6px 10px; }
}

/* ── 소형 모바일 (480px 이하) ── */
@media (max-width: 480px) {
    #portal_header .logo a { font-size: 22px; }
    .portal_tabs .tab_nav button { padding: 0 10px; font-size: 13px; }
    .pl_gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .bsk_list_col_author,
    .bsk_list_col_date,
    .bsk_list_col_hit { display: none; }

    /* 가이드 바 모바일 */
    .guide_bar { padding: 12px 14px; }
    .guide_bar_text { font-size: 13px; }

    /* 히어로 모바일 */
    .site_hero { padding: 28px 20px; border-radius: 10px; }
    .site_hero_title { font-size: 16px; margin-bottom: 20px; }
    .hero_stat_value { font-size: 22px; }
    .hero_stat_label { font-size: 11px; }
}

/* 햄버거 버튼 / 모바일 사용자 버튼 — 데스크탑에서만 숨김 */
@media (min-width: 769px) {
    .mobile_menu_btn { display: none; }
    .gnb_mobile_user { display: none; }
}

/* ── 글쓰기 반응형 ── */
@media (max-width: 768px) {
    .bsk_write_card { padding: 16px 14px; }
    .bsk_write_row  { grid-template-columns: 1fr; gap: 6px; }
    .bsk_write_label { padding-top: 0; }
    .bsk_input_sm   { width: 100%; }
    #autosave_wrapper { flex-wrap: wrap; }
    .bsk_btn_autosave { width: 100%; justify-content: center; }
    .bsk_write_submit { justify-content: stretch; }
    .bsk_btn_cancel,
    .bsk_btn_submit { flex: 1; justify-content: center; }
}
