/*
 * Pagine dei Comuni ed enti (kit enti-design-8-10, CEO 8/10): foto del posto in cima, nome grande,
 * scheda del Comune a lato, esperienze a schede con foto, volti dei Mastri, raccolta a tessere con mappa.
 * Valori da linguaggio/02_STILE.md. Niente righe colorate di accento, niente puntino di separazione, una sola ombra.
 * Tre temi: chiaro (predefinito), scuro (html[data-tbp-theme="dark"]), ToBePolo (html[data-tbp-theme="tobepolo"], CHIARO).
 */
.tbp-ep {
	--ep-bg: #FFFFFF;
	--ep-carta: #F7F4ED;
	--ep-salvia: #F4F7F5;
	--ep-campo: #F1F4F2;
	--ep-scheda: #F7F4ED;
	--ep-ink: #123326;
	--ep-testo: #084828;
	--ep-tenue: #4E6A5D;
	--ep-linea: rgba(8, 72, 40, .14);
	--ep-marchio: #145E3F;
	--ep-link: #084828;
	--ep-chip: #F1F4F2;
	--ep-pieno: #084828;
	--ep-pieno-testo: #FFFFFF;
	--ep-ombra: 0 10px 28px -12px rgba(8, 72, 40, .22);
	--ep-t: var(--tbp-font-titoli, "Figtree", system-ui, sans-serif);
	--ep-f: var(--tbp-font, "Schibsted Grotesk", system-ui, sans-serif);
	background: var(--ep-bg);
	color: var(--ep-ink);
	font-family: var(--ep-f);
	font-size: 16px;
	line-height: 1.5;
	overflow-x: clip;
	padding-bottom: 48px;
}
html[data-tbp-theme="dark"] .tbp-ep {
	--ep-bg: #0F0F0F;
	--ep-carta: #141414;
	--ep-salvia: #141414;
	--ep-campo: #1E1E1E;
	--ep-scheda: #141414;
	--ep-ink: #EDEDED;
	--ep-testo: #EDEDED;
	--ep-tenue: #B5B5B5;
	--ep-linea: #333333;
	--ep-marchio: #9BDBB5;
	--ep-link: #9BDBB5;
	--ep-chip: #1E1E1E;
	--ep-pieno: #EDEDED;
	--ep-pieno-testo: #0F0F0F;
	--ep-ombra: none;
}
html[data-tbp-theme="tobepolo"] .tbp-ep {
	--ep-bg: #FAF6EE;
	--ep-carta: #F2EBDC;
	--ep-salvia: #F2EBDC;
	--ep-campo: #F1EBDD;
	--ep-scheda: #F2EBDC;
	--ep-ink: #10261B;
	--ep-tenue: #4C6658;
	--ep-chip: #EFE8D8;
}
.tbp-ep *, .tbp-ep *::before, .tbp-ep *::after { box-sizing: border-box; }
.tbp-ep img { display: block; max-width: 100%; height: auto; border: 0; }
.tbp-ep a { color: inherit; text-decoration: none; }
.tbp-ep h1, .tbp-ep h2, .tbp-ep h3 {
	font-family: var(--ep-t) !important;
	color: var(--ep-testo);
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0;
	text-transform: none;
}
.tbp-ep h2 { font-size: 26px; font-weight: 800; }
.tbp-ep :is(dl, dt, dd, label, select, button, input) { text-transform: none !important; letter-spacing: normal; }
.tbp-ep h3 { font-size: 18px; font-weight: 700; }
.tbp-ep p { margin: 0; }
.tbp-ep-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Bottoni (oro per l'azione principale, contorno per la secondaria). */
.tbp-ep .tbp-ep-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 20px; border-radius: 16px;
	font: 800 16px/1.15 var(--ep-f); letter-spacing: -0.01em; text-align: center; text-decoration: none;
}
.tbp-ep .tbp-ep-btn--oro { background: linear-gradient(135deg, #F0BE00, #A8821C) !important; color: #052b18 !important; -webkit-text-fill-color: #052b18 !important; }
.tbp-ep .tbp-ep-btn--contorno { min-height: 44px; border-radius: 12px; font-size: 15px; padding: 0 16px; color: var(--ep-testo) !important; -webkit-text-fill-color: currentColor; background: transparent; box-shadow: inset 0 0 0 1px var(--ep-linea); }
.tbp-ep .tbp-ep-btn:focus-visible, .tbp-ep a:focus-visible, .tbp-ep button:focus-visible, .tbp-ep input:focus-visible, .tbp-ep select:focus-visible { outline: 3px solid #084828; outline-offset: 3px; }
html[data-tbp-theme="dark"] .tbp-ep :is(a, button, input, select):focus-visible { outline-color: #9BDBB5; }

/* ---------- Scheda: la foto del posto in cima ---------- */
.tbp-ep-eroe { position: relative; height: 560px; overflow: hidden; background-color: #24362C; }
/* Il contenitore del sito (#main) ha un margine laterale: su queste pagine no, la foto arriva ai bordi. */
html body.tbp-ep-pagina #wrapper > #main { margin-left: 0 !important; margin-right: 0 !important; max-width: none !important; width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }
.tbp-ep-eroe__foto { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; object-position: 50% 55%; }
.tbp-ep-eroe::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72%; background: linear-gradient(180deg, rgba(10, 20, 14, 0) 0%, rgba(10, 20, 14, .38) 45%, rgba(10, 20, 14, .74) 100%); pointer-events: none; }
.tbp-ep .tbp-ep-eroe__indietro { position: absolute; top: 16px; left: 16px; z-index: 2; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #123326; font: 600 14px/1 var(--ep-f); }
.tbp-ep-eroe__testo { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: 24px; color: #FFFFFF; }
.tbp-ep-eroe__ente { display: flex; align-items: center; gap: 12px; }
.tbp-ep-eroe__stemma { flex: none; display: grid; place-items: center; width: 48px; height: 56px; padding: 4px; border-radius: 12px; background: #FFFFFF; }
.tbp-ep-eroe__stemma img { max-height: 46px; max-width: 40px; width: auto; height: auto; }
.tbp-ep-eroe__tipo { font: 600 15px/1.3 var(--ep-f); color: #FFFFFF; -webkit-text-fill-color: currentColor; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.tbp-ep .tbp-ep-eroe__nome { color: #FFFFFF !important; -webkit-text-fill-color: #FFFFFF !important; font-size: clamp(48px, 16vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: .95; margin-top: 12px; overflow-wrap: anywhere; hyphens: auto; text-shadow: 0 2px 18px rgba(0, 0, 0, .18); }
/* Senza foto: il nome grande su carta, in verde. */
.tbp-ep .tbp-ep-eroe__nome--lungo { font-size: clamp(40px, 11vw, 56px); }
.tbp-ep-eroe--carta { height: auto; min-height: 0; max-height: none; background: var(--ep-carta); }
.tbp-ep-eroe--carta::after { display: none; }
.tbp-ep-eroe--carta .tbp-ep-eroe__testo { position: relative; padding: 76px 0 32px; }
.tbp-ep-eroe--carta .tbp-ep-eroe__tipo { color: var(--ep-tenue); text-shadow: none; }
.tbp-ep .tbp-ep-eroe--carta .tbp-ep-eroe__nome { color: var(--ep-marchio) !important; -webkit-text-fill-color: var(--ep-marchio) !important; text-shadow: none; }
.tbp-ep-eroe--carta .tbp-ep-eroe__indietro { box-shadow: inset 0 0 0 1px var(--ep-linea); }
.tbp-ep-credito { margin-top: 8px !important; font-size: 12px; color: var(--ep-tenue); text-align: right; }
.tbp-ep-credito a { text-decoration: underline; text-underline-offset: 2px; }

/* Corpo: al telefono una colonna (apertura, scheda, il resto); al computer la scheda a destra, fissa. */
.tbp-ep-corpo { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "apertura" "scheda" "principale"; gap: 0; }
.tbp-ep-apertura { grid-area: apertura; padding-top: 20px; }
.tbp-ep-scheda { grid-area: scheda; }
.tbp-ep-principale { grid-area: principale; min-width: 0; }
.tbp-ep-intro { font-size: 19px; line-height: 1.5; color: var(--ep-ink); max-width: 700px; }

/* La scheda del Comune: riempimento, nessun bordo colorato. */
.tbp-ep-scheda { margin-top: 28px; padding: 20px; border-radius: 22px; background: var(--ep-scheda); align-self: start; }
html[data-tbp-theme="dark"] .tbp-ep-scheda { box-shadow: inset 0 0 0 1px #333333; }
.tbp-ep .tbp-ep-scheda__titolo { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.tbp-ep-fatti { margin: 0; }
.tbp-ep-fatti div { padding: 12px 0; border-top: 1px solid var(--ep-linea); }
.tbp-ep-fatti div:first-child { border-top: 0; }
.tbp-ep-fatti dt, .tbp-ep-fatti dd { display: block !important; float: none !important; width: auto !important; }
.tbp-ep-fatti dt { font: 800 19px/1.2 var(--ep-t); color: var(--ep-testo); letter-spacing: -0.01em; }
.tbp-ep-fatti dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ep-ink); }
.tbp-ep-mini { position: relative; margin-top: 12px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--ep-campo); z-index: 0; }
.tbp-ep-mini .leaflet-control-attribution { font-size: 10px; }
html[data-tbp-theme="dark"] .tbp-ep :is(.tbp-ep-mini, .tbp-ep-mappa-grande__carta) .leaflet-tile-pane { filter: brightness(.82) contrast(1.05); }
.tbp-ep-scheda__riga { margin-top: 12px !important; }
.tbp-ep-contatti { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ep-linea); }
.tbp-ep .tbp-ep-contatti h3 { font-size: 17px; }
.tbp-ep-contatti dl { margin: 8px 0 0; display: grid; gap: 8px; }
.tbp-ep-contatti dl div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.45; }
.tbp-ep-contatti dt { color: var(--ep-tenue); float: none !important; width: auto !important; }
.tbp-ep-contatti dd { margin: 0; color: var(--ep-ink); overflow-wrap: anywhere; }
.tbp-ep .tbp-ep-contatti a, .tbp-ep .tbp-ep-racconto a { color: var(--ep-link); text-decoration: underline; text-underline-offset: 3px; }
.tbp-ep-contatti__fonte { margin-top: 12px !important; font-size: 14px; color: var(--ep-ink); }
.tbp-ep-contatti__curata { margin-top: 12px !important; font-size: 13px; color: var(--ep-tenue); }

/* Racconto e sezioni. */
.tbp-ep-racconto { margin-top: 36px; max-width: 700px; }
.tbp-ep .tbp-ep-racconto h2 { font-size: 22px; margin: 0 0 8px; }
.tbp-ep-racconto p { font-size: 16px; line-height: 1.6; color: var(--ep-ink); margin: 0 0 12px; }
.tbp-ep-sezione { padding-top: 40px; }
.tbp-ep-sezione__testa { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.tbp-ep .tbp-ep-sezione__tutte { flex: none; font: 700 15px/1 var(--ep-f); color: var(--ep-link); }
.tbp-ep-sezione__sotto { margin-top: 6px !important; font-size: 15px; color: var(--ep-tenue); max-width: 640px; }

/* Esperienze: foto 4:5 che scorrono al telefono, griglia al computer. */
.tbp-ep-scorri { display: flex; gap: 12px; margin: 16px -16px 0; padding: 0 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.tbp-ep-scorri::-webkit-scrollbar { display: none; }
.tbp-ep-esp { flex: 0 0 74%; max-width: 300px; scroll-snap-align: start; display: block; }
.tbp-ep-esp__foto { display: block; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--ep-campo); }
.tbp-ep-esp__foto img { width: 100% !important; height: 100% !important; object-fit: cover; }
.tbp-ep-esp__titolo { display: block; margin-top: 10px; font: 700 17px/1.25 var(--ep-t); letter-spacing: -0.02em; color: var(--ep-testo); }
.tbp-ep-esp__righe { display: block; margin-top: 4px; font-size: 14px; color: var(--ep-tenue); }
.tbp-ep-esp__prezzo { display: block; margin-top: 6px; font: 800 16px/1 var(--ep-t); color: var(--ep-testo); font-variant-numeric: tabular-nums; }

/* Persone: volti tondi. */
.tbp-ep-persone { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; margin-top: 16px; }
.tbp-ep-persona { display: block; text-align: center; }
.tbp-ep-persona__volto { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 999px; overflow: hidden; background: var(--ep-salvia); color: var(--ep-testo); font: 800 32px/1 var(--ep-t); }
.tbp-ep-persona__volto img { width: 100% !important; height: 100% !important; object-fit: cover; object-position: 50% 25%; }
.tbp-ep-persona--invito .tbp-ep-persona__volto img { width: 56% !important; height: auto !important; object-fit: contain; }
.tbp-ep-persona__nome { display: block; margin-top: 10px; font: 700 15px/1.25 var(--ep-t); color: var(--ep-testo); }
.tbp-ep-persona__riga { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ep-tenue); }
.tbp-ep-persona__link { display: block; margin-top: 4px; font: 700 13px/1.3 var(--ep-f); color: var(--ep-link); text-decoration: underline; text-underline-offset: 3px; }

/* Tradizioni. */
.tbp-ep-trad { display: grid; gap: 24px; margin-top: 16px; }
.tbp-ep-trad__voce { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.tbp-ep-trad__voce--testo { grid-template-columns: minmax(0, 1fr); }
.tbp-ep-trad__voce figure { margin: 0; }
.tbp-ep-trad__voce figure img { width: 112px !important; height: 140px !important; object-fit: cover; border-radius: 16px; }
.tbp-ep-trad__voce figcaption { display: none; }
.tbp-ep .tbp-ep-trad__voce h3 { font-size: 18px; margin-bottom: 4px; }
.tbp-ep-trad__voce p { font-size: 15px; line-height: 1.55; color: var(--ep-ink); }

/* Eventi. */
.tbp-ep-eventi { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.tbp-ep-evento { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 22px; background: var(--ep-carta); margin: 0; }
.tbp-ep-evento__mese { font: 800 18px/1.1 var(--ep-t); color: var(--ep-testo); text-transform: uppercase; letter-spacing: .02em; padding-top: 2px; text-align: center; }
.tbp-ep .tbp-ep-evento h3 { font-size: 17px; }
.tbp-ep-evento p { font-size: 14px; line-height: 1.5; color: var(--ep-ink); margin-top: 4px; }
.tbp-ep-evento .tbp-ep-evento__quando { color: var(--ep-tenue); }
.tbp-ep-evento__stato { display: inline-block; margin-top: 8px; padding: 6px 8px; border-radius: 8px; font: 700 12px/1 var(--ep-f); background: #E4F1E8; color: #145E3F; }
html[data-tbp-theme="dark"] .tbp-ep-evento__stato { background: #1E2A23; color: #9BDBB5; }
.tbp-ep-evento__foto { grid-column: 1 / -1; width: 100% !important; aspect-ratio: 16 / 9; height: auto !important; object-fit: cover; border-radius: 16px; }

/* Piede: altri Comuni e invito ad aderire. */
.tbp-ep-piede { padding-top: 8px; }
.tbp-ep-altri { display: flex; gap: 12px; margin: 16px -16px 0; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; scroll-padding-left: 16px; scroll-snap-type: x mandatory; }
.tbp-ep-altri::-webkit-scrollbar { display: none; }
.tbp-ep-aderire { display: grid; gap: 12px; margin-top: 40px; padding: 24px; border-radius: 22px; background: var(--ep-salvia); }
html[data-tbp-theme="dark"] .tbp-ep-aderire { box-shadow: inset 0 0 0 1px #333333; }
.tbp-ep-aderire > img { width: 56px; height: 56px; object-fit: contain; }
.tbp-ep .tbp-ep-aderire h2 { font-size: 22px; }
.tbp-ep-aderire p { margin-top: 6px !important; font-size: 15px; line-height: 1.5; color: var(--ep-ink); max-width: 560px; }
.tbp-ep-aderire .tbp-ep-btn { justify-self: start; }

/* ---------- Tessere (raccolta e «altri») ---------- */
.tbp-ep-tessera { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background-color: #24362C; isolation: isolate; }
.tbp-ep-tessera > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; z-index: -1; }
.tbp-ep-tessera::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 66%; background: linear-gradient(180deg, rgba(10, 20, 14, 0), rgba(10, 20, 14, .66)); z-index: -1; }
.tbp-ep-tessera__testo { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #FFFFFF; }
.tbp-ep-tessera__testo b { display: block; font: 800 30px/1 var(--ep-t); letter-spacing: -0.03em; color: #FFFFFF; overflow-wrap: anywhere; }
.tbp-ep-tessera__testo span { display: block; margin-top: 6px; font: 500 14px/1.3 var(--ep-f); color: #FFFFFF; opacity: .94; }
.tbp-ep-tessera__stemma { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; height: 44px; min-width: 44px; max-width: 140px; padding: 4px 8px; border-radius: 12px; background: #FFFFFF; }
.tbp-ep-tessera__stemma img { max-height: 34px; width: auto; }
.tbp-ep-tessera__conta { position: absolute; top: 12px; right: 12px; padding: 8px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #123326; font: 700 13px/1 var(--ep-f); }
.tbp-ep-tessera--piccola { flex: 0 0 200px; aspect-ratio: 4 / 5; scroll-snap-align: start; }
.tbp-ep-tessera--piccola .tbp-ep-tessera__testo b { font-size: 22px; line-height: 1.05; }

/* ---------- Raccolta ---------- */
.tbp-ep--raccolta .tbp-ep-wrap { padding-top: 28px; }
.tbp-ep-capo h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.tbp-ep-capo p { margin-top: 12px !important; font-size: 17px; color: var(--ep-ink); max-width: 620px; }
.tbp-ep-cerca { display: flex; align-items: center; gap: 10px; height: 52px; margin: 20px 0 0; padding: 0 16px; border-radius: 16px; background: var(--ep-campo); color: var(--ep-tenue); cursor: text; }
.tbp-ep .tbp-ep-cerca input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--ep-ink); font: 400 16px/1 var(--ep-f); }
.tbp-ep .tbp-ep-cerca input::placeholder { color: var(--ep-tenue); opacity: 1; }
.tbp-ep .tbp-ep-cerca input:focus { outline: none; }
.tbp-ep-cerca:focus-within { box-shadow: inset 0 0 0 2px #084828; }
html[data-tbp-theme="dark"] .tbp-ep-cerca:focus-within { box-shadow: inset 0 0 0 2px #9BDBB5; }
.tbp-ep-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.tbp-ep-barra__quanti { font-size: 14px; color: var(--ep-tenue); }
.tbp-ep .tbp-ep-prov select { height: 44px !important; margin: 0 !important; padding: 0 36px 0 14px !important; border: 0 !important; border-radius: 12px !important; background-color: var(--ep-chip) !important; color: var(--ep-testo) !important; font: 600 15px/1 var(--ep-f); -webkit-appearance: none; appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; box-shadow: none !important; max-width: 56vw; width: auto !important; }
.tbp-ep-vista { display: inline-flex; flex: none; padding: 4px; border-radius: 12px; background: var(--ep-chip); }
.tbp-ep .tbp-ep-vista__b { min-height: 36px !important; height: 36px; margin: 0 !important; padding: 0 14px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: var(--ep-testo) !important; -webkit-text-fill-color: currentColor !important; font: 700 14px/1 var(--ep-f) !important; letter-spacing: 0 !important; box-shadow: none !important; cursor: pointer; width: auto !important; }
.tbp-ep .tbp-ep-vista__b[aria-pressed="true"] { background: var(--ep-pieno) !important; color: var(--ep-pieno-testo) !important; }
.tbp-ep-griglia { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.tbp-ep-griglia .tbp-ep-tessera[hidden] { display: none; }
.tbp-ep-vuoto { margin-top: 16px !important; color: var(--ep-tenue); }
.tbp-ep-mappa-grande { margin-top: 16px; }
.tbp-ep-mappa-grande[hidden] { display: none; }
.tbp-ep-mappa-grande__carta { position: relative; height: 480px; border-radius: 22px; overflow: hidden; background: var(--ep-campo); z-index: 0; }
.tbp-ep-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px !important; font-size: 13px; color: var(--ep-tenue); }
.tbp-ep-legenda i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 999px; background: #084828; vertical-align: 0; }
.tbp-ep-legenda i.tbp-ep-legenda__attesa { background: #B9C2BD; }
.tbp-ep-pin { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: #FFFFFF; color: #123326; font: 700 13px/1 var(--tbp-font, system-ui); white-space: nowrap; box-shadow: 0 10px 28px -12px rgba(8, 72, 40, .45), 0 0 0 1px rgba(8, 72, 40, .14); transform: translate(-50%, -50%); }
.tbp-ep-pin img { width: 24px; height: 24px; object-fit: contain; border-radius: 999px; background: #FFFFFF; }
.tbp-ep-pin--senza { padding-left: 10px; }
.tbp-ep-pin--attesa { background: #F1F4F2; color: #4E6A5D; padding: 7px 10px; }
.tbp-ep .leaflet-div-icon.tbp-ep-icona { background: none; border: 0; width: 0 !important; height: 0 !important; overflow: visible; }
.tbp-ep-attesa__griglia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tbp-ep-attesa__voce { display: block; border-radius: 16px; overflow: hidden; background: var(--ep-carta); }
.tbp-ep-attesa__voce img { width: 100% !important; aspect-ratio: 4 / 3; height: auto !important; object-fit: cover; filter: saturate(.8); }
.tbp-ep-attesa__voce > span { display: block; padding: 10px 12px 12px; font-size: 13px; color: var(--ep-tenue); }
.tbp-ep-attesa__voce b { display: block; font: 700 15px/1.25 var(--ep-t); color: var(--ep-testo); margin-bottom: 2px; }

/* ---------- Computer (da 850 px) ---------- */
@media (min-width: 850px) {
	.tbp-ep-wrap { padding: 0 32px; }
	.tbp-ep { font-size: 17px; }
	.tbp-ep h2 { font-size: 30px; }
	.tbp-ep-eroe { height: 640px; }
	.tbp-ep .tbp-ep-eroe__indietro { top: 24px; left: 32px; }
	.tbp-ep .tbp-ep-eroe__nome { font-size: clamp(96px, 11vw, 152px); }
	.tbp-ep .tbp-ep-eroe__nome--lungo { font-size: clamp(72px, 8vw, 112px); }
	.tbp-ep-eroe__testo { padding-bottom: 36px; }
	.tbp-ep-eroe--carta .tbp-ep-eroe__testo { padding: 96px 0 40px; }
	.tbp-ep-corpo { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "apertura scheda" "principale scheda"; column-gap: 64px; }
	.tbp-ep-apertura { padding-top: 36px; }
	.tbp-ep-intro { font-size: 21px; }
	.tbp-ep-scheda { position: sticky; top: 96px; margin-top: 36px; padding: 24px; }
	.tbp-ep-racconto { margin-top: 40px; }
	.tbp-ep-sezione { padding-top: 64px; }
	.tbp-ep-scorri { margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; overflow: visible; }
	.tbp-ep-esp { max-width: none; }
	.tbp-ep-esp__foto { aspect-ratio: 4 / 4.4; }
	.tbp-ep-persone { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
	.tbp-ep-trad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
	.tbp-ep-trad__voce, .tbp-ep-trad__voce--testo { grid-template-columns: minmax(0, 1fr); }
	.tbp-ep-trad__voce figure img { width: 100% !important; height: 220px !important; }
	.tbp-ep-evento { grid-template-columns: 64px minmax(0, 1fr); }
	.tbp-ep-evento--foto { grid-template-columns: 64px minmax(0, 1fr) 220px; align-items: start; }
	.tbp-ep-evento--foto .tbp-ep-evento__foto { grid-column: auto; }
	.tbp-ep-altri { margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; overflow: visible; }
	.tbp-ep-tessera--piccola { aspect-ratio: 4 / 3; }
	.tbp-ep-aderire { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 32px; margin-top: 64px; }
	.tbp-ep-aderire .tbp-ep-btn { justify-self: end; }
	.tbp-ep--raccolta .tbp-ep-wrap { padding-top: 48px; }
	.tbp-ep-capo { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: end; }
	.tbp-ep-capo h1 { font-size: 72px; }
	.tbp-ep-cerca { margin: 0; }
	.tbp-ep-barra { margin-top: 32px; }
	.tbp-ep-griglia { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
	.tbp-ep-griglia .tbp-ep-tessera { aspect-ratio: 4 / 5; }
	.tbp-ep-griglia .tbp-ep-tessera--larga { grid-column: span 2; aspect-ratio: auto; }
	.tbp-ep-tessera__testo b { font-size: 38px; }
	.tbp-ep-mappa-grande__carta { height: 640px; }
	.tbp-ep-attesa__griglia { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
}

/* «Il tuo ente»: il blocco della foto di copertina.
 * I campi dell'account hanno regole !important dentro @layer (tbp-appearance): un !important in un livello
 * dichiarato PRIMA vince. tbp-icon-geometry è il primo livello del tema (tbp-tokens.css), quindi le correzioni
 * dei campi stanno lì. */
@layer tbp-icon-geometry {
.tbp-ep-cop { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(8, 72, 40, .14); }
.tbp-ep-cop h3 { margin: 0 0 6px; }
.tbp-ep-cop__aiuto { font-size: 14px; line-height: 1.5; opacity: .9; margin: 0 0 12px; }
.tbp-ep-cop__ora { margin: 0 0 12px; }
.tbp-ep-cop__ora img { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; display: block; }
.tbp-ep-cop__ora figcaption { font-size: 13px; opacity: .85; margin-top: 6px; }
.tbp-ep-cop__esito { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #E4F1E8; color: #145E3F; font-size: 15px; }
.tbp-ep-cop__esito--no { background: #FBE3E1; color: #A3141A; }
body .tbp-ep-cop .tbp-ep-cop__diritti label { display: flex !important; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 500; line-height: 1.45; }
body .tbp-ep-cop input[type="checkbox"] { -webkit-appearance: checkbox !important; appearance: auto !important; display: inline-block !important; flex: none !important; width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 0 !important; margin: 2px 0 0 !important; padding: 0 !important; border: 0 !important; border-radius: 4px !important; background: none !important; box-shadow: none !important; accent-color: #084828; }
.tbp-ep-cop__file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tbp-ep-cop__input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
body .tbp-ep-cop .tbp-ep-cop__scegli { display: inline-flex !important; align-items: center !important; min-height: 44px !important; padding: 0 16px !important; border-radius: 12px !important; box-shadow: inset 0 0 0 1px rgba(8, 72, 40, .3) !important; font-weight: 700 !important; cursor: pointer; margin: 0 !important; line-height: 1.2 !important; }
.tbp-ep-cop__input:focus-visible + .tbp-ep-cop__nome, .tbp-ep-cop__file:focus-within .tbp-ep-cop__scegli { outline: 3px solid #084828; outline-offset: 3px; }
.tbp-ep-cop__nome { font-size: 14px; opacity: .85; overflow-wrap: anywhere; }
html[data-tbp-theme="dark"] .tbp-ep-cop__scegli { box-shadow: inset 0 0 0 1px #4a4a4a; }
html[data-tbp-theme="dark"] .tbp-ep-cop input[type="checkbox"] { accent-color: #9BDBB5; }
.tbp-ep-cop__togli { margin-left: 8px; }

}

@media (prefers-reduced-motion: reduce) {
	.tbp-ep-scorri, .tbp-ep-altri { scroll-behavior: auto; }
}

/* CEO 8/10: spunta blu «verificato» accanto al nome e stemma molto piu grande. */
.tbp-ep .tbp-ep-verificato { display: inline-block; width: .42em; height: .42em; margin-left: .18em; vertical-align: .14em; line-height: 0; }
.tbp-ep .tbp-ep-verificato svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.tbp-ep-eroe__ente { gap: 16px; }
.tbp-ep-eroe__stemma { width: 92px; height: 108px; padding: 8px; border-radius: 18px; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.tbp-ep-eroe__stemma img { max-height: 92px; max-width: 76px; }
@media (min-width: 1024px) {
	.tbp-ep-eroe__stemma { width: 132px; height: 152px; padding: 10px; border-radius: 22px; }
	.tbp-ep-eroe__stemma img { max-height: 132px; max-width: 112px; }
	.tbp-ep-eroe__tipo { font-size: 17px; }
}

/* CEO 8/10: spunta blu anche nelle tessere della raccolta. */
.tbp-ep .tbp-ep-tessera__testo b .tbp-ep-verificato { display: inline-block; width: max(22px, .7em); height: max(22px, .7em); margin-left: .25em; vertical-align: -.08em; }

/* CEO 8/10: il conteggio non copre piu lo stemma: sta sotto, a sinistra. */
.tbp-ep .tbp-ep-tessera__conta { top: 64px; left: 12px; right: auto; }

.tbp-ep span.tbp-ep-nowrap, .tbp-ep .tbp-ep-tessera__testo b span.tbp-ep-nowrap { display: inline !important; white-space: nowrap; margin: 0 !important; font: inherit !important; opacity: 1 !important; color: inherit; }

/* CEO 9/10: un solo anello sul campo «Cerca un Comune». */
html body .tbp-ep .tbp-ep-cerca input[data-tbp-ep-cerca][type="search"]:is(:focus, :focus-visible) { outline: none !important; box-shadow: none !important; border: 0 !important; }
html body .tbp-ep .tbp-ep-cerca:focus-within { box-shadow: inset 0 0 0 2px #084828 !important; outline: none !important; }
html[data-tbp-theme="dark"] body .tbp-ep .tbp-ep-cerca:focus-within { box-shadow: inset 0 0 0 2px #9BDBB5 !important; }
