/* =====================================================================
   홍허브 — 화면 (앞머리 hb-)
   배치: 1280px~  메뉴 232 | 본문 | 오른쪽(정보·이야기) 340
         900~1279  메뉴 | 본문  · 이야기는 💬 단추로 여는 서랍
         ~899      본문만 · 메뉴도 서랍
         AI 도우미: 1700px~ 오른쪽 칸 옆에 붙음, 그보다 좁으면 오른쪽 칸 자리를 대신(1280~) 또는 서랍
   ===================================================================== */
:root {
  --top: 56px; --side: 232px; --right: 340px; --ai: 400px;
  --r: 10px; --r-s: 7px;
  --font: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'D2Coding', Consolas, monospace;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1216; --bg2: #141820; --card: #171b23; --card2: #1d222c; --hover: #232936;
  --line: #2a303c; --line2: #353c4a;
  --ink: #e8ebf1; --ink2: #b8bfcc; --ink3: #8a93a3;
  --pri: #3fb68b; --pri-ink: #06140e; --pri-soft: rgba(63, 182, 139, .14);
  --link: #6cb6ff; --ok: #3fb950; --ok-soft: rgba(63, 185, 80, .14); --bad: #f0645c; --bad-soft: rgba(240, 100, 92, .14);
  --warn: #d6a23a; --warn-soft: rgba(214, 162, 58, .15); --done: #a371f7; --done-soft: rgba(163, 113, 247, .15);
  --add: rgba(46, 160, 67, .16); --add2: rgba(46, 160, 67, .38); --del: rgba(248, 81, 73, .14); --del2: rgba(248, 81, 73, .36);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --t-kw: #ff7b72; --t-str: #a5d6ff; --t-num: #79c0ff; --t-com: #8b949e; --t-fn: #d2a8ff; --t-type: #ffa657; --t-key: #7ee787;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f7f9; --bg2: #eef0f3; --card: #ffffff; --card2: #f6f8fa; --hover: #eef1f5;
  --line: #dfe3e8; --line2: #cdd3da;
  --ink: #1d232b; --ink2: #47505c; --ink3: #6b7480;
  --pri: #23795f; --pri-ink: #fff; --pri-soft: rgba(35, 121, 95, .1);
  --link: #0b63c9; --ok: #1a7f37; --ok-soft: rgba(26, 127, 55, .1); --bad: #cf222e; --bad-soft: rgba(207, 34, 46, .08);
  --warn: #9a6700; --warn-soft: rgba(212, 167, 44, .16); --done: #8250df; --done-soft: rgba(130, 80, 223, .1);
  --add: #e6ffec; --add2: #abf2bc; --del: #ffebe9; --del2: #ffc1bc;
  --shadow: 0 10px 30px rgba(20, 30, 50, .14);
  --t-kw: #cf222e; --t-str: #0a3069; --t-num: #0550ae; --t-com: #6e7781; --t-fn: #8250df; --t-type: #953800; --t-key: #116329;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
[hidden] { display: none !important; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink3); background: var(--card2); }
small { font-size: .85em; }
.hb-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.hb-ic-s { width: 13px; height: 13px; vertical-align: -2px; }
.hb-ic-dir { color: var(--link); }

/* ---------- 머리띠 ---------- */
.hb-top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
body.hb-out .hb-top, body.hb-out .hb-shell, body.hb-out .hb-talk-fab { display: none; }
.hb-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 16px; white-space: nowrap; }
.hb-brand:hover { text-decoration: none; }
.hb-logo { display: inline-flex; width: 28px; height: 28px; }
.hb-logo svg { width: 100%; height: 100%; }
.hb-search { flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink3); }
.hb-search:focus-within { border-color: var(--link); }
.hb-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.hb-top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hb-me { display: flex; align-items: center; gap: 6px; padding-left: 4px; }
.hb-me-n { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-icon-btn.hb-menu-btn { display: none; }
.hb-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg2); }
#hb-bell { position: relative; }
.hb-ai-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-weight: 600; white-space: nowrap; }
.hb-ai-btn:hover { border-color: var(--pri); }
.hb-ai-btn[aria-pressed='true'] { background: var(--pri); border-color: var(--pri); color: var(--pri-ink); }

/* ---------- 틀 ---------- */
.hb-shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--right); min-height: calc(100vh - var(--top)); }
.hb-side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg2); scrollbar-width: thin; }
.hb-side-in { padding: 12px 10px 20px; }
.hb-main { min-width: 0; padding: 22px 28px 80px; }
.hb-right { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg2); min-height: 0; }
.hb-loading { padding: 40px; color: var(--ink3); text-align: center; }

/* 메뉴 */
.hb-nav-group { margin-bottom: 14px; }
.hb-nav-h { margin: 0 0 4px; padding: 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-nav-repo > .hb-nav-h:first-child { font-size: 13px; color: var(--ink); padding-top: 4px; }
.hb-nav-sub { margin-top: 10px; }
.hb-nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink2); white-space: nowrap; }
.hb-nav span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.hb-nav:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.hb-nav[aria-current='page'] { background: var(--pri-soft); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--pri); }
.hb-nav[aria-current='page'] .hb-ic { color: var(--pri); }
.hb-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; text-align: center; color: var(--ink2); }
.hb-count:empty { display: none; }
.hb-side-foot { margin: 16px 10px 0; font-size: 12px; color: var(--ink3); }

/* 오른쪽: 정보 */
.hb-info { flex: none; border-bottom: 1px solid var(--line); }
.hb-about { padding: 12px 16px; }
.hb-about summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.hb-about summary::-webkit-details-marker { display: none; }
.hb-about summary::after { content: '▾'; margin-left: auto; color: var(--ink3); }
.hb-about:not([open]) summary::after { content: '▸'; }
.hb-about p { margin: 8px 0; }
.hb-about-act { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.hb-site { word-break: break-all; }
.hb-topics { display: flex; flex-wrap: wrap; gap: 4px; }
.hb-topic { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--pri-soft); color: var(--pri); font-size: 12px; font-weight: 600; }

/* ---------- 이야기 칸 ---------- */
.hb-talk { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hb-talk-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.hb-talk-h h2 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hb-talk-x { margin-left: auto; }
.hb-icon-btn.hb-talk-x { display: none; }
.hb-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); margin-left: auto; }
.hb-seg button { position: relative; border: 0; background: none; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; cursor: pointer; color: var(--ink2); white-space: nowrap; }
.hb-seg button[aria-selected='true'] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.hb-seg button:disabled { opacity: .45; cursor: default; }
.hb-new-dot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); }
.hb-talk-f { display: flex; gap: 4px; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
.hb-talk-f button { flex: none; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; color: var(--ink2); }
.hb-talk-f button[aria-pressed='true'] { border-color: var(--pri); color: var(--ink); background: var(--pri-soft); }
.hb-talk-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 4px 10px 10px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.hb-tk { padding: 9px 8px; border-radius: 8px; }
.hb-tk:hover { background: var(--hover); }
.hb-tk-idea { box-shadow: inset 2px 0 0 #e3b341; }
.hb-tk-issue { box-shadow: inset 2px 0 0 var(--bad); }
.hb-tk-pin { background: var(--pri-soft); }
.hb-tk-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hb-tk-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; font-size: 13px; }
.hb-tk-kind { font-size: 13px; }
.hb-tk-menu { margin-left: auto; position: relative; }
.hb-tk-menu summary { list-style: none; opacity: .55; }
.hb-tk-menu summary::-webkit-details-marker { display: none; }
.hb-tk:hover .hb-tk-menu summary, .hb-tk-menu[open] summary { opacity: 1; }
.hb-tk-body { margin: 4px 0 2px 28px; font-size: 13.5px; color: var(--ink); white-space: normal; }
.hb-tk-foot { display: flex; align-items: center; gap: 8px; margin-left: 28px; }
.hb-tk-foot .hb-react { margin: 0; }
.hb-tk > p { margin: 4px 0 0 28px; }
.hb-tk-reps { list-style: none; margin: 4px 0 0 28px; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.hb-tk-rep { padding: 5px 6px; }
.hb-tk-rep .hb-tk-body { margin-left: 24px; }
.hb-tk-rep .hb-icon-btn { margin-left: auto; opacity: .5; }
.hb-tk-sec { list-style: none; padding: 8px 8px 2px; font-size: 11.5px; font-weight: 700; color: var(--ink3); }
.hb-at { color: var(--link); font-weight: 600; }
.hb-talk-empty { list-style: none; text-align: center; padding: 30px 14px; color: var(--ink3); }
.hb-talk-empty .hb-ic { width: 28px; height: 28px; color: #e3b341; }
.hb-talk-empty b { display: block; margin: 8px 0 4px; color: var(--ink); }
.hb-talk-empty p { margin: 0; font-size: 13px; }
.hb-talk-new { flex: none; padding: 8px 12px 12px; border-top: 1px solid var(--line); background: var(--bg2); }
.hb-talk-reply { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 6px; margin-bottom: 6px; border-radius: 6px; background: var(--card2); overflow: hidden; white-space: nowrap; }
.hb-talk-reply .hb-muted { overflow: hidden; text-overflow: ellipsis; }
.hb-talk-reply button { margin-left: auto; }
.hb-talk-kind { display: flex; gap: 4px; margin-bottom: 6px; }
.hb-talk-kind button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 3px 4px; font-size: 12px; cursor: pointer; color: var(--ink2); white-space: nowrap; }
.hb-talk-kind button[aria-checked='true'] { border-color: var(--pri); color: var(--ink); background: var(--pri-soft); font-weight: 600; }
.hb-talk-new textarea { width: 100%; resize: none; min-height: 44px; max-height: 180px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); line-height: 1.45; }
.hb-talk-new textarea:focus { outline: none; border-color: var(--pri); }
.hb-talk-send { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.hb-talk-send .hb-btn { margin-left: auto; }
.hb-talk-fab { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: none; align-items: center; gap: 6px; height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--pri); color: var(--pri-ink); font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
.hb-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; }

/* ---------- 부품 ---------- */
.hb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--line2); background: var(--card2); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.hb-btn:hover { background: var(--hover); border-color: var(--ink3); }
.hb-btn:disabled { opacity: .55; cursor: default; }
.hb-btn-sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.hb-btn-pri { background: var(--pri); border-color: var(--pri); color: var(--pri-ink); }
.hb-btn-pri:hover { background: var(--pri); filter: brightness(1.08); border-color: var(--pri); }
.hb-btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.hb-btn-ok:hover { background: var(--ok); filter: brightness(1.08); }
.hb-btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.hb-btn-danger:hover { background: var(--bad); filter: brightness(1.08); }
.hb-btn[aria-pressed='true'] { border-color: var(--pri); color: var(--pri); }
.hb-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 7px; background: none; color: var(--ink2); cursor: pointer; flex: none; position: relative; }
.hb-icon-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.hb-icon-sm { width: 26px; height: 26px; }
.hb-icon-sm .hb-ic { width: 14px; height: 14px; }
.hb-link { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font: inherit; text-align: left; }
.hb-link:hover { text-decoration: underline; }
.hb-danger { color: var(--bad) !important; }
.hb-muted { color: var(--ink3); }
.hb-small { font-size: 12.5px; }
.hb-mono { font-family: var(--mono); font-size: .92em; }
.hb-grow { flex: 1; min-width: 0; }
.hb-center { text-align: center; }
.hb-nowrap { white-space: nowrap; }
.hb-pad { padding: 14px 16px; }
.hb-ok-t { color: var(--ok); font-weight: 600; }
.hb-bad-t { color: var(--bad); font-weight: 600; }
.hb-warn-t { color: var(--warn); font-weight: 600; }
.hb-h1 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hb-h1 .hb-ic { width: 20px; height: 20px; color: var(--ink3); }
.hb-h2 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.hb-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--pri); letter-spacing: .03em; }
.hb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hb-bar .hb-h1 { margin: 0; }
.hb-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hb-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; min-width: 0; }
.hb-card-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hb-card-h h2 { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.hb-card-h + .hb-rows > li:first-child { border-top: 0; }
.hb-rows { list-style: none; margin: 0; padding: 0; }
.hb-rows > li { border-top: 1px solid var(--line); }
.hb-rows > li:first-child { border-top: 0; }
.hb-av { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: hsl(var(--h) 45% 42%); color: #fff; font-weight: 700; vertical-align: middle; line-height: 1; }
.hb-tag { display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line2); font-size: 11.5px; font-weight: 600; color: var(--ink2); white-space: nowrap; vertical-align: middle; }
.hb-tag-ok { border-color: var(--ok); color: var(--ok); }
.hb-tag-bad { border-color: var(--bad); color: var(--bad); }
.hb-label { --c: #8b949e; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; color: color-mix(in srgb, var(--c) 70%, var(--ink)); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.hb-state { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; flex: none; }
.hb-st-ok { background: var(--ok); color: #fff; }
.hb-st-done { background: var(--done); color: #fff; }
.hb-st-bad { background: var(--bad); color: #fff; }
.hb-st-draft { background: var(--ink3); color: var(--bg); }
.hb-irow .hb-state { padding: 0; background: none; font-size: 0; }
.hb-irow .hb-state .hb-ic { width: 17px; height: 17px; }
.hb-irow .hb-st-ok { color: var(--ok); } .hb-irow .hb-st-done { color: var(--done); } .hb-irow .hb-st-bad { color: var(--bad); } .hb-irow .hb-st-draft { color: var(--ink3); }
.hb-empty { text-align: center; padding: 44px 20px; color: var(--ink2); }
.hb-empty > .hb-ic { width: 34px; height: 34px; color: var(--ink3); }
.hb-empty h2, .hb-empty h3 { margin: 10px 0 6px; font-size: 17px; color: var(--ink); }
.hb-empty p { max-width: 460px; margin: 0 auto 14px; }
.hb-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card2); margin: 0 0 12px; }
.hb-note-ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: var(--ok-soft); }
.hb-note-warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: var(--warn-soft); }
.hb-note-btn { width: 100%; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.hb-meter { height: 6px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 4px; }
.hb-meter i { display: block; height: 100%; background: var(--ok); }
.hb-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); }
.hb-toast.hb-toast-err, .hb-toast[data-kind='err'] { background: var(--bad); color: #fff; }
.hb-dim { position: fixed; inset: var(--top) 0 0 0; z-index: 48; background: rgba(0, 0, 0, .45); }
.hb-skel { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--card2), var(--hover), var(--card2)); background-size: 200% 100%; animation: hb-sk 1.2s infinite; }
@keyframes hb-sk { to { background-position: -200% 0; } }

/* 입력 */
.hb-form { padding: 16px 18px; }
.hb-form > .hb-h2 { margin-bottom: 12px; }
.hb-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.hb-field > span { font-size: 13px; font-weight: 600; color: var(--ink2); }
.hb-field > span small { font-weight: 400; color: var(--ink3); }
.hb-field input:not([type=checkbox]):not([type=radio]):not([type=color]), .hb-field textarea, .hb-select, .hb-filter input, .hb-modal input:not([type=checkbox]):not([type=radio]):not([type=color]), .hb-modal textarea, .hb-gfile input, .hb-inline-ed input, .hb-inline-ed textarea, .hb-finder-q, .hb-path-in, .hb-reply-f textarea, .hb-lform textarea {
  width: 100%; min-height: 36px; padding: 7px 10px; border-radius: var(--r-s); border: 1px solid var(--line2); background: var(--bg); color: var(--ink); }
.hb-field input:focus, .hb-field textarea:focus, .hb-select:focus, .hb-filter input:focus, .hb-modal input:focus, .hb-modal textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 22%, transparent); }
.hb-field input[type=color] { width: 60px; height: 36px; padding: 2px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); }
.hb-field-sm { max-width: 220px; }
.hb-field-ta textarea, textarea { resize: vertical; }
.hb-select { width: auto; min-width: 120px; padding-right: 28px; }
.hb-check { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; cursor: pointer; }
.hb-check input { width: 16px; height: 16px; accent-color: var(--pri); }
.hb-radio { display: flex; flex-direction: column; gap: 6px; }
.hb-radio label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.hb-radio label:has(input:checked) { border-color: var(--pri); background: var(--pri-soft); }
.hb-pick { list-style: none; margin: 0 0 10px; padding: 0; max-height: 300px; overflow-y: auto; }
.hb-pick li { padding: 2px 0; }
.hb-pick .hb-check { margin: 0; padding: 6px 4px; border-radius: 6px; }
.hb-pick .hb-check:hover { background: var(--hover); }
.hb-new-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.hb-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.hb-filter input[type=search] { flex: 1; min-width: 180px; width: auto; }
.hb-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.hb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink2); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.hb-chip:hover { text-decoration: none; border-color: var(--ink3); }
.hb-chip[aria-pressed='true'], .hb-chip[aria-current='true'], .hb-chip.on { border-color: var(--pri); background: var(--pri-soft); color: var(--ink); font-weight: 600; }

/* 편집기 */
.hb-editor { border: 1px solid var(--line2); border-radius: var(--r-s); background: var(--bg); margin-bottom: 12px; overflow: hidden; }
.hb-editor:focus-within { border-color: var(--link); }
.hb-ed-tabs { display: flex; gap: 2px; padding: 4px 6px 0; background: var(--card2); border-bottom: 1px solid var(--line); }
.hb-ed-tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 6px 6px 0 0; cursor: pointer; color: var(--ink2); font-size: 13px; }
.hb-ed-tabs button[aria-pressed='true'] { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 var(--bg); }
.hb-editor textarea { display: block; width: 100%; border: 0; padding: 10px 12px; background: none; color: var(--ink); min-height: 110px; outline: none; line-height: 1.55; }
.hb-ed-prev { padding: 12px 14px; min-height: 110px; }
.hb-mention-pop { position: absolute; z-index: 120; min-width: 180px; max-height: 240px; overflow-y: auto; padding: 4px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); box-shadow: var(--shadow); }
.hb-mention-pop button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 6px 8px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; }
.hb-mention-pop button:hover, .hb-mention-pop button[aria-selected='true'] { background: var(--hover); }
.hb-src-ed { width: 100%; min-height: 360px; padding: 12px; border: 1px solid var(--line2); border-radius: var(--r-s); background: var(--bg); color: var(--ink); font: 13px/1.55 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }

/* 펼침 상자 */
.hb-pop { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; min-width: 200px; padding: 6px; border-radius: 9px; border: 1px solid var(--line2); background: var(--card); box-shadow: var(--shadow); }
.hb-pop-r { left: auto; right: 0; }
.hb-pop-tip { font-size: 12px; color: var(--ink3); padding: 4px 6px; }
details { position: relative; }
details > summary { cursor: pointer; }
.hb-menu-pop, .hb-tk-menu, .hb-refpick { display: inline-block; flex: none; }
.hb-menu-pop > summary, .hb-tk-menu > summary { list-style: none; }
.hb-menu-pop > summary::-webkit-details-marker { display: none; }
.hb-menu-pop > .hb-pop, .hb-tk-menu > .hb-pop { display: flex; flex-direction: column; min-width: 200px; }
.hb-menu-pop .hb-pop .hb-pop-tip { white-space: normal; max-width: 260px; }
.hb-pop button, .hb-pop a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); cursor: pointer; text-align: left; white-space: nowrap; font-size: 13px; }
.hb-pop button:hover, .hb-pop a:hover { background: var(--hover); text-decoration: none; }
.hb-modal-wrap { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 14px 14px; background: rgba(0, 0, 0, .5); overflow-y: auto; }
.hb-modal { width: min(480px, 100%); border-radius: 12px; border: 1px solid var(--line2); background: var(--card); box-shadow: var(--shadow); }
.hb-modal-wide { width: min(860px, 100%); }
.hb-modal header { display: flex; align-items: center; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.hb-modal header h2 { margin: 0; font-size: 16px; flex: 1; }
.hb-modal-body { padding: 16px 18px; max-height: 70vh; overflow-y: auto; }
.hb-modal-body > p:first-child { margin-top: 0; }
.hb-modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.hb-keys td { padding: 4px 10px 4px 0; }
.hb-finder { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.hb-finder li a, .hb-finder li button { display: block; padding: 6px 8px; border-radius: 6px; font-family: var(--mono); font-size: 13px; }
.hb-finder li a:hover, .hb-finder li [aria-selected='true'] { background: var(--hover); text-decoration: none; }

/* 반응 */
.hb-react { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.hb-react-b { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; font-size: 12.5px; }
.hb-react-b[aria-pressed='true'] { border-color: var(--link); background: color-mix(in srgb, var(--link) 14%, transparent); }
.hb-react-add summary { list-style: none; }
.hb-react-add summary::-webkit-details-marker { display: none; }
.hb-react-add .hb-pop { display: flex; gap: 2px; min-width: 0; }
.hb-react-add .hb-pop button { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 17px; }
.hb-react-add .hb-pop button:hover { background: var(--hover); }

/* ---------- 홈·목록 ---------- */
.hb-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; margin-bottom: 18px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(120deg, var(--pri-soft), transparent 60%), var(--card); }
.hb-hello .hb-h1 { margin-bottom: 4px; }
.hb-hello p { margin: 0; max-width: 680px; }
.hb-home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.hb-home-grid > .hb-card { margin: 0; }
.hb-grid-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.hb-repo-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; }
.hb-repo-row p { margin: 3px 0 0; }
.hb-repo-name { font-weight: 700; font-size: 15px; margin-right: 6px; }
.hb-repo-row .hb-topic { margin-right: 2px; }
.hb-irow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; }
.hb-irow > .hb-state, .hb-irow > .hb-ic, .hb-irow > .hb-tag, .hb-irow > .hb-chk-dot { margin-top: 2px; }
.hb-irow-t { font-weight: 600; color: var(--ink); }
.hb-irow-t:hover { color: var(--link); }
.hb-irow p { margin: 2px 0 0; }
.hb-irow .hb-label { margin-left: 4px; }
.hb-irow-r { display: flex; align-items: center; gap: 8px; flex: none; }
.hb-irow-r .hb-av { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); }
.hb-up-n { display: inline-flex; flex-direction: column; align-items: center; min-width: 40px; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink2); }
.hb-ilist-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--card2); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.hb-ilist-head a, .hb-ilist-head button { color: var(--ink2); font-weight: 600; }
.hb-ilist-head [aria-current='true'] { color: var(--ink); }
.hb-pager { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.hb-evs { list-style: none; margin: 0; padding: 4px 0; }
.hb-ev { display: flex; gap: 10px; align-items: flex-start; padding: 8px 16px; font-size: 13.5px; }
.hb-ev > .hb-ic { margin-top: 3px; color: var(--ink3); }
.hb-ev .hb-grow .hb-av { margin-right: 2px; }
.hb-ev > span { flex: none; }
.hb-note-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; }
.hb-note-row a { color: var(--ink2); }
.hb-unread { background: color-mix(in srgb, var(--link) 7%, transparent); }
.hb-unread a { color: var(--ink); font-weight: 600; }
.hb-note-row p { margin: 2px 0 0; }
.hb-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hb-person { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0; }
.hb-person p { margin: 3px 0 0; }
.hb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.hb-stat { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.hb-stat b { display: block; font-size: 24px; line-height: 1.2; }
.hb-stat span { font-size: 12.5px; color: var(--ink3); }
.hb-chart { display: block; width: 100%; height: 140px; }
.hb-chart rect { fill: var(--pri); }
.hb-chart rect:hover { fill: var(--link); }
.hb-chart-x { display: flex; justify-content: space-between; margin: 4px 0 0; }
.hb-langbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--card2); gap: 2px; }
.hb-langs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.hb-langs i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.hb-cs-file { padding: 8px 16px; border-top: 1px solid var(--line); }
.hb-cs-file:first-child { border-top: 0; }
.hb-cs-file ul { list-style: none; margin: 4px 0 0; padding: 0; }
.hb-cs-file li a { display: block; padding: 2px 8px; border-radius: 5px; color: var(--ink2); white-space: pre-wrap; }
.hb-cs-file li a:hover { background: var(--hover); text-decoration: none; }
.hb-cs-file li .hb-muted { display: inline-block; min-width: 34px; }

/* 위키·릴리스·점검·설정 */
.hb-wiki { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.hb-wiki-side { position: sticky; top: calc(var(--top) + 16px); }
.hb-wiki-side ul { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
.hb-wiki-side a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink2); }
.hb-wiki-side a[aria-current='page'] { background: var(--pri-soft); color: var(--ink); font-weight: 600; }
.hb-wiki-page .hb-blob-head .hb-h1 { margin: 0; font-size: 20px; }
.hb-rev-diff { margin-top: 8px; }
.hb-rev-pre { max-height: 360px; overflow: auto; margin: 0; padding: 10px; border-radius: 6px; background: var(--bg); font-size: 12.5px; }
.hb-rev-pre span { display: block; white-space: pre-wrap; }
.hb-rv-add { background: var(--add); } .hb-rv-del { background: var(--del); } .hb-rv-eq { color: var(--ink3); }
.hb-rel { margin-bottom: 16px; }
.hb-rel h2 { margin: 0; font-size: 17px; }
.hb-assets { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.hb-assets li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.hb-assets li:first-child { border-top: 0; }
.hb-assets li .hb-muted { margin-left: auto; }
.hb-chk-dot { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.hb-chk-dot.hb-chk-pass { color: var(--ok); background: var(--ok-soft); } .hb-chk-dot.hb-chk-warn { color: var(--warn); background: var(--warn-soft); } .hb-chk-dot.hb-chk-fail { color: var(--bad); background: var(--bad-soft); }
.hb-chk { display: inline-flex; vertical-align: middle; }
.hb-chk.hb-chk-pass { color: var(--ok); } .hb-chk.hb-chk-warn { color: var(--warn); } .hb-chk.hb-chk-fail { color: var(--bad); }
.hb-checks, .hb-checks-mini { list-style: none; margin: 0; padding: 0; }
.hb-checks > li { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.hb-checks > li:first-child { border-top: 0; }
.hb-checks > li > .hb-ic { margin-top: 3px; }
.hb-checks p { margin: 2px 0; color: var(--ink2); }
.hb-checks ul { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--ink3); }
.hb-checks-mini li { padding: 3px 0; font-size: 13px; }
li.hb-chk-pass > .hb-ic { color: var(--ok); } li.hb-chk-warn > .hb-ic { color: var(--warn); } li.hb-chk-fail > .hb-ic { color: var(--bad); }
details .hb-checks { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
.hb-danger-zone { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.hb-dz-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.hb-dz-row:first-of-type { border-top: 0; }
.hb-dz-row > div { flex: 1; min-width: 0; }
.hb-dz-row p { margin: 2px 0 0; }
.hb-gfile { margin-bottom: 12px; }
.hb-gfile .hb-blob-head input { flex: 1; max-width: 320px; min-height: 30px; }
.hb-gfile textarea { border: 0; border-radius: 0 0 var(--r) var(--r); min-height: 200px; }
pre.hb-code { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/1.55 var(--mono); }

/* ---------- 코드 화면 (v-code) ---------- */
.hb-main-wide { padding-left: 20px; padding-right: 20px; }
.hb-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 15px; margin-bottom: 10px; min-width: 0; }
.hb-crumb a { font-weight: 600; }
.hb-refpick { display: inline-block; }
.hb-refpick summary { list-style: none; max-width: 220px; }
.hb-refpick summary span { overflow: hidden; text-overflow: ellipsis; }
.hb-refpick summary::-webkit-details-marker { display: none; }
.hb-refpop { width: 280px; }
.hb-refpop input { width: 100%; min-height: 32px; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line2); background: var(--bg); margin-bottom: 6px; }
.hb-reflist { max-height: 300px; overflow-y: auto; }
.hb-reflist a, .hb-reflist button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 6px; color: var(--ink); text-align: left; font-family: var(--mono); font-size: 12.5px; cursor: pointer; }
.hb-reflist a:hover, .hb-reflist button:hover { background: var(--hover); text-decoration: none; }
.hb-files { margin-bottom: 16px; }
.hb-files-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--card2); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; font-size: 13px; flex-wrap: wrap; min-width: 0; }
.hb-files-msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.hb-ftable { width: 100%; border-collapse: collapse; table-layout: fixed; }
.hb-ftable td { padding: 7px 16px; border-top: 1px solid var(--line); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-ftable tr:first-child td { border-top: 0; }
.hb-ftable tr:hover td { background: var(--hover); }
.hb-fname { width: 34%; }
.hb-fname a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.hb-fmsg { color: var(--ink3); }
.hb-fmsg a { color: var(--ink3); }
.hb-fsize, .hb-fwhen { width: 110px; text-align: right; color: var(--ink3); }
.hb-readme { margin-top: 16px; }
.hb-readme > header { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.hb-readme > .hb-md, .hb-readme > div { padding: 18px 24px 22px; }
.hb-readme-tip p { margin: 0; padding: 14px 16px; }
.hb-readme-tip { margin: 0 0 16px; }
.hb-blob { overflow: hidden; }
.hb-blob-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px 8px 16px; background: var(--card2); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; min-width: 0; }
.hb-blob-body { overflow-x: auto; }
.hb-src { width: 100%; border-collapse: collapse; font: 12.8px/1.6 var(--mono); }
.hb-src td { padding: 0 12px; vertical-align: top; }
.hb-src .hb-code { white-space: pre; color: var(--ink); width: 100%; tab-size: 4; }
.hb-ln { width: 1%; min-width: 48px; text-align: right; color: var(--ink3); user-select: none; white-space: nowrap; position: relative; }
.hb-ln a { color: var(--ink3); }
.hb-ln-on td { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.hb-img-view { padding: 20px; text-align: center; background: repeating-conic-gradient(var(--card2) 0 25%, var(--card) 0 50%) 0 0 / 20px 20px; }
.hb-img { max-height: 70vh; }
.hb-raw { padding: 24px; text-align: center; color: var(--ink3); }
.hb-t-kw { color: var(--t-kw); } .hb-t-str { color: var(--t-str); } .hb-t-num { color: var(--t-num); } .hb-t-com { color: var(--t-com); font-style: italic; } .hb-t-fn { color: var(--t-fn); } .hb-t-type { color: var(--t-type); } .hb-t-key { color: var(--t-key); }
.hb-blame .hb-bl-who { width: 300px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); font-size: 12px; border-right: 1px solid var(--line); }
.hb-bl-start td { border-top: 1px solid var(--line); }
.hb-clist { list-style: none; margin: 0; padding: 0; }
.hb-day { padding: 10px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink3); display: flex; align-items: center; gap: 6px; }
.hb-crow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.hb-crow:first-child { border-top: 0; }
.hb-crow-msg { font-weight: 600; color: var(--ink); }
.hb-crow-act { display: flex; gap: 4px; align-items: center; flex: none; }
.hb-cb { font-family: var(--mono); font-size: 12px; }
.hb-commit-head { padding: 14px 16px; }
.hb-commit-head h1 { margin: 0 0 6px; font-size: 18px; }
.hb-commit-body { white-space: pre-wrap; margin: 6px 0; color: var(--ink2); font-size: 13.5px; }
.hb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink3); }
.hb-brow { display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
.hb-bname { font-family: var(--mono); font-weight: 600; }
.hb-brow-act { display: flex; gap: 4px; margin-left: auto; }
.hb-ab { display: inline-flex; font-size: 11.5px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.hb-ab i { font-style: normal; padding: 0 6px; }
.hb-ab-b { background: var(--card2); color: var(--ink3); } .hb-ab-a { background: var(--pri-soft); color: var(--pri); }
.hb-tag-shield { color: var(--warn); border-color: var(--warn); }

/* 비교·차이 */
.hb-df-sum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0 10px; font-size: 13px; }
.hb-df-sum .hb-link { margin-left: auto; }
.hb-df-stat { font-family: var(--mono); font-size: 12px; }
.hb-df-stat b { color: var(--ok); } .hb-df-stat i { color: var(--bad); font-style: normal; }
.hb-df { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; background: var(--card); overflow: hidden; }
.hb-df > header { position: sticky; top: var(--top); z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px 6px 6px; background: var(--card2); border-bottom: 1px solid var(--line); min-width: 0; }
.hb-df-closed > header { border-bottom: 0; }
.hb-df-closed [data-fold] .hb-ic { transform: rotate(-90deg); }
.hb-df-path { font-family: var(--mono); font-size: 13px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hb-df-st { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; white-space: nowrap; }
.hb-df-add { background: var(--ok-soft); color: var(--ok); } .hb-df-del { background: var(--bad-soft); color: var(--bad); } .hb-df-mod { background: var(--warn-soft); color: var(--warn); } .hb-df-ren { background: var(--done-soft); color: var(--done); }
.hb-df-body { overflow-x: auto; }
.hb-df-img { display: flex; gap: 16px; padding: 16px; flex-wrap: wrap; justify-content: center; }
.hb-df-img figure { margin: 0; text-align: center; }
.hb-df-img img { max-height: 320px; border: 1px solid var(--line); }
.hb-df-img figcaption { font-size: 12px; color: var(--ink3); }
.hb-df-index { list-style: none; margin: 0 0 12px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); max-height: 240px; overflow-y: auto; font-family: var(--mono); font-size: 12.5px; }
.hb-df-index li { display: flex; gap: 8px; align-items: center; padding: 2px 6px; }
.hb-diff { width: 100%; border-collapse: collapse; font: 12.5px/1.55 var(--mono); }
.hb-diff td { padding: 0 10px; vertical-align: top; }
.hb-diff td:last-child { white-space: pre; width: 100%; }
.hb-dl-add td { background: var(--add); } .hb-dl-add td.hb-ln { background: var(--add2); }
.hb-dl-del td { background: var(--del); } .hb-dl-del td.hb-ln { background: var(--del2); }
.hb-hunk td { background: color-mix(in srgb, var(--link) 10%, var(--card)); color: var(--ink3); padding: 4px 12px; }
.hb-line-add { position: absolute; right: -10px; top: 0; width: 20px; height: 20px; border-radius: 5px; border: 0; background: var(--link); color: #fff; font-weight: 700; cursor: pointer; opacity: 0; z-index: 2; }
.hb-dl:hover .hb-line-add, .hb-line-add:focus { opacity: 1; }
.hb-lc td { background: var(--bg) !important; padding: 8px 12px !important; white-space: normal !important; font-family: var(--font); font-size: 13.5px; }
.hb-lc-one { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 8px 12px; margin: 6px 0; max-width: 820px; }
.hb-lc-done { opacity: .7; }
.hb-lc-act { display: flex; gap: 8px; margin-top: 6px; }
.hb-lform { max-width: 820px; }
.hb-lform textarea { min-height: 72px; margin-bottom: 6px; }
.hb-viewed { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink3); cursor: pointer; white-space: nowrap; }
.hb-cmp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; }
.hb-cmp-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hb-cmp-act { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* 올리기 */
.hb-drop { padding: 28px 20px; text-align: center; border: 2px dashed var(--line2); background: var(--card); }
.hb-drop-on { border-color: var(--pri) !important; background: var(--pri-soft) !important; }
.hb-drop-act { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hb-up-scroll { max-height: 50vh; overflow: auto; }
.hb-up-table td { font-size: 13px; }
.hb-dim-row td { opacity: .5; }
.hb-up-st { font-size: 11.5px; font-weight: 700; }
.hb-up-go { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
.hb-steps { margin: 0; padding-left: 20px; color: var(--ink2); }
.hb-steps li { margin: 4px 0; }
.hb-start { padding: 22px 24px; }
.hb-start-act { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.hb-url { display: flex; gap: 6px; align-items: center; }
.hb-url input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); }
.hb-path { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.hb-path-in { width: auto !important; flex: 1; min-width: 160px; font-family: var(--mono); }
.hb-edit-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.hb-edit-pv { padding: 12px 0; }
.hb-table-wrap { overflow-x: auto; }

/* ---------- 이슈·PR·토론 ---------- */
.hb-ilist { margin-bottom: 14px; }
.hb-ihead { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hb-ihead h1 { margin: 0 0 8px; font-size: 24px; font-weight: 600; line-height: 1.3; }
.hb-ihead h1 .hb-muted { font-weight: 400; }
.hb-ihead .hb-meta { gap: 6px 8px; }
.hb-tabs { display: flex; gap: 4px; margin: 12px 0 0; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.hb-tabs a, .hb-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; background: none; color: var(--ink2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; font-size: 13.5px; }
.hb-tabs a:hover { text-decoration: none; color: var(--ink); }
.hb-tabs [aria-selected='true'] { color: var(--ink); font-weight: 600; border-bottom-color: var(--pri); }
.hb-idoc { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.hb-idoc-wide { grid-template-columns: minmax(0, 1fr); }
.hb-idoc-main { min-width: 0; }
.hb-idoc-side { position: sticky; top: calc(var(--top) + 14px); }
.hb-side-box { padding: 10px 0 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.hb-side-box h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; font-size: 12.5px; color: var(--ink3); }
.hb-side-box > div { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hb-side-box .hb-select { width: 100%; }
.hb-side-admin { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.hb-side-admin .hb-link { font-size: 13px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.hb-cmt { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 14px; scroll-margin-top: 80px; }
.hb-cmt > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 14px; background: var(--card2); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; font-size: 13px; min-width: 0; }
.hb-cmt > header .hb-grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-cmt-first { border-color: color-mix(in srgb, var(--link) 40%, var(--line)); }
.hb-cmt-first > header { background: color-mix(in srgb, var(--link) 9%, var(--card2)); }
.hb-cmt-ans { border-color: var(--ok); }
.hb-cmt-ans > header { background: var(--ok-soft); }
.hb-cmt-on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 55%, transparent); }
.hb-cmt-body { padding: 12px 16px; }
.hb-cmt-body > .hb-react { margin-top: 10px; }
.hb-cmt-sm { margin: 8px 0; }
.hb-cmt-new { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 12px; margin-top: 8px; }
.hb-cnew { margin-top: 10px; }
.hb-cnew-act { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.hb-replies { border-top: 1px solid var(--line); padding: 8px 14px 10px 28px; background: var(--bg2); border-radius: 0 0 var(--r) var(--r); }
.hb-replies .hb-cmt { margin: 6px 0; }
.hb-reply-f { margin-top: 6px; }
.hb-reply-f textarea { min-height: 60px; margin-bottom: 6px; }
.hb-tl { position: relative; padding-left: 18px; margin: 0 0 14px; }
.hb-tl::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.hb-tl-e { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; font-size: 13px; color: var(--ink2); position: relative; }
.hb-tl-e > .hb-ic:first-child { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line); margin-left: -22px; color: var(--ink3); }
.hb-tl-rv { margin: 8px 0; }
.hb-rv-ok .hb-tl-e > .hb-ic:first-child { background: var(--ok); color: #fff; border-color: var(--ok); }
.hb-rv-bad .hb-tl-e > .hb-ic:first-child { background: var(--bad); color: #fff; border-color: var(--bad); }
.hb-split-btn { display: inline-flex; }
.hb-split-btn > .hb-btn:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.hb-split-btn > details > summary { border-radius: 0 var(--r-s) var(--r-s) 0; border-left: 0; list-style: none; padding: 0 8px; }
.hb-split-btn > details > summary::-webkit-details-marker { display: none; }
.hb-inline-ed { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.hb-inline-ed input { flex: 1; min-width: 200px; font-size: 18px; }
.hb-new { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.hb-new-main { padding: 16px; margin: 0; }
.hb-new-side { position: sticky; top: calc(var(--top) + 14px); }
.hb-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.hb-split-side { position: sticky; top: calc(var(--top) + 14px); }
.hb-merge { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin: 14px 0; overflow: hidden; }
.hb-merge > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 700; }
.hb-merge-ok { border-color: var(--ok); } .hb-merge-ok > header { background: var(--ok-soft); }
.hb-merge-bad { border-color: var(--warn); } .hb-merge-bad > header { background: var(--warn-soft); }
.hb-merge-done { border-color: var(--done); } .hb-merge-done > header { background: var(--done-soft); }
.hb-merge-list { list-style: none; margin: 0; padding: 0; }
.hb-merge-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.hb-merge-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--card2); }
.hb-conf { display: flex; flex-direction: column; gap: 10px; }
.hb-conf .hb-src-ed { min-height: 300px; }
.hb-pr-repo { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); }
.hb-mway { display: flex; gap: 8px; flex-wrap: wrap; }

/* 보드 */
.hb-board { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(260px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.hb-bcol { display: flex; flex-direction: column; min-height: 200px; max-height: calc(100vh - var(--top) - 150px); border-radius: var(--r); border: 1px solid var(--line); background: var(--bg2); }
.hb-bcol > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.hb-bcol-list { flex: 1; list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.hb-bcard { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: grab; font-size: 13.5px; }
.hb-bcard:hover { border-color: var(--line2); }
.hb-bcard-done { opacity: .75; }
.hb-bcard-t { font-weight: 600; color: var(--ink); display: block; }
.hb-bcard-who { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.hb-bcard-note { white-space: pre-wrap; color: var(--ink2); }
.hb-bcard-act { display: flex; gap: 2px; justify-content: flex-end; margin-top: 4px; }
.hb-bnote { padding: 8px; border-top: 1px solid var(--line); }
.hb-bnote textarea { width: 100%; min-height: 60px; border-radius: 6px; border: 1px solid var(--line2); background: var(--bg); padding: 6px 8px; }
.hb-dragging { opacity: .4; }
.hb-bcol.hb-drop-on { border-color: var(--pri); }
.hb-bcols { display: flex; flex-direction: column; gap: 6px; }

/* 마크다운 */
.hb-md { line-height: 1.65; overflow-wrap: anywhere; }
.hb-md > :first-child { margin-top: 0; }
.hb-md > :last-child { margin-bottom: 0; }
.hb-md h1, .hb-md h2 { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.hb-md h1 { font-size: 1.7em; } .hb-md h2 { font-size: 1.35em; } .hb-md h3 { font-size: 1.15em; }
.hb-md h1, .hb-md h2, .hb-md h3, .hb-md h4 { margin: 1.3em 0 .6em; line-height: 1.3; }
.hb-md code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--card2); border: 1px solid var(--line); }
.hb-md pre, .hb-code-block { padding: 12px 14px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; font: 12.8px/1.55 var(--mono); }
.hb-md pre code { padding: 0; border: 0; background: none; }
.hb-md blockquote { margin: 0 0 1em; padding: 0 1em; color: var(--ink2); border-left: 3px solid var(--line2); }
.hb-md table { border-collapse: collapse; display: block; overflow-x: auto; margin: 0 0 1em; }
.hb-md th, .hb-md td { padding: 6px 12px; border: 1px solid var(--line); }
.hb-md th { background: var(--card2); }
.hb-md img { border-radius: 6px; }
.hb-md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.hb-md ul, .hb-md ol { padding-left: 1.6em; }
.hb-task { list-style: none; margin-left: -1.3em; }
.hb-task input { margin-right: 6px; accent-color: var(--pri); }
.hb-mention { color: var(--link); font-weight: 600; }
.hb-anchor { opacity: 0; margin-left: 4px; font-size: .8em; }
.hb-md h1:hover .hb-anchor, .hb-md h2:hover .hb-anchor, .hb-md h3:hover .hb-anchor { opacity: .7; }

/* 들어가는 문 */
.hb-door { max-width: 480px; margin: 14vh auto 0; padding: 32px 28px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-align: center; box-shadow: var(--shadow); }
.hb-door-mark { width: 54px; height: 54px; margin: 0 auto 14px; }
.hb-door-mark svg { width: 100%; height: 100%; }
.hb-door h1 { margin: 0 0 10px; font-size: 22px; }
.hb-door p { color: var(--ink2); }
.hb-door .hb-row { justify-content: center; margin-top: 18px; }
body:not(.hb-in):not(.hb-out) .hb-shell { visibility: hidden; }

/* ---------- AI 도우미 ---------- */
#hb-ai.hb-ai { position: fixed; z-index: 50; top: var(--top); right: 0; bottom: 0; width: var(--ai); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg2); }
.hb-ai > .hai { flex: 1; min-height: 0; }
#hb-ai.hb-ai[hidden] { display: none; }

/* ---------- 너비마다 ---------- */
@media (min-width: 1700px) {
  body.hb-ai-open .hb-shell { margin-right: var(--ai); }
}
@media (min-width: 1280px) and (max-width: 1699px) {
  body.hb-ai-open .hb-right { visibility: hidden; }
  body.hb-ai-open #hb-ai.hb-ai { width: var(--right); }
}
@media (min-width: 1920px) {
  :root { --side: 248px; --right: 380px; }
  .hb-main { padding: 26px 40px 80px; }
}
@media (max-width: 1279px) {
  .hb-shell { grid-template-columns: var(--side) minmax(0, 1fr); }
  .hb-right { position: fixed; z-index: 49; top: var(--top); right: 0; bottom: 0; height: auto; width: min(380px, 92vw); transform: translateX(105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.hb-right-open .hb-right { transform: none; }
  .hb-icon-btn.hb-talk-x { display: inline-flex; }
  .hb-seg { margin-left: 0; }
  .hb-talk-fab { display: inline-flex; }
  body.hb-right-open .hb-talk-fab, body.hb-ai-open .hb-talk-fab { display: none; }
  #hb-ai.hb-ai { width: min(420px, 100vw); box-shadow: var(--shadow); }
  .hb-idoc, .hb-new, .hb-split { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 1099px) {
  .hb-idoc, .hb-new, .hb-split { grid-template-columns: minmax(0, 1fr); }
  .hb-idoc-side, .hb-new-side, .hb-split-side { position: static; }
  .hb-idoc-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
}
@media (max-width: 899px) {
  .hb-shell { grid-template-columns: minmax(0, 1fr); }
  .hb-side { position: fixed; z-index: 49; top: var(--top); left: 0; bottom: 0; height: auto; width: min(280px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.hb-side-open .hb-side { transform: none; }
  .hb-icon-btn.hb-menu-btn { display: inline-flex; }
  .hb-main { padding: 16px 14px 90px; }
  .hb-main-wide { padding: 16px 10px 90px; }
  .hb-search kbd { display: none; }
  .hb-wiki { grid-template-columns: minmax(0, 1fr); }
  .hb-wiki-side { position: static; }
  .hb-fmsg { display: none; }
  .hb-fname { width: auto; }
  .hb-blame .hb-bl-who { width: 150px; max-width: 150px; }
}
@media (max-width: 640px) {
  :root { --top: 52px; }
  .hb-top { gap: 6px; padding: 0 8px; }
  .hb-brand b { display: none; }
  .hb-search { height: 34px; }
  .hb-me-n { display: none; }
  .hb-ai-btn { width: 34px; padding: 0; justify-content: center; }
  .hb-ai-btn span { display: none; }
  .hb-h1 { font-size: 19px; }
  .hb-ihead h1 { font-size: 20px; }
  .hb-hello { flex-direction: column; padding: 16px; }
  .hb-home-grid, .hb-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hb-row2 { grid-template-columns: minmax(0, 1fr); }
  .hb-fsize, .hb-fwhen { width: 76px; padding-left: 4px !important; }
  .hb-ftable td { padding: 7px 10px; }
  .hb-irow, .hb-repo-row, .hb-ev, .hb-note-row { padding-left: 12px; padding-right: 12px; }
  .hb-irow-r .hb-av { display: none; }
  .hb-dz-row { flex-direction: column; align-items: flex-start; }
  .hb-board { grid-template-columns: repeat(var(--cols), minmax(240px, 86vw)); }
  .hb-talk-fab { right: 12px; bottom: 12px; height: 44px; padding: 0 14px; }
  .hb-right { width: 100vw; }
  .hb-modal-wrap { padding-top: 4vh; }
  .hb-replies { padding-left: 14px; }
  .hb-filter .hb-select { flex: 1; }
  .hb-blame .hb-bl-who { display: none; }
}
@media (max-width: 380px) {
  .hb-theme, #hb-theme { display: none; }
  .hb-search input::placeholder { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.hb-pop.hb-menu-pop { display: flex; flex-direction: column; min-width: 180px; }
.hb-pre { margin: 0; padding: 16px 20px; white-space: pre-wrap; font: 13px/1.6 var(--mono); }
