/* DIEducación (DigitoMenores) - estilos (base 0.5.1 + estilo DigitoMenores). Misma estética que /menores: fondo espacial, azul noche,
   turquesa #4fd1c5 y tarjetas de cristal oscuro. Sin fuentes remotas. Contraste AA, objetivos táctiles >= 44 px.
   El fondo y el logo se leen de /menores/img/ (mismo dominio); si faltan, queda el azul noche. */
:root {
  --fondo: #050814;
  --panel: rgba(15, 23, 42, .88);
  --panel-solido: #0f172a;
  --panel-claro: rgba(30, 41, 59, .92);
  --tinta: #f9fafb;
  --tinta-suave: #cbd5e1;
  --acento: #4fd1c5;
  --acento-2: #63b3ed;
  --acento-3: #f6ad55;
  --rosa: #f472b6;
  --linea: rgba(148, 163, 184, .45);
  --linea-fuerte: rgba(148, 163, 184, .75);
  --ok: #4ade80;
  --aviso: #fbbf24;
  --foco: #fde68a;
  --sombra-acento: 0 0 18px rgba(79, 209, 197, .45);
  --radio: 16px;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
html.letra-grande { font-size: 137.5%; }
body {
  margin: 0; color: var(--tinta); min-height: 100vh;
  background-color: var(--fondo);
  background-image: linear-gradient(rgba(5, 8, 20, .55), rgba(5, 8, 20, .78)), url('/menores/img/fondodigitomenoresreal.png');
  background-repeat: no-repeat; background-position: center top; background-size: cover; background-attachment: fixed;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55; overflow-wrap: anywhere; overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--acento); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(5, 8, 20, .9); }
[tabindex="-1"]:focus { outline: none; }
h1:focus-visible, h2:focus-visible { outline: 3px solid var(--foco); }

.solo-lectores { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: .5rem; top: -4rem; background: var(--panel-solido); color: var(--tinta); padding: .6rem 1rem; border: 2px solid var(--foco); border-radius: 12px; z-index: 30; }
.saltar:focus { top: .5rem; }

/* Cabecera (como la topbar de DigitoMenores) */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 23, 42, .96); border-bottom: 1px solid rgba(148, 163, 184, .3);
  padding: .55rem 1rem .65rem;
}
.cabecera-fila { max-width: 70rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: .7rem; margin: 0; color: var(--tinta); text-decoration: none; min-height: 44px; }
.marca:hover { color: var(--tinta); }
.marca-logo { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; border: 1px solid var(--linea-fuerte); box-shadow: var(--sombra-acento); background: var(--panel-solido); }
.marca-texto { display: flex; flex-direction: column; line-height: 1.15; }
.marca-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--acento); }
.marca-nombre { font-size: 1.05rem; font-weight: 800; letter-spacing: .01em; }
.cabecera-derecha { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pill-seguro { padding: .2rem .75rem; border-radius: 999px; border: 1px solid var(--linea-fuerte); color: var(--tinta-suave); font-size: .8rem; }
.cabecera nav { max-width: 70rem; margin: .45rem auto 0; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.menu a, .boton-letra {
  display: inline-flex; align-items: center; min-height: 44px; padding: .25rem .95rem;
  color: var(--tinta); text-decoration: none; border: 1px solid var(--linea-fuerte); border-radius: 999px; background: rgba(255, 255, 255, .04);
  font: inherit; font-size: .9rem; cursor: pointer; transition: background .15s, box-shadow .15s;
}
.menu a:hover, .boton-letra:hover { background: rgba(79, 209, 197, .14); color: #fff; }
.menu a[aria-current="page"] { background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; font-weight: 700; border-color: transparent; box-shadow: var(--sombra-acento); }
.boton-letra[aria-pressed="true"] { background: var(--acento-3); color: #1a1205; border-color: var(--acento-3); font-weight: 700; }

main { max-width: 60rem; margin: 1.2rem auto; padding: 1.2rem 1.2rem 1.6rem; background: rgba(5, 8, 20, .55); border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pie { max-width: 60rem; margin: 0 auto 1.5rem; padding: .9rem 1.2rem; color: var(--tinta-suave); font-size: .85rem; background: rgba(3, 7, 18, .8); border: 1px solid var(--linea); border-radius: 14px; }
.pie p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .3rem 0 .9rem; letter-spacing: -.02em; color: #fff; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 { background: linear-gradient(90deg, #ffffff 0%, #b2f5ea 45%, var(--acento) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
h2 { font-size: 1.25rem; line-height: 1.3; margin: 1.4rem 0 .6rem; color: var(--acento); }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; color: #fff; }
p, li { max-width: 46rem; }

/* Botones (píldora con degradado, como "Entrar a actividades") */
.boton, button.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; min-width: 44px;
  padding: .55rem 1.3rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; border: 0; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(79, 209, 197, .3); transition: transform .12s, box-shadow .12s;
}
.boton:hover { color: #0b1120; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(79, 209, 197, .5); }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.boton-sec { background: transparent; color: var(--tinta); border: 1px solid var(--linea-fuerte); box-shadow: none; }
.boton-sec:hover { color: #fff; background: rgba(79, 209, 197, .14); box-shadow: none; }
.boton-aviso { background: transparent; color: #fecaca; border: 1px solid #f87171; box-shadow: none; }
.boton-aviso:hover { color: #fff; background: rgba(248, 113, 113, .18); box-shadow: none; }
.acciones { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.1rem 0; }

/* Tarjetas y cuadrículas */
.tarjeta { background: var(--panel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.1rem; margin: .8rem 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.tarjeta h2, .tarjeta h3 { margin-top: 0; }
.rejilla { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.rejilla > li { max-width: none; }
.rejilla .tarjeta { margin: 0; height: 100%; display: flex; flex-direction: column; gap: .45rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
.rejilla .tarjeta:hover { transform: translateY(-3px); border-color: rgba(79, 209, 197, .7); box-shadow: 0 10px 28px rgba(0, 0, 0, .35), var(--sombra-acento); }
.rejilla .tarjeta .boton { margin-top: auto; align-self: flex-start; }
.etiquetas { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .2rem 0; }
.chip { display: inline-block; padding: .15rem .75rem; border-radius: 999px; background: rgba(79, 209, 197, .14); border: 1px solid rgba(79, 209, 197, .55); color: #b2f5ea; font-size: .85rem; }
.estado { display: inline-block; align-self: flex-start; padding: .15rem .7rem; border-radius: 999px; font-weight: 700; font-size: .8rem; border: 1px solid var(--acento-3); color: #fde3c2; background: rgba(246, 173, 85, .15); }
.estado-curso { border-color: var(--acento-2); color: #cfe7fb; background: rgba(99, 179, 237, .16); }
.estado-hecha { border-color: var(--ok); color: #d1fae5; background: rgba(74, 222, 128, .14); }
.estado-nueva::before { content: "★ "; content: "★ " / ""; }
.estado-curso::before { content: "▶ "; content: "▶ " / ""; }
.estado-hecha::before { content: "✓ "; content: "✓ " / ""; }
.por-descubrir { border-style: dashed; background: rgba(15, 23, 42, .6); color: var(--tinta-suave); }
.por-descubrir h3::before { content: "◇ "; content: "◇ " / ""; }

/* Guía: bocadillo de cristal */
.guia { display: flex; gap: .8rem; align-items: flex-start; margin: .9rem 0; }
.guia-img { flex: 0 0 auto; width: 68px; height: 68px; border-radius: 50%; background: var(--panel-solido); border: 2px solid var(--acento); box-shadow: var(--sombra-acento); object-fit: cover; }
.guia-texto { background: var(--panel-claro); border: 1px solid rgba(79, 209, 197, .6); border-radius: 4px var(--radio) var(--radio) var(--radio); padding: .65rem .95rem; margin: 0; }
.guia-nombre { display: block; font-weight: 800; font-size: .85rem; color: var(--acento); }

/* Avisos */
.aviso, .aviso-global:not(:empty) { background: rgba(251, 191, 36, .12); border: 1px solid var(--aviso); color: #fef3c7; border-radius: var(--radio); padding: .7rem 1rem; margin: .8rem 0; }
.aviso-global:not(:empty) { max-width: 60rem; margin: .6rem auto; }
.aviso-relleno { font-weight: 700; }
.aviso-ok { background: rgba(74, 222, 128, .12); border-color: var(--ok); color: #dcfce7; }

/* Formularios: opciones como botones grandes */
fieldset { border: 1px solid var(--linea); border-radius: var(--radio); padding: .7rem 1rem 1rem; margin: 1rem 0; background: var(--panel); min-width: 0; }
legend { font-weight: 700; padding: 0 .5rem; color: var(--acento); }
.opciones { display: grid; gap: .55rem; grid-template-columns: 1fr; margin-top: .4rem; }
.opcion { display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: .45rem .85rem; border: 1px solid var(--linea-fuerte); border-radius: 14px; background: rgba(255, 255, 255, .04); color: var(--tinta); cursor: pointer; transition: background .12s, border-color .12s; }
.opcion:hover { background: rgba(79, 209, 197, .1); border-color: rgba(79, 209, 197, .7); }
.opcion input { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; margin: 0; accent-color: var(--acento); }
.opcion:has(input:checked) { border-color: var(--acento); border-width: 2px; background: rgba(79, 209, 197, .18); font-weight: 700; box-shadow: var(--sombra-acento); }
.opcion:has(input:checked) .marca-sel::after { content: " ✓"; content: " ✓" / ""; }
.opcion:has(input:focus-visible) { outline: 3px solid var(--foco); outline-offset: 2px; }
.opcion.correcta { border-color: var(--ok); border-width: 2px; background: rgba(74, 222, 128, .16); }
.opcion.correcta .marca-sel::after { content: " (esta es la respuesta)"; }
.muestra { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid #fff; flex: 0 0 auto; }
.casilla-pendiente { color: var(--aviso); font-weight: 700; margin: .1rem 0 .4rem 2rem; }

/* Creador de avatar: el dibujo va sobre un "portal" claro para que se vean bien sus colores */
.creador { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.vista-avatar { text-align: center; }
.vista-avatar svg { width: 100%; max-width: 220px; border-radius: 50%; border: 3px solid var(--acento); background: radial-gradient(circle at 50% 40%, #ffffff 0%, #e0f7fa 55%, #b2ebf2 100%); box-shadow: 0 0 28px rgba(79, 209, 197, .55); }
.vista-avatar.pequena svg { max-width: 140px; }
.progreso-pasos { display: flex; gap: .4rem; list-style: none; padding: 0; margin: .4rem 0 1rem; flex-wrap: wrap; }
.progreso-pasos li { padding: .25rem .85rem; border: 1px solid var(--linea-fuerte); border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: .9rem; }
.progreso-pasos li[aria-current="step"] { border-color: transparent; background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; font-weight: 700; }
.progreso-pasos li.hecho::before { content: "✓ "; content: "✓ " / ""; }

/* Barras de progreso con brillo */
.barra { height: 14px; background: rgba(255, 255, 255, .08); border: 1px solid var(--linea); border-radius: 999px; overflow: hidden; }
.barra-relleno { height: 100%; width: 0; background: linear-gradient(90deg, var(--acento), var(--acento-2), var(--rosa)); box-shadow: 0 0 10px rgba(79, 209, 197, .6); }
.fila-atributo { margin: .8rem 0; }
.fila-atributo .titulo { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-weight: 700; }
.lista-simple { list-style: none; padding: 0; margin: 0; }
.lista-simple > li { padding: .35rem 0; border-bottom: 1px solid rgba(148, 163, 184, .18); }
.lista-simple > li:last-child { border-bottom: 0; }

/* Reproductor de misión */
.pasos { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: .2rem 0 1rem; padding: 0; }
.pasos li { padding: .25rem .85rem; border: 1px solid var(--linea-fuerte); border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: .9rem; }
.pasos li[aria-current="step"] { border-color: transparent; background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; font-weight: 700; }
.pasos li.hecho { border-color: var(--ok); color: #d1fae5; }
.pasos li.hecho::before { content: "✓ "; content: "✓ " / ""; }
video.video-mision { width: 100%; max-height: 60vh; background: #000; border-radius: 14px; border: 1px solid var(--linea); box-shadow: 0 8px 28px rgba(0, 0, 0, .45); }
.marcador-video { border: 2px dashed rgba(79, 209, 197, .6); border-radius: var(--radio); padding: 1rem; background: rgba(15, 23, 42, .75); }
.marcador-video img { width: 120px; display: block; margin-bottom: .5rem; }
details summary { cursor: pointer; color: var(--acento); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.retro { min-height: 1.5rem; }
.retro-caja { border: 1px solid var(--acento); border-radius: var(--radio); background: var(--panel-claro); padding: .7rem 1rem; margin: .8rem 0; }
.retro-caja:focus { outline: 3px solid var(--foco); }
.retro-bien { border-color: var(--ok); background: rgba(74, 222, 128, .14); }
.retro-mal { border-color: var(--aviso); background: rgba(251, 191, 36, .12); }

dialog { max-width: 30rem; width: calc(100% - 2rem); border: 1px solid var(--acento); border-radius: var(--radio); padding: 1.2rem; color: var(--tinta); background: var(--panel-solido); box-shadow: 0 0 40px rgba(79, 209, 197, .35); }
dialog::backdrop { background: rgba(2, 6, 23, .72); }

@media (min-width: 40rem) {
  .rejilla { grid-template-columns: repeat(2, 1fr); }
  .opciones.dos { grid-template-columns: repeat(2, 1fr); }
  .creador { grid-template-columns: 15rem 1fr; align-items: start; }
  .vista-avatar { position: sticky; top: 8rem; }
}
@media (min-width: 64rem) { .rejilla { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 30rem) { .opciones { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) {
  main { margin: .6rem .5rem; padding: 1rem .9rem 1.3rem; border-radius: 18px; }
  .pie { margin: 0 .5rem 1rem; }
  .pill-seguro { display: none; }
  body { background-attachment: scroll; }
  .cabecera { position: static; }
}
@media (forced-colors: active) { .opcion:has(input:checked) { outline: 3px solid Highlight; } h1 { color: CanvasText; background: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; transform: none !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .cabecera, .pie, .acciones { display: none; }
  main, .tarjeta, fieldset { background: #fff; color: #000; border-color: #999; box-shadow: none; }
  h1, h2, h3 { color: #000; background: none; }
}

/* ===================================================================================
   Pantallas añadidas en la 0.5.x (C4), con la paleta DigitoMenores
   =================================================================================== */

/* Celebración final con insignias */
.celebracion { background: var(--panel); border: 1px solid var(--acento); border-radius: var(--radio); padding: .9rem 1rem 1.1rem; margin: 1rem 0; text-align: center; box-shadow: var(--sombra-acento); }
.celebracion h3 { margin: .2rem 0 .6rem; color: var(--acento); }
.insignias { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.insignia { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem; animation: insignia-sale .5s ease-out both; }
.insignia:nth-child(2) { animation-delay: .12s; } .insignia:nth-child(3) { animation-delay: .24s; } .insignia:nth-child(4) { animation-delay: .36s; }
.insignia-svg { filter: drop-shadow(0 0 10px rgba(79, 209, 197, .45)); }
.insignia-nombre { font-size: 1rem; line-height: 1.25; font-weight: 700; }
.insignia-tipo { font-size: .85rem; color: var(--tinta-suave); }
@keyframes insignia-sale { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.resumen-final { margin: 1rem 0; }
.detalle-final, details.plegable { margin: .7rem 0; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--panel); padding: .3rem 1rem; }
.detalle-final summary, details.plegable summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--acento); }
@media (min-width: 40rem) { .insignias { grid-template-columns: repeat(4, 1fr); } }
@media (forced-colors: active) { .insignia-svg { forced-color-adjust: none; } }

/* Cabecera compacta: Ajustes y letra a la derecha; menú con iconos (barra inferior en móvil) */
.cabecera-acciones { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.enlace-ajustes { display: inline-flex; align-items: center; min-height: 44px; padding: .2rem .8rem; color: var(--tinta); text-decoration: none; border: 1px solid var(--linea-fuerte); border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: .85rem; }
.enlace-ajustes:hover { background: rgba(79, 209, 197, .14); color: #fff; }
.enlace-ajustes[aria-current="page"] { background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; font-weight: 700; border-color: transparent; }
.boton-letra { font-size: .85rem; padding: .2rem .8rem; }
.menu { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.menu a { flex-direction: column; justify-content: center; gap: .1rem; width: 100%; min-height: 58px; padding: .3rem .2rem; border: 0; border-radius: 12px; font-size: .78rem; line-height: 1.15; text-align: center; background: transparent; }
.menu-icono { flex: 0 0 auto; }
.menu a span { overflow-wrap: normal; word-break: keep-all; hyphens: none; }
@media (max-width: 39.99rem) {
  body { padding-bottom: 76px; }
  .menu a { font-size: .68rem; padding: .3rem .1rem; }
  .cabecera nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom, 0px)); background: rgba(11, 16, 32, .98); border-top: 1px solid rgba(79, 209, 197, .55); box-shadow: 0 -6px 20px rgba(0, 0, 0, .45); }
  .menu a[aria-current="page"] { background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; font-weight: 700; box-shadow: none; }
  .marca-logo { width: 38px; height: 38px; }
}
@media (min-width: 40rem) {
  .cabecera { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .menu { display: flex; flex-wrap: wrap; gap: .4rem; }
  .menu a { flex-direction: row; width: auto; gap: .45rem; min-height: 44px; padding: .25rem .95rem; border: 1px solid var(--linea-fuerte); border-radius: 999px; font-size: .9rem; background: rgba(255, 255, 255, .04); }
  .menu a[aria-current="page"] { border-color: transparent; }
  .menu-icono { width: 20px; height: 20px; }
}

/* Halo del guía según el momento (sin cambiar su imagen) */
.guia.expresion-celebra .guia-img { box-shadow: 0 0 0 3px #fde68a, 0 0 18px 4px #f6ad55; }
.guia.expresion-animo .guia-img { box-shadow: 0 0 0 3px #4ade80, 0 0 14px #4ade80; }
.guia.expresion-tranquiliza .guia-img { box-shadow: 0 0 0 3px #63b3ed, 0 0 14px #63b3ed; }

/* Creador de avatar: vista previa fija y opciones compactas */
.opciones.compacto { grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.opciones.compacto .opcion { min-height: 44px; padding: .3rem .55rem; gap: .4rem; font-size: .92rem; }
.opciones.compacto .opcion input { width: 1.15rem; height: 1.15rem; }
.opciones.compacto .muestra { width: 1.3rem; height: 1.3rem; }
.creador .vista-avatar { position: sticky; top: 0; z-index: 5; background: rgba(5, 8, 20, .92); padding: .4rem 0 .5rem; border-bottom: 1px solid var(--linea); border-radius: 0 0 16px 16px; }
.creador .vista-avatar svg { max-width: 120px; max-height: 26vh; width: auto; height: auto; }
.creador .vista-avatar p { margin: .2rem 0 0; font-weight: 700; font-size: .95rem; color: var(--acento); }
@media (min-width: 40rem) {
  .creador .vista-avatar { border-bottom: 0; padding: 0; background: transparent; }
  .creador .vista-avatar svg { max-width: 220px; max-height: none; width: 100%; }
  .opciones.compacto { grid-template-columns: repeat(3, 1fr); }
}

/* Diario con pestañas */
.pestanas { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .6rem; margin: .4rem 0; border-bottom: 1px solid var(--linea); }
.pestana { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .85rem; border: 1px solid var(--linea-fuerte); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--tinta); font: inherit; font-size: .9rem; cursor: pointer; }
.pestana:hover { background: rgba(79, 209, 197, .12); }
.pestana[aria-selected="true"] { background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #0b1120; border-color: transparent; font-weight: 700; }
.pestana-n { min-width: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: rgba(79, 209, 197, .2); color: #b2f5ea; font-size: .78rem; font-weight: 700; text-align: center; }
.pestana[aria-selected="true"] .pestana-n { background: rgba(11, 17, 32, .85); color: #fff; }
[role="tabpanel"] h2 { margin-top: .4rem; }

/* Inicio: «Continúa» y mapa de las cinco rutas */
.continua { background: radial-gradient(circle at top left, rgba(79, 209, 197, .22), rgba(15, 23, 42, .92) 60%); border: 1px solid var(--acento); border-radius: var(--radio); padding: .7rem 1rem 1rem; margin: 1rem 0; box-shadow: var(--sombra-acento); }
.continua h2 { margin: .2rem 0 .3rem; font-size: 1.15rem; }
.mapa-rutas { list-style: none; margin: .4rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
.ruta-card { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .75rem; border: 1px dashed var(--linea-fuerte); border-radius: 14px; background: rgba(15, 23, 42, .6); color: var(--tinta-suave); }
.ruta-card.activa { border: 1px solid var(--acento); background: rgba(79, 209, 197, .14); color: var(--tinta); box-shadow: var(--sombra-acento); }
.ruta-estado { font-size: .85rem; }
.ruta-card:not(.activa) .ruta-estado::before { content: "◇ "; content: "◇ " / ""; }
.ruta-card.activa .ruta-estado::before { content: "★ "; content: "★ " / ""; color: var(--acento-3); }
@media (min-width: 40rem) { .mapa-rutas { grid-template-columns: repeat(3, 1fr); } }

/* Diario con insignias */
.tarjeta.con-icono { display: flex; gap: .8rem; align-items: flex-start; }
.tarjeta.con-icono .insignia-svg { flex: 0 0 auto; }
.item-texto { flex: 1 1 auto; min-width: 0; }
.item-texto h3 { margin-top: 0; }

/* Progreso: casillas y dos columnas en escritorio */
.contador-pregunta { margin: .2rem 0; font-weight: 700; color: var(--tinta-suave); }
.creador fieldset { margin-top: .8rem; }
.casillas { display: flex; gap: .25rem; margin: .3rem 0 .4rem; flex-wrap: wrap; }
.casilla { width: 1.4rem; height: .8rem; border-radius: 4px; border: 1px solid var(--linea-fuerte); background: rgba(255, 255, 255, .06); }
.casilla.llena { background: linear-gradient(90deg, var(--acento), var(--acento-2)); border-color: transparent; box-shadow: 0 0 6px rgba(79, 209, 197, .6); }
.fila-atributo.maxima { border-color: var(--acento); }
.rejilla-progreso { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.rejilla-progreso > .fila-atributo { margin: 0; background: var(--panel); border: 1px solid var(--linea); border-radius: 14px; padding: .6rem .8rem; }
.dos-col { display: block; }
@media (min-width: 64rem) {
  main { max-width: 74rem; }
  .pie, .aviso-global:not(:empty) { max-width: 74rem; }
  .dos-col { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 2rem; align-items: start; }
  .col-lateral { position: sticky; top: 9rem; }
  .col-lateral .vista-avatar.pequena svg { max-width: 220px; }
  .col-principal .continua { margin-top: 0; }
  .rejilla-progreso { grid-template-columns: repeat(2, 1fr); }
  .creador { display: grid; grid-template-columns: minmax(14rem, 20rem) 1fr; gap: 2rem; align-items: start; }
  .creador .vista-avatar { position: sticky; top: 9rem; }
  p, li { max-width: 52rem; }
}

/* Juegos: ahorcado y sopa de letras */
.zona-ahorcado { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .6rem 0; }
.dibujo-caja { background: radial-gradient(circle at 50% 40%, #ffffff, #e0f7fa); border: 2px solid var(--acento); border-radius: var(--radio); padding: .4rem; box-shadow: var(--sombra-acento); }
.dibujo-ahorcado { width: 110px; height: auto; display: block; }
.palabra-oculta { display: flex; gap: .3rem; flex-wrap: wrap; margin: .2rem 0; }
.casilla-letra { min-width: 2.2rem; height: 2.8rem; display: inline-flex; align-items: center; justify-content: center; border-bottom: 4px solid var(--acento); color: #fff; font-size: 1.7rem; font-weight: 800; letter-spacing: .02em; }
.casilla-letra.fallida { color: #fca5a5; }
.estado-juego { min-height: 1.6em; font-weight: 700; }
.teclado-letras { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; margin: .8rem 0; max-width: 28rem; }
.tecla { min-height: 44px; border: 1px solid var(--linea-fuerte); border-radius: 10px; background: rgba(255, 255, 255, .06); color: var(--tinta); font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.tecla:hover:not(:disabled) { background: rgba(79, 209, 197, .18); border-color: var(--acento); }
.tecla.acierto { background: rgba(74, 222, 128, .22); border-color: var(--ok); color: #dcfce7; }
.tecla.acierto::after { content: "✓"; content: "✓" / ""; display: block; font-size: .7rem; line-height: .8; }
.tecla.fallo { background: rgba(248, 113, 113, .18); border-color: #f87171; color: #fecaca; text-decoration: line-through; }
.tecla:disabled { cursor: default; opacity: .9; }
.zona-sopa { display: grid; gap: 1rem; margin: .6rem 0; }
.sopa { display: grid; gap: 3px; width: 100%; max-width: 24rem; }
.fila-sopa { display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); gap: 3px; }
.sopa[data-n="8"] .fila-sopa { --n: 8; }
.sopa[data-n="9"] .fila-sopa { --n: 9; }
.sopa[data-n="10"] .fila-sopa { --n: 10; }
.celda { aspect-ratio: 1 / 1; min-height: 0; min-width: 0; width: 100%; border: 1px solid var(--linea-fuerte); border-radius: 8px; background: rgba(15, 23, 42, .85); color: var(--tinta); font: inherit; font-weight: 800; font-size: clamp(.8rem, 3.6vw, 1.05rem); padding: 0; cursor: pointer; }
.celda:hover { border-color: var(--acento); }
.celda.inicio { background: rgba(246, 173, 85, .35); border-color: var(--acento-3); outline: 3px solid var(--acento-3); color: #fff; }
.celda.hallada { background: rgba(74, 222, 128, .3); border-color: var(--ok); color: #fff; text-decoration: underline; text-decoration-thickness: 3px; }
.palabras-sopa { list-style: none; margin: .2rem 0; padding: 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.palabras-sopa li { padding: .25rem .75rem; border: 1px solid var(--linea-fuerte); border-radius: 999px; background: rgba(255, 255, 255, .05); font-weight: 700; }
.palabras-sopa li.hallada { background: rgba(74, 222, 128, .2); border-color: var(--ok); color: #dcfce7; text-decoration: line-through; }
.resultado-juego { margin: 1rem 0; }
@media (min-width: 40rem) { .zona-sopa { grid-template-columns: minmax(18rem, 26rem) 1fr; align-items: start; } .teclado-letras { grid-template-columns: repeat(9, 1fr); } .dibujo-ahorcado { width: 150px; } }

/* Notas «puente»: la vida real también cuenta */
.nota-puente { padding: .65rem .95rem; border-left: 4px solid var(--acento-3); background: rgba(246, 173, 85, .12); border-radius: 0 12px 12px 0; max-width: 46rem; }
.nota-puente-pie { font-weight: 700; color: var(--tinta); }
