:root {
	--ch-white: #ffffff;
	--ch-overlay: rgba(20, 40, 100, 0.82);
	--ch-font: "Barlow Condensed", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	/* Default body size when a component does not set its own `font-size`. */
	--ch-body-font-size: 24px;
	/* Scala pesi (login/app; usata anche dove si importa questo CSS, es. badge punti in admin). */
	--ch-fw-body: 200;
	--ch-fw-medium: 300;
	--ch-fw-strong: 450;
	--ch-fw-display: 620;
	/* Portrait user shell: column width when pillarboxed (login, /app, future `ch-user` pages). */
	--ch-user-shell-w: 26rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* `rem` è relativo a questo valore: 1rem = corpo 24px su login e /app. */
html.ch-doc {
	font-size: var(--ch-body-font-size);
}

html.ch-doc,
body.ch-page {
	margin: 0;
	padding: 0;
}

/* Sotto lo stack /app: niente “buco” bianco in overscroll o se il layer hero non copre. */
html.ch-doc:has(body.ch-page.ch-app) {
	background-color: #0d244f;
}

.ch-page.ch-app {
	background-color: #0d244f;
}

.ch-page {
	min-height: 100vh;
	font-family: var(--ch-font);
	font-weight: var(--ch-fw-body);
	line-height: 1.45;
	color: var(--ch-white);
	position: relative;
}

.ch-page strong,
.ch-page b {
	font-weight: var(--ch-fw-strong);
}

.ch-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	min-height: 100%;
	background-size: cover;
	background-position: center top;
	background-attachment: scroll;
	filter: saturate(0.55) brightness(0.45) contrast(1.1);
}

.ch-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		165deg,
		rgba(15, 25, 70, 0.92) 0%,
		rgba(40, 30, 90, 0.78) 100%
	);
}

/* Login: artwork includes logo; scale by width so the image always spans the column/viewport horizontally. */
.ch-page.ch-login .ch-bg {
	background-image: url("/img/BG-login-logo.jpg");
	filter: none;
	/* Bottom fill: sampled from lower edge of BG-login-logo.jpg (matches art, not generic navy). */
	background-color: #144080;
	background-size: 100% auto;
	background-repeat: no-repeat;
	background-position: center top;
}

.ch-page.ch-login .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0%,
		transparent 42%,
		rgba(20, 64, 128, 0.68) 100%
	);
}

/* App utente: stesso trattamento del login (arte full-width nella colonna, sfondo diverso). */
.ch-page.ch-app .ch-bg {
	background-image: url("/img/BG-profilo-logo.jpg");
	filter: none;
	/* Sotto l’illustrazione (il layer immagine resta sopra al colore). */
	background-color: #0d244f;
	background-size: 100% auto;
	background-repeat: no-repeat;
	background-position: center top;
}

.ch-page.ch-app .ch-bg::after {
	/*
	 * La banda trasparente deve coprire tutta l’illustrazione (100% auto → spesso >420px in altezza).
	 * Stop in vh/px (non % sull’altezza del documento): così sotto l’arte resta #0d244f pieno fino in fondo scroll.
	 */
		background: linear-gradient(
		180deg,
		transparent 0,
		transparent max(88vh, 880px),
		rgba(10, 22, 52, 0.45) max(96vh, 980px),
		#0d244f max(108vh, 1120px),
		#0d244f 100%
	);
}

/* Onboarding unbranded: colore solido + logo LP (nessuna arte tema). */
.ch-page.ch-login.ch-login--unbranded .ch-bg {
	background-image: url("/img/logo-LP-prrima.svg");
	background-color: #134c96;
	background-size: min(88vw, 17.5rem) auto;
	background-repeat: no-repeat;
	background-position: center calc(2rem + env(safe-area-inset-top, 0px));
}

.ch-page.ch-login.ch-login--unbranded .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0%,
		transparent 38%,
		rgba(19, 76, 150, 0.55) 100%
	);
}

.ch-page.ch-login.ch-login--unbranded .ch-login-body {
	padding-top: clamp(7.75rem, 33vh, 14.5rem);
}

.ch-page.ch-app.ch-app--unbranded .ch-bg {
	background-image: url("/img/logo-LP-prrima.svg");
	background-color: #134c96;
	background-size: min(88vw, 17.5rem) auto;
	background-repeat: no-repeat;
	background-position: center calc(2rem + env(safe-area-inset-top, 0px));
}

.ch-page.ch-app.ch-app--unbranded .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0,
		transparent max(52vh, 480px),
		rgba(19, 76, 150, 0.45) 100%
	);
}

.ch-page.ch-app.ch-app--unbranded .ch-app-body {
	padding-top: clamp(5.75rem, 19vh, 10.5rem);
}

.ch-page.ch-app .ch-content {
	position: relative;
	container-type: inline-size;
}

.ch-login-body,
.ch-app-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: min(22rem, 100%);
	margin-inline: auto;
	text-align: center;
}

/* Più spazio sotto il logo nell’immagine, così «Benvenuti!» non si sovrappone. */
.ch-login-body {
	padding-top: clamp(10rem, 42vh, 22rem);
}

/* Sotto il logo nell’arte; il punteggio è absolute nell’angolo (fuori flusso). */
.ch-app-body {
	padding-top: 40cqi;
}

.ch-login-body .ch-greeting {
	margin-top: 0;
	width: 100%;
}

/* Narrower than main so the block is visibly centered (not stuck to the left). */
.ch-login-body .ch-field,
.ch-login-body .ch-btn,
.ch-login-body .ch-msg {
	width: min(100%, 20rem);
}

.ch-login-body .ch-field input {
	text-align: center;
}

/*
 * User shell (`ch-user` on <body>): side bands + centered column when the viewport is as wide or wider
 * than a ~9:16 portrait panel (width/height >= 9/16). Same rule for login, /app, and future user pages.
 */
@media (min-aspect-ratio: 9/16) {
	/* Desktop “pillarbox”: niente gradienti sulle fasce laterali né ombra sulla colonna — sfondo piatto. */
	.ch-page.ch-user {
		background-color: #0d244f;
		background-image: none;
	}

	.ch-page.ch-user.ch-login--unbranded,
	.ch-page.ch-user.ch-app--unbranded {
		background-color: #134c96;
		background-image: none;
	}

	.ch-page.ch-user.ch-login--unbranded .ch-bg::after,
	.ch-page.ch-user.ch-app--unbranded .ch-bg::after {
		background: transparent;
	}

	.ch-page.ch-user .ch-bg {
		left: 50%;
		right: auto;
		width: min(var(--ch-user-shell-w), 100%);
		transform: translateX(-50%);
	}

	.ch-page.ch-user .ch-content {
		max-width: var(--ch-user-shell-w);
		margin-left: auto;
		margin-right: auto;
		width: 100%;
		box-shadow: none;
	}
}

.ch-content {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 1.5rem 1.25rem 0;
}

.ch-content__body {
	flex: 1 1 auto;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 0;
}

.ch-footer-brand {
	flex-shrink: 0;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 1.5rem;
	padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

.ch-footer-brand img {
	display: block;
	width: 56px;
	height: auto;
	max-width: none;
}

.ch-logo-block {
	text-align: center;
	margin-top: 0.5rem;
}

.ch-logo-block--img {
	margin-top: 0.75rem;
}

.ch-brand-logo {
	display: block;
	width: min(88vw, 18rem);
	height: auto;
	margin: 0 auto;
}

.ch-logo-compass {
	font-weight: var(--ch-fw-display);
	font-size: 0.95rem;
	letter-spacing: 0.12em;
}

.ch-logo-heroes {
	font-weight: var(--ch-fw-display);
	font-size: clamp(2.2rem, 9vw, 3.4rem);
	letter-spacing: 0.02em;
	line-height: 1;
}

.ch-logo-c {
	font-size: clamp(3.5rem, 18vw, 6rem);
	font-weight: var(--ch-fw-display);
	line-height: 0.85;
	letter-spacing: -0.04em;
}

.ch-subtitle {
	font-size: 0.8rem;
	font-weight: var(--ch-fw-strong);
	margin-top: 0.75rem;
	letter-spacing: 0.06em;
}

.ch-greeting {
	margin-top: 2rem;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-medium);
}

.ch-field {
	margin-top: 1.75rem;
	width: 100%;
	max-width: 20rem;
}

.ch-field input {
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--ch-white);
	color: var(--ch-white);
	font-size: 1rem;
	padding: 0.5rem 0;
	outline: none;
}

.ch-field input::placeholder {
	color: rgba(255, 255, 255, 0.75);
}

/* Stessa linea del login: sottiletto, niente box bianco (onboarding / risposte lunghe). */
.ch-line-input {
	display: block;
	width: 100%;
	max-width: 20rem;
	margin-top: 0.15rem;
	margin-inline: auto;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--ch-white);
	border-radius: 0;
	color: var(--ch-white);
	font: inherit;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
	padding: 0.35rem 0;
	outline: none;
	min-height: calc(1.45em + 0.7rem);
	overflow-y: hidden;
	resize: none;
	box-shadow: none;
}

.ch-line-input::placeholder {
	color: rgba(255, 255, 255, 0.75);
}

.ch-line-input:focus {
	border-bottom-color: rgba(255, 255, 255, 0.95);
	box-shadow: none;
}

.ch-btn {
	margin-top: 2rem;
	width: 100%;
	max-width: 20rem;
	padding: 0.85rem 1rem;
	font-family: var(--ch-font);
	font-weight: 600; /* Barlow Condensed semibold */
	font-size: 1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ch-white);
	background: transparent;
	border: 2px solid var(--ch-white);
	border-radius: 6px;
	cursor: pointer;
}

.ch-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ch-app-header {
	width: 100%;
	max-width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

/* Angolo alto-destra dell’area utente (stesso riquadro del login / pillarbox). */
.ch-page.ch-app .ch-app-header--score-only {
	position: absolute;
	top: max(1.5rem, env(safe-area-inset-top, 0px));
	right: max(1.25rem, env(safe-area-inset-right, 0px));
	left: auto;
	width: auto;
	margin: 0;
	z-index: 5;
	justify-content: flex-end;
	align-items: center;
}

/* Punteggio: icona energia + numero (mai in cerchio). */
.ch-points {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
	color: var(--ch-white);
}

.ch-points__icon {
	display: block;
	width: auto;
	height: 1.85rem;
	flex-shrink: 0;
}

.ch-points--header .ch-points__icon {
	height: 2.1rem;
}

.ch-points--header .ch-points__value {
	font-size: 1.35rem;
	font-weight: var(--ch-fw-display);
	line-height: 1;
	letter-spacing: 0.02em;
}

.ch-points--stat .ch-points__icon {
	height: 1.65rem;
}

.ch-points--stat .ch-points__value {
	font-size: 1.25rem;
	font-weight: var(--ch-fw-display);
}

.ch-points--table {
	gap: 0.25rem;
}

.ch-points--table .ch-points__icon {
	height: 1.2rem;
}

.ch-points--table .ch-points__value {
	font-size: 0.95rem;
	font-weight: var(--ch-fw-strong);
}

.ch-photo-box {
	box-sizing: border-box;
	margin-top: 1.5rem;
	width: 18rem;
	max-width: 100%;
	margin-inline: auto;
	align-self: center;
	aspect-ratio: 1;
	background: var(--ch-white);
	color: #333;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	text-align: center;
	cursor: pointer;
	border: 2px solid #fff;
	border-radius: 12px;
	font: inherit;
	position: relative;
}

/* Nessun selfie: solo illustrazione, senza testo nel box. */
.ch-photo-box--empty {
	padding: 0;
	background-color: var(--ch-white);
	background-image: url("/img/photo.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.ch-photo-box img {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	border: 5px solid #fff;
}

.ch-photo-box:has(img) {
	padding: 0;
	overflow: hidden;
}

/* Selfie upload / refresh: blur previous frame + overlay spinner until new image is ready */
.ch-photo-box--selfie-loading:has(img) img {
	filter: blur(10px);
	transition: filter 0.25s ease;
}

.ch-photo-box__loader {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.42);
	border-radius: inherit;
	pointer-events: none;
}

.ch-photo-box__loader[hidden] {
	display: none !important;
}

.ch-photo-box__loader:not([hidden]) {
	display: flex !important;
}

.ch-photo-box__loader::after {
	content: "";
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	border: 3px solid rgba(19, 76, 150, 0.2);
	border-top-color: #134c96;
	animation: ch-selfie-spin 0.75s linear infinite;
}

@keyframes ch-selfie-spin {
	to {
		transform: rotate(360deg);
	}
}

.ch-name {
	margin-top: 1rem;
	font-size: 1.1rem;
	font-weight: var(--ch-fw-strong);
	cursor: pointer;
	align-self: flex-start;
	max-width: 20rem;
}

.ch-capture-wrap {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: #134C96eb;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.ch-capture-wrap.open {
	display: flex;
}

.ch-video-wrap {
	position: relative;
	width: 100%;
	max-width: 22rem;
	border-radius: 8px;
	overflow: hidden;
}

.ch-video-wrap video {
	width: 100%;
	display: block;
	background: #000;
}

/* Specchio come selfie nativo; il frame salvato resta orientamento sensore. */
.ch-video-wrap video.ch-video-selfie {
	transform: scaleX(-1);
}

.ch-face-guide {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ch-face-guide-dim {
	position: absolute;
	inset: 0;
	/*background: rgba(0, 0, 0, 0.58);*/
	-webkit-mask-image: radial-gradient(
		ellipse 46% 60% at 50% 44%,
		transparent 42%,
		rgba(0, 0, 0, 0.98) 72%
	);
	mask-image: radial-gradient(
		ellipse 46% 60% at 50% 44%,
		transparent 42%,
		rgba(0, 0, 0, 0.98) 72%
	);
}

.ch-face-guide-ring {
	position: absolute;
	left: 50%;
	top: 44%;
	transform: translate(-50%, -50%);
	width: 62%;
	max-width: 15rem;
	aspect-ratio: 3 / 4;
	max-height: 78%;
	border: 3px solid rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.35),
		inset 0 0 0 1px rgba(0, 0, 0, 0.2);
	transition:
		border-color 0.2s ease,
		box-shadow 0.25s ease;
}

.ch-face-guide-ring--ok {
	border-color: rgba(110, 220, 140, 0.98);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.25),
		0 0 18px rgba(70, 200, 110, 0.55),
		inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ch-face-guide-ring--warn {
	border-color: rgba(255, 210, 100, 0.98);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.3),
		0 0 14px rgba(255, 190, 80, 0.4),
		inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ch-face-guide-ring--bad {
	border-color: rgba(255, 130, 130, 0.95);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.3),
		0 0 12px rgba(255, 100, 100, 0.35),
		inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ch-face-guide-caption--ok {
	color: #c8ffc8;
}

.ch-face-guide-caption--warn {
	color: #ffe8a8;
}

.ch-face-guide-caption--bad {
	color: #ffc8c8;
}

.ch-face-guide-caption {
	position: absolute;
	bottom: 0.35rem;
	left: 0;
	right: 0;
	margin: 0;
	padding: 0 0.5rem;
	text-align: center;
	font-size: 0.7rem;
	font-weight: var(--ch-fw-strong);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
	pointer-events: none;
	line-height: 1.25;
}

.ch-btn.ch-btn--ghost {
	border-color: rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-weight: var(--ch-fw-medium);
	font-size: 1.25rem;
}

.ch-quiz-overlay {
	--ch-quiz-skill-color: #0d244f;
	position: fixed;
	inset: 0;
	z-index: 60;
	background-color: #0d244f;
	display: none;
	padding: max(1.25rem, env(safe-area-inset-top)) 1rem
		max(1.25rem, calc(env(safe-area-inset-bottom) + 0.65rem));
	overflow-y: auto;
	isolation: isolate;
}

.ch-quiz-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("/img/BG-Domande-2.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center top;
	filter: grayscale(0.42) saturate(1.14) contrast(1.08) brightness(1.03);
	pointer-events: none;
	z-index: 0;
}

.ch-quiz-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ch-quiz-skill-color);
	mix-blend-mode: soft-light;
	opacity: 0.42;
	pointer-events: none;
	z-index: 0;
}

.ch-quiz-overlay.open {
	display: flex;
}

.ch-quiz-overlay.ch-quiz-overlay--blocking {
	pointer-events: auto;
}

body.ch-quiz-open {
	overflow: hidden;
}

.ch-quiz-live-hint {
	display: none;
}

.ch-quiz-card {
	position: relative;
	z-index: 1;
	width: 100%;
	min-height: calc(
		100dvh - max(1.25rem, env(safe-area-inset-top)) -
			max(1.25rem, calc(env(safe-area-inset-bottom) + 0.65rem))
	);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	text-align: center;
	gap: 0.85rem;
	font-weight: 600;
}

.ch-quiz-head-art {
	display: block;
	width: 60px;
	height: auto;
	margin: 0 auto;
}

.ch-quiz-prompt {
	margin: 0.55rem 0 0;
	max-width: 18rem;
	font-size: clamp(1.18rem, 5.5vw, 1.45rem);
	font-weight: 600;
	line-height: 1.35;
	text-wrap: balance;
}

.ch-quiz-options {
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	flex: 1;
	gap: 1rem;
	width: 100%;
	max-width: 19rem;
	margin-inline: auto;
	padding-block: 0.35rem;
}

.ch-quiz-options.grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.ch-opt-btn {
	width: 100%;
	min-height: 3rem;
	padding: 0.8rem 0.85rem;
	font-weight: 600;
	font-size: 0.95rem;
	border: 2px solid var(--ch-white);
	border-radius: 8px;
	background: transparent;
	color: var(--ch-white);
	cursor: pointer;
	text-align: center;
}

.ch-opt-btn:disabled {
	opacity: 0.5;
}

.ch-msg {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	font-weight: var(--ch-fw-body);
	color: #ffb4b4;
	min-height: 1.2em;
}

.ch-msg.ch-msg--ok {
	color: rgba(170, 255, 200, 0.95);
}

.ch-quiz-card .ch-msg {
	margin: 0.1rem 0 0;
	min-height: 1.3em;
	font-weight: 600;
}

.ch-quiz-card .ch-msg.ch-msg--ok {
	color: rgba(170, 255, 200, 0.95);
}

.ch-quiz-footer-art {
	display: block;
	width: 60px;
	height: auto;
	margin: 0.1rem auto 0;
}

@media (min-width: 768px) {
	.ch-quiz-overlay {
		align-items: center;
		justify-content: center;
		padding: 1.5rem;
	}

	.ch-quiz-card {
		min-height: auto;
		max-width: 22rem;
		padding: 1.35rem 1.2rem 1.15rem;
		border-radius: 14px;
		background: rgba(6, 20, 56, 0.5);
		border: 1px solid rgba(255, 255, 255, 0.24);
		backdrop-filter: blur(1px);
	}
}

.ch-vote-ctas {
	display: grid;
	gap: 0.7rem;
	width: 100%;
	max-width: 20rem;
	margin: 0.9rem auto 0;
}

.ch-qr-panel {
	margin-top: 1rem;
	width: 100%;
	max-width: 20rem;
	display: grid;
	gap: 0.65rem;
}

#ch-qr-video {
	width: 100%;
	border-radius: 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(0, 0, 0, 0.2);
	min-height: 12rem;
}

.ch-qr-manual {
	display: grid;
	gap: 0.45rem;
	text-align: left;
}

.ch-qr-manual input {
	width: 100%;
	padding: 0.52rem 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 0.45rem;
	background: rgba(0, 0, 0, 0.22);
	color: #fff;
}

.ch-missions-explore {
	width: 100%;
	max-width: min(24rem, 100%);
	margin: 0 auto;
	text-align: center;
}

.ch-missions-page {
	padding-top: clamp(3.25rem, 12vh, 7rem);
}

.ch-missions-back {
	margin-bottom: 0.35rem;
}

.ch-missions-brand {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	margin-bottom: 0.95rem;
}

.ch-missions-brand__logo {
	display: block;
	width: min(70vw, 13rem);
	height: auto;
	filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.3));
}

.ch-missions-explore__title {
	margin: 0.2rem 0 1rem;
	font-size: 1.25rem;
}

.ch-skill-grid {
	display: grid;
	gap: 0.75rem;
}

.ch-skill-box {
	border: 2px solid rgba(255, 255, 255, 0.75);
	background: rgba(13, 45, 111, 0.22);
	color: #fff;
	border-radius: 0.6rem;
	padding: 0.9rem 0.8rem;
	display: grid;
	gap: 0.1rem;
	text-align: center;
	align-content: center;
	min-height: 5.35rem;
	backdrop-filter: blur(1px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ch-skill-box__name {
	font-size: 1rem;
	font-weight: var(--ch-fw-medium);
	letter-spacing: 0.03em;
	line-height: 1.1;
	text-transform: uppercase;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.34);
}

.ch-skill-box__count {
	display: block;
	margin-top: 0.28rem;
	font-size: 0.62rem;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.9;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.ch-skill-missions {
	margin-top: 1rem;
}

.ch-skill-missions__title {
	margin: 0 0 0.7rem;
	font-size: 1.25rem;
}

.ch-missions-stack--explore .ch-mission-card {
	display: block;
	text-decoration: none;
	min-height: 18.5rem;
	height: auto;
}

/* Esplora missioni: stack più serrato, si vede quasi solo il titolo della card sotto. */
.ch-missions-stack--explore .ch-mission-card + .ch-mission-card {
	margin-top: -15.2rem;
}

.ch-mission-card--detail {
	display: block;
	text-decoration: none;
	background: color-mix(in srgb, var(--ch-skill-color), rgba(255, 255, 255, 0.12) 82%);
	/*
	 * "Card da gioco": base visiva sempre consistente, ma cresce
	 * automaticamente quando descrizione/meta sono più lunghe.
	 */
	min-height: 18.5rem;
	height: auto;
}

.ch-mission-card__meta {
	margin: 0.2rem 0 0.45rem;
	font-size: 0.82rem;
	opacity: 0.9;
}

.ch-mission-card__desc {
	margin: 0;
	white-space: pre-wrap;
	font-size: 0.9rem;
}

.ch-vote-controls {
	margin-top: 1rem;
	width: 100%;
	max-width: 20rem;
	display: grid;
	gap: 0.55rem;
}

.ch-vote-controls input[type="number"] {
	width: 100%;
	padding: 0.52rem 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 0.45rem;
	background: rgba(0, 0, 0, 0.22);
	color: #fff;
}

.ch-vote-controls--stepper {
	gap: 0.75rem;
	justify-items: center;
}

.ch-vote-controls__label {
	margin: 0;
	font-size: 0.72rem;
	font-weight: var(--ch-fw-strong);
	letter-spacing: 0.12em;
	text-align: center;
	color: rgba(255, 255, 255, 0.95);
}

.ch-mission-points-stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	width: 100%;
	max-width: 20rem;
}

.ch-mission-points-stepper__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.75);
	border-radius: 0.5rem;
	background: rgba(10, 24, 56, 0.45);
	color: #fff;
	cursor: pointer;
}

.ch-mission-points-stepper__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ch-mission-points-stepper__value {
	min-width: 3.5ch;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-display);
	line-height: 1;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ch-mission-points-stepper__arrow {
	display: block;
	width: 0;
	height: 0;
}

.ch-mission-points-stepper__arrow--left {
	border-top: 0.5rem solid transparent;
	border-bottom: 0.5rem solid transparent;
	border-right: 0.75rem solid #fff;
}

.ch-mission-points-stepper__arrow--right {
	border-top: 0.5rem solid transparent;
	border-bottom: 0.5rem solid transparent;
	border-left: 0.75rem solid #fff;
}

.ch-mission-msg {
	margin: 0.35rem 0 0;
	min-height: 1.25em;
	font-size: 0.82rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.88);
}

.ch-swipe-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.45rem;
}

.ch-mission-current-state {
	margin: 0;
	font-size: 0.82rem;
	opacity: 0.95;
}

.ch-hidden {
	display: none !important;
}

/* Public tablet ideas explorer (/ideas) */
html.ch-doc:has(body.ch-page.ch-ideas-explorer) {
	background-color: #0a162f;
}

.ch-page.ch-ideas-explorer {
	background-color: #0a162f;
}

.ch-page.ch-ideas-explorer .ch-content {
	padding: 1.25rem 1.1rem 0;
	min-height: 100vh;
	min-height: 100dvh;
}

/* Niente “buco” tra main e footer: il body non cresce a vuoto; il footer usa margin-top:auto. */
.ch-page.ch-ideas-explorer .ch-content__body {
	flex: 0 0 auto;
}

.ch-page.ch-app:has(main[data-page="missions-explore"]) .ch-bg {
	background-image: url("/img/BG-profilo-logo.jpg");
	background-size: 100% auto;
	background-position: center top;
	background-repeat: no-repeat;
	background-color: #0d244f;
}

.ch-page.ch-app:has(main[data-page="missions-explore"]) .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0,
		transparent max(88vh, 880px),
		rgba(10, 22, 52, 0.45) max(96vh, 980px),
		#0d244f max(108vh, 1120px),
		#0d244f 100%
	);
}

/* Mission detail: continue below hero with same tone as image bottom row. */
html.ch-doc:has(body.ch-page.ch-app main[data-page="mission-detail"]) {
	background-color: #144080;
}

.ch-page.ch-app:has(main[data-page="mission-detail"]) {
	background-color: #144080;
}

.ch-page.ch-app:has(main[data-page="mission-detail"]) .ch-bg {
	background-color: #144080;
}

.ch-page.ch-app:has(main[data-page="mission-detail"]) .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0,
		transparent max(88vh, 880px),
		rgba(20, 64, 128, 0.68) max(98vh, 1020px),
		#144080 max(108vh, 1120px),
		#144080 100%
	);
}

/* Footer mark (Cfooter): sotto la griglia senza spazio flex fantasma; ancorato in basso se la pagina è alta. */
.ch-page.ch-ideas-explorer .ch-footer-brand {
	display: flex;
	padding-top: 0.75rem;
	padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	margin-top: auto;
}

.ch-page.ch-ideas-explorer .ch-bg {
	background-image: url("/img/BG-login.jpg");
	filter: none;
	/* Bottom fill: dark navy sampled from lower area of BG-login.jpg */
	background-color: #0a162f;
	background-size: 100% auto;
	background-repeat: no-repeat;
	background-position: center top;
}

.ch-page.ch-ideas-explorer .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0,
		transparent max(80vh, 760px),
		rgba(8, 18, 42, 0.55) max(92vh, 920px),
		#0a162f max(104vh, 1040px),
		#0a162f 100%
	);
}

.ch-page.ch-ideas-explorer:has(main[data-event-phase]:not([data-event-phase="votazione"])) .ch-bg {
	background-size: cover;
	background-position: center center;
}

.ch-page.ch-ideas-explorer:has(main[data-event-phase]:not([data-event-phase="votazione"])) .ch-bg::after {
	background: linear-gradient(
		180deg,
		rgba(8, 18, 42, 0.45) 0%,
		rgba(8, 18, 42, 0.68) 55%,
		#0a162f 100%
	);
}

.ch-ideas-explorer-main {
	width: 100%;
	max-width: min(64rem, 100%);
	margin: 0 auto;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
}

.ch-ideas-explorer-main--standby {
	justify-content: center;
	align-items: center;
}

.ch-ideas-standby {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 72vh;
}

.ch-ideas-standby__logo {
	display: block;
	width: min(52vw, 16rem);
	height: auto;
	filter: drop-shadow(0 10px 32px rgba(0, 0, 0, 0.35));
}

.ch-ideas-screen {
	width: 100%;
}

.ch-ideas-screen--skills {
	max-width: min(26rem, 100%);
	margin: 0 auto;
}

.ch-ideas-skills-hero {
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 0.35rem;
}

.ch-ideas-skills-hero__logo {
	display: block;
	width: min(84vw, 17.5rem);
	height: auto;
	filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.35));
}

.ch-ideas-title {
	margin: 0 0 0.9rem;
	font-size: 1.25rem;
	line-height: 1.15;
	text-align: center;
}

.ch-ideas-title--small {
	margin-top: 0.25rem;
}

.ch-ideas-skill-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: stretch;
	gap: 0.95rem 0.8rem;
	margin-top: 1.1rem;
}

.ch-ideas-skill-box {
	appearance: none;
	font: inherit;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.44);
	background: linear-gradient(
		180deg,
		rgba(14, 36, 84, 0.58) 0%,
		rgba(14, 36, 84, 0.46) 100%
	);
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(4px);
	color: #fff;
	border-radius: 0.45rem;
	padding: 0.75rem 0.65rem;
	box-sizing: border-box;
	display: grid;
	gap: 0.4rem;
	text-align: center;
	align-content: center;
	justify-items: center;
	width: 100%;
	min-width: 0;
	min-height: 0;
	height: auto;
	aspect-ratio: 1;
	overflow: hidden;
}

.ch-ideas-skill-box__name {
	font-size: 1rem;
	font-weight: var(--ch-fw-display);
	line-height: 1.02;
	letter-spacing: 0.01em;
	text-wrap: balance;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	max-width: 100%;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ch-ideas-skill-box__count {
	font-size: 0.72rem;
	opacity: 0.95;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ch-ideas-screen--ideas {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: min(48rem, 100%);
	margin: 0 auto;
	text-align: center;
}

.ch-ideas-ideas-back {
	align-self: flex-start;
	margin-bottom: 0.5rem;
}

.ch-ideas-list-title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-display);
	line-height: 1.2;
	text-align: center;
	color: #fff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* Griglia idee /ideas: 3 colonne, card sempre visibili (niente stack sovrapposto). */
.ch-ideas-ideas-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.55rem;
	width: 100%;
	margin-top: 0.25rem;
	padding-bottom: 0.25rem;
	align-items: start;
}

.ch-ideas-ideas-grid .ch-mission-card {
	width: 100%;
	min-height: 0;
	margin: 0;
}

.ch-ideas-ideas-grid .ch-mission-card + .ch-mission-card {
	margin-top: 0;
}

.ch-mission-card.ch-mission-card--ideas-tile {
	appearance: none;
	font: inherit;
	cursor: pointer;
	text-align: left;
	display: block;
	box-sizing: border-box;
	padding: 0.45rem 0.5rem 0.55rem;
	border-radius: 14px;
}

.ch-ideas-ideas-grid .ch-mission-card__head {
	margin-bottom: 0.25rem;
}

.ch-ideas-ideas-grid .ch-mission-card__letter,
.ch-ideas-ideas-grid .ch-mission-card__num {
	font-size: 0.95rem;
}

.ch-ideas-ideas-grid .ch-mission-card__badge {
	height: 1.45rem;
}

.ch-ideas-ideas-grid .ch-mission-card__title {
	font-size: clamp(0.58rem, 2.1vw, 0.72rem);
	min-height: 0;
	line-height: 1.2;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Dettaglio idea /ideas: solo scheda + QR (una vista). */
.ch-ideas-screen--detail-mission {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: min(26rem, 100%);
	margin: 0 auto;
	padding: 0.25rem 0 1rem;
	box-sizing: border-box;
}

.ch-ideas-detail-mission-wrap {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	padding-top: 0.15rem;
}

.ch-ideas-detail-back {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	margin-bottom: 0;
}

.ch-ideas-detail-mission-sheet {
	position: relative;
	width: 100%;
	margin-top: 3.25rem;
	box-sizing: border-box;
	background: linear-gradient(180deg, #f8f9fb 0%, #e8ebf0 55%, #dfe3ea 100%);
	border: 1px solid rgba(100, 110, 125, 0.45);
	border-radius: 18px;
	box-shadow:
		0 6px 18px rgba(0, 0, 0, 0.22),
		0 1px 0 rgba(255, 255, 255, 0.85) inset;
	padding: 0.65rem 0.85rem 1.75rem;
	color: #111;
}

.ch-ideas-detail-mission-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.45rem;
}

.ch-ideas-detail-mission-lead {
	margin: 0 0 0.45rem;
	font-size: 1rem;
	font-weight: var(--ch-fw-strong);
	line-height: 1.35;
	color: #0a0a0a;
}

.ch-ideas-detail-mission-body {
	margin: 0;
	font-size: 0.92rem;
	font-weight: var(--ch-fw-body);
	line-height: 1.45;
	color: #1a1a1a;
	white-space: pre-wrap;
}

.ch-ideas-detail-mission-chevron {
	position: absolute;
	right: 0.65rem;
	bottom: 0.45rem;
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid #8a919b;
	border-bottom: 2px solid #8a919b;
	transform: rotate(45deg);
	opacity: 0.75;
}

.ch-ideas-detail-mission-qr {
	display: block;
	width: min(52vw, 11rem);
	height: auto;
	background: #fff;
	border-radius: 0.35rem;
	padding: 0.3rem;
	box-sizing: border-box;
}

.ch-ideas-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.ch-ideas-card {
	border: 2px solid color-mix(in srgb, var(--ch-skill-color), #fff 32%);
	background: color-mix(in srgb, var(--ch-skill-color), rgba(255, 255, 255, 0.14) 70%);
	color: #fff;
	border-radius: 0.8rem;
	padding: 0.8rem;
	text-align: left;
	display: grid;
	gap: 0.35rem;
	min-height: 9rem;
}

.ch-ideas-card__code {
	margin: 0;
	font-size: 0.82rem;
	font-weight: var(--ch-fw-strong);
	opacity: 0.92;
	letter-spacing: 0.03em;
}

.ch-ideas-card__title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: var(--ch-fw-display);
	line-height: 1.18;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ch-ideas-card__description {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.92);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ch-ideas-screen--detail {
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 0.8rem;
	min-height: calc(100vh - 4rem);
}

.ch-ideas-detail-card {
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-radius: 1rem;
	background: rgba(10, 24, 56, 0.62);
	padding: 1rem 1.05rem;
	overflow: auto;
}

.ch-ideas-detail-code,
.ch-ideas-detail-skill,
.ch-ideas-detail-author {
	margin: 0 0 0.3rem;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.92);
}

.ch-ideas-detail-title {
	margin: 0 0 0.55rem;
	font-size: 1.25rem;
	line-height: 1.2;
}

.ch-ideas-detail-description {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.4;
	white-space: pre-wrap;
}

.ch-ideas-qr-dock {
	margin: 0 auto;
	padding: 0.6rem;
	width: min(100%, 19rem);
	background: rgba(10, 24, 56, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 0.85rem;
	display: grid;
	justify-items: center;
	gap: 0.4rem;
}

.ch-ideas-qr-image {
	display: block;
	width: min(100%, 12rem);
	height: auto;
	background: #fff;
	border-radius: 0.4rem;
}

.ch-ideas-qr-help {
	margin: 0;
	font-size: 0.82rem;
	text-align: center;
}

.ch-ideas-empty {
	grid-column: 1 / -1;
	margin: 0.35rem 0 0;
	font-size: 0.95rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.9);
}

/* Onboarding: saluto, selfie, domande di profilo */
.ch-onboarding {
	width: 100%;
	max-width: min(22rem, 100%);
	margin-inline: auto;
	text-align: center;
}

.ch-onboarding-greet {
	margin: 1.5rem 0 0.35rem;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-strong);
	line-height: 1.2;
}

.ch-onboarding-start {
	margin: 0 0 1.25rem;
	font-size: 1.2rem;
	font-weight: var(--ch-fw-medium);
	opacity: 0.95;
}

.ch-onboarding-form {
	width: 100%;
	text-align: center;
	margin-top: 0.25rem;
}

.ch-profile-field {
	margin-top: 2.1rem;
}

.ch-profile-field label {
	display: block;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-body);
	line-height: 1.35;
	margin-bottom: 0.2rem;
	color: rgba(255, 255, 255, 0.92);
}

.ch-onboarding-form .ch-btn {
	margin-top: 3rem;
	width: 100%;
	max-width: 20rem;
	margin-inline: auto;
	display: block;
}

.ch-onboarding .ch-msg {
	text-align: center;
}

/* Messaggio successo salvataggio profilo: bianco, fade in/out, poi nascosto (JS). */
@keyframes ch-msg-profile-saved-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes ch-msg-profile-saved-out {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

.ch-msg.ch-msg--profile-saved {
	color: #fff;
	animation: ch-msg-profile-saved-in 0.55s ease-out forwards;
}

.ch-msg.ch-msg--profile-saved.ch-msg--profile-saved-hiding {
	animation: ch-msg-profile-saved-out 0.55s ease-in forwards;
}

/* Accoglienza: titolo sotto selfie, blocco SUPERPOTERI */
.ch-accoglienza-name {
	margin: 1rem 0 0;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-strong);
	line-height: 1.2;
	text-align: center;
}

.ch-accoglienza-superpoteri {
	margin-top: 1.25rem;
	padding: 0 0.25rem;
	text-align: center;
}

.ch-accoglienza-superpoteri__label {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-body);
	letter-spacing: 0.04em;
	line-height: 1.3;
}

.ch-accoglienza-superpoteri__text {
	margin: 0;
	font-size: 1rem;
	font-weight: var(--ch-fw-body);
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.9);
	white-space: pre-wrap;
}

/* Raise selfie for post-onboarding phases */
[data-event-phase="accoglienza"] .ch-photo-box,
[data-event-phase="brainstorming"] .ch-photo-box,
[data-event-phase="votazione"] .ch-photo-box,
[data-event-phase="working_on_ideas"] .ch-photo-box,
[data-event-phase="fine_evento"] .ch-photo-box {
	margin-top: 0.25rem;
}

/* Epic background only for accoglienza + brainstorming (transparent selfie) */
[data-event-phase="accoglienza"] .ch-photo-box,
[data-event-phase="brainstorming"] .ch-photo-box {
	background: url("/img/profilo-fase-2.png") center / cover no-repeat;
}

/* Landscape photo box for foto_super (3:2) */
.ch-photo-box--landscape {
	aspect-ratio: 2 / 3;
	border-radius: 18px;
}

/* Two-column profile: SUPERPOTERI + RICARICA */
.ch-profile-cols {
	display: flex;
	gap: 1rem;
	margin-top: 1.25rem;
	padding: 0 0.25rem;
	width: 100%;
	max-width: 20rem;
	margin-inline: auto;
}

.ch-profile-col {
	flex: 1 1 0;
	text-align: center;
	min-width: 0;
}

.ch-profile-col__ico {
	display: block;
	width: 3rem;
	height: 3rem;
	margin: 0 auto 0.4rem;
	object-fit: contain;
}

.ch-profile-col__label {
	margin: 0 0 0.35rem;
	font-size: 0.6rem;
	font-weight: var(--ch-fw-body);
	letter-spacing: 0.06em;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.9);
}

.ch-profile-col__text {
	margin: 0;
	font-size: 0.85rem;
	font-weight: var(--ch-fw-strong);
	line-height: 1.4;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.ch-brainstorm-cta {
	position: relative;
	z-index: 10;
	display: block;
	width: 100%;
	max-width: min(22rem, 100%);
	margin: 1.75rem auto 0;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
}

/* Brainstorming — “Le tue missioni” (layout profilo_idee) */
.ch-missions-heading {
	margin: 2rem 0 0;
	font-family: var(--ch-font);
	font-size: 1.25rem;
	font-weight: var(--ch-fw-display);
	font-style: italic;
	letter-spacing: 0.04em;
	text-align: center;
	color: #fff;
	line-height: 1.2;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.ch-missions-empty {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
	font-weight: var(--ch-fw-body);
	line-height: 1.4;
	text-align: center;
	color: rgba(255, 255, 255, 0.82);
	max-width: min(22rem, 100%);
	margin-inline: auto;
}

.ch-missions-stack {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: min(22rem, 100%);
	margin: 1.5rem auto 0;
	padding: 0.5rem 0.2rem 1rem;
	box-sizing: border-box;
	isolation: isolate;
}

.ch-mission-card {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	margin: 0;
	height: 510px;
	padding: 0.6rem 0.9rem 1rem;
	border-radius: 18px;
	border: 5px solid #707070;
	background: linear-gradient(180deg, #f6f7f9 0%, #e4e7ec 55%, #dcdfe5 100%);
	box-shadow:
		0 3px 10px rgba(0, 0, 0, 0.18),
		0 1px 0 rgba(255, 255, 255, 0.75) inset;
	text-decoration: none;
	color: #111;
	overflow: hidden;
	box-sizing: border-box;
}

.ch-mission-card + .ch-mission-card {
	margin-top: -28rem;
}

.ch-mission-card:last-child {
	margin-bottom: 0;
}

.ch-mission-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.45rem;
	gap: 0.5rem;
}

.ch-mission-card__code {
	display: inline-flex;
	align-items: center;
	gap: 0.12rem;
	line-height: 1;
}

.ch-mission-card__letter,
.ch-mission-card__num {
	font-family: var(--ch-font);
	font-size: 1.45rem;
	font-weight: var(--ch-fw-display);
	font-style: normal;
	line-height: 1;
	letter-spacing: 0.02em;
}

.ch-mission-card__letter {
	color: #0a0a0a;
}

.ch-mission-card__num {
	color: #6a737d;
}

.ch-mission-card__badge {
	display: block;
	flex-shrink: 0;
	height: 1.95rem;
	width: auto;
	object-fit: contain;
	object-position: center;
}

.ch-mission-card__title {
	margin: 0;
	font-family: var(--ch-font);
	font-size: 1rem;
	font-weight: var(--ch-fw-display);
	font-style: normal;
	line-height: 1.3;
	letter-spacing: 0.01em;
	color: #0a0a0a;
	overflow-wrap: anywhere;
	max-width: 100%;
	flex-shrink: 0;
}

.ch-missions-stack > .ch-mission-card .ch-mission-card__desc {
	margin: 0.4rem 0 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #333;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	flex: 1 1 0;
	min-height: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 16;
	line-clamp: 16;
}

.ch-mission-card--detail .ch-mission-card__title {
	font-size: 1.25rem;
	line-height: 1.25;
}

/* Titolo fase sotto saluto/selfie (stesso blocco dell’onboarding) */
.ch-onboarding .ch-phase-main {
	margin-top: 0.75rem;
	padding: 1rem 0.25rem 1.5rem;
	text-align: center;
}

/* Placeholder home for non–accoglienza event phases */
.ch-phase-main {
	max-width: min(22rem, 100%);
	margin-inline: auto;
	padding: 1.25rem 1rem 2rem;
	text-align: center;
}

.ch-phase-title {
	font-size: 1.25rem;
	font-weight: var(--ch-fw-display);
	letter-spacing: 0.02em;
	margin: 0 0 0.65rem;
	line-height: 1.25;
}

.ch-phase-lead {
	margin: 0;
	font-size: 0.95rem;
	font-weight: var(--ch-fw-body);
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.88);
}

.ch-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Pagina nuova idea (brainstorming): sfondo dedicato, card bianca, skill grid */
.ch-page.ch-idea-new .ch-bg {
	background-image: url("/img/BG-profilo.jpg");
	filter: none;
	background-color: #0a1638;
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
}

.ch-page.ch-idea-new .ch-bg::after {
	background: linear-gradient(
		180deg,
		transparent 0%,
		transparent 35%,
		rgba(8, 18, 48, 0.85) 100%
	);
}

.ch-page.ch-idea-new .ch-footer-brand {
	display: none;
}

/* Idea form: almeno un’altezza schermo; il contenuto (descrizione) allunga la pagina senza scroll interno. */
.ch-page.ch-idea-new {
	min-height: 100dvh;
	min-height: 100svh;
}

.ch-page.ch-idea-new .ch-content {
	min-height: 100dvh;
	min-height: 100svh;
}

.ch-page.ch-idea-new .ch-content__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ch-idea-new-main {
	flex: 1 1 auto;
	width: 100%;
	max-width: min(22rem, 100%);
	margin-inline: auto;
	padding: 0.25rem 0 1.5rem;
	box-sizing: border-box;
	text-align: left;
	align-self: center;
}

.ch-idea-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
}

button.ch-idea-back {
	appearance: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font: inherit;
}

.ch-idea-back img {
	display: block;
	width: 2.4rem;
	height: auto;
}

.ch-ideas-detail-back.ch-idea-back {
	margin-bottom: 0;
}

.ch-idea-card {
	background: #fff;
	border-radius: 18px;
	border: 5px solid #707070;
	padding: 1rem 1rem 1.1rem;
	box-sizing: border-box;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.ch-idea-card__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.65rem;
}

.ch-idea-card__code {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 1.35rem;
	font-weight: var(--ch-fw-strong);
	color: #111;
	letter-spacing: 0.02em;
	line-height: 1;
}

.ch-idea-card__letter,
.ch-idea-card__num {
	font-family: var(--ch-font);
	font-size: 1.45rem;
	font-weight: var(--ch-fw-display);
	font-style: normal;
	line-height: 1;
	letter-spacing: 0.02em;
}

.ch-idea-card__letter {
	color: #0a0a0a;
}

.ch-idea-card__num {
	color: #6a737d;
}

.ch-idea-card__badge {
	display: block;
	flex-shrink: 0;
	height: 2.05rem;
	width: auto;
	object-fit: contain;
	object-position: center;
}

.ch-idea-field {
	display: block;
	margin: 0;
}

.ch-idea-field--title {
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	padding-bottom: 0.35rem;
	margin-bottom: 0.5rem;
}

.ch-idea-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	border: none;
	background: transparent;
	font: inherit;
	color: #222;
	min-height: 0;
}

.ch-idea-input::placeholder {
	color: rgba(0, 0, 0, 0.38);
}

.ch-idea-input--title {
	font-size: 1.05rem;
	font-weight: var(--ch-fw-strong);
	padding: 0.2rem 0;
}

.ch-idea-input--desc {
	font-size: 0.95rem;
	font-weight: var(--ch-fw-body);
	min-height: 3.25rem;
	line-height: 1.45;
	padding: 0.2rem 0;
	resize: none;
	overflow: hidden;
}

.ch-idea-league-title {
	margin: 1.25rem 0 0.65rem;
	font-size: 1.25rem;
	font-weight: var(--ch-fw-strong);
	text-align: center;
	color: rgba(255, 255, 255, 0.98);
	line-height: 1.3;
}

.ch-idea-skills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.ch-idea-skill {
	flex: 1 1 calc(33.333% - 0.35rem);
	min-width: min(100%, 7.5rem);
	padding: 0.55rem 0.4rem;
	font: inherit;
	font-size: 0.72rem;
	font-weight: var(--ch-fw-medium);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-align: center;
	color: #fff;
	background: rgba(12, 32, 72, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 4px;
	cursor: pointer;
	box-sizing: border-box;
	line-height: 1.25;
}

.ch-idea-skill--selected {
	background: rgba(255, 255, 255, 0.22);
	border-color: #fff;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.ch-idea-skills-empty {
	margin: 0;
	text-align: center;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.88);
}

.ch-idea-msg {
	margin-top: 1rem;
	text-align: center;
}

.ch-idea-submit {
	display: block;
	width: 100%;
	max-width: 20rem;
	margin: 1.25rem auto 0;
}

/* Desktop: scala globale ~75% (come zoom browser), login/app e admin che importano questo file. */
@media (min-width: 900px) {
	html.ch-doc,
	html.adm-doc {
		zoom: 0.75;
	}

	/*
	 * Login: con `zoom` su html l’area layout è “più bassa” del viewport visivo — alziamo il minimo
	 * così colonna + sfondo coprono sempre tutta l’altezza (o oltre con scroll), mai a metà schermo.
	 */
	.ch-page.ch-login {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-login .ch-bg {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-login .ch-content {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-login .ch-content__body {
		flex: 1 1 0%;
		min-height: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	/* Admin: stesso zoom su `html` — altezza minima come login così il footer resta in basso nel viewport. */
	body.adm-page {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-login .ch-login-body {
		flex: 1 1 auto;
		width: 100%;
		max-width: min(22rem, 100%);
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-bottom: 1.5rem;
	}

	.ch-page.ch-idea-new {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-idea-new .ch-bg {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-idea-new .ch-content {
		min-height: calc(100vh / 0.75);
		min-height: calc(100dvh / 0.75);
		min-height: calc(100svh / 0.75);
	}

	.ch-page.ch-idea-new .ch-content__body {
		flex: 1 1 0%;
		min-height: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}
