/* The reading surfaces stay light. Color and movement belong to the map. */
body[data-section="map"] .hero{display:none}
#mobile-menu,#mobile-search,#selection-peek,#key-toggle,#close-sheet{display:none}
.top{position:relative;z-index:15}.top-inner{height:60px}
.atlas-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:23px 0 19px}
.atlas-location{display:flex;align-items:center;gap:5px;font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:#74624c;font-weight:650}
.atlas-location .icon{width:12px;height:12px}.atlas-title h1{margin:2px 0 0;font:400 clamp(34px,3.2vw,52px)/1.09 var(--serif);letter-spacing:-.05em;color:#362a2c}
.atlas-heading-right{display:flex;align-items:center;gap:18px;color:#74695c;font-size:13px}
.guide-button{display:inline-flex;align-items:center;gap:7px;border:1px solid #d6cfbf;padding:7px 12px;border-radius:22px;font-size:13px;font-weight:600;color:#59453a;background:var(--white)}
.workspace{grid-template-columns:minmax(0,1fr) clamp(294px,25.5vw,388px);gap:15px;--map-height:clamp(430px,59vh,730px)}
.map-panel{border:1px solid #d5d0c1;border-radius:15px;overflow:visible;position:relative;background:#fffef9;min-width:0}
.map-toolbar{height:54px;position:relative;border-radius:14px 14px 0 0;padding:0 13px;gap:8px;justify-content:flex-start;background:#fffef9;z-index:9}
.map-back,.round-icon,#mobile-search{width:36px;height:36px;align-items:center;justify-content:center;border-radius:50%;color:#58473e}
.map-back,.round-icon{display:inline-flex}.map-back{background:#f3eee4;border:1px solid #e5dbcb}
.map-back:disabled{opacity:.42;cursor:default}.map-back:not(:disabled):hover,.round-icon:hover{background:#e7dfd1}.map-back .icon{width:16px}
.atlas-crumb{font-size:13px;font-weight:600;color:#705945;padding:8px 1px}.atlas-crumb:hover{text-decoration:underline}.crumb-divider{color:#afa698}
.map-toolbar .branch-field{max-width:min(49%,360px);min-width:0;flex-shrink:1}
.map-toolbar .branch-field select{padding:8px 23px 8px 2px;font-weight:650;max-width:100%;font-size:14px}
.map-toolbar .find{height:34px;width:min(29%,262px);margin-left:auto;border-color:#e0dbce;border-radius:20px;background:#f8f6f0;min-width:130px}
.find .results{min-width:min(370px,calc(100vw - 26px));z-index:22}
#close-find{font-size:23px;padding:0 4px;line-height:1}
.stage{isolation:isolate;position:relative;height:var(--map-height);overflow:hidden;background-color:#112b2b;background-image:radial-gradient(ellipse at 48% 45%,#254440 0%,#193832 34%,transparent 73%),radial-gradient(ellipse at 100% 5%,#343c35,transparent 57%),linear-gradient(112deg,#0c2527,#1a3530 72%,#122b2c)}
#terrain{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
#graph{position:absolute;inset:0;z-index:1;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;outline-offset:-3px}
#map-landmarks{position:absolute;inset:0;z-index:2;pointer-events:none}
.stage-caption{position:absolute;top:16px;left:18px;display:grid;gap:1px;pointer-events:none;z-index:3;text-shadow:0 1px 5px #102826}
.stage-region{color:#b8cbb5;font-size:9.5px;letter-spacing:.19em;text-transform:uppercase;font-weight:650}
.stage-title{color:#f8ecce;font:400 22px/1.18 var(--serif);letter-spacing:-.02em;max-width:min(380px,62vw)}
#stage-help{position:absolute;right:15px;top:15px;width:32px;height:32px;border:1px solid #9bad9552;border-radius:50%;color:#e3e4cf;background:#1c352fe0;z-index:4;font:600 17px var(--serif)}
#atlas-navigator{position:absolute;bottom:13px;left:15px;z-index:5}
.tools{left:auto;right:15px;bottom:15px;border:1px solid #a8b69a68;background:#1e3b35eb;color:#e2e8d5;border-radius:24px;box-shadow:0 2px 12px #06202032;z-index:5;padding:0 3px}
.tools button{width:36px;height:36px;border-radius:50%;color:inherit}.tools button:hover{background:#34544a}.tools>span{background:#a6bb9950}.tools .icon{width:16px;height:16px}
.legend-row{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 15px;position:relative}
.map-key{border:0;background:transparent;min-height:0;padding:0;gap:4px 13px}.map-key button{font-size:12px;min-height:36px}.scope-count{position:static;white-space:nowrap;background:transparent;padding:0;color:#746a59;font-size:12px}
.sample{width:20px}.sample.parent{border-color:#617e66}.sample.kin{border-color:#668a8e}.sample.other{border-color:#80719d}.sample.spouse{border-color:#a56677}.sample.land{border-color:#a47d42}
.edge-set{opacity:.63}.edge-set.incident,.edge-set.selected-edge{opacity:1}.edge-set:focus-visible{outline:none}.thread-ink,.thread-split{pointer-events:none;stroke-linecap:round;stroke-linejoin:round}
.edge-set:hover,.edge-set:focus-visible{opacity:1}.edge-set:hover .thread-ink,.edge-set:focus-visible .thread-ink,.selected-edge .thread-ink{stroke-width:3.5px}
.node{outline:none}.seal{transform-box:fill-box;transform-origin:center;transition:transform .24s cubic-bezier(.2,.85,.29,1.3)}
.node .seal-engrave{fill:none;stroke:#fff3d5;stroke-opacity:.58;stroke-width:.75}
.node .facet{stroke:var(--seal);stroke-width:1.3}.node .outer-ring{fill:none;stroke:var(--seal);stroke-opacity:.42;stroke-width:.85;stroke-dasharray:2 4}
.node .aura{opacity:.055}.node .seal-letters{font:600 17px var(--serif);letter-spacing:-.06em;fill:#303130}
.node.active .seal{transform:scale(1.22)}.node.active .outer-ring{stroke-opacity:1;stroke-width:1.1;stroke-dasharray:32 5 2 4}
.node.active .aura{opacity:.16}.node:focus-visible .outer-ring,.node:hover .outer-ring{stroke-opacity:1;stroke-width:1.6}
.node.is-pressing .seal{transform:scale(.92)}.node.active.is-pressing .seal{transform:scale(1.08)}
.node-label{pointer-events:none;paint-order:stroke;stroke:#1a3531;stroke-width:5;stroke-linejoin:round}
.seal-name{font:500 18px var(--serif);fill:#fff3db;letter-spacing:-.025em}.active .seal-name{fill:white;font-weight:600}
.seal-sub{font:500 11.5px var(--sans);fill:#b7c7b6;letter-spacing:.015em}.active .seal-sub{fill:#f4c4ce}
#graph.middle-distance .seal-sub,#graph.overview .node-label,#graph.overview .seal-letters,#graph.overview .outer-ring,#graph.overview .seal-engrave,#graph.overview .aura{display:none}
#graph.overview .thread-ink{vector-effect:non-scaling-stroke;stroke-width:.75px;opacity:.7;stroke-dasharray:none}
#graph.overview .thread-split{display:none}#graph.overview .node .facet{vector-effect:non-scaling-stroke;stroke-width:1.5px}
.inspector{height:calc(var(--map-height) + 100px);border-radius:15px;position:relative;outline:none;box-shadow:0 2px 9px #34302206}
.profile-head{border-top:0;background:#f3efdf;position:relative;isolation:isolate;padding:18px 18px 15px;flex-shrink:0}
.profile-head:before{content:"";position:absolute;inset:0;z-index:-1;background:url('vineyard.jpg') right center/auto 100% no-repeat;mix-blend-mode:multiply;opacity:.33;mask-image:linear-gradient(90deg,transparent 8%,#000 88%)}
.profile-cap{display:flex;align-items:center;justify-content:space-between}.profile-head .eyebrow{color:#6c5745;font-size:10px}
.profile-head .id-row{margin-top:16px}.profile-head .medal{width:45px;height:45px;box-shadow:0 0 0 4px #fffaed75}
.profile-head h3{font-size:clamp(25px,2vw,34px)}.role{font-size:13px;color:#655d50}
.explore-actions{padding:10px 17px 12px;display:flex;gap:7px;background:#fcfbf5}
.explore-actions button,.peek-near{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:600;border-radius:20px}
.explore-actions button:first-child{background:#27483c;color:#fffae9;padding:7px 14px}.explore-actions button:first-child:hover,.peek-near:hover{background:#395f4e}
.explore-actions button+button{width:34px;font-weight:800;border:1px solid #d9d2c4;font-size:18px;line-height:1;color:#5c5145}
.tabs{gap:22px;min-height:39px}.detail-body{padding-top:14px}
#map-dialog{border:1px solid #cfc5b4;border-radius:18px;background:#fcfaf2;color:var(--ink);width:min(420px,calc(100% - 28px));max-height:85dvh;box-shadow:0 16px 60px #071d1c52;padding:22px}
#map-dialog::backdrop{background:#1228246e;backdrop-filter:blur(2px)}.dialog-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.dialog-top h3{font:400 30px/1.15 var(--serif);letter-spacing:-.035em;margin:2px 0 10px}
.dialog-top .round-icon{background:#eeeade;flex:none;width:32px;height:32px}.dialog-top .round-icon .icon{width:16px;height:16px}
.guide-rows>div,.action-rows button{display:flex;align-items:flex-start;gap:13px;padding:12px 0;border-top:1px solid #dfdbcc}.guide-rows>div>.icon,.action-rows .icon{color:#526f59;margin-top:2px}.guide-rows strong,.guide-rows small{display:block}.guide-rows strong{font-size:15px}.guide-rows small{color:#625c51;font-size:14px;line-height:1.4;margin-top:2px}
.action-rows button{width:100%;align-items:center;text-align:left;font-weight:550;padding:14px 2px}.action-rows button:hover{color:#376342}.route-card{border-radius:10px}
.workspace.fullscreen{z-index:40}.workspace.fullscreen .map-panel{overflow:visible}.workspace.fullscreen .stage{min-height:0}
@media(max-width:1120px) and (min-width:761px){.legend-row .scope-count{display:none}.map-toolbar .find{width:32%}.map-key{gap:2px 10px}.map-key button{font-size:11.5px}}
@media(max-width:760px){
 .top{z-index:16}.top .top-inner{height:46px;min-height:46px;flex-direction:row;align-items:center;padding-top:0;justify-content:space-between}
 .brand{font-size:22px}.brand-mark{width:25px;height:27px}
 #mobile-menu{display:flex;align-items:center;gap:5px;font-size:13px;font-weight:600;padding:8px 0 8px 12px}#mobile-menu .icon{width:13px;height:13px}
 .top nav{position:absolute;top:calc(100% - 1px);right:12px;display:none;width:175px;box-shadow:0 8px 24px #28281d20;border:1px solid var(--line);background:#fffef9;border-radius:9px;padding:6px;flex-direction:column;gap:1px}
 .top nav.open{display:flex}.top nav button{min-height:39px;width:100%;padding:8px 10px;border:0;border-radius:6px;gap:8px}.top nav button.active{background:#f0e8e8}.top nav .icon{display:block;width:15px;height:15px}
 body[data-section="map"] main.wrap{padding:0 10px}.atlas-heading{padding:10px 2px 9px;gap:7px}
 .atlas-location{display:none}.atlas-title h1{font-size:clamp(27px,7vw,35px);margin:0}.atlas-heading-right{gap:0}.atlas-heading-right #collection-size{display:none}
 .guide-button{height:32px;padding:4px 8px;font-size:12px}.guide-button .icon{width:14px;height:14px}
 .workspace{display:block;--map-height:clamp(350px,calc(100svh - 236px),760px)}.map-panel{border-radius:14px}.map-toolbar{height:42px;padding:0 9px;gap:5px;border-radius:13px 13px 0 0}
 .map-back{height:32px;width:32px}.atlas-crumb{font-size:13px}.crumb-divider{font-size:12px}.map-toolbar .branch-field{max-width:calc(100% - 137px);flex:1 1 auto}.map-toolbar .branch-field select{font-size:13px;padding:8px 21px 8px 0}
 .map-toolbar .find{display:none}#mobile-search{display:flex;margin-left:auto;flex:none;width:34px;height:34px}
 .map-toolbar.search-open .find{display:flex;position:absolute;inset:3px 6px;width:auto;z-index:11;background:#fcfbf6;height:35px}.map-toolbar .find kbd{display:none}
 .find .results{min-width:100%;width:100%;max-height:min(360px,54dvh)}.find input{font-size:16px}
 .stage{min-height:0;height:var(--map-height)}.stage-caption{left:13px;top:11px}.stage-region{font-size:9px}.stage-title{font-size:18px}
 #stage-help{width:28px;height:28px;right:11px;top:10px;font-size:15px}
 #atlas-navigator{bottom:9px;left:9px}.tools{right:9px;bottom:10px;padding:0 2px}.tools button{height:35px;width:34px}
 .seal-name{font-size:16px}.seal-sub{font-size:11.5px}
 .legend-row{height:33px;min-height:33px;padding:0 10px;z-index:6}.legend-row .scope-count{font-size:11.5px}
 #key-toggle{display:inline-flex;align-items:center;gap:6px;font-weight:550;font-size:12px;height:32px;padding:0 4px}#key-toggle .icon{width:15px;height:15px}
 .legend-row .map-key{display:none;position:absolute;bottom:calc(100% + 3px);left:8px;background:#fffdf5;box-shadow:0 4px 22px #0c262b42;border:1px solid #d0cab9;padding:7px 11px;border-radius:10px;flex-direction:column;align-items:stretch;gap:0}
 .legend-row.show-key .map-key{display:flex}.map-key button{font-size:13px;min-height:36px}
 #selection-peek{min-height:65px;border-top:1px solid #ded9ca;background:#f8f5e9;border-radius:0 0 13px 13px;display:flex;align-items:center;gap:8px;justify-content:space-between;padding:6px 11px}
 #peek-record{display:flex;align-items:center;gap:9px;text-align:left;min-width:0;flex:1;padding:2px 0}
 .peek-medal{width:37px;height:37px;border-radius:50%;background:radial-gradient(at 28% 24%,#ffefcd,var(--hue) 55%,#776960);border:2px solid #fff8e0;outline:1px solid #c6b99f;display:grid;place-items:center;font:600 16px var(--serif);color:#3f3533;flex:none}
 .peek-name{display:grid;min-width:0;line-height:1.13}.peek-name small{font-size:11px;color:#685a48;margin-bottom:3px}.peek-name strong{font:600 19px/1.05 var(--serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.035em}
 .peek-chevron{width:13px;height:13px;transform:rotate(180deg);color:#796c5c;flex:none}.peek-near{background:#28483c;color:#fff9e7;padding:8px 12px;font-size:12px;min-height:36px}.peek-near .icon{width:15px;height:15px}
 .inspector,.workspace.fullscreen .inspector{display:none}
 .inspector.open,.workspace.fullscreen .inspector.open{position:fixed;display:flex;bottom:0;left:max(0px,(100vw - 560px)/2);width:min(100%,560px);height:min(76dvh,740px);min-height:220px;border-radius:20px 20px 0 0;z-index:55;background:#fffdf8;box-shadow:0 -9px 35px #142b2b2b;padding-bottom:env(safe-area-inset-bottom)}
 .sheet-scrim{position:fixed;inset:0;background:#14282454;z-index:52}
 .sheet-open{overflow:hidden}.inspector.open .detail-body{overflow:auto;overscroll-behavior:contain;padding:13px 17px 22px}.inspector.open .profile-head{padding:12px 17px;touch-action:none}
 .inspector.open .profile-head:after{content:"";position:absolute;top:6px;left:calc(50% - 18px);width:36px;height:3px;border-radius:3px;background:#ab9e86}
 .profile-cap .eyebrow{font-size:9.5px}.inspector.open .id-row{margin-top:4px}.inspector.open .profile-head h3{font-size:25px}.inspector.open .profile-head .medal{height:39px;width:39px;font-size:18px}
 #close-sheet{display:inline-flex;height:30px;width:30px;background:#eee8da}.inspector.open .tabs{min-height:36px}.inspector.open .explore-actions{padding:7px 16px}
 .workspace.fullscreen{position:fixed;display:flex;inset:0;gap:0;padding:0;border:0;border-radius:0}.workspace.fullscreen .map-panel{width:100%;flex:1;border-radius:0;border:0}.workspace.fullscreen .stage{flex:1}
 .workspace.fullscreen .map-toolbar{border-radius:0}.workspace.fullscreen .legend-row{flex:none}.workspace.fullscreen #selection-peek{padding-bottom:max(7px,env(safe-area-inset-bottom));border-radius:0}.small-head{margin:17px 0 8px}
}
@media(max-width:350px){.atlas-title h1{font-size:25px}.guide-button{padding:4px 6px}.peek-near{padding:7px 9px}.legend-row .scope-count{font-size:10px}}
@media(prefers-reduced-motion:reduce){.seal,.node-label,.inspector,.map-panel *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.stage{background-size:100% 100%;background-repeat:no-repeat}
.travelling-light{pointer-events:none}.peek-open-label{font-size:11px;color:#625b49;margin-left:auto}.peek-chevron{margin-left:-5px}
.marriage-note{font:italic 14px var(--serif);fill:#f3c4ca;paint-order:stroke;stroke:#213b33;stroke-width:3.6;stroke-linejoin:round}
#graph.overview .marriage-note,.touch-hint,#stage-help{display:none}.fullscreen #stage-help{display:block}
@media(max-width:760px){.touch-hint{display:inline;font-size:11px;color:#6e7262}.legend-row{gap:5px}}
@media(max-width:340px){.touch-hint{display:none}}

.tools #zoom-level {
  position:absolute; right:5px; bottom:calc(100% + 4px); padding:0 4px;
  color:#edf1dc; font:600 12px/1.4 var(--sans); text-shadow:0 1px 4px #123027;
  pointer-events:none;
}
.tools button:disabled {opacity:.38; cursor:default}
@media(max-width:760px) {
  .tools button {width:44px; height:44px}
}
@media(max-width:375px) {
  .tools {display:grid; grid-template-columns:repeat(2,44px); padding:0; border-radius:18px}
  .tools>span {display:none}
}

.screen-reader-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap;border:0}
.results [role="option"][aria-selected="true"]{background:#e6ecdf;box-shadow:inset 3px 0 #61785d}
body.map-expanded{overflow:hidden}
@media(max-width:760px){
 .workspace:not(.fullscreen) .legend-row.show-key{display:grid;grid-template-columns:auto 1fr;min-height:44px;height:auto;gap:0 8px}
 .workspace:not(.fullscreen) .show-key #key-toggle{grid-area:1/1;justify-self:start}
 .workspace:not(.fullscreen) .show-key .scope-count,.workspace:not(.fullscreen) .show-key #clear-focus{grid-area:1/2;justify-self:end}
 .workspace:not(.fullscreen) .show-key .touch-hint{display:none}
 .workspace:not(.fullscreen) .show-key .map-key{grid-area:2/1/3/3;position:static;display:grid;grid-template-columns:repeat(auto-fit,minmax(122px,1fr));gap:2px 6px;padding:6px 0 8px;box-shadow:none;border:0;border-top:1px solid #dfdbce;border-radius:0;background:transparent}
 .workspace:not(.fullscreen) .show-key .map-key button{padding:5px;min-height:40px;text-align:left}
}
