.hi-map-section,
.hi-map-overview {
	margin-block: 2.5rem;
}

.hi-map {
	position: relative;
	min-height: var(--hi-map-height, 420px);
	border: 1px solid rgba(10, 48, 63, 0.18);
	border-radius: 16px;
	overflow: hidden;
	background: #e8eef0;
}

.hi-map-canvas {
	position: absolute;
	inset: 0;
	min-height: var(--hi-map-height, 420px);
	overflow: hidden;
	touch-action: none;
	cursor: grab;
	background: #e8eef0;
}

.hi-map-canvas.is-dragging {
	cursor: grabbing;
}

.hi-map-consent {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 2rem;
	text-align: center;
	background: linear-gradient(145deg, rgba(240, 246, 248, 0.98), rgba(220, 234, 238, 0.98));
}

.hi-map-consent p {
	max-width: 46rem;
	margin: 0;
}

.hi-map-load,
.hi-map-filter-reset {
	border: 0;
	border-radius: 999px;
	padding: 0.7rem 1.15rem;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	background: var(--wp--preset--color--petrol-dark, #073b4c);
	color: #fff;
}

.hi-map-tiles,
.hi-map-markers,
.hi-map-popups {
	position: absolute;
	inset: 0;
}

.hi-map-tiles img {
	position: absolute;
	left: 0;
	top: 0;
	width: 256px;
	height: 256px;
	max-width: none;
	user-select: none;
}

.hi-map-tiles img.is-error {
	display: none;
}

.hi-map-markers,
.hi-map-popups {
	pointer-events: none;
}

.hi-map-marker {
	--hi-marker-color: var(--wp--preset--color--petrol, #0c6b78);
	position: absolute;
	left: 0;
	top: 0;
	z-index: 5;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin: -30px 0 0 -17px;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50% 50% 50% 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
	background: var(--hi-marker-color);
	color: #fff;
	transform-origin: center;
	rotate: -45deg;
	cursor: pointer;
	pointer-events: auto;
}

.hi-map-marker__icon {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font: 800 0.78rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	transform: rotate(45deg);
}

.hi-map-marker--castle,
.hi-map-legend__marker--castle { --hi-marker-color: #8a4f32; }
.hi-map-marker--water,
.hi-map-legend__marker--water { --hi-marker-color: #1677a5; }
.hi-map-marker--nature,
.hi-map-legend__marker--nature { --hi-marker-color: #2f6f4e; }
.hi-map-marker--culture,
.hi-map-legend__marker--culture { --hi-marker-color: #6b4f9b; }
.hi-map-marker--family,
.hi-map-legend__marker--family { --hi-marker-color: #c76b00; }
.hi-map-marker--playground,
.hi-map-legend__marker--playground { --hi-marker-color: #d36c34; }
.hi-map-marker--indoor,
.hi-map-legend__marker--indoor { --hi-marker-color: #515b66; }
.hi-map-marker--viewpoint,
.hi-map-legend__marker--viewpoint { --hi-marker-color: #b3446c; }
.hi-map-marker--landmark,
.hi-map-legend__marker--landmark { --hi-marker-color: #0b7a75; }
.hi-map-marker--default,
.hi-map-legend__marker--default { --hi-marker-color: #3e6877; }

.hi-map-marker--cluster {
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border-radius: 50%;
	rotate: 0deg;
	font-weight: 800;
	background: var(--wp--preset--color--petrol-dark, #075e5a);
}

.hi-map-controls {
	position: absolute;
	left: 12px;
	top: 12px;
	z-index: 10;
	display: grid;
	gap: 4px;
}

.hi-map-control {
	width: 40px;
	height: 40px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	background: #fff;
	font: 700 1.4rem/1 sans-serif;
	cursor: pointer;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
}

.hi-map-attribution {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 10;
	max-width: calc(100% - 1rem);
	padding: 3px 7px;
	background: rgba(255, 255, 255, 0.88);
	font-size: 11px;
	line-height: 1.3;
}

.hi-map-popup {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 12;
	width: min(330px, calc(100vw - 48px));
	margin: 0 0 18px 0;
	padding: 0.85rem;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 5px 24px rgba(0, 0, 0, 0.28);
	transform-origin: left bottom;
	translate: -50% -100%;
	pointer-events: auto;
}

.hi-map-popup::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -9px;
	width: 18px;
	height: 18px;
	background: #fff;
	transform: translateX(-50%) rotate(45deg);
}

.hi-map-popup img {
	display: block;
	width: 100%;
	max-height: 130px;
	margin-bottom: 0.65rem;
	border-radius: 8px;
	object-fit: cover;
}

.hi-map-popup__title,
.hi-map-popup__address,
.hi-map-popup__contact,
.hi-map-popup__opening,
.hi-map-popup__link {
	display: block;
}

.hi-map-popup__address {
	margin-top: 0.3rem;
	font-size: 0.9rem;
}

.hi-map-popup__contact {
	margin-top: 0.35rem;
	font-size: 0.86rem;
	font-weight: 650;
	overflow-wrap: anywhere;
}

.hi-map-popup__opening {
	margin-top: 0.55rem;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(10, 48, 63, 0.12);
	font-size: 0.78rem;
	line-height: 1.4;
	white-space: pre-line;
}

.hi-map-popup__link {
	margin-top: 0.65rem;
	font-weight: 700;
}

@media (min-width: 861px) {
	.hi-map,
	.hi-map-canvas {
		min-height: max(var(--hi-map-height, 420px), 620px);
	}
}

.hi-map-popup__close {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 2;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	font-size: 1.25rem;
	cursor: pointer;
}

.hi-map-route {
	margin-top: 0.75rem;
}

.hi-map-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.9rem;
	margin: 0.8rem 0 1rem;
}

.hi-map-legend:empty {
	display: none;
}

.hi-map-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem;
	line-height: 1.25;
}

.hi-map-legend__marker {
	--hi-marker-color: #3e6877;
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 1.55rem;
	height: 1.55rem;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
	background: var(--hi-marker-color);
	color: #fff;
	font: 800 0.68rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hi-map-filters {
	display: grid;
	grid-template-columns: auto minmax(180px, 1fr) auto minmax(180px, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.hi-map-filters select {
	min-height: 44px;
	padding-inline: 0.65rem;
	border: 1px solid rgba(10, 48, 63, 0.24);
	border-radius: 8px;
	background: #fff;
	font: inherit;
}

.hi-map-count {
	margin-block: 1.25rem 0.75rem;
	font-weight: 700;
}

.hi-map-results {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.hi-map-result {
	overflow: hidden;
	border: 1px solid rgba(10, 48, 63, 0.14);
	border-radius: 12px;
	background: #fff;
}

.hi-map-result img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.hi-map-result__body {
	padding: 1rem;
}

.hi-map-result__title {
	margin: 0;
	font-size: 1.15rem;
}

.hi-map-result__meta,
.hi-map-result__excerpt {
	margin: 0.55rem 0 0;
}

.hi-map-result__meta {
	font-size: 0.85rem;
	font-weight: 700;
}

.hi-map-result__excerpt {
	font-size: 0.74rem;
	line-height: 1.42;
	color: #536672;
}

.hi-map-admin-note,
.hi-map-error,
.hi-map-empty {
	padding: 1rem;
	border-left: 4px solid #b26a00;
	background: #fff7e8;
}

@media (max-width: 860px) {
	.hi-map-filters {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.hi-map-filters label {
		margin-bottom: -0.45rem;
	}

	.hi-map-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.hi-map {
		min-height: min(var(--hi-map-height, 420px), 70vh);
	}

	.hi-map-canvas {
		min-height: min(var(--hi-map-height, 420px), 70vh);
	}

	.hi-map-results {
		grid-template-columns: 1fr;
	}
}

/* 0.5.9: gemeinsame Portal-Karte für Freizeit und Service. */
.hi-map-overview--portal {
	margin-block: 1.5rem 3rem;
}

.hi-map-overview__header {
	max-width: 52rem;
	margin-bottom: 1.25rem;
}

.hi-map-overview__header h1 {
	margin: 0.15rem 0 0.55rem;
}

.hi-map-overview__eyebrow {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--petrol-dark, #073b4c);
}

.hi-map-portal-controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(15rem, .55fr) auto auto;
	gap: 1rem;
	align-items: end;
	margin: 1.25rem 0 1rem;
}

.hi-map-icon-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.hi-map-icon-filter {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 42px;
	padding: 0.55rem 0.78rem;
	border: 1px solid rgba(10, 48, 63, 0.2);
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--navy, #0a303f);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.hi-map-icon-filter:hover,
.hi-map-icon-filter:focus-visible {
	border-color: var(--wp--preset--color--petrol, #0c6b78);
	box-shadow: 0 3px 12px rgba(7, 59, 76, 0.12);
	transform: translateY(-1px);
}

.hi-map-icon-filter.is-active {
	border-color: var(--wp--preset--color--petrol-dark, #073b4c);
	background: var(--wp--preset--color--petrol-dark, #073b4c);
	color: #fff;
}

.hi-map-filter-icon {
	display: inline-grid;
	place-items: center;
	width: 1.2rem;
	height: 1.2rem;
	flex: 0 0 auto;
}

.hi-map-filter-icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hi-map-filter-icon svg path:first-child:last-child,
.hi-map-icon-filter[data-hi-map-filter-key="all"] .hi-map-filter-icon svg path {
	fill: currentColor;
	stroke: none;
}

.hi-map-search-filter,
.hi-map-place-filter {
	display: grid;
	gap: 0.3rem;
	min-width: 13rem;
}

.hi-map-search-filter label,
.hi-map-place-filter label {
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hi-map-search-filter input,
.hi-map-place-filter select {
	min-height: 44px;
	padding: 0.55rem 0.7rem;
	border: 1px solid rgba(10, 48, 63, 0.24);
	border-radius: 9px;
	background: #fff;
	font: inherit;
}
.hi-map-place-filter select { padding-right: 2rem; }

.hi-map-marker--gastro-restaurant,
.hi-map-legend__marker--gastro-restaurant { --hi-marker-color: #b25f3d; }
.hi-map-marker--gastro-cafe,
.hi-map-legend__marker--gastro-cafe { --hi-marker-color: #9a7042; }
.hi-map-marker--gastro-bakery,
.hi-map-legend__marker--gastro-bakery { --hi-marker-color: #b88437; }
.hi-map-marker--gastro-snack,
.hi-map-legend__marker--gastro-snack { --hi-marker-color: #c26e31; }
.hi-map-marker--gastro-bar,
.hi-map-legend__marker--gastro-bar { --hi-marker-color: #7f557f; }
.hi-map-marker--gastro-icecream,
.hi-map-legend__marker--gastro-icecream { --hi-marker-color: #b45c8a; }
.hi-map-marker--gastro-default,
.hi-map-legend__marker--gastro-default { --hi-marker-color: #a75b3f; }

.hi-map-marker--service-parking,
.hi-map-legend__marker--service-parking { --hi-marker-color: #65539a; }
.hi-map-marker--service-accessible-parking,
.hi-map-legend__marker--service-accessible-parking { --hi-marker-color: #245ea8; }
.hi-map-marker--service-authorities,
.hi-map-legend__marker--service-authorities { --hi-marker-color: #176d68; }
.hi-map-marker--service-mobility,
.hi-map-legend__marker--service-mobility { --hi-marker-color: #356f9a; }
.hi-map-marker--service-family,
.hi-map-legend__marker--service-family { --hi-marker-color: #a56f18; }
.hi-map-marker--service-health,
.hi-map-legend__marker--service-health { --hi-marker-color: #2f7a55; }
.hi-map-marker--service-emergency,
.hi-map-legend__marker--service-emergency { --hi-marker-color: #a12f36; }
.hi-map-marker--service-waste,
.hi-map-legend__marker--service-waste { --hi-marker-color: #587548; }
.hi-map-marker--service-markets,
.hi-map-legend__marker--service-markets { --hi-marker-color: #a2662a; }
.hi-map-marker--service-public,
.hi-map-legend__marker--service-public,
.hi-map-marker--service-default,
.hi-map-legend__marker--service-default { --hi-marker-color: #486a76; }

@media (max-width: 980px) {
	.hi-map-portal-controls {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.hi-map-search-filter,
	.hi-map-place-filter {
		min-width: 0;
		max-width: 24rem;
	}

	.hi-map-portal-controls .hi-map-filter-reset {
		justify-self: start;
	}
}

@media (max-width: 560px) {
	.hi-map-icon-filters {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hi-map-icon-filter {
		justify-content: flex-start;
		border-radius: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hi-map-icon-filter {
		transition: none;
	}
}

/* 0.5.10: kompakte Filter, Einfluganimation, Spiderfy und ausschnittsbezogene Ergebnisliste. */
.hi-map-spider {
	position: absolute;
	inset: 0;
	z-index: 7;
	pointer-events: none;
}

.hi-map-spider__line {
	position: absolute;
	display: block;
	height: 2px;
	background: rgba(7, 59, 76, 0.5);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
	transform-origin: 0 50%;
	pointer-events: none;
}

.hi-map-marker--spider {
	z-index: 8;
	width: 31px;
	height: 31px;
	margin: -27px 0 0 -15.5px;
	animation: hi-map-spider-pop 180ms cubic-bezier(.2,.8,.2,1) both;
}

.hi-map-icon-filters {
	gap: 0.34rem;
}

.hi-map-icon-filter {
	min-height: 34px;
	gap: 0.32rem;
	padding: 0.36rem 0.58rem;
	font-size: 0.79rem;
	white-space: nowrap;
	animation: hi-map-filter-fly-in 420ms cubic-bezier(.2,.78,.22,1) both;
}

.hi-map-filter-icon {
	width: 0.98rem;
	height: 0.98rem;
}

.hi-map-icon-filter:nth-child(1) { animation-delay: 20ms; }
.hi-map-icon-filter:nth-child(2) { animation-delay: 55ms; }
.hi-map-icon-filter:nth-child(3) { animation-delay: 90ms; }
.hi-map-icon-filter:nth-child(4) { animation-delay: 125ms; }
.hi-map-icon-filter:nth-child(5) { animation-delay: 160ms; }
.hi-map-icon-filter:nth-child(6) { animation-delay: 195ms; }
.hi-map-icon-filter:nth-child(7) { animation-delay: 230ms; }
.hi-map-icon-filter:nth-child(8) { animation-delay: 265ms; }
.hi-map-icon-filter:nth-child(9) { animation-delay: 300ms; }
.hi-map-icon-filter:nth-child(10) { animation-delay: 335ms; }

@keyframes hi-map-filter-fly-in {
	0% {
		opacity: 0;
		transform: translate3d(-14px, -7px, 0) scale(.96);
	}
	70% {
		opacity: 1;
		transform: translate3d(2px, 0, 0) scale(1.01);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

@keyframes hi-map-spider-pop {
	from { opacity: 0; scale: .75; }
	to { opacity: 1; scale: 1; }
}

@media (max-width: 560px) {
	.hi-map-icon-filters {
		display: flex;
		flex-wrap: wrap;
		gap: 0.32rem;
	}

	.hi-map-icon-filter {
		justify-content: center;
		border-radius: 999px;
		padding-inline: 0.52rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hi-map-icon-filter,
	.hi-map-marker--spider {
		animation: none;
	}
}

.hi-map-marker--place-default,
.hi-map-legend__marker--place-default { --hi-marker-color: #486a72; }

/* 0.5.31 – sichtbarer Kartenstatus auch bei ausgeblendeter Ergebnisliste. */
.hi-map-status {
	margin: .65rem 0 0;
	font-size: .78rem;
	line-height: 1.4;
	color: #52656c;
}
.hi-map-status.is-empty {
	padding: .65rem .8rem;
	border-radius: 10px;
	background: #f5f7f7;
}
.hi-map-marker--event,
.hi-map-legend__marker--event { --hi-marker-color: #6b4f9b; }

.hi-map-marker--sport,
.hi-map-legend__marker--sport { --hi-marker-color: #476b55; }

/* 0.5.40 – marker pictograms instead of category letters. */
.hi-map-marker__icon svg,
.hi-map-legend__marker svg {
	display: block;
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.hi-map-legend__marker svg {
	width: 13px;
	height: 13px;
}

.hi-map-marker--place-station,
.hi-map-legend__marker--place-station,
.hi-map-marker--place-driving-school,
.hi-map-legend__marker--place-driving-school { --hi-marker-color: #315f7d; }

.hi-map-marker--place-charging,
.hi-map-legend__marker--place-charging { --hi-marker-color: #26755b; }

.hi-map-marker--place-doctor,
.hi-map-legend__marker--place-doctor,
.hi-map-marker--place-clinic,
.hi-map-legend__marker--place-clinic,
.hi-map-marker--place-pharmacy,
.hi-map-legend__marker--place-pharmacy { --hi-marker-color: #477857; }

.hi-map-marker--place-club,
.hi-map-legend__marker--place-club,
.hi-map-marker--place-martial-arts,
.hi-map-legend__marker--place-martial-arts { --hi-marker-color: #8a5d32; }

/* 0.5.93 – Feuerwehr, Hilfsorganisationen und Vereinsarten. */
.hi-map-marker--place-fire-station,
.hi-map-legend__marker--place-fire-station { --hi-marker-color: #a12f36; }
.hi-map-marker--place-aid-org,
.hi-map-legend__marker--place-aid-org { --hi-marker-color: #b0444d; }
.hi-map-marker--place-rescue-dog,
.hi-map-legend__marker--place-rescue-dog { --hi-marker-color: #765c42; }
.hi-map-marker--place-club-sport,
.hi-map-legend__marker--place-club-sport { --hi-marker-color: #476b55; }
.hi-map-marker--place-club-music,
.hi-map-legend__marker--place-club-music { --hi-marker-color: #765b8d; }
.hi-map-marker--place-club-culture,
.hi-map-legend__marker--place-club-culture { --hi-marker-color: #88654a; }
.hi-map-marker--place-club-social,
.hi-map-legend__marker--place-club-social { --hi-marker-color: #9a5668; }
.hi-map-marker--place-club-nature,
.hi-map-legend__marker--place-club-nature { --hi-marker-color: #55724b; }

.hi-map-marker--place-cobbler,
.hi-map-legend__marker--place-cobbler,
.hi-map-marker--place-insurance,
.hi-map-legend__marker--place-insurance,
.hi-map-marker--place-party,
.hi-map-legend__marker--place-party { --hi-marker-color: #586978; }


/* 0.5.84 – Banken: klarer Geldschein-Marker. */
.hi-map-marker--place-bank,
.hi-map-legend__marker--place-bank { --hi-marker-color: #2f6f4e; }
.hi-map-marker--place-bank .hi-map-marker__icon svg { width: 19px; height: 19px; stroke-width: 2.1; }
.hi-map-legend__marker--place-bank svg { width: 14px; height: 14px; stroke-width: 2.1; }


/* 0.5.86 – auf Portal-Karten mit Themenfiltern sind die Filterchips zugleich
   Piktogramm-Legende; eine zweite dynamische Legendenzeile wird dort nicht ausgegeben. */
.hi-map-overview--portal .hi-map-icon-filter {
	white-space: nowrap;
}

/* 0.5.89 – Kartenlegende direkt in der Karte und pastellfarbene Themenauswahl. */
.hi-map-legend--overlay {
	position: absolute;
	top: .75rem;
	right: .75rem;
	z-index: 12;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .38rem;
	max-width: min(17rem, 42%);
	max-height: 46%;
	overflow: auto;
	margin: 0;
	padding: .6rem .7rem;
	border: 1px solid rgba(10,48,63,.16);
	border-radius: 12px;
	background: rgba(255,255,255,.94);
	box-shadow: 0 5px 18px rgba(4,25,39,.16);
	backdrop-filter: blur(4px);
}
.hi-map-legend--overlay .hi-map-legend__item { font-size: .74rem; }
.hi-map-legend--overlay .hi-map-legend__marker { width: 1.35rem; height: 1.35rem; }
.hi-map-consent ~ .hi-map-legend--overlay { pointer-events: none; }

.hi-map-icon-filter { border-color: rgba(30,72,80,.16); }
.hi-map-icon-filter[data-hi-map-filter-key="all"] { background:#f2f5f6; }
.hi-map-icon-filter[data-hi-map-filter-key="destinations"] { background:#fff0da; }
.hi-map-icon-filter[data-hi-map-filter-key="gastronomy"] { background:#fff1e7; }
.hi-map-icon-filter[data-hi-map-filter-key="places"] { background:#edf4f6; }
.hi-map-icon-filter[data-hi-map-filter-key="parking"],
.hi-map-icon-filter[data-hi-map-filter-key="accessible-parking"] { background:#eeeafd; }
.hi-map-icon-filter[data-hi-map-filter-key="authorities"] { background:#e7f4f1; }
.hi-map-icon-filter[data-hi-map-filter-key="mobility"],
.hi-map-icon-filter[data-hi-map-filter-key="bus-stops"],
.hi-map-icon-filter[data-hi-map-filter-key="rail-stops"] { background:#e8f2fb; }
.hi-map-icon-filter[data-hi-map-filter-key="family"] { background:#fff4cf; }
.hi-map-icon-filter[data-hi-map-filter-key="health"] { background:#e9f5eb; }
.hi-map-icon-filter[data-hi-map-filter-key="emergency"] { background:#fdeaea; }
.hi-map-icon-filter[data-hi-map-filter-key="waste"] { background:#eef4e7; }
.hi-map-icon-filter[data-hi-map-filter-key="markets"] { background:#f8eee4; }
.hi-map-icon-filter.is-active {
	box-shadow: 0 0 0 2px rgba(15,118,110,.18), 0 3px 10px rgba(4,25,39,.08);
}

@media (max-width: 700px) {
	.hi-map-legend--overlay {
		top: .5rem;
		right: .5rem;
		max-width: min(15rem, 58%);
		max-height: 38%;
		padding: .48rem .55rem;
	}
	.hi-map-legend--overlay .hi-map-legend__item { font-size: .68rem; }
}

/* 0.5.113: transparent municipality-level fallback for clubs without exact coordinates. */
.hi-map-popup__location-notice {
	display: block;
	margin-top: .45rem;
	padding: .42rem .5rem;
	border-radius: 7px;
	background: #fff7df;
	color: #665318;
	font-size: .76rem;
	line-height: 1.4;
}


/* 0.5.763 – dynamische Trefferzahlen und mobile, einklappbare Kartenlegende. */
.hi-map-portal-count {
	margin: 0 0 .7rem;
	font-weight: 800;
	color: #173844;
}
.hi-map-icon-filter {
	position: relative;
}
.hi-map-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	margin-left: .35rem;
	padding: .08rem .38rem;
	border-radius: 999px;
	background: rgba(255,255,255,.82);
	color: #24434c;
	font-size: .72rem;
	font-weight: 800;
	line-height: 1.25;
}
.hi-map-legend-toggle {
	display: none;
}
@media (max-width: 700px) {
	.hi-map-legend-toggle {
		position: absolute;
		top: .5rem;
		right: .5rem;
		z-index: 13;
		display: inline-flex;
		align-items: center;
		min-height: 2.35rem;
		padding: .45rem .7rem;
		border: 1px solid rgba(10,48,63,.18);
		border-radius: 999px;
		background: rgba(255,255,255,.96);
		box-shadow: 0 4px 14px rgba(4,25,39,.14);
		color: #173844;
		font: inherit;
		font-size: .78rem;
		font-weight: 800;
		cursor: pointer;
	}
	.hi-map-legend-toggle::after {
		content: '▾';
		margin-left: .35rem;
	}
	.hi-map-legend-toggle.is-open::after { content: '▴'; }
	.hi-map-legend--overlay {
		display: none;
		top: 3.25rem;
		right: .5rem;
		max-width: min(18rem, calc(100% - 1rem));
		max-height: 52%;
	}
	.hi-map-legend--overlay.is-open { display: flex; }
	.hi-map-filter-count {
		min-width: 1.6rem;
		padding: .06rem .32rem;
		font-size: .68rem;
	}
}

/* 0.5.764 – Desktop-Layout der Kartenfilter nach Trefferzahlen korrigiert. */
@media (min-width: 981px) {
	.hi-map-portal-controls .hi-map-portal-count {
		grid-column: 1 / -1;
		margin-bottom: -.15rem;
	}
}


/* 0.5.765 – Themenauswahl auf Desktop über die volle Kartenbreite verteilen. */
@media (min-width: 981px) {
	.hi-map-portal-controls .hi-map-icon-filters {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: .55rem;
		width: 100%;
	}
	.hi-map-portal-controls .hi-map-icon-filter {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}
@media (min-width: 981px) and (max-width: 1199px) {
	.hi-map-portal-controls .hi-map-icon-filters {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
