/* Map controls. Shared colors and control primitives live in viewer3d.css. */
body, .map-page { margin: 0; overflow: hidden; background: #091419; color: var(--text); }
:is(body, .map-page) .leaflet-container { background: #091419; font: inherit; }
:is(body, .map-page) .leaflet-control { font-family: inherit; }
:is(body, .map-page) .leaflet-top.leaflet-left { z-index: 1001; }
:is(body, .map-page) .checkboxes_show, :is(body, .map-page) .checkboxes { margin: 0; float: none; }
#checkboxes_show { position: fixed; top: var(--edge); left: var(--edge); }
#control_show { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 13px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; letter-spacing: -.3px; }
#control_show strong { font-weight: 650; }
#control_show .launcher-label { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 11px; color: var(--muted); letter-spacing: 0; }
#control_show[aria-expanded=true] { border-color: var(--accent-line); }
.atlas-mark { width: 27px; height: 27px; fill: none; stroke: var(--accent); stroke-width: 1.2; }
#checkboxes { position: fixed; top: calc(var(--edge) + 54px); left: var(--edge); width: 304px; max-width: calc(100vw - 2 * var(--edge)); max-height: var(--map-controls-max-height, calc(100dvh - 2 * var(--edge) - 66px)); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; }
.panel-heading h1 { font-size: 19px; font-weight: 550; letter-spacing: -.5px; margin: 4px 0 0; }
.map-selection { padding: 0 16px; }
.map-selection > div + div { margin-top: 12px; }
.field-label { display: block; margin-bottom: 6px; font-size: 11px; color: var(--muted); }
#viewer3d-controls { padding: 14px 16px 16px; }
#open-viewer3d { width: 100%; background: var(--accent); color: #171c1c; border-color: var(--accent); font-weight: 650; }
#open-viewer3d:not(:disabled):hover { background: #edcf96; border-color: #edcf96; }
#open-viewer3d:disabled { background: var(--raised); color: var(--muted); border-color: var(--line); opacity: .8; }
#viewer3d-availability { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.version-changes { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--input); font-size: 12px; line-height: 1.45; }
.version-changes-text { flex: 1 1 100%; }
.version-changes-note { flex: 1 1 100%; color: var(--muted); font-size: 11px; }
.version-changes-hint { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.map-page .version-changes-action { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.map-page .version-changes-action:hover:not(:disabled) { background: none; color: #edcf96; }
.panel-section { border-top: 1px solid var(--line); }
/* Changed maps: which maps of the build on screen changed; a name opens that map. */
#changed-maps-list { max-height: min(300px, 40dvh); overflow-y: auto; overscroll-behavior: contain; }
.changed-maps-title { margin: 8px 0 4px; color: var(--muted); font-size: 11px; }
.changed-maps-title:first-child { margin-top: 0; }
.changed-maps-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.map-page .changed-map { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 32px; padding: 5px 8px; text-align: left; background: transparent; border-color: transparent; font-size: 12px; }
.map-page .changed-map:hover:not(:disabled) { background: var(--raised); border-color: var(--line); }
.map-page .changed-map[aria-current=true] { border-color: var(--accent-line); color: var(--accent); }
.changed-map-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.changed-map-detail { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.changed-maps-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.panel-section > summary { display: flex; align-items: center; gap: 8px; min-height: 43px; padding: 0 16px; cursor: pointer; list-style: none; font-weight: 500; }
.panel-section > summary::after { content: '›'; margin-left: auto; font-size: 20px; color: var(--muted); transform: rotate(90deg); }
.panel-section[open] > summary::after { transform: rotate(-90deg); }
.panel-section > summary:hover { background: var(--hover); }
.panel-section > summary::-webkit-details-marker { display: none; }
.summary-hint { color: var(--muted); font-size: 10px; font-weight: 400; }
.section-content { padding: 2px 16px 14px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.check-grid label, .check-row { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 12px; cursor: pointer; }
.check-grid .check-wide { grid-column: 1 / -1; }
.check-grid .check-sub { padding-left: 23px; }
.changes-minor-count { color: var(--muted); }
.map-page input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }
#filter_ver_box { margin-top: 8px; }
.panel-footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.panel-footer button { flex: 1; font-size: 11px; min-height: 32px; }
.panel-footer button[aria-expanded=true] { color: var(--accent); border-color: var(--accent-line); }
#legend { width: 304px; max-width: calc(100vw - 2 * var(--edge)); max-height: min(55dvh, 480px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 12px; line-height: 1.6; }
#legend { position: fixed; top: var(--edge); right: var(--edge); }
#legend > div { padding: 0 16px 12px; }
#legend .panel-heading { padding: 10px 12px 8px 16px; }
.panel-hint { margin: 0; padding: 0 16px 12px; color: var(--muted); font-size: 11px; }
.area-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; padding: 3px 0; }
.legend_areafound { display: inline-block; width: 28px; height: 12px; flex-shrink: 0; }
.legend_areaname { display: inline; margin-left: 6px; }
.map-page .leaflet-bottom.leaflet-right { bottom: var(--edge); right: var(--edge); }
.map-page .leaflet-control-zoom { margin: 0 0 15px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.map-page .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; background: var(--surface); color: var(--text); border-color: var(--line); }
.map-page .leaflet-control-zoom a:hover { background: var(--raised); }
.map-page .leaflet-control-zoom a.leaflet-disabled { color: var(--muted); }
.map-page .leaflet-control-attribution { color: #9ba9ae; background: #10191edb; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.map-page .leaflet-control-attribution a { color: #d8c293; }
/* Select2 lives outside the Leaflet panel when its search menu is open. */
.map-page .select2-container { font-size: 12px; line-height: 1.5; }
.map-page .select2-container--default .select2-selection--single { height: 38px; border: 1px solid var(--line); background: var(--input); border-radius: 6px; }
.map-page .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 36px; padding-left: 10px; padding-right: 26px; }
.map-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; right: 6px; }
.map-page .select2-container--open .select2-selection--single { border-color: var(--accent-line); }
.map-page .select2-dropdown { background: var(--raised); color: var(--text); border: 1px solid var(--accent-line); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); font-size: 12px; }
.map-page .select2-search--dropdown { padding: 8px; }
.map-page .select2-container--default .select2-search--dropdown .select2-search__field { background: var(--input); border: 1px solid var(--line); color: var(--text); min-height: 34px; border-radius: 4px; }
.map-page .select2-results__option { padding: 9px 10px; overflow-wrap: anywhere; }
.map-option { display: grid; gap: 2px; }
.map-option > small { color: var(--muted); font-size: 10px; }
.map-page .select2-container--default .select2-results__option[aria-selected=true] { background: #343a35; color: var(--accent); }
.map-page .select2-container--default .select2-results__option--highlighted[aria-selected] { background: #39433f; color: #fff; }
.map-page .select2-results__options { max-height: min(320px, 40dvh); }
/* Version picker: one group per game line, a muted 2D note and a change chip per option. */
.map-page .select2-results__group { padding: 8px 10px 4px; color: var(--accent); font-size: 11px; font-weight: 650; }
.map-page .select2-results__option .select2-results__option { padding-left: 16px; }
.version-option { display: flex; align-items: baseline; gap: 8px; }
.version-option-text { flex: 1 1 auto; min-width: 0; }
.version-option-note { color: var(--muted); font-size: 10px; }
.version-chip { flex: 0 0 auto; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; line-height: 17px; white-space: nowrap; }
.version-chip-accent { border-color: var(--accent-line); color: var(--accent); }
/* The "What changed" layer (change tracker M4). */
.change-pin { display: flex; flex-direction: column; align-items: center; }
.change-pin-disc { display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 2px solid #fff; border-radius: 50%; background: #0d1a1f; color: #fff;
    box-shadow: 0 0 0 2px #0009, 0 2px 6px #0008; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.change-pin:hover .change-pin-disc, .change-pin:focus-visible .change-pin-disc { background: #22343b; }
.change-pin-glyphs { display: flex; gap: 1px; margin-top: 2px; padding: 0 3px; border-radius: 4px; background: #091419cc; font-size: 11px; line-height: 14px; }
.change-pin-glyphs:empty { display: none; }
.change-pin-cluster { display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 2px solid #fff; border-radius: 8px; background: #0d1a1fe0; color: #fff;
    box-shadow: 0 0 0 2px #0008, 3px 3px 0 -1px #0d1a1f, 3px 3px 0 1px #fff; font-size: 12px; font-weight: 700; }
.change-count-badge { display: flex; align-items: center; justify-content: center; pointer-events: none; }
.change-count-badge span { padding: 1px 8px; border: 1px solid #fff; border-radius: 999px; background: #091419e6; color: #fff; box-shadow: 0 0 0 1px #0009; font-size: 11px; font-weight: 650; white-space: nowrap; }
.change-heat-label { display: flex; align-items: center; justify-content: center; pointer-events: none; }
.change-heat-label span { padding: 1px 6px; border: 1px solid #A98BFF; border-radius: 4px; background: #091419e0; color: #d9ccff; font-size: 10px; font-weight: 650;
    font-variant-numeric: tabular-nums; white-space: nowrap; }
.map-page .leaflet-tooltip.change-heat-tip { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-size: 12px; }
.map-page .leaflet-tooltip-top.change-heat-tip::before { border-top-color: var(--line); }
.change-popup .leaflet-popup-content { margin: 12px 14px; }
.change-popup-body .change-popup-lead { color: #d9ccff; font-weight: 650; }
.change-popup-body .change-popup-hint { margin-top: 8px; color: var(--muted); font-size: 11px; }
.change-popup-body strong { display: block; font-size: 13px; }
.change-popup-body p { margin: 4px 0; }
.change-popup-body .change-popup-build { color: var(--muted); font-size: 11px; }
.change-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.map-page .change-popup-actions button { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.map-page .change-popup-actions .change-popup-primary { background: var(--accent); border-color: var(--accent); color: #171c1c; font-weight: 650; }
.map-page .change-popup-actions .change-popup-primary:hover:not(:disabled) { background: #edcf96; border-color: #edcf96; }
.legend-changes { margin: 0 0 6px; padding: 0; list-style: none; }
.legend-changes li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.legend-change { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 20px; height: 14px; flex: 0 0 auto; font-weight: 700; font-size: 12px; line-height: 1; }
.legend-change-tile { border: 1.5px dashed #fff; outline: 1.5px solid #0008; }
.legend-change-image { border: 1.5px dotted #d9d9d999; }
.legend-change-pin { width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; background: #0d1a1f; color: #fff; font-size: 10px; }
.legend-change-group { width: 22px; height: 16px; border: 1.5px solid #fff; border-radius: 4px; background: #0d1a1f; color: #fff; font-size: 9px; }
.legend-change-added, .legend-change-swapped, .legend-change-model, .legend-change-turned { width: 11px; height: 11px; margin: 0 4.5px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1.5px #0009; }
.legend-change-added { background: #0072B2; }
.legend-change-swapped { background: #56B4E9; }
.legend-change-turned { border-color: #F0E442; }
.legend-change-model { border-radius: 1px; transform: rotate(45deg); background: #CC79A7; }
.legend-change-removed { color: #D55E00; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.legend-change-moved { color: #F0E442; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.legend-change-ground { background: linear-gradient(90deg, #A98BFF33, #A98BFF80); border: 1px solid #A98BFFcc; }
/* Existing map markers, comments and media. */
#cluster_comment { width: 32px; height: 32px; font-weight: bold; font-size: 15px; color: white; line-height: 32px; }
.marker-cluster-comment { background: url('comment_all.png') center / 32px 32px; text-align: center; }
.map-page .leaflet-popup-content-wrapper, .map-page .leaflet-popup-tip { background: var(--surface); color: var(--text); }
.map-page .leaflet-popup-content-wrapper { border: 1px solid var(--line); }
.map-page .leaflet-popup-content { max-width: min(520px, 75vw); line-height: 1.6; }
.map-page .leaflet-popup-content a { color: var(--accent); }
.popupComment { max-width: 600px; max-height: 60dvh; min-width: 200px; overflow: auto; }
.image_picker_image, .image_picker_videos { width: 100%; }
#comment_form, #login_form { margin: 10px 0; }
#comment_text { box-sizing: border-box; width: 100%; height: 70px; }
#comment_data { overflow-y: auto; }
#thumb_scroll, #thumb_scroll_video { overflow-y: auto; height: 290px; }
#next_page, #previous_page, #add_login, #disconnect_login, #add_anonymous { cursor: pointer; text-decoration: underline; }
#extra_login_label, #extra_login { margin: 10px 0; }
@media (max-width: 640px) {
    #checkboxes { width: 290px; }
    :is(.map-page, body).viewer3d-active #checkboxes { top: calc(var(--edge) + 108px); max-height: calc(100dvh - 2 * var(--edge) - 120px); }
    #legend { top: calc(var(--edge) + 54px); z-index: 1002; }
    .map-page .leaflet-control-attribution { max-width: 65vw; font-size: 9px; }
    .check-grid label, .check-row { min-height: 40px; }
}

/* ══ T1 · library, layers and area list (owned by the 2D library track) ══ */
/* Library heading: name, field guide link and close button, the tagline under them. */
.library-heading { padding-bottom: 8px; }
.library-title { margin-right: auto; min-width: 0; }
.map-page .field-guide-link { flex: 0 0 auto; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 600; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.map-page .field-guide-link:hover { border-color: var(--accent-line); background: var(--raised); }
.library-tagline { margin: 0 16px 14px; color: var(--muted); font-size: 12px; line-height: 1.45; }
/* Layer rows: checkbox, name, format tag and field guide link; a muted definition; a key while the layer is on. */
.layer-row { padding: 7px 0 8px; border-top: 1px solid #ffffff0f; }
.layer-head { display: flex; align-items: center; gap: 7px; min-height: 28px; }
.layer-name { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.3; cursor: pointer; }
.layer-tag { flex: 0 0 auto; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: none; font: 10px/16px ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace; white-space: nowrap; }
.map-page .layer-help { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none; }
.map-page .layer-help:hover { border-color: var(--accent-line); color: var(--accent); }
.layer-def { margin: 1px 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.layer-sub { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-left: 23px; font-size: 12px; cursor: pointer; }
.layer-key { margin: 7px 0 0 23px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); font-size: 11.5px; line-height: 1.45; }
.layer-row:not(:has(> .layer-head input:checked)) > .layer-key { display: none; }
.layer-key .legend-changes li { align-items: flex-start; }
.layer-key .legend-change { margin-top: 2px; }
.legend-change-collision { color: #3FD0D4; text-shadow: 0 0 2px #000, 0 0 2px #000; font-size: 13px; }
.key-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.key-list li { display: flex; align-items: flex-start; gap: 8px; }
.key-swatch { flex: 0 0 auto; box-sizing: border-box; width: 20px; height: 12px; margin-top: 3px; }
.key-line { height: 0; margin-top: 8px; border-top: 3px solid; }
.key-impass-exterior { border-top-color: #ffff00; }
.key-impass-interior { border-top-color: #ff0000; }
.key-unknown { background: #ffffffaa; border: 1px solid #fff; }
.key-box { border: 2px solid; }
.key-death-fill { background: #e0101a4d; border: 1px solid #e0101a99; }
.key-death-line { border-top: 2px solid #ff3b2f; }
.key-playable { border-top: 1.5px dashed #e9e4d6bf; }
.key-hole { border: 1px solid #ffffff33; background: repeating-linear-gradient(0deg, #000a 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, #000a 0 1px, transparent 1px 4px), #00000080; }
/* Heightmap: Mapper.GetColor, scaled to the map's lowest and highest point. */
.key-gradient { height: 10px; border: 1px solid #ffffff26; border-radius: 3px; background: linear-gradient(90deg, #ff00ff 0%, #0000ff 25%, #00ffff 50%, #00ff00 50%, #ffff00 66.667%, #ff0000 83.333%, #000000 100%); }
.key-gradient-labels { display: grid; grid-template-columns: 1fr auto 1fr; margin: 2px 0 6px; color: var(--muted); font-size: 10.5px; }
.key-gradient-labels span:last-child { text-align: right; }
.key-note { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.map-page .key-note a { color: var(--accent); }
.map-page .layer-key-button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
/* The footer holds only the Area list button: no list, no footer. */
.panel-footer:not(:has(button:not([hidden]))) { display: none; }
/* Area list panel: the filter stays put while the list scrolls. */
#legend:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
#legend > .area-list-tools { padding: 0 16px 8px; }
.map-page .area-filter { width: 100%; min-height: 34px; padding: 6px 10px; font-size: 12px; }
.area-count { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
#legend > .area-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 12px; }
.area-row .legend_areafound { align-self: center; width: 24px; border-radius: 2px; box-shadow: inset 0 0 0 1px #0005; }
.area-row .legend_areaname { flex: 1 1 0; min-width: 0; margin-left: 0; overflow-wrap: anywhere; }
.area-zone { flex: 1 0 100%; padding-left: 32px; color: var(--muted); font-size: 11px; line-height: 1.3; }
@media (max-width: 640px) {
    .layer-head { min-height: 38px; }
    .map-page .layer-help { width: 28px; height: 28px; }
    .layer-sub { min-height: 40px; }
    /* The Area list opens from the library and overlaps it on phones: its corner must stack above the library's. */
    .map-page .leaflet-top.leaflet-right { z-index: 1002; }
}
/* ══ end T1 ══ */

/* ══ T2 · spot card, coordinates and measure (owned by the 2D spot track) ══ */
/* The spot card: a map popup at the clicked point (js/spot.js). */
.map-page .spot-popup .leaflet-popup-content { margin: 12px 14px; max-width: none; }
.spot-card { box-sizing: border-box; width: min(300px, calc(100vw - 72px)); max-height: min(70dvh, 560px); overflow-y: auto; overscroll-behavior: contain;
    font-size: 12.5px; line-height: 1.5; scrollbar-width: thin; scrollbar-color: #566368 transparent; }
.spot-title { display: block; margin: 0 24px 6px 0; color: var(--accent); font-size: 13px; font-weight: 650; }
.spot-card .spot-row { margin: 3px 0; overflow-wrap: anywhere; }
.spot-num { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; font-variant-numeric: tabular-nums; }
.spot-muted { color: var(--muted); }
.spot-area { display: flex; align-items: center; gap: 8px; }
.spot-swatch { flex: 0 0 auto; width: 22px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px #0006; }
.spot-way { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.spot-way-text { font-variant-numeric: tabular-nums; }
.spot-card .spot-measure { color: var(--accent); }
.spot-card .spot-changes { color: var(--accent); }
.spot-card .spot-changes:empty { display: none; }
.spot-actions, .spot-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-actions { margin-top: 10px; }
.spot-tools { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.spot-card .spot-note { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.map-page .spot-card button { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.map-page .spot-card .spot-primary { background: var(--accent); border-color: var(--accent); color: #171c1c; font-weight: 650; }
.map-page .spot-card .spot-primary:hover:not(:disabled) { background: #edcf96; border-color: #edcf96; }
.map-page .spot-card .spot-primary:disabled { background: var(--raised); border-color: var(--line); color: var(--muted); }
.map-page .spot-card .spot-mini { min-height: 26px; padding: 2px 8px; font-size: 11px; }
.map-page .spot-card .spot-copied { border-color: var(--accent-line); color: var(--accent); }
.map-page .leaflet-popup-content a.spot-help { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 16px; height: 16px;
    margin-left: 6px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 600 10px/1 system-ui, sans-serif; text-decoration: none; vertical-align: 1px; }
.map-page .leaflet-popup-content a.spot-help:hover, .map-page .leaflet-popup-content a.spot-help:focus-visible { border-color: var(--accent-line); color: var(--accent); }
.map-page .spot-popup .leaflet-popup-close-button { width: 28px; height: 28px; padding: 0; color: var(--muted); font: 18px/28px system-ui, sans-serif; }
.map-page .spot-popup .leaflet-popup-close-button:hover { color: var(--text); }
@media (max-width: 640px) {
    .map-page .spot-card button { min-height: 36px; }
}
/* ══ end T2 ══ */

/* ══ T6 · leads panel (owned by the leads track) ══ */
/* Leads: spots in this build's files worth a closer look, five groups of the top 20 rows each. */
#leads-list { max-height: min(420px, 50dvh); overflow-y: auto; overscroll-behavior: contain; }
.leads-intro { margin: 0 0 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.map-page .leads-help { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 16px; height: 16px; margin-left: 5px;
    border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 10px; font-weight: 650; line-height: 1; text-decoration: none; vertical-align: 1px; }
.map-page .leads-help:hover { border-color: var(--accent-line); color: var(--accent); }
.leads-toggle { margin-bottom: 2px; }
.leads-group { border-top: 1px solid var(--line); }
.leads-group > summary { display: flex; align-items: center; gap: 8px; min-height: 34px; cursor: pointer; list-style: none; font-size: 12px; }
.leads-group > summary::-webkit-details-marker { display: none; }
.leads-group > summary::after { content: '›'; color: var(--muted); font-size: 16px; line-height: 1; transform: rotate(90deg); }
.leads-group[open] > summary::after { transform: rotate(-90deg); }
.leads-group > summary:hover .leads-group-title { color: var(--accent); }
.leads-swatch { box-sizing: border-box; width: 10px; height: 10px; flex: 0 0 auto; border: 1.5px solid #091419; border-radius: 50%; box-shadow: 0 0 0 1px #ffffff55; }
.leads-void .leads-swatch { background: #ff4fd8; }
.leads-below .leads-swatch { background: #ff3b2f; }
.leads-unknown .leads-swatch { background: #ffffff; }
.leads-group-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leads-count { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.leads-definition { margin: 0 0 6px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.leads-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.lead-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px; min-height: 32px; padding: 2px 2px 2px 8px;
    border: 1px solid transparent; border-radius: 6px; }
.lead-row:hover { background: var(--raised); border-color: var(--line); }
.lead-text { min-width: 0; font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.map-page .lead-row button { min-height: 26px; padding: 2px 8px; font-size: 11px; }
.map-page .leads-more { width: 100%; min-height: 30px; margin: 4px 0 6px; padding: 4px 8px; background: transparent; color: var(--accent); font-size: 11px; }
.leads-note { margin: 2px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.leads-popup-body .leads-popup-kind { color: var(--muted); font-size: 11px; }
.leads-popup-body .leads-popup-detail { color: var(--muted); font-size: 11px; line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .map-page .lead-row button { min-height: 34px; padding: 4px 10px; }
}
/* ══ end T6 ══ */
