/* The Despoiler house map style. One look for every map on the site:
   Leaflet maps (Sky Watch, Weather radar, Photos, story maps) and the canvas maps (History, Zoning).
   Base maps are printed in newsprint gray so the data on top carries the color. Dark mode inverts them.
   Uses the site.css variables, so it follows the reader's Light / Dark choice. */

@font-face{font-family:"Plex Mono";src:url("fonts/plex-mono-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Plex Mono";src:url("fonts/plex-mono-500.woff2") format("woff2");font-weight:500 700;font-display:swap}

.leaflet-container{font:13px/1.4 var(--f-label,system-ui,sans-serif);background:var(--ground,#efe9dc);color:#1a1714;outline-offset:2px}
.leaflet-container a{color:var(--accent,#8a1c12)}

/* Base map: newsprint gray in light mode, inverted in dark mode. Only the base pane, never data or radar. */
.leaflet-pane.leaflet-base-pane{filter:grayscale(1) sepia(.12) contrast(.95) brightness(1.03)}
:root[data-theme="dark"] .leaflet-pane.leaflet-base-pane{filter:grayscale(1) invert(1) contrast(.82) brightness(.92)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .leaflet-pane.leaflet-base-pane{filter:grayscale(1) invert(1) contrast(.82) brightness(.92)}}

/* Frame and caption: every map sits in the same box with the same credit line */
.dmap{margin:20px 0;position:relative}
.dmap-frame{position:relative;border:1px solid var(--rule,#1a1714);background:var(--ground,#efe9dc);overflow:hidden}
.dmap figcaption,.dmap-credit{font:12px/1.45 var(--f-label,system-ui,sans-serif);color:var(--muted,#5d5650);margin-top:6px}
.dmap figcaption b{color:var(--ink,#1a1714)}

/* Controls: square, paper-colored, ink-ruled, same on Leaflet and canvas maps */
.leaflet-bar,.dmap-ctl{border:1px solid var(--rule,#1a1714)!important;border-radius:0!important;box-shadow:none!important;background:var(--paper,#fbf8f1)}
.leaflet-bar a,.dmap-ctl button{display:flex;align-items:center;justify-content:center;width:34px!important;height:34px!important;line-height:34px!important;
  font:600 18px var(--f-label,system-ui,sans-serif)!important;color:var(--ink,#1a1714)!important;background:var(--paper,#fbf8f1)!important;
  border:0!important;border-bottom:1px solid var(--soft,#d9d1c1)!important;border-radius:0!important;text-decoration:none;cursor:pointer;padding:0}
.leaflet-bar a:last-child,.dmap-ctl button:last-child{border-bottom:0!important}
.leaflet-bar a:hover,.dmap-ctl button:hover{background:var(--ground,#efe9dc)!important;color:var(--accent,#8a1c12)!important}
.leaflet-bar a:focus-visible,.dmap-ctl button:focus-visible{outline:2px solid var(--accent,#8a1c12);outline-offset:-2px}
.leaflet-bar a.leaflet-disabled{color:var(--soft,#d9d1c1)!important}
.dmap-ctl svg,.leaflet-bar a svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dmap-ctl{display:flex;flex-direction:column;position:absolute;right:10px;top:10px;z-index:2}

.leaflet-control-scale-line{font:600 11px var(--f-label,system-ui,sans-serif);border-color:var(--ink,#1a1714);background:color-mix(in srgb,var(--paper,#fbf8f1) 80%,transparent);color:var(--ink,#1a1714)}
.leaflet-control-attribution{font:11px var(--f-label,system-ui,sans-serif)!important;background:color-mix(in srgb,var(--paper,#fbf8f1) 85%,transparent)!important;color:var(--muted,#5d5650)!important}
.leaflet-control-attribution a{color:inherit!important}

/* Popups and tooltips in the paper's type */
.leaflet-popup-content-wrapper{border-radius:0;background:var(--paper,#fbf8f1);color:var(--ink,#1a1714);border:1px solid var(--rule,#1a1714);box-shadow:0 4px 14px rgb(0 0 0 / .18)}
.leaflet-popup-tip{background:var(--paper,#fbf8f1);border:1px solid var(--rule,#1a1714);box-shadow:none}
.leaflet-popup-content{font:14px/1.45 var(--f-label,system-ui,sans-serif);margin:12px 14px}
.leaflet-popup-content b:first-child{font:700 16px/1.2 var(--f-head,Georgia,serif)}
.leaflet-container a.leaflet-popup-close-button{color:var(--muted,#5d5650)}
.leaflet-tooltip{font:600 12px var(--f-label,system-ui,sans-serif);background:var(--paper,#fbf8f1);color:var(--ink,#1a1714);border:1px solid var(--rule,#1a1714);border-radius:0;box-shadow:none}

/* House pin: numbered circle in the masthead red */
.dmap-pin{background:var(--accent,#8a1c12);color:#fff;border:2px solid #fff;border-radius:50%;box-sizing:border-box;
  display:flex!important;align-items:center;justify-content:center;font:700 12px var(--f-label,system-ui,sans-serif);box-shadow:0 1px 3px rgb(0 0 0 / .5);transition:transform .15s}
.dmap-pin.on{background:#111;transform:scale(1.25);z-index:1000!important}
.dmap-dot{background:#111;border:2px solid #fff;border-radius:50%;box-sizing:border-box}
:root[data-theme="dark"] .dmap-pin{color:#1a1714;border-color:#1a1714}

/* "Use Ctrl + scroll to zoom" hint, shown over the map instead of hijacking the page scroll */
.dmap-hint{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;pointer-events:none;
  background:rgb(0 0 0 / .45);color:#fff;font:600 15px var(--f-label,system-ui,sans-serif);text-align:center;padding:20px;opacity:0;transition:opacity .25s}
.dmap-hint.show{opacity:1}

/* Full screen: the map fills the window, page behind it stops scrolling */
.dmap-full{position:fixed!important;inset:0!important;z-index:9999!important;width:100vw!important;height:100vh!important;height:100dvh!important;
  max-height:none!important;margin:0!important;border:0!important;aspect-ratio:auto!important}
html.dmap-lock,html.dmap-lock body{overflow:hidden}
.dmap-canvas{touch-action:pan-x pan-y}
.dmap-canvas.dmap-full{touch-action:none}

@media (prefers-reduced-motion:reduce){.dmap-pin,.dmap-hint{transition:none}}
@media print{.leaflet-control-container,.dmap-ctl,.dmap-hint{display:none!important}.leaflet-pane.leaflet-base-pane{filter:grayscale(1)!important}}

/* Street View box */
.dmap-sv{display:block;width:100%;aspect-ratio:4/3;border:1px solid var(--rule,#1a1714);background:var(--ground,#efe9dc)}
