.map-results nav {display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}
.map-results nav a {flex:1;min-width:90px;text-align:center}
#map-search-view {scroll-margin-top:120px}

/* Night-map treatment of the real-world reference tiles; markers and controls are not filtered. */
#gtageo-map {--map-glow:#48d6ff;isolation:isolate;background:#071019}
#gtageo-map .leaflet-tile-pane {filter:grayscale(.9) invert(1) hue-rotate(178deg) brightness(.86) contrast(1.08) saturate(2.2)}
#gtageo-map::after {content:"";position:absolute;inset:0;z-index:450;pointer-events:none;border-radius:inherit;
    background:
        radial-gradient(ellipse at 50% 45%,transparent 52%,rgba(3,7,12,.62) 100%),
        linear-gradient(90deg,rgba(72,214,255,.05) 1px,transparent 1px) 0 0/64px 64px,
        linear-gradient(rgba(72,214,255,.05) 1px,transparent 1px) 0 0/64px 64px,
        linear-gradient(160deg,rgba(255,79,163,.08),transparent 40%,rgba(244,197,66,.06));
    mix-blend-mode:screen}
html[data-theme="light"] #gtageo-map {background:#dfe8ee}
html[data-theme="light"] #gtageo-map .leaflet-tile-pane {filter:grayscale(.55) sepia(.2) hue-rotate(155deg) saturate(1.35) contrast(.96) brightness(1.02)}
html[data-theme="light"] #gtageo-map::after {mix-blend-mode:multiply;
    background:
        radial-gradient(ellipse at 50% 45%,transparent 60%,rgba(23,33,45,.16) 100%),
        linear-gradient(90deg,rgba(0,107,133,.06) 1px,transparent 1px) 0 0/64px 64px,
        linear-gradient(rgba(0,107,133,.06) 1px,transparent 1px) 0 0/64px 64px}
#gtageo-map .leaflet-control-zoom a,#gtageo-map .leaflet-bar a {background:rgba(10,15,22,.9);color:#e8f6ff;border-color:rgba(72,214,255,.25)}
#gtageo-map .leaflet-control-zoom a:hover {background:#14202c}
#gtageo-map .leaflet-control-attribution {background:rgba(7,12,18,.78);color:#a9b8c7}
#gtageo-map .leaflet-control-attribution a {color:#7fe3ff}
html[data-theme="light"] #gtageo-map .leaflet-control-zoom a,html[data-theme="light"] #gtageo-map .leaflet-bar a {background:#fff;color:#17212d;border-color:#8492a3}
html[data-theme="light"] #gtageo-map .leaflet-control-attribution {background:rgba(255,255,255,.85);color:#3c4a59}
html[data-theme="light"] #gtageo-map .leaflet-control-attribution a {color:#006b85}

/* Evidence markers: shape carries the state; colour is a second cue only. */
.gtageo-pin {--pin:#f4c542;display:grid;place-items:center;width:30px;height:30px;color:var(--pin);background:none;border:0;cursor:pointer;transition:transform .18s ease}
.gtageo-pin svg {width:26px;height:26px;overflow:visible;filter:drop-shadow(0 2px 3px rgba(0,0,0,.7))}
.gtageo-pin .pin-shape {fill:#0b121a;stroke:currentColor;stroke-width:2.4}
.gtageo-pin[data-state="community"] .pin-shape,.gtageo-pin[data-state="verified"] .pin-shape,.gtageo-pin[data-state="official"] .pin-shape {fill:currentColor;stroke:#0b121a;stroke-width:1.6}
.gtageo-pin .pin-mark {fill:none;stroke:#0b121a;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.gtageo-pin[data-state="rumor"] {--pin:#b7c2cd}
.gtageo-pin[data-state="rumor"] .pin-shape {stroke-dasharray:3 3}
.gtageo-pin[data-state="unverified"] {--pin:#f4c542}
.gtageo-pin[data-state="community"] {--pin:#48d6ff}
.gtageo-pin[data-state="verified"] {--pin:#5ee38a}
.gtageo-pin[data-state="official"] {--pin:#f7fbff}
/* Leaflet positions .leaflet-marker-icon with transform, so only the inner pin is moved. */
.gtageo-marker {background:none;border:0}
.leaflet-marker-icon.is-active {z-index:1000!important}
.leaflet-marker-icon.is-active .gtageo-pin {transform:translateY(-3px) scale(1.18)}
.leaflet-marker-icon.is-active svg {filter:drop-shadow(0 0 6px var(--map-glow)) drop-shadow(0 0 14px rgba(72,214,255,.55))}
.leaflet-marker-icon.is-active .gtageo-pin::before {content:"";position:absolute;inset:-6px;border:2px solid var(--map-glow);border-radius:50%;animation:gtageo-ping 1.6s ease-out infinite;pointer-events:none}
.gtageo-pin {position:relative}
.leaflet-marker-icon:focus-visible {outline:2px solid #48d6ff;outline-offset:3px;border-radius:50%}
@keyframes gtageo-ping {from {opacity:.9;transform:scale(.7)} to {opacity:0;transform:scale(1.6)}}

.gtageo-map-cluster {background:none;border:0}
.gtageo-map-cluster span {display:grid;place-items:center;width:42px;height:42px;border-radius:50%;font-weight:900;color:#e8f6ff;
    background:radial-gradient(circle,rgba(16,22,32,.96) 55%,rgba(72,214,255,.25) 56%,rgba(72,214,255,.06) 72%,transparent 73%);
    box-shadow:0 0 0 1px rgba(72,214,255,.55),0 6px 18px rgba(0,0,0,.55)}
.gtageo-map-cluster.is-active span {box-shadow:0 0 0 2px #48d6ff,0 0 18px rgba(72,214,255,.6)}

/* Legend */
.map-legend {max-width:220px;padding:0;border-radius:8px;border:1px solid rgba(72,214,255,.28);background:rgba(8,13,20,.9);color:#e8f6ff;font:12px/1.35 inherit;box-shadow:0 10px 28px rgba(0,0,0,.45);backdrop-filter:blur(6px)}
.map-legend summary {cursor:pointer;padding:8px 12px;font-weight:900;list-style:none}
.map-legend summary::-webkit-details-marker {display:none}
.map-legend summary::after {content:" +";color:#7fe3ff}
.map-legend[open] summary::after {content:" -"}
.map-legend ul {display:grid;gap:6px;margin:0;padding:0 12px 10px;list-style:none}
.map-legend li {display:flex;align-items:center;gap:8px}
.map-legend .gtageo-pin {width:20px;height:20px;cursor:default}
.map-legend .gtageo-pin svg {width:17px;height:17px}
.map-legend p {margin:0;padding:0 12px 10px;color:#a9b8c7;font-size:11px}
html[data-theme="light"] .map-legend {background:rgba(255,255,255,.95);color:#17212d;border-color:#8492a3}
html[data-theme="light"] .map-legend p {color:#3c4a59}
html[data-theme="light"] .map-legend summary::after {color:#006b85}

/* Preview card */
.gtageo-popup .leaflet-popup-content-wrapper {padding:0;border-radius:10px;background:rgba(10,15,22,.96);color:#e8f6ff;border:1px solid rgba(72,214,255,.35);box-shadow:0 18px 40px rgba(0,0,0,.55)}
.gtageo-popup .leaflet-popup-tip {background:rgba(10,15,22,.96);border:1px solid rgba(72,214,255,.35)}
.gtageo-popup .leaflet-popup-content {margin:0;width:auto!important;min-width:220px}
.gtageo-popup a.leaflet-popup-close-button {color:#a9b8c7;top:6px;right:6px}
.map-preview-card {display:grid;gap:7px;padding:14px 16px}
.map-preview-card small {color:#a9b8c7;font-size:11px;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.map-preview-card strong {font-size:16px;line-height:1.25;padding-right:14px}
.map-preview-card p {margin:0;color:#c5d1dc;font-size:13px;line-height:1.4}
.map-preview-card .map-preview-open {justify-self:start;margin-top:2px;padding:7px 12px;border-radius:7px;background:linear-gradient(135deg,#48d6ff,#7b9aff);color:#001018;font-weight:900;text-decoration:none}
.map-evidence-badge {display:inline-flex;align-items:center;gap:6px;justify-self:start;padding:3px 9px 3px 5px;border-radius:99px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);font-size:12px;font-weight:900;color:#e8f6ff}
.map-evidence-badge .gtageo-pin {width:18px;height:18px;cursor:default}
.map-evidence-badge .gtageo-pin svg {width:15px;height:15px}
html[data-theme="light"] .gtageo-popup .leaflet-popup-content-wrapper,html[data-theme="light"] .gtageo-popup .leaflet-popup-tip,html[data-theme="light"] .map-sheet {background:#fff;color:#17212d;border-color:#8492a3}
html[data-theme="light"] .map-preview-card small,html[data-theme="light"] .map-preview-card p {color:#3c4a59}
html[data-theme="light"] .map-evidence-badge {color:#17212d;border-color:#8492a3;background:#edf1f5}

/* Mobile bottom sheet used instead of popups on small screens */
.map-sheet {position:absolute;left:10px;right:10px;bottom:10px;z-index:900;border-radius:12px;background:rgba(10,15,22,.97);color:#e8f6ff;border:1px solid rgba(72,214,255,.35);box-shadow:0 -6px 30px rgba(0,0,0,.5);transform:translateY(0);transition:transform .22s ease,opacity .22s ease}
.map-sheet[hidden] {display:block;visibility:hidden;opacity:0;transform:translateY(16px);pointer-events:none}
.map-sheet-close {position:absolute;top:6px;right:6px;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:transparent!important;color:inherit!important;font-size:22px;line-height:1;cursor:pointer}
.map-stage.has-sheet .map-callout {visibility:hidden}

/* Results linked to markers */
.map-result {position:relative}
.map-result > a {padding-right:64px!important}
.map-result-locate {position:absolute;top:8px;right:8px;min-height:32px;padding:4px 9px!important;border-radius:7px;font-size:12px;font-weight:900}
.map-result.is-active > a {border-color:rgba(72,214,255,.7)!important;box-shadow:inset 3px 0 0 #48d6ff}
.map-result small .gtageo-pin {display:inline-grid;width:16px;height:16px;vertical-align:-3px;margin-right:4px;cursor:default}
.map-result small .gtageo-pin svg {width:14px;height:14px}

/* Honest coverage meter */
.map-evidence-meter {display:grid;gap:8px;padding-top:10px;border-top:1px solid var(--line)}
.map-evidence-meter > strong {font-size:13px}
.map-evidence-bar {display:flex;height:10px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.08)}
.map-evidence-bar i {display:block;height:100%;min-width:3px;transition:width .4s ease}
.map-evidence-bar i[data-state="rumor"] {background:repeating-linear-gradient(135deg,#b7c2cd 0 3px,transparent 3px 6px)}
.map-evidence-bar i[data-state="unverified"] {background:repeating-linear-gradient(90deg,#f4c542 0 6px,rgba(244,197,66,.55) 6px 8px)}
.map-evidence-bar i[data-state="community"] {background:#48d6ff}
.map-evidence-bar i[data-state="verified"] {background:#5ee38a}
.map-evidence-bar i[data-state="official"] {background:#f7fbff}
.map-evidence-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;margin:0;padding:0;list-style:none;font-size:12px;color:var(--muted)}
.map-evidence-list li {display:flex;align-items:center;gap:6px}
.map-evidence-list .gtageo-pin {width:16px;height:16px;cursor:default}
.map-evidence-list .gtageo-pin svg {width:14px;height:14px}
.map-evidence-list b {color:var(--text)}
html[data-theme="light"] .map-evidence-bar {background:#dfe5ec}
html[data-theme="light"] .gtageo-pin[data-state="official"] {--pin:#5b4bd6}
html[data-theme="light"] .gtageo-pin[data-state="rumor"] {--pin:#6b7785}
html[data-theme="light"] :is(.map-legend,.map-evidence-list,.map-evidence-badge,.map-result) .gtageo-pin[data-state="unverified"] {--pin:#9a7400}
html[data-theme="light"] .map-evidence-bar i[data-state="official"] {background:#5b4bd6}
html[data-theme="light"] .map-evidence-bar i[data-state="rumor"] {background:repeating-linear-gradient(135deg,#6b7785 0 3px,transparent 3px 6px)}

/* Desktop: the map column used to stretch to the sidebar's height, leaving a large empty area.
   The map now stays in view beside the sidebar, with the intro note directly under it. */
@media(min-width:901px){
    .map-shell {align-items:start}
    .map-stage {position:sticky;top:136px;align-self:start}
    #gtageo-map {height:calc(100vh - 270px);min-height:380px;max-height:780px}
    .map-stage .map-callout {position:static;margin-top:12px}
}

@media(prefers-reduced-motion:reduce){
    .gtageo-pin,.map-sheet,.map-evidence-bar i {transition:none}
    .leaflet-marker-icon.is-active .gtageo-pin::before {animation:none;opacity:.8;transform:none}
}

@media(max-width:760px){
    .map-shell {display:flex;flex-direction:column;gap:16px}
    .map-stage {order:-1;min-width:0}
    #gtageo-map {height:52vh;min-height:320px;max-height:520px}
    .map-callout {pointer-events:none}
    .map-legend {max-width:180px}
}
