body.matecitos-v2-enabled {
  background: #eef9ff !important;
  color: #102343;
  margin: 0;
  min-height: 100vh;
}

/* Controles comunes de accesibilidad (WCAG 2.2). */
.matecitos-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.matecitos-display-options { position: fixed; right: 14px; bottom: 14px; z-index: 10000020; }
.matecitos-options-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 9px 15px; border: 2px solid #0b4f87;
  border-radius: 999px; color: #0b3158; background: #fff;
  font: 800 14px/1.2 Nunito, Arial, sans-serif; cursor: pointer;
}
.matecitos-options-toggle:focus-visible,
.matecitos-options-panel input:focus-visible { outline: 4px solid #ffbf00; outline-offset: 3px; }
.matecitos-options-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 288px;
  max-width: calc(100vw - 24px); box-sizing: border-box; padding: 12px 16px;
  color: #102343; background: #fff; border: 2px solid #8cc9e8; border-radius: 18px;
  box-shadow: 0 10px 28px rgba(8, 49, 86, .2); text-align: left;
}
.matecitos-options-panel[hidden] { display: none !important; }
.matecitos-options-panel label {
  display: flex; align-items: center; gap: 12px; min-height: 48px;
  font: 800 16px/1.3 Nunito, Arial, sans-serif; cursor: pointer;
}
.matecitos-options-panel input { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: #155cae; }
.matecitos-options-panel p { font: 600 14px/1.45 Nunito, Arial, sans-serif; margin: 0 0 10px 36px; }
.v2-chips > .matecitos-display-options { position: relative; right: auto; bottom: auto; flex: 0 0 auto; }
.matecitos-clock-hidden .v2-chip.time { display: none !important; }
.matecitos-clock-hidden .v2-report article:has(#v2FinalTime) { display: none !important; }
.matecitos-clock-hidden .v2-report { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.matecitos-motion-paused *,
.matecitos-motion-paused *::before,
.matecitos-motion-paused *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

.matecitos-clock-hidden #time,
.matecitos-clock-hidden #timeHeader,
.matecitos-clock-hidden #v2Time {
  visibility: hidden !important;
}

.matecitos-form-error {
  max-width: 680px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border: 3px solid #9f1d1d;
  border-radius: 12px;
  color: #721515;
  background: #fff2f2;
  font-weight: 900;
  text-align: left;
}

[aria-invalid="true"] {
  outline: 4px solid #b42318 !important;
  outline-offset: 3px !important;
}

/* Contrastes verificados sobre #f7fbff y fichas azules. */
.prev-next-cell--prev,
.prev-next-hint--prev { color: #884600 !important; }
.prev-next-cell--next,
.prev-next-hint--next { color: #08633a !important; }
.counting-token--second { color: #102343 !important; }

.place-block-button {
  min-width: 44px !important;
  min-height: 44px !important;
}

@media (prefers-reduced-motion: reduce) {
  .matecitos-level-notice {
    transition: none !important;
  }
}
body.matecitos-v2-enabled #matecitosActivity { display: none !important; }
body.matecitos-v2-enabled #preloaderId,
body.matecitos-v2-enabled #muyBienId { visibility: hidden !important; }

.matecitos-v2 {
  --navy: #102343;
  --blue: #246bd5;
  --blue-dark: #153d84;
  --sky: #cdefff;
  --yellow: #ffe071;
  --gold: #b76500;
  --mint: #dff8ee;
  --green: #16835c;
  --red: #d64343;
  --ink: #2d3d56;
  --muted: #63718a;
  box-sizing: border-box;
  font-family: Nunito, "Segoe UI", sans-serif;
  min-height: 100vh;
  padding: 18px;
}
.matecitos-v2 *, .matecitos-v2 *::before, .matecitos-v2 *::after { box-sizing: border-box; }
.matecitos-v2 button, .matecitos-v2 a { font: inherit; }
.matecitos-v2 button:focus-visible,
.matecitos-v2 a:focus-visible,
.matecitos-v2 [tabindex="-1"]:focus-visible {
  box-shadow: 0 0 0 7px #fff !important;
  outline: 4px solid var(--navy) !important;
  outline-offset: 4px !important;
}
.v2-app {
  background:
    radial-gradient(circle at 8% 24%, rgba(255, 224, 113, .72) 0 56px, transparent 57px),
    radial-gradient(circle at 92% 80%, rgba(168, 230, 243, .82) 0 92px, transparent 93px),
    linear-gradient(135deg, #c9efff, #e7f9ff 52%, #c9efff);
  border: 1px solid #bcdceb;
  border-radius: 30px;
  box-shadow: 0 18px 48px rgba(16, 35, 67, .16);
  min-height: calc(100vh - 36px);
  overflow: hidden;
  position: relative;
}
.v2-doodles {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='180' viewBox='0 0 260 180'%3E%3Cg fill='none' stroke='%23126287' stroke-width='2'%3E%3Cpath d='M20 35h54M47 8v54M175 25l26 26m0-26l-26 26M90 120h58m-29-29v58M198 105c30 0 30 44 0 44s-30-44 0-44z'/%3E%3C/g%3E%3Ctext x='18' y='150' font-size='26' fill='%23126287'%3E1 2 3%3C/text%3E%3C/svg%3E");
  inset: 92px 0 0;
  opacity: .17;
  pointer-events: none;
  position: absolute;
}
.v2-hud {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .93);
  border-bottom: 1px solid #c6e2ef;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 92px;
  padding: 16px 28px;
  position: relative;
  z-index: 5;
}
.v2-brand { align-items: center; display: flex; font-weight: 1000; gap: 12px; letter-spacing: .04em; }
.v2-brand img { filter: drop-shadow(0 6px 8px rgba(16,35,67,.15)); height: 54px; object-fit: contain; width: 54px; }
.v2-chips { display: flex; gap: 12px; }
.v2-chip {
  align-items: center;
  border: 2px solid;
  border-radius: 19px;
  display: flex;
  font-size: 14px;
  font-weight: 1000;
  gap: 9px;
  min-height: 54px;
  padding: 7px 15px 7px 9px;
  white-space: nowrap;
}
.v2-chip b { font-size: 18px; }
.v2-chip small { font: 1000 12px/1 Nunito, "Segoe UI", sans-serif; letter-spacing: .035em; }
.v2-chip.exercise { background: #edf8ff; border-color: #78bce4; }
.v2-chip.score { background: #fff7c8; border-color: #efb22a; }
.v2-chip.time { background: #e6fbf3; border-color: #55b997; }
.v2-hud-icon {
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(16,35,67,.2);
  display: grid;
  flex: 0 0 36px;
  height: 36px;
  place-items: center;
  width: 36px;
}
.v2-hud-icon svg { display: block; height: 22px; width: 22px; }
.v2-chip.exercise .v2-hud-icon { background: var(--blue); }
.v2-chip.score .v2-hud-icon { background: var(--gold); }
.v2-chip.time .v2-hud-icon { background: var(--green); }

.v2-stage { min-height: calc(100vh - 128px); padding: 42px 110px 92px; position: relative; z-index: 1; }
.v2-screen[hidden] { display: none !important; }
.v2-card {
  background: rgba(255,255,255,.97);
  border: 2px solid #83c6e5;
  border-radius: 34px;
  box-shadow: 0 18px 45px rgba(16,35,67,.15);
  margin: 0 auto;
  max-width: 940px;
  min-height: 565px;
  padding: 34px 48px 30px;
  position: relative;
}
.v2-kicker { color: #147997; font-size: 14px; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.matecitos-v2 .v2-screen-heading { color: var(--navy); font-size: 42px !important; height: auto; letter-spacing: -.035em; line-height: 1.06; margin: 8px 0 10px; padding: 0; text-align: left; }
.v2-instruction { color: var(--ink); font-size: 21px; font-weight: 800; line-height: 1.35; margin: 0; }
.v2-voice-button { display:inline-flex; align-items:center; justify-content:center; gap:.55rem; min-height:44px; margin:12px auto 0; padding:.62rem 1rem; border:2px solid #1164c0; border-radius:999px; background:#fff; color:#0b4e94; font:inherit; font-weight:800; cursor:pointer; box-shadow:0 4px 0 #c5e3f7; }
.v2-voice-button svg { width:22px; height:22px; flex:0 0 auto; }
.v2-voice-button:hover { background:#eaf6ff; }
.v2-voice-button:focus-visible { outline:4px solid #ffd33d; outline-offset:3px; }
.v2-voice-button.is-speaking { background:#0b4e94; color:#fff; box-shadow:0 4px 0 #072f5b; }
.v2-level {
  align-items: center;
  background: #eff9ff;
  border-radius: 15px;
  display: flex;
  font-size: 14px;
  font-weight: 1000;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 14px;
}
.v2-meter { display: flex; gap: 5px; margin-left: auto; }
.v2-meter i { background: #c8dce8; border-radius: 999px; height: 8px; width: 22px; }
.v2-meter i.on { background: var(--blue); }
.v2-choices { display: grid; gap: 15px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 28px; }
.v2-choice {
  background: #effaff;
  border: 3px solid #73b7db;
  border-radius: 23px;
  box-shadow: 0 6px 0 #b5ddeb;
  color: var(--navy);
  cursor: pointer;
  font-size: 32px;
  font-weight: 1000;
  min-height: 92px;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.v2-choice:hover { box-shadow: 0 8px 0 #a1d2e7; transform: translateY(-2px); }
.v2-choice[aria-pressed="true"] { background: var(--blue); border-color: var(--blue-dark); box-shadow: 0 6px 0 var(--blue-dark); color: #fff; }
.v2-choice.is-correct::after,
.v2-choice.is-wrong::after {
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  display: grid;
  font-size: 16px;
  height: 32px;
  place-items: center;
  position: absolute;
  right: -8px;
  top: -12px;
  width: 32px;
}
.v2-choice.is-correct::after { background: #25a66f; content: "✓"; }
.v2-choice.is-wrong { background: #ffe8e7; border-color: #b82f2f; box-shadow: 0 6px 0 #ce6a65; color: #851b1b; }
.v2-choice.is-wrong::after { background: var(--red); content: "×"; }
.v2-choice.is-missed { background: #fff6c5; border-color: #db9817; box-shadow: 0 6px 0 #e7bb56; color: var(--navy); }
.v2-feedback { background: #fff0ee; border: 2px solid #e76a61; border-radius: 18px; color: #721d1a; margin-top: 20px; padding: 16px 18px; }
.v2-feedback.success { background: #e7fbf3; border-color: #55b997; color: #0f6043; }
.v2-feedback strong { display: block; font-size: 19px; }
.v2-feedback p { font-weight: 750; line-height: 1.35; margin: 4px 0 0; }
.v2-actions { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-top: 30px; }
.v2-tip { align-items: center; color: var(--muted); display: flex; font-weight: 800; gap: 10px; }
.v2-tip span:first-child { background: var(--yellow); border-radius: 50%; color: var(--navy); display: grid; flex: 0 0 34px; height: 34px; place-items: center; }
.v2-primary, .v2-secondary {
  align-items: center;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 1000;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
}
.v2-primary { background: var(--blue); border: 2px solid var(--blue-dark); box-shadow: 0 6px 0 var(--blue-dark); color: #fff; }
.v2-primary:disabled { cursor: wait; opacity: .72; }
.v2-secondary { background: #fff; border: 2px solid #8abed7; color: var(--navy); text-decoration: none; }

.v2-intro-card { max-width: 900px; text-align: center; }
.v2-intro-card .v2-screen-heading { text-align: center; }
.v2-intro-card .v2-instruction { margin-inline: auto; max-width: 720px; }
.v2-intro-features { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin: 30px 0 24px; text-align: left; }
.v2-intro-feature { align-items: center; background: #f7fcff; border: 2px solid #c6e3f1; border-radius: 20px; display: flex; gap: 13px; min-height: 112px; padding: 16px; }
.v2-feature-icon { border-radius: 50%; display: grid; flex: 0 0 46px; height: 46px; place-items: center; width: 46px; }
.v2-feature-icon svg { height: 26px; width: 26px; }
.v2-intro-feature:nth-child(1) .v2-feature-icon { background: #dceeff; color: var(--blue); }
.v2-intro-feature:nth-child(2) .v2-feature-icon { background: #fff1b8; color: var(--gold); }
.v2-intro-feature:nth-child(3) .v2-feature-icon { background: #dff8ee; color: var(--green); }
.v2-intro-feature b { display: block; font-size: 16px; }
.v2-intro-feature span { color: var(--muted); display: block; font-size: 13px; font-weight: 800; line-height: 1.3; margin-top: 4px; }
.v2-intro-level { align-items: center; background: #eff9ff; border-radius: 16px; display: inline-flex; font-weight: 1000; gap: 9px; margin-bottom: 22px; padding: 10px 16px; }

.v2-result-card { max-width: 780px; padding: 28px 54px; text-align: center; }
.v2-result-card .v2-kicker, .v2-result-card .v2-screen-heading { text-align: center; }
.v2-stars { color: var(--gold); font-size: 56px; letter-spacing: 8px; line-height: 1; margin: 14px 0 12px; text-shadow: 0 3px 0 var(--yellow); }
.v2-result-card .v2-screen-heading { font-size: 48px !important; }
.v2-result-lead { color: var(--ink); font-size: 21px; font-weight: 800; }
.v2-report { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin: 26px auto 22px; }
.v2-report article { background: #f7fcff; border: 2px solid #c6e3f1; border-radius: 20px; padding: 18px; }
.v2-report b { display: block; font-size: 28px; }
.v2-report span { color: #53647c; font-size: 13px; font-weight: 1000; letter-spacing: .05em; text-transform: uppercase; }
.v2-next { align-items: center; background: #e7fbf3; border: 2px solid #65c5a2; border-radius: 19px; display: flex; font-weight: 900; gap: 16px; padding: 16px 20px; text-align: left; }
.v2-next em { font-size: 26px; font-style: normal; }
.v2-result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

.v2-character { bottom: 8px; filter: drop-shadow(0 10px 12px rgba(16,35,67,.18)); max-height: 170px; object-fit: contain; position: absolute; width: 128px; z-index: 4; }
.v2-character.pi { left: 18px; }
.v2-character.beta { right: 18px; }
.v2-site-link { align-items: center; background: rgba(255,255,255,.84); border-radius: 999px; bottom: 7px; color: var(--blue-dark); display: flex; font-size: 16px; font-weight: 1000; justify-content: center; left: 50%; min-height: 44px; min-width: 150px; position: absolute; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; transform: translateX(-50%); z-index: 5; }
.v2-sr-only { border: 0; clip: rect(0,0,0,0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 900px) {
  .v2-brand span { display: none; }
  .v2-stage { padding-inline: 80px; }
}
@media (max-width: 700px) {
  .matecitos-v2 { padding: 0; }
  .v2-app { border: 0; border-radius: 0; min-height: 100vh; }
  .v2-hud { align-items: stretch; flex-direction: column; gap: 8px; min-height: 0; padding: 8px; }
  .v2-brand { display: none; }
  .v2-chips { display: grid; gap: 5px; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .v2-chip { display: grid; font-size: 10px; gap: 0 5px; grid-template-columns: 30px minmax(0,1fr); grid-template-rows: auto auto; min-height: 56px; min-width: 0; padding: 6px; }
  .v2-chip b { font-size: 14px; line-height: 1.1; }
  .v2-chip small { font-size: 8px; line-height: 1.1; }
  .v2-hud-icon { grid-row: 1/3; height: 30px; width: 30px; }
  .v2-hud-icon svg { height: 18px; width: 18px; }
  .v2-stage { min-height: calc(100vh - 72px); padding: 18px 8px 118px; }
  .v2-card, .v2-result-card { border-radius: 25px; min-height: 0; padding: 22px 18px 25px; width: 100%; }
  .matecitos-v2 .v2-screen-heading { font-size: clamp(2rem, 10vw, 2.65rem) !important; }
  .v2-instruction { font-size: 17px; }
  .v2-level { align-items: flex-start; font-size: 12px; }
  .v2-meter { display: none; }
  .v2-choices { gap: 10px; grid-template-columns: repeat(3, 1fr); }
  .v2-choice { border-radius: 18px; font-size: 25px; min-height: 70px; }
  .v2-actions { align-items: stretch; flex-direction: column; }
  .v2-primary, .v2-secondary { width: 100%; }
  .v2-intro-features { grid-template-columns: 1fr; margin: 20px 0; }
  .v2-intro-feature { min-height: 78px; padding: 12px 14px; }
  .v2-report { grid-template-columns: 1fr; }
  .v2-stars { font-size: 42px; }
  .v2-result-card .v2-screen-heading { font-size: 38px !important; }
  .v2-result-actions { flex-direction: column; }
  .v2-character { bottom: 4px; max-height: 105px; width: 88px; }
  .v2-character.pi { left: 6px; }
  .v2-character.beta { right: 6px; }
  .v2-site-link { font-size: 14px; min-width: 130px; }
}
@media (max-width: 340px) {
  .v2-chip { grid-template-columns: 26px minmax(0,1fr); }
  .v2-hud-icon { height: 26px; width: 26px; }
  .v2-card { padding-inline: 12px; }
  .v2-choice { font-size: 22px; min-height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .matecitos-v2 *, .matecitos-v2 *::before, .matecitos-v2 *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .v2-choice:hover { transform: none; }
}

/* Adaptador visual para las actividades clásicas con teclado numérico. */
body.matecitos-classic-v2 {
  background: #eef9ff !important;
  color: #102343;
  margin: 0;
  min-height: 100vh;
}
body.matecitos-classic-v2 > #preloaderId,
body.matecitos-classic-v2 > #muyBienId,
body.matecitos-classic-v2 > #InfoPrincipal,
body.matecitos-classic-v2 > #page-container,
body.matecitos-classic-v2 > #overlay,
body.matecitos-classic-v2 > #popup,
body.matecitos-classic-v2 > .footerPage { display: none !important; }
.v2-legacy-card { max-width: 940px; }
.matecitos-classic-v2 .v2-brand img {
  float: none !important;
  height: 54px !important;
  inset: auto !important;
  margin: 0 !important;
  max-width: none !important;
  position: static !important;
  transform: none !important;
  width: 54px !important;
}
.matecitos-classic-v2 .v2-brand span {
  float: none !important;
  margin: 0 !important;
  position: static !important;
  transform: none !important;
}
.v2-legacy-slot { margin-top: 24px; }
.v2-legacy-slot #ejerPrincipalId,
.v2-legacy-slot #explicacionEjercicio {
  background: transparent !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  width: 100% !important;
}
.v2-legacy-slot #explicacionEjercicio {
  background: #fff7e3 !important;
  border: 2px solid #e7aa38;
  border-radius: 22px;
  color: #5c3b00;
  margin-top: 18px !important;
  padding: 18px !important;
  text-align: left !important;
}
.v2-legacy-slot #explicacionEjercicio > h2:empty { display: none; }
.v2-legacy-slot #contentText,
.v2-legacy-slot #contentRespuesta,
.v2-legacy-slot #contentTextRespuesta {
  color: #102343 !important;
  float: none !important;
  font-family: Nunito, "Segoe UI", sans-serif !important;
  height: auto !important;
  margin: 0 auto !important;
  max-width: 780px;
  padding: 0 !important;
  text-align: center !important;
  width: 100% !important;
}
.v2-legacy-slot #explicationTitle,
.v2-legacy-slot #descriptionTitle,
.v2-legacy-slot #contentText h2 { display: none !important; }
.v2-legacy-slot #contentText h2,
.v2-legacy-slot #contentTextRespuesta h2 {
  color: #102343 !important;
  font: 1000 23px/1.3 Nunito, "Segoe UI", sans-serif !important;
  margin: 0 0 18px !important;
}
.v2-legacy-slot #contentText table,
.v2-legacy-slot #contentTextRespuesta table {
  border-collapse: separate !important;
  border-spacing: 7px 5px !important;
  margin: 4px auto 16px !important;
}
.v2-legacy-slot #contentText td,
.v2-legacy-slot #contentTextRespuesta td { border: 0 !important; padding: 2px !important; }
.v2-legacy-slot .sumando,
.v2-legacy-slot .operation-row {
  color: #102343 !important;
  font: 1000 42px/1.05 Nunito, "Segoe UI", sans-serif !important;
}
.v2-legacy-slot hr { border-color: #102343 !important; margin-block: 2px 4px !important; }
.v2-legacy-slot input {
  appearance: none;
  background: #effaff !important;
  border: 3px solid #73b7db !important;
  border-radius: 13px !important;
  box-shadow: 0 4px 0 #b5ddeb !important;
  color: #102343 !important;
  font: 1000 30px/1 Nunito, "Segoe UI", sans-serif !important;
  height: 54px !important;
  margin: 3px !important;
  max-width: 54px !important;
  min-width: 52px !important;
  padding: 4px !important;
  text-align: center !important;
  width: 52px !important;
}
.v2-legacy-slot input:focus,
.v2-legacy-slot input.selectedInput {
  background: #fff8cf !important;
  border-color: #d58b00 !important;
  outline: 4px solid #102343 !important;
  outline-offset: 3px !important;
}
.v2-legacy-slot #calculadora { margin: 20px auto 8px !important; max-width: 610px; }
.v2-legacy-slot #calculadora > center > div,
.v2-legacy-slot #calculadora .keypad {
  display: grid !important;
  gap: 9px !important;
  grid-template-columns: repeat(6, minmax(58px, 1fr)) !important;
}
.v2-legacy-slot .buttonCalculadora {
  background: #ffffff !important;
  border: 3px solid #2166a5 !important;
  border-radius: 16px !important;
  box-shadow: 0 5px 0 #a9cfe2 !important;
  color: #102343 !important;
  cursor: pointer;
  float: none !important;
  height: auto !important;
  margin: 0 !important;
  min-height: 58px !important;
  padding: 7px 12px !important;
  position: relative !important;
  width: auto !important;
}
.v2-legacy-slot #calculadora .buttonCalculadora:hover {
  background: #e4f4ff !important;
  border-color: #174b80 !important;
  transform: translateY(-2px);
}
.v2-legacy-slot #calculadora .buttonCalculadora:active {
  background: #ffe98c !important;
  box-shadow: 0 2px 0 #9a6800 !important;
  transform: translateY(3px);
}
.v2-legacy-slot .buttonCalculadora:focus-visible,
.v2-legacy-slot .buttonElementos:focus-visible {
  outline: 4px solid #102343 !important;
  outline-offset: 3px !important;
}
.v2-legacy-slot .buttonCalculadora img,
.v2-legacy-slot #buttonComprobar img,
.v2-legacy-slot #explicacionEjercicio .buttonCalculadora img { display: none !important; }
.v2-legacy-slot .buttonCalculadora .containerContImage,
.v2-legacy-slot #buttonComprobar .containerContImage { height: auto !important; position: static !important; width: auto !important; }
.v2-legacy-slot #calculadora .buttonCalculadora .containerContImage {
  color: #102343 !important;
}
.v2-legacy-slot .centeredImageTextCalculadora,
.v2-legacy-slot .centeredImageTextButtons {
  color: currentColor !important;
  font: 1000 30px/1 Nunito, "Segoe UI", sans-serif !important;
  left: auto !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
}
.v2-legacy-slot #calculadora .centeredImageTextCalculadora {
  color: #102343 !important;
  text-shadow: none !important;
}
.v2-legacy-slot #calculadora .buttonCalculadora[disabled],
.v2-legacy-slot #calculadora .buttonCalculadora:disabled {
  background: #e8edf2 !important;
  border-color: #657386 !important;
  box-shadow: 0 3px 0 #aab2bc !important;
  color: #26364d !important;
  cursor: not-allowed;
  opacity: 1 !important;
}
.v2-legacy-slot #buttonComprobar,
.v2-legacy-slot #explicacionEjercicio .buttonCalculadora {
  background: #246bd5 !important;
  border: 2px solid #153d84 !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 0 #153d84 !important;
  color: #fff !important;
  display: inline-flex !important;
  justify-content: center;
  margin: 24px auto 6px !important;
  min-height: 56px !important;
  min-width: 210px;
  padding: 14px 26px !important;
  width: auto !important;
}
.v2-legacy-slot #contentText .row {
  align-items: center;
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.v2-legacy-slot .buttonElementos {
  background: #f6fcff !important;
  border: 3px solid #73b7db !important;
  border-radius: 18px !important;
  box-shadow: 0 5px 0 #b5ddeb !important;
  cursor: pointer;
  float: none !important;
  min-height: 88px;
  min-width: 88px;
  padding: 8px !important;
}
.v2-legacy-slot .buttonElementos:disabled,
.v2-legacy-slot .buttonElementosSeleccionado {
  background: #e7fbf3 !important;
  border-color: #16835c !important;
  opacity: 1 !important;
}
.v2-legacy-slot .imageElements { height: 68px !important; object-fit: contain; width: 68px !important; }
.v2-legacy-slot .centeredImageText {
  background: #102343;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #102343, 0 3px 5px rgba(16, 35, 67, .32);
  color: #fff !important;
  display: grid;
  font: 1000 20px/1 Nunito, "Segoe UI", sans-serif !important;
  height: 36px;
  left: auto !important;
  place-items: center;
  position: absolute !important;
  right: 5px !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  top: 5px !important;
  transform: none !important;
  width: 36px;
  z-index: 3;
}
.v2-legacy-slot .centeredImageText:empty { display: none !important; }
.v2-legacy-slot #contentRespuesta {
  font-size: 20px !important;
  font-weight: 900 !important;
  margin-top: 16px !important;
}
.v2-status {
  background: #e7fbf3;
  border: 2px solid #55b997;
  border-radius: 17px;
  color: #0f6043;
  font-weight: 1000;
  margin-top: 18px;
  padding: 13px 16px;
}
.v2-status[hidden] { display: none !important; }

@media (max-width: 700px) {
  .v2-legacy-slot { margin-top: 18px; }
  .v2-legacy-slot #calculadora > center > div,
  .v2-legacy-slot #calculadora .keypad { gap: 7px !important; grid-template-columns: repeat(4, minmax(52px, 1fr)) !important; }
  .v2-legacy-slot .buttonCalculadora { min-height: 54px !important; padding: 6px !important; }
  .v2-legacy-slot .sumando,
  .v2-legacy-slot .operation-row { font-size: 35px !important; }
  .v2-legacy-slot .buttonElementos { min-height: 72px; min-width: 72px; }
  .v2-legacy-slot .imageElements { height: 54px !important; width: 54px !important; }
  .v2-legacy-slot #contentText h2,
  .v2-legacy-slot #contentTextRespuesta h2 { font-size: 19px !important; }
}

@media (prefers-contrast: more) {
  .v2-legacy-slot #calculadora .buttonCalculadora {
    background: #fff !important;
    border-color: #000 !important;
    box-shadow: 0 5px 0 #000 !important;
    color: #000 !important;
  }
  .v2-legacy-slot #calculadora .centeredImageTextCalculadora { color: #000 !important; }
}

@media (forced-colors: active) {
  .v2-legacy-slot #calculadora .buttonCalculadora {
    background: ButtonFace !important;
    border-color: ButtonText !important;
    box-shadow: none !important;
    color: ButtonText !important;
    forced-color-adjust: auto;
  }
  .v2-legacy-slot #calculadora .buttonCalculadora:focus-visible {
    outline: 4px solid Highlight !important;
  }
  .v2-legacy-slot #calculadora .centeredImageTextCalculadora { color: ButtonText !important; }
  .v2-legacy-slot .centeredImageText {
    background: Canvas !important;
    border-color: CanvasText !important;
    box-shadow: none !important;
    color: CanvasText !important;
    text-shadow: none !important;
  }
}

/* Auditoría 103: cabecera flexible, destinos y columnas legibles. */
@font-face { font-family: Nunito; src: url("first-expansion/fonts/nunito-latin-700-normal-Dort48En.woff2") format("woff2"); font-weight: 400 1000; font-display: swap; }
.v2-hud { flex-wrap: wrap; }
.v2-brand, .v2-chips { min-width: 0; }
.v2-chips { flex-wrap: wrap; justify-content: flex-end; }
.drop-slot:focus-visible { outline: 4px solid #0b4f87; outline-offset: 3px; }
.solid-grid .solid-card { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.solid-grid .solid-draw { width: 100%; height: 110px; display: grid; place-items: center; }
.solid-grid .solid-draw svg { width: 110px !important; height: 100px !important; max-width: 100%; position: static !important; }
.solid-grid .solid-card p { margin: 0; }
.solid-grid .drop-slot { min-height: 60px; width: 100%; box-sizing: border-box; }
.vertical-subtraction { margin: 12px auto; border-collapse: separate; border-spacing: 6px; }
.vertical-subtraction td { min-width: 36px; text-align: center; }
.vertical-subtraction input { width: 48px !important; min-width: 44px !important; }
@media (max-width: 700px) {
  .v2-hud { gap: 12px; }
}

.frac-bar.frac-bar--vertical{width:110px;min-height:220px;grid-auto-rows:1fr}.frac-bar--vertical .frac-piece{min-height:45px;border-bottom:2px solid #17324d}

@media (max-width: 700px) {
  .v2-chips > .matecitos-display-options { grid-column: 1 / -1; justify-self: end; }
}

/* Explanations are prose: keep each number beside its left-aligned step. */
.v2-legacy-slot #contentTextRespuesta .learning-steps,
.v2-legacy-slot #contentTextRespuesta .learning-steps li { text-align: left; line-height: 1.5; }

/* Short addition tasks: use desktop width instead of a tall stack. */
@media (min-width: 1000px) {
  .matecitos-classic-v2 .v2-stage { padding: 16px 100px 88px; }
  .matecitos-classic-v2 #v2ExerciseScreen > .v2-card { padding: 22px 30px; min-height: 0; }
  .matecitos-classic-v2 #v2ExerciseScreen .v2-screen-heading { font-size: 36px !important; }
  .matecitos-classic-v2 #v2ExerciseScreen .v2-instruction { font-size: 19px; }
  .matecitos-classic-v2 #v2ExerciseScreen .v2-level { margin-top: 12px; padding-block: 7px; }
  .matecitos-classic-v2 .v2-legacy-slot { margin-top: 16px; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) {
    display: grid !important; grid-template-columns: minmax(0, 1fr) 290px;
    column-gap: 24px; row-gap: 8px; align-items: center;
  }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) > br { display: none; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) > .center-content:first-of-type { grid-column: 1; grid-row: 1; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) > #contentRespuesta { grid-column: 1; grid-row: 2; margin-top: 0 !important; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) > #calculadora { grid-column: 2; grid-row: 1 / span 2; width: 100%; margin: 0 !important; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) > .center-content:last-child { grid-column: 1 / -1; grid-row: 3; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) #calculadora .keypad { grid-template-columns: repeat(4, minmax(52px, 1fr)) !important; gap: 8px !important; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) #calculadora .buttonCalculadora { min-height: 52px !important; }
  .v2-legacy-slot .two-groups { margin: 0 auto; gap: 8px; }
  .v2-legacy-slot .two-groups .skill-dots { min-height: 72px; padding: 10px; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) .missing-equation { font-size: 48px; line-height: 1.2; margin: 4px auto; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) #buttonComprobar { min-height: 54px !important; }
  .matecitos-classic-v2 #v2ExerciseScreen .v2-tip { margin-top: 16px; }
}

/* A single scroll owner; the legacy body was an extra 100%-high scroller. */
html:has(body.matecitos-classic-v2) { height: auto !important; min-height: 100%; }
body.matecitos-classic-v2 { height: auto !important; overflow: visible !important; }
@media (min-width:1000px) {
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace:has(.two-groups) { overflow: visible !important; border-radius: 0; box-shadow: none; }
}

/* Feedback and freshly generated rows must not become browser scroll anchors. */
body.matecitos-classic-v2,.matecitos-classic-v2 .v2-app { overflow-anchor: none; }

/* Feedback comes after the working area, so it cannot push the next task. */
.v2-status:not([hidden]) + .v2-tip { display: none; }

@media (min-width:1000px) and (max-height:800px) {
  .matecitos-classic-v2 .v2-hud { min-height:76px; padding:8px 24px; }
  .matecitos-classic-v2 .v2-stage { padding-top:12px; }
  .matecitos-classic-v2 #v2ExerciseScreen > .v2-card { padding-block:18px; }
  .matecitos-classic-v2 #v2ExerciseScreen .v2-voice-button { margin-top:8px; }
  .matecitos-classic-v2 #v2ExerciseScreen .v2-level { margin-top:8px; }
}

/* Shared desktop workspace for numeric answers; choices retain the full width. */
@media (min-width:1000px) {
  .matecitos-classic-v2 .v2-stage { padding-inline:clamp(24px,5vw,72px); }
  .matecitos-classic-v2 .v2-legacy-card { max-width:1080px; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace {
    display:grid!important; grid-template-columns:minmax(0,1fr) 290px;
    column-gap:24px; row-gap:10px; align-items:center;
    overflow:visible!important; border-radius:0; box-shadow:none;
  }
  .v2-keypad-workspace > br { display:none; }
  .v2-keypad-workspace > .v2-work-visual { grid-column:1; grid-row:1; min-width:0; }
  .v2-legacy-slot .v2-keypad-workspace > .v2-work-answer { grid-column:1; grid-row:2; min-width:0; margin-top:0!important; }
  .v2-keypad-workspace > .v2-work-keypad { grid-column:2; grid-row:1 / span 2; width:100%; min-width:0; margin:0!important; }
  .v2-keypad-workspace > .v2-work-error { grid-column:1 / -1; grid-row:3; }
  .v2-keypad-workspace > .v2-work-submit { grid-column:1 / -1; grid-row:4; }
  .v2-keypad-workspace .keypad,
  .v2-keypad-workspace .first-keypad,
  .v2-keypad-workspace #calculadora > center > div {
    display:grid!important; grid-template-columns:repeat(4,minmax(52px,1fr))!important; gap:8px!important;
  }
  .v2-keypad-workspace #calculadora button { min-height:52px!important; min-width:44px; }
  .v2-keypad-workspace .first-keypad button {
    color:#102343; background:#fff; border:3px solid #2166a5; border-radius:16px;
    box-shadow:0 5px 0 #a9cfe2; font:900 28px/1 Nunito,Arial,sans-serif; cursor:pointer;
  }
  .v2-keypad-workspace .missing-equation,
  .v2-keypad-workspace .number-chain { font-size:48px; line-height:1.2; margin:6px auto; }
  .v2-keypad-workspace .first-fields { margin:10px 0; gap:12px; }
  .v2-keypad-workspace .first-fields label { text-align:left; }
  .v2-keypad-workspace .first-check-wrap { margin:8px 0 0; }
}
.v2-legacy-slot #contentTextRespuesta .first-solution ol,
.v2-legacy-slot #contentTextRespuesta .first-solution li { text-align:left; line-height:1.5; }

@media(min-width:1000px){
  .v2-keypad-workspace #calculadora .first-keypad { margin:0!important; }
  .v2-keypad-workspace .first-keypad button { width:100%; margin:0; }
  .v2-keypad-workspace .first-fields { margin:0!important; }
  .v2-keypad-workspace .first-fields label { max-width:300px; }
  .v2-keypad-workspace .first-tens,
  .v2-keypad-workspace .first-frame-row,
  .v2-keypad-workspace .first-dice-row,
  .v2-keypad-workspace .first-coins,
  .v2-keypad-workspace .first-equation,
  .v2-keypad-workspace .first-sequence,
  .v2-keypad-workspace .first-word,
  .v2-keypad-workspace .first-table { margin-block:10px; }
  .v2-keypad-workspace .first-tokens { margin-block:6px; }
}

/* Override the legacy ID selectors as well as the newer expansion classes. */
@media(min-width:1000px){
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace > .v2-work-answer { margin-top:0!important; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace > .v2-work-keypad { width:100%; margin:0!important; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace #calculadora .keypad,
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace #calculadora .first-keypad,
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace #calculadora > center > div { grid-template-columns:repeat(4,minmax(52px,1fr))!important; gap:8px!important; }
  .v2-legacy-slot #ejerPrincipalId.v2-keypad-workspace #calculadora button { width:100%; min-height:52px!important; }
  .v2-keypad-workspace .ruler-workbench { margin:4px auto; padding:8px 8px 2px; }
  .v2-keypad-workspace .ruler-workbench svg { height:170px; }
  .v2-keypad-workspace .ruler-step-controls { margin:6px auto; }
  .v2-keypad-workspace .ruler-step { min-height:48px; padding:6px 12px; }
  .v2-legacy-slot .v2-keypad-workspace .ruler-unit-note { margin:4px auto; font-size:16px; line-height:1.4; }
  .v2-keypad-workspace .ruler-alignment { margin-bottom:4px; }
}

/* Large diagrams keep their height; a single answer and keypad share the side. */
@media(min-width:1000px){
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-visual { grid-column:1; grid-row:1 / span 4; align-self:start; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-answer { grid-column:2; grid-row:1; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-keypad { grid-column:2; grid-row:2; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-error { grid-column:2; grid-row:3; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-submit { grid-column:2; grid-row:4; min-width:0; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual #buttonComprobar { width:100%!important; min-width:0!important; max-width:290px; min-height:56px!important; padding:8px!important; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual #buttonComprobar .centeredImageTextButtons { font-size:20px!important; line-height:1.25!important; white-space:normal!important; }
}

@media(min-width:1000px){
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual { grid-template-rows:min-content min-content min-content 1fr; align-items:start; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-submit { align-self:start; }
}

@media(min-width:1000px){
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual { row-gap:8px; }
  .v2-legacy-slot #ejerPrincipalId.v2-workspace-tall-visual > .v2-work-submit { margin-top:0!important; }
}
