/* 와글 테마: 헤더, 파란 탭, 반응형 보정 (기본 테마 css 뒤에 로드됨) */
:root {
    --wg-blue: #37499b;
    --wg-blue-d: #2b3a80;
    --wg-yellow: #f5c358;
    --wg-line: #e3e6ee;
    --wg-text: #222;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    color: var(--wg-text);
    background: #fff;
}

/* ---------- 헤더 ---------- */
.sound_only, #skip_to_container {
    position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important;
    padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; border: 0 !important;
}

#hd { background: #fff !important; border: 0; height: auto; }
#hd_h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wg_inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 12px; box-sizing: border-box; }

#wg_top { background: #fff; }
#wg_top .wg_inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }

#wg_logo { flex: 0 0 auto; display: block; line-height: 0; }
#wg_logo img { height: 40px; width: auto; display: block; }

#wg_search { flex: 1 1 auto; position: relative; max-width: 460px; margin: 0 0 0 8px; }
#wg_search input[type=text] {
    width: 100%; height: 48px; box-sizing: border-box; padding: 0 56px 0 16px;
    border: 3px solid var(--wg-blue); border-radius: 0; background: #fff;
    font-size: 16px; color: var(--wg-text); outline: 0; -webkit-appearance: none; appearance: none;
}
#wg_search input[type=text]::placeholder { color: #9aa0b4; }
#wg_search input[type=text]:focus { border-color: var(--wg-blue-d); }
#wg_search #sch_submit {
    position: absolute; right: 0; top: 0; width: 52px; height: 48px; border: 0; border-radius: 0;
    background: transparent; color: var(--wg-blue); cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
}
#wg_search #sch_submit:hover { color: var(--wg-blue-d); }

#wg_login { flex: 0 0 auto; margin-left: auto !important; margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 4px; font-size: 13px; }
#wg_login li { margin: 0; padding: 0; }
#wg_login a { display: block; padding: 6px 10px; color: #444; text-decoration: none; border-radius: 4px; }
#wg_login a:hover { background: #f1f3f9; color: var(--wg-blue); }
#wg_login .wg_nick { color: var(--wg-blue); font-weight: 700; padding: 6px 6px; }

/* ---------- 파란 탭 ---------- */
#wg_nav { background: var(--wg-blue); }
.wg_tabs { margin: 0; padding: 0; list-style: none; display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wg_tabs::-webkit-scrollbar { display: none; }
.wg_tabs li { margin: 0; flex: 0 0 auto; }
.wg_tabs a {
    display: block; padding: 0 28px; height: 46px; line-height: 46px; color: #dfe4f7;
    font-size: 16px; font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; box-sizing: border-box;
}
.wg_tabs a:hover { color: #fff; }
.wg_tabs li.on a { color: #fff; background: var(--wg-blue-d); border-bottom-color: var(--wg-yellow); }

/* ---------- box 하위 탭 ---------- */
#wg_sub { background: #f4f6fb; border-bottom: 1px solid var(--wg-line); }
#wg_sub ul { margin: 0; padding: 0; list-style: none; display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#wg_sub ul::-webkit-scrollbar { display: none; }
#wg_sub li { margin: 0; flex: 0 0 auto; }
#wg_sub a { display: block; padding: 0 16px; height: 40px; line-height: 40px; color: #555; font-size: 14px; text-decoration: none; }
#wg_sub a:hover { color: var(--wg-blue); }
#wg_sub li.on a { color: var(--wg-blue); font-weight: 700; box-shadow: inset 0 -2px 0 var(--wg-blue); }

/* ---------- 본문 영역 ---------- */
#wrapper { width: auto; min-width: 0; }
#container_wr { width: auto; max-width: 1200px; margin: 0 auto; padding: 0 12px; box-sizing: border-box; }
#container { box-sizing: border-box; }
#container img, #bo_v_con img { max-width: 100%; height: auto; }
.tbl_wrap, .tbl_head01, #bo_list { max-width: 100%; }
.tbl_wrap { overflow-x: auto; }

@media (min-width: 901px) {
    #container { float: left; width: calc(100% - 330px); }
    #aside { float: right; width: 300px; }
}

@media (max-width: 900px) {
    #container, #aside { float: none !important; width: 100% !important; }
    #aside { margin-top: 24px; }
    #wg_top .wg_inner { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-top: 12px; padding-bottom: 12px; }
    #wg_logo { order: 1; }
    #wg_login { order: 2; margin-left: auto; }
    #wg_search { order: 3; flex: 1 0 100%; max-width: none; margin: 0; }
}

@media (max-width: 600px) {
    #wg_logo img { height: 32px; }
    .wg_tabs a { padding: 0 20px; height: 42px; line-height: 42px; font-size: 15px; }
    #wg_login { font-size: 12px; }
    #wg_login a { padding: 6px 8px; }
}

/* ---------- 홈: 실시간 베스트 ---------- */
#container_wr::after { content: ""; display: block; clear: both; }
.wg_sec { margin-top: 18px; }
.wg_sec_title { margin: 0; padding: 0 4px 10px; font-size: 16px; font-weight: 700; color: var(--wg-blue); border-bottom: 2px solid #8d93a8; }
.wg_empty { margin: 0; padding: 28px 8px; text-align: center; color: #888; font-size: 14px; }

.wg_best { margin: 0; padding: 0; list-style: none; }
.wg_best li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid #e8eaf0; }
.wg_b_thumb { flex: 0 0 64px; width: 64px; height: 40px; background: #f0f2f7; overflow: hidden; display: block; }
.wg_b_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wg_b_main { flex: 1 1 auto; min-width: 0; font-size: 15px; display: flex; align-items: baseline; gap: 5px; }
.wg_b_title { color: #111; font-weight: 700; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg_b_main .wg_b_cmt { flex: 0 0 auto; }
.wg_b_title:hover { text-decoration: underline; }
.wg_b_cmt { color: #c8372d; font-size: 13px; font-weight: 400; }
.wg_b_meta { flex: 0 0 auto; font-size: 12px; color: #777; white-space: nowrap; }
.wg_b_board { max-width: 120px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.wg_b_board::after { content: "|"; margin: 0 6px; color: #c7cbd8; }

/* ---------- 오른쪽 사이드바 ---------- */
.wg_side { margin: 18px 0 0; }
.wg_side:first-child { margin-top: 18px; }
.wg_side_title { margin: 0 0 8px; padding: 0 2px; font-size: 14px; font-weight: 700; color: var(--wg-blue); }

.wg_loginbox { border: 2px solid var(--wg-blue); padding: 14px; box-sizing: border-box; }
.wg_loginbox form { display: flex; flex-direction: column; gap: 6px; }
.wg_loginbox input[type=text], .wg_loginbox input[type=password] {
    width: 100%; height: 38px; box-sizing: border-box; padding: 0 10px; border: 1px solid #c7cbd8; border-radius: 0; font-size: 14px;
}
.wg_lb_btn { height: 38px; border: 0; background: var(--wg-blue); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.wg_lb_btn:hover { background: var(--wg-blue-d); }
.wg_lb_sub { margin: 10px 0 0; text-align: center; font-size: 13px; }
.wg_lb_sub a { color: var(--wg-blue); text-decoration: none; font-weight: 700; }
.wg_lb_note { margin: 10px 0 0; font-size: 12px; line-height: 1.55; color: #777; }
.wg_lb_hello { margin: 0 0 10px; font-size: 15px; }
.wg_lb_links { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.wg_lb_links a { display: block; padding: 6px 12px; border: 1px solid #c7cbd8; color: #333; font-size: 13px; text-decoration: none; }
.wg_lb_links a:hover { border-color: var(--wg-blue); color: var(--wg-blue); }

.wg_rank { margin: 0; padding: 4px 0; list-style: none; border: 1px solid var(--wg-line); }
.wg_rank li { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; font-size: 13px; min-width: 0; }
.wg_rank li a { color: #333; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wg_rank li a:hover { color: var(--wg-blue); text-decoration: underline; }
.wg_rk_no { flex: 0 0 18px; color: var(--wg-blue); font-weight: 700; text-align: right; }
.wg_rank li:nth-child(n+4) .wg_rk_no { color: #888; }
.wg_side .wg_empty { border: 1px solid var(--wg-line); padding: 18px 8px; }

/* ---------- 하단 ---------- */
#wg_ft { margin-top: 40px; border-top: 1px solid var(--wg-line); background: #f7f8fb; padding: 22px 0 30px; text-align: center; font-size: 13px; color: #777; }
.wg_ft_links { margin: 0 0 8px; }
.wg_ft_links a { margin: 0 10px; color: #555; text-decoration: none; }
.wg_ft_links a:hover { color: var(--wg-blue); }
.wg_ft_copy { margin: 0; }

@media (max-width: 600px) {
    .wg_best li { gap: 10px; }
    .wg_b_thumb { flex-basis: 56px; width: 56px; height: 36px; }
    .wg_b_main { font-size: 14px; }
    .wg_b_board { display: none; }
}

/* ---------- 게시판 목록 ---------- */
.wg_list { width: 100% !important; }
.wg_listbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 14px 0 0; border-bottom: 2px solid var(--wg-blue); }
.wg_btabs { margin: 0; padding: 0; list-style: none; display: flex; gap: 4px; }
.wg_btabs li { margin: 0; }
.wg_btabs a { display: block; padding: 0 18px; height: 38px; line-height: 36px; border: 1px solid var(--wg-line); border-bottom: 0; background: #fff; color: #444; font-size: 14px; font-weight: 700; text-decoration: none; }
.wg_btabs a:hover { color: var(--wg-blue); }
.wg_btabs li.on a { background: var(--wg-blue); border-color: var(--wg-blue); color: #fff; }
.wg_listctl { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; }
.wg_listctl select { height: 30px; border: 1px solid #c7cbd8; background: #fff; font-size: 13px; padding: 0 6px; border-radius: 0; }
.wg_btn_write { display: inline-block; height: 30px; line-height: 30px; padding: 0 16px; background: var(--wg-blue); color: #fff !important; font-size: 13px; font-weight: 700; text-decoration: none; }
.wg_btn_write:hover { background: var(--wg-blue-d); }
.wg_btn_admin { font-size: 12px; color: #888; padding: 0 4px; }
.wg_admin_ops button { height: 30px; padding: 0 8px; border: 1px solid #c7cbd8; background: #fff; font-size: 12px; cursor: pointer; }

.wg_tbl_wrap { overflow-x: auto; }
.wg_tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.wg_tbl th { padding: 8px 4px; background: #f6f7fb; border-bottom: 1px solid var(--wg-line); color: #555; font-weight: 700; font-size: 12px; text-align: center; }
.wg_tbl td { padding: 8px 4px; border-bottom: 1px solid #eceef4; text-align: center; color: #555; vertical-align: middle; }
.wg_tbl .c_chk { width: 34px; }
.wg_tbl .c_num { width: 64px; }
.wg_tbl .c_name { width: 120px; }
.wg_tbl .c_date { width: 66px; }
.wg_tbl .c_hit, .wg_tbl .c_good { width: 54px; }
.wg_tbl .c_name, .wg_tbl td.c_name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg_tbl td.c_tit { text-align: left; padding-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg_tbl th.c_tit { text-align: center; }
.wg_tit_link { color: #111; text-decoration: none; }
.wg_tit_link:hover { text-decoration: underline; }
.wg_tbl tr.is_notice td { background: #f8f9fd; }
.wg_tbl tr.is_notice .wg_tit_link { font-weight: 700; }
.wg_badge_notice { display: inline-block; padding: 1px 7px; border: 1px solid #e0a43a; border-radius: 3px; color: #b97a10; font-size: 11px; font-weight: 700; }
.wg_cur { color: var(--wg-blue); font-weight: 700; }
.wg_cmt { color: #888; font-size: 12px; margin-left: 3px; }
.wg_new { display: inline-block; margin-left: 4px; padding: 0 4px; background: var(--wg-yellow); color: #5a4300; font-size: 10px; font-weight: 700; border-radius: 3px; vertical-align: 1px; }
.wg_lock { display: inline-block; margin-right: 4px; padding: 0 5px; background: #e6e8ef; color: #555; font-size: 11px; border-radius: 3px; }
.wg_m_meta { display: none; }
.wg_tbl .empty_table { padding: 40px 0; color: #888; }
.wg_listfoot { text-align: right; margin: 12px 0 0; }
.wg_bsearch { display: flex; justify-content: center; gap: 6px; margin: 18px 0 8px; }
.wg_bsearch select, .wg_bsearch input[type=text] { height: 34px; border: 1px solid #c7cbd8; border-radius: 0; padding: 0 8px; font-size: 13px; box-sizing: border-box; }
.wg_bsearch input[type=text] { width: 220px; max-width: 50%; }
.wg_bsearch button { height: 34px; padding: 0 16px; border: 0; background: var(--wg-blue); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }

@media (max-width: 700px) {
    .wg_listbar { flex-direction: column; align-items: stretch; border-bottom: 0; gap: 8px; }
    .wg_btabs { border-bottom: 2px solid var(--wg-blue); }
    .wg_listctl { justify-content: flex-end; padding-bottom: 0; }
    .wg_tbl thead { display: none; }
    .wg_tbl, .wg_tbl tbody, .wg_tbl tr { display: block; width: 100%; }
    .wg_tbl tr { position: relative; padding: 9px 4px 9px 0; border-bottom: 1px solid #eceef4; }
    .wg_tbl td { display: none; border: 0; padding: 0; }
    .wg_tbl td.c_tit { display: block; padding: 0 0 0 8px; white-space: normal; }
    .wg_tbl td.c_chk { display: block; position: absolute; left: 4px; top: 11px; width: auto; }
    .wg_tbl tr:has(td.c_chk) td.c_tit { padding-left: 30px; }
    .wg_tbl td.c_num { display: none; }
    .wg_tbl tr.is_notice td.c_num { display: inline-block; position: absolute; right: 4px; top: 10px; }
    .wg_tit_link { font-size: 15px; }
    .wg_m_meta { display: block; margin-top: 4px; font-size: 12px; color: #888; }
    .wg_bsearch { flex-wrap: wrap; }
}

/* ---------- 글쓰기 ---------- */
.wg_write { margin-top: 14px; }
.wg_write .write_div { margin: 0 0 10px; }
.wg_write .bo_w_info { display: flex; gap: 8px; flex-wrap: wrap; }
.wg_write .bo_w_info .frm_input { width: 180px; max-width: 48%; height: 40px; box-sizing: border-box; border: 1px solid #c7cbd8; border-radius: 0; padding: 0 10px; }
.wg_write .bo_w_tit .frm_input, .wg_write .bo_w_link .frm_input { width: 100%; height: 42px; box-sizing: border-box; border: 1px solid #c7cbd8; border-radius: 0; padding: 0 12px; }
.wg_write #autosave_wrapper { position: relative; }
.wg_write #btn_autosave { position: absolute; right: 6px; top: 6px; height: 30px; }
.wg_w_notice { margin: 4px 0 14px; font-size: 12px; line-height: 1.7; color: #777; }
.wg_write .btn_confirm { display: flex; justify-content: flex-end; gap: 6px; margin-top: 18px; }
.wg_write .btn_cancel { background: #666 !important; color: #fff !important; border: 0; height: 40px; line-height: 40px; padding: 0 22px; font-weight: 700; text-decoration: none; }
.wg_write .btn_submit { background: var(--wg-blue) !important; color: #fff !important; border: 0; height: 40px; padding: 0 26px; font-weight: 700; cursor: pointer; }

/* 사진 올리기 */
.wg_up { border: 1px dashed #b7bdd0; background: #fafbfe; padding: 14px; }
.wg_up_drop { text-align: center; padding: 22px 10px; cursor: pointer; border-radius: 4px; outline: 0; }
.wg_up_drop:hover, .wg_up_drop:focus, .wg_up_drop.over { background: #eef1fb; }
.wg_up_main { margin: 0; font-size: 15px; color: #333; }
.wg_up_btn { display: inline-block; margin-left: 6px; padding: 5px 14px; background: var(--wg-blue); color: #fff; font-weight: 700; font-size: 13px; }
.wg_up_help { margin: 8px 0 0; font-size: 12px; color: #888; }
.wg_up_list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.wg_up_list li { position: relative; margin: 0; border: 1px solid var(--wg-line); background: #fff; padding: 4px; font-size: 11px; color: #666; }
.wg_up_list img { display: block; width: 100%; height: 90px; object-fit: cover; background: #f0f2f7; }
.wg_up_name { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg_up_size { display: block; color: #999; }
.wg_up_x { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; line-height: 22px; cursor: pointer; padding: 0; }
.wg_up_info { margin: 8px 0 0; font-size: 12px; color: var(--wg-blue); }
.wg_up_exist { margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; }
.wg_up_slots { display: none; }
.wg_up.busy { opacity: .6; pointer-events: none; }
.wg_up_fallback .wg_up_drop, .wg_up_fallback .wg_up_list { display: none; }
.wg_up_fallback .wg_up_slots { display: block; }
.wg_up_fallback .wg_up_slots input { display: block; margin: 4px 0; }

/* 보정: 표 제목 숨김, 관리자 버튼 줄바꿈 */
.wg_tbl caption { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.wg_listctl { flex-wrap: wrap; justify-content: flex-end; }
.wg_btn_admin, .wg_btn_write, .wg_admin_ops button { white-space: nowrap; flex: 0 0 auto; }

/* 인기 표시 */
.wg_hot { display: inline-block; margin-right: 5px; padding: 0 6px; border: 1px solid #d9453b; border-radius: 3px; color: #d9453b; font-size: 11px; font-weight: 700; line-height: 17px; vertical-align: 1px; }

/* 본문 속 사진 위치 */
.wg_prev { border: 1px solid var(--wg-line); background: #fff; padding: 12px; }
.wg_prev_h { margin: 0 0 8px; font-size: 12px; color: var(--wg-blue); font-weight: 700; }
.wg_prev_t { white-space: pre-wrap; word-break: break-all; font-size: 14px; line-height: 1.6; color: #333; }
.wg_prev img { display: block; max-width: 100%; max-height: 360px; margin: 8px 0; }
.wg_up_ins { margin-top: 4px; width: 100%; height: 24px; border: 1px solid #c7cbd8; background: #fff; font-size: 11px; color: var(--wg-blue); cursor: pointer; padding: 0; }
.wg_up_exist li { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.wg_up_exist img { width: 56px; height: 40px; object-fit: cover; }
.wg_up_exist .wg_up_name { margin: 0; flex: 1 1 auto; }
.wg_up_exist .wg_up_ins { width: auto; padding: 0 10px; margin: 0; }
.wg_inline_img { margin: 10px 0; }
.wg_inline_img img { max-width: 100%; height: auto; }

/* ===== 글쓰기 칸 (사진/투표/크기/색) ===== */
.wg_js #wr_content { display: none; }
.wg_ed { border: 1px solid #cfd3de; border-radius: 4px; background: #fff; }
.wg_ed_bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; background: #f3f5fa; border-bottom: 1px solid #cfd3de; }
.wg_ed_bar button { border: 1px solid #cfd3de; background: #fff; color: #333; border-radius: 3px; padding: 5px 9px; font-size: 13px; line-height: 1.2; cursor: pointer; }
.wg_ed_bar button:hover { background: #eef1fb; border-color: #37499b; }
.wg_ed_bar button[hidden] { display: none; }
.wg_ed_bar .wg_tb_main { background: #37499b; border-color: #37499b; color: #fff; font-weight: bold; }
.wg_ed_bar .wg_tb_main:hover { background: #2c3b82; }
.wg_tb_sep { width: 1px; height: 22px; background: #cfd3de; }
.wg_tb_grp { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.wg_tb_sz2 { font-size: 12px !important; } .wg_tb_sz5 { font-size: 15px !important; } .wg_tb_sz6 { font-size: 17px !important; }
.wg_tb_colors button { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cfd3de; }
.wg_tb_colors button:hover { box-shadow: 0 0 0 2px #37499b; background-clip: padding-box; }
.wg_ed_area { min-height: 300px; padding: 12px; font-size: 16px; line-height: 1.7; color: #333; outline: none; word-break: break-all; overflow-wrap: anywhere; }
.wg_ed_area:focus { box-shadow: inset 0 0 0 2px rgba(55,73,155,.25); }
.wg_ed.is_empty .wg_ed_area:not(:focus)::before { content: attr(data-placeholder); color: #9aa0b4; pointer-events: none; }
.wg_ed_area font[size="1"], .wg_ed_area font[size="2"] { font-size: 13px; }
.wg_ed_area font[size="5"] { font-size: 20px; }
.wg_ed_area font[size="6"], .wg_ed_area font[size="7"] { font-size: 28px; }
.wg_ed_img { display: block; max-width: 100%; height: auto; margin: 6px 0; border-radius: 3px; }
.wg_ed_poll { display: block; margin: 8px 0; padding: 12px; border: 2px solid #37499b; border-radius: 6px; background: #f7f8fd; font-size: 14px; line-height: 1.4; user-select: text; }
.wg_ed_poll input { box-sizing: border-box; width: 100%; padding: 8px 10px; border: 1px solid #cfd3de; border-radius: 3px; font-size: 16px; background: #fff; }
.wg_ed_poll input:disabled { background: #eceef5; color: #666; }
.wg_pe_h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #37499b; }
.wg_pq { font-weight: bold; }
.wg_po { list-style: none; margin: 8px 0; padding: 0; }
.wg_po li { display: flex; gap: 6px; margin-bottom: 6px; }
.wg_ed_poll button { border: 1px solid #cfd3de; background: #fff; border-radius: 3px; padding: 5px 9px; font-size: 13px; cursor: pointer; }
.wg_ed_poll button[hidden] { display: none; }
.wg_ed_poll[data-locked] button { display: none; }
.wg_pe_note { margin: 8px 0 0; font-size: 12px; color: #777; }

/* ===== 글 속 투표 ===== */
.wg_poll { margin: 14px 0; padding: 14px; border: 2px solid #37499b; border-radius: 6px; background: #f7f8fd; line-height: 1.4; }
.wg_poll_q { font-size: 17px; font-weight: bold; color: #222; margin-bottom: 10px; }
.wg_poll_list { list-style: none; margin: 0; padding: 0; }
.wg_poll_list li { margin: 0 0 8px; }
.wg_poll_opt { display: block; width: 100%; box-sizing: border-box; text-align: left; padding: 10px 12px; border: 1px solid #cdd3e2; background: #fff; border-radius: 4px; font-size: 15px; color: #222; cursor: pointer; }
.wg_poll_opt:hover:not(:disabled) { background: #eef1fb; border-color: #37499b; }
.wg_poll_opt:disabled { cursor: default; color: #333; }
.wg_poll_list li.mine .wg_poll_opt { border-color: #37499b; background: #eef1fb; font-weight: bold; }
.wg_poll_bar, .wg_poll_num { display: none; }
.wg_poll.voted .wg_poll_bar, .wg_poll.show .wg_poll_bar { display: block; height: 8px; margin-top: 5px; background: #e3e7f2; border-radius: 4px; overflow: hidden; }
.wg_poll.voted .wg_poll_num, .wg_poll.show .wg_poll_num { display: block; margin-top: 3px; font-size: 12px; color: #666; }
.wg_poll_bar i { display: block; height: 100%; background: #37499b; }
.wg_poll_foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: #666; }
.wg_poll_toggle { border: 1px solid #cdd3e2; background: #fff; border-radius: 3px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.wg_poll.busy { opacity: .6; pointer-events: none; }
#bo_v_con { font-size: 16px; line-height: 1.7; }
#bo_v_con .wg_n { font-size: 16px; }
.wg_ed_poll, .wg_ed_poll * { font-weight: normal; }
.wg_ed_poll { color: #333; font-size: 14px; }
.wg_ed_poll .wg_pe_h strong, .wg_ed_poll .wg_pq { font-weight: bold; }

/* 글자 크기 선택 */
.wg_tb_size { position: relative; display: inline-block; }
.wg_ed_bar .wg_size_btn { min-width: 58px; text-align: left; }
.wg_size_menu { position: absolute; z-index: 20; top: 100%; left: 0; margin: 2px 0 0; padding: 4px 0; list-style: none; min-width: 70px; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #cfd3de; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.wg_size_menu[hidden] { display: none; }
.wg_ed_bar .wg_size_menu button { display: block; width: 100%; text-align: left; border: 0; border-radius: 0; background: #fff; padding: 6px 14px; font-size: 14px; }
.wg_ed_bar .wg_size_menu button:hover { background: #eef1fb; }
.wg_ed_area video.wg_ed_img, .wg_inline_img video { display: block; max-width: 100%; height: auto; margin: 6px 0; background: #000; }
.wg_up_list li video, .wg_up_exist li video { width: 100%; height: 70px; object-fit: cover; background: #000; }
.wg_up_exist li video { width: 48px; height: 48px; }

/* ===== 글보기 ===== */
.wg_view { margin: 0 0 30px; }
.wg_v_head { border-top: 2px solid #37499b; border-bottom: 1px solid #d5d9e6; padding: 14px 4px 10px; }
.wg_view #bo_v_title { margin: 0 0 8px; font-size: 20px; line-height: 1.4; font-weight: bold; color: #222; word-break: break-all; }
.wg_view .bo_v_cate { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 3px; background: #eef1fb; color: #37499b; font-size: 13px; font-weight: normal; vertical-align: middle; }
.wg_v_meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: #777; }
.wg_v_name { color: #333; font-weight: bold; }
.wg_v_name a { color: inherit; }
.wg_v_stats { margin-left: auto; display: inline-flex; gap: 10px; }
.wg_v_stats a { color: inherit; text-decoration: none; }
.wg_v_stats b { font-weight: normal; color: #e03131; }
.wg_view #bo_v_atc { padding: 18px 4px 6px; }
.wg_view #bo_v_atc_title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wg_view #bo_v_con { min-height: 120px; word-break: break-all; overflow-wrap: anywhere; color: #333; }
.wg_view #bo_v_img { margin-bottom: 10px; }
.wg_view #bo_v_img img { display: block; max-width: 100%; height: auto; margin-bottom: 8px; }

.wg_act { display: flex; justify-content: center; align-items: flex-start; gap: 12px; margin: 28px 0 10px; }
.wg_act .bo_v_act_gng { position: relative; display: inline-block; text-align: center; }
.wg_act a.bo_v_good, .wg_act a.bo_v_nogood, .wg_act span.bo_v_good, .wg_act span.bo_v_nogood { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; box-sizing: border-box; justify-content: center; padding: 12px 18px; border: 2px solid #cfd3de; border-radius: 6px; background: #fff; color: #333; font-size: 15px; text-decoration: none; }
.wg_act a.bo_v_good:hover, .wg_act span.bo_v_good { border-color: #e03131; }
.wg_act a.bo_v_nogood:hover, .wg_act span.bo_v_nogood { border-color: #37499b; }
.wg_act a.bo_v_good:hover { background: #fff5f5; }
.wg_act a.bo_v_nogood:hover { background: #f4f6fc; }
.wg_act .wg_act_ico { font-size: 20px; line-height: 1; }
.wg_act strong { font-size: 18px; }
.wg_act a.bo_v_good strong, .wg_act span.bo_v_good strong { color: #e03131; }
.wg_act a.bo_v_nogood strong, .wg_act span.bo_v_nogood strong { color: #37499b; }
.wg_act b#bo_v_act_good, .wg_act b#bo_v_act_nogood { display: none; position: absolute; left: 50%; top: 100%; margin-top: 6px; transform: translateX(-50%); width: max-content; max-width: 240px; padding: 6px 10px; border-radius: 4px; background: #333; color: #fff; font-size: 12px; font-weight: normal; z-index: 5; }

.wg_v_btns { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 18px 0 14px; padding: 12px 0; border-top: 1px solid #e3e6ef; }
.wg_v_btns_l, .wg_v_btns_r { display: flex; flex-wrap: wrap; gap: 6px; }
.wg_btn { display: inline-block; padding: 8px 14px; border: 1px solid #cfd3de; border-radius: 3px; background: #fff; color: #333; font-size: 14px; line-height: 1.2; text-decoration: none; }
.wg_btn:hover { background: #eef1fb; border-color: #37499b; }
.wg_btn_main { background: #37499b; border-color: #37499b; color: #fff; font-weight: bold; }
.wg_btn_main:hover { background: #2c3b82; }

.wg_view #bo_v_file, .wg_view #bo_v_link { margin: 10px 0; padding: 10px 12px; border: 1px solid #e3e6ef; background: #fafbfe; font-size: 13px; }
.wg_view #bo_v_file h2, .wg_view #bo_v_link h2 { margin: 0 0 6px; font-size: 13px; color: #555; }
.wg_view #bo_v_file ul, .wg_view #bo_v_link ul { margin: 0; padding: 0; list-style: none; }
.wg_view .bo_v_nb { list-style: none; margin: 14px 0; padding: 0; border-top: 1px solid #e3e6ef; font-size: 14px; }
.wg_view .bo_v_nb li { padding: 9px 4px; border-bottom: 1px solid #eef0f6; }
.wg_view .bo_v_nb .nb_tit { display: inline-block; width: 52px; color: #888; }
.wg_view .bo_v_nb a { color: #333; text-decoration: none; }
.wg_view .bo_v_nb .nb_date { float: right; color: #999; font-size: 12px; }

/* 댓글 */
.wg_cmt { margin: 20px 0 0; border-top: 2px solid #37499b; }
.wg_cmt_h { margin: 0; padding: 12px 4px; font-size: 16px; }
.wg_cmt_h b { color: #e03131; }
.wg_cm { padding: 12px 6px; border-top: 1px solid #eef0f6; }
.wg_cm_re { background: #fafbfe; border-left: 3px solid #d5d9e6; }
.wg_cm_h { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 13px; }
.wg_cm_name { color: #333; }
.wg_cm_time, .wg_cm_ip { color: #999; font-size: 12px; }
.wg_cm_act { margin-left: auto; display: inline-flex; gap: 10px; }
.wg_cm_act a { color: #777; font-size: 12px; text-decoration: none; }
.wg_cm_act a:hover { color: #37499b; text-decoration: underline; }
.cmt_contents { padding: 6px 0 2px; font-size: 15px; line-height: 1.6; word-break: break-all; overflow-wrap: anywhere; }
.cmt_contents p { margin: 0; }
#bo_vc_empty { margin: 0; padding: 26px 0; text-align: center; color: #999; font-size: 14px; border-top: 1px solid #eef0f6; }
.wg_cw { margin: 10px 0 0; padding: 12px; border: 1px solid #d5d9e6; background: #f7f8fd; }
.wg_cm .bo_vc_w { display: block; }
.wg_cm .bo_vc_w .wg_cw { margin-top: 8px; background: #fff; }
.wg_cw_info { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wg_cw_info input { flex: 1 1 140px; min-width: 0; box-sizing: border-box; padding: 9px 10px; border: 1px solid #cfd3de; border-radius: 3px; font-size: 14px; background: #fff; }
.wg_cw textarea#wr_content { display: block; width: 100%; box-sizing: border-box; min-height: 86px; padding: 10px; border: 1px solid #cfd3de; border-radius: 3px; font-size: 15px; line-height: 1.5; resize: vertical; background: #fff; }
.wg_cw_cap { margin-top: 8px; }
.wg_cw_btn { margin-top: 8px; text-align: right; }
.wg_cw_btn .btn_submit { padding: 9px 22px; border: 0; border-radius: 3px; background: #37499b; color: #fff; font-size: 14px; font-weight: bold; cursor: pointer; }
.wg_cw_btn .btn_submit:hover { background: #2c3b82; }
.wg_cw_btn .btn_submit:disabled { opacity: .6; }
#char_cnt { display: block; text-align: right; font-size: 12px; color: #888; }
@media (max-width: 640px) {
  .wg_view #bo_v_title { font-size: 18px; }
  .wg_v_stats { margin-left: 0; width: 100%; }
  .wg_act a.bo_v_good, .wg_act a.bo_v_nogood, .wg_act span.bo_v_good, .wg_act span.bo_v_nogood { min-width: 0; padding: 10px 14px; }
}
.wg_ip { margin-left: 3px; color: #8a8fa3; font-size: 12px; font-weight: normal; }

/* ===== 홈: 실시간 핫딜 ===== */
.wg_sec_title { display: flex; justify-content: space-between; align-items: baseline; }
.wg_more { font-size: 13px; font-weight: normal; color: #777; text-decoration: none; }
.wg_more:hover { color: var(--wg-blue); text-decoration: underline; }
.wg_hd { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.wg_hd li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #e8eaf0; min-width: 0; }
.wg_hd_thumb { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 6px; background: #eef0f6; overflow: hidden; position: relative; }
.wg_hd_thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wg_hd_main { min-width: 0; flex: 1 1 auto; }
.wg_hd_title { display: block; color: #222; font-size: 14px; line-height: 1.35; text-decoration: none; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.wg_hd_title:hover { color: var(--wg-blue); text-decoration: underline; }
.wg_hd_meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; font-size: 12px; color: #888; }
.wg_hd_price { color: #d9363e; font-weight: 700; }
@media (max-width: 720px) { .wg_hd { grid-template-columns: 1fr; } }

/* ===== 핫딜 페이지 ===== */
.wgh_h { margin: 0 0 12px; font-size: 18px; color: #222; }
.wgh_h small { font-size: 13px; font-weight: normal; color: #777; margin-left: 6px; }
.wgh_form { margin-bottom: 14px; }
.wgh_filter { background: #fff; border: 1px solid var(--wg-line); border-radius: 6px; padding: 0 14px; margin-bottom: 10px; }
.wgh_filter summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-weight: 700; cursor: pointer; list-style: none; }
.wgh_filter summary::-webkit-details-marker { display: none; }
.wgh_filter summary small { font-weight: normal; color: #777; margin-left: 6px; }
.wgh_filter summary::after { content: "▾"; color: #888; }
.wgh_filter[open] summary::after { content: "▴"; }
.wgh_checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 12px; padding: 8px 0; border-top: 1px solid #eee; max-height: 260px; overflow-y: auto; }
.wgh_checks label { display: flex; align-items: center; gap: 8px; padding: 7px 4px; font-size: 14px; cursor: pointer; }
.wgh_checks input { width: 17px; height: 17px; accent-color: var(--wg-blue); }
.wgh_fact { display: flex; justify-content: flex-end; padding: 4px 0 8px; border-top: 1px solid #eee; }
.wgh_link { background: none; border: 0; color: var(--wg-blue); font-size: 13px; cursor: pointer; padding: 4px 0; }
.wgh_search { display: flex; gap: 6px; }
.wgh_search input[type=text] { flex: 1 1 auto; min-width: 0; height: 42px; box-sizing: border-box; padding: 0 12px; border: 1px solid #cfd3de; border-radius: 3px; font-size: 16px; background: #fff; }
.wgh_search button { flex: 0 0 auto; height: 42px; padding: 0 18px; border: 0; border-radius: 3px; background: var(--wg-blue); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.wgh_list { margin: 0; padding: 0; list-style: none; }
.wgh_card { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid #e8eaf0; }
.wgh_card:hover { background: #fafbff; }
.wgh_thumb { flex: 0 0 auto; position: relative; width: 80px; height: 80px; border-radius: 6px; background: #eef0f6; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.wgh_thumb::before { content: "🛒"; }
.wgh_thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wgh_info { flex: 1 1 auto; min-width: 0; }
.wgh_title { display: block; color: #222; font-weight: 700; line-height: 1.4; text-decoration: none; word-break: keep-all; }
.wgh_title::after { content: ""; position: absolute; inset: 0; }
.wgh_meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 13px; color: #666; }
.wgh_tags, .wgh_right { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.wgh_right { margin-left: auto; justify-content: flex-end; }
.wgh_shop { background: #e8ecfa; color: var(--wg-blue); padding: 2px 8px; border-radius: 10px; }
.wgh_price { color: #222; font-weight: 700; }
.wgh_price_big { font-size: 18px; }
.wgh_ago { background: #f0f0f0; padding: 2px 10px; border-radius: 10px; white-space: nowrap; }
.wgh_src { position: relative; z-index: 1; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; background: #eee; color: #555; }
.wgh_src_pp { background: #FFF0C8; color: #7A5200; } .wgh_src_cl { background: #E3F3DC; color: #2E6B2B; }
.wgh_src_rw { background: #EAE2FB; color: #5A3FA3; } .wgh_src_qz { background: #DCEFFA; color: #0F5A82; }
.wgh_src_fm { background: #FDE6EE; color: #A3234F; } .wgh_src_ar { background: #DDF1EF; color: #176B63; }
.wgh_src_em { background: #FBE7D8; color: #8A4A12; } .wgh_src_db { background: #FFE3E0; color: #A3281B; }
.wgh_src_mt { background: #E6EEFF; color: #234E9E; } .wgh_src_bb { background: #FFF0E0; color: #9A5400; }
.wgh_src_ct { background: #E8F7EC; color: #1F6B3A; } .wgh_src_et { background: #FDE8EC; color: #A12A45; }
.wgh_src_cj { background: #F1EAFB; color: #5B3A99; }
.wgh_pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.wgh_pager a, .wgh_pager strong { min-width: 34px; box-sizing: border-box; padding: 7px 10px; text-align: center; border: 1px solid #cfd3de; border-radius: 3px; background: #fff; color: #333; text-decoration: none; font-size: 14px; }
.wgh_pager strong { background: var(--wg-blue); border-color: var(--wg-blue); color: #fff; }
.wgh_detail { padding: 4px 4px 10px; }
.wgh_dtitle { margin: 0 0 12px; font-size: 20px; line-height: 1.45; word-break: keep-all; }
.wgh_detail .wgh_tags { gap: 8px; }
.wgh_photo { margin: 18px 0; border-radius: 6px; background: #f0f0f0; min-height: 160px; display: flex; align-items: center; justify-content: center; font-size: 56px; overflow: hidden; }
.wgh_photo img { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #fff; }
.wgh_note2 { margin: 4px 0 0; font-size: 13px; color: #666; }
.wgh_actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.wgh_btn { flex: 1 1 200px; text-align: center; padding: 13px; border-radius: 4px; border: 1px solid #cfd3de; background: #fff; color: #333; font-weight: 700; font-size: 15px; text-decoration: none; }
.wgh_btn_main { background: var(--wg-blue); border-color: var(--wg-blue); color: #fff; }
.wgh_notice { margin: 16px 2px 0; font-size: 12px; color: #888; line-height: 1.5; }
@media (max-width: 600px) { .wgh_thumb { width: 64px; height: 64px; } .wgh_dtitle { font-size: 18px; } }
.wgh_thumb { text-decoration: none; }

/* 제목 앞 아이콘 (사진·영상 / 글만 / 인기) */
.wg_ti { display: inline-block; width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.wg_ti_img { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='1.5' y='2.5' width='13' height='11' rx='2' fill='%23fff' stroke='%232f6fd6' stroke-width='1.4'/><circle cx='5.6' cy='6' r='1.3' fill='%232f6fd6'/><path d='M2.5 12.2l3.6-3.6 2.4 2.4 2-2 3 3.2' fill='none' stroke='%232f6fd6' stroke-width='1.4' stroke-linejoin='round'/></svg>"); }
.wg_ti_txt { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='2.5' y='1.5' width='11' height='13' rx='1.8' fill='%23fff' stroke='%23999' stroke-width='1.4'/><path d='M5 5.5h6M5 8h6M5 10.5h4' stroke='%23999' stroke-width='1.3' stroke-linecap='round'/></svg>"); }
.wg_ti_hot { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8.4 1.2c.3 2.2-1 3.2-2 4.4C5.3 6.9 4.2 8 4.2 10a3.8 3.8 0 007.6 0c0-1.4-.6-2.4-1.3-3.2-.2 1-.7 1.6-1.4 1.8.5-2.6-.1-5.4-.7-7.4z' fill='%23e5483d'/></svg>"); }

/* box 목록 페이지 */
.wg_boxes { margin: 12px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wg_boxcard { border: 1px solid var(--wg-line); background: #fff; margin: 0; }
.wg_boxcard_h { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: #f4f6fb; border-bottom: 1px solid var(--wg-line); color: var(--wg-blue); text-decoration: none; }
.wg_boxcard_h strong { font-size: 15px; }
.wg_boxcard_h span { font-size: 12px; color: #777; }
.wg_boxcard_h:hover strong { text-decoration: underline; }
.wg_boxcard ul { margin: 0; padding: 6px 0; list-style: none; }
.wg_boxcard li { padding: 4px 12px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg_boxcard li a { color: #333; text-decoration: none; }
.wg_boxcard li a:hover { color: var(--wg-blue); text-decoration: underline; }
.wg_boxcard_none { color: #999; }
.wg_sec_title .wg_more { font-size: 12px; font-weight: 400; color: #666; text-decoration: none; }

/* 실시간 베스트 페이지 넘기기 */
.wg_bestpg_page { display: none; }
.wg_bestpg_page.on { display: block; }
.wg_pager { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; color: #666; }
.wg_pg_no { margin-right: 4px; }
.wg_pg_no b { color: #111; }
.wg_pager button { width: 26px; height: 24px; padding: 0; border: 0; border-radius: 2px; background: var(--wg-blue); color: #fff; font-size: 18px; line-height: 22px; cursor: pointer; }
.wg_pager button:disabled { background: #b9bfd6; cursor: default; }

/* 관리자 전용: 파란 탭줄 오른쪽 접속자 수 */
#wg_nav .wg_inner { display: flex; align-items: center; }
#wg_nav .wg_tabs { flex: 1 1 auto; min-width: 0; }
.wg_online { flex: 0 0 auto; margin-left: 12px; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,.15); color: #fff; font-size: 13px; text-decoration: none; white-space: nowrap; }
.wg_online b { color: var(--wg-yellow); font-size: 15px; }
.wg_online small { margin-left: 4px; color: #d8dcf0; font-size: 11px; }
.wg_online:hover { background: rgba(255,255,255,.25); }
@media (max-width: 640px) { .wg_online small { display: none; } }
.wg_online i { font-style: normal; }

/* 모바일 가로 잘림 방지: 그누보드 기본 CSS 의 고정 너비/최소 너비를 모두 풀어 준다 */
html, body { min-width: 0 !important; max-width: 100%; overflow-x: hidden; }
#hd, #hd_wrapper, #wrapper, #container_wr, #container, #aside, #ft, #wg_top, #wg_nav, #wg_sub { min-width: 0 !important; box-sizing: border-box; }
#container_wr { max-width: 1200px; }
#wg_top .wg_inner, #wg_nav .wg_inner, #wg_sub .wg_inner { max-width: 1200px; width: 100%; }
.wg_sec, .wg_best, .wg_hd, .wg_bestpg_page { min-width: 0; max-width: 100%; }
@media (max-width: 900px) {
    #wg_search { min-width: 0; width: 100%; box-sizing: border-box; }
    #wg_search input[type=text] { width: 100%; min-width: 0; }
}

/* 모바일/태블릿: 사이드바를 본문 폭에 맞추고, 상단에 로그인이 있으므로 사이드 로그인 박스는 숨긴다 */
@media (max-width: 900px) {
    #aside { margin-left: 0 !important; margin-right: 0 !important; padding: 0 !important; width: 100% !important; float: none !important; }
    #aside .wg_side { max-width: 100%; box-sizing: border-box; }
    #aside .wg_loginbox { display: none; }
}

.wg_bestpg { touch-action: pan-y; position: relative; overflow: hidden; }

/* 추천/비추천 버튼: 그누보드 기본 알약 모양(좁고 긴 모양)을 풀고, 한 줄로 가로 배치 */
#bo_v_act.wg_act { gap: 10px; margin: 24px 0 8px; flex-wrap: nowrap; }
#bo_v_act.wg_act .bo_v_act_gng { margin: 0; padding: 0; width: auto; }
#bo_v_act.wg_act a.bo_v_good, #bo_v_act.wg_act a.bo_v_nogood,
#bo_v_act.wg_act span.bo_v_good, #bo_v_act.wg_act span.bo_v_nogood {
    display: inline-flex !important; flex-direction: row; align-items: center; justify-content: center; gap: 6px;
    width: auto !important; height: auto !important; min-width: 108px; line-height: 1.2 !important;
    padding: 10px 16px !important; border-radius: 8px !important; white-space: nowrap; box-sizing: border-box;
}
#bo_v_act.wg_act .wg_act_lbl { white-space: nowrap; font-size: 14px; }
#bo_v_act.wg_act strong { display: inline; margin: 0; line-height: 1.2; font-size: 16px; }
@media (max-width: 600px) {
    #bo_v_act.wg_act a.bo_v_good, #bo_v_act.wg_act a.bo_v_nogood,
    #bo_v_act.wg_act span.bo_v_good, #bo_v_act.wg_act span.bo_v_nogood { min-width: 0; padding: 9px 12px !important; gap: 5px; }
    #bo_v_act.wg_act .wg_act_ico { font-size: 17px; }
    #bo_v_act.wg_act .wg_act_lbl { font-size: 13px; }
}

/* 신고 */
.wg_report { cursor: pointer; }
.wg_cm_act .wg_report { color: #8a8fa3; }
.wg_rep_notice { margin: 16px 0; padding: 18px 12px; background: #f6f7fa; border: 1px dashed #c7cbd8; color: #777; font-size: 14px; text-align: center; font-style: normal; }
.wg_rep_notice.admin { margin: 0 0 12px; padding: 8px 12px; background: #fff4f2; border-color: #e5483d; color: #c8372d; }
#wg_rp_modal { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wg_rp_box { width: 100%; max-width: 320px; background: #fff; border-radius: 8px; padding: 18px; box-sizing: border-box; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.wg_rp_box h3 { margin: 0 0 12px; font-size: 16px; }
.wg_rp_opts label { display: block; padding: 8px 2px; font-size: 14px; cursor: pointer; }
.wg_rp_msg { min-height: 20px; margin: 8px 0 0; font-size: 13px; color: #c8372d; }
.wg_rp_btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
/* 관리자 상단 신고 배지, 신고 목록 */
.wg_rep { margin-left: 12px; }
.wg_rep.on { background: #e5483d; }
.wg_rep.on b { color: #fff; }
.wg_rpt_list { margin: 0; padding: 0; list-style: none; }
.wg_rpt { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #e8eaf0; }
.wg_rpt.hid { background: #fff8f7; }
.wg_rpt_main { flex: 1 1 auto; min-width: 0; }
.wg_rpt_title { display: block; color: #111; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg_rpt_meta { margin-top: 3px; font-size: 12px; color: #777; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.wg_rpt_cnt { color: #c8372d; font-weight: 700; }
.wg_rpt_hid { color: #fff; background: #e5483d; padding: 0 6px; border-radius: 3px; }
.wg_rpt_help { margin: 14px 4px; font-size: 12px; color: #888; }

.wg_rpt_tabs { margin: 0 0 4px; padding: 0; list-style: none; display: flex; gap: 4px; }
.wg_rpt_tabs li a { display: block; padding: 8px 14px; color: #666; text-decoration: none; border-bottom: 2px solid transparent; font-size: 14px; }
.wg_rpt_tabs li.on a { color: var(--wg-blue); font-weight: 700; border-bottom-color: var(--wg-blue); }
.wg_rpt form { display: flex; gap: 6px; flex: 0 0 auto; }
.wg_rpt_res { padding: 0 6px; border-radius: 3px; color: #fff; }
.wg_rpt_res.ok { background: #6b7390; }
.wg_rpt_res.done { background: #2f8f4e; }

/* 로그인 후에도 상단 줄이 늘어나지 않게: 닉네임은 말줄임, 항목 수는 로그인 전과 비슷하게 */
#wg_login .wg_nick a { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wg-blue); font-weight: 700; padding: 6px 8px; }
#wg_login .wg_nick a:hover { background: #f1f3f9; }
@media (max-width: 600px) {
    #wg_login { flex-wrap: nowrap; white-space: nowrap; gap: 0; }
    #wg_login a { padding: 6px 6px; }
    #wg_login .wg_nick a { max-width: 64px; padding: 6px 6px; }
    #wg_login .wg_nim { display: none; }
}

/* 로그인 전/후 상단 줄 높이를 항상 같게 */
#wg_login { height: 32px; align-items: center; }
#wg_login li { height: 32px; display: flex; align-items: center; }
#wg_login a { display: flex !important; align-items: center; height: 32px; box-sizing: border-box; line-height: 1; padding-top: 0; padding-bottom: 0; }
#wg_login .wg_nick a { padding-top: 0; padding-bottom: 0; }
@media (max-width: 900px) {
    #wg_top .wg_inner { align-items: center; padding-top: 12px; padding-bottom: 12px; }
    #wg_logo img { height: 36px; }
}
@media (max-width: 600px) { #wg_logo img { height: 32px; } }

/* 사이드 로그인 박스: 로그인 / 회원가입 한 줄 */
.wg_lb_row { display: flex; gap: 6px; }
.wg_lb_row .wg_lb_btn, .wg_lb_row .wg_lb_join { flex: 1 1 0; min-width: 0; width: auto; height: 38px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; text-decoration: none; border-radius: 0; margin: 0; padding: 0; }
.wg_lb_row .wg_lb_join { border: 1px solid var(--wg-blue); background: #fff; color: var(--wg-blue); }
.wg_lb_row .wg_lb_join:hover { background: #f4f6fc; }

#container_title .wg_title_link { color: inherit; text-decoration: none; }
#container_title .wg_title_link:hover { color: var(--wg-blue); text-decoration: underline; }

/* 글 보기 제목 크기: 안쪽 .bo_v_tit 에 그누보드 기본 큰 글자가 걸려 있어 직접 지정 */
.wg_view #bo_v_title .bo_v_tit { font-size: 20px !important; line-height: 1.4 !important; font-weight: bold; }
@media (max-width: 900px) { .wg_view #bo_v_title .bo_v_tit { font-size: 17px !important; } }

/* box 제목 영역: 연한 파란 박스 + 왼쪽 굵은 파란 줄 */
#container_title {
  margin: -4px 0 15px !important;
  padding: 13px 18px !important;
  background: #f4f6fc !important;
  border: 1px solid #d5dcef !important;
  border-left: 5px solid var(--wg-blue) !important;
  border-radius: 0 4px 4px 0;
  font-size: 18px !important;
  font-weight: 800;
  line-height: 1.3;
  color: #1f2a5c;
}
@media (max-width: 900px) { #container_title { padding: 11px 14px !important; font-size: 16px !important; margin-bottom: 12px !important; } }

/* box 제목 박스: 글자를 세로 가운데로 (안쪽 span 의 기본 여백 제거) */
#container_title { display: flex !important; align-items: center; height: auto !important; min-height: 0 !important; padding-top: 14px !important; padding-bottom: 14px !important; }
#container_title > span { display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; height: auto !important; line-height: 1.3 !important; font-size: inherit !important; font-weight: inherit !important; }
@media (max-width: 900px) { #container_title { padding-top: 12px !important; padding-bottom: 12px !important; } }

/* 이전글/다음글: 한 줄 정렬 (라벨 | 제목(길면 ... ) | 날짜) */
.wg_view .bo_v_nb li { display: flex !important; align-items: center; gap: 12px; padding: 10px 6px !important; }
.wg_view .bo_v_nb .nb_tit { flex: 0 0 auto !important; width: auto !important; min-width: 44px; padding: 0 !important; white-space: nowrap !important; color: #888; }
.wg_view .bo_v_nb a { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg_view .bo_v_nb .nb_date { flex: 0 0 auto; float: none !important; margin-left: auto; white-space: nowrap; }

/* 모바일 공지 팝업: 화면 왼쪽 끝 기준으로 놓고, 화면 폭을 넘지 않게 (PC는 그대로) */
@media (max-width: 900px) {
  #hd_pop { width: auto !important; margin: 0 !important; }
  #hd_pop .hd_pops { left: 6px !important; max-width: calc(100vw - 12px) !important; }
  #hd_pop .hd_pops_con { max-width: 100% !important; overflow: auto; }
  #hd_pop .hd_pops_con img, #hd_pop .hd_pops_con video { max-width: 100% !important; height: auto !important; }
}

/* 사이드바 로그인: 로그인 유지 체크 */
.wg_lb_keep { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; cursor: pointer; margin: 2px 0 0; }
.wg_lb_keep input { margin: 0; }
