.matecitos-adaptive-badge {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 2px solid #ffd34f;
  border-radius: 999px;
  color: #102343;
  display: inline-flex;
  font: 700 16px/1.2 system-ui, sans-serif;
  gap: .45rem;
  margin: .5rem auto .85rem;
  padding: .65rem 1rem;
  width: fit-content;
}

/* Capa visual común: conserva la plantilla y sus personajes, pero ordena el ejercicio. */
body {
  background-color: #cdefff !important;
  background-blend-mode: multiply;
}
#page-container { isolation: isolate; }
#page-container::before {
  background:
    radial-gradient(circle at 7% 16%, rgba(255, 211, 79, .34), transparent 23rem),
    radial-gradient(circle at 93% 12%, rgba(52, 183, 230, .3), transparent 27rem),
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(137, 218, 244, .12));
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}
#content {
  box-sizing: border-box;
  padding: clamp(.75rem, 2.5vh, 1.75rem) 1rem 2.25rem !important;
}
#ejerPrincipalId {
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 30px;
  box-shadow: 0 22px 55px rgba(33, 79, 112, .13), 0 2px 8px rgba(33, 79, 112, .08);
  box-sizing: border-box;
  max-width: 1100px;
  padding: clamp(1.25rem, 3vw, 2.5rem) !important;
}
#descriptionTitle {
  color: #102343;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  letter-spacing: .04em;
  line-height: 1.05;
  padding-bottom: clamp(1.35rem, 3vw, 2.5rem) !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .9);
}
#contentText {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 980px;
}
.backgroundInformationContent {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 30px;
  box-shadow: 0 22px 55px rgba(33, 79, 112, .13);
  box-sizing: border-box;
  margin: clamp(1rem, 4vh, 3rem) auto;
  max-width: 1050px;
  padding: clamp(1.25rem, 4vw, 3rem);
  width: calc(100% - 2rem);
}
#InfoPrincipal {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  padding: 0 0 4.5rem;
}
#InfoPrincipal h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  letter-spacing: .04em;
  line-height: 1.05;
  padding-bottom: 1.1rem !important;
}
#InfoPrincipal h2 {
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  letter-spacing: .025em;
  line-height: 1.25;
  padding-bottom: 1.4rem !important;
}
#InfoPrincipal h3 {
  font-size: clamp(.98rem, 1.7vw, 1.22rem);
  letter-spacing: .015em;
  line-height: 1.35;
  padding-bottom: .85rem !important;
}
#InfoPrincipal table { max-width: 850px; width: 100%; }
#InfoPrincipal td:first-child img {
  margin-top: -18px !important;
  width: 105px !important;
}
.matecitos-adaptive-badge small { color: #40516d; font-size: 13px; font-weight: 600; }
.matecitos-level-notice {
  background: #fff8d7;
  border: 3px solid #ffd34f;
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(16, 35, 67, .22);
  box-sizing: border-box;
  color: #102343;
  left: 50%;
  max-width: min(420px, calc(100vw - 2rem));
  opacity: 0;
  padding: .9rem 1.15rem;
  position: fixed;
  text-align: center;
  top: 1rem;
  transform: translate(-50%, -16px);
  transition: opacity .2s ease, transform .2s ease;
  width: max-content;
  z-index: 2147483647;
}
.matecitos-level-notice.is-visible { opacity: 1; transform: translate(-50%, 0); }
.matecitos-level-notice b,
.matecitos-level-notice span { display: block; font-family: system-ui, sans-serif; }
.matecitos-level-notice b { font-size: 19px; }
.matecitos-level-notice span { font-size: 14px; margin-top: .25rem; }
.matecitos-learning-report {
  background: linear-gradient(145deg, #fffaf0, #eef8ff);
  border: 2px solid #cfe6f4;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(16, 35, 67, .13);
  color: #102343;
  margin: 1rem auto;
  max-width: 680px;
  padding: 1.25rem;
  text-align: left;
}
.matecitos-learning-report__heading { align-items: center; display: flex; gap: .75rem; }
.matecitos-learning-report__heading > span { font-size: 2.2rem; }
.matecitos-learning-report__heading small { color: #087f8c; font: 800 12px/1.2 system-ui, sans-serif; letter-spacing: .08em; }
.matecitos-learning-report__heading h2 {
  color: #102343;
  font: 800 clamp(22px, 4vw, 30px)/1.1 system-ui, sans-serif;
  height: auto !important;
  letter-spacing: -.01em !important;
  margin: .15rem 0 0;
  padding-bottom: 0 !important;
}
.matecitos-learning-report__stats { display: grid; gap: .65rem; grid-template-columns: repeat(3, 1fr); margin: 1rem 0; }
.matecitos-learning-report__stats div { background: #fff; border: 1px solid #dceaf2; border-radius: 14px; padding: .8rem; text-align: center; }
.matecitos-learning-report__stats strong, .matecitos-learning-report__stats span { display: block; }
.matecitos-learning-report__stats strong { color: #0755b7; font: 800 21px/1.1 system-ui, sans-serif; }
.matecitos-learning-report__stats span { color: #40516d; font: 600 12px/1.25 system-ui, sans-serif; margin-top: .3rem; }
.matecitos-learning-report__message { font: 700 16px/1.45 system-ui, sans-serif; margin: .5rem 0; }
.matecitos-learning-report__skill { font: 600 14px/1.4 system-ui, sans-serif; margin: .5rem 0; text-transform: capitalize; }
.matecitos-learning-report__privacy { color: #607087; font: 500 12px/1.35 system-ui, sans-serif; margin: .75rem 0 0; }
.matecitos-learning-popup-active {
  bottom: 0;
  box-sizing: border-box;
  height: 100vh;
  overflow-y: auto;
  padding: 1rem;
}
.matecitos-learning-overlay-active { z-index: 2147483000 !important; }
.matecitos-learning-popup-active .content-popup {
  background-size: 100% 100%;
  box-sizing: border-box;
  margin-top: 0;
  max-width: 790px;
  min-height: 0;
  width: 100%;
}
.matecitos-learning-report--compact {
  border-radius: 16px;
  box-shadow: none;
  margin: .7rem auto;
  max-width: 650px;
  padding: .75rem 1rem;
}
.matecitos-learning-report--compact .matecitos-learning-report__heading > span { font-size: 1.45rem; }
.matecitos-learning-report--compact .matecitos-learning-report__heading h2 { font-size: 20px; }
.matecitos-learning-report--compact .matecitos-learning-report__stats { margin: .6rem 0; }
.matecitos-learning-report--compact .matecitos-learning-report__stats div { padding: .55rem; }
.matecitos-learning-report--compact .matecitos-learning-report__message,
.matecitos-learning-report--compact .matecitos-learning-report__skill { font-size: 13px; margin: .25rem 0; }
.matecitos-learning-report--compact .matecitos-learning-report__privacy { margin-top: .35rem; }
/* El naranja heredado no alcanza 3:1 sobre blanco. Este tono supera 4.5:1. */
#contentText [style*="#EFA94A"],
#contentText [style*="#efa94a"],
#contentTextRespuesta [style*="#EFA94A"],
#contentTextRespuesta [style*="#efa94a"] { color: #964900 !important; }
button:focus-visible, a:focus-visible, input:focus-visible, [role="button"]:focus-visible {
  box-shadow: 0 0 0 3px #fff !important;
  outline: 4px solid #062e6f !important;
  outline-offset: 3px !important;
}
button[aria-pressed="true"] {
  filter: drop-shadow(0 0 0.35rem rgba(6, 46, 111, .55));
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Marcador común: ejercicio, puntos y tiempo. */
#puntuacionFlotatenDivId {
  box-sizing: border-box;
  padding: clamp(.7rem, 2vw, 1.15rem) .75rem .35rem;
}
#puntuacionFlotante {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  max-width: 690px;
  width: min(100%, 690px) !important;
}
#puntuacionFlotante tr {
  display: grid;
  gap: clamp(.45rem, 1.5vw, .8rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#puntuacionFlotante .tdPuntuacionFlotante {
  min-width: 0;
  padding: 0 !important;
  width: auto !important;
}
#contentNumPantalla,
#puntuacionFlotante .contentNumPantalla {
  align-items: center;
  background: rgba(255, 255, 255, .94) !important;
  border: 1px solid #cfe3ef !important;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(16, 35, 67, .1);
  box-sizing: border-box;
  color: #102343;
  display: grid;
  gap: 0 .65rem;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto;
  height: 66px;
  margin: 0 !important;
  min-width: 0;
  padding: .55rem .8rem;
  position: relative;
  text-align: left;
  width: 100%;
}
#contentNumPantalla::before,
#puntuacionFlotante .contentNumPantalla::before {
  align-items: center;
  background: #ffe071;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 0 #e5a800, 0 0 0 1px #e5bd28;
  color: #102343;
  display: flex;
  font: 900 25px/1 system-ui, sans-serif;
  grid-row: 1 / 3;
  height: 42px;
  justify-content: center;
  width: 42px;
}
#contentNumPantalla::before { content: "1—10"; font-size: 10px; letter-spacing: -.03em; }
#puntuacionFlotante td:nth-child(2) .contentNumPantalla::before { content: "★"; }
#puntuacionFlotante td:nth-child(3) .contentNumPantalla::before {
  background: #a8e6f3;
  box-shadow: 0 3px 0 #3999b0, 0 0 0 1px #78c9db;
  content: "◷";
}
#contentNumPantalla::after,
#puntuacionFlotante .contentNumPantalla::after {
  color: #52627a;
  content: attr(data-hud-label);
  font: 800 11px/1 system-ui, sans-serif;
  grid-column: 2;
  grid-row: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#contentNumPantalla .imageNumPantalla,
#puntuacionFlotante .imagePuntuacionHeader { display: none !important; }
#contentNumPantalla .numPantalla,
#puntuacionFlotante .texto-puntuacion,
#puntuacionFlotante .texto-tiempo {
  align-self: start;
  color: #102343 !important;
  font: 900 21px/1.05 system-ui, sans-serif !important;
  grid-column: 2;
  grid-row: 2;
  left: auto !important;
  margin: 0 !important;
  position: static !important;
  text-align: left;
  transform: none !important;
}
#contentNumPantalla .numPantalla::after {
  color: #69788d;
  content: " de 10";
  font-size: 13px;
  font-weight: 700;
}

/* Resultado final: estrellas y datos con el mismo lenguaje visual. */
#popup .content-popup {
  background: linear-gradient(150deg, #fffdf6, #eef8ff) !important;
  border: 2px solid #d9eaf3;
  border-radius: 28px !important;
  box-shadow: 0 28px 80px rgba(6, 46, 111, .3) !important;
  box-sizing: border-box;
  max-width: min(790px, calc(100vw - 2rem));
}
.matecitos-result-title {
  border: 0 !important;
  color: #102343 !important;
  font: 900 clamp(26px, 5vw, 38px)/1.1 system-ui, sans-serif !important;
  letter-spacing: -.02em !important;
  margin: .6rem 0 0 !important;
  padding: 0 !important;
}
#popup .estrellas {
  filter: drop-shadow(0 8px 10px rgba(229, 168, 0, .24));
  margin: .55rem auto .25rem !important;
  max-width: 230px;
  width: 38vw !important;
}
#popup .textoPopUp {
  color: #52627a;
  font: 800 12px/1.2 system-ui, sans-serif !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#popup .containerPuntuacionEstrella {
  background: #fff;
  border: 1px solid #d8e7f0;
  border-radius: 14px;
  color: #102343 !important;
  min-width: 125px;
  padding: .65rem 1rem;
}
#popup .imagePuntuacion { display: none !important; }
#popup .puntuacionEstrellas {
  font: 900 21px/1 system-ui, sans-serif;
  left: auto !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
}
#popup #textoFinal {
  color: #102343;
  display: block;
  font: 800 18px/1.35 system-ui, sans-serif;
  margin: .85rem auto !important;
  max-width: 620px;
}
#popup .botonesPopUp {
  background: #fff;
  border: 2px solid #cfe3ef;
  border-radius: 18px;
  box-shadow: 0 7px 18px rgba(16, 35, 67, .1);
  box-sizing: content-box;
  margin: .45rem !important;
  padding: .65rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
#popup .botonesPopUp:hover { box-shadow: 0 10px 24px rgba(16, 35, 67, .16); transform: translateY(-2px); }

@media (max-width: 600px) {
  #puntuacionFlotatenDivId { padding: .45rem .35rem .2rem; }
  #puntuacionFlotante tr { gap: .3rem; }
  #contentNumPantalla,
  #puntuacionFlotante .contentNumPantalla {
    border-radius: 13px;
    gap: 0 .35rem;
    grid-template-columns: 34px 1fr;
    height: 56px;
    padding: .4rem .42rem;
  }
  #contentNumPantalla::before,
  #puntuacionFlotante .contentNumPantalla::before {
    font-size: 19px;
    height: 30px;
    width: 30px;
  }
  #contentNumPantalla::before { font-size: 8px; }
  #contentNumPantalla::after,
  #puntuacionFlotante .contentNumPantalla::after { font-size: 8px; letter-spacing: .045em; }
  #contentNumPantalla .numPantalla,
  #puntuacionFlotante .texto-puntuacion,
  #puntuacionFlotante .texto-tiempo { font-size: 16px !important; }
  #contentNumPantalla .numPantalla::after { font-size: 10px; }
  #popup .content-popup { margin-top: 1rem !important; padding: .65rem !important; }
  #popup .estrellas { max-width: 180px; width: 48vw !important; }
  #popup .botonesPopUp { max-height: 58px !important; }
}
@media (max-width: 600px) {
  #content { padding: .55rem .45rem 2rem !important; }
  #ejerPrincipalId { border-radius: 20px; padding: 1rem .65rem 1.25rem !important; }
  #descriptionTitle { font-size: clamp(1.8rem, 10vw, 2.7rem); letter-spacing: .025em; }
  .backgroundInformationContent { border-radius: 20px; margin: .65rem auto; padding: 1rem .75rem 1.25rem; width: calc(100% - 1rem); }
  #InfoPrincipal { align-items: flex-start; padding-bottom: 4rem; }
  #InfoPrincipal h1 { font-size: clamp(1.8rem, 9vw, 2.7rem); }
  #InfoPrincipal h2 { font-size: clamp(1rem, 5vw, 1.35rem); }
  #InfoPrincipal h3 { font-size: .9rem; }
  #InfoPrincipal td:first-child img { margin-right: 5px !important; width: 70px !important; }
  .matecitos-adaptive-badge { font-size: 14px; margin-bottom: .75rem; }
  .matecitos-adaptive-badge small { display: none; }
  .matecitos-learning-report { border-radius: 16px; margin: .75rem .5rem; padding: 1rem; }
  .matecitos-learning-report__stats { grid-template-columns: 1fr; }
  .matecitos-learning-report__stats div { align-items: center; display: flex; justify-content: space-between; text-align: left; }
  .matecitos-learning-report__stats span { margin: 0 0 0 .5rem; }
  .matecitos-learning-popup-active { padding: .5rem; }
  .matecitos-learning-report--compact { margin: .5rem 0; padding: .65rem; }
  .matecitos-learning-report--compact .matecitos-learning-report__stats { gap: .35rem; }
}
