/* ══════════════════════════════════════════════════════════════════════
   tokens-base.css — WP0 전용(2026-10 화면 개편, docs/ui-review-2026-10/redesign-spec.md)
   공통 부품: 바탕·글자 · 상단바 · 푸터 · 버튼 · 칩 · 표 · 근거 · 빈 화면·오류·로딩 · 큰 검색창 ·
   인라인 질문 패널 · 의견 패널.
   - 이 파일은 WP0만 고친다. WP-A~D는 자기 화면 파일(peers·screening·public·account.css)만 고친다.
   - 값은 전부 style.css 맨 위 토큰(:root)에서 온다. 색·크기를 새로 쓰지 말고 토큰을 쓴다.
   - style.css 뒤에 불러오므로 같은 선택자 강도면 이 파일이 이긴다.
   ══════════════════════════════════════════════════════════════════════ */

/* ── 바탕·글자 ───────────────────────────────────────────────────────── */
/* 기본 바탕은 흰색(--surface). 앱 화면이 패널 바깥을 회색(--bg)으로 두고 싶으면 body에 .app-bg를
   붙인다(base 템플릿의 {% block body_class %}). 패널 안으로 옮기기 전의 옛 화면이 회색 바탕에 떠
   보이지 않게 하려고 기본은 흰색으로 둔다. */
body { background: var(--surface); color: var(--ink); font-size: var(--t-body); line-height: var(--t-body-lh); }
body.app-bg { background: var(--bg); }
body { word-break: keep-all; overflow-wrap: anywhere; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

.t-display { font-size: var(--t-display); line-height: var(--t-display-lh); font-weight: var(--t-display-w); letter-spacing: -0.01em; }
.t-page { font-size: var(--t-page); line-height: var(--t-page-lh); font-weight: var(--t-page-w); letter-spacing: -0.01em; }
.t-title { font-size: var(--t-title); line-height: var(--t-title-lh); font-weight: var(--t-title-w); }
.t-section { font-size: var(--t-section); line-height: var(--t-section-lh); font-weight: var(--t-section-w); }
.t-body { font-size: var(--t-body); line-height: var(--t-body-lh); font-weight: var(--t-body-w); }
.t-caption { font-size: var(--t-caption); line-height: var(--t-caption-lh); font-weight: var(--t-caption-w); color: var(--ink-4); }
.text-2 { color: var(--ink-2); }
.text-3 { color: var(--ink-3); }
.text-4 { color: var(--ink-4); }
.caution { color: var(--caution); }

/* 패널: 표·질문·폼을 감싸는 평면 상자(그림자 없음). */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel-pad { padding: var(--space-4); }

/* ── 버튼(스펙 §6): 알약 없음, 밑줄 없음, 36px ──────────────────────── */
button, .button, .btn {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-control);
  background: var(--chip-bg); color: var(--ink);
  font-size: var(--t-body); line-height: 1.2; font-weight: 600; text-decoration: none;
}
button { padding: 0 14px; }
.button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
button:hover, .button:hover, .btn:hover { background: var(--accent-tint); border-color: transparent; color: var(--ink); }
button:disabled, .button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }
/* 주 버튼: 한 화면에 하나 */
button.primary, .button.primary, .btn-primary {
  background: var(--accent); color: var(--on-accent); border: 0; font-weight: 600;
}
button.primary:hover, .button.primary:hover, .btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
button.primary.big, .button.primary.big, .btn-lg { min-height: 40px; padding: 0 16px; font-size: var(--t-body); border-radius: var(--r-control); }
/* 보조 버튼: Excel로 받기, 링크 복사, 원문 공시 보기 */
.btn-secondary { background: var(--chip-bg); color: var(--ink); border: 0; }
/* 텍스트 버튼: 자세히, 취소 */
.btn-text, button.btn-text, .button.btn-text {
  background: none; color: var(--ink-3); padding: 0 8px; min-height: 32px;
}
a.btn-text { display: inline-flex; align-items: center; cursor: pointer; font-size: var(--t-body); font-weight: 600; text-decoration: none; border-radius: var(--r-control); }
.btn-text:hover, button.btn-text:hover, .button.btn-text:hover { background: none; color: var(--ink); }
/* 아이콘 버튼 32×32 */
.btn-icon, button.btn-icon {
  width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; border-radius: var(--r-control);
  display: inline-flex; align-items: center; justify-content: center; background: none; color: var(--ink-3); cursor: pointer;
}
.btn-icon:hover, button.btn-icon:hover { background: var(--chip-bg); color: var(--ink); }
/* 위험 버튼(탈퇴만) */
.btn-danger, button.danger {
  background: var(--danger); color: #fff; border: 0;
}
.btn-danger:hover, button.danger:hover { background: var(--danger); color: #fff; opacity: .9; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-control); outline: none; }
@media (max-width: 640px) {
  button, .button, .btn { min-height: 40px; }
  .btn-icon, button.btn-icon { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
}

/* ── 칩(스펙 §6) ──────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--r-chip);
  background: var(--chip-bg); color: var(--ink-3); font-size: var(--t-caption); line-height: 20px; font-weight: var(--t-caption-w);
  white-space: nowrap; vertical-align: middle;
}
.chip-include { background: var(--include-tint); color: var(--include); }  /* "포함" 결정만 */
.chip-caution { color: var(--caution); }
.chip-accent { background: var(--accent-tint); color: var(--accent); }
/* 필터 칩: 꺼짐 28px + ▾ / 켜짐 "조건 · 값" + × */
.chip-filter {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 4px 8px; border-radius: var(--r-filter);
  background: var(--chip-bg); color: var(--ink-2); font-size: var(--t-cell); font-weight: 600; white-space: nowrap;
}
.chip-filter.is-on { background: var(--accent-tint); color: var(--accent); }
.chip-filter-caret { font-size: var(--t-caption); color: var(--ink-3); }
.chip-filter-x { color: inherit; text-decoration: none; padding: 0 2px; font-size: var(--t-body); line-height: 1; }
.chip-filter-x:hover { opacity: .7; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
/* 결정 세그먼트: 포함 | 제외. 버튼 접근성 이름은 aria-label로 기존 "비교 대상에 포함/제외"를 유지한다. */
.seg { display: inline-flex; border-radius: var(--r-chip); overflow: hidden; background: var(--chip-bg); }
.seg > button, .seg > .seg-btn {
  min-height: 24px; height: 24px; padding: 0 10px; border: 0; border-radius: 0; background: transparent;
  color: var(--ink-3); font-size: var(--t-caption); font-weight: 600; line-height: 24px;
}
.seg > button:hover, .seg > .seg-btn:hover { background: var(--accent-tint); color: var(--ink); }
.seg > .is-on.is-include, .seg > [aria-pressed="true"].is-include { background: var(--include-tint); color: var(--include); }
.seg > .is-on.is-exclude, .seg > [aria-pressed="true"].is-exclude { background: var(--line); color: var(--ink); }
/* 변화 표시(스펙 §3): 증가 빨강 ▲ / 감소 파랑 ▼. 화살표와 부호를 항상 같이 쓴다. */
.delta { font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }
.delta-up { color: var(--up); }
.delta-down { color: var(--down); }
.delta-none { color: var(--ink-4); }

/* ── 페이지 머리 ──────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin: 0 0 var(--space-3); flex-wrap: wrap; }
.page-head-title { margin: 0; font-family: var(--font-body); font-size: var(--t-title); line-height: var(--t-title-lh); font-weight: var(--t-title-w); letter-spacing: 0; }
.page-head-caption { margin: 2px 0 0; font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--ink-4); }
.page-head-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.interp { margin: 0 0 var(--space-3); font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--ink-2); }

/* ── 표(스펙 §7) ────────────────────────────────────────────────────
   쓰는 법: <div class="dt-panel"><div class="dt-head">…</div><div class="dt-wrap"><table class="dt">…
   행 40px, 머리 36px, 세로선·줄무늬 없음, 숫자 열(.num) 오른쪽 정렬. 첫 열 고정: <table class="dt dt-sticky">. */
.dt-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.dt-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px 16px; flex-wrap: wrap; }
.dt-head-title { margin: 0; font-family: var(--font-body); font-size: var(--t-section); line-height: var(--t-section-lh); font-weight: var(--t-section-w); letter-spacing: 0; }
.dt-head-side { display: flex; align-items: center; gap: var(--space-3); }
.source-line { margin: 0; font-size: var(--t-caption); line-height: var(--t-caption-lh); font-weight: var(--t-caption-w); color: var(--ink-4); }
.dt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.dt { width: 100%; border-collapse: collapse; font-size: var(--t-cell); line-height: var(--t-cell-lh); font-weight: var(--t-cell-w); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dt th {
  height: 36px; padding: 0 8px; text-align: left; white-space: nowrap; background: none;
  font-size: var(--t-header); line-height: var(--t-header-lh); font-weight: var(--t-header-w); color: var(--ink-3);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.dt td { height: 40px; padding: 0 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt th:first-child, .dt td:first-child { padding-left: 16px; }
.dt th:last-child, .dt td:last-child { padding-right: 16px; }
.dt .num { text-align: right; }
.dt tbody tr:hover > td { background: var(--surface-muted); }
.dt tbody tr:last-child > td { border-bottom: 0; }
.dt td.co, .dt .co { color: var(--ink); font-size: var(--t-cell-strong); font-weight: var(--t-cell-strong-w); }
.dt .co-sub { display: block; font-size: var(--t-caption); line-height: var(--t-caption-lh); font-weight: var(--t-caption-w); color: var(--ink-4); }
.dt tr.two-line > td { height: 52px; }
.dt a { color: inherit; text-decoration: none; }
.dt a:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.dt .empty { color: var(--ink-4); }
/* 정렬 가능한 머리: ▲▼ 12px, 정렬 중이면 --ink */
.dt th .sort-link { color: inherit; text-decoration: none; }
.dt th.is-sorted, .dt th.is-sorted .sort-link { color: var(--ink); }
/* 기준 회사 행: 바탕 accent-tint, 글자 accent */
.dt tr.is-base > td, .dt tr.is-base:hover > td { background: var(--accent-tint); color: var(--accent); }
.dt tr.is-base .co { color: var(--accent); }
/* 중앙값 행: 위아래 1px --line-strong, 글자 --ink-3 */
.dt tr.is-median > td { color: var(--ink-3); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.dt tr.is-median .co { color: var(--ink-3); font-weight: var(--t-cell-w); }
/* 제외된 행: 글자 전부 --ink-3(줄 긋지 않음) */
.dt tr.is-excluded > td, .dt tr.is-excluded .co { color: var(--ink-3); }
/* 회사 표시: 16px 네모 + 첫 글자 12px(로고 이미지 금지) */
.co-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 4px;
  background: var(--chip-bg); color: var(--ink-3); font-size: var(--t-caption); line-height: 1; font-weight: 600; vertical-align: -3px;
}
/* 첫 열 고정 가로 스크롤(열이 많은 표) */
.dt-sticky th:first-child, .dt-sticky td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.dt-sticky tbody tr:hover > td:first-child { background: var(--surface-muted); }
.dt-sticky tr.is-base > td:first-child { background: var(--surface); background-image: linear-gradient(var(--accent-tint), var(--accent-tint)); }

/* ── 근거(스펙 §8): ■ 칩 → 행 아래 펼침 → DART 원문 ↗ ─────────────── */
.chip-evidence { gap: 5px; text-decoration: none; cursor: pointer; border: 0; }
.chip-evidence:hover { background: var(--accent-tint); color: var(--accent); }
.evi-sq { display: inline-block; width: 8px; height: 8px; background: currentColor; border-radius: 1px; }
.dt tr.evidence > td { height: auto; padding: 0; background: var(--surface-muted); border-bottom: 1px solid var(--line); }
.evidence-body { margin: 0; padding: 12px 16px; border-left: 2px solid var(--line); font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--ink-2); }
.evidence-body strong, .evidence-body b { font-weight: 600; color: var(--ink); }
.evidence-meta { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: 8px; font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--ink-4); flex-wrap: wrap; }
.evidence-meta a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.evidence-meta a:hover { color: var(--ink); }
.evidence-missing { font-size: var(--t-caption); color: var(--ink-4); }

/* ── 빈 화면·오류·로딩(스펙 §10-H) ─────────────────────────────────── */
.state-empty { padding: var(--space-5) var(--space-4); text-align: left; }
.state-empty-title { margin: 0 0 4px; font-family: var(--font-body); font-size: var(--t-section); line-height: var(--t-section-lh); font-weight: var(--t-section-w); letter-spacing: 0; }
.state-empty-body { margin: 0; color: var(--ink-2); font-size: var(--t-body); line-height: var(--t-body-lh); }
.state-empty-extra { margin-top: var(--space-3); }
.state-error {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 16px;
  background: var(--surface-muted); border-left: 2px solid var(--danger); color: var(--ink); font-size: var(--t-body);
}
.skeleton { display: flex; flex-direction: column; gap: 4px; padding: 0 16px; }
.skeleton-row { height: 36px; border-radius: var(--r-chip); background: var(--chip-bg); }
.skeleton-note { margin: var(--space-3) 16px 0; font-size: var(--t-caption); color: var(--ink-4); }
.skeleton-note[hidden] { display: none; }

/* ── 큰 검색창(스펙 §5): 탭 2개 + 52px 입력 + 예시 칩 ──────────────────
   마크업(템플릿에서 직접 쓴다 — 탭 전환은 화면 JS가 맡는다):
   <div class="bigsearch"><div class="bigsearch-tabs" role="tablist"><button role="tab" aria-selected="true">…</button>…</div>
   <form class="bigsearch-form"><input class="bigsearch-input"><button class="primary">찾기</button></form>
   <div class="bigsearch-examples"><span>예시</span><a class="chip">…</a></div></div> */
.bigsearch { max-width: 720px; }
.bigsearch-tabs { display: flex; gap: var(--space-4); margin-bottom: var(--space-3); }
.bigsearch-tabs > button, .bigsearch-tabs > a {
  min-height: 32px; padding: 0 0 6px; border: 0; border-radius: 0; background: none; color: var(--ink-3);
  font-size: var(--t-body); font-weight: 600; border-bottom: 2px solid transparent; text-decoration: none;
}
.bigsearch-tabs > [aria-selected="true"], .bigsearch-tabs > .is-active { color: var(--ink); border-bottom-color: var(--accent); }
.bigsearch-tabs > button:hover { background: none; color: var(--ink); }
.bigsearch-form {
  display: flex; align-items: center; gap: var(--space-2); height: 52px; padding: 0 6px 0 16px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-control);
}
.bigsearch-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.bigsearch-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; font-family: inherit; box-shadow: none; }
.bigsearch-input:focus, .bigsearch-input:focus-visible { box-shadow: none; }
.bigsearch-form button { min-height: 40px; }
.bigsearch-examples { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-3); font-size: var(--t-caption); color: var(--ink-4); }
.bigsearch-examples a { text-decoration: none; }
@media (max-width: 640px) {
  .bigsearch-form button.primary { width: 40px; padding: 0; overflow: hidden; }
}

/* ── 인라인 질문 패널(스펙 §9 모양만): 화면을 덮지 않는다 ─────────── */
.inline-ask { position: relative; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.inline-ask-x { position: absolute; top: 8px; right: 8px; }
.inline-ask-q { margin: 0 32px 0 0; font-size: var(--t-body); line-height: var(--t-body-lh); font-weight: 600; color: var(--ink); }
.inline-ask-sq { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--accent); border-radius: 1px; }
.inline-ask-note { margin: 4px 0 0 16px; font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--ink-3); }
.inline-ask-body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 12px 0 0 16px; }
.inline-ask-body input[type="text"] { flex: 1; min-width: 200px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); color: var(--ink); font-size: var(--t-body); }
@media (max-width: 640px) { .inline-ask-body { margin-left: 0; } .inline-ask-note { margin-left: 0; } }

/* ══ 상단바(스펙 §4): 56px, --surface, 아래 1px --line ═══════════════ */
.topbar {
  position: relative; display: flex; align-items: center; gap: var(--space-4); height: 56px; min-height: 56px;
  padding: 0 var(--space-5); background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: var(--space-5); min-width: 0; }
.topbar .brand { font-size: 20px; }
.topbar-nav { display: flex; align-items: center; gap: var(--space-4); }
.topbar-nav-link {
  display: inline-flex; align-items: center; height: 56px; padding: 0 2px; color: var(--ink-3); text-decoration: none;
  font-size: var(--t-body); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; box-sizing: border-box;
}
.topbar-nav-link:hover { color: var(--ink); }
.topbar-nav-link.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.topbar-search {
  display: flex; align-items: center; gap: 6px; height: 32px; width: 240px; padding: 0 8px; margin: 0 auto 0 0;
  background: var(--chip-bg); border-radius: var(--r-control); color: var(--ink-3);
}
.topbar-search:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-tint); }
.topbar-search-ic { flex: none; }
.topbar-search-input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink);
  font-size: var(--t-body); font-family: inherit; box-shadow: none; min-height: 0; border-radius: 0;
}
.topbar-search-input:focus, .topbar-search-input:focus-visible { box-shadow: none; }
.topbar-search-input::placeholder { color: var(--ink-4); }
.topbar-search-key {
  flex: none; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; font-family: inherit;
  font-size: var(--t-caption); line-height: 16px; color: var(--ink-4); background: var(--surface);
}
.topbar-search:focus-within .topbar-search-key { display: none; }
.topbar .topbar-search-close, .topbar .topbar-search-open { display: none; }
.topbar-right { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; flex: none; }
.topbar-feedback { color: var(--ink-3); }
.topbar-login { color: var(--ink-2); }
.topbar .button.primary { min-height: 32px; padding: 0 12px; margin-top: 0; }
.theme-toggle { border: 0; background: none; color: var(--ink-3); border-radius: var(--r-control); }
.theme-toggle:hover { background: var(--chip-bg); color: var(--ink); border: 0; }
/* 아바타(네모 8px, 첫 글자) + 메뉴 */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-control);
  background: var(--chip-bg); background-image: none; color: var(--ink-2); font-size: var(--t-body); font-weight: 600; flex: none;
}
.nav-menu[open] > .nav-avatar, .nav-avatar:hover { background: var(--accent-tint); color: var(--accent); }
.nav-menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-pop);
}
.nav-menu-pop a { display: block; padding: 8px 10px; border-radius: var(--r-chip); color: var(--ink-2); text-decoration: none; font-size: var(--t-body); }
.nav-menu-pop a:hover { background: var(--surface-muted); color: var(--ink); }
.nav-menu-email { margin: 0; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: var(--t-caption); color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
/* 관리자: 같은 틀 + ADMIN 중립 칩만(예전 어두운 헤더는 없앴다) */
body:has(.admin-wrap) .topbar { background: var(--surface); border-bottom-color: var(--line); }
body:has(.admin-wrap) .topbar .brand, body:has(.admin-wrap) .topbar .brand-mark { color: var(--ink); }
body:has(.admin-wrap) .topbar .brand::after {
  content: "ADMIN"; margin-left: var(--space-2); padding: 0 6px; border-radius: var(--r-chip); background: var(--chip-bg);
  color: var(--ink-3); font-size: var(--t-caption); line-height: 20px; font-weight: 500; letter-spacing: 0;
}
body:has(.admin-wrap) { background: var(--bg); }

/* 1024px 미만: 메뉴는 상단바 아래 가로 탭 줄, 검색창은 아이콘 버튼 → 누르면 상단바 전체가 검색창 */
@media (max-width: 1023px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 0 var(--space-4); row-gap: 0; }
  .topbar-left { display: contents; }
  .topbar .brand { order: 1; height: 56px; }
  .topbar-right { order: 3; margin-left: auto; height: 56px; }
  .topbar .topbar-search-open { display: inline-flex; order: 2; margin-left: auto; }
  .topbar .topbar-search-open + .topbar-right { margin-left: 0; }
  .topbar-nav { order: 4; flex-basis: 100%; gap: var(--space-5); overflow-x: auto; border-top: 1px solid var(--line); margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); }
  .topbar-nav-link { height: 40px; }
  .topbar-search { display: none; }
  .topbar.is-searching .topbar-search {
    display: flex; position: absolute; inset: 0 0 auto 0; z-index: 5; width: auto; height: 56px; margin: 0; padding: 0 var(--space-4);
    border-radius: 0; background: var(--surface); box-shadow: none; border-bottom: 1px solid var(--line);
  }
  .topbar.is-searching .topbar-search-key { display: none; }
  .topbar.is-searching .topbar-search-close { display: inline-flex; }
  .topbar.is-searching .topbar-search-open { display: none; }
}
@media (max-width: 480px) {
  .topbar-feedback { padding: 0 4px; }
  .topbar-login { padding: 0 4px; }
}

/* ══ 푸터(스펙 §4): 전부 12px --ink-4 ═════════════════════════════════ */
.footer { max-width: 1280px; margin: 0 auto; padding: var(--space-6) var(--space-5); text-align: left; color: var(--ink-4); font-size: var(--t-caption); line-height: 1.7; }
.footer p { margin: 0 0 var(--space-2); }
.footer a { color: var(--ink-4); text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover { color: var(--ink-2); }
.footer a.brand, .footer a.brand:hover { color: var(--ink); text-decoration: none; }
.app-footer { padding: var(--space-5) var(--space-5) var(--space-6); border-top: 0; }
.public-footer { display: block; border-top: 1px solid var(--line); padding: var(--space-7) var(--space-5) var(--space-6); }
.public-footer .footer-columns { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--space-5); margin-bottom: var(--space-5); text-align: left; }
.public-footer .footer-col h3 { margin: 0 0 var(--space-2); font-size: var(--t-caption); line-height: var(--t-caption-lh); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.public-footer .footer-col a { display: block; margin-bottom: 4px; font-size: var(--t-caption); line-height: 1.7; color: var(--ink-4); text-decoration: none; }
.public-footer .footer-col a:hover { color: var(--ink-2); }
.public-footer .footer-brand p { margin: var(--space-2) 0 0; font-size: var(--t-caption); color: var(--ink-4); max-width: 220px; }
.public-footer .footer-brand .brand { font-size: 18px; }
@media (max-width: 900px) {
  .public-footer .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .public-footer .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer, .public-footer { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* ══ 의견 패널: 떠 있는 버튼 대신 상단바 "의견"이 연다(스펙 §9) ════════
   래퍼(#feedback-widget)는 배경·테두리가 없다 — 예전엔 .feedback-widget 클래스를 같이 써서
   모든 페이지 맨 아래에 빈 둥근 막대가 남았다. */
.feedback-widget-root { display: contents; }
.feedback-widget-panel {
  position: fixed; top: 60px; right: max(var(--space-4), env(safe-area-inset-right)); bottom: auto; z-index: 70;
  width: min(340px, calc(100vw - 2 * var(--space-4))); max-height: calc(100vh - 72px); overflow-y: auto;
  padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  box-shadow: var(--shadow-pop);
}
.feedback-widget-panel[hidden] { display: none; }
.feedback-exit-ask {
  position: fixed; right: max(var(--space-4), env(safe-area-inset-right)); bottom: var(--space-4); top: auto; z-index: 41;
  border-radius: var(--r-panel); box-shadow: var(--shadow-pop);
}
@media (max-width: 480px) {
  .feedback-widget-panel { right: var(--space-3); top: 56px; }
  .feedback-exit-ask { right: var(--space-3); bottom: var(--space-3); }
}
