/* Map-only styling. The existing website-footprint view keeps its own presentation. */
[hidden] { display: none !important; }
.workspace { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 18px; }
.workspace > .stage { min-height: 0; }
body[data-view="park"] .map-only, body[data-view="park"] #liveMap { display: none !important; }
body[data-view="map"] {
  color-scheme: light;
  --bg: #f8f9f7; --paper: #fff; --ink: #26332d; --ink-soft: #7b857f;
  --line: #e5e9e4; --blue: #56886d; --green: #54aa7c; --accent-warm: #d8a177;
  background: var(--bg); height: 100svh; min-height: 660px;
}
body[data-view="map"] header { background: #fff; padding: 18px 30px; gap: 32px; border-color: var(--line); }
body[data-view="map"] .brand { letter-spacing: -.6px; font-weight: 700; }
body[data-view="map"] .brand svg rect { fill: #7caa8c; }
body[data-view="map"] .brand svg rect:first-child { fill: #dda885; }
body[data-view="map"] .tabs { background: #f1f4ef; border-color: #e9ece7; border-radius: 10px; }
body[data-view="map"] .tabs button { color: #7a847d; padding: 9px 18px; }
body[data-view="map"] .tabs button.active { background: #fff; color: #2e4c3d; box-shadow: 0 1px 4px #18382910; }
body[data-view="map"] .tabs button:not(.active):hover { background: #e9eee8; color: #394f41; }
body[data-view="map"] .dot { background: #54aa7c; box-shadow: 0 0 0 4px #54aa7c12; animation: none; }
body[data-view="map"] .live { color: #737e76; font-family: inherit; font-size: 12px; }
body[data-view="map"] .live b { color: #2f4b3b; }
body[data-view="map"] main { gap: 20px; padding: 26px 30px 28px; }
.map-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.map-heading h1 { font-size: 22px; letter-spacing: -.5px; font-weight: 650; }
.map-heading p { font-size: 12px; color: #829086; margin-top: 6px; }
.source-badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dfeae1; color: #587d63; background: #f0f6ef; font-size: 11px; padding: 7px 10px; border-radius: 7px; white-space: nowrap; }
.source-badge::before { content: ''; width: 6px; height: 6px; background: #57ae7e; border-radius: 50%; }
.source-badge.is-demo { color: #97723e; border-color: #eee5d5; background: #f8f4e9; }
.source-badge.is-demo::before { background: #d1a462; }
.visitor-metrics { display: flex; align-items: center; background: #fff; padding: 22px 26px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 3px #10201802; }
.metric-primary { flex: 1; }
.metric-number { display: flex; align-items: baseline; gap: 12px; }
.metric-number strong { font-size: 44px; line-height: 1; letter-spacing: -2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-number > span { font-size: 13px; color: #748177; }
.metric-status { display: flex; align-items: center; gap: 8px; color: #839187; font-size: 11px; margin-top: 11px; }
.metric-status > i { height: 5px; width: 5px; border-radius: 50%; background: #57ae7e; }
.metric-secondary { display: grid; gap: 8px; padding: 0 24px; border-left: 1px solid #edf0eb; }
.metric-secondary strong { font-size: 23px; line-height: 1.1; font-weight: 550; font-variant-numeric: tabular-nums; }
.metric-secondary span { color: #829086; font-size: 11px; }
body[data-view="map"] .stage { background: #e9f0ed; border-radius: 14px; border: 1px solid #dde5df; min-height: 320px; box-shadow: none; }
body[data-view="map"] .stage::after { display: none; }
body[data-view="map"] #stage, body[data-view="map"] #stage3d, body[data-view="map"] .stage .hint, body[data-view="map"] .scene-controls { display: none !important; }
#liveMap { position: absolute; inset: 0; z-index: 0; background: #dce8e9; font-family: inherit; }
/* De-emphasize the standard basemap; do not alter its geometry, labels or attribution. */
#liveMap .leaflet-tile-pane { filter: saturate(.4); opacity: .82; }
#liveMap .leaflet-control-attribution { background: #ffffffeb; color: #657b72; font-size: 10px; padding: 3px 7px; border-top-left-radius: 5px; }
#liveMap .leaflet-control-attribution a { color: #4d7961; }
.map-caption { position: absolute; top: 18px; left: 18px; z-index: 500; padding: 9px 12px; color: #4c6355; border: 1px solid #dde5dd; border-radius: 8px; background: #ffffffed; box-shadow: 0 2px 6px #152b1d07; font-size: 11px; pointer-events: none; }
.map-caption i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #61a97d; }
.map-controls { display: flex; flex-direction: column; gap: 8px; position: absolute; right: 16px; bottom: 36px; z-index: 600; }
.map-zoom { overflow: hidden; background: #fff; border: 1px solid #dee5df; border-radius: 9px; box-shadow: 0 3px 10px #152b1d09; }
.map-controls button { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border: 0; background: #fff; color: #53665a; font-size: 22px; }
.map-zoom button + button { border-top: 1px solid #e9ede7; }
.map-controls > button { border: 1px solid #dee5df; border-radius: 9px; box-shadow: 0 3px 10px #152b1d09; }
.map-controls button:hover { background: #f1f6ef; color: #2b5339; }
.map-controls button svg { width: 19px; height: 19px; }
.map-footer { display: flex; justify-content: space-between; gap: 14px; color: #8b948d; font-size: 10px; padding: 0 2px; line-height: 1.7; }
#unknownLocations { color: #a3834c; white-space: nowrap; }
.map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 500; width: max-content; max-width: 85%; text-align: center; padding: 20px 28px; border: 1px solid #e1e8df; border-radius: 13px; background: #fffffff2; box-shadow: 0 5px 20px #283a2310; }
.map-empty b { display: block; color: #45614e; font-size: 14px; }
.map-empty p { margin-top: 7px; font-size: 12px; color: #8a948c; }
.tile-notice { position: absolute; bottom: 36px; left: 16px; right: 74px; z-index: 650; background: #fffdf4f5; border: 1px solid #e7dac1; color: #8a734c; border-radius: 8px; padding: 9px 12px; font-size: 11px; line-height: 1.6; }
.tile-notice button, #dataRetry { background: none; border: 0; padding: 3px 6px; font: inherit; color: #537454; text-decoration: underline; cursor: pointer; }
body[data-view="map"].data-stale .metric-status { color: #a17a3d; }
body[data-view="map"].data-stale .metric-status > i { background: #c4944f; }
body[data-view="map"] aside { width: 306px; gap: 14px; }
body[data-view="map"] .panel { background: #fff; border: 1px solid #e5e9e4; border-radius: 14px; box-shadow: none; }
body[data-view="map"] .panel > h2 { padding: 17px 18px; font-family: inherit; font-size: 12px; letter-spacing: 0; font-weight: 550; color: #48594d; }
body[data-view="map"] .panel > h2 .count { background: #eff4ee; color: #73846b; border-radius: 5px; padding: 2px 7px; font: 11px var(--mono); min-width: 24px; }
#onlinePanel { flex: 0 1 43%; min-height: 120px; }
#mapVisitors { overflow-y: auto; padding: 5px 7px; scrollbar-width: thin; scrollbar-color: #d8e1d8 transparent; }
.online-visitor { border: 0; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; background: #fff; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; color: #4a5b4f; }
.online-visitor:hover, .online-visitor.is-selected { background: #f0f6ee; }
.visitor-face { display: inline-block; width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; vertical-align: middle; background: #f2f4ef; }
.visitor-face svg { display: block; width: 100%; height: 100%; }
.online-visitor-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
.online-visitor-copy strong { font-size: 12px; font-weight: 550; }
.online-visitor-copy > span { display: block; font-size: 10.5px; color: #8a948b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visitor-arrow { font-style: normal; color: #b3bfb3; font-size: 15px; }
#onlineListEmpty { padding: 22px 18px; font-size: 12px; color: #939d92; }
body[data-view="map"] .ev { padding: 12px 17px; border-color: #f0f2ed; }
body[data-view="map"] .ev .txt b { color: #617263; font-weight: 500; }
body[data-view="map"] .ev .txt span { color: #8a978c; }
body[data-view="map"] .ev time { color: #a0aaa0; }
body[data-view="map"] .ev i.visit { background: #70a585; box-shadow: none; }
body[data-view="map"] .ev i.pageview { background: #b5c6b5; }
body[data-view="map"] .ev i.leave { background: #dfdfd5; }
body[data-view="map"] .ev:hover, body[data-view="map"] .ev.selected { background: #f3f7f0; }
body[data-view="map"] #events { scrollbar-color: #d8e1d8 transparent; }
body[data-view="map"] .vd-meta { color: #839180; }
body[data-view="map"] .tl b { color: #63765f; }
.visitor-marker, .visitor-cluster { border: 0; background: none; }
.visitor-pin { position: relative; display: block; width: 46px; height: 46px; filter: drop-shadow(0 3px 4px #23463235); transition: transform .16s; }
.visitor-pin::after { content: ''; position: absolute; left: 18px; bottom: -5px; width: 10px; height: 10px; background: #fff; transform: rotate(45deg); border-radius: 2px; z-index: -1; }
.visitor-pin .visitor-face { width: 46px; height: 46px; border: 3px solid #fff; }
.visitor-online { position: absolute; right: 0; bottom: 2px; width: 12px; height: 12px; background: #60b582; border: 2px solid #fff; border-radius: 50%; }
.visitor-marker:hover .visitor-pin, .visitor-marker:focus-visible .visitor-pin { transform: translateY(-3px) scale(1.08); }
.visitor-marker.is-selected .visitor-face { outline: 3px solid #82ba96; outline-offset: 2px; }
.visitor-stack { display: flex; align-items: center; height: 46px; position: relative; padding-right: 14px; filter: drop-shadow(0 3px 4px #2346322b); }
.visitor-stack .visitor-face { width: 39px; height: 39px; border: 2.5px solid #fff; position: relative; }
.visitor-stack .visitor-face + .visitor-face { margin-left: -21px; }
.visitor-stack b { position: absolute; right: 0; bottom: -1px; background: #526f59; color: #fff; border: 2px solid #fff; border-radius: 99px; min-width: 22px; padding: 1px 5px; font: 600 10px/16px var(--mono); text-align: center; }
.visitor-cluster:hover .visitor-stack { filter: drop-shadow(0 4px 7px #23463250); }
#liveMap .leaflet-popup-content-wrapper { border-radius: 13px; padding: 0; box-shadow: 0 10px 32px #243d2826; color: #3b5041; }
#liveMap .leaflet-popup-content { margin: 17px; line-height: 1.5; }
#liveMap .leaflet-popup-close-button { top: 5px; right: 6px; color: #a1b19f; }
.visitor-popup-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.visitor-popup-head strong { display: block; font-size: 12px; overflow-wrap: anywhere; padding-right: 10px; }
.visitor-popup-head div > span { display: block; color: #9ba799; margin-top: 3px; font-size: 10px; }
.visitor-popup-page { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 11px; background: #f4f7f0; border-radius: 7px; }
.visitor-popup-page span { color: #8a9b85; font-size: 10px; }
.visitor-popup-page b { font: 500 11px/1.5 var(--mono); overflow-wrap: anywhere; min-width: 0; }
#liveMap .visitor-privacy { margin: 11px 0; font-size: 10px; color: #9ba697; }
.visitor-popup button { border: 0; background: transparent; padding: 4px 0; font: inherit; font-size: 11px; font-weight: 500; color: #639170; cursor: pointer; }
@media (max-width: 1080px) { body[data-view="map"] header { padding-inline: 20px; gap: 20px; } body[data-view="map"] main { padding: 22px 20px; gap: 16px; } body[data-view="map"] aside { width: 278px; } .metric-secondary { padding-inline: 18px; } }
@media (max-width: 860px) {
  body[data-view="map"] { height: auto; min-height: 100svh; }
  body[data-view="map"] header { flex-wrap: wrap; gap: 12px; padding: 16px; }
  body[data-view="map"] .brand { margin-right: auto; }
  body[data-view="map"] .tabs { order: 3; width: 100%; }
  body[data-view="map"] .tabs button { flex: 1; padding: 10px; }
  body[data-view="map"] .live { font-size: 10px; margin-left: 0; }
  body[data-view="map"] main { padding: 20px 14px; gap: 18px; }
  .workspace { flex: none; width: 100%; gap: 14px; }
  .map-heading h1 { font-size: 20px; }
  .map-heading p { font-size: 11px; }
  .visitor-metrics { padding: 19px 16px; flex-wrap: wrap; }
  .metric-number { gap: 8px; }
  .metric-number strong { font-size: 38px; }
  .metric-number > span { font-size: 11px; }
  .metric-secondary { padding: 0 12px; }
  .metric-secondary:last-child { padding-right: 0; }
  .metric-secondary strong { font-size: 20px; }
  .metric-secondary span { font-size: 10px; }
  .metric-status { font-size: 10px; gap: 5px; }
  body[data-view="map"] .stage { height: 390px; min-height: 0; flex: none; }
  .map-caption { top: 12px; left: 12px; padding: 8px 9px; font-size: 10px; }
  .map-controls { right: 12px; }
  .map-controls button { width: 44px; height: 44px; }
  .map-footer { font-size: 9px; flex-wrap: wrap; gap: 2px; }
  body[data-view="map"] aside { width: 100%; flex: none; }
  #onlinePanel { flex: none; }
  #mapVisitors { max-height: 270px; }
  body[data-view="map"] #events { max-height: 230px; }
}
@media (max-width: 430px) { .metric-number > span { max-width: 76px; } .metric-status { flex-wrap: wrap; max-width: 176px; } .metric-secondary { padding-inline: 10px; } }
@media (prefers-reduced-motion: reduce) { .visitor-pin { transition: none; } }
