/* ===================================================================
   의료광고 컴플라이언스 체커 — 디자인 시스템
   비개발자(대표·팀장)가 설명 없이 바로 쓰도록: 명확한 동선 · 한눈에 읽히는 판정 · 절제된 전문 톤.
   =================================================================== */

:root {
  color-scheme: light;
  /* 모바일/사전 UI 토큰 */
  --panel-pad: 22px;
  --tap: 44px;
  /* 중립 팔레트 */
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --border: #e4e9f0;
  --border-strong: #cdd6e2;
  --ink: #0b1b2b;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;

  /* 브랜드 — 네이비(깊이·신뢰) + 틸(포인트·CTA) */
  --navy: #0a2540;
  --navy-2: #0e3a55;
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-light: #2dd4bf;
  --brand-ink: #134e4a;

  /* 심각도 */
  --high: #dc2626;      --high-bg: #fef2f2;   --high-bd: #fecaca;
  --medium: #d97706;    --medium-bg: #fffbeb; --medium-bd: #fde68a;
  --low: #64748b;       --low-bg: #f8fafc;    --low-bd: #e2e8f0;
  --ok: #059669;        --ok-bg: #ecfdf5;     --ok-bd: #a7f3d0;

  /* AI 고도화(보라 계열) — LLM 2차검토·재작성 표식 */
  --ai: #7c3aed;        --ai-bg: #f5f3ff;     --ai-bd: #ddd6fe;   --ai-ink: #5b21b6;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(10,37,64,.04), 0 10px 30px rgba(10,37,64,.07);
  --shadow-lg: 0 2px 8px rgba(10,37,64,.06), 0 26px 60px rgba(10,37,64,.16);
  --shadow-sm: 0 1px 2px rgba(10,37,64,.06);
  --font: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg) radial-gradient(1000px 420px at 50% 96px, rgba(255,255,255,.7), transparent 72%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

.muted { color: var(--muted); }
.is-hidden { display: none !important; }

/* ── 제작사 워드마크 띠(검정 글자 · 흰 배경 — 색상 헤더 위가 아니라 최상단 흰 띠에) ──── */
.company-bar { background: #ffffff; border-bottom: 1px solid #e8ebf0; }
.company-bar .wrap { display: block; padding-top: 9px; padding-bottom: 9px; }
.company-name { color: #000000; font-weight: 800; font-size: 15px; letter-spacing: 0.01em; }

/* ── 헤더(프리미엄 메디컬: 네이비→틸 그라디언트 + 글로우) ──── */
.site-header {
  position: relative; overflow: hidden;
  background: linear-gradient(118deg, var(--navy) 0%, var(--navy-2) 46%, #0f766e 104%);
  color: #fff;
  padding: 0 0 66px;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 320px at 84% -60px, rgba(45,212,191,.30), transparent 62%),
    radial-gradient(560px 300px at 6% 128%, rgba(13,148,136,.22), transparent 60%);
}
.site-header .wrap { position: relative; z-index: 1; display: block; }

/* 상단바: 브랜드 + 도구 */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(45,212,191,.95), rgba(13,148,136,.95));
  box-shadow: 0 6px 18px rgba(13,148,136,.45), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-weight: 500; font-size: 11px; color: #9fd8d0; letter-spacing: 0; margin-top: 2px; }

/* 히어로 */
.hero { padding: 42px 0 4px; max-width: 46ch; }
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .01em; color: #8fe8db;
  background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.30);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.hero-title { margin: 0 0 14px; font-size: 35px; line-height: 1.22; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.hero-sub { margin: 0; font-size: 15.5px; line-height: 1.66; color: #cfe1e6; max-width: 58ch; }
.hero-sub b { color: #fff; font-weight: 700; }
.hero-trust { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.hero-trust li {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #e6f2f1;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.17);
  padding: 7px 13px; border-radius: 999px;
}
.hero-trust .ht-ic { font-size: 13px; opacity: .95; }

/* 히어로 2열(넓은 화면): 좌 카피 · 우 '검수 흐름' 글라스 카드 */
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero { max-width: 46ch; }
.hero-aside { flex: 0 0 304px; }
.flowcard {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px; padding: 16px 16px 18px; box-shadow: 0 26px 60px rgba(0,0,0,.30);
}
.flowcard-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 2px 2px 0; }
.flowcard-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); }
.flowcard-dot:nth-child(1) { background: rgba(45,212,191,.85); }
.flowcard-title { margin-left: auto; font-size: 11px; font-weight: 700; color: #9fd8d0; letter-spacing: .03em; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.flow-step {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 12px 14px;
}
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; left: 31px; bottom: -10px; width: 2px; height: 10px;
  background: linear-gradient(rgba(45,212,191,.5), rgba(45,212,191,.08));
}
.flow-ic {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(135deg, rgba(45,212,191,.22), rgba(13,148,136,.22));
  border: 1px solid rgba(45,212,191,.28);
}
.flow-step > div { display: flex; flex-direction: column; line-height: 1.3; }
.flow-step b { font-size: 13.5px; font-weight: 700; color: #fff; }
.flow-step > div span { font-size: 12px; color: #bcd6da; }

/* 좁은 화면: 흐름 카드는 숨기고 카피 전폭 */
@media (max-width: 900px) {
  .hero-row { display: block; }
  .hero-aside { display: none; }
  .hero { max-width: none; }
}

main.wrap { position: relative; z-index: 2; margin-top: -46px; padding-top: 0; padding-bottom: 56px; }

/* ── 패널 공통 ──────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.input-panel { margin-bottom: 20px; box-shadow: var(--shadow-lg); border-color: #eef2f7; }

/* ── 입력 모드 탭 ───────────────────────────────────── */
.toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toggle-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: all .15s ease;
}
.toggle-btn:hover { color: var(--ink-2); }
.toggle-btn.is-active {
  background: var(--brand); color: #fff; box-shadow: var(--shadow-sm);
}

/* ── 필드 ───────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field > label {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px;
}
.field > label .muted { font-weight: 400; font-size: 12px; }

input[type="url"], input[type="text"], textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
input:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }

/* 드롭존 */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 26px 16px; cursor: pointer;
  text-align: center; transition: all .15s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: #f0fdfa; outline: none; }
.dropzone.is-drag { border-color: var(--brand); background: #ccfbf1; }
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dz-icon { font-size: 26px; opacity: .85; }
.dz-text { font-size: 13.5px; color: var(--muted); }
.dz-text strong { color: var(--brand-dark); }
.dz-file { font-size: 12.5px; }
.dz-file.has-file { color: var(--brand-dark); font-weight: 700; }

.caption-attach { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.caption-attach label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.caption-attach input[type="file"] { font-size: 13px; color: var(--muted); }

.video-note {
  margin: 14px 0 0; font-size: 12.5px; color: var(--medium);
  background: var(--medium-bg); border: 1px solid var(--medium-bd);
  padding: 9px 12px; border-radius: var(--radius-sm);
}

/* ── 액션 버튼 ──────────────────────────────────────── */
.actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.btn-primary {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 15px;
  color: #fff; background: linear-gradient(135deg, #0d9488, #0f766e); padding: 12px 30px; border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(13,148,136,.28); transition: filter .15s, box-shadow .15s, transform .05s;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(13,148,136,.36); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: var(--muted-2); cursor: default; }
.btn-ghost {
  border: 1px solid var(--border-strong); cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 13.5px; color: var(--ink-2); background: var(--surface);
  padding: 9px 16px; border-radius: var(--radius-sm); transition: background .15s;
}
.btn-ghost:hover { background: var(--surface-2); }

/* ── 상태 / 로딩 ────────────────────────────────────── */
.status {
  margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
}
.status.is-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status.is-error { background: var(--high-bg); color: var(--high); border: 1px solid var(--high-bd); }

.loading {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 36px 20px; color: var(--muted); font-size: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 보고서 ─────────────────────────────────────────── */
.report { margin-top: 8px; }
.report-head {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 24px; margin-bottom: 16px;
}
.report-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-head-top h2 { margin: 0; font-size: 18px; font-weight: 800; }
.input-ref { margin: 6px 0 0; font-size: 12.5px; word-break: break-all; }

/* 판정 배너 — 심각도 색으로 결론을 한눈에 */
.verdict-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 16px; padding: 18px 20px; border-radius: var(--radius-sm);
  font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em;
  border: 1px solid transparent; border-left-width: 5px;
}
.verdict-banner .vb-icon { font-size: 20px; line-height: 1; }
.verdict-banner.vb-high { background: var(--high-bg); color: #991b1b; border-color: var(--high-bd); }
.verdict-banner.vb-medium { background: var(--medium-bg); color: #92400e; border-color: var(--medium-bd); }
.verdict-banner.vb-low { background: var(--low-bg); color: var(--ink-2); border-color: var(--low-bd); }
.verdict-banner.vb-ok { background: var(--ok-bg); color: #065f46; border-color: var(--ok-bd); }

/* 요약 배지 */
.summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.badge-high { background: var(--high-bg); color: #991b1b; border-color: var(--high-bd); }
.badge-high::before { background: var(--high); }
.badge-medium { background: var(--medium-bg); color: #92400e; border-color: var(--medium-bd); }
.badge-medium::before { background: var(--medium); }
.badge-low { background: var(--low-bg); color: var(--ink-2); border-color: var(--low-bd); }
.badge-low::before { background: var(--low); }

/* 표면 칩 */
.surfaces { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.surface-chip {
  font-size: 12px; font-weight: 600; color: var(--brand-ink);
  background: #f0fdfa; border: 1px solid #99f6e4; padding: 4px 11px; border-radius: 999px;
}

/* 안내(notes) */
.notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.note-badge {
  font-size: 13px; color: #92400e; background: var(--medium-bg); border: 1px solid var(--medium-bd);
  padding: 9px 13px; border-radius: var(--radius-sm); display: flex; align-items: flex-start; gap: 7px;
}
.note-icon { flex-shrink: 0; font-weight: 700; }

/* ── 표면 그룹 ──────────────────────────────────────── */
.finding-group { margin-bottom: 22px; }
.finding-group > h3 {
  margin: 0 0 11px; font-size: 14px; font-weight: 800; color: var(--ink-2);
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.group-count {
  font-size: 12px; font-weight: 700; color: var(--high); background: var(--high-bg);
  border: 1px solid var(--high-bd); padding: 2px 9px; border-radius: 999px;
}
.group-note {
  margin: 0 0 11px; font-size: 12.5px; color: #92400e; display: flex; gap: 6px; align-items: flex-start;
}

/* ── 위반 카드 ──────────────────────────────────────── */
.finding-card {
  background: var(--surface); border: 1px solid var(--border); border-left-width: 5px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 15px 16px 14px; margin-bottom: 11px;
}
.finding-card.sev-high { border-left-color: var(--high); }
.finding-card.sev-medium { border-left-color: var(--medium); }
.finding-card.sev-low { border-left-color: var(--low); }

.fc-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.sev-badge {
  font-size: 11.5px; font-weight: 800; color: #fff; padding: 3px 10px; border-radius: 6px; letter-spacing: -0.01em;
}
.sev-badge.sev-high { background: var(--high); }
.sev-badge.sev-medium { background: var(--medium); }
.sev-badge.sev-low { background: var(--low); }
.fc-category { font-size: 14px; font-weight: 800; color: var(--ink); }
.at-badge {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand-ink);
  background: #f0fdfa; border: 1px solid #99f6e4; padding: 2px 9px; border-radius: 999px;
}

/* 문제 문구 */
.fc-phrase {
  margin: 0 0 9px; font-size: 14.5px; line-height: 1.7; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; word-break: keep-all; overflow-wrap: anywhere;
}
.fc-phrase .hl {
  background: #fee2e2; color: #991b1b; font-weight: 800; padding: 1px 4px; border-radius: 4px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.fc-legal { margin: 0 0 11px; font-size: 12.5px; color: var(--muted); }
.fc-legal strong { color: var(--ink-2); font-weight: 700; }

/* 추천 영역 */
.fc-suggest {
  background: #f0fdfa; border: 1px solid #99f6e4; border-radius: var(--radius-sm);
  padding: 12px 13px; margin-top: 2px;
}
.fc-suggest-row { display: flex; flex-direction: column; gap: 3px; }
.fc-suggest .label {
  font-size: 11px; font-weight: 800; color: var(--brand-dark); text-transform: none;
  letter-spacing: .02em;
}
.fc-suggest-row .text {
  font-size: 14.5px; font-weight: 600; color: var(--brand-ink); line-height: 1.6;
  word-break: keep-all; overflow-wrap: anywhere;
}

/* 접이식: 원칙 + 안전 프레임 */
.fc-more { margin-top: 11px; border-top: 1px dashed #99f6e4; padding-top: 10px; }
.fc-more > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--brand-dark);
  list-style: none; display: inline-flex; align-items: center; gap: 5px; user-select: none;
}
.fc-more > summary::-webkit-details-marker { display: none; }
.fc-more > summary::before { content: "＋"; font-weight: 800; }
.fc-more[open] > summary::before { content: "−"; }
.fc-more[open] > summary { margin-bottom: 9px; }

.fc-principle { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.fc-principle .label { font-size: 11px; font-weight: 800; color: var(--muted); }
.fc-principle .text { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

.fc-frames { display: flex; flex-direction: column; gap: 6px; }
.fc-frames .label { font-size: 11px; font-weight: 800; color: var(--muted); }
.frame-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.frame-chip {
  font-size: 13px; color: var(--brand-ink); background: #fff; border: 1px solid #99f6e4;
  border-radius: 8px; padding: 7px 11px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere;
}
.frame-chip::before { content: "✓ "; color: var(--brand); font-weight: 800; }

/* 깨끗 결과 */
.clean-result {
  display: flex; align-items: center; gap: 11px;
  background: var(--ok-bg); border: 1px solid var(--ok-bd); border-radius: var(--radius);
  padding: 20px 22px; font-size: 14.5px; color: #065f46; font-weight: 500; line-height: 1.6;
}
.clean-result .ok-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}

/* 면책 */
.disclaimer {
  margin: 18px 0 0; font-size: 12px; color: var(--muted-2); line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px;
}

/* 푸터 */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0 32px; margin-top: 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-mark {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-size: 16px;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: var(--shadow-sm);
}
.footer-brand > div { display: flex; flex-direction: column; line-height: 1.35; }
.footer-brand b { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.footer-brand > div span { font-size: 12px; color: var(--muted); }
.footer-note { margin: 0; font-size: 12.5px; color: var(--muted); max-width: 42ch; }
.site-footer .muted { font-size: 12.5px; }

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 560px) {
  .site-header { padding: 24px 0 22px; }
  .site-header h1 { font-size: 20px; }
  .panel, .report-head { padding: 17px; }
  .wrap { padding: 0 16px; }
  .toggle { width: 100%; justify-content: stretch; }
  .toggle-btn { flex: 1; text-align: center; padding: 9px 8px; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions .btn-primary, .actions .btn-ghost { width: 100%; text-align: center; } /* 범위 한정: 새 행 레이아웃(저장바·서랍)은 영향 안 받게 */
  .report-head-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .verdict-banner { font-size: 15px; }
  .at-badge { margin-left: 0; }
}

/* ===================================================================
   LLM 고도화 설정 "공간" + AI 표시 (기존 토큰·언어 그대로 사용)
   =================================================================== */

/* 헤더 우측 '⚙ 설정' 버튼 */
.site-header .wrap { position: relative; }
.settings-toggle {
  position: absolute; top: 0; right: 20px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12);
  color: #fff; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; transition: background .15s, border-color .15s;
}
.settings-toggle:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.6); }
.settings-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 설정 패널(접이식) */
.settings-panel { margin-bottom: 20px; border-top: 3px solid var(--brand); }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.settings-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.settings-close {
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 700;
  transition: background .15s, color .15s;
}
.settings-close:hover { background: var(--surface-2); color: var(--ink-2); }

/* 현재 상태 줄 */
.settings-status {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 13.5px; font-weight: 700; color: var(--ink-2);
}
.ss-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.ss-dot.is-active { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.ss-dot.is-warn { background: var(--medium); box-shadow: 0 0 0 3px var(--medium-bg); }

.settings-free {
  margin: 10px 0 18px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}

.field-hint { margin: 7px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* 제공자 라디오(세그먼트 느낌) */
.provider-toggle { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.provider-opt {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
}
.provider-opt:hover { border-color: var(--brand); }
.provider-opt input { accent-color: var(--brand); margin: 0; }
.provider-opt:has(input:checked) { border-color: var(--brand); background: #f0fdfa; color: var(--brand-ink); }

/* 키 입력 등 — 기존 input 스타일을 따르도록 type 추가 */
.settings-panel input[type="password"],
.settings-panel input[type="text"] {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.settings-panel input[type="password"]:focus,
.settings-panel input[type="text"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}

/* 드롭다운·검색 입력 공통 외형 — 설정 패널 밖(사전 패널·서랍)에서도 쓰도록 범위 해제 */
.select-input {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.select-input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}
.settings-stt { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

/* 접속 비밀번호 섹션(= .settings-stt 구분선) + 로그인 화면 */
.settings-access { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.settings-panel .settings-access input[type="password"] {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.login-panel { max-width: 440px; margin: 32px auto 0; }
.login-panel h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.login-panel input[type="password"] {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.login-panel input[type="password"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 토글 스위치 */
.switch-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative; width: 44px; height: 24px; border-radius: 999px;
  background: var(--border-strong); transition: background .18s; flex-shrink: 0;
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s;
}
.switch-input:checked + .switch-track { background: var(--brand); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-text { user-select: none; }

/* 저장 결과 메시지 */
.settings-save-msg { font-size: 13px; font-weight: 600; }
.settings-save-msg.is-ok { color: var(--ok); }
.settings-save-msg.is-error { color: var(--high); }

/* 상단 'AI 고도화 적용' 칩 */
.report-head-top .rh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-chip {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 800;
  color: var(--ai-ink); background: var(--ai-bg); border: 1px solid var(--ai-bd);
  padding: 5px 11px; border-radius: 999px; letter-spacing: -0.01em;
}

/* 위반 카드의 'AI' 배지 */
.ai-badge {
  font-size: 11px; font-weight: 800; color: #fff; background: var(--ai);
  padding: 3px 9px; border-radius: 6px; letter-spacing: .02em;
}
.ai-badge-sm {
  font-size: 10px; font-weight: 800; color: var(--ai-ink); background: var(--ai-bg);
  border: 1px solid var(--ai-bd); padding: 1px 6px; border-radius: 5px; flex-shrink: 0;
}
.ai-tag {
  font-size: 10px; font-weight: 800; color: var(--ai-ink); background: var(--ai-bg);
  border: 1px solid var(--ai-bd); padding: 1px 6px; border-radius: 5px; margin-left: 6px;
}

/* AI 2차검토 사유 */
.fc-ai-reason {
  margin: 0 0 11px; display: flex; gap: 7px; align-items: flex-start;
  font-size: 12.5px; color: var(--ai-ink); background: var(--ai-bg);
  border: 1px solid var(--ai-bd); border-radius: var(--radius-sm); padding: 8px 11px;
  word-break: keep-all; overflow-wrap: anywhere;
}
.fc-ai-reason-text { line-height: 1.55; }

@media (max-width: 560px) {
  .settings-toggle { position: static; display: inline-block; margin-bottom: 10px; align-self: flex-start; }
  .provider-opt { flex: 1; justify-content: center; }
}

/* ===================================================================
   2차 고도화 — PDF · 일괄 검수 · 검수 이력 · 재검수 · CSV
   (기존 토큰·언어 그대로: 틸 · 카드 · 배지)
   =================================================================== */

/* ── 헤더 도구(이력 · 설정) ─────────────────────────── */
.header-tools {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.header-tool-btn {
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.10);
  color: #fff; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; transition: background .15s, border-color .15s;
}
.header-tool-btn:hover { background: rgba(255,255,255,.20); border-color: rgba(255,255,255,.5); }
.header-tool-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── 검수 이력 패널 ─────────────────────────────────── */
.history-panel { margin-bottom: 20px; border-top: 3px solid var(--brand); }
.history-head-actions { display: flex; align-items: center; gap: 8px; }
.history-list { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.history-empty { font-size: 13.5px; padding: 8px 2px; }

.history-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px;
}
.history-row.is-fixed { opacity: .72; }
.hr-info { flex: 1; min-width: 0; }
.hr-main { display: flex; align-items: center; gap: 8px; }
.hr-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.hr-dot.sv-high { background: var(--high); }
.hr-dot.sv-medium { background: var(--medium); }
.hr-dot.sv-low { background: var(--low); }
.hr-dot.sv-ok { background: var(--ok); }
.hr-ref { font-size: 13.5px; font-weight: 600; color: var(--ink); word-break: break-all; }
.hr-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.hr-ts { font-size: 12px; color: var(--muted); }
.hr-verdict { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.hr-status-badge {
  font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  background: var(--ok-bg); color: #065f46; border: 1px solid var(--ok-bd);
}
.hr-status-badge.is-open {
  background: var(--surface); color: var(--muted); border-color: var(--border-strong);
}
.hr-fix-btn { flex-shrink: 0; white-space: nowrap; }
.hr-fix-btn:disabled { color: var(--ok); border-color: var(--ok-bd); background: var(--ok-bg); cursor: default; }

/* ── 일괄 파일 드롭존(여러 건 모드) ─────────────────── */
.batch-files { margin-top: 16px; }
.batch-files > label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.batch-files > label .muted { font-weight: 400; font-size: 12px; }

/* ── 일괄 보고서 ────────────────────────────────────── */
.batch-totals { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.bt-line { font-size: 15px; color: var(--ink-2); }
.bt-line strong { color: var(--ink); font-weight: 800; }

.batch-items { display: flex; flex-direction: column; gap: 11px; }
.batch-item {
  background: var(--surface); border: 1px solid var(--border); border-left-width: 5px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden;
}
.batch-item.bi-high { border-left-color: var(--high); }
.batch-item.bi-medium { border-left-color: var(--medium); }
.batch-item.bi-low { border-left-color: var(--low); }
.batch-item.bi-ok { border-left-color: var(--ok); }

.batch-item-summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 13px 15px; list-style: none; user-select: none;
}
.batch-item-summary::-webkit-details-marker { display: none; }
.batch-item-summary::after {
  content: "＋"; margin-left: 6px; font-weight: 800; color: var(--muted); flex-shrink: 0;
}
.batch-item[open] > .batch-item-summary::after { content: "−"; }
.vb-dot {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; border: 1px solid transparent;
}
.vb-dot.vb-high { background: var(--high-bg); color: #991b1b; border-color: var(--high-bd); }
.vb-dot.vb-medium { background: var(--medium-bg); color: #92400e; border-color: var(--medium-bd); }
.vb-dot.vb-low { background: var(--low-bg); color: var(--ink-2); border-color: var(--low-bd); }
.vb-dot.vb-ok { background: var(--ok-bg); color: #065f46; border-color: var(--ok-bd); }
.bi-ref { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); word-break: break-all; }
.bi-counts { display: flex; gap: 5px; flex-shrink: 0; }
.mini-badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.mini-badge.mb-high { background: var(--high-bg); color: #991b1b; }
.mini-badge.mb-medium { background: var(--medium-bg); color: #92400e; }
.mini-badge.mb-low { background: var(--low-bg); color: var(--ink-2); }
.batch-item-body { padding: 4px 15px 15px; border-top: 1px solid var(--border); }
.batch-item-body .verdict-banner { margin-top: 14px; }

/* ── 재검수 루프 ────────────────────────────────────── */
.fc-recheck { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.btn-recheck {
  border: 1px solid var(--brand); background: var(--surface); color: var(--brand-dark);
  cursor: pointer; font-family: inherit; font-weight: 700; font-size: 12.5px;
  padding: 6px 13px; border-radius: 999px; transition: background .15s, color .15s;
  flex-shrink: 0;
}
.btn-recheck:hover { background: var(--brand); color: #fff; }
.btn-recheck:disabled { opacity: .6; cursor: default; }
.fc-recheck-result { font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.fc-recheck-result.is-pass { color: #065f46; }
.fc-recheck-result.is-fail { color: var(--high); }
.fc-recheck-result.is-warn { color: var(--medium); }

/* ── 반응형(헤더 도구·일괄) ─────────────────────────── */
@media (max-width: 560px) {
  .header-tools { margin-bottom: 0; gap: 6px; }
  .header-tool-btn { font-size: 12px; padding: 6px 11px; }
  .hero-title { font-size: 24px; }
  .batch-item-summary { flex-wrap: wrap; }
  .bi-ref { flex-basis: 100%; order: 3; }
  .history-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .hr-fix-btn { width: 100%; }
}

/* ── 인쇄 / PDF ─────────────────────────────────────── */
@media print {
  body { background: #fff; }
  .no-print, .input-panel, .settings-panel, .history-panel, .header-tools,
  .site-footer, .toggle, .btn-recheck, .fc-recheck, .hero, .hero-trust { display: none !important; }
  .batch-item { break-inside: avoid; }
  .batch-item[open] > .batch-item-summary::after,
  .batch-item-summary::after { display: none; }
  .ai-chip, .ai-badge, .ai-badge-sm, .ai-tag, .fc-ai-reason { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .panel, .report-head, .finding-card, .loading { box-shadow: none; }
  .site-header { background: #fff !important; color: var(--ink) !important; padding: 12px 0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header::before { display: none !important; }
  .brand, .brand-name { color: var(--ink) !important; }
  .brand-sub { color: var(--muted) !important; }
  .brand-mark { background: var(--brand) !important; box-shadow: none !important; }
  main.wrap { margin-top: 0 !important; }
  .site-header .lede { color: var(--muted); }
  .finding-card, .finding-group, .clean-result, .verdict-banner { break-inside: avoid; }
  .fc-more { display: block; }
  .fc-more[open] > summary, .fc-more > summary { display: none; }
  .verdict-banner, .badge, .sev-badge, .fc-suggest, .group-count { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.field-hint { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════════════
   투트랙·민감어 사전·모바일 (설계_모바일_반응형.md)
   ═══════════════════════════════════════════════════════════════════════ */

img, video, svg { max-width: 100%; height: auto; }

/* 검수 방식 선택기 */
.mode-field { margin-top: 4px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-opt { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; min-height: var(--tap);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.mode-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-opt:has(input:checked) { border-color: var(--brand); background: #f0fdfa; }
.mode-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.mode-opt:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.mode-title { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.mode-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* 보고서 칩 */
.report-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mode-chip, .ai-chip { max-width: 100%; white-space: normal; line-height: 1.35; border-radius: 10px; text-align: left; }
.mode-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-family: inherit; cursor: default;
  font-size: 12px; font-weight: 800; padding: 6px 11px; border: 1px solid; min-height: 32px; }
.mode-chip.is-rule  { color: var(--brand-ink); background: #f0fdfa; border-color: #99f6e4; }
.mode-chip.is-warn  { color: #92400e; background: var(--medium-bg); border-color: var(--medium-bd); }
.mode-chip.is-error { color: #991b1b; background: var(--high-bg); border-color: var(--high); cursor: pointer; }
.mode-chip.is-off   { color: var(--muted); background: var(--surface-2); border-color: var(--border-strong); }
.chip-detail { font-weight: 600; opacity: .85; }

/* finding 카드 추가분 */
.origin-badge { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; border: 1px solid; white-space: nowrap; }
.origin-badge.is-builtin { color: var(--ink-2); background: var(--surface-2); border-color: var(--border-strong); }
.origin-badge.is-team    { color: var(--brand-ink); background: #f0fdfa; border-color: #99f6e4; }
.origin-badge.is-pattern { color: #92400e; background: var(--medium-bg); border-color: var(--medium-bd); }
.verified-tag { font-size: 10.5px; font-weight: 800; color: #065f46; background: var(--ok-bg); border: 1px solid var(--ok-bd); padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.fc-reason { margin: 0 0 9px; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.fc-reason .label { flex-shrink: 0; font-weight: 800; color: var(--muted); }
.fc-suggest-row .text.is-delete, .fc-suggest .is-delete { color: #92400e; }
.fc-dict-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.fc-dict-actions .btn-ghost { font-size: 12.5px; padding: 7px 12px; }
.fc-suppressed-by { font-size: 12px; color: var(--muted); margin: 0 0 8px; overflow-wrap: anywhere; }

/* 제외된 항목 */
.suppressed { margin-top: 14px; }
.suppressed > summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.suppressed > summary::-webkit-details-marker { display: none; }
.suppressed > summary::before { content: "+"; font-weight: 800; }
.suppressed[open] > summary::before { content: "\2212"; }
.finding-card.is-suppressed { opacity: .78; border-left-color: var(--border-strong); }

/* 사전 패널 */
.lexicon-panel { width: min(1200px, calc(100vw - 60px)); margin-left: calc((100% - min(1200px, calc(100vw - 60px))) / 2); padding: var(--panel-pad); }
.lex-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 4px; }
.lex-status.is-error { background: var(--high-bg); border-color: var(--high-bd); color: #991b1b; }
.lex-status details { flex-basis: 100%; }
.lex-status details ul { margin: 6px 0 0; padding-left: 18px; }
.lex-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 8px; }
.lex-tools-wide { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lex-tools-narrow { display: none; gap: 8px; }
.lex-sep { width: 1px; height: 22px; background: var(--border); }
.lex-search { flex: 1 1 220px; min-width: 0; }
.lex-menu { position: relative; }
.lex-menu > summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer; }
.lex-menu > summary::-webkit-details-marker { display: none; }
.lex-menu > menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; margin: 0; padding: 6px; min-width: 180px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; list-style: none; }
.lex-menu > menu > button { text-align: left; border: 0; background: transparent; font: inherit; padding: 10px 12px; min-height: var(--tap); border-radius: 8px; cursor: pointer; width: 100%; }
.lex-menu > menu > button:hover { background: var(--surface-2); }
.lex-chips { display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap; max-width: 100%; min-width: 0; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; margin-bottom: 8px; }
.lex-chip { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lex-chip.is-on { border-color: var(--brand); background: #f0fdfa; color: var(--brand-ink); }

/* 사전 표(데스크톱) */
.lex-table-wrap { overflow: auto; max-height: min(70vh, 720px); border: 1px solid var(--border); border-radius: var(--radius-sm); max-width: 100%; min-width: 0; }
.lex-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.lex-table th, .lex-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.lex-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 12px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.lex-table .c-term { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 180px; max-width: 260px; overflow-wrap: anywhere; font-weight: 700; }
.lex-table thead .c-term { z-index: 3; background: var(--surface-2); }
.lex-row.is-builtin td { background: var(--surface-2); } .lex-row.is-builtin .c-term { background: var(--surface-2); }
.lex-row.is-disabled td { opacity: .55; }
.lex-row.is-changed td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.lex-row:hover td { background: #f0fdfa; } .lex-row:hover .c-term { background: #f0fdfa; }
.lex-row { cursor: pointer; }
.lex-table .c-mobile { display: none; }
.lex-table .c-repl, .lex-table .c-reason, .lex-table .c-basis { min-width: 140px; max-width: 230px; overflow-wrap: anywhere; }
.lex-table .c-edit { width: 44px; text-align: center; }
.lex-row-edit { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; width: 32px; height: 32px; font-weight: 800; color: var(--muted); cursor: pointer; }
.is-re { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px; }
.lex-count { font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.lex-readonly { margin-top: 10px; }
.lex-readonly > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.lex-soften { font-size: 12.5px; line-height: 1.7; margin-top: 6px; }

/* 저장 바 */
.lex-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  margin: 16px calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)); padding: 10px var(--panel-pad) calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -6px 16px rgba(15,23,42,.06); }
.lex-savebar.is-dirty { border-top-color: var(--brand); background: #f0fdfa; }
.lex-dirty-count { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.lex-savebar .btn-primary, .lex-savebar .btn-ghost { width: auto; flex-shrink: 0; padding: 10px 18px; }

/* 서랍(시트) */
.lex-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 59; }
.lex-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); z-index: 60; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; background: var(--surface); box-shadow: -8px 0 32px rgba(15,23,42,.18); }
.lex-drawer-head { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid var(--border); }
.lex-drawer-head h3 { flex: 1; margin: 0; font-size: 16px; font-weight: 800; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lex-drawer-head .btn-ghost, .lex-drawer-head .btn-primary { width: auto; flex-shrink: 0; padding: 9px 14px; }
.lex-drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
.lex-drawer .field { margin-bottom: 14px; }
.lex-drawer input.is-re, .lex-drawer textarea.is-re { font-family: ui-monospace, Consolas, monospace; }
.lex-word-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lex-word-chip { min-height: 36px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 14px; cursor: pointer; }
.lex-word-chip.is-on { border-color: var(--brand); background: #f0fdfa; color: var(--brand-ink); }
.lex-test { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.lex-test-result { font-size: 13px; overflow-wrap: anywhere; margin-top: 8px; }
.lex-test-result .ok { color: #065f46; } .lex-test-result .no { color: var(--muted); }
.lex-ex-result { font-size: 12.5px; margin-top: 6px; } .lex-ex-result .pass { color: #065f46; } .lex-ex-result .fail { color: #991b1b; }
.lex-drawer-danger { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.lex-drawer-msg { margin-top: 10px; font-size: 13px; }

/* 좁음(<=760) */
@media (max-width: 760px) {
  .header-tools { margin-bottom: 0; }
  .site-header { padding: 0 0 48px; }
  .topbar { padding-top: 16px; }
  .hero { padding: 30px 0 2px; max-width: none; }
  .hero-title { font-size: 27px; }
  .hero-sub { font-size: 14.5px; }
  .hero-eyebrow { margin-bottom: 14px; }
  main.wrap { margin-top: -32px; }
  /* 입력 모드 탭: 좁은 화면에서 글자 단위로 쪼개지지 않게 가로 스크롤 스트립으로 */
  .toggle { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .toggle::-webkit-scrollbar { display: none; }
  .toggle-btn { flex: 0 0 auto; white-space: nowrap; }
  input[type="url"], input[type="text"], input[type="password"], input[type="search"], input[type="number"], textarea, select, .select-input { font-size: 16px; }
  .lexicon-panel { width: auto; margin-left: 0; }
  .lex-tools-wide { display: none; }
  .lex-tools-narrow { display: flex; }
  .lex-toolbar { flex-direction: column; align-items: stretch; }
  .lex-tools-narrow > .lex-menu { flex: 1; }
  .lex-tools-narrow summary { width: 100%; justify-content: center; }
  .lex-menu > menu { right: 0; left: auto; }
  .lex-tools-narrow > .lex-menu:first-child > menu { left: 0; right: auto; }
  .lex-search { flex-basis: auto; width: 100%; }
  .lex-table-wrap { overflow: visible; max-height: none; border: 0; border-radius: 0; }
  .lex-table { display: block; min-width: 0; }
  .lex-table thead { display: none; }
  .lex-table tbody { display: block; }
  .lex-table tr.lex-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 60px; margin-bottom: 8px;
    background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); }
  .lex-row.is-team { border-left-color: var(--brand); } .lex-row.is-builtin { border-left-color: var(--border-strong); }
  .lex-row.is-disabled { opacity: .55; } .lex-row.is-changed { border-left-color: var(--brand); box-shadow: 0 0 0 2px #ccfbf1; }
  .lex-row.is-builtin td { background: transparent; }
  .lex-table td { display: none; padding: 0; border: 0; position: static; background: transparent; opacity: 1; }
  .lex-table td.c-mobile, .lex-table td.c-edit { display: block; }
  .lex-table td.c-mobile { flex: 1 1 0; min-width: 0; }
  .lm-term { display: block; font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
  .lm-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
  .lex-table td.c-edit { margin-left: auto; width: auto; }
  .lex-row-edit { width: var(--tap); height: var(--tap); }
  .lex-drawer { width: 100%; left: 0; }
}

/* 폰 세로(<=560) 추가분 */
@media (max-width: 560px) {
  .mode-switch { grid-template-columns: 1fr; }
  .report-head-top .rh-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .report-head-top .rh-actions .btn-ghost { width: 100%; }
  .chip-detail { flex-basis: 100%; }
  .fc-dict-actions { flex-direction: column; }
  .fc-dict-actions .btn-ghost { width: 100%; }
  :root { --panel-pad: 17px; }
}

/* 터치 타깃 */
@media (pointer: coarse), (max-width: 760px) {
  .header-tool-btn, .toggle-btn, .btn-primary, .btn-ghost, .btn-recheck,
  .provider-opt, .mode-opt, .lex-chip, .lex-tools-wide button, .lex-tools-narrow button,
  .lex-menu > summary, .suppressed > summary, .lex-row-edit { min-height: var(--tap); }
  .settings-close { width: var(--tap); height: var(--tap); }
  button, [role="button"], summary, .toggle-btn, .provider-opt, .mode-opt, .lex-row, .lex-chip { touch-action: manipulation; }
}

/* 스크롤 잠금(서랍 열림) */
body.has-sheet { position: fixed; width: 100%; overflow: hidden; }

/* 인쇄 */
@media print {
  .lexicon-panel, .lex-drawer, .lex-backdrop, .mode-field, .report-chips .ai-chip { display: none !important; }
  .suppressed { display: block; } .suppressed > summary { display: none; }
  .suppressed .suppressed-list { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .lex-drawer { transition: transform .2s ease; }
}

/* ══ 필수 표기 점검(B) · 순화본(C) · 일괄 요약표 — 2026-10-28 ══ */
.disclosures-wrap, .clean-copy-wrap { margin: 14px 0; }
.disclosures { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.disclosures h3 { font-size: 15px; margin: 0 0 8px; }
.disc-scope { font-weight: 400; color: var(--muted-2); font-size: 12px; }
.disc-trunc { font-size: 12px; color: var(--medium); background: var(--medium-bg); border-radius: 6px; padding: 5px 9px; margin: 4px 0 8px; }
.disc-table { display: grid; gap: 2px; }
.disc-row { display: grid; grid-template-columns: 150px 110px 1fr 180px; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); align-items: start; font-size: 13px; min-width: 0; }
.disc-row:last-child { border-bottom: 0; }
.disc-label { font-weight: 600; }
.disc-level { font-weight: 400; color: var(--muted-2); font-size: 11px; }
.disc-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 5px; }
.db-ok { background: var(--ok-bg); color: var(--ok); }
.db-mid { background: var(--medium-bg); color: var(--medium); }
.db-high { background: var(--high-bg); color: var(--high); }
.db-low { background: var(--low-bg); color: var(--muted); }
.disc-evidence { min-width: 0; overflow-wrap: anywhere; }
.disc-evidence mark { background: #fef9c3; padding: 0 2px; border-radius: 3px; }
.disc-evidence small { display: block; color: var(--muted-2); font-size: 11px; }
.disc-evidence em { color: var(--muted); font-style: normal; font-size: 12.5px; }
.disc-basis { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.disc-notice, .disc-foot { font-size: 11.5px; color: var(--muted-2); margin: 6px 0 0; }
.disc-na { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 9px 12px; margin: 8px 0; }

.clean-copy { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.clean-copy h3 { font-size: 15px; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-by { font-weight: 400; color: var(--muted-2); font-size: 12px; }
.cc-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.cc-notice { font-size: 12px; color: var(--medium); background: var(--medium-bg); border-radius: 6px; padding: 6px 10px; margin: 0 0 10px; }
.cc-surface { margin: 12px 0; }
.cc-sh { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 5px; }
.cc-stats { color: var(--muted); font-size: 11.5px; }
.cc-sh-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.cc-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; max-height: 420px; overflow: auto; margin: 0; }
.cc-mark { background: #fef3c7; border-bottom: 2px solid var(--medium); padding: 0 2px; border-radius: 3px; }
.cc-edits { font-size: 12.5px; margin-top: 6px; }
.cc-edits summary { cursor: pointer; color: var(--muted); }
.cc-edits ul { margin: 6px 0; padding-left: 18px; }
.cc-edits s { color: var(--muted-2); }
.cc-edits mark { background: #fef3c7; padding: 0 2px; }
.cc-appendix { font-size: 12.5px; background: var(--surface-2); border-radius: 8px; padding: 8px 12px 8px 26px; margin-top: 10px; }
.cc-ap-h { list-style: none; margin-left: -16px; font-weight: 700; color: var(--muted); }
.cc-recheck-result { margin-top: 6px; }

/* 로컬 사전 후교정 결과 */
.cc-dictfix-result { margin-top: 6px; font-size: 12.5px; }
.cc-dictfix-result.is-pass { color: var(--ok, #15803d); }
.cc-dictfix-result.is-warn { color: var(--danger, #b91c1c); }
.cc-dictfix-result.is-done { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.cc-dictfix-result .df-sum { font-weight: 700; margin: 0 0 4px; }
.cc-dictfix-result .df-edits { margin: 4px 0; padding-left: 18px; }
.cc-dictfix-result .df-edits li { margin: 2px 0; }
.cc-dictfix-result .df-from { color: var(--muted-2); text-decoration: line-through; }
.cc-dictfix-result .df-to { color: var(--ok, #15803d); font-weight: 600; }
.cc-dictfix-result .df-head { font-weight: 700; margin: 6px 0 2px; color: var(--muted); }
.cc-dictfix-result .df-text { margin: 0 0 4px; white-space: pre-wrap; }
.cc-dictfix-result .df-note { font-size: 11.5px; color: var(--muted); margin: 4px 0 0; }

/* 일괄 요약표 */
.batch-summary-wrap { overflow-x: auto; margin: 4px 0 12px; }
.bsum { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bsum th, .bsum td { border-bottom: 1px solid var(--border); padding: 7px 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.bsum th { background: var(--surface-2); font-size: 11.5px; color: var(--muted); position: sticky; top: 0; }
.bsum-row { cursor: pointer; }
.bsum-row:hover { background: var(--surface-2); }
.vb-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.vb-dot.vb-ok { background: var(--ok); } .vb-dot.vb-l { background: #2563eb; }
.vb-dot.vb-m { background: var(--medium); } .vb-dot.vb-h { background: var(--high); }

/* 일괄 진행 */
.batch-progress { margin: 8px 0; }
.bp-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bp-row progress { flex: 1 1 160px; height: 10px; min-width: 120px; }
.bp-text { font-size: 12.5px; color: var(--muted); }
.bt-fail { color: var(--high); font-weight: 700; }

/* 모바일: 표 → 스택 */
@media (max-width: 760px) {
  .disc-row { grid-template-columns: 1fr; gap: 3px; padding: 10px 0; }
  .disc-label { font-size: 14px; }
  .disc-basis { font-size: 11px; }
  .cc-actions, .cc-sh-actions { margin-left: 0; width: 100%; }
  .cc-text { font-size: 13px; }
}

/* 인쇄: 접힌 섹션·긴 순화본을 모두 펼친다 */
@media print {
  .disclosures, .clean-copy { display: block; break-inside: avoid; }
  .cc-actions, .cc-sh-actions, .batch-progress, .cc-edits > summary { display: none !important; }
  .cc-text { max-height: none; overflow: visible; }
  .cc-edits { display: block; }
  .batch-item { break-before: page; }
  .batch-item:first-of-type { break-before: auto; }
  .bsum thead { display: table-header-group; }
  .disc-badge, .cc-mark, .vb-dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ════════════════════════════════════════════════════════════════════════
   마스터/팀 계정 · 사용량 통계 UI(admin.js) — 자체완결(기존 토큰 재사용·외부 CDN 0).
   ════════════════════════════════════════════════════════════════════════ */
/* 헤더 계정 칩 */
.account-chip { font-weight: 700; }
.account-chip.is-warn { background: var(--medium-bg); color: var(--medium); border-color: var(--medium-bd); }

/* 토스트(권한·오류 안내) */
.mc-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--radius-sm); font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 1200; max-width: 92vw; }
.mc-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.mc-toast.is-ok { background: var(--ok); }

/* 범용 모달(비번 1회·내 계정·비번 변경) */
.mc-modal-ov { position: fixed; inset: 0; background: rgba(10,37,64,.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1100; }
.mc-modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px; max-width: 480px; width: 100%; max-height: 88vh; overflow: auto; }
.mc-modal h3 { margin: 0 0 10px; color: var(--ink); font-size: 18px; }
.mc-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.mc-pw-row { display: flex; gap: 8px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.mc-pw-code { flex: 1 1 200px; font-size: 20px; font-weight: 800; letter-spacing: .5px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; word-break: break-all; color: var(--ink); }
.mc-muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.mc-msg { font-size: 13px; min-height: 18px; margin: 8px 0 0; color: var(--muted); }
.mc-msg.is-error { color: var(--high); }
.mc-me-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
/* ★흰 모달 안의 보조 버튼(.header-tool-btn 재사용 — 계정 메뉴·모달 닫기/취소)은 헤더용 흰 글자(color:#fff)가 흰 배경에 얹혀 '흰-위-흰'으로 라벨이 안 보였다(QA 적발). 어두운 라벨로 교정. .btn-primary(저장/삭제)는 자체 색이라 영향 없음. */
.mc-me-actions .header-tool-btn,
.mc-modal-actions .header-tool-btn {
  color: var(--ink); background: var(--surface-2); border-color: var(--border-strong);
}
.mc-me-actions .header-tool-btn:hover,
.mc-modal-actions .header-tool-btn:hover {
  background: var(--border); border-color: var(--ink-2);
}
.mc-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.mc-field > span { font-weight: 600; }
.mc-input { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-height: var(--tap); box-sizing: border-box; }
.mc-input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* 관리 오버레이 */
.mc-admin-ov { position: fixed; inset: 0; background: rgba(10,37,64,.55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; z-index: 1050; overflow: auto; }
.mc-admin { background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 1040px; overflow: hidden; }
.mc-admin-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--navy); color: #fff; flex-wrap: wrap; }
.mc-admin-head h2 { margin: 0; font-size: 18px; color: #fff; flex: 0 0 auto; }
.mc-tabs { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; }
.mc-tab { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; min-height: 38px; }
.mc-tab.is-active { background: #fff; color: var(--navy); border-color: #fff; }
.mc-tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mc-pane { display: none; padding: 18px 20px; max-height: 76vh; overflow: auto; }
.mc-pane.is-active { display: block; }
.mc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.mc-card h3 { margin: 0 0 12px; font-size: 15px; color: var(--ink); }
.mc-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mc-stats-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.mc-stats-controls .mc-field { margin-top: 0; }
.mc-stats-controls .header-tool-btn { background: var(--brand); color: #fff; border: none; min-height: var(--tap); }
.mc-stats-controls .header-tool-btn:hover { background: var(--brand-dark); }

/* 표 */
.mc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mc-table th, .mc-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: top; }
.mc-table th { color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap; }
.mc-table code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.mc-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.mc-badge.is-on { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-bd); }
.mc-badge.is-off { background: var(--low-bg); color: var(--muted); border: 1px solid var(--low-bd); }
.mc-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-mini-btn { font: inherit; font-size: 12px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); color: var(--ink-2); cursor: pointer; min-height: 34px; }
.mc-mini-btn:hover { background: var(--surface); border-color: var(--brand); color: var(--brand-dark); }
.mc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* KPI 타일 */
.mc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.mc-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.mc-kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.mc-kpi-big { font-size: 22px; font-weight: 800; color: var(--ink); margin: 4px 0; }
.mc-kpi-sub { font-size: 12px; color: var(--muted); }
.mc-est { color: var(--medium); font-weight: 600; }
.mc-honesty { font-size: 12px; color: var(--ink-2); background: var(--medium-bg); border: 1px solid var(--medium-bd); border-radius: var(--radius-sm); padding: 10px 12px; line-height: 1.6; margin: 0 0 14px; }

/* 차트(인라인 SVG) */
.mc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.mc-legend-item { display: inline-flex; align-items: center; }
.mc-chart-scroll { overflow-x: auto; }
.mc-chart { width: 100%; min-width: 320px; height: auto; display: block; }
.mc-chart .mc-grid { stroke: var(--border); stroke-width: 1; }
.mc-chart .mc-axis { fill: var(--muted); font-size: 10px; }
.mc-chart-table { margin-top: 8px; font-size: 12px; }
.mc-chart-table summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; }
.mc-chart-table .mc-table { margin-top: 8px; }

@media (max-width: 760px) {
  .mc-form-row { grid-template-columns: 1fr; }
  .mc-kpis { grid-template-columns: repeat(2, 1fr); }
  .mc-pane { max-height: 82vh; }
  .mc-input { font-size: 16px; }   /* iOS 자동 확대 방지 + 모바일 16px 규칙 */
  .mc-tab { min-height: 44px; }    /* 터치 44px */
  /* 표 → 카드(라벨:값 스택) */
  .mc-table-cards thead { position: absolute; left: -9999px; }
  .mc-table-cards tr { display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 10px; background: var(--surface); }
  .mc-table-cards td { display: flex; justify-content: space-between; gap: 12px; border: none; padding: 6px 0; }
  .mc-table-cards td::before { content: attr(data-l); font-weight: 700; color: var(--muted); font-size: 12px; flex: 0 0 auto; }
  .mc-table-cards .mc-row-actions { justify-content: flex-end; }
}
@media (max-width: 460px) { .mc-kpis { grid-template-columns: 1fr; } }

/* ── 공용 보고서 빌더(reportHtml.js) 가 화면에도 그리는 새 요소 — 표 머리행·근거 상세·순화본 잔여·요약표 실패/판정 글자 ── */
.disc-hd { display: grid; grid-template-columns: 150px 110px 1fr 180px; gap: 8px; padding: 2px 0; border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--muted); min-width: 0; }
.disc-evidence .disc-detail { color: var(--medium); }
.cc-resid { color: var(--medium); font-weight: 700; }
.cc-resid-note { font-size: 12.5px; color: var(--medium); margin: 4px 0; }
.bsum small { color: var(--muted); display: block; }
.bsum .tier-l { white-space: nowrap; }
.vb-dot.vb-x { background: var(--border-strong, #94a3b8); }
.bsum .tr-x td { color: var(--muted); }
@media (max-width: 760px) { .disc-hd { display: none; } }
