html,
body {
	min-height: 100%;
	background-color: #eaf9ff !important;
}

#page-container {
	min-height: 100vh !important;
	background: #eaf9ff url("../images/fondo.jpg") center/cover fixed no-repeat;
}

/* Cabecera adaptable: ejercicio, puntuación y reloj. */
#puntuacionFlotatenDivId {
	display: block !important;
	width: 100% !important;
}

#puntuacionFlotante {
	width: min(100%, 1200px) !important;
	margin: 0 auto;
	table-layout: fixed;
}

#puntuacionFlotante .tdPuntuacionFlotante {
	width: 33.333% !important;
	padding: clamp(2px, .6vw, 8px) !important;
	text-align: center;
	vertical-align: middle;
}

#puntuacionFlotante .containerContImage {
	display: inline-block;
	width: min(100%, clamp(104px, 16vw, 200px));
	line-height: 0;
}

#puntuacionFlotante .imagePuntuacionHeader {
	display: block;
	width: 100% !important;
	height: auto;
}

#puntuacionFlotante .texto-puntuacion,
#puntuacionFlotante .texto-tiempo {
	top: 50% !important;
	left: 68% !important;
	width: 56%;
	margin: 0;
	transform: translate(-50%, -50%) !important;
	font-family: 'Nunito', sans-serif;
	font-size: clamp(1rem, 2.4vw, 1.8rem) !important;
	font-weight: 900;
	line-height: 1;
	white-space: nowrap;
}

#puntuacionFlotante #contentNumPantalla {
	display: inline-block;
	width: clamp(52px, 7vw, 88px);
	line-height: 0;
}

#puntuacionFlotante .imageNumPantalla {
	display: block;
	width: 100% !important;
	height: auto;
}

#puntuacionFlotante .numPantalla {
	top: 50% !important;
	left: 50% !important;
	margin: 0;
	transform: translate(-50%, -50%) !important;
	font-size: clamp(1.65rem, 4vw, 3rem) !important;
	font-weight: 900;
	line-height: 1;
}

.skill-instruction { font-size: clamp(1.15rem, 2.6vw, 1.6rem); }
.carry-hint {
	min-height: 1.15em;
	padding-right: .28em;
	color: #1769e8;
	font-size: .42em;
	font-weight: 900;
	line-height: 1;
	text-align: right;
}
.missing-equation,
.number-chain,
.sequence-row,
.ordering-row,
.comparison-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(.4rem, 2vw, 1rem);
	justify-content: center;
	align-items: center;
	margin: 1rem auto;
	font-size: clamp(2.4rem, 8vw, 5rem);
	font-weight: 900;
}
.missing-equation .inputRespuesta,
.number-chain .inputRespuesta,
.sequence-row .inputRespuesta,
.ordering-row .inputRespuesta {
	width: 1.65em;
	font-size: inherit;
}
.two-groups {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: .7rem;
	align-items: center;
	max-width: 800px;
	margin: 1rem auto;
}
.skill-dots,
.subtraction-dots {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	justify-content: center;
	align-content: center;
	min-height: 95px;
	padding: .8rem;
	border: 3px solid rgba(21,94,239,.14);
	border-radius: 18px;
	background: rgba(255,255,255,.75);
}
.skill-dot {
	width: clamp(26px, 4.7vw, 43px);
	aspect-ratio: 1;
	border: 3px solid rgba(0,0,0,.1);
	border-radius: 50%;
	background: #ffb400;
	box-shadow: inset 0 -5px 0 rgba(0,0,0,.1);
}
.dots-second .skill-dot { background: #45aaf2; }
.small-plus { font-size: 2.8rem; font-weight: 900; text-align: center; }
.subtraction-dots { max-width: 780px; margin: 1rem auto; }
.skill-dot--removed { position: relative; opacity: .52; background: #9aa5b1; }
.skill-dot--removed::after { content: ""; position: absolute; top: 46%; left: -12%; width: 124%; height: 4px; border-radius: 3px; background: #c62828; transform: rotate(-35deg); }
.focus-number {
	display: inline-block;
	min-width: 2.2em;
	margin: .8rem auto;
	padding: .25rem .55rem;
	border-radius: 18px;
	color: #fff;
	background: #155eef;
	font-size: clamp(3.8rem, 12vw, 7rem);
	font-weight: 900;
}
.underlined-number u { text-decoration-color: #ffd93d; text-decoration-thickness: .14em; text-underline-offset: .12em; }
.sequence-number { padding: .2rem .4rem; border-radius: 12px; background: rgba(255,255,255,.8); }
.sequence-row { font-size: clamp(1.9rem, 5vw, 3.3rem); gap: clamp(.25rem, 1vw, .55rem); }
.sequence-arrow { color: #1769aa; }
.comparison-numbers { font-size: clamp(4rem, 15vw, 8rem); }
.comparison-gap { color: #d64545; }
.choice-grid { display: flex; gap: 1rem; justify-content: center; margin: 1rem auto; }
.comparison-choice {
	width: clamp(78px, 19vw, 125px);
	aspect-ratio: 1;
	border: 4px solid #1769aa;
	border-radius: 20px;
	color: #17324d;
	background: #fff;
	font-size: clamp(3rem, 10vw, 5rem);
	font-weight: 900;
	cursor: pointer;
}
.comparison-choice--selected { color: #fff; background: #1769aa; outline: 5px solid #ffcf33; }
.source-numbers { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin: 1rem auto; }
.source-numbers span { min-width: 2.1em; padding: .35rem .6rem; border-radius: 15px; color: #fff; background: #e85d75; font-size: clamp(2.4rem, 8vw, 4.5rem); font-weight: 900; }
.digit-value-answer { margin: 1rem 0; font-size: clamp(2rem, 7vw, 4rem); font-weight: 900; }
.digit-value-answer .inputRespuesta { width: 2.2em; font-size: inherit; }
.skill-solution { max-width: 850px; margin: 0 auto 1rem; padding: 1rem; border-radius: 18px; background: rgba(255,255,255,.75); font-size: clamp(1.2rem, 3vw, 1.8rem); }
.big-solution { font-size: clamp(2rem, 6vw, 3.6rem) !important; }
.borrow-steps { text-align: left; }

@media (max-width: 600px) {
	.two-groups { grid-template-columns: 1fr; }
	.two-groups .small-plus { line-height: .7; }
	.skill-dots { min-height: 0; }
	.sequence-row { gap: .3rem; font-size: clamp(1.8rem, 8vw, 3rem); }
	.sequence-arrow { font-size: .8em; }
	.ordering-row { font-size: clamp(2rem, 9vw, 3.3rem); }
	.choice-grid { gap: .55rem; }
}


/* Explicaciones guiadas para aprender del error */
.learning-guide {
	max-width: 820px;
	margin: 0 auto;
	text-align: left;
}

.learning-guide h3 {
	height: auto !important;
	margin: 0 0 .75rem !important;
	padding: 0 !important;
	text-align: center;
	font-size: clamp(1.3rem, 3vw, 1.85rem);
	line-height: 1.2;
}

.learning-guide > p {
	line-height: 1.45;
}

.learning-steps {
	margin: .45rem auto 1rem;
	padding-left: 1.75em;
	font-size: clamp(1.05rem, 2.25vw, 1.35rem);
	line-height: 1.42;
}

.learning-steps li {
	margin: .55rem 0;
	padding-left: .18rem;
}

.learning-steps li::marker {
	color: #1769e8;
	font-weight: 900;
}

.counting-groups {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: .75rem;
	margin: .75rem auto;
}

.counting-group {
	min-width: 0;
	text-align: center;
}

.counting-group p {
	margin: 0 0 .35rem;
	font-size: clamp(.9rem, 1.8vw, 1.05rem);
	font-weight: 800;
}

.counting-strip,
.subtraction-dots--teaching {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .38rem;
}

.counting-token {
	display: inline-grid;
	place-items: center;
	width: clamp(34px, 5.5vw, 46px);
	aspect-ratio: 1;
	border: 3px solid rgba(10, 59, 102, .25);
	border-radius: 50%;
	box-shadow: 0 3px 0 rgba(10, 59, 102, .2);
	font-size: clamp(1rem, 2.4vw, 1.35rem);
	font-weight: 900;
	line-height: 1;
}

.counting-token--first,
.counting-token--remaining {
	background: #ffb400;
	color: #10233f;
}

.counting-token--second {
	background: #45aaf2;
	color: #fff;
}

.counting-token--removed {
	background: #e7edf3;
	border-color: #9eabb8;
	box-shadow: none;
	color: #c83b4f;
}

.counting-plus {
	text-align: center;
	font-size: clamp(1.7rem, 4vw, 2.6rem);
	font-weight: 900;
}

.learning-equation,
.sequence-solution {
	margin: 1rem auto .35rem !important;
	padding: .65rem 1rem;
	border: 3px solid #1769e8;
	border-radius: 18px;
	background: #eef6ff;
	text-align: center;
	font-size: clamp(1.35rem, 3.5vw, 2rem);
	line-height: 1.25 !important;
}

.learning-tip {
	margin: .8rem auto 0 !important;
	padding: .7rem .9rem;
	border-left: 6px solid #f4a300;
	border-radius: 10px;
	background: #fff7d6;
	font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.number-path {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(.45rem, 2vw, 1rem);
	margin: 1rem auto !important;
	text-align: center;
	font-size: clamp(1.65rem, 5vw, 2.8rem);
}

.number-path span,
.number-path strong {
	display: inline-grid;
	place-items: center;
	min-width: 2.2em;
	padding: .25em .4em;
	border-radius: 14px;
	background: #eef6ff;
}

.number-path strong {
	background: #1769e8;
	color: #fff;
}

.place-value-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .55rem;
	margin: 1rem auto;
	text-align: center;
}

.place-value-cards span {
	display: grid;
	gap: .15rem;
	padding: .65rem .35rem;
	border: 2px solid #b8d4f6;
	border-radius: 14px;
	background: #f4f9ff;
}

.place-value-cards b {
	font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.place-value-cards small {
	font-size: clamp(.75rem, 1.8vw, 1rem);
	font-weight: 800;
}

.final-answer {
	margin-top: 1rem;
}

@media (max-width: 620px) {
	.counting-groups {
		grid-template-columns: 1fr;
		gap: .35rem;
	}

	.counting-plus {
		line-height: 1;
	}

	.learning-steps {
		padding-left: 1.45em;
	}
}
