:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5d6b7e;
  --line: #e1e5eb;
  --accent: #0b6bcb;
  --accent-soft: #e6f0fb;
  --notice-bg: #fff6e0;
  --notice-text: #6b4e00;
  --structure-bg: #ffffff; /* RDKit SVG 는 흰 바탕이라 어두운 테마에서도 흰 카드에 둔다 */
  --th-bg: #f8fafc;        /* 표 머리 줄 바탕 — KTR 시안에서 이것만 (2026-10-27 사용자) */
  --radius: 10px;
  --series-imp: #2a78d6;  /* 시세 그래프 수입 · 수출 — dataviz 검증(흰 바탕) 통과 (2026-11-02) */
  --series-exp: #eb6834;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1b2129;
    --text: #e4e8ee;
    --muted: #97a3b4;
    --line: #2c3540;
    --accent: #5aa9f5;
    --accent-soft: #1d3147;
    --notice-bg: #3a3017;
    --notice-text: #f2d892;
    --th-bg: #222a33;
    --series-imp: #3987e5;  /* 어두운 바탕(#1b2129) 검증 통과 */
    --series-exp: #d95926;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
/* 본문이 짧아도(검색 결과 1개 등) 화면 아래쪽 줄은 첫 화면처럼 바닥에 */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .foot { width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* 머리 · 검색창 */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top-inner { display: flex; gap: 20px; align-items: center; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); white-space: nowrap; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
/* 제목 왼쪽의 분자 그림 (파비콘과 같은 favicon.svg, 2026-10-19 사용자) — 글자 높이에 맞춰 가운데 정렬 */
.brand { display: inline-flex; align-items: center; gap: 7px; }
.brand-icon { flex: none; display: block; }
.home-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.search { display: flex; flex: 1; min-width: 260px; gap: 8px; }
.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
/* 머리 막대 '검색' 은 파랗게 채운 채로 둔다 — 10/21 테두리만으로 바꿨다가 사용자가 원래대로 */
.search button {
  font: inherit; font-weight: 600; padding: 9px 18px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; cursor: pointer;
}

/* 첫 화면 */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: 26px; margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 6px 0; }
.examples a { display: inline-block; margin: 4px 6px 0 0; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); }

/* 결과 목록 */
.results { padding: 20px 0 32px; }
.summary { margin: 0 0 12px; }
.notice { background: var(--notice-bg); color: var(--notice-text); padding: 8px 14px; border-radius: var(--radius); margin: 0 0 10px; font-size: 14px;
          white-space: pre-line; }  /* 안내 문장 뒤 줄바꿈 (국내 규제 원문 항목 안내, 2026-10-23) */
.note-lines { white-space: pre-line; }
.notice-link { margin-left: 6px; white-space: nowrap; }
.formula-note { position: relative; }  /* 좁은 화면에서 말풍선이 안내 줄 폭 전체로 */
/* 결과는 낱장 카드 대신 한 장 목록 — 줄 사이는 선 (2026-10-21, 앱 화면 규칙 '카드를 빈 공간으로 늘리지 않기 · 선으로 나누기') */
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--surface);
        border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hit {
  display: flex; gap: 14px; padding: 10px 14px; background: var(--surface);
  border-top: 1px solid var(--line);
}
.hit:first-child { border-top: 0; }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }
.structure {
  display: flex; align-items: center; justify-content: center; background: var(--structure-bg);
  border-radius: 8px; overflow: hidden; flex-shrink: 0;
}
.structure svg { display: block; max-width: 100%; height: auto; }
.thumb { width: 120px; height: 90px; }  /* 2D 는 150×112 로 그려 줄여 보인다 (structure.js data-width) */
/* 목록 3D 그림 (thumbs3d.js) — 2D 와 섞이므로 구석에 작게 3D 표시 */
.thumb.is-3d { position: relative; }
.thumb.is-3d img { display: block; width: 100%; height: 100%; object-fit: contain; }
.thumb.is-3d::after {
  content: "3D"; position: absolute; right: 4px; bottom: 3px; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 4px; color: #5d6b7e; background: #eef1f5;
}
.no-structure { color: #8792a2; font-size: 12px; text-align: center; padding: 8px; }
.info { min-width: 0; flex: 1; }
.name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.matched { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 4px 0 0; font-size: 14px; }
.facts div { display: flex; gap: 6px; min-width: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: center; gap: 18px; padding: 20px 0 0; }

/* 상세 */
.compound { padding: 24px 0 40px; }
.compound-head h1 { margin: 0; font-size: 28px; overflow-wrap: anywhere; }
.sub { margin: 4px 0 18px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sub-cid { margin-right: 2px; }
/* 상세 맨 위 위험 띠 (2026-10-21) — 그림문자 · 신호어 · 이름, GHS 분류 · 국내 규제 바로가기 */
.head-hazard { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0 4px; font-size: 14px; }
.head-hazard img { display: block; background: #fff; }
.head-hazard .signal { font-size: 13px; padding: 2px 9px; }
.head-hazard-words { color: var(--muted); margin-right: 4px; }
.head-hazard .lit-link { margin-left: 0; }
/* 오른쪽 표는 420px 이상(InChIKey 한 줄) — 중간 폭(721~1000px)에서 구조식이 420px 을 먼저 가져가 값 칸이 57px 까지 줄었다 (2026-10-15). 구조식이 줄어든다 */
.compound-body { display: grid; grid-template-columns: minmax(0, 420px) minmax(420px, 1fr); gap: 20px; align-items: start; }
.big { margin: 0; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
/* 구조식 2D / 3D 전환 (structure3d.js). 3D 는 3Dmol.js 가 이 칸에 canvas 를 넣는다 */
.structure-view { position: relative; }  /* 좁은 화면에서 말풍선 기준 */
.structure-view [hidden] { display: none; }  /* .structure 의 display: flex 보다 앞서게 */
.structure-3d { position: relative; }
.structure-3d.loading::after { content: "3D 구조를 불러오는 중…"; color: #8792a2; font-size: 13px; }
.structure-3d.no-structure { word-break: keep-all; padding: 16px 32px; line-height: 1.6; }
.view-switch { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.view-switch .help { top: 0; margin-left: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button {
  font: inherit; font-size: 13px; font-weight: 600; padding: 3px 16px; border: 0; background: none;
  color: var(--muted); cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.seg button:not([aria-pressed="true"]):hover { color: var(--accent); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* 3D 내려받기 — 3D 그림 오른쪽 위 버튼, 누르면 CIF · SDF 가 세로로 (2026-10-15 사용자) */
/* 그림 폭만큼 깔고(마우스는 통과) 버튼은 오른쪽 끝 — 메뉴가 그림 폭을 넘지 않게 (좁은 칸에서 화면 밖으로 나갔다) */
.dl3d { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 5; display: flex; justify-content: flex-end; pointer-events: none; }
.dl3d > * { pointer-events: auto; }
.dl3d[hidden] { display: none; }
.dl3d-btn {
  display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 13px; font-weight: 600;
  padding: 4px 11px 4px 8px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(32, 33, 36, 0.12);  /* 글자색은 다른 둥근 버튼과 같게 (10/19) */
}
.dl3d-btn:hover, .dl3d-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.dl3d-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dl3d-menu {
  position: absolute; top: calc(100% + 6px); right: 0; width: min(300px, 100%); padding: 6px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(32, 33, 36, 0.2);
}
.dl3d-menu[hidden] { display: none; }
.dl3d-menu a { display: grid; gap: 1px; padding: 7px 14px; color: var(--text); }
.dl3d-menu a:hover, .dl3d-menu a:focus-visible { background: var(--accent-soft); text-decoration: none; outline: 0; }
.dl3d-menu strong { font-size: 14px; }
.dl3d-menu span { font-size: 12px; color: var(--muted); }
.props { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.props div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.props div:first-child { border-top: 0; }
.props dt { color: var(--muted); font-size: 14px; }
.props dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.block { margin-top: 28px; }
.block h2 { font-size: 18px; margin: 0 0 8px; }
.count { font-size: 14px; font-weight: 400; color: var(--muted); }
.same-cas { margin: 8px 0 0; padding-left: 20px; }
.same-cas li { margin: 3px 0; overflow-wrap: anywhere; }
.synonyms { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.synonyms li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 8px; font-size: 13px; overflow-wrap: anywhere; max-width: 100%;
}
details summary { cursor: pointer; color: var(--accent); margin-top: 6px; }
.syn-label { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.mesh-for { margin: 8px 0 0; font-size: 14px; }  /* MeSH 동의어 — MeSH 이름이 여럿이면 이름마다 */
/* MeSH 트리 — 맨 위 분류부터 바로 위 설명어까지 › 로 잇는다, 나머지 경로는 접어 둔다 */
.mesh-tree > div { grid-template-columns: 220px minmax(0, 1fr); }
.mesh-tree dt a { font-size: 15px; }
.mesh-ui { display: block; font-size: 12px; color: var(--muted); }
.mesh-path { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 14px; line-height: 1.6; }
.mesh-path li { overflow-wrap: anywhere; }
.mesh-path li + li::before { content: "›"; color: var(--muted); margin: 0 6px; }
.mesh-more summary { margin-top: 6px; font-size: 13px; color: var(--accent); cursor: pointer; }
.mesh-more .mesh-path { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.mesh-note { margin: 8px 0 0; }
@media (max-width: 720px) { .mesh-tree > div { grid-template-columns: 1fr; gap: 2px; } }
.differ { color: var(--notice-text); word-break: keep-all; }  /* 출처끼리 합의가 없는 실험 물성 (범위) */

.foot { color: var(--muted); font-size: 13px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); }
/* 면책 문구 세 줄 (2026-11-11) — 단어 중간에서 줄이 바뀌지 않게 */
.foot .disclaimer { margin-top: 6px; font-size: 12.5px; line-height: 1.6; word-break: keep-all; }
.foot .disclaimer p { margin: 0; }

@media (max-width: 720px) {
  .compound-body { grid-template-columns: 1fr; }
  .props div { grid-template-columns: 1fr; gap: 2px; }
  .thumb { width: 96px; height: 72px; }
  .hit { gap: 10px; padding: 10px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 21px; }
}

/* 안전 정보 (LCSS) */
.ghs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; }
.ghs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pict { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.pict img { display: block; margin: 0 auto 2px; background: #fff; }
.signal { font-weight: 700; padding: 2px 10px; border-radius: 6px; }
.signal-danger { background: #c62828; color: #fff; }
.signal-warning { background: #f9a825; color: #1c2430; }
.src { font-size: 12px; color: var(--muted); }
.hazards { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.hazards li { overflow-wrap: anywhere; }
.precautions { font-size: 13px; margin: 6px 0 0; overflow-wrap: anywhere; }
.small { font-size: 12px; }
details.lcss > summary { color: var(--text); margin-top: 0; }
details.lcss > summary h2 { display: inline; }
.lcss-list { margin: 8px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.lcss-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.lcss-list > div:first-child { border-top: 0; }
.lcss-list dt { color: var(--muted); font-size: 14px; }
.lcss-list dt .fetched { display: block; margin-top: 2px; font-size: 12px; opacity: 0.85; }  /* 규제 · 기준 칸 받은 날 (2026-10-29) */
.lcss-list dt .fetched strong { white-space: nowrap; }  /* 날짜가 '2026-10-' · '15' 로 끊기지 않게 */
.lcss-list dd { margin: 0; }
.lcss-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lcss-list .val { white-space: pre-line; overflow-wrap: anywhere; }
.pharm > div { grid-template-columns: 240px minmax(0, 1fr); }  /* 약리 분류: 이름이 길어 왼쪽 칸을 넓게 */
.pharm dt { font-size: 15px; }
.pict-sm { vertical-align: middle; background: #fff; margin-right: 2px; }
.ghs-mini { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 8px; }
.ghs-mini img { background: #fff; }
.sources { padding-left: 20px; font-size: 14px; }
.sources li { margin: 4px 0; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .lcss-list > div, .pharm > div { grid-template-columns: 1fr; gap: 2px; }
}
/* 논문에 함께 나오는 질병 등: 이름 | 논문 수 (좁은 화면에서도 두 칸) */
.cooc-title { position: relative; }  /* 좁은 화면에서 말풍선이 제목 아래 폭 전체로 */
.cooc > div { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 14px; }
.cooc dt { font-size: 15px; overflow-wrap: anywhere; }  /* 띄어쓰기 없는 긴 화학 이름이 좁은 화면을 넘지 않게 */
.cooc dd { color: var(--muted); font-size: 14px; text-align: right; white-space: nowrap; }
.cooc .muted a { color: var(--muted); }  /* PubChem 에도 이름이 없는 MeSH 번호 */

/* 첫 화면 — 구글처럼 가운데 검색창 */
.home {
  min-height: calc(100vh - 90px - var(--hud-space, 0px)); display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 32px 0 14vh;
}
.home-brand { font-size: 44px; font-weight: 700; letter-spacing: -0.5px; margin: 0 0 28px; }
.home-brand span { color: var(--accent); }
.home-search {
  display: flex; align-items: center; gap: 10px; width: min(660px, 100%);
  padding: 6px 6px 6px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
}
.home-search:hover, .home-search:focus-within { box-shadow: 0 2px 12px rgba(32, 33, 36, 0.2); }
.home-icon { color: var(--muted); flex-shrink: 0; }
.home-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 18px; color: var(--text); padding: 8px 0;
}
.home-search button {
  font: inherit; font-weight: 600; padding: 10px 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; cursor: pointer;
}
.home .examples { margin: 22px 0 0; }
/* 다른 찾기 카드 두 장 — 검색창 폭, 흰 바탕 · 회색 테두리, 올리면 파란 테두리 · 제목 (2026-10-21 시안 B) */
.home-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(660px, 100%); margin: 30px 0 0; }
.home-tools a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; color: var(--text); box-shadow: 0 1px 3px rgba(32, 33, 36, 0.06); }
.home-tools a:hover { border-color: var(--accent); text-decoration: none; }
.home-tools a:hover strong { color: var(--accent); }
.home-tools a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-tools .tool-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.home-tools strong { display: block; font-size: 15px; }
.home-tools .tool-desc { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) { .home-tools { grid-template-columns: 1fr; } }

@media (max-width: 720px) {
  .home { padding-bottom: 10vh; }
  .home-brand { font-size: 30px; margin-bottom: 20px; }
  .home-brand { gap: 9px; }
  .home-brand .brand-icon { width: 36px; height: 36px; }
  .home-search { padding-left: 14px; }
  .home-search input { font-size: 16px; }
  .home-search button { padding: 9px 16px; }
}

/* 계산 물성 */
.computed {
  margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
/* 칸 사이 선은 오른쪽 · 아래 그림자로 — 바깥쪽은 잘리고 마지막 줄의 빈칸은 바탕색 그대로 남는다 */
.computed > div { padding: 10px 14px; box-shadow: 1px 1px 0 var(--line); }
.computed .small { margin-top: 2px; }
.computed dt { color: var(--muted); font-size: 13px; }
.computed dd { margin: 2px 0 0; font-size: 18px; font-variant-numeric: tabular-nums; }
.computed .unit { font-size: 13px; color: var(--muted); }
.computed.ids { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.computed.ids dd { font-size: 15px; overflow-wrap: anywhere; }  /* 식별자 — 글자 · 긴 이름(위키백과)도 있어 작게 */
.props .has-help { position: relative; }  /* 좁은 화면에서 문헌 말풍선이 이 줄 폭 전체로 */
/* 작은 둥근 버튼 — 상세 CID 줄(.pill-link) · 개요 표의 목록 보기 · PubChem 에서 보기(.lit-link) (2026-10-19, CSV · 돌아가기 버튼과 같은 모양) */
.pill-link, .lit-link { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 10px; font-size: 13px; font-weight: 600;
                        line-height: 1.5; color: var(--text); background: var(--surface); border: 1px solid var(--line);
                        border-radius: 999px; white-space: nowrap; vertical-align: 1px; }
.pill-link:hover, .lit-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.pill-link:focus-visible, .lit-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lit-link { margin-left: 6px; font-size: 12px; padding: 1px 8px 1px 9px; }
/* 관련 화합물 (2026-10-26) — PubChem Related Compounds 처럼 수 몇 줄 + 비슷한 구조 · 3D 모양 버튼 (첫 버튼은 왼쪽 여백 없이) */
.rel-counts { list-style: none; margin: 0; padding: 0; }
.rel-counts li { margin: 1px 0; }
.rel-counts li:last-child .lit-link:first-child { margin-left: 0; }
/* 오타 검색 '혹시 이것을 찾으셨나요?' (2026-10-20) — 결과 수 줄 아래, 상세로 가는 작은 둥근 버튼 */
.typo-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 14px; }
.typo-label { font-weight: 600; margin-right: 2px; }
.typo-suggest .pill-link { font-weight: 600; }
.typo-suggest .pill-link .muted { font-weight: 400; }
.pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
h2 .count .lit-link { margin-left: 4px; vertical-align: 2px; }
a:not(.pill-link):not(.lit-link) > .pill-icon { margin-left: 3px; vertical-align: -1px; }  /* 목록 속 이름 링크 끝의 새 창 아이콘 */
.pill-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }

/* 아래쪽 갱신 상태 */

/* 자동완성 */
.has-suggest { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10;
  list-style: none; margin: 0; padding: 6px 0; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 6px 20px rgba(32, 33, 36, 0.16); max-height: 380px; overflow-y: auto;
}
.suggest li { display: flex; align-items: baseline; gap: 12px; padding: 8px 18px; cursor: pointer; }
.suggest li[aria-selected="true"] { background: var(--accent-soft); }
.suggest .s-text { color: var(--text); overflow-wrap: anywhere; }
.suggest .s-text b { font-weight: 700; }
.suggest .s-hint {
  margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 45%;
}
.suggest .s-hint::before { content: "→ "; }

/* 한글 이름 */
.name-ko { margin-left: 8px; color: var(--muted); font-size: 15px; }
.names-ko { margin: 4px 0 0; font-size: 18px; }
.names-ko .src { margin-left: 6px; }

/* 물성으로 찾기 */
.page-title { font-size: 24px; margin: 0 0 6px; }
.nav-link { white-space: nowrap; font-size: 14px; }
.prop-filter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.ranges { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 18px; }
.range { display: grid; gap: 4px; font-size: 14px; }
.range .pair { display: flex; align-items: center; gap: 6px; }
.range input { width: 100%; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
/* 국내 규제 조건 칩 (2026-11-03 질문으로 찾기) — 고른 물성 칩과 같은 파란 꼴, × 로 뺀다 */
.kr-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; font-size: 14px; }
.kr-filter-label { font-weight: 600; margin-right: 4px; }
.kr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 12px; border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.kr-chip:hover { text-decoration: none; filter: brightness(0.95); }
.kr-chip-x { font-size: 16px; line-height: 1; }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin-top: 14px; font-size: 14px; }
/* 테두리 버튼 (조건 초기화 — 찾기 버튼과 같은 높이) */
.filter-actions .btn-outline { display: inline-block; font-weight: 600; padding: 6px 17px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.filter-actions .btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.filter-actions select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); margin-left: 6px; }
.filter-actions button { font: inherit; font-weight: 600; padding: 7px 18px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; cursor: pointer; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
/* 최소 폭 = 고른 물성 열 폭 합(--cols, 템플릿이 넣는다) + 이름 224 + CAS 108 */
.prop-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; min-width: calc(var(--cols, 600px) + 332px); }
/* 열 너비 고정 (머리글 · 가장 긴 값이 줄바꿈 없이 들어가는 폭 + 여유). 이름 열은 남는 폭 */
/* 넓은 화면에서는 물성 찾기 구역(제목 · 조건 · 결과 줄 · 표)을 표에 필요한 폭(--need)까지 본문(1040px)보다 넓게 —
   고른 물성이 가로 스크롤 없이 들어가고, 조건 상자 · 결과 줄 · 표의 왼쪽 끝과 너비가 같게. 가운데 정렬은 여백(margin)으로 */
@media (min-width: 1100px) {
  .props-page, .batch-page { --wide: min(max(100%, var(--need, 100%)), calc(100vw - 48px)); width: var(--wide);
                margin-left: calc((100% - var(--wide)) / 2); }
}
.prop-table .c-cas { width: 108px; }
/* 물성 열 폭은 search.PROP_WIDTH 를 템플릿이 col 에 넣는다 */
/* 좁은 화면: 고정된 이름 열을 줄여 옆에 숫자 열이 하나 넉넉히 보이게 */
@media (max-width: 600px) {
  .prop-table { min-width: calc(var(--cols, 600px) + 238px); }
  .prop-table .c-name { width: 130px; }
}
/* 보일 물성 고르기 — 체크 칸을 둥근 칩으로 */
/* '물성 선택' 버튼 — 누르면 칩 상자(.prop-pick)가 버튼 아래로 내려와 화면 위에 겹친다 */
.pick-wrap { position: relative; margin: 0 0 12px; }
.pick-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pick-toggle { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; }
.pick-toggle:hover, .pick-wrap.open .pick-toggle { border-color: var(--accent); color: var(--accent); }
.pick-toggle .pick-count { font-weight: 400; color: var(--muted); font-size: 13px; }
.pick-toggle .caret { font-size: 11px; transition: transform 0.18s ease; }
.pick-wrap.open .pick-toggle .caret { transform: rotate(180deg); }
.pick-current { color: var(--muted); font-size: 13px; }
.prop-pick { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s; }
.pick-wrap.open .prop-pick { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s ease, transform 0.18s ease; }
@media (prefers-reduced-motion: reduce) { .prop-pick, .pick-toggle .caret { transition: none; } }
.prop-pick .pick-title { font-weight: 600; color: var(--muted); }
.prop-pick .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.prop-pick .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prop-pick .chip span { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); cursor: pointer; user-select: none; }
.prop-pick .chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.prop-pick .chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.prop-pick .chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.prop-pick .pick-actions { display: inline-flex; align-items: center; gap: 12px; }
.prop-pick .pick-title { flex-basis: 100%; }
.prop-pick .chip-group { display: flex; gap: 8px; align-items: baseline; flex-basis: 100%; }
.prop-pick .group-label { flex: none; width: 2.2em; color: var(--muted); font-size: 13px; }
.prop-pick .chip.text span { border-style: dashed; }
.prop-pick .chip.text input:checked + span { border-style: solid; }
.range input[type=search] { width: 100%; }
/* 글 열: 문장을 세 줄까지 (전체는 마우스를 올리면) */
.prop-table th.txt { font-weight: 600; font-size: 13px; color: var(--muted); }
.prop-table td.txt { font-size: 13px; }
.prop-table td.txt .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; }
/* 아래쪽 적용 · 초기화 버튼만 (× · 물음표는 따로) */
.prop-pick .pick-actions button { font: inherit; font-weight: 600; padding: 5px 16px; border: 0; border-radius: var(--radius); background: var(--accent);
  color: #fff; cursor: pointer; }
.prop-pick .pick-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.prop-pick .pick-actions .pick-reset { background: var(--surface); color: var(--text); border: 1px solid var(--line); padding: 4px 15px; }
.prop-pick .pick-actions .pick-reset:hover { border-color: var(--accent); color: var(--accent); }
/* 닫기: 칩 상자 오른쪽 위 × */
.prop-pick .pick-close { position: absolute; z-index: 2; top: 8px; right: 8px; display: flex;  /* 제목(.pick-title, 폭 전체) 위로 */ align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.prop-pick .pick-close svg { stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.prop-pick .pick-close:hover { background: var(--bg); color: var(--text); }
.prop-pick .pick-title { position: relative; padding-right: 36px; word-break: keep-all; color: var(--text); font-size: 15px; }
.prop-pick .pick-title .help { top: -1px; }  /* 좁은 화면에서 말풍선은 제목 아래 폭 전체 (.pick-title 기준) */
/* 적용 · 초기화: 아래쪽 가운데 */
.prop-pick .pick-actions { flex-basis: 100%; justify-content: center; margin-top: 4px; }
.prop-table th, .prop-table td { padding: 8px 9px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
/* 이름 열: 띄어쓰기 없는 긴 이름도 줄을 바꿔 열이 넓어지지 않게, 표를 옆으로 밀어도 왼쪽에 고정 (물성 10개라 데스크톱도 넘친다) */
.prop-table .name-col { overflow-wrap: anywhere; position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.prop-table thead th { border-top: 0; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; background: var(--th-bg); }
.prop-table thead .name-col { background: var(--th-bg); }  /* 붙박이 이름 칸도 머리 줄은 같은 바탕 */
.prop-table thead .sorted { background: var(--accent-soft); }
.prop-table thead .unit { font-weight: 400; }
.prop-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prop-table .num .differ { white-space: normal; line-height: 1.4; margin-top: 2px; }  /* 범위 · 출처마다 다름은 칸 안에서 줄바꿈 */
.prop-table .sorted { background: var(--accent-soft); }
.prop-table .na { color: var(--muted); opacity: 0.6; }  /* 값 없는 칸 — 앱 화면 규칙 '빈 값은 회색 대시' (2026-10-21) */
.nowrap { white-space: nowrap; }

/* 물음표 설명 (마우스를 올리거나 눌러서 · 키보드로 와서 보기) */
.page-title { position: relative; }
.help { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; top: -2px; }
.help-btn {
  display: inline-flex; padding: 0; border: 0; border-radius: 50%; background: none;
  color: var(--accent); cursor: help;
}
.help-btn svg { display: block; }
.help-btn .bg { fill: var(--accent-soft); transition: fill 0.15s; }
.help-btn path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.help-btn .dot { fill: currentColor; }
.help-btn:hover, .help:focus-within .help-btn { color: #fff; }
.help-btn:hover .bg, .help:focus-within .help-btn .bg { fill: var(--accent); }
.help-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-tip {
  position: absolute; left: -14px; top: calc(100% + 12px); z-index: 41; width: 360px; word-break: keep-all;  /* 하단 바(40) 위, 펼친 목록(45) 아래 */
  padding: 12px 16px 12px 14px; font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(32, 33, 36, 0.18);
  visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.help-tip::before {  /* 아이콘을 가리키는 꼬리 */
  content: ""; position: absolute; left: 20px; top: -6px; width: 10px; height: 10px;
  background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.help-tip strong { display: block; font-size: 13px; margin-bottom: 4px; }
.help-tip ul { margin: 0; padding-left: 18px; color: var(--muted); }
.help-tip li { margin: 2px 0; }
.help:hover .help-tip, .help:focus-within .help-tip { visibility: visible; opacity: 1; transform: translateY(0); }
/* 눌러서 고정(tip-on) · 다시 눌러 닫음(tip-off — 마우스가 위에 있거나 초점이 남아도 숨김), static/help.js (2026-11-12 사용자 '다시 누르면 닫히게') */
.help.tip-on .help-tip { visibility: visible; opacity: 1; transform: translateY(0); }
.help.tip-off .help-tip { visibility: hidden; opacity: 0; transform: translateY(4px); }
.help.tip-on .help-btn { color: #fff; }
.help.tip-on .help-btn .bg { fill: var(--accent); }
/* 스크롤 상자(표) 안의 말풍선은 화면 기준으로 '?' 바로 아래(자리가 없으면 위)에 — static/help.js 가 자리를 잰다 (.help-fixed, 2026-11-13 계정 목록 '구분').
   상자 안에 두면 상자 높이에 끌려 세로 스크롤바가 생기거나(최소 높이를 주면) 계정이 적을 때 아래가 비었고, 좁은 화면에서는 단추를 덮었다 */
.help.help-fixed .help-tip { position: fixed; left: var(--tip-left, 16px); top: var(--tip-top, 16px); right: auto; bottom: auto; width: min(360px, calc(100vw - 32px)); z-index: 46; }
.help.help-fixed .help-tip::before { display: block; left: var(--tip-arrow, 20px); }
.help.help-fixed.tip-above .help-tip::before { top: auto; bottom: -6px; transform: rotate(225deg); }

@media (max-width: 720px) {  /* 좁은 화면: 제목 아래 폭 전체로 (화면 밖으로 안 나가게) */
  .help { position: static; }
  .help-tip { left: 0; width: 100%; }
  .help-tip::before { display: none; }
}
/* 중간 폭: 상세 오른쪽 표(부모 · 성분 · 문헌 · 특허 · 등록일)의 말풍선은 왼쪽으로 펼친다 — 오른쪽으로 펼치면 721~921px 에서
   화면 밖으로 나가 숨어 있을 때도 가로 스크롤이 생겼다 (2026-10-15) */
@media (min-width: 721px) and (max-width: 1100px) {
  .props .has-help .help-tip { left: auto; right: -14px; }
  .props .has-help .help-tip::before { left: auto; right: 20px; }
}

/* 머리글을 눌러 정렬 */
.sort-link { color: inherit; display: inline-flex; align-items: baseline; gap: 4px; }
.sort-link:hover { color: var(--accent); text-decoration: none; }
.sort-link .arrow { font-size: 11px; opacity: 0.35; }  /* 글자는 11px 이상 (앱 화면 규칙) */
.sorted .sort-link { color: var(--accent); }
.sorted .sort-link .arrow { opacity: 1; }
.prop-table thead .num .sort-link { justify-content: flex-end; }

/* 상세 화면 목차 (PubChem CONTENTS 처럼, toc.js) — 넓은 화면은 왼쪽에 붙어 따라오고, 좁으면 오른쪽 아래 '목차' 버튼 */
html:has(body.has-toc) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(body.has-toc) { scroll-behavior: auto; } }
article.compound [data-toc] { scroll-margin-top: calc(var(--top-h, 60px) + 12px); }
.toc ol { list-style: none; margin: 0; padding: 0; }
/* 번호 · 글을 나란히(flex) — 글이 길어 줄이 바뀌면 둘째 줄이 번호 밑이 아니라 글 시작 밑으로 (2026-11-13 사용자, MSDS '1 화학제품과 회사에 관한 정보').
   줄은 낱말 사이에서 바꾸고(keep-all — '영/향' 처럼 낱말 가운데서 끊기던 것), 한 낱말이 칸보다 길 때만 그 안에서 */
.toc a { display: flex; align-items: baseline; word-break: keep-all; overflow-wrap: anywhere; padding: 5px 10px; color: var(--muted); font-size: 14px; line-height: 1.35; border-radius: 6px; }
.toc a:hover { color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.toc a.on { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.toc-no { flex: none; min-width: 22px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 6px 10px; }
/* 2단계 목차 (2026-10-16) — 묶음 줄 + ˅ 펼치기, 펼치면 그 아래 구역들 */
.toc-row { display: flex; align-items: center; gap: 2px; }
.toc-row a { flex: 1; min-width: 0; }
.toc-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
  display: grid; place-items: center; }
.toc-x::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); }
.toc-x[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
.toc-x:hover { background: var(--accent-soft); color: var(--accent); }
.toc-x:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.toc-sub { list-style: none; margin: 0 0 4px; padding: 0 0 0 12px; }
.toc .toc-sub a { font-size: 13px; padding: 3px 10px; }
.toc-sub .toc-no { min-width: 34px; }
.toc-g:has(> .toc-sub:not([hidden])) > .toc-row a.on { background: none; }  /* 펼친 묶음은 그 아래 구역 줄에 바탕을 칠한다 */
@media (min-width: 1200px) {
  body.has-toc .wrap { max-width: 1300px; }
  body.has-toc main { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
  .toc {
    position: sticky; top: calc(var(--top-h, 60px) + 16px); margin-top: 24px;
    max-height: calc(100vh - var(--top-h, 60px) - 32px - var(--hud-space, 0px)); overflow-y: auto; padding: 4px 0;
  }
  .toc-fab { display: none; }
}
@media (max-width: 1199px) {
  .toc {
    position: fixed; right: 16px; bottom: calc(72px + var(--hud-space, 0px)); z-index: 40; width: min(300px, calc(100vw - 32px));
    max-height: 60vh; overflow-y: auto; padding: 10px 6px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(32, 33, 36, 0.22);
    display: none;
  }
  .toc.open { display: block; }
  .toc a { padding: 7px 10px; }
  .toc-fab {
    position: fixed; right: 16px; bottom: calc(20px + var(--hud-space, 0px)); z-index: 40; padding: 10px 16px; border: 0; border-radius: 999px;
    background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    box-shadow: 0 6px 18px rgba(32, 33, 36, 0.25);
  }
  .toc-fab:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
}

/* 로그인 · 회원가입 */
.auth {
  min-height: calc(100vh - 90px); display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px 0 10vh;
}
.auth-brand { display: flex; color: var(--text); text-align: center; margin-bottom: 24px; }
.auth-brand:hover { text-decoration: none; }
.auth-card {
  width: min(380px, 100%); display: grid; gap: 6px; padding: 26px 24px 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
}
.auth-card h1 { font-size: 20px; margin: 0; }
.auth-lead { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.auth-card label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; margin-top: 8px; }
.auth-card input {
  font: inherit; font-size: 16px; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg); color: var(--text);
}
.auth-card input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth-hint { color: var(--muted); font-size: 13px; }
.auth-card button {
  margin-top: 16px; font: inherit; font-weight: 600; padding: 11px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; cursor: pointer;
}
.auth-card button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.auth-error { margin: 4px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--notice-bg); color: var(--notice-text); font-size: 14px; }
.auth-switch { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .auth { padding-bottom: 6vh; }
  .auth-card { padding: 22px 18px 18px; }
}

/* 화면 아래 하단 바 (templates/hud.html · hud.js) — 가운데 떠 있는 캡슐 (2026-10-15 사용자가 후보 B 를 고름).
   바가 있으면 본문 아래 · 목차 버튼을 바 높이(--hud-space)만큼 띄운다 */
:root:has(nav.hud) { --hud-space: 84px; }
body { padding-bottom: var(--hud-space, 0px); }
.hud { position: fixed; left: 0; right: 0; bottom: 28px; z-index: 40; display: flex; justify-content: center; pointer-events: none; }
.hud-inner {
  pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 24px rgba(32, 33, 36, 0.18);
}
.hud svg { display: block; flex-shrink: 0; }
/* :where() 로 묶어 우선순위를 올리지 않는다 — :not(.help-btn) 을 그냥 쓰면 목록의 ★ 노란색(.fav-btn)까지 덮어 검게 나왔다 */
.hud button, .hud-panel button:where(:not(.help-btn)) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.hud-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; white-space: nowrap; font-size: 14px; color: var(--text); }
.hud-btn svg { color: var(--muted); }
.hud-btn:hover, .hud-btn[aria-expanded="true"] { background: var(--accent-soft); }
.hud-btn[aria-expanded="true"], .hud-btn[aria-expanded="true"] svg { color: var(--accent); }
.hud-btn[aria-controls="hud-fav"] svg { color: #f2a900; }  /* 즐겨찾기 별은 늘 노란색 — 채워진 ☆ 와 같은 색 */
.hud-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hud-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.hud-sep { width: 1px; height: 22px; background: var(--line); }
.hud-user { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
/* 화합물 수 — CAS 번호가 있는 화합물 수 (첫 화면 안내 줄에 있던 것을 여기로 옮김, 2026-10-15) */
.hud-stat { display: inline-flex; align-items: center; gap: 5px; padding: 0 14px 0 12px; white-space: nowrap; font-size: 13px; color: var(--muted); cursor: default; }
.hud-stat strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
/* 물질 수 (2026-11-09) — 숫자가 단추, 마우스를 올리거나 누르면 세 갈래 말풍선이 캡슐 위로 (.help 와 같은 방식) */
.hud-stat-help { margin-left: 0; top: 0; }
.hud button.hud-stat { padding: 9px 14px 9px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); cursor: help; }
.hud button.hud-stat:hover, .hud-stat-help:focus-within .hud-stat, .hud-stat-help.tip-on .hud-stat { background: var(--accent-soft); }
/* 눌러서 고정 · 다시 눌러 닫음은 .help 공통(static/help.js) — 여기는 물질 수 단추 배경만 */
.hud-stat-help.tip-off .hud-stat { background: none; }
.hud button.hud-stat:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hud-stat-tip { top: auto; bottom: calc(100% + 14px); left: 0; width: 300px; }
/* 말풍선이 열린 동안만 하단 바를 휴대폰 '목차' 단추(40) 위로 — 목록 창(45) · 알림(50) 보다는 아래 */
.hud:has(.hud-stat-help:hover, .hud-stat-help:focus-within, .hud-stat-help.tip-on) { z-index: 42; }
.hud-stat-tip::before { top: auto; bottom: -6px; transform: rotate(225deg); }
.hud-stat-tip li { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 펼친 목록 — 캡슐 바로 위 가운데. 길면 목록(.hud-list)만 스크롤 — 머리의 물음표 말풍선이 잘리지 않게 */
.hud-panel {
  position: fixed; z-index: 45; left: 50%; bottom: 88px; transform: translateX(-50%);
  width: min(380px, calc(100vw - 16px)); display: flex; flex-direction: column; padding: 10px 0 6px;
  max-height: min(60vh, 520px, calc(100vh - 260px));  /* 위쪽에 물음표 말풍선 자리 */
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(32, 33, 36, 0.22);
}
.hud-panel[hidden] { display: none; }
.hud-panel-head { position: relative; display: flex; align-items: center; gap: 4px; padding: 2px 16px 8px; border-bottom: 1px solid var(--line); }
.hud-panel-head > strong { font-size: 15px; white-space: nowrap; }
/* 물음표 말풍선은 목록 폭 전체로, 목록 위쪽에 — 아래로 펼치면 짧은 목록에서 하단 바를 가렸다 */
.hud-panel-head .help { position: static; top: 0; margin-left: 2px; }
.hud-panel-head .help-tip { left: 8px; right: 8px; width: auto; top: auto; bottom: calc(100% + 20px); }
.hud-panel-head .help-tip::before { display: none; }
.hud-clear { margin-left: auto; padding: 0; font-size: 12px !important; color: var(--muted) !important; white-space: nowrap; }
.hud-clear:hover { color: var(--accent) !important; }
.hud-note { margin: 0; padding: 14px 16px; color: var(--muted); font-size: 14px; word-break: keep-all; }
.hud-list { list-style: none; margin: 0; padding: 4px 0; min-height: 0; overflow-y: auto; }
.hud-list:empty { display: none; }
.hud-list li { display: flex; align-items: center; }
.hud-list a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px 16px; color: var(--text); }
.hud-list a:hover { background: var(--accent-soft); text-decoration: none; }
.hud-list .fav-btn { margin-right: 8px; }
.hud-remove { flex-shrink: 0; margin-right: 10px; padding: 7px !important; border-radius: 50%; color: var(--muted) !important; line-height: 0; }
.hud-remove:hover { color: var(--text) !important; background: var(--accent-soft) !important; }
.hud-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hud-remove[aria-busy="true"] { opacity: 0.5; }
.hud-thumb { width: 64px; height: 48px; border-radius: 6px; border: 1px solid var(--line); font-size: 10px; }
.hud-thumb svg { width: 64px; height: 48px; }
.hud-text { min-width: 0; display: grid; }
.hud-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-ko { color: var(--muted); font-weight: 400; margin-left: 4px; }
.hud-meta { color: var(--muted); font-size: 12px; }
.hud-panel.hud-menu { width: 140px; padding: 8px; transform: none; }  /* 계정 메뉴 — 로그아웃 버튼만, 아이디 버튼 바로 위 (hud.js 가 left) */
.hud-menu form { margin: 0; }
.hud-logout { width: 100%; padding: 8px; border: 1px solid var(--line) !important; border-radius: var(--radius); font-weight: 600; }
.hud-logout:hover { border-color: var(--accent) !important; color: var(--accent); }
.hud-mypage { display: block; margin-bottom: 6px; text-align: center; color: var(--text); }  /* 마이페이지 (2026-10-27) */
.hud-menu .hud-logout { font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.5; box-sizing: border-box; }  /* 마이페이지(링크)와 로그아웃(버튼) 글씨 · 높이를 같게 */
.hud-mypage:hover { text-decoration: none; }
/* 질문으로 찾기 (2026-11-03 사용자 — 하단 바 옆 창, static/ask.js). 오른쪽 아래, 다른 목록 창보다 크고 바깥을 눌러도 닫히지 않는다 */
.hud-panel:not(.hud-ask) { z-index: 46; }  /* 최근 본 물질 · 즐겨찾기 · 계정 창은 질문 창 위에 (11/5 검토 — 열어 둔 질문 창이 목록을 가렸다) */
.hud-panel.hud-ask { left: auto; right: 24px; transform: none; width: min(400px, calc(100vw - 16px));
  height: min(560px, calc(100vh - 140px)); max-height: none; padding-bottom: 0; }
.hud-ask .hud-panel-head .help-tip { top: calc(100% + 6px); bottom: auto; }  /* 창이 높아 말풍선은 아래로 */
.hud-ask .hud-clear { margin-right: 6px; }
.ask-close { padding: 4px !important; border-radius: 50%; color: var(--muted) !important; line-height: 0; }
.ask-close:hover { color: var(--text) !important; background: var(--accent-soft) !important; }
.ask-log { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ask-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.ask-msg p { margin: 0; }
.ask-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ask-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; display: grid; gap: 6px; }
.ask-bot.ask-error { background: var(--notice-bg); color: var(--notice-text); border-color: transparent; }  /* 위쪽 알림(.notice)과 같은 색 */
.ask-wait { color: var(--muted); }
.ask-status { padding: 8px 14px; background: var(--notice-bg); color: var(--notice-text); font-size: 13px; border-bottom: 1px solid var(--line); }  /* 질문 서버 끊김 안내 (2026-11-04) */
.ask-status p { margin: 0; }
.ask-status .ask-note { color: inherit; opacity: .85; }
.ask-bot.ask-error .ask-example { margin-top: 6px; }
.ask-title { font-weight: 600; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ask-chips:empty { display: none; }
.ask-chip { padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.ask-note { color: var(--muted); font-size: 13px; }
.ask-go { justify-self: start; margin-top: 2px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; }
.ask-go:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.ask-empty, .ask-options { display: grid; gap: 8px; justify-items: start; }
.ask-bot.ask-wide { align-self: stretch; max-width: none; }  /* 결과 목록이 있으면 창 폭 전체 */
.ask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ask-list a { display: flex; align-items: center; gap: 10px; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; color: var(--text); }
.ask-list a:hover { background: var(--accent-soft); text-decoration: none; }
.ask-thumb { flex: none; width: 56px; height: 42px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 10px; overflow: hidden; }
.ask-thumb svg { width: 56px; height: 42px; }
.ask-item-text { min-width: 0; display: grid; }
.ask-item-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-item-meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 물질 하나에 답하기 (2026-11-03 2단계 B) — 머리 · 답 글 · 근거 카드 · 바로가기 */
.ask-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; color: var(--text); }
.ask-head:hover { background: var(--accent-soft); text-decoration: none; }
.ask-answer { white-space: pre-wrap; line-height: 1.65; }
.ask-answer-wait { color: var(--muted); }
.ask-answer-error { padding: 6px 10px; border-radius: 8px; background: var(--notice-bg); color: var(--notice-text); }
.ask-cite { display: inline-block; vertical-align: super; margin-left: 2px; padding: 0 4px !important; border-radius: 6px; font-size: 10.5px !important;
  line-height: 1.4; color: var(--accent) !important; background: var(--accent-soft) !important; font-weight: 600; }
.ask-cite:hover { text-decoration: underline; }
.ask-bot > *, .ask-sources, .ask-src { min-width: 0; }  /* 긴 근거 제목이 말풍선 밖으로 나가지 않게 (줄임표) */
.ask-sources { display: grid; gap: 4px; }
.ask-src-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ask-src summary { cursor: pointer; font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-src summary:hover { color: var(--accent); }
.ask-src-text { margin-top: 4px; padding: 6px 9px; max-height: 220px; overflow-y: auto; white-space: pre-wrap; font-size: 12.5px; line-height: 1.55;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.ask-links { display: flex; flex-wrap: wrap; gap: 6px; }
/* 화면에는 보이지 않고 낭독기만 읽는 글 (질문 창 알림 · 위험 배지, 2026-11-05) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ask-item-haz { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }  /* 대체 물질 위험 변화 (2026-11-04) — .hz 는 물성이 비슷한 물질 화면 것 */
.ask-item-haz .hz { margin: 0; padding: 0 6px; font-size: 11.5px; }
.ask-chip.ask-follow { border-color: var(--line); background: transparent; color: var(--muted); font-weight: 500; }  /* 앞 물질에 이어 답함 (2026-11-04) */
.ask-meaning { display: grid; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }  /* 뜻이 가까운 물질 (2026-11-04 C) */
.ask-bot > .ask-meaning:first-child, .ask-chips + .ask-meaning { border-top: 0; padding-top: 0; }
.ask-links .ask-go { margin-top: 0; }
.ask-example { padding: 6px 12px !important; border: 1px solid var(--line) !important; border-radius: 999px; font-size: 13px !important; text-align: left; }
.ask-example:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.ask-form textarea { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.45; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.ask-form textarea:focus { outline: none; border-color: var(--accent); }
.ask-form button { padding: 8px 16px !important; border-radius: var(--radius); background: var(--accent) !important; color: #fff !important; font-weight: 600; white-space: nowrap; }
.ask-form button:disabled { opacity: 0.55; cursor: default; }
.hud-more { margin: 0; padding: 8px 14px 4px; border-top: 1px solid var(--line); font-size: 13px; text-align: right; }

/* 마이페이지 (2026-10-27) — 칸 고르기 · 즐겨찾기 표(목록으로 찾기와 같은 .prop-table) · 계정 */
.me-user { font-size: 16px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.me-tabs { display: flex; gap: 4px; margin: 10px 0 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.me-tabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.me-tabs a:hover { color: var(--text); text-decoration: none; }
.me-tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.me-tabs .count { font-weight: 400; color: var(--muted); font-size: 13px; }
.me-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.me-tools input[type=search] { flex: 1 1 220px; min-width: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius);
                               background: var(--surface); color: var(--text); font: inherit; }
/* 찾기 칸에 글자가 있으면 × 를 늘 보이게 — 크롬 · 엣지는 마우스를 올리거나 칸을 눌렀을 때만 보여 준다 (2026-11-13 사용자, 계정 목록 · 즐겨찾기).
   × 를 누르면 처음 목록으로 가는 것은 각 화면 스크립트(search 이벤트) */
.me-tools input[type=search]:not(:placeholder-shown)::-webkit-search-cancel-button { opacity: 1; pointer-events: auto; }
.me-tools select { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.me-btn { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
          font: inherit; font-weight: 600; cursor: pointer; }
.me-btn:hover { border-color: var(--accent); color: var(--accent); }
.me-count { font-size: 14px; font-variant-numeric: tabular-nums; }  /* 숫자 폭을 같게 — 고른 수가 바뀌어도 버튼이 덜 움직이게 */
.me-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }  /* 버튼은 선택 글씨 바로 옆 */
.me-sel-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.me-btn-sm { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px 4px 9px; font-size: 13px; }
.me-btn-sm .sheet-icon { width: 15px; height: 15px; }
.me-star { color: #f2a900; flex: none; }  /* 하단 바 즐겨찾기 별과 같은 색 */
.me-trash { flex: none; }  /* 최근 본 물질 기록 삭제 · 모두 지우기 — 글자색을 따름 */
.me-btn:disabled .me-star, .me-btn:disabled .sheet-icon, .me-btn:disabled .me-trash { opacity: 0.6; }
.me-right { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }  /* 쪽 이동 · 전체 엑셀 — 개수 줄 오른쪽 끝 */
.me-pager { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.me-pager a, .me-pager .off { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
                              border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 18px; line-height: 1; }
.me-pager a { color: var(--text); }
.me-pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.me-pager .off { opacity: 0.4; }
.me-table td { padding-top: 6px; padding-bottom: 6px; }
.me-table td.batch-kr { line-height: 1.45; }
.me-btn:disabled { opacity: 0.45; cursor: default; border-color: var(--line); color: var(--muted); }
.me-table td, .me-table th { vertical-align: middle; }
.me-table .me-check { width: 36px; text-align: center; }
.me-table .structure.thumb { display: block; width: 72px; height: 54px; }  /* 줄을 낮게 (10/27) */
.me-actions { margin: 12px 0; }
/* 계정 칸 — 구역마다 왼쪽 제목 · 설명, 오른쪽 입력 카드 (2026-10-27 사용자 시안 C, GitHub 설정 참고) */
.acc-sec { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.acc-sec:first-child { border-top: 0; padding-top: 6px; }
.acc-sec-head h2 { font-size: 17px; margin: 0 0 6px; }
.acc-sec-head p { margin: 0; line-height: 1.6; }
.acc-sec-body { display: grid; gap: 12px; margin: 0; max-width: 640px; padding: 20px 22px;
                background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.acc-sec-body label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; color: var(--text); }
.acc-sec-body input { font: inherit; font-weight: 400; min-width: 0; padding: 9px 12px; border: 1px solid var(--line);
                      border-radius: var(--radius); background: var(--surface); color: var(--text); }
.acc-sec-body input:disabled { background: var(--bg); color: var(--muted); }
.acc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-actions { display: flex; }
.acc-save { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 18px; border: 0; border-radius: var(--radius);
            background: var(--accent); color: #fff; cursor: pointer; }  /* 마이페이지 '찾기' 와 같은 파란 버튼 */
.acc-save:hover { filter: brightness(1.08); }
.acc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.acc-stats.acc-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }  /* 이용 종료일이 있는 계정 (2026-11-10) */
.acc-stats dt { font-size: 13px; color: var(--muted); }
.acc-stats dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .acc-sec { grid-template-columns: 1fr; gap: 14px; }
  .acc-two, .acc-stats, .acc-stats.acc-stats-5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .acc-two { grid-template-columns: 1fr; } }
@media (max-width: 720px) {  /* 휴대폰: 캡슐은 화면 폭, 글자는 빼고 아이콘 · 개수만 */
  .hud { bottom: 16px; }
  .hud-inner { width: calc(100% - 20px); justify-content: space-around; }
  .hud-btn { padding: 9px 10px; font-size: 13px; }
  .hud-label, .hud-stat-label, .hud-stat-unit { display: none; }
  .hud-stat { padding: 0 6px; }
  .hud button.hud-stat { padding: 9px 8px; }
  .hud .hud-stat-tip { left: 10px; right: 10px; width: auto; }  /* 캡슐 폭에 맞춤 (.help 가 static 이라 .hud 기준) */
  .hud-panel { left: 10px; right: 10px; width: auto; transform: none; bottom: 76px; }
  .hud-panel.hud-menu { left: auto !important; right: 10px; width: 140px; }
  .hud-panel.hud-ask { left: 10px; right: 10px; width: auto; height: min(70vh, calc(100vh - 100px)); }  /* 질문으로 찾기 — 휴대폰은 폭 전체 */
}

/* 즐겨찾기 ☆ (macros.html fav_button) — 상세 제목 옆 · 검색 결과 카드 오른쪽 위 · 하단 바 목록 */
.fav-btn {
  display: inline-flex; flex-shrink: 0; padding: 6px; border: 0; border-radius: 50%; background: none; color: var(--muted);
  cursor: pointer; line-height: 0;
}
.fav-btn path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.fav-btn:hover { color: #f2a900; background: var(--accent-soft); }
.fav-btn[aria-pressed="true"] { color: #f2a900; }
.fav-btn[aria-pressed="true"] path { fill: currentColor; }
.fav-btn[aria-busy="true"] { opacity: 0.5; }
.fav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.title-row { display: flex; align-items: flex-start; gap: 4px; }
.title-row .fav-btn { margin-top: 1px; }
.title-row .fav-btn svg { width: 28px; height: 28px; }
.hit { position: relative; }
.hit > .fav-btn { position: absolute; top: 8px; right: 8px; }
.hit .info { padding-right: 32px; }

/* 독성 표 칸 (PubChem SDQ 표) — PubChem 처럼 제목 아래 폭 전체 상자: 'N줄 · 내려받기' 머리, 표, 5줄씩 쪽 넘기기 (toxtable.js) */
.lcss-list > div.wide { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.lcss-list li.has-table { min-width: 0; display: grid; gap: 4px; }
.tox { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tox-head, .tox-pager { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 7px 12px; background: var(--bg); }
.tox-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.tox-count { font-weight: 600; font-size: 14px; }
.tox-scroll { overflow-x: auto; }
.tox-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.tox-table th, .tox-table td { padding: 7px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.tox-table thead th { border-top: 0; font-weight: 600; color: var(--muted); white-space: nowrap; background: var(--th-bg); }
.tox-table td { overflow-wrap: break-word; }  /* anywhere 는 짧은 값도 글자 중간에서 끊는다 (hum·an) */
.tox-pager { justify-content: center; border-top: 1px solid var(--line); font-size: 14px; }
.tox-more-n { display: block; color: var(--muted); font-size: 12px; }  /* 생물 출처 근거가 많을 때 '외 N건' */
.tox-pager button { font: inherit; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--accent); cursor: pointer; }
.tox-pager button:disabled { color: var(--muted); opacity: .6; cursor: default; }
.tox-page { color: var(--muted); white-space: nowrap; }
.tox-page input { width: 4.5em; font: inherit; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); text-align: right; }
.tox.loading tbody { opacity: .5; }
.tox.failed .tox-pager::after { content: "불러오지 못했습니다. 다시 눌러 주세요."; color: var(--notice-text); font-size: 13px; }
/* 좁은 화면: 표 대신 줄마다 '칸 이름 값' 을 이어 쓴다 (표를 옆으로 밀면 긴 영향 · 문헌이 세로로 길어진다) */
@media (max-width: 720px) {
  .tox-table { min-width: 0; font-size: 14px; }
  .tox-table thead { display: none; }
  .tox-table tr { display: block; padding: 8px 12px; }
  .tox-table tr + tr { border-top: 1px solid var(--line); }
  .tox-table td { display: inline; padding: 0; border: 0; margin-right: 10px; }
  .tox-table td:empty { display: none; }
  .tox-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; margin-right: 4px; white-space: nowrap; }
  .tox-pager { gap: 6px; padding: 7px 8px; }
  .tox-pager button { padding: 3px 7px; }
  .tox-page input { width: 3.6em; }
}

/* 설명 문단 — PubChem 맨 위 요약 칸의 Description (2026-10-17). 3개를 보이고 나머지는 접는다 */
.desc-item { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 8px; }
.desc-text { margin: 0; line-height: 1.6; white-space: pre-line; overflow-wrap: break-word; }
.desc-item .src { margin: 4px 0 0; }
.more-desc > summary { font-size: 14px; }
/* 한 제목 아래 항목이 많으면 나머지 접기 (PubChem View More 처럼) */
.lcss-list li.more-items { list-style: none; }
.lcss-list li.more-items > details > summary { margin-top: 2px; font-size: 13px; }
.lcss-list li.more-items > details > ul { margin-top: 6px; }

.tox-caption { font-weight: 600; }  /* 한 칸에 표가 여럿일 때 PubChem 표 이름 (의약품 라벨 3종) */
/* 표 안에서 찾기 · 정렬 (2026-10-18) — 2쪽 이상인 표의 머리에, 좁으면 줄을 바꿔 폭 전체로 */
.tox-tools { display: flex; gap: 6px; flex: 1 1 260px; justify-content: flex-end; min-width: 0; }
.tox-q, .tox-sort { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); min-width: 0; }
.tox-q { flex: 1 1 160px; max-width: 240px; }
.tox-sort { flex: 0 1 auto; max-width: 180px; }
.tox-none { color: var(--muted); text-align: center; padding: 14px 10px; }
@media (max-width: 720px) {
  .tox-tools { flex-basis: 100%; justify-content: stretch; }
  .tox-q { max-width: none; }
}
.tox-table td.tox-date { white-space: nowrap; }  /* 날짜 칸은 '2009-12-16' 이 꺾이지 않게 */

/* 분류 트리 (NCI Thesaurus · ChEBI · UN GHS, 2026-10-18) — 겹친 경로를 나무 모양으로, 길면 상자 안에서 스크롤 */
.tree-box { max-height: 520px; overflow: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; margin-top: 8px; }
.ctree, .ctree ul { list-style: none; margin: 0; padding: 0; }
.ctree ul { margin-left: 8px; padding-left: 12px; border-left: 1px dashed var(--line); }
.ctree li { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.ctree li.match { font-weight: 700; }
.ctree li.match li { font-weight: 400; }
.ctree li.match li.match { font-weight: 700; }

/* 스펙트럼 카드 (2026-10-19) — 썸네일은 흰 바탕 그림이라 어두운 테마에서도 흰 칸에 둔다 */
.spec-h { font-size: 15px; margin: 18px 0 8px; }
.spec-h .muted { font-weight: 400; font-size: 13px; }
/* NLM 선별 PubMed 문헌의 소제목별 링크 (2026-10-30) — 좁으면 저절로 단이 줄어든다 */
.nlm-sub-title { font-size: 15px; margin: 16px 0 6px; }
.nlm-sub-title .count { font-size: 13px; }
.nlm-subs { list-style: none; margin: 0; padding: 0; columns: 4 10em; column-gap: 20px; font-size: 14px; }
.nlm-subs li { break-inside: avoid; padding: 2px 0; }
.spec-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.spec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  font-size: 13px; min-width: 0; }
/* 썸네일 칸은 높이를 미리 잡는다 — 늦게 들어오는 그림이 위쪽을 늘려 목차로 옮긴 자리가 수천 px 어긋났다 (2026-11-02) */
.spec-thumb { display: flex; align-items: center; justify-content: center; height: 180px; overflow: hidden;
  background: var(--structure-bg); border-radius: 6px; margin-bottom: 8px; }
.spec-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.spec-card dl { margin: 0; }
.spec-card dl div { display: grid; grid-template-columns: minmax(84px, 38%) 1fr; gap: 6px; padding: 2px 0; }
.spec-card dt { color: var(--muted); }
.spec-card dd { margin: 0; overflow-wrap: anywhere; max-height: 7.5em; overflow: auto; }
.spec-text { margin: 4px 0; overflow-wrap: anywhere; }
.spec-card .src { margin: 6px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.spec-more { margin-top: 10px; }
.spec-more > summary { cursor: pointer; color: var(--accent); }
.spec-more .spec-cards { margin-top: 10px; }

/* NCBI LinkOut (2026-10-19) */
details.linkout { margin-top: 10px; }
details.linkout > summary { cursor: pointer; color: var(--accent); }
details.linkout .linkout-body { margin-top: 8px; }

/* 물성이 비슷한 물질 (/similar, 2026-10-19) — 위험 변화는 무거워짐 빨강 ▲ · 가벼워짐 초록 ▽ */
:root { --worse: #b42318; --worse-bg: #fdecea; --better: #1d7a35; --better-bg: #e6f4ea; }
@media (prefers-color-scheme: dark) {
  :root { --worse: #ff9b91; --worse-bg: #3b1f1d; --better: #84d99a; --better-bg: #19331f; }
}
.sim-back { margin: 0 0 10px; }
/* 상세로 돌아가는 버튼 — CSV 버튼과 같은 둥근 테두리, 긴 이름은 말줄임 */
.back-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 14px 4px 8px;
            font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line);
            border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 3px rgba(32, 33, 36, 0.08); }
.back-btn:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.back-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.back-btn svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back-btn .back-name { overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }
.similar-page .page-title { margin-bottom: 12px; }
.sim-base { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 12px; }
.sim-base-name { font-weight: 600; }
.sim-base-name .muted { font-weight: 400; }
.sim-values { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0; }
.sim-values div { display: flex; gap: 6px; align-items: baseline; }
.sim-values dt { color: var(--muted); font-size: 13px; }
.sim-values dd { margin: 0; font-variant-numeric: tabular-nums; }
.sim-values .unit { color: var(--muted); font-size: 13px; }
.sim-hazards { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.hz { position: relative; display: inline-block; padding: 1px 8px; margin: 0 4px 4px 0; border: 1px solid var(--line); border-radius: 3px;
      font-size: 12px; line-height: 1.6; white-space: nowrap; }
.sim-hazards .hz { margin: 0; }
.hz.up { color: var(--worse); background: var(--worse-bg); border-color: transparent; }
.hz.down { color: var(--better); background: var(--better-bg); border-color: transparent; }
.hz.none, .hz.same { color: var(--muted); }
.sim-filter .chip-group { display: flex; gap: 8px; align-items: baseline; margin: 2px 0 8px; }
.sim-filter .group-label { flex: none; width: 5.6em; color: var(--muted); font-size: 13px; }
.sim-filter .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sim-filter .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sim-filter .chip span { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
                         font-size: 13px; cursor: pointer; user-select: none; }
.sim-filter .chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.sim-filter .chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sim-filter .chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.sim-filter .filter-actions { margin-top: 6px; }
.sim-table .c-hz { width: 260px; }
/* CSV 내려받기 버튼 — 물성이 비슷한 물질 후보 수 줄 오른쪽 끝 · 표 칸 머리 (초록 표 아이콘, 3D 내려받기와 같은 둥근 테두리) */
:root { --sheet: #1e7145; }
@media (prefers-color-scheme: dark) { :root { --sheet: #4cbb7f; } }
.sim-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.sim-summary .summary { margin: 0; }
.sheet-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 9px;
             font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line);
             border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 3px rgba(32, 33, 36, 0.08); }
.sheet-btn:hover { color: var(--sheet); border-color: var(--sheet); text-decoration: none; }
.sheet-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-icon { flex: none; }
.tox-head .sheet-btn { padding: 3px 12px 3px 8px; }  /* 찾기 칸 · 정렬 칸 높이에 맞춤 */
.sheet-icon rect { fill: var(--sheet); }
.sheet-icon path { fill: none; stroke: var(--surface); stroke-width: 1.4; }
.sim-table .c-level { width: 96px; }
/* 비슷한 정도 — 높음(진한 파랑) · 보통(파란 테두리) · 낮음(회색 테두리). 빨강 · 초록은 위험 변화에만 쓴다 */
/* 비슷한 정도 · 위험 변화 꼬리표는 네모 (KTR 시안에서, 2026-10-27 사용자 — 둥근 버튼과 구분) */
.lv { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.lv0 { background: var(--accent); color: var(--surface); border-color: transparent; font-weight: 600; }
.lv1 { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.lv2 { background: var(--surface); color: var(--muted); border-color: var(--muted); }  /* 낮음 — 표 줄 색(--line)은 너무 옅어 진한 회색 */  /* 정렬한 칸 바탕(옅은 파랑)과 겹치지 않게 흰 바탕 + 파란 테두리 */
.sim-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -4px 0 12px; font-size: 13px; }
.sim-levels strong { margin-right: 2px; }
.sim-levels > .muted:first-child { margin-right: 4px; }
.sim-table .rank { display: inline-block; min-width: 36px; padding-right: 4px; box-sizing: content-box; color: var(--muted); font-variant-numeric: tabular-nums; }  /* 비슷한 순위 — 세 자리까지 */
.sim-table td.name-col { padding-left: 49px; }  /* 순위를 왼쪽 여백에 걸어 두어(36 + 4) 긴 이름 · 한글 이름 줄이 이름 첫 글자에 맞춰진다 */
.sim-table td.name-col .rank { margin-left: -40px; }
.sim-table td.hz-cell { white-space: normal; }
@media (max-width: 600px) {
  .sim-filter .chip-group { flex-direction: column; gap: 4px; }
  .sim-table .c-hz { width: 200px; }
}

/* 국내 규제 (2026-10-20) — 법 · 목록 · 내용 3칸, 법이 바뀌는 줄에 굵은 선 */
.kr-reg-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.kr-reg { width: 100%; border-collapse: collapse; font-size: 14px; }
.kr-reg th, .kr-reg td { padding: 8px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.kr-reg thead th { border-top: 0; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--th-bg); }
.kr-reg td.law { font-weight: 600; white-space: nowrap; width: 9.5em; }
.kr-reg td.list { white-space: nowrap; width: 11em; }
.kr-reg tr.law-start td { border-top: 2px solid var(--line); }
.kr-reg-src { margin-top: 8px; font-size: 13px; color: var(--muted); }
.kr-later { color: var(--notice-text); font-weight: 600; }  /* 부칙으로 아직 시행 전 — 시행일 (2026-10-22) */
/* 비고 약어 말풍선 (termtip.js, 2026-10-25) — 점선 밑줄 약어, 말풍선 모양은 물음표 설명(.help-tip)과 같게 */
.term-btn {
  padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: help;
  text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px;
}
.term-btn:hover, .term-btn:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
.term-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.term-tip {
  position: fixed; left: 0; top: 0; z-index: 41; width: max-content; max-width: min(360px, calc(100vw - 32px)); word-break: keep-all;
  padding: 12px 16px 12px 14px; font-size: 13px; line-height: 1.6; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(32, 33, 36, 0.18); pointer-events: none;
  visibility: hidden; opacity: 0; transition: opacity 0.15s, visibility 0.15s;
}
.term-tip.on { visibility: visible; opacity: 1; }
.term-tip strong { display: block; font-size: 13px; margin-bottom: 4px; }
.term-tip ul { margin: 0; padding-left: 18px; color: var(--muted); }
.term-tip li { margin: 2px 0; }
@media (max-width: 600px) {
  .kr-reg td.law, .kr-reg td.list { white-space: normal; width: auto; }
}

/* 목록으로 찾기 (2026-10-21) — 붙여 넣는 칸과 결과 표 (표 모양은 물성으로 찾기 .prop-table 그대로, 넓은 화면에서는 처음부터 표 폭으로 위 .props-page 처럼 넓게) */
.batch-page .page-title { margin-bottom: 12px; }
/* 입력 칸: 카드 상자(누르면 파란 테두리 · 빛) + 아래 도구 줄 — 찾기는 첫 화면 검색 버튼과 같은 둥근 파랑 (10/21 시안 A) */
.batch-form { margin-bottom: 18px; }
.batch-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s; }
.batch-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.batch-form textarea { display: block; width: 100%; box-sizing: border-box; min-height: 180px; resize: vertical;
  font: inherit; font-size: 14px; line-height: 1.5; padding: 14px 16px; border: 0; border-radius: 14px 14px 0 0;
  background: transparent; color: var(--text); }
.batch-form textarea:focus { outline: 0; }
.batch-bar { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.batch-count { color: var(--muted); margin-right: auto; }
.batch-count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.batch-count.over, .batch-count.over strong { color: #c62828; }  /* 500줄을 넘으면 — 넘는 줄은 찾지 않는다 */
.batch-tool { font: inherit; font-size: 13px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.batch-tool:hover { background: var(--bg); color: var(--accent); }
.batch-tool:focus-visible, .batch-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.batch-submit { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 24px; margin-left: 6px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; cursor: pointer; }
.batch-submit:disabled { opacity: 0.6; cursor: progress; }
.batch-all { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.batch-all input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.batch-table .batch-merged { word-break: keep-all; overflow-wrap: anywhere; }  /* 한글 입력은 낱말로, 긴 SMILES 는 아무 데서나 */
button.sheet-btn { font-family: inherit; cursor: pointer; }  /* 엑셀 내려받기는 목록을 보내야 해서 링크가 아니라 버튼 */
.prop-table.batch-table { min-width: var(--cols, 1600px); }
.batch-table .c-in { width: 160px; }
.batch-table .batch-input { overflow-wrap: anywhere; }
.batch-table .miss { color: var(--notice-text); font-weight: 600; }
.batch-table tr.missing td, .batch-table tr.missing .name-col { background: var(--notice-bg); }
.batch-table .batch-ghs img { vertical-align: middle; }
.batch-table .batch-kr { word-break: keep-all; }  /* 규제 목록 이름이 줄 끝에서 끊기지 않게 */
.batch-table .batch-ghs .signal { font-size: 12px; padding: 1px 7px; }
@media (max-width: 600px) { .batch-table .c-in { width: 124px; } }
/* 국내 규제 '확인 필요' · '해당 없음' · '확인 못 함' 줄 (2026-10-22) */
.kr-check { color: var(--notice-text); font-weight: 600; }
.kr-reg tr.kr-none td { color: var(--muted); }
.kr-reg tr.kr-none td.law { color: var(--text); }

/* 검색 칸의 × (지우기) — 마우스를 올리면 손가락 모양 (2026-10-27 사용자). 크롬 · 사파리 · 엣지가 그리는 단추 */
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* 마이페이지 즐겨찾기 '찾기' — 물성으로 찾기의 찾기 버튼(.filter-actions button)과 같은 파란 버튼 (2026-10-27 사용자) */
.me-tools .me-find { font: inherit; font-weight: 600; padding: 7px 18px; border: 0; border-radius: var(--radius);
                     background: var(--accent); color: #fff; cursor: pointer; }

/* 상세 자료 출처 탭 (2026-10-29 사용자 — PubChem | 국내 규제, 나중에 KOSHA MSDS): 제목 · 위험 띠 아래, 내려도 위에 붙어 따라온다 (tabs.js) */
.src-tabs { position: sticky; top: var(--top-h, 60px); z-index: 20; display: flex; gap: 2px; margin: 14px 0 16px;
  background: var(--bg); border-bottom: 1px solid var(--line); }
.src-tabs a { padding: 10px 18px 9px; font-weight: 700; font-size: 16px; color: var(--muted); border-bottom: 3px solid transparent;
  margin-bottom: -1px; white-space: nowrap; }
.src-tabs a:hover { color: var(--text); text-decoration: none; background: var(--accent-soft); border-radius: 6px 6px 0 0; }
.src-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.src-tabs a[aria-current="page"]:hover { background: none; }
.src-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.src-tabs .tab-sub { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
body:has(.src-tabs) article.compound [data-toc] { scroll-margin-top: calc(var(--top-h, 60px) + var(--tabs-h, 52px) + 12px); }
.tab-panel[hidden] { display: none; }
/* 국내 규제 탭 — 법마다 구역, 표는 목록 · 내용 두 칸 */
.kr-lead { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
@media (min-width: 721px) { .kr-tab .kr-reg td.list { width: 13em; } }
.kr-src-list { margin: 8px 0 0; padding: 10px 14px 10px 32px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 14px; display: grid; gap: 6px; }
.kr-src-list .muted { font-size: 13px; margin-left: 4px; }
/* 가격 탭 (2026-11-02) */
.price-links td:nth-child(2) { white-space: nowrap; color: var(--muted); }
.price-links td:nth-child(3) a { white-space: nowrap; }
.price-more { margin: 10px 0 0; font-size: 14px; }
.trade-item { margin: 14px 0 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.trade-h { font-size: 15px; margin: 0 0 6px; }
.trade-h .muted { font-weight: 400; font-size: 13px; }
.trade-sum { flex-direction: column; gap: 4px; }
.trade-sum dt { min-width: 6.5em; white-space: nowrap; flex: none; }
.trade-months { margin-top: 8px; }
.trade-months summary { cursor: pointer; font-size: 14px; color: var(--link, inherit); }
.trade-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-src { margin: 12px 0 0; font-size: 13px; }
/* 가격 변동 그래프 (static/trade_chart.js) */
.trade-chart { position: relative; margin: 10px 0 0; }
.trade-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.trade-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.trade-legend .tc-key:not(:first-child) { margin-left: 10px; }
.tc-key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; }
.tc-key.imp { background: var(--series-imp); } .tc-key.exp { background: var(--series-exp); }
.trade-plot { width: 100%; min-height: 1px; }
.trade-plot svg { display: block; overflow: visible; }
.tc-grid { stroke: var(--line); stroke-width: 1; }
.tc-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tc-line.imp { stroke: var(--series-imp); } .tc-line.exp { stroke: var(--series-exp); }
.tc-gap { stroke-dasharray: 4 4; stroke-width: 1.5; opacity: .75; }  /* 빈 달을 건너는 곳 (값이 아니라 잇기만) */
.tc-none { font-weight: 400; color: var(--muted); }
.tc-scale { margin-left: auto; font: inherit; font-size: 12px; padding: 1px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.tc-scale[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tc-dot, .tc-mark { stroke: var(--surface); stroke-width: 2; }
.tc-dot.imp, .tc-mark.imp { fill: var(--series-imp); } .tc-dot.exp, .tc-mark.exp { fill: var(--series-exp); }
.tc-end { fill: var(--text); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tc-cross { stroke: var(--muted); stroke-width: 1; }
.tc-hit { fill: transparent; cursor: crosshair; }
.tc-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 9px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; }
.tc-tip-h { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.tc-tip-row { display: flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  /* 탭이 4개(PubChem · KOSHA MSDS · 국내 규제 · 가격, 2026-11-03)라 똑같은 폭으로 나누면 390px 에서 넘친다 — 글자 길이만큼 나누고,
     더 좁은 폰에서는 화면 밖으로 밀지 않고 말줄임표로 */
  .src-tabs a { padding: 9px 6px 8px; font-size: 14px; flex: 1 1 auto; min-width: 0; text-align: center;
    overflow: hidden; text-overflow: ellipsis; }
  .src-tabs .tab-sub { display: block; margin: 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
}

/* ===== KOSHA MSDS 탭 (2026-11-03 — 10/29 시안 '라', templates/compound.html · app/msds.py) ===== */
:root { --msds: #0f7b6c; --msds-soft: #e3f4f1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --msds: #5fd3c0; --msds-soft: #16332f; } }
:root[data-theme="dark"] { --msds: #5fd3c0; --msds-soft: #16332f; }
.msds-meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.msds-meta strong { color: var(--text); font-weight: 600; }
.msds-meta .lit-link { margin-left: 4px; }
.msds-others { margin-top: 2px; }
.msds-block h2 { display: flex; align-items: baseline; gap: 10px; }
.msds-h2-no { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 6px;
  background: var(--msds-soft); color: var(--msds); font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.msds-dl { margin-top: 8px; }
.msds-dl > div { grid-template-columns: 210px minmax(0, 1fr); }
.msds-dl dt.d1 { padding-left: 14px; }
.msds-dl dt.d2 { padding-left: 28px; }
.msds-dl .msds-grp { grid-template-columns: 1fr; padding-bottom: 0; }
.msds-dl .msds-grp dt { color: var(--text); font-weight: 600; font-size: 13px; }
.msds-dl .msds-grp + div { border-top: 0; }
.msds-dl .pict-sm { margin-right: 4px; vertical-align: middle; }
.msds-dl dd .src { margin-left: 4px; }
.msds-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.msds-lines li::before { content: "· "; color: var(--muted); }
.msds-missing, .msds-note { margin: 8px 0 0; }
/* 보호구 · 응급조치 한 장 (2026-11-05, msds_card.html). 보호구 그림은 안전보건표지 지시표지 색(파랑 바탕 · 흰 그림)을 테마와 상관없이 그대로 */
.msds-card { margin: 16px 0 4px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 12px; }
.msds-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.msds-card-top h2 { margin: 0; font-size: 18px; }
.msds-card-print { margin-left: auto; }
.msds-card-hazard { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.msds-card-hazard img { display: block; }
.msds-card-limits { color: var(--muted); font-size: 14px; }
.msds-card-limits strong { color: var(--text); font-weight: 600; }
.msds-card-h3 { margin: 4px 0 0; font-size: 15px; }
.ppe-under { opacity: 0; }  /* 보호구 밑 그림(평상복 · 맨손 · 신발 · 코 · 입) — 평소에는 안 보이고 움직임 동안만 (ppe_person.html, 2026-11-13) */
/* 보호구 그림 움직임 C '차례로 나타남' (2026-11-13 사용자) — msds_card.html 의 인라인 스크립트가 .ppe-play 를 붙였다 뗀다(한 번).
   평상복 차림의 사람 · 설비 → 보호의 → 장화 · 앞치마 → 장갑 → 호흡 보호구 → 눈 보호구 → 이름표 선 · 글 (2.7초). 밑 그림은 덮이는 때 사라진다.
   .ppe-hold 는 화면에 들어오기 전 첫 모습(빈 바탕)에 멈춰 두는 것 — 다 입은 그림이 한 프레임 보였다 사라지는 깜빡임을 막는다. 끝나면 둘 다 떼어 원래 그림 그대로 */
@keyframes ppe-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ppe-draw { to { stroke-dashoffset: 0; } }
@keyframes ppe-off { from { opacity: 1; } to { opacity: 0; } }
.ppe-play .ppe-person { animation: ppe-fade .5s ease-out both; }
.ppe-play .ppe-scene > svg, .ppe-play .scene-cap { animation: ppe-fade .5s ease-out .25s both; }
.ppe-play .ppe-suit { animation: ppe-fade .6s ease-out .6s both; }
.ppe-play .ppe-boots, .ppe-play .ppe-apron { animation: ppe-fade .45s ease-out .9s both; }
.ppe-play .ppe-gloves { animation: ppe-fade .45s ease-out 1.05s both; }
.ppe-play .ppe-tank, .ppe-play .ppe-harness, .ppe-play .ppe-mask { animation: ppe-fade .45s ease-out 1.3s both; }
.ppe-play .ppe-eye { animation: ppe-fade .45s ease-out 1.55s both; }
.ppe-play .scene-lbl .ppe-lead { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ppe-draw .55s ease-out 1.9s forwards; }
.ppe-play .scene-lbl .ppe-dot, .ppe-play .scene-num { animation: ppe-fade .35s ease-out 1.9s both; }
.ppe-play .scene-lbl .ppe-t { animation: ppe-fade .4s ease-out 2.3s both; }
.ppe-play .ppe-under-suit { animation: ppe-off 1.2s step-end both; }
.ppe-play .ppe-under-boots { animation: ppe-off 1.35s step-end both; }
.ppe-play .ppe-under-gloves { animation: ppe-off 1.5s step-end both; }
.ppe-play .ppe-under-mask { animation: ppe-off 1.75s step-end both; }
.ppe-hold * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .ppe-play * { animation: none !important; } }
@media print { .ppe-play * { animation: none !important; } }
.ppe-figure { background: #fff; color: #1c2430; border-radius: 8px; padding: 6px 4px; }  /* 그림 색은 테마와 상관없이 같아 흰 바탕에 */
.ppe-lead { fill: none; stroke: #5d6b7e; stroke-width: 1.5; }
.ppe-dot { fill: #1c2430; stroke: #fff; stroke-width: 1.5; }
.ppe-t { font-size: 15px; fill: #1c2430; }
.ppe-t-name { font-size: 17px; font-weight: 700; }
.ppe-t-note { font-size: 13px; fill: #5d6b7e; }
.ppe-num { fill: #0b6bcb; stroke: #fff; stroke-width: 2; }
.ppe-num-t { fill: #fff; font-size: 12px; font-weight: 700; }
.ppe-list { margin: 8px 6px 4px; padding-left: 1.5em; display: grid; gap: 4px; font-size: 14.5px; line-height: 1.5; }
.ppe-list .muted, .ppe-note { color: #5d6b7e; }
/* 보호구 · 응급 설비 한 장면 (11/6 안 B, ppe_scene.html) — 좁은 화면은 이름표 대신 번호 + 아래 목록 */
.ppe-scene { display: block; width: 100%; max-width: 900px; height: auto; margin: 0 auto; }
.scene-cap { font-size: 14px; font-weight: 700; fill: #3d4a5c; }
.ppe-scene .ppe-t, .ppe-scene .scene-cap { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }  /* 타일 벽 위에서도 읽히게 */
.scene-num { display: none; }
.scene-num-t { font-size: 16px; }
.scene-list { display: none; }
.aid-eq { margin-left: 8px; font-size: 12px; font-weight: 600; color: #1c6e3f; background: #e3f4ea; padding: 1px 8px; border-radius: 999px; vertical-align: 1px; }
.msds-card-eng { margin: 0; font-size: 14px; color: var(--muted); }
.msds-card-eng strong { color: var(--text); margin-right: 6px; }
.aid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aid { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.aid h4 { margin: 0 0 4px; font-size: 14.5px; }
.aid ul { margin: 0; padding: 0 0 0 1.1em; display: grid; gap: 2px; font-size: 14px; line-height: 1.5; }
.aid p { margin: 0; font-size: 14px; }
.aid-doctor { grid-column: 1 / -1; }
.msds-card-foot { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
@media screen and (max-width: 720px) {  /* screen 만 — A4 인쇄 폭(약 718px)에서 휴대폰 모양이 되지 않게 */
  .msds-card { padding: 14px; }
  .aid-grid { grid-template-columns: 1fr; }
  .scene-lbl, .scene-cap { display: none; }
  .scene-num { display: inline; }
  .scene-num circle { r: 34px; }
  .scene-num-t { font-size: 38px; }
  .scene-num-lead { stroke-width: 5px; }
  .scene-list { display: grid; }
}
/* 인쇄용 한 장 (msds_print.html) — 화면에서는 A4 폭 가운데, 인쇄하면 도구 줄을 빼고 흰 바탕 A4 한 장 */
.sheet-tools { box-sizing: border-box; width: 100%; max-width: 210mm; margin: 12px auto 0; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet-print { font: inherit; padding: 6px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--surface); cursor: pointer; }
.sheet-print:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sheet { box-sizing: border-box; width: 100%; max-width: 210mm; margin: 10px auto 24px; padding: 0 16px; }
.sheet-head h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.sheet-ko { margin: 2px 0 0; font-size: 16px; }
.sheet-ids { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.msds-card-sheet { margin-top: 10px; }
@page { size: A4; margin: 10mm; }
@media print {
  .sheet-page { --bg: #fff; --surface: #fff; --text: #111; --muted: #444; --line: #bbb; background: #fff; color: #111; }
  .sheet-page, .sheet-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet-tools { display: none; }
  html, .sheet-page { margin: 0; padding: 0; height: auto; min-height: 0; }
  .sheet-page .msds-card-foot { margin: 0; }
  .sheet { max-width: none; margin: 0; padding: 0; }
  .msds-card-sheet { border: 0; padding: 0; gap: 8px; }
  .sheet-page .aid ul { font-size: 11.5px; }
  .sheet-page .msds-card-foot { font-size: 11px; }
  .sheet-page .ppe-scene { max-height: 285px; }
  .sheet-page .msds-card-h3 { margin: 0; }
  .sheet-page .sheet-head h1 { font-size: 20px; }
  .sheet-page .msds-card-hazard img { width: 34px; height: 34px; }
  .sheet-page .aid-grid { display: block; columns: 2; column-gap: 10px; }  /* 칸 높이를 맞추느라 생기는 빈칸 없이 */
  .sheet-page .aid-grid .aid { margin-bottom: 8px; padding: 7px 10px; }
  .sheet-page .ppe-figure { padding: 0; }
  .sheet-page .aid h4 { font-size: 12.5px; }
  .sheet-page .aid { break-inside: avoid; }
}
@media (max-width: 760px) {
  .msds-dl > div { grid-template-columns: 1fr; gap: 4px; }
  .msds-dl dt.d1, .msds-dl dt.d2 { padding-left: 0; }
}

/* ===== 계정 관리 (2026-11-03 — templates/admin_users.html, 관리자만) ===== */
.admin-issued { margin: 0 0 14px; padding: 12px 16px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-issued p { margin: 0; }
.admin-issued p + p { margin-top: 4px; }
.admin-issued code { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; user-select: all; }
.admin-issued .me-btn { margin-left: 6px; }
.admin-h2 { font-size: 17px; margin: 28px 0 8px; }
.admin-table td { vertical-align: middle; }
.admin-table th, .admin-table td { white-space: nowrap; padding-left: 10px; padding-right: 10px; }  /* 좌우 여백 12 → 10px: 9칸이라 36px 여유 — 노트북 폭에서 가로 스크롤 (2026-11-13) · 메모 칸만 줄바꿈 — 메모가 길면 아이디 · 날짜가 두 줄로 꺾였다 (2026-11-03) */
.admin-table th .help-tip { white-space: normal; text-align: left; }  /* 머리 칸 '?' 말풍선은 줄바꿈 (구분 설명, 2026-11-13) */
.admin-table .admin-memo { white-space: normal; min-width: 7em; /* 11em → 7em (2026-11-13 사용자 — 좁은 화면 가로 넘침) */ width: 100%; word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 1100px) { body.admin-wide .wrap { max-width: 1300px; } }  /* 계정 관리는 넓게 — 메모 칸 (2026-11-03 사용자) */
.admin-table td.num, .admin-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tr.admin-off td { color: var(--muted); }
.admin-tag { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.6; padding: 0 7px; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.admin-tag.off { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.admin-tag.temp { background: var(--notice-bg); color: var(--notice-text); }
/* 상태 칸 꼬리표가 길면 두 줄로(임시 / 비밀번호 · 이용 기간 / 끝) — 한 줄이면 상태 칸이 40px 가까이 넓어져 표가 가로로 넘쳤다 (2026-11-13 사용자) */
.admin-table td .admin-tag { white-space: normal; word-break: keep-all; max-width: 5.6em; text-align: center; }
.admin-tag.ext { background: transparent; color: var(--accent); border: 1px solid var(--accent); }  /* 회사 밖 사용자 (2026-11-10) */
.acc-sec-body label.admin-ext { display: flex; align-items: center; gap: 8px; }  /* 회사 밖 사용자 체크 칸 — 칸 이름과 한 줄 */
.acc-sec-body label.admin-ext input { width: auto; margin: 0; flex: none; }
.admin-ext .muted { font-weight: 400; margin-left: 4px; }
.admin-actions { white-space: nowrap; }
.admin-actions form { display: inline; }
.admin-actions form + form { margin-left: 4px; }
.admin-actions > .me-btn { margin-left: 4px; }
.acc-actions.admin-create { justify-content: center; }
:root { --req: #c62828; }  /* 꼭 적는 칸 * (2026-11-03 사용자) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --req: #ff8a80; } }
:root[data-theme="dark"] { --req: #ff8a80; }
.req { color: var(--req); font-weight: 700; margin-left: 2px; }
.acc-sec-head p + p { margin-top: 6px; }  /* '계정 생성' 단추 가운데 (2026-11-03 사용자) */  /* '메모' 단추 (2026-11-03) */
.admin-note-row td { background: var(--bg); }
.admin-note-form { display: flex; align-items: center; gap: 8px; max-width: 980px; }  /* 메모 · 이용 종료일 한 줄 (2026-11-10, 전에는 640px) */
.admin-note-form input[type=date] { flex: none; width: auto; }
.admin-note-form .small { white-space: nowrap; }
.admin-note-form label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.admin-note-form input { font: inherit; font-size: 14px; min-width: 0; flex: 1; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--text); }
@media (max-width: 760px) { .admin-actions { white-space: normal; } .admin-actions form + form { margin-left: 0; } }

/* ===== 잠깐 떴다 사라지는 알림 (2026-11-03 사용자 — macros.html toast, 계정 관리 화면) ===== */
.toast { position: fixed; right: 24px; bottom: 96px; z-index: 50;  /* 하단 바(가운데 캡슐) 위 */
  display: flex; align-items: center; gap: 8px; max-width: min(420px, calc(100vw - 32px));
  padding: 11px 16px 11px 13px; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 28px rgba(32, 33, 36, 0.18); pointer-events: auto;
  animation: toast-life 4s ease forwards; }
.toast:hover { animation-play-state: paused; }
.toast svg { flex: none; }
.toast svg circle { fill: var(--accent); }
.toast svg path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes toast-life {
  0% { opacity: 0; transform: translateY(8px); }
  6%, 85% { opacity: 1; transform: none; visibility: visible; }
  100% { opacity: 0; transform: translateY(8px); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes toast-life { 0%, 90% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
}
@media (max-width: 720px) { .toast { left: 16px; right: 16px; bottom: 80px; max-width: none; } }  /* 휴대폰: 하단 바 위, 폭 전체 */
/* 질문 기록 (관리자, 2026-11-03) */
.ask-table td { vertical-align: top; }
.ask-table .ask-chip { display: inline-block; margin: 0 2px 4px 0; font-size: 12px; }
.ask-table .nowrap { white-space: nowrap; }
.ask-log-error { color: var(--notice-text); margin-right: 6px; }
/* 질문 기록 정돈 (2026-11-09 사용자 추천 1 · 2 · 3) — 오류는 거르기 칩 이름의 짧은 꼬리표(모서리 3px, 원문은 마우스), 연결 끊김은 회색.
   답은 2줄까지 · 잘린 것만 누르면 펼침(admin_ask.html 스크립트) */
.ask-log-tag { display: inline-block; margin: 0 4px 4px 0; padding: 1px 7px; border-radius: 3px; font-size: 12px; line-height: 1.5; white-space: nowrap;
  color: var(--notice-text); background: var(--notice-bg); }
.ask-log-tag.conn { color: var(--muted); background: var(--th-bg); }
.ask-table .na { color: var(--muted); opacity: 0.6; }  /* 빈 칸 — 물성 표와 같은 회색 대시 (2026-11-09 사용자 B) */
.ask-log-ans { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ask-log-ans.more { cursor: pointer; }
.ask-log-ans.open { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.ask-log-ans:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.ask-log-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }  /* 질문 기록 손볼 것 거르기 (2026-11-04) */
.ask-log-filter a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text); text-decoration: none; }
.ask-log-filter a:hover { border-color: var(--accent); }
.ask-log-filter a.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ask-log-filter a.zero { color: var(--muted); opacity: 0.55; }
.admin-bar .ask-log-filter { margin: 0; }  /* 계정 목록 · 질문 기록: 거르기 칩은 쪽 넘김과 한 줄 (2026-11-13) */
.admin-table tr.admin-empty td { padding: 32px 16px; text-align: center; color: var(--muted); white-space: normal; }  /* 결과 없음 — 표 안 가운데 (2026-11-13) */
.ask-log-sep { align-self: stretch; width: 1px; margin: 3px 4px; background: var(--line); }  /* 세 묶음 세로줄 (2026-11-09 사용자) */  /* 0개인 거르기는 흐리게 — 누르는 것은 그대로 (2026-11-09 '더 깔끔하게' 3) */
.ask-log-answer { min-width: 16em; font-size: 13px; }
/* 질문 기록은 좌우 스크롤 없이 (2026-11-04 사용자 '긴 글 칸만 줄바꿈') — 계정 관리 표의 줄바꿈 안 함(.admin-table)을 긴 글 칸에서 푼다.
   시각 · 계정 · 결과 · 걸린 시간(.nowrap)은 한 줄, 휴대폰은 한 질문씩 카드처럼 (칸 이름은 data-label) */
.ask-table th, .ask-table td { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.ask-table th.nowrap, .ask-table td.nowrap { white-space: nowrap; }
.ask-table .ask-log-q { min-width: 9em; }
.ask-table .ask-chip { border-radius: 10px; }  /* 긴 칩('되물음: …')이 두 줄로 꺾여도 타원이 되지 않게 */
.ask-table .ask-log-answer { min-width: 14em; }
.ask-table .ask-log-miss { min-width: 9.5em; }  /* 이해하지 못한 말 · 오류 — 머리글이 세 줄로 꺾이지 않게 */
/* 넓은 화면은 칸 너비를 고정 — 1 · 2쪽을 오가도 머리 줄 · 칸이 같게 (2026-11-09 사용자). 너비는 두 쪽 글자를 재서
   (시각 97 · 계정 114 · 결과 80 · 걸린 시간 머리 76 · 오류 머리 151px, 패딩 포함), 질문 · 답은 남은 폭을 반씩. 넘치는 글은 칸 안에서 줄바꿈.
   조건 칸은 같은 날 '정돈' 2 로 12 → 16em — 칩 두세 개가 한 줄에 */
@media (min-width: 1100px) {
  .ask-table { table-layout: fixed; }
  .ask-table th { white-space: nowrap; }
  .ask-table td.nowrap { white-space: normal; }
  .ask-table col.c-time { width: 7.5em; }
  /* 계정은 이름만 (같은 날 '더 깔끔하게' 2 — 9em 에서 줄임). 날짜별 묶음(1)은 해 봤다가 사용자가 원래대로 */
  .ask-table col.c-user { width: 6em; }
  .ask-table col.c-plan { width: 16em; }
  .ask-table col.c-total { width: 8em; }
  .ask-table col.c-ms { width: 6em; }
  .ask-table col.c-miss { width: 11.5em; }
  .ask-table .ask-log-q, .ask-table .ask-log-answer, .ask-table .ask-log-miss { min-width: 0; }
}
@media (min-width: 721px) and (max-width: 1099px) {  /* 중간 폭도 쪽마다 같게 — 비율로, 머리 글은 칸 안에서 줄바꿈 */
  .ask-table { table-layout: fixed; }
  .ask-table td.nowrap, .ask-table th.nowrap { white-space: normal; }
  .ask-table col.c-time { width: 10%; }
  .ask-table col.c-user { width: 9%; }
  .ask-table col.c-plan { width: 19%; }
  .ask-table col.c-total { width: 9%; }
  .ask-table col.c-ms { width: 8%; }
  .ask-table col.c-miss { width: 14%; }
  .ask-table .ask-log-q, .ask-table .ask-log-answer, .ask-table .ask-log-miss { min-width: 0; }
}
@media (max-width: 720px) {
  .ask-table thead, .ask-table colgroup { display: none; }
  .ask-table, .ask-table tbody, .ask-table tr, .ask-table td { display: block; width: auto; min-width: 0; }
  .ask-table tr { padding: 8px 0; border-top: 1px solid var(--line); }
  .ask-table tr:first-child { border-top: 0; }
  .ask-table td { padding: 2px 12px; border-top: 0; }
  .ask-table td:empty { display: none; }
  .ask-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 6.5em; margin-right: 6px; color: var(--muted); font-size: 12px; }
}

/* KOSHA 에만 있는 물질 — 검색 결과 위 상자 (2026-11-06, index.html) · 상세 맨 위 안내 (kosha.html) */
.kosha-only-hits ul { margin: 6px 0 0; padding-left: 1.2em; }
.kosha-only-hits li { margin: 2px 0; overflow-wrap: anywhere; }
.kosha-only-note { margin: 4px 0 0; }
/* KOSHA 에만 있는 물질 — 하단 바 · 마이페이지 표의 구조 그림 자리 (2026-11-06 사용자 'KOSHA MSDS 글자 상자') */
.kosha-thumb { display: grid; place-items: center; text-align: center; line-height: 1.15; font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--muted); background: var(--th-bg, transparent); border: 1px dashed var(--line); border-radius: 6px;
  text-decoration: none; }
.me-table .kosha-thumb { width: 72px; height: 54px; }
.hit .kosha-thumb { flex-shrink: 0; font-size: 12px; }  /* 검색 결과 줄 (2026-11-10 — 노란 상자 대신 목록에 섞음) */
.hud-thumb.kosha-thumb { font-size: 9.5px; }
.ends-note { margin: 14px 0 0; }  /* 이용 종료일 알림 — 머리 막대 아래 (2026-11-10) */
/* 사내 · 회사 밖 토글 (2026-11-11 사용자 그림 — 고른 쪽은 연한 바탕 · 파란 글자, MixForge 판정 토글과 같은 꼴). 계정 관리 '구분' 칸 · 계정 생성 */
.seg-soft button, .seg-soft label > span, .seg-static > span { font-size: 13px; font-weight: 600; padding: 3px 14px; color: var(--muted); line-height: 1.6; }
.seg.seg-soft button[aria-pressed="true"], .seg-soft input:checked + span, .seg-static > span.on { background: var(--accent-soft); color: var(--accent); }
.seg-soft button:disabled { cursor: default; }
.acc-sec-body .seg-soft label { display: inline-flex; gap: 0; margin: 0; cursor: pointer; }
.seg-soft label + label, .seg-static > span + span { border-left: 1px solid var(--line); }
.acc-sec-body .seg-soft input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; pointer-events: none; }
.seg-soft input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg-soft label:hover input:not(:checked) + span { color: var(--accent); }
.acc-sec-body .admin-ext { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.admin-ext-label { font-weight: 600; }
.admin-table th, .admin-table td { text-align: center; }  /* 계정 목록 가운데 정렬 (2026-11-11 사용자 '중앙 정렬 해보자') */
.admin-table .admin-note-row td { text-align: left; }  /* 메모 · 이용 종료일 펼친 줄은 왼쪽 */

/* ===== 본문 [한글 | ENG] (2026-11-12, 번역 2단계 — 탭 줄 오른쪽 끝, PubChem 탭일 때만. 사용자: 탭 줄 · 기계 번역 표시 없음 · 번역 없으면 영어) ===== */
[data-en] { display: none; }
html.lang-en [data-ko] { display: none; }
html.lang-en [data-en] { display: revert; }
.src-tabs .lang-seg { display: none; margin-left: auto; align-self: center; }
.src-tabs:has(a[data-tab="pubchem"][aria-current="page"]) .lang-seg,
.src-tabs:not(:has(a[aria-current])) .lang-seg { display: inline-flex; }
@media (max-width: 760px) {
  /* 휴대폰은 탭 4개로 꽉 차 — 토글은 탭 줄 둘째 줄 오른쪽 */
  .src-tabs:has(.lang-seg) { flex-wrap: wrap; }
  .src-tabs .lang-seg { order: 9; margin: 4px 0 6px auto; }
  .src-tabs .lang-seg button { font-size: 12px; padding: 2px 12px; }
}
