:root {
  --tinta: #2b2350;
  --tinta-suave: #5f5885;
  --papel: #fff8ec;
  --tarjeta: #ffffff;
  --borde: #eadfca;
  --primario: #5b3fa8;
  --primario-sombra: #3f2a7a;
  --acento: #ff7a45;
  --acento-sombra: #d4562a;
  --acierto: #2fa866;
  --acierto-suave: #ddf5e7;
  --error: #e04848;
  --error-suave: #fde6e6;
  --estrella: #ffc531;
  --entorno: #2e9e6a;
  --entorno-suave: #e2f5ea;
  --comunicacion: #2f7fd8;
  --comunicacion-suave: #e3eefb;
  --crecimiento: #e2567f;
  --crecimiento-suave: #fde8ee;
  --fuente-titulos: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --fuente: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fuente-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --radio: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fuente);
  -webkit-tap-highlight-color: transparent;
}

button,
textarea {
  font: inherit;
  color: inherit;
}

button {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

[hidden] {
  display: none !important;
}

.pantalla {
  display: none;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.pantalla.activa {
  display: flex;
  flex-direction: column;
}

#inicio,
#resultado {
  background:
    radial-gradient(circle at 85% 8%, rgb(255 122 69 / 0.18), transparent 38%),
    radial-gradient(circle at 8% 92%, rgb(91 63 168 / 0.14), transparent 42%),
    var(--papel);
}

.contenido {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contenido.centrado {
  align-items: stretch;
  text-align: center;
  justify-content: center;
  flex: 1;
}

.antetitulo {
  margin: 0;
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acento);
  text-align: center;
}

/* ---------- Logo LUCAS ---------- */

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--fuente-titulos);
  text-align: center;
}

.l1 { --letra: #ff6b3d; --letra-sombra: #c9471d; }
.l2 { --letra: #ffb81f; --letra-sombra: #c98600; }
.l3 { --letra: #2fb36b; --letra-sombra: #1d7d48; }
.l4 { --letra: #2f86e0; --letra-sombra: #1c5ea8; }
.l5 { --letra: #8e5bd8; --letra-sombra: #5f3aa0; }

.logo-letras {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 10px 26px 0 6px;
  font-size: clamp(3.6rem, 19vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
}

.logo-letras > span {
  display: inline-block;
  color: var(--letra);
  text-shadow:
    0 5px 0 var(--letra-sombra),
    0 0 26px color-mix(in srgb, var(--letra) 45%, transparent);
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
}

.logo-letras > span:nth-child(odd) { rotate: -6deg; }
.logo-letras > span:nth-child(even) { rotate: 5deg; translate: 0 -4px; }

/* La «luz»: un destello amarillo junto a la S. */
.logo-luz {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.42em;
  height: 0.42em;
  fill: #ffd23f;
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgb(255 200 40 / 0.9));
}

.logo-lema {
  font-family: var(--fuente);
  font-size: clamp(1rem, 4.4vw, 1.2rem);
  font-weight: 700;
  color: var(--tinta-suave);
}

.logo-lema b {
  font-family: var(--fuente-titulos);
  font-size: 1.2em;
  font-weight: 700;
  color: var(--letra);
}

.pregunta-grande {
  margin: 0;
  font-family: var(--fuente-titulos);
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
}

/* ---------- Botones ---------- */

.boton {
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  font-family: var(--fuente-titulos);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.boton:active {
  transform: translateY(2px);
}

.boton-principal {
  background: var(--acento);
  color: #fff;
  box-shadow: 0 4px 0 var(--acento-sombra);
}

.boton-secundario {
  background: #fff;
  color: var(--primario);
  box-shadow: inset 0 0 0 2px var(--primario), 0 4px 0 var(--primario);
}

.boton-pequeno {
  padding: 10px 18px;
  font-size: 1rem;
}

.boton-icono {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--primario);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgb(43 35 80 / 0.18);
}

.botones {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.enlaces {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.enlace {
  border: 0;
  background: none;
  padding: 10px 12px;
  color: var(--primario);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 2px;
}

/* ---------- Inicio: cursos ---------- */

.cursos {
  display: grid;
  gap: 14px;
}

.tarjeta-curso {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--radio);
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--color-curso), 0 8px 20px rgb(43 35 80 / 0.08);
  transition: transform 0.1s ease;
}

.tarjeta-curso:active {
  transform: translateY(3px);
}

.curso-3 { --color-curso: #ffb238; }
.curso-4 { --color-curso: #ff7a45; }
.curso-5 { --color-curso: #5b3fa8; }

.curso-icono {
  grid-row: span 2;
  font-family: var(--fuente-emoji);
  font-size: 3.4rem;
  line-height: 1;
}

.tarjeta-curso strong {
  font-family: var(--fuente-titulos);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--tinta);
}

.tarjeta-curso small {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tinta-suave);
}

/* ---------- Cabeceras ---------- */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--papel);
  box-shadow: 0 1px 0 var(--borde);
}

.cabecera-titulo {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--fuente-titulos);
  font-size: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-curso {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--primario);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

/* ---------- Menú de juegos ---------- */

.lista-juegos {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.area h2 {
  margin: 8px 0 10px;
  font-family: var(--fuente-titulos);
  font-size: 1.3rem;
  color: var(--color-area);
}

.area-entorno { --color-area: var(--entorno); --fondo-area: var(--entorno-suave); }
.area-comunicacion { --color-area: var(--comunicacion); --fondo-area: var(--comunicacion-suave); }
.area-crecimiento { --color-area: var(--crecimiento); --fondo-area: var(--crecimiento-suave); }

.rejilla-juegos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.tarjeta-juego {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px 10px;
  border: 0;
  border-radius: var(--radio);
  background: var(--fondo-area);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--color-area), 0 4px 0 var(--color-area);
  transition: transform 0.1s ease;
}

.tarjeta-juego:active {
  transform: translateY(3px);
}

.juego-icono {
  font-family: var(--fuente-emoji);
  font-size: 2.8rem;
  line-height: 1.1;
}

.tarjeta-juego strong {
  font-family: var(--fuente-titulos);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

.juego-estrellas {
  color: var(--estrella);
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.15);
}

.pie-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 16px 20px;
}

/* ---------- Juego ---------- */

.progreso-rondas {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 0;
}

.progreso-rondas span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--borde);
  transition: background 0.3s ease, transform 0.3s ease;
}

.progreso-rondas .hecha {
  background: var(--estrella);
}

.progreso-rondas .actual {
  background: var(--primario);
  transform: scale(1.25);
}

.zona-juego {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.instruccion {
  margin: 0;
  font-family: var(--fuente-titulos);
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.instruccion.celebra {
  animation: celebra 0.6s ease;
  color: var(--acierto);
}

.escena-juego {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 14px 18px;
  border-radius: var(--radio);
  background: #fff;
  box-shadow: 0 4px 16px rgb(43 35 80 / 0.08);
}

.tablero {
  display: grid;
  grid-template-columns: repeat(var(--columnas-tablero, 2), minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 560px;
}

.tablero.opciones-3 { --columnas-tablero: 3; }
.tablero.opciones-4 { --columnas-tablero: 2; }
.tablero.una-columna { --columnas-tablero: 1; }
.tablero.rejilla-todos {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 110px;
  padding: 12px;
  border: 0;
  border-radius: var(--radio);
  background: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px var(--borde), 0 5px 0 var(--borde);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.opcion:active {
  transform: translateY(3px);
}

.opcion.bien {
  background: var(--acierto-suave);
  box-shadow: inset 0 0 0 4px var(--acierto), 0 5px 0 var(--acierto);
  animation: salta 0.5s ease;
}

.opcion.mal {
  background: var(--error-suave);
  box-shadow: inset 0 0 0 3px var(--error), 0 5px 0 var(--error);
  opacity: 0.55;
}

.opcion.colocada {
  opacity: 0.25;
}

.sacudida {
  animation: sacude 0.3s ease;
}

@keyframes sacude {
  0%, 100% { translate: 0; }
  25% { translate: -4px; }
  75% { translate: 4px; }
}

@keyframes salta {
  0%, 100% { scale: 1; }
  40% { scale: 1.12; }
}

@keyframes celebra {
  0%, 100% { scale: 1; }
  50% { scale: 1.1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Dibujos ---------- */

.emoji,
.bicho,
.arbol,
.casa,
.palmadas,
.contenedor,
.carta {
  font-family: var(--fuente-emoji);
}

.emoji {
  font-size: 3rem;
  line-height: 1.1;
}

.emoji.tam-1 { font-size: 1.6rem; }
.emoji.tam-2 { font-size: 2.6rem; }
.emoji.tam-3 { font-size: 3.4rem; }
.emoji.tam-4 { font-size: 4.4rem; }

.tarjeta-dibujo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tarjeta-dibujo small {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tinta-suave);
  text-align: center;
  line-height: 1.15;
}

.numero {
  font-family: var(--fuente-titulos);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primario);
}

.puntos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-width: 70px;
}

.puntos i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--acento);
}

.grupo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
  max-width: 320px;
}

.grupo .emoji {
  font-size: 2rem;
}

.grupo-contar {
  max-width: 300px;
}

.grupo-contar .emoji {
  font-size: 2.6rem;
}

.serie,
.serie-numeros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.serie .emoji {
  font-size: 2.2rem;
}

.serie .forma {
  width: 40px;
  height: 40px;
}

.serie-numeros .numero,
.serie-numeros .hueco {
  min-width: 56px;
  text-align: center;
}

.hueco {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 3px dashed var(--acento);
  border-radius: 12px;
  font-family: var(--fuente-titulos);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--acento);
}

.cinta {
  display: block;
  height: 26px;
  border-radius: 13px;
  box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.15);
  align-self: flex-start;
}

.una-columna .opcion {
  min-height: 80px;
}

.torre {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: center;
  gap: 3px;
  height: 180px;
}

.torre i {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 5px;
  background: var(--comunicacion);
  box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.18);
}

.torre i:nth-child(even) {
  background: var(--acento);
}

.letra {
  font-family: var(--fuente-titulos);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--comunicacion);
}

.palabra {
  font-family: var(--fuente-titulos);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tinta);
}

.palmadas {
  font-size: 2rem;
  letter-spacing: 4px;
}

.contenedor {
  display: grid;
  place-items: center;
  width: 64px;
  height: 78px;
  border-radius: 10px 10px 14px 14px;
  background: var(--color);
  font-size: 1.8rem;
  box-shadow: inset 0 10px 0 rgb(0 0 0 / 0.18);
}

/* ---------- Escenas de «¿Dónde está?» ---------- */

.escena {
  position: relative;
  display: block;
  width: 100%;
  max-width: 170px;
  aspect-ratio: 5 / 4;
  border-bottom: 4px solid #9ccc65;
  container-type: inline-size;
}

.escena .bicho {
  position: absolute;
  bottom: 0;
  font-size: 24cqw;
  line-height: 1;
  z-index: 2;
}

.caja {
  position: absolute;
  bottom: 0;
  left: 29%;
  width: 42%;
  height: 30%;
  border-radius: 0 0 6px 6px;
  background: #d9a066;
  box-shadow: inset 0 0 0 3px #a8703a;
  z-index: 3;
}

.mesa {
  position: absolute;
  bottom: 0;
  left: 12%;
  width: 76%;
  height: 48%;
  border-top: 6cqw solid #8d5a2b;
  border-left: 5cqw solid #8d5a2b;
  border-right: 5cqw solid #8d5a2b;
  border-radius: 4px 4px 0 0;
}

.escena .arbol {
  position: absolute;
  bottom: -3%;
  left: 20%;
  font-size: 46cqw;
  line-height: 1;
  z-index: 2;
}

.escena .casa {
  position: absolute;
  bottom: -2%;
  left: 0;
  font-size: 32cqw;
  line-height: 1;
}

.escena-dentro .bicho { left: 38%; bottom: 20%; }
.escena-fuera .bicho { left: 0; }
.escena-izquierda .bicho { left: 0; }
.escena-derecha .bicho { right: 0; }
.escena-encima .bicho { left: 38%; bottom: 46%; }
.escena-debajo .bicho { left: 38%; }
.escena-delante .bicho { left: 40%; bottom: -3%; z-index: 3; font-size: 26cqw; }
.escena-detras .bicho { left: 58%; bottom: 30%; z-index: 1; font-size: 20cqw; }
.escena-cerca .bicho { left: 34%; }
.escena-lejos .bicho { right: 0; }
.escena .arbol-1,
.escena .arbol-2 { font-size: 30cqw; }
.escena-entre .arbol-1 { left: 0; }
.escena-entre .arbol-2 { left: 70%; }
.escena-entre .bicho { left: 36%; }
.escena-lado .arbol-1 { left: 0; }
.escena-lado .arbol-2 { left: 28%; }
.escena-lado .bicho { right: 0; }

.opcion .escena {
  width: 100%;
}

/* ---------- Ordenar ---------- */

.fila-orden {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hueco-orden {
  display: grid;
  place-items: center;
  width: 84px;
  min-height: 92px;
  padding: 4px;
  border: 3px dashed var(--borde);
  border-radius: 14px;
  counter-increment: paso;
}

.hueco-orden.lleno {
  border-style: solid;
  border-color: var(--acierto);
  background: var(--acierto-suave);
}

.hueco-orden .emoji {
  font-size: 2.2rem;
}

.hueco-orden small {
  font-size: 0.75rem;
}

/* ---------- Parejas ---------- */

.tablero.rejilla-memoria {
  grid-template-columns: repeat(var(--columnas), minmax(0, 1fr));
  gap: 10px;
}

.carta {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 16px;
  background: var(--primario);
  font-size: clamp(2rem, 9vw, 3rem);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--primario-sombra);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carta .cara {
  display: none;
}

.carta .dorso {
  color: #fff;
  opacity: 0.9;
  font-size: 0.7em;
}

.carta.vuelta {
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--borde), 0 4px 0 var(--borde);
}

.carta.vuelta .cara {
  display: inline;
}

.carta.vuelta .dorso {
  display: none;
}

.carta.bien {
  background: var(--acierto-suave);
  box-shadow: inset 0 0 0 3px var(--acierto), 0 4px 0 var(--acierto);
}

/* ---------- Robot ---------- */

.rejilla-robot {
  --celda: min(64px, calc((100vw - 80px) / var(--lado)));
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--lado), var(--celda));
  grid-auto-rows: var(--celda);
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--borde);
}

.casilla {
  display: grid;
  place-items: center;
  font-family: var(--fuente-emoji);
  font-size: calc(var(--celda) * 0.6);
  background: #f3fbe9;
  box-shadow: inset 0 0 0 1px #d9ecc4;
}

.ficha {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: var(--celda);
  height: var(--celda);
  font-family: var(--fuente-emoji);
  font-size: calc(var(--celda) * 0.68);
  transform: translate(calc(var(--columna) * var(--celda)), calc(var(--fila) * var(--celda)));
  transition: transform 0.3s ease;
  z-index: 2;
}

.controles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cruz-flechas {
  display: grid;
  grid-template-areas: '. arriba .' 'izquierda . derecha' '. abajo .';
  gap: 6px;
}

.flecha {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  font-family: var(--fuente-emoji);
  font-size: 2.2rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px var(--primario), 0 4px 0 var(--primario);
}

.flecha:active {
  transform: translateY(3px);
}

.flecha-arriba { grid-area: arriba; }
.flecha-abajo { grid-area: abajo; }
.flecha-izquierda { grid-area: izquierda; }
.flecha-derecha { grid-area: derecha; }

.programa {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  width: 100%;
  max-width: 520px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--borde);
  font-family: var(--fuente-emoji);
  font-size: 1.7rem;
}

.programa em {
  align-self: center;
  font-family: var(--fuente);
  font-size: 0.95rem;
  color: var(--tinta-suave);
}

.programa .hecho {
  opacity: 0.35;
}

.acciones-programa {
  display: flex;
  gap: 16px;
}

.boton-play {
  min-width: 110px;
  background: var(--acierto);
  box-shadow: 0 4px 0 #1f7d4a;
}

/* ---------- Resultado ---------- */

.estrellas-grandes {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: clamp(4rem, 22vw, 6rem);
  line-height: 1;
}

.estrellas-grandes span {
  color: var(--borde);
}

.estrellas-grandes .ganada {
  color: var(--estrella);
  text-shadow: 0 4px 0 #d79a00;
  animation: aparece 0.5s ease both;
  animation-delay: var(--retraso);
}

@keyframes aparece {
  from { scale: 0; rotate: -90deg; }
  to { scale: 1; rotate: 0deg; }
}

.resumen {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

/* ---------- Control segmentado (tipo de sugerencia) ---------- */

.segmentado {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--borde);
}

.segmentado-dos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmentado label {
  position: relative;
}

.segmentado input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmentado span {
  display: block;
  padding: 10px 4px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  color: var(--tinta-suave);
}

.segmentado input:checked + span {
  background: var(--primario);
  color: #fff;
}

.segmentado input:focus-visible + span {
  outline: 3px solid var(--acento);
  outline-offset: 2px;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
}

/* ---------- Diálogos ---------- */

.dialogo {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--papel);
  color: var(--tinta);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.3);
}

.dialogo::backdrop {
  background: rgb(43 35 80 / 0.45);
}

.dialogo-contenido {
  max-height: calc(100dvh - 120px);
  padding: 20px 20px 8px;
  overflow-y: auto;
  line-height: 1.55;
}

.dialogo-contenido h2,
.dialogo-contenido h3,
.dialogo-contenido h4 {
  font-family: var(--fuente-titulos);
}

.dialogo-contenido h3 {
  margin: 18px 0 6px;
}

.dialogo-contenido h4 {
  margin: 14px 0 4px;
  color: var(--primario);
}

.info-curriculo {
  padding: 4px 14px 8px;
  border-radius: 14px;
  background: #fff;
}

.info-curriculo .info-area {
  margin: 10px 0 2px;
  font-weight: 800;
}

.info-curriculo ul {
  margin: 0;
  padding-left: 20px;
}

.info-curriculo li {
  margin: 4px 0;
}

.info-curriculo em {
  display: block;
  font-size: 0.85rem;
  color: var(--tinta-suave);
}

.dialogo-pie {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 18px;
}

.formulario-sugerencia {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.formulario-sugerencia h2 {
  margin: 0;
  font-family: var(--fuente-titulos);
}

.formulario-sugerencia textarea {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--borde);
  resize: vertical;
}

.sugerencia-pie {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: -6px 0 0;
  font-size: 0.85rem;
  color: var(--tinta-suave);
}

.trampa {
  position: absolute;
  left: -9999px;
}

.sugerencia-estado {
  min-height: 1.2em;
  margin: 0;
  font-weight: 700;
}

.sugerencia-estado.bien {
  color: var(--acierto);
}

.sugerencia-estado.mal {
  color: var(--error);
}

.sugerencia-botones {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Invítame a un café (botón común) ---------- */

.enlace-cafe {
  display: inline-block;
  margin-top: 12px;
  padding-left: 0;
}
