/* Map overlays are schematic relations, never distance or territorial boundaries. */
.wm-political-pact{stroke:#a6dbb6;stroke-width:2;stroke-dasharray:2 6;vector-effect:non-scaling-stroke;opacity:.85}
.wm-political-war{stroke:#ff967e;stroke-width:3;stroke-dasharray:9 5;vector-effect:non-scaling-stroke;opacity:.95}
.wm-held-ring{fill:none;stroke:#f1cf84;stroke-width:3;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.wm-world-controls{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:0 0 12px;padding:12px;background:#102331;border:1px solid #48606c;color:#edf1eb}
.wm-world-controls label{display:grid;gap:5px;flex:1;min-width:170px;font-size:12px}
.wm-world-controls select,.wm-world-controls button{min-height:44px;font:inherit;color:#edf1eb;background:#122c3c;border:1px solid #68828e;border-radius:4px;padding:8px 12px}
.wm-map-key{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12px;color:#d4e3e6;margin:10px 0}
.wm-map-key span{display:inline-flex;align-items:center;gap:7px}
.wm-map-key i{display:inline-block;width:24px;border-top:2px dotted #a6dbb6}
.wm-map-key .wm-key-war{border-top:3px dashed #ff967e}
.wm-map-key .wm-key-held{width:16px;height:16px;border:2px dashed #f1cf84;border-radius:50%}
.wm-country-context{padding:16px;margin:0 0 14px;border:1px solid #9caaab;border-top:3px solid #315767;background:#eef1eb;color:#182d35;font-size:14px;line-height:1.5}
.wm-country-context .wm-record-kicker{font:12px var(--x-mono,monospace);letter-spacing:.08em;text-transform:uppercase;margin:0 0 8px;color:#35515a}
.wm-country-context h3{font:500 22px var(--x-caps,serif);margin:0 0 12px;color:#182d35}
.wm-country-context ul{list-style:none;padding:0;margin:8px 0 14px}
.wm-country-context li{border-bottom:1px solid #b9c6c5;padding:9px 0}
.wm-country-context li strong,.wm-country-context li span,.wm-country-context li small{display:block}
.wm-country-context li small{font-size:12px;color:#35515a}
.wm-country-context dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:6px;margin:12px 0}
.wm-country-context dd{margin:0;text-align:right;font-weight:600;overflow-wrap:anywhere}
.wm-country-context button{min-height:44px;width:100%;font-size:14px}
.wm-conflicts strong{color:#8d2f25;text-transform:uppercase}
.wm-held-record{padding:10px;border:1px dashed #6e622f}
.wm-inspector-head{display:none}
.wm-world-controls .wm-open-record{display:none}
.wm-marker-hit{fill:transparent;pointer-events:all}
.wm-world-controls :focus-visible,.wm-inspector :focus-visible,[data-world-marker]:focus-visible{outline:3px solid #ca8a32;outline-offset:3px}
@media(max-width:700px){
 .wm-world-controls .wm-open-record{display:inline-block}
 .hx-world .hx-right:has(.wm-inspector){position:static;padding:0;max-height:none;overflow:visible;background:none}
 .wm-inspector{display:none;position:fixed;left:8px;right:8px;bottom:var(--hos-world-bottom-offset,calc(90px + env(safe-area-inset-bottom,0px)));z-index:45;max-height:calc(100dvh - 170px - env(safe-area-inset-bottom,0px));background:#0c2030;color:#edf1eb;border:1px solid #71848c;border-radius:12px 12px 4px 4px;box-shadow:0 -12px 35px #0005;overflow:auto;overscroll-behavior:contain}
 .wm-inspector[data-open=true]{display:block}
 .wm-inspector-head{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;padding:12px 14px;background:#102b3a;border-bottom:1px solid #71848c;z-index:1}
 .wm-inspector-head span{font-size:12px;color:#c5d5dc}
 .wm-inspector-head h2{font-size:20px!important;letter-spacing:0!important;margin:3px 0!important;color:#f3f4ec}
 .wm-inspector-head button{min-width:64px;min-height:44px;font-size:14px;background:#203c4b;color:#f4f6ef;border:1px solid #91a6ab;border-radius:4px}
 .wm-inspector-content{padding:12px}
 .wm-inspector-content button,.wm-inspector-content select,.wm-inspector-content [role=button]{min-height:44px;min-width:44px;font-size:14px}
 .wm-inspector-content .hx-tabs{flex-wrap:wrap}
 .wm-inspector-content small,.wm-inspector-content .hx-label,.wm-inspector-content .hx-foot,.wm-inspector-content .hx-sub2{font-size:12px!important}
 .wm-world-controls{gap:8px;padding:10px}
 .wm-world-controls select{width:100%}
 .wm-map-key{line-height:1.5}
}
@media(max-width:700px){
 .wm-inspector-content span{font-size:max(12px,1em)!important}
}

/* Globe gestures own their surface; normal page scrolling remains outside it. */
.wg-surface{touch-action:none;cursor:grab}
.wg-surface:active{cursor:grabbing}
.wg-surface canvas{width:100%;height:100%}
@media(max-width:700px){
 html.hos-phone .wm-inspector{bottom:var(--hos-world-bottom-offset,calc(74px + env(safe-area-inset-bottom,0px)));z-index:var(--ph-z-sheet,75)}
 .hx-mapstage .wg-wrap>.wm-toolbar button{min-height:44px;font-size:12px}
}

/* Economic links: a dark casing keeps routes legible against terrain. */
.wm-trade-route{cursor:pointer;--route-color:#b4aa87;--route-opacity:.3}
.wm-trade-route.is-related{--route-color:#e6bd73;--route-opacity:.85}
.wm-trade-route.is-active{--route-color:#a9eee7;--route-opacity:1}
.wm-trade-route path{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.wm-trade-casing{stroke:#061923;stroke-width:5;opacity:var(--route-opacity);pointer-events:none}
.wm-trade-line{stroke:var(--route-color);stroke-width:1.5;opacity:var(--route-opacity);pointer-events:none}
.wm-trade-route.is-related .wm-trade-line{stroke-width:2}
.wm-trade-route.is-active .wm-trade-line{stroke-width:3}
.wm-trade-route.is-inactive .wm-trade-line{stroke:#d79686;stroke-dasharray:5 7}
.wm-trade-hit{stroke:transparent;stroke-width:16;pointer-events:stroke}
.wm-trade-route:focus-visible .wm-trade-line,.wm-trade-route:hover .wm-trade-line{stroke:#d3ffff;opacity:1;stroke-width:3}
.wm-trade-record{padding:14px;margin-bottom:14px;border:1px solid #62969a;border-left:3px solid #a9eee7;background:#102b34;color:#edf4ed}
.wm-trade-record h3{color:#edf4ed;font-size:18px;margin:8px 0}
.wm-trade-record p{font-size:14px;line-height:1.5}
.wm-trade-record button{min-height:44px;font-size:14px}
@media(max-width:700px){.wm-trade-hit{stroke-width:44}}
.wm-trade-route:focus-visible{outline:none} /* The emphasized curve is the focus indicator. */

/* Phone layout of the map pages (moved here from phone.css by Claude, 3 Nov, so the map has one owner: Astra).
   The map first, its layers and agenda after it, the advisor and view switch above and below it, never over it. */
html.hos-phone .hx-world .hx-body { display: flex !important; flex-direction: column; }
html.hos-phone .hx-world .hx-center { order: 1; }
html.hos-phone .hx-world .hx-rail { order: 2; padding: 0 16px 12px !important; }
html.hos-phone .hx-world .hx-right { order: 3; }
html.hos-phone .hx-mapstage { overflow: visible; min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column; align-items: stretch !important; border-radius: 0; border-left: 0; border-right: 0; }
html.hos-phone .hx-mapstage .hx-map-top { position: static !important; padding: 8px 12px 0; }
html.hos-phone .hx-mapstage .hx-map-advisor { position: static !important; transform: none !important; width: auto !important; margin: 8px 12px 12px; }
html.hos-phone .hx-mapstage > svg, html.hos-phone .hx-mapstage > canvas, html.hos-phone .hx-mapstage .wm-stage { width: 100% !important; height: auto; }
html.hos-phone .hx-world .hx-center { padding: 0 0 16px !important; }
html.hos-phone .hx-world .hx-banner { padding-bottom: 6px !important; }
html.hos-phone .hx-mapstage .wg-wrap { height: auto !important; }
html.hos-phone .hx-mapstage .wg-surface { width: 100% !important; height: auto !important; max-width: 100%; aspect-ratio: 1; }
html.hos-phone .hx-mapstage .hx-map-canvas { position: relative; }


/* Abroad entry points live inside the shared map and country inspector. */
.wm-offices{margin:16px 0;padding:16px;border:1px solid #48606c;background:#102632;color:#edf1eb}
.wm-offices h2{font-size:20px;margin:0 0 6px;color:inherit}
.wm-offices p{font-size:14px;line-height:1.5;margin:0 0 12px}
.wm-offices>div,.wm-country-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}
.wm-offices button,.wm-country-access button{min-height:44px;min-width:44px;white-space:normal;font-size:14px;text-align:left;padding:10px 12px;color:#edf1eb;background:#183947;border:1px solid #829a9e;border-radius:4px}
.wm-country-access{padding:16px;margin-bottom:14px;background:#edf1eb;color:#182d35;border:1px solid #9caaab;overflow-wrap:anywhere}
.wm-country-access h2{font-size:24px;color:inherit;margin:4px 0 10px}
.wm-country-access h3{font-size:18px;color:inherit;margin:14px 0 6px}
.wm-country-access p{font-size:14px;line-height:1.5;margin:8px 0}
.wm-country-access .wm-record-kicker{font-size:12px;letter-spacing:.08em}
.wm-country-access ul{list-style:none;padding:0;margin:8px 0;display:grid;gap:8px}
.wm-country-access li button{width:100%}
.wm-offices button:focus-visible,.wm-country-access button:focus-visible{outline:3px solid #ca8a32;outline-offset:2px}
@media(max-width:700px){.wm-offices{margin:12px}.wm-offices>div,.wm-country-links{grid-template-columns:1fr}}

.wm-scale-controls{padding:10px 14px;background:#102632;border-block:1px solid #48616c}
.wm-scale-controls button{min-height:44px;min-width:64px;font-size:14px}
