/* 학습도구 페이지 공통 디자인 — 2026-11-20 홈 디자인(hm)과 같은 분위기.
   대상: 초음파 해부학(ultra-anatomy*), 정상 수치(normal-values, nv-index, nv-ch*), 갤러리(gallery),
         검사실 시뮬레이션(exam-sim), 옛 과목 허브(breast, abdomen).
   사용법: 각 페이지 </head> 앞에 <link rel="stylesheet" href="src/tools-hm.css" /> 한 줄 +
           <body class="tools-hm th-…"> (th-anat / th-nv / th-nvbook / th-gal / th-sim / th-hub).
           th-hub 페이지는 src/hub-hm.css도 함께 연결하고 body에 hub-hm 클래스를 같이 단다.
   마크업·id·스크립트는 그대로 두고 색·글꼴·카드·버튼 모양만 바꾼다.
   인라인 <style>의 옛 색은 본문 범위(main 또는 body)의 변수 재정의로 덮는다. */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ───────────────────────── 1. 공통 바탕 ───────────────────────── */
body.tools-hm { background: #05080e; }
body.tools-hm:not(.th-sim)::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(1100px 700px at 70% -10%, rgba(70,227,217,.14), transparent 60%), radial-gradient(900px 600px at 0% 30%, rgba(60,120,220,.10), transparent 65%), linear-gradient(180deg, #08101b, #05080e 55%); }
body.tools-hm:not(.th-sim)::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.tools-hm .hero-bg { display: none; }

/* 본문 범위 색 변수 — 상단 메뉴(nav)는 건드리지 않도록 main 안에서만 재정의.
   (stacking context를 만들지 않도록 isolation·transform은 넣지 않는다: 정상 수치 상세 패널이 main 밖 overlay 위에 떠야 함) */
body.tools-hm > main,
body.th-nvbook {
  --ink: #eef3f8; --ink2: #d2dbe5; --ink3: #a2b2c4; --ink4: #7d8da0;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --teal: #46e3d9; --sky: #7cc8ff; --orange: #ff8a3d; --ok: #4fd18b;
  --text: #eef3f8; --text2: #d2dbe5; --text3: #a2b2c4;
  --accent: #46e3d9; --accent2: #7cc8ff; --accent-glow: rgba(70,227,217,.25);
  --purple: #7cc8ff;
  --bg2: #0a111c; --bg3: rgba(255,255,255,.07);
  --surface: rgba(255,255,255,.035); --surface2: rgba(255,255,255,.06);
  --border: rgba(70,227,217,.4); --border2: rgba(255,255,255,.1);
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 30px 70px -45px rgba(0,0,0,.85);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  color: var(--ink); font-family: var(--sans); letter-spacing: -.012em; -webkit-font-smoothing: antialiased; word-break: keep-all;
}
body.tools-hm > main { display: block; overflow-x: clip; }
body.tools-hm > main :focus-visible, body.th-nvbook :focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 10px; }
body.tools-hm > main .gradient-text { background: linear-gradient(90deg, var(--teal), #b4f6f1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* 첫 화면 배경 격자(은은하게) */
body.tools-hm:not(.th-sim):not(.hub-hm) > main { position: relative; }
body.tools-hm:not(.th-sim):not(.hub-hm) > main::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 760px; pointer-events: none; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 20%, #000 25%, transparent 78%); mask-image: radial-gradient(ellipse 70% 70% at 30% 20%, #000 25%, transparent 78%); opacity: .45; }

/* 공통 조각: 뒤로가기(모노 라벨) · 알약 eyebrow · 큰 제목 + 청록/주황 밑줄 */
body.tools-hm .an-back, body.tools-hm .gal-back, body.tools-hm .abd-back, body.th-nvbook .back {
  display: flex; width: fit-content; align-items: center; gap: 8px; margin-bottom: 26px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; color: var(--ink3); text-decoration: none; transition: color .2s;
}
body.tools-hm .an-back:hover, body.tools-hm .gal-back:hover, body.tools-hm .abd-back:hover, body.th-nvbook .back:hover { color: var(--teal); }
body.tools-hm .th-pill, body.th-anat .section-label, body.th-hub .abd-hero > .section-label, body.th-nv .page-eyebrow, body.th-gal .gal-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; width: auto; margin: 0;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink2);
  padding: 7px 14px 7px 10px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); backdrop-filter: blur(8px);
}
body.th-anat .section-label::before, body.th-hub .abd-hero > .section-label::before, body.th-nv .page-eyebrow::before, body.th-gal .gal-eyebrow::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(70,227,217,.15);
}

/* ───────────────────────── 2. 옛 과목 허브 (breast · abdomen · ultra-anatomy) — hub-hm.css 위에 얹음 ───────────────────────── */
/* 제목 안 .gradient-text 줄 → 허브의 얇은 줄 + 굵은 줄 */
body.th-hub .page-h1:has(.gradient-text) { font-weight: 300; color: #d6dee8; }
body.th-hub .page-h1 .gradient-text { display: block; font-weight: 800; background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
body.th-hub .admin-banner { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 12.5px; font-weight: 600; color: #f0c060; background: rgba(240,192,96,.08); border: 1px solid rgba(240,192,96,.32); padding: 6px 14px; border-radius: 999px; }
body.th-hub .disease-link span[style] { font-family: Inter, var(--sans); }

/* 섹션 선택 라벨 */
body.th-hub .cl-section-label { margin: 0 0 18px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink3); display: flex; align-items: center; gap: 14px; }
body.th-hub .cl-section-label::after { content: ""; flex: 1; height: 1px; background: var(--line2); }

/* 섹션 카드(유방 US/MG) — 허브 카드와 같은 유리 카드 + 큰 얇은 번호 */
body.th-hub .cl-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
body.th-hub .cl-card { position: relative; isolation: isolate; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; border: 1px solid var(--line2); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); box-shadow: 0 30px 70px -45px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05); transition: border-color .25s, transform .25s, box-shadow .25s; }
body.th-hub .cl-card::before { content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; right: -170px; top: -210px; pointer-events: none; background: radial-gradient(closest-side, rgba(70,227,217,.10), transparent); }
body.th-hub .cl-card:hover { border-color: rgba(70,227,217,.45); transform: translateY(-3px); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
body.th-hub .cl-card-thumb, body.th-hub .cl-card-thumb-us, body.th-hub .cl-card-thumb-mg { height: auto; padding: 26px 28px 0; background: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; overflow: visible; }
body.th-hub .cl-card-num { position: static; order: 0; font-family: Inter, var(--sans); font-weight: 200; font-size: 64px; line-height: .85; letter-spacing: -.06em; color: var(--ink); opacity: 1; }
body.th-hub .cl-card-num::after { content: ""; display: block; width: 26px; height: 2px; margin-top: 16px; background: linear-gradient(90deg, var(--teal), var(--sky)); }
body.th-hub .cl-card-section-tag { order: 1; margin-top: 4px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); }
body.th-hub .cl-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 28px 26px; }
body.th-hub .cl-card-name { font-size: 25px; font-weight: 800; letter-spacing: -.035em; line-height: 1.25; color: var(--ink); margin: 0; }
body.th-hub .cl-card-desc { margin: 10px 0 0; font-size: 15.5px; line-height: 1.75; color: var(--ink2); }
body.th-hub .cl-card-footer { margin-top: auto; padding-top: 22px; border-top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.th-hub .cl-card-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; letter-spacing: 0; }
body.th-hub .cl-card-badge.open { color: var(--ink2); background: rgba(255,255,255,.04); border: 1px solid var(--line2); }
body.th-hub .cl-card-arrow { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 14px; color: var(--teal); background: rgba(70,227,217,.06); border: 1px solid rgba(70,227,217,.25); transition: background .2s, color .2s; }
body.th-hub .cl-card:hover .cl-card-arrow { background: var(--teal); border-color: var(--teal); color: #021614; }

/* abdomen.html (상복부 케이스 리뷰) */
body.th-hub .abd-hero { max-width: 1200px; margin: 0 auto; padding: 146px 32px 120px; position: relative; z-index: 1; }
body.th-hub .abd-title { margin: 26px 0 0; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.07; letter-spacing: -.055em; font-weight: 300; color: #d6dee8; }
body.th-hub .abd-title .gradient-text { font-weight: 800; background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
body.th-hub .abd-title::after { content: ""; display: block; height: 3px; width: 220px; margin-top: 22px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) 0 62%, var(--orange) 62% 74%, transparent 74%); }
body.th-hub .abd-desc { margin: 24px 0 44px; max-width: 640px; font-size: 18px; line-height: 1.75; color: var(--ink2); }
body.th-hub .sub-banner { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 22px 26px; border: 1px solid rgba(70,227,217,.3); background: linear-gradient(160deg, rgba(18,33,52,.92), rgba(8,14,24,.96)); box-shadow: 0 30px 70px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06); }
body.th-hub .sub-banner::before { content: ""; position: absolute; z-index: -1; width: 320px; height: 320px; right: -120px; top: -180px; background: radial-gradient(closest-side, rgba(70,227,217,.18), transparent); }
body.th-hub .sub-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(70,227,217,.08); border: 1px solid rgba(70,227,217,.3); }
body.th-hub .sub-info strong { font-size: 17px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
body.th-hub .sub-info span { font-size: 14px; color: var(--ink3); }
body.th-hub .price-tag .amount { font-family: Inter, var(--sans); font-weight: 600; color: var(--ink); }
body.th-hub .price-tag .period { color: var(--ink3); }
body.th-hub .btn-subscribe { height: 48px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 700; background: var(--teal); color: #021614; box-shadow: 0 10px 30px -10px rgba(70,227,217,.6), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-hub .btn-subscribe:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(70,227,217,.75), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-hub .sections-label { margin-bottom: 14px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; color: var(--ink3); border: 1px solid var(--line2); background: rgba(255,255,255,.03); padding: 5px 12px; border-radius: 999px; }
body.th-hub .sections-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.045em; margin-bottom: 28px; color: var(--ink); }
body.th-hub .sections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.th-hub .section-card { position: relative; isolation: isolate; border-radius: 24px; border: 1px solid var(--line2); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); box-shadow: 0 30px 70px -45px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05); transition: border-color .25s, transform .25s, box-shadow .25s; }
body.th-hub .section-card:hover { border-color: rgba(70,227,217,.45); transform: translateY(-3px); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
body.th-hub .section-card-thumb { height: 120px; background: radial-gradient(420px 200px at 85% 0%, rgba(70,227,217,.12), transparent 70%), rgba(255,255,255,.02); border-bottom: 1px solid var(--line); }
body.th-hub .section-card-thumb::before { display: none; }
body.th-hub .sc-num { left: 24px; bottom: auto; top: 22px; font-family: Inter, var(--sans); font-weight: 200; font-size: 56px; line-height: .85; opacity: 1; color: var(--ink); }
body.th-hub .sc-organ-label { top: 18px; left: auto; right: 18px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; color: var(--ink3); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); }
body.th-hub .sc-case-count { top: auto; bottom: 14px; right: 18px; font-family: Inter, var(--sans); font-size: 12px; color: var(--ink3); }
body.th-hub .section-card-body { padding: 22px 28px 26px; }
body.th-hub .sc-section-no { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; color: var(--teal); }
body.th-hub .sc-title { font-size: 25px; font-weight: 800; letter-spacing: -.035em; color: var(--ink); }
body.th-hub .sc-desc { font-size: 15.5px; line-height: 1.75; color: var(--ink2); }
body.th-hub .sc-tag { font-family: Inter, var(--sans); font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 999px; color: var(--ink2); background: rgba(255,255,255,.045); border: 1px solid var(--line2); }
body.th-hub .sc-footer { border-top: 1px solid var(--line); padding-top: 18px; }
body.th-hub .sc-count-info { font-size: 13px; color: var(--ink3); }
body.th-hub .sc-arrow { width: 34px; height: 34px; font-size: 14px; color: var(--teal); background: rgba(70,227,217,.06); border: 1px solid rgba(70,227,217,.25); }
body.th-hub .section-card:hover .sc-arrow { background: var(--teal); border-color: var(--teal); color: #021614; }

@media (max-width: 900px) {
  body.th-hub .abd-hero { padding: 112px 20px 90px; }
  body.th-hub .abd-desc { font-size: 16.5px; margin-bottom: 32px; }
  body.th-hub .cl-section-grid, body.th-hub .sections-grid { grid-template-columns: 1fr; }
  body.th-hub .price-tag { text-align: left; }
}
@media (max-width: 480px) {
  body.th-hub .cl-card-thumb { padding: 22px 20px 0; }
  body.th-hub .cl-card-num { font-size: 52px; }
  body.th-hub .cl-card-body, body.th-hub .section-card-body { padding: 18px 20px 22px; }
  body.th-hub .sub-banner { padding: 18px; }
}

/* ───────────────────────── 3. 초음파 해부학 장 페이지 (ultra-anatomy-*.html) ───────────────────────── */
body.th-anat .an-wrap { max-width: 1200px; padding: 146px 32px 120px; }
body.th-anat .an-title { margin: 26px 0 0; font-size: clamp(38px, 4.8vw, 64px); line-height: 1.08; letter-spacing: -.055em; font-weight: 300; color: #d6dee8; }
body.th-anat .an-title .gradient-text { font-weight: 800; background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
body.th-anat .an-title::after { content: ""; display: block; height: 3px; width: 220px; margin-top: 22px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) 0 62%, var(--orange) 62% 74%, transparent 74%); }
body.th-anat .an-desc { margin: 22px 0 32px; max-width: 640px; font-size: 17px; line-height: 1.75; color: var(--ink2); }

/* 분류·단면·탭 버튼 → 알약, 선택 = 청록 */
body.th-anat .an-cat, body.th-anat .an-tab { border-radius: 999px; background: rgba(255,255,255,.035); color: var(--ink2); border: 1px solid var(--line2); transition: background .2s, border-color .2s, color .2s; }
body.th-anat .an-cat:hover, body.th-anat .an-tab:hover { color: var(--ink); border-color: rgba(70,227,217,.45); }
body.th-anat .an-cat.on, body.th-anat .an-tab.on { color: #021614; background: var(--teal); border-color: var(--teal); box-shadow: 0 10px 30px -12px rgba(70,227,217,.65), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-anat .an-cat .cn { font-family: Inter, var(--sans); }
body.th-anat .an-gbtn { border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border: 1px solid var(--line2); }
body.th-anat .an-gbtn:hover { border-color: rgba(70,227,217,.45); }
body.th-anat .an-gbtn.on { border-color: rgba(70,227,217,.7); background: linear-gradient(180deg, rgba(70,227,217,.12), rgba(70,227,217,.03)); box-shadow: 0 16px 40px -24px rgba(70,227,217,.5); }
body.th-anat .an-gbtn.on .gs { color: var(--teal); }
body.th-anat .an-subrow .sl { font-family: var(--sans); font-size: 13px; letter-spacing: 0; color: var(--ink3); }

/* 찾은 구조물(체크) 카드 */
body.th-anat .an-find { border-radius: 20px; padding: 16px 20px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border: 1px solid var(--line2); }
body.th-anat .an-find-title { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--teal); }
body.th-anat .an-find-count { font-family: Inter, var(--sans); font-weight: 600; color: var(--ink); }
body.th-anat .an-find-bar { background: rgba(255,255,255,.08); }
body.th-anat .an-find-bar i { background: linear-gradient(90deg, var(--teal), var(--sky)); }
body.th-anat .an-find-reset { border-radius: 999px; border-color: var(--line2); color: var(--ink3); }
body.th-anat .an-find-reset:hover { color: var(--ink); border-color: rgba(70,227,217,.45); }
body.th-anat .an-chipf { border-color: var(--line2); color: var(--ink3); }
body.th-anat .an-chipf:hover { color: var(--ink); border-color: rgba(70,227,217,.45); }
body.th-anat .an-chipf.done { border-style: solid; border-color: rgba(70,227,217,.5); color: var(--teal); background: rgba(70,227,217,.09); }

/* 영상·단면 정보 카드 */
body.th-anat .an-card { border-radius: 22px; padding: 16px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border: 1px solid var(--line2); box-shadow: 0 30px 70px -45px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05); }
body.th-anat .an-card h2 { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; color: var(--ink3); }
body.th-anat .an-stage { border-radius: 14px; }
body.th-anat .an-stage .it.hl, body.th-anat .an-stage .seg.hl { fill: rgba(70,227,217,.28); stroke: var(--teal); }
body.th-anat .an-tip { border-radius: 12px; background: rgba(5,8,14,.92); border-color: rgba(70,227,217,.6); backdrop-filter: blur(6px); }
body.th-anat .an-tip .en { font-family: Inter, var(--sans); color: var(--teal); }
body.th-anat .an-chip { border-color: rgba(70,227,217,.45); background: rgba(5,8,14,.62); }
body.th-anat .an-fig { border-radius: 14px; border-color: var(--line2); }
body.th-anat .an-figcap { font-size: 13.5px; color: var(--ink2); }
body.th-anat .an-meta h3 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--teal); }
body.th-anat .an-meta p { font-size: 14.5px; line-height: 1.75; color: var(--ink2); }
@media (max-width: 900px) {
  body.th-anat .an-wrap { padding: 112px 20px 90px; }
  body.th-anat .an-desc { font-size: 16px; }
}
@media (max-width: 480px) {
  body.th-anat .an-wrap { padding: 104px 16px 80px; }
  body.th-anat .an-card { padding: 12px; border-radius: 18px; }
  body.th-anat .an-find { padding: 14px 16px; }
}

/* ───────────────────────── 4. 정상 수치 검색기 (normal-values.html) ───────────────────────── */
/* 원래 .nv-wrap의 z-index:1이 본문을 별도 층으로 만들어, 휴대폰에서 상세 패널(z 500)이 main 밖 덮개(z 480) 아래에 깔리던 문제 → 층을 풀어 준다 */
body.th-nv .nv-wrap { max-width: 1400px; padding: 146px 32px 100px; z-index: auto; }
body.th-nv .nv-header { margin-bottom: 34px; }
body.th-nv .page-h1 { margin: 24px 0 0; font-size: clamp(38px, 4.8vw, 64px); line-height: 1.08; letter-spacing: -.055em; font-weight: 800; color: var(--ink); }
body.th-nv .page-h1::after { content: ""; display: block; height: 3px; width: 220px; margin-top: 22px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) 0 62%, var(--orange) 62% 74%, transparent 74%); }
body.th-nv .page-sub { margin: 22px 0 0; max-width: 660px; font-size: 17px; line-height: 1.75; color: var(--ink2); }
body.th-nv .nv-gate { border-radius: 24px; background: linear-gradient(160deg, rgba(18,33,52,.92), rgba(8,14,24,.96)); border: 1px solid rgba(70,227,217,.3); box-shadow: 0 30px 70px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06); }
body.th-nv .nv-gate-title { font-size: 20px; letter-spacing: -.03em; }
body.th-nv .nv-gate-btn { height: 50px; padding: 0 24px; border-radius: 999px; background: var(--teal); color: #021614; font-weight: 700; box-shadow: 0 10px 30px -10px rgba(70,227,217,.6), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-nv .nv-search-input { height: 52px; border-radius: 999px; background: rgba(255,255,255,.04); border-color: var(--line2); font-size: 15px; }
body.th-nv .nv-search-input:focus { border-color: rgba(70,227,217,.6); box-shadow: 0 0 0 4px rgba(70,227,217,.12); }
body.th-nv .nv-sidebar, body.th-nv .nv-detail { border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
body.th-nv .nv-sidebar { top: 104px; }
body.th-nv .nv-detail { top: 104px; }
body.th-nv .nv-cat-item { border-radius: 12px; }
body.th-nv .nv-cat-item:hover { background: rgba(255,255,255,.05); }
body.th-nv .nv-cat-item.active { background: rgba(70,227,217,.1); color: var(--teal); }
body.th-nv .nv-cat-count { font-family: Inter, var(--sans); font-weight: 500; }
body.th-nv .nv-cat-banner-title { font-size: 22px; letter-spacing: -.035em; }
body.th-nv .nv-subchip, body.th-nv .nv-mobile-chip { border-radius: 999px; background: rgba(255,255,255,.035); border-color: var(--line2); }
body.th-nv .nv-subchip.active, body.th-nv .nv-mobile-chip.active { background: rgba(70,227,217,.1); border-color: rgba(70,227,217,.6); color: var(--teal); }
body.th-nv .nv-card { border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
body.th-nv .nv-card:hover { border-color: rgba(70,227,217,.45); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
body.th-nv .nv-card.active { border-color: rgba(70,227,217,.7); background: rgba(70,227,217,.07); }
body.th-nv .nv-card-range-label, body.th-nv .nv-d-range-label { font-family: var(--mono); font-weight: 500; letter-spacing: .12em; }
body.th-nv .nv-d-field-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink3); }
body.th-nv .nv-card-range, body.th-nv .nv-d-range-value { font-family: Inter, var(--sans); font-weight: 600; color: var(--teal); }
body.th-nv .nv-card-badge { border-radius: 999px; }
body.th-nv .nv-d-cat { font-family: var(--mono); font-weight: 500; letter-spacing: .16em; color: var(--teal); }
body.th-nv .nv-d-title { font-size: 22px; letter-spacing: -.035em; }
body.th-nv .nv-d-range-box { border-radius: 14px; background: rgba(70,227,217,.07); border-color: rgba(70,227,217,.3); }
body.th-nv .nv-d-related-chip { color: var(--teal); background: rgba(70,227,217,.07); border-color: rgba(70,227,217,.3); }
body.th-nv .nv-d-related-chip:hover { background: rgba(70,227,217,.16); }
body.th-nv .nv-d-img-box { border-radius: 14px; }
@media (max-width: 1180px) {
  /* 옆에서 나오는 상세 패널은 바닥이 비치지 않게 불투명 */
  body.th-nv .nv-detail { top: 0; border-radius: 0; background: #0a111c; border-left: 1px solid var(--line2); }
  body.th-nv .nv-detail-close { border-radius: 999px; }
}
@media (max-width: 900px) {
  body.th-nv .nv-wrap { padding: 112px 20px 80px; }
  body.th-nv .page-sub { font-size: 16px; }
}
@media (max-width: 640px) {
  body.th-nv .nv-wrap { padding: 104px 16px 60px; }
}

/* ───────────────────────── 5. 정상 수치 책 목차·장 (nv-index, nv-ch01~14) — nav 없는 단독 페이지 ───────────────────────── */
body.th-nvbook { background: #05080e; }
body.th-nvbook .hero { position: relative; padding: 72px 0 32px; background: radial-gradient(760px 320px at 70% -10%, rgba(70,227,217,.13), transparent 70%), radial-gradient(520px 260px at 10% 10%, rgba(60,120,220,.10), transparent 70%); }
body.th-nvbook .hero .wrap { position: relative; }
body.th-nvbook .back { margin: 0 auto 18px; }
body.th-nvbook .hero > .wrap > a[href]:not(.back) { font-family: var(--mono); font-size: 12.5px !important; letter-spacing: .08em; color: var(--ink3) !important; }
body.th-nvbook .label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; color: var(--ink2); background: rgba(255,255,255,.04); border: 1px solid var(--line2); padding: 6px 14px 6px 10px; border-radius: 999px; backdrop-filter: blur(8px); }
body.th-nvbook .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(70,227,217,.15); }
body.th-nvbook h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; letter-spacing: -.05em; line-height: 1.15; }
body.th-nvbook .grad { background: linear-gradient(90deg, var(--teal), #b4f6f1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body.th-nvbook .hero h1::after { content: ""; display: block; height: 3px; width: 160px; margin: 18px auto 0; border-radius: 3px; background: linear-gradient(90deg, var(--teal) 0 62%, var(--orange) 62% 74%, transparent 74%); }
body.th-nvbook .sub { color: var(--ink2); font-size: 16px; line-height: 1.7; margin-top: 16px; }
body.th-nvbook .gh { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink3); display: flex; align-items: center; gap: 14px; }
body.th-nvbook .gh::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
/* 목차 카드 */
body.th-nvbook .c { border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
body.th-nvbook a.c:hover { border-color: rgba(70,227,217,.5); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
body.th-nvbook .c .n { font-family: var(--mono); font-weight: 500; letter-spacing: .1em; color: var(--teal); }
body.th-nvbook .c b { letter-spacing: -.03em; }
body.th-nvbook .ill { border-radius: 14px; border-color: var(--line2); background: radial-gradient(120% 120% at 50% 0%, #0f1d2c, #070c15); }
body.th-nvbook a.c:hover .ill { border-color: rgba(70,227,217,.5); }
body.th-nvbook .ic { background: rgba(70,227,217,.07); border-color: rgba(70,227,217,.25); }
body.th-nvbook .foot { border-color: var(--line2); border-radius: 16px; }
/* 장 페이지: 검색 바·분류·칩 */
body.th-nvbook .bar { background: rgba(5,8,14,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line); }
body.th-nvbook .search { height: 46px; background: rgba(255,255,255,.04); border-color: var(--line2); border-radius: 999px; }
body.th-nvbook .search:focus { border-color: rgba(70,227,217,.6); box-shadow: 0 0 0 4px rgba(70,227,217,.12); }
body.th-nvbook .search::placeholder { color: var(--ink4); }
body.th-nvbook .cat.on { color: var(--teal); border-bottom-color: var(--teal); }
body.th-nvbook .chip { background: rgba(255,255,255,.035); border-color: var(--line2); }
body.th-nvbook .chip:hover { color: var(--teal); border-color: rgba(70,227,217,.45); }
body.th-nvbook .chip.on { color: #021614; background: var(--teal); border-color: var(--teal); }
body.th-nvbook .group { font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
body.th-nvbook .group::before { background: linear-gradient(var(--teal), var(--sky)); }
/* 장 페이지: 장기 카드·표 */
body.th-nvbook .card { border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); box-shadow: 0 30px 70px -50px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.04); }
body.th-nvbook .card > header { border-bottom-color: var(--line); }
body.th-nvbook .card h2 { font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
body.th-nvbook .card h2 small, body.th-nvbook .pg { font-family: Inter, var(--sans); }
body.th-nvbook th { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink3); background: rgba(255,255,255,.025); }
body.th-nvbook td { border-top-color: var(--line); }
body.th-nvbook td.v { font-family: Inter, var(--sans); font-weight: 600; color: var(--teal); }
body.th-nvbook td.n { color: var(--ink2); }
body.th-nvbook .fig { border-radius: 14px; border-color: var(--line2); }
body.th-nvbook .fig figcaption b { color: var(--teal); }
body.th-nvbook details { border-top-color: var(--line); }
body.th-nvbook summary { color: var(--ink2); }
body.th-nvbook summary::before { color: var(--teal); }
body.th-nvbook summary:hover { color: var(--teal); }
body.th-nvbook mark { background: rgba(70,227,217,.25); }
/* 휴대폰: 원래 표가 카드보다 넓어져 '비고' 칸이 잘리던 문제 → 한 줄을 [항목 | 대표 수치] + 아래 비고로 접는다 */
@media (max-width: 640px) {
  body.th-nvbook .card table, body.th-nvbook .card thead, body.th-nvbook .card tbody { display: block; width: 100%; }
  body.th-nvbook .card tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--line); }
  body.th-nvbook .card thead tr { border-top: 0; background: rgba(255,255,255,.025); }
  body.th-nvbook .card th, body.th-nvbook .card td { border-top: 0; }
  body.th-nvbook .card th:nth-child(3), body.th-nvbook .card td.n { grid-column: 1 / -1; }
  body.th-nvbook .card td.v { white-space: normal; text-align: right; max-width: 52vw; }
  body.th-nvbook .card th:nth-child(2) { text-align: right; }
  body.th-nvbook .card tr.sub-row td, body.th-nvbook .card td[colspan] { grid-column: 1 / -1; }
}

/* ───────────────────────── 6. 이미지 갤러리 (gallery.html) ───────────────────────── */
body.th-gal .gal-wrap { max-width: 1200px; padding: 146px 32px 110px; }
body.th-gal .gal-header { margin-bottom: 36px; }
body.th-gal .gal-eyebrow { margin-bottom: 0; }
body.th-gal .gal-eyebrow .dot { background: var(--ink4); }
body.th-gal .gal-title { margin: 24px 0 0; font-size: clamp(30px, 4vw, 50px); line-height: 1.12; letter-spacing: -.045em; font-weight: 800; color: var(--ink); }
body.th-gal .gal-title::after { content: ""; display: block; height: 3px; width: 220px; margin-top: 22px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) 0 62%, var(--orange) 62% 74%, transparent 74%); }
body.th-gal .gal-notice { margin-top: 22px; font-size: 16px; line-height: 1.75; color: var(--ink2); }
body.th-gal .gal-sub { font-size: 14px; color: var(--ink3); }
body.th-gal .gal-thumb-img { border-radius: 14px; border-color: var(--line2); }
body.th-gal .gal-thumb:hover .gal-thumb-img { border-color: rgba(70,227,217,.45); }
body.th-gal .gal-thumb.active .gal-thumb-img { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(70,227,217,.18); }
body.th-gal .gal-thumb.active .gal-thumb-tag { color: var(--teal); }
body.th-gal .gal-stage { border-radius: 22px; border-color: var(--line2); }
body.th-gal .gal-nav-btn { background: rgba(5,8,14,.6); border-color: rgba(255,255,255,.2); backdrop-filter: blur(6px); }
body.th-gal .gal-nav-btn:hover { border-color: rgba(70,227,217,.6); color: var(--teal); }
body.th-gal .gal-info, body.th-gal .gal-sources { border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
body.th-gal .gal-info-label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; color: var(--teal); }
body.th-gal .gal-info-diagnosis { font-size: 20px; letter-spacing: -.03em; }
body.th-gal .gal-info-desc { color: var(--ink2); }
body.th-gal .gal-info-orientation { border-radius: 999px; border-color: var(--line2); }
body.th-gal .gal-empty { border-radius: 22px; border-color: var(--line2); }
body.th-gal .gal-source-item a { color: var(--teal); }
@media (max-width: 860px) {
  body.th-gal .gal-info { background: none; border: none; border-radius: 0; }
  body.th-gal .gal-info-block { border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
}
@media (max-width: 900px) { body.th-gal .gal-wrap { padding: 112px 20px 80px; } }
@media (max-width: 640px) { body.th-gal .gal-wrap { padding: 104px 14px 64px; } }

/* ───────────────────────── 7. 검사실 시뮬레이션 (exam-sim.html) ─────────────────────────
   실사 검사실(#room)·장비 화면(#machine)·차트 종이(.paper)·PACS 화면 구성은 그대로 두고,
   인트로·결과 화면, 공통 버튼, 케이스 목록 창, 대화창 테두리만 홈 톤으로 맞춘다. */
body.th-sim {
  --bg: #05080e; --bg2: #0a111c; --surface: #0b121d; --surface2: #111b2a;
  --border: rgba(255,255,255,.1); --border2: rgba(255,255,255,.14);
  --text: #eef3f8; --text2: #d2dbe5; --text3: #a2b2c4;
  --accent: #46e3d9; --accent2: #7cc8ff; --accent-glow: rgba(70,227,217,.28);
  --grad: linear-gradient(90deg, #46e3d9, #7cc8ff);
  --teal: #46e3d9; --sky: #7cc8ff; --orange: #ff8a3d; --ink4: #7d8da0;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  font-family: var(--sans); letter-spacing: -.012em;
}
/* 공통 버튼 → 둥근 알약, 주 버튼 = 청록 */
body.th-sim .btn { border-radius: 999px; border-color: var(--line2); background: rgba(255,255,255,.04); }
body.th-sim .btn:hover { border-color: rgba(70,227,217,.55); background: rgba(70,227,217,.07); }
body.th-sim .btn.primary { background: var(--teal); color: #021614; border: none; font-weight: 700; box-shadow: 0 10px 30px -10px rgba(70,227,217,.6), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-sim .btn.primary:hover { background: var(--teal); transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(70,227,217,.75), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-sim .btn.ghost { background: transparent; }
body.th-sim .btn.sm { border-radius: 999px; }
body.th-sim .pov-back { background: rgba(5,8,14,.75); }
body.th-sim .snd, body.th-sim .listbtn { background: rgba(5,8,14,.8); border-color: var(--line2); }
body.th-sim .snd:hover, body.th-sim .listbtn:hover { border-color: rgba(70,227,217,.6); color: var(--teal); }
body.th-sim .listbtn { font-family: var(--sans); }

/* 케이스 목록 창 */
body.th-sim .cl-box { border-radius: 22px; background: linear-gradient(180deg, #0d1522, #080d16); border-color: var(--line2); }
body.th-sim .cl-head h3 { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
body.th-sim .cl-group { color: var(--teal); }
body.th-sim .cl-item { border-radius: 14px; background: rgba(255,255,255,.03); border-color: var(--line); }
body.th-sim .cl-item:hover { border-color: rgba(70,227,217,.5); background: rgba(70,227,217,.06); }
body.th-sim .cl-item.cur { border-color: rgba(70,227,217,.6); }
body.th-sim .cl-item .no { color: var(--teal); font-family: var(--mono); }

/* 인트로 — 노트북 높이(약 820px)에서 위쪽 라벨이 잘리던 문제: 넘치면 아래로 스크롤 */
body.th-sim #intro { overflow-y: auto; justify-content: safe center; }
body.th-sim #intro { background: radial-gradient(1100px 700px at 70% -10%, rgba(70,227,217,.14), transparent 60%), radial-gradient(900px 600px at 0% 30%, rgba(60,120,220,.10), transparent 65%), linear-gradient(180deg, #08101b, #05080e 55%); }
body.th-sim #intro .tag { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; color: var(--ink2, #d2dbe5); padding: 6px 14px 6px 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); backdrop-filter: blur(8px); }
body.th-sim #intro .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(70,227,217,.15); }
body.th-sim #intro h1 { font-weight: 800; letter-spacing: -.055em; }
body.th-sim #intro h1 span { background: linear-gradient(90deg, var(--teal), #b4f6f1); -webkit-background-clip: text; background-clip: text; }
body.th-sim #intro .steps div { border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
body.th-sim #intro .steps div:not(:last-child)::after { color: var(--teal); }
body.th-sim #intro .steps b { background: rgba(70,227,217,.1); border: 1px solid rgba(70,227,217,.4); color: var(--teal); box-shadow: none; font-weight: 600; }
body.th-sim #intro .meta span { border-radius: 999px; background: rgba(255,255,255,.04); border-color: var(--line2); }
body.th-sim #intro .meta b { color: var(--teal); }
body.th-sim #intro .basis { border-radius: 16px; background: rgba(70,227,217,.06); border-color: rgba(70,227,217,.28); }
body.th-sim #intro .basis .b-ic { background: rgba(70,227,217,.12); border: 1px solid rgba(70,227,217,.4); color: var(--teal); }
body.th-sim #intro .free-note { border-radius: 16px; }
body.th-sim #intro .free-note a { color: var(--teal); }
body.th-sim #intro .organ-pick a { border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border-color: var(--line2); box-shadow: 0 30px 70px -45px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05); }
body.th-sim #intro .organ-pick a:hover { border-color: rgba(70,227,217,.5); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
body.th-sim #intro .organ-pick .ic { background: radial-gradient(circle at 50% 40%, rgba(70,227,217,.18), rgba(70,227,217,.03) 70%); }
body.th-sim #intro .organ-pick a b { font-weight: 800; letter-spacing: -.035em; }
body.th-sim #intro .organ-pick a .en { font-family: var(--mono); font-weight: 500; letter-spacing: .12em; }
body.th-sim #intro .organ-pick a .cnt { color: var(--teal); background: rgba(70,227,217,.08); border-color: rgba(70,227,217,.3); }
body.th-sim #intro .organ-pick a.sel { border-color: var(--teal); background: linear-gradient(180deg, rgba(70,227,217,.16), rgba(255,255,255,.02)); box-shadow: 0 0 0 2px rgba(70,227,217,.5), 0 24px 50px -24px rgba(70,227,217,.45); }
body.th-sim #intro .organ-pick a.sel::after { background: var(--teal); color: #021614; }
body.th-sim #intro .organ-pick a.all { background: linear-gradient(180deg, rgba(124,200,255,.07), rgba(255,255,255,.02)); border-color: rgba(124,200,255,.28); }
body.th-sim #intro .organ-pick a.all.sel { border-color: var(--sky); box-shadow: 0 0 0 2px rgba(124,200,255,.5), 0 24px 50px -24px rgba(124,200,255,.4); }
body.th-sim #intro .organ-pick a.all .cnt { color: var(--sky); background: rgba(124,200,255,.08); border-color: rgba(124,200,255,.3); }
body.th-sim #intro .btn.enter { border-radius: 999px; box-shadow: 0 14px 44px -12px rgba(70,227,217,.7), inset 0 1px 0 rgba(255,255,255,.45); }
body.th-sim .legal { border-radius: 14px !important; }
body.th-sim .sim-back a:hover { color: var(--teal); }
body.th-sim .pc-only { background: radial-gradient(500px 360px at 70% 20%, rgba(70,227,217,.13), transparent 70%), #05080e; }
body.th-sim .pc-only .ic { background: rgba(70,227,217,.08); border-color: rgba(70,227,217,.3); color: var(--teal); }
body.th-sim .pc-only .anyway { margin: 18px auto 0; }

/* 검사실 위 표시 요소(사진은 그대로): 상단 체크·안내·대화창 테두리 톤만 */
body.th-sim .check { background: rgba(5,8,14,.7); border-color: var(--line2); }
body.th-sim .room-hint { background: rgba(5,8,14,.85); border-color: var(--line2); }
body.th-sim .dialog { border-radius: 20px; background: rgba(6,10,17,.9); border-color: rgba(70,227,217,.28); }
body.th-sim .dialog .who b, body.th-sim .dialog .next { color: var(--teal); }
body.th-sim .hot .lbl rect { stroke: rgba(70,227,217,.75); }

/* 결과 화면 */
body.th-sim #result { background: radial-gradient(900px 520px at 50% -10%, rgba(70,227,217,.13), transparent 65%), linear-gradient(180deg, #08101b, #05080e 55%); }
body.th-sim .res-head .tag { font-family: var(--mono); font-weight: 500; letter-spacing: .16em; color: var(--teal); }
body.th-sim .res-head h2 { font-weight: 800; letter-spacing: -.045em; }
body.th-sim .res-head h2::after { content: ""; display: block; height: 3px; width: 160px; margin: 18px auto 0; border-radius: 3px; background: linear-gradient(90deg, var(--teal) 0 62%, var(--orange) 62% 74%, transparent 74%); }
body.th-sim .box { border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: var(--line2); }
body.th-sim .box.mine { border-color: rgba(70,227,217,.32); }
body.th-sim .box.exp { border-color: rgba(70,227,217,.22); }
body.th-sim .box h3 { font-weight: 700; letter-spacing: .02em; }
body.th-sim .box .sub { font-family: var(--mono); font-weight: 500; letter-spacing: .12em; }
body.th-sim .box.mine h3 span, body.th-sim .box.exp .highlight { color: var(--teal); }
body.th-sim .box.exp li::before { background: var(--teal); }
body.th-sim .orig summary:hover { color: var(--teal); }
