/* The one historic map (Phase 16). Class colours: the frame of a marker. */
.hmap-page{--hm-scene:#94660F;--hm-place:#5E574C;--hm-event:#A1282B;--hm-quest:#2E7D32;--hm-you:#1F6FE0;--hm-ink:#2b2b28;--hm-paper:#f6f2e9;--hm-edge:#ded5c4;--hm-muted:#665f54;display:flex;flex-wrap:wrap;gap:0;margin:0 -1rem;border-top:1px solid var(--hm-edge)}
.hmap-page [hidden]{display:none!important}
.hmap-side{flex:1 1 340px;max-width:100%;box-sizing:border-box;padding:1.5rem 1.6rem;border-right:1px solid var(--hm-edge)}
.hmap-side h1{margin:0;font-size:2rem;line-height:1.15}
.hmap-lead{margin:.4rem 0 1.2rem;color:var(--hm-muted);font-size:.95rem}
.hmap-note{font-size:.88rem;color:var(--hm-muted);margin:.9rem 0 0}
.hmap-layers{border:0;margin:0 0 1.1rem;padding:0;min-width:0}.hmap-layer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
.hmap-layers legend{padding:0;margin-bottom:.5rem;font:700 .7rem system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--hm-muted)}
.hmap-layer{display:flex;align-items:center;gap:.55rem;min-height:44px;padding:0 .75rem;border-radius:10px;border:1.5px solid var(--hm-edge);background:var(--hm-paper);cursor:pointer;font:600 .9rem system-ui,sans-serif}
.hmap-layer input{width:18px;height:18px;margin:0;accent-color:var(--hm-ink)}
.hmap-sw{display:block;width:11px;height:11px;background:#b9b0a1}
.hmap-layer[data-class=scene] .hmap-sw{border-radius:3px}.hmap-layer[data-class=place] .hmap-sw{border-radius:50%}
.hmap-layer[data-class=event] .hmap-sw{border-radius:2px;transform:rotate(45deg)}.hmap-layer[data-class=quest] .hmap-sw{border-radius:50% 50% 50% 0;transform:rotate(-45deg)}
.hmap-layer:has(input:checked)[data-class=scene]{border-color:var(--hm-scene);background:#f1e4c6}.hmap-layer:has(input:checked)[data-class=scene] .hmap-sw{background:var(--hm-scene)}
.hmap-layer:has(input:checked)[data-class=place]{border-color:var(--hm-place);background:#e6e0d4}.hmap-layer:has(input:checked)[data-class=place] .hmap-sw{background:var(--hm-place)}
.hmap-layer:has(input:checked)[data-class=event]{border-color:var(--hm-event);background:#f3dada}.hmap-layer:has(input:checked)[data-class=event] .hmap-sw{background:var(--hm-event)}
.hmap-layer:has(input:checked)[data-class=quest]{border-color:var(--hm-quest);background:#dcebdd}.hmap-layer:has(input:checked)[data-class=quest] .hmap-sw{background:var(--hm-quest)}
.hmap-mapwrap{flex:999 1 560px;min-width:0;position:relative}
.hmap-map{height:calc(100vh - 140px);min-height:480px;width:100%;background:#dce6e4;isolation:isolate;z-index:0}
.hmap-locate{position:absolute;right:12px;top:84px;z-index:500;width:44px;height:44px;border-radius:10px;border:1px solid var(--hm-edge);background:#fffdf8;color:var(--hm-you);display:flex;align-items:center;justify-content:center;box-shadow:0 1px 7px #0002;cursor:pointer}
/* the card */
.hmap-card{border:1px solid var(--hm-edge);border-radius:14px;background:#fbf8f1;padding:14px 16px}
.hmap-pager{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:-2px 0 10px}
.hmap-pager span{font:600 .8rem system-ui,sans-serif}
.hmap-pager button,.hmap-x{width:44px;height:36px;border-radius:18px;border:1px solid var(--hm-edge);background:var(--hm-paper);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--hm-ink)}
.hmap-x{border:0;background:transparent;width:44px;height:44px;margin:-10px -12px 0 0}
.hmap-card-top{display:flex;gap:12px;align-items:flex-start}
.hmap-thumb{flex:none;width:96px;height:96px;border-radius:12px;object-fit:cover;display:flex;align-items:center;justify-content:center}
.hmap-card-body{flex:1;min-width:0}
.hmap-cls{display:flex;align-items:center;gap:6px;font:700 .68rem system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase}
.hmap-card h2{margin:4px 0 0;font-size:1.3rem;line-height:1.2}
.hmap-line{margin:3px 0 0;font-size:.85rem;color:var(--hm-muted)}
.hmap-status{margin:3px 0 0;font:600 .82rem system-ui,sans-serif}
.hmap-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
.hmap-actions a,.hmap-actions button{min-height:44px;display:inline-flex;align-items:center;padding:0 16px;border-radius:22px;border:1.5px solid var(--hm-ink);color:var(--hm-ink);background:transparent;font:600 .88rem system-ui,sans-serif;text-decoration:none;cursor:pointer}
/* the site paints content links warm (main.container a:not(...)), so the card's buttons say so firmly */
.hmap-actions a{color:var(--hm-ink)!important}
.hmap-actions a.hmap-primary,.hmap-actions a.hmap-primary:hover{background:var(--hm-ink);color:var(--hm-paper)!important}
.hmap-row{color:var(--hm-ink)!important}
.hmap-actions .hmap-more{border:0;margin-left:auto;padding:0 6px}
.hmap-details{margin-top:12px;font-size:.92rem;line-height:1.5}
.hmap-details h3{margin:14px 0 4px;font:700 .68rem system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--hm-muted)}
.hmap-row{display:flex;align-items:center;gap:10px;min-height:44px;border-bottom:1px solid #e6dfd1;color:inherit;text-decoration:none}
.hmap-row img{width:56px;height:40px;object-fit:cover;border-radius:6px}
/* markers: level 1 = the frame (class), level 2 = the icon inside (kind) */
.hmap-mk{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;width:130px;margin-left:-65px;pointer-events:none}
.hmap-mk>*{pointer-events:auto}
.hmap-shape{position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border:2.5px solid #fff;box-shadow:0 2px 6px rgba(43,43,40,.35);cursor:pointer}
.hmap-shape svg{display:block}
.hmap-c-scene .hmap-shape{width:44px;height:44px;border-radius:12px;background:var(--hm-scene);border-width:3px}
.hmap-c-place .hmap-shape{width:32px;height:32px;border-radius:50%;background:var(--hm-place)}
.hmap-c-event .hmap-shape{width:30px;height:30px;border-radius:6px;background:var(--hm-event);transform:rotate(45deg)}
.hmap-c-event .hmap-shape svg{transform:rotate(-45deg)}
.hmap-c-quest .hmap-shape{width:38px;height:38px;border-radius:50% 50% 50% 0;background:var(--hm-quest);transform:rotate(-45deg)}
.hmap-c-quest .hmap-shape svg{transform:rotate(45deg)}
.hmap-sel .hmap-shape{box-shadow:0 2px 6px rgba(43,43,40,.35),0 0 0 3px var(--hm-ink)}
.hmap-badges{position:absolute;top:-7px;left:calc(50% + 8px);display:flex;gap:2px}
.hmap-badge{min-width:18px;height:18px;box-sizing:border-box;padding:0 4px;border-radius:9px;border:1.5px solid #fff;display:flex;align-items:center;justify-content:center;font:700 10.5px system-ui,sans-serif;color:#fff}
.hmap-label{max-width:126px;text-align:center;font:600 11.5px/1.2 system-ui,sans-serif;color:var(--hm-ink);text-shadow:0 0 2px #f6f2e9,0 0 3px #f6f2e9,0 0 5px #f6f2e9;display:none}
.hmap-sub{font:700 10.5px/1.2 system-ui,sans-serif;color:#1f5c23;text-shadow:0 0 2px #f6f2e9,0 0 4px #f6f2e9}
.hmap-labels .hmap-label{display:block}
.hmap-map .hmap-cluster{border-radius:50%;background:var(--hm-paper);color:var(--hm-ink);border:2px solid var(--hm-place);box-shadow:0 1px 6px #0003;display:flex;align-items:center;justify-content:center;font:700 13px system-ui,sans-serif}
.hmap-map .leaflet-control-attribution{font-size:10px}
.hmap-you{width:18px;height:18px;box-sizing:border-box;border-radius:50%;background:var(--hm-you);border:3px solid #fff;box-shadow:0 0 0 12px rgba(31,111,224,.15)}
@media(max-width:760px){.hmap-page{margin:0 -.75rem}.hmap-side{border-right:0;padding:1rem}.hmap-map{height:70vh;min-height:420px}.hmap-mapwrap{order:-1}}
