/* 섹션별 질환 목록(허브) 19개 공통 디자인 — 2026-11-18 홈·학습실(classroom-hm.css)과 같은 분위기.
   사용법: <body class="hub-hm"> + 이 파일을 각 페이지의 <style> 뒤에 연결.
   .cat-card / .cat-name / .cat-status / .disease-list li .disease-link / data-uc-dup 구조는
   landing-stats.js·curriculum-accordion.js가 읽으므로 마크업은 그대로 두고 모양만 바꾼다. */

body.hub-hm { background: #05080e; }
body.hub-hm::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.hub-hm::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.hub-hm .hero-bg { display: none; }

/* 본문 범위(main)에서만 색 변수 재정의 — 인라인 style의 var(--accent) 등도 새 색으로 바뀐다 */
body.hub-hm > main {
  --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;
  --accent: #46e3d9; --accent2: #7cc8ff;
  --text: #eef3f8; --text2: #d2dbe5; --text3: #a2b2c4;
  --surface: rgba(255,255,255,.035); --border: rgba(70,227,217,.45); --border2: rgba(255,255,255,.12);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  display: block; overflow-x: clip; isolation: isolate;
  color: var(--ink); font-family: var(--sans); letter-spacing: -.012em; -webkit-font-smoothing: antialiased;
  word-break: keep-all; font-feature-settings: "tnum";
}
/* 첫 화면 배경 격자 */
body.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: .5; }
body.hub-hm > main::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 760px; pointer-events: none; z-index: -1; background: radial-gradient(760px 520px at 82% 30%, rgba(70,227,217,.10), transparent 65%); }
body.hub-hm > main :focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 10px; }

body.hub-hm .liver-wrap, body.hub-hm .biliary-wrap, body.hub-hm .neck-wrap, body.hub-hm .page-wrap, body.hub-hm .vasc-wrap {
  max-width: 1200px; margin: 0 auto; padding: 146px 32px 120px; position: relative; z-index: 1;
}

/* ── 첫 화면 머리 ── */
body.hub-hm .back-link { 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.hub-hm .back-link:hover { color: var(--teal); }
body.hub-hm .page-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 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.hub-hm .page-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(70,227,217,.15); }
body.hub-hm .page-h1 { margin: 26px 0 0; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.07; letter-spacing: -.055em; font-weight: 800; color: var(--ink); }
body.hub-hm .page-h1 .t { display: block; font-weight: 300; color: #d6dee8; }
body.hub-hm .page-h1 .b { display: block; font-weight: 800; }
body.hub-hm .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.hub-hm .page-sub { margin: 24px 0 48px; max-width: 640px; font-size: 18px; line-height: 1.75; color: var(--ink2); }

/* ── 시뮬레이션 바로가기(유리 배너) ── */
body.hub-hm .sim-jump { position: relative; align-items: center; gap: 16px; margin: -12px 0 48px; padding: 16px 20px 16px 16px; border-radius: 20px; overflow: hidden; isolation: isolate; color: var(--ink); 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); transition: border-color .2s, transform .2s; }
body.hub-hm .sim-jump::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: -120px; top: -170px; background: radial-gradient(closest-side, rgba(70,227,217,.18), transparent); }
body.hub-hm .sim-jump:hover { border-color: rgba(70,227,217,.65); transform: translateY(-1px); }
body.hub-hm .sim-jump .sj-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; font-size: 12px; color: var(--teal); background: rgba(70,227,217,.08); border: 1px solid rgba(70,227,217,.3); }
body.hub-hm .sim-jump b { font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
body.hub-hm .sim-jump small { margin-top: 3px; font-size: 13px; color: var(--ink3); }

/* ── 카테고리 카드(유리 카드 + 큰 얇은 번호) ── */
body.hub-hm .cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.hub-hm .cat-card { position: relative; isolation: isolate; 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.hub-hm .cat-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.hub-hm .cat-card:hover { border-color: rgba(70,227,217,.4); transform: translateY(-3px); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); }

body.hub-hm .cat-thumb { height: auto; padding: 26px 28px 0; background: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; overflow: visible; }
body.hub-hm .cat-thumb::before { display: none; }
body.hub-hm .ct-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.hub-hm .ct-num::after { content: ""; display: block; width: 26px; height: 2px; margin-top: 16px; background: linear-gradient(90deg, var(--teal), var(--sky)); }
body.hub-hm .ct-label { position: static; 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.hub-hm .ct-icon { display: none; }

body.hub-hm .cat-body { padding: 20px 28px 26px; }
body.hub-hm .cat-name { margin-bottom: 14px; font-size: 23px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; color: var(--ink); }

/* 질환 줄: 이름 + 핵심요약·케이스 수 배지 */
body.hub-hm .disease-list { gap: 0; margin-bottom: 22px; }
body.hub-hm .disease-list li { align-items: center; gap: 12px; padding: 12px 0; font-size: 15px; line-height: 1.45; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .2s; }
body.hub-hm .disease-list li:last-child { border-bottom: none; }
body.hub-hm .disease-list li em { font-size: 12px; color: var(--ink4); }
body.hub-hm .disease-link, body.hub-hm a.disease-link.open { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; transition: color .15s; }
body.hub-hm a.disease-link.open:hover { color: var(--teal); text-decoration: none; }
body.hub-hm .disease-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0; padding: 4px 11px; border-radius: 999px; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
/* 핵심요약 배지: 청록 */
body.hub-hm .disease-badge:not(.open) { color: var(--teal) !important; border: 1px solid rgba(70,227,217,.35) !important; background: rgba(70,227,217,.07); }
body.hub-hm a.disease-badge:not(.open):hover { background: rgba(70,227,217,.16); border-color: rgba(70,227,217,.65) !important; }
/* 케이스 수 배지: 은은한 유리 */
body.hub-hm .disease-badge.open { color: var(--ink2); border: 1px solid var(--line2); background: rgba(255,255,255,.045); font-family: Inter, var(--sans); font-weight: 500; }
body.hub-hm a.disease-badge.open:hover { color: var(--ink); border-color: rgba(70,227,217,.45); background: rgba(70,227,217,.08); }

/* 카드 아래: 카테고리 케이스 수 */
body.hub-hm .cat-footer { border-top: 1px solid var(--line); padding-top: 18px; }
body.hub-hm .cat-status { display: inline-flex; align-items: center; gap: 8px; font-family: Inter, var(--sans); font-size: 13px; font-weight: 500; color: var(--ink3); }
body.hub-hm .cat-status.open { color: var(--ink2); font-weight: 600; }
body.hub-hm .cat-status.open::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(70,227,217,.15); }
body.hub-hm .cat-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.hub-hm .cat-card:hover .cat-arrow { background: var(--teal); border-color: var(--teal); color: #021614; }

/* 카드 수가 홀수면 마지막 카드는 가로 전체 + 질환 2열 */
body.hub-hm .cat-grid > .cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
body.hub-hm .cat-grid > .cat-card:last-child:nth-child(odd) .disease-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; align-content: start; }
body.hub-hm .cat-grid > .cat-card:last-child:nth-child(odd) .disease-list li:last-child { border-bottom: 1px solid var(--line); }

/* 아래쪽 '등록된 케이스'(Supabase) 영역 */
body.hub-hm #sb-cases-section .page-eyebrow { margin-bottom: 16px !important; }
body.hub-hm #sb-cases-section h2 { letter-spacing: -.04em !important; }
body.hub-hm #sb-cases-grid > a { border-radius: 20px !important; }

/* ── 태블릿·휴대폰 ── */
@media (max-width: 900px) {
  body.hub-hm .liver-wrap, body.hub-hm .biliary-wrap, body.hub-hm .neck-wrap, body.hub-hm .page-wrap, body.hub-hm .vasc-wrap { padding: 112px 20px 90px; }
  body.hub-hm .page-sub { font-size: 16.5px; margin-bottom: 36px; }
  body.hub-hm .cat-grid { grid-template-columns: 1fr; }
  body.hub-hm .cat-grid > .cat-card:last-child:nth-child(odd) .disease-list { grid-template-columns: 1fr; }
  body.hub-hm .cat-grid > .cat-card:last-child:nth-child(odd) .disease-list li:last-child { border-bottom: none; }
  body.hub-hm .sim-jump { margin: -4px 0 36px; }
}
@media (max-width: 480px) {
  body.hub-hm .cat-thumb { padding: 22px 20px 0; }
  body.hub-hm .ct-num { font-size: 52px; }
  body.hub-hm .cat-body { padding: 18px 20px 22px; }
  body.hub-hm .cat-name { font-size: 21px; }
  body.hub-hm .disease-list li { flex-wrap: wrap; row-gap: 8px; }
  body.hub-hm .disease-link, body.hub-hm a.disease-link.open { flex: 1 1 100%; }
  body.hub-hm .sim-jump { padding: 14px 16px 14px 14px; gap: 12px; }
}
