.tbp-filter-wrapper form#tbp-filter-form .tbp-field.mappa {
	width: auto;
	margin: 0 0 0 12px;
	background-color: transparent;
	border-radius: 0;
	padding: 0;
}
.tbp-filter-wrapper form#tbp-filter-form .tbp-field.mappa .tbp-toggle-mappa-btn {
	margin: 0;
	padding: 0;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	border: 0;
	background: transparent;
	color: #084828;
	font-weight: 500;
	font-size: inherit;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
}
.tbp-filter-wrapper
	form#tbp-filter-form
	.tbp-field.mappa
	.tbp-toggle-mappa-btn
	> svg {
	margin: 0;
	margin-left: 5px;
	border-radius: 100px;
	background-color: #084828;
	padding: 13px 15px;
	width: 48px;
	height: 48px;
	box-sizing: border-box;
	display: block;
}
.tbp-filter-wrapper
	form#tbp-filter-form
	.tbp-field.mappa
	.tbp-toggle-mappa-btn:hover
	> svg,
.tbp-filter-wrapper
	form#tbp-filter-form
	.tbp-field.mappa
	.tbp-toggle-mappa-btn.is-active
	> svg {
	background-color: #084828;
}
.tbp-filter-wrapper
	form#tbp-filter-form
	.tbp-field.mappa
	.tbp-toggle-mappa-btn:hover
	> svg
	path,
.tbp-filter-wrapper
	form#tbp-filter-form
	.tbp-field.mappa
	.tbp-toggle-mappa-btn.is-active
	> svg
	path {
	fill: #084828;
}
#tbp-map-wrapper.tbp-map-wrapper--page {
	width: 100%;
	max-width: none;
	margin: 0;
	border-radius: 0;
}
#tbp-map-wrapper.tbp-map-wrapper--page .tbp-map-frame,
#tbp-map-wrapper.tbp-map-wrapper--page #tbp-map-esperienze {
	border-radius: 0;
	min-height: 70dvh;
}
#tbp-map-wrapper.tbp-map-wrapper {
	--tbp-map-radius: 16px;
	--tbp-map-brown: #084828;
	--tbp-map-yellow: #D0161A;
	--tbp-map-beige: #F4F7F5;
	margin-top: 12px;
	margin-bottom: 20px;
	position: relative;
	overflow: visible;
	width: calc(100% - 16px);
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}
#tbp-map-wrapper.tbp-map-wrapper.tbp-map-wrapper--page {
	width: 100%;
	max-width: none;
	margin: 0;
	border-radius: 0;
	overflow: hidden;
}
#tbp-map-wrapper.tbp-map-wrapper.tbp-map-wrapper--page .tbp-map-frame,
#tbp-map-wrapper.tbp-map-wrapper.tbp-map-wrapper--page #tbp-map-esperienze {
	width: 100%;
	max-width: none;
	border-radius: 0;
	min-height: calc(100dvh - 220px);
	height: calc(100dvh - 220px);
}
.tbp-map-head {
	margin: 8px 6px 8px;
}
.tbp-map-frame {
	position: relative;
	overflow: hidden;
}
.tbp-map-frame,
#tbp-map-esperienze.leaflet-container,
#tbp-map-esperienze .leaflet-container {
	background: #f2efe9 !important;
}
#tbp-map-esperienze .leaflet-tile-pane {
	filter: none;
	opacity: 1;
}
#tbp-map-esperienze .leaflet-tile-pane::after {
	content: none !important;
	display: none !important;
}
/* Il tema forza img{max-width:100%}: Leaflet lascia fessure bianche a croce. */
#tbp-map-esperienze img.leaflet-tile,
#tbp-map-esperienze .leaflet-tile,
#tbp-map-esperienze .leaflet-tile-container img {
	max-width: none !important;
	max-height: none !important;
	width: 256px !important;
	height: 256px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	image-rendering: auto;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
#tbp-map-esperienze .leaflet-overlay-pane {
	z-index: 420 !important;
}
#tbp-map-esperienze .leaflet-marker-pane,
#tbp-map-esperienze .leaflet-shadow-pane {
	z-index: 650 !important;
}
#tbp-map-esperienze .leaflet-popup-pane {
	z-index: 700 !important;
}
/* Leaflet owns marker opacity during cluster/spiderfy transitions. */
#tbp-map-esperienze .marker-cluster,
#tbp-map-esperienze .marker-cluster div {
	background: rgba(208, 22, 26, 0.96) !important;
}
/* Leaflet owns pinch/pan inside the canvas. Browser page gestures remain
   available outside it; do not let two zoom handlers fight over one pinch. */
#tbp-map-esperienze.leaflet-container,
#tbp-map-esperienze .leaflet-tile-pane {
	touch-action: none !important;
}
#tbp-map-esperienze.leaflet-container.tbp-map-two-finger,
#tbp-map-esperienze.tbp-map-two-finger .leaflet-tile-pane,
#tbp-map-esperienze.tbp-map-two-finger .leaflet-map-pane,
#tbp-map-esperienze.tbp-map-two-finger .leaflet-marker-pane,
#tbp-map-esperienze.tbp-map-two-finger .leaflet-overlay-pane,
#tbp-map-esperienze.tbp-map-two-finger .leaflet-popup-pane,
.tbp-map-frame.tbp-map-two-finger #tbp-map-esperienze.leaflet-container {
	touch-action: none !important;
}
#tbp-map-esperienze .leaflet-cluster-spider-leg {
	display: none !important;
}
#tbp-map-esperienze .leaflet-marker-icon,
#tbp-map-esperienze .leaflet-interactive {
	pointer-events: auto !important;
}
.tbp-map-area-actions {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 9999 !important;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	width: auto;
	max-width: min(220px, calc(100% - 72px));
	pointer-events: none;
	isolation: isolate;
}
.tbp-map-search-area-btn {
	position: static;
	top: auto;
	right: auto;
	z-index: auto;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid rgba(8, 72, 40, 0.16) !important;
	border-radius: 100px;
	background: #fff !important;
	color: #084828 !important;
	mix-blend-mode: normal;
	font-weight: 800;
	font-size: 0.92rem;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(8, 72, 40, 0.12) !important;
	pointer-events: auto;
	width: auto;
	white-space: nowrap;
}
.tbp-map-search-area-btn:hover {
	filter: brightness(0.97);
}
.tbp-map-search-area-btn--empty {
	border-color: rgba(208, 22, 26, 0.4) !important;
	color: #D0161A !important;
}
.tbp-map-search-area-btn[hidden] {
	display: none !important;
}
.tbp-map-count-box {
	display: none;
	margin: 0;
	padding: 8px 12px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(8, 72, 40, 0.14);
	pointer-events: none;
}
.tbp-map-count-box:has(#tbp-map-count:not([hidden]):not(:empty)) {
	display: inline-flex;
	align-items: center;
}
.tbp-map-count {
	margin: 0;
	padding: 0;
	color: #084828;
	font-weight: 800;
	font-size: 0.82rem;
	line-height: 1.2;
	text-align: center;
	text-shadow: none;
	white-space: nowrap;
}
.tbp-map-count[hidden] {
	display: none !important;
}
.tbp-map-frame {
	position: relative;
	border-radius: var(--tbp-map-radius);
	overflow: hidden;
	isolation: isolate;
	clip-path: inset(0 round var(--tbp-map-radius));
	background: #F4F7F5;
}
#tbp-map-esperienze .leaflet-control-attribution {
	opacity: 1;
	background: rgba(255, 255, 255, 0.82) !important;
	color: #666;
	font-size: 10px;
	line-height: 1.3;
	padding: 2px 6px;
	border-radius: 4px 0 0 0;
	max-width: min(70%, 280px);
}
#tbp-map-esperienze .leaflet-control-attribution a {
	color: #555;
}
#tbp-map-esperienze {
	width: 100%;
	height: 640px;
	min-height: 440px;
	z-index: 1;
}
#tbp-map-esperienze.leaflet-container {
	background: #F4F7F5;
	font-family: inherit;
}
.tbp-map-empty-msg {
	position: absolute;
	left: auto;
	right: 12px;
	top: 12px;
	transform: none;
	z-index: 5;
	margin: 0;
	padding: 8px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.94);
	color: #084828;
	font-weight: 650;
	font-size: 0.75rem;
	line-height: 1.3;
	text-align: left;
	max-width: min(168px, calc(100% - 72px));
	box-shadow: 0 8px 24px -12px rgba(8, 72, 40, 0.35);
	pointer-events: none;
}
.tbp-map-empty-msg[hidden] {
	display: none !important;
}

/* Pins & clusters */
.tbp-map-pin-wrap {
	background: transparent !important;
	border: none !important;
}
.tbp-map-pin {
	display: block;
	width: 32px;
	height: 42px;
	color: #D0161A;
	opacity: 1 !important;
	filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.38));
	transition: color 0.15s ease;
}
.tbp-map-pin.is-selected {
	color: #D0161A;
	transform: scale(1.14);
	filter: drop-shadow(0 4px 10px rgba(208, 22, 26, 0.55));
}
.tbp-map-pin.is-selected svg path {
	stroke: #084828;
	stroke-width: 1.2;
}
.tbp-map-cluster {
	background: #D0161A !important;
	border: 3px solid #ffffff !important;
	border-radius: 50% !important;
	color: #fff !important;
	font-weight: 800 !important;
	font-size: 15px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(208, 22, 26, 0.55) !important;
}
.tbp-map-cluster span {
	line-height: 1;
}

/* Popup card */
.leaflet-popup.tbp-map-popup .leaflet-popup-content-wrapper {
	padding: 0;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(43, 0, 1, 0.18);
	background: #fff;
}
.leaflet-popup.tbp-map-popup .leaflet-popup-content {
	margin: 0;
	width: 280px !important;
	line-height: 1.25;
}
.leaflet-popup.tbp-map-popup .leaflet-popup-content p {
	margin: 0;
}
.leaflet-popup.tbp-map-popup .leaflet-popup-tip {
	background: #fff;
}
.leaflet-popup.tbp-map-popup .leaflet-popup-close-button {
	top: 8px !important;
	right: 8px !important;
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--tbp-map-brown) !important;
	font-size: 18px !important;
	line-height: 28px !important;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.tbp-map-card {
	color: #084828;
	font-family: Manrope, "DM Sans", sans-serif;
}
.tbp-map-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f4f7f5;
}
.tbp-map-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tbp-map-card__media--empty {
	min-height: 120px;
}
.tbp-map-card__body {
	padding: 12px 14px 14px;
}
.tbp-map-card__body h3 {
	margin: 0;
	color: #084828;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.25;
}
.tbp-map-card__luogo,
.tbp-map-card__meta,
.tbp-map-card__price,
.tbp-map-card__maker {
	margin: 2px 0 0;
	padding: 0;
	font-size: 0.84rem;
	line-height: 1.3;
}
.tbp-map-card__luogo {
	opacity: 0.8;
}
.tbp-map-card__price {
	font-weight: 700;
}
.tbp-map-card__maker-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}
.tbp-map-card__portrait {
	position: relative;
	flex: 0 0 auto;
}
.tbp-map-card__avatar {
	display: block;
	width: 36px;
	height: 44px;
	border-radius: 8px;
	object-fit: cover;
	background: #f4f7f5;
}
.tbp-map-card__avatar--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #084828;
	font-weight: 800;
}
.tbp-map-card__verified {
	position: absolute;
	right: -4px;
	bottom: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #3a7a9a;
	color: #fff;
}
.tbp-map-card__verified svg {
	width: 10px;
	height: 10px;
}
.tbp-map-card__maker {
	font-weight: 650;
}
.tbp-map-card__meta {
	margin-top: 6px;
	color: rgba(8, 72, 40, 0.72);
}
.tbp-map-card__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 999px;
	background: #084828;
	color: #fff !important;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none !important;
	box-sizing: border-box;
}

/* ── Scheda del pin: la card del Feed, piu' piccola (Elind 11/9) ──
   Stessa card, stessa struttura (video che parte da solo, professionista,
   etichette, luogo, Acquista), rimpicciolita con zoom: le proporzioni
   restano quelle del Feed. Il popup non ha fondo: la card e' la scheda. */
.leaflet-popup.tbp-map-preview .leaflet-popup-content-wrapper {
	padding: 0;
	border: 0;
	border-radius: 22px;
	overflow: visible;
	background: transparent;
	box-shadow: none;
}
.leaflet-popup.tbp-map-preview .leaflet-popup-content {
	margin: 0;
	width: auto !important;
	line-height: normal;
}
.leaflet-popup.tbp-map-preview .leaflet-popup-tip {
	background: #111;
	box-shadow: none;
}
.tbp-map-feedcard {
	width: min(88vw, 360px);
	max-width: 88vw;
	zoom: 1;
}
.tbp-map-feedcard .tbp-exp-card {
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32) !important;
}
.tbp-map-feedcard__loading {
	width: 100%;
	aspect-ratio: 3 / 5;
	border-radius: 22px;
	background: linear-gradient(110deg, #1c1c1c 30%, #2c2c2c 50%, #1c1c1c 70%);
	background-size: 200% 100%;
	animation: tbp-map-feedcard-shimmer 1.2s linear infinite;
}
@keyframes tbp-map-feedcard-shimmer {
	to { background-position: -200% 0; }
}
.tbp-map-feedcard__fallback {
	display: block;
	padding: 18px;
	border-radius: 22px;
	background: #fff;
	color: #084828 !important;
	font: 800 17px/1.3 Manrope, "DM Sans", sans-serif;
	text-decoration: none !important;
}
/* Outside AND above the progress border. Keep a 44px hit target even when
   the card is scaled with map zoom; the control itself is never scaled. */
.leaflet-popup.tbp-map-preview .leaflet-popup-close-button {
	top: -52px !important;
	right: 0 !important;
	z-index: 5;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	color: #505b56 !important;
	font-size: 26px !important;
	line-height: 44px !important;
	text-align: center;
}
/* Scheda spostata (sotto il pin, o di lato per non sborderare): niente punta. */
.leaflet-popup.tbp-map-preview.tbp-map-preview--below .leaflet-popup-tip-container,
.leaflet-popup.tbp-map-preview.tbp-map-preview--shifted .leaflet-popup-tip-container {
	display: none;
}
@media (prefers-reduced-motion: reduce) {
	.tbp-map-feedcard__loading {
		animation: none;
	}
}

/* The decorative count must not cover the preview close button. Keep Search
 * usable even if an open preview is panned offscreen; no stacking override. */
#tbp-map-wrapper .tbp-map-frame:has(.leaflet-popup.tbp-map-preview) > .tbp-map-area-actions .tbp-map-count-box {
	visibility: hidden;
	pointer-events: none;
}

/* Bottom sheet mobile: unused. Pin opens a mini preview instead. */
.tbp-map-sheet,
.tbp-map-sheet.is-open,
.tbp-map-sheet[hidden] {
	display: none !important;
}
body.tbp-map-mode #tbp-results-container.tbp-results-under-map {
	margin-top: 24px;
}
#tbp-results-container .card-esperienza.tbp-map-out-of-area {
	display: none !important;
}

@media (max-width: 767px) {
	#tbp-map-esperienze {
		height: 58vh;
		min-height: 320px;
		max-height: 560px;
	}
	.tbp-map-area-actions {
		top: 10px;
		right: 10px;
		gap: 4px;
	}
	.tbp-map-search-area-btn {
		left: auto;
		right: auto;
		top: auto;
		width: auto;
		max-width: 100%;
		padding: 8px 14px;
		font-size: 0.82rem;
		white-space: nowrap;
	}
	.tbp-map-count {
		font-size: 0.78rem;
	}
	.leaflet-popup.tbp-map-popup {
		display: none !important;
	}
}

.tbp-map-infowindow {
	min-width: 180px;
	max-width: 240px;
	color: #084828;
}
.tbp-map-infowindow h4 {
	margin: 0 0 6px;
	font-size: 1rem;
	line-height: 1.2;
}
.tbp-map-infowindow p {
	margin: 0 0 6px;
	font-size: 0.9rem;
}
.tbp-map-infowindow a {
	display: inline-block;
	margin-top: 4px;
	font-weight: 600;
	color: #084828;
	text-decoration: underline;
}
.tbp-filter-wrapper form#tbp-filter-form .tbp-field.ordina select {
	margin: 0;
	border-radius: 100px;
	border: solid 1px #084828;
	background-color: transparent;
	color: #084828;
}

/* --------------------------------------------------------------------- *
 * Mappa a schermo intero.
 * --------------------------------------------------------------------- */

html body .tbp-map-frame .tbp-map-fullscreen-btn {
	position: absolute;
	top: auto;
	left: 12px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	right: auto;
	z-index: 900;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 16px 0 12px;
	border: 0;
	border-radius: 999px;
	background: rgb(255 255 255 / 96%) !important;
	box-shadow: 0 2px 10px rgb(8 72 40 / 22%);
	color: #084828 !important;
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
html body .tbp-map-frame .tbp-map-fullscreen-btn:hover {
	background: #fff !important;
}
html body .tbp-map-frame .tbp-map-fullscreen-btn:focus-visible {
	outline: 2px solid #084828;
	outline-offset: 2px;
}
/* L'etichetta si legge: «Schermo Intero» e, una volta dentro, «Esci». */
html body .tbp-map-frame .tbp-map-fullscreen-btn__text {
	font-family: Manrope, "DM Sans", sans-serif;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

/* Hide Leaflet’s duplicate controls; accessible buttons sit above fullscreen. */
html body .tbp-map-frame .leaflet-control-zoom,
html body .leaflet-container .leaflet-control-zoom {
	display: none !important;
}
html body .tbp-map-frame .tbp-map-fullscreen-btn__icon {
	display: block;
	width: 18px;
	height: 18px;
	border: 2.5px solid currentColor;
	border-radius: 4px;
	-webkit-mask-image: linear-gradient(to right, #000 0 32%, transparent 32% 68%, #000 68% 100%), linear-gradient(to bottom, #000 0 32%, transparent 32% 68%, #000 68% 100%);
	mask-image: linear-gradient(to right, #000 0 32%, transparent 32% 68%, #000 68% 100%), linear-gradient(to bottom, #000 0 32%, transparent 32% 68%, #000 68% 100%);
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}
/* Enter and exit share the lower-left corner, clear of the safe area. */
html body .tbp-map-frame.is-fullscreen .tbp-map-fullscreen-btn {
	top: auto;
	left: 12px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	right: auto;
}

.tbp-map-frame.is-fullscreen {
	position: fixed !important;
	inset: 0 !important;
	z-index: 100050 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	margin: 0 !important;
	border-radius: 0 !important;
}
.tbp-map-frame.is-fullscreen .leaflet-container {
	height: 100% !important;
}
body.tbp-map-fullscreen {
	overflow: hidden !important;
}
/* A schermo intero comanda la mappa: la barra dell'app e la sua nebbia
   si tolgono di mezzo, si rientra dal pulsante o con Esc. */
body.tbp-map-fullscreen .tbp-app-bar,
body.tbp-map-fullscreen .tbp-app-bar-veil {
	display: none !important;
}

/* --------------------------------------------------------------------- *
 * Scheda del pin: piu' larga, titolo su due righe intere, azione discreta.
 * --------------------------------------------------------------------- */

.tbp-map-card__body h3 {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 1.02rem;
	line-height: 1.28;
	overflow-wrap: anywhere;
}
.tbp-map-card__luogo {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.tbp-map-card__price {
	margin-top: 6px;
	font-size: 1.05rem;
	font-weight: 800;
}
.tbp-map-card__cta {
	min-height: 42px;
	margin-top: 14px;
	padding: 0 16px;
	font-size: 0.88rem;
}

/* -------------------------------------------------------------------- */
/* Colore dei pin per tipo e modalità (Elind, 12/9)                      */
/*                                                                        */
/* Verde: mestiere dal vivo. Rosso: esperienza dal vivo. Bianco con filo  */
/* d'oro: tutto quello che si fa online, dove il luogo non conta.         */
/* -------------------------------------------------------------------- */
.tbp-map-pin--mestiere {
	color: #0E5E3C;
}

.tbp-map-pin--mestiere.is-selected {
	color: #0E5E3C;
	filter: drop-shadow(0 4px 10px rgba(14, 94, 60, 0.55));
}

.tbp-map-pin--esperienza {
	color: #D0161A;
}

.tbp-map-pin--esperienza.is-selected {
	color: #D0161A;
	filter: drop-shadow(0 4px 10px rgba(208, 22, 26, 0.55));
}

/* Online: goccia bianca con il filo d'oro, così si stacca dalla mappa
   chiara senza urlare. */
.tbp-map-pin--online {
	color: #FFFFFF;
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.34));
}

.tbp-map-pin--online svg path {
	stroke: #C9962F;
	stroke-width: 1.6;
	paint-order: stroke fill;
}

.tbp-map-pin--online.is-selected {
	color: #FFFFFF;
	filter: drop-shadow(0 4px 10px rgba(201, 150, 47, 0.6));
}

.tbp-map-pin--online.is-selected svg path {
	stroke: #C9962F;
	stroke-width: 2.2;
}

/* Public offices: gold municipality icons, number-only clusters. */
.tbp-map-institution-pin,
.tbp-map-institution-cluster {
	color: #594309;
	background: linear-gradient(135deg, #fff2a0 0%, #ffcf19 45%, #bb8d1a 100%);
	border: 2px solid #fff5cb;
	border-radius: 14px;
	box-shadow: 0 3px 8px #503d1859, inset 0 1px 2px #fff9;
	box-sizing: border-box;
}
.tbp-map-institution-pin img { display: block; width: 36px; height: 36px; margin: 3px auto; object-fit: contain; }
.tbp-map-institution-cluster span { display: grid; place-items: center; width: 100%; height: 100%; }
.tbp-map-institution-cluster b { font-size: 24px; line-height: 1; font-weight: 800; }
.tbp-map-cluster--mixed { background: linear-gradient(90deg, #f4cd48 0%, #f4cd48 50%, #D0161A 50%, #D0161A 100%); color: white; }
.tbp-map-cluster--mixed b { text-shadow: 0 1px 3px #302000; }
#tbp-map-esperienze .tbp-map-cluster--expanded { visibility: hidden !important; pointer-events: none !important; }
.tbp-map-institution-pin:focus-visible,
.tbp-map-institution-cluster:focus-visible { outline: 3px solid #594309; outline-offset: 3px; }
.tbp-map-institution-card { padding: 8px 4px; color: #084828; }
.tbp-map-institution-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.tbp-map-institution-heading > div { flex: 1 1 145px; min-width: 0; }
.tbp-map-institution-card .tbp-map-institution-logo { display: block; flex: 0 0 72px; width: 72px; height: 64px; object-fit: contain; margin: 0; border: 0; border-radius: 0; }
.tbp-map-institution-card .tbp-map-institution-logo--wide { flex-basis: 190px; width: 190px; height: 52px; padding: 8px 10px; box-sizing: border-box; background: #084828; border-radius: 10px; }
.tbp-map-institution-card small { color: #786322; font-size: 12px; }
.tbp-map-institution-card h3 { margin: 6px 0 10px; font-size: 20px; line-height: 1.2; }
.tbp-map-institution-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.tbp-map-institution-card a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: #f5d357; color: #433407; font-weight: 700; }
.tbp-map-institution-card .tbp-map-institution-note { margin: 12px 0 0; font-size: 11px; color: #666; }

/* Activity symbols are archive-only: detail maps retain their location pin. */
#tbp-map-esperienze .tbp-map-pin-wrap .tbp-map-pin {
	width: 46px; height: 46px; box-sizing: border-box;
	display: grid; place-items: center; border: 2px solid #fff;
	border-radius: 14px; background: #D0161A; color: #fff;
	box-shadow: 0 3px 8px #14372840, inset 0 1px 2px #fff5;
	filter: none; transform: none;
}
#tbp-map-esperienze .tbp-map-pin-wrap .tbp-map-pin--mestiere { background: #0e5e3c; }
#tbp-map-esperienze .tbp-map-pin-wrap .tbp-map-pin--online { background: #fff; border-color: #c9962f; color: #084828; }
#tbp-map-esperienze .tbp-map-pin-wrap .tbp-map-pin.is-selected { outline: 3px solid #d2a625; outline-offset: 2px; }
#tbp-map-esperienze .tbp-map-pin-wrap .tbp-map-pin svg { width: 30px; height: 30px; }
#tbp-map-esperienze .tbp-map-pin-wrap .tbp-map-pin svg path { stroke: currentColor; stroke-width: 2.3; }
/* Legenda sempre aperta (30/9, CEO): niente bottone da aprire. Le quattro
   voci hanno le stesse icone dei segnaposti, poi la nota sui numeri. Sulla
   Home il tema la stringe in un angolo (computer) o in una fascia (telefono). */
#tbp-map-esperienze .tbp-map-legend {
	box-sizing: border-box; width: max-content; max-width: min(232px, calc(100vw - 32px));
	padding: 12px 14px; background: #fff; color: #084828; border: 1px solid #dce5df; border-radius: 14px;
	box-shadow: 0 3px 16px #1238241f;
	font-family: inherit; font-weight: 500; font-size: 13px; line-height: 1.35;
}
#tbp-map-esperienze .tbp-map-legend[hidden] { display: none; }
#tbp-map-esperienze .tbp-map-legend__voci { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#tbp-map-esperienze .tbp-map-legend__voci li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; line-height: 1.3; }
#tbp-map-esperienze .tbp-map-legend__nota { margin: 10px 0 0; padding: 0; font-size: 12px; line-height: 1.4; color: #3d5a4b; }
.tbp-map-legend-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; box-sizing: border-box; color: #fff; background: #D0161A; border: 2px solid transparent; }
.tbp-map-legend-icon svg { width: 20px; height: 20px; }
.tbp-map-legend-icon img { display: block; width: 20px; height: 20px; margin: 0; object-fit: contain; }
.tbp-map-legend-icon--mestiere { background: #0e5e3c; }
.tbp-map-legend-icon--institution { background: linear-gradient(135deg,#fff2a0,#ffcf19 45%,#bb8d1a); color: #594309; }
.tbp-map-legend-icon--online { background: #fff; color: #084828; border-color: #c9962f; }

/* One shared row for zoom, location, recenter and fullscreen. */
html body .tbp-map-frame .tbp-map-zoom {
  position: absolute; left: 12px; bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 900; display:grid; grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1fr) auto; gap:8px;
  width: min(540px, calc(100% - 24px));
}
html body .tbp-map-frame .tbp-map-zoom button {
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; min-width:44px; height:44px; min-height:44px;
  margin:0; padding:0; border-radius:14px;
  font:600 26px/1 Manrope,sans-serif; cursor:pointer;
}
html body .tbp-map-frame .tbp-map-zoom .tbp-map-locate,
html body .tbp-map-frame .tbp-map-zoom .tbp-map-reset {
  width:100%; padding:0 8px; min-width:0; max-width:none;
  font-size:13px; line-height:1.2; white-space:normal;
}
html body .tbp-map-frame .tbp-map-location-status {
  position:absolute; bottom:calc(100% + 8px); left:0;
  width:min(280px, calc(100vw - 48px)); box-sizing:border-box;
  padding:10px 12px; border-radius:12px;
  background:var(--tbp-night-surface, #fff); color:var(--tbp-night-text, #084828);
  border:1px solid var(--tbp-line, #c4d1c9); font:500 13px/1.4 Manrope,sans-serif;
  box-shadow:0 2px 10px rgb(8 72 40 / 15%);
}
html body .tbp-map-frame .tbp-map-location-status[hidden] { display:none; }
html body.tbp-home-map .tbp-home-map .tbp-map-zoom {
  bottom: calc(var(--tbp-app-bar-reserve, calc(16px + env(safe-area-inset-bottom, 0px))) + 52px);
}
@media (max-width:849px) {
  html body.tbp-home-map.tbp-app-bar-collapsed:not(.tbp-map-fullscreen) #tbp-home-map .tbp-map-zoom {
    bottom: calc(var(--tbp-app-bar-inset, 12px) + env(safe-area-inset-bottom, 0px) + 52px);
  }
}
html body.tbp-home-map.tbp-map-fullscreen .tbp-home-map .tbp-map-zoom {
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}
@layer tbp-appearance {
  .tbp-map-frame :is(.tbp-map-zoom button,.tbp-map-fullscreen-btn) {
    background:#fff !important; color:#084828 !important; border:1px solid #c4d1c9 !important;
    box-shadow:0 2px 10px rgb(8 72 40 / 15%) !important; text-shadow:none !important;
    -webkit-text-fill-color:currentColor !important;
  }
  html[data-tbp-theme="light"] .tbp-map-frame :is(.tbp-map-zoom button,.tbp-map-fullscreen-btn) { background:#faf9f5 !important; }
  html[data-tbp-theme="dark"] .tbp-map-frame :is(.tbp-map-zoom button,.tbp-map-fullscreen-btn) {
    background:#263630 !important; color:#edf3ed !important; border-color:#4a6256 !important;
  }
  .tbp-map-frame :is(.tbp-map-zoom button,.tbp-map-fullscreen-btn):focus-visible {
    outline:3px solid #b18a17 !important; outline-offset:3px !important;
  }
  .tbp-map-frame .tbp-map-zoom button:disabled { opacity:.5 !important; cursor:default; }
  html .tbp-map-frame .tbp-map-fullscreen-btn.is-on,
  html[data-tbp-theme] .tbp-map-frame .tbp-map-fullscreen-btn.is-on {
    background:#D0161A !important; color:#fff !important; border-color:#D0161A !important;
  }
  .tbp-map-frame .tbp-map-fullscreen-btn__text { color:inherit !important; }
}

/* The inverse country mask must also cover newly revealed corners during
   native zoom-out. Its world ring stays uncut; the map viewport clips it. */
#tbp-map-esperienze .leaflet-overlay-pane svg.tbp-country-mask-svg {
	overflow: visible;
}

/* Fullscreen uses the same row; its existing toggle handler stays unchanged. */
html body .tbp-map-frame .tbp-map-zoom .tbp-map-fullscreen-btn {
  position:static; width:auto; min-width:44px; max-width:none!important;
  padding:0 12px; font-size:13px; border-radius:14px; gap:6px;
}
html body .tbp-map-frame .tbp-map-zoom .tbp-map-fullscreen-btn__text { font-size:13px; }
@media(max-width:600px) {
  html body .tbp-map-frame .tbp-map-zoom { grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1.2fr) 44px; gap:4px; }
  html body .tbp-map-frame .tbp-map-zoom :is(.tbp-map-locate,.tbp-map-reset) { font-size:12px; padding:0 4px; }
  html body .tbp-map-frame .tbp-map-zoom .tbp-map-fullscreen-btn { width:44px; padding:0; }
  html body .tbp-map-frame .tbp-map-zoom .tbp-map-fullscreen-btn__text { display:none; }
}

.tbp-map-institution-verified { display:inline-flex; width:20px; height:20px; vertical-align:middle; margin-left:3px; }
.tbp-map-institution-verified svg { display:block; width:100%; height:100%; }

/* ------------------------------------------------------------------------
 * Il gruppo sulla mappa (30/9 sera, CEO dall'iPhone: la pila di tessere
 * sembrava «icone una sopra l'altra»). UN solo oggetto grande come un
 * segnaposto (46 px, raggio 14): tessera bianca con il filo verde, il numero
 * dei luoghi e sotto una barretta divisa nei colori dei tipi che contiene.
 * Niente icone impilate, niente bollino che sporge. Bianca in tutti e tre i
 * temi, come i segnaposti colorati: la mappa sotto e' chiara anche di notte.
 * ------------------------------------------------------------------------ */
html body .leaflet-container .tbp-map-cluster.tbp-map-cluster--tessera {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	display: block !important;
	color: inherit !important;
}
.tbp-map-gruppo {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 46px;
	height: 46px;
	border: 2px solid #084828;
	border-radius: 14px;
	background: #fff;
	color: #084828;
	box-shadow: 0 3px 8px #14372840;
}
.tbp-map-gruppo__numero {
	display: block;
	font: 800 18px/1 var(--tbp-font, Manrope, "DM Sans", sans-serif);
	font-variant-numeric: tabular-nums;
	color: #084828;
	-webkit-text-fill-color: #084828;
}
.tbp-map-gruppo__tipi {
	display: flex;
	gap: 2px;
	width: 26px;
	height: 5px;
}
.tbp-map-gruppo__tipo {
	flex-basis: 0;
	min-width: 4px;
	height: 100%;
	border-radius: 3px;
	background: #D0161A;
}
.tbp-map-gruppo__tipo--mestiere { background: #0e5e3c; }
.tbp-map-gruppo__tipo--ente { background: #e0a911; }
.tbp-map-gruppo__tipo--online { background: #fff; box-shadow: inset 0 0 0 1.5px #c9962f; }
/* Nella legenda: la stessa tessera, piccola. */
.tbp-map-legend-icon.tbp-map-legend-icon--gruppo {
	background: transparent !important;
	border-color: transparent !important;
}
.tbp-map-gruppo.tbp-map-gruppo--mini {
	width: 22px;
	height: 22px;
	gap: 2px;
	border-width: 1.5px;
	border-radius: 6px;
	box-shadow: none;
}
.tbp-map-gruppo--mini .tbp-map-gruppo__numero { font-size: 12px; }
.tbp-map-gruppo--mini .tbp-map-gruppo__tipi { width: 14px; height: 3px; gap: 1px; }
.tbp-map-gruppo--mini .tbp-map-gruppo__tipo { min-width: 2px; border-radius: 2px; }
/* Nella legenda di base (altre mappe) vale il testo lungo. */
.tbp-map-legend .tbp-map-legend__corto { display: none; }
/* Sulle altre mappe (computer) la voce «Più luoghi» c'e' anche nell'angolo. */
#tbp-map-esperienze .tbp-map-legend .tbp-map-legend__voce--gruppo { display: flex; }


/* 8/10 (CEO: «da pc hai piu' spazio»): i pezzi della riga dei crediti che si
   vedono solo dal computer, cioe' «contributors», l'ultimo rilascio e i
   diritti. Al telefono e sul tablet la riga resta corta come prima. */
html body .leaflet-control-attribution .tbp-map-solo-pc { display: none !important; }
@media (min-width: 1024px) {
	html body .leaflet-control-attribution .tbp-map-solo-pc { display: inline !important; }
}
/* 8/10 notte (CEO: «tutto su una riga»): la seconda riga non c'e' piu'; la
   frase corta sta nella riga dei crediti (vedi mappa-archivio.js). */
html body .leaflet-control-attribution .tbp-map-proprieta { display: none !important; }
