/* EF Study 2026-2 — 홈 · 과목 허브 · 예상문제 · 개념 지도 (atlas.css의 색 변수를 쓴다) */

.page { max-width: 960px; margin: 0 auto; padding: 0 16px 72px; }

/* ───── 홈 ───── */
.home-head { padding: 40px 0 8px; }
.wordmark { margin: 0; font-size: clamp(40px, 9vw, 64px); font-weight: 850; letter-spacing: -0.055em; line-height: .95; }
.wordmark .dots { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; transform: translateY(-4px); }
.wordmark .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.home-head .lead { margin: 14px 0 0; color: var(--ink-2); font-size: 16px; max-width: 34em; }

.exam-strip {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 28px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
@media (min-width: 760px) { .exam-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.exam-cell { background: var(--surface); padding: 14px 14px 13px; text-decoration: none; display: grid; gap: 2px; align-content: start; }
.exam-cell:hover { background: color-mix(in srgb, var(--subj) 6%, var(--surface)); }
.exam-cell .nm { font-size: 13.5px; font-weight: 700; color: var(--subj); }
.exam-cell .dd { font-size: 28px; font-weight: 850; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.exam-cell .dd.unk { color: var(--ink-3); font-weight: 700; font-size: 22px; padding: 3px 0; }
.exam-cell .when { font-size: 13px; color: var(--ink-2); }
.exam-cell .rng { font-size: 12.5px; color: var(--ink-3); }

.h2 { display: flex; align-items: baseline; gap: 10px; margin: 44px 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.h2 .aside { font-size: 13.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }

.subj-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 680px) { .subj-grid { grid-template-columns: 1fr 1fr; } }
.subj-card {
  position: relative; display: grid; gap: 14px; padding: 20px 20px 18px 24px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.subj-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--subj); }
.subj-card:hover { border-color: var(--subj); transform: translateY(-2px); }
.subj-card .t { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; }
.subj-card .m { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.subj-card .nums { display: flex; gap: 20px; flex-wrap: wrap; }
.subj-card .nums div { display: grid; }
.subj-card .nums b { font-size: 22px; font-weight: 800; color: var(--subj); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.2; }
.subj-card .nums span { font-size: 12.5px; color: var(--ink-3); }
.subj-card .nums .zero b { color: var(--ink-3); }

.map-card {
  display: grid; gap: 14px; grid-template-columns: 1fr; padding: 20px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
@media (min-width: 680px) { .map-card { grid-template-columns: 1fr auto; align-items: center; } }
.map-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.map-card .chips .chip { font-size: 14px; min-height: 36px; padding: 4px 14px; }

.arch { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.arch li { border-bottom: 1px solid var(--line); }
.arch a { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 13px 2px; text-decoration: none; }
@media (min-width: 680px) { .arch a { grid-template-columns: 200px 1fr auto; gap: 16px; align-items: baseline; } }
.arch a:hover .t { color: var(--focus); }
.arch .t { font-weight: 700; }
.arch .d { color: var(--ink-2); font-size: 14px; }
.arch .x { color: var(--ink-3); font-size: 13px; }
.foot { margin-top: 40px; color: var(--ink-3); font-size: 13px; }

/* ───── 과목 허브 ───── */
.hub-head { padding: 28px 0 0; }
.hub-head h1 { margin: 0; font-size: clamp(30px, 7vw, 44px); font-weight: 850; letter-spacing: -0.05em; line-height: 1.1; }
.hub-head h1::after { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--subj); margin-top: 12px; }
.hub-head .m { margin: 12px 0 0; color: var(--ink-2); }

.exam-box {
  margin-top: 20px; display: grid; gap: 10px 20px; grid-template-columns: 1fr; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
}
@media (min-width: 680px) { .exam-box { grid-template-columns: auto 1fr; } }
.exam-box .big { display: grid; align-content: start; }
.exam-box .big .dd { font-size: 34px; font-weight: 850; letter-spacing: -0.04em; line-height: 1.1; color: var(--subj); font-variant-numeric: tabular-nums; }
.exam-box .big .when { font-size: 14px; color: var(--ink-2); }
.exam-box.done .big .dd { color: var(--ink-3); }
.exam-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; }
.exam-box dt { color: var(--ink-3); font-size: 13.5px; padding-top: 1px; }
.exam-box dd { margin: 0; }

.hub-nav {
  position: sticky; top: 61px; z-index: 20; margin: 18px -16px 0; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.hub-nav::-webkit-scrollbar { display: none; }
.hub-nav a { flex: none; font-size: 14.5px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-2); }
.hub-nav a b { color: var(--subj); margin-left: 4px; font-variant-numeric: tabular-nums; }
.hub-nav a:hover { border-color: var(--subj); }

.sec { scroll-margin-top: 120px; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -0.035em; }
.sec-h .aside { font-size: 13.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.sec-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.grp-h { margin: 22px 0 4px; font-size: 14px; font-weight: 750; color: var(--subj); }

/* 접는 절(애니메이션 목록) — 절 막대 + 장·묶음 */
.fold > summary, .grp > summary { list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fold > summary::-webkit-details-marker, .grp > summary::-webkit-details-marker { display: none; }
.fold > summary {
  margin-top: 24px; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
}
.fold > summary:hover { border-color: var(--subj); }
.fold > summary .sec-h { margin: 0; flex: 1; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.fold .tog { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--subj); white-space: nowrap; }
.fold .tog::before { content: "펼치기"; }
.fold[open] > summary .tog::before { content: "접기"; }
.fold .tog::after, .grp > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transition: transform .15s;
}
.fold .tog::after { transform: translateY(-2px) rotate(45deg); }
.fold[open] > summary .tog::after { transform: translateY(2px) rotate(-135deg); }
.fold-body { padding-top: 12px; }
.fold-acts { display: flex; gap: 8px; margin: 0 0 8px; }
.fold-acts .btn { min-height: 36px; font-size: 14px; padding: 0 14px; }
.grp-list { border-top: 1px solid var(--line); }
.grp { border-bottom: 1px solid var(--line); }
.grp > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 4px; }
.grp > summary::before { color: var(--ink-3); margin: 0 3px 0 1px; transform: rotate(-45deg); }
.grp[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.grp > summary .t { flex: 1; min-width: 0; font-size: 15px; font-weight: 750; color: var(--subj); }
.grp > summary:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.grp > summary .x { color: var(--exam); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.grp > summary .n { color: var(--ink-3); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grp .viz-list { margin: 0 0 8px 20px; }
.grp .viz-list li:last-child { border-bottom: 0; }

.viz-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.viz-list li { border-bottom: 1px solid var(--line); }
.viz-list a { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 12px 2px; text-decoration: none; }
.viz-list a:hover .t { color: var(--subj); }
.viz-list .t { font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; }
.viz-list .d { grid-column: 1; color: var(--ink-2); font-size: 14px; }
.viz-list .r { grid-row: 1 / span 2; grid-column: 2; display: grid; justify-items: end; align-content: center; gap: 3px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.viz-list .r .x { color: var(--exam); font-weight: 700; }
.viz-list .r .sh { border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font-size: 12px; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 680px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.qcard {
  display: grid; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow); text-decoration: none;
}
.qcard .t { font-weight: 750; font-size: 17px; letter-spacing: -0.025em; }
.qcard .d { color: var(--ink-2); font-size: 14px; }
.qcard .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: flex; }
.qcard .bar i { display: block; height: 100%; }
.qcard .bar .ok { background: var(--ok); } .qcard .bar .bad { background: var(--bad); }
.qcard .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; cursor: pointer; font-size: 15px;
}
.btn:hover { border-color: var(--subj); }
.btn.primary { background: var(--subj); color: var(--surface); border-color: var(--subj); font-weight: 700; }
.btn:disabled { opacity: .4; cursor: default; }
a.qcard.link:hover { border-color: var(--subj); }
.empty { padding: 16px 18px; border: 1px dashed var(--line); border-radius: var(--r-l); color: var(--ink-3); font-size: 14.5px; }
.notes { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; display: grid; gap: 6px; }
.notes b { color: var(--ink); }

/* ───── 예상문제 ───── */
.qz-head { padding: 22px 0 4px; }
.qz-head h1 { margin: 0; font-size: clamp(22px, 5vw, 30px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.25; }
.qz-head .m { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.qz-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; align-items: center; }
.qz-filters .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.qz-card {
  margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow); padding: 18px 18px 20px;
}
.qz-card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-3); }
.qz-card .meta .n { font-weight: 800; color: var(--subj); font-variant-numeric: tabular-nums; }
.qz-card .meta .tg { border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.qz-card .meta .tg.ex { border-color: var(--exam); color: var(--exam); }
.qz-card .meta .st-ok { color: var(--ok); font-weight: 700; } .qz-card .meta .st-bad { color: var(--bad); font-weight: 700; }
.qz-q { margin: 12px 0 0; font-size: 18px; line-height: 1.6; font-weight: 600; letter-spacing: -0.01em; white-space: pre-line; }
.qz-hint { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }
.qz-choices { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.qz-choices button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: baseline;
  padding: 11px 12px; min-height: 48px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--stage);
  cursor: pointer; font-size: 16px; line-height: 1.5;
}
.qz-choices button .k { font-weight: 800; color: var(--ink-3); }
.qz-choices button[aria-pressed="true"] { border-color: var(--subj); background: color-mix(in srgb, var(--subj) 10%, var(--stage)); }
.qz-choices button[aria-pressed="true"] .k { color: var(--subj); }
.qz-choices button .mk { font-size: 13px; font-weight: 800; white-space: nowrap; }
.qz-choices button.right { border-color: var(--ok); }
.qz-choices button.right .mk { color: var(--ok); }
.qz-choices button.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--stage)); }
.qz-choices button.wrong .mk { color: var(--bad); }
.qz-choices button.missed { border-style: dashed; border-color: var(--ok); }
.qz-choices button.missed .mk { color: var(--ok); }
.qz-choices button:disabled { cursor: default; color: inherit; }
.qz-input { margin-top: 14px; display: flex; gap: 8px; }
.qz-input input, .qz-input textarea {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: var(--r-m);
  border: 1.5px solid var(--line); background: var(--stage); color: var(--ink);
}
.qz-input textarea { min-height: 110px; resize: vertical; }
.qz-input.col { flex-direction: column; }
.qz-acts { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.qz-res { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); }
.qz-res .verdict { font-weight: 800; font-size: 16px; }
.qz-res .verdict.ok { color: var(--ok); } .qz-res .verdict.bad { color: var(--bad); } .qz-res .verdict.half { color: var(--exam); }
.qz-res .ans { margin-top: 6px; font-size: 15.5px; }
.qz-res .ans b { font-weight: 700; }
.qz-res .exp { margin-top: 10px; font-size: 15.5px; line-height: 1.7; }
.qz-res .exp p { margin: 0 0 8px; } .qz-res .exp ul { margin: 4px 0 8px; padding-left: 20px; }
.qz-res .exp .key { font-weight: 700; }
.qz-res .pts { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.qz-res .pts label { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.qz-res .pts input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--subj); }
.qz-res .links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.qz-res .note { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.qz-nav {
  position: sticky; bottom: 0; z-index: 20; margin: 16px -16px 0; padding: 10px 16px calc(10px + var(--safe-b));
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.qz-nav .mid { text-align: center; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.qz-nav .big { height: 48px; min-width: 64px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 15px; padding: 0 16px; }
.qz-nav .big.primary { background: var(--subj); color: var(--surface); border-color: var(--subj); font-weight: 700; }
.qz-nav .big:disabled { opacity: .35; cursor: default; }
.qz-list { margin-top: 20px; }
.qz-list summary { cursor: pointer; color: var(--ink-2); font-size: 14.5px; padding: 6px 0; }
.qz-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qz-dots button {
  min-width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.qz-dots button.ok { border-color: var(--ok); color: var(--ok); font-weight: 700; }
.qz-dots button.bad { border-color: var(--bad); color: var(--bad); font-weight: 700; }
.qz-dots button.half { border-color: var(--exam); color: var(--exam); font-weight: 700; }
.qz-dots button.cur { background: var(--subj); color: var(--surface); border-color: var(--subj); }
.qz-done { margin-top: 14px; padding: 22px 18px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.qz-done .score { font-size: 40px; font-weight: 850; letter-spacing: -0.04em; color: var(--subj); }

/* ───── 개념 지도 ───── */
.map-page { display: grid; grid-template-rows: auto 1fr; height: calc(100dvh - 61px); }
.map-bar { padding: 10px 16px 8px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); background: var(--bg); }
.map-bar .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.map-bar input[type="search"] {
  font: inherit; font-size: 15px; padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); width: min(280px, 100%);
}
.map-bar .groups { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.map-bar .groups::-webkit-scrollbar { display: none; }
.map-bar .groups .chip { flex: none; }
.map-bar .groups .chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.map-bar .groups .chip.off { opacity: .45; text-decoration: line-through; }
.map-main { position: relative; min-height: 0; overflow: hidden; background: var(--stage); }
.map-main canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.map-main canvas.drag { cursor: grabbing; }
.map-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12.5px; color: var(--ink-3); pointer-events: none; }
.map-zoom { position: absolute; left: 12px; top: 10px; display: grid; gap: 6px; }
.map-zoom button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; }
.sugg { position: absolute; z-index: 40; margin-top: 4px; min-width: 240px; max-width: min(360px, 90vw); max-height: 50dvh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); list-style: none; padding: 4px; }
.sugg button { width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; display: grid; gap: 1px; }
.sugg button:hover, .sugg button.cur { background: var(--surface-2); }
.sugg .g { font-size: 12px; color: var(--ink-3); }

.node-panel {
  position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: auto; overscroll-behavior: contain;
  left: 0; right: 0; bottom: 0; max-height: 58%; border-radius: var(--r-l) var(--r-l) 0 0; padding: 14px 16px calc(16px + var(--safe-b));
}
@media (min-width: 860px) {
  .node-panel { left: auto; top: 12px; right: 12px; bottom: 12px; width: 380px; max-height: none; border-radius: var(--r-l); }
}
.node-panel[hidden] { display: none; }
.node-panel .close { position: sticky; top: 0; float: right; }
.node-panel .grp { font-size: 13px; color: var(--subj); font-weight: 700; }
.node-panel h2 { margin: 2px 0 6px; font-size: 22px; letter-spacing: -0.03em; line-height: 1.25; }
.node-panel .def { margin: 0; font-size: 15.5px; line-height: 1.7; }
.node-panel .src { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.node-panel .src span { font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line); padding: 1px 8px; border-radius: 999px; }
.node-panel h3 { margin: 16px 0 6px; font-size: 13.5px; color: var(--ink-3); font-weight: 700; }
.node-panel .rel { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.node-panel .rel button { width: 100%; text-align: left; border: 0; background: none; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 15px; display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; }
.node-panel .rel button:hover { background: var(--surface-2); }
.node-panel .rel .how { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.node-panel .links { display: grid; gap: 6px; }
.node-panel .links a { font-size: 15px; padding: 8px 10px; border-radius: var(--r-m); border: 1px solid var(--line); text-decoration: none; display: grid; gap: 1px; }
.node-panel .links a:hover { border-color: var(--subj); }
.node-panel .links a small { color: var(--ink-3); font-size: 12.5px; }
.map-bar .groups .chip, .map-bar .groups .chip[aria-pressed="true"] { background: var(--surface); color: var(--ink-2); border-color: var(--line); }

/* ───── 유기: 반응 카드 · 명명법 · 연습문제 ───── */
.rx-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.rx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 14px 16px 16px; }
.rx-card .hd { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.rx-card .sec { font-size: 12.5px; color: var(--ink-3); }
.rx-card .nm { font-size: 17.5px; font-weight: 750; letter-spacing: -0.02em; }
.rx-card .nm small { font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.rx-card .tg { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--ink-2); }
.rx-card .tg.ex { border-color: var(--exam); color: var(--exam); font-weight: 700; }
.scheme { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding: 8px 6px; background: var(--stage); border: 1px solid var(--line); border-radius: var(--r-m); }
.scheme .sp { display: grid; justify-items: center; gap: 2px; }
.scheme .sp svg { width: var(--w, 120px); max-width: 42vw; height: auto; }
.scheme .sp .lb { font-size: 12.5px; color: var(--ink-2); text-align: center; max-width: 180px; }
.scheme .sp .tx { font-size: 17px; font-weight: 650; padding: 6px 4px; }
.scheme .plus { font-size: 20px; color: var(--ink-3); }
.scheme .arr { display: grid; justify-items: center; min-width: 110px; flex: 0 1 auto; }
.scheme .arr .rg { font-size: 14px; text-align: center; line-height: 1.35; padding: 0 4px 3px; }
.scheme .arr .cd { font-size: 12.5px; color: var(--ink-2); text-align: center; padding-top: 3px; }
.scheme .arr .ln { width: 100%; min-width: 100px; height: 2px; background: var(--ink); position: relative; }
.scheme .arr .ln::after { content: ""; position: absolute; right: -1px; top: -5px; border: 6px solid transparent; border-left: 10px solid var(--ink); border-right: 0; }
.hide-btn { border: 1.5px dashed var(--subj); background: color-mix(in srgb, var(--subj) 6%, var(--stage)); color: var(--subj); border-radius: var(--r-m); padding: 10px 14px; font-weight: 700; cursor: pointer; min-height: 44px; }
.rx-card dl { margin: 10px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 15px; }
.rx-card dt { color: var(--ink-3); font-size: 13px; padding-top: 2px; white-space: nowrap; }
.rx-card dd { margin: 0; line-height: 1.6; }
.rx-card .links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.nm-struct { display: grid; place-items: center; margin-top: 12px; padding: 12px; background: var(--stage); border: 1px solid var(--line); border-radius: var(--r-m); }
.nm-struct svg.molsvg { width: min(340px, 80vw); max-height: 300px; height: auto; }
.nm-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.nm-picks button { background: var(--stage); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 8px; cursor: pointer; display: grid; place-items: center; min-height: 120px; }
.nm-picks button svg { width: 100%; max-width: 220px; height: auto; }
.nm-picks button.right { border-color: var(--ok); } .nm-picks button.wrong { border-color: var(--bad); }
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 12px 14px 14px; }
.ex-card .hd { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ex-card .no { font-weight: 800; font-size: 17px; color: var(--subj); font-variant-numeric: tabular-nums; }
.ex-card .cat { font-size: 13px; color: var(--ink-3); }
.ex-card .imgs { margin-top: 8px; display: grid; gap: 4px; background: #fff; border-radius: var(--r-m); padding: 6px; }
.ex-card .imgs img { width: 100%; height: auto; display: block; }
.sor-toc { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.sor-toc summary { cursor: pointer; color: var(--subj); font-weight: 650; min-height: 32px; display: flex; align-items: center; }
.sor-toc ul { margin: 4px 0 0; padding: 0; list-style: none; columns: 2 260px; column-gap: 18px; }
.sor-toc li { padding-left: 1.4em; break-inside: avoid; } .sor-toc li.lv1 { padding-left: 0; font-weight: 700; color: var(--ink); margin-top: 4px; }
.sor-card .imgs a { display: block; } .sor-card .imgs img { margin: 0 auto 0 0; }
.nt-legend { margin: 10px 0 0; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.nt-legend .tg { margin-left: 6px; } .nt-legend .tg:first-child { margin-left: 0; }
.nt .tg { display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1.5; padding: 0 7px; border-radius: 999px; border: 1px solid currentColor; vertical-align: 1px; margin-right: 3px; white-space: nowrap; }
.nt .tg.bk { color: var(--bio); } .nt .tg.pf { color: var(--exam); } .nt .tg.fx { color: var(--bad); }
.nt .rg { display: inline-block; font-size: 13.5px; font-weight: 650; color: var(--subj); background: var(--surface-2); border-radius: var(--r-s); padding: 0 7px; margin: 1px 2px; }
.nt .rg::before { content: "→ "; color: var(--ink-3); font-weight: 400; } .nt .rg::after { content: " →"; color: var(--ink-3); font-weight: 400; }
.nt-fixes { margin: 12px 0 0; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: var(--r-m); padding: 6px 14px 8px; font-size: 14.5px; line-height: 1.6; }
.nt-fixes summary { cursor: pointer; font-weight: 750; min-height: 32px; display: flex; align-items: center; }
.nt-fixes ol { margin: 4px 0 0; padding-left: 1.3em; } .nt-fixes li { margin: 3px 0; }
.nt-ch { margin-top: 14px; scroll-margin-top: 70px; }
.nt-ch h3 { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 750; color: var(--subj); scroll-margin-top: 70px; }
.nt-ch .hd + h3 { border-top: 0; padding-top: 4px; }
.nt-ch ul, .nt-ch ol { margin: 0; padding-left: 1.25em; font-size: 15px; line-height: 1.7; }
.nt-ch li { margin: 4px 0; } .nt-ch li ol { margin-top: 2px; }
.nt-ch li.nt-fx { list-style: none; margin-left: -1.25em; padding: 6px 10px; border-left: 3px solid var(--bad); background: var(--surface-2); border-radius: 0 var(--r-s) var(--r-s) 0; scroll-margin-top: 70px; }
.nt-ch .nt-fx s { color: var(--ink-3); }
.nt-tbw { overflow-x: auto; margin: 8px 0 4px; }
.nt-tb { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.nt-tb th, .nt-tb td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; vertical-align: top; }
.nt-tb th { background: var(--surface-2); font-weight: 700; } .nt-tb td:first-child { color: var(--ink-2); white-space: nowrap; }
.nt-foot { margin: 18px 0 30px; font-size: 14px; color: var(--ink-2); }
.ag { scroll-margin-top: 64px; padding-bottom: 30px; }
.ag-prog { margin: 14px 0 8px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; } .ag-prog b { color: var(--ink); } .ag-prog .src { color: var(--ink-3); }
.ag-img { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.ag-img img { display: block; width: 100%; height: auto; }
.ag-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
@media (max-width: 600px) { .ag-opts { grid-template-columns: 1fr; gap: 6px; } }
.ag-opt { display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 9px 12px; min-height: 50px; cursor: pointer; }
.ag-opt .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 13px; display: grid; place-items: center; }
.ag-opt:hover:not(:disabled) { border-color: var(--subj); }
.ag-opt:disabled { cursor: default; opacity: .75; }
.ag-opt.ok, .ag-opt.bad { opacity: 1; } .ag-opt.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, var(--surface)); } .ag-opt.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, var(--surface)); }
.ag-opt.ok .n { background: var(--ok); color: var(--surface); } .ag-opt.bad .n { background: var(--bad); color: var(--surface); }
.ag-after { min-height: 40px; margin-top: 8px; font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ag-end { margin-top: 14px; } .ag-end h2 { margin: 0 0 6px; font-size: 20px; } .ag-end .m { margin: 6px 0 2px; color: var(--ink-3); font-size: 13px; }
.ag-end ul { margin: 0 0 10px; padding-left: 1.2em; line-height: 1.7; font-size: 14.5px; }
@media (max-width: 600px) { .sor-card .imgs img { width: 100% !important; } }
.ex-ans { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-2); font-size: 15.5px; line-height: 1.7; }
.ex-ans .part { padding: 6px 0; border-top: 1px solid var(--line); }
.ex-ans .part:first-child { border-top: 0; }
.ex-ans .lbl { font-weight: 800; color: var(--subj); margin-right: 6px; }
.ex-ans .structs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ex-ans .structs .sp { background: var(--stage); border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: grid; justify-items: center; }
.ex-ans .structs svg { width: var(--w, 120px); max-width: 40vw; height: auto; }
.ex-ans .structs .lb { font-size: 12.5px; color: var(--ink-2); }

/* ───── 생화학: 아미노산 ───── */
.aa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.aa-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--tone, var(--line)); border-radius: var(--r-l); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.aa-card.tone-a { --tone: var(--t-a); } .aa-card.tone-c { --tone: var(--t-c); } .aa-card.tone-d { --tone: var(--t-d); } .aa-card.tone-e { --tone: var(--t-e); } .aa-card.tone-g { --tone: var(--t-g); }
.aa-card .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.aa-card .nm { font-weight: 800; font-size: 18px; } .aa-card .en { color: var(--ink-2); font-size: 14px; }
.aa-card .st { background: var(--stage); border-radius: var(--r-m); display: grid; place-items: center; padding: 6px; }
.aa-card .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.aa-card .tg { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--ink-2); }
.aa-card .tg.cls { border-color: var(--subj); color: var(--subj); font-weight: 700; }
.aa-card .pk { margin: 0; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 2px 8px; font-size: 13px; }
.aa-card .pk dd { white-space: nowrap; }
.aa-card .pk dt { color: var(--ink-3); } .aa-card .pk dd { margin: 0; font-variant-numeric: tabular-nums; }
.aa-card .memo { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.aa-card .quote { font-size: 13.5px; margin-top: 0; }

[hidden] { display: none !important; }
@media (max-width: 760px) {
  .map-bar .groups { flex-wrap: wrap; overflow-x: visible; }
  .map-hint { left: 50%; transform: translateX(-50%); bottom: 8px; width: max-content; max-width: calc(100% - 24px); padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--line); text-align: center; font-size: 12px; }
}

/* ───── 시험 정리 (examnote.js) ───── */
.exnote { margin-top: 14px; font-size: 15.5px; line-height: 1.7; }
.exnote .en-h { font-size: 17px; font-weight: 800; color: var(--subj); margin: 22px 0 6px; }
.exnote h3.en-h { font-size: 15.5px; color: var(--ink); }
.exnote .en-ul { margin: 4px 0 8px; padding-left: 20px; }
.exnote .en-ul .en-ul { margin: 2px 0 4px; }
.exnote li { margin: 2px 0; }
.exnote p { margin: 6px 0; }
.exnote code { font-size: 0.92em; background: var(--surface-2); padding: 0 4px; border-radius: 4px; overflow-wrap: anywhere; }
.exnote .quote { margin: 8px 0; }

/* ───── 정리 페이지 (notepage.js) ───── */
.np-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.np-sec { margin-top: 24px; scroll-margin-top: 70px; }
.np-h { font-size: 18px; font-weight: 800; color: var(--subj); margin: 0 0 10px; letter-spacing: -0.02em; }
.np-tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
.np-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-size: 14px; line-height: 1.55; }
.np-table td.wide { min-width: 220px; }
.np-table th, .np-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.np-table thead th { background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.02em; white-space: nowrap; }
.np-table tbody tr:last-child > * { border-bottom: 0; }
.np-table tbody tr:not(.np-grp):hover > * { background: color-mix(in srgb, var(--subj) 4%, var(--surface)); }
.np-table tbody th { color: var(--ink); font-weight: 800; font-size: 15px; white-space: nowrap; }
.np-table tbody th.wrap { white-space: normal; min-width: 240px; }
.np-table tbody th .np-s { font-weight: 600; }
.np-table tr.np-grp td { background: color-mix(in srgb, var(--subj) 9%, var(--surface)); border-left: 4px solid var(--subj); padding: 9px 14px; }
.np-gt { font-weight: 800; color: var(--subj); font-size: 15px; margin-right: 10px; }
.np-gs { font-size: 13px; color: var(--ink-2); }
.np-table td.pt { font-weight: 800; color: var(--subj); font-size: 15px; }
.np-table td.c { text-align: center; } .np-table td.c .np-bs { justify-content: center; }
.np-table td.nw { white-space: nowrap; }
.np-bs { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.np-b { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; font-size: 14px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; border: 1.5px solid transparent; }
.np-b.neg { color: var(--micro); background: color-mix(in srgb, var(--micro) 14%, var(--surface)); border-color: color-mix(in srgb, var(--micro) 45%, transparent); font-size: 18px; }
.np-b.pos { color: var(--cell); background: color-mix(in srgb, var(--cell) 14%, var(--surface)); border-color: color-mix(in srgb, var(--cell) 45%, transparent); font-size: 18px; }
.np-b.st { color: var(--ink); background: var(--surface-2); border-color: var(--line); }
.np-b.atp { color: var(--ink); background: color-mix(in srgb, var(--phos) 30%, var(--surface)); border-color: color-mix(in srgb, var(--phos) 60%, transparent); font-size: 12.5px; }
.np-b.pmf { color: var(--ink); background: color-mix(in srgb, var(--dna-2) 22%, var(--surface)); border-color: color-mix(in srgb, var(--dna-2) 55%, transparent); font-size: 12.5px; }
.np-b.q { color: var(--ink-3); background: transparent; border: 1.5px dashed var(--line); }
.np-t { display: block; }
.np-bs + .np-t { margin-top: 4px; }
.np-s { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }
.np-ref { color: var(--ink-3); font-size: 0.88em; }
.np-note { font-size: 13.5px; color: var(--ink-2); margin: 10px 2px 0; line-height: 1.6; }
.np-ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.7; }
.np-ul li + li { margin-top: 3px; }
.np-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.np-fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.np-fig.wide { grid-column: 1 / -1; }
.np-fig img { display: block; width: 100%; height: auto; background: #fff; }
.np-fig figcaption { padding: 8px 10px 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 760px) {
  .np-tw { overflow: visible; border: 0; background: none; box-shadow: none; }
  .np-table, .np-table tbody, .np-table tr, .np-table th, .np-table td { display: block; width: auto; min-width: 0 !important; }
  .np-table thead { display: none; }
  .np-table tr.np-grp { margin: 16px 0 8px; }
  .np-table tr.np-grp td { border-radius: var(--r-m); }
  .np-table tbody tr:not(.np-grp) { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 10px; padding: 6px 12px 8px; box-shadow: var(--shadow); }
  .np-table tbody tr:not(.np-grp) > * { flex: 1 1 100%; }
  .np-table tbody tr:not(.np-grp) > td.c { flex-basis: 50%; grid-template-columns: 44px 1fr; }
  .np-table tbody tr:not(.np-grp) > * { border-bottom: 1px dashed var(--line); padding: 7px 0; }
  .np-table tbody tr:not(.np-grp) > *:last-child { border-bottom: 0; }
  .np-table tbody th { font-size: 17px; white-space: normal; }
  .np-table tbody th .np-t { display: inline; }
  .np-table tbody th .np-s { display: inline; margin-left: 6px; }
  .np-table td { display: grid; grid-template-columns: 74px 1fr; column-gap: 10px; align-items: start; }
  .np-table td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--ink-3); padding-top: 3px; }
  .np-table tr.np-grp td { display: block; }
  .np-table tr.np-grp td::before { content: none; }
  .np-gt { display: block; margin: 0 0 2px; }
  .np-table td > * { grid-column: 2; }
  .np-table td.c { text-align: left; } .np-table td.c .np-bs { justify-content: flex-start; }
  .np-table tbody tr:not(.np-grp):hover > * { background: none; }
}
/* 개념 나무 (tree.html) */
.tree-page { max-width: 1100px; }
.tr-chs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tr-chs .chip { font-size: 15px; min-height: 38px; padding: 4px 16px; font-weight: 700; }
.tr-chs .chip b { font-weight: 800; color: var(--exam); }
.tr-chs .chip[aria-pressed="true"] b { color: inherit; }
.tr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.tr-bar input[type="search"] { flex: 1 1 180px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink); }
.tr-bar .chip { min-height: 40px; padding: 0 14px; font-size: 14.5px; }
.tr-title { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; margin: 22px 0 10px; }
ol.tr { list-style: none; margin: 0; padding: 0 0 0 24px; }
ol.tr-root { padding: 0; display: grid; gap: 12px; }
.tr-li { position: relative; }
ol.tr:not(.tr-root) > .tr-li::before { content: ''; position: absolute; left: -15px; top: 0; bottom: 0; border-left: 1.5px solid var(--line); }
ol.tr:not(.tr-root) > .tr-li:last-child::before { bottom: auto; height: 21px; }
ol.tr:not(.tr-root) > .tr-li::after { content: ''; position: absolute; left: -15px; top: 21px; width: 12px; border-top: 1.5px solid var(--line); }
ol.tr-root > .tr-li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 6px 14px 10px; box-shadow: var(--shadow); }
.tr-row { display: flex; align-items: baseline; gap: 6px; width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; padding: 9px 4px 7px 0; border-radius: 8px; }
button.tr-row { cursor: pointer; }
button.tr-row:hover .tr-l { color: var(--subj); }
.tr-ar { flex: none; width: 14px; color: var(--ink-3); font-size: 13px; }
.tr-ar::before { content: '•'; }
button.tr-row[aria-expanded="false"] .tr-ar::before { content: '▸'; }
button.tr-row[aria-expanded="true"] .tr-ar::before { content: '▾'; }
.tr-m { flex: 1 1 auto; min-width: 0; }
.tr-m > span + span:not(.tr-n) { margin-left: 7px; }
.tr-l { font-size: 15.5px; line-height: 1.45; }
.d1 > .tr-row .tr-l { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: var(--subj); }
.d2.br > .tr-row .tr-l { font-weight: 750; font-size: 16.5px; }
.d3.br > .tr-row .tr-l, .d4.br > .tr-row .tr-l { font-weight: 700; }
.tr-n { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.tr-x { display: inline-block; vertical-align: 2px; font-size: 11.5px; font-weight: 800; color: var(--exam); border: 1px solid var(--exam); border-radius: 999px; padding: 0 7px; }
.tr-c, .tr-k { display: inline-block; vertical-align: 2px; font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.tr-k { border-style: dashed; }
.tr-li.hit > .tr-row .tr-l { background: color-mix(in srgb, var(--exam) 16%, transparent); border-radius: 4px; }
.tr-li.flash > .tr-row { animation: trflash 1.6s ease-out; }
@keyframes trflash { 0%, 40% { background: color-mix(in srgb, var(--subj) 22%, transparent); } 100% { background: transparent; } }
.tr-body { margin: 2px 0 10px 20px; display: grid; gap: 10px; }
.tr-def { margin: 0; font-size: 15px; line-height: 1.7; }
.tr-src { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-src span { font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line); padding: 1px 8px; border-radius: 999px; }
.tr-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.tr-fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.tr-fig button { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.tr-fig img { display: block; width: 100%; height: auto; }
.tr-fig figcaption { padding: 7px 10px 9px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.tr-fig figcaption b { color: var(--ink-3); font-weight: 700; margin-right: 2px; }
.tr-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-links:empty { display: none; }
.tr-a { display: grid; gap: 1px; font-size: 14.5px; padding: 7px 11px; border-radius: var(--r-m); border: 1px solid var(--line); text-decoration: none; background: var(--surface); max-width: 100%; }
.tr-a:hover { border-color: var(--subj); }
.tr-a small { color: var(--ink-3); font-size: 12px; }
.tr-a.viz { border-left: 3px solid var(--subj); }
.tr-a.quiz { border-left: 3px solid var(--exam); }
.tr-more { font-size: 12.5px; color: var(--ink-3); align-self: center; }
.tr-see { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-3); }
.tr-see .chip { font-size: 13px; }
.tr-map { font-size: 13px; color: var(--ink-3); }
.tr-lb { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 16, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.tr-lb img { max-width: 100%; max-height: calc(100vh - 130px); background: #fff; border-radius: 6px; cursor: pointer; }
.tr-lb-cap { margin: 0; color: #f2f2f2; font-size: 14.5px; text-align: center; max-width: 900px; line-height: 1.5; }
.tr-lb-acts { display: flex; gap: 8px; }
@media (max-width: 640px) {
  ol.tr:not(.tr-root) { padding-left: 18px; }
  ol.tr:not(.tr-root) > .tr-li::before, ol.tr:not(.tr-root) > .tr-li::after { left: -12px; }
  ol.tr:not(.tr-root) > .tr-li::after { width: 9px; }
  ol.tr-root > .tr-li { padding: 4px 10px 8px; }
  .tr-body { margin-left: 4px; }
  .tr-figs { grid-template-columns: 1fr; }
}
@media print {
  .top, .tr-bar, .tr-chs, .tr-map, .tr-lb { display: none !important; }
  ol.tr-root > .tr-li { box-shadow: none; break-inside: avoid-page; }
  .tr-fig { break-inside: avoid; }
}

/* 마인드맵 (mindmap.html) — 왼쪽 큰 주제에서 오른쪽으로 꺾인 가지, 설명 상자는 점선 화살표 */
.mm-page { max-width: none; }
.mm-head h1 { font-size: 26px; margin: 6px 0 2px; letter-spacing: -0.03em; }
.mm-head .m { margin: 0; color: var(--ink-2); font-size: 14px; }
.mm-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.mm-view { position: relative; height: calc(100dvh - 90px); min-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); cursor: grab; overscroll-behavior: contain; }
.mm-view.drag { cursor: grabbing; user-select: none; }
.mm-sizer { position: relative; }
.mm-stage { position: absolute; left: 24px; top: 24px; transform-origin: 0 0; }
.mm-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mm-links path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mm-root, .mm-lab, .mm-box { position: absolute; left: 0; top: 0; transition: transform .35s ease, opacity .25s ease; }
.mm-root.new, .mm-lab.new, .mm-box.new { opacity: 0; transition: none; }
.mm-root { box-sizing: border-box; border: 3px solid var(--subj); border-radius: 14px; padding: 12px 14px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 4px; }
.mm-root span { font-size: 13px; font-weight: 800; color: var(--subj); }
.mm-root b { font-size: 17px; line-height: 1.35; letter-spacing: -0.02em; }
.mm-lab { box-sizing: border-box; display: flex; align-items: flex-end; gap: 6px; padding: 3px 2px 5px 2px; border-bottom: 3px solid var(--b); font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.mm-lab[role="button"] { cursor: pointer; }
.mm-lab[role="button"]:hover .mm-lt { color: var(--b); }
.mm-lab.d1 { font-size: 16.5px; font-weight: 800; color: var(--b); border-bottom-width: 3.5px; }
.mm-lab.d3 { font-size: 14px; font-weight: 650; border-bottom-width: 2.2px; }
.mm-lab.concept { font-weight: 600; border-bottom-style: solid; }
.mm-lab .mm-lt { flex: 1; min-width: 0; }
.mm-lab.hit { background: color-mix(in srgb, var(--exam) 20%, transparent); border-radius: 6px 6px 0 0; }
.mm-tog { flex: none; font-size: 12px; font-weight: 800; min-width: 28px; height: 20px; line-height: 20px; padding: 0 6px; border-radius: 999px; text-align: center; color: var(--b); background: color-mix(in srgb, var(--b) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--b) 40%, transparent); }
.mm-lab.open .mm-tog { background: transparent; }
.mm-x { flex: none; font-size: 11px; font-weight: 800; color: var(--exam); border: 1px solid color-mix(in srgb, var(--exam) 55%, transparent); border-radius: 999px; padding: 0 6px; line-height: 18px; }
.mm-box { box-sizing: border-box; background: var(--surface); border: 1px solid color-mix(in srgb, var(--b) 30%, var(--line)); border-left: 4px solid var(--b); border-radius: 10px; padding: 8px 10px 10px; font-size: 13.5px; line-height: 1.5; box-shadow: var(--shadow); }
.mm-n { margin: 0 0 4px; font-weight: 650; color: var(--ink); }
.mm-def { margin: 0 0 4px; color: var(--ink-2); }
.mm-fig { display: block; width: 100%; padding: 0; margin: 8px 0 2px; border: 0; background: none; text-align: left; cursor: zoom-in; color: inherit; font: inherit; }
.mm-fig img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.mm-fig span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.mm-viz { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mm-viz a { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--subj); text-decoration: none; background: var(--surface-2); }
.mm-more { display: inline-block; margin-top: 6px; font-size: 12.5px; color: var(--subj); }
@media (max-width: 719px) {
  .mm-head h1 { font-size: 22px; }
  .mm-lab { font-size: 13.5px; } .mm-lab.d1 { font-size: 15px; }
  .mm-box { font-size: 12.5px; }
}

/* 생화학1 염기 구조와 변화 (생화학1/bases.html) */
.bs-sec { margin-top: 26px; scroll-margin-top: 70px; }
.bs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bs-grid.small { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px 12px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.bs-card.purine { border-top: 4px solid var(--t-a); } .bs-card.pyrimidine { border-top: 4px solid var(--t-e); }
.bs-nm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.bs-nm b { font-size: 15px; } .bs-nm .tg { font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.bs-note { margin: 0; font-size: 13.5px; line-height: 1.5; }
.bs-where { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.bs-hlc { fill: color-mix(in srgb, var(--exam) 32%, transparent); }
.bs-hlb { stroke: color-mix(in srgb, var(--exam) 45%, transparent); stroke-width: 12; stroke-linecap: round; }
.bs-num text { font-size: 10px; font-weight: 700; fill: var(--ink-3); }
.bs-cmp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; margin-bottom: 10px; }
.bs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.bs-fig { margin: 0; display: grid; justify-items: center; gap: 2px; }
.bs-fig figcaption { font-size: 13px; font-weight: 650; color: var(--ink-2); text-align: center; max-width: 230px; }
.bs-vs, .bs-or { font-weight: 800; color: var(--ink-3); font-size: 14px; }
.bs-arr { display: grid; justify-items: center; color: var(--subj); }
.bs-arr span { font-size: 28px; font-weight: 800; line-height: 1; } .bs-arr small { font-size: 11.5px; color: var(--ink-3); }
.bs-diff { margin: 6px 0 0; text-align: center; font-size: 14px; }
.bs-gh { font-size: 16px; font-weight: 800; margin: 20px 0 8px; color: var(--ink); scroll-margin-top: 70px; }
.bs-chg { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--subj); border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 12px; }
.bs-chg.exam { border-left-color: var(--exam); }
.bs-ct { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 16px; }
.bs-ct .x { font-size: 11.5px; font-weight: 800; color: var(--exam); border: 1px solid color-mix(in srgb, var(--exam) 55%, transparent); border-radius: 999px; padding: 0 7px; }
.bs-how { margin: 4px 0 6px; font-size: 14px; color: var(--ink-2); }
.bs-how b { color: var(--ink); }
.bs-body { font-size: 14.5px; line-height: 1.6; margin-top: 6px; }
.bs-body p { margin: 6px 0; } .bs-body ul { margin: 4px 0; padding-left: 20px; }
.bs-caution { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; }
.bs-pairs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.bs-pair { display: grid; justify-items: center; gap: 1px; min-width: 58px; padding: 6px 6px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.bs-pair .b { font-weight: 800; font-size: 15px; font-family: ui-monospace, Consolas, monospace; }
.bs-pair .b.ch { color: var(--exam); }
.bs-pair i { width: 2px; height: 12px; background: var(--ink-3); }
.bs-pair small { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.bs-pa { color: var(--ink-3); font-weight: 800; }
