.suite-chrome-activity h1 { color: var(--mod-razonamiento); }

/* Operation menu (4 cards: sumar / multiplicar arriba, restar /
   dividir abajo). 2 columnas fijas en desktop, adapts en móvil. */
.operation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--espacio); }
/* En pantallas estrechas (< 375px) las tarjetas de 150px de alto no caben
   bien; bajamos a 100px para que las 4 operaciones (+ − × ÷) quepan en
   un viewport típico de móvil sin hacer scroll. */
.operation-btn { min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--mod-razonamiento); text-align: center; padding: 8px; }
.operation-btn small { font-size: var(--texto-pequeno); font-weight: 400; }
.operation-icon { font-size: 36px; line-height: 1; }

/* Tabla grid: 10 tablas (1-10) en autofit. minmax(140px,1fr) força 2 cols
   a partir de ~300px; en móvil muy estrecho (< 320px) se reduce a 120px. */
.table-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--espacio); }
.table-btn { min-height: var(--boton-min); background: var(--mod-razonamiento); }

/* Learn screen */
/* One column: either the list of operations, or one demonstration. The
   list is not a side panel any more, so it never needs its own scroll. */
.learn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--espacio);
  align-items: start;
}
.fact-list { display: flex; flex-direction: column; gap: 8px; }
.fact-row { font-variant-numeric: tabular-nums; justify-content: flex-start; }
/* Practice modules: one row per channel (written or audio), each with its
   two orders (in order, random). The buttons share the row and wrap. */
.practice-modes { display: flex; flex-direction: column; gap: var(--espacio); }
.practice-channel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.practice-channel-name { width: 100%; margin: 0; text-align: center; font-weight: 700; color: var(--mod-razonamiento); }
.practice-channel .btn { flex: 1 1 140px; }
#quizReplay { align-self: center; }
.fact-row.activa { background: var(--mod-razonamiento); color: var(--texto-sobre-acento); border-color: var(--mod-razonamiento); }

/* Dots visual (shared by learn and quiz) */
.visual-card { display: flex; flex-direction: column; gap: var(--espacio); align-items: flex-start; padding: var(--espacio); border: 3px solid var(--mod-razonamiento-suave); border-radius: var(--radio); background: var(--color-superficie); }
.visual-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-stack { display: flex; flex-direction: column; gap: 8px; }
/* Multiply frame: × in the corner, the first factor on top of the dots and
   the second one on their left. Two columns: the labels, then the dots. */
.mult-grid { display: grid; grid-template-columns: auto minmax(0, auto); gap: 6px 10px; align-items: center; justify-items: start; width: fit-content; max-width: 100%; }
.mult-grid .visual-sign { justify-self: center; }
.mult-factor { font-size: var(--texto-grande); font-weight: 700; color: var(--mod-razonamiento); font-variant-numeric: tabular-nums; }
.dot-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* A dot is a cell: the circle, and when it carries a number, the number
   inside it (--d 30px) or under it (subtraction). */
.dot-cell { --d: 22px; position: relative; display: inline-flex; flex-direction: column; align-items: center; width: var(--d); flex-shrink: 0; }
.dot-cell-num { --d: 30px; }
.dot { width: var(--d); height: var(--d); border-radius: 50%; flex-shrink: 0; }
.dot-removed { opacity: 0.35; }
/* The number of a dot: centred on it, or under it for subtraction. */
.dot-label { position: absolute; top: 0; left: 0; width: var(--d); height: var(--d); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; pointer-events: none; }
.dot-cell-below .dot-label { position: static; height: auto; width: auto; margin-top: 2px; font-size: 13px; color: var(--color-texto); text-shadow: none; }
/* The cross over a crossed-out dot: dark, bold and outlined in the card
   colour, so it stays visible on any of the dot colours. */
.dot-cross { position: absolute; top: 0; left: 0; width: var(--d); height: var(--d); display: flex; align-items: center; justify-content: center; font-size: calc(var(--d) * 0.85); font-weight: 900; line-height: 1; color: var(--color-texto); text-shadow: 0 0 3px var(--color-superficie), 0 0 3px var(--color-superficie), 0 0 2px var(--color-superficie); pointer-events: none; }
.dot-cell-below .dot-cross { height: var(--d); }
.demo-equation { margin: 0; color: var(--mod-razonamiento); font-size: var(--texto-grande); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.learn-demo { align-items: stretch; }
.learn-demo .visual-card { align-items: center; }
.ten-frame { padding: 6px; border: 3px solid var(--mod-razonamiento); border-radius: var(--radio); background: var(--mod-razonamiento-suave); }
.visual-sign { font-size: var(--texto-grande); font-weight: 700; color: var(--color-texto-suave); }
.equation { margin: 0; color: var(--mod-razonamiento); font-size: var(--texto-grande); font-variant-numeric: tabular-nums; }
.option-row { display: flex; gap: var(--espacio); justify-content: center; flex-wrap: wrap; }
.explanation { color: var(--color-texto-suave) }
#nextFact { align-self: center; }

/* ---- Division input ---- */
.input-row {
  display: flex;
  gap: var(--espacio);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.input-row input[type="number"] {
  width: 7em;
  text-align: center;
  font-size: var(--texto-grande);
  font-variant-numeric: tabular-nums;
  padding: 8px 10px;
  border: 2px solid var(--color-borde);
  border-radius: var(--radio);
  background: var(--color-superficie);
  color: var(--color-texto);
}
.input-row input[type="number"]:disabled { opacity: 0.45; }
.input-row .btn:disabled { opacity: 0.45; }

/* Visually hidden but reachable by screen readers */
.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;
}

/* The "sobran R" line on divide with remainder */
.rest-line {
  margin: 0;
  font-size: var(--texto-base);
  color: var(--color-texto-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rest-line strong { color: var(--mod-razonamiento); font-size: var(--texto-grande); font-variant-numeric: tabular-nums; }

#pantallaFinalScreen .transferencia {
  margin: 8px auto 24px;
  font-size: 1.1rem;
  color: var(--color-texto-suave, #555);
  max-width: 480px;
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 640px) {
  /* Learn: the list and the demonstration take the full width on a phone. */
  .learn-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .learn-layout .fact-list {
    max-height: 60vh;
    overflow-y: auto;
  }
  /* Operación y tabla: 2 columnas si hay espacio. */
  .operation-grid, .table-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  /* Móvil muy estrecho: operación en 1 columna, tarjetas más compactas. */
  .operation-grid { grid-template-columns: 1fr; }
  .operation-btn { min-height: 80px; }
  .operation-icon { font-size: 28px; }
}

.emoji-large { font-size: 96px; }

/* Option and feedback rules of this activity (kept per page; see scripts/css-drift.js). */
.option-btn { min-width: 96px; font-size: var(--texto-grande); font-variant-numeric: tabular-nums; }
.option-btn:disabled { opacity: 0.45; }
