/* 담론 — "공개 문서" 디자인
 * 종이 배경 + 검은 활자 + 형광펜 강조. 미측정 값은 가림 막대(.redact)로, 정량한계 미만은 NQ(.nq)로 표시합니다. */
:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --surface: #fbfaf6;
  --surface-2: #ebe8df;
  --ink: #151513;
  --ink-2: #4b4842;
  --ink-3: #858074;
  --rule: #d6d2c6;
  --rule-strong: #151513;
  --mark: #ffe04a;
  --redact: #151513;
  --redact-ink: #f3f1eb;
  --open: #1f7a4d;
  --warn-bg: #fbf3d4;
  --warn-line: #e3cf7c;
  --warn-text: #5c4a00;
  /* 카테고리 식별색 (dataviz 기본 팔레트 1~3번, 전체 쌍 검증됨) */
  --cat-cig: #2a78d6;
  --cat-heated: #eb6834;
  --cat-liquid: #1baf7a;
  --grid: #dcd8cd;
  --mono: "JetBrains Mono", Pretendard, "Malgun Gothic", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #121210; --surface: #1a1a17; --surface-2: #24241f;
    --ink: #f0eee7; --ink-2: #bdb9ad; --ink-3: #8a8679;
    --rule: #33322c; --rule-strong: #f0eee7;
    --mark: #8a7414;
    --redact: #e9e6dc; --redact-ink: #121210;
    --open: #5fc58f;
    --warn-bg: #2b2610; --warn-line: #5a4e1c; --warn-text: #f0dc8a;
    --cat-cig: #3987e5; --cat-heated: #d95926; --cat-liquid: #199e70;
    --grid: #33322c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121210; --surface: #1a1a17; --surface-2: #24241f;
  --ink: #f0eee7; --ink-2: #bdb9ad; --ink-3: #8a8679;
  --rule: #33322c; --rule-strong: #f0eee7;
  --mark: #8a7414;
  --redact: #e9e6dc; --redact-ink: #121210;
  --open: #5fc58f;
  --warn-bg: #2b2610; --warn-line: #5a4e1c; --warn-text: #f0dc8a;
  --cat-cig: #3987e5; --cat-heated: #d95926; --cat-liquid: #199e70;
  --grid: #33322c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
main:focus { outline: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }


/* ---------- 마스트헤드 ---------- */
.gnb { background: var(--paper); border-bottom: 2px solid var(--rule-strong); position: sticky; top: 0; z-index: 20; }
.gnb-inner { display: flex; align-items: center; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-size: 24px; font-weight: 900; letter-spacing: -.04em; }
.brand-org { font-size: 13px; color: var(--ink-2); padding-left: 10px; border-left: 1px solid var(--rule); line-height: 1.2; }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { font-size: 15px; font-weight: 600; padding: 6px 12px; color: var(--ink-2); border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav a.nav-home { margin-left: 10px; border: 1px solid var(--rule-strong); border-radius: 4px; padding: 5px 12px; color: var(--ink); }
.nav a.nav-home:hover { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
         background: var(--paper); border-bottom: 2px solid var(--rule-strong); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--rule); }
  .nav a.nav-home { margin: 12px 0 0; padding: 10px 12px; text-align: center; border: 1px solid var(--rule-strong); }
  .brand-org { font-size: 12px; }
}

/* ---------- 공통 ---------- */
.page { padding-top: 40px; padding-bottom: 80px; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3 { letter-spacing: -.03em; line-height: 1.25; margin: 0; }
.page-title { font-size: clamp(30px, 5vw, 44px); font-weight: 900; margin-bottom: 10px; }
.page-lead { color: var(--ink-2); margin: 0 0 32px; max-width: 760px; font-size: 17px; }
.section { margin-top: 56px; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 2px; padding: 11px 22px;
       font-weight: 700; cursor: pointer; background: var(--ink); color: var(--paper); }
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.breadcrumb { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.badge { white-space: nowrap; display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 2px; vertical-align: middle; letter-spacing: .01em; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; flex-shrink: 0; }
.notice { display: flex; gap: 12px; background: var(--warn-bg); border-left: 4px solid var(--warn-line); color: var(--warn-text);
          padding: 16px 18px; font-size: 15px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice svg { flex-shrink: 0; margin-top: 2px; }
.info { background: var(--surface-2); padding: 16px 18px; font-size: 15px; color: var(--ink-2); }

/* 가림 막대: 미측정 값 */
.redact { display: inline-block; background: var(--redact); color: var(--redact-ink); font-family: var(--mono); font-size: 11px; font-weight: 600;
          letter-spacing: .06em; padding: 2px 10px; min-width: 76px; text-align: center; line-height: 1.6; vertical-align: middle; }
/* NQ: 정량한계 미만 (측정했지만 수치를 낼 수 없음) */
.nq { display: inline-flex; align-items: baseline; gap: 3px; border: 1px dashed var(--ink-3); color: var(--ink-2); font-family: var(--mono); font-size: 13px;
      font-weight: 700; padding: 0 7px; line-height: 1.6; vertical-align: middle; white-space: nowrap; }
.nq small { font-family: Pretendard, system-ui, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0; }
.big-num .nq { font-size: 22px; }
.big-num .nq small { font-size: 13px; }
/* 수치 출처 줄 (성분 범위 아래) */
.data-src { margin: 10px 0 0; text-align: right; font-size: 13px; color: var(--ink-3); }
/* 출처 링크 */
.src-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.src-link:hover { color: var(--ink); }
/* NQ 뜻풀이 안내 줄 */
.nq-note { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; padding: 10px 14px; background: var(--surface-2);
           border-left: 3px solid var(--ink-3); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.nq-note .nq { flex: none; }
.section .nq-note:not(:first-child) { margin-top: 12px; }

/* ---------- 히어로 ---------- */
.hero { padding: 56px 0 8px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(36px, 6.2vw, 68px); font-weight: 900; line-height: 1.12; letter-spacing: -.045em; }
.hero h1 mark { background: linear-gradient(transparent 58%, var(--mark) 58%); color: inherit; padding: 0 2px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; } }

.doc { background: var(--surface); border: 1px solid var(--rule); border-top: 6px solid var(--ink); padding: 20px 22px 18px; }
.doc-head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-3);
            text-transform: uppercase; letter-spacing: .06em; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.doc h2 { font-size: 20px; font-weight: 800; margin: 14px 0 6px; }
.doc-lead { color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.doc-rows { list-style: none; margin: 0; padding: 0; }
.doc-rows li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px dashed var(--rule); font-weight: 600; font-size: 15px; }
.doc-rows li:first-child { border-top: 0; }
.doc-rows .state { margin-left: auto; }
.open-tag { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--open); border: 1.5px solid var(--open);
            padding: 1px 10px; min-width: 76px; text-align: center; display: inline-block; }
.doc-foot { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.doc-foot a { font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--ink); }

/* ---------- 검색 ---------- */
/* 제품 페이지 맨 위 안내 문구 */
.product-note { margin: 0 0 16px; padding: 2px 0 2px 12px; border-left: 4px solid var(--mark); font-size: 14px; font-weight: 600; color: var(--ink-2); }
/* 이용 안내: 검색창 위 강조 문구 */
.notice { margin: 32px 0 0; padding: 14px 18px; background: var(--surface); border: 2px solid var(--ink); border-left-width: 8px;
          border-left-color: var(--mark); font-size: 15px; font-weight: 600; line-height: 1.7; color: var(--ink); }
.notice-stack { flex-direction: column; gap: 8px; }
.notice-stack p { margin: 0; }
.notice-stack a { color: inherit; text-decoration: underline; }
.notice + .search { margin-top: 12px; }
.search { position: relative; display: flex; align-items: center; background: var(--surface); border: 2px solid var(--ink); margin-top: 40px; }
.search svg { margin-left: 18px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 18px 14px; font-size: 18px; outline: none; }
.search input::placeholder { color: var(--ink-3); }
.search .btn { align-self: stretch; border: 0; border-radius: 0; padding: 0 36px; font-size: 16px; }
.search .btn:hover { background: var(--ink-2); color: var(--paper); }
@media (max-width: 520px) { .search .btn { padding: 0 18px; } .search input { font-size: 15px; padding: 14px 8px; } .search svg { margin-left: 12px; } }
.suggest { position: absolute; top: 100%; left: -2px; right: -2px; background: var(--surface); border: 2px solid var(--ink); border-top: 0; z-index: 10; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--rule); }
.suggest a:hover, .suggest a.active { background: var(--surface-2); }
.suggest .kind { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; }
.chips-label { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
.chip { border: 1px solid var(--rule); background: var(--surface); padding: 4px 12px; font-size: 14px; font-weight: 600; }
.chip:hover { border-color: var(--ink); }

/* ---------- 기능 목록 (번호형) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; flex-direction: column; padding: 22px 22px 24px 0; border-bottom: 1px solid var(--rule); min-height: 220px; }
.features .feature + .feature { padding-left: 22px; border-left: 1px solid var(--rule); }
@media (max-width: 960px) { .features .feature:nth-child(odd) { padding-left: 0; border-left: 0; } }
@media (max-width: 520px) { .features .feature { padding-left: 0 !important; border-left: 0 !important; min-height: 0; } }
.feature-no { font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.feature h3 { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
.feature p { color: var(--ink-2); font-size: 15px; margin: 0; flex: 1; }
.feature .go { margin-top: 18px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.feature:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- 카테고리 / 수치 ---------- */
.cat-card { display: block; border-top: 4px solid var(--cat, var(--ink)); }
a.cat-card:hover { border-color: var(--ink); border-top-color: var(--cat, var(--ink)); }
.cat-card h3 { font-size: 20px; display: flex; align-items: center; }
.cat-card p { color: var(--ink-2); font-size: 15px; margin: 8px 0 16px; }
.stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.stat-row b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.value-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.value-table th, .value-table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.value-table th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; border-bottom: 2px solid var(--ink); }
.value-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.value-table th.num { text-align: right; }
.value-table tr.link-row { cursor: pointer; }
.value-table tr.link-row:hover td { background: var(--surface-2); }
.unit { font-family: Pretendard, system-ui, sans-serif; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.table-scroll { overflow-x: auto; }
@media (max-width: 600px) {
  /* 휴대폰: 표를 화면 폭에 맞춤 (칸이 많아 넘칠 때만 옆으로 밀기) */
  .value-table { min-width: 0; font-size: 14px; }
  .value-table th, .value-table td { padding: 11px 6px; }
}
.avg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 10px; }
.avg-head h2 { font-size: 22px; font-weight: 800; }
.na { color: var(--ink-3); font-weight: 500; font-family: Pretendard, system-ui, sans-serif; font-size: 14px; }
.big-num { font-family: var(--mono); font-size: 30px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.product-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.product-hero h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 900; }
.share-btn { margin-left: auto; background: none; border: 1px solid var(--rule-strong); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 4px 12px; cursor: pointer; border-radius: 4px; }
.share-btn:hover { background: var(--ink); color: var(--paper); }
.cat-pill { display: inline-flex; align-items: center; border: 1px solid var(--ink); padding: 3px 12px; font-size: 14px; font-weight: 600; }

.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 24px; border-top: 1px solid var(--rule); }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 4px; border-bottom: 1px solid var(--rule);
             font-weight: 600; font-size: 15px; }
.list-item:hover { background: var(--surface); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tab { border: 1px solid var(--rule); background: var(--surface); padding: 6px 14px; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; }
.tab:hover { border-color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }


/* ---------- 폼 ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--ink-3); border-radius: 0; background: var(--surface); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 업데이트 ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.timeline li { padding: 20px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 140px 1fr; gap: 8px 24px; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; } }
.timeline time { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.timeline h3 { font-size: 18px; margin: 0 0 4px; }
.timeline p { margin: 0; color: var(--ink-2); }

/* ---------- 푸터 ---------- */
.footer { border-top: 2px solid var(--ink); padding: 32px 0 56px; font-size: 14px; color: var(--ink-2); }
.footer p { margin: 4px 0; }


/* ---------- 성분 목록 카드 ---------- */
.ing-card { display: block; }
.ing-card:hover { border-color: var(--ink); }
.ing-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.ing-card p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* 한글이 들어가는 고정폭 요소는 자간을 넓히지 않음 */
.doc-head, .chips-label, .value-table th, .redact, .open-tag, .breadcrumb { letter-spacing: 0; }
.doc-head, .chips-label, .value-table th, .redact, .open-tag, .breadcrumb, .suggest .kind { font-family: Pretendard, "Malgun Gothic", system-ui, sans-serif; }

/* ---------- 대시보드형 메인 (dashboard.html) ---------- */
.dash { padding-top: 32px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.dash-head mark { background: linear-gradient(transparent 58%, var(--mark) 58%); color: inherit; padding: 0 2px; }
.dash .search { margin-top: 24px; }

.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: 18px 20px 20px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.panel-head h2 { font-size: 18px; font-weight: 800; }
.panel .more { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--ink); }

.dash-table { min-width: 460px; font-size: 14px; }
.dash-table th, .dash-table td { padding: 9px 8px; }
.dash-table th.num { line-height: 1.4; }
.dash-table .badge { font-size: 10px; padding: 1px 6px; }


.ratios { display: grid; gap: 2px; }
.ratio-row { display: grid; grid-template-columns: 112px 1fr 56px; align-items: center; gap: 12px; padding: 6px 4px; }
.ratio-row:hover { background: var(--surface-2); }
.ratio-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ratio-track { height: 18px; display: block; }
.ratio-bar { display: block; height: 100%; min-width: 4px; border-radius: 0 4px 4px 0; }
.ratio-val { font-family: var(--mono); font-size: 14px; font-weight: 700; text-align: right; }


.mini-timeline { list-style: none; margin: 0; padding: 0; }
.mini-timeline li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px dashed var(--rule); font-size: 15px; }
.mini-timeline li:first-child { border-top: 0; padding-top: 0; }
.mini-timeline time { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.cta-box { margin-top: 20px; padding: 16px; background: var(--surface-2); display: grid; gap: 12px; justify-items: start; font-size: 15px; }
.value-table th .unit { text-transform: none; }
@media (max-width: 520px) {
  .dash-table { min-width: 0; font-size: 13px; }
  .dash-table .badge { display: none; }
  .dash-table th, .dash-table td { padding: 8px 4px; }
  .dash-table td.num .unit { display: block; margin: 0; font-size: 11px; }
}

/* ---------- 유형별 세로 캐러셀 (3열) ---------- */
.carousels .avg-head { margin-bottom: 14px; }
.std-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
           padding: 14px 0; border-top: 2px solid var(--ink); }
.std-label { font-weight: 800; font-size: 15px; }
.std-label .muted { font-weight: 500; font-size: 13px; }
.seg { display: inline-flex; border: 2px solid var(--ink); background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 16px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button b { font-family: var(--mono); margin-left: 2px; }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.vcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .vcols { grid-template-columns: 1fr; } }
.vcol { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--cat); display: flex; flex-direction: column; min-width: 0; }
.vcol-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px 14px 12px; border-bottom: 1px solid var(--rule); }
.vcol-head h3 { font-size: 19px; font-weight: 800; display: flex; align-items: center; }
.vcol-note { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--ink-3); background: var(--surface-2); }
.crow-nav { display: flex; gap: 4px; flex-shrink: 0; }
.crow-nav button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ink); background: var(--surface); cursor: pointer; font-size: 14px; line-height: 1; }
.crow-nav button:hover { background: var(--ink); color: var(--paper); }
.vtrack { height: 520px; overflow-y: auto; scroll-snap-type: y proximity; overscroll-behavior: contain;
          scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
@media (max-width: 900px) { .vtrack { height: 380px; } }
.vtrack:focus-visible { outline-offset: -3px; }
.vcard { scroll-snap-align: start; display: flex; justify-content: space-between; align-items: center; gap: 12px;
         padding: 12px 14px; border-bottom: 1px solid var(--rule); min-height: 72px; }
.vcard:hover { background: var(--surface-2); }
.vcard-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.vcard-name { font-weight: 800; font-size: 15px; line-height: 1.3; }
.vcard-en { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-side { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; text-align: right; }
.vcard-val { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.ccard-range { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 520px) { .seg { width: 100%; } .seg button { flex: 1; padding: 7px 4px; font-size: 13px; } }
.dash .carousels { margin-top: 28px; }
.stack { display: grid; gap: 16px; align-content: start; }

/* 메인 성분 범위: 기준 버튼 줄 */
.car-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
@media (max-width: 520px) { .car-bar .seg { display: flex; } }

/* 연초 vs 궐련형 막대 */
.vcard { flex-wrap: wrap; row-gap: 8px; }
.vbar { flex-basis: 100%; height: 8px; background: var(--surface-2); display: block; }
.vbar-fill { display: block; height: 100%; background: var(--cat); border-radius: 0 4px 4px 0; }
.vcard-main { flex: 1 1 0; }


/* 기준 버튼 5개: 좁은 화면에서는 가로 스크롤 */
@media (max-width: 600px) {
  .seg { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { flex: 0 0 auto; padding: 7px 12px; }
}

/* 대시보드 하단 배치: 1행 제품 간 차이(2단계), 2행 업데이트 전체 폭 */
.span-12 { grid-column: 1 / -1; }
.upd-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; align-items: center; }
.upd-wide .cta-box { margin-top: 0; }
@media (max-width: 720px) { .upd-wide { grid-template-columns: 1fr; } }
.ratio-row { padding: 4px; }


/* 제품 상세: 돌아가기 버튼 */
.back-btn { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--ink); background: var(--surface);
            padding: 8px 16px; font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.back-btn:hover { background: var(--ink); color: var(--paper); }
.back-bottom { margin-top: 20px; }
.back-bottom .back-btn { margin-bottom: 0; }


/* ---------- 성분별 제품 분포: 세로 분포 + 오른쪽 제품 정보 ---------- */
.dist-stats { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 6px; }
.dist-stat { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 14px; }
.dist-stat .muted { font-size: 13px; }
.vdist { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
@media (max-width: 860px) { .vdist { grid-template-columns: 1fr; } }
.vdist-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; min-width: 0; }
.vdist-col { min-width: 0; }
.vdist-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; min-height: 44px; }
.vdist svg { display: block; overflow: visible; }
.vdist .axis text { fill: var(--ink-3); font-size: 12px; font-family: var(--mono); }
.vdist .axis line { stroke: var(--grid); stroke-width: 1; }
.vdist .dot { stroke: var(--surface); stroke-width: 2; }
.vdist .dot.on { stroke: var(--ink); stroke-width: 3; }
.vdist .hit { fill: transparent; cursor: pointer; }
.vdist-info { border-left: 1px solid var(--rule); padding-left: 20px; min-height: 640px; }
@media (max-width: 860px) { .vdist-info { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 16px; min-height: 0; } }
.vdist-empty { height: 100%; min-height: 160px; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 14px; margin: 0;
               border: 1px dashed var(--rule); }
.vdist-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vdist-title b { font-family: var(--mono); font-size: 22px; }
.vdist-big { display: flex; flex-direction: column; margin: 14px 0 12px; padding: 12px 14px; background: var(--surface-2); }
.vdist-big > span:first-child { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.vdist-big b { font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table caption { text-align: left; font-size: 12px; color: var(--ink-3); padding-bottom: 4px; }
.mini-table td { padding: 5px 4px; border-bottom: 1px solid var(--rule); }
.mini-table td.num { text-align: right; font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.mini-table tr.on td { background: var(--mark); color: #151513; }
.mini-table tr.on .unit { color: #151513; }
.mini-table .redact { min-width: 0; padding: 0 6px; font-size: 10px; }
.vdist-stack { display: grid; gap: 16px; }
.ing-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 20px; margin-bottom: 16px; }
.ing-pick .more { font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 12px; }
/* 그래프를 넓게, 오른쪽 제품 정보 칸은 고정 폭 */
.vdist { grid-template-columns: minmax(0, 1fr) 320px; }
.vdist-charts { grid-template-columns: 1fr; }
@media (max-width: 860px) { .vdist { grid-template-columns: 1fr; } }
.vdist-info .more { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--ink); }

/* 성분 해설 팝업 */
.link-btn { background: none; border: 0; border-bottom: 2px solid var(--ink); padding: 0; cursor: pointer; }
.explain-dlg { border: 2px solid var(--ink); padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
               background: var(--paper); color: var(--ink); }
.explain-dlg::backdrop { background: rgba(21, 21, 19, .55); }
.explain-body { padding: 22px 24px 24px; }
.explain-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.explain-head h2 { font-size: 26px; font-weight: 900; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.explain-close { border: 1px solid var(--ink); background: var(--surface); width: 36px; height: 36px; cursor: pointer; font-size: 16px; flex-shrink: 0; }
.explain-close:hover { background: var(--ink); color: var(--paper); }
.explain-tiles { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.explain-tiles .card { padding: 16px; }

/* 제품별 분포: NQ 띠 (0 눈금 아래, 수치 축과 분리) */
.vdist .nq-band rect { fill: var(--surface-2); }
.vdist .nq-band text { fill: var(--ink-2); font-size: 12px; font-weight: 700; font-family: var(--mono); }
.vdist .dot.nq { stroke-width: 2; }
.vdist .dot.nq.on { stroke: var(--ink) !important; stroke-width: 3; }

/* ---------- 1단계: 성분 범위 표시 ---------- */
.range-val { white-space: nowrap; }
.vcard-val .range-val { font-size: 17px; }
.range-big { font-size: 24px; }
.range-big .ccard-range, .value-table .ccard-range { display: block; font-family: Pretendard, "Malgun Gothic", system-ui, sans-serif; font-weight: 500; margin-top: 4px; letter-spacing: 0; }
.range-big .ccard-range { font-size: 13px; }

/* ---------- 검토용 단계 전환 (오른쪽 아래 고정) ---------- */
body { padding-bottom: 72px; }
.level-switch { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; align-items: stretch; background: var(--surface); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 13px; }
.level-switch-label { display: flex; align-items: center; padding: 0 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); border-right: 1px solid var(--rule); }
.level-switch button { border: 0; background: none; color: var(--ink); padding: 7px 12px; font: inherit; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.level-switch button + button { border-left: 1px solid var(--rule); }
.level-switch button small { font-weight: 500; font-size: 11px; color: var(--ink-3); }
.level-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.level-switch button[aria-pressed="true"] small { color: var(--paper); opacity: .75; }
.level-switch button:focus-visible { outline: 3px solid var(--mark); outline-offset: -3px; }
@media (max-width: 520px) { .level-switch { right: 12px; bottom: 12px; left: 12px; } .level-switch button { flex: 1; } }

/* ---------- 식약처 성분 해설 (성분 상세) ---------- */
.mx { display: grid; gap: 14px; }
.mx-head { border-top: 2px solid var(--ink); padding-top: 16px; }
.mx-tagline { font-size: 22px; font-weight: 800; line-height: 1.4; margin: 8px 0 0; letter-spacing: -.01em; }
.mx-group { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); background: var(--surface-2); padding: 8px 12px; }
.mx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .mx-grid { grid-template-columns: 1fr; } .mx-tagline { font-size: 19px; } }
.mx-card { background: var(--surface); border: 1px solid var(--rule); padding: 18px 20px; }
.mx-q { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-3); margin: 0 0 6px; letter-spacing: 0; }
.mx-sub { font-size: 17px; font-weight: 700; margin: 0 0 10px; line-height: 1.45; }
.mx-card blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--mark); color: var(--ink); font-weight: 500; line-height: 1.6; }
.mx-body { margin: 0; color: var(--ink-2); line-height: 1.7; }
.mx-card.dark { background: var(--ink); border-color: var(--ink); }
.mx-card.dark .mx-q, .mx-card.dark .mx-body { color: var(--paper); opacity: .85; }
.mx-card.dark .mx-sub { color: var(--paper); }
.mx-remember { border: 2px solid var(--ink); padding: 16px 20px; background: var(--surface); }
.mx-remember b { display: block; font-size: 13px; margin-bottom: 6px; }
.mx-remember p { margin: 0; font-weight: 600; line-height: 1.65; }
.mx-src { margin: 0; font-size: 13px; color: var(--ink-3); }
.mx-src a { color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--ink); }

/* 성분정보 목록 (식약처 제N탄 순서) */
.mx-item .mx-ep { font-size: 13px; font-weight: 700; color: var(--ink-3, #888); margin: 0 0 6px; }
.mx-item .mx-ep .badge { margin-left: 6px; vertical-align: 1px; }
.mx-members { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.mx-members a { font-size: 14px; font-weight: 700; border-bottom: 2px solid var(--ink); }
.mx-members a:hover { opacity: .7; }
