/* ==========================================================================
   EduFlow AI · 학생부 마인드맵 v3.1 — 스타일
   단순한 화면 · 읽히는 글씨 · 절제된 색. 정보는 데이터에, 화면에는 필요한 것만.
   ========================================================================== */
:root{
  --navy:#16233a; --navy2:#24344f; --ink:#1d2a3d; --ink2:#41506a;
  --mute:#7b8698; --line:#e2e7ee; --line2:#eef1f5;
  --bg:#f3f5f8; --paper:#ffffff;
  --red:#c0392b; --amber:#b45309; --blue:#2563eb;
  --shadow-s:0 1px 2px rgba(20,35,60,.06);
  --shadow-m:0 6px 20px -10px rgba(20,35,60,.24);
  --radius:7px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  height:100vh; overflow:hidden; display:flex; flex-direction:column;
  background:var(--bg); color:var(--ink);
  font-family:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Segoe UI",Roboto,sans-serif;
  -webkit-font-smoothing:antialiased; font-size:14px; letter-spacing:-.005em;
}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
select{font:inherit;color:inherit}
h1,h2,h3,h4,p{margin:0}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#cfd6df;border-radius:8px;border:2px solid var(--bg)}
::-webkit-scrollbar-track{background:transparent}

/* ---------------- 상단 한 줄 ---------------- */
.top{flex:0 0 auto;background:var(--paper);border-bottom:1px solid var(--line);position:relative;z-index:60}
.row1{display:flex;align-items:center;gap:10px;height:54px;padding:0 16px;overflow:visible}
.brand{display:flex;align-items:baseline;gap:6px;white-space:nowrap;margin-right:6px}
.brand b{font-size:15px;letter-spacing:-.02em;color:var(--navy);font-weight:800}
.brand span{font-size:10.5px;color:#a5b0bf;font-weight:700}
.tabs{display:flex;gap:3px;background:#eef1f5;border-radius:9px;padding:3px}
.tabs button{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;font-size:12.5px;font-weight:700;color:#5d6a7c;border-radius:7px;white-space:nowrap}
.tabs button.on{background:#fff;color:var(--navy);box-shadow:var(--shadow-s)}
.tabs button .dotmark{width:6px;height:6px;border-radius:2px;background:#9aa5b5}
.tabs button.on .dotmark{background:var(--navy)}
.seg{display:flex;background:#f1f3f7;border:1px solid var(--line);border-radius:8px;padding:2px;gap:1px}
.seg button{padding:5px 10px;font-size:12.5px;font-weight:600;color:#5d6a7c;border-radius:6px;white-space:nowrap}
.seg button.on{background:#fff;color:var(--navy);box-shadow:var(--shadow-s)}
.seg button:disabled{color:#c2c9d3;cursor:default}
.seg.tiny button{padding:4px 8px;font-size:11.5px}
.selsm{font-size:12px;border:1px solid var(--line);border-radius:7px;padding:6px 6px;background:#fff;color:#41506a}
.btn{display:inline-flex;align-items:center;gap:5px;padding:6px 11px;font-size:12.5px;font-weight:600;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink2);white-space:nowrap}
.btn:hover{border-color:#c9d2de;background:#fbfcfe}
.btn.on{background:var(--navy);border-color:var(--navy);color:#fff}
.btn.ai.on{background:#6d4bb8;border-color:#6d4bb8}
.btn.auto.on{background:#0f766e;border-color:#0f766e}
.btn.auto.on .sw{background:#5eead4}
.btn.ghost{border-color:transparent;background:transparent;color:#4b586b}
.btn.ghost:hover{background:#f1f4f8}
.btn.ghost.on{background:#eef2f9;color:var(--navy);border-color:#d7e0ec}
.btn.caret::after{content:"▾";font-size:9px;color:#8b95a5;margin-left:1px}
.btn .sw{width:26px;height:14px;border-radius:99px;background:#d6dce5;position:relative;transition:.15s}
.btn .sw::after{content:"";position:absolute;top:2px;left:2px;width:10px;height:10px;border-radius:50%;background:#fff;transition:.15s}
.btn.on .sw{background:#8fa4c4}
.btn.on .sw::after{left:14px}
.btn.ai.on .sw{background:#a78bfa}
.spacer{flex:1 1 auto;min-width:6px}
.hide{display:none !important}

/* 드롭다운 메뉴 */
.menu{position:fixed;z-index:75;background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 22px 50px -18px rgba(15,30,50,.4);padding:7px}
.menu>button{display:flex;width:100%;align-items:center;gap:6px;text-align:left;padding:7px 10px;font-size:12.5px;color:#33415a;border-radius:7px}
.menu>button:hover{background:#f2f5f9;color:var(--navy)}
.menu>button b{font-size:10.5px;color:#7b8698;background:#f1f4f8;border-radius:99px;padding:1px 6px;margin-left:auto}
.menu .msep{display:block;height:1px;background:var(--line2);margin:5px 4px}
.menu .mlabel{font-size:9.5px;letter-spacing:.1em;color:#a5b0bf;font-weight:800;padding:2px 10px 3px}
.menu .mgroup+.mgroup{margin-top:6px;border-top:1px solid var(--line2);padding-top:5px}
.menu .mseg{display:flex;gap:4px;padding:2px 8px 5px}
.menu .mseg button{flex:1;font-size:11.5px;border:1px solid var(--line);border-radius:6px;padding:5px 3px;color:#5d6a7c;background:#fff;white-space:nowrap}
.menu .mseg button.on{background:var(--navy);border-color:var(--navy);color:#fff;font-weight:700}
.menu .mnote{font-size:10.5px;color:#93a0b2;padding:2px 10px 3px;line-height:1.45}

/* ---------------- 작업 영역 ---------------- */
.stage{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;position:relative}
.view{flex:1 1 auto;min-height:0;display:none;flex-direction:column}
.view.on{display:flex}
.board{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:var(--paper);margin:10px 12px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden;position:relative}
.boardhead{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:7px 14px;border-bottom:1px solid var(--line2);background:#fcfdfe}
.boardhead h2{font-size:15px;font-weight:800;color:var(--navy);letter-spacing:-.02em}
.boardhead .scopeNote{font-size:11.5px;font-weight:700;color:#5d6a7c;background:#f1f4f8;border-radius:99px;padding:2px 9px}
.boardhead .hint{font-size:11.5px;color:#a0aab8;margin-left:auto;white-space:nowrap}
.canvas{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;background:
  linear-gradient(rgba(22,35,58,.018) 1px,transparent 1px) 0 0/46px 46px,
  #f7f8fa}
.zoomer{transform-origin:0 0;width:100%;flex:0 0 auto}
.sheet{position:relative;padding:4px;width:100%;min-width:1180px}

/* 확대/축소 · 작업 영역 한쪽 */
.zoombox{position:absolute;right:18px;bottom:48px;z-index:32;display:flex;align-items:center;gap:1px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:2px;box-shadow:var(--shadow-m)}
.zoombox button{padding:4px 8px;font-size:12px;color:#5d6a7c;border-radius:6px}
.zoombox button:hover{background:#f1f4f8;color:var(--navy)}
.zoombox .pct{min-width:44px;text-align:center;font-variant-numeric:tabular-nums;font-size:11.5px;color:#6b7789}

/* ---------------- 활동 카드 (기본 2줄) ---------------- */
.card{
  position:relative;z-index:2;background:#fff;border:1px solid #dde3ea;border-radius:var(--radius);
  padding:6px 8px;min-height:46px;cursor:pointer;display:flex;flex-direction:column;gap:1px;
  transition:box-shadow .12s,border-color .12s,opacity .12s;box-shadow:0 1px 1px rgba(20,35,60,.03);
}
.card:hover{border-color:var(--cat);box-shadow:var(--shadow-m);z-index:4}
.card .cmeta{font-size:11px;color:#77839a;display:flex;align-items:center;gap:4px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card .cmeta .g{font-weight:700;color:#5d6a7c}
.card .ctitle{font-size:15px;font-weight:750;color:#16233a;line-height:1.27;letter-spacing:-.015em;word-break:keep-all;overflow-wrap:anywhere}
.card .ckw{font-size:11px;color:#8b95a5;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.card .ckw .kw{cursor:pointer;border-radius:3px;padding:0 1px}
.card .ckw .kw:hover{color:var(--cat);background:#f2f5f9;text-decoration:underline}
.card.core{border:2px solid var(--cat);padding:5px 7px;min-height:50px;background:var(--tint)}
.card.core .ctitle{font-size:15.5px;font-weight:800}
.card.st-gap{border-color:#d98a2b;background:#fffaf2}
.card.st-gap::after{content:"보완";position:absolute;top:-1px;right:6px;font-size:9px;font-weight:800;color:#fff;background:#d98a2b;border-radius:0 0 4px 4px;padding:1px 4px;letter-spacing:.02em}
.card.st-missing{border-style:dashed;border-color:#c9d0da;background:#fbfcfd}
.card.st-proof{border-color:#a99ad9;background:#fbfaff}
.card.st-proof::after{content:"근거 확인";position:absolute;top:-1px;right:6px;font-size:9px;font-weight:800;color:#fff;background:#7c6bc0;border-radius:0 0 4px 4px;padding:1px 4px;letter-spacing:.02em}
.card.st-low{background:#fbfcfd;opacity:.86}
.card.st-low::after{content:"낮음";position:absolute;top:-1px;right:6px;font-size:9px;font-weight:800;color:#6b7789;background:#e6eaf0;border-radius:0 0 4px 4px;padding:1px 4px;letter-spacing:.02em}
.card.st-missing .ctitle{color:#8d97a6}
.card.st-planned{border-style:dashed;border-color:#bda9e6;background:#fbf8ff}
.card.st-ai{border:1px dashed #b9a6e0;background:#fdfbff;box-shadow:none}
.card.st-ai .ctitle{color:#5b4b86}
.card .flag{font-size:9.5px;font-weight:800;letter-spacing:.03em;border-radius:3px;padding:0 3px;margin-left:auto}
.card .flag.ai{color:#6d4bb8;background:#f0ebfb}
.card.dim{opacity:.26}
.card.hl{box-shadow:0 0 0 2px #eab308,0 6px 16px -6px rgba(234,179,8,.5);z-index:5}
.card.sel{border-color:#2563eb !important;box-shadow:0 0 0 2px rgba(37,99,235,.22)}
.card .chk{position:absolute;top:6px;right:6px;width:15px;height:15px;border:1.5px solid #c2cbd8;border-radius:4px;background:#fff}
.card.sel .chk{background:#2563eb;border-color:#2563eb}
.card.sel .chk::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(42deg)}
.card .acts{display:none;position:absolute;right:-1px;bottom:-22px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:var(--shadow-m);padding:2px;gap:2px;z-index:8}
.card:hover .acts{display:flex}
.card .acts button{font-size:10px;padding:2px 5px;border-radius:4px;color:#5d6a7c;white-space:nowrap}
.card .acts button:hover{background:#eef2f8;color:var(--navy)}

/* ---------------- 탐구 전략 맵 ---------------- */
.stratgrid{
  display:flex;gap:10px;padding:6px 8px 10px;min-width:1180px;align-items:stretch;
}
.zcol{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:10px}
.zcol.center{flex:0 0 386px;max-width:386px;justify-content:flex-start}
.zcol.center .studentcard{margin-top:auto}
.zcol.center .zone.zE{margin-top:auto}
.zone{background:var(--zt);border:1px solid var(--zl);border-radius:11px;padding:6px 7px 7px;display:flex;flex-direction:column;gap:5px;position:relative}
.zhead{display:flex;align-items:baseline;gap:6px;padding:0 3px}
.zhead .zl{font-size:16px;font-weight:800;color:var(--zc);letter-spacing:-.02em}
.zhead .zn{margin-left:auto;font-size:10.5px;color:#8b95a5;font-variant-numeric:tabular-nums}
.zbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:6px;align-items:start}
.zone.zE .zbody{grid-template-columns:repeat(2,minmax(0,1fr))}
.catpanel{background:#fff;border:1px solid #e5e9ef;border-radius:9px;padding:5px 6px 6px;position:relative}
.catpanel.empty{background:#fbfcfd;border-style:dashed;border-color:#dfe4eb}
.cathead{display:flex;align-items:center;gap:5px;padding:0 1px 4px}
.cathead .cnum{font-size:9.5px;font-weight:800;color:#fff;background:var(--sc);border-radius:3px;padding:1px 4px;font-variant-numeric:tabular-nums}
.cathead .cname{font-size:15px;font-weight:750;color:#22314a;letter-spacing:-.02em}
.cathead .cstat{margin-left:auto;font-size:9.5px;font-weight:700;border-radius:4px;padding:1px 5px;white-space:nowrap}
.cstat.miss{color:#7b8698;background:#f0f2f5;border:1px dashed #d5dbe3}
.cstat.gap{color:#fff;background:#c0392b}
.cstat.ok{color:#6b7789;background:#f3f5f8}
.cathead .fold{margin-left:2px;color:#9aa5b5;font-size:10px;padding:0 3px;border-radius:4px}
.cathead .fold:hover{background:#f0f3f7;color:var(--navy)}
.catbody{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:6px}
.catpanel.folded .catbody,.catpanel.folded .morebtn{display:none}
.catpanel.folded{padding-bottom:2px}
.morebtn{grid-column:1 / -1;font-size:11px;color:#5d6a7c;border:1px dashed #d5dbe3;border-radius:5px;padding:3px;background:#fbfcfd}
.morebtn:hover{border-color:#b9c4d3;color:var(--navy)}

/* 중앙 학생 카드 */
.studentcard{
  width:100%;max-width:none;
  background:#152238;color:#fff;border-radius:13px;
  padding:20px 18px 16px;box-shadow:0 16px 36px -24px rgba(15,27,46,.55);
}
.studentcard .nm{font-size:26px;font-weight:800;letter-spacing:-.03em;line-height:1.15}
.studentcard .mj{font-size:21px;font-weight:700;color:#c6d6ec;margin-top:6px;letter-spacing:-.02em}
.studentcard .gd{font-size:14px;color:#a4b6cf;margin-top:12px;padding-top:11px;border-top:1px solid rgba(255,255,255,.14)}
.studentcard .scope2{font-size:12px;color:#8fa4c2;margin-top:5px}
.studentcard .demo2{font-size:10px;color:#7a8fae;margin-top:12px}
.legend{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:6px 12px 7px;border-top:1px solid var(--line2);font-size:11px;color:#7b8698;background:#fcfdfe}
.legend .k{display:inline-flex;align-items:center;gap:5px}
.legend .sw{width:14px;height:0;border-top:2px solid #7b8698;display:inline-block}
.legend .sw.dash{border-top-style:dashed}
.legend .sw.dot{border-top-style:dotted;border-color:#b9a6e0}
.legend .sq{width:10px;height:10px;border-radius:3px;border:1.5px solid #6b7789}
.legend .sq.gap{border-color:#d98a2b;background:#fffaf2}
.legend .sq.miss{border-style:dashed;border-color:#c9d0da;background:#fbfcfd}
.legend .sq.core{border-width:2px;border-color:#16233a}
.legend .hint2{margin-left:auto;color:#9aa5b5}

/* 개념 강조 바 */
.kwbar{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:30;display:none;align-items:center;gap:8px;background:#fffbea;border:1px solid #f0d48a;border-radius:9px;padding:6px 10px;font-size:12px;color:#7a5c12;box-shadow:var(--shadow-m);white-space:nowrap}
.kwbar.on{display:flex}
.kwbar b{color:#5b4408}
.kwbar button{font-size:11px;border:1px solid #e6cd8a;border-radius:6px;padding:2px 7px;background:#fff}

/* 연결선 */
.linklayer{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:1}
.linklayer.activelinks{pointer-events:auto}
.linklayer path.lk{fill:none;pointer-events:none}
.linklayer path.lk.dim{opacity:.12}
.linklayer path.lk.hot{stroke-width:2.6 !important;opacity:1}
.linklayer path.hit{fill:none;stroke:transparent;stroke-width:12;pointer-events:stroke;cursor:pointer}
.linklayer text{font-size:9.5px;fill:#6b7789;pointer-events:none;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round;font-weight:600}
.linktip{position:fixed;z-index:80;max-width:320px;background:#14223a;color:#e8eef8;font-size:11.5px;line-height:1.5;border-radius:8px;padding:8px 10px;box-shadow:0 12px 30px -10px rgba(0,0,0,.5);pointer-events:none;display:none}
.linktip b{display:block;font-size:10px;letter-spacing:.06em;color:#9db0cc;margin-bottom:3px}

/* ---------------- 활동 상세 패널 ---------------- */
.detail{
  position:fixed;top:54px;right:0;bottom:0;width:432px;background:#fff;border-left:1px solid var(--line);
  box-shadow:-14px 0 40px -20px rgba(15,30,50,.35);transform:translateX(102%);transition:transform .2s ease,visibility .2s;
  display:flex;flex-direction:column;z-index:55;visibility:hidden;
}
.detail.open{transform:none;visibility:visible}
.detail .dhead{padding:14px 16px 11px;border-bottom:1px solid var(--line2);background:#fcfdfe;flex:0 0 auto}
.detail .dhead .eb{font-size:9.5px;letter-spacing:.14em;color:#93a0b2;font-weight:700;display:flex;align-items:center;gap:6px}
.detail .dhead .eb .x{margin-left:auto;font-size:16px;color:#93a0b2;padding:0 4px;line-height:1}
.detail .dhead h3{font-size:17px;font-weight:800;color:var(--navy);line-height:1.4;margin-top:6px;letter-spacing:-.02em}
.detail .dhead .orig{font-size:12px;color:#5d6a7c;line-height:1.45;margin-top:6px;padding-left:8px;border-left:2px solid #d8dfe8}
.detail .dhead .orig b{color:#8b95a5;font-weight:700;font-size:10.5px;letter-spacing:.02em}
.detail .chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.chip{font-size:10.5px;color:#5d6a7c;background:#f2f4f8;border:1px solid #e6eaf0;border-radius:99px;padding:2px 7px;white-space:nowrap}
.chip.cat{color:#fff;border:0}
.chip.kw{background:#eef4fb;border-color:#dbe7f6;color:#2f5f9e;cursor:pointer}
.chip.gap{background:#fdf1e3;border-color:#f2d3a8;color:#8a5a12;font-weight:700}
.chip.ok{background:#eef7f2;border-color:#cfe8db;color:#2b6a4b}
.detail .dbody{flex:1 1 auto;overflow:auto;padding:6px 16px 26px}
.sec{padding:12px 0 2px;border-top:1px solid var(--line2)}
.sec:first-child{border-top:0}
.sec h4{font-size:11px;letter-spacing:.1em;color:#8b95a5;font-weight:800;margin-bottom:6px}
.sec h4 .r{margin-left:6px;font-weight:600;letter-spacing:0;color:#b0b9c6;font-size:10px}
.sum4{display:flex;flex-direction:column;gap:6px}
.sum4 .row{display:flex;gap:8px;font-size:12.5px;line-height:1.55;color:#33415a}
.sum4 .n{flex:0 0 34px;font-size:10px;font-weight:800;color:#7d8798;background:#f2f4f8;border-radius:5px;height:18px;display:flex;align-items:center;justify-content:center;margin-top:1px}
.kv{display:flex;gap:8px;font-size:12.5px;line-height:1.55;color:#33415a;padding:3px 0}
.kv .k{flex:0 0 84px;color:#8b95a5;font-size:11.5px}
.mats{display:flex;flex-wrap:wrap;gap:4px}
.mats .m{font-size:11px;color:#5d6a7c;background:#f7f9fb;border:1px solid #e6eaf0;border-radius:6px;padding:3px 7px}
.lnkrow{display:flex;gap:7px;align-items:flex-start;padding:6px 0;border-bottom:1px dashed #eef1f5;font-size:12px;line-height:1.5;color:#33415a}
.lnkrow .ty{flex:0 0 auto;font-size:10px;font-weight:800;color:#fff;border-radius:4px;padding:1px 5px;margin-top:1px}
.lnkrow .tx b{display:block;font-size:12px;color:var(--navy)}
.lnkrow .tx span{color:#7b8698;font-size:11px;display:block;margin-top:1px}
.lnkrow .go{margin-left:auto;font-size:11px;color:#2f6fae;white-space:nowrap;padding-top:1px}
.memo{font-size:12px;line-height:1.6;color:#4b3b1a;background:#fffbea;border:1px solid #f2e3b6;border-radius:8px;padding:8px 10px;white-space:pre-wrap}
.memo.empty{color:#9aa5b5;background:#fbfcfd;border-style:dashed}
.detail .dfoot{flex:0 0 auto;border-top:1px solid var(--line2);padding:9px 12px;background:#fcfdfe;display:flex;flex-wrap:wrap;gap:6px}
.detail .dfoot .btn{font-size:11.5px;padding:5px 9px}
.dbtn{display:flex;gap:6px;width:100%}
.dbtn .btn{flex:1 1 auto;justify-content:center}

/* ---------------- 성장 로드맵 ---------------- */
.growthhead{display:flex;align-items:center;gap:14px;padding:8px 14px;border-bottom:1px solid var(--line2);background:#fcfdfe}
.growthhead .who{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.growthhead .who .nm{font-size:20px;font-weight:800;color:var(--navy);letter-spacing:-.03em}
.growthhead .who .mj{font-size:16px;font-weight:700;color:#2f4767}
.growthhead .who .gd{font-size:12.5px;color:#7b8698}
.growthhead .who .sc{font-size:11.5px;color:#5d6a7c;background:#eef2f8;border-radius:99px;padding:2px 8px}
.growthhead .hint{font-size:11.5px;color:#a0aab8;margin-left:auto}
.growthhead .zoombox{position:static;box-shadow:none;border-color:var(--line)}
.parentstrip{display:flex;gap:10px;padding:9px 14px;border-bottom:1px solid var(--line2);background:#f7faf8}
.parentstrip .pcol{flex:1 1 0;background:#fff;border:1px solid #e3e9e6;border-radius:9px;padding:7px 10px;font-size:11.5px;color:#41506a;line-height:1.5}
.parentstrip .pcol b{display:block;font-size:10px;letter-spacing:.08em;color:#7d9a8b;margin-bottom:3px}
.parentstrip .pcol .tag{display:inline-block;font-size:10.5px;background:#f1f6f3;border:1px solid #dce8e1;border-radius:99px;padding:1px 6px;margin:1px 2px 0 0;color:#3d6455}
.gwrap{flex:1 1 auto;min-height:0;overflow:auto;background:#f7f8fa}
.gsheet{position:relative;min-height:100%}
.gtable{min-width:1080px}
.grow{display:grid;grid-template-columns:210px repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line2)}
.grow.six{grid-template-columns:170px repeat(6,minmax(0,1fr))}
.grow.gh{position:sticky;top:0;z-index:12;background:#fcfdfe;border-bottom:1px solid var(--line)}
.grow .gc{padding:5px 8px;border-right:1px solid #eef1f5;min-width:0}
.grow .gc:last-child{border-right:0}
.grow.gh .gc{font-size:11.5px;font-weight:800;color:#5d6a7c;padding:6px 9px;display:flex;align-items:center;gap:5px}
.grow.gh .gc.year{color:var(--navy);font-size:13px}
.grow.gh .gc .sm2{font-size:10px;color:#9aa5b5;font-weight:600}
.grow.gsep{background:#f4f6f9;border-top:1px solid #e6eaf0}
.grow.gsep .gc{font-size:10.5px;font-weight:800;letter-spacing:.05em;padding:3px 9px}
.grow .gname{font-size:12px;color:#33415a;font-weight:700;display:flex;gap:5px;align-items:flex-start;line-height:1.25;background:#fbfcfd}
.grow .gname .n{font-size:9.5px;color:#a5b0bf;font-variant-numeric:tabular-nums;font-weight:700;margin-top:1px}
.grow .gname .cnt{margin-left:auto;font-size:10px;color:#a5b0bf;font-weight:600}
.cell{min-height:30px;display:flex;flex-direction:column;gap:3px}
.cell .chips2{display:flex;flex-wrap:wrap;gap:3px}
.cell .tchip{position:relative;z-index:2;font-size:10.5px;line-height:1.25;color:#33415a;background:#f4f6fa;border:1px solid #e8ecf2;border-radius:4px;padding:1px 4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cell .tchip.core{background:#fff;border-color:var(--sc);border-left:3px solid var(--sc);font-weight:700;color:#1d2a3d}
.cell .tchip.gap{background:#fffaf2;border-color:#ecc79a}
.cell .tchip.planned{background:#fbf8ff;border-color:#d6c9f0;border-style:dashed}
.cell .tchip.more{color:#7b8698;border-style:dashed;background:#fbfcfd;cursor:pointer}
.cell .mcard{position:relative;z-index:2;font-size:11.5px;border:1px solid #e2e7ee;border-radius:6px;padding:5px 6px;background:#fff;cursor:pointer;line-height:1.3}
.cell .mcard b{display:block;font-size:12px;color:#1d2a3d;font-weight:700}
.cell .mcard span{font-size:10px;color:#8b95a5}
.cell .mcard:hover{border-color:var(--sc);box-shadow:var(--shadow-s)}
.cell .mcard.core{border-width:1.5px;border-color:var(--sc)}
.cell .mcard.planned{border-style:dashed;border-color:#bda9e6;background:#fbf8ff;max-width:calc(100% - 28px)}
.cell .semlab{font-size:9.5px;letter-spacing:.08em;color:#a5b0bf;font-weight:800;margin-top:2px}
.cell .empty2{font-size:11px;color:#d3d9e2;border:0;background:transparent;padding:2px 2px;text-align:left}
.cell .add{width:22px;height:22px;border:1px dashed #c9d2de;border-radius:6px;color:#8b95a5;font-size:13px;line-height:1;display:flex;align-items:center;justify-content:center;background:#fbfcfd;flex:0 0 auto}
.cell .add:hover{border-color:var(--navy);color:var(--navy);background:#fff}
.cell.future{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px;background:repeating-linear-gradient(135deg,#fbfcfd,#fbfcfd 8px,#f6f8fa 8px,#f6f8fa 16px);border-radius:6px}
.cell .aighost{display:flex;align-items:center;gap:4px;flex-wrap:wrap;border:1px dashed #c3b1e6;background:#fdfbff;border-radius:6px;padding:2px 5px;font-size:9.5px;color:#6d4bb8;line-height:1.3}
.cell .aighost b{display:inline;font-size:11px;font-weight:700;color:#4b3676}
.cell .aighost .ab{display:flex;gap:2px;margin-left:auto}
.cell .aighost .ab button{font-size:10px;border:1px solid #ddd2f2;border-radius:4px;padding:1px 5px;background:#fff;color:#5b4b86}
.gfoot{display:flex;gap:14px;flex-wrap:wrap;padding:7px 14px;font-size:11px;color:#7b8698;border-top:1px solid var(--line2);background:#fcfdfe}
.gfoot .k{display:flex;align-items:center;gap:5px}
.gfoot .sw{width:16px;border-top:2px solid #93a0b2}
.gfoot .sw.dash{border-top-style:dashed;border-color:#b9a6e0}

/* 이전 학년 없음 · 빈 카테고리 */
.prevempty{max-width:560px;margin:12vh auto 0;text-align:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:34px 30px;box-shadow:var(--shadow-m)}
.prevempty .pe-ic{font-size:34px;color:#c9d2de;line-height:1}
.prevempty h3{font-size:19px;font-weight:800;color:var(--navy);margin-top:12px}
.prevempty p{font-size:13px;line-height:1.65;color:#5d6a7c;margin:10px 0 16px}
.prevempty .btn{display:inline-flex;background:var(--navy);color:#fff;border-color:var(--navy);padding:8px 14px;font-size:13px}
.prevempty .pe-note{font-size:11px;color:#a5b0bf;margin-top:14px}
.catempty{grid-column:1/-1;font-size:11px;color:#a5b0bf;border:1px dashed #e3e7ed;border-radius:6px;padding:7px 8px;text-align:center;background:#fcfdfe}

/* AI 추천 카드 버튼 */
.aiacts{display:flex;gap:3px;flex-wrap:wrap;margin-top:5px}
.aiacts button{font-size:10px;border:1px solid #ddd2f2;border-radius:4px;padding:2px 5px;background:#fff;color:#5b4b86;line-height:1.2}
.aiacts button:hover{background:#f0ebfb;border-color:#b9a6e0;color:#4b3676}

/* 선택지 카드 */
.choose{display:flex;flex-direction:column;gap:8px}
.choose>button{display:flex;flex-direction:column;gap:3px;text-align:left;border:1px solid var(--line);border-radius:10px;padding:11px 13px;background:#fff}
.choose>button:hover{border-color:#b9c6d8;background:#fafcff}
.choose>button b{font-size:13px;color:var(--navy)}
.choose>button span{font-size:11.5px;color:#7b8698}

/* 100건 밀집 모드: 글씨는 줄이지 않고 여백만 조인다 */
body.dense .stratgrid{gap:8px;padding:5px 7px 9px}
body.dense .zone{padding:5px 6px 6px}
body.dense .zbody{gap:5px}
body.dense .catbody{gap:5px}
body.dense .catpanel{padding:4px 5px 5px}

/* ---------------- 모달 · 드로어 ---------------- */
.overlay{position:fixed;inset:0;background:rgba(16,27,44,.42);z-index:70;display:flex;align-items:center;justify-content:center;padding:24px}
.modal{background:#fff;border-radius:14px;box-shadow:0 30px 80px -30px rgba(0,0,0,.5);width:min(680px,100%);max-height:86vh;display:flex;flex-direction:column;overflow:hidden}
.modal.wide{width:min(920px,100%)}
.modal .mh{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line2)}
.modal .mh h3{font-size:15px;font-weight:800;color:var(--navy)}
.modal .mh .x{margin-left:auto;font-size:18px;color:#93a0b2;padding:0 4px}
.modal .mb{padding:14px 16px;overflow:auto}
.modal .mf{padding:11px 16px;border-top:1px solid var(--line2);display:flex;gap:8px;justify-content:flex-end;background:#fcfdfe}
.field{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.field label{font-size:11px;font-weight:700;color:#8b95a5}
.field input,.field textarea,.field select{font:inherit;font-size:12.5px;border:1px solid var(--line);border-radius:7px;padding:7px 9px;background:#fff;color:var(--ink)}
.field textarea{min-height:64px;resize:vertical}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.note{font-size:11.5px;line-height:1.6;color:#7b8698;background:#f7f9fb;border:1px solid #eaeef3;border-radius:8px;padding:9px 11px}
.note b{color:#41506a}
.list{display:flex;flex-direction:column;gap:7px}
.idea{display:flex;gap:9px;align-items:flex-start;border:1px solid var(--line);border-radius:9px;padding:9px 11px}
.idea .tt{font-size:13px;font-weight:700;color:var(--navy)}
.idea .mm{font-size:11px;color:#7b8698;margin-top:2px;line-height:1.45}
.idea .side{margin-left:auto;display:flex;gap:5px}
.idea .side button{font-size:10.5px;border:1px solid var(--line);border-radius:5px;padding:3px 6px;color:#5d6a7c;white-space:nowrap}
.badge2{font-size:9.5px;font-weight:800;border-radius:4px;padding:1px 5px;color:#5b4b86;background:#f0ebfb}
.snap{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:9px;padding:9px 11px;font-size:12px;color:#41506a}
.snap b{font-size:12.5px;color:var(--navy)}
.snap .side{margin-left:auto;display:flex;gap:6px}
table.cmp{width:100%;border-collapse:collapse;font-size:12px}
table.cmp th,table.cmp td{border-bottom:1px solid var(--line2);padding:5px 7px;text-align:left}
table.cmp th{font-size:10.5px;letter-spacing:.05em;color:#8b95a5;font-weight:800;background:#fbfcfd}
table.cmp td.n{text-align:right;font-variant-numeric:tabular-nums}
table.cmp tr.new td{color:#1f6b45;font-weight:700}
.up{color:#1f6b45;font-weight:700}.dn{color:#a33a2c;font-weight:700}

/* 다중 선택 바 */
.selbar{position:fixed;left:50%;bottom:22px;transform:translate(-50%,260%);transition:transform .2s,visibility .2s;visibility:hidden;z-index:58;display:flex;align-items:center;gap:8px;background:#14223a;color:#e8eef8;border-radius:12px;padding:8px 12px;box-shadow:0 18px 40px -18px rgba(0,0,0,.55);font-size:12px}
.selbar.on{transform:translate(-50%,0);visibility:visible}
.selbar .n{font-size:15px;font-weight:800;color:#fff}
.selbar button{font-size:11.5px;border-radius:7px;padding:5px 9px;background:rgba(255,255,255,.12);color:#e8eef8}
.selbar button:hover{background:rgba(255,255,255,.2)}

/* 토스트 */
.toast{position:fixed;left:50%;top:66px;transform:translate(-50%,-20px);background:#14223a;color:#fff;font-size:12.5px;padding:8px 14px;border-radius:9px;box-shadow:var(--shadow-m);opacity:0;pointer-events:none;transition:.2s;z-index:90;max-width:80vw;text-align:center}
.toast.on{opacity:1;transform:translate(-50%,0)}

/* 접히는 편집 바 */
.editbar{position:absolute;left:50%;transform:translateX(-50%);bottom:14px;z-index:34;display:none;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-m);padding:5px 7px;font-size:11.5px;color:#5d6a7c}
.editbar.on{display:flex}
.editbar b{color:#b45309;font-size:10px;letter-spacing:.06em}
.editbar button{border:1px solid var(--line);border-radius:6px;padding:3px 7px;background:#fff}
.editbar button:disabled{color:#c2cbd8}

/* 카드 드래그 */
.card.dragging{opacity:.4}
.catpanel.over{outline:2px dashed #7c9fd4;outline-offset:2px;background:#f7faff}

/* 상담 모드 숨김 */
body.parent .consult-only{display:none !important}

/* 인쇄 */
@media print{
  body{height:auto;overflow:visible;display:block;background:#fff}
  .top,.boardhead,.legend,.gfoot,.kwbar,.detail,.selbar,.editbar,.toast,.overlay,.zoombox,.parentstrip .pcol{display:none !important}
  .board{margin:0;border:0;border-radius:0}
  .canvas,.gwrap{overflow:visible !important;height:auto}
  .zoomer{transform:none !important}
  .sheet{width:100%}
  .stage{display:block}
  .view{display:block}
}

/* 좁은 화면 */
@media (max-width:1500px){
  .boardhead .hint{display:none}
}
@media (max-width:1360px){
  .stratgrid{min-width:1040px}
  .zcol.center{flex:0 0 300px;max-width:300px}
  .detail{width:390px}
  .row1{gap:7px}
}
@media (max-width:1240px){
  .row1{height:auto;flex-wrap:wrap;padding:7px 12px;gap:7px}
  .brand{margin-right:2px}
  .brand span{display:none}
  .spacer{flex:1 1 100%;height:0}
  .tabs button{padding:6px 9px;font-size:12px}
}
@media (max-width:1080px){
  .stratgrid{min-width:0;flex-direction:column}
  .zcol.center{display:contents}
  .stratgrid>.zcol{order:2}
  .stratgrid .studentcard{order:1;margin:0 auto}
  .stratgrid .zone.zE{order:3}
  .sheet{min-width:0}
  .zone.zE .zbody{grid-template-columns:1fr}
  .studentcard{max-width:420px;margin:0 auto}
  .catbody{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  .gtable{min-width:760px}
}
@media (max-width:980px){
  .board{margin:8px 8px 0}
  .grow,.grow.six{grid-template-columns:120px repeat(3,minmax(0,1fr))}
  .gtable{min-width:720px}
  .detail{width:100%;top:auto;height:84vh;border-left:0;border-top:1px solid var(--line)}
  .detail.open{transform:none}
  .zoombox{right:10px;bottom:46px}
  .legend .hint2{display:none}
}
.presentationbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.boardhead{flex-wrap:wrap}.focus-muted{opacity:.32}.focus-selected{outline:2px solid #2563eb;outline-offset:2px}.zcol.center .studentcard{margin-top:32px}.zcol.center .zone.zE{margin-top:12px}.studentcard{box-shadow:none}.stratgrid.flowview{display:block;min-width:900px;padding:18px 24px}.flowidentity{width:270px;margin:0 auto 20px}.flowgroups{display:grid;grid-template-columns:repeat(2,minmax(400px,1fr));gap:18px;align-items:start}.flowgroup{background:#fff;border:1px solid #dbe3ed;border-radius:12px;padding:14px;position:relative}.flowgroup h3{font-size:16px;margin:0 0 12px;color:#24364c}.flowgroup small{font-size:11px;color:#64748b;font-weight:400}.flowgrades{display:flex;gap:26px;align-items:start}.flowgrade{flex:1;min-width:0;display:grid;gap:12px}.flowgrade h4{font-size:12px;color:#64748b;margin:0}.flowreasons{margin-top:14px;font-size:12px;color:#64748b}.flowreasons button{display:block;text-align:left;font-size:11px;color:#475569;padding:5px}.flowloose{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:12px}.flowgroup summary{cursor:pointer}.flowview .card{min-height:48px}.flowview .card .ctitle{font-size:14px}

.stratgrid{gap:16px;padding:18px;align-items:flex-start;min-width:1120px}.zcol{gap:14px}.zcol.center{flex:0 0 250px;max-width:250px}.zcol.center .studentcard{margin-top:70px}.zone{background:transparent;border:0;padding:0;gap:7px}.zhead{padding:4px 0;border-bottom:2px solid var(--zc)}.zbody,.zone.zE .zbody{grid-template-columns:1fr;gap:8px}.catpanel{padding:7px;background:#fff;border-color:#e0e6ed}.cathead .cnum{display:none}.cathead .cname{font-size:14px}.catbody{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:7px}.card{min-height:46px;box-shadow:none;border-left:3px solid var(--cat)}.card.core{border:1px solid var(--cat);border-left:4px solid var(--cat);padding:6px 8px}.card .ctitle,.card.core .ctitle{font-size:15px;line-height:1.35}.studentcard{text-align:center;padding:20px 12px;background:#172b43}.studentcard .gd{border:0;padding-top:0;margin-top:8px}.canvas{background:#f6f8fa}.boardhead .scopeNote{background:none}.flowgroups{grid-template-columns:repeat(auto-fit,minmax(490px,1fr));gap:14px}.flowgroup{padding:12px}.flowpair{display:grid;grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);gap:8px;align-items:center;margin:8px 0}.flowedge{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;color:#476075}.flowedge i{width:100%;border-top:2px solid #476075;position:relative}.flowedge i:after{content:'';position:absolute;right:0;top:-4px;border-left:5px solid #476075;border-top:3px solid transparent;border-bottom:3px solid transparent}.flowedge.planned i,.flowedge.ai i{border-top-style:dashed}.flowedge.ai{color:#7954b3}.flowedge.ai i{border-color:#7954b3}.flowview .card{min-height:52px}.flowidentity{margin-bottom:16px}.flowgroup h3{font-size:15px}.flowgroup .card .ctitle{font-size:14px}.flowpair .card{min-width:0}.flowpair:has(.focus-selected) .flowedge{font-weight:800}.flowpair:has(.focus-muted):not(:has(.focus-selected)) .flowedge{opacity:.35}.boardhead .hint:empty{display:none}.catempty{font-size:11px;padding:4px}.card.st-gap{border-color:#b44d4d}.card.st-gap:after{background:#b44d4d}.card.st-planned{border-color:#4777b5;background:#f4f8ff}.presentationbar{margin-left:auto}.card:focus-visible,.flowedge:focus-visible{outline:2px solid #2563eb}@media(max-width:1080px){.stratgrid{flex-direction:row;min-width:1120px}.zcol.center{display:flex;flex:0 0 250px}.stratgrid .studentcard,.stratgrid .zone.zE{order:0}.sheet{min-width:1120px}.flowgroups{grid-template-columns:1fr}.stratgrid.flowview{min-width:760px}}
/* v4 radial layout */
#stratSheet{width:max-content;min-width:1488px;margin:0 auto;background:#fff}#stratGrid.radial{display:block;position:relative;padding:0;min-width:1480px;isolation:isolate}.rad-branches{position:absolute;inset:0;pointer-events:none;z-index:0}.rad-cat{position:absolute;width:150px;height:34px;border-radius:20px;background:color-mix(in srgb,var(--cat) 13%,white);border:1px solid color-mix(in srgb,var(--cat) 55%,white);color:var(--cat);display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;z-index:2}.rad-leaf{position:absolute;width:240px;z-index:2}.rad-leaf .card,.rad-leaf .card.core{border:1px solid color-mix(in srgb,var(--cat) 45%,white);border-radius:18px;background:color-mix(in srgb,var(--cat) 6%,white);min-height:42px;padding:3px 10px;text-align:center;box-shadow:none}.rad-leaf .card .ctitle{font-size:14px;line-height:1.2}.rad-leaf .cmeta{font-size:10px;justify-content:center}.rad-center{position:absolute;width:200px;z-index:3}.rad-center .studentcard{border-radius:50%;min-height:150px;padding:18px 8px;background:#203d55}.rad-center .studentcard .demo2{font-size:9px}.rad-more{position:absolute;width:240px;height:24px;z-index:2}.rad-ai .aiacts,.rad-ai .ckw{display:none}#stratSheet>.linklayer{z-index:4}#stratSheet>.linklayer .hit{pointer-events:stroke}.radial .focus-muted{opacity:.25}.radial .card.st-gap{border-color:#b44d4d}
#stratGrid.radial{isolation:auto}#stratSheet>.linklayer{z-index:1}.rad-ai .aiacts{display:flex}.rad-ai .card{min-height:42px}.rad-ai .aiacts{position:absolute;top:0;right:0;background:white;display:none}.rad-ai:hover .aiacts,.rad-ai:focus-within .aiacts{display:flex}

/* 연결 근거 모달 · 테스트 보고서 등록 (v4 검증용) */
.quote{display:flex;gap:8px;align-items:flex-start;background:#f7f9fc;border:1px solid #e3e9f1;border-left:3px solid #94a9c4;border-radius:6px;padding:7px 9px;margin:5px 0;font-size:12px;line-height:1.6;color:#33415a}
.quote b{flex:0 0 48px;color:#5d6a7c;font-size:11px;padding-top:1px}
.lkbadge{display:inline-block;font-size:10.5px;font-weight:800;border-radius:99px;padding:2px 8px;letter-spacing:.01em}
.lkbadge.ok{background:#e7f5ec;color:#1c7a45;border:1px solid #bfe3cd}
.lkbadge.plan{background:#eef3fb;color:#2f5f9e;border:1px solid #c9d9f0}
.lkbadge.ai{background:#f3eefc;color:#6d4bb8;border:1px solid #d9cbf3}
.lkbadge.cand{background:#eef4fb;color:#3a6b9e;border:1px solid #cddcee}
.radios{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:#33415a;padding:3px 0}
.radios label{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.menu>button[data-m="report"]{color:#0f766e;font-weight:700}
.rad-center .studentcard .demo2{font-size:8.5px;opacity:.82;line-height:1.2}
/* 상세 패널이 열리면 지도가 가려지지 않게 왼쪽으로 비켜 줍니다. */
body.detail-open #stratCanvas{padding-right:436px}
.rad-leaf .card,.rad-leaf .card.core{min-height:40px;padding:2px 10px}
.rad-leaf .card .cmeta{font-size:9.5px}
.rad-leaf .card,.rad-leaf .card.core{min-height:38px;padding:2px 10px}
.rad-more{height:20px}
/* ==========================================================================
   v5.0 — 360° 방사형 마인드맵 (실제 배치·노드·연결선)
   ========================================================================== */
#stratSheet{width:auto;min-width:0 !important;height:auto;padding:0;margin:0 auto;background:#fff;position:relative}
#stratGrid.radial{display:block;position:relative;padding:0;min-width:0 !important;margin:0 auto;height:auto;isolation:auto;background:
  radial-gradient(circle at 50% 50%, #fdfefe 0%, #fbfcfd 55%, #f7f9fb 100%)}
.rad-branches{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:visible}
.rad-branches path{fill:none;stroke-width:1.2;stroke-opacity:.5}
.rad-branches path.br-c{stroke-width:1.7;stroke-opacity:.6}

.rcenter{position:absolute;z-index:4;background:#152238;border-radius:24px;color:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  box-shadow:0 22px 48px -30px rgba(15,27,46,.65);padding:10px 12px;box-sizing:border-box}
.rcenter .nm{font-size:27px;font-weight:800;letter-spacing:-.03em;line-height:1.1}
.rcenter .mj{font-size:20px;font-weight:700;color:#c6d6ec;margin-top:3px;letter-spacing:-.02em}
.rcenter .gd{font-size:12.5px;color:#a4b6cf;margin-top:5px}
.rcenter .sc2{font-size:10.5px;color:#8fa4c2;margin-top:2px}
.rcenter .demo2{font-size:8.5px;color:#7a8fae;margin-top:4px}

.rcat{position:absolute;z-index:3;display:flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;
  border-radius:15px;background:color-mix(in srgb,var(--cat) 12%,#fff);border:1px solid color-mix(in srgb,var(--cat) 72%,#fff);
  color:var(--cat);font-size:13px;font-weight:750;letter-spacing:-.02em;cursor:pointer;white-space:nowrap;
  box-shadow:0 1px 2px rgba(20,35,60,.04);transition:box-shadow .12s,opacity .12s}
.rcat .nm{overflow:hidden;text-overflow:ellipsis}
.rcat .ct{font-size:9px;font-weight:800;line-height:12px;padding:0 4px;border-radius:8px;background:var(--cat);color:#fff;opacity:.9}
.rcat.empty{opacity:.42;border-style:dashed;background:#fff;font-weight:600}
.rcat.empty .ct{display:none}
.rcat.on{box-shadow:0 0 0 3px color-mix(in srgb,var(--cat) 28%,#fff)}
.rcat.focus-muted{opacity:.3}
.rcat.dragging{opacity:.8;z-index:9}

.rnode{position:absolute;z-index:3;display:flex;align-items:center;justify-content:center;box-sizing:border-box;
  padding:0 10px;border-radius:13px;background:#fff;border:1px solid color-mix(in srgb,var(--cat) 48%,#fff);
  color:#17243a;font-weight:600;font-size:12.5px;line-height:1;cursor:pointer;white-space:nowrap;
  box-shadow:0 1px 2px rgba(20,35,60,.05);transition:box-shadow .12s,border-color .12s,opacity .12s,transform .12s;
  user-select:none;overflow:hidden}
.rnode .rt{overflow:hidden;text-overflow:ellipsis;max-width:100%;letter-spacing:-.01em}
.rnode .rg{position:absolute;top:1px;right:4px;font-size:7.5px;font-weight:800;color:var(--cat);opacity:.8}
.rnode .flag{font-size:7.5px;font-weight:800;color:#6d4bb8;background:#f2edfc;border-radius:6px;padding:1px 3px;margin-left:3px}
.rnode::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--cat);opacity:.55}
.rnode.core{border:2px solid color-mix(in srgb,var(--cat) 85%,#fff);background:color-mix(in srgb,var(--cat) 8%,#fff);font-weight:750}
.rnode.core::before{width:4px;opacity:.9}
.rnode.planned{border-style:dashed;background:#fdfbff}
.rnode.test{border-color:#0f766e}
.rnode.missing{opacity:.55;border-style:dashed}
.rnode.gap::after{content:"";position:absolute;top:2px;left:5px;width:4px;height:4px;border-radius:50%;background:#d98a2b}
.rnode.ai{border:1px dashed #b9a6e0;background:#fdfbff;color:#5b4b86;border-radius:13px;font-size:12px}
.rnode.ai::before{background:#7c5aa8}
.rnode.sel{border-color:#2563eb !important;box-shadow:0 0 0 2px rgba(37,99,235,.3),0 10px 20px -12px rgba(37,99,235,.5);z-index:6}
.rnode.multi{box-shadow:0 0 0 2px #0f766e inset;z-index:5}
.rnode.hl{box-shadow:0 0 0 2px #eab308,0 8px 18px -8px rgba(234,179,8,.55);z-index:5}
.rnode.ghost{opacity:0;pointer-events:none}
.rnode.focus-muted{opacity:.2}
.rnode.cat-dim{opacity:.14}
.rnode:hover{box-shadow:0 4px 14px -6px rgba(20,35,60,.28);z-index:6}
.rnode.dragging{opacity:.8;z-index:9;cursor:grabbing;box-shadow:0 10px 26px -10px rgba(20,35,60,.45)}
#stratGrid .rnode.focus-selected{outline:2px solid #2563eb;outline-offset:1px}

#stratSheet>.linklayer{z-index:1}
#stratSheet>.linklayer .hit{pointer-events:stroke}
.linklayer text.lkname{font-size:9.5px;fill:#4a5a72;font-weight:700;paint-order:stroke;stroke:#fff;stroke-width:3.2px;stroke-linejoin:round}

/* 범례 · 상태 배지 */
.legend .ln{width:22px;height:0;border-top:2px solid #7b8698;display:inline-block}
.legend .ln.actual{border-color:#1c7a4d}
.legend .ln.manual{border-color:#a9781a}
.legend .ln.planned{border-color:#a9781a;border-top-style:dashed}
.legend .ln.semantic{border-color:#2f6fa8;border-top-style:dashed}
.legend .ln.ai{border-color:#7c5aa8;border-top-style:dotted}
.legend .sq.empty{border-style:dashed;border-color:#c9d0da;background:#fff}
.lkbadge.manual{background:#fbf3dc;color:#8a6412;border:1px solid #ecd9a6}
.okmark{font-style:normal;font-size:10px;font-weight:800;color:#1c7a45;background:#e7f5ec;border-radius:6px;padding:1px 5px}
.badmark{font-style:normal;font-size:10px;font-weight:800;color:#a33a2a;background:#fdeeea;border-radius:6px;padding:1px 5px}

/* 편집 모드 안내 */
.editbar{white-space:nowrap;overflow-x:auto}
body.detail-open #stratCanvas{padding-right:436px}
@media (max-width:980px){
  .rcenter .nm{font-size:22px}
  .rnode{font-size:12px}
  #stratGrid.radial{background:#fbfcfd}
}
