/* ============================================================
   JCA Widgets — Base structural CSS (only structure, NO design)
   Tutto colore/sfondo/padding/border/dimensioni viene dai
   controlli Stile di Elementor. Qui solo comportamento + reset.
   ============================================================ */

/* === Archetype Quiz === */
.jca-aq { width: 100%; margin: 0 auto; }
.jca-aq .jca-aq-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
@media (max-width: 767px) {
	.jca-aq .jca-aq-grid {
		grid-template-columns: 1fr;
	}
}
.jca-aq .jca-aq-option {
	cursor: pointer;
	font: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	white-space: normal;
	word-break: break-word;
	overflow-wrap: break-word;
	box-sizing: border-box;
}
.jca-aq .jca-aq-option-label {
	display: block;
	line-height: 1.4;
	white-space: normal;
	word-break: break-word;
	overflow-wrap: break-word;
	min-width: 0;
	max-width: 100%;
}

/* === Truth Quiz === */
.jca-tq { width: 100%; margin: 0 auto; }

.jca-tq-timer { text-align: center; margin-bottom: 16px; font-weight: 700; }
.jca-tq-timer-count { font-variant-numeric: tabular-nums; }
.jca-tq .jca-tq-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
@media (max-width: 767px) {
	.jca-tq .jca-tq-grid {
		grid-template-columns: 1fr;
	}
}
.jca-tq .jca-tq-option {
	cursor: pointer;
	font: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.jca-tq .jca-tq-option:disabled { cursor: default; }
.jca-tq .jca-tq-option.jca-tq-correct::before { content: "✓ "; font-weight: 700; margin-right: 6px; }
.jca-tq .jca-tq-option.jca-tq-wrong::before   { content: "✗ "; font-weight: 700; margin-right: 6px; }

/* Blocco testo dentro l'option: title + desc impilati */
.jca-tq .jca-tq-option-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.jca-tq .jca-tq-option-title {
	display: block;
	font-weight: 700;
	line-height: 1.3;
}
.jca-tq .jca-tq-option-desc {
	display: block;
	margin-top: 4px;
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.4;
}

/* === Drag & Drop === */
.jca-dd {
	width: 100%;
	margin: 0 auto;
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	-webkit-touch-callout: none !important;
}
/* Nessun discendente selezionabile: copre item-text/title/num/label/grip ecc. */
.jca-dd * {
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	-webkit-touch-callout: none !important;
}
.jca-dd-timer { text-align: center; margin-bottom: 12px; font-weight: 700; }
.jca-dd-timer-count { font-variant-numeric: tabular-nums; margin: 0 4px 0 8px; }
.jca-dd-timer-unit { font-size: 0.85em; opacity: 0.8; }
.jca-dd-headers {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.jca-dd-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
/* D&D con numerazione + 2 colonne: forza ordine sx→dx per le righe (01,02,03 sx | 04,05,06 dx).
   Attivo solo quando il widget è impostato a 2 colonne sul breakpoint corrente.
   Su tablet/mobile il reset sotto rimette il flusso normale row-by-row. */
.jca-dd-list--numbered.jca-dd-list--cols-2 {
	grid-auto-flow: column;
	grid-template-rows: repeat(var(--jca-dd-rows, 1), auto);
}
/* Reset su tablet e mobile: se l'utente ha messo "1 colonna" via Elementor responsive,
   il --cols-2 viene applicato al markup ma deve essere neutralizzato sotto 1025px. */
@media (max-width: 1024px) {
	.jca-dd-list--numbered.jca-dd-list--cols-2 {
		grid-auto-flow: row;
		grid-template-rows: none;
	}
}
.jca-dd-item {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: grab;
	user-select: none !important;
	-webkit-user-select: none !important;
	touch-action: none !important; /* niente scroll/selezione nativa durante il drag */
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
/* I figli (testo, numero, grip) non catturano il pointer: il drag parte
   sempre dall'item e il browser non avvia la selezione del testo. */
.jca-dd-item .jca-dd-num,
.jca-dd-item .jca-dd-grip,
.jca-dd-item .jca-dd-label,
.jca-dd-item .jca-dd-item-text,
.jca-dd-item .jca-dd-item-title,
.jca-dd-item .jca-dd-item-desc,
.jca-dd-item .jca-dd-item-text * {
	pointer-events: none !important;
	user-select: none !important;
	-webkit-user-select: none !important;
}
/* Bottoni up/down restano cliccabili */
.jca-dd-item .jca-dd-controls,
.jca-dd-item .jca-dd-btn {
	pointer-events: auto !important;
}
.jca-dd-item:active,
.jca-dd-item.jca-dd-dragging {
	cursor: grabbing;
	opacity: 0.7;
	transform: scale(1.02);
}
.jca-dd-item.jca-dd-drag-over { border-top: 3px dashed currentColor; }
.jca-dd-grip { font-size: 1.1rem; opacity: 0.4; flex-shrink: 0; }
.jca-dd-label { flex: 1 1 auto; }
.jca-dd-controls { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.jca-dd-btn {
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	transition: background 0.15s ease;
}
.jca-dd-btn:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 540px) {
	.jca-dd-grip { display: none; }
	.jca-dd-controls { flex-direction: row; }
}

.jca-dd.is-locked .jca-dd-item { cursor: default; }
.jca-dd.is-locked .jca-dd-item:active,
.jca-dd.is-locked .jca-dd-item.jca-dd-dragging { transform: none; }
.jca-dd.is-locked .jca-dd-controls { display: none; }
.jca-dd.is-locked [draggable="true"] { pointer-events: none; }

.jca-dd-confirm-wrap { display: flex; justify-content: center; margin-top: 18px; }
.jca-dd-confirm {
	border: 0;
	cursor: pointer;
	font: inherit;
	transition: opacity 0.2s ease, transform 0.15s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.jca-dd-confirm.is-disabled,
.jca-dd-confirm:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================ */
/*  Truth Quiz Sequence                                          */
/* ============================================================ */

.jca-tqseq {
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: relative;
}

.jca-tqseq-empty {
	padding: 24px;
	text-align: center;
	opacity: 0.7;
}

.jca-tqseq-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.jca-tqseq-counter {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	font-size: 18px;
}

.jca-tqseq-timer {
	width: 64px;
	height: 64px;
	position: relative;
	flex-shrink: 0;
}
.jca-tqseq-timer svg {
	width: 100%;
	height: 100%;
	display: block;
}
.jca-tqseq-timer-track,
.jca-tqseq-timer-progress {
	transition: stroke-dashoffset 0.1s linear;
}
.jca-tqseq-timer-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	font-size: 18px;
}

.jca-tqseq-card {
	background: rgba(255, 255, 255, 0.95);
	color: #143A5A;
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.jca-tqseq-card.is-leaving {
	opacity: 0;
	transform: translateY(-8px);
}
.jca-tqseq-card.is-entering {
	opacity: 0;
	transform: translateY(8px);
	animation: jca-tqseq-enter 0.35s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes jca-tqseq-enter {
	to { opacity: 1; transform: translateY(0); }
}

.jca-tqseq-q-text {
	margin: 0;
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.4;
}

.jca-tqseq-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.jca-tqseq-btn {
	display: inline-block;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.jca-tqseq-btn:disabled {
	cursor: default;
}
.jca-tqseq-btn.is-correct,
.jca-tqseq-btn.is-correct-reveal {
	animation: jca-tqseq-pulse 0.4s ease;
}
.jca-tqseq-btn.is-wrong {
	animation: jca-tqseq-shake 0.4s ease;
}
@keyframes jca-tqseq-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.04); }
}
@keyframes jca-tqseq-shake {
	0%, 100% { transform: translateX(0); }
	25%      { transform: translateX(-4px); }
	75%      { transform: translateX(4px); }
}

/* Streak burst */
.jca-tqseq-streak-burst {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.4);
	background: linear-gradient(135deg, #FF9F1C, #F5A623);
	color: #fff;
	padding: 16px 28px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 1.4rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	box-shadow: 0 12px 40px rgba(245, 166, 35, 0.5);
	pointer-events: none;
	opacity: 0;
	z-index: 100;
	white-space: nowrap;
}
.jca-tqseq-streak-burst.is-active {
	animation: jca-tqseq-streak-burst 2.2s cubic-bezier(.22, 1, .36, 1) forwards;
}
.jca-tqseq-streak-label {
	font-size: 0.85em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.jca-tqseq-streak-points {
	font-size: 1.4em;
	line-height: 1;
}
@keyframes jca-tqseq-streak-burst {
	0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-8deg); }
	15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); }
	30%  { transform: translate(-50%, -50%) scale(1) rotate(0); }
	75%  { opacity: 1; transform: translate(-50%, -100%) scale(1) rotate(0); }
	100% { opacity: 0; transform: translate(-50%, -160%) scale(0.9) rotate(0); }
}

/* Final summary */
.jca-tqseq-final {
	text-align: center;
	padding: 32px 16px;
}
.jca-tqseq-final-title {
	margin: 20px 0 12px 0;
	font-weight: 800;
	font-size: 1.6rem;
}
.jca-tqseq-final-subtitle {
	margin: 0;
	font-size: 1rem;
	opacity: 0.9;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.jca-tqseq-card,
	.jca-tqseq-btn,
	.jca-tqseq-streak-burst {
		animation: none !important;
		transition: none !important;
	}
	.jca-tqseq-streak-burst.is-active {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

/* Points burst (per ogni risposta corretta) — più piccolo e veloce dello streak */
.jca-tqseq-points-burst {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.6);
	background: #22C55E;
	color: #fff;
	padding: 10px 20px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 1.4rem;
	box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45);
	pointer-events: none;
	opacity: 0;
	z-index: 90;
	white-space: nowrap;
}
.jca-tqseq-points-burst.is-active {
	animation: jca-tqseq-points-burst 1.3s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes jca-tqseq-points-burst {
	0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
	20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
	35%  { transform: translate(-50%, -50%) scale(1); }
	75%  { opacity: 1; transform: translate(-50%, -90%) scale(1); }
	100% { opacity: 0; transform: translate(-50%, -130%) scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
	.jca-tqseq-points-burst.is-active {
		animation: none !important;
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

/* ============================================================ */
/*  Truth Quiz Sequence — Final screen FX                        */
/* ============================================================ */

/* Title bounce-in */
.jca-tqseq-final-title {
	animation: jca-tqseq-final-title-in 0.6s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes jca-tqseq-final-title-in {
	0%   { opacity: 0; transform: translateY(-30px) scale(0.85); }
	60%  { opacity: 1; transform: translateY(4px) scale(1.05); }
	100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stars row */
.jca-tqseq-final-stars {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 14px 0;
}
.jca-tqseq-star {
	display: inline-flex;
	width: 32px;
	height: 32px;
	color: #FFD23F;
	opacity: 0;
	transform: scale(0.3) rotate(-30deg);
	animation: jca-tqseq-star-pop 0.5s cubic-bezier(.34, 1.56, .64, 1) forwards;
	filter: drop-shadow(0 2px 6px rgba(255, 210, 63, 0.5));
}
.jca-tqseq-star svg { width: 100%; height: 100%; }
@keyframes jca-tqseq-star-pop {
	0%   { opacity: 0; transform: scale(0.3) rotate(-30deg); }
	60%  { opacity: 1; transform: scale(1.2) rotate(8deg); }
	100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Dots row */
.jca-tqseq-final-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 14px 0;
}
.jca-tqseq-dot {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: rgba(20, 58, 90, 0.15);
	transition: background 0.25s ease, transform 0.25s ease;
}
.jca-tqseq-dot.is-revealed {
	transform: scale(1.2);
	animation: jca-tqseq-dot-pop 0.35s ease-out forwards;
}
@keyframes jca-tqseq-dot-pop {
	0%   { transform: scale(1); }
	60%  { transform: scale(1.4); }
	100% { transform: scale(1); }
}

/* Animated score */
.jca-tqseq-final-score-wrap {
	margin: 18px 0 8px 0;
}
.jca-tqseq-final-score {
	display: inline-block;
	font-size: 3rem;
	font-weight: 900;
	color: #FF9F1C;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	text-shadow: 0 4px 16px rgba(255, 159, 28, 0.3);
}

/* Perfect burst (più grande dello streak) */
.jca-tqseq-perfect-burst {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.3);
	background: linear-gradient(135deg, #FFD23F 0%, #FF9F1C 50%, #FF6B6B 100%);
	color: #fff;
	padding: 22px 40px;
	border-radius: 999px;
	font-weight: 900;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	box-shadow: 0 20px 60px rgba(255, 159, 28, 0.6),
	            0 0 0 4px rgba(255, 255, 255, 0.4);
	pointer-events: none;
	opacity: 0;
	z-index: 200;
	white-space: nowrap;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.jca-tqseq-perfect-burst.is-active {
	animation: jca-tqseq-perfect-burst 2.8s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
.jca-tqseq-perfect-label {
	font-size: 2rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
}
.jca-tqseq-perfect-points {
	font-size: 1.6em;
	line-height: 1;
}
@keyframes jca-tqseq-perfect-burst {
	0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-15deg); }
	15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(5deg); }
	30%  { transform: translate(-50%, -50%) scale(1.05) rotate(-2deg); }
	45%  { transform: translate(-50%, -50%) scale(1.1) rotate(0); }
	85%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95) rotate(0); }
}

/* Confetti */
.jca-tqseq-confetti {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 80;
}
.jca-tqseq-confetti-piece {
	position: absolute;
	top: -20px;
	width: 10px;
	height: 14px;
	border-radius: 2px;
	opacity: 0;
	animation: jca-tqseq-confetti-fall linear forwards;
}
@keyframes jca-tqseq-confetti-fall {
	0%   { opacity: 1; top: -30px; }
	100% { opacity: 0; top: 110%; transform: rotate(720deg); }
}

/* Reduced motion: tutto istantaneo */
@media (prefers-reduced-motion: reduce) {
	.jca-tqseq-final-title,
	.jca-tqseq-star,
	.jca-tqseq-dot,
	.jca-tqseq-perfect-burst.is-active,
	.jca-tqseq-confetti-piece {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* =============================================================
   Reward scene (fine Truth Quiz Sequence)
   ============================================================= */

.jca-tqseq-final--reward {
	padding: 0;
	text-align: center;
}

.jca-tqseq-reward-scene {
	position: relative;
	width: 100%;
	max-width: 1200px;
	aspect-ratio: 2 / 1;
	margin: 0 auto;
	overflow: visible;
	background: transparent;
	font-family: 'Montserrat', sans-serif;
}

.jca-tqseq-layer {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
}

/* Le animazioni partono SOLO quando .is-active è applicata (al show della scena),
   altrimenti partirebbero al load della pagina mentre la scena è ancora hidden. */
.jca-tqseq-shield {
	top: 50%;
	width: 45%;
	max-width: 540px;
	transform: translate(-50%, -50%);
	z-index: 1;
}
.jca-tqseq-final--reward.is-active .jca-tqseq-shield {
	animation: jca-tqseq-rise-fade-shield 1s forwards 0.3s;
}

.jca-tqseq-coins {
	top: 50%;
	width: 38%;
	max-width: 480px;
	z-index: 10;
	transform: translate(-50%, 30%);
}
.jca-tqseq-final--reward.is-active .jca-tqseq-coins {
	animation: jca-tqseq-fade-in-coins 1s forwards 1.2s;
}

.jca-tqseq-crown {
	top: 50%;
	width: 25%;
	max-width: 300px;
	transform: translate(-50%, -180%);
	z-index: 2;
}
.jca-tqseq-final--reward.is-active .jca-tqseq-crown {
	animation: jca-tqseq-crown-drop 1s forwards 2.2s;
}

.jca-tqseq-final--reward .jca-tqseq-rays {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	max-width: 1200px;
	aspect-ratio: 1;
	transform: translate(-50%, -50%) scale(0.5);
	opacity: 0;
	mix-blend-mode: screen;
	z-index: 0;
}
.jca-tqseq-final--reward.is-active .jca-tqseq-rays {
	animation:
		jca-tqseq-rays-in 1.2s forwards,
		jca-tqseq-rays-rotate 10s linear infinite;
	animation-delay: 3s, 4.2s;
}

/* Numero punteggio: centrato esattamente dentro il cerchio dello scudo */
.jca-tqseq-final--reward .jca-tqseq-final-score-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
}

.jca-tqseq-final--reward .jca-tqseq-final-score {
	font-size: 70px;
	margin-top: -30px;
	display: inline-block;
	font-weight: 700;
	color: #fff;
	opacity: 0;
	text-shadow:
		0 0 10px rgba(255, 255, 255, 0.9),
		0 0 20px rgba(255, 255, 255, 0.8),
		0 0 40px rgba(255, 215, 0, 0.7),
		0 0 80px rgba(255, 140, 0, 0.5);
}
.jca-tqseq-final--reward.is-active .jca-tqseq-final-score {
	animation: jca-tqseq-score-appear 0.6s forwards 2.8s, jca-tqseq-glow-pulse 2.5s ease-in-out infinite 3.4s;
}

.jca-tqseq-sparkle {
	position: absolute;
	width: 10px;
	height: 10px;
	background: radial-gradient(circle, #fff, rgba(255, 255, 255, 0));
	border-radius: 50%;
	filter: blur(4px);
	opacity: 0;
	pointer-events: none;
	animation: jca-tqseq-sparkle 1.4s ease;
	z-index: 11;
}

/* Stats: corrette / sbagliate */
.jca-tqseq-final-stats {
	display: flex;
	justify-content: center;
	gap: 48px;
	margin: 24px auto 12px;
	flex-wrap: wrap;
}

.jca-tqseq-final-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.jca-tqseq-final-stat-value {
	font-size: 2rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.jca-tqseq-final-stat--correct .jca-tqseq-final-stat-value,
.jca-tqseq-final-stat--wrong   .jca-tqseq-final-stat-value {
	color: inherit;
}

.jca-tqseq-final-stat-label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	opacity: 0.75;
}

/* Animazioni */
@keyframes jca-tqseq-fade-in-coins {
	from { opacity: 0; transform: translate(-50%, 30%); }
	to   { opacity: 1; transform: translate(-50%, 30%); }
}

@keyframes jca-tqseq-rise-fade-shield {
	from { opacity: 0; transform: translate(-50%, -40%); }
	to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes jca-tqseq-crown-drop {
	0%   { opacity: 0; transform: translate(-50%, -260%); }
	100% { opacity: 1; transform: translate(-50%, -180%); }
}

@keyframes jca-tqseq-rays-in {
	to { opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
}

@keyframes jca-tqseq-rays-rotate {
	from { transform: translate(-50%, -50%) rotate(0deg); }
	to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes jca-tqseq-score-appear {
	from { opacity: 0; transform: scale(0.6); }
	to   { opacity: 1; transform: scale(1); }
}

@keyframes jca-tqseq-glow-pulse {
	0%, 100% {
		text-shadow:
			0 0 10px rgba(255, 255, 255, 0.8),
			0 0 30px rgba(255, 215, 0, 0.6),
			0 0 60px rgba(255, 140, 0, 0.4);
	}
	50% {
		text-shadow:
			0 0 20px rgba(255, 255, 255, 1),
			0 0 50px rgba(255, 215, 0, 0.9),
			0 0 100px rgba(255, 140, 0, 0.7);
	}
}

@keyframes jca-tqseq-sparkle {
	0%   { opacity: 0; transform: scale(0.5); }
	50%  { opacity: 1; transform: scale(1.4); }
	100% { opacity: 0; transform: scale(0.5); }
}

/* Reduced motion: disabilita le grandi animazioni della reward */
@media (prefers-reduced-motion: reduce) {
	.jca-tqseq-coins,
	.jca-tqseq-shield,
	.jca-tqseq-crown,
	.jca-tqseq-final--reward .jca-tqseq-rays,
	.jca-tqseq-final--reward .jca-tqseq-final-score {
		animation: none !important;
		opacity: 1 !important;
	}
	.jca-tqseq-shield        { transform: translate(-50%, -50%)  !important; }
	.jca-tqseq-coins         { transform: translate(-50%, 30%)   !important; }
	.jca-tqseq-crown         { transform: translate(-50%, -180%) !important; }
	.jca-tqseq-final--reward .jca-tqseq-rays { transform: translate(-50%, -50%) scale(1) !important; }
	.jca-tqseq-final--reward .jca-tqseq-final-score-wrap {
		transform: translate(-50%, -50%) !important;
	}
}

/* =============================================================
   Mobile — Truth Quiz Sequence (≤767px)   [v1.37.118]
   - Reward scene: l'anello (scudo) è in % della scena ma il numero
     era a 70px fissi → su mobile sembrava minuscolo dietro al numero.
     Scena resa più quadrata, layer ingranditi in proporzione, numero
     reso fluido (clamp) così rientra nell'anello.
   - Answer dots: prima andavano a capo (flex-wrap:wrap). Forzati su
     una sola riga e ridotti in proporzione al numero di pallini.
   ============================================================= */
@media (max-width: 767px) {
	.jca-tqseq-reward-scene {
		aspect-ratio: 1 / 1;
		max-width: 380px;
	}
	.jca-tqseq-shield { width: 96%; }
	.jca-tqseq-coins  { width: 66%; }
	.jca-tqseq-crown  { width: 48%; }
	.jca-tqseq-final--reward .jca-tqseq-final-score {
		font-size: clamp(40px, 12vw, 60px);
		margin-top: -16px;
	}

	/* Pallini sempre su una riga sola: si rimpiccioliscono se sono tanti */
	.jca-tqseq-final-dots {
		flex-wrap: nowrap;
		gap: clamp(3px, 1.4vw, 8px);
		max-width: 100%;
	}
	.jca-tqseq-final-dots .jca-tqseq-dot {
		width: clamp(7px, 2.6vw, 16px);
		height: clamp(7px, 2.6vw, 16px);
		flex: 0 1 auto;
		min-width: 0;
	}
	/* Lo scale del pop non deve riallargare il pallino oltre la riga */
	.jca-tqseq-final-dots .jca-tqseq-dot.is-revealed { transform: scale(1.15); }
}
