:root {
  --bg: #f4f1ea;
  --ink: #1c1916;
  --muted: #6b645c;
  --paper: #fffdf8;
  --line: #ddd6cb;
  --accent: #1f5a4e;
  --accent-2: #17453c;
  --warn: #8a5a12;
  --danger: #a33b32;
  --chip: #ece7dd;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}
img, video, canvas, svg { max-width: 100%; height: auto; }
.product-grid, .brochure-list, .symptom-grid, .type-row, .factor-row,
.composer, .result-chat-form, .wizard-nav, .msg, .bubble {
  min-width: 0;
}
/* 역할별 터치 타깃 — 전역 44px는 칩/아이콘을 부풀리므로 쓰지 않음 */
.primary-btn, .btn-ghost, .symptom-btn {
  min-height: 44px;
}
.chip, .step-dot, .kb-count, .doc-delete, .src-btn, .ask-suggest-chip {
  min-height: 36px;
}
button:focus-visible,
.chip:focus-visible,
a.product-source:focus-visible,
.suggest li:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden { display: none !important; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 28px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; }
.tag { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 420px; }
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kb-count {
  font-size: 12px; color: var(--accent); font-weight: 700;
  padding: 6px 12px; border: 1px solid var(--accent); border-radius: 12px;
  background: transparent; cursor: pointer; font-family: inherit;
  line-height: 1.2;
}
.kb-count[aria-expanded="true"] { background: var(--accent); color: #fff; }

.brochure-panel {
  padding: 16px 28px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brochure-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.brochure-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #fffdf8;
}
.brochure-card strong { display: block; font-size: 15px; }
.brochure-summary { margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.brochure-actions {
  display: flex; flex-wrap: nowrap; gap: 8px; align-items: stretch; margin-top: 12px;
}
.brochure-actions .product-source,
.brochure-actions .ask-doc-btn {
  flex: 1; box-sizing: border-box;
  height: 36px; min-height: 36px; max-height: 36px;
  padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  text-align: center; white-space: nowrap;
}
.ask-doc-btn {
  background: #e4f0eb; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 10px; padding: 0 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; min-height: 36px; height: 36px;
}
.ask-doc-btn:hover { background: #d5e8e0; border-color: var(--accent-2); color: var(--accent-2); }
.ask-doc-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 10px; padding: 10px 12px;
  background: #f0f7f4; border: 1px solid var(--line); border-radius: 12px;
}
.ask-doc-label { flex: 1; font-size: 14px; font-weight: 700; color: var(--accent); }

.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  border-radius: 12px; padding: 8px 14px; font-size: 13px; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.privacy {
  margin: 0; padding: 10px 28px;
  background: #efe8d8; font-size: 13px; color: var(--warn);
}
.privacy summary { cursor: pointer; }
.privacy ol { margin: 8px 0 4px; padding-left: 18px; color: var(--ink); }

.policy-panel {
  padding: 16px 28px 8px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.upload {
  border: 1.5px dashed var(--line); border-radius: 12px;
  padding: 18px; text-align: center; cursor: pointer; background: var(--bg);
}
.upload.drag, .upload:hover { border-color: var(--accent); }
.upload-text { font-size: 14px; }
.upload-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.policy-copy { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.doc-group { font-size: 13px; font-weight: 700; margin: 16px 0 0; }
.doc-list { list-style: none; margin: 4px 0 0; padding: 0; }
.doc-empty { font-size: 12px; color: var(--muted); padding: 8px 0; list-style: none; }
.doc-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.doc-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.badge.ready { background: #d7eee4; color: var(--accent); }
.badge.processing { background: #f3e6c8; color: var(--warn); }
.badge.failed { background: #f6d9d6; color: var(--danger); }
.doc-delete {
  border: 0; background: none; color: var(--danger); cursor: pointer;
  font-size: 12px; font-family: inherit; padding: 6px 8px; line-height: 1.2;
}

#interview { max-width: 720px; margin: 0 auto; padding: 28px 20px 80px; }
.step-label {
  display: inline-block; margin: 8px 0 0;
  font-size: 12px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.08em;
}
h1 { font-size: 32px; line-height: 1.25; margin: 6px 0 10px; letter-spacing: -0.5px; }
h2 { font-size: 20px; margin: 8px 0 12px; }
.opt { font-size: 13px; color: var(--muted); font-weight: 500; }
.kb-hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.45; }
.group-title-row {
  display: flex; align-items: center; gap: 8px; margin: 18px 0 8px;
}
.group-title-row .group-title { margin: 0; flex: 1; }
.info-btn {
  flex-shrink: 0; box-sizing: border-box;
  width: 32px; height: 32px; min-height: 32px; min-width: 32px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--accent);
  font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
  font-family: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.info-btn:hover { border-color: var(--accent); background: #e4f0eb; }
.free-input {
  margin: 20px 0 8px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 16px; background: #fffdf8;
}
.free-input .group-title { margin: 0 0 6px; }
.free-input .fold-copy { margin: 0 0 10px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.care-notice {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px;
  background: #fff4ec; border: 1px solid #e8c4a8; color: var(--warn);
  font-size: 13px; line-height: 1.45;
}

.symptom-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 20px;
}
.symptom-btn {
  font-size: 18px; font-weight: 700; padding: 22px 12px;
  border: 1.5px solid var(--line); border-radius: 16px;
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.symptom-btn:hover { border-color: var(--accent); }
.symptom-btn.on {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
#symptomInput, #queryInput {
  width: 100%; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: var(--paper); color: var(--ink);
}
#symptomInput:focus, #queryInput:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; }
.chip-label { font-size: 13px; color: var(--muted); }
.chip {
  font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--chip); color: var(--ink);
  font-family: inherit; line-height: 1.2;
}
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.primary-btn {
  margin-top: 8px; background: var(--accent); color: #fff; border: 0;
  border-radius: 12px; padding: 12px 22px; font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.primary-btn:disabled { opacity: .45; cursor: not-allowed; }
.primary-btn:hover:not(:disabled) { background: var(--accent-2); }

.card {
  margin-top: 24px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
}
.card h2, .card h3 { margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 13px; }
.cov-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px;
}
.cov-chip-wrap { display: inline-flex; align-items: center; gap: 4px; }
.cov-chip {
  display: inline-block;
  border: 1px solid var(--line); background: #f6fbf8; color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 700;
}
.product-grid { display: grid; gap: 10px; margin: 12px 0 16px; }
.product-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #fffdf8; font-size: 14px;
}
.product-card strong { font-size: 16px; display: block; }
.product-badges {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.scope-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
  background: var(--paper); line-height: 1.2;
}
.product-cite { color: var(--muted); font-size: 12px; margin-top: 6px; }
.factor-row {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  margin: 0 0 16px; font-size: 13px;
}
.product-snippet { margin: 8px 0 6px; font-size: 13px; line-height: 1.45; }
.product-summary { margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.product-pick-reason {
  margin: 8px 0 0; font-size: 13px; line-height: 1.45;
  color: var(--ink); background: #eef6f2; border-radius: 8px; padding: 8px 10px;
}
.product-why-list { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; line-height: 1.45; }
.product-insurer { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.product-source {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; height: 36px; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--accent);
  text-decoration: none; border-radius: 10px; border: 1px solid var(--accent);
  background: transparent; line-height: 1;
}
.product-source:hover { background: #e4f0eb; }
.doc-cats { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.product-empty {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 16px; margin: 12px 0 16px; background: #faf8f4;
}
.product-empty p { margin: 0 0 10px; font-size: 14px; }
.cov-item {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #f6fbf8; font-size: 14px;
}
.cov-item strong { font-size: 16px; }
.cov-summary { margin: 6px 0 0; }
.area-item { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
.area-item .src, .cov-item .why { color: var(--muted); font-size: 12px; margin-top: 4px; }
.policy-fold { margin-top: 16px; font-size: 14px; }
.policy-fold summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.policy-fold .muted, .policy-fold .citations { margin-top: 8px; }
.explain { white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.why-block, .caution-block {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 0 0 16px;
}
.why-block { background: #f6fbf8; }
.why-block .brief-h {
  margin: 0.85em 0 0.4em; font-size: 15px; font-weight: 700; color: var(--ink);
}
.why-block .brief-h:first-child { margin-top: 0; }
.why-block.product-why { margin: 0 0 12px; }
.cov-fold { margin: 8px 0 16px; }
.caution-block { background: #fff8f2; }
.disclaimer {
  margin-top: 14px; font-size: 12px; color: var(--warn);
  background: #efe8d8; border-radius: 10px; padding: 10px 12px;
}
.evidence-block { margin: 8px 0 20px; }
.evidence-title { margin: 16px 0 8px; font-size: 18px; }
.evidence-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
}
.evidence-title-row .evidence-title { margin: 0; }
.evidence-title-row .info-btn {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.ref-mark-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 2px;
  font: inherit;
  color: var(--accent, #2a6b5a);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ref-mark-btn:hover { opacity: 0.85; }
.evidence-sub { margin: 14px 0 6px; font-size: 15px; font-weight: 700; }
.evidence-kcd .cov-item { background: #f7faf8; }
.portal-overview-list { margin: 8px 0 14px; display: grid; gap: 10px; }
.portal-quote {
  margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent);
  background: #f7faf8; border-radius: 0 12px 12px 0;
}
.portal-quote strong { display: block; margin-bottom: 6px; font-size: 14px; }
.portal-quote p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink); }
.portal-quote footer.src { margin-top: 8px; font-size: 12px; color: var(--muted); }
.cluster-block { margin-top: 8px; }
.cluster-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0 12px; background: #f7faf8;
}
.cluster-card > strong { display: block; font-size: 15px; margin-bottom: 6px; }
.area-card-grid { display: grid; gap: 10px; margin: 8px 0 4px; }
.area-card p { margin: 6px 0; font-size: 14px; line-height: 1.45; }
.area-evidence-list { margin: 8px 0 0; padding-left: 1.1em; font-size: 13px; line-height: 1.45; }
.area-evidence { margin: 4px 0; }
.area-limits { margin: 8px 0 0; padding-left: 1.1em; font-size: 12px; }
.input-echo, .insurance-bridge, .safety-block,
.public-stats-panel, .why-insurance, .coverage-priority, .pre-join,
.cost-pattern { margin: 12px 0 18px; }
.product-input-links, .product-fit-reasons, .product-watch {
  margin: 8px 0; font-size: 13px; line-height: 1.45;
}
.product-input-links ul, .product-fit-reasons ul, .product-watch ul,
.cost-lines, .cost-missing {
  margin: 4px 0 0; padding-left: 1.1em;
}
.product-fit-reasons li { margin: 4px 0; }
.product-why p { margin: 0 0 1.1em; line-height: 1.55; }
.product-why p:last-child { margin-bottom: 0; }
.product-why strong { font-weight: 700; }
.match-disclaimer {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--muted, #8a8680);
  background: color-mix(in srgb, var(--muted, #8a8680) 8%, transparent);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text, #2a2a28);
}
.match-disclaimer .similar-note { margin: 6px 0 0; }
.care-slot-block { margin-top: 18px; }
.care-slot-block .slot-q {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.pre-join-list { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; line-height: 1.5; }
.cost-line { margin: 6px 0; font-size: 14px; line-height: 1.45; }
.occ-note-once { margin: 8px 0 0; font-size: 13px; }
.area-more-fold, .area-aux-fold {
  margin: 10px 0; font-size: 14px; position: relative; z-index: 1;
}
.area-more-fold > summary.area-more-summary,
.area-aux-fold > summary.area-aux-summary,
.area-aux-fold > summary.area-more-summary {
  cursor: pointer;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  margin: 4px 0;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent, #2a6b5a);
  list-style: none;
  border: 1px solid var(--line, #c5d4ce);
  border-radius: 10px;
  background: #f7faf8;
}
.area-more-fold > summary.area-more-summary::-webkit-details-marker,
.area-aux-fold > summary.area-aux-summary::-webkit-details-marker,
.area-aux-fold > summary.area-more-summary::-webkit-details-marker { display: none; }
.area-more-fold > summary.area-more-summary::before,
.area-aux-fold > summary.area-aux-summary::before,
.area-aux-fold > summary.area-more-summary::before {
  content: "▸ ";
  display: inline;
}
.area-more-fold[open] > summary.area-more-summary::before,
.area-aux-fold[open] > summary.area-aux-summary::before,
.area-aux-fold[open] > summary.area-more-summary::before { content: "▾ "; }
.area-more-fold > summary.area-more-summary:hover,
.area-aux-fold > summary.area-aux-summary:hover,
.area-aux-fold > summary.area-more-summary:hover {
  border-color: var(--accent, #2a6b5a);
  background: #e4f0eb;
}
.cost-sources { margin-top: 8px; font-size: 13px; }
.public-stats-list, .why-steps, .why-missing, .public-stats-notes,
.priority-list, .priority-missing, .priority-checks {
  margin: 8px 0 0; padding-left: 1.2em; font-size: 14px; line-height: 1.5;
}
.public-stat-item, .priority-item { margin: 8px 0; }
.priority-item p { margin: 4px 0; font-size: 14px; line-height: 1.45; }
.selection-basis { font-size: 13px; }
.why-principle {
  margin: 4px 0 8px; font-size: 13px; color: var(--muted);
}
.deepen-list { margin: 8px 0 4px; padding-left: 1.2em; font-size: 14px; line-height: 1.5; }
.care-hint {
  margin: 10px 0 0; font-size: 13px; line-height: 1.45;
  color: var(--warn); background: #efe8d8; border-radius: 10px; padding: 8px 10px;
}
.cov-grid-items {
  display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0 16px;
}
.cov-grid-items .cov-chip {
  display: inline-block; margin: 0; padding: 0; border: 0; background: transparent;
  border-radius: 0; font-size: 16px;
}
.cov-why { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.area-list { margin: 8px 0 12px; }
.citations { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.product-card .citations { margin-top: 12px; }
.cite {
  font-size: 12px; background: #e4f0eb; color: var(--accent);
  border-radius: 999px; padding: 4px 10px;
  max-width: 100%; line-height: 1.35; word-break: break-word;
  text-decoration: none;
}
a.cite:hover { text-decoration: underline; }
.danger-btn {
  display: block; width: 100%; margin-top: 16px; min-height: 44px;
  background: transparent; color: var(--danger);
  border: 1px solid var(--danger); border-radius: 12px;
  padding: 12px; font-weight: 700; font-size: 14px; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.doc-empty .btn-ghost { margin-left: 8px; vertical-align: middle; }

.ask-pane {
  max-width: 760px; margin: 0 auto; padding: 16px 20px 24px;
  display: flex; flex-direction: column; min-height: 70vh;
}
.ask-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ask-head h1 { flex: 1; font-size: 22px; margin: 0; }
.ask-copy { margin: 4px 0 12px; }
.messages { flex: 1; min-height: 240px; }
.empty-state { color: var(--muted); padding: 40px 0; text-align: center; }
.msg {
  margin: 10px 0; display: flex; flex-direction: column;
  align-items: flex-start; gap: 8px; max-width: 100%;
}
.msg.user { align-items: flex-end; }
.bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); white-space: pre-wrap;
  line-height: 1.55; word-break: break-word;
}
.msg.bot .bubble { max-width: 100%; }
.msg.user .bubble { background: var(--accent); color: #fff; border-color: var(--accent); }
.bubble.abstain { color: var(--warn); border-color: var(--warn); }
.bubble.prose { white-space: normal; }
.bubble.prose p { margin: 0 0 0.75em; }
.bubble.prose p:last-child { margin-bottom: 0; }
.bubble.prose ul {
  margin: 0.35em 0 0.85em; padding-left: 1.25em;
}
.bubble.prose li { margin: 0.25em 0; }
.bubble.prose strong { font-weight: 700; }
.bubble.prose .ref-mark {
  color: var(--accent); font-size: 0.92em; font-weight: 600; white-space: nowrap;
}
.composer {
  display: flex; gap: 8px; margin-top: 12px; align-items: flex-end;
  position: sticky; bottom: 0; z-index: 5;
  padding: 10px 0 4px; background: var(--bg);
}
.composer #queryInput {
  flex: 1; resize: vertical; min-height: 44px; max-height: 140px;
}
.composer button, .composer #sendBtn {
  flex-shrink: 0; align-self: flex-end;
  height: 44px; min-height: 44px; padding: 0 18px;
  background: var(--accent); color: #fff; border: 0; border-radius: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.bubble.thinking {
  color: var(--muted); font-size: 13px; font-style: italic;
}

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 13px; z-index: 20;
}

.stepper {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
}
.step-dot {
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; line-height: 1.2;
}
.step-dot.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-dot.done { border-color: var(--accent); color: var(--accent); }
.step-line { flex: 1; height: 1px; background: var(--line); min-width: 16px; }
.lead { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.group-title { font-size: 16px; margin: 18px 0 8px; }
.symptom-cell { display: flex; gap: 6px; align-items: center; }
.symptom-cell .symptom-btn { flex: 1; }
.symptom-cell .info-btn { align-self: center; }
.symptom-btn .check { display: none; margin-left: 6px; font-size: 14px; }
.symptom-btn.on .check { display: inline; }
.hidden-fold {
  margin: 8px 0 18px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper);
}
.hidden-fold summary { cursor: pointer; font-weight: 700; }
.fold-copy { font-size: 13px; color: var(--muted); margin: 8px 0 10px; }
.field-note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.suggest {
  list-style: none; margin: 6px 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.suggest li { padding: 8px 12px; cursor: pointer; font-size: 14px; }
.suggest li:hover, .suggest li.on { background: #e4f0eb; }
.tray {
  margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--paper);
}
.tray-head { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tray-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.tray-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 4px 6px 4px 12px; border-radius: 999px;
  background: #e4f0eb; color: var(--accent); border: 1px solid var(--accent);
  line-height: 1.3; min-height: 0;
}
.tray-chip button {
  box-sizing: border-box;
  width: 28px; height: 28px; min-height: 28px; min-width: 28px; padding: 0;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--accent); cursor: pointer; font-size: 14px; line-height: 1;
  font-family: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.tray-chip button:hover { background: rgba(31, 90, 78, 0.12); }
.ref-preview { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ref-preview-head { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.stat-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0; background: #f7faf8;
}
.stat-card strong { display: block; font-size: 15px; }
.stat-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stat-fail { margin: 8px 0 16px; }
.guide-loading {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 36px 16px; color: var(--muted); font-size: 15px; text-align: center;
}
.guide-spinner {
  width: 36px; height: 36px; border-radius: 999px;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: guide-spin 0.8s linear infinite;
}
@keyframes guide-spin { to { transform: rotate(360deg); } }
.result-chat {
  margin: 16px 0 28px; padding: 16px; border: 1px solid var(--line);
  border-radius: 16px; background: #f7faf8;
}
.result-chat h3 { margin: 0 0 6px; font-size: 17px; }
.result-chat-messages {
  max-height: 280px; overflow-y: auto; margin: 10px 0 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.result-chat-messages:empty { display: none; }
.result-chat-form {
  display: flex; gap: 8px; align-items: flex-end;
}
.result-chat-form textarea {
  flex: 1; resize: vertical; min-height: 44px; max-height: 120px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; background: var(--paper);
}
.result-chat-form button {
  flex-shrink: 0; align-self: flex-end;
  height: 44px; min-height: 44px; margin-top: 0; padding: 0 18px;
}
.insurer-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px; margin-right: 10px;
  font-size: 11px; font-weight: 800; color: #fff; vertical-align: middle;
  flex-shrink: 0; letter-spacing: -0.02em; background: #5a6570;
}
.product-card-head {
  display: flex; align-items: flex-start; gap: 0; margin-bottom: 4px;
}
.product-card-head strong { flex: 1; line-height: 1.35; }
.insurer-mark[data-insurer="KB손해보험"] { background: #FFCC00; color: #1c1916; }
.insurer-mark[data-insurer="삼성생명"] { background: #3478F6; }
.insurer-mark[data-insurer="메리츠화재"] { background: #E85A2D; }
.insurer-mark[data-insurer="한화손해보험"] { background: #F37321; }
.insurer-mark[data-insurer="ABL생명"] { background: #00857C; }
.insurer-mark[data-insurer="흥국생명"] { background: #EC008C; }
.insurer-mark[data-insurer=""] { background: #6b7280; }
.type-head {
  display: flex; align-items: center; gap: 8px; margin: 18px 0 8px;
}
.type-head .help-q {
  box-sizing: border-box;
  width: 32px; height: 32px; min-height: 32px; min-width: 32px; padding: 0;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--muted);
  font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
  font-family: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.type-head .help-q:hover { border-color: var(--accent); color: var(--accent); }
.ref-mark {
  color: var(--accent); font-weight: 700; text-decoration: none;
  border-bottom: 1px dotted var(--accent); cursor: pointer;
}
a.ref-mark:hover { border-bottom-style: solid; }
.ask-suggest {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px;
}
.ask-suggest-chip {
  font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--chip); color: var(--ink);
  font-family: inherit; line-height: 1.2;
}
.ask-suggest-chip:hover { border-color: var(--accent); color: var(--accent); }
.empty-state p { margin: 0 0 8px; }
.empty-state .empty-hint { font-size: 13px; color: var(--muted); }
.type-rationale {
  margin: 8px 0 14px; padding: 12px 14px; border-radius: 12px;
  background: #f6fbf8; border: 1px solid var(--line); font-size: 14px; line-height: 1.5;
}
.type-rationale p { margin: 0 0 8px; }
.type-rationale p:last-of-type { margin-bottom: 10px; }
.type-rationale .info-btn { vertical-align: middle; }
.type-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.type-label { font-size: 13px; color: var(--muted); min-width: 7.5em; }
.why-block.prose, .caution-block.prose { white-space: normal; }
.why-block.prose p, .caution-block.prose p { margin: 0 0 0.65em; }
.why-block.prose p:last-child, .caution-block.prose p:last-child { margin-bottom: 0; }
.why-block.prose ul, .caution-block.prose ul {
  margin: 0.25em 0 0.75em; padding-left: 1.25em;
}
.type-badge {
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); background: var(--chip);
}
.type-badge.usual { border-color: var(--accent); color: var(--accent); background: #e4f0eb; }
.type-badge.hidden-type { border-color: #8a7a5c; color: #5c5348; background: #efe8d8; }
.type-badge.factor {
  border-color: var(--line); color: var(--ink); background: #f7faf8;
  font-weight: 500;
}
.type-badge.factor strong { font-weight: 700; margin-right: 2px; }
.area-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0; background: var(--paper);
}
.area-card .overlap { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.src-btn {
  margin-top: 8px; border: 0; background: none; color: var(--accent);
  font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 6px 8px; font-family: inherit; line-height: 1.2;
}
.wizard-nav { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.wizard-nav .primary-btn { margin-top: 0; }
.sheet {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(28, 25, 22, .35); border: 0; cursor: pointer;
}
.sheet-card {
  position: relative; width: min(520px, 100%);
  background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 20px 20px 28px; box-shadow: 0 -8px 24px rgba(0,0,0,.08);
}
.sheet-card h3 { margin: 0 0 8px; }

@media (max-width: 900px) {
  .top, .brochure-panel, .policy-panel, .privacy {
    padding-left: 16px; padding-right: 16px;
  }
  .product-grid { grid-template-columns: 1fr; }
  .stepper { flex-wrap: wrap; gap: 6px; }
  .step-line { min-width: 8px; }
  #interview { padding: 20px 16px 72px; }
  .ask-pane { padding: 12px 16px 20px; }
}

@media (max-width: 640px) {
  .top {
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 14px 14px 10px;
  }
  .brand { font-size: 22px; }
  .tag { max-width: none; font-size: 12px; }
  .top-actions { width: 100%; }
  .top-actions .btn-ghost, .top-actions .kb-count {
    flex: 1; text-align: center; min-height: 44px; border-radius: 12px;
  }
  .symptom-grid { grid-template-columns: 1fr; }
  .brochure-list { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  #interview { padding: 16px 12px 64px; max-width: none; }
  .ask-pane { padding: 10px 12px 16px; max-width: none; min-height: auto; }
  .type-row, .factor-row {
    flex-direction: column; align-items: flex-start; gap: 6px;
  }
  .type-label { min-width: 0; }
  .result-chat { padding: 12px; margin: 12px 0 20px; }
  .result-chat-form { flex-direction: column; align-items: stretch; }
  .result-chat-form button { width: 100%; }
  .wizard-nav { flex-direction: column; align-items: stretch; }
  .wizard-nav .primary-btn, .wizard-nav .btn-ghost { width: 100%; }
  .brochure-actions { flex-direction: row; flex-wrap: nowrap; }
  .brochure-actions .product-source,
  .brochure-actions .ask-doc-btn { flex: 1; width: auto; }
  .product-card-head { align-items: center; }
  .composer { flex-direction: column; align-items: stretch; }
  .composer button, .composer #sendBtn {
    width: 100%; height: 44px; min-height: 44px; padding: 12px; align-self: stretch;
  }
  .sheet-card {
    width: 100%; max-width: 100%;
    border-radius: 16px 16px 0 0; padding: 16px 14px 24px;
  }
  .msg.user .bubble { max-width: 92%; }
  .citations { gap: 4px; }
}

@media (max-width: 400px) {
  .brand { font-size: 20px; }
  .chip, .type-badge, .cite, .scope-badge {
    font-size: 11px; padding: 3px 8px;
  }
  .insurer-mark { width: 32px; height: 32px; font-size: 10px; }
  h1 { font-size: 22px; }
  .step-dot { padding: 5px 8px; font-size: 12px; }
}
