.shared-map{border:1px solid var(--border,#ccc);border-radius:16px;padding:clamp(12px,2vw,24px);margin-block:20px;background:var(--surface,#fff);color:var(--text,#24332b);min-width:0}.shared-map-canvas{width:100%;min-height:240px;max-height:70vh;background:#eaf0ec}.shared-map :focus-visible,[data-location-map]:focus-visible{outline:2px solid var(--accent,var(--ds-brand));outline-offset:3px}.map-marker{display:block;width:24px;height:24px;background:var(--species-map-colour,#737373);border:3px solid white;border-radius:50%;box-shadow:0 0 0 1px #24332b}.map-marker img{width:100%;height:100%;object-fit:cover;border-radius:50%}.map-legend-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:6px 0}.map-legend-row label{display:flex;gap:8px;align-items:center}.map-colour-dot{display:inline-block;width:14px;height:14px;border:2px solid white;outline:1px solid currentColor;border-radius:50%}.shared-map-legend{margin-block:12px}.shared-map-legend h3{font-size:1rem}.shared-map-legend input[type=search]{max-width:100%}.species-info-overlay{width:min(480px,calc(100vw - 24px));max-height:85vh;overflow:auto;border:2px solid var(--accent,var(--ds-brand));border-radius:14px;padding:24px;background:var(--surface,#fff);color:var(--text,#24332b)}.species-info-overlay::backdrop{background:#0008}.species-info-overlay img{display:block;object-fit:cover;max-width:100%;margin:12px 0}.species-info-overlay dt{font-weight:700}.species-info-overlay dd{margin:0 0 12px;overflow-wrap:anywhere}.species-info-overlay [data-overlay-close]{float:right;min-width:44px;min-height:44px}.species-info-overlay :focus-visible{outline:2px solid var(--accent,var(--ds-brand));outline-offset:3px}.map-iucn-badge{border:1px solid currentColor;border-radius:6px;padding:4px 8px;background:#7eb37022}.shared-map .leaflet-control-attribution a{text-decoration:underline}.map-picker-actions{display:flex;gap:8px;flex-wrap:wrap}.map-picker-hint{font-size:.9rem}@media(max-width:520px){.map-legend-row{display:grid;grid-template-columns:minmax(0,1fr) auto}.species-info-overlay{padding:16px}.shared-map-canvas{min-height:260px}}@media(prefers-reduced-motion:reduce){.shared-map *{transition:none!important}}

.shared-map a,.species-info-overlay a,[data-inline-species] a{color:var(--text,#24332b);text-decoration:underline}

.module-species h1{overflow-wrap:anywhere}

.shared-map-canvas,[data-location-map]{position:relative;isolation:isolate;z-index:0}

.habitat-map-legend{display:flex;align-items:center;gap:12px;padding:10px 0}.map-kind-marker{background:var(--kind-light);flex:none}.map-kind-diamond{border-radius:2px;transform:rotate(45deg);width:20px;height:20px;margin:2px}[data-theme="dark"] .map-kind-marker,[data-high-contrast="true"] .map-kind-marker{background:var(--kind-dark)}

.thp-high-contrast .map-kind-marker{background:var(--kind-dark)}

.species-map-workspace{display:block}.species-map-visual{min-width:0}.species-map:not(.species-map-enhanced) [data-species-map-canvas]{display:none}.species-map-static svg{display:block;width:100%;height:auto}.species-map [hidden]{display:none!important}.species-map-legend-list{list-style:none;padding:0;margin:10px 0;max-height:none;overflow:visible}.species-map-legend-list>li{display:flex;gap:8px;align-items:start;padding:10px 2px;border-bottom:1px solid var(--border,#999)}.species-map-legend-list small{display:block}.species-map-legend-list button{background:transparent;color:inherit;text-align:left;padding:0;border:0;min-height:30px;text-decoration:underline;font-weight:700}.species-map-legend-list button[aria-pressed=true]{outline:2px solid currentColor;outline-offset:2px}.species-map-cue{border:1px solid currentColor;font-size:.75rem;border-radius:3px;padding:1px 3px}.species-map-choice input{width:20px;height:20px}.species-map .map-colour-dot{flex:none;margin-top:4px}.species-map .shared-map-legend{min-width:0;margin:0}.species-map-legend-list a{overflow-wrap:anywhere}.species-map .shared-map-legend input,.species-map .shared-map-legend select{box-sizing:border-box;width:100%;max-width:100%}.thp-high-contrast .species-map{--map-ocean:Canvas;--map-land:GrayText;--map-border:CanvasText}.block-description{display:block;font-weight:400;font-size:.76rem}.species-map-editor-preview svg{width:100%;max-height:260px}.species-map-editor-settings{margin-top:12px}.species-map-editor-settings select{max-width:100%}
@media(max-width:800px){.species-map-workspace{grid-template-columns:minmax(0,1fr)}.species-map-legend-list{max-height:none}.species-map .shared-map-canvas{min-height:260px}}[data-theme=dark] .species-map{--map-ocean:#14231c;--map-land:#46584b;--map-border:#b5c7b7}.species-profile-card img{max-width:100%;height:160px;object-fit:cover}

/* One world-map layout: controls, map, then a legend in normal page flow. */
.species-map{box-sizing:border-box;--map-land:#e9eee9;--map-border:#a0aca2;--map-ocean:#f5f8f6;background:var(--content-bg,var(--surface,#fff));border-radius:var(--button-radius,12px)}
.species-map .species-map-workspace{display:block}.species-map .shared-map-canvas{height:min(50vw,80vh);min-height:280px;max-height:80vh;background:var(--map-ocean)}
.species-map-width-wide{width:var(--container-width,75rem);max-width:100cqw;margin-inline:calc((100% - min(100cqw,var(--container-width,75rem)))/2)}.species-map-width-content{width:100%;margin-inline:0}
#site-content:has(.species-map-width-full),#registry-content:has(.species-map-width-full){container-type:inline-size}.species-map-width-full{width:100cqw;margin-inline:calc((100% - 100cqw)/2)}.thp-layout-group .species-map,.thp-layout-column .species-map,.thp-layout-card .species-map{width:100%;margin-inline:0}.thp-frontend .species-map .species-map-legend-list button{background:transparent;color:var(--text,#24332b);border:0;box-shadow:none;text-decoration:underline}
.species-map-quick{display:flex;align-items:end;flex-wrap:wrap;gap:var(--space-md,16px);margin-bottom:12px}.species-map-quick label{flex:1 1 200px;min-width:0}.species-map-quick input,.species-map-quick select{width:100%;box-sizing:border-box;min-height:44px}.species-map-quick p{margin-block:0 8px}.species-map button{min-height:44px;max-width:100%;overflow-wrap:anywhere}.species-map-regions{display:flex;gap:8px;flex-wrap:wrap;margin-block:0 12px}.species-map-regions button{font-size:.85rem;padding:.5em .8em}
.species-map .shared-map-legend{margin-top:16px}.species-map .shared-map-legend summary{min-height:44px;cursor:pointer;font-weight:700}.species-map .species-map-legend-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 20px;max-height:none;overflow:visible}.species-map .species-map-legend-list>li{display:grid;grid-template-columns:20px 16px minmax(0,1fr);gap:8px;min-width:0;align-content:start}.species-map-legend-list .species-map-cue{grid-column:2/4;grid-row:2;justify-self:start}.species-map-legend-list>li>div{grid-column:3;grid-row:1;min-width:0;overflow-wrap:anywhere}.species-map .species-map-legend-list button{min-height:44px;overflow-wrap:anywhere}.species-map .species-map-legend-list input{margin-top:10px}.species-map .map-colour-dot{margin-top:13px}.species-map .notice{font-size:.85rem;margin:0 0 12px;padding:8px 12px}.species-map-page{padding-top:0}.module-species:has(+.species-map-page){margin-bottom:0}.species-map-page>.species-map{margin-top:0}
.species-map-sr{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.species-minimum-marker{display:block;width:14px;height:14px;border:3px solid var(--content-bg,#fff);outline:2px solid currentColor;border-radius:50%}.species-minimum-wrap:focus-visible{outline:3px solid var(--focus,var(--accent));outline-offset:3px}.species-info-overlay [data-species-overlap-picker]{list-style:none;padding:0}.species-info-overlay [data-species-overlap-picker] button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;margin-bottom:8px;text-align:left}.species-info-overlay [data-species-overlap-picker] .map-colour-dot{margin:0}
[data-theme=dark] .species-map{--map-ocean:#17251f;--map-land:#d6dfd7;--map-border:#919f94}.thp-high-contrast .species-map{--map-ocean:Canvas;--map-land:Canvas;--map-border:CanvasText;border:2px solid CanvasText}.species-map :focus-visible{outline:2px solid var(--focus,var(--accent));outline-offset:3px}
@media(max-width:1200px){.species-map .species-map-legend-list{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.species-map .species-map-legend-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.species-map .species-map-legend-list{grid-template-columns:minmax(0,1fr)}.species-map{padding:12px}.species-map .shared-map-canvas{min-height:260px}.species-map-quick{gap:8px}.species-map-regions{gap:4px}}
@media(max-width:800px){.thp-frontend:not(.has-menu-js):has(.species-map) .compact-header .frontend-mainbar{display:flex;flex-wrap:wrap}.thp-frontend:not(.has-menu-js):has(.species-map) .compact-header .frontend-nav{display:block;flex:0 0 100%;width:100%;min-width:0;position:static;margin:0;padding:0}.thp-frontend:not(.has-menu-js):has(.species-map) .frontend-nav .navigation-list{display:flex;flex-direction:column;align-items:stretch;width:100%;min-width:0;box-sizing:border-box;margin:0;padding:0}.thp-frontend:not(.has-menu-js):has(.species-map) .frontend-nav .navigation-item{min-width:0;width:100%}.thp-frontend:not(.has-menu-js):has(.species-map) .frontend-nav .navigation-item>a{flex:1 1 0;min-width:0;white-space:normal;overflow-wrap:anywhere}.thp-frontend:not(.has-menu-js):has(.species-map) .frontend-nav .submenu{display:none;position:static;width:auto;min-width:0;max-width:100%;box-sizing:border-box;padding:0 0 8px 16px;margin:0}.thp-frontend:not(.has-menu-js):has(.species-map) .frontend-nav .menu-node:is(:hover,:focus-within)>.submenu{display:flex;visibility:visible;opacity:1}}

/* Species help and public information card, shared by editor preview and website. */
.species-map-help{margin:0 0 1rem;padding:.35rem 1rem;border:1px solid var(--border,#9aa99d);border-radius:var(--radius,12px);background:var(--surface,#fff);color:var(--text,#172c20);font:inherit;max-width:100%;box-sizing:border-box}
.species-map-help summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;font-weight:700;font-size:clamp(.8rem,2.8vw,1rem)}
.species-map-help ol{margin:.4rem 0 .75rem;padding-inline-start:1.35rem;line-height:1.6}.species-map-help li+li{margin-top:.25rem}
.species-map-help summary:focus-visible,.species-info-card :is(a,button):focus-visible{outline:2px solid var(--accent,var(--ds-brand));outline-offset:3px}
dialog.species-info-card{position:fixed;inset: max(1rem,env(safe-area-inset-top)) 1rem auto auto;margin:0;width:min(390px,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);padding:0;border:1px solid var(--border,#819484);border-radius:var(--radius,14px);background:var(--surface,#fff);color:var(--text,#172c20);box-shadow:0 12px 36px #0004;overflow:auto;overscroll-behavior:contain;font:inherit;box-sizing:border-box}
dialog.species-info-card::backdrop{background:#0005}.species-info-open{overflow:hidden}
.species-info-card [data-overlay-close]{position:sticky;float:right;top:8px;right:8px;margin:8px 8px -52px 0;z-index:2;min-width:44px;min-height:44px;border:2px solid currentColor;border-radius:50%;background:var(--surface,#fff);color:var(--text,#172c20);font-size:1.4rem}
.species-info-card [data-overlay-content]>img{display:block;width:100%;height:180px;object-fit:cover}.species-info-placeholder{height:120px;display:grid;place-items:center;padding:1rem 3.5rem 1rem 1rem;box-sizing:border-box;background:var(--site-bg,#eef2ed);color:var(--text,#172c20)}
.species-info-content{padding:1.1rem;overflow-wrap:anywhere;min-width:0}.species-info-content h2{font-size:1.45rem;line-height:1.25;margin:0 0 .35rem}.species-info-scientific{font-style:italic;margin:.2rem 0 .7rem}.species-info-group{display:inline-block;padding:.2rem .65rem;border:1px solid currentColor;border-radius:2rem;font-size:.85rem;font-weight:700}
.species-info-content dl{display:block;margin:1rem 0}.species-info-content dt{font-weight:700;margin-top:.7rem}.species-info-content dd{margin:.15rem 0 .5rem}.species-info-content h3{font-size:1rem;margin-bottom:.3rem}.species-info-source{font-size:.85rem}.species-info-actions{display:grid;gap:.55rem}.species-info-actions a{min-height:44px;display:flex;align-items:center;justify-content:center;padding:.5rem;text-align:center;box-sizing:border-box}
html.thp-high-contrast :is(.species-info-card,.species-map-help){border:2px solid currentColor;box-shadow:none}html.thp-high-contrast .species-info-card a{color:inherit;text-decoration:underline}html.thp-high-contrast .species-info-card .button{background:var(--surface,#fff);color:var(--text,#172c20)}
@media(max-width:800px){dialog.species-info-card{inset:auto 0 0;width:100%;max-height:65dvh;border-radius:var(--radius,14px) var(--radius,14px) 0 0}.species-info-card [data-overlay-content]>img{height:130px}.species-info-placeholder{height:80px}.species-info-content{padding:1rem}.species-map-help{padding:.25rem .75rem}}

.species-info-card .species-info-actions a.button{background:var(--text,#172c20);color:var(--surface,#fff);border:2px solid var(--text,#172c20);text-decoration:none}.species-info-card [data-overlay-content]>img{margin:0}.species-map-help p{overflow-wrap:anywhere}html.thp-high-contrast .species-info-card .species-info-actions a.button{background:var(--surface,#fff);color:var(--text,#172c20);border-color:currentColor;text-decoration:underline}

[data-theme=dark] .species-map{--map-land:#e9eee9}

.species-map-help summary:focus-visible,.species-info-card :is(a,button):focus-visible{outline-color:var(--focus,var(--ds-brand))}

 dialog.species-info-card button[data-overlay-close]{display:block;float:none;width:44px;height:44px;padding:0;min-height:44px;min-width:44px;line-height:1;position:sticky;top:8px;margin:8px 8px -52px auto;background:var(--surface,#fff);color:var(--text,#172c20);border:2px solid currentColor}

@media(max-width:800px){dialog.species-info-card{max-width:100vw}}
