/* ══════════════════════════════════════════════════════════
   종양침윤림프구 첫걸음 — 노트북 스타일
   ══════════════════════════════════════════════════════════ */
:root{
  --blue:#3b82f6; --blue-s:#dbeafe; --mint:#10b981; --mint-s:#d1fae5;
  --coral:#f97316; --coral-s:#ffedd5; --violet:#8b5cf6; --violet-s:#ede9fe;
  --rose:#ef4444;  --rose-s:#fee2e2; --amber:#f59e0b; --amber-s:#fef3c7;
  --paper:#fff; --page:#f4f6fa; --ink:#1e293b; --ink-2:#475569; --ink-3:#94a3b8;
  --line:#e2e8f0; --line-2:#cbd5e1;
  --code-bg:#0f172a; --code-ink:#e2e8f0;
  --shadow:0 1px 3px rgba(15,23,42,.06),0 8px 24px -8px rgba(15,23,42,.10);
  --radius:16px;
}
[data-bs-theme="dark"]{
  --blue-s:#1e3a5f; --mint-s:#064e3b; --coral-s:#4a2610; --violet-s:#2e1065;
  --rose-s:#4c1d1d; --amber-s:#453005;
  --paper:#151b26; --page:#0b0f16; --ink:#e5e9f0; --ink-2:#a8b3c4; --ink-3:#6b7688;
  --line:#28303d; --line-2:#3a4453; --code-bg:#0a0e15;
  --shadow:0 1px 3px rgba(0,0,0,.4),0 8px 24px -8px rgba(0,0,0,.5);
}
*{ -webkit-tap-highlight-color:transparent }
html{ font-size:18px } /* --drson-root-font */
body{
  font-family:'Pretendard Variable',Pretendard,-apple-system,BlinkMacSystemFont,
              'Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;
  background:var(--page); color:var(--ink);
  font-size:1rem; line-height:1.78; letter-spacing:-.011em;
  word-break:keep-all; overflow-wrap:anywhere;
}
code,pre,.code-area,.mono{
  font-family:'JetBrains Mono','SF Mono',Menlo,Consolas,'D2Coding',monospace;
}

/* ── 상단바 ───────────────────────────────── */
.nb-top{
  background:color-mix(in srgb,var(--paper) 88%,transparent);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--line); min-height:56px;
}
.nb-brand{ font-weight:800; font-size:1.05rem; color:var(--ink)!important; letter-spacing:-.02em }
.nb-brand span{ background:linear-gradient(90deg,var(--blue),var(--violet));
  -webkit-background-clip:text; background-clip:text; color:transparent }
.nb-progress{ align-items:center; gap:.5rem }
.nb-progress-bar{ width:110px; height:7px; background:var(--line); border-radius:99px; overflow:hidden }
.nb-progress-bar span{ display:block; height:100%; width:0;
  background:linear-gradient(90deg,var(--blue),var(--mint)); border-radius:99px; transition:width .45s ease }
#progText{ color:var(--ink-3); font-variant-numeric:tabular-nums; font-size:.78rem; white-space:nowrap }

/* ── 레이아웃 ─────────────────────────────── */
.nb-shell{ display:flex; align-items:flex-start; max-width:1500px; margin:0 auto; gap:0 }
.nb-main{ flex:1; min-width:0; padding:1.6rem clamp(.65rem,2.4vw,2rem) 4rem }

/* ── 목차 ────────────────────────────────── */
.nb-toc{ width:308px; flex:0 0 308px; background:var(--paper); border-right:1px solid var(--line) }
@media (min-width:992px){
  .nb-toc{ position:sticky; top:56px; height:calc(100vh - 56px); overflow-y:auto }
  .nb-toc::-webkit-scrollbar{ width:7px }
  .nb-toc::-webkit-scrollbar-thumb{ background:var(--line-2); border-radius:9px }
}
/* Bootstrap 은 ≥lg 에서 .offcanvas-body 를 display:flex(가로) + padding:0 으로 바꾼다.
   세로 목차이므로 되돌린다. */
.nb-toc .offcanvas-body{ display:block!important; padding:1rem .7rem!important; overflow-y:visible }
.toc-title{ font-size:.72rem; font-weight:800; color:var(--ink-3);
  letter-spacing:.13em; padding:.2rem .6rem .6rem }
.toc-list{ list-style:none; margin:0; padding:0; counter-reset:none }
.toc-item{
  display:flex; align-items:flex-start; gap:.6rem; padding:.5rem .6rem; margin-bottom:2px;
  border-radius:11px; text-decoration:none; color:var(--ink-2); transition:background .15s,color .15s;
}
.toc-item:hover{ background:var(--page); color:var(--ink) }
.toc-item.active{ background:var(--blue-s); color:var(--ink) }
.toc-item.active .toc-no{ background:var(--blue); color:#fff }
.toc-no{ flex:0 0 24px; height:24px; border-radius:8px; background:var(--line);
  color:var(--ink-2); font-size:.72rem; font-weight:800; display:grid; place-items:center; margin-top:3px }
.toc-body{ flex:1; min-width:0; line-height:1.42 }
.toc-name{ display:block; font-weight:700; font-size:.895rem }
.toc-sub{ display:block; font-size:.735rem; color:var(--ink-3); margin-top:1px }
.toc-check{ opacity:0; color:var(--mint); font-weight:900; margin-top:3px; transition:opacity .2s }
.toc-item.done .toc-check{ opacity:1 }
.toc-item.done .toc-no{ background:var(--mint-s); color:var(--mint) }
.toc-foot{ padding:1rem .6rem 2rem }

/* ── 종이 ────────────────────────────────── */
.nb-paper{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:clamp(1.15rem,3.4vw,2.9rem); margin-bottom:1.5rem;
  max-width:920px; margin-inline:auto;
}
.nb-paper h2,.nb-paper h3,.nb-paper h4{ letter-spacing:-.025em; font-weight:800 }
.cell-md h4{ font-size:1.24rem; margin:2.4rem 0 .9rem; padding-left:.7rem;
  border-left:4px solid var(--blue); line-height:1.4 }
.cell-md p{ margin-bottom:1.05rem }
.cell-md ul,.cell-md ol{ margin-bottom:1.1rem; padding-left:1.35rem }
.cell-md li{ margin-bottom:.42rem }
.cell-md b{ font-weight:800 }
:is(.cell-md,.note-b,.quiz-q,figcaption) code{
  background:var(--blue-s); color:var(--ink); padding:.1em .42em; border-radius:6px;
  font-size:.855em; font-weight:600;
}

/* ── 홈 ──────────────────────────────────── */
.hero{ max-width:920px; margin:0 auto 1.5rem; background:var(--paper);
  border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden }
.hero-img{ width:100%; display:block; border-bottom:1px solid var(--line) }
.hero-body{ padding:clamp(1.3rem,3.6vw,2.7rem) }
.hero h1{ font-size:clamp(1.65rem,4.6vw,2.5rem); font-weight:900; letter-spacing:-.035em;
  line-height:1.33; margin-bottom:.9rem }
.hero-lead{ color:var(--ink-2); font-size:1.03rem; margin-bottom:1.2rem }
.hero-tags{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1.6rem }
.hero-tags span{ background:var(--page); border:1px solid var(--line); border-radius:99px;
  padding:.24rem .72rem; font-size:.8rem; font-weight:700; color:var(--ink-2) }
.hero-cta{ font-weight:800; border-radius:12px; padding:.62rem 1.5rem; margin-right:.5rem }
.home-h{ font-size:1.35rem; margin-bottom:1.3rem }
.how-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:.9rem }
.how{ background:var(--page); border:1px solid var(--line); border-radius:13px; padding:1.1rem }
.how span{ font-size:1.7rem; display:block; margin-bottom:.35rem }
.how b{ display:block; margin-bottom:.3rem; font-size:.97rem }
.how p{ font-size:.855rem; color:var(--ink-2); margin:0; line-height:1.62 }
.curriculum{ display:grid; gap:.5rem }
.cur-card{ display:flex; align-items:center; gap:.9rem; padding:.85rem 1rem; border-radius:12px;
  border:1px solid var(--line); background:var(--page); text-decoration:none; color:var(--ink);
  transition:transform .13s,border-color .13s,box-shadow .13s }
.cur-card:hover{ transform:translateX(4px); border-color:var(--blue); box-shadow:var(--shadow) }
.cur-no{ flex:0 0 42px; height:42px; border-radius:11px; background:var(--paper); border:1px solid var(--line);
  display:grid; place-items:center; font-weight:900; color:var(--ink-3); font-size:.92rem }
.cur-card.done .cur-no{ background:var(--mint-s); color:var(--mint); border-color:transparent }
.cur-body{ flex:1; min-width:0 }
.cur-title{ font-weight:800; font-size:.97rem; line-height:1.4 }
.cur-sub{ font-size:.8rem; color:var(--ink-3) }
.cur-check{ opacity:0; color:var(--mint); font-weight:900; font-size:1.1rem }
.cur-card.done .cur-check{ opacity:1 }

/* ── 레슨 머리 ───────────────────────────── */
.lesson-head{ border-bottom:2px solid var(--line); padding-bottom:1.3rem; margin-bottom:1.7rem }
.lh-no{ display:inline-block; background:var(--blue-s); color:var(--blue); font-weight:800;
  font-size:.75rem; padding:.2rem .7rem; border-radius:99px; margin-bottom:.65rem; letter-spacing:.02em }
[data-bs-theme="dark"] .lh-no{ color:#93c5fd }
.lesson-head h1{ font-size:clamp(1.5rem,4.2vw,2.1rem); font-weight:900; letter-spacing:-.035em;
  line-height:1.34; margin-bottom:.4rem }
.lh-sub{ color:var(--ink-3); font-size:1rem; margin:0 }
.lesson-figure{ margin:0 0 2rem }
.lesson-figure img{ width:100%; border-radius:13px; border:1px solid var(--line); display:block }
.lesson-figure figcaption{ text-align:center; font-size:.87rem; color:var(--ink-3); margin-top:.6rem }

/* ── 셀 공통 ─────────────────────────────── */
.cell{ margin-bottom:1.45rem }
.cell-cap{ font-size:.83rem; color:var(--ink-3); margin-bottom:.42rem; font-weight:600 }

/* ── 노트 박스 ───────────────────────────── */
.note{ border-radius:13px; padding:1.05rem 1.2rem; border:1px solid; border-left-width:5px }
.note-h{ font-weight:800; margin-bottom:.5rem; font-size:.99rem }
.note-b{ font-size:.935rem; color:var(--ink-2) }
.note-b ul{ margin:.4rem 0 0; padding-left:1.2rem } .note-b li{ margin-bottom:.35rem }
.note-b p:last-child{ margin-bottom:0 }
.note-tip  { background:var(--blue-s);  border-color:var(--blue) }
.note-warn { background:var(--amber-s); border-color:var(--amber) }
.note-key  { background:var(--mint-s);  border-color:var(--mint) }
.note-story{ background:var(--violet-s);border-color:var(--violet) }
.mini{ background:rgba(15,23,42,.07); border-radius:8px; padding:.6rem .8rem; font-size:.82rem;
  margin:.5rem 0; overflow-x:auto; white-space:pre; line-height:1.6 }
[data-bs-theme="dark"] .mini{ background:rgba(255,255,255,.07) }

/* ── 코드 셀 ─────────────────────────────── */
.cell-code{ border:1px solid var(--line); border-radius:13px; overflow:hidden; background:var(--paper) }
.cell-code .cell-cap{ padding:.6rem .9rem 0; margin:0 }
.code-head{ display:flex; align-items:center; gap:.55rem; padding:.55rem .8rem;
  background:var(--page); border-bottom:1px solid var(--line); flex-wrap:wrap }
.badge-lang{ font-size:.68rem; font-weight:900; padding:.16rem .55rem; border-radius:6px; letter-spacing:.05em }
.badge-py { background:#3b82f6; color:#fff } .badge-sql{ background:#10b981; color:#fff }
.run-where{ font-size:.74rem; color:var(--ink-3) }
.btn-run{ background:var(--ink); color:var(--paper); font-weight:800; border-radius:8px;
  padding:.24rem .82rem; font-size:.8rem; border:0; white-space:nowrap }
.btn-run:hover{ opacity:.86; color:var(--paper) }
.btn-run:disabled{ opacity:.45 }
.btn-ghost{ border:1px solid var(--line-2); color:var(--ink-3); border-radius:8px;
  padding:.24rem .55rem; font-size:.8rem; background:transparent }
.btn-ghost:hover{ color:var(--ink); border-color:var(--ink-3) }
.code-area{
  width:100%; border:0; outline:0; resize:none; display:block;
  background:var(--code-bg); color:var(--code-ink);
  padding:.95rem 1.05rem; font-size:.855rem; line-height:1.72; tab-size:4; overflow:hidden;
}
.code-area:focus{ box-shadow:inset 0 0 0 2px var(--blue) }
.cell-out{ border-top:1px solid var(--line); background:var(--page); padding:.8rem 1rem;
  font-size:.85rem; max-height:520px; overflow:auto }
.out-pre{ margin:0; white-space:pre-wrap; font-size:.845rem; line-height:1.68; color:var(--ink) }
.out-err{ color:#dc2626; font-weight:600 }
[data-bs-theme="dark"] .out-err{ color:#f87171 }
.out-msg{ color:var(--mint); font-weight:700; margin:.15rem 0 }
.out-sql{ font-size:.76rem; color:var(--ink-3); margin:.55rem 0 .25rem; white-space:pre-wrap }
.out-meta{ font-size:.74rem; color:var(--ink-3); margin-top:.5rem; text-align:right }
.out-loading{ color:var(--ink-3); font-size:.85rem }
.res-table{ width:100%; border-collapse:collapse; font-size:.82rem; margin:.3rem 0 }
.res-table th{ background:var(--blue-s); font-weight:800; padding:.4rem .65rem;
  border:1px solid var(--line); white-space:nowrap; text-align:left }
.res-table td{ padding:.36rem .65rem; border:1px solid var(--line); background:var(--paper) }
.res-table td.num{ text-align:right; font-variant-numeric:tabular-nums }
.res-table td.null{ color:var(--ink-3); font-style:italic }
.res-wrap{ overflow-x:auto; border-radius:8px }

/* ── 퀴즈 ────────────────────────────────── */
.quiz{ background:var(--violet-s); border:1px solid var(--violet); border-radius:13px; padding:1.15rem 1.25rem }
.quiz-h{ font-weight:900; margin-bottom:.55rem; font-size:.95rem }
.quiz-q{ font-weight:700; margin-bottom:.9rem; line-height:1.62 }
.quiz-opts{ display:grid; gap:.42rem }
.quiz-opt{ display:flex; align-items:flex-start; gap:.65rem; text-align:left; width:100%;
  background:var(--paper); border:1.5px solid var(--line); border-radius:10px;
  padding:.62rem .85rem; font-size:.9rem; color:var(--ink); transition:all .14s; line-height:1.55 }
.quiz-opt:hover:not(:disabled){ border-color:var(--violet); transform:translateX(3px) }
.qo-n{ flex:0 0 22px; height:22px; border-radius:6px; background:var(--page); color:var(--ink-3);
  font-weight:900; font-size:.74rem; display:grid; place-items:center; margin-top:1px }
.quiz-opt.correct{ border-color:var(--mint); background:var(--mint-s) }
.quiz-opt.correct .qo-n{ background:var(--mint); color:#fff }
.quiz-opt.wrong{ border-color:var(--rose); background:var(--rose-s) }
.quiz-opt.wrong .qo-n{ background:var(--rose); color:#fff }
.quiz-explain{ margin-top:.85rem; background:var(--paper); border-radius:10px;
  padding:.75rem .95rem; font-size:.885rem; color:var(--ink-2); line-height:1.68 }

/* ── 레슨 하단 내비 ──────────────────────── */
.lesson-nav{ display:grid; grid-template-columns:1fr auto 1fr; gap:.6rem; align-items:stretch;
  margin-top:2.6rem; padding-top:1.6rem; border-top:2px solid var(--line) }
.ln-btn{ display:flex; flex-direction:column; justify-content:center; gap:.1rem; padding:.75rem 1rem;
  border:1px solid var(--line); border-radius:12px; text-decoration:none; color:var(--ink);
  background:var(--page); transition:border-color .14s,transform .14s; min-width:0 }
.ln-btn:hover{ border-color:var(--blue); transform:translateY(-2px); color:var(--ink) }
.ln-btn small{ color:var(--ink-3); font-size:.73rem; font-weight:700 }
.ln-btn b{ font-size:.88rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.ln-next{ text-align:right }
.ln-done{ border:0; border-radius:12px; background:var(--mint); color:#fff; font-weight:800;
  padding:.75rem 1.15rem; font-size:.87rem; white-space:nowrap }
.ln-done.is-done{ background:var(--mint-s); color:var(--mint) }
@media (max-width:640px){
  .lesson-nav{ grid-template-columns:1fr 1fr; }
  .ln-done{ grid-column:1/-1; order:-1 }
}

.nb-foot{ text-align:center; color:var(--ink-3); font-size:.85rem; padding:2rem 1rem 0; max-width:920px; margin:0 auto }
.nb-foot p{ margin:.2rem 0 }
.nb-foot .nb-copy{ margin-top:.9rem; padding-top:.9rem; border-top:1px solid var(--line); opacity:.8 }

/* ── 토스트 ──────────────────────────────── */
.nb-toast{ position:fixed; bottom:1.4rem; left:50%; transform:translateX(-50%) translateY(1rem);
  background:var(--ink); color:var(--paper); padding:.62rem 1.15rem; border-radius:11px;
  font-size:.87rem; font-weight:700; z-index:2000; opacity:0; transition:all .25s; box-shadow:var(--shadow) }
.nb-toast.show{ opacity:1; transform:translateX(-50%) translateY(0) }

/* ══════════════════════════════════════════════════════════
   레슨 본문 전용 요소
   ══════════════════════════════════════════════════════════ */
.demo-table{ width:100%; border-collapse:collapse; font-size:.87rem; margin:.8rem 0 1.1rem }
.demo-table th{ background:var(--blue-s); font-weight:800; padding:.5rem .7rem;
  border:1px solid var(--line-2); text-align:left; white-space:nowrap }
.demo-table td{ padding:.44rem .7rem; border:1px solid var(--line); background:var(--paper) }
.demo-table td.dup{ background:var(--rose-s) }
.demo-table th.pk,.demo-table td.pk{ background:var(--amber-s); font-weight:800 }
.demo-table th.fk,.demo-table td.fk{ background:var(--amber-s) }
.demo-table code{ background:none!important; padding:0!important; font-size:.83em }

.codeblock{ background:var(--code-bg); color:var(--code-ink); border-radius:11px;
  padding:1rem 1.1rem; font-size:.83rem; line-height:1.72; overflow-x:auto; margin:.7rem 0 1.1rem }

/* 비유 카드 3단 */
.metaphor-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.7rem; margin:1.1rem 0 }
.metaphor-card{ background:var(--page); border:1px solid var(--line); border-radius:13px;
  padding:1rem .8rem; text-align:center }
.mc-icon{ font-size:2rem; line-height:1 } .mc-t{ font-weight:800; margin:.4rem 0 .15rem }
.mc-d{ font-size:.82rem; color:var(--ink-3) }

/* 증명 상자 · 가운데 정렬한 식 */
.proof-box{ background:var(--page); border:1px solid var(--line); border-left:4px solid var(--blue);
  border-radius:12px; padding:.9rem 1.15rem; margin:1.1rem 0; font-size:.93rem }
.proof-box p{ margin:.35rem 0 } .proof-box p:last-child{ margin-bottom:0 }
.big-eq{ text-align:center; background:var(--page); border:1px solid var(--line);
  border-radius:12px; padding:.75rem 1rem; margin:1rem 0; font-size:1rem }
.big-eq code{ background:none!important; padding:0!important; font-size:.98em }

/* ══════════════════════════════════════════════════════════
   인터랙티브 위젯
   ══════════════════════════════════════════════════════════ */
.widget{ border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--paper) }
.widget .cell-cap{ padding:.7rem .95rem 0; margin:0 }
.widget-body{ padding:1rem }
.w-grid{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem }
@media (max-width:780px){ .w-grid{ grid-template-columns:1fr } }
.w-panel{ background:var(--page); border:1px solid var(--line); border-radius:12px; padding:.85rem .95rem }
.w-h{ font-weight:800; font-size:.85rem; margin-bottom:.6rem; display:flex; align-items:center;
  gap:.4rem; justify-content:space-between }
.w-note{ font-size:.78rem; color:var(--ink-3); margin-top:.5rem; line-height:1.6 }
.w-empty{ color:var(--ink-3); font-size:.85rem; text-align:center; padding:1rem 0 }
.w-row{ display:flex; align-items:center; gap:.5rem; margin-bottom:.4rem }
.w-inp{ flex:1; min-width:0; border:1px solid var(--line-2); border-radius:9px;
  padding:.42rem .7rem; font-size:.87rem; background:var(--paper); color:var(--ink) }
.w-inp:focus{ outline:2px solid var(--blue); outline-offset:-1px }
.w-btn{ border:0; border-radius:9px; padding:.42rem .9rem; font-weight:800; font-size:.83rem;
  background:var(--blue); color:#fff; white-space:nowrap }
.w-btn:hover{ filter:brightness(1.08) } .w-btn:disabled{ opacity:.5 }
.w-btn.sec{ background:var(--line); color:var(--ink-2) }
.w-btn.ok{ background:var(--mint) } .w-btn.dan{ background:var(--rose) }
.w-btn.sm{ padding:.22rem .55rem; font-size:.75rem; border-radius:7px }

/* SQL 로그 */
.w-log{ background:var(--code-bg); color:var(--code-ink); border-radius:10px; padding:.7rem .85rem;
  font-family:'JetBrains Mono',monospace; font-size:.745rem; line-height:1.7;
  max-height:290px; overflow:auto; white-space:pre-wrap }
.w-log .lg{ padding:.22rem 0; border-bottom:1px solid rgba(255,255,255,.07) }
.w-log .lg:last-child{ border-bottom:0 }
.w-log .lg-t{ color:#64748b; font-size:.68rem }
.w-log .lg-p{ color:#fbbf24 }
.w-log .lg-new{ animation:flash .8s ease }
@keyframes flash{ from{ background:rgba(59,130,246,.35) } to{ background:transparent } }

.w-alert{ background:var(--rose-s); color:var(--rose); border-radius:9px; padding:.5rem .75rem;
  font-size:.83rem; font-weight:700; margin-bottom:.6rem }
.w-ok{ background:var(--mint-s); color:var(--mint); border-radius:9px; padding:.5rem .75rem;
  font-size:.83rem; font-weight:700; margin-bottom:.6rem }

/* Pyodide 로딩 */
.py-loading{ display:flex; align-items:center; gap:.55rem; color:var(--ink-3); font-size:.83rem }
.spin{ width:14px; height:14px; border:2px solid var(--line-2); border-top-color:var(--blue);
  border-radius:50%; animation:sp .7s linear infinite }
@keyframes sp{ to{ transform:rotate(360deg) } }


/* ── 계정 배지 · 점수 ────────────────────── */
/* 계정 · 랜딩 · 관리자 */
.nb-user{ font-size:.8rem; font-weight:700; color:var(--ink-2); padding:.2rem .55rem;
  background:var(--page); border:1px solid var(--line); border-radius:99px; white-space:nowrap }
.nb-user b{ color:var(--rose) }
.nb-user.guest{ color:var(--ink-3) }
.quiz-score{ margin-top:.7rem; font-size:.83rem; color:var(--ink-2); background:var(--page);
  border:1px solid var(--line); border-radius:99px; padding:.25rem .8rem; display:inline-block }
.ms-sum{ font-size:.95rem; margin-bottom:.7rem }
.ms-sum b{ font-size:1.15rem } .ms-pct{ color:var(--ink-3); margin-left:.4rem }
.ms-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(64px,1fr)); gap:.35rem }
.ms-cell{ text-align:center; text-decoration:none; color:var(--ink-3); background:var(--page);
  border:1.5px solid var(--line); border-radius:9px; padding:.35rem .1rem; font-size:.7rem }
.ms-cell b{ display:block; font-size:.82rem; color:var(--ink) }
.ms-cell.part{ background:var(--amber-s); border-color:var(--amber) }
.ms-cell.full{ background:var(--mint-s); border-color:var(--mint) }


/* ══════════════════════════════════════════════════════════
   본문 공통 조각 (비교 상자 · 파이프라인 띠)
   ══════════════════════════════════════════════════════════ */
.compare-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(245px,1fr)); gap:.85rem; margin:1.1rem 0 }
.cmp-box{ border-radius:13px; padding:1rem 1.1rem; border:1.5px solid }
.cmp-bad{ background:var(--rose-s);  border-color:var(--rose) }
.cmp-good{ background:var(--mint-s); border-color:var(--mint) }
.cmp-neutral{ background:var(--blue-s); border-color:var(--blue) }
.cmp-h{ font-weight:800; margin-bottom:.5rem }
.cmp-box pre{ background:rgba(15,23,42,.08); border-radius:8px; padding:.6rem .75rem;
  font-size:.79rem; margin:.4rem 0; overflow-x:auto; line-height:1.6 }
[data-bs-theme="dark"] .cmp-box pre{ background:rgba(0,0,0,.32) }
.cmp-n{ font-size:.81rem; color:var(--ink-2); margin-top:.3rem }
.cmp-box p{ font-size:.87rem; margin:0 }

/* 파이프라인 진행 띠 — 지금 몇 번째 단계인지 */
.pipe{ display:flex; flex-wrap:wrap; gap:.3rem; margin:1rem 0; font-size:.74rem }
.pipe span{ padding:.3rem .6rem; border-radius:99px; background:var(--page);
  border:1.5px solid var(--line); color:var(--ink-3); font-weight:700 }
.pipe span.on{ background:var(--blue-s); border-color:var(--blue); color:var(--blue) }
.pipe span.done{ background:var(--mint-s); border-color:var(--mint); color:var(--mint) }

/* ══════════════════════════════════════════════════════════
   생물정보학 위젯 (.bio-*)
   ══════════════════════════════════════════════════════════ */

/* ── 공통 조각 ───────────────────────────── */
.bio-chip{ display:inline-block; padding:.16rem .5rem; border-radius:7px; font-size:.75rem;
  font-weight:800; font-family:'JetBrains Mono',monospace; background:var(--page);
  border:1.5px solid var(--line); color:var(--ink-2) }
.bio-chip.wt{ background:var(--blue-s); border-color:var(--blue); color:var(--blue) }
.bio-chip.kd{ background:var(--rose-s); border-color:var(--rose); color:var(--rose) }
.bio-chip.on{ background:var(--mint-s); border-color:var(--mint); color:var(--mint) }

.bio-tbl{ width:100%; border-collapse:collapse; font-size:.75rem;
  font-family:'JetBrains Mono',monospace }
.bio-tbl th,.bio-tbl td{ border:1px solid var(--line); padding:.28rem .45rem; text-align:right;
  white-space:nowrap }
.bio-tbl th{ background:var(--page); color:var(--ink-2); font-weight:800 }
.bio-tbl td.g,.bio-tbl th.g{ text-align:left; font-weight:700; color:var(--ink) }
.bio-tbl tr.hl td{ background:var(--amber-s) }
.bio-tbl td.hl{ background:var(--blue-s); color:var(--blue); font-weight:800 }
.bio-tbl td.dn{ color:var(--rose); font-weight:800 }
.bio-tbl td.up{ color:var(--blue); font-weight:800 }
.bio-scroll{ overflow:auto; max-height:330px; border-radius:10px; border:1px solid var(--line) }

.bio-kv{ display:grid; grid-template-columns:repeat(auto-fit,minmax(108px,1fr)); gap:.4rem;
  margin:.6rem 0 }
.bio-kv div{ background:var(--page); border:1.5px solid var(--line); border-radius:10px;
  padding:.45rem .6rem; text-align:center }
.bio-kv div span{ display:block; font-size:.68rem; color:var(--ink-3); font-weight:700 }
.bio-kv div b{ font-size:.98rem; font-family:'JetBrains Mono',monospace }

.bio-slider{ display:flex; align-items:center; gap:.55rem; margin:.4rem 0; font-size:.79rem }
.bio-slider input[type=range]{ flex:1; accent-color:var(--blue) }
.bio-slider b{ font-family:'JetBrains Mono',monospace; min-width:62px; text-align:right }

/* 가로 막대 (log2FC · NES · 발현량) */
.bio-bars{ display:flex; flex-direction:column; gap:.28rem; margin:.5rem 0 }
.bio-brow{ display:grid; grid-template-columns:104px 1fr 72px; align-items:center; gap:.5rem;
  font-size:.76rem }
.bio-brow > b{ font-family:'JetBrains Mono',monospace; font-weight:800 }
.bio-track{ position:relative; height:17px; background:var(--page); border-radius:5px;
  border:1px solid var(--line) }
.bio-track i{ position:absolute; top:0; bottom:0; border-radius:4px; display:block }
.bio-track i.dn{ background:var(--rose) } .bio-track i.up{ background:var(--blue) }
.bio-track .zero{ position:absolute; top:-2px; bottom:-2px; width:1.5px; background:var(--ink-3) }
.bio-brow .val{ font-family:'JetBrains Mono',monospace; text-align:right; font-size:.73rem }

/* SVG 차트 */
.bio-svg{ width:100%; background:var(--page); border:1px solid var(--line); border-radius:11px;
  display:block }
.bio-svg text{ font-size:9px; fill:var(--ink-3); font-family:'Pretendard Variable',sans-serif }
.bio-svg .ax{ stroke:var(--line-2); stroke-width:1 }
.bio-svg .dot{ fill:var(--ink-3); opacity:.5 }
.bio-svg .dot.hit{ fill:var(--rose); opacity:1 }
.bio-svg .ln{ fill:none; stroke:var(--blue); stroke-width:1.8 }
.bio-svg .ln.neg{ stroke:var(--rose) }
.bio-svg .gd{ stroke:var(--line); stroke-width:1; stroke-dasharray:3 3 }

/* 샘플 카드 (WT / KD) */
.bio-samps{ display:flex; flex-wrap:wrap; gap:.35rem; margin:.55rem 0 }
.bio-samp{ border-radius:10px; padding:.42rem .6rem; border:1.5px solid var(--line);
  background:var(--page); font-size:.74rem; text-align:center; min-width:78px;
  font-family:'JetBrains Mono',monospace; cursor:pointer; user-select:none }
.bio-samp.wt{ background:var(--blue-s); border-color:var(--blue); color:var(--blue) }
.bio-samp.kd{ background:var(--rose-s); border-color:var(--rose); color:var(--rose) }
.bio-samp.off{ opacity:.32; filter:grayscale(1) }
.bio-samp b{ display:block; font-size:.86rem }

/* 체크리스트 (재현 판정) */
.bio-check{ display:flex; align-items:center; gap:.55rem; padding:.42rem .6rem; font-size:.83rem;
  border:1.5px solid var(--line); border-radius:10px; background:var(--page); margin-bottom:.3rem }
.bio-check .mk{ width:22px; height:22px; border-radius:6px; display:grid; place-items:center;
  font-weight:900; font-size:.78rem; background:var(--line); color:var(--ink-3); flex:none }
.bio-check.ok{ background:var(--mint-s); border-color:var(--mint) }
.bio-check.ok .mk{ background:var(--mint); color:#fff }
.bio-check.no{ background:var(--rose-s); border-color:var(--rose) }
.bio-check.no .mk{ background:var(--rose); color:#fff }
.bio-check .why{ margin-left:auto; font-size:.73rem; color:var(--ink-3);
  font-family:'JetBrains Mono',monospace }

/* 생성된 코드 미리보기 */
.bio-code{ background:var(--code-bg); color:var(--code-ink); border-radius:10px;
  padding:.6rem .8rem; font-family:'JetBrains Mono',monospace; font-size:.755rem;
  line-height:1.75; white-space:pre-wrap; overflow-x:auto; margin:.5rem 0 }
.bio-code em{ color:#fbbf24; font-style:normal }
.bio-code s{ color:#64748b; text-decoration:none }

/* 유전자 세트 매칭 */
.bio-genes{ display:flex; flex-wrap:wrap; gap:.22rem; margin:.45rem 0; max-height:150px; overflow:auto }
.bio-genes span{ font-family:'JetBrains Mono',monospace; font-size:.68rem; padding:.12rem .38rem;
  border-radius:5px; background:var(--page); border:1px solid var(--line); color:var(--ink-3) }
.bio-genes span.hit{ background:var(--mint-s); border-color:var(--mint); color:var(--mint); font-weight:800 }
.bio-genes span.miss{ opacity:.4; text-decoration:line-through }

/* 세포 그림 (면역회피 패널) */
.bio-cells{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.5rem;
  margin:.6rem 0 }
.bio-cellcard{ border:1.5px solid var(--line); border-radius:12px; padding:.6rem .7rem;
  background:var(--page); cursor:pointer }
.bio-cellcard.sel{ border-color:var(--blue); background:var(--blue-s) }
.bio-cellcard .ic{ font-size:1.35rem } .bio-cellcard b{ display:block; font-size:.85rem }
.bio-cellcard p{ margin:.25rem 0 0; font-size:.74rem; color:var(--ink-3); line-height:1.55 }
/* ── 허브(drson.iotok.org)로 돌아가는 홈 버튼 ── */
.nb-home{
  flex:0 0 auto; font-weight:700; line-height:1.4;
  border-radius:10px; padding:.28rem .55rem; white-space:nowrap;
}
@media (max-width:575.98px){ .nb-home{ padding:.28rem .45rem } }


/* 파이썬 셀이 만든 그림 */
.py-fig{ display:block; max-width:100%; margin:.6rem 0 0; border-radius:10px;
  background:#fff; border:1px solid var(--line) }

/* ══════════════════════════════════════════════════════════
   유전자탐색 위젯 (.gene-*)
   ══════════════════════════════════════════════════════════ */

/* ── SVG 차트 공통 ───────────────────────── */
.gene-svg{ width:100%; background:var(--page); border:1px solid var(--line);
  border-radius:12px; display:block; margin:.5rem 0 }
.gene-svg text{ font-family:'Pretendard Variable',sans-serif; fill:var(--ink-3) }
.gene-svg .ax{ stroke:var(--line-2); stroke-width:1.2 }
.gene-svg .ax-grid{ stroke:var(--line); stroke-width:1; stroke-dasharray:3 4 }
.gene-svg .ax-t{ font-size:10.5px; font-weight:700; fill:var(--ink-2) }
.gene-svg .ax-n{ font-size:9.5px; font-family:'JetBrains Mono',monospace }
.gene-svg .ax-lb{ font-size:11px; font-weight:800; fill:var(--ink) }
.gene-svg .pt{ fill:var(--ink-3); opacity:.42 }
.gene-svg .pt.des{ fill:var(--coral); opacity:.85 }
.gene-svg .pt.inf{ fill:var(--blue);  opacity:.85 }
.gene-svg .pt.mid{ fill:var(--ink-3); opacity:.30 }
.gene-svg .pt.up{ fill:var(--rose);  opacity:.8 }
.gene-svg .pt.dn{ fill:var(--blue);  opacity:.8 }
.gene-svg .pt.mark2{ fill:var(--violet); opacity:1 }
.gene-svg .mark{ fill:none; stroke:var(--violet); stroke-width:2.4 }
.gene-svg .thr{ stroke:var(--amber); stroke-width:1.6; stroke-dasharray:5 4 }
.gene-svg .gline{ fill:none; stroke-width:2.6; stroke-linecap:round }
.gene-svg .gA{ stroke:var(--ink-3) } .gene-svg .gB{ stroke:var(--violet) }
.gene-svg .gC{ stroke:var(--amber) } .gene-svg .gD{ stroke:var(--mint) }

.gene-key{ display:inline-block; width:11px; height:11px; border-radius:50%;
  margin:0 .25rem 0 .55rem; vertical-align:-1px; background:var(--ink-3) }
.gene-key.k-des{ background:var(--coral) } .gene-key.k-inf{ background:var(--blue) }
.gene-key.k-mid{ background:var(--line-2) }
.gene-key.k-pos{ background:var(--blue) }  .gene-key.k-neg{ background:var(--coral) }
.gene-key.gA{ background:var(--ink-3) } .gene-key.gB{ background:var(--violet) }
.gene-key.gC{ background:var(--amber) } .gene-key.gD{ background:var(--mint) }

/* ── 가로 막대 목록 ──────────────────────── */
.gene-bar{ display:grid; grid-template-columns:minmax(120px,1.3fr) 2fr 52px;
  align-items:center; gap:.5rem; font-size:.77rem; margin-bottom:.24rem }
.gene-bar .gb-l{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.gene-bar .gb-t{ position:relative; height:16px; background:var(--page);
  border:1px solid var(--line); border-radius:5px; display:block }
.gene-bar .gb-t i{ position:absolute; left:0; top:0; bottom:0; border-radius:4px;
  background:var(--blue); display:block }
.gene-bar .gb-t i.gb-ours{ background:var(--violet) }
.gene-bar .gb-t i.gb-paper{ background:var(--coral) }
.gene-bar .gb-t i.gb-good{ background:var(--mint) }
.gene-bar .gb-v{ font-family:'JetBrains Mono',monospace; text-align:right; font-size:.75rem }

/* ── 파이프라인 조립기 ───────────────────── */
.gene-pipe{ display:flex; align-items:center; justify-content:center; gap:.4rem;
  flex-wrap:wrap; margin:.3rem 0 .8rem }
.gp-step{ border:2px solid var(--line); background:var(--page); border-radius:13px;
  padding:.5rem 1rem; cursor:pointer; text-align:center; min-width:112px }
.gp-step b{ display:block; font-size:.9rem; letter-spacing:.02em }
.gp-step span{ font-size:.7rem; color:var(--ink-3) }
.gp-step.on{ border-color:var(--violet); background:var(--violet-s); color:var(--violet) }
.gp-step.on span{ color:var(--violet) }
.gp-arrow{ color:var(--ink-3); font-weight:900 }

.gene-card{ border:1.5px solid var(--line); border-radius:14px; background:var(--page);
  padding:.75rem .9rem; margin:.5rem 0 }
.gene-card .gc-h{ font-weight:800; font-size:.95rem; margin-bottom:.15rem }
.gene-card .gc-h small{ display:block; font-weight:600; font-size:.7rem; color:var(--ink-3) }
.gene-card .gc-q{ font-size:.83rem; color:var(--ink-2); margin:.4rem 0 .6rem }
.gene-card p{ font-size:.83rem; margin:.2rem 0 .5rem }
.gc-io{ display:grid; grid-template-columns:1fr auto 1fr; gap:.6rem; align-items:center }
.gc-io .gc-t{ font-size:.72rem; font-weight:800; color:var(--ink-3); margin-bottom:.2rem }
.gc-io ul{ margin:0; padding-left:1rem; font-size:.78rem; line-height:1.7 }
.gc-ar{ font-size:1.2rem; color:var(--ink-3) }
@media (max-width:640px){ .gc-io{ grid-template-columns:1fr } .gc-ar{ text-align:center } }

/* ── 깔때기 ──────────────────────────────── */
.gene-funnel{ display:flex; flex-direction:column; gap:.28rem; margin:.5rem 0 }
.gf-row{ display:grid; grid-template-columns:minmax(140px,1.1fr) 2fr 58px minmax(0,1.2fr);
  align-items:center; gap:.5rem; font-size:.76rem }
.gf-row .gf-l{ color:var(--ink-2) }
.gf-row .gf-b{ height:15px; border-radius:4px; background:var(--coral); display:block; min-width:3px }
.gf-row .gf-b.ours{ background:var(--violet) }
.gf-row b{ font-family:'JetBrains Mono',monospace; text-align:right }
.gf-row i{ font-style:normal; font-size:.7rem; color:var(--ink-3) }
@media (max-width:640px){ .gf-row{ grid-template-columns:1fr 1.4fr 52px } .gf-row i{ display:none } }

.gene-toggle{ display:flex; align-items:center; gap:.55rem; width:100%; text-align:left;
  border:1.5px solid var(--line); background:var(--paper); border-radius:11px;
  padding:.42rem .6rem; margin-bottom:.3rem; cursor:pointer; font-size:.8rem }
.gene-toggle .gt-box{ width:21px; height:21px; border-radius:6px; flex:none; display:grid;
  place-items:center; background:var(--line); color:var(--ink-3); font-weight:900; font-size:.75rem }
.gene-toggle.on{ border-color:var(--mint); background:var(--mint-s) }
.gene-toggle.on .gt-box{ background:var(--mint); color:#fff }
.gene-toggle.lock{ opacity:.75; cursor:not-allowed }
.gene-toggle i{ display:block; font-style:normal; font-size:.71rem; color:var(--ink-3) }

/* ── 순위표 위의 레귤론 (aREA) ───────────── */
.gene-rank{ position:relative; height:56px; background:linear-gradient(90deg,
  var(--blue-s), var(--page) 45%, var(--page) 55%, var(--rose-s));
  border:1px solid var(--line); border-radius:11px; margin:.6rem 0 }
.gene-rank i{ position:absolute; top:8px; width:2px; height:30px; background:var(--violet);
  border-radius:1px; cursor:pointer }
.gene-rank i.pos{ background:var(--blue) } .gene-rank i.neg{ background:var(--coral) }
.gene-rank i.off{ background:var(--line-2); height:12px; top:17px }
.gene-rank .gr-l,.gene-rank .gr-r{ position:absolute; bottom:5px; font-size:.68rem; color:var(--ink-3) }
.gene-rank .gr-l{ left:8px } .gene-rank .gr-r{ right:8px }

.gene-tgs{ display:flex; flex-wrap:wrap; gap:.25rem; margin:.4rem 0 }
.gene-tg{ font-family:'JetBrains Mono',monospace; font-size:.69rem; padding:.2rem .42rem;
  border-radius:6px; border:1.5px solid var(--line); background:var(--page);
  cursor:pointer; color:var(--ink-2) }
.gene-tg.pos{ border-color:var(--blue); color:var(--blue) }
.gene-tg.neg{ border-color:var(--coral); color:var(--coral) }
.gene-tg.off{ opacity:.35; text-decoration:line-through }
.gene-tg i{ font-style:normal; opacity:.65; margin-left:.2rem }

/* ── 분포 스트립 (활성 vs 발현) ──────────── */
.gene-strip{ border:1.5px solid var(--line); border-radius:12px; background:var(--page);
  padding:.6rem .75rem; margin:.5rem 0 }
.gene-strip .gs-h{ font-size:.82rem; font-weight:700; margin-bottom:.45rem }
.gene-strip .gs-h b{ float:right; font-family:'JetBrains Mono',monospace; font-size:.74rem }
.gene-strip .gs-h b.sig{ color:var(--mint) } .gene-strip .gs-h b.ns{ color:var(--ink-3) }
.gs-row{ display:grid; grid-template-columns:74px 1fr; align-items:center; gap:.5rem; margin:.3rem 0 }
.gs-row .gs-l{ font-size:.73rem; color:var(--ink-3) }
.gs-line{ position:relative; height:26px; background:var(--paper); border:1px solid var(--line);
  border-radius:7px }
.gs-line i{ position:absolute; top:8px; width:9px; height:9px; border-radius:50%;
  transform:translateX(-50%); opacity:.72 }
.gs-line i.des{ background:var(--coral) } .gs-line i.inf{ background:var(--blue) }
.gs-line em{ position:absolute; top:-2px; bottom:-2px; width:2px; background:var(--ink);
  transform:translateX(-50%); opacity:.65 }
.gene-strip .gs-f{ font-size:.69rem; color:var(--ink-3); margin-top:.3rem }

/* ── 나란히 비교 카드 ────────────────────── */
.gene-cmp{ display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin:.55rem 0 }
.gc-side{ border:1.5px solid var(--line); border-radius:12px; background:var(--page);
  padding:.6rem .7rem; text-align:center }
.gc-side .gc-t{ font-size:.75rem; font-weight:800; color:var(--ink-2) }
.gc-side .gc-big{ font-size:1.45rem; font-weight:900; font-family:'JetBrains Mono',monospace;
  margin:.25rem 0 }
.gc-side .gc-big.good{ color:var(--mint) } .gc-side .gc-big.bad{ color:var(--rose) }
.gc-side .mini{ font-size:.7rem; color:var(--ink-3); line-height:1.6 }
@media (max-width:560px){ .gene-cmp{ grid-template-columns:1fr } }

/* ── MoR 막대 ────────────────────────────── */
.gene-mors{ display:flex; align-items:flex-end; gap:2px; height:66px; padding:3px 4px;
  background:var(--page); border:1px solid var(--line); border-radius:10px; margin:.5rem 0;
  overflow:hidden }
.gene-mors i{ flex:1; min-width:2px; border-radius:2px 2px 0 0; background:var(--blue) }
.gene-mors i.neg{ background:var(--coral) }

/* ── 삼각형 (DPI) ────────────────────────── */
.gene-svg .tri-e{ stroke:var(--blue); opacity:.75; stroke-linecap:round }
.gene-svg .tri-e.cut{ stroke:var(--rose); stroke-dasharray:6 5; opacity:1 }
.gene-svg .tri-n{ fill:var(--page); stroke:var(--line-2); stroke-width:2 }
.gene-svg .tri-n.tf{ fill:var(--violet-s); stroke:var(--violet) }
.gene-svg .tri-l{ font-size:11px; font-weight:800; fill:var(--ink); text-anchor:middle }

/* ── 계층 ────────────────────────────────── */
.gene-layers{ display:flex; flex-direction:column; gap:.3rem; margin:.4rem 0 }
.gl-row{ display:grid; grid-template-columns:112px 68px 1fr; align-items:center; gap:.5rem;
  border:1.5px solid var(--line); background:var(--paper); border-radius:11px;
  padding:.45rem .65rem; cursor:pointer; text-align:left; font-size:.8rem }
.gl-row.on{ border-color:var(--violet); background:var(--violet-s) }
.gl-row .gl-n{ font-weight:800 }
.gl-row .gl-c{ font-family:'JetBrains Mono',monospace; font-size:.72rem; color:var(--ink-3) }
.gl-row .gl-e{ font-size:.72rem; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap }

/* ── 표 ──────────────────────────────────── */
.gene-tbl{ margin:.5rem 0 }
.gene-tbl td:first-child,.gene-tbl th:first-child{ text-align:left }
.gene-hit{ display:inline-block; background:var(--mint-s); color:var(--mint);
  border-radius:5px; padding:0 .3rem; font-size:.66rem; font-weight:800 }

/* ── 패널 카드 (태아 가면) ───────────────── */
.gene-panel{ display:grid; grid-template-columns:repeat(auto-fill,minmax(158px,1fr));
  gap:.45rem; margin:.55rem 0 }
.gp-card{ border:1.5px solid var(--line); border-radius:12px; background:var(--page);
  padding:.5rem .6rem }
.gp-card.dn{ border-color:var(--coral); background:var(--coral-s) }
.gp-card.up{ border-color:var(--blue);  background:var(--blue-s) }
.gp-card.ns{ opacity:.72 }
.gp-card .gp-g{ font-weight:800; font-size:.83rem }
.gp-card .gp-v{ font-family:'JetBrains Mono',monospace; font-size:1.05rem; font-weight:800 }
.gp-card .gp-b{ height:5px; background:var(--paper); border-radius:3px; overflow:hidden; margin:.2rem 0 }
.gp-card .gp-b i{ display:block; height:100%; background:var(--ink-3) }
.gp-card.dn .gp-b i{ background:var(--coral) } .gp-card.up .gp-b i{ background:var(--blue) }
.gp-card .gp-p{ font-size:.68rem; color:var(--ink-3); font-family:'JetBrains Mono',monospace }
.gp-card .gp-i{ font-size:.69rem; color:var(--ink-2); margin-top:.25rem; line-height:1.5 }

/* ── 판정 체크리스트 ─────────────────────── */
.gene-checks{ display:flex; flex-direction:column; gap:.26rem; margin:.5rem 0 }
.gc-item{ display:grid; grid-template-columns:24px 1fr auto auto; align-items:center; gap:.5rem;
  border:1.5px solid var(--line); background:var(--paper); border-radius:11px;
  padding:.4rem .6rem; cursor:pointer; text-align:left; font-size:.79rem; opacity:.5 }
.gc-item.on{ opacity:1 }
.gc-item.on.yes{ border-color:var(--mint); background:var(--mint-s) }
.gc-item.on.no{ border-color:var(--rose); background:var(--rose-s) }
.gc-item.on.na{ border-color:var(--line-2); background:var(--page) }
.gc-item .gc-box{ width:21px; height:21px; border-radius:6px; display:grid; place-items:center;
  background:var(--line); color:var(--ink-3); font-weight:900; font-size:.74rem }
.gc-item.on .gc-box{ background:var(--ink-2); color:#fff }
.gc-item .gc-b b{ display:block; font-weight:700 }
.gc-item .gc-b i{ font-style:normal; font-size:.69rem; color:var(--ink-3);
  font-family:'JetBrains Mono',monospace }
.gc-item .gc-tag{ font-size:.66rem; color:var(--ink-3); white-space:nowrap }
.gc-item .gc-r{ font-size:.72rem; font-weight:800; white-space:nowrap }
.gc-item.yes .gc-r{ color:var(--mint) } .gc-item.no .gc-r{ color:var(--rose) }
.gc-item.na .gc-r{ color:var(--ink-3) }
@media (max-width:640px){ .gc-item{ grid-template-columns:24px 1fr auto } .gc-item .gc-tag{ display:none } }

.gene-verdict{ display:flex; align-items:center; gap:.9rem; border-radius:14px;
  padding:.7rem 1rem; margin:.6rem 0; border:2px solid var(--line-2); background:var(--page) }
.gene-verdict .gv-n{ font-size:1.5rem; font-weight:900; letter-spacing:.03em }
.gene-verdict .gv-d{ font-size:.78rem; color:var(--ink-2) }
.gene-verdict.v-AGREE{ border-color:var(--mint); background:var(--mint-s) }
.gene-verdict.v-AGREE .gv-n{ color:var(--mint) }
.gene-verdict.v-PARTIAL{ border-color:var(--amber); background:var(--amber-s) }
.gene-verdict.v-PARTIAL .gv-n{ color:var(--amber) }
.gene-verdict.v-DISAGREE{ border-color:var(--rose); background:var(--rose-s) }
.gene-verdict.v-DISAGREE .gv-n{ color:var(--rose) }


/* ── TIL 지도 ─────────────────────────────── */
.til-map{
  display:block; width:100%; height:auto; margin:0 auto;
  image-rendering:pixelated; border-radius:10px; background:#0c1018;
  border:1px solid var(--line);
}
.til-two{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem; align-items:start; margin:.55rem 0 }
@media (max-width:700px){ .til-two{ grid-template-columns:1fr } }
.til-leg{ display:flex; flex-wrap:wrap; gap:.5rem .9rem; justify-content:center;
  margin-top:.45rem; font-size:.74rem; color:var(--ink-2) }
.til-leg i{ display:inline-block; width:11px; height:11px; border-radius:3px;
  margin-right:.25rem; vertical-align:-1px; border:1px solid var(--line-2) }


/* 언어 토글 — 오른쪽 위. 지금 누르면 갈 언어를 배지로 보여 준다.
   좁은 화면에서는 지구본만 남긴다. */
.nb-lang{ display:inline-flex; align-items:center; gap:.25rem; font-weight:700; text-decoration:none }
.nb-lang b{ font-weight:800; font-size:.82rem; letter-spacing:.02em }
@media (max-width:520px){ .nb-lang b{ display:none } }

/* 영어로 보는데 그 강의 본문이 아직 한국어일 때 띄우는 한 줄 */
.nb-koronly{
  margin:0 0 1rem; padding:.55rem .85rem; border-radius:.5rem;
  border:1px solid var(--bs-warning-border-subtle,#ffe69c);
  background:var(--bs-warning-bg-subtle,#fff3cd);
  color:var(--bs-warning-text-emphasis,#664d03);
  font-size:.88rem;
}

/* ══════════════════════════════════════════════════════════
   TCGA 첫걸음에만 있는 것 (.tcga-*)
   공용 클래스는 고치지 않는다 — 스물몇 강의가 함께 쓴다.
   ══════════════════════════════════════════════════════════ */

/* 이 강의는 .gene-tg 를 <button> 으로 쓴다 — 누를 수 있게 매무새만 맞춘다 */
button.gene-tg{ cursor:pointer; background:var(--page); text-align:left; font-weight:700 }
button.gene-tg:hover{ filter:brightness(1.06) }
button.gene-tg.off{ text-decoration:none }

/* 위젯 안의 표는 강의 본문 표보다 촘촘하다 */
.w-panel .bio-tbl{ margin:.45rem 0 }
.w-panel .bio-tbl td.g{ white-space:normal }

/* 위젯 안에서 크게 띄우는 한 줄 (20강의 주장 문장) */
.w-panel .big-eq{ margin:.55rem 0; padding:.7rem .9rem; font-weight:700 }

/* 접수기관 · 문턱처럼 버튼이 여러 줄로 늘어설 때 앞의 이름표 */
.tcga-pickrow{ display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; margin-bottom:.35rem }
.tcga-pickrow>span:first-child{ font-size:.78rem; font-weight:800; color:var(--ink-2) }


/* ── 레슨 머리 — 눈높이 토글을 오른쪽에 앉힌다 ── */
.lh-top{ display:flex; align-items:center; justify-content:space-between;
  gap:.6rem; flex-wrap:wrap; margin-bottom:.65rem }
.lh-top .lh-no{ margin-bottom:0 }

/* ── 눈높이 토글 · 고등학생 풀이 ───────────
   강마다 오른쪽 위의 토글이 <html data-level> 을 바꾼다.
   기본은 'uni' — 그때 .cell-hs 는 아예 그려지지 않는다.
   ────────────────────────────────────────── */
.lvl-toggle{ display:inline-flex; background:var(--page); border:1px solid var(--line-2);
  border-radius:99px; padding:3px; gap:2px; flex:0 0 auto }
.lvl-btn{ border:0; background:transparent; color:var(--ink-3); font-weight:800;
  font-size:.78rem; letter-spacing:-.01em; padding:.26rem .82rem; border-radius:99px;
  white-space:nowrap; line-height:1.5; transition:background .18s, color .18s }
.lvl-btn:hover{ color:var(--ink-2) }
html[data-level="hs"]  .lvl-btn[data-level="hs"],
html[data-level="uni"] .lvl-btn[data-level="uni"]{
  background:var(--paper); color:var(--ink); box-shadow:0 1px 2px rgba(15,23,42,.12) }
html[data-level="hs"] .lvl-btn[data-level="hs"]{ color:var(--coral) }
[data-bs-theme="dark"] .lvl-btn[data-level]{ box-shadow:none }
html[data-bs-theme="dark"][data-level="hs"] .lvl-btn[data-level="hs"]{ color:#fdba74 }

html[data-level="uni"] .cell-hs{ display:none }
.cell-hs{ border:1px solid var(--coral); border-left-width:5px; border-radius:13px;
  background:var(--coral-s); padding:1.05rem 1.2rem }
.hs-h{ font-weight:800; font-size:.99rem; margin-bottom:.55rem;
  display:flex; align-items:center; gap:.5rem; flex-wrap:wrap }
.hs-badge{ background:var(--coral); color:#fff; font-size:.68rem; font-weight:900;
  padding:.14rem .5rem; border-radius:6px; letter-spacing:.02em; white-space:nowrap }
.hs-b{ font-size:.95rem; color:var(--ink-2) }
.hs-b p{ margin-bottom:.7rem } .hs-b p:last-child{ margin-bottom:0 }
.hs-b ul,.hs-b ol{ margin:.4rem 0 .7rem; padding-left:1.25rem }
.hs-b li{ margin-bottom:.35rem }
.hs-b b{ color:var(--ink) }
.hs-q{ font-weight:800; color:var(--ink); margin:.9rem 0 .35rem }
.hs-eq{ background:var(--paper); border:1px dashed var(--coral); border-radius:10px;
  padding:.7rem .9rem; margin:.7rem 0; font-weight:700; color:var(--ink); text-align:center }
.hs-b table{ width:100%; border-collapse:collapse; margin:.7rem 0; font-size:.88rem }
.hs-b th,.hs-b td{ border:1px solid var(--line); padding:.42rem .6rem; text-align:left }
.hs-b th{ background:var(--paper); font-weight:800; color:var(--ink) }
[data-bs-theme="dark"] .hs-eq,[data-bs-theme="dark"] .hs-b th{ background:rgba(255,255,255,.04) }


/* ══════════════════════════════════════════════════════════
   맞춤형 mRNA 암 백신 첫걸음에만 있는 것 (.mrna-*)
   공용 클래스는 고치지 않는다 — 스물몇 강의가 함께 쓴다.
   ══════════════════════════════════════════════════════════ */

/* 위젯 안의 낱말 배지가 여러 줄로 늘어설 때 줄간격을 준다 */
.w-panel .gene-tgs{ row-gap:.3rem }

/* 이 강의는 .gene-tg 를 <button> 으로도 <span> 으로도 쓴다 */
.w-panel span.gene-tg{ cursor:default }

/* 타임라인 — 지나간 단계는 흐리게 */
.w-panel .gl-row .gl-c{ text-align:center; font-weight:900; color:var(--mint) }
.w-panel .gl-row:not(.on) .gl-c{ color:var(--line-2) }

/* 주장 카드 — 고른 것을 보라 테두리로 표시한다 (JS 가 outline 을 건다) */
.w-panel .gc-item{ outline-offset:2px }
.w-panel .gc-item .gc-b i{ display:block; margin-top:.15rem; font-family:inherit;
  font-size:.72rem; line-height:1.55; color:var(--ink-2) }

/* 구조체 조립기 — 토막이 아홉 개라 조금 촘촘하게 */
.w-panel .gene-pipe .gp-step{ min-width:92px; padding:.42rem .6rem }
.w-panel .gene-pipe .gp-step b{ font-size:.8rem }
.w-panel .gene-pipe .gp-step span{ font-size:.64rem; word-break:break-all }

/* 코돈 고르개 — 한 줄에 여섯 개가 들어가야 한다 */
.w-panel .tcga-pickrow{ margin-bottom:.28rem }

/* 이 강의의 선그래프 — svgEl 은 .bio-svg 를 붙이므로 .gene-svg 규칙이 안 걸린다 */
.bio-svg .mrna-ln{ fill:none; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round }
.bio-svg .mrna-ax{ stroke:var(--line-2); stroke-width:1.2 }
.bio-svg .mrna-grid{ stroke:var(--line); stroke-width:1; stroke-dasharray:3 4 }
.bio-svg .mrna-thr{ stroke:var(--amber); stroke-width:1.6; stroke-dasharray:5 4 }
.bio-svg .mrna-n{ font-size:9.5px; fill:var(--ink-3); font-family:'JetBrains Mono',monospace }
.bio-svg .mrna-lb{ font-size:11px; font-weight:800; fill:var(--ink) }

/* ══════════════════════════════════════════════════════════
   /mct · /mct2 — 애완견 비만세포암 치료제 첫걸음. 이 두 강의만 쓰는 것.
   ══════════════════════════════════════════════════════════ */

/* 알갱이 점 — 탈과립 위젯 */
.mct-dots{ display:flex; flex-wrap:wrap; gap:.28rem; margin:.6rem 0 }
.mct-dots i{ width:13px; height:13px; border-radius:50%; display:block;
             transition:background .18s, opacity .18s, border-color .18s }

/* CIGAR 띠 — 리드가 참조 위에 어떻게 놓이나 */
.mct-cig{ display:flex; gap:2px; margin:.6rem 0; height:30px; border-radius:8px; overflow:hidden }
.mct-cig i{ display:flex; align-items:center; justify-content:center; font-style:normal;
            font-family:'JetBrains Mono',monospace; font-size:.66rem; font-weight:800;
            color:#fff; min-width:6px; letter-spacing:.02em }

/* 세로로 쌓은 리드 — pileup 위젯 (II 권) */
.mct-pile{ font-family:'JetBrains Mono',monospace; font-size:.72rem; line-height:1.45;
           background:var(--paper-2, var(--page)); border:1px solid var(--line);
           border-radius:10px; padding:.55rem .7rem; margin:.6rem 0; overflow-x:auto }
.mct-pile div{ white-space:pre }
.mct-pile b{ font-weight:800 }
.mct-pile .ref{ color:var(--ink-3) }
.mct-pile .alt{ color:var(--rose) }
.mct-pile .same{ color:var(--ink-3); opacity:.45 }

/* VCF 한 줄을 열로 나눠 보여 주기 (II 권) */
.mct-vcf{ display:flex; flex-wrap:wrap; gap:.3rem; margin:.6rem 0 }
.mct-vcf span{ font-family:'JetBrains Mono',monospace; font-size:.7rem; font-weight:700;
               border:1.5px solid var(--line); border-radius:8px; padding:.24rem .45rem;
               background:var(--page) }
.mct-vcf span i{ display:block; font-style:normal; font-size:.6rem; font-weight:600;
                 color:var(--ink-3); letter-spacing:.02em }
.mct-vcf span.on{ border-color:var(--blue); color:var(--blue) }
.mct-vcf span.hot{ border-color:var(--rose); color:var(--rose) }


/* ══════════════════════════════════════════════════════════
   /reag — mRNA 합성 시약 첫걸음. 이 강의만 쓰는 것 (.reag-*)
   공용 클래스는 고치지 않는다 — 여든몇 강의가 함께 쓴다.
   ══════════════════════════════════════════════════════════ */

/* 위젯 안의 낱말 배지가 여러 줄로 늘어설 때 줄간격을 준다 */
.w-panel .gene-tgs{ row-gap:.3rem }

/* 처방전 한 줄 — 시약 이름과 농도를 나란히 세운다 */
.reag-rx{ display:flex; flex-wrap:wrap; gap:.3rem; margin:.6rem 0 }
.reag-rx span{ font-family:'JetBrains Mono',monospace; font-size:.72rem; font-weight:700;
               border:1.5px solid var(--line); border-radius:8px; padding:.26rem .5rem;
               background:var(--page) }
.reag-rx span i{ display:block; font-style:normal; font-size:.62rem; font-weight:600;
                 color:var(--ink-3); letter-spacing:.02em }
.reag-rx span.on{ border-color:var(--blue); color:var(--blue) }
.reag-rx span.gap{ border-style:dashed; border-color:var(--rose); color:var(--rose) }

/* 시약통 — 부피 비율을 세로 막대 하나로 쌓아 보여 준다 */
.reag-vial{ display:flex; height:30px; border-radius:8px; overflow:hidden; margin:.6rem 0;
            border:1px solid var(--line) }
.reag-vial i{ display:flex; align-items:center; justify-content:center; font-style:normal;
              font-family:'JetBrains Mono',monospace; font-size:.64rem; font-weight:800;
              color:#fff; min-width:4px; letter-spacing:.02em; overflow:hidden }

/* 빈칸 표 — 20강. 채워진 칸과 빈 칸을 눈으로 가른다 */
.reag-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(78px,1fr));
            gap:.32rem; margin:.6rem 0 }
.reag-cell{ border:1.5px solid var(--line); border-radius:9px; padding:.35rem .4rem;
            text-align:center; font-size:.68rem; font-weight:700; background:var(--page) }
.reag-cell b{ display:block; font-size:.74rem; margin-bottom:.1rem }
.reag-cell.has{ border-color:var(--mint); color:var(--mint) }
.reag-cell.none{ border-style:dashed; border-color:var(--rose); color:var(--rose) }
