/* ══════════════════════════════════════════════════════════════════════════════
   app.css — Big Ambitions 가구 검색 (화면 전용)

   기준: InfraMate 디자인 시스템 (tokens.css / base.css / components.css) 을 그대로 승계한다.
   - 접두사는 전부 `ba-` 로 이 파일에만 쓴다.
   - 신규 색 토큰을 만들지 않는다. tokens.css 의 기존 토큰만 var() 로 참조한다.
   - 카드·표·뱃지·버튼·빈상태는 components.css 의 `.im-*` 를 그대로 쓰고
     여기서 그 시각 기준값을 다시 적지 않는다 (한 요소의 기준값을 두 파일로 가르지 않는다).
   ══════════════════════════════════════════════════════════════════════════ */

/* hidden 속성 보장 — components.css 의 .im-notice 등이 display 를 지정하고 있어
   UA 기본 display:none 이 덮인다. 빈 알림 바가 남는 원인이었다. */
[hidden] {
  display: none !important;
}

/* ── 본문 배율 (2026-09-11 사용자 요청: 현재 크기에서 25% 확대) ───────────── */
.im-table { font-size: 18.75px; }          /* 원본 13 */
.im-table th { font-size: 16.25px; }       /* 원본 11.5 */
.im-badge { font-size: 16.25px; }          /* 원본 11.5 */
.im-btn { font-size: 18.75px; }            /* 원본 13 */
.im-card-header { font-size: 19.38px; }  /* 원본 13.5 */
.im-notice { font-size: 18.75px; }         /* 원본 13 */
.im-empty-title { font-size: 20px; }    /* 원본 14 */
.im-empty-copy { font-size: 18.13px; }   /* 원본 12.5 */

/* ── 상단바 (global.css .topbar 규약 승계) ───────────────────────────────── */
.ba-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  gap: 4px;
  height: 64px;
  padding: 0 var(--page-pad-x);
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
}

.ba-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-right: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.ba-brand-mark {
  font-size: 21.25px;
  font-weight: 700;
  color: var(--text);
}

.ba-brand-sub {
  font-size: 16.25px;
  color: var(--text-soft);
}

/* ── 상단 메뉴 · 드롭다운 ────────────────────────────────────────────────── */
/* 메뉴 영역이 상단바 높이를 꽉 채워야 버튼과 패널 사이에 마우스가 빠지는 틈이 없다 */
.ba-menu {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.ba-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 39px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--menu-color);
  font: inherit;
  font-size: 18.75px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ba-menu-btn:hover,
.ba-menu:focus-within .ba-menu-btn {
  background: var(--menu-hover-bg);
  border-color: var(--menu-hover-border);
  color: var(--text);
}

.ba-menu-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ba-menu-btn[aria-pressed='true'] {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand-text);
}

.ba-caret {
  font-size: 11.25px;
  color: var(--text-soft);
}

/* 패널은 global-search.css .gs-panel 의 레이어·상자 규약을 따른다.
   top 은 100% 로 붙인다 — 여백을 주면 그 틈에서 hover 가 끊겨 메뉴가 닫힌다. */
.ba-menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 244px;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  z-index: 60;
}

.ba-menu-heading {
  display: block;
  padding: 12px 12px 5px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ba-menu-heading:first-child { padding-top: 7px; }

.ba-menu:hover .ba-menu-panel,
.ba-menu:focus-within .ba-menu-panel {
  display: block;
}

.ba-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 18.75px;
  text-align: left;
  cursor: pointer;
  transition: background 0.13s ease, color 0.13s ease;
}

.ba-menu-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.ba-menu-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.ba-menu-item[aria-current='true'] {
  background: var(--brand-soft);
  color: var(--brand-text);
}

.ba-menu-item:disabled,
.ba-menu-item--soon {
  opacity: 0.45;
  cursor: default;
}

.ba-menu-item--soon:hover {
  background: none;
  color: var(--text-muted);
}

.ba-menu-count {
  font-family: var(--font-mono);
  font-size: 16.25px;
  color: var(--text-soft);
}

.ba-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 본문 셸 ─────────────────────────────────────────────────────────────── */
.ba-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) 64px;
  display: flex;
  flex-direction: column;
  gap: var(--page-gap);
}

/* ── 검색 히어로 ─────────────────────────────────────────────────────────── */
.ba-hero {
  padding: 26px 24px 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--hero-bg);
  text-align: center;
}

.ba-home-logo {
  width: min(460px, 82vw);
  margin: 0 auto;
  line-height: 0;
}

.ba-home-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.ba-home-db {
  margin: -8px 0 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .18em;
}

.ba-home-disclaimer {
  max-width: 720px;
  margin: 8px auto 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.ba-home-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 920px;
  margin: 34px auto 0;
  text-align: left;
}

.ba-home-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-panel-soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.ba-home-link:hover {
  border-color: var(--brand-border);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.ba-home-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.ba-home-link svg,
.ba-home-link img {
  width: 50px;
  height: 50px;
  flex: none;
}

.ba-home-link svg {
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ba-home-link img { object-fit: contain; }
.ba-home-link span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ba-home-link b { font-size: 19px; line-height: 1.3; }
.ba-home-link small { color: var(--text-muted); font-size: 14px; line-height: 1.45; }

.ba-hero-title {
  font-size: 31.88px;
  font-weight: 700;
  color: var(--text);
}

.ba-hero-sub {
  margin-top: 5px;
  font-size: 18.13px;
  color: var(--text-muted);
}

.ba-hero-sub b {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--brand-text);
}

.ba-search {
  position: relative;
  max-width: 620px;
  margin: 18px auto 0;
}

.ba-search-input {
  width: 100%;
  height: 53px;
  padding: 0 44px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 20.63px;
  appearance: none;
}

.ba-search-input::placeholder {
  color: var(--text-soft);
  opacity: 1;
}

.ba-search-input:focus {
  outline: none;
  border-color: var(--brand-border);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.ba-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}

.ba-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 24.38px;
  line-height: 1;
  cursor: pointer;
}

.ba-search-clear:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.ba-kbd-hint {
  margin-top: 10px;
  font-size: 16.25px;
  color: var(--text-soft);
}

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--inline-block-bg);
  font-family: var(--font-mono);
  font-size: 15.63px;
  color: var(--text-muted);
}

/* ── 필터 바 ─────────────────────────────────────────────────────────────── */
.ba-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.ba-select {
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--bg-panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 18.13px;
}

.ba-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}

.ba-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ba-chips:empty {
  display: none;
}

.ba-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 9px;
  border: 1px solid var(--brand-border);
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 17.5px;
}

.ba-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ba-chip button:hover {
  background: var(--bg-hover);
}

/* ── 결과 ────────────────────────────────────────────────────────────────── */
.ba-results {
  padding: 0;
  overflow: hidden;
}

.ba-results[hidden] { display: none; }

.ba-tabs--results {
  justify-content: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.ba-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--table-head-bg);
  font-size: 18.13px;
  color: var(--text-muted);
}

.ba-results-bar b {
  font-family: var(--font-mono);
  color: var(--text);
}

.ba-tablewrap {
  overflow-x: auto;
}

.ba-tablewrap .im-table {
  min-width: 720px;
}

/* 표 헤더는 sticky 로 두지 않는다.
   .ba-tablewrap 이 overflow-x:auto 라서 overflow-y 도 auto 로 계산되고, 그 순간 이 요소가
   스크롤 컨테이너가 된다. 안쪽 sticky 의 기준은 뷰포트가 아니라 이 컨테이너가 되는데
   컨테이너는 세로로 스크롤되지 않으므로, 헤더가 top 값만큼 아래로 밀린 채 고정된다 —
   그 자리가 빈 띠로 남고 첫 행들이 헤더 뒤로 들어간다. top 값을 실측해도 구조상 못 고친다.
   배경은 그대로 불투명을 유지한다(--table-head-bg 는 반투명이라 행이 비친다). */
.ba-tablewrap .im-table th {
  position: static;
  background: var(--bg-elevated);
}

.ba-grouprow th {
  padding-top: 7px;
  padding-bottom: 7px;
}

.ba-col-img {
  width: 60px;
  padding-right: 0 !important;
}

.ba-col-num {
  text-align: right;
}

.ba-thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-panel-soft);
}

.ba-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ba-thumb-fallback {
  font-family: var(--font-mono);
  font-size: 18.75px;
  color: var(--text-soft);
}

.ba-name {
  font-size: 19.38px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* 한글 별칭 — 영문명 아래 보조 표기. 검색은 양쪽 모두에 걸린다. */
.ba-ko {
  display: block;
  margin-top: 1px;
  font-size: 15.63px;
  font-weight: 400;
  color: var(--text-muted);
}

/* 일치 구간 음영 — global-search.css .gs-hit 규약을 따른다 (<mark> 미사용) */
.ba-hit {
  padding: 0 1px;
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand-text);
}

.ba-cat {
  font-size: 18.13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ba-vendors {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 260px;
}

.ba-vendor {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 18.13px;
  color: var(--text-soft);
}

.ba-vendor--low {
  color: var(--text);
}

.ba-price {
  font-family: var(--font-mono);
  font-size: 18.13px;
  white-space: nowrap;
}

.ba-vendor--low .ba-price {
  color: var(--brand-text);
}

.ba-muted {
  color: var(--text-soft);
}

/* ── 푸터 ────────────────────────────────────────────────────────────────── */
.ba-footer {
  padding: 18px var(--page-pad-x) 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 16.25px;
  line-height: 1.9;
  color: var(--text-soft);
}

.ba-footer a {
  color: var(--brand-text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   통합 검색 (index.html)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 타입 탭 ─────────────────────────────────────────────────────────────── */
.ba-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.ba-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 18.13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ba-tab span {
  font-family: var(--font-mono);
  font-size: 15.63px;
  color: var(--text-soft);
}

.ba-tab:hover {
  border-color: var(--text-soft);
  color: var(--text);
}

.ba-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ba-tab[aria-pressed='true'] {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand-text);
}

.ba-tab[aria-pressed='true'] span {
  color: inherit;
}

/* ── 검색 결과 목록 ──────────────────────────────────────────────────────── */
.ba-hitlist {
  display: flex;
  flex-direction: column;
}

.ba-hitrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}

.ba-hitrow:last-child {
  border-bottom: 0;
}

.ba-hitrow:hover {
  background: var(--table-row-hover);
}

.ba-hitrow:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.ba-hitrow-body {
  flex: 1;
  min-width: 0;
}

.ba-hitrow-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.ba-hitrow-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 3px;
}

.ba-kv {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 16.25px;
  color: var(--text);
}

.ba-kv i {
  font-style: normal;
  color: var(--text-muted);
}

.ba-kv-more {
  font-family: var(--font-mono);
  font-size: 16.25px;
  color: var(--text-soft);
}

.ba-type {
  flex-shrink: 0;
}

.ba-more {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-panel-soft);
  color: var(--text-muted);
  font: inherit;
  font-size: 18.75px;
  cursor: pointer;
}

.ba-more:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   목록 페이지
   ══════════════════════════════════════════════════════════════════════════ */

.ba-pagehead {
  padding: 4px 0 0;
}

.ba-notice {
  margin-top: 12px;
  font-size: 18.13px;
  line-height: 1.6;
}

.ba-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* list.js가 툴바를 .ba-shell 직속으로 옮긴 뒤 붙이는 클래스: 목록을 내려도 상단바 아래에 남는다 */
.ba-toolbar--sticky {
  position: sticky;
  top: 64px;
  z-index: var(--z-popover);
  margin: calc(var(--page-gap) * -1 + 6px) 0 calc(var(--page-gap) * -1 + 6px);
  padding: 10px 0 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.ba-search--inline {
  flex: 1 1 280px;
  max-width: 380px;
  margin: 0;
}

.ba-search--inline .ba-search-input {
  height: 41px;
  padding: 0 36px;
  font-size: 19.38px;
  border-radius: 5px;
}

.ba-search--inline .ba-search-icon {
  left: 12px;
}

.ba-filters--inline {
  margin-top: 0;
  justify-content: flex-start;
}

/* ── 데이터 표 ───────────────────────────────────────────────────────────── */
.ba-datatable {
  min-width: 760px;
}

.ba-grouprow th {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
}

.ba-grouprow th:first-child {
  border-bottom: 0;
}

.ba-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ba-sortable:hover {
  color: var(--text);
}

.ba-sortable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* 정렬 표시는 실제로 정렬된 열에만 그린다 — 빈 삼각형 자리가 좁은 열의 제목을 밀어냈다 */
.ba-sortable[data-dir] .ba-sortmark::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border: 4px solid transparent;
}

.ba-sortable[data-dir='asc'] {
  color: var(--brand-text);
}

.ba-sortable[data-dir='asc'] .ba-sortmark::after {
  border-bottom-color: currentColor;
  margin-bottom: 3px;
}

.ba-sortable[data-dir='desc'] {
  color: var(--brand-text);
}

.ba-sortable[data-dir='desc'] .ba-sortmark::after {
  border-top-color: currentColor;
  margin-top: 3px;
}

.ba-datatable td {
  font-size: 18.13px;
  vertical-align: middle;
}

/* 가시성 — components.css 의 표는 헤더 --text-soft, 본문 --text-muted 라 대비가 낮다.
   데이터를 읽는 화면이므로 본문 글자색을 본문 기본색으로 올린다. */
.ba-datatable th,
.ba-datatable td,
.ba-grouprow th {
  color: var(--text);
}

.ba-datatable .ba-muted {
  color: var(--text-soft);
}

/* 이름 열이 좁아 두세 줄로 접히면 행 높이가 제각각이 된다. 최소 폭을 준다. */
.ba-col-name {
  min-width: 218px;
}

.ba-datatable .ba-col-num,
.ba-datatable .ba-price {
  white-space: nowrap;
}

.ba-row--target {
  box-shadow: inset 3px 0 0 var(--brand);
}

.ba-row--target td {
  background: var(--brand-soft);
}

/* 줄바꿈이 들어 있는 셀 (재료 목록, 취급 상품 등) */
.ba-multi {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ba-multi span {
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════════
   업종 페이지
   ══════════════════════════════════════════════════════════════════════════ */

.ba-bizlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: var(--page-gap);
}

.ba-biz {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ba-biz-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ba-biz-name {
  font-size: 23.13px;
  font-weight: 700;
  color: var(--text);
}

.ba-biz-info {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.ba-biz-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 18.13px;
}

.ba-biz-row dt {
  color: var(--text-soft);
}

.ba-biz-row dd {
  margin: 0;
  color: var(--text-muted);
}

/* 5칸 등급 막대 — 원본의 빨강/초록 막대를 토큰 색으로 다시 칠한다 */
.ba-bars {
  display: inline-flex;
  gap: 3px;
}

.ba-bar {
  width: 17px;
  height: 9px;
  border-radius: 2px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
}

.ba-bar--on.ba-bar--good {
  background: var(--status-success);
  border-color: var(--status-success);
}

.ba-bar--on.ba-bar--cost {
  background: var(--status-warning);
  border-color: var(--status-warning);
}

/* ── 요일 × 시간 유동인구 히트맵 ─────────────────────────────────────────── */
.ba-heat {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  overflow-x: auto;
}

.ba-heat-hours,
.ba-heat-row {
  display: grid;
  grid-template-columns: 30px repeat(24, 1fr);
  gap: 2px;
  align-items: center;
  min-width: 360px;
}

.ba-heat-row + .ba-heat-row {
  margin-top: 2px;
}

.ba-heat-hours {
  margin-bottom: 4px;
}

.ba-heat-hours span {
  font-family: var(--font-mono);
  font-size: 13.13px;
  color: var(--text-soft);
  text-align: center;
}

.ba-heat-day {
  font-family: var(--font-mono);
  font-size: 14.38px;
  color: var(--text-soft);
}

.ba-heat-cell {
  height: 13px;
  border-radius: 2px;
  background: var(--pill-bg);
}

.ba-heat-cell--on {
  background: var(--brand);
}

:root[data-theme='light'] .ba-heat-cell {
  background: #d7e3dd;
  border: 1px solid #bdcec5;
}

:root[data-theme='light'] .ba-heat-cell--on {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.ba-heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 15.63px;
  color: var(--text-soft);
}

.ba-heat-scale {
  display: inline-flex;
  gap: 2px;
}

.ba-heat-scale i {
  width: 13px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand);
}

/* ══════════════════════════════════════════════════════════════════════════════
   가이드 (guides/*.html)
   ══════════════════════════════════════════════════════════════════════════ */

.ba-guide {
  max-width: 780px;
}

.ba-guide-body {
  padding: 26px 30px 32px;
}

.ba-guide-body h2 {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 24.38px;
  font-weight: 700;
  color: var(--text);
}

.ba-guide-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ba-guide-body h3 {
  margin-top: 22px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.ba-guide-body p {
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.75;
  color: var(--text-muted);
}

.ba-guide-body ul,
.ba-guide-body ol {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 20px;
  line-height: 1.75;
  color: var(--text-muted);
}

.ba-guide-body li {
  margin-top: 5px;
}

.ba-guide-body li::marker {
  color: var(--text-soft);
}

.ba-guide-body b,
.ba-guide-body strong {
  color: var(--text);
  font-weight: 600;
}

.ba-guide-body a {
  color: var(--brand-text);
}

.ba-guide-body code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-code);
  font-family: var(--font-mono);
  font-size: 18.13px;
  color: var(--text);
  word-break: break-all;
}

.ba-guide-body table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 18.75px;
}

.ba-guide-body th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--table-head-bg);
  color: var(--text-soft);
  font-size: 16.25px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
}

.ba-guide-body td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.ba-guide-body td:first-child {
  color: var(--text);
  font-weight: 600;
}

.ba-guide-body .ba-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* 주소·지명 강조 — 게임 안에서 찾아가야 하는 곳 */
.ba-place {
  font-family: var(--font-mono);
  font-size: 18.13px;
  color: var(--brand-text);
  white-space: nowrap;
}

/* ── 접히는 문답 (FAQ) ───────────────────────────────────────────────────── */
.ba-qa {
  border-bottom: 1px solid var(--border);
}

.ba-qa:last-child {
  border-bottom: 0;
}

.ba-qa > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 4px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.ba-qa > summary::-webkit-details-marker {
  display: none;
}

.ba-qa > summary::before {
  content: '+';
  flex: none;
  width: 18px;
  font-family: var(--font-mono);
  font-size: 21.25px;
  color: var(--text-soft);
  text-align: center;
}

.ba-qa[open] > summary::before {
  content: '−';
  color: var(--brand-text);
}

.ba-qa > summary:hover {
  color: var(--brand-text);
}

.ba-qa > summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.ba-qa-body {
  padding: 0 4px 15px 32px;
}

.ba-qa-body p:first-child,
.ba-qa-body ul:first-child,
.ba-qa-body ol:first-child {
  margin-top: 0;
}

/* ── 가이드 목록 ─────────────────────────────────────────────────────────── */
.ba-guidegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.ba-guidecard {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  background: var(--bg-panel);
  color: inherit;
  text-decoration: none;
  transition: background 0.13s ease;
}

.ba-guidecard:hover {
  background: var(--bg-hover);
}

.ba-guidecard:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.ba-guidecard b {
  font-size: 20.63px;
  font-weight: 700;
  color: var(--text);
}

.ba-guidecard span {
  font-size: 18.13px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ── 업종 위키: 고정 목차 + 본문, 기존 테마 토큰 사용 ───────────────────── */
.ba-wiki-shell { max-width: 1360px; gap: 24px; }
.ba-wiki-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: 17.5px; color: var(--text-muted); }
.ba-wiki-breadcrumb a, .ba-wiki-meta a, .ba-wiki-sidebar a { color: var(--brand-text); }
.ba-wiki-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 0 24px; border-bottom: 1px solid var(--border); }
.ba-wiki-header h1 { margin: 12px 0 10px; font-size: 45px; line-height: 1.25; letter-spacing: -.03em; }
.ba-wiki-header h1 span { margin-left: 10px; font-size: 28.75px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.ba-wiki-header p { font-size: 21.25px; line-height: 1.6; color: var(--text-muted); }
.ba-wiki-header > img { object-fit: contain; flex: none; }
.ba-wiki-meta { margin-top: 14px; font-size: 17.5px; line-height: 1.6; color: var(--text-muted); }
.ba-wiki-layout { display: grid; grid-template-columns: 215px minmax(0,1fr); gap: 30px; align-items: start; }
.ba-wiki-sidebar { position: sticky; top: 88px; font-size: 18.75px; line-height: 1.65; }
.ba-wiki-sidebar ol { list-style: none; margin: 12px 0 24px; padding: 0; }
.ba-wiki-sidebar li { margin: 2px 0; }
.ba-wiki-sidebar nav a { display: block; padding: 6px 0; text-decoration: none; color: var(--text-muted); }
.ba-wiki-sidebar nav a:hover { color: var(--brand-text); text-decoration: underline; }
.ba-wiki-sidefacts { border-top: 1px solid var(--border); padding-top: 20px; }
.ba-wiki-sidefacts dl { margin: 12px 0; }
.ba-wiki-sidefacts dt { font-size: 17.5px; color: var(--text-muted); margin-top: 12px; }
.ba-wiki-sidefacts dd { margin: 2px 0 0; color: var(--text); }
.ba-wiki-sidefacts small { display: block; font-size: 17.5px; color: var(--text-muted); }
.ba-wiki-article { min-width: 0; }
.ba-wiki-article h2 { scroll-margin-top: 105px; line-height: 1.5; }
.ba-wiki-article .ba-wiki-lead { margin-top: 0; color: var(--text); font-size: 22.5px; line-height: 1.8; }
.ba-wiki-anchor { margin-left: 10px; font-size: 20px; text-decoration: none; font-weight: 400; }
.ba-wiki-article .ba-wiki-note { border-left: 3px solid var(--border-strong); padding-left: 14px; margin-top: 18px; font-size: 17.5px; }
.ba-wiki-steps li { padding-left: 4px; margin-top: 14px; }
.ba-wiki-scroll { overflow-x: auto; margin-top: 18px; border: 1px solid var(--border); border-radius: 4px; }
.ba-wiki-scroll:focus-visible, .ba-wiki-page a:focus-visible, .ba-wiki-page summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ba-wiki-article .ba-wiki-scroll table { margin: 0; min-width: 640px; }
.ba-wiki-scroll caption { text-align: left; padding: 12px; font-size: 17.5px; color: var(--text-muted); }
.ba-wiki-article .ba-wiki-scroll th, .ba-wiki-article .ba-wiki-scroll td { padding: 12px; font-size: 17.5px; vertical-align: top; letter-spacing: 0; text-transform: none; }
.ba-wiki-article .ba-wiki-scroll th[scope="row"] { background: transparent; color: var(--text); font-weight: 500; }
.ba-wiki-scroll small { display: block; margin-top: 5px; font-size: 17.5px; line-height: 1.5; color: var(--text-muted); font-weight: 400; }
.ba-wiki-item { display: flex; align-items: center; gap: 10px; min-width: 175px; }
.ba-wiki-item img { object-fit: contain; flex: none; }
.ba-wiki-number { font-variant-numeric: tabular-nums; }
.ba-wiki-scroll details { margin-top: 8px; font-size: 17.5px; }
.ba-wiki-scroll details ul { font-size: 17.5px; padding-left: 16px; min-width: 180px; }
.ba-wiki-budget { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; padding: 18px 20px; background: var(--bg-panel-soft); border-left: 3px solid var(--brand); font-size: 17.5px; color: var(--text-muted); }
.ba-wiki-budget strong { font-size: 35px; font-variant-numeric: tabular-nums; color: var(--text); }
.ba-wiki-details { margin-top: 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; }
.ba-wiki-details summary, .ba-wiki-scroll summary { cursor: pointer; color: var(--brand-text); }
.ba-wiki-article .ba-wiki-heat { padding: 9px 7px; text-align: center; font-variant-numeric: tabular-nums; color: var(--text); }
.ba-wiki-heat[data-level="1"] { background: color-mix(in srgb, var(--brand) 8%, var(--bg-panel)); }
.ba-wiki-heat[data-level="2"] { background: color-mix(in srgb, var(--brand) 18%, var(--bg-panel)); }
.ba-wiki-heat[data-level="3"] { background: color-mix(in srgb, var(--brand) 30%, var(--bg-panel)); }
.ba-wiki-heat[data-level="4"] { background: color-mix(in srgb, var(--brand) 44%, var(--bg-panel)); }
:root[data-theme='light'] .ba-wiki-heat[data-level="1"] { background: color-mix(in srgb, var(--brand-strong) 18%, white); }
:root[data-theme='light'] .ba-wiki-heat[data-level="2"] { background: color-mix(in srgb, var(--brand-strong) 34%, white); }
:root[data-theme='light'] .ba-wiki-heat[data-level="3"] { background: color-mix(in srgb, var(--brand-strong) 52%, white); }
:root[data-theme='light'] .ba-wiki-heat[data-level="4"] { background: color-mix(in srgb, var(--brand-strong) 70%, white); color: #fff; }
.ba-wiki-related { display: flex; flex-wrap: wrap; gap: 12px 20px; border-top: 1px solid var(--border); margin-top: 26px; padding-top: 20px; font-size: 18.75px; }
.ba-wiki-bizlink { align-self: flex-start; margin-bottom: 16px; }

/* 데이터베이스와 사업 운영 문서의 읽기 폭을 기존의 150%로 확장한다. */
.ba-content-page .ba-shell { max-width: 1860px; }
.ba-content-page .ba-guide { max-width: 1170px; }
.ba-content-page .ba-wiki-shell { max-width: 2040px; }

/* 긴 표의 하단 스크롤바와 동기화되는 상단 스크롤바. */
.ba-scroll-top {
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 8px 0 6px;
  scrollbar-color: var(--border-strong) var(--bg-panel-soft);
}
.ba-scroll-top-inner { height: 1px; }
.ba-scroll-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 개업비용·운영비 예상 빌더 (economics-*.js). 기존 테마 토큰만 사용한다. */
.ba-economics { padding: 24px; scroll-margin-top: 100px; }
.ba-econ-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ba-econ-heading h2 { font-size: 27.5px; line-height: 1.5; }
.ba-econ-disclaimer { margin-top: 14px; color: var(--text-muted); font-size: 18.75px; line-height: 1.75; border-left: 3px solid var(--warning); padding-left: 12px; }
.ba-econ-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin-top: 22px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--border); }
.ba-econ-card { padding: 18px 16px; background: var(--bg-panel-soft); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ba-econ-card > span { font-size: 17.5px; color: var(--text-muted); }
.ba-econ-card > strong { font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.3; overflow-wrap: anywhere; }
.ba-econ-card > small { color: var(--text-muted); font-size: 16.25px; line-height: 1.6; }
.ba-econ-positive > strong { color: var(--brand-text); }
.ba-econ-negative > strong { color: var(--danger); }
.ba-econ-details { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.ba-econ-details > summary { cursor: pointer; font-size: 20px; color: var(--brand-text); line-height: 1.6; }
.ba-economics fieldset { border: 1px solid var(--border); border-radius: 5px; padding: 16px; margin: 24px 0; min-width: 0; }
.ba-economics legend { padding: 0 8px; font-size: 21.25px; font-weight: 600; }
.ba-economics fieldset > p { color: var(--text-muted); font-size: 17.5px; line-height: 1.7; margin: 0 0 14px; }
.ba-economics fieldset > p:last-child { margin-top: 14px; margin-bottom: 0; }
.ba-econ-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ba-econ-presets .im-btn { min-height: 38px; font-variant-numeric: tabular-nums; }
.ba-econ-presets .im-btn small { margin-left: 4px; font-size: 15px; opacity: .8; }
.ba-econ-input-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.ba-econ-input { display: flex; flex-direction: column; gap: 7px; font-size: 17.5px; color: var(--text-muted); line-height: 1.5; }
.ba-econ-input input, .ba-econ-input select, .ba-economics td select { color: var(--text); background: var(--bg-panel); border: 1px solid var(--border-strong); padding: 9px 10px; border-radius: 4px; width: 100%; min-width: 85px; font: inherit; font-variant-numeric: tabular-nums; }
.ba-econ-input input:disabled, .ba-economics td select:disabled { opacity: .5; }
.ba-economics input:focus-visible, .ba-economics select:focus-visible, .ba-economics button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ba-econ-check { display: flex; align-items: center; gap: 6px; font-size: 17.5px; white-space: nowrap; }
.ba-econ-tablewrap { overflow-x: auto; margin-bottom: 14px; }
.ba-econ-actions + #econ-breakdown { margin-top: 18px; }
.ba-econ-tablewrap table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 17.5px; }
.ba-econ-tablewrap caption { text-align: left; padding: 0 0 10px; font-size: 18.75px; font-weight: 600; }
.ba-econ-tablewrap th, .ba-econ-tablewrap td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
.ba-econ-tablewrap th[scope="row"] { min-width: 120px; font-weight: 500; }
.ba-econ-tablewrap small { display: block; font-size: 16.25px; color: var(--text-muted); line-height: 1.6; margin-top: 4px; }
.ba-econ-tablewrap .ba-econ-estimated { color: var(--warning); }
.ba-econ-tablewrap .ba-econ-pick { width: 1%; padding-right: 0; }
.ba-econ-tablewrap .ba-econ-group th { padding-top: 16px; font-size: 16.25px; font-weight: 600; color: var(--text-muted); border-bottom: 0; }
.ba-econ-tablewrap .ba-econ-off th, .ba-econ-tablewrap .ba-econ-off td:not(:first-child) { color: var(--text-muted); opacity: .6; }
.ba-econ-input > span { display: flex; align-items: center; gap: 6px; }
.ba-economics legend .ba-econ-help { margin-left: 8px; vertical-align: middle; }
.ba-econ-help { position: relative; display: inline-flex; }
.ba-econ-help-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-panel); color: var(--brand-text); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; padding: 0; }
.ba-econ-help-btn:hover, .ba-econ-help.is-open .ba-econ-help-btn { background: var(--primary); color: #fff; border-color: var(--primary); }
.ba-econ-help-pop { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: min(420px, 80vw); padding: 14px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-panel); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 16.25px; font-weight: 400; line-height: 1.65; white-space: normal; text-align: left; }
.ba-econ-help-pop > b { display: block; margin-bottom: 8px; font-size: 17.5px; }
.ba-econ-help-pop img { display: block; width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--border); margin-bottom: 10px; }
.ba-econ-help-pop > span { display: block; color: var(--text-muted); }
.ba-econ-help-pop b { color: var(--text); }
.ba-econ-help:hover .ba-econ-help-pop, .ba-econ-help:focus-within .ba-econ-help-pop, .ba-econ-help.is-open .ba-econ-help-pop { display: block; }
.ba-econ-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ba-econ-actions span { color: var(--text-muted); font-size: 17.5px; line-height: 1.6; }
.ba-econ-method { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; }
.ba-econ-method h3 { font-size: 21.25px; margin: 12px 0; }
.ba-econ-method p, .ba-econ-method li { font-size: 18.75px; line-height: 1.8; color: var(--text-muted); }
.ba-econ-method ol, .ba-econ-method ul { padding-left: 22px; }
.ba-econ-method a { color: var(--brand-text); }
/* 빌더 공통: 버전 배지와 피드백 안내 */
.ba-builder-version { vertical-align: middle; margin-left: 8px; font-size: 15px; }
.ba-builder-notice { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--primary); background: var(--bg-panel-soft); color: var(--text-muted); font-size: 16.25px; line-height: 1.6; border-radius: 0 4px 4px 0; }
.ba-builder-notice a { color: var(--brand-text); }
.ba-econ-heading .ba-builder-notice { flex-basis: 100%; margin-top: 0; }
/* 공장 설비 빌더 */
.ba-factory { margin-top: 18px; }
.ba-factory .ba-econ-summary { grid-template-columns: repeat(6,minmax(0,1fr)); margin-top: 0; }
.ba-factory-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 14px; max-height: 420px; overflow-y: auto; padding: 2px; }
.ba-factory-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--bg-panel); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-width: 0; }
.ba-factory-chip:hover { background: var(--bg-hover); }
.ba-factory-chip.is-selected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.ba-factory-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ba-factory-chip > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ba-factory-chip b { font-size: 16.25px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-factory-chip small { font-size: 14px; color: var(--text-muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-factory-thumb { flex: none; width: 36px; height: 36px; object-fit: contain; border-radius: 4px; background: var(--bg-panel-soft); }
.ba-econ-tablewrap th[scope="row"] .ba-factory-thumb { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
.ba-factory .ba-econ-tablewrap input[type="number"] { width: 84px; min-width: 0; padding: 7px 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--bg-panel); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.ba-factory .ba-econ-tablewrap table { min-width: 1080px; }
.ba-factory .ba-econ-tablewrap th[scope="col"] { white-space: nowrap; }
.ba-factory .ba-econ-tablewrap th[scope="row"] { min-width: 200px; }
.ba-factory .ba-econ-tablewrap td { white-space: nowrap; }
.ba-factory .ba-econ-tablewrap th[scope="col"] small { display: block; font-weight: 400; color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.ba-factory .ba-econ-input input[readonly] { color: var(--text-muted); background: var(--bg-panel-soft); }
.ba-econ-card .ba-factory-unit { font-size: 17.5px; font-weight: 500; margin-left: 3px; color: var(--text); }
.ba-econ-card .ba-factory-parts { display: inline-block; margin-left: 10px; font-style: normal; font-size: 16.25px; font-weight: 500; color: var(--brand-text); white-space: nowrap; vertical-align: 3px; }
.ba-factory .ba-econ-summary { overflow: visible; }
.ba-factory .ba-econ-card:first-child { border-radius: 6px 0 0 6px; }
.ba-factory .ba-econ-card:last-child { border-radius: 0 6px 6px 0; }
.ba-econ-card > span .ba-factory-stores { margin-left: 8px; vertical-align: middle; }
.ba-factory-stores-btn { width: auto; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.ba-factory-stores .ba-econ-help-pop { left: auto; right: 0; width: min(380px, 80vw); }
.ba-factory-stores .ba-econ-help-pop ul { padding-left: 18px; margin: 0 0 10px; }
.ba-factory-stores .ba-econ-help-pop li { margin-bottom: 8px; line-height: 1.55; }
.ba-factory-stores .ba-econ-help-pop li small { color: var(--text-muted); }
.ba-factory-importers { margin-top: 14px; }
.ba-factory-importers h3 { font-size: 20px; margin: 0 0 10px; }
.ba-factory-importers ul { padding-left: 20px; }
.ba-factory-importers li { font-size: 17.5px; line-height: 1.7; margin-bottom: 8px; }
.ba-factory-importers small { color: var(--text-muted); }
@media (max-width: 1100px) { .ba-econ-summary, .ba-factory .ba-econ-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .ba-economics { padding: 18px; } .ba-econ-input-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 440px) { .ba-econ-summary, .ba-econ-input-grid { grid-template-columns: 1fr; } }
.ba-wiki-entry { margin-top: 14px; font-size: 18.75px; }
.ba-wiki-entry a { color: var(--brand-text); }
.ba-wiki-category { margin-bottom: 32px; }
.ba-wiki-category h2 { font-size: 27.5px; margin-bottom: 14px; scroll-margin-top: 100px; }
.ba-wiki-category h2 span { margin-left: 10px; font-size: 17.5px; font-weight: 400; color: var(--text-muted); }
.ba-wiki-catalogue-note { font-size: 17.5px; line-height: 1.7; color: var(--text-muted); }
.ba-wiki-skip { position: fixed; top: -100px; left: 16px; z-index: 9999; padding: 12px 18px; background: var(--bg-panel); color: var(--text); }
.ba-wiki-skip:focus { top: 12px; }
@media (max-width: 960px) {
  .ba-wiki-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .ba-wiki-sidebar { position: static; }
  .ba-wiki-sidebar ol { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 0; }
  .ba-wiki-sidefacts { display: none; }
}
@media (max-width: 520px) {
  .ba-wiki-header { gap: 12px; }
  .ba-wiki-header h1 { font-size: 37.5px; }
  .ba-wiki-header h1 span { display: block; margin: 6px 0 0; font-size: 23.75px; }
  .ba-wiki-header > img { width: 72px; height: 72px; }
}

/* ── 좁은 화면 ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .ba-home-links { grid-template-columns: 1fr; }
  .ba-home-link { min-height: 82px; }
  .ba-bizlist {
    grid-template-columns: 1fr;
  }

  .ba-search--inline {
    max-width: none;
  }

  .ba-guide-body {
    padding: 20px 18px 24px;
  }

  .ba-topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 16px;
  }

  .ba-toolbar--sticky {
    position: static;
    border-bottom: 0;
    padding: 0;
  }

  .ba-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ba-tablewrap .im-table th {
    position: static;
  }
}
