/* ============================================================
 * skin/board/hive_basic/style.css
 * 기본 게시판(목록 · 보기 · 글쓰기 · 댓글) 확정 스타일 v2 (2026-10-02)
 * 기준: md/guides/BOARD_UI_CONTRACT.md, skin/board/hive_event_user/style.css
 *
 * - 회색 묶음 바탕 위 흰 카드, 굵은 테두리·진한 그림자 없음
 * - 입력칸은 회색 채움, 누르면 흰 바탕 + 강조색 2px 테두리
 * - 버튼·필터는 알약(44px 이상), 아이콘은 선 SVG
 * - 값은 바깥 상자(.hbx) style 속성의 CSS 변수(_theme.php)가 빌더 옵션에서 넣는다.
 *   아래 var() 두 번째 값은 변수가 없을 때(예: 다른 스킨이 댓글만 불러 쓸 때)의 v2 기본값.
 * - hive_builder 글쓰기는 이 폼(#hbBoardWrite)을 .hb-write-wrap 안에 넣어 쓴다.
 *   그때는 빌더 바깥 상자가 묶음 바탕을 맡으므로 폼 자체의 묶음 바탕·여백을 끈다(맨 아래).
 * ============================================================ */

/* ---------- 바탕 ---------- */
.hbx {
    --hbx-on: #fff;
    --hbx-group: var(--hbx-group-fb, #f2f2f7);
    box-sizing: border-box;
    width: 100%;
    max-width: calc(var(--hbx-max, 1200px) + var(--hbx-pad, 16px) * 2);
    margin: 0 auto;
    padding: var(--hbx-pad-t, 24px) var(--hbx-pad, 16px) var(--hbx-pad-b, 24px);
    background: var(--hbx-bg, transparent);
    color: var(--hbx-text, #1d1d1f);
    font-family: var(--hbx-font, var(--font-pret, 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif));
    font-size: var(--hbx-body, 14px);
    line-height: var(--hbx-lh, 1.5);
    word-break: keep-all;
    overflow-wrap: anywhere;
}
/* 묶음 바탕은 바탕색·글자색에서 파생(어두운 바탕에서도 맞게) */
@supports (color: color-mix(in srgb, red, blue)) {
    .hbx { --hbx-group: color-mix(in srgb, var(--hbx-text, #1d1d1f) 5%, var(--hbx-bg-solid, #fff)); }
}
/* 강조색 위 글자: 밝은 색이면 검정, 어두운 색이면 흰색 */
@supports (color: oklch(from red l c h)) {
    .hbx, .hb_comment_wrap { --hbx-on: oklch(from var(--hbx-main, #1d1d1f) clamp(0, (0.6 - l) * 1000, 1) 0 0); }
}
.hbx *, .hbx *::before, .hbx *::after,
.hb_comment_wrap *, .hb_comment_wrap *::before, .hb_comment_wrap *::after { box-sizing: border-box; }
.hbx .pret { font-family: inherit; }
.hbx a { color: inherit; text-decoration: none; }
.hbx svg { flex: 0 0 auto; }
.hbx .hbx-b { font-weight: 700; }
.hbx .hbx-sub { color: var(--hbx-tx2, #6e6e73); }
.hbx :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.hb_comment_wrap :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--hbx-main, #1d1d1f); outline-offset: 2px; }
.hbx .sound_only, .hbx .sr_only, .hb_comment_wrap .sound_only, .sr_only {
    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; white-space: nowrap !important;
}

/* ---------- 버튼(알약) ---------- */
.hbx :is(.hb_btn, .hb_btn_sm, .hbv_btn, .hb_action_btn) {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-text, #1d1d1f);
    font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
    cursor: pointer; -webkit-appearance: none; appearance: none;
    transition: background-color .15s ease, filter .15s ease, transform .15s ease;
}
.hbx :is(.hb_btn, .hb_btn_sm, .hbv_btn, .hb_action_btn):hover { background: var(--hbx-soft2, rgba(118,118,128,.2)); }
.hbx :is(.hb_btn, .hb_btn_sm, .hbv_btn, .hb_action_btn):active { transform: scale(.97); }
.hbx :is(.hb_btn, .hb_btn_sm, .hbv_btn, .hb_action_btn):is(.is-primary, .hbv_btn_primary, .primary),
.hbx .hb_status_filter .is-active {
    background: var(--hbx-main, #1d1d1f); color: var(--hbx-on, #fff);
}
.hbx :is(.hb_btn, .hb_btn_sm, .hbv_btn, .hb_action_btn):is(.is-primary, .hbv_btn_primary, .primary):hover { filter: brightness(1.06); }
.hbx :is(.hb_btn, .hbv_btn):is(.is-danger, .hbv_btn_danger) { background: rgba(210,63,49,.1); color: #c4342a; }
.hbx :is(.hb_btn, .hbv_btn):is(.is-danger, .hbv_btn_danger):hover { background: rgba(210,63,49,.16); }
.hbx .hb_btn_sm { min-height: 44px; padding: 0 16px; font-size: 14px; }

/* ---------- 입력칸(회색 채움 → 누르면 흰 바탕 + 강조색 2px) ---------- */
.hbx :is(.hb_input, .hb_select, .hb_order_input),
.hb_comment_wrap :is(.hb_input, .hb_comment_textarea) {
    display: block; width: 100%; min-height: 48px; margin: 0; padding: 11px 14px;
    border: 1px solid transparent; border-radius: 12px; outline: none;
    background: var(--hbx-fill, rgba(118,118,128,.08)); color: var(--hbx-text, #1d1d1f);
    font: inherit; font-size: max(16px, var(--hbx-body, 14px)); line-height: 1.5;
    box-shadow: none; -webkit-appearance: none; appearance: none;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.hbx :is(.hb_input, .hb_select, .hb_order_input)::placeholder,
.hb_comment_wrap :is(.hb_input, .hb_comment_textarea)::placeholder { color: var(--hbx-tx3, #8e8e93); opacity: 1; }
.hbx :is(.hb_input, .hb_select, .hb_order_input):focus,
.hb_comment_wrap :is(.hb_input, .hb_comment_textarea):focus {
    background: #fff; border-color: transparent; box-shadow: 0 0 0 2px var(--hbx-main, #1d1d1f); outline: none;
}
.hbx :is(select.hb_input, .hb_select) {
    padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' stroke='%238e8e93' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center;
}
.hbx textarea.hb_input { min-height: 120px; resize: vertical; }
.hbx .hb_textarea_sm { min-height: 88px; }
.hbx input[type=checkbox], .hbx input[type=radio], .hb_comment_wrap input[type=checkbox] {
    width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--hbx-main, #1d1d1f); cursor: pointer;
}

/* ---------- 페이지 번호(평면 숫자, 현재만 강조색 알약) ---------- */
.hbx .hb_pages { margin-top: 28px; }
.hbx .pg_wrap { display: flex; justify-content: center; margin: 0; clear: both; }
.hbx .pg { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.hbx :is(.pg_page, .pg_current) {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 22px;
    background: transparent; color: var(--hbx-tx2, #6e6e73); font-size: 15px; font-weight: 500; text-decoration: none;
    transition: background-color .15s ease;
}
.hbx .pg_page:hover { background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-text, #1d1d1f); }
.hbx .pg_current { background: var(--hbx-main, #1d1d1f); color: var(--hbx-on, #fff); font-weight: 700; }
.hbx :is(.pg_start, .pg_prev, .pg_next, .pg_end) { position: relative; width: 44px; padding: 0; font-size: 0; color: var(--hbx-tx2, #6e6e73); }
.hbx :is(.pg_start, .pg_prev, .pg_next, .pg_end)::before {
    content: ""; width: 18px; height: 18px; background: currentColor;
    -webkit-mask-image:var(--hbx-pg-ic);-webkit-mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat; mask-image:var(--hbx-pg-ic);mask-position:center;mask-size:contain;mask-repeat:no-repeat;
}
.hbx .pg_prev { --hbx-pg-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E"); }
.hbx .pg_next { --hbx-pg-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E"); }
.hbx .pg_start { --hbx-pg-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 18l-6-6 6-6M7 6v12'/%3E%3C/svg%3E"); }
.hbx .pg_end { --hbx-pg-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18l6-6-6-6M17 6v12'/%3E%3C/svg%3E"); }

/* ============================================================
 * 목록 (#hbBoardEngine)
 * ============================================================ */
.hbx-list .hb_topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hbx-list .hb_topbar_sub { margin-bottom: 16px; }
.hbx-list .hb_top_left, .hbx-list .hb_top_right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.hbx-list .hb_top_left { flex: 1 1 320px; }
.hbx-list .hb_category_wrap { flex: 1 1 100%; min-width: 0; }
.hbx-list .hb_category_wrap .catnav-wrap { margin-bottom: 4px; }
.hbx-list .hb_total { color: var(--hbx-tx2, #6e6e73); font-size: 14px; }
.hbx-list .hb_inline_form { display: inline-flex; margin: 0; }

/* 보기 방식: 세그먼트(회색 트랙 + 흰 선택 알약) */
.hbx-list .hb_view_switch { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--hbx-soft, rgba(118,118,128,.12)); }
.hbx-list .hb_view_btn {
    min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent;
    color: var(--hbx-tx2, #6e6e73); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.hbx-list .hb_view_btn:hover { color: var(--hbx-text, #1d1d1f); }
.hbx-list .hb_view_btn.is-active { background: var(--hbx-card, #fff); color: var(--hbx-text, #1d1d1f); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* 상태 필터(관리자): 알약 */
.hbx-list .hb_status_filter { display: flex; flex-wrap: wrap; gap: 8px; }

/* 검색: 회색 채움 알약 + 돋보기 */
.hbx-list .hb_search_form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.hbx-list .hb_search_form .hb_select { width: auto; min-height: 44px; border-radius: 22px; font-size: 15px; }
.hbx-list .hb_search_form .hb_search_input {
    width: 240px; min-height: 44px; padding-left: 40px; border-radius: 22px; font-size: 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>");
    background-repeat: no-repeat; background-position: left 14px center;
}

/* 묶음 바탕 위 흰 카드 */
.hbx-list .hb_board_box { padding: 12px; border-radius: 20px; background: var(--hbx-group); }
.hbx-list .hb_hidden, .hbx-list .hb_pin_hidden { display: none !important; }

/* 목록형: 흰 카드 한 장 + 왼쪽을 들인 줄 구분선 */
.hbx-list .hb_list_table {
    width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
    border: var(--hbx-card-line, 0 solid transparent); border-radius: var(--hbx-radius, 16px);
    background: var(--hbx-card, #fff); box-shadow: var(--hbx-shadow, 0 1px 2px rgba(0,0,0,.04));
}
.hbx-list .hb_list_table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hbx-list .hb_list_table td { padding: 16px 12px; vertical-align: middle; border: 0; }
.hbx-list .hb_list_table tbody tr + tr td:not(:first-child) { box-shadow: inset 0 1px 0 var(--hbx-line, rgba(60,60,67,.12)); }
.hbx-list .hb_row { transition: background-color .15s ease; }
.hbx-list .hb_row:hover { background: var(--hbx-fill, rgba(118,118,128,.08)); }
.hbx-list .hb_list_num { width: 72px; padding-left: 20px; text-align: center; color: var(--hbx-tx3, #8e8e93); font-size: 14px; font-variant-numeric: tabular-nums; }
.hbx-list .hb_list_chk { width: 52px; padding-right: 0; }
.hbx-list .hb_list_name { width: 140px; padding-right: 20px; text-align: right; color: var(--hbx-tx2, #6e6e73); font-size: 14px; }
.hbx-list .hb_list_subject_inner { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hbx-list .hb_subject {
    display: inline-flex; align-items: center; gap: 6px; min-height: 24px;
    color: var(--hbx-text, #1d1d1f); font-size: var(--hbx-title, 18px); font-weight: var(--hbx-title-w, 600); line-height: 1.4; text-decoration: none;
}
.hbx-list .hb_subject:hover { color: var(--hbx-hover, var(--hbx-main, #1d1d1f)); }
.hbx-list .hb_lock { color: var(--hbx-tx3, #8e8e93); }
.hbx-list .hb_meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--hbx-tx3, #8e8e93); font-size: 13px; }
.hbx-list .hb_meta_ic { display: inline-flex; align-items: center; gap: 4px; }
.hbx-list .hb_badge {
    display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-tx2, #3a3a3c); font-size: 12px; font-weight: 600; line-height: 1.3;
}
.hbx-list .hb_notice_badge { background: var(--hbx-main, #1d1d1f); color: var(--hbx-on, #fff); }
.hbx-list .bo_current { color: var(--hbx-main, #1d1d1f); font-size: 12px; font-weight: 700; }
.hbx-list .bo_notice .hb_subject { font-weight: 700; }

/* 상담 상태(색 + 글자로 함께 표시) */
.hbx-list .hb_status { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.3; background: rgba(118,118,128,.12); color: #3a3a3c; }
.hbx-list .hb_status.is-checking { background: rgba(0,113,227,.12); color: #0058b0; }
.hbx-list .hb_status.is-hold { background: rgba(201,124,0,.14); color: #8a5300; }
.hbx-list .hb_status.is-absent { background: rgba(210,63,49,.12); color: #b42c22; }
.hbx-list .hb_status.is-done { background: rgba(36,138,61,.13); color: #1d6f31; }
.hbx-list .hb_status.is-received { background: rgba(110,74,200,.12); color: #5a3aa8; }
.hbx-list .hb_status.is-talking { background: rgba(0,128,160,.12); color: #006b85; }

/* 관리자 전용 순서·상세 */
.hbx-list .hb_admin_meta { margin-top: 8px; padding-top: 10px; box-shadow: inset 0 1px 0 var(--hbx-line, rgba(60,60,67,.12)); font-size: 13px; }
.hbx-list .hb_order_save_form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.hbx-list .hb_order_input { width: 96px; min-height: 40px; padding: 6px 12px; text-align: center; }
.hbx-list .hb_meta_toggle { min-height: 36px; margin-top: 6px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-tx2, #6e6e73); font: inherit; font-size: 13px; cursor: pointer; }
.hbx-list .hb_meta_detail { display: none; margin-top: 8px; }
.hbx-list .hb_meta_detail.active { display: block; }
.hbx-list .hb_admin_row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; overflow-wrap: anywhere; }
.hbx-list .hb_admin_row a { color: var(--hbx-link, var(--hbx-main, #1d1d1f)); text-decoration: underline; }

/* 빈 목록 */
.hbx-list .hb_empty {
    width: 100%; padding: 56px 20px; border-radius: var(--hbx-radius, 16px); background: var(--hbx-card, #fff);
    color: var(--hbx-tx2, #6e6e73); font-size: 15px; text-align: center;
}
.hbx-list .hb_list_table .hb_empty { padding: 40px 20px; border-radius: 0; }
.hbx-list .hb_list_table td[colspan] { padding: 0; }

/* 썸네일 공통 */
.hbx-list .hb_thumb { position: relative; display: block; width: 100%; overflow: hidden; background: var(--hbx-group); line-height: 0; }
.hbx-list .hb_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s ease; opacity: .001; }
.hbx-list .hb_thumb img.hb_loaded { opacity: 1; }
.hbx-list .hb_noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 160px; color: var(--hbx-tx3, #8e8e93); }

/* 카드형 공통(웹진·이미지·핀터레스트·유튜브) */
.hbx-list :is(.hb_webzine_item, .hb_gallery_item, .hb_pinterest_item, .hb_youtube_item) {
    overflow: hidden; border: var(--hbx-card-line, 0 solid transparent); border-radius: var(--hbx-radius, 16px);
    background: var(--hbx-card, #fff); box-shadow: var(--hbx-shadow, 0 1px 2px rgba(0,0,0,.04));
    transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
    .hbx-list :is(.hb_webzine_item, .hb_gallery_item, .hb_pinterest_item, .hb_youtube_item):hover { transform: translateY(var(--hbx-lift, -2px)) scale(var(--hbx-zoom, 1)); }
    .hbx-list :is(.hb_gallery_item, .hb_pinterest_item, .hb_webzine_item):hover .hb_thumb img { transform: scale(1.03); }
}
.hbx-list .hb_excerpt { margin: 0; color: var(--hbx-tx2, #6e6e73); font-size: var(--hbx-body, 14px); line-height: var(--hbx-lh, 1.5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 웹진형 */
.hbx-list .hb_webzine { display: flex; flex-direction: column; gap: var(--hbx-gap, 16px); }
.hbx-list .hb_webzine_item { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 20px; padding: 16px; align-items: center; }
.hbx-list .hb_webzine_thumb { aspect-ratio: 4 / 3; border-radius: calc(var(--hbx-radius, 16px) - 4px); }
.hbx-list .hb_webzine_info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* 이미지형 */
.hbx-list .hb_gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hbx-gap, 16px); }
.hbx-list .hb_gallery_thumb { aspect-ratio: 1 / 1; }
.hbx-list .hb_gallery_overlay { display: none; }
.hbx-list .hb_gallery_body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }

/* 핀터레스트형 */
.hbx-list .hb_pinterest_wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hbx-gap, 16px); align-items: start; }
.hbx-list .hb_pinterest_body { position: relative; }
.hbx-list .hb_pinterest_body .hb_thumb img { height: auto; }
.hbx-list .hb_pinterest_overlay {
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0) 60%); color: #fff; opacity: 0; transition: opacity .25s ease;
}
.hbx-list .hb_pinterest_item:hover .hb_pinterest_overlay, .hbx-list .hb_pinterest_overlay:focus-visible { opacity: 1; }
.hbx-list .hb_pin_title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.hbx-list .hb_pin_body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.hbx-list .hb_pin_body .hb_meta { flex-direction: column; align-items: flex-start; }
.hbx-list .hb_more_wrap { display: flex; justify-content: center; margin-top: 20px; }

/* 유튜브형 */
.hbx-list .hb_youtube_grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hbx-gap, 16px); }
.hbx-list .hb_youtube_item { cursor: pointer; }
.hbx-list .hb_youtube_thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.hbx-list .hb_youtube_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hbx-list .hb_youtube_play {
    position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
    transform: translate(-50%, -50%); transition: transform .2s ease, background-color .2s ease;
}
.hbx-list .hb_youtube_play svg { margin-left: 3px; }
.hbx-list .hb_youtube_item:hover .hb_youtube_play { background: rgba(0,0,0,.75); transform: translate(-50%, -50%) scale(1.06); }
.hbx-list .hb_youtube_body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.hbx-list .hb_youtube_title { color: var(--hbx-text, #1d1d1f); font-size: 15px; font-weight: 600; line-height: 1.4; }
.hbx-list .hb_youtube_date { color: var(--hbx-tx3, #8e8e93); font-size: 13px; }
.hbx-list .hb_youtube_grid > .hb_empty { grid-column: 1 / -1; }

/* 아래 버튼 줄 */
.hbx-list .hb_bottom_actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.hbx-list .hb_bottom_left, .hbx-list .hb_bottom_right { display: flex; flex-wrap: wrap; gap: 8px; }
.hbx-list .hb_chkall { gap: 8px; }

/* 유튜브 레이어(목록) */
.hb_youtube_modal {
    position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0,0,0,.78); opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.hb_youtube_modal.active { opacity: 1; visibility: visible; }
.hb_youtube_inner { position: relative; width: 100%; max-width: 900px; transform: translateY(24px); transition: transform .35s cubic-bezier(.22,.68,.3,1); }
.hb_youtube_modal.active .hb_youtube_inner { transform: none; }
.hb_youtube_frame_wrap { position: relative; padding-top: 56.25%; overflow: hidden; border-radius: 16px; background: #000; }
.hb_youtube_frame_wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 레이어 닫기(목록·보기 공통) */
:is(.hb_youtube_close, #hbYtModal .hbyt_close) {
    position: absolute; top: -54px; right: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.16); color: #fff; cursor: pointer; transition: background-color .15s ease;
}
:is(.hb_youtube_close, #hbYtModal .hbyt_close):hover { background: rgba(255,255,255,.28); }
:is(.hb_youtube_close, #hbYtModal .hbyt_close):focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ============================================================
 * 보기 (#hbSeoView)
 * ============================================================ */
.hbx-view .hbv_article { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 20px; background: var(--hbx-group); }
.hbx-view .hbv_card, .hbx-view .hbv_attach, .hbx-view .hbv_links {
    border: var(--hbx-card-line, 0 solid transparent); border-radius: var(--hbx-radius, 16px);
    background: var(--hbx-card, #fff); box-shadow: var(--hbx-shadow, 0 1px 2px rgba(0,0,0,.04));
}
.hbx-view .hbv_main { padding: 32px 32px 36px; }
.hbx-view .hbv_header { padding-bottom: 22px; box-shadow: inset 0 -1px 0 var(--hbx-line, rgba(60,60,67,.12)); }
.hbx-view .hbv_kicker {
    display: inline-flex; align-items: center; min-height: 28px; margin-bottom: 12px; padding: 0 12px; border-radius: 999px;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-text, #1d1d1f); font-size: 13px; font-weight: 600;
}
@supports (color: color-mix(in srgb, red, blue)) {
    .hbx-view .hbv_kicker { background: color-mix(in srgb, var(--hbx-main, #1d1d1f) 12%, transparent); color: color-mix(in srgb, var(--hbx-main, #1d1d1f) 62%, #000); }
}
.hbx-view .hbv_title { margin: 0 0 14px; color: var(--hbx-text, #1d1d1f); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.hbx-view .hbv_meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--hbx-tx2, #6e6e73); font-size: 14px; }
.hbx-view .hbv_meta_item { display: inline-flex; align-items: center; gap: 6px; }
.hbx-view .hbv_meta_item svg { width: 15px; height: 15px; stroke-linecap: round; stroke-linejoin: round; color: var(--hbx-tx3, #8e8e93); }

/* 관리자 상담 정보 */
.hbx-view .hbv_admin_panel { margin-top: 18px; overflow: hidden; border-radius: 14px; background: var(--hbx-fill, rgba(118,118,128,.08)); }
.hbx-view .hbv_admin_toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px;
    border: 0; background: transparent; color: var(--hbx-text, #1d1d1f); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.hbx-view .hbv_admin_toggle svg { transition: transform .2s ease; }
.hbx-view .hbv_admin_toggle.is-open svg { transform: rotate(180deg); }
.hbx-view .hbv_admin_body { display: none; padding: 0 12px 12px; }
.hbx-view .hbv_admin_body.is-open { display: block; }
.hbx-view .hbv_admin_grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hbx-view .hbv_admin_item { padding: 12px 14px; border-radius: 12px; background: var(--hbx-card, #fff); }
.hbx-view .hbv_admin_label { display: block; margin-bottom: 2px; color: var(--hbx-tx2, #6e6e73); font-size: 12px; }
.hbx-view .hbv_admin_value { display: block; color: var(--hbx-text, #1d1d1f); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.hbx-view .hbv_admin_link { color: var(--hbx-link, var(--hbx-main, #1d1d1f)); text-decoration: underline; }

/* 유튜브 */
.hbx-view .hbv_video {
    position: relative; width: 100%; margin-top: 24px; padding-top: 56.25%; overflow: hidden;
    border-radius: 14px; background: #000; cursor: pointer;
}
.hbx-view .hbv_video.is-shorts { max-width: 380px; margin-left: auto; margin-right: auto; padding-top: 0; aspect-ratio: 9 / 16; }
.hbx-view .hbv_video_thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hbx-view .hbv_video_play {
    position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; pointer-events: none;
    transform: translate(-50%, -50%); transition: transform .2s ease, background-color .2s ease;
}
.hbx-view .hbv_video_play svg { margin-left: 4px; }
.hbx-view .hbv_video:hover .hbv_video_play { background: rgba(0,0,0,.75); transform: translate(-50%, -50%) scale(1.06); }
.hbx-view .hbv_video_badge {
    position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
    background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none;
}

/* 본문 */
.hbx-view .hbv_body { padding-top: 28px; }
.hbx-view #bo_v_con {
    color: var(--hbx-text, #1d1d1f); font-size: calc(var(--hbx-body, 14px) + 2px); line-height: calc(var(--hbx-lh, 1.5) + .3);
    word-break: keep-all; overflow-wrap: anywhere; overflow: hidden;
}
.hbx-view #bo_v_con img { max-width: 100%; height: auto; margin: 0 auto 16px; border-radius: 12px; display: block; }
.hbx-view #bo_v_con a { color: var(--hbx-link, var(--hbx-main, #1d1d1f)); text-decoration: underline; text-underline-offset: 3px; }
.hbx-view #bo_v_con a:hover { color: var(--hbx-hover, var(--hbx-main, #1d1d1f)); }
.hbx-view #bo_v_con p:last-child { margin-bottom: 0; }
.hbx-view .hbv_signature { margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--hbx-fill, rgba(118,118,128,.08)); color: var(--hbx-tx2, #6e6e73); font-size: 14px; }

/* 첨부 · 링크: 흰 카드 + 왼쪽을 들인 줄 */
.hbx-view .hbv_attach, .hbx-view .hbv_links { padding: 8px 0; }
.hbx-view .hbv_section_title { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 20px 8px; color: var(--hbx-tx2, #6e6e73); font-size: 14px; font-weight: 600; }
.hbx-view .hbv_section_title svg { stroke-linecap: round; stroke-linejoin: round; }
.hbx-view :is(.hbv_file_item, .hbv_link_item) {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 20px;
    color: var(--hbx-text, #1d1d1f); text-decoration: none; transition: background-color .15s ease;
}
.hbx-view :is(.hbv_file_item, .hbv_link_item) + :is(.hbv_file_item, .hbv_link_item)::before {
    content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--hbx-line, rgba(60,60,67,.12));
}
.hbx-view :is(.hbv_file_item, .hbv_link_item):hover { background: var(--hbx-fill, rgba(118,118,128,.08)); }
.hbx-view .hbv_row_ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; color: var(--hbx-main, #1d1d1f); }
.hbx-view :is(.hbv_file_name, .hbv_link_name) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.hbx-view :is(.hbv_file_meta, .hbv_link_meta) { flex: 0 0 auto; color: var(--hbx-tx3, #8e8e93); font-size: 13px; }

/* 버튼 줄 */
.hbx-view .hbv_actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.hbx-view .hbv_btn_group { display: flex; flex-wrap: wrap; gap: 8px; }
.hbx-view .hbv_btn:not(.hbv_btn_primary), .hbx-view .hbv_btn:not(.hbv_btn_primary):hover { background: var(--hbx-card, #fff); }
.hbx-view .hbv_btn:hover { filter: brightness(.97); }
.hbx-view .hbv_btn.hbv_btn_primary:hover { filter: brightness(1.06); }
.hbx-view .hbv_comment { margin: 0; }

/* 유튜브 레이어(보기) */
#hbYtModal {
    position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0,0,0,.82); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
#hbYtModal.active { opacity: 1; visibility: visible; }
#hbYtModal .hbyt_inner { position: relative; width: 100%; max-width: 960px; transform: translateY(24px); transition: transform .35s cubic-bezier(.22,.68,.3,1); }
#hbYtModal.active .hbyt_inner { transform: none; }
#hbYtModal .hbyt_inner.is-shorts { max-width: 420px; }
#hbYtModal .hbyt_frame { position: relative; padding-top: 56.25%; overflow: hidden; border-radius: 16px; background: #000; }
#hbYtModal .hbyt_inner.is-shorts .hbyt_frame { padding-top: 0; aspect-ratio: 9 / 16; }
#hbYtModal .hbyt_frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
 * 댓글 (#bo_vc) : 보기 화면 변수를 이어받고, 없으면 v2 기본값
 * ============================================================ */
.hb_comment_wrap { margin: 0; padding: 20px; border-radius: var(--hbx-radius, 16px); background: var(--hbx-card, #fff); box-shadow: var(--hbx-shadow, 0 1px 2px rgba(0,0,0,.04)); color: var(--hbx-text, #1d1d1f); }
.hb_comment_head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hb_comment_title { margin: 0; color: var(--hbx-text, #1d1d1f); font-size: 18px; font-weight: 700; line-height: 1.4; }
.hb_comment_count { margin-left: 4px; color: var(--hbx-main, #1d1d1f); }
.hb_comment_list { margin: 0; padding: 0; list-style: none; }
.hb_comment_item { position: relative; display: flex; gap: 12px; padding: 16px 0; }
.hb_comment_item + .hb_comment_item::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 1px; background: var(--hbx-line, rgba(60,60,67,.12)); }
.hb_comment_item.is-reply { padding-left: 28px; }
.hb_comment_avatar {
    display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-tx2, #6e6e73); font-size: 15px; font-weight: 700;
}
.hb_comment_main { flex: 1 1 auto; min-width: 0; }
.hb_comment_top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.hb_comment_name { color: var(--hbx-text, #1d1d1f); font-size: 15px; font-weight: 700; }
.hb_comment_date { color: var(--hbx-tx3, #8e8e93); font-size: 13px; }
.hb_comment_text { color: var(--hbx-text, #1d1d1f); font-size: 15px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.hb_comment_actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 -10px; }
.hb_cmt_btn {
    display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px; border-radius: 22px;
    color: var(--hbx-tx2, #6e6e73); font-size: 13px; font-weight: 600; text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.hb_cmt_btn:hover { background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-text, #1d1d1f); }
.hb_cmt_btn.is-danger:hover { background: rgba(210,63,49,.1); color: #c4342a; }
.hb_comment_empty { margin: 0; padding: 28px 0 12px; color: var(--hbx-tx2, #6e6e73); font-size: 15px; text-align: center; }

.hb_comment_write { margin-top: 12px; padding-top: 16px; box-shadow: inset 0 1px 0 var(--hbx-line, rgba(60,60,67,.12)); }
.hb_comment_slot .hb_comment_write { margin-top: 10px; padding: 14px; border-radius: 14px; background: var(--hbx-fill, rgba(118,118,128,.08)); box-shadow: none; }
.hb_comment_write form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.hb_comment_wrap .hb_comment_textarea { min-height: 112px; resize: vertical; }
.hb_comment_guest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hb_comment_captcha:empty { display: none; }
.hb_comment_captcha input[type=text] { min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--hbx-fill, rgba(118,118,128,.08)); font-size: 16px; }
.hb_comment_foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.hb_secret_wrap {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-text, #1d1d1f); font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.hb_secret_wrap:has(input:checked) { background: var(--hbx-main, #1d1d1f); color: var(--hbx-on, #fff); }
.hb_secret_wrap input { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.hb_secret_wrap { position: relative; }
.hb_secret_wrap:focus-within { outline: 2px solid var(--hbx-main, #1d1d1f); outline-offset: 2px; }
/* 댓글 자동등록방지(그누보드 kcaptcha): 둥근 숫자 그림 + 회색 입력칸 + 원형 새로고침 */
.hb_comment_captcha #captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 0; border: 0; }
.hb_comment_captcha #captcha legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hb_comment_captcha #captcha #captcha_img { display: block; height: 44px; width: auto; border: 0; border-radius: 12px; }
/* 그누보드 기본 .required 의 빨간 필수 그림(!important)은 이 칸에서만 끈다. 필수 여부는 required 속성과 안내문으로 전달 */
.hb_comment_captcha #captcha #captcha_key.required { background-image: none !important; }
.hb_comment_captcha #captcha #captcha_key { width: 120px; min-height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 12px; background: var(--hbx-fill, rgba(118,118,128,.08)); background-image: none; color: var(--hbx-text, #1d1d1f); font-size: 16px; text-align: center; letter-spacing: .1em; }
.hb_comment_captcha #captcha #captcha_key:focus { outline: none; box-shadow: 0 0 0 2px var(--hbx-main, #1d1d1f); }
.hb_comment_captcha #captcha #captcha_reload { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--hbx-soft, rgba(118,118,128,.12)) center / 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a3a3c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 5.7'/%3E%3Cpath d='M20 4v7h-7'/%3E%3C/svg%3E"); color: transparent; font-size: 0; cursor: pointer; }
.hb_comment_captcha #captcha #captcha_reload span { display: none; }
.hb_comment_captcha #captcha #captcha_reload:focus-visible { outline: 2px solid var(--hbx-main, #1d1d1f); outline-offset: 2px; }
.hb_comment_captcha #captcha #captcha_info { flex-basis: 100%; color: var(--hbx-tx2, #6e6e73); font-size: 12.5px; }
.hb_comment_btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 140px; min-height: 48px; padding: 0 24px;
    border: 0; border-radius: 999px; background: var(--hbx-main, #1d1d1f); color: var(--hbx-on, #fff);
    font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: filter .15s ease, transform .15s ease;
}
.hb_comment_btn:hover { filter: brightness(1.06); }
.hb_comment_btn:active { transform: scale(.97); }
.hb_comment_btn:disabled { opacity: .6; cursor: default; }

/* ============================================================
 * 글쓰기 (#hbBoardWrite)
 * ============================================================ */
.hbx-write #fwrite { max-width: 100%; margin: 0 auto; padding: 28px; border-radius: 20px; background: var(--hbx-group); }
.hbx-write .hb_head { margin: 0 0 16px; padding: 0 4px; }
.hbx-write .hb_title { margin: 0; color: var(--hbx-text, #1d1d1f); font-size: calc(var(--hbx-title, 18px) + 4px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.hbx-write .hb_card {
    width: 100%; margin: 0 0 12px; padding: 20px;
    border: var(--hbx-card-line, 0 solid transparent); border-radius: var(--hbx-radius, 16px);
    background: var(--hbx-card, #fff); box-shadow: var(--hbx-shadow, 0 1px 2px rgba(0,0,0,.04));
}
.hbx-write .hb_grid { display: grid; gap: 12px; margin: 0 0 12px; }
.hbx-write .hb_grid .hb_card { margin: 0; }
.hbx-write .hb_grid_2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hbx-write .hb_grid_3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hbx-write .hb_grid:empty { display: none; }
.hbx-write .hb_label { display: block; margin: 0 0 10px; color: var(--hbx-text, #1d1d1f); font-size: 15px; font-weight: 600; line-height: 1.4; }
.hbx-write .hb_help { display: block; margin: 10px 0 0; color: var(--hbx-tx2, #6e6e73); font-size: 13px; line-height: 1.6; }
.hbx-write .hb_upload_grid { margin-top: 14px; }
.hbx-write .hb_label + .hb_help { margin-top: -4px; }

/* 옵션: 알약 체크 */
.hbx-write .hb_checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hbx-write .hb_check_item {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-text, #1d1d1f); font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.hbx-write .hb_check_item:has(input:checked) { background: var(--hbx-main, #1d1d1f); color: var(--hbx-on, #fff); }
.hbx-write .hb_check_item:has(input:checked) input { accent-color: var(--hbx-on, #fff); }

/* 사진 올리기: 테두리 없는 회색 면 + 선 아이콘, 칸 수 = 첨부 개수(최대 3) */
.hbx-write .hb_upload_grid { display: grid; grid-template-columns: repeat(var(--hbx-up-cols, 3), minmax(0, 1fr)); gap: 12px; }
.hbx-write .hb_upload_item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hbx-write .hb_dropzone {
    position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 280px; overflow: hidden; border: 0; border-radius: 14px;
    background: var(--hbx-fill, rgba(118,118,128,.08)); cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease;
}
.hbx-write .hb_dropzone:hover, .hbx-write .hb_dropzone.is-dragover { background: rgba(118,118,128,.14); box-shadow: inset 0 0 0 2px var(--hbx-main, #1d1d1f); }
.hbx-write .hb_file_input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hbx-write .hb_preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hbx-write .hb_preview_img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hbx-write .hb_preview_empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; padding: 16px; text-align: center; }
.hbx-write .hb_preview_icon { display: inline-flex; color: var(--hbx-tx3, #8e8e93); }
.hbx-write .hb_preview_title { color: var(--hbx-text, #1d1d1f); font-size: 15px; font-weight: 600; }
.hbx-write .hb_preview_sub { color: var(--hbx-tx2, #6e6e73); font-size: 13px; }
.hbx-write .hb_file_delete {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
    background: var(--hbx-soft, rgba(118,118,128,.12)); color: var(--hbx-tx2, #6e6e73); font-size: 13px; cursor: pointer; overflow-wrap: anywhere;
}
.hbx-write .hb_file_delete:has(input:checked) { background: rgba(210,63,49,.1); color: #c4342a; }

/* 에디터 영역 */
.hbx-write .wr_content { min-width: 0; }
.hbx-write #char_count_desc, .hbx-write #char_count_wrap { margin: 8px 0; font-size: 13px; }

/* 수식 보안 확인 */
.hbx-write .hb_math_captcha_box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hbx-write .hb_math_captcha_label { color: var(--hbx-tx2, #6e6e73); font-size: 14px; font-weight: 600; }
.hbx-write .hb_math_captcha_eq { color: var(--hbx-text, #1d1d1f); font-size: 18px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.hbx-write .hb_math_captcha_input { width: 120px; text-align: center; }

/* 아래 버튼: 취소 회색 알약, 등록 강조색 알약 */
.hbx-write .hb_btn_wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.hbx-write .hb_btn { min-width: 140px; min-height: 52px; padding: 0 28px; font-size: 16px; }
.hbx-write a.hb_btn, .hbx-write a.hb_btn:hover { background: var(--hbx-card, #fff); }
.hbx-write a.hb_btn:hover { filter: brightness(.97); }

/* hive_builder 글쓰기(.hb-write-wrap) 안: 빌더 상자가 묶음 바탕·여백을 맡는다 */
.hb-write-wrap .hbx-write { margin-top: 0; margin-bottom: 0; }
.hb-write-wrap .hbx-write #fwrite { padding: 0; border-radius: 0; background: transparent; }

/* ============================================================
 * 반응형 (휴대폰 좌우 16px, 375px 가로 넘침 없음)
 * ============================================================ */
@media (max-width: 1100px) {
    .hbx-list :is(.hb_gallery, .hb_pinterest_wrap, .hb_youtube_grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .hbx-list :is(.hb_gallery, .hb_pinterest_wrap, .hb_youtube_grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hbx-list .hb_webzine_item { grid-template-columns: minmax(0, 1fr); }
    .hbx-write .hb_grid_3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .hbx { padding-left: min(var(--hbx-pad, 16px), 16px); padding-right: min(var(--hbx-pad, 16px), 16px); }
    .hbx-list .hb_topbar { align-items: stretch; }
    .hbx-list .hb_top_left, .hbx-list .hb_top_right { flex: 1 1 100%; }
    .hbx-list .hb_view_switch { width: 100%; justify-content: space-between; }
    .hbx-list .hb_view_btn { flex: 1 1 auto; padding: 0 10px; }
    .hbx-list .hb_search_form { width: 100%; }
    .hbx-list .hb_search_form .hb_select { flex: 0 0 auto; max-width: 42%; }
    .hbx-list .hb_search_form .hb_search_input { flex: 1 1 140px; width: auto; min-width: 0; }
    .hbx-list .hb_search_form .hb_btn_sm { flex: 1 1 100%; }
    .hbx-list .hb_board_box { padding: 8px; border-radius: 16px; }

    /* 목록형: 행을 쌓는 카드 줄로 */
    .hbx-list .hb_list_table, .hbx-list .hb_list_table tbody { display: block; width: 100%; }
    .hbx-list .hb_list_table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px 16px; }
    .hbx-list .hb_list_table tbody tr + tr { box-shadow: inset 0 1px 0 var(--hbx-line, rgba(60,60,67,.12)); }
    .hbx-list .hb_list_table tbody tr + tr td:not(:first-child) { box-shadow: none; }
    .hbx-list .hb_list_table td { display: block; width: auto; padding: 0; text-align: left; }
    .hbx-list .hb_list_chk { order: 0; }
    .hbx-list .hb_list_no { order: 0; width: auto; padding: 0; }
    .hbx-list .hb_list_no:not(:has(.hb_badge, .bo_current)) { display: none; }
    .hbx-list .hb_list_subject { order: 1; flex: 1 1 100%; min-width: 0; }
    .hbx-list .hb_list_name { order: 2; width: auto; padding: 0; font-size: 13px; }
    .hbx-list .hb_list_table td[colspan] { flex: 1 1 100%; }
    .hbx-list .hb_list_table tr:has(td[colspan]) { padding: 0; }

    .hbx-list .hb_bottom_actions { flex-direction: column; align-items: stretch; }
    .hbx-list .hb_bottom_left:empty { display: none; }
    .hbx-list .hb_bottom_right { justify-content: flex-end; }

    .hbx-view .hbv_article { padding: 8px; border-radius: 16px; gap: 8px; }
    .hbx-view .hbv_main { padding: 22px 18px 26px; }
    .hbx-view .hbv_admin_grid { grid-template-columns: minmax(0, 1fr); }
    .hbx-view .hbv_actions { flex-direction: column; align-items: stretch; }
    .hbx-view .hbv_btn_group { width: 100%; }
    .hbx-view .hbv_btn_group .hbv_btn { flex: 1 1 0; padding: 0 12px; }
    .hbx-view :is(.hbv_file_item, .hbv_link_item) { padding: 10px 16px; }
    .hbx-view .hbv_section_title { padding: 12px 16px 8px; }

    .hb_comment_wrap { padding: 16px; }
    .hb_comment_guest { grid-template-columns: minmax(0, 1fr); }
    .hb_comment_item.is-reply { padding-left: 16px; }
    .hb_comment_foot { flex-direction: column; align-items: stretch; }
    .hb_comment_foot .hb_secret_wrap { align-self: flex-start; }
    .hb_comment_btn { width: 100%; }

    .hbx-write #fwrite { padding: 16px; border-radius: 16px; }
    .hbx-write .hb_card { padding: 16px; }
    .hbx-write .hb_grid_2, .hbx-write .hb_grid_3 { grid-template-columns: minmax(0, 1fr); }
    .hbx-write .hb_upload_grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .hbx-write .hb_btn_wrap { flex-direction: column; }
    .hbx-write .hb_btn { width: 100%; }
}
@media (max-width: 420px) {
    .hbx-list :is(.hb_gallery, .hb_pinterest_wrap, .hb_youtube_grid) { grid-template-columns: minmax(0, 1fr); }
    .hbx-write .hb_upload_grid { grid-template-columns: minmax(0, 1fr); }
    .hbx-list .hb_bottom_right > * { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .hbx *, .hbx *::before, .hb_youtube_modal, .hb_youtube_inner, #hbYtModal, #hbYtModal .hbyt_inner, .hb_comment_wrap * {
        transition: none !important; animation: none !important;
    }
}
