/* ============================================================
   고등학교 정보과 웹교과서 — **데이터 과학 심화판** 디자인 (ds-adv.css) · 2026-09-23 확정
   <body data-subject="ds" data-edition="adv"> 쪽에서만 선다. 모든 선택자가 그 아래에 있다(조립기가 검사).
   textbook.css → advanced.css → pydata.css → 이 파일 순서로 싣는다(선택자 무게로 이 파일이 이긴다).
   ⚠️ 이 파일은 조립된 결과다. 고치는 곳: wonedu/deploy/ds_redesign/_design/proto/final/_build/style.src.css
      (body[data-subject="ds"][data-edition="adv"] = 범위 선택자) → `py -3 build.py`. 설명서: wonedu/deploy/ds_redesign/_design/DESIGN_SYSTEM.md

   한 차시 = 네 정거장(여는 장면 5 → 개념 15 → 손으로 20 → 정리·확인 10) + 더 알아보기.
     · 머리에 붙는 여정 막대 — 칸 너비가 곧 분, 채움이 곧 읽은 자리, 주황 핀이 지금 자리
     · 쪽 왼편의 길(점선) — 정거장 동그라미 · 소제목 점 · 미션 번호 · 실험 표지(예측·실행·관찰·해석) · 체크포인트가 그 위에 선다
     · 읽는 글은 좁은 단(약 42자), 그림·표·실행 칸·시뮬레이터는 넓은 단 — 읽기와 보기·하기를 폭으로 가른다
     · 읽는 자료(그림·표·기사)는 **괘선 판**(모서리 없이 위 괘선), 손대는 것(미션·실행 칸·시뮬레이터·문제)은 **둥근 판**
     · 색은 둘만 일한다 — 청록은 자료와 구조, 주황은 '여기를 보라'. 어두운 바탕 없음(교실 프로젝터)
     · 제목은 명조(Noto Serif KR), 본문은 Pretendard, 코드·출력은 나눔고딕코딩(한글 = 영문 두 칸 → 표 출력의 열이 맞는다)
     · 쪽 안 도해(.dsx-svg)·시뮬레이터·matplotlib 테마(pydata.js THEME)·chart 다리가 같은 토큰을 쓴다
   ============================================================ */

/* ---------- 0. 토큰 ---------- */
body[data-subject="ds"][data-edition="adv"] {
  --maxw: 1180px;
  --dsx-gut: 78px;                 /* 왼쪽 길이 차지하는 폭 */
  --dsx-path: 26px;                /* 길(점선)의 가로 자리 — 정거장 동그라미의 가운데 */
  --dsx-measure: 43rem;            /* 읽는 글 단(약 690px) */
  --dsx-sticky: 112px;             /* 머리 + 여정 막대 높이 */

  --dsx-bg: #f4f7f6;
  --dsx-bg-2: #f8faf9;
  --dsx-paper: #ffffff;
  --dsx-ink: #0f172a;
  --dsx-ink-2: #334155;
  --dsx-soft: #51607a;
  --dsx-faint: #8b97ad;
  --dsx-line: #dbe4e2;
  --dsx-line-2: #e9efee;
  --dsx-axis: #94a3b8;
  --dsx-grid: #e6ecf1;
  --dsx-teal: #0d9488;
  --dsx-teal-deep: #0f766e;
  --dsx-teal-ink: #115e59;
  --dsx-teal-50: #effaf8;
  --dsx-teal-wash: #e3f4f1;
  --dsx-teal-100: #cdf1eb;
  --dsx-teal-200: #99e0d6;
  --dsx-orange: #eb6834;
  --dsx-orange-ink: #c2410c;
  --dsx-orange-50: #fff5ee;
  --dsx-orange-100: #fde0cc;

  --dsx-r: 16px;
  --dsx-r-sm: 10px;
  --dsx-sh: 0 1px 2px rgba(15, 23, 42, .04), 0 3px 12px rgba(15, 23, 42, .035);
  --dsx-sh-lg: 0 1px 3px rgba(15, 23, 42, .05), 0 12px 30px rgba(15, 23, 42, .065);

  --font-serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", "AppleMyungjo", serif;
  --font-mono: "Nanum Gothic Coding", D2Coding, "JetBrains Mono", Consolas, monospace;
  --c-bg: var(--dsx-bg);
  --c-border: var(--dsx-line);
  background: var(--dsx-bg);
  color: var(--dsx-ink);
}
body[data-subject="ds"][data-edition="adv"] #scroll-progress { display: none; }      /* 여정 막대가 읽은 자리를 대신 보인다 */
body[data-subject="ds"][data-edition="adv"] .wrap { padding: 0 32px; }
body[data-subject="ds"][data-edition="adv"] main { padding: 44px 0 24px; }
body[data-subject="ds"][data-edition="adv"] code:not(pre code) { background: var(--dsx-teal-50); color: var(--dsx-teal-ink); border: 1px solid var(--dsx-teal-100); padding: 1px 6px; font-size: .86em; }
body[data-subject="ds"][data-edition="adv"] .section[id], body[data-subject="ds"][data-edition="adv"] .dsx-mission[id], body[data-subject="ds"][data-edition="adv"] .quiz[id] { scroll-margin-top: calc(var(--dsx-sticky) + 16px); }
body[data-subject="ds"][data-edition="adv"] ::selection { background: var(--dsx-teal-200); color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] u { text-decoration-color: var(--dsx-teal-200); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- 1. 머리 + 여정 막대 ---------- */
body[data-subject="ds"][data-edition="adv"] .tb-header { background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .tb-header .bar { padding: 10px 32px 4px; }
body[data-subject="ds"][data-edition="adv"] .tb-header .crumb .here { color: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .tb-header .home-btn { background: #fff; border: 1px solid var(--dsx-line); color: var(--dsx-teal-ink); padding: 5px 13px; }
body[data-subject="ds"][data-edition="adv"] .tb-header .home-btn:hover { background: var(--dsx-teal-deep); border-color: var(--dsx-teal-deep); color: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-in {
  max-width: var(--maxw); margin: 0 auto; padding: 5px 32px 11px;
  display: flex; align-items: center; gap: 18px;
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-lab { flex: none; font-size: .74rem; font-weight: 700; color: var(--dsx-soft); white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-lab b { color: var(--dsx-ink); font-weight: 800; margin-left: 2px; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track li { flex: var(--m) 1 0; min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track a { display: block; color: var(--dsx-soft); text-decoration: none; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track .seg { position: relative; display: block; height: 6px; border-radius: 99px; background: #e1e9e8; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track .seg b {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%);
  border-radius: inherit; background: var(--dsx-teal); transition: width .15s linear;
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-track .seg .tick {             /* 미션 경계 — ds-adv.js 가 분 비율 자리에 긋는다 */
  position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: #fff; border-radius: 1px;
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-track li.on .seg::after {      /* 지금 자리 — 주황 핀 */
  content: ""; position: absolute; top: 50%; left: calc(var(--p, 0) * 100%);
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--dsx-orange); box-shadow: 0 0 0 3px #fff, 0 1px 4px rgba(15, 23, 42, .3);
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-track .lb {
  display: flex; align-items: baseline; gap: 6px; margin-top: 6px; min-width: 0;
  font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden;
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-track .lb em {
  font-style: normal; font-size: .66rem; font-weight: 800; color: var(--dsx-teal-deep);
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--dsx-teal-200);
  display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: center;
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-track .lb small { font-size: .7rem; color: var(--dsx-faint); font-weight: 600; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track li.on .lb { color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track li.on .lb em { background: var(--dsx-teal); border-color: var(--dsx-teal); color: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-route-track li.done .lb em { background: var(--dsx-teal-50); border-color: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-route-more {
  flex: none; align-self: flex-start; font-size: .74rem; font-weight: 800; color: var(--dsx-soft);
  border: 1px dashed #c6d4d2; border-radius: 99px; padding: 3px 11px; white-space: nowrap; text-decoration: none;
}
body[data-subject="ds"][data-edition="adv"] .dsx-route-more:hover { text-decoration: none; border-color: var(--dsx-teal); color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-route-more.on { color: var(--dsx-orange-ink); border-color: var(--dsx-orange); border-style: solid; background: var(--dsx-orange-50); }
body[data-subject="ds"][data-edition="adv"] .dsx-route-now { display: none; }

/* ---------- 2. 머리글(hero) — 밝은 지형도 ---------- */
body[data-subject="ds"][data-edition="adv"] .hero {
  background: linear-gradient(180deg, #ffffff 0%, #f1f7f6 100%);
  color: var(--dsx-ink); padding: 52px 0 46px; border-bottom: 1px solid var(--dsx-line);
}
body[data-subject="ds"][data-edition="adv"] .hero .dsx-topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body[data-subject="ds"][data-edition="adv"] .dsx-topo .c-minor { fill: none; stroke: var(--dsx-teal); stroke-opacity: .09; stroke-width: 1; }
body[data-subject="ds"][data-edition="adv"] .dsx-topo .c-major { fill: none; stroke: var(--dsx-teal); stroke-opacity: .2; stroke-width: 1.3; }
body[data-subject="ds"][data-edition="adv"] .dsx-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 52px; align-items: start; }
body[data-subject="ds"][data-edition="adv"] .dsx-hero-main { min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: .82rem; font-weight: 700; color: var(--dsx-teal-ink); letter-spacing: .02em;
}
body[data-subject="ds"][data-edition="adv"] .dsx-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-eyebrow b {
  padding: 1px 9px; border-radius: 6px; background: var(--dsx-teal-deep); color: #fff; font-size: .76rem; font-weight: 800;
}
body[data-subject="ds"][data-edition="adv"] .hero h1 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.15rem, 4.5vw, 3.35rem); line-height: 1.22; letter-spacing: -.012em;
  color: var(--dsx-ink); margin: 0 0 12px;
}
body[data-subject="ds"][data-edition="adv"] .dsx-h1-sub { margin: 0 0 20px; font-size: clamp(1.1rem, 2vw, 1.34rem); font-weight: 800; letter-spacing: -.01em; color: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .hero p.lead { color: var(--dsx-ink-2); font-size: 1.05rem; line-height: 1.85; max-width: 640px; }
body[data-subject="ds"][data-edition="adv"] .hero p.lead strong { color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-meta { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: .86rem; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-meta li { display: flex; align-items: center; gap: 7px; padding: 0 14px; border-left: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .dsx-meta li:first-child { padding-left: 0; border-left: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-meta b { font-size: .74rem; font-weight: 700; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .hero .std-badge { background: #fff; color: var(--dsx-teal-ink); border: 1px solid var(--dsx-teal-200); font-size: .76rem; padding: 3px 10px; }

/* 단원 지도 — 14차시를 잇는 길 위의 지금 자리(--done 은 지난 차시 수, --n 은 차시 수) */
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap {
  margin-top: 26px; max-width: 640px; padding: 12px 16px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .88); border: 1px solid var(--dsx-line);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap-head { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 700; color: var(--dsx-soft); margin-bottom: 9px; }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap-head b { color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol { position: relative; list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: space-between; }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::before, body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::after { content: ""; position: absolute; left: 11px; top: 50%; height: 2px; margin-top: -1px; }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::before { right: 11px; background: repeating-linear-gradient(90deg, #c4d7d5 0 5px, transparent 5px 9px); }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::after { width: calc((100% - 22px) * var(--done, 0) / (var(--n, 14) - 1)); background: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap li {
  position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid #cbdbd9; color: var(--dsx-faint);
  font-size: .64rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap li.done { background: var(--dsx-teal); border-color: var(--dsx-teal); color: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap li.now {
  width: 30px; height: 30px; font-size: .8rem; background: var(--dsx-orange); border-color: #fff; color: #fff;
  box-shadow: 0 0 0 3px var(--dsx-orange-100), 0 4px 10px rgba(235, 104, 52, .32);
}
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: .74rem; }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap-foot a { color: var(--dsx-soft); font-weight: 600; }
body[data-subject="ds"][data-edition="adv"] .dsx-unitmap-foot a:hover { color: var(--dsx-teal-deep); }

/* 오늘의 물음 — 물음 + 핵심 수치 넷 */
body[data-subject="ds"][data-edition="adv"] .dsx-brief { background: #fff; border: 1px solid var(--dsx-line); border-radius: 20px; box-shadow: var(--dsx-sh-lg); padding: 20px 20px 16px; }
body[data-subject="ds"][data-edition="adv"] .dsx-brief-lab { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .76rem; font-weight: 800; color: var(--dsx-teal-ink); letter-spacing: .04em; }
body[data-subject="ds"][data-edition="adv"] .dsx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dsx-orange); box-shadow: 0 0 0 3px var(--dsx-orange-100); }
body[data-subject="ds"][data-edition="adv"] .dsx-brief-q { margin: 10px 0 16px; font-family: var(--font-serif); font-size: 1.12rem; font-weight: 700; line-height: 1.62; color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-brief-q em { font-style: normal; background: linear-gradient(transparent 62%, var(--dsx-orange-100) 62%); }
body[data-subject="ds"][data-edition="adv"] .dsx-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body[data-subject="ds"][data-edition="adv"] .dsx-kpi { background: var(--dsx-bg-2); border: 1px solid var(--dsx-line-2); border-radius: 12px; padding: 10px 13px 9px; min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-kpi b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; color: var(--dsx-ink); font-variant-numeric: tabular-nums; }
body[data-subject="ds"][data-edition="adv"] .dsx-kpi b small { margin-left: 3px; font-size: .48em; font-weight: 700; letter-spacing: 0; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-kpi span { font-size: .73rem; font-weight: 600; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-kpi.same { background: var(--dsx-teal-50); border-color: var(--dsx-teal-100); }
body[data-subject="ds"][data-edition="adv"] .dsx-kpi.same b { color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-brief-note { display: flex; gap: 8px; align-items: baseline; margin: 10px 2px 0; font-size: .8rem; color: var(--dsx-soft); line-height: 1.55; }
body[data-subject="ds"][data-edition="adv"] .dsx-brief-note span { flex: none; font-weight: 800; color: var(--dsx-teal); }

/* ---------- 3. 학습 목표 — 정거장별 세 줄 (카드가 아니라 괘선) ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-goals { margin: 0 0 64px; }
body[data-subject="ds"][data-edition="adv"] .dsx-goals-lab { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .78rem; font-weight: 800; color: var(--dsx-soft); letter-spacing: .06em; }
body[data-subject="ds"][data-edition="adv"] .dsx-goals-lab::after { content: ""; flex: 1; height: 1px; background: var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .dsx-goals ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; counter-reset: g; }
body[data-subject="ds"][data-edition="adv"] .dsx-goals li { counter-increment: g; min-width: 0; padding: 12px 0 0; border-top: 2px solid var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-goals li > span { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; color: var(--dsx-teal-deep); letter-spacing: .03em; }
body[data-subject="ds"][data-edition="adv"] .dsx-goals li > span::before { content: counter(g); font-family: var(--font-serif); font-size: 1.05rem; color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-goals li p { margin: 6px 0 0; font-size: .96rem; line-height: 1.7; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-goals li p strong { color: var(--dsx-ink); }

/* ---------- 4. 정거장 — 왼쪽 길과 그 위의 표지들 ---------- */
body[data-subject="ds"][data-edition="adv"] .section.dsx-st { position: relative; padding-left: var(--dsx-gut); margin: 0 0 92px; }
body[data-subject="ds"][data-edition="adv"] .section.dsx-st::before {                 /* 길 — 다음 정거장까지 이어진다 */
  content: ""; position: absolute; left: calc(var(--dsx-path) - 1px); top: 60px; bottom: -88px;
  border-left: 2px dashed #bcd5d1;
}
body[data-subject="ds"][data-edition="adv"] .section.dsx-st.is-done::before { border-left-style: solid; border-left-color: var(--dsx-teal-200); }
body[data-subject="ds"][data-edition="adv"] .section.dsx-st.dsx-st-more::before { display: none; }
body[data-subject="ds"][data-edition="adv"] .dsx-st > .sec-head { position: relative; margin: 0 0 30px; min-height: 52px; align-items: flex-end; }
body[data-subject="ds"][data-edition="adv"] .dsx-st > .sec-head .sec-num {
  position: absolute; left: calc(-1 * var(--dsx-gut)); top: 0; width: 52px; height: 52px; border-radius: 50%;
  background: #fff; color: var(--dsx-teal-deep); border: 2px solid var(--dsx-teal);
  box-shadow: 0 0 0 7px var(--dsx-bg); font-family: var(--font-serif); font-size: 1.36rem; font-weight: 700;
}
body[data-subject="ds"][data-edition="adv"] .dsx-st.is-now > .sec-head .sec-num, body[data-subject="ds"][data-edition="adv"] .dsx-st.is-done > .sec-head .sec-num { background: var(--dsx-teal); color: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-st.is-now > .sec-head .sec-num { box-shadow: 0 0 0 7px var(--dsx-bg), 0 0 0 10px var(--dsx-teal-100); }
body[data-subject="ds"][data-edition="adv"] .dsx-st.dsx-st-more > .sec-head .sec-num { border-style: dashed; border-color: var(--dsx-faint); color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-st.dsx-st-more.is-now > .sec-head .sec-num { background: #fff; color: var(--dsx-orange-ink); border-color: var(--dsx-orange); }
body[data-subject="ds"][data-edition="adv"] .dsx-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: .78rem; font-weight: 800; color: var(--dsx-teal-deep); letter-spacing: .03em; }
body[data-subject="ds"][data-edition="adv"] .dsx-kicker::before { content: ""; width: 14px; height: 2px; background: var(--dsx-teal); border-radius: 2px; }
body[data-subject="ds"][data-edition="adv"] .dsx-st > .sec-head h2 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.02rem); letter-spacing: -.01em; line-height: 1.32; }

/* 소제목 — 길 위에 작은 점 */
body[data-subject="ds"][data-edition="adv"] .dsx-h3 { position: relative; display: flex; align-items: center; gap: 12px; margin: 56px 0 16px; font-size: 1.24rem; letter-spacing: -.015em; }
body[data-subject="ds"][data-edition="adv"] .dsx-h3::before {
  content: ""; position: absolute; top: 50%; left: calc(var(--dsx-path) - var(--dsx-gut) - 6px);
  width: 8px; height: 8px; margin-top: -6px; border-radius: 50%; background: var(--dsx-bg); border: 2px solid var(--dsx-teal);
}
body[data-subject="ds"][data-edition="adv"] .dsx-h3 > span {
  flex: none; font-size: .76rem; font-weight: 800; color: var(--dsx-teal-deep); font-variant-numeric: tabular-nums;
  background: var(--dsx-teal-50); border: 1px solid var(--dsx-teal-100); border-radius: 7px; padding: 2px 8px;
}
body[data-subject="ds"][data-edition="adv"] .dsx-st > .dsx-h3:first-of-type { margin-top: 6px; }

/* 읽는 글 — 좁은 단 */
body[data-subject="ds"][data-edition="adv"] .dsx-prose { min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-prose p, body[data-subject="ds"][data-edition="adv"] .dsx-lead-p { margin: 0 0 14px; line-height: 1.88; max-width: var(--dsx-measure); }
body[data-subject="ds"][data-edition="adv"] .dsx-prose p:last-child { margin-bottom: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-lead-p { margin-bottom: 18px; }
body[data-subject="ds"][data-edition="adv"] .dsx-split { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 40px; align-items: start; margin: 0 0 28px; }

/* ---------- 5. 괘선 판 — 읽는 자료(그림·표) ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-plate { margin: 22px 0 28px; padding: 16px 24px 16px; background: #fff; border-top: 2px solid var(--dsx-ink); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .dsx-plate-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; padding: 0; font-size: 1rem; line-height: 1.5; color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-plate-no { font-size: .76rem; font-weight: 800; letter-spacing: .04em; color: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .dsx-plate-head b { font-family: var(--font-serif); font-weight: 700; font-size: 1.08rem; letter-spacing: -.005em; }
body[data-subject="ds"][data-edition="adv"] .dsx-plate-head small { margin-left: auto; font-size: .78rem; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-plate-foot { margin: 14px 0 0; padding-top: 11px; border-top: 1px solid var(--dsx-line-2); font-size: .9rem; line-height: 1.75; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-plate-foot .src, body[data-subject="ds"][data-edition="adv"] .dsx-src { display: block; margin-top: 4px; font-size: .76rem; color: var(--dsx-faint); }
body[data-subject="ds"][data-edition="adv"] .dsx-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* 요약표 — 신문 괘선 표 */
body[data-subject="ds"][data-edition="adv"] table.dsx-sum { width: 100%; border-collapse: collapse; font-size: .98rem; min-width: 480px; }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum th { text-align: left; padding: 7px 12px; font-size: .74rem; font-weight: 700; color: var(--dsx-soft); border-bottom: 1px solid var(--dsx-ink); white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum td { padding: 11px 12px; border-bottom: 1px solid var(--dsx-line-2); white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum tbody tr:last-child td { border-bottom: 0; }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum td:first-child { font-weight: 800; }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum .num { text-align: right; font-variant-numeric: tabular-nums; }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum td.key { font-weight: 800; color: var(--dsx-teal-ink); background: var(--dsx-teal-50); }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum td.hot { font-weight: 800; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] table.dsx-sum td.veil span {
  display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .74rem; font-weight: 700; color: var(--dsx-faint);
  background: repeating-linear-gradient(135deg, #eef2f4 0 6px, #f9fbfb 6px 12px); border: 1px dashed #cdd7da;
}

/* 세 도구 표 — 괘선 판 안의 표 */
body[data-subject="ds"][data-edition="adv"] .dsx-plate-table { padding-bottom: 6px; }
body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb { margin: 0; min-width: 620px; border: 0; border-radius: 0; box-shadow: none; font-size: .93rem; background: transparent; }
body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb th { background: transparent; color: var(--dsx-soft); font-size: .74rem; font-weight: 700; letter-spacing: .02em; border-bottom: 1px solid var(--dsx-ink); padding: 7px 14px; }
body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb td { border-top: 1px solid var(--dsx-line-2); padding: 12px 14px; line-height: 1.6; }
body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb tbody tr:first-child td { border-top: 0; }
body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb tbody tr:nth-child(even) { background: transparent; }
body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb td.hl { color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .term { color: var(--dsx-teal-ink); border-bottom-color: var(--dsx-teal-200); }

/* 그림 1 — 두 판 나란히(폰은 좁은 판으로 다시 그린 것) */
body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair > svg.fig-d:first-child { padding-right: 26px; }
body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair > svg.fig-d + svg.fig-d { padding-left: 26px; border-left: 1px solid var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair > svg.fig-m { display: none; }

/* 도해 — matplotlib 테마와 같은 토큰 */
body[data-subject="ds"][data-edition="adv"] .dsx-svg { display: block; width: 100%; height: auto; font-family: var(--font-sans); overflow: visible; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .bar { fill: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .bar.dim { fill: #a7dcd5; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .bar.hl { fill: var(--dsx-orange); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .dot { fill: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .dot.hl { fill: var(--dsx-orange); stroke: #fff; stroke-width: 1; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .ax { stroke: var(--dsx-axis); stroke-width: 1; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .grid { stroke: var(--dsx-grid); stroke-width: 1; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .band { fill: var(--dsx-orange); fill-opacity: .09; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .mean { stroke: var(--dsx-ink-2); stroke-width: 1.2; stroke-dasharray: 4 4; stroke-opacity: .6; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .box { fill: var(--dsx-teal-wash); stroke: var(--dsx-teal-deep); stroke-width: 1.6; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .med { stroke: var(--dsx-orange); stroke-width: 3; stroke-linecap: round; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .whisk { stroke: var(--dsx-teal-deep); stroke-width: 1.4; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .flier { fill: #fff; stroke: var(--dsx-orange); stroke-width: 1.5; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .pin { fill: var(--dsx-orange); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .med-l { stroke: var(--dsx-teal-ink); stroke-width: 2; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .mean-l { stroke: var(--dsx-orange); stroke-width: 2; stroke-dasharray: 3 2.5; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .sk-area { fill: #fbfdfd; stroke: #c6e0dc; stroke-dasharray: 4 4; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .track { fill: #edf2f4; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .bandteal { fill: var(--dsx-teal-100); stroke: var(--dsx-teal); stroke-width: 1; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .pilot { fill: var(--dsx-orange); stroke: #fff; stroke-width: 2; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .area { fill: var(--dsx-teal); fill-opacity: .13; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .curve { fill: none; stroke: var(--dsx-teal); stroke-width: 2.2; stroke-linejoin: round; }
body[data-subject="ds"][data-edition="adv"] .dsx-svg text { fill: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-h { font-family: var(--font-serif); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .halo { paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; }   /* 막대 위에 겹치는 글자 — 흰 테 */
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-soft, body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-tick { fill: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-row { fill: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-acc { fill: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-key { fill: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-ok { fill: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-svg .t-no { fill: var(--dsx-orange-ink); }

/* 가상 기사 — 종이 한 조각 */
body[data-subject="ds"][data-edition="adv"] .dsx-news {
  position: relative; margin: 2px 4px 0 0; padding: 16px 22px 14px; border-radius: 2px;
  background: #fffdf7; border: 1px solid #e9dfc6; border-top: 3px double #3a2f17;
  box-shadow: 0 12px 26px rgba(120, 90, 30, .08); transform: rotate(-.6deg);
}
body[data-subject="ds"][data-edition="adv"] .dsx-news-tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; color: #7c6123; }
body[data-subject="ds"][data-edition="adv"] .dsx-news-h { margin: 8px 0 12px; font-family: var(--font-serif); font-weight: 700; font-size: 1.22rem; line-height: 1.55; color: #231c0e; }
body[data-subject="ds"][data-edition="adv"] .dsx-news figcaption { padding-top: 8px; border-top: 1px solid #ebdfc5; font-size: .74rem; color: #8a7a58; line-height: 1.5; }

/* 되짚기 · 규칙 */
body[data-subject="ds"][data-edition="adv"] .dsx-recall { display: flex; align-items: baseline; gap: 12px; margin: 0; padding: 12px 16px; border-radius: 12px; background: #f3f5f9; border: 1px solid #e1e7ef; font-size: .93rem; line-height: 1.75; max-width: calc(var(--dsx-measure) + 180px); }
body[data-subject="ds"][data-edition="adv"] .dsx-recall > .lab { flex: none; padding: 2px 10px; border-radius: 99px; background: #fff; border: 1px solid #dfe5ee; font-size: .72rem; font-weight: 800; color: #475569; white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-prose .dsx-rule { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 0; padding: 12px 16px; border-left: 3px solid var(--dsx-teal); border-radius: 0 12px 12px 0; background: var(--dsx-teal-50); line-height: 1.7; }
body[data-subject="ds"][data-edition="adv"] .dsx-rule > .lab { flex: none; padding: 1px 8px; border-radius: 6px; background: var(--dsx-teal-deep); color: #fff; font-size: .72rem; font-weight: 800; }
body[data-subject="ds"][data-edition="adv"] .dsx-recall > .tx, body[data-subject="ds"][data-edition="adv"] .dsx-rule > .tx { min-width: 0; }

/* 옆 판 — 작은 그림 */
body[data-subject="ds"][data-edition="adv"] .dsx-mini { margin: 0; padding: 14px 18px 14px; background: #fff; border-top: 2px solid var(--dsx-ink); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .dsx-mini-head { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: .84rem; font-weight: 800; }
body[data-subject="ds"][data-edition="adv"] .dsx-mini-head b { font-weight: 700; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-mini-lab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; font-size: .8rem; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-mini-lab b { font-size: 1.05rem; color: var(--dsx-orange-ink); }

/* ---------- 6. 반례 판 — 그럴듯한 말 → 도장 → 데이터가 한 말 ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-counter { background: #fff; border: 1px solid var(--dsx-line); border-top: 2px solid var(--dsx-ink); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-claim { position: relative; padding: 14px 18px 16px; background: var(--dsx-orange-50); border-bottom: 1px solid var(--dsx-orange-100); }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-claim p { margin: 6px 64px 0 0; font-family: var(--font-serif); font-size: 1.08rem; font-weight: 700; line-height: 1.55; color: #3b1d0e; }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-tag { font-size: .7rem; font-weight: 800; letter-spacing: .05em; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-tag.ok { color: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .dsx-stamp {
  position: absolute; right: 14px; bottom: 14px; padding: 3px 9px 2px; border: 2px solid var(--dsx-orange-ink); border-radius: 4px;
  color: var(--dsx-orange-ink); font-size: .9rem; font-weight: 900; letter-spacing: .06em; transform: rotate(-8deg);
  background: rgba(255, 255, 255, .6);
}
body[data-subject="ds"][data-edition="adv"] .dsx-counter-fact { padding: 13px 18px 16px; }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-num { display: flex; align-items: center; gap: 12px; margin: 6px 0 8px; font-size: .84rem; font-weight: 700; line-height: 1.45; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-num b { font-size: 2.6rem; line-height: 1; letter-spacing: -.04em; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-num b small { font-size: .5em; margin-left: 1px; }
body[data-subject="ds"][data-edition="adv"] .dsx-counter .dsx-svg { margin: 2px 0 10px; }
body[data-subject="ds"][data-edition="adv"] .dsx-counter-why { margin: 0; font-size: .88rem; line-height: 1.66; color: var(--dsx-ink-2); }

/* ---------- 7. 짝 숫자 — 나란히 놓으면 보이는 모양의 흔적 ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; margin: 6px 0 24px; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair { display: grid; grid-template-columns: minmax(0, 1fr) 180px; grid-template-rows: auto 1fr auto; gap: 4px 20px; margin: 0; padding: 14px 18px 15px; background: #fff; border-top: 2px solid var(--dsx-ink); box-shadow: var(--dsx-sh); min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-k { grid-column: 1 / -1; font-size: .78rem; font-weight: 700; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v { grid-column: 1; grid-row: 2; display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v > div { min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v b { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.035em; color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v b small { font-size: .52em; margin-left: 1px; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v span { display: block; margin-top: 3px; font-size: .72rem; font-weight: 600; color: var(--dsx-soft); white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v .hot b { color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-pair-v .vs { align-self: center; margin-bottom: 14px; font-style: normal; font-size: .78rem; font-weight: 800; color: var(--dsx-faint); }
body[data-subject="ds"][data-edition="adv"] .dsx-pair > .dsx-svg { grid-column: 2; grid-row: 2; align-self: end; }
body[data-subject="ds"][data-edition="adv"] .dsx-pair > p { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--dsx-line-2); font-size: .86rem; line-height: 1.6; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-lg { display: inline-block; width: 14px; height: 0; margin: 0 4px 3px 0; vertical-align: middle; border-top: 2.5px solid var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-lg.mean { border-top: 2.5px dashed var(--dsx-orange); margin-left: 6px; }

/* 나침반 */
body[data-subject="ds"][data-edition="adv"] .dsx-compass { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: center; padding: 18px 24px; background: #fff; border-top: 2px solid var(--dsx-ink); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose svg { display: block; width: 100%; height: auto; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose .r1 { fill: var(--dsx-teal-50); stroke: var(--dsx-teal-100); stroke-width: 2; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose .r2 { fill: none; stroke: var(--dsx-teal-200); stroke-width: 1; stroke-dasharray: 3 4; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose .n { fill: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose .e { fill: var(--dsx-teal-200); }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose .c { fill: var(--dsx-orange); stroke: #fff; stroke-width: 2; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose text { font-size: 16px; font-weight: 800; fill: var(--dsx-ink-2); font-family: var(--font-sans); }
body[data-subject="ds"][data-edition="adv"] .dsx-compass h4 { margin: 0 0 10px; font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass ol { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass li { font-size: .9rem; line-height: 1.55; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-compass li b { display: block; color: var(--dsx-teal-ink); font-size: .96rem; }
body[data-subject="ds"][data-edition="adv"] .dsx-compass p { margin: 0; padding-top: 12px; border-top: 1px solid var(--dsx-line-2); font-size: .92rem; line-height: 1.72; }

/* ---------- 8. 체크포인트 — 길 위의 ✓ ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-cp { position: relative; display: flex; align-items: center; gap: 14px; margin: 38px 0 0; padding: 11px 18px; background: var(--dsx-teal-50); border: 1px solid var(--dsx-teal-100); border-radius: 12px; }
body[data-subject="ds"][data-edition="adv"] .dsx-cp::before {
  content: "✓"; position: absolute; top: 50%; left: calc(var(--dsx-path) - var(--dsx-gut) - 12px); width: 24px; height: 24px; margin-top: -12px;
  border-radius: 50%; background: var(--dsx-teal); color: #fff; font-size: .76rem; font-weight: 900; line-height: 24px; text-align: center;
  box-shadow: 0 0 0 5px var(--dsx-bg);
}
body[data-subject="ds"][data-edition="adv"] .dsx-cp-tag { flex: none; font-size: .76rem; font-weight: 800; color: var(--dsx-teal-deep); white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-cp p { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .9rem; line-height: 1.6; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-cp-next { flex: none; font-size: .84rem; font-weight: 800; color: var(--dsx-teal-deep); white-space: nowrap; }

/* ---------- 9. 여는 장면 — 예측 ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-predict { border: 1.5px dashed #aed8d1; border-radius: var(--dsx-r); background: #fbfdfd; padding: 18px 20px 20px; }
body[data-subject="ds"][data-edition="adv"] .dsx-predict-head { display: flex; align-items: flex-start; gap: 14px; }
body[data-subject="ds"][data-edition="adv"] .dsx-predict-head p { margin: 0; line-height: 1.78; max-width: calc(var(--dsx-measure) + 120px); }
body[data-subject="ds"][data-edition="adv"] .dsx-chip-q { flex: none; margin-top: 3px; padding: 3px 11px; border-radius: 99px; background: var(--dsx-orange-ink); color: #fff; font-size: .74rem; font-weight: 800; white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-notefield { display: block; margin: 16px 0 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-notefield > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; font-size: .84rem; font-weight: 800; color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-notefield small { font-size: .74rem; font-weight: 600; color: var(--dsx-faint); }
body[data-subject="ds"][data-edition="adv"] textarea.dsx-note {
  display: block; width: 100%; min-height: 64px; resize: vertical; margin: 0; padding: 11px 14px;
  font: inherit; font-size: .96rem; line-height: 1.7; color: var(--dsx-ink);
  background: #fff; border: 1.5px solid var(--dsx-line); border-radius: 12px;
}
body[data-subject="ds"][data-edition="adv"] textarea.dsx-note:focus { outline: none; border-color: var(--dsx-teal); box-shadow: 0 0 0 4px var(--dsx-teal-50); }
body[data-subject="ds"][data-edition="adv"] .dsx-predict-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
body[data-subject="ds"][data-edition="adv"] .dsx-predict-grid figure { margin: 0; min-width: 0; background: #fff; border: 1px solid var(--dsx-line); border-radius: 12px; padding: 10px 10px 4px; }
body[data-subject="ds"][data-edition="adv"] .dsx-predict-grid figcaption { margin: 0 0 2px 4px; font-size: .86rem; font-weight: 800; }

/* ---------- 10. 손으로 — 미션 지도 · 장비 카드 ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-missions-wrap { margin: 0 0 18px; }
body[data-subject="ds"][data-edition="adv"] .dsx-missions { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
body[data-subject="ds"][data-edition="adv"] .dsx-missions li { flex: var(--m) 1 0; min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-missions a {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; height: 100%; padding: 9px 12px 10px;
  background: #fff; border: 1px solid var(--dsx-line); border-top: 4px solid var(--dsx-teal-100); border-radius: 10px;
  color: var(--dsx-ink); text-decoration: none;
}
body[data-subject="ds"][data-edition="adv"] .dsx-missions a:hover { border-top-color: var(--dsx-teal); text-decoration: none; }
body[data-subject="ds"][data-edition="adv"] .dsx-missions em { font-style: normal; font-size: .92rem; font-weight: 900; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-missions span { font-size: .84rem; font-weight: 700; line-height: 1.4; }
body[data-subject="ds"][data-edition="adv"] .dsx-missions small { font-size: .72rem; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-missions li.on a { border-top-color: var(--dsx-orange); background: var(--dsx-orange-50); }
body[data-subject="ds"][data-edition="adv"] .dsx-missions li.done a { border-top-color: var(--dsx-teal); }
/* 미션 하나의 차례 — 길 위 표지와 같은 모양 */
body[data-subject="ds"][data-edition="adv"] .dsx-cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 10px 0 0; font-size: .78rem; font-weight: 700; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle span { display: inline-flex; align-items: center; gap: 6px; }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle span + span::before { content: "→"; order: -2; margin: 0 10px 0 8px; color: var(--dsx-faint); font-weight: 400; }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle span::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage::before { content: ""; flex: none; box-sizing: border-box; }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle span::after { order: -1; width: 12px; height: 12px; }

body[data-subject="ds"][data-edition="adv"] .dsx-gear { margin: 0 0 8px; background: #fff; border: 1px solid var(--dsx-line); border-radius: var(--dsx-r); box-shadow: var(--dsx-sh); overflow: hidden; }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-head { padding: 18px 24px 16px; background: linear-gradient(100deg, var(--dsx-teal-50), #fff 70%); border-bottom: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-head h3 { margin: 4px 0 6px; font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-head p { margin: 0; font-size: .93rem; line-height: 1.7; color: var(--dsx-ink-2); max-width: calc(var(--dsx-measure) + 200px); }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-col { min-width: 0; padding: 18px 22px 20px; }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-col + .dsx-gear-col { border-left: 1px solid var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-col h4 { margin: 0 0 10px; font-size: .74rem; font-weight: 800; letter-spacing: .05em; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] pre.dsx-code { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: 10px; background: var(--dsx-bg-2); border: 1px solid var(--dsx-line); color: var(--dsx-ink); font-size: .82rem; line-height: 1.8; }
body[data-subject="ds"][data-edition="adv"] pre.dsx-code .k { color: #4a3aa7; font-weight: 700; }
body[data-subject="ds"][data-edition="adv"] pre.dsx-code .n { color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] pre.dsx-code .c { color: #6b7a90; }
body[data-subject="ds"][data-edition="adv"] .dsx-fn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 12px; margin: 0; font-size: .88rem; line-height: 1.5; }
body[data-subject="ds"][data-edition="adv"] .dsx-fn dt { align-self: start; padding: 1px 8px; border-radius: 6px; background: var(--dsx-teal-50); border: 1px solid var(--dsx-teal-100); color: var(--dsx-teal-ink); font-family: var(--font-mono); font-size: .82rem; font-weight: 700; }
body[data-subject="ds"][data-edition="adv"] .dsx-fn dd { margin: 0; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-diff { list-style: none; counter-reset: d; margin: 0; padding: 0; display: grid; gap: 9px; }
body[data-subject="ds"][data-edition="adv"] .dsx-diff li { counter-increment: d; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; font-size: .86rem; line-height: 1.5; }
body[data-subject="ds"][data-edition="adv"] .dsx-diff li::before { content: counter(d); grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 7px; background: var(--dsx-ink); color: #fff; font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
body[data-subject="ds"][data-edition="adv"] .dsx-diff b { color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-diff span { color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-gear-cost { margin: 12px 0 0; font-size: .82rem; line-height: 1.6; color: var(--dsx-soft); }

/* ---------- 11. 미션 — 길 위의 번호와 실험 표지 ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-mission { position: relative; margin: 56px 0 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-mission-head { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .dsx-mno {
  position: absolute; top: 50%; left: calc(var(--dsx-path) - var(--dsx-gut) - 16px); width: 32px; height: 32px; margin-top: -22px;
  border-radius: 10px; background: var(--dsx-orange); color: #fff; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px var(--dsx-bg);
}
body[data-subject="ds"][data-edition="adv"] .dsx-mission.is-done .dsx-mno { background: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-mission-head h3 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.18rem; letter-spacing: -.012em; }
body[data-subject="ds"][data-edition="adv"] .dsx-min { flex: none; font-size: .78rem; font-weight: 700; color: var(--dsx-soft); white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-min::before { content: "⏱ "; font-size: .9em; }

/* 실험 표지 — 예측 ◌ · 실행 ● · 실험실 ■ · 관찰 ◉ · 해석 ◆ (길 위의 모양 + 옆의 이름) */
body[data-subject="ds"][data-edition="adv"] .dsx-stage { position: relative; margin: 0 0 14px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage::before { position: absolute; top: 5px; left: calc(var(--dsx-path) - var(--dsx-gut) - 7px); width: 14px; height: 14px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage::after {
  position: absolute; top: 3px; left: calc(var(--dsx-path) - var(--dsx-gut) + 11px);
  font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: var(--dsx-soft); white-space: nowrap;
}
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"]::after { content: "예측"; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="run"]::after { content: "실행"; color: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="sim"]::after { content: "실험실"; color: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="observe"]::after { content: "관찰"; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="interpret"]::after { content: "해석"; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="run"]::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="sim"]::after { top: 14px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="run"]::before, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="sim"]::before { top: 16px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="run"]:has(> .dsx-do:first-child)::before, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="sim"]:has(> .dsx-do:first-child)::before { top: 7px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="run"]:has(> .dsx-do:first-child)::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="sim"]:has(> .dsx-do:first-child)::after { top: 5px; }
body[data-subject="ds"][data-edition="adv"] [data-g="predict"]::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"]::before { border: 2px dashed var(--dsx-teal); border-radius: 50%; background: var(--dsx-bg); }
body[data-subject="ds"][data-edition="adv"] [data-g="run"]::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="run"]::before { border-radius: 50%; background: var(--dsx-teal); box-shadow: 0 0 0 3px var(--dsx-bg); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="sim"]::before { border-radius: 4px; background: var(--dsx-teal); box-shadow: 0 0 0 3px var(--dsx-bg); }
body[data-subject="ds"][data-edition="adv"] [data-g="observe"]::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="observe"]::before { border: 2px solid var(--dsx-teal); border-radius: 50%; background: radial-gradient(circle, var(--dsx-teal) 0 2.5px, var(--dsx-bg) 3px); }
body[data-subject="ds"][data-edition="adv"] [data-g="interpret"]::after, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="interpret"]::before { background: var(--dsx-orange); transform: rotate(45deg) scale(.82); border-radius: 2px; box-shadow: 0 0 0 3px var(--dsx-bg); }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle [data-g]::after { background-color: transparent; }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle [data-g="run"]::after { background: var(--dsx-teal); box-shadow: none; }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle [data-g="interpret"]::after { background: var(--dsx-orange); box-shadow: none; }
body[data-subject="ds"][data-edition="adv"] .dsx-cycle [data-g="predict"]::after, body[data-subject="ds"][data-edition="adv"] .dsx-cycle [data-g="observe"]::after { background-color: #fff; }

/* 단계마다의 모양 */
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"] > p, body[data-subject="ds"][data-edition="adv"] .dsx-do { margin: 0 0 10px; line-height: 1.8; max-width: calc(var(--dsx-measure) + 120px); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"] { padding: 12px 16px; border: 1.5px dashed #aed8d1; border-radius: 12px; background: #fbfdfd; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"]::before { top: 16px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"]::after { top: 14px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"] > p:last-child { margin-bottom: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-echo {
  margin: 8px 0 2px; padding: 10px 14px; border-left: 3px solid var(--dsx-orange); border-radius: 0 10px 10px 0; background: #fff;
  font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600; line-height: 1.65; color: var(--dsx-ink); white-space: pre-wrap;
}
body[data-subject="ds"][data-edition="adv"] .dsx-echo::before { content: "내 예측 · "; font-family: var(--font-sans); font-size: .74rem; font-weight: 800; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-echo.empty { font-family: var(--font-sans); font-size: .88rem; font-weight: 600; color: var(--dsx-faint); border-left-color: var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .dsx-echo.empty::before { color: var(--dsx-faint); }
body[data-subject="ds"][data-edition="adv"] .dsx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body[data-subject="ds"][data-edition="adv"] .dsx-checks label { display: flex; align-items: flex-start; gap: 10px; padding: 7px 12px; border-radius: 10px; font-size: .96rem; line-height: 1.66; cursor: pointer; }
body[data-subject="ds"][data-edition="adv"] .dsx-checks label:hover { background: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-checks input { flex: none; width: 17px; height: 17px; margin: 4px 0 0; accent-color: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-checks input:checked + span { color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="interpret"] { padding: 12px 16px; border-radius: 12px; background: var(--dsx-orange-50); border: 1px solid var(--dsx-orange-100); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="interpret"]::before { top: 16px; }
body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="interpret"]::after { top: 14px; }
body[data-subject="ds"][data-edition="adv"] .dsx-frame { margin: 0; font-size: .98rem; line-height: 2.1; color: var(--dsx-ink); max-width: calc(var(--dsx-measure) + 160px); }
body[data-subject="ds"][data-edition="adv"] .dsx-blank { display: inline-block; min-width: 3.2em; height: 1.1em; margin: 0 3px; vertical-align: -.2em; border-bottom: 2px solid var(--dsx-orange); }
body[data-subject="ds"][data-edition="adv"] .dsx-blank.wide { min-width: 8em; }
body[data-subject="ds"][data-edition="adv"] .dsx-to-quiz { display: inline-block; margin-top: 4px; font-size: .86rem; font-weight: 800; color: var(--dsx-orange-ink); }
/* ⚠️ flex-wrap 필수 — 안에 <strong>·<u> 같은 인라인 강조를 쓰면 그것들이 각각 flex 항목이 되어
   최소 폭이 합산되고, 390px 에서 판이 부모를 넘겨 문서 전체에 가로 스크롤이 생긴다(2026-09-23 기준 차시에서 실측). */
body[data-subject="ds"][data-edition="adv"] .dsx-standin { display: flex; flex-wrap: wrap; min-width: 0; align-items: baseline; gap: 10px; margin: 10px 0 0 !important; padding: 8px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--dsx-orange-100); font-size: .84rem; line-height: 1.6; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-standin b { flex: none; padding: 1px 7px; border-radius: 5px; background: var(--dsx-orange-ink); color: #fff; font-size: .7rem; }
body[data-subject="ds"][data-edition="adv"] .dsx-standin-inline { display: block; margin-top: 6px; font-size: .82rem; color: var(--dsx-orange-ink); }

/* ---------- 12. 실행 칸 — 밝은 두 판: 코드 | 실행·결과 ----------
   pyrunner 가 만드는 차례(머리 → [예열 안내] → 코드 → 단추 줄 → 출력)를 격자 자리로 옮긴다.
   넓은 화면에서는 코드 판이 코드를 다 보이고(field-sizing), 못 하는 브라우저에서는 코드가 따라 내려온다(sticky). */
body[data-subject="ds"][data-edition="adv"] .pyrun {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
  margin: 0; background: #fff; border: 1px solid var(--dsx-line); border-radius: var(--dsx-r); box-shadow: var(--dsx-sh-lg);
  overflow: visible; overflow: clip;
}
body[data-subject="ds"][data-edition="adv"] .pyrun::before { content: ""; grid-column: 1; grid-row: 3 / 5; background: #fbfcfd; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-cap { grid-column: 1 / -1; grid-row: 1; padding: 11px 18px; gap: 11px; background: #fff; color: var(--dsx-ink); border-bottom: 1px solid var(--dsx-line); font-size: .92rem; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-cap::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 7px;
  background: var(--dsx-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4-4 4'/%3E%3Cpath d='M12.5 16.5H18'/%3E%3C/svg%3E") center / 16px no-repeat;
}
body[data-subject="ds"][data-edition="adv"] .pyrun .py-cap .py-tag { background: #fff; color: var(--dsx-teal-ink); border: 1px solid var(--dsx-teal-200); font-size: .64rem; letter-spacing: .04em; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-note { grid-column: 1 / -1; grid-row: 2; padding: 7px 18px; font-size: .8rem; background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde9b0; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-note.ok { background: #effbf3; color: #166534; border-bottom-color: #c9eed6; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-note.warn { background: var(--dsx-orange-50); color: #9a3412; border-bottom-color: var(--dsx-orange-100); }
body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code {
  grid-column: 1; grid-row: 3 / 5; align-self: start; position: sticky; top: calc(var(--dsx-sticky) + 10px); z-index: 1;
  min-height: 140px; padding: 16px 18px 18px; border: 0; background: transparent; color: var(--dsx-ink);
  font-size: .82rem; line-height: 1.76; caret-color: var(--dsx-teal); tab-size: 4;
  white-space: pre; overflow-wrap: normal; overflow-x: auto;   /* 코드는 꺾지 않는다 — 긴 줄은 칸 안에서 옆으로 */
}
@media (min-width: 961px) {
  @supports (field-sizing: content) {
    body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code { field-sizing: content; height: auto !important; max-height: none; align-self: stretch; position: static; resize: none; }
  }
}
body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code:focus { background: #fff; box-shadow: inset 3px 0 0 var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar { grid-column: 2; grid-row: 3; padding: 11px 16px; gap: 8px; background: #fff; border-left: 1px solid var(--dsx-line); border-bottom: 1px solid var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar .btn.small { padding: 7px 14px; font-size: .84rem; border-radius: 9px; box-shadow: none; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar [data-run] { background: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar .btn.small.dark { background: #fff; color: var(--dsx-ink-2); border: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar .btn.small.dark:hover { background: var(--dsx-bg-2); border-color: #c5d3d2; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar [data-solution-btn] { background: #fffaeb; color: #92400e; border-color: #f5dea0; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar [data-solution-btn].on { background: #effbf3; color: #166534; border-color: #bfe8cd; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar .py-status { flex: 1 1 100%; font-size: .78rem; font-weight: 700; color: var(--dsx-soft); line-height: 1.5; }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar .py-status:empty { display: none; }
body[data-subject="ds"][data-edition="adv"] .pyrun::after { content: ""; grid-column: 2; grid-row: 4; background: var(--dsx-bg-2); border-left: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out[hidden] {
  display: block; grid-column: 2; grid-row: 4; align-self: start; position: sticky; top: calc(var(--dsx-sticky) + 12px); z-index: 1;
  margin: 0; min-height: 150px; max-height: none;
  padding: 16px 20px 18px; border-top: 0; border-left: 1px solid var(--dsx-line);
  background: transparent; color: #10302d; font-size: .84rem; line-height: 1.72;
}
body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out:empty::before {
  content: "▶ 실행을 누르면 결과가 여기에 나옵니다"; display: flex; align-items: center; justify-content: center; min-height: 118px;
  font-family: var(--font-sans); font-size: .86rem; font-weight: 700; color: var(--dsx-faint);
  border: 1.5px dashed var(--dsx-line); border-radius: 12px;
}
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .err { color: #b91c1c; }
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .sys { color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-hint {
  display: block; margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; white-space: normal;
  background: #fff; border: 1px solid var(--dsx-orange-100); border-left: 3px solid var(--dsx-orange);
  font-family: var(--font-sans); font-size: .86rem; font-weight: 700; line-height: 1.6; color: var(--dsx-ink);
}
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-fig { margin: 10px 0 12px; padding: 10px; background: #fff; border: 1px solid var(--dsx-line); border-radius: 12px; }
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-fig:first-child { margin-top: 0; }
body[data-subject="ds"][data-edition="adv"] .py-fig .py-fig-title { font-size: 14px; font-weight: 700; }
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-fb-note { color: #9a3412; }
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-fb img { background: #fff; border: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-echo { color: var(--dsx-faint); }

/* ---------- 13. 시뮬레이터 틀 — 머리 · 안내 · 조작부 · 무대 · 결과판 · 도전 카드 · 교사 화면 ---------- */
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim { margin: 0; padding: 0; background: #fff; border: 1px solid var(--dsx-line); border-radius: 20px; box-shadow: var(--dsx-sh-lg); overflow: hidden; color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim .sim-head { gap: 14px; padding: 14px 20px; background: linear-gradient(100deg, var(--dsx-teal-50), #fff 65%); border-bottom: 1px solid var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--dsx-teal-deep); display: flex; align-items: center; justify-content: center; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-icon svg { width: 22px; height: 22px; fill: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-title { flex: 1 1 auto; min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kind { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim .sim-head .sim-title { display: block; margin: 0; color: var(--dsx-ink); font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; line-height: 1.35; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-sub { margin: 1px 0 0; font-size: .84rem; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 800; color: var(--dsx-ink-2); background: #fff; border: 1px solid var(--dsx-line);
}
body[data-subject="ds"][data-edition="adv"] .dsx-stage-btn:hover { border-color: var(--dsx-teal); color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-stage-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-guide { list-style: none; margin: 0; padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 6px 26px; background: #fbfdfd; border-bottom: 1px solid var(--dsx-line-2); font-size: .84rem; font-weight: 600; color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-guide em { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--dsx-ink); color: #fff; font-size: .7rem; font-style: normal; font-weight: 800; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-main { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-ctrl { display: grid; align-content: start; gap: 18px; padding: 18px 20px 20px; background: #fbfdfd; border-right: 1px solid var(--dsx-line-2); color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-ctrl fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-ctrl legend { padding: 0; margin-bottom: 7px; font-size: .74rem; font-weight: 800; letter-spacing: .03em; color: var(--dsx-soft); }
/* 선택 단추 — 높이 44px · 손가락으로 누르는 기기에서만 단추 사이 틈 6px (2026-09-28 사용자 결정. 전에는 37.5px · 3px).
   높이보다 틈이 옆 단추 오터치를 더 줄인다. 틈을 (pointer: coarse) 에만 준 까닭: PC 폭에서는 조작판이 옆 좁은 칸에 들어가
   3px 에 딱 맞던 줄 여섯(Ⅱ-6 · Ⅲ-4 · Ⅲ-13 · Ⅳ-2 · Ⅳ-3 · Ⅳ-11)이 4px 만 돼도 접혀 마지막 단추 하나가 아래 줄에 홀로 늘어진다.
   마우스에는 넓은 틈이 필요 없다. 390px 폰에서는 6px 로도 접히는 줄이 0 이다(48쪽 실측). */
body[data-subject="ds"][data-edition="adv"] .dsx-seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 11px; background: #e9efee; }
body[data-subject="ds"][data-edition="adv"] .dsx-seg button { flex: 1 1 auto; min-height: 44px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--dsx-ink-2); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
body[data-subject="ds"][data-edition="adv"] .dsx-seg button:hover { color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-seg button[aria-pressed="true"] { background: #fff; color: var(--dsx-teal-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
body[data-subject="ds"][data-edition="adv"] .dsx-seg button.wide { flex-basis: 100%; }
body[data-subject="ds"][data-edition="adv"] .dsx-seg button small { font-size: .7rem; font-weight: 700; color: var(--dsx-orange-ink); margin-left: 2px; }
@media (pointer: coarse) { body[data-subject="ds"][data-edition="adv"] .dsx-seg { gap: 6px; } }
body[data-subject="ds"][data-edition="adv"] .dsx-range { display: grid; gap: 7px; font-size: .84rem; font-weight: 700; }
body[data-subject="ds"][data-edition="adv"] .dsx-range > span { display: flex; justify-content: space-between; align-items: center; }
body[data-subject="ds"][data-edition="adv"] .dsx-range output { padding: 0 8px; border-radius: 6px; background: var(--dsx-teal-50); color: var(--dsx-teal-ink); font-family: var(--font-mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
body[data-subject="ds"][data-edition="adv"] .dsx-range input[type="range"] { width: 100%; margin: 0; accent-color: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-range input:disabled { opacity: .4; }
body[data-subject="ds"][data-edition="adv"] .dsx-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .86rem; font-weight: 700; }
body[data-subject="ds"][data-edition="adv"] .dsx-check input { width: 17px; height: 17px; accent-color: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-check small { color: var(--dsx-faint); font-weight: 600; }
body[data-subject="ds"][data-edition="adv"] .dsx-check.off { opacity: .45; }
/* 잠긴 조작의 까닭 — 잠근 단추·체크 바로 아래. 안 보이면 학생은 쪽이 고장 난 줄 안다(2026-09-23). */
body[data-subject="ds"][data-edition="adv"] .dsx-why { margin: 6px 0 0; padding: 6px 9px; border-radius: 7px; background: var(--dsx-orange-50, #fff7ed); border: 1px solid var(--dsx-orange-100); color: var(--dsx-ink-2); font-size: .78rem; font-weight: 600; line-height: 1.5; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-stage { min-width: 0; padding: 16px 22px 12px; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-stagehead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; font-size: .92rem; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-stagehead span { font-size: .78rem; color: var(--dsx-soft); }
/* 시뮬레이터 무대 안의 SVG — 차시 하나의 id(#bl-svg)가 박혀 있던 것을 자리로 바꿨다(2026-09-23). */
body[data-subject="ds"][data-edition="adv"] .dsx-sim-stage > svg { display: block; width: 100%; height: auto; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-rule { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 0; font-size: .78rem; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-rule > span { min-width: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-rule .pin { flex: none; align-self: center; width: 0; height: 0; border-left: 5.5px solid transparent; border-right: 5.5px solid transparent; border-top: 8px solid var(--dsx-orange); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-board { display: grid; grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi { min-width: 0; padding: 11px 16px; border-left: 1px solid var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi:first-child { border-left: 0; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi span { display: block; font-size: .72rem; font-weight: 700; color: var(--dsx-soft); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi b { font-size: 1.34rem; font-weight: 800; color: var(--dsx-ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; background: var(--dsx-orange-50); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero span { flex-basis: 100%; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero b { font-size: 2.1rem; line-height: 1.05; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero small { font-size: .8rem; font-weight: 700; color: var(--dsx-orange-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero.off { background: #fff; }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero.off b, body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero.off small { color: var(--dsx-faint); }
body[data-subject="ds"][data-edition="adv"] .dsx-sim-chal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 20px 20px; background: #fbfdfd; border-top: 1px solid var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .dsx-chal { position: relative; min-width: 0; padding: 12px 15px 13px; background: #fff; border: 1px solid var(--dsx-line); border-radius: 12px; }
body[data-subject="ds"][data-edition="adv"] .dsx-chal-no { display: inline-block; padding: 1px 9px; border-radius: 99px; background: var(--dsx-ink); color: #fff; font-size: .7rem; font-weight: 800; }
body[data-subject="ds"][data-edition="adv"] .dsx-chal p { margin: 7px 0 0; font-size: .9rem; line-height: 1.62; }
body[data-subject="ds"][data-edition="adv"] .dsx-chal.ok { border-color: var(--dsx-teal-200); background: var(--dsx-teal-50); }
body[data-subject="ds"][data-edition="adv"] .dsx-chal.ok .dsx-chal-no { background: var(--dsx-teal-deep); }
body[data-subject="ds"][data-edition="adv"] .dsx-chal.ok .dsx-chal-no::after { content: " ✓"; }
body[data-subject="ds"][data-edition="adv"] .dsx-chal-ok { padding-top: 7px; border-top: 1px dashed var(--dsx-teal-200); color: var(--dsx-teal-ink); font-weight: 700; font-size: .84rem !important; }
/* 교사 화면 — 판이 화면을 채운다(프로젝터). 글자·조작부를 키우고 안내 줄은 접는다. */
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage { position: fixed; inset: 0; z-index: 400; margin: 0; border-radius: 0; border: 0; overflow: auto; font-size: 1.12rem; }
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage .dsx-sim-guide { display: none; }
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage .dsx-sim-main { grid-template-columns: 320px minmax(0, 1fr); }
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage .dsx-sim-kpi b { font-size: 1.7rem; }
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage .dsx-sim-kpi.hero b { font-size: 2.8rem; }
body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage .dsx-stage-btn { background: var(--dsx-ink); color: #fff; border-color: var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"].dsx-staging { overflow: hidden; }

/* ---------- 14. 정리·확인 — 탐험 일지 + 확인 문제 ---------- */
body[data-subject="ds"][data-edition="adv"] .dsx-log { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 26px; }
body[data-subject="ds"][data-edition="adv"] .dsx-log li { min-width: 0; padding: 12px 0 0; border-top: 2px solid var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .dsx-log li > span { font-size: .74rem; font-weight: 800; letter-spacing: .04em; color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-log li p { margin: 6px 0 0; font-size: .95rem; line-height: 1.66; }
body[data-subject="ds"][data-edition="adv"] .qa-note { margin: 0 0 18px; background: #fff; border: 1px solid var(--dsx-line); color: var(--dsx-ink-2); }
body[data-subject="ds"][data-edition="adv"] .quiz { position: relative; margin: 16px 0; padding: 22px 26px 20px 74px; border: 1px solid var(--dsx-line); border-radius: var(--dsx-r); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .quiz .quiz-q { font-size: 1rem; line-height: 1.8; }
body[data-subject="ds"][data-edition="adv"] .quiz .quiz-q > strong:first-child {
  position: absolute; left: 24px; top: 22px; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; background: var(--dsx-teal-deep); color: #fff; font-family: var(--font-serif); font-size: .98rem;
}
body[data-subject="ds"][data-edition="adv"] .quiz:has(.qa-model.on) .quiz-q > strong:first-child { background: var(--ok); box-shadow: 0 0 0 4px #dcfce7; }
body[data-subject="ds"][data-edition="adv"] .qa textarea.qa-draft { background: var(--dsx-bg-2); border: 1.5px solid var(--dsx-line); border-radius: 12px; }
body[data-subject="ds"][data-edition="adv"] .qa textarea.qa-draft:focus { border-color: var(--dsx-teal); box-shadow: 0 0 0 4px var(--dsx-teal-50); }
body[data-subject="ds"][data-edition="adv"] .qa-bar .btn.qa-submit { background: var(--dsx-teal-deep); box-shadow: none; }
body[data-subject="ds"][data-edition="adv"] .qa-model { background: var(--dsx-teal-50); border: 1px solid var(--dsx-teal-100); border-left: 4px solid var(--dsx-teal); border-radius: 4px 14px 14px 4px; }
body[data-subject="ds"][data-edition="adv"] .qa-model .qa-model-label { color: var(--dsx-teal-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-qtable { margin: 12px 0 2px; overflow-x: auto; }
body[data-subject="ds"][data-edition="adv"] .dsx-qtable table { width: 100%; border-collapse: collapse; font-size: .9rem; font-weight: 400; }
body[data-subject="ds"][data-edition="adv"] .dsx-qtable th { padding: 7px 10px; text-align: left; font-size: .74rem; font-weight: 700; color: var(--dsx-soft); border-bottom: 1px solid var(--dsx-ink); }
body[data-subject="ds"][data-edition="adv"] .dsx-qtable td { padding: 6px 8px; border-bottom: 1px solid var(--dsx-line-2); vertical-align: middle; }
body[data-subject="ds"][data-edition="adv"] .dsx-qtable td.name { width: 78px; font-weight: 800; white-space: nowrap; }
body[data-subject="ds"][data-edition="adv"] .dsx-qtable textarea.qa-cell { background: var(--dsx-orange-50); }

/* ---------- 15. 더 알아보기 ---------- */
body[data-subject="ds"][data-edition="adv"] .explore { gap: 20px; }
body[data-subject="ds"][data-edition="adv"] .ex-card { border-color: var(--dsx-line); border-radius: var(--dsx-r); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .ex-card:has(> .ex-visual:not(.photo)) { grid-template-columns: minmax(0, 45%) minmax(0, 1fr); }
body[data-subject="ds"][data-edition="adv"] .ex-visual:not(.photo) { padding: 24px 22px; background: var(--dsx-bg-2); border-right-color: var(--dsx-line-2); }
body[data-subject="ds"][data-edition="adv"] .ex-visual svg.dsx-svg { max-height: 420px; }
body[data-subject="ds"][data-edition="adv"] .ex-kind { background: transparent; color: var(--dsx-orange-ink); padding: 0; border-radius: 0; font-size: .72rem; letter-spacing: .06em; }
body[data-subject="ds"][data-edition="adv"] .ex-body h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }

/* ---------- 16. 아래 길잡이 — 이전 / 다음 (한 가지 단추) ---------- */
body[data-subject="ds"][data-edition="adv"] .nav-foot { margin: 60px 0 30px; }
body[data-subject="ds"][data-edition="adv"] .nav-foot a { padding: 18px 22px; border: 1px solid var(--dsx-line); border-radius: var(--dsx-r); box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] .nav-foot a:hover { border-color: var(--dsx-teal); }
body[data-subject="ds"][data-edition="adv"] .nav-foot a .dir { color: var(--dsx-teal-deep); letter-spacing: .02em; }
body[data-subject="ds"][data-edition="adv"] .nav-foot a .where { font-family: var(--font-serif); font-weight: 700; font-size: 1.04rem; line-height: 1.5; }
body[data-subject="ds"][data-edition="adv"] footer.tb-footer { border-top-color: var(--dsx-line); }
body[data-subject="ds"][data-edition="adv"] > button[aria-label="맨 위로"] { background: #fff !important; color: var(--dsx-teal-deep) !important; border: 1px solid var(--dsx-line) !important; box-shadow: var(--dsx-sh-lg) !important; }

/* ---------- 17. 좁은 화면 ---------- */
@media (max-width: 1080px) {
  body[data-subject="ds"][data-edition="adv"] .dsx-hero-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-split { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-main { grid-template-columns: 250px minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-pair { grid-template-columns: minmax(0, 1fr) 150px; }
}
@media (max-width: 960px) {
  body[data-subject="ds"][data-edition="adv"] .dsx-hero-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-brief { max-width: 560px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-split { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-pairs { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-gear-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-gear-col + .dsx-gear-col { border-left: 0; border-top: 1px solid var(--dsx-line-2); }
  /* 실행 칸 — 한 줄로 쌓는다: 머리 → 안내 → 코드 → 단추 → 결과 */
  body[data-subject="ds"][data-edition="adv"] .pyrun { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body[data-subject="ds"][data-edition="adv"] .pyrun::before, body[data-subject="ds"][data-edition="adv"] .pyrun::after { display: none; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-cap, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-note, body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out[hidden] { grid-column: 1; grid-row: auto; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code { position: static; background: #fbfcfd; border-bottom: 1px solid var(--dsx-line-2); }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar { border-left: 0; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out[hidden] { position: static; border-left: 0; min-height: 0; background: var(--dsx-bg-2); }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out:empty::before { min-height: 0; padding: 12px 0; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-main { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-ctrl { border-right: 0; border-bottom: 1px solid var(--dsx-line-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi:nth-child(4) { border-left: 0; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi:nth-child(n+4) { border-top: 1px solid var(--dsx-line-2); }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-chal { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim.is-stage .dsx-sim-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body[data-subject="ds"][data-edition="adv"] { --dsx-sticky: 100px; }
  body[data-subject="ds"][data-edition="adv"] .wrap { padding: 0 16px; }
  body[data-subject="ds"][data-edition="adv"] main { padding-top: 34px; }
  body[data-subject="ds"][data-edition="adv"] .tb-header .bar { padding: 8px 16px 3px; }
  /* 여정 막대 — 이름은 지금 정거장 하나만(미션 번호까지) */
  body[data-subject="ds"][data-edition="adv"] .dsx-route-in { padding: 3px 16px 9px; gap: 10px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-route-lab, body[data-subject="ds"][data-edition="adv"] .dsx-route-more { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-route-track { gap: 4px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-route-track .lb { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-route-now { display: block; flex: none; max-width: 46%; font-size: .74rem; font-weight: 800; color: var(--dsx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
  body[data-subject="ds"][data-edition="adv"] .hero { padding: 32px 0 30px; }
  body[data-subject="ds"][data-edition="adv"] .hero h1 { font-size: 2rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-h1-sub { font-size: 1.08rem; margin-bottom: 14px; }
  body[data-subject="ds"][data-edition="adv"] .hero p.lead { font-size: 1rem; line-height: 1.8; }
  body[data-subject="ds"][data-edition="adv"] .dsx-meta { gap: 8px 0; }
  body[data-subject="ds"][data-edition="adv"] .dsx-meta li { padding: 0 10px; font-size: .82rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-meta li:nth-child(4) { flex-basis: 100%; padding-left: 0; border-left: 0; }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap { padding: 10px 12px 9px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap li { width: 18px; height: 18px; font-size: .56rem; border-width: 1.5px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap li.now { width: 26px; height: 26px; font-size: .72rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::before, body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::after { left: 9px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::before { right: 9px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap ol::after { width: calc((100% - 18px) * var(--done, 0) / (var(--n, 14) - 1)); }
  body[data-subject="ds"][data-edition="adv"] .dsx-unitmap-foot { font-size: .7rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-brief { padding: 16px 16px 14px; border-radius: 16px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-brief-q { font-size: 1.04rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-kpi b { font-size: 1.4rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-goals { margin-bottom: 46px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-goals ol { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* 정거장 — 왼쪽 길을 접고, 표지는 제자리(글 앞)에 */
  body[data-subject="ds"][data-edition="adv"] .section.dsx-st { padding-left: 0; margin-bottom: 68px; }
  body[data-subject="ds"][data-edition="adv"] .section.dsx-st::before { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-st > .sec-head { gap: 12px; margin-bottom: 22px; min-height: 0; align-items: flex-start; }
  body[data-subject="ds"][data-edition="adv"] .dsx-st > .sec-head .sec-num { position: static; flex: none; width: 42px; height: 42px; font-size: 1.12rem; box-shadow: none; margin-top: 2px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-st.is-now > .sec-head .sec-num { box-shadow: 0 0 0 4px var(--dsx-teal-100); }
  body[data-subject="ds"][data-edition="adv"] .dsx-st > .sec-head h2 { font-size: 1.4rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-h3 { margin-top: 42px; font-size: 1.1rem; align-items: flex-start; }
  body[data-subject="ds"][data-edition="adv"] .dsx-h3::before { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-h3 > span { margin-top: 2px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-cp::before { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-news { transform: none; margin: 4px 0 0; }
  body[data-subject="ds"][data-edition="adv"] .dsx-plate { padding: 14px 14px 12px; margin-left: -4px; margin-right: -4px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-plate-head small { margin-left: 0; flex-basis: 100%; }
  body[data-subject="ds"][data-edition="adv"] table.dsx-sum { min-width: 0; font-size: .86rem; }
  body[data-subject="ds"][data-edition="adv"] table.dsx-sum th { white-space: normal; padding: 7px 5px; font-size: .68rem; line-height: 1.35; vertical-align: bottom; }
  body[data-subject="ds"][data-edition="adv"] table.dsx-sum td { padding: 9px 5px; }
  body[data-subject="ds"][data-edition="adv"] table.dsx-sum td.veil span { padding: 2px 5px; font-size: .64rem; }
  /* 세 도구 표 — 줄마다 카드로 세운다(열 이름은 칸 위에) */
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb, body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb tbody { display: block; min-width: 0; }
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb thead { display: none; }
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb tr { display: block; padding: 12px 2px; border-top: 1px solid var(--dsx-line-2); }
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb tbody tr:first-child { border-top: 0; padding-top: 2px; }
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb td { display: block; padding: 3px 0; border: 0; font-size: .9rem; }
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb td.hl { font-size: 1rem; padding-bottom: 6px; }
  body[data-subject="ds"][data-edition="adv"] table.tb.dsx-tb td[data-col]::before { content: attr(data-col); display: block; font-size: .7rem; font-weight: 800; color: var(--dsx-soft); }
  body[data-subject="ds"][data-edition="adv"] .dsx-predict { padding: 14px 14px 16px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-predict-head { flex-direction: column; gap: 8px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-predict-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair > svg.fig-d { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair > svg.fig-m { display: block; }
  body[data-subject="ds"][data-edition="adv"] .dsx-fig-pair > svg.fig-m + svg.fig-m { padding-top: 18px; border-top: 1px solid var(--dsx-line-2); }
  body[data-subject="ds"][data-edition="adv"] .dsx-counter-claim p { margin-right: 0; margin-bottom: 30px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-pairs { gap: 14px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-pair { grid-template-columns: minmax(0, 1fr); padding: 12px 14px 13px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-pair > .dsx-svg { grid-column: 1; grid-row: auto; margin-top: 8px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-pair-v b { font-size: 1.7rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-compass { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-compass-rose { width: 150px; margin: 0 auto; }
  body[data-subject="ds"][data-edition="adv"] .dsx-compass ol { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .dsx-missions { gap: 4px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-missions a { padding: 7px 6px 8px; align-items: center; text-align: center; }
  body[data-subject="ds"][data-edition="adv"] .dsx-missions span { display: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-gear-head { padding: 15px 16px 13px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-gear-col { padding: 14px 16px 16px; }
  /* 미션 — 길 대신 미션 안쪽의 가는 청록 줄, 표지는 그 줄 위에 */
  body[data-subject="ds"][data-edition="adv"] .dsx-mission { margin-top: 44px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-mission-head { align-items: flex-start; gap: 10px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-mno { position: static; margin: 0; width: 30px; height: 30px; box-shadow: none; flex: none; }
  body[data-subject="ds"][data-edition="adv"] .dsx-mission-head h3 { font-size: 1.04rem; line-height: 1.45; padding-top: 3px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-stage { display: flex; flex-direction: column; }
  body[data-subject="ds"][data-edition="adv"] .dsx-stage > * { min-width: 0; }
  body[data-subject="ds"][data-edition="adv"] .dsx-stage::after { position: static; order: -1; margin: 0 0 7px; padding-left: 21px; line-height: 16px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-stage::before { left: 0; top: 1px !important; }
  body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="predict"]::before, body[data-subject="ds"][data-edition="adv"] .dsx-stage[data-stage="interpret"]::before { left: 14px; top: 13px !important; }
  body[data-subject="ds"][data-edition="adv"] .dsx-checks label { padding: 6px 4px; font-size: .92rem; }
  body[data-subject="ds"][data-edition="adv"] .pyrun { border-radius: 14px; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-cap { padding: 10px 12px; font-size: .86rem; }
  body[data-subject="ds"][data-edition="adv"] .pyrun .py-cap .py-tag { display: none; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-note { padding: 7px 12px; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code { padding: 12px 12px 14px; font-size: .8rem; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-bar { padding: 9px 10px; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out, body[data-subject="ds"][data-edition="adv"] .pyrun > .py-out[hidden] { padding: 12px 10px 14px; font-size: .8rem; }
  body[data-subject="ds"][data-edition="adv"] .pyrun .py-out .py-fig { padding: 6px; border-radius: 10px; }
  body[data-subject="ds"][data-edition="adv"] .sim-panel.dsx-sim { border-radius: 16px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim .sim-head { padding: 12px 14px; flex-wrap: wrap; }
  body[data-subject="ds"][data-edition="adv"] .dsx-stage-btn { order: 3; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-guide { padding: 9px 14px; gap: 6px 14px; font-size: .8rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-ctrl { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-stage { padding: 12px 10px 8px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi { padding: 9px 10px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi b { font-size: 1.1rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-kpi.hero b { font-size: 1.6rem; }
  body[data-subject="ds"][data-edition="adv"] .dsx-sim-chal { padding: 12px 12px 14px; gap: 8px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-log { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-recall { flex-direction: column; gap: 6px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-cp { flex-wrap: wrap; gap: 6px 12px; padding: 11px 14px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-cp p { flex-basis: 100%; order: 2; }
  body[data-subject="ds"][data-edition="adv"] .dsx-cp-next { order: 3; }
  body[data-subject="ds"][data-edition="adv"] .quiz { padding: 58px 16px 16px 16px; border-radius: 14px; }
  body[data-subject="ds"][data-edition="adv"] .quiz .quiz-q > strong:first-child { left: 16px; top: 16px; width: 32px; height: 32px; }
  body[data-subject="ds"][data-edition="adv"] .dsx-qtable td.name { width: auto; }
  body[data-subject="ds"][data-edition="adv"] .ex-card:has(> .ex-visual:not(.photo)) { grid-template-columns: minmax(0, 1fr); }
  body[data-subject="ds"][data-edition="adv"] .ex-visual:not(.photo) { padding: 16px 12px; border-right: 0; border-bottom: 1px solid var(--dsx-line-2); }
  body[data-subject="ds"][data-edition="adv"] .nav-foot a { padding: 14px 16px; }
  body[data-subject="ds"][data-edition="adv"] > button[aria-label="맨 위로"] { right: 12px !important; bottom: 12px !important; width: 38px !important; height: 38px !important; font-size: 1rem !important; }
}
@media print {
  body[data-subject="ds"][data-edition="adv"] .dsx-route, body[data-subject="ds"][data-edition="adv"] .dsx-topo, body[data-subject="ds"][data-edition="adv"] .dsx-stage-btn { display: none !important; }
  body[data-subject="ds"][data-edition="adv"] .pyrun { display: block; }
  body[data-subject="ds"][data-edition="adv"] .pyrun > textarea.py-code { position: static; }
  body[data-subject="ds"][data-edition="adv"] .section.dsx-st::before { display: none; }
}

/* ── 랜딩·마무리 (2026-09-25) ────────────────────────────────────
   차시 밖 아홉 쪽(과목 랜딩 1 · 단원 랜딩 4 · 단원 마무리 4)이 쓰는 둘.
   규격은 _design/LANDING_CLOSING_SPEC.md. 없어도 쪽은 서지만 모양이 이 책 값이 아니다. */
body[data-subject="ds"][data-edition="adv"] .dsx-checks.dsx-selfcheck {
  background: #fff; border: 1px solid var(--dsx-line); border-radius: var(--dsx-r);
  padding: 8px 10px; box-shadow: var(--dsx-sh);
}
/* 빌려 쓴 카드 둘(textbook.css 의 .unit-card · .roadmap .rm-item) — 이 책에는 미끄러지는 카드가 없다 */
body[data-subject="ds"][data-edition="adv"] a.unit-card, body[data-subject="ds"][data-edition="adv"] .roadmap a.rm-item { box-shadow: var(--dsx-sh); }
body[data-subject="ds"][data-edition="adv"] a.unit-card:hover, body[data-subject="ds"][data-edition="adv"] .roadmap a.rm-item:hover { box-shadow: var(--dsx-sh-lg); transform: none; }
