/* ── Modal "Come funziona" ── */
#cf-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.72);
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 0.5em;
	box-sizing: border-box;
}
#cf-box {
	background: #fff;
	border-radius: 10px;
	padding: 0.5em;
	position: relative;
	box-sizing: border-box;
	/* Occupa tutto lo spazio disponibile meno il padding dell'overlay */
	width: 100%;
	max-width: 720px;
	/* Altezza massima = viewport meno margini, senza overflow */
	max-height: calc(100vh - 1em);
	display: flex;
	flex-direction: column;
}
#cf-close {
	position: absolute;
	top: 0.3em;
	right: 0.5em;
	font-size: 1.6em;
	font-weight: 700;
	cursor: pointer;
	line-height: 1;
	color: #555;
	background: none;
	border: none;
	padding: 0;
	z-index: 1;
}
#cf-close:hover { color: #E24B4A; }
#cf-svg-wrap {
	/* Cresce per occupare tutto lo spazio del box, immagine si adatta */
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1.4em;
}
#cf-svg-wrap img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
#cf-btn {
	display: inline;
	margin: 0 0 0.3em 0.3em;
	padding: 0;
	background: none;
	border: none;
	color: inherit;
	font-size: 1.26em;
	font-weight: 600;
	cursor: pointer;
	opacity: 1;
	vertical-align: middle;
	line-height: 1;
}
#cf-btn:hover {
	opacity: 0.75;
}
