:root {
  --morado: #6b4fd8;
  --morado2: #8e6cff;
  --rosa: #ff6fa8;
  --coral: #ff5e7e;
  --amarillo: #ffd23f;
  --verde: #3ccf7a;
  --azul: #3fb4ff;
  --tinta: #2c2140;
  --sombra: 0 6px 0 rgba(44, 33, 64, .25), 0 12px 24px rgba(44, 33, 64, .25);
  font-family: 'Fredoka', 'Comic Sans MS', system-ui, sans-serif;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #8fdc5e;
  color: var(--tinta);
  touch-action: none;
}
canvas#juego {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.oculto { display: none !important; }

/* ---------- Botones ---------- */
button, .btn-link-yt {
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-redondo {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  font-size: 30px;
  background: #fff;
  box-shadow: var(--sombra);
  transition: transform .15s;
  display: grid;
  place-items: center;
}
.btn-redondo:hover { transform: scale(1.06); }
.btn-redondo:active, .btn-grande:active, .btn-grande-secundario:active, .btn-medio:active, .btn-pastilla:active, .btn-pdi:active, .carta-letra:active, .btn-premio-video:active {
  transform: translateY(4px) scale(.96);
  box-shadow: 0 2px 0 rgba(44,33,64,.25);
}
.btn-pastilla {
  height: 64px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  background: #fff;
  color: var(--morado);
  box-shadow: var(--sombra);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn-pastilla.activo {
  background: var(--amarillo);
  color: var(--tinta);
}
.btn-cine-pill {
  background: linear-gradient(180deg, #ff6fa8, #e8458a);
  color: #fff;
}
.titulo-botones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.btn-grande {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  padding: 18px 68px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb13b, #ff7a2f);
  box-shadow: 0 8px 0 #c9541a, 0 16px 30px rgba(0,0,0,.25);
  animation: latido 1.6s ease-in-out infinite;
}
.btn-grande-secundario {
  font-size: clamp(20px, 3.2vw, 28px);
  font-weight: 700;
  color: #fff;
  padding: 14px 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  box-shadow: 0 6px 0 #9e1f56, 0 12px 24px rgba(0,0,0,.22);
  gap: 10px;
}
.btn-medio {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  padding: 15px 24px;
  border-radius: 20px;
  box-shadow: var(--sombra);
  transition: transform .15s;
  gap: 8px;
}
.btn-medio:hover { transform: translateY(-2px); }
.verde { background: linear-gradient(180deg, #52e08e, #26b562); }
.azul { background: linear-gradient(180deg, #5cc4ff, #2a90e0); }
.gris { background: linear-gradient(180deg, #a9a0c4, #7d7399); }
.naranja { background: linear-gradient(180deg, #ffb13b, #ff7a2f); }
@keyframes latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- Pantallas ---------- */
.pantalla {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #a98bff 0%, #6b4fd8 45%, #3d2a8f 100%);
  color: #fff;
  z-index: 20;
  animation: aparecer .35s ease;
  text-transform: uppercase;
}
.pantalla.visible { display: flex; }
@keyframes aparecer { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }

#pantallaCarga p { font-size: 26px; font-weight: 700; margin-top: 14px; }
.gato-carga { height: 140px; animation: botar 0.7s ease-in-out infinite alternate; }
.barra {
  width: min(420px, 80vw);
  height: 26px;
  border-radius: 99px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
  margin-top: 20px;
  border: 3px solid #fff;
}
#barraCarga {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amarillo), var(--rosa));
  transition: width .2s;
}
@keyframes botar { from { transform: translateY(0); } to { transform: translateY(-18px); } }

/* Título */
#pantallaTitulo {
  background: linear-gradient(180deg, #7fd3ff 0%, #b8ecff 55%, #8fdc5e 55.2%, #6cc24a 100%);
}
.titulo-caja {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
h1 {
  font-size: clamp(42px, 8vw, 88px);
  line-height: 1;
  text-align: center;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 5px 0 var(--morado), 0 10px 0 #3d2a8f, 0 18px 30px rgba(0,0,0,.25);
  -webkit-text-stroke: 2px var(--morado);
}
h1 span { color: var(--amarillo); }
.gato-titulo {
  height: clamp(130px, 23vh, 210px);
  animation: botar .8s ease-in-out infinite alternate;
  filter: drop-shadow(0 12px 8px rgba(0,0,0,.2));
}
.flotante-sup {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 12px;
  z-index: 5;
}
#letrasFlotantes { position: absolute; inset: 0; overflow: hidden; }
#letrasFlotantes span {
  position: absolute;
  font-weight: 700;
  color: #fff;
  border-radius: 16px;
  display: grid;
  place-items: center;
  box-shadow: var(--sombra);
  animation: flotar linear infinite;
}
@keyframes flotar { from { transform: translateY(110vh) rotate(0); } to { transform: translateY(-20vh) rotate(360deg); } }

/* Mundos y Videoteca */
#pantallaMundos, #pantallaVideoteca {
  justify-content: flex-start;
  padding: 20px;
  overflow-y: auto;
  touch-action: pan-y;
}
.mundos-cabecera {
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.mundos-cabecera h2 {
  flex: 1;
  font-size: clamp(24px, 4vw, 40px);
  text-shadow: 0 4px 0 #3d2a8f;
}
.nowrap { white-space: nowrap; }
.lista-mundos {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
  align-items: start;
  padding-bottom: 40px;
}
.mundo {
  border-radius: 28px;
  padding: 16px 16px 18px;
  color: var(--tinta);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sombra);
  border: 4px solid #fff;
  transition: transform .2s;
}
.mundo.bloqueado { filter: grayscale(.8) brightness(.88); }
.mundo .emoji {
  font-size: 52px;
  position: absolute;
  right: 14px;
  top: 8px;
  filter: drop-shadow(0 4px 2px rgba(0,0,0,.2));
}
.mundo h3 { font-size: 24px; margin-right: 60px; font-weight: 700; }
.mundo .letras { font-size: 16px; font-weight: 700; opacity: .82; margin: 4px 0 10px; }
.niveles { display: flex; flex-wrap: wrap; gap: 8px; }
.nivel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.nivel {
  position: relative;
  width: 64px;
  height: 70px;
  border-radius: 18px;
  background: #fff;
  font-size: 26px;
  font-weight: 700;
  color: var(--morado);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
  transition: transform .15s;
}
.nivel:hover:not(:disabled) { transform: scale(1.08); }
.nivel small { font-size: 13px; letter-spacing: -1px; color: #f5a623; }
.nivel:disabled { background: rgba(255,255,255,.5); color: #888; cursor: not-allowed; }
.nivel.repaso { width: 84px; background: linear-gradient(180deg, #fff6c9, #ffe27a); }
.nivel.siguiente { animation: latido 1.2s infinite; outline: 4px solid var(--amarillo); }
.nivel .badge-musica {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  border: 2px solid #fff;
}
.btn-mini-cancion {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  color: #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
  white-space: nowrap;
}

/* ---------- Galería Videoteca (#pantallaVideoteca) ---------- */
.grid-videoteca {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  padding-bottom: 48px;
}
.card-video {
  background: #fff;
  color: var(--tinta);
  border-radius: 28px;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s;
}
.card-video:hover { transform: translateY(-5px); }
.card-video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #2c2140;
  overflow: hidden;
}
.card-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-video-letra {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--rosa), #d9387c);
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.card-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 10, 40, .22);
}
.card-video-play span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 210, 63, .95);
  color: var(--tinta);
  font-size: 32px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.card-video-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-video-body h3 {
  font-size: 21px;
  color: var(--morado);
  line-height: 1.15;
}
.card-video-body p {
  font-size: 15px;
  font-weight: 600;
  opacity: .75;
}
.card-video-objs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.card-video-objs img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #f4f1fb;
  border-radius: 10px;
  padding: 4px;
}

/* ---------- HUD Superior (Docente / Info) ---------- */
#hudSuperior {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
  text-transform: uppercase;
}
#hudSuperior > * { pointer-events: auto; }
.hud-grupo { display: flex; gap: 12px; align-items: center; }
.hud-pastilla {
  background: #fff;
  color: var(--morado);
  font-weight: 700;
  font-size: 22px;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--sombra);
  white-space: nowrap;
  text-transform: uppercase;
}

/* ---------- HUD Inferior Ergonómico PDI (Al alcance de los niños) ---------- */
#hudInferior {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 18px;
  border-radius: 34px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  pointer-events: auto;
  max-width: 98vw;
}
.carta-letra {
  width: 84px;
  height: 92px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 62px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, var(--rosa), #e8458a);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.15);
  text-shadow: 0 3px 0 rgba(0,0,0,.2);
  position: relative;
  flex-shrink: 0;
}
.carta-letra::after {
  content: '🔊';
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 16px;
  opacity: 0.85;
}
.carta-letra.vacia {
  background: linear-gradient(180deg, #a78bfa, #7c5dfa);
  color: #ffffff;
  text-shadow: 0 3px 0 rgba(0,0,0,.2);
  animation: latido 1.4s infinite;
}
.carta-letra.nueva { animation: pop .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes pop { 0% { transform: scale(.2) rotate(-25deg); } 100% { transform: none; } }

.huecos { display: flex; gap: 10px; }
.hueco {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  border: 3px dashed #b9b0d6;
  display: grid;
  place-items: center;
  background: #f4f1fb;
}
.hueco img { max-width: 62px; max-height: 62px; animation: pop .6s cubic-bezier(.3,1.8,.5,1); }
.hueco.lleno { border: 4px solid var(--verde); background: #e9fff1; }

.btn-pdi {
  height: 76px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 0 rgba(0,0,0,.2);
  white-space: nowrap;
}
.btn-pdi span.icono { font-size: 30px; }
.btn-pdi.voz { background: linear-gradient(180deg, #5cc4ff, #2a90e0); }
.btn-pdi.pista { background: linear-gradient(180deg, #ffd23f, #f59e0b); color: var(--tinta); }
.btn-pdi.cancion {
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  animation: pulsoBrillo 2.2s ease-in-out 3;
}
@keyframes pulsoBrillo {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 0 rgba(0,0,0,.2); }
  50% { transform: scale(1.06); box-shadow: 0 0 22px #ff6fa8, 0 6px 0 rgba(0,0,0,.2); }
}

/* Bocadillo de texto en MAYÚSCULAS encima de la barra inferior */
.bocadillo {
  position: fixed;
  bottom: 144px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 22px;
  border-radius: 22px;
  border: 3px solid var(--morado2);
  font-size: clamp(16px, 2vw, 23px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--tinta);
  box-shadow: var(--sombra);
  max-width: min(820px, 88vw);
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  animation: subir .3s ease;
}
.bocadillo b { color: #e8458a; font-size: 1.18em; }
@keyframes subir { from { transform: translate(-50%, 24px); opacity: 0; } }

/* ---------- Modal Fin de Nivel ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5vh;
  background: rgba(30, 20, 60, .58);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}
.modal-caja {
  background: linear-gradient(180deg, #fff, #f3eeff);
  border-radius: 36px;
  padding: 26px 30px;
  text-align: center;
  width: min(650px, 94vw);
  border: 5px solid #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: pop .45s cubic-bezier(.3,1.6,.5,1);
}
.modal-caja h2 { font-size: clamp(28px, 4.8vw, 40px); color: var(--morado); }
.fin-estrellas { font-size: 68px; margin: 4px 0; letter-spacing: 6px; }
.fin-estrellas span { display: inline-block; animation: pop .6s cubic-bezier(.3,1.8,.5,1) backwards; }
.fin-estrellas .apagada { filter: grayscale(1) opacity(.28); }
.fin-objetos {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}
.fin-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  font-weight: 700;
  font-size: 19px;
}
.fin-item img { height: 62px; margin-bottom: 4px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.15)); }
.fin-item b { color: #e8458a; font-size: 1.2em; }

.btn-premio-video {
  width: 100%;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 700;
  color: #fff;
  padding: 16px 24px;
  margin-bottom: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  box-shadow: 0 6px 0 #9e1f56, 0 10px 24px rgba(217, 56, 124, .35);
  animation: latido 1.5s infinite;
}
.modal-botones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Modal Reproductor «MODO CINE INFANTIL SEGURO» (#modalVideo) ---------- */
.modal-video {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(22, 14, 48, .82);
  backdrop-filter: blur(6px);
  text-transform: uppercase;
}
.video-caja {
  background: linear-gradient(180deg, #ffffff, #f3eeff);
  border-radius: 32px;
  padding: 18px 22px;
  width: min(980px, 96vw);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 5px solid #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  overflow-y: auto;
}
.video-cabecera {
  display: flex;
  align-items: center;
  gap: 14px;
}
.video-badge-letra {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--rosa), #d9387c);
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.2);
  flex-shrink: 0;
}
.video-titulos h2 {
  font-size: clamp(22px, 3.2vw, 32px);
  color: var(--morado);
  line-height: 1.1;
}
.video-titulos p {
  font-size: 16px;
  font-weight: 700;
  color: #7a6b9e;
}

.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 52vh;
  background: #1c1333;
  border-radius: 22px;
  overflow: hidden;
  border: 4px solid #e2d9ff;
}
.yt-wrapper, .yt-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Pantalla festiva al acabar la canción (impide clics en vídeos externos) */
.fin-video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #8e6cff, #4c32a8);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  gap: 12px;
  text-align: center;
  z-index: 5;
}
.fin-video-overlay h3 {
  font-size: clamp(28px, 4.5vw, 44px);
  color: var(--amarillo);
  text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.fin-video-coro {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 700;
  max-width: 85%;
}
.fin-video-dibujos {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.fin-video-botones {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* Fila de dibujos del vídeo (tocables para pronunciar su nombre) */
.video-vocabulario {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vocab-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 3px solid #e2d9ff;
  border-radius: 18px;
  padding: 6px 14px 6px 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--tinta);
  box-shadow: 0 4px 0 rgba(0,0,0,.1);
}
.vocab-chip img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.vocab-chip b { color: #e8458a; }

/* Capítulos rápidos */
.video-capitulos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-capitulo {
  font-size: 14px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 12px;
  background: #ebe4ff;
  color: var(--morado);
}
.btn-capitulo:hover { background: var(--amarillo); color: var(--tinta); }

/* Controles inferiores PDI */
.video-controles-pdi {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.btn-volver-grande {
  font-size: 23px;
  padding: 16px 32px;
}

@media (max-width: 760px) {
  .btn-redondo { width: 52px; height: 52px; font-size: 24px; }
  .carta-letra { width: 66px; height: 74px; font-size: 48px; }
  .hueco { width: 56px; height: 56px; }
  .hueco img { max-width: 46px; max-height: 46px; }
  .btn-pdi { height: 62px; padding: 0 14px; font-size: 18px; }
  .btn-pdi span.texto-btn { display: none; }
  .bocadillo { bottom: 112px; font-size: 16px; padding: 8px 16px; max-width: 92vw; }
  .minimapa { width: 136px; height: 98px; top: 82px; right: 10px; border-width: 3px; border-radius: 14px; }
  .mini-cabecera { gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
  .mini-cabecera h2 { font-size: 19px; min-width: 140px; }
  .mini-cabecera .pill, .mini-cabecera .btn-pdi { height: 46px; font-size: 15px; padding: 0 12px; }
}
@media (max-width: 560px) {
  .minimapa { display: none; }
}

/* ---------- 🎲 RINCÓN DE JUEGOS PDI (5 Minijuegos) ---------- */
.titulo-subbotones {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.morado-btn {
  background: linear-gradient(180deg, #8e6cff, #5a3ec8) !important;
  box-shadow: 0 6px 0 #382294, 0 12px 24px rgba(0,0,0,.22) !important;
}
.btn-juegos-pill {
  background: linear-gradient(180deg, #52e08e, #26b562);
  color: #fff;
}
#pantallaMinijuegos, #pantallaJuegoMini {
  justify-content: flex-start;
  padding: 18px 20px;
  overflow-y: auto;
  touch-action: pan-y;
}
.filtro-letras-mini {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-filtro-mini {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255,255,255,.22);
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}
.btn-filtro-mini.activo {
  background: var(--amarillo);
  color: var(--tinta);
  border-color: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.2);
}
.grid-minijuegos {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}
.card-minijuego {
  background: #fff;
  color: var(--tinta);
  border-radius: 28px;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s;
}
.card-minijuego:hover { transform: translateY(-5px); }
.card-mini-top {
  height: 118px;
  display: grid;
  place-items: center;
}
.card-mini-icono {
  font-size: 64px;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.22));
}
.card-mini-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-mini-body h3 { font-size: 24px; color: var(--morado); }
.card-mini-body p { font-size: 16px; font-weight: 600; opacity: .82; flex: 1; }

/* Cabecera y escenario común de minijuego */
.mini-cabecera {
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.mini-cabecera h2 {
  flex: 1;
  font-size: clamp(22px, 3.6vw, 36px);
  text-shadow: 0 4px 0 #3d2a8f;
}
.mini-escenario {
  width: 100%;
  max-width: 1180px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding-bottom: 12px;
}
.mini-controles-pdi {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(255,255,255,.15);
  padding: 8px 14px;
  border-radius: 24px;
}

/* 1. ✍️ Traza la Letra */
.traza-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.traza-panel-dibujos {
  background: rgba(255,255,255,.94);
  color: var(--tinta);
  padding: 18px;
  border-radius: 26px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 250px;
}
.traza-instruccion { font-size: 19px; font-weight: 700; color: var(--morado); }
.traza-dibujos-lista { display: flex; flex-direction: column; gap: 10px; }
.traza-chip { width: 100%; justify-content: flex-start; font-size: 20px; padding: 10px 16px; }
.traza-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.traza-lienzo-wrap {
  position: relative;
  background: #fff;
  border-radius: 32px;
  border: 6px solid var(--amarillo);
  box-shadow: var(--sombra);
  overflow: hidden;
  touch-action: none;
}
#cvTraza {
  display: block;
  width: min(460px, 86vw, 56vh);
  height: auto;
  aspect-ratio: 460 / 400;
  touch-action: none;
  cursor: crosshair;
}
.traza-exito {
  position: absolute;
  inset: 0;
  background: rgba(60, 207, 122, .25);
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: pop .5s ease;
}
.traza-exito span {
  background: var(--amarillo);
  color: var(--tinta);
  font-size: 32px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
}
.traza-barra-progreso {
  width: 100%;
  height: 22px;
  background: rgba(255,255,255,.3);
  border-radius: 999px;
  border: 3px solid #fff;
  overflow: hidden;
}
.traza-relleno {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--amarillo), var(--verde));
  transition: width .15s;
}
.traza-selector-letras {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-letra-mini {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  color: var(--morado);
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(0,0,0,.2);
}
.btn-letra-mini.activa {
  background: var(--rosa);
  color: #fff;
  transform: scale(1.1);
}
.traza-botones-accion { display: flex; gap: 12px; }

/* 2. 🧺 Las Cestas de las Letras */
.cestas-escenario, .parejas-escenario, .completa-escenario {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.cestas-instruccion {
  background: rgba(255,255,255,.95);
  color: var(--tinta);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: clamp(18px, 2.5vw, 25px);
  font-weight: 700;
  box-shadow: var(--sombra);
  text-align: center;
}
.cestas-instruccion b { color: #e8458a; font-size: 1.15em; }
.cestas-tarjetas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 145px;
}
.cesta-card {
  width: 142px;
  background: #fff;
  color: var(--tinta);
  border-radius: 24px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
  border: 4px solid #e2d9ff;
  box-shadow: var(--sombra);
  cursor: grab;
  touch-action: none;
  transition: transform .15s, opacity .25s;
}
.cesta-card img { width: 78px; height: 78px; object-fit: contain; pointer-events: none; }
.cesta-card b { color: #e8458a; }
.cesta-card.seleccionada {
  border-color: var(--amarillo);
  background: #fffbe6;
  transform: scale(1.08);
}
.cesta-card.colocada {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.3);
}
.cesta-card.error-sacude { animation: sacudir .4s ease; border-color: #ff4d4d; }
@keyframes sacudir {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}
.cestas-fila-inferior {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  width: 100%;
}
.cesta-caja {
  background: linear-gradient(180deg, #ff8cbc, #d9387c);
  border-radius: 32px;
  padding: 18px;
  border: 5px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 190px;
  cursor: pointer;
}
.cesta-caja.cesta-azul {
  background: linear-gradient(180deg, #5cc4ff, #2a90e0);
}
.cesta-letra {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #fff;
  color: var(--tinta);
  font-size: 48px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.2);
}
.cesta-titulo { font-size: 22px; font-weight: 700; color: #fff; }
.cesta-huecos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.cesta-mini-item {
  background: #fff;
  color: var(--tinta);
  padding: 6px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 16px;
  animation: pop .4s ease;
}
.cesta-mini-item img { width: 38px; height: 38px; object-fit: contain; }

/* 3. 🫧 Explota las Pompas */
.pompas-escenario {
  width: 100%;
  height: calc(100vh - 118px);
  max-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
#cvPompas {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.22), rgba(255,255,255,.05));
  border-radius: 28px;
  border: 4px solid rgba(255,255,255,.4);
  touch-action: none;
  cursor: pointer;
}
.pompas-barra-pdi {
  flex-shrink: 0;
  margin-top: 8px;
  background: rgba(255,255,255,.95);
  color: var(--tinta);
  padding: 8px 18px;
  border-radius: 26px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.pompas-info { display: flex; flex-direction: column; gap: 2px; }
.pompas-meta { font-size: 22px; font-weight: 700; }
.pompas-meta b { color: #e8458a; font-size: 1.2em; }
.pompas-contador { font-size: 26px; font-weight: 700; color: var(--morado); }

/* 4. 🔤 Completa la Palabra */
.completa-dibujo-caja {
  background: #fff;
  color: var(--tinta);
  padding: 10px 26px;
  border-radius: 28px;
  border: 5px solid var(--amarillo);
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.completa-dibujo-caja img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}
.completa-icono-voz {
  font-size: 15px;
  font-weight: 700;
  color: var(--morado);
}
.completa-casillas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.casilla-letra {
  width: 58px;
  height: 66px;
  border-radius: 16px;
  background: #fff;
  color: var(--tinta);
  font-size: 38px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: var(--sombra);
}
.casilla-letra.HuecoInicial {
  background: var(--amarillo);
  color: #e8458a;
  border: 4px dashed #e8458a;
  animation: latido 1.2s infinite;
}
.casilla-letra.HuecoInicial.resuelta {
  background: var(--verde);
  color: #fff;
  border: 4px solid #fff;
  animation: pop .5s ease;
}
.completa-instruccion {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.completa-opciones-pdi {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-opcion-letra {
  width: 98px;
  height: 98px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ff8cbc, #d9387c);
  color: #fff;
  font-size: 56px;
  font-weight: 700;
  border: 5px solid #fff;
  box-shadow: var(--sombra);
}
.btn-opcion-letra.acierto {
  background: linear-gradient(180deg, #52e08e, #26b562);
  transform: scale(1.1);
}
.btn-opcion-letra.fallo {
  opacity: .45;
  filter: grayscale(.8);
}

/* 5. 🃏 Parejas Sonoras (Memory PDI) */
.parejas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 195px));
  gap: 16px;
  justify-content: center;
  width: 100%;
}
.carta-memory {
  height: 155px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffd23f, #ff8a3d);
  border: 5px solid #fff;
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
  padding: 10px;
}
.memory-dorso {
  font-size: 62px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.memory-frente {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  color: var(--tinta);
  font-size: 20px;
  font-weight: 700;
}
.memory-frente img { width: 82px; height: 82px; object-fit: contain; }
.memory-frente b { color: #e8458a; }
.memory-letra-gigante {
  font-size: 82px;
  font-weight: 700;
  color: var(--morado);
}
.carta-memory.volteada, .carta-memory.emparejada {
  background: #fff;
}
.carta-memory.volteada .memory-dorso, .carta-memory.emparejada .memory-dorso {
  display: none;
}
.carta-memory.volteada .memory-frente, .carta-memory.emparejada .memory-frente {
  display: flex;
  animation: pop .35s ease;
}
.carta-memory.emparejada {
  border-color: var(--verde);
  background: #e9fff1;
}

/* Confeti festivo sobre modales y minijuegos */
.confeti-dom {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.confeti-dom span {
  position: absolute;
  top: -24px;
  width: 16px;
  height: 24px;
  border-radius: 5px;
  animation: caerConfeti linear forwards;
}
@keyframes caerConfeti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

/* ---------- BLOQUE 3, 4, 5 y 6: NUEVAS FUNCIONES MAESTRAS ---------- */

/* Botones adicionales de cabecera y título */
.azul-btn {
  background: linear-gradient(180deg, #5cc4ff, #2a90e0) !important;
  box-shadow: 0 6px 0 #1b65a3, 0 12px 24px rgba(0,0,0,.22) !important;
}
.btn-album-pill {
  background: linear-gradient(180deg, #5cc4ff, #2a90e0);
  color: #fff;
}

/* Modo Doble Letra (Aa) — respeta minúscula cuando el docente activa 'Aa' */
.texto-doble-letra {
  text-transform: none !important;
}
.nivel.con-doble {
  font-size: 24px;
}
.carta-letra.con-doble {
  font-size: 46px;
}

/* Botón directo de Vídeo Temático en cada tarjeta de Mundo (#pantallaMundos) */
.btn-mundo-video {
  margin-top: 14px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  box-shadow: 0 4px 0 #9e1f56, 0 6px 14px rgba(0,0,0,.18);
  border: 2px solid #fff;
  gap: 8px;
}
.btn-mundo-video.estreno-polar {
  background: linear-gradient(180deg, #3fb4ff, #1d6fd1);
  box-shadow: 0 4px 0 #12488a, 0 6px 14px rgba(0,0,0,.22);
  animation: pulsoBrillo 2.2s ease-in-out infinite;
}

/* Pestañas grandes de la Videoteca (#tabsVideoteca) */
.tabs-videoteca {
  width: 100%;
  max-width: 1180px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.btn-tab-video {
  flex: 1;
  min-width: 240px;
  padding: 16px 20px;
  border-radius: 22px;
  font-size: clamp(16px, 2.1vw, 21px);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
  transition: transform .15s, background .15s;
}
.btn-tab-video.activo {
  background: var(--amarillo);
  color: var(--tinta);
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,.22);
}

/* Tarjeta de vídeo con insignia temática o Estreno Polar */
.card-video-badge-mundo {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(44, 33, 64, 0.88);
  color: var(--amarillo);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid #fff;
  z-index: 3;
}
.card-video-badge-mundo.estreno {
  background: linear-gradient(90deg, #ff5e7e, #ffb13b);
  color: #fff;
  animation: latido 1.4s infinite;
}
.thumb-polar-fallback,
.thumb-video-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, #2d3e8f 0%, #5c6be0 58%, #9b7dff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #fff;
  text-align: center;
  padding: 10px 14px;
  position: relative;
}
.thumb-polar-fallback {
  background: linear-gradient(180deg, #1b4f9c 0%, #5ec8f2 60%, #eef7ff 100%);
  justify-content: center;
}
.thumb-polar-fallback .polar-iconos {
  font-size: 52px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
}
.thumb-video-fallback .video-fb-iconos {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 24px;
  opacity: 0.72;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.25));
}
.thumb-polar-fallback span,
.thumb-video-fallback span {
  font-size: 13px;
  font-weight: 700;
  background: rgba(20, 45, 90, 0.78);
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid #fff;
  max-width: 82%;
  line-height: 1.2;
}

/* Reproductor de vídeo MP4 local */
.local-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* ---------- BLOQUE 5: 📒 ÁLBUM INTERACTIVO DE LOS 91 DIBUJOS ---------- */
#pantallaAlbum {
  justify-content: flex-start;
  padding: 20px;
  overflow-y: auto;
  touch-action: pan-y;
}
.filtro-letras-album {
  width: 100%;
  max-width: 1180px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(255,255,255,.15);
  padding: 12px;
  border-radius: 24px;
}
.btn-letra-album {
  min-width: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  background: #fff;
  color: var(--morado);
  font-size: 21px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.btn-letra-album.activo {
  background: var(--amarillo);
  color: var(--tinta);
  transform: scale(1.08);
  outline: 3px solid #fff;
}
.grid-album {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}
.card-album {
  background: #fff;
  color: var(--tinta);
  border-radius: 26px;
  padding: 14px 12px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  transition: transform .15s;
}
.card-album:hover { transform: translateY(-4px); }
.card-album.gelatina {
  animation: gelatinaPop .55s cubic-bezier(.3, 1.8, .5, 1);
  border-color: var(--amarillo);
  background: #fffdf0;
}
@keyframes gelatinaPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.18, 0.86); }
  55% { transform: scale(0.92, 1.12); }
  80% { transform: scale(1.05, 0.96); }
  100% { transform: scale(1); }
}
.card-album-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--rosa), #d9387c);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
}
.card-album img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  margin-top: 10px;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,.14));
}
.card-album-palabra {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.card-album-palabra b {
  color: #e8458a;
  font-size: 1.18em;
}

/* ---------- BLOQUE 4: 6º MINIJUEGO «🚂 EL TREN DE LAS SÍLABAS» ---------- */
.tren-escenario {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
  flex: 1;
}
.tren-escenario .cestas-instruccion {
  font-size: clamp(16px, 2vw, 20px);
  padding: 7px 18px;
}
.tren-via-contenedor {
  position: relative;
  width: 100%;
  min-height: 142px;
  padding-top: 38px;
  background: linear-gradient(180deg, rgba(127, 211, 255, 0.35) 0%, rgba(143, 220, 94, 0.55) 75%, #6b4c35 75.5%, #4d3523 100%);
  border-radius: 26px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
}
.tren-traviesas {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  height: 16px;
  background:
    linear-gradient(180deg, #b8c7d9 0 3px, transparent 3px 13px, #b8c7d9 13px 16px),
    repeating-linear-gradient(90deg, #8b5a2b 0 18px, transparent 18px 42px);
  opacity: 0.92;
}
.tren-convoy {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  z-index: 2;
  transition: transform .65s cubic-bezier(.3, 1.4, .5, 1);
}
.tren-convoy.unido {
  gap: 2px;
}
.tren-convoy.marchando {
  animation: trenMarcha 1.1s ease-in-out forwards;
}
@keyframes trenMarcha {
  0% { transform: translateX(0); }
  25% { transform: translateX(-18px); }
  100% { transform: translateX(110vw); }
}
.tren-locomotora, .tren-vagon {
  position: relative;
  background: linear-gradient(180deg, #ff6fa8, #d9387c);
  border: 5px solid #fff;
  border-radius: 22px;
  padding: 8px 18px 14px;
  min-width: 140px;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sombra);
  color: #fff;
  font-family: inherit;
}
.tren-locomotora {
  cursor: pointer;
}
.tren-locomotora::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 24px;
  height: 20px;
  border-radius: 6px;
  background: #aee8ff;
  border: 3px solid #fff;
}
.tren-locomotora::after {
  content: '';
  position: absolute;
  left: -11px;
  bottom: 8px;
  width: 10px;
  height: 20px;
  border-radius: 6px 0 0 6px;
  background: #ffd23f;
  border: 3px solid #fff;
  border-right: none;
}
.tren-locomotora.silbando {
  animation: trenPita .48s ease;
}
@keyframes trenPita {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.06, 0.94); }
  70% { transform: scale(0.97, 1.05); }
}
.tren-vagon {
  background: linear-gradient(180deg, #5cc4ff, #2a90e0);
  cursor: pointer;
}
.tren-chimenea {
  position: absolute;
  top: -24px;
  left: 22px;
  width: 28px;
  height: 24px;
  background: var(--amarillo);
  border: 4px solid #fff;
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 5px 0 #3a2b52;
}
.tren-humo {
  position: absolute;
  top: -54px;
  left: 14px;
  font-size: 26px;
  animation: flotarHumo 1.2s ease-in-out infinite;
}
@keyframes flotarHumo {
  0% { transform: translateY(10px) scale(0.8); opacity: 0.9; }
  100% { transform: translateY(-18px) scale(1.25); opacity: 0; }
}
.tren-letra-grande {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.tren-etiqueta {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.95;
}
.tren-ruedas {
  position: absolute;
  bottom: -16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
}
.tren-rueda {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tinta);
  border: 4px solid var(--amarillo);
}
.tren-silaba-badge {
  background: var(--amarillo);
  color: var(--tinta);
  font-size: 26px;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 999px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  animation: pop .45s ease;
}
.tren-pasajero-mini {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 3px;
  margin-top: 2px;
  animation: pop .45s ease;
}
.tren-panel-inferior {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tren-vocales-fila, .tren-pasajeros-fila {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-vagon-vocal {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(180deg, #5cc4ff, #2a90e0);
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  border: 5px solid #fff;
  box-shadow: var(--sombra);
}
.btn-vagon-vocal.correcto,
.btn-vagon-vocal.ayuda-suave {
  background: linear-gradient(180deg, #52e08e, #26b562);
  animation: latido 1s infinite;
}
.card-pasajero-tren {
  width: 156px;
  background: #fff;
  color: var(--tinta);
  border-radius: 20px;
  padding: 7px 10px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}
.card-pasajero-tren img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.card-pasajero-tren b {
  color: #fff;
  background: #e8458a;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 2px;
}

/* ---------- MINIMAPA INTERACTIVO EN PARTIDA ---------- */
.minimapa {
  position: fixed;
  top: 90px;
  right: 16px;
  z-index: 10;
  border-radius: 18px;
  border: 4px solid #fff;
  box-shadow: var(--sombra);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  touch-action: none;
  transition: transform .15s ease;
}
.minimapa:hover {
  transform: scale(1.03);
}

/* ---------- Marcador de Goles, Banner de Fase y Offline Karaoke ---------- */
.hud-goles {
  background: linear-gradient(180deg, #ffd23f, #ffb11f);
  color: var(--tinta);
  border: 3px solid #fff;
  animation: pop .35s ease;
}
.hud-poder {
  background: linear-gradient(135deg, #7c5cff, #e8458a);
  color: #fff;
  border: 3px solid #ffd23f;
  box-shadow: 0 4px 14px rgba(124,92,255,.45);
  animation: pulsoPoder 1.1s ease-in-out infinite;
}
@keyframes pulsoPoder {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.banner-fase {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(244,236,255,.97));
  color: var(--morado);
  padding: 12px 26px;
  border-radius: 999px;
  border: 4px solid var(--amarillo);
  box-shadow: var(--sombra);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: entrarBannerFase .45s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes entrarBannerFase {
  0% { opacity: 0; transform: translate(-50%, -18px) scale(0.88); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.offline-video-card {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4b319c, #8c4fd8);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.offline-video-top {
  background: var(--amarillo);
  color: var(--tinta);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 14px;
  border-radius: 999px;
}
.offline-video-card h3 { font-size: clamp(18px, 2.4vw, 24px); color: #fff; }
.offline-video-card p { font-size: clamp(15px, 2vw, 19px); font-weight: 700; color: #ffe89e; max-width: 85%; }
.offline-video-imgs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.offline-video-acciones { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ---------- Mejoras en Minijuegos: Botones de Modo, Parejas 6, Tren ---------- */
.btn-modo-mini {
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  background: rgba(255,255,255,.88);
  color: var(--morado);
  border: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.btn-modo-mini.activo {
  background: var(--amarillo);
  color: var(--tinta);
  transform: scale(1.06);
}
.btn-medio.naranja {
  background: linear-gradient(180deg, #ff9f43, #ee6c1d);
  color: #fff;
}
.parejas-grid.parejas-grid-6 {
  grid-template-columns: repeat(4, minmax(120px, 168px));
  gap: 12px;
}
.parejas-grid.parejas-grid-6 .carta-memory {
  height: 112px;
}
.parejas-grid.parejas-grid-6 .memory-frente img {
  width: 58px;
  height: 58px;
}
.parejas-grid.parejas-grid-6 .memory-letra-gigante {
  font-size: 54px;
}
.tren-convoy.marchando .tren-rueda {
  animation: girarRueda .32s linear infinite;
}
@keyframes girarRueda {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- 7. 🎹 Piano de las Letras ---------- */
.piano-escenario {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  flex: 1;
}
.piano-nota-visor {
  background: rgba(255, 255, 255, 0.94);
  color: var(--morado);
  padding: 8px 22px;
  border-radius: 999px;
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,.14);
  border: 3px solid var(--amarillo);
}
.piano-nota-visor b { color: #e8458a; }
.piano-teclado {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 12px;
  align-items: stretch;
  flex: 1;
  max-height: 360px;
}
.piano-tecla {
  position: relative;
  background: var(--color-tecla);
  color: #fff;
  border-radius: 24px 24px 30px 30px;
  border: 5px solid #fff;
  box-shadow: 0 10px 0 rgba(44,33,64,.28), 0 14px 24px rgba(44,33,64,.22);
  padding: 12px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .15s ease, filter .12s ease;
}
.piano-tecla:hover { transform: translateY(-3px); }
.piano-tecla.pulsada, .piano-tecla:active {
  transform: translateY(8px) scale(0.97);
  box-shadow: 0 2px 0 rgba(44,33,64,.28);
}
.piano-tecla.acierto {
  outline: 6px solid var(--amarillo);
  animation: latido .7s 2;
}
.piano-tecla.error-sacude { animation: sacudir .4s ease; }
.piano-escenario.modo-cancion .piano-teclado { padding-top: 12px; }
.piano-escenario.modo-cancion .piano-tecla:not(.guia):not(.demo-activa) {
  opacity: 0.78;
}
.piano-tecla.guia {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 0 4px #ffe066, 0 0 24px rgba(255, 224, 102, 0.95), 0 12px 0 rgba(44,33,64,.28);
  z-index: 2;
}
.piano-tecla.demo-activa {
  transform: translateY(6px) scale(0.98);
  box-shadow: 0 0 0 5px #fff, 0 0 22px rgba(255,255,255,.9), 0 3px 0 rgba(44,33,64,.28);
  filter: brightness(1.12);
  z-index: 2;
}
.piano-guia-dedo {
  display: none;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffe066;
  border: 3px solid #2c2140;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,.22);
  pointer-events: none;
}
.piano-tecla.guia .piano-guia-dedo {
  display: grid;
  place-items: center;
  animation: reboteGuia .65s ease-in-out infinite alternate;
}
@keyframes reboteGuia {
  from { transform: translate(-50%, 0); }
  to { transform: translate(-50%, -6px); }
}

/* Guía visual y partitura del modo canción */
.piano-meta-chip {
  display: inline-block;
  color: #fff;
  padding: 2px 11px;
  border-radius: 999px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  vertical-align: middle;
}
.piano-guia-panel {
  width: 100%;
  max-width: 980px;
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid #ffe066;
  border-radius: 22px;
  padding: 8px 12px;
  box-shadow: 0 6px 16px rgba(44,33,64,.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.piano-cancion-herramientas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.piano-canciones-lista, .piano-cancion-acciones {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-cancion-chip {
  background: #f2edff;
  color: var(--morado);
  border: 2px solid #d9ccff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 800;
  transition: transform .1s ease, background .15s ease;
}
.btn-cancion-chip.activa {
  background: linear-gradient(180deg, #ff7096, #e6396b);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 3px 0 #b81d4c;
}
.btn-cancion-acc {
  background: linear-gradient(180deg, #4dabf7, #1c7ed6);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 0 #145a9e;
}
.btn-cancion-acc.tocando {
  background: linear-gradient(180deg, #ffa94d, #e86b24);
  box-shadow: 0 3px 0 #b3490e;
}
.piano-partitura {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.piano-nota-paso {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  background: var(--pill-col);
  color: #fff;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 12.5px;
  font-weight: 800;
  border: 2px solid rgba(255,255,255,.85);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.piano-nota-paso small {
  font-size: 10.5px;
  opacity: 0.92;
  background: rgba(0,0,0,.18);
  padding: 0 4px;
  border-radius: 6px;
}
.piano-nota-paso.tocada {
  opacity: 0.38;
  transform: scale(0.92);
}
.piano-nota-paso.actual {
  transform: scale(1.16);
  box-shadow: 0 0 0 3px #2c2140, 0 4px 10px rgba(0,0,0,.22);
  z-index: 1;
}
.piano-nota-paso.demo-paso {
  transform: scale(1.2) translateY(-3px);
  box-shadow: 0 0 0 3px #ffe066, 0 5px 12px rgba(0,0,0,.25);
  z-index: 2;
}
.piano-nota-badge {
  background: rgba(255,255,255,.28);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.piano-letra {
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 700;
  text-shadow: 0 3px 0 rgba(0,0,0,.22);
  line-height: 1;
}
.piano-tecla img {
  width: min(82%, 78px);
  height: 74px;
  object-fit: contain;
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 4px;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.15));
}
.piano-palabra {
  font-size: clamp(12px, 1.4vw, 17px);
  font-weight: 700;
  text-shadow: 0 2px 3px rgba(0,0,0,.35);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.piano-palabra b {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 1.12em;
  text-shadow: 0 2px 4px rgba(0,0,0,.45);
}

/* ---------- 8. 🔍 ¡Encuentra al Intruso! ---------- */
.intruso-escenario {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex: 1;
}
.intruso-grid {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 20px;
}
.intruso-card {
  position: relative;
  background: #fff;
  color: var(--tinta);
  border-radius: 30px;
  border: 6px solid #fff;
  box-shadow: var(--sombra);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform .15s;
}
.intruso-card:hover { transform: translateY(-4px); }
.intruso-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.15));
}
.intruso-palabra {
  font-size: 24px;
  font-weight: 700;
}
.intruso-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border-radius: 16px;
  background: var(--morado);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.2);
}
.intruso-card.acierto {
  background: #e9fff1;
  border-color: var(--verde);
  transform: scale(1.06);
}
.intruso-card.acierto .intruso-badge { background: var(--verde); }
.intruso-card.error-sacude {
  animation: sacudir .4s ease;
  border-color: #ff6b6b;
}

/* ---------- Responsive Móvil / Pantallas Estrechas ---------- */
@media (max-width: 760px) {
  #hudSuperior {
    gap: 5px;
    padding: 7px 8px;
    align-items: flex-start;
  }
  #hudSuperior .btn-redondo {
    width: 38px;
    height: 38px;
    font-size: 18px;
    flex-shrink: 0;
  }
  .hud-grupo {
    gap: 4px 5px;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
  }
  #hudSuperior .hud-grupo:first-child {
    flex: 1 1 auto;
  }
  #hudSuperior .hud-grupo:last-child {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .hud-pastilla {
    font-size: 10.5px;
    padding: 6px 8px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 46px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud-goles, .hud-poder {
    max-width: none;
    padding: 4px 9px;
    font-size: 11.5px;
  }
  .minimapa {
    width: 118px;
    height: 85px;
    top: 86px;
    right: 8px;
  }
  .banner-fase {
    top: 90px;
    font-size: 13px;
    padding: 6px 14px;
    max-width: calc(100vw - 20px);
  }
  #hudInferior {
    gap: 8px;
    padding: 8px 10px;
    bottom: 8px;
  }
  .carta-letra {
    width: 60px;
    height: 68px;
    font-size: 42px;
  }
  .hueco {
    width: 52px;
    height: 52px;
  }
  .hueco img { max-width: 42px; max-height: 42px; }
  .btn-pdi {
    height: 56px;
    padding: 0 12px;
    font-size: 15px;
    gap: 6px;
  }
  .btn-pdi .texto-btn { display: none; }
  .mini-controles-pdi { gap: 6px; padding: 6px 8px; }
  .btn-modo-mini { padding: 6px 9px; font-size: 11.5px; }
  .btn-medio { padding: 6px 10px; font-size: 12px; }
  .piano-escenario { gap: 6px; }
  .piano-escenario.modo-cancion .cestas-instruccion { padding: 6px 10px; font-size: 12.5px; }
  .piano-escenario.modo-cancion .piano-teclado { padding-top: 8px; }
  .piano-escenario.modo-cancion .piano-tecla { padding: 5px 2px 7px; gap: 2px; }
  .piano-escenario.modo-cancion .piano-letra { font-size: 26px; }
  .piano-escenario.modo-cancion .piano-tecla img { height: 34px; }
  .piano-nota-visor { font-size: 14px; padding: 5px 14px; }
  .piano-guia-panel { padding: 5px 7px; gap: 5px; border-radius: 14px; }
  .piano-cancion-herramientas { gap: 4px; justify-content: center; }
  .piano-canciones-lista, .piano-cancion-acciones { gap: 4px; justify-content: center; }
  .btn-cancion-chip { padding: 3px 6px; font-size: 10px; }
  .btn-cancion-acc { padding: 3px 8px; font-size: 10.5px; }
  .piano-partitura { gap: 3px; }
  .piano-nota-paso { padding: 2px 5px; font-size: 10px; border-radius: 8px; }
  .piano-nota-paso small { font-size: 9px; }
  .piano-guia-dedo { top: -15px; width: 26px; height: 26px; font-size: 15px; }
  .piano-teclado {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
    gap: 7px;
    max-height: none;
  }
  .piano-tecla {
    padding: 7px 3px 9px;
    border-width: 3px;
    gap: 3px;
    border-radius: 18px 18px 22px 22px;
  }
  .piano-nota-badge { font-size: 11px; padding: 2px 7px; }
  .piano-letra { font-size: 30px; }
  .piano-tecla img { height: 40px; }
  .piano-palabra { font-size: 10px; letter-spacing: -0.3px; }
  .parejas-grid, .parejas-grid.parejas-grid-6 {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
  .intruso-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 12px;
  }
  .intruso-card img { width: 84px; height: 84px; }
}



/* ============ MEJORAS AULA PDI Y MINIJUEGOS ============ */
.btn-silencio-docente {
  background: #fff;
  color: var(--tinta);
  border: 3px solid rgba(107, 79, 216, 0.25);
  font-size: 18px;
}
.btn-silencio-docente.silenciado {
  background: #ffe0e6;
  color: #b81d45;
  border-color: #ff4d6d;
}

@keyframes destelloPista {
  0%, 100% { transform: scale(1); box-shadow: 0 5px 0 rgba(44,33,64,.25), 0 0 0 0 rgba(255, 210, 63, 0.7); }
  50% { transform: scale(1.07); box-shadow: 0 5px 0 rgba(44,33,64,.25), 0 0 0 14px rgba(255, 210, 63, 0); }
}
.btn-pdi.pista.destello-pista {
  animation: destelloPista 1.15s ease-in-out infinite;
  background: linear-gradient(180deg, #ffe066, #ffb703);
  color: #2c2140;
}

.card-mini-top {
  position: relative;
}
.mini-badge-estrellas {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #2c2140;
  font-weight: 700;
  font-size: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(44, 33, 64, 0.18);
}

.cestas-fila-inferior.tres-cestas {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cesta-caja {
  position: relative;
  overflow: visible;
}
.cesta-caja.cesta-verde {
  background: linear-gradient(180deg, #e2ffef, #b4f5d2);
  border-color: #26b562;
}
@keyframes cestaSalto {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-14px) scale(1.06); }
  70% { transform: translateY(3px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}
.cesta-caja.cesta-salto {
  animation: cestaSalto 0.45s ease;
}
@keyframes cestaParticula {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.7); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), var(--dy, -60px)) scale(1.35); }
}
.cesta-particula {
  position: absolute;
  left: 50%;
  top: 18px;
  font-size: 24px;
  pointer-events: none;
  z-index: 20;
  animation: cestaParticula 0.72s ease-out forwards;
}

@keyframes reboteAlegre {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-16px) scale(1.08); }
  60% { transform: translateY(3px) scale(0.97); }
  80% { transform: translateY(-7px) scale(1.03); }
}
.completa-dibujo-caja.rebote-alegre {
  animation: reboteAlegre 0.75s ease;
}
.casilla-letra.verde-exito {
  background: #3ccf7a !important;
  color: #ffffff !important;
  border-color: #1f9d55 !important;
  transform: scale(1.06);
  transition: transform .2s, background .2s;
}
.completa-silabas-barra {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.silaba-chip {
  padding: 6px 14px;
  border-radius: 14px;
  background: #f0ebff;
  color: #4b359c;
  font-weight: 700;
  font-size: 22px;
  border: 2px solid #c6b6ff;
  transition: transform .18s, background .18s, color .18s;
}
.silaba-chip.activa {
  background: #ffd23f;
  color: #2c2140;
  border-color: #2c2140;
  transform: scale(1.14);
}
