/* STAGE9 경영 시스템 — 레이아웃 · 공통 부품 스타일
   화면 설계서 v2 §2 원칙 5: 폰 세로(390px)에서 먼저 성립한다. PC 는 그 카드를 2열로 편다.
   외부 폰트·CDN 을 쓰지 않는다(정적 배포 · 사내망 · 오프라인에서도 열려야 한다). */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e3e6ea;
  --line-soft: #eef0f3;
  --ink: #16191d;
  --ink-2: #5a626c;
  --ink-3: #8b939d;

  --red: #c62828;      --red-bg: #fdeaea;
  --amber: #b26a00;    --amber-bg: #fdf3e3;
  --green: #1c7a4a;    --green-bg: #e8f5ee;
  --gray: #6b7280;     --gray-bg: #f0f1f3;

  /* 강조·데이터 색 — 혜움(알프레드) 화면에서 실측한 값이다(2026-09-21, 캡처 픽셀 추출).
     --accent 만 혜움 청록을 그대로 쓰지 않고 진하게 낮췄다: #5ea4bf 는 흰 배경 대비가
     약 2.5:1 이라 글자·링크에 쓰면 읽히지 않는다(WCAG AA 4.5:1 미달). 막대·면에는 원색을 쓴다. */
  --accent: #17627e;
  --data-1: #e28b36;        /* 혜움 강조 주황 */
  --data-1-soft: #f3b470;   /* 혜움 매출 막대 */
  --data-2: #5ea4bf;        /* 혜움 매입 막대 */
  --data-2-deep: #173b4c;

  --r: 12px;
  --gut: 16px;

  --fs-hero: 34px;
  --fs-lg: 24px;
  --fs-md: 17px;
  --fs-sm: 14px;
  --fs-xs: 12.5px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161a;
    --surface: #1b1e23;
    --line: #2b3038;
    --line-soft: #23272d;
    --ink: #eef1f4;
    --ink-2: #a8b0ba;
    --ink-3: #78818c;
    --red: #ff8a80;      --red-bg: #3a1d1d;
    --amber: #ffcc80;    --amber-bg: #3a2e1a;
    --green: #7fd6a6;    --green-bg: #16301f;
    --gray: #9aa2ac;     --gray-bg: #23272d;
    --accent: #7fb2e5;
    --data-1: #f3b470; --data-1-soft: #e28b36;
    --data-2: #8cc6dd; --data-2-deep: #a9d4e6;
  }
}
:root[data-theme="dark"] {
  --bg: #14161a; --surface: #1b1e23; --line: #2b3038; --line-soft: #23272d;
  --ink: #eef1f4; --ink-2: #a8b0ba; --ink-3: #78818c;
  --red: #ff8a80; --red-bg: #3a1d1d; --amber: #ffcc80; --amber-bg: #3a2e1a;
  --green: #7fd6a6; --green-bg: #16301f; --gray: #9aa2ac; --gray-bg: #23272d;
  --accent: #7fb2e5;
  --data-1: #f3b470; --data-1-soft: #e28b36;
  --data-2: #8cc6dd; --data-2-deep: #a9d4e6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
               "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;              /* 어떤 경우에도 가로 스크롤을 만들지 않는다 */
}

/* 긴 숫자·경로가 카드를 밀어내지 않게 한다 — 390px 가로 스크롤의 주범 */
h1, h2, h3, p, td, th, span, div, summary { overflow-wrap: anywhere; word-break: keep-all; }

a { color: var(--accent); }

/* ───────────────────────────── 레이아웃 ───────────────────────────────── */

.layout { display: block; min-height: 100vh; }

/* 상단탭은 붙박이다(sticky). 스크롤을 내려도 지금 어느 탭인지 안 사라진다.
   화면 제목줄(.head)은 붙박이가 아니다 — 둘 다 붙이면 폰에서 본문이 절반만 남는다. */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--line);
}

.head {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px;
  padding: 12px var(--gut) 10px;
}
.head__titles { flex: 1 1 auto; min-width: 0; }
.head__title {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 7px;
}
.head__icon { font-size: 17px; }
.head__q { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--ink-3); }
/* 폰: 배지는 제목 아래 제 줄을 쓴다. 좁은 칸에 nowrap 배지를 밀어 넣으면
   배지가 자기 상자를 넘어 문서 전체에 가로 스크롤이 생긴다(실측 12px). */
.head__right {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start;
  align-items: center; flex: 1 1 100%; min-width: 0;
}

.content { padding: 0 var(--gut) 56px; }

/* PC: 카드 2열 */
@media (min-width: 900px) {
  .head { flex-wrap: nowrap; padding: 16px 28px 12px; }
  .head__right { flex: 0 1 auto; justify-content: flex-end; }
  .content { padding: 0 28px 64px; }
}
/* ⚑ 카드 2열 규칙은 여기 두지 않는다 — `.grid` 기본 정의가 이 블록보다 **뒤**에 있어
   같은 특이도에서 소스 순서로 덮어쓰인다(2026-09-21 실측: 1280px 에서 1열로 나왔다).
   실제 위치는 `.grid` 정의 바로 아래다. */

/* ──────────────────────── 메뉴 · 상단탭 2단 ───────────────────────────── */

/* 1단 — 5묶음. 폰 390px 에서 5칸이 들어가는 것이 이 구조의 전제다(상한 5에서 6개).
   그래도 넘치면 문서가 아니라 이 줄 안에서만 가로로 민다 — 페이지 전체 가로 스크롤은 금지. */
.tabs {
  display: flex; align-items: stretch; gap: 0;
  padding: 0 6px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__brand {
  display: none; flex: 0 0 auto; align-self: center;
  padding: 0 12px 0 6px; margin-right: 4px;
  font-size: 14px; font-weight: 800; letter-spacing: -.02em;
  color: var(--accent); text-decoration: none; white-space: nowrap;
}
.tab {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 11px 6px 9px; border-bottom: 2px solid transparent;
  color: var(--ink-2); text-decoration: none;
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.tab__icon { font-size: 13px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab.is-dim:not(.is-active) { color: var(--ink-3); }

/* 2단 — 그 탭 안의 화면들. 화면이 하나뿐인 탭에서는 아예 그리지 않는다. */
.subtabs {
  display: flex; align-items: center; gap: 4px;
  padding: 7px var(--gut); border-top: 1px solid var(--line-soft);
  overflow-x: auto; scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none;
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
}
.subtab:hover { background: var(--line-soft); }
.subtab.is-active { background: var(--accent); color: #fff; }
.subtab.is-locked { color: var(--ink-3); cursor: not-allowed; }
.subtab__tag {
  font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 999px;
  background: var(--gray-bg); color: var(--ink-3);
}
.subtab.is-active .subtab__tag { background: rgba(255,255,255,.22); color: #fff; }

@media (min-width: 700px) {
  .tabs { padding: 0 20px; }
  .tabs__brand { display: block; }
  .tab { flex: 0 0 auto; padding: 12px 18px 10px; }
  .subtabs { padding: 8px 28px; }
}

/* ────────────────────────────── 카드 ──────────────────────────────────── */

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* PC: 카드 2열. 기본 1열 정의 **바로 뒤**에 둔다(위 레이아웃 블록에 두면 소스 순서로 죽는다). */
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > .card--wide { grid-column: 1 / -1; }
}

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; min-width: 0;
}
.card__head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.card__title {
  margin: 0; flex: 1 1 auto; min-width: 0;
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
}
/* 기간 배지 — 카드마다 시간축이 다르다는 사실을 라벨 옆에 붙여 둔다.
   ⚑ `.chip` 클래스를 주지 않는다. 주면 상태칩을 찾는 `.card__head .chip` 이 이걸 먼저 잡는다. */
.card__period {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; white-space: nowrap;
}
.card__answer { margin-bottom: 0; }
.card__aside { margin-top: 10px; }
.card__basis { margin: 0; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.5; }
.card__time { margin-top: 8px; }
.card__foot { margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-3); }
.card__drill-extra { margin-top: 10px; }

.card__drill { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 7px; }
.card__drill-sum {
  cursor: pointer; font-size: var(--fs-xs); color: var(--accent); font-weight: 600;
  list-style: none; user-select: none;
}
.card__drill-sum::-webkit-details-marker { display: none; }
.card__drill-sum::before { content: '▸ '; }
.card__drill[open] .card__drill-sum::before { content: '▾ '; }
.card__drill-body { margin-top: 10px; }

/* ────────────────────────────── 숫자 ──────────────────────────────────── */

.num { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 3px; min-width: 0; }
.num__v { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.02em; }
.num__u { font-size: .62em; color: var(--ink-2); font-weight: 600; }
.num__s { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; margin-left: 4px; }

.num--hero .num__v { font-size: var(--fs-hero); line-height: 1.12; }
.num--lg   .num__v { font-size: var(--fs-lg); }
.num--md   .num__v { font-size: var(--fs-md); }
.num--sm   .num__v { font-size: var(--fs-sm); }
.num--hero .num__s { display: block; width: 100%; margin: 2px 0 0; font-size: var(--fs-sm); }

/* ────────────────────── 상태색 · 시점 · 신선도 · 결손 ─────────────────── */

.chip, .fresh, .tlabel {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 600; border-radius: 999px;
  padding: 2px 9px; white-space: nowrap; max-width: 100%;
}
.chip--red, .fresh--red     { background: var(--red-bg);   color: var(--red); }
.chip--amber, .fresh--amber { background: var(--amber-bg); color: var(--amber); }
.chip--green, .fresh--green { background: var(--green-bg); color: var(--green); }
.chip--gray, .fresh--gray   { background: var(--gray-bg);  color: var(--ink-2); }
/* 상태 점 — 이모지가 아니라 CSS 원. 칩의 글자색을 그대로 따라간다.
   ⚑ 색만으로 상태를 말하지 않는다 — 점 옆에 항상 글자 라벨이 붙는다(WCAG 1.4.1). */
.chip__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: 0 0 auto;
  align-self: center;
}
.miss__why .chip__dot { width: 6px; height: 6px; margin-right: 4px; }

.tlabel { background: transparent; border: 1px solid var(--line); color: var(--ink-3); padding: 1px 8px; }
.tlabel__axis { font-weight: 700; color: var(--ink-2); }
.tlabel__at { font-variant-numeric: tabular-nums; }

.miss { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; min-width: 0; }
.miss__dash { font-size: var(--fs-lg); font-weight: 700; color: var(--ink-3); }
.miss__why { font-size: var(--fs-xs); line-height: 1.45; }
.miss--absent .miss__why { color: var(--ink-3); }
.miss--broken .miss__dash, .miss--broken .miss__why { color: var(--red); }

/* ─────────────────────────── 조각 부품 ────────────────────────────────── */

.stack { display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; min-width: 0; }
.kv__k { font-size: var(--fs-xs); color: var(--ink-2); flex: 0 0 auto; }
.kv__d { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kv__tag {
  font-size: 10.5px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 0 6px;
}

.sub { padding: 9px 10px; border-radius: 9px; background: var(--amber-bg); }
.sub__title { font-size: var(--fs-xs); font-weight: 700; color: var(--amber); margin-bottom: 5px; }

.note { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }
.note--warn { color: var(--amber); }

.banner {
  margin-bottom: 14px; padding: 10px 12px; border-radius: 9px;
  font-size: var(--fs-xs); line-height: 1.5;
}
.banner--red  { background: var(--red-bg);  color: var(--red); }
.banner--gray { background: var(--gray-bg); color: var(--ink-2); }

.srcline {
  margin: 14px 0 0; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.55;
}
.srcline::before { content: 'ⓘ '; }

/* ─────────────────────────────── 표 ───────────────────────────────────── */

.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.tbl th, .tbl td {
  padding: 6px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top;
}
.tbl th { color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.tbl td { font-variant-numeric: tabular-nums; }
.tbl .r { text-align: right; }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* ────────────────────────────── 그래프 ────────────────────────────────── */

.chartwrap { width: 100%; }
.chart { display: block; width: 100%; height: 150px; overflow: visible; }
.chart__line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart__line--past { stroke: var(--accent); }
.chart__line--fut  { stroke: var(--accent); stroke-dasharray: 4 3; opacity: .75; }
.chart__dot { fill: var(--accent); }
.chart__dot.is-fut { fill: var(--surface); stroke: var(--accent); stroke-width: 1.4; }
.chart__zero { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart__zerolabel { font-size: 8px; fill: var(--red); }
.chart__today { stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__todaylabel { font-size: 8px; fill: var(--ink-2); font-weight: 700; }
.chart__tick { font-size: 8px; fill: var(--ink-3); }

/* ────────────────────── 잠금 · 예정 · 404 화면 ────────────────────────── */

.screen-msg {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r);
  padding: 26px 18px; text-align: center; max-width: 560px; margin: 8px auto;
}
.screen-msg__icon { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.screen-msg__title { margin: 0 0 8px; font-size: var(--fs-md); font-weight: 700; }
.screen-msg__chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.screen-msg__body { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; }
.screen-msg__hint { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.6; }

.screen-msg { margin-top: 8px; }

/* ═══════════════════ 혜움 짜임새 ①②③④ — 2026-09-21 신설 ═══════════════════
   ⚑ 이 블록은 파일 **맨 끝**이다. 여기 있는 규칙은 위 정의들을 소스 순서로 덮는다.
      반대로, 위에 이미 있는 선택자(.grid 2열 같은)를 여기서 다시 쓰면 안 된다 —
      2026-09-21 에 `.grid` 2열을 기본 정의보다 앞에 뒀다가 1280px 에서 1열로 나왔다.
      같은 함정의 거울상이다. 여기에는 **새 선택자만** 둔다.                       */

/* ── ⑤ 카드 우측 상세 이동 화살표 ─────────────────────────────────────── */
.card__more {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin: -3px -4px 0 0;
  border-radius: 7px; color: var(--ink-3); text-decoration: none;
}
.card__more:hover { background: var(--line-soft); color: var(--accent); }
.card__more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── ① 상단 요약 숫자 줄 ──────────────────────────────────────────────── */
.sumstrip { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.sumstrip__i { min-width: 0; }
.sumstrip__k {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2);
  background: var(--gray-bg); border-radius: 999px; padding: 2px 9px;
  cursor: help;
}
.sumstrip__i-ico { display: inline-flex; color: var(--ink-3); }
.sumstrip__v { margin-top: 5px; }

/* 툴팁 글자를 화면에서만 숨긴다. display:none 으로 지우면 스크린리더도 못 읽는다. */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── 범례 · 툴팁 (두 차트 공용) ───────────────────────────────────────── */
.lgd { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.lgd__i { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--ink-2); }
.lgd__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: 0 0 auto; }
.lgd__dot--line { height: 0; border-radius: 0; border-top: 2px dashed var(--c); background: none; }
.lgd__t { white-space: nowrap; }

.tip {
  position: absolute; top: 4px; z-index: 5; pointer-events: none;
  min-width: 118px; max-width: 200px; padding: 7px 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .13);
  font-size: var(--fs-xs); line-height: 1.5;
}
.tip[hidden] { display: none; }
.tip__t { font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.tip__r { display: flex; align-items: baseline; gap: 5px; }
.tip__dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: 0 0 auto; }
.tip__k { color: var(--ink-2); flex: 1 1 auto; white-space: nowrap; }
.tip__v { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); white-space: nowrap; }

/* ── ② 세로 막대 + 꺾은선 (혜움 매출·매입 차트 자리) ───────────────────── */
.chartbox { width: 100%; min-width: 0; }

.ch { --chy: 50px; --chh: 176px; width: 100%; min-width: 0; }
.ch__plot { position: relative; height: var(--chh); }

.ch__y { position: absolute; top: 0; bottom: 0; left: 0; width: var(--chy); }
.ch__y .t {
  position: absolute; right: 7px; transform: translateY(-50%);
  font-size: 10px; line-height: 1; color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ch__y .t.is-zero { color: var(--ink-2); font-weight: 700; }

.ch__area { position: absolute; top: 0; bottom: 0; left: var(--chy); right: 0; }
.ch__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.ch__grid.is-zero { border-top-style: solid; border-top-color: var(--line); }

.ch__slot { position: absolute; top: 0; bottom: 0; }
.ch__bar { position: absolute; background: var(--c); border-radius: 2px 2px 0 0; }

.ch__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch__line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ch__line.is-dash { stroke-dasharray: 5 4; opacity: .8; }

.ch__dot {
  position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; background: var(--c);
}
.ch__dot.is-hollow { background: var(--surface); border: 1.5px solid var(--c); }

.ch__hit { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.ch__hit:hover { background: rgba(127, 127, 127, .08); }
.ch__hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* x축 라벨은 플롯 영역과 같은 만큼 들여 쓴다. padding 이 아니라 margin 이어야
   막대(%)와 라벨(%)의 기준 너비가 같아진다. */
.ch__x { display: flex; margin: 6px 0 0 var(--chy); }
.ch__xl {
  text-align: center; font-size: 10.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden;
}

@media (min-width: 700px) { .ch { --chh: 218px; } }

/* ── ③ 가로 막대 (지점 비교) ──────────────────────────────────────────── */
.hb { --hbk: 96px; width: 100%; min-width: 0; }
.hb__body { position: relative; }
.hb__row { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; }
.hb__k { flex: 0 0 var(--hbk); min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hb__kt {
  font-size: var(--fs-xs); color: var(--ink); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hb__kn { font-size: 10px; line-height: 1.2; color: var(--ink-3); }
.hb__track { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; }
.hb__zero { position: absolute; top: 2px; bottom: 2px; width: 0; border-left: 1px solid var(--line); }
.hb__bar { position: absolute; background: var(--c); border-radius: 2px; min-width: 1px; }
.hb__hit { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.hb__hit:hover { background: rgba(127, 127, 127, .07); }
.hb__hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.hb__axis {
  position: relative; display: flex; justify-content: space-between;
  margin: 4px 0 0 calc(var(--hbk) + 8px); padding-top: 4px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.hb__axis .is-zero { position: absolute; top: 4px; transform: translateX(-50%); color: var(--ink-2); font-weight: 700; }

@media (min-width: 700px) { .hb { --hbk: 132px; } }

/* ── ④ 항목 × 월 표 — 열이 많으면 표 안에서만 민다 ────────────────────── */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tblwrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tblwrap .tbl { min-width: 460px; }
.tblwrap .tbl th:first-child, .tblwrap .tbl td:first-child {
  position: sticky; left: 0; background: var(--surface);
}

/* 표 첫 칸: 이름 + 그 숫자를 그대로 읽으면 안 되는 사유 */
.cellname { display: flex; flex-direction: column; gap: 1px; }
.cellname__n { font-size: 10px; line-height: 1.25; color: var(--ink-3); white-space: nowrap; }
