/* 목적: learning-method.html 「학습 과정 한눈에」 도표 3장(학생 학습 흐름·교재 체계도·학부모 질문 흐름) 전용.
   원본 시안 = docs/diagrams/*.html(고정 폭 SVG, 2026-10-20) — 색 값은 원본 그대로, 배치만 반응형으로 다시 짰다.
   폰(기본) = 세로로 쌓고 화살표 ↓ · 넓은 화면(≥900px) = 원본처럼 한 줄에 화살표 →. 화살표는 CSS 선+삼각형.
   글꼴은 지정하지 않고 페이지 글꼴을 따른다(inherit). */
.dg{font-family:inherit;word-break:keep-all;background:#f3eee6;border:1px solid #e6dfd1;border-radius:16px;padding:22px 16px;margin-top:18px;box-shadow:0 4px 18px rgba(90,74,48,.08)}
.dg h3{font-size:21px;line-height:1.45;margin:0 0 6px;color:#18233f}
.dg-sub{font-size:16px;line-height:1.7;color:#6a5f4d}
/* 페이지 기본 p·ol·ul·li 여백 초기화 — :where 로 우선순위를 낮춰 아래 클래스 규칙이 이기게 한다 */
:where(.dg) p{margin:0}
:where(.dg) ol,:where(.dg) ul{list-style:none;margin:0;padding:0}
:where(.dg) li{margin:0}
.dg-zone{background:rgba(24,35,63,.03);border:1px solid #e6dfd1;border-radius:8px;padding:16px 14px 20px;margin-top:16px}
.dg-zone h4{font-size:18px;line-height:1.5;font-weight:700;color:#18233f;margin:0 0 14px}

/* 색 — 원본 HTML 값 그대로(교재 색 = 학생 홈 브랜드 색) */
.c-navy{--c:#18233f}.c-blue{--c:#2563c9}.c-orange{--c:#c24e00}.c-green{--c:#05834e}.c-gold{--c:#d99e1f}
.c-red{--c:#d73220}.c-yellow{--c:#f4b01c}.c-purple{--c:#9a47e2}.c-src{--c:#6a5f4d}

/* 카드: 색 테두리 + 왼쪽 띠(안쪽 그림자) */
.dg-card{position:relative;flex:1;background:#fffdfa;border:2px solid var(--c);border-radius:8px;box-shadow:inset 10px 0 0 var(--c);padding:12px 14px 14px 24px;font-size:16px;line-height:1.55;color:#6a5f4d}
.dg-card.is-parent{background:#fbf3dd}
.dg-tag{display:inline-block;min-width:34px;padding:0 10px;border-radius:12px;background:var(--c);color:#fff;font-size:15px;font-weight:700;line-height:24px;text-align:center}
.c-gold .dg-tag,.c-yellow .dg-tag{color:#18233f}
.dg-nm{display:block;font-size:20px;line-height:1.4;font-weight:700;color:#18233f;margin:8px 0 6px}

/* 교재 카드(가운데 정렬) */
.dg-book{text-align:center}
.dg-book .dg-tag{display:block;width:fit-content}
.dg-book .dg-nm{font-size:24px}
.dg-hj{font-size:17px;font-weight:400;color:#6a5f4d;margin-left:8px}
.dg-src{background:rgba(24,35,63,.06);border-width:1.6px;box-shadow:none;padding-left:16px}

/* 학부모 질문 카드 */
.dg-q{border-width:1.5px}
.dg-qt{display:block;font-size:18px;line-height:1.5;font-weight:700;color:#18233f;border-bottom:1px solid #e6dfd1;padding-bottom:8px;margin-bottom:8px}
.dg-a1{font-weight:500;color:#18233f}
.dg .dg-hd{background:var(--c);color:#fff;border-radius:20px;text-align:center;font-size:18px;font-weight:700;line-height:40px;margin:0}

/* 단계 줄 — 폰: 세로 + ↓ */
.dg-steps{display:flex;flex-direction:column;gap:34px}
.dg-steps>li{position:relative;display:flex;flex-direction:column;gap:12px}
.dg-steps>li+li::before{content:"";position:absolute;left:50%;top:-29px;width:2px;height:16px;margin-left:-1px;background:#6a5f4d}
.dg-steps>li+li::after{content:"";position:absolute;left:50%;top:-13px;margin-left:-5px;border-style:solid;border-width:9px 5px 0;border-color:#6a5f4d transparent transparent}
/* 되돌아감(채점 → 풀기) — 폰은 한 줄 글 */
.dg-back{font-size:16px;line-height:1.6;color:#6a5f4d;text-align:center}
.dg-back::before{content:"\21A9\FE0E\00A0"}

/* 고등 세 갈래 — 폰: 원천 아래로 내려와 왼쪽 줄기에서 갈라짐 */
.dg-tree{--tx:14px;--pl:40px;--r:14px}
.dg-branch{position:relative;display:grid;grid-auto-rows:1fr;row-gap:var(--r);margin-top:var(--r);padding-left:var(--pl)}
.dg-branch::before{content:"";position:absolute;left:calc(var(--tx) - 1px);width:2px;top:calc(-1 * var(--r));bottom:calc((100% - 2 * var(--r)) / 6);background:#6a5f4d}
.dg-branch>li{position:relative;display:flex;flex-direction:column}
.dg-branch>li::before{content:"";position:absolute;top:50%;left:calc(var(--tx) - var(--pl));width:calc(var(--pl) - var(--tx) - 11px);height:2px;margin-top:-1px;background:#6a5f4d}
.dg-branch>li::after{content:"";position:absolute;top:50%;left:-11px;margin-top:-5px;border-style:solid;border-width:5px 0 5px 9px;border-color:transparent transparent transparent #6a5f4d}
.dg-note{position:relative;margin-top:18px}
.dg-note strong{display:block;font-size:20px;line-height:1.5;color:#18233f;margin-bottom:4px}
.dg-note p{font-size:17px;line-height:1.65;color:#6a5f4d}

/* 범례 */
.dg-legend{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:16px;padding-top:14px;border-top:1px solid #e6dfd1;font-size:15px;line-height:1.6;color:#6a5f4d}
.dg-legend>span{position:relative}
.lg-next{padding-left:26px}
.lg-next::before{content:"";position:absolute;left:9px;top:2px;width:2px;height:11px;background:#6a5f4d}
.lg-next::after{content:"";position:absolute;left:5px;top:13px;border-style:solid;border-width:9px 5px 0;border-color:#6a5f4d transparent transparent}
.lg-back::before{content:"\21A9\FE0E\00A0"}
.lg-sw{padding-left:32px}
.lg-sw::before{content:"";position:absolute;left:0;top:50%;width:22px;height:16px;margin-top:-8px;border-radius:3px;border:1.2px solid var(--sc);background:var(--sb)}
.lg-parent{--sc:#d99e1f;--sb:#fbf3dd}.lg-book{--sc:#18233f;--sb:#fffdfa}.lg-src{--sc:#6a5f4d;--sb:rgba(24,35,63,.06)}

/* 넓은 화면 — 본문 폭(680px) 밖으로 넓혀 원본처럼 한 줄 */
@media(min-width:900px){
  .dg{--w:min(1240px,calc(100vw - 48px));width:var(--w);margin-left:calc(50% - var(--w) / 2);padding:28px 28px 24px}
  .dg-zone{padding:18px 20px 22px}
  .dg-card{font-size:15px}
  .dg-steps{display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr));gap:0 34px}
  .dg-steps--4{--n:4}
  .dg-steps>li+li::before{left:-29px;top:50%;width:16px;height:2px;margin:-1px 0 0}
  .dg-steps>li+li::after{left:-13px;top:50%;margin:-5px 0 0;border-width:5px 0 5px 9px;border-color:transparent transparent transparent #6a5f4d}
  /* 학부모 질문: 시기 머리(높이 40) 가운데에 화살표, 카드 줄은 열끼리 맞춤 */
  .dg-steps--top{grid-template-rows:repeat(4,auto);row-gap:16px}
  .dg-steps--top>li{display:grid;grid-row:span 4;grid-template-rows:subgrid}
  .dg-steps--top>li+li::before,.dg-steps--top>li+li::after{top:20px}
  /* 되돌아감: 채점 카드 아래에서 풀기 카드 아래로 ㄷ자 화살표 */
  .dg-steps--back{padding-bottom:70px}
  .dg-back{position:absolute;top:100%;right:50%;width:calc(100% + 34px);height:24px}
  .dg-back::before{content:"";position:absolute;inset:0;border:2px solid #6a5f4d;border-top:0;border-radius:0 0 4px 4px}
  .dg-back::after{content:"";position:absolute;left:-4px;top:0;border-style:solid;border-width:0 5px 9px;border-color:transparent transparent #6a5f4d}
  .dg-back span{position:absolute;left:50%;top:32px;transform:translateX(-50%);white-space:nowrap}
  /* 고등: 원천 | 세 갈래 | 서로 겹치지 않음 */
  .dg-tree{--tx:24px;--pl:56px;--r:24px;display:grid;grid-template-columns:minmax(0,340fr) minmax(0,436fr) minmax(0,364fr);align-items:center}
  .dg-tree>.dg-src::after{content:"";position:absolute;top:50%;left:100%;width:calc(var(--tx) + 1.6px);height:2px;margin-top:-1px;background:#6a5f4d}
  .dg-branch{margin-top:0}
  .dg-branch::before{top:calc((100% - 2 * var(--r)) / 6)}
  .dg-note{align-self:stretch;display:flex;flex-direction:column;justify-content:center;margin:0 0 0 24px;padding-left:36px}
  .dg-note::before{content:"";position:absolute;left:0;top:0;bottom:0;width:8px;border:1.2px solid #9a8f7d;border-left:0}
  .dg-note strong{font-size:21px}
  /* 범례 샘플도 가로로 */
  .lg-next{padding-left:44px}
  .lg-next::before{left:0;top:50%;width:26px;height:2px;margin-top:-1px}
  .lg-next::after{left:26px;top:50%;margin-top:-5px;border-width:5px 0 5px 9px;border-color:transparent transparent transparent #6a5f4d}
  .lg-back{padding-left:46px}
  .lg-back::before{content:"";position:absolute;left:4px;top:50%;width:30px;height:12px;margin-top:-4px;border:2px solid #6a5f4d;border-top:0}
  .lg-back::after{content:"";position:absolute;left:0;top:50%;margin-top:-6px;border-style:solid;border-width:0 5px 9px;border-color:transparent transparent #6a5f4d}
}

/* 교재 카드 누르면 설명 창(원장 2026-10-24 「개념망 누르면 어떤 교재인지 보게」) — 문구는 about.html STEP 설명 그대로 */
button.dg-book{font:inherit;width:100%;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;transition:transform .15s,box-shadow .15s}
button.dg-book:hover{transform:translateY(-2px);box-shadow:inset 10px 0 0 var(--c),0 6px 16px rgba(90,74,48,.18)}
button.dg-book:focus-visible{outline:3px solid #d99e1f;outline-offset:3px}
.dg-ds{display:block}
.dg-more{display:inline-block;margin-top:10px;padding:3px 12px;border-radius:999px;border:1px solid #e6dfd1;background:#f3eee6;font-size:14px;font-weight:700;line-height:1.6;color:#18233f}
.dg-more::after{content:" \203A"}
.dg-pop{width:min(560px,100%);max-width:100%;max-height:88svh;margin:auto auto 0;padding:0;border:0;border-radius:18px 18px 0 0;background:#fffdfa;color:#18233f;box-shadow:0 -8px 30px rgba(24,35,63,.25);overflow-y:auto;overscroll-behavior:contain}
.dg-pop::backdrop{background:rgba(24,35,63,.45)}
.dg-pop-in{position:relative;padding:22px 20px calc(22px + env(safe-area-inset-bottom,0px))}
.dg-pop-x{position:absolute;right:8px;top:8px;width:44px;height:44px;border:0;background:transparent;font-size:30px;line-height:1;color:#6a5f4d;cursor:pointer}
.dg-pop .dg-pop-t{font-size:26px;line-height:1.35;font-weight:800;color:#18233f;margin:12px 0 2px}
.dg-pop .dg-hun{font-size:15px;color:#9a8f7d;margin-bottom:14px}
.dg-pop .dg-what,.dg-pop .dg-eff{font-size:17px;line-height:1.75;color:#3d3a33}
.dg-pop .dg-what b,.dg-pop .dg-eff b{display:block;font-size:16px;color:#18233f;margin-bottom:2px}
.dg-pop .dg-eff{margin-top:12px;background:#f3eee6;border-left:4px solid var(--c);border-radius:8px;padding:10px 14px}
.dg-shot{margin:16px 0 0}
.dg-shot img{display:block;width:100%;max-width:300px;height:auto;margin:0 auto;border-radius:12px;border:1px solid #4a505c;background:#22262e}
.dg-shot.is-wide img{max-width:100%;border-color:#e6dfd1}
.dg-shot figcaption{margin-top:6px;font-size:14px;line-height:1.6;color:#6a5f4d;text-align:center}
.dg-pop .dg-pop-foot{margin-top:16px;padding-top:12px;border-top:1px solid #e6dfd1;font-size:15px;line-height:1.6;color:#6a5f4d}
@media(min-width:900px){.dg-pop{margin:auto;border-radius:18px;max-height:86vh}}
