/* The explorer is one continuous surface with three honest regions: history,
   controls, and the usable map. Details consume space normally; desktop full
   screen uses a measured floating inspector and reserves the same camera space. */
.explorer{overflow:hidden}
.explorer-layout{display:block;min-width:0}
.canvas-column{padding:0;min-width:0}
.graph-stage{--history-height:0px;--detail-width:clamp(300px,28vw,350px);--map-safe-top:64px;--map-safe-bottom:60px;position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);min-width:0;height:clamp(640px,80svh,840px);overflow:hidden;border-radius:17px;background:radial-gradient(ellipse at 45% 45%,#53734723,transparent 65%),radial-gradient(circle,#a4c8b726 .7px,transparent 1.3px),var(--night);background-size:auto,29px 29px,auto}
.explorer-layout.has-selection .graph-stage{grid-template-columns:minmax(0,1fr) var(--detail-width)}
.graph-stage.has-history{--history-height:40px}
.graph-header{position:absolute;z-index:12;top:var(--history-height);left:0;right:0;display:flex;align-items:center;gap:10px;min-width:0;min-height:68px;padding:12px;border:0;background:transparent;pointer-events:none}
.graph-header :is(button,a,label,select){pointer-events:auto}
.explorer-toolbar{--thread-menu-inset:0px;position:relative;display:flex;align-items:center;justify-content:flex-start;flex:1 1 auto;width:auto;max-width:570px;min-width:0;gap:6px;padding:0;border:0;background:none;flex-wrap:nowrap}
.explorer-toolbar:has(.trail-back:not([hidden])){--thread-menu-inset:50px}
.thread-nav{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.thread-menu{position:static;display:block;flex:1 1 0;min-width:0;max-width:390px;pointer-events:auto}
.fullscreen-toggle{display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;padding:0;border:1px solid #9fbba666;border-radius:12px;background:#162b24ed;color:#dae9d8;box-shadow:0 3px 14px #0003;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.fullscreen-toggle:hover{background:#344b35;border-color:#c3dfa28c}.fullscreen-toggle svg{grid-area:1/1;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.thread-picker{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;max-width:none;gap:12px;min-height:44px;padding:10px 14px;border:1px solid #78958070;border-radius:10px;background:linear-gradient(145deg,#314335ee,#213029f5);color:#edf5e5;font-size:15px;line-height:1.3;box-shadow:0 3px 14px #0003;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);cursor:pointer;list-style:none;user-select:none;transition:background .18s,border-color .18s}
.thread-picker::-webkit-details-marker{display:none}.thread-picker::marker{content:''}
#topic-label{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.thread-icon{display:none;fill:currentColor}
.thread-step{display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;border:1px solid #78958055;border-radius:10px;background:#25342b;color:#dbe9d4;text-decoration:none;transition:background .18s,border-color .18s}
.trail-back[hidden]{display:none}
.thread-step svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.thread-step:hover{background:#344b35;border-color:#c3dfa28c}
.thread-step:disabled{opacity:.34;background:#1c2822;border-color:#61736740}
.thread-step:focus-visible{outline:3px solid #67a9fa;outline-offset:3px}
.thread-step.is-entry-cue{animation:thread-entry-cue 1.15s ease-in-out 3}
@keyframes thread-entry-cue{0%,100%{border-color:#78958055;box-shadow:0 3px 14px #0003}50%{border-color:var(--lime);box-shadow:0 0 0 4px color-mix(in srgb,var(--lime) 22%,transparent),0 0 22px color-mix(in srgb,var(--lime) 42%,transparent)}}
.thread-picker:hover{background:#344b35;border-color:#c3dfa28c}
.thread-picker>svg{flex-shrink:0;pointer-events:none}
.thread-picker:focus-visible{outline:3px solid #67a9fa;outline-offset:4px}
.thread-chevron{transition:transform .18s ease}.thread-menu[open]>.thread-picker .thread-chevron{transform:rotate(180deg)}
.thread-menu-panel{box-sizing:border-box;position:absolute;top:calc(100% + 7px);left:var(--thread-menu-inset);z-index:30;width:min(420px,calc(100vw - 24px - var(--thread-menu-inset)));max-height:min(550px,calc(100dvh - 120px));padding:7px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #9fbba67a;border-radius:13px;background:#12231ef7;color:#eaf3e7;box-shadow:0 18px 48px #0008;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);scrollbar-width:thin;scrollbar-color:#708c7b #152220}
.thread-menu:not([open])>.thread-menu-panel{display:none}.thread-menu[open]>.thread-menu-panel{animation:reveal-thread-menu .18s ease-out}@keyframes reveal-thread-menu{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.thread-menu-panel button{box-sizing:border-box;color:inherit;font:13px/1.3 var(--sans);text-align:left}
.thread-menu-panel-header{position:sticky;top:-7px;z-index:2;display:flex;align-items:center;justify-content:space-between;min-height:38px;padding:4px 4px 4px 11px;background:#12231ef7;color:#9eb1a5;font:10px/1.3 var(--mono);letter-spacing:.08em;text-transform:uppercase}
#thread-menu-close{display:grid;place-items:center;width:34px;min-height:34px;padding:0;border:1px solid #80978a55;border-radius:8px;background:#ffffff06;color:#dce8df}#thread-menu-close:hover{background:#ffffff10;border-color:#a9c0b0}#thread-menu-close svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.thread-menu-all{display:block;width:100%;min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:9px;background:transparent}
.thread-menu-all:hover,.thread-menu-heading:hover,.thread-menu-options button:hover{background:#ffffff0c;border-color:#8da5945c}
.thread-menu-panel button:focus-visible{outline:3px solid #67a9fa;outline-offset:-2px}
.thread-menu-panel button[aria-current=page]{border-color:#c9e69c8c;background:#cce9a518;color:#f2f8ed}
.thread-menu-group{border-top:1px solid #91a99732}
.thread-menu-heading{position:sticky;top:38px;z-index:1;display:flex;align-items:center;gap:9px;width:100%;min-height:46px;margin:0;padding:10px 12px;border:1px solid transparent;border-radius:9px;background:#12231ef7;color:#f1dfb4;font:600 14px/1.3 var(--sans);letter-spacing:.01em;text-align:left}
.thread-menu-heading:before{content:'';flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#d9b773;box-shadow:0 0 0 3px #d9b7731f}
h3.thread-menu-heading{border-radius:0;color:#d8cab0}
.thread-menu-options{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;padding:0 4px 8px 14px;border-left:1px solid #88a09042;margin:0 0 8px 15px}
.thread-menu-options button{display:flex;align-items:center;min-height:42px;padding:8px 10px 8px 15px;border:1px solid transparent;border-radius:8px;background:transparent;color:#dce8df}
.focus-trail{position:relative;z-index:13;grid-column:1;grid-row:1;height:40px;overflow:hidden;border:0;background:var(--night)}
.focus-trail ol{display:flex;align-items:center;gap:7px;height:40px;margin:0;padding:3px 14px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;list-style:none}
.focus-trail ol::-webkit-scrollbar{display:none}
.focus-trail li{display:flex;align-items:center;gap:7px;flex:0 0 auto;min-width:0}
.focus-trail li+li:before{content:'›';color:#779083;font-size:15px}
.focus-trail button,.focus-trail [aria-current=page]{display:block;max-width:260px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;line-height:1.25}
.focus-trail button{min-height:32px;padding:4px 2px;border:0;background:none;color:#aebfb4;text-decoration:underline;text-decoration-color:#84998d66;text-underline-offset:4px}
.focus-trail button:hover{color:#eaf5e7;text-decoration-color:#d7e9ce}
.focus-trail [aria-current=page]{color:#e9f1e8;padding:8px 2px}
.focus-trail .trail-home{display:grid;place-items:center;flex:0 0 32px;width:32px;min-height:32px;padding:0;border:1px solid #84998d66;border-radius:9px;background:#162b24;color:#dce9da;text-decoration:none}
.focus-trail .trail-home:hover{border-color:#bcd4a9;background:#2a4135;color:#f3f8f1}
.focus-trail .trail-home svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.graph-top-tools{position:static;display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;margin-left:auto}
.graph-tool-stack{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.guide-toggle{position:static;display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;padding:0;border:1px solid #9fbba666;border-radius:12px;background:#162b24ed;color:#dae9d8;box-shadow:0 3px 14px #0003;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.guide-toggle:hover{background:#344b35;border-color:#bcd4a9}.guide-toggle:focus-visible{outline:3px solid #67a9fa;outline-offset:3px}
.guide-toggle svg,#guide-close svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.region-picker{position:relative;display:flex;align-items:center;justify-content:space-between;flex:1 1 145px;gap:9px;min-width:0;min-height:44px;max-width:210px;padding:8px 10px 8px 13px;border:1px solid #9fbba666;border-radius:12px;background:#162b24ed;color:#dae9d8;box-shadow:0 3px 14px #0003;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.region-picker[hidden]{display:none}.region-picker:hover{background:#263d31f5;border-color:#bcd4a9}.region-picker:focus-within{outline:3px solid #67a9fa;outline-offset:3px}
#region-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.2}#region-select{position:absolute;inset:0;width:100%;height:100%;opacity:0;font-size:16px}.region-picker>svg{flex:0 0 auto}
.graph-guide-dialog{box-sizing:border-box;width:min(640px,calc(100vw - 32px));height:min(720px,calc(100vh - 24px));height:min(720px,calc(100dvh - 24px));max-width:calc(100vw - 32px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #a6bea97d;border-radius:16px;background:#12231ef7;color:#eef5ea;box-shadow:0 22px 80px #0009;overflow:hidden}
.graph-guide-dialog::backdrop{background:#06110dc2;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.graph-guide-dialog[hidden]{display:none}.guide-card{display:grid;grid-template-rows:auto minmax(0,1fr);height:100%;min-height:0;overflow:hidden}
.guide-card header{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:76px;padding:14px 16px 13px 18px;border-bottom:1px solid #91a99742;background:#12231e}.guide-card header p{margin:0 0 2px;font:11px/1.3 var(--mono);text-transform:uppercase;letter-spacing:.08em;color:#9fb4a6}.guide-card h2{margin:0;font:1.7rem/1.05 var(--serif);letter-spacing:-.035em}
#guide-close{display:flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;min-width:82px;min-height:44px;padding:0 11px;border:1px solid #b8cdbb8c;border-radius:10px;background:#ffffff09;color:#edf4e9;font-size:13px}#guide-close:hover{background:#ffffff12;border-color:#c3dfa28c}#guide-close:focus-visible{outline:3px solid #67a9fa;outline-offset:3px}
.guide-scroll{min-height:0;padding:15px 18px 20px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#708c7b #152220;-webkit-overflow-scrolling:touch}
.guide-intro{margin:0 0 15px;color:#d2dfd6;font-size:15px;line-height:1.45}
.guide-mobile-only{display:none}
.guide-section{padding:13px 0 15px;border-top:1px solid #91a9972e}.guide-section>h3{margin:0 0 9px;color:#aebfb4;font:11px/1.35 var(--mono);letter-spacing:.075em;text-transform:uppercase}
.guide-instruction{display:grid;grid-template-columns:minmax(210px,.9fr) minmax(0,1.1fr);align-items:center;gap:16px}.guide-instruction>p{margin:0;color:#bccdc2;font-size:14px;line-height:1.45}.guide-instruction strong{color:#eef5ea;font-weight:550}
.guide-sample{min-width:0;pointer-events:none;user-select:none}
.guide-sample-nav{display:grid;grid-template-columns:38px minmax(0,1fr) 38px 38px;gap:5px}.guide-sample-button,.guide-sample-picker,.guide-fit,.guide-region-replica,.guide-layout-replica,.guide-sample-screen>span{display:flex;align-items:center;justify-content:center;min-height:38px;border:1px solid #78958070;border-radius:9px;background:#25342b;color:#e3eee0;box-shadow:0 3px 12px #0002}.guide-sample-button svg{width:16px;height:16px}.guide-sample-picker{justify-content:space-between;min-width:0;padding:0 9px;background:linear-gradient(145deg,#314335ee,#213029f5);font-size:12px;white-space:nowrap}.guide-sample-picker svg{width:12px;height:12px;flex:0 0 auto}
.guide-sample svg{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.guide-sample-nodes{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);align-items:center}.guide-sample-nodes span{display:grid;place-items:center;min-height:62px;padding:7px;border:1px solid #86a190;border-radius:8px;background:#172523;color:#eef3ed;font-size:12px}.guide-sample-nodes .is-theme{border:2px solid #d9b773;border-radius:18px;background:#332e20;color:#f7e3b9}.guide-sample-nodes i{height:1px;background:#95ad9e;position:relative}.guide-sample-nodes i:after{content:'';position:absolute;right:-1px;top:-2px;width:5px;height:5px;border-radius:50%;background:#dff4aa}
.guide-sample-zoom{display:grid;grid-template-columns:minmax(70px,1fr) 32px 54px;align-items:center;gap:8px;padding:6px 7px 6px 10px;border:1px solid #9fbba666;border-radius:10px;background:#162b24ed;color:#bed0c3;font:11px/1.2 var(--mono)}.guide-fake-range{height:4px;border-radius:9px;background:#8c9991;position:relative}.guide-fake-range:before{content:'';position:absolute;left:0;top:0;width:58%;height:100%;border-radius:inherit;background:#d4ef9f}.guide-fake-range i{position:absolute;left:58%;top:50%;width:14px;height:14px;transform:translate(-50%,-50%);border-radius:50%;background:#d4ef9f}.guide-fit{min-height:34px;border-color:#9fbba638;background:#ffffff06;font:12px/1.2 var(--sans)}
.guide-sample-layout{display:flex;justify-content:flex-end;gap:5px}.guide-region-replica{flex:1 1 44%;padding:0 9px;font-size:12px}.guide-layout-replica{flex:1 1 56%;gap:7px;padding:0 9px;font-size:12px;white-space:nowrap}.guide-layout-replica svg{width:14px;height:14px;opacity:.8}
.guide-sample-screen{display:flex}.guide-sample-screen>span{width:44px;min-height:44px;margin-left:auto;background:#162b24ed}.guide-sample-screen svg{width:19px;height:19px}
.guide-current .graph-foot{padding:0;border:0}.guide-current .graph-foot p{margin:0;color:#c5d4c9;font-size:14px;line-height:1.5}.guide-connections .line-legend{padding:0;gap:12px 18px}
.layout-controls{position:absolute;right:12px;bottom:12px;z-index:4;display:flex;align-items:center;justify-content:flex-end;gap:7px;max-width:calc(100% - 24px);pointer-events:none}
.layout-controls>label{pointer-events:auto}
.layout-picker{position:relative;flex:0 1 auto;min-width:0;max-width:220px;border:1px solid #9fbba666;border-radius:12px;background:#162b24ed;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 3px 14px #0003;color:#dae9d8;transition:border-color .18s,background .18s}
.layout-picker:hover{background:#263d31f5;border-color:#bcd4a9}
.layout-picker>select{position:absolute;inset:0;display:block;appearance:none;-webkit-appearance:none;min-height:44px;width:100%;height:100%;opacity:0;font:16px/1.2 var(--sans)}
#layout-label{display:block;min-height:44px;align-content:center;padding:9px 30px 9px 35px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:15px/1.2 var(--sans)}
.layout-picker:focus-within{outline:3px solid #67a9fa;outline-offset:3px}
.layout-picker option{background:var(--night-2);color:#f4f5ed}
.layout-picker>svg{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}
.layout-icon{left:11px;fill:none;stroke:currentColor;stroke-width:1.1;opacity:.75}
.layout-chevron{right:10px}
#graph-backdrop{position:absolute;inset:0;pointer-events:none}
.layout-region{position:absolute;border:1.5px solid #79987b6b;border-radius:28px;background:#54765510;padding:18px 25px}
.region-label{display:block;color:#d8e8cc;font:30px/1.1 var(--serif);max-width:100%}
.region-caption{display:block;margin-top:8px;font:14px/1.4 var(--mono);color:#aebda9}
.layout-region-year{background:#d6e4b308;border-color:#cee49866}
.layout-region-year .region-label{font:58px/1 var(--serif);letter-spacing:-.045em;color:#e7e7c8}
.layout-region-year .region-caption{position:absolute;top:42px;right:25px;margin:0}
.layout-region-undated{border-style:dashed;border-color:#a5bfd23d;background:#86adbc08}
.layout-region-letter{border-radius:18px;background:#8ba48b0b;border-color:#9fb69d42;padding:18px 24px}
.layout-region-letter .region-label{font:58px/.9 var(--serif);color:#e1edd7}
.layout-region-letter .region-caption{position:absolute;top:22px;right:24px;margin:0}
.layout-region-letter.is-empty{border-style:dashed;background:transparent;opacity:.34}
.layout-region-type{border-radius:24px;background:#77936d0d;border-color:#9eb69750}
.layout-region-type .region-label{font-size:38px}
.era-connectors{position:absolute;inset:0;overflow:visible}
.era-connector{fill:none;stroke:#e8cf8d;stroke-width:3;opacity:.65}
.orbit-guide{position:absolute;border:1.5px dashed #b5c69b33;border-radius:50%}
.orbit-guide>span{position:absolute;top:-19px;left:50%;transform:translateX(-50%);font:28px/1.25 var(--serif);color:#b8caa5;background:var(--night);padding:0 18px;white-space:nowrap}
.graph-content{display:block;grid-column:1;grid-row:2;min-width:0;min-height:0;overflow:hidden;background:transparent}
.graph-canvas{position:relative;min-width:0;min-height:0;height:100%;overflow:hidden}
.graph-stage .zoom-dock{position:absolute;left:12px;bottom:12px;z-index:5;display:block;padding:0;margin:0;width:44px}
.zoom-dock button{min-height:44px;min-width:44px;padding:6px;font-size:13px;border:1px solid #9fbba666;border-radius:10px;background:#162b24ed;color:#dae9d8;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 3px 14px #0003}
.zoom-dock button:hover{background:#344b35;border-color:#bcd4a9}
.zoom-dock button:focus-visible{outline:3px solid #67a9fa;outline-offset:3px}
.zoom-dock .zoom-controls{position:absolute;bottom:calc(100% + 8px);left:0;display:flex;flex-direction:column;align-items:stretch;gap:7px;width:min(226px,calc(100vw - 34px));padding:9px;border:1px solid #9fbba666;border-radius:12px;background:#162b24f5;box-shadow:0 4px 24px #0005;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.zoom-controls button{box-shadow:none;border-color:transparent;background:transparent}
.zoom-range-control{display:grid;grid-template-columns:minmax(118px,1fr) 42px;align-items:center;gap:9px;min-height:32px}
.zoom-dock #zoom-range{display:block;width:100%;height:28px;margin:0;accent-color:#d4ef9f;cursor:ew-resize}
.zoom-dock #zoom-range:focus-visible{outline:3px solid #67a9fa;outline-offset:2px;border-radius:8px}
.zoom-dock #zoom-level{font-size:11px;line-height:1.3;min-width:42px;text-align:right;overflow-wrap:anywhere;padding:3px 0;color:#b8c8b5}
.zoom-panel-actions{display:block}.zoom-dock #fit-map{min-height:36px;width:100%;border-color:#9fbba638;background:#ffffff06}
.zoom-dock #fit-map:disabled{opacity:.4;border-color:#9fbba622;background:transparent;color:#91a094;box-shadow:none}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#zoom-panel[hidden]{display:none}
.zoom-dock #zoom-toggle{display:grid;place-items:center;width:44px;padding:0;border-radius:12px}
#zoom-toggle svg{grid-area:1/1;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#zoom-toggle .zoom-close{display:none}
#zoom-toggle[aria-expanded=true]{background:#c9eeb514;border-color:#a5c892}
#zoom-toggle[aria-expanded=true] .zoom-icon{display:none}
#zoom-toggle[aria-expanded=true] .zoom-close{display:block}
#zoom-panel:not([hidden]){animation:reveal-zoom .2s ease-out}
@keyframes reveal-zoom{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:821px){
  .explorer-layout.has-selection .graph-header{right:var(--detail-width)}
  .graph-stage .zoom-dock{width:278px}
  .zoom-dock #zoom-toggle{display:none}
  .zoom-dock .zoom-controls{position:relative;bottom:auto;left:auto;flex-direction:row;align-items:center;width:278px;padding:6px 7px 6px 10px}
  .zoom-range-control{flex:1;grid-template-columns:minmax(105px,1fr) 42px}
  .zoom-dock #fit-map{width:auto;min-width:56px;min-height:40px}
  #zoom-panel:not([hidden]){animation:none}
}
.canvas-column .graph-viewport{height:100%;margin:0;border:0;border-radius:0}
.graph-viewport.is-focus{height:490px;overflow:hidden;overflow:clip;border:1px solid #7a9b7138}
.graph-world{margin:0;transform-origin:0 0;will-change:transform;background:none}
.graph-world:before{display:none}
.graph-viewport{background:transparent}
.canvas-column{padding:0}
.detail{position:relative;z-index:8;grid-column:2;grid-row:1/-1;min-width:0;width:auto;height:auto;max-height:none;padding:10px 12px 12px;margin:0;overflow-y:auto;overscroll-behavior-y:contain;scroll-padding-top:50px;border:0;border-left:1px solid #91a99766;border-radius:0;background:#10201d;box-shadow:none}
.detail.has-image{width:auto}
.detail-toolbar{position:sticky;top:6px;z-index:7;display:flex;justify-content:flex-end;height:0;min-height:0;margin:0;padding:0;pointer-events:none;color:#edf4e9}
.detail-toolbar>span{display:none}
#close-detail{display:grid;place-items:center;flex:0 0 38px;width:38px;min-height:38px;margin:0;padding:0;border:1px solid #a8bbaa77;border-radius:8px;background:#10231ee8;color:#edf4e9;box-shadow:0 3px 14px #0005;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);pointer-events:auto}
#close-detail:hover{background:#ffffff12;border-color:#c3dfa28c}
.detail:not([hidden]){animation:reveal-detail .22s ease-out}
@keyframes reveal-detail{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}
.graph-foot{padding:10px 12px 4px}
.graph-foot p{font-size:13px;max-width:none;padding:0}
.line-legend{padding-bottom:10px}
.is-focus .graph-node{will-change:transform}
.is-focus .graph-node.is-selected{z-index:5}
.is-map .graph-node.is-context{z-index:1}
.is-map .graph-node.is-active{z-index:3}
.is-map .graph-node.is-selected{z-index:5}
.is-map .graph-node:focus-visible{opacity:1!important;z-index:6}
.is-overview .node-year{display:none}
.is-map .graph-node{will-change:transform}
@media(max-width:820px){
  .graph-stage,.explorer-layout.has-selection .graph-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;height:auto}
  .graph-content{grid-column:1;grid-row:2;display:block;overflow:visible}
  .graph-canvas{height:clamp(430px,60svh,620px)}
  .detail,.detail.has-image{position:relative;grid-column:1;grid-row:3;width:auto;height:auto;max-height:none;margin:0;overflow:visible;scroll-margin-top:10px;border:0;border-top:1px solid #91a99766;box-shadow:0 -12px 36px #0003}
  .detail-toolbar{top:6px}
  .detail:not([hidden]){animation-name:reveal-detail-mobile}
  @keyframes reveal-detail-mobile{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
}
@media(max-width:579px){.graph-viewport.is-focus{height:362px}}
@media(max-width:520px){
  .graph-stage{height:auto;border-radius:11px}
  .explorer:has(.thread-menu[open]),.graph-stage:has(.thread-menu[open]){overflow:visible}
  .graph-header{display:flex;align-items:flex-start;min-height:56px;padding:8px;gap:5px}
  .explorer-toolbar{width:auto;max-width:none;gap:4px}
  .explorer-toolbar:has(.trail-back:not([hidden])){--thread-menu-inset:44px}
  .thread-nav{gap:3px}
  .thread-step{flex-basis:40px;width:40px;min-height:40px;border-radius:9px}
  .thread-menu{max-width:none}.thread-picker{min-height:40px;max-width:none;padding:8px 9px;gap:7px;font-size:13px}
  .thread-menu-panel{position:absolute;top:calc(100% + 6px);right:auto;bottom:auto;left:var(--thread-menu-inset);width:calc(100vw - 16px - var(--thread-menu-inset));max-height:min(550px,calc(100dvh - 104px));padding:6px;border-radius:11px}
  .thread-menu-panel-header{top:-6px}
  .thread-menu-options{grid-template-columns:minmax(0,1fr);gap:2px;padding-left:11px;margin-left:9px}.thread-menu-options button{min-height:42px}
  .focus-trail ol{min-height:40px;padding:2px 10px}
  .focus-trail button,.focus-trail [aria-current=page]{max-width:190px;font-size:12px}
  .graph-canvas{height:clamp(315px,calc(66.667vw - 23px + var(--map-safe-top) + var(--map-safe-bottom)),460px);aspect-ratio:auto}
  .graph-stage .zoom-dock{left:9px;bottom:9px}
  .graph-top-tools{position:static;display:flex;flex:0 0 auto;margin:0}
  .graph-tool-stack{display:flex;flex-direction:row;gap:5px}
  .guide-toggle,.fullscreen-toggle{width:40px;min-height:40px;flex-basis:40px;border-radius:10px}
  .region-picker{flex-basis:128px;max-width:145px;border-radius:10px;padding-left:10px}#region-label{font-size:12px}
  .zoom-dock .zoom-controls{width:min(218px,calc(100vw - 18px))}
  .zoom-dock #zoom-toggle{border-radius:10px}
  .layout-controls{right:9px;bottom:9px;left:9px;gap:5px;max-width:none}
  .layout-picker{max-width:145px;border-radius:10px}
  #layout-label{font-size:13px;padding-left:28px;padding-right:25px}
  .layout-icon{width:13px;height:13px;left:9px}
  .layout-chevron{width:12px;right:8px}
  .graph-guide-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);height:calc(100vh - 20px);height:calc(100dvh - 20px);max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);border-radius:13px}.guide-card header{min-height:68px;padding:11px 10px 10px 13px}.guide-card h2{font-size:1.5rem}#guide-close{min-width:76px;padding:0 9px}.guide-scroll{padding:12px 13px 17px}.guide-intro{font-size:14px}.guide-desktop-only{display:none}.guide-mobile-only{display:inline}.guide-instruction{grid-template-columns:1fr;gap:9px}.guide-section{padding:11px 0 13px}.guide-section>h3{margin-bottom:8px}.guide-sample{max-width:310px}.guide-instruction>p{font-size:14px}.guide-sample-nav{grid-template-columns:36px minmax(0,1fr) 36px 36px}.guide-sample-button,.guide-sample-picker{min-height:36px}
  .detail,.detail.has-image{width:auto;max-height:none;padding:9px 11px 11px}
}
@media(prefers-reduced-motion:reduce){.thread-picker,.thread-step,.layout-picker{transition:none}.thread-step.is-entry-cue,#zoom-panel:not([hidden]){animation:none}}

body.map-expanded{overflow:hidden}
.explorer.is-expanded{position:fixed;inset:0;z-index:1000;display:block;width:100vw;height:100dvh;border:0;border-radius:0;background:var(--night);overflow:hidden}
.explorer.is-expanded .explorer-layout{height:100%;min-height:0}
.explorer.is-expanded .canvas-column,.explorer.is-expanded .graph-stage{height:100%;min-height:0}
.explorer.is-expanded .graph-stage,.explorer.is-expanded .graph-viewport.is-map{border-radius:0}
.explorer.is-expanded .graph-canvas,.explorer.is-expanded .graph-viewport.is-map{height:100%;aspect-ratio:auto}

@media(max-width:820px){
  .explorer.is-expanded{overflow-y:auto}
  .explorer.is-expanded .explorer-layout,.explorer.is-expanded .canvas-column{height:auto;min-height:100%}
  .explorer.is-expanded .graph-stage{height:auto;min-height:100dvh;overflow:visible}
  .explorer.is-expanded .graph-canvas{height:100dvh;min-height:430px;aspect-ratio:auto}
  .explorer.is-expanded .graph-stage.has-history .graph-canvas{height:calc(100dvh - 40px)}
  .explorer.is-expanded .detail:not([hidden]){width:auto;height:auto;max-height:none}
}
@media(max-width:520px){.explorer.is-expanded .graph-canvas{min-height:390px}}
@media(min-width:821px){
  .explorer.is-expanded .explorer-layout.has-selection .graph-stage{grid-template-columns:minmax(0,1fr)}
  .explorer.is-expanded .explorer-layout.has-selection .graph-header{right:0}
  .explorer.is-expanded .detail,.explorer.is-expanded .detail.has-image{position:absolute;z-index:11;top:calc(var(--history-height) + 80px);right:16px;bottom:16px;width:var(--detail-width);height:auto;max-height:none;margin:0;border:1px solid #91a99766;border-radius:14px;background:#10201df5;box-shadow:0 18px 54px #0007;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .explorer.is-expanded .explorer-layout.has-selection .layout-controls{right:calc(var(--detail-width) + 32px)}
}
@media(max-width:360px){
  .explorer-toolbar:has(.trail-back:not([hidden])){--thread-menu-inset:40px}
  .thread-step{flex-basis:36px;width:36px}
  .thread-picker{padding-left:7px;padding-right:7px}
}
