/* Capability atlas: geography first, details on demand. */
body{background:#f5f6f0}header{height:60px;padding:0 24px}.brand strong{font-size:19px}main{display:block;max-width:none;min-height:calc(100dvh - 60px)}.workspace{padding:14px 20px 0}.toolbar{gap:24px}.search-box{position:relative;width:min(580px,65vw);z-index:30}.search-box>label{display:block;font-size:12px;color:#6d776e;letter-spacing:2px;margin-bottom:6px}.search-box input{width:100%;font:inherit;font-size:17px;padding:12px 16px;border:1px solid #bdcabe;border-radius:9px;background:#ffffff;color:#25392f;box-shadow:0 3px 14px #243d3010}#search-results{position:absolute;top:100%;left:0;right:0;max-height:55vh;overflow:auto;background:#ffffff;border:1px solid #ccd6c8;border-radius:9px;box-shadow:0 12px 30px #25392f22;padding:6px}#search-results button{display:grid;width:100%;text-align:left;border:0;gap:4px;padding:11px 13px}#search-results small{font-size:11px;color:#6f8171}#search-results strong{font-size:15px}#search-results span{font-size:12px;color:#6d776e}.route-strip{display:flex;gap:12px;align-items:center;justify-content:space-between;min-height:48px}.route-summary{margin:10px 0;font-size:13px}#leave-route{display:none;font-size:12px;padding:5px 10px}.has-route #leave-route{display:block}.map-toolbar{background:transparent;border:0;padding:6px 10px;min-height:40px}.map-toolbar>span{font-size:12px;color:#7b857d}.map-toolbar small{display:none}.map-toolbar button{font-size:12px;padding:4px 8px;background:#ffffffc9}#map-shell{border:1px solid #dce3d8;background:#ffffff}#map-scroll{height:calc(100dvh - 265px);min-height:350px;border:0;background-color:#ffffff}#map{position:absolute;width:0;height:0;transform-origin:0 0}.map-status{border:0;border-top:1px solid #e1e6dd;min-height:36px;padding:6px 10px;font-size:11px}.map-status select{font-size:11px}.legend{padding:9px 0;font-size:11px;gap:14px}.next-section{display:none}.has-route .next-section{display:block}.has-route #next-list{max-height:140px;overflow:auto}footer{font-size:11px;margin:8px 0 14px}#inspector{position:fixed;right:34px;top:208px;bottom:75px;width:340px;max-width:calc(100vw - 40px);z-index:20;padding:23px;background:#fffffff5;border:1px solid #cdd8c9;border-radius:12px;box-shadow:0 8px 30px #29403318;overflow:auto}#inspector h2{font-size:23px}#inspector h3{margin-top:20px}.inspector-close{float:right;border:0;font-size:22px;padding:0 7px;background:transparent}.has-selection #map-scroll{padding-right:0}.map-selection{background:#fffffff5!important}
/* Retain the authored world center (101,35); only the visual representation changes. */
#node-layer .node.anchor{width:202px;height:70px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;outline:none!important;padding:0;display:block;overflow:visible;cursor:pointer;transition:opacity 160ms}
#node-layer .node.anchor:before{content:'';position:absolute;left:93px;top:27px;width:16px;height:16px;border-radius:50%;background:var(--region);border:2px solid #ffffff;box-shadow:0 0 0 1px var(--region);transform:none}
#node-layer .node.anchor strong{display:block;position:absolute;left:101px;top:51px;transform:translateX(-50%);font-size:max(14px,calc(12px / var(--map-scale,1)));line-height:1.2;font-weight:550;white-space:nowrap;text-align:center;color:#283d30;text-shadow:0 1px 4px #ffffff,0 -1px 4px #ffffff,2px 0 4px #ffffff,-2px 0 4px #ffffff;pointer-events:none}
#node-layer .node.anchor small{display:none}#node-layer .node.anchor.hovered small,#node-layer .node.anchor.selected small{display:block;position:absolute;top:calc(55px + max(14px,calc(12px / var(--map-scale,1))));left:101px;transform:translateX(-50%);font-size:clamp(11px,calc(10px / var(--map-scale,1)),32px);white-space:nowrap;color:#4d6855;background:#ffffffe8;padding:2px 5px}
#node-layer .node.anchor.selected:before{box-shadow:0 0 0 5px #ffffff,0 0 0 8px #284d3e;background:#284d3e}#node-layer .node.anchor.hovered:before{box-shadow:0 0 0 5px #d3dfcc}#node-layer .node.anchor.neighbor strong{font-weight:700}#node-layer .node.anchor.dim{opacity:.3}#node-layer .node.anchor.ready:before{outline:2px dashed #385d44;outline-offset:5px}#node-layer .node.anchor.mastered:before{background:#ffffff;border:4px solid var(--region)}#node-layer .node.anchor.destination:before{border-radius:3px;transform:rotate(45deg);box-shadow:0 0 0 5px #ffffff,0 0 0 7px #284d3e}#node-layer .node.anchor .node-relation{left:101px;top:0;transform:translate(-50%,-50%);font-size:12px}#node-layer .node.anchor.micro .node-relation{display:none}
/* True world-space type: no inverse zoom sizing for geographic labels. */
#map .region-label{transform:translate(-50%,-100%);font-weight:450;letter-spacing:.12em;line-height:1;pointer-events:none;transition:opacity 160ms;max-width:none}#map svg.territories{width:1px;height:1px;overflow:visible}#map .edges{z-index:1}#node-layer{position:relative;z-index:2}#region-layer{position:relative;z-index:0}.edge-direction{display:none}
@media(max-width:700px){.workspace{padding:10px 10px 0}.toolbar{flex-direction:row;gap:10px}.search-box{width:100%;flex:1}.goal-label{max-width:130px;font-size:11px}.goal-label select{min-width:0;width:100%;font-size:12px}.search-box input{font-size:14px;padding:10px}#inspector{top:auto;bottom:14px;right:12px;left:12px;width:auto;max-width:none;max-height:44vh;padding:18px}#map-scroll{height:calc(100dvh - 260px)}.map-toolbar>span{display:none}.map-toolbar>div{width:100%;justify-content:flex-end}.map-status{gap:7px}.map-status>span{width:100%}}
@media(prefers-reduced-motion:reduce){#node-layer .node.anchor,#map .region-label{transition:none}}

#node-layer .node.anchor:before{--point-size:max(16px,calc(5px / var(--map-scale,1)));width:var(--point-size);height:var(--point-size);left:calc(101px - var(--point-size) / 2);top:calc(35px - var(--point-size) / 2)}
#node-layer .node.anchor:focus-visible:before{outline:3px solid #986d34;outline-offset:6px}
/* Screen-space text and anchors remain sharp; only terrain and roads scale. */
#map{will-change:auto}
#region-label-overlay,#node-layer{position:absolute;left:0;top:0;width:0;height:0;overflow:visible;pointer-events:none}
#region-label-overlay{z-index:2}#node-layer{z-index:3}
#region-label-overlay .region-label{position:absolute;transform:translate(-50%,-100%);font-size:24px;font-weight:500;line-height:1.1;letter-spacing:.08em;text-shadow:none;filter:none;transition:opacity 140ms linear;pointer-events:none;white-space:nowrap}
#node-layer .node.anchor{pointer-events:auto;--map-scale:1}
#node-layer .node.anchor strong{font-size:14px;text-shadow:none;background:#ffffffd9;border-radius:3px;padding:1px 3px;font-weight:550;filter:none}
#node-layer .node.anchor:before{width:10px;height:10px;left:96px;top:30px;border-width:1.5px;--point-size:10px}
#node-layer .node.anchor strong{top:50px}
#node-layer .node.anchor.selected small,#node-layer .node.anchor.hovered small{font-size:11px;top:64px}
#node-layer .node.anchor .node-relation{top:17px;font-size:11px}
#node-layer .node.anchor.selected:before{box-shadow:0 0 0 3px #ffffff,0 0 0 5px #284d3e}
#node-layer .node.anchor.destination:before{box-shadow:0 0 0 3px #ffffff,0 0 0 5px #284d3e}
@media(prefers-reduced-motion:reduce){#region-label-overlay .region-label{transition:none}}

#node-layer .node.anchor{pointer-events:none}
#node-layer .node.anchor:before,#node-layer .node.anchor strong{pointer-events:auto}

/* Relationship annotations share exactly the lifetime of their anchor. */
#node-layer .node.anchor .node-relation,#node-layer .node.anchor.micro .node-relation{display:block;pointer-events:none;font-size:11px;top:14px;padding:2px 6px;line-height:15px;white-space:nowrap}
#node-layer .node.anchor[data-relation-kind="current"] .node-relation{background:#243f35;color:#fff;border:1px solid #243f35}
#node-layer .node.anchor[data-relation-kind="incoming"] .node-relation{background:#fff7e5;color:#694916;border:1px solid #b59a64;border-left-width:4px}
#node-layer .node.anchor[data-relation-kind="outgoing"] .node-relation{background:#edf5fa;color:#285371;border:1px solid #87a6ba;border-right-width:4px}
#node-layer .node.anchor[data-relation-kind="soft"] .node-relation{background:#ffffff;color:#586757;border:1px dashed #87917e}
#node-layer .node.anchor strong{pointer-events:auto!important;cursor:pointer}
#leave-route{white-space:nowrap}.cancel-goal{font-size:12px;color:#765237;border-color:#cdb8a2;margin:0 0 10px;width:100%}
.local-map{margin:20px 0}.local-map>label{font-size:12px}.mini-scroll{overflow:auto;max-height:350px;border:1px solid #d4dfd0;border-radius:8px;background:#f5f7f0;overscroll-behavior:contain}.mini-scroll svg{position:absolute;left:0;top:0;pointer-events:none}.mini-node{position:absolute;width:145px;min-height:68px;padding:6px 8px;text-align:left;border:1px solid #c4d0bf;border-left:3px solid var(--region);background:#ffffff;font-size:12px}.mini-node small,.mini-node strong,.mini-node span{display:block}.mini-node small{font-size:10px;color:#74816e;margin-bottom:3px}.mini-node strong{font-size:12px;line-height:1.3}.mini-node span{font-size:10px;margin-top:4px;color:#556b55}.mini-node.current-node{outline:2px solid #294c3c;outline-offset:2px}.mini-node.goal-node{border-right:4px double #294c3c}

.mini-scroll{overflow:hidden;max-height:330px}.mini-world{transform-origin:0 0}
#node-layer .node.anchor{transition:none}
#node-layer .node.anchor strong{background:#ffffff;text-shadow:none}
#node-layer .node.anchor .node-relation{background-color:#ffffff;opacity:1}
#node-layer .node.anchor[data-relation-kind="current"],#node-layer .node.anchor[data-relation-kind="incoming"],#node-layer .node.anchor[data-relation-kind="outgoing"]{z-index:8}
#node-layer .node.anchor.hovered{z-index:9}
#node-layer .node.anchor[data-hittable="false"] strong,#node-layer .node.anchor[data-hittable="false"]:before{pointer-events:none!important}
#node-layer .node.anchor[data-hittable="true"] strong{pointer-events:auto!important}

#region-label-overlay .region-label{background:#ffffffed;border-radius:4px;padding:2px 5px}

#map-relations{position:absolute;top:54px;left:14px;width:min(480px,calc(100% - 390px));z-index:12;background:#fffffff5;border:1px solid #cbd7c6;border-radius:10px;padding:12px;box-shadow:0 5px 18px #29403315;max-height:calc(100% - 105px);overflow:auto}
#map-relations .local-map{margin:0}#map-relations h3{font-size:13px;margin:0 0 8px}#map-relations .note{margin:7px 0;font-size:11px!important}
#map-relations .mini-node{min-height:58px;height:58px;display:flex;align-items:center;justify-content:center;padding:5px 7px;text-align:center}#map-relations .mini-node strong{font-size:16px;line-height:1.2}
@media(max-width:850px){#map-relations{width:min(420px,calc(100% - 28px));max-height:35%;top:50px}#map-relations .note{display:none}}

.mini-scroll{overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}.mini-stage{position:relative;margin-inline:auto;overflow:hidden}.mini-world{position:absolute!important;left:0;top:0;transform-origin:0 0}
#map-relations .mini-node{background:#ffffff}

#map-relations{overflow:hidden}#map-relations.expanded{width:calc(100% - 390px);max-height:none;bottom:45px;overflow:hidden}.mini-scroll{overflow:hidden;max-height:none}.mini-stage{overflow:hidden}.mini-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.mini-heading button{font-size:11px;padding:3px 7px}#map-relations .mini-node{padding:2px 3px}#map-relations .mini-node strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;line-height:1.2}
#node-layer .node.anchor:before{width:var(--visual-node-size,10px);height:var(--visual-node-size,10px);left:calc(101px - var(--visual-node-size,10px)/2);top:calc(35px - var(--visual-node-size,10px)/2)}

#region-label-overlay{z-index:4}
#region-label-overlay .region-label{transform:translate(-50%,-50%);background:#ffffff;padding:5px 9px;border-radius:8px;font-weight:550;letter-spacing:.06em;box-shadow:0 0 12px 5px #ffffff;pointer-events:none}

#region-label-overlay .region-label{background:transparent;padding:0;border-radius:0;box-shadow:none;text-shadow:none;font-weight:500;letter-spacing:.08em}

.detail-back{width:28px;height:28px;padding:0;font-size:21px;line-height:24px;background:transparent;border:0;margin-bottom:8px}#inspector .tag,#inspector .eyebrow{font-size:12px;font-weight:400;letter-spacing:1px;color:#6d776e}

#node-layer .node.anchor strong{background:transparent}


#map-relations .mini-node{box-sizing:border-box;min-width:0;min-height:0;overflow:hidden;flex-shrink:0}#map-relations .mini-node strong{min-width:0;min-height:0;max-width:100%;max-height:100%;overflow:hidden;flex:1 1 0}

#map-relations .mini-scroll{overflow-y:auto;overflow-x:auto;scrollbar-gutter:stable;max-height:none}#map-relations .mini-node strong{white-space:normal;line-height:1.25;overflow:hidden;text-overflow:ellipsis}#map-relations .mini-stage{margin-inline:auto}

.province-editor{margin-top:20px;font-size:12px}.province-editor label{display:grid;gap:5px;margin:10px 0}.province-editor select,.province-editor input{width:100%;min-width:0;font:inherit;padding:7px}.province-editor button{margin-top:7px}

#specialization-layer{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}#specialization-layer svg{position:absolute;left:0;top:0;pointer-events:none}#specialization-layer button{position:absolute;transform:translate(-50%,-50%);padding:4px 7px;border:1px solid #9787ac;background:#faf8fc;color:#625076;font-size:12px;pointer-events:auto;white-space:nowrap}.specialization-caption{position:absolute;font-size:12px;color:#788477;pointer-events:none}#specialization-detail{position:absolute;z-index:25;left:18px;bottom:50px;width:330px;max-width:calc(100% - 36px);max-height:50%;overflow:auto;padding:18px;background:#ffffff;border:1px solid #cfc6d8;border-radius:10px}#specialization-detail>[data-close-specialization]{float:right}#specialization-detail small{color:#80718e}#specialization-detail p{font-size:13px}

#specialization-layer button[data-specialization]{background:transparent;border:0;border-radius:0;padding:5px 7px;color:#625076;pointer-events:var(--spec-hit,none)}#specialization-layer button[data-specialization]:before{content:'◇';margin-right:5px}#specialization-layer button[data-specialization].selected{outline:1px solid #80719b;border-radius:6px;background:#f4eff8}#specialization-layer button[data-specialization].neighbor{font-weight:650}#specialization-layer button.specialization-caption{border:0;background:transparent;color:#738177;font-size:18px;opacity:.55;transform:translate(-50%,-50%);pointer-events:var(--spec-hit,none)}.spec-back{display:block;font-size:12px;border:0;background:none;padding:0 0 12px}

/* One continuous shape: the existing node marker becomes its internal region. */
#node-layer .node.anchor[data-morph="true"]:before{width:var(--morph-width);height:var(--morph-height);left:calc(101px - var(--morph-width)/2);top:calc(35px - var(--morph-height)/2);border-radius:50%;opacity:var(--morph-opacity);pointer-events:none!important}
#node-layer .node.anchor[data-morph="true"] strong{top:var(--morph-title-y);font-size:var(--morph-title-size);opacity:var(--morph-title-opacity)}
#node-layer .node.anchor[data-morph="true"] small,#node-layer .node.anchor[data-morph="true"] .node-relation{opacity:var(--marker-opacity);pointer-events:none}
#specialization-layer{z-index:5}
#specialization-layer button[data-specialization]{width:24px;height:24px;padding:0;transform:translate(-50%,-50%);border:0;background:none;color:#655476;overflow:visible}
#specialization-layer button[data-specialization]:before{content:'';position:absolute;left:7px;top:7px;width:10px;height:10px;border:1.6px solid currentColor;border-radius:50%;background:#ffffff;box-sizing:border-box;margin:0}
#specialization-layer button[data-specialization] span{position:absolute;top:25px;left:50%;transform:translateX(-50%);font-size:12px;font-weight:500;white-space:nowrap;pointer-events:var(--spec-hit,none)}
#specialization-layer button[data-specialization].selected{background:none;outline:none}
#specialization-layer button[data-specialization].selected:before{background:currentColor;box-shadow:0 0 0 3px #ffffff,0 0 0 4px #80719b}
#specialization-layer button[data-specialization]:hover:before{box-shadow:0 0 0 3px #ddd5e7}
#specialization-layer button[data-specialization].neighbor span{font-weight:650}

/* Camera frames drive geometry directly; no delayed CSS interpolation. */
#node-layer .node.anchor[data-morph="true"]:before,#node-layer .node.anchor[data-morph="true"] strong,#specialization-layer button[data-specialization]{transition:none}
#specialization-layer button[data-specialization] span{max-width:150px;white-space:normal;width:max-content;line-height:1.35;text-align:center}

/* Preserve the normal node states; their existing rings dissolve with the fill. */
#node-layer .node.anchor[data-morph="true"] strong{color:color-mix(in srgb,var(--region) var(--morph-color-mix),#283d30)}
#node-layer .node.anchor[data-morph="true"]:before{box-shadow:0 0 0 calc(1px * var(--morph-ring-scale)) var(--region)}
#node-layer .node.anchor[data-morph="true"].selected:before,#node-layer .node.anchor[data-morph="true"].destination:before{box-shadow:0 0 0 calc(3px * var(--morph-ring-scale)) #ffffff,0 0 0 calc(5px * var(--morph-ring-scale)) #284d3e}
#node-layer .node.anchor[data-morph="true"].hovered:before{box-shadow:0 0 0 calc(5px * var(--morph-ring-scale)) #d3dfcc}
#node-layer .node.anchor[data-morph="true"].destination:before{transform:rotate(var(--morph-rotation));border-radius:calc(3px + 47% * (1 - var(--morph-ring-scale)))}
/* Keep only the original point-sized hit target, never the expanded region. */
#node-layer .node.anchor[data-morph="true"]:after{content:"";position:absolute;left:calc(101px - var(--visual-node-size)/2);top:calc(35px - var(--visual-node-size)/2);width:var(--visual-node-size);height:var(--visual-node-size);border:0;background:transparent;box-shadow:none;pointer-events:none}
#node-layer .node.anchor[data-morph="true"][data-hittable="true"]:after{pointer-events:auto}
#specialization-layer button[data-specialization]{color:color-mix(in srgb,var(--spec-color) 80%,#283d30)}
#specialization-layer button[data-specialization].selected:before{box-shadow:0 0 0 3px #ffffff,0 0 0 4px currentColor}
#specialization-layer button[data-specialization]:hover:before{box-shadow:0 0 0 3px color-mix(in srgb,var(--spec-color) 22%,transparent)}

#inspector .detail-back{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;margin:0 10px 12px -6px;border:0;border-radius:50%;background:transparent;color:#40574b;vertical-align:middle}#inspector .detail-back:hover{background:#e9eee8}#inspector .detail-back:focus-visible{outline:2px solid #567966;outline-offset:2px}#inspector .detail-back + .tag{display:inline;background:none;border:0;padding:0;color:#718076;font-size:12px;line-height:1.5;vertical-align:middle}#inspector .detail-back + .tag + h2{margin-top:0}

#inspector>.tag,#inspector>.eyebrow,#inspector .detail-back + .tag{display:block;text-align:center;font-size:16px;font-weight:500;line-height:1.5;color:#849087;background:none;border:0;padding:0 38px;margin:0 0 22px;min-height:24px}#inspector>.detail-back{position:absolute;left:16px;top:16px;margin:0}#inspector>.inspector-close,#inspector>[data-close-specialization]{position:absolute;right:16px;top:16px;width:28px;height:28px;border:0;background:none;color:#748178}#inspector>.spec-back{padding:0 32px;margin:0 auto 16px;color:#849087;font-size:16px}#inspector>small{display:block;color:#849087}

.province-boundary-caption{position:absolute;font-size:12px;font-weight:500;line-height:1;letter-spacing:.03em;white-space:nowrap;pointer-events:none;transform-origin:center}

#node-layer .node.anchor[data-morph="true"] .node-relation{top:calc(7px - var(--marker-shift))}
#node-layer .node.anchor[data-morph="true"] small{top:calc(69px + var(--marker-shift))}
:is(#inspector,#map-selection) :is(.detail-back,.inspector-close,[data-close-specialization]){position:absolute;top:16px;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;margin:0;border:1px solid #dce3d8;border-radius:50%;background:#f2f5ef;color:#526658;cursor:pointer;line-height:1}
:is(#inspector,#map-selection) .detail-back{left:16px;right:auto}
:is(#inspector,#map-selection) :is(.inspector-close,[data-close-specialization]){right:16px;left:auto}
:is(#inspector,#map-selection) :is(.detail-back,.inspector-close,[data-close-specialization]):hover{background:#e5ece1;color:#283d30}
:is(#inspector,#map-selection) :is(.detail-back,.inspector-close,[data-close-specialization]):focus-visible{outline:2px solid #567966;outline-offset:3px}
:is(#inspector,#map-selection) :is(.detail-back,.inspector-close,[data-close-specialization]) svg{pointer-events:none;flex:none}

.panel-relation-switch{display:flex;gap:3px;padding:3px;margin:12px 0 18px;border-radius:9px;background:#edf1e9}
.panel-relation-switch button{flex:1;border:0;border-radius:6px;background:transparent;color:#677466;padding:7px 8px;font-size:12px}
.panel-relation-switch button[aria-pressed=true]{background:#ffffff;color:#2f4938;box-shadow:0 1px 3px #263c321a}
.direction-group{margin-top:22px}.direction-heading{display:flex;align-items:center;gap:8px;margin-bottom:8px}
#inspector .direction-heading h3,.map-selection .direction-heading h3{margin:0;font-size:12px;font-weight:600;color:#6c7b6d}
.direction-heading>span{font-size:11px;color:#8b978a;font-variant-numeric:tabular-nums}
.direction-list{border-top:1px solid #e4e9df}.direction-list>button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;text-align:left;padding:10px 2px;border:0;border-bottom:1px solid #e4e9df;border-radius:0;background:transparent;font-size:13px;line-height:1.5}
.direction-list>button:hover{background:#edf2e8}.direction-list>button svg{flex:none;color:#8a998c}.direction-list>button:focus-visible{outline:2px solid #567966;outline-offset:2px}

#node-layer .node.anchor strong{left:101px;width:max-content;max-width:none;text-align:center;transform:translateX(-50%);padding:1px 0;margin:0}

#specialization-layer button[data-specialization].goal-node:before{border-color:#a66724;background:#a66724;box-shadow:0 0 0 3px #ffffff,0 0 0 4px #a66724}

#node-layer .node.anchor:before{box-sizing:content-box;margin-left:-1.5px;margin-top:-1.5px}#node-layer .node.anchor.mastered:before{margin-left:-4px;margin-top:-4px}
#specialization-layer button[data-specialization].selected:before{border-color:#285c78;background:#285c78;box-shadow:0 0 0 3px #ffffff,0 0 0 5px #285c78}
#specialization-layer button[data-specialization].goal-node:before{border-radius:2px;border-color:#92501b;background:#92501b;box-shadow:0 0 0 3px #ffffff,0 0 0 5px #92501b}
#specialization-layer button[data-specialization].goal-node.selected:before{box-shadow:0 0 0 3px #ffffff,0 0 0 5px #285c78}
#specialization-layer .spec-badge,#specialization-layer .spec-status{position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;line-height:16px;pointer-events:none}
#specialization-layer .spec-badge{bottom:28px;padding:1px 5px;border-radius:3px;background:#edf3f6;color:#285c78}
#specialization-layer .goal-node .spec-badge{background:#fff3df;color:#92501b}
#specialization-layer .spec-status{top:46px;color:#657466}

#specialization-layer button[data-specialization] .spec-badge{font-size:11px;line-height:15px;padding:2px 6px;border-radius:5px;bottom:32px}
#specialization-layer button[data-relation-kind="current"] .spec-badge{background:#243f35;color:#fff;border:1px solid #243f35}
#specialization-layer button[data-relation-kind="incoming"] .spec-badge{background:#fff7e5;color:#694916;border:1px solid #b59a64;border-left-width:4px}
#specialization-layer button[data-relation-kind="outgoing"] .spec-badge{background:#edf5fa;color:#285371;border:1px solid #87a6ba;border-right-width:4px}
#specialization-layer button[data-relation-kind="soft"] .spec-badge{background:#ffffff;color:#586757;border:1px dashed #87917e}
#specialization-layer button[data-specialization] .spec-status{font-size:11px;color:#4d6855;background:#ffffffe8;padding:2px 5px;margin:0;top:calc(29px + 1.35em)}

#node-layer .node.anchor:not([data-morph="true"]) .node-relation{top:7px}

#specialization-layer button[data-specialization]:before{background:currentColor}
#specialization-layer button[data-specialization].mastered:before{background:#ffffff;border-width:3px}
#specialization-layer button[data-specialization].mastered.selected:before{background:#ffffff;border-color:#285c78}
#specialization-layer button[data-specialization].mastered.goal-node:before{background:#ffffff;border-color:#92501b}

#specialization-layer button[data-specialization].ready:before{outline:2px dashed #385d44;outline-offset:5px}

.learning-content .purpose{font-size:14px;line-height:1.7;color:#667466}
.learning-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0}.learning-status .current{margin:0}.learning-status button{font-size:12px;padding:7px 12px}
.learning-preparation{padding:12px 0;border-top:1px solid #e3e8df;font-size:12px;color:#657363}.learning-preparation summary{cursor:pointer}.learning-preparation .links{margin-top:12px}
.learning-section{border-top:1px solid #e3e8df;margin-top:22px;padding-top:18px}#inspector .learning-section h3,.map-selection .learning-section h3{margin:0 0 12px;font-size:14px}.learning-section>.note{margin:0 0 14px;color:#849080}
.learning-section .checks label{padding:5px 0}.learning-section .criterion{background:#f0f3e9;border:0;border-left:3px solid #a5b78d;padding:12px;color:#476044;font-size:14px;line-height:1.7}
.learning-resources h4{font-size:13px;margin:18px 0 8px}.learning-resources .task{padding:15px;border:0;border-radius:7px;background:#f3f4ef}.learning-resources .task small{display:block;margin-top:5px}.learning-resources .task p{margin:7px 0 0}

.learning-resources .task strong{font-size:14px;font-weight:650}.learning-resources .task small,.learning-resources .task p{font-size:13px;line-height:1.7;color:#6d776e}.learning-section .criterion p{font-size:14px;line-height:1.7;color:inherit}

.learning-resources .resource-card{display:grid;grid-template-columns:48px minmax(0,1fr);gap:13px;align-items:start;background:var(--resource-bg,#eff2ed);border-left:3px solid var(--resource-accent,#6d8170);padding:14px 12px}
.resource-card[data-resource-role="primary"]{--resource-bg:#eaf1e6;--resource-accent:#4e7546}.resource-card[data-resource-role="supplement"]{--resource-bg:#edf2f8;--resource-accent:#587c9b}.resource-card[data-resource-role="practice"]{--resource-bg:#faf2e4;--resource-accent:#a57834}.resource-card[data-resource-role="project"]{--resource-bg:#f1edf7;--resource-accent:#816697}.resource-card[data-resource-role="assessment"]{--resource-bg:#f8eded;--resource-accent:#a56b68}.resource-card[data-resource-role="reference"]{--resource-bg:#eff1ee;--resource-accent:#798476}
.resource-icon{position:relative;display:grid;place-items:center;width:48px;height:48px;border-radius:10px;background:#ffffffa8;color:var(--resource-accent);overflow:hidden;font-size:28px}.resource-icon img{position:absolute;inset:8px;width:32px;height:32px;object-fit:contain;background:#fff;border-radius:4px}.resource-copy{min-width:0}.resource-copy strong{display:block;line-height:1.5}.learning-resources .resource-copy small{color:var(--resource-accent);font-size:12px;font-weight:550;margin-top:5px}

.resource-card[data-resource-role="other"]{--resource-bg:#eff1ee;--resource-accent:#798476}

.learning-prerequisites,.learning-bridges{margin:18px 0}.learning-prerequisites .note{margin:4px 0 10px}.prerequisite-cards{display:grid;gap:8px}.prerequisite-cards button{text-align:left;width:100%;padding:11px 13px;border:1px solid #d9e1d2;border-radius:8px;background:#f0f4eb;font-size:13px;line-height:1.5}.prerequisite-cards button:hover{background:#e6eedf}.learning-bridge{margin:10px 0;font-size:13px}.learning-bridge p{margin:4px 0;font-size:13px;color:#6d776e}

.learning-section .checks{display:grid;gap:8px}.learning-section .checks label{display:flex;align-items:flex-start;gap:12px;min-height:48px;padding:12px;border-radius:8px;font-size:14px;line-height:1.65;cursor:pointer}.learning-section .checks label:hover{background:#edf2e8}.learning-section .checks input[type=checkbox]{width:22px;height:22px;flex:0 0 22px;margin:1px 0 0;accent-color:#386347;cursor:pointer}.learning-section .checks input:focus-visible{outline:2px solid #567966;outline-offset:3px}.learning-section .checks label:has(input:checked){background:#eef4e9;color:#42633f}

.lod-filter input[type=range]{width:100px;min-width:70px;accent-color:#55745a}.lod-filter output{min-width:82px;font-size:11px}

/* Shared membership: rounded square, preserving status borders and hit target. */
#node-layer .node.anchor.multi-domain:not([data-morph="true"]):before{border-radius:22%}

#node-layer .node.anchor strong{opacity:var(--label-visibility,1)}
#node-layer .node.anchor[data-morph="true"] strong{opacity:calc(var(--label-visibility,1) * var(--morph-title-opacity,1))}

/* Camera interpolation already supplies smooth edge updates. */
.edges path[data-edge]{transition:none}
