/* ══ Map of places ═══════════════════════════════════════
   Uses the page frame of the family-trees page. Land and sea colours are tokens per look. */
:root { --map-sea: #10141d; --map-land: #2a3040; --map-coast: rgba(255, 255, 255, .28); }
:root[data-look="liquid"] { --map-sea: rgba(10, 13, 20, .42); --map-land: rgba(255, 255, 255, .13); --map-coast: rgba(255, 255, 255, .34); }
:root[data-look="glass"] { --map-sea: rgba(10, 13, 20, .38); --map-land: rgba(255, 255, 255, .12); --map-coast: rgba(255, 255, 255, .3); }
:root[data-look="indigo"] { --map-sea: #141a33; --map-land: #2b3460; --map-coast: rgba(255, 255, 255, .3); }
:root[data-look="stone"] { --map-sea: #dfe6e8; --map-land: #f6f1e4; --map-coast: rgba(40, 36, 28, .45); }

.mfilters { display: grid; gap: 6px; margin: 0 4px; }
.mfilters label { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.mfilters select, .disp-pop select { background: var(--raise); border: 0; border-radius: min(var(--r-s), 10px); padding: 6px 8px; color: var(--text); min-width: 0; width: 100%; }
.mfilters option, .disp-pop option { background: var(--panel-solid); color: var(--text); }
#pcount { font-weight: 400; margin-left: 4px; }
#plist button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 4px 10px; border-radius: 8px; font-size: 14px; }
#plist button:hover { background: var(--raise); }
#plist button[aria-current="true"] { background: var(--sel); }
#plist i { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
#plist .none { color: var(--muted); font-size: 13.5px; margin: 8px; }

:root[data-look] .mpage main.tmain { padding: 0; }
#map { flex: 1; min-height: 0; background: var(--map-sea); border-radius: inherit; z-index: 0; font: inherit; }
.leaflet-container { font-family: var(--ui); background: var(--map-sea); outline: 0; }
.leaflet-bar { border: 0 !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); border-radius: 10px; overflow: hidden; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel-solid); color: var(--text); border-bottom: 1px solid var(--line); width: 32px; height: 32px; line-height: 32px; }
.leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-bar a.leaflet-disabled { background: var(--panel-solid); color: var(--muted); }
.leaflet-control-attribution { background: none !important; color: var(--muted); font-size: 10.5px; }
.leaflet-control-attribution a { color: inherit; }
.mlabel { background: none; border: 0; text-align: center; white-space: nowrap; pointer-events: none; color: var(--muted); }
.mlabel.sea { font: italic 400 12.5px var(--read); letter-spacing: .12em; opacity: .75; }
.mlabel.range { font: 500 10.5px var(--ui); letter-spacing: .28em; text-transform: uppercase; opacity: .6; }
.leaflet-tooltip.mtip { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); font: 500 12px var(--ui); padding: 2px 7px; }
.leaflet-tooltip.mtip::before { display: none; }

#pinfo { position: absolute; left: 12px; bottom: 30px; z-index: 5; width: min(380px, calc(100% - 24px)); max-height: min(56%, 420px); overflow-y: auto; padding: 14px 16px 12px; background: var(--panel-solid); scrollbar-width: thin; }
:root[data-look="liquid"] #pinfo, :root[data-look="glass"] #pinfo { background: rgba(22, 24, 32, .82); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
#pinfo .close { position: absolute; top: 6px; right: 12px; font-size: 24px; color: var(--muted); line-height: 1; }
#pinfo h2 { font: 600 21px/1.2 var(--ui); font-stretch: 88%; margin: 0 26px 0 0; }
.pi-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
#pinfo ol { list-style: none; margin: 0; padding: 0; }
#pinfo li a { display: grid; grid-template-columns: 96px 7px 1fr; gap: 9px; align-items: baseline; padding: 5px 6px; margin: 0 -6px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; }
#pinfo li a:hover { background: var(--raise); }
.pi-when { color: var(--muted); font-size: 12.5px; text-align: right; }
.pi-dot { width: 7px; height: 7px; border-radius: 2px; align-self: center; }
#mnote { position: absolute; right: 12px; top: 10px; z-index: 4; margin: 0; max-width: 300px; font-size: 11.5px; line-height: 1.4; color: var(--muted); text-align: right; pointer-events: none; }

@media (max-width: 860px) {
  #map { min-height: 62vh; flex: none; }
  #plist { max-height: 150px; overflow-y: auto; }
  #pinfo { position: static; width: auto; max-height: none; margin: 8px; }
  #mnote { position: static; max-width: none; text-align: left; padding: 6px 12px 10px; }
}
