@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:           #fff;
    --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;
}

/* new.php(전체게시물/새글) 목록 테이블 — 게시판/글구분/이름/일시 열 폭 고정, 제목 열에 남는 공간 배분 */
#fnewlist .tbl_head01 table {
    width:        100% !important;
    table-layout: fixed !important;
}
#fnewlist .tbl_head01 th,
#fnewlist .tbl_head01 td {
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
}
#fnewlist .chk_box  { width: 40px !important; }
#fnewlist .td_board { width: 180px !important; text-align: center; }
#fnewlist .td_type  { width: 70px !important; text-align: center; }
#fnewlist .td_name  { width: 160px !important; text-align: center; }
#fnewlist .td_date  { width: 90px !important; text-align: center; }

/* 사이드뷰(글쓴이 클릭 드롭다운) */
#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);
}

/* 회원 등급 뱃지 (extend/portal_member_grade_badge.extend.php, member_sideview_items 훅)
   이름 링크(.sv_member) 바깥의 형제 요소로 붙으므로 게시판 목록의 좁은 이름 칸
   (#bo_list .td_name, overflow:hidden 말줄임 대상)에 함께 잘리지 않는다.
   카카오/네이버 공유버튼처럼 등급을 나타내는 고정색이라 다크모드 변수 없이 고정 배색을 쓴다. */
.pf_grade_badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.6;
    border-radius: 3px;
    vertical-align: middle;
    white-space: nowrap;
    text-decoration: none; /* 컨설턴트 배지는 <a>로 나올 수 있음(든든tok 링크) — 밑줄 방지 */
}
.pf_grade_badge:hover {
    text-decoration: none;
}
.pf_grade_badge.pf_grade_admin {
    background: #FBEFE0;
    color: #9A6B1F;
}
.pf_grade_badge.pf_grade_subadmin {
    background: #EAE6FB;
    color: #5B3FA6;
}
/* 묻따 포인트 누적등급 5단계 (묻따 포인트·등급 정책 3번 확정 색상을 텍스트색으로 쓰고,
   위 상담사/관리자 뱃지와 동일하게 옅은 톤의 배경을 짝지었다) */
.pf_grade_badge.pf_grade_moodda_1 { /* 새내기 */
    background: #EEF0F2;
    color: #6B7280;
}
.pf_grade_badge.pf_grade_moodda_2 { /* 묻고 */
    background: #E9F0FE;
    color: #3A6FE0;
}
.pf_grade_badge.pf_grade_moodda_3 { /* 따지고 */
    background: #E1F9F2;
    color: #00A67D;
}
.pf_grade_badge.pf_grade_moodda_4 { /* 확인하고 */
    background: #E7ECF3;
    color: #1B3A6B;
}
.pf_grade_badge.pf_grade_moodda_5 { /* 묻고따지고 */
    background: #FBF1DD;
    color: #A87D25;
}
/* 컨설턴트: 포인트/등급 트랙과 무관한 고정 배지라 다른 등급 배지와 다르게
   딥그린 배경 + 골드 텍스트로 확실히 구분한다. (참고 브랜드 컬러가 이 저장소에는
   없어 정책 문서의 "딥그린+골드" 설명에 맞춰 임의로 지정 — 실제 브랜드 컬러가 있으면 교체) */
.pf_grade_badge.pf_grade_consultant {
    background: #123C2A;
    color: #E7C674;
}
/* 컨설턴트 닉네임을 든든tok으로 감싼 링크(member_name_plain 훅) — 이름 모양은 그대로 둔다. */
a.pf_ddtok_name { color: inherit; text-decoration: none; }
a.pf_ddtok_name:hover { text-decoration: underline; }

/* ============================================================
   게시판 목록 검색창 — 기간 필터 드롭다운 (portal_render_period_filter())
   cafe_style/gallery/모바일 basic 검색 폼에서 공통 사용
   ============================================================ */
/* text-align:center인 조상(예: skin/new/basic의 #new_sch) 안에 놓여도 버튼 라벨/목록
   항목은 항상 왼쪽 정렬로 고정 */
.pf_wrap { position: relative; display: inline-block; text-align: left; }
.pf_btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 100px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    letter-spacing: 0.3px;
    color: var(--portal-text);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .12s;
}
.pf_btn:hover { border-color: var(--portal-primary); }
.pf_btn .fa-angle-down { font-size: 12px; color: #999; transition: transform .15s; }
.pf_wrap_open .pf_btn { border-color: var(--portal-primary); }
.pf_wrap_open .pf_btn .fa-angle-down { transform: rotate(180deg); color: var(--portal-primary); }
.pf_panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    width: 260px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
    padding: 10px;
}
.pf_panel.pf_open { display: block; }
/* 게시판/검색조건 등 pf_custom(직접입력) 없이 목록만 있는 드롭다운 — 항목이 늘어나도
   패널이 화면 밖으로 무한정 길어지지 않게 스크롤 처리 (portal_render_dropdown_filter()).
   기간필터(.pf_panel, 260px)는 직접입력 날짜 인풋 두 개가 나란히 들어가야 해서 그대로 두고,
   목록만 있는 이 패널만 절반(130px)로 좁힌다. */
.pf_panel_list { width: 130px; }
.pf_panel_list .pf_presets { max-height: 280px; overflow-y: auto; }
.pf_presets { margin: 0 0 10px; padding: 0; list-style: none; }
.pf_panel_list .pf_presets { margin-bottom: 0; }
/* 게시판 목록/보기 페이지에서는 이 검색폼(.pf_wrap)이 #bo_list/#bo_view 안에 위치하는데,
   #bo_list li, #bo_view li { padding:0 !important; margin:0 !important; } 리셋(위쪽 "게시판
   컨테이너 여백 초기화" 참고)이 여기도 그대로 먹여져 패딩이 사라진다. 그 리셋 선택자의
   specificity가 (ID 1개 + 태그 1개)라 .pf_preset_item(클래스 1개)에 !important를 붙여도
   specificity에서 밀려 이길 수 없다 — 그래서 여기도 ID를 붙여 specificity를 맞춘다.
   new.php는 검색폼이 #bo_list/#bo_view 밖(#new_sch)이라 이 문제 자체가 없었음. */
#bo_list .pf_preset_item, #bo_view .pf_preset_item, .pf_preset_item {
    padding: 5px 10px !important;
    margin: 0 !important;
    font-size: 13px;
    /* line-height를 명시하지 않으면 페이지마다 다른 조상 line-height를 비율로 물려받아
       (예: new.php 쪽 #new_sch 컨텍스트 vs 게시판 목록 쪽 컨텍스트) 항목 한 줄의 실제 높이가
       페이지마다 달라져 보인다 — 항상 같은 높이로 나오도록 고정값을 직접 지정한다. */
    line-height: 18px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--portal-text);
    border-radius: 6px;
    cursor: pointer;
    transition: background .1s, color .1s;
}
.pf_preset_item:hover { background: #f5fdf9; color: var(--portal-primary); }
.pf_preset_item.pf_active { font-weight: 700; color: var(--portal-primary); background: #eefbf3; }
.pf_custom { border-top: 1px solid #f0f0f0; padding-top: 10px; }
.pf_custom_label {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    margin-bottom: 8px;
}
.pf_custom_dates { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.pf_date_sep { flex-shrink: 0; color: #ccc; font-size: 12px; }
.pf_date_from, .pf_date_to {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 4px;
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: var(--portal-text);
    background: var(--portal-surface);
}
.pf_date_from:focus, .pf_date_to:focus { border-color: var(--portal-primary); outline: none; }
.pf_apply_btn {
    display: block;
    width: 100%;
    height: 36px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--portal-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
}
.pf_apply_btn:hover { background: var(--portal-primary-hover); }

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: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    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_btn_login_logo { display: block; max-height: 20px; max-width: 100%; width: auto; }

/* 안내 문구 (버튼형 아웃로그인 상단) */
.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: 16px; }

.ol_profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ol_greeting { flex: 1; min-width: 0; }
.ol_logout_top {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--portal-text-sub);
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.12s, color 0.12s;
}
.ol_logout_top:hover { border-color: #e84040; color: #e84040; }
.ol_avatar {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.ol_avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ebebeb;
}
.ol_avatar_setting {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--portal-surface-alt);
    border: 1px solid var(--portal-border);
    color: var(--portal-text-sub);
    font-size: 11px;
    transition: background 0.1s, color 0.1s;
}
.ol_avatar_setting:hover { background: var(--portal-primary); border-color: var(--portal-primary); color: #fff; }
.ol_greeting { line-height: 1.4; }
.ol_name_row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ol_nick { font-size: 15px; font-weight: 700; color: var(--portal-text); }
.ol_badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--portal-primary);
    background: var(--portal-surface-alt);
    border: 1px solid var(--portal-border);
    border-radius: 3px;
    padding: 1px 5px;
    line-height: 1.5;
}
.ol_sub { font-size: 12px; color: var(--portal-text-sub); margin-top: 3px; }
.ol_admin_link {
    display: inline-block;
    margin-left: 2px;
    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_quicknav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #f2f2f2;
}
.ol_stats { display: flex; flex: 1; text-align: center; }
.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: 4px;
    text-decoration: none;
    transition: opacity 0.1s;
}
.ol_stats a:hover { opacity: 0.7; }
.ol_stat_label { font-size: 11px; color: var(--portal-text-sub); margin-bottom: 4px; }
.ol_stat_val { font-size: 16px; font-weight: 700; color: var(--portal-text); }
.ol_stat_new { color: #e84040; }
.ol_stat_done { color: var(--portal-primary); }

.ol_quicknav_more {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--portal-border);
    color: var(--portal-text-sub);
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.ol_quicknav_more:hover { background: var(--portal-primary); border-color: var(--portal-primary); color: #fff; }

/* 정보수정 / 내 게시물 / 공지사항 탭 (widget_login 카드 하단 확장 영역) */
.ol_ext_tabs { border-top: 1px solid var(--portal-border); }
.ol_ext_tab_nav {
    display: flex;
}
.ol_ext_tab_link {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--portal-text-sub);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
}
.ol_ext_tab_link:hover { color: var(--portal-text); }
.ol_ext_tab_link .fa-bookmark-o { color: #f5b400; }
.ol_ext_tab_active,
.ol_ext_tab_active:hover {
    color: var(--portal-primary);
    border-bottom-color: var(--portal-primary);
}
.ol_ext_tab_pane {
    display: none;
    padding-top: 4px;
}
.ol_ext_tab_pane.ol_ext_tab_open { display: block; }
/* latest.skin.php가 공지사항 탭 안에 자체적으로 붙이는 "더보기 ›" 링크는 숨기고,
   _sidebar.php가 직접 만든 "{게시판명} 더보기" 링크(마지막 자식)만 보여준다 */
#ol_pane_notice .pl_more:not(:last-child) { display: none; }
.ol_ext_tab_pane .pl_more { display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: normal; }
.ol_ext_tab_pane .pl_more .fa-search { font-size: 11px; }

/* 메인 사이드 배너 위젯 */
.widget_side_banner { padding: 0; overflow: hidden; min-height: 120px; }
.widget_side_banner img { display: block; width: 100%; height: auto; }
.widget_side_banner_empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--portal-text-sub);
    border: 1px dashed var(--portal-border);
    background: var(--portal-surface-alt);
}

.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); }

/* ============================================================
   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: 300px; 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_tit {
    font-size: 22px;
    font-weight: 800;
    color: var(--portal-text);
    margin: 0 0 16px;
}
.portal_board_tit a { color: inherit; text-decoration: none; }
.portal_board_tit a:hover { text-decoration: underline; }
/* 게시판 소개 한 줄 (목록 페이지만, head.php) — 제목 바로 아래로 붙인다 */
.portal_board_tit:has(+ .portal_board_desc) { margin-bottom: 4px; }
.portal_board_desc { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: var(--portal-text-sub); }
.portal_board_side {
    width: 300px; /* 애드센스 사이드바 광고(가로 300px)가 잘리지 않는 최소 폭 */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── 같은 그룹 최신글/인기글: 공통 사이드바 하단에 작게 ── */
.brd_side_compact { display: flex; flex-direction: column; gap: 10px; }
.brd_side_widget_sm .brd_side_whead { padding: 7px 12px; }
.brd_side_widget_sm .brd_side_wtitle { font-size: 12px; }
.brd_side_widget_sm .brd_side_post_item { padding: 5px 12px; min-height: 28px; }
.brd_side_widget_sm .brd_side_post_link { font-size: 12px; }

/* ── 게시판 사이드바 광고 ── */
.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); }

/* ── 실시간 HOT 게시글 ── */
.hot_section {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    overflow: hidden;
}
.hot_section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-text);
    padding: 13px 16px;
    border-bottom: 1px solid var(--portal-border);
}
.hot_section h3 .fa-fire { color: #ff6b35; margin-right: 4px; }
.hot_list { margin: 0; padding: 0; }
.hot_item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    min-height: 42px;
    border-bottom: 1px solid #f2f2f2;
}
.hot_item:last-child { border-bottom: none; }
.hot_rank {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--portal-text-sub);
}
.hot_rank_top { color: #ff6b35; }
.hot_link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}
.hot_board_tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #1a73e8;
    background: #eef6fb;
    border: 1px solid #c8dff9;
    border-radius: 3px;
    padding: 1px 6px;
}
.hot_tit {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--portal-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hot_link:hover .hot_tit { color: var(--portal-primary); text-decoration: underline; }
.hot_hit {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--portal-text-sub);
}

/* ── 이용 가이드 바로가기 ── */
.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 버튼
   ============================================================ */
/* 비밀글 안내 팝업 (tail.php #portal_secret_modal) */
.portal_secret_modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0,0,0,.45);
}
.portal_secret_modal[hidden] { display: none; }
.portal_secret_box {
    width: 100%; max-width: 320px; padding: 24px 20px 18px;
    background: var(--portal-surface); border: 1px solid var(--portal-border);
    border-radius: 12px; text-align: center; box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.portal_secret_tit { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--portal-text); }
.portal_secret_desc { margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: var(--portal-text-sub); }
.portal_secret_ok {
    width: 100%; height: 40px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--portal-primary); color: #fff; font-size: 14px; font-weight: 600;
}
.portal_secret_ok:hover { background: var(--portal-primary-hover); }

.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; }
/* position: relative — 관리자 옵션(⋮) 메뉴(.bsk_admin_opt_menu, absolute)의 위치 기준.
   없으면 body 기준으로 잡혀 화면 맨 아래 바깥에 떠서 메뉴가 안 열리는 것처럼 보였다 */
.bsk_btn_group { display: flex; align-items: center; gap: 4px; position: relative; }

/* 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; }
/* min-width:0 — 없으면 입력칸이 기본 글자 폭 아래로 안 줄어 좁은 화면에서 검색 버튼이 상자 밖으로 밀린다 */
.bsk_search_input { flex: 1; min-width: 0; }
.bsk_search_input_row .bsk_btn_submit { flex: 0 0 auto; padding: 0 16px; }
.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); }
/* 코어 css/default.css의 .sv_member{color:#333} 때문에 다크모드에서 작성자 닉네임만 어둡게 남던 문제 —
   닉네임은 작성자 칸 색을 그대로 따른다(cafe_style처럼 칸 색을 따로 정한 스킨도 그 색을 따름) */
.bsk_view_name .sv_member,
.bsk_view_name .sv_guest { color: inherit; }
.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; }
/* 글 본문의 보험사 연락처 카드 묶음 (<div class="ins_tiles"><a><img></a>…</div>, 이미지는 img/insurer_contact/).
   본문 HTML 필터가 style의 display를 지우므로 배치는 여기 클래스로 준다. */
.bsk_view_content .ins_tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 12px 0 20px; }
.bsk_view_content .ins_tiles a { display: block; border: 1px solid var(--portal-border); border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.bsk_view_content .ins_tiles a:hover { border-color: var(--portal-primary); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.bsk_view_content .ins_tiles img { display: block; width: 100%; height: auto; }
@media (max-width: 480px) { .bsk_view_content .ins_tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 사진 설명(캡션) — 에디터에서 사진을 올리면 아래에 생기는 줄 (plugin/editor/summernote/toolbar.js).
   글쓰기(에디터)·글 보기 양쪽에 같이 적용된다. */
p.g5_img_caption { margin: 2px 0 14px; font-size: 13px; line-height: 1.6; color: var(--portal-text-sub); }

/* 링크 미리보기 카드 (에디터에 URL만 붙여넣으면 생성, plugin/editor/summernote/paste-clean.js).
   저장 필터 때문에 <a> 안이 전부 <span>이라 display로 블록 모양을 만든다.
   글쓰기(에디터)·글 보기 양쪽에 같이 적용된다. */
.g5_link_card_wrap { margin: 8px 0 16px; }
a.g5_link_card {
    display: block; max-width: 620px; overflow: hidden;
    border: 1px solid var(--portal-border); border-radius: 6px;
    background: var(--portal-surface); color: var(--portal-text) !important;
    text-decoration: none !important;
}
a.g5_link_card:hover { border-color: var(--portal-text-sub); }
a.g5_link_card .g5_lc_thumb { display: block; line-height: 0; background: var(--portal-surface-alt); }
a.g5_link_card .g5_lc_thumb img { display: block; width: 100% !important; max-width: 100%; height: auto; max-height: 360px; object-fit: cover; margin: 0; }
a.g5_link_card .g5_lc_body { display: block; padding: 14px 16px; line-height: 1.5; }
a.g5_link_card .g5_lc_title {
    display: block; font-size: 16px; font-weight: 700; color: var(--portal-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.g5_link_card .g5_lc_desc {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 4px; font-size: 13px; color: var(--portal-text-sub);
}
a.g5_link_card .g5_lc_site { display: block; margin-top: 6px; font-size: 12px; color: var(--portal-primary); }
.g5_lc_loading { color: var(--portal-text-sub); font-size: 13px; }

/* 인용구 6종 (에디터 툴바 "인용구" 드롭다운, plugin/editor/summernote/toolbar.js).
   글쓰기(에디터)·글 보기·툴바 드롭다운 미리보기에 같이 쓰인다. */
blockquote.g5_q {
    position: relative; margin: 18px 0; padding: 0; border: 0; background: none;
    color: var(--portal-text); font-size: inherit; line-height: 1.7; font-style: normal;
}
blockquote.g5_q_quote, blockquote.g5_q_linequote { text-align: center; padding: 34px 16px 30px; }
blockquote.g5_q_quote::before, blockquote.g5_q_quote::after, blockquote.g5_q_linequote::before {
    position: absolute; left: 50%; transform: translateX(-50%);
    font: 700 34px/1 Georgia, 'Times New Roman', serif; color: var(--portal-text-sub);
}
blockquote.g5_q_quote::before, blockquote.g5_q_linequote::before { content: '\201C'; top: 4px; }
blockquote.g5_q_quote::after { content: '\201D'; bottom: -6px; }
blockquote.g5_q_linequote { padding-bottom: 22px; }
blockquote.g5_q_linequote::after {
    content: ''; display: block; width: 120px; max-width: 60%; height: 2px; margin: 12px auto 0;
    background: var(--portal-text);
}
blockquote.g5_q > p { margin: 0; }
blockquote.g5_q_line { padding: 2px 0 2px 16px; border-left: 3px solid var(--portal-text); }
/* 예전 방식으로 쪼개져 저장된 연속 버티컬 라인은 한 줄로 이어 보이게 */
blockquote.g5_q_line + blockquote.g5_q_line { margin-top: -18px; }
blockquote.g5_q_bubble {
    padding: 14px 20px; text-align: center; border: 2px solid var(--portal-text-sub); border-radius: 4px;
    background: var(--portal-surface); margin-bottom: 26px;
}
blockquote.g5_q_bubble::after {
    content: ''; position: absolute; left: 28px; bottom: -9px; width: 14px; height: 14px;
    background: var(--portal-surface); border-right: 2px solid var(--portal-text-sub); border-bottom: 2px solid var(--portal-text-sub);
    transform: rotate(45deg);
}
blockquote.g5_q_postit {
    padding: 14px 20px; text-align: center; border: 2px solid var(--portal-text-sub);
    background: var(--portal-surface); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
blockquote.g5_q_postit::after {
    content: ''; position: absolute; right: -2px; bottom: -2px; width: 0; height: 0;
    border-style: solid; border-width: 16px 16px 0 0;
    border-color: var(--portal-text-sub) transparent transparent transparent;
}
blockquote.g5_q_frame { padding: 18px 28px; text-align: center; }
blockquote.g5_q_frame::before, blockquote.g5_q_frame::after {
    content: ''; position: absolute; width: 16px; height: 16px; border: 0 solid var(--portal-text);
}
blockquote.g5_q_frame::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
blockquote.g5_q_frame::after { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
@media (max-width: 768px) {
    a.g5_link_card .g5_lc_title { font-size: 15px; }
    a.g5_link_card .g5_lc_body { padding: 12px; }
}

/* 본문(에디터 편집 영역 + 글 보기)만 목록/구분선 기본 모양 복원.
   전역 리셋(코어 hr{display:none}, 테마 ul/ol/li{list-style:none})이 Summernote 편집 영역
   (iframe 아님)과 본문에도 먹어서 글머리기호·번호·구분선이 입력돼도 안 보였음.
   상단 공용 리셋 "#portal_wrap ul/ol/li { list-style: none !important }"을 이겨야 하므로
   #portal_wrap을 붙여 우선순위를 높이고 !important로 맞선다(#portal_wrap 밖에서 쓰일 때 대비해 단독 선택자도 둠). */
.note-editable ul, .bsk_view_content ul,
#portal_wrap .note-editable ul, #portal_wrap .bsk_view_content ul { list-style: disc outside !important; padding-left: 1.6em; margin: .6em 0; }
.note-editable ol, .bsk_view_content ol,
#portal_wrap .note-editable ol, #portal_wrap .bsk_view_content ol { list-style: decimal outside !important; padding-left: 1.6em; margin: .6em 0; }
.note-editable ul ul, .bsk_view_content ul ul,
#portal_wrap .note-editable ul ul, #portal_wrap .bsk_view_content ul ul { list-style-type: circle !important; }
.note-editable li, .bsk_view_content li,
#portal_wrap .note-editable li, #portal_wrap .bsk_view_content li { list-style: inherit !important; }
.note-editable hr, .bsk_view_content hr { display: block; height: 0; border: 0; border-top: 1px solid var(--portal-border); margin: 1em 0; }
.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_naver  { background: var(--portal-primary); 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; }
/* 프로필 사진은 이름 앞에 작게 (skin/board/_base/view_comment.skin.php) */
.bsk_cmt_avatar { flex-shrink: 0; display: inline-flex; }
.bsk_cmt_avatar img { display: block; width: 22px; height: 22px; 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; align-self: flex-start; } /* stretch 되면 메뉴(top:100%)가 댓글 맨 아래에 뜸 */
.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;
}

/* 1:1 상담 안내 박스 (qa 게시판 전용) */
.bsk_write_notice_box {
    background: #E4F4EE;
    border: 1px solid #c8ebdd;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 4px 0 14px;
}
.bsk_write_notice_box p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: #1b1b18; }
.bsk_write_notice_box p:last-of-type { margin-bottom: 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: inline-flex; align-items: center; gap: 8px;
    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; }
.bsk_write_secret_note { margin: 0; font-size: 12px; color: var(--portal-text-sub); line-height: 1.5; }

/* 단축키 일람 버튼 (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_autosave_group {
    display: inline-flex;
    align-items: stretch;
    height: 38px;
    border: 1px solid #d0d5da;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.bsk_autosave_save,
.bsk_autosave_count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #f7f8f9;
    border: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.1s;
}
.bsk_autosave_save:hover,
.bsk_autosave_count:hover { background: #eef0f2; }
.bsk_autosave_count { color: var(--portal-primary); font-weight: 700; }
.bsk_autosave_divider { width: 1px; background: #d0d5da; flex-shrink: 0; }

/* 임시저장 팝업 — 기본 숨김은 파일 상단 !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%; }
    .brd_side_compact    { flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .brd_side_compact .brd_side_widget_sm { flex: 1; min-width: 220px; }

    /* 그룹 그리드: 태블릿에서 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%; }
    /* width:100%면 입력칸이 줄 전체를 차지하고 버튼(입력도구·음성·검색)이 그 밖으로 밀려 화면을 벗어난다.
       입력칸은 남는 폭만 쓰고(min-width:0 — input 기본 최소폭 무시), 버튼은 줄어들지 않게 */
    #portal_header .search_wrap input { width: auto; flex: 1 1 auto; min-width: 0; }
    #portal_header .search_wrap button { flex-shrink: 0; }
    #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); }
    html[data-theme="dark"] .mobile_menu_btn:not(.is_open) { color: var(--portal-text); border-color: var(--portal-border); }

    /* 모바일 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_autosave_group { width: 100%; }
    .bsk_autosave_save { flex: 1; justify-content: center; }
    .bsk_write_submit { justify-content: stretch; }
    .bsk_btn_cancel,
    .bsk_btn_submit { flex: 1; justify-content: center; }
}

/* ── 코어 basic 게시판 스킨의 점3개(더보기) 메뉴 위치 ──
   모바일 basic 스킨(mobile/skin/board/basic)은 버튼 li에 position:relative를 안 주고
   코어 css/mobile.css의 .btn_top{position:absolute}에 기대는데, 이 테마는 mobile.css를
   안 불러서 .more_opt(absolute)가 페이지 기준으로 떠 화면 구석에 나왔다.
   PC basic 스킨은 이미 li가 relative라 결과가 같다(top 45px ≒ 버튼 35px + 10px). */
.btn_bo_user > li { position: relative; }
.btn_bo_user .more_opt { top: calc(100% + 10px); right: 0; }
