/* Paso 358 · Identidad compartida. Cargar después de los estilos de cada página. */
:root {
  --sqv-forest: #16492b;
  --sqv-deep: #0d3521;
  --sqv-green: #246d3d;
  --sqv-secondary: #397f50;
  --sqv-cream: #fff9ed;
  --sqv-white: #fff;
  --sqv-soft: #e0eddc;
  --sqv-text: #173d29;
  --sqv-muted: #637265;
  --sqv-border: #dfebdd;
  --sqv-shadow: 0 10px 30px rgb(23 61 41 / 6%);
  --sqv-nav-height: 78px;
}
body[data-sqv] {
  margin: 0;
  background: var(--sqv-cream);
  color: var(--sqv-text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
body[data-sqv] *,
body[data-sqv] *::before,
body[data-sqv] *::after {
  box-sizing: border-box;
}
body[data-sqv="private"] {
  padding: 0 0 0 250px;
  min-height: 100vh;
}
body[data-sqv="private"] :is(.dashboard-layout, .sq-layout) {
  display: block;
  width: 100%;
  min-height: 100vh;
}
body[data-sqv="private"] [data-sqv-content] {
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 0 auto;
  padding: 38px clamp(20px, 3.7vw, 64px) 56px;
  flex: 1;
}
body[data-sqv] :is(h1, h2, h3, .titulo-pagina) {
  color: var(--sqv-text);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
body[data-sqv] h1 {
  font-size: clamp(27px, 3vw, 42px);
  letter-spacing: -0.035em;
}
body[data-sqv] :is(.subtitulo-pagina, .descripcion, .texto-autenticacion) {
  color: var(--sqv-muted);
  line-height: 1.65;
}
body[data-sqv] :is(input, select, textarea, button) {
  font: inherit;
}
body[data-sqv]
  :is(
    input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
    select,
    textarea
  ) {
  max-width: 100%;
  border: 1px solid #cbdcc8;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--sqv-text);
  background: #fffefa;
}
body[data-sqv] :is(input, select, textarea):focus {
  outline: 2px solid var(--sqv-secondary);
  outline-offset: 2px;
}
body[data-sqv] :focus-visible {
  outline: 3px solid #d99a22;
  outline-offset: 4px;
}
body[data-sqv] :is(input[type="radio"], input[type="checkbox"], progress) {
  accent-color: var(--sqv-green);
}
body[data-sqv]
  :is(
    button,
    .boton-curso,
    .boton-laboratorio,
    .boton-accion-admin,
    .boton-regresar-ranking,
    .boton-continuar,
    .boton-finalizar
  ) {
  border-radius: 12px;
  min-height: 44px;
}
body[data-sqv]
  :is(
    .boton-curso,
    .boton-laboratorio,
    .boton-accion-admin,
    .boton-regresar-ranking,
    .boton-continuar,
    .boton-finalizar,
    .formulario-autenticacion button
  ) {
  background: var(--sqv-green);
  color: white;
  border: 0;
  padding: 12px 19px;
  font-weight: 750;
  text-decoration: none;
}
body[data-sqv]
  :is(
    .boton-curso,
    .boton-laboratorio,
    .boton-accion-admin,
    .formulario-autenticacion button
  ):hover {
  background: var(--sqv-deep);
}
body[data-sqv] :is(button:disabled, .boton-modulo-bloqueado) {
  cursor: not-allowed;
  opacity: 0.65;
}
body[data-sqv]
  :is(
    .tarjeta-curso,
    .tarjeta-modulo,
    .tarjeta-resultado,
    .tarjeta-resumen,
    .tarjeta-estadistica,
    .tarjeta-insignia,
    .tarjeta-billetera,
    .tarjeta-producto,
    .tarjeta-articulo,
    .tarjeta-personaje,
    .tarjeta-inventario,
    .tarjeta-perfil,
    .mensaje-vacio,
    .pregunta-cuestionario,
    .tarjeta-pregunta
  ) {
  background: var(--sqv-white);
  border: 1px solid var(--sqv-border);
  border-radius: 22px;
  box-shadow: var(--sqv-shadow);
}
body[data-sqv] .tarjeta-curso {
  overflow: hidden;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
body[data-sqv] .tarjeta-curso:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgb(23 61 41 / 10%);
}
body[data-sqv]
  :is(
    .laboratorio-sayyquest,
    .ranking-encabezado,
    .resumen-progreso,
    .posicion-personal-ranking
  ) {
  background: linear-gradient(120deg, #f3f9eb, #e0eddc);
  color: var(--sqv-text);
  border: 1px solid var(--sqv-border);
  border-radius: 22px;
}
body[data-sqv]
  :is(.laboratorio-sayyquest, .ranking-encabezado)
  :is(h1, h2, h3, p) {
  color: var(--sqv-text);
}
body[data-sqv]
  :is(
    .tabla-ranking-contenedor,
    .tabla-contenedor,
    .tabla-responsive,
    .contenedor-tabla
  ) {
  max-width: 100%;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--sqv-border);
  background: white;
}
body[data-sqv] table {
  border-collapse: collapse;
  max-width: 100%;
}
body[data-sqv] th {
  background: #e0eddc;
  color: var(--sqv-text);
  text-align: left;
}
body[data-sqv] :is(th, td) {
  padding: 14px 16px;
  border-bottom: 1px solid var(--sqv-border);
}
body[data-sqv] :is(.opcion-respuesta, .respuesta-opcion) {
  min-height: 48px;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--sqv-border);
  cursor: pointer;
}
body[data-sqv] :is(.opcion-respuesta, .respuesta-opcion):has(input:checked) {
  background: var(--sqv-soft);
  border-color: var(--sqv-green);
}
body[data-sqv] :is(img, video, iframe) {
  max-width: 100%;
}
body[data-sqv] pre {
  max-width: 100%;
  overflow: auto;
}
/* La navegación antigua se reemplaza en PHP. Se ocultan solo sus controles. */
body[data-sqv="private"]
  :is(
    .boton-menu-movil,
    #botonMenuMovil,
    .fondo-menu-movil,
    #fondoMenuMovil,
    .sq-bottom-nav,
    .sq-mobile-nav
  ) {
  display: none !important;
}
.sqv-icon {
  display: inline-block;
  width: 23px;
  height: 23px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
body[data-sqv] .sqv-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  height: 100dvh;
  overflow-y: auto;
  background: linear-gradient(160deg, var(--sqv-forest), var(--sqv-deep));
  color: #fff9ed;
  padding: 30px 15px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 35px;
}
.sqv-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff9ed;
  font-size: 25px;
  font-weight: 850;
}
.sqv-brand .sqv-icon {
  width: 42px;
  height: 42px;
  background: #d4e9bd;
  color: #16492b;
  padding: 9px;
  border-radius: 14px;
}
.sqv-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sqv-links a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 47px;
  padding: 12px 14px;
  color: inherit;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  border-radius: 12px;
  text-decoration: none;
}
.sqv-links a:hover {
  background: rgb(255 255 255 / 10%);
}
.sqv-links a[aria-current="page"] {
  background: #397f50;
  color: white;
}
.sqv-counter {
  margin-left: auto;
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 20px;
  background: #ffdf8b;
  color: #173d29;
  font-size: 11px;
  text-align: center;
}
.sqv-bottom,
.sqv-more {
  display: none;
}
.sqv-skip {
  position: fixed;
  left: 265px;
  top: -100px;
  z-index: 10000;
  padding: 14px;
  background: white;
  color: #173d29;
  border-radius: 8px;
}
.sqv-skip:focus {
  top: 10px;
}
.sqv-admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px;
  background: #e0eddc;
  border-radius: 16px;
}
.sqv-admin-tools a {
  color: #173d29;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 10px;
  background: #fff;
  font-weight: 650;
}
/* Formularios públicos sin navegación privada. */
body[data-sqv="public"].pagina-autenticacion {
  min-height: 100dvh;
  padding: 30px;
  background:
    radial-gradient(ellipse at top right, #e0eddc, transparent 65%), #fff9ed;
}
body[data-sqv="public"] .contenedor-autenticacion {
  border: 1px solid var(--sqv-border);
  box-shadow: var(--sqv-shadow);
  border-radius: 28px;
}
body[data-sqv="public"] .presentacion-autenticacion {
  background: linear-gradient(145deg, #16492b, #0d3521);
}
body[data-sqv="public"] .presentacion-autenticacion :is(h1, p) {
  color: #fff9ed;
}
body[data-sqv="public"] .tarjeta-autenticacion {
  background: #fffefa;
}
body[data-sqv="public"] .icono-autenticacion {
  color: #d4e9bd;
}
/* Ajustes conservadores: se conservan los estados de error, advertencia y bloqueo. */
@media (max-width: 900px) {
  body[data-sqv="private"] {
    padding: 0 0
      calc(var(--sqv-nav-height) + env(safe-area-inset-bottom, 0px) + 20px);
  }
  body[data-sqv="private"] .sqv-sidebar {
    display: none;
  }
  body[data-sqv="private"] :is(.dashboard-layout, .sq-layout) {
    display: block;
  }
  body[data-sqv="private"] [data-sqv-content] {
    padding: 18px 18px 28px;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }
  body[data-sqv] .sqv-bottom {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    position: fixed;
    inset: auto 0 0;
    z-index: 8000;
    background: linear-gradient(110deg, #16492b, #0d3521);
    color: #fff9ed;
    padding: 8px 7px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 23px 23px 0 0;
    box-shadow: 0 -6px 24px rgb(13 53 33 / 12%);
  }
  .sqv-bottom a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 2px;
    min-height: 60px;
    min-width: 0;
    border-radius: 17px;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
  }
  .sqv-bottom .sqv-icon {
    width: 25px;
    height: 25px;
  }
  .sqv-bottom a[aria-current="page"] {
    background: #31834a;
  }
  .sqv-more {
    display: block;
    margin: calc(12px + env(safe-area-inset-top, 0px)) 18px 0;
    position: relative;
    z-index: 1201;
    color: #173d29;
  }
  .sqv-more summary {
    width: fit-content;
    margin-left: auto;
    cursor: pointer;
    padding: 9px 14px;
    background: #e0eddc;
    border: 1px solid #cbdcc8;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
  }
  .sqv-more[open] .sqv-links {
    padding: 12px;
    margin-top: 10px;
    background: #16492b;
    color: white;
    border-radius: 18px;
    box-shadow: var(--sqv-shadow);
  }
  .sqv-skip {
    left: 15px;
  }
  body[data-sqv] :is(.grid-cursos, .grid-insignias) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-sqv] .tabla-resultados {
    display: block;
    overflow-x: auto;
  }
  body[data-sqv="private"].pagina-sayybot {
    height: auto !important;
    overflow: auto !important;
  }
  body[data-sqv="private"].pagina-sayybot .sq-ia-main {
    height: auto !important;
    min-height: 0;
  }
  body[data-sqv="private"].pagina-sayybot .sq-ia-layout {
    height: auto !important;
  }
  body[data-sqv="private"].pagina-sayybot .sq-panel-conversaciones {
    bottom: calc(
      var(--sqv-nav-height) + env(safe-area-inset-bottom, 0px)
    ) !important;
    height: calc(
      100dvh - var(--sqv-nav-height) - env(safe-area-inset-bottom, 0px)
    ) !important;
  }
}
@media (max-width: 600px) {
  body[data-sqv] :is(.grid-cursos, .grid-insignias) {
    grid-template-columns: 1fr;
  }
  body[data-sqv="public"].pagina-autenticacion {
    align-items: flex-start;
    padding: 18px 14px;
  }
  body[data-sqv="public"] .contenedor-autenticacion {
    grid-template-columns: 1fr;
  }
  body[data-sqv="public"] .presentacion-autenticacion {
    padding: 27px 24px;
  }
  body[data-sqv="public"] .icono-autenticacion {
    display: none;
  }
  body[data-sqv="public"] .tarjeta-autenticacion {
    padding: 28px 24px;
  }
  body[data-sqv="public"] .formulario-autenticacion button {
    width: 100%;
  }
  body[data-sqv] :is(input, select, textarea) {
    font-size: 16px;
  }
  body[data-sqv] .tarjeta-modulo {
    flex-wrap: wrap;
  }
  body[data-sqv] .informacion-modulo {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-sqv] *,
  body[data-sqv] *::before,
  body[data-sqv] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Componentes de personalización y prácticas conservan estructura e identificadores. */
body[data-sqv]
  :is(
    .producto,
    .objeto,
    .tarjeta,
    .practica,
    .panel,
    .bloque-resultado,
    .resumen-resultado,
    .formulario-admin
  ) {
  border-radius: 22px;
  border-color: var(--sqv-border);
  box-shadow: var(--sqv-shadow);
}
body[data-sqv] :is(.producto, .objeto, .practica, .panel) {
  background: #fffefa;
}
body[data-sqv]
  :is(.boton-comprar, .boton-equipar, .boton-guardar, .boton-principal) {
  background: var(--sqv-green);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
}
body[data-sqv="private"].pagina-sayybot {
  background: #fff9ed !important;
}
@media (min-width: 901px) {
  body[data-sqv="private"].pagina-sayybot {
    height: 100dvh;
  }
  body[data-sqv="private"].pagina-sayybot .dashboard-layout {
    height: 100dvh !important;
  }
}
@media (max-width: 900px) {
  /* El chat anterior ocupaba todo el viewport; se reserva lugar para ambas barras. */
  body[data-sqv="private"].pagina-sayybot .sq-ia-main {
    position: fixed !important;
    inset: 53px 0 calc(var(--sqv-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
  }
  body[data-sqv="private"].pagina-sayybot .sq-ia-layout {
    height: 100% !important;
  }
  body[data-sqv="private"].pagina-sayybot .sq-chat-barra {
    padding: 10px 15px !important;
  }
  body[data-sqv="private"].pagina-sayybot .sqv-more[open] .sqv-links {
    max-height: calc(100dvh - 150px);
    overflow: auto;
  }
}
/* Alias del CSS histórico: una sola paleta sin cambiar nombres de clase. */
:root {
  --verde-principal: #246d3d;
  --verde-oscuro: #16492b;
  --verde-claro: #e0eddc;
  --crema: #fff9ed;
  --blanco: #fff;
  --texto: #173d29;
  --gris: #637265;
  --borde: #dfebdd;
  --sombra: 0 10px 30px rgb(23 61 41 / 6%);
}

/* Paso 383 — Laboratorio de la página Cursos */
body[data-sqv] .sq-laboratorio-cursos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 28px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 26px;
  background: linear-gradient(120deg, #f3f9ec, #e0eddc);
  box-shadow: 0 10px 30px rgb(23 61 41 / 6%);
}
body[data-sqv] .sq-laboratorio-cursos .laboratorio-contenido {
  flex: 1;
  min-width: 0;
}
body[data-sqv] .sq-laboratorio-cursos .laboratorio-etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 30px;
  background: #dcebd5;
  color: #246d3d;
  font-size: 12px;
  font-weight: 750;
}
body[data-sqv] .sq-laboratorio-cursos .laboratorio-etiqueta .sqv-icon {
  width: 18px;
  height: 18px;
}
body[data-sqv] .sq-laboratorio-cursos h2 {
  margin: 18px 0 12px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.03em;
}
body[data-sqv] .sq-laboratorio-cursos p {
  max-width: 650px;
  margin: 0;
  color: #637265;
  line-height: 1.7;
}
body[data-sqv] .sq-laboratorio-cursos .laboratorio-detalles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
body[data-sqv] .sq-laboratorio-cursos .laboratorio-detalles span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dfebdd;
  border-radius: 11px;
  background: rgb(255 255 255 / 65%);
  color: #173d29;
  font-size: 12px;
}
body[data-sqv] .sq-laboratorio-cursos .laboratorio-detalles .sqv-icon {
  width: 18px;
  height: 18px;
  color: #397f50;
}
body[data-sqv] .sq-laboratorio-cursos .boton-laboratorio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
}
/* Ilustración decorativa sin imágenes externas. */
.sq-laboratorio-ilustracion {
  flex: 0 0 190px;
  width: 190px;
  padding-top: 15px;
  transform: rotate(-5deg);
}
.sq-laboratorio-pantalla {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 135px;
  border: 9px solid #69ad72;
  border-radius: 14px 14px 5px 5px;
  background: #16492b;
  color: #fff;
}
.sq-laboratorio-pantalla .sqv-icon {
  width: 58px;
  height: 58px;
}
.sq-laboratorio-pantalla span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
}
.sq-laboratorio-base {
  width: 110%;
  height: 12px;
  margin-left: -5%;
  border-radius: 4px 4px 12px 12px;
  background: #69ad72;
}
@media (max-width: 1100px) {
  .sq-laboratorio-ilustracion {
    display: none;
  }
}
@media (max-width: 600px) {
  body[data-sqv] .sq-laboratorio-cursos {
    padding: 24px 20px;
    border-radius: 22px;
  }
  body[data-sqv] .sq-laboratorio-cursos .boton-laboratorio {
    width: 100%;
  }
}

/* Paso 385 — Tarjetas renovadas de Cursos */
body[data-sqv] .grid-cursos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
    align-items: stretch;
}

body[data-sqv] .grid-cursos .tarjeta-curso {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 285px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid #dfebdd;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #f7faf2);
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

/* Icono decorativo común a los cursos */
body[data-sqv] .grid-cursos .tarjeta-curso::before {
    content: "</>";
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border: 1px solid #d5e6ce;
    border-radius: 16px;
    background: #e0eddc;
    color: #246d3d;
    font-family: Consolas, monospace;
    font-size: 23px;
    font-weight: 700;
}

/* Conserva el color configurado para cada curso */
body[data-sqv] .grid-cursos .curso-color {
    position: absolute;
    top: 28px;
    right: 26px;
    width: 28px;
    height: 5px;
    margin: 0;
    border-radius: 10px;
}

body[data-sqv] .grid-cursos .tarjeta-curso h2 {
    margin: 0 0 10px;
    color: #173d29;
    font-size: 23px;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

body[data-sqv] .grid-cursos .tarjeta-curso p {
    margin: 0 0 24px;
    color: #637265;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body[data-sqv] .grid-cursos .tarjeta-curso .boton-curso {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    margin-top: auto;
    padding: 12px 16px;
    border: 1px solid #cfdfc9;
    border-radius: 13px;
    background: #e0eddc;
    color: #16492b;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

body[data-sqv] .grid-cursos .boton-curso::after {
    content: "→";
    font-size: 20px;
    line-height: 1;
}

body[data-sqv] .grid-cursos .tarjeta-curso:hover {
    transform: translateY(-4px);
    border-color: #a6c59b;
    box-shadow: 0 15px 30px rgb(23 61 41 / 9%);
}

body[data-sqv] .grid-cursos .boton-curso:hover {
    background: #246d3d;
    border-color: #246d3d;
    color: #ffffff;
}

@media (max-width: 600px) {
    body[data-sqv] .grid-cursos {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body[data-sqv] .grid-cursos .tarjeta-curso {
        min-height: 260px;
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-sqv] .grid-cursos .tarjeta-curso:hover {
        transform: none;
    }
}

/* Paso 392 — Módulos: diseño compartido para PC y móvil */
body[data-sqv] .lista-modulos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

body[data-sqv] .lista-modulos .tarjeta-modulo {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    min-width: 0;
    margin: 0;
    padding: 26px;
    border: 1px solid #dfebdd;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #f7faf2);
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

body[data-sqv] .lista-modulos .numero-modulo {
    display: grid;
    place-items: center;
    flex: none;
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    border: 1px solid #d5e6ce;
    border-radius: 16px;
    background: #e0eddc;
    color: #246d3d;
    font-size: 20px;
    font-weight: 800;
}

body[data-sqv] .lista-modulos .informacion-modulo {
    flex: 1;
    width: 100%;
    min-width: 0;
}

body[data-sqv] .lista-modulos .titulo-estado-modulo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

body[data-sqv] .lista-modulos h2 {
    margin: 0;
    color: #173d29;
    font-size: 23px;
    line-height: 1.3;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

body[data-sqv] .lista-modulos .estado-modulo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

body[data-sqv] .lista-modulos .estado-modulo.disponible {
    border: 1px solid #cfe2c7;
    background: #e0eddc;
    color: #246d3d;
}

body[data-sqv] .lista-modulos .informacion-modulo p {
    margin: 0;
    color: #637265;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body[data-sqv] .lista-modulos .calificacion-modulo {
    display: block;
    margin-top: 18px;
    padding: 10px 12px;
    border: 1px solid #d5e6ce;
    border-radius: 12px;
    background: #edf5e8;
    color: #246d3d;
    font-size: 12px;
    line-height: 1.6;
}

body[data-sqv] .lista-modulos .mensaje-modulo-bloqueado {
    display: block;
    margin-top: 18px;
    color: #637265;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body[data-sqv] .lista-modulos .mensaje-modulo-bloqueado strong {
    display: block;
    color: #4e5c50;
}

body[data-sqv] .lista-modulos .boton-curso,
body[data-sqv] .lista-modulos .boton-modulo-bloqueado {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    margin-top: auto;
    padding: 12px 16px;
    border: 1px solid #cfdfc9;
    border-radius: 13px;
    background: #e0eddc;
    color: #16492b;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

body[data-sqv] .lista-modulos .boton-curso:hover {
    border-color: #246d3d;
    background: #246d3d;
    color: #ffffff;
}

body[data-sqv] .lista-modulos .tarjeta-modulo.modulo-bloqueado {
    opacity: 1;
    border-style: dashed;
    border-color: #d4dcd0;
    background: #f6f5ef;
    box-shadow: none;
    filter: none;
}

body[data-sqv] .lista-modulos .modulo-bloqueado .numero-modulo {
    border-color: #d4dcd0;
    background: #e8ebe3;
    color: #637265;
}

body[data-sqv] .lista-modulos .estado-modulo.bloqueado {
    border: 1px solid #ded8c7;
    background: #eeeadd;
    color: #655c42;
}

body[data-sqv] .lista-modulos .boton-modulo-bloqueado {
    opacity: 1;
    border-color: #d4dcd0;
    background: #e8ebe3;
    color: #637265;
    cursor: not-allowed;
}

body[data-sqv] .lista-modulos > .mensaje-vacio {
    grid-column: 1 / -1;
}

@media (hover: hover) {
    body[data-sqv] .lista-modulos
    .tarjeta-modulo:not(.modulo-bloqueado):hover {
        transform: translateY(-3px);
        border-color: #a6c59b;
        box-shadow: 0 15px 30px rgb(23 61 41 / 9%);
    }
}

@media (max-width: 1100px) {
    body[data-sqv] .lista-modulos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body[data-sqv] .lista-modulos {
        gap: 16px;
    }

    body[data-sqv] .lista-modulos .tarjeta-modulo {
        gap: 18px;
        padding: 22px;
        border-radius: 22px;
    }

    body[data-sqv] .lista-modulos h2 {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-sqv] .lista-modulos .tarjeta-modulo {
        transition: none;
    }

    body[data-sqv] .lista-modulos
    .tarjeta-modulo:not(.modulo-bloqueado):hover {
        transform: none;
    }
}

/* Paso 397 — Cuestionario para PC y móvil */
body[data-sqv] .lista-preguntas {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin: 28px 0;
}

body[data-sqv] .lista-preguntas .tarjeta-pregunta {
    min-width: 0;
    margin: 0;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid #dfebdd;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #f8faf4);
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
}

body[data-sqv] .lista-preguntas .encabezado-pregunta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

body[data-sqv] .lista-preguntas .numero-pregunta {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #d5e6ce;
    border-radius: 11px;
    background: #e0eddc;
    color: #246d3d;
    font-size: 13px;
    font-weight: 750;
}

body[data-sqv] .lista-preguntas .dificultad {
    max-width: 100%;
    padding: 6px 11px;
    border: 1px solid #dfebdd;
    border-radius: 20px;
    background: #f1f5eb;
    color: #52634f;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

body[data-sqv] .lista-preguntas .tarjeta-pregunta h2 {
    margin: 0 0 24px;
    color: #173d29;
    font-size: clamp(19px, 2vw, 24px);
    line-height: 1.5;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

body[data-sqv] .lista-preguntas .opciones-pregunta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body[data-sqv] .lista-preguntas .opcion-respuesta {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 68px;
    margin: 0;
    padding: 16px;
    border: 1px solid #d9e5d4;
    border-radius: 15px;
    background: #ffffff;
    color: #173d29;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

body[data-sqv] .lista-preguntas .opcion-respuesta input[type="radio"] {
    position: static;
    display: inline-block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    opacity: 1;
    accent-color: #246d3d;
    cursor: pointer;
}

body[data-sqv] .lista-preguntas .opcion-respuesta span {
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

body[data-sqv] .lista-preguntas .opcion-respuesta:has(input:checked) {
    border-color: #397f50;
    background: #e0eddc;
    box-shadow: inset 0 0 0 1px #397f50;
}

body[data-sqv] .lista-preguntas .opcion-respuesta input:checked + span {
    color: #16492b;
    font-weight: 700;
}

body[data-sqv] .lista-preguntas .opcion-respuesta:focus-within {
    outline: 3px solid #d99a22;
    outline-offset: 3px;
}

body[data-sqv] .lista-preguntas + .boton-finalizar {
    display: block;
    width: 100%;
    min-height: 54px;
    margin: 0 0 28px;
    padding: 16px 22px;
    border: 1px solid #246d3d;
    border-radius: 15px;
    background: #246d3d;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
}

body[data-sqv] .lista-preguntas + .boton-finalizar:hover {
    border-color: #16492b;
    background: #16492b;
}

@media (hover: hover) {
    body[data-sqv] .lista-preguntas
    .opcion-respuesta:not(:has(input:checked)):hover {
        border-color: #a6c59b;
        background: #f1f7ec;
    }
}

@media (max-width: 1100px) {
    body[data-sqv] .lista-preguntas .opciones-pregunta {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    body[data-sqv] .lista-preguntas {
        gap: 18px;
        margin-top: 22px;
    }

    body[data-sqv] .lista-preguntas .tarjeta-pregunta {
        padding: 22px 18px;
        border-radius: 22px;
    }

    body[data-sqv] .lista-preguntas .encabezado-pregunta {
        margin-bottom: 18px;
    }

    body[data-sqv] .lista-preguntas .opcion-respuesta {
        min-height: 60px;
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-sqv] .lista-preguntas .opcion-respuesta {
        transition: none;
    }
}

/* Paso 407 — Resultados para PC y móvil */
body[data-sqv] .tarjeta-resultado {
    width: 100%;
    max-width: 960px;
    min-width: 0;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid #dfebdd;
    border-radius: 28px;
    background: linear-gradient(145deg, #ffffff, #f8faf4);
    box-shadow: 0 12px 35px rgb(23 61 41 / 6%);
    text-align: center;
}

body[data-sqv] .tarjeta-resultado .resultado-curso {
    display: inline-block;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 7px 14px;
    border: 1px solid #d5e6ce;
    border-radius: 20px;
    background: #e0eddc;
    color: #246d3d;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
}

body[data-sqv] .tarjeta-resultado h1 {
    margin: 0 0 12px;
    color: #173d29;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

body[data-sqv] .tarjeta-resultado .resultado-modulo {
    margin: 0;
    color: #637265;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body[data-sqv] .tarjeta-resultado .resultado-modulo strong {
    color: #173d29;
}

body[data-sqv] .tarjeta-resultado .resultado-calificacion {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 112px;
    margin: 28px auto 22px;
    padding: 18px 30px;
    border: 1px solid #cfdfc9;
    border-radius: 26px;
    background: #e0eddc;
    color: #173d29;
    font-size: clamp(42px, 7vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.045em;
}

/* Conserva los colores originales de aprobado y reprobado. */
body[data-sqv] .tarjeta-resultado .resultado-calificacion + div {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body[data-sqv] .tarjeta-resultado
:is(.mensaje-repeticion, .mensaje-exito, .mensaje-monedas) {
    margin: 12px 0;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body[data-sqv] .tarjeta-resultado .mensaje-monedas {
    border: 1px solid #eadbb4;
    background: #fff4d9;
    color: #685322;
}

body[data-sqv] .tarjeta-resultado .mensaje-repeticion {
    border: 1px solid #dfebdd;
    background: #f0f3eb;
    color: #52634f;
}

body[data-sqv] .tarjeta-resultado .datos-resultado {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0;
}

body[data-sqv] .tarjeta-resultado .dato-resultado {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 110px;
    margin: 0;
    padding: 18px 12px;
    border: 1px solid #dfebdd;
    border-radius: 18px;
    background: #ffffff;
}

body[data-sqv] .tarjeta-resultado .dato-resultado span {
    color: #637265;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body[data-sqv] .tarjeta-resultado .dato-resultado strong {
    color: #173d29;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

body[data-sqv] .tarjeta-resultado .dato-resultado-monedas {
    grid-column: span 2;
    border-color: #eadbb4;
    background: #fff8e7;
}

body[data-sqv] .tarjeta-resultado .acciones-resultado {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

body[data-sqv] .tarjeta-resultado .acciones-resultado a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    max-width: 100%;
    padding: 13px 18px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

body[data-sqv] .tarjeta-resultado .acciones-resultado .boton-secundario {
    border: 1px solid #cfdfc9;
    background: #e0eddc;
    color: #16492b;
}

body[data-sqv] .tarjeta-resultado
.acciones-resultado .boton-secundario:hover {
    background: #d3e5cb;
}

@media (max-width: 600px) {
    body[data-sqv] .tarjeta-resultado {
        padding: 26px 18px;
        border-radius: 23px;
    }

    body[data-sqv] .tarjeta-resultado .resultado-calificacion {
        min-height: 96px;
        margin-top: 24px;
        padding: 18px 24px;
        border-radius: 22px;
    }

    body[data-sqv] .tarjeta-resultado .datos-resultado {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 24px 0;
    }

    body[data-sqv] .tarjeta-resultado .dato-resultado {
        min-height: 96px;
        padding: 16px 10px;
    }

    body[data-sqv] .tarjeta-resultado .acciones-resultado {
        flex-direction: column;
    }

    body[data-sqv] .tarjeta-resultado .acciones-resultado a {
        width: 100%;
    }
}

/* Paso 409 — Resultados compactos solo en móvil */
@media (max-width: 600px) {
    body[data-sqv] .tarjeta-resultado {
        padding: 20px 14px;
        border-radius: 20px;
    }

    body[data-sqv] .tarjeta-resultado .resultado-curso {
        margin-bottom: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }

    body[data-sqv] .tarjeta-resultado h1 {
        margin-bottom: 8px;
        font-size: 23px;
        line-height: 1.25;
    }

    body[data-sqv] .tarjeta-resultado .resultado-modulo {
        font-size: 12px;
        line-height: 1.5;
    }

    body[data-sqv] .tarjeta-resultado .resultado-calificacion {
        min-height: 70px;
        margin: 16px auto 12px;
        padding: 12px 22px;
        border-radius: 18px;
        font-size: 40px;
    }

    body[data-sqv] .tarjeta-resultado .resultado-calificacion + div {
        min-height: 0;
        margin: 0 0 8px;
        padding: 8px;
        font-size: 13px;
        line-height: 1.5;
    }

    body[data-sqv] .tarjeta-resultado
    :is(.mensaje-exito, .mensaje-repeticion, .mensaje-monedas) {
        min-height: 0;
        margin: 8px 0;
        padding: 9px 10px;
        font-size: 12px;
        line-height: 1.5;
    }

    body[data-sqv] .tarjeta-resultado .datos-resultado {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        margin: 16px 0;
    }

    /* Correctas, Incorrectas y Total: primera fila */
    body[data-sqv] .tarjeta-resultado .dato-resultado {
        grid-column: span 2;
        min-height: 76px;
        gap: 7px;
        padding: 12px 6px;
        border-radius: 13px;
    }

    /* XP y SayyCoins: segunda fila */
    body[data-sqv] .tarjeta-resultado .dato-resultado:nth-child(4),
    body[data-sqv] .tarjeta-resultado .dato-resultado-monedas {
        grid-column: span 3;
    }

    body[data-sqv] .tarjeta-resultado .dato-resultado span {
        font-size: 11px;
        line-height: 1.4;
    }

    body[data-sqv] .tarjeta-resultado .dato-resultado strong {
        font-size: 24px;
        line-height: 1.2;
    }

    body[data-sqv] .tarjeta-resultado .acciones-resultado {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 16px;
    }

    body[data-sqv] .tarjeta-resultado .acciones-resultado a {
        min-width: 0;
        min-height: 44px;
        padding: 10px 8px;
        font-size: 12px;
        line-height: 1.4;
    }

    body[data-sqv] .tarjeta-resultado
    .acciones-resultado a:first-child {
        grid-column: 1 / -1;
    }
}

/* Paso 414 — Progreso renovado para PC y móvil */
body[data-sqv] .sq-progreso-renovado .grid-progreso {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

body[data-sqv] .sq-progreso-renovado .tarjeta-estadistica {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    min-height: 125px;
    margin: 0;
    padding: 22px;
    border: 1px solid #dfebdd;
    border-radius: 21px;
    background: linear-gradient(145deg, #ffffff, #f5f9ef);
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
}

body[data-sqv] .sq-progreso-renovado
.tarjeta-estadistica:first-child {
    background: #16492b;
    border-color: #16492b;
}

body[data-sqv] .sq-progreso-renovado
.tarjeta-estadistica:first-child span {
    color: #d9e9d1;
}

body[data-sqv] .sq-progreso-renovado
.tarjeta-estadistica:first-child strong {
    color: #ffffff;
}

body[data-sqv] .sq-progreso-renovado
.tarjeta-estadistica:nth-child(2) {
    background: #e0eddc;
}

body[data-sqv] .sq-progreso-renovado
:is(.tarjeta-estadistica, .tarjeta-resumen) span {
    color: #637265;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-progreso-renovado
.tarjeta-estadistica strong {
    color: #173d29;
    font-size: clamp(23px, 2.5vw, 30px);
    line-height: 1.25;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-progreso-renovado .resumen-respuestas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

body[data-sqv] .sq-progreso-renovado .tarjeta-resumen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    min-height: 76px;
    margin: 0;
    padding: 18px 22px;
    border: 1px solid #dfebdd;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
}

body[data-sqv] .sq-progreso-renovado .tarjeta-resumen strong {
    color: #173d29;
    font-size: 27px;
    line-height: 1.2;
}

body[data-sqv] .sq-progreso-renovado .historial-progreso {
    min-width: 0;
    margin: 0 0 22px;
    padding: 24px;
    border: 1px solid #dfebdd;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
}

body[data-sqv] .sq-progreso-renovado
:is(.historial-progreso, .sq-historial-acceso) h2 {
    margin: 0 0 20px;
    color: #173d29;
    font-size: 23px;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

body[data-sqv] .sq-progreso-renovado .tabla-contenedor-admin {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 14px;
}

body[data-sqv] .sq-progreso-renovado .tabla-progreso-usuario {
    width: 100%;
    border-collapse: collapse;
}

body[data-sqv] .sq-progreso-renovado
.tabla-progreso-usuario th {
    padding: 14px;
    background: #edf5e8;
    color: #246d3d;
    font-size: 12px;
}

body[data-sqv] .sq-progreso-renovado
.tabla-progreso-usuario td {
    padding: 18px 14px;
    color: #173d29;
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px solid #e5eddf;
}

body[data-sqv] .sq-progreso-renovado .avance-tabla-progreso {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

body[data-sqv] .sq-progreso-renovado .barra-avance-progreso {
    flex: 1;
    min-width: 60px;
    height: 9px;
    overflow: hidden;
    border-radius: 20px;
    background: #e3eadd;
}

body[data-sqv] .sq-progreso-renovado
.barra-avance-progreso > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #397f50, #246d3d);
}

body[data-sqv] .sq-progreso-renovado .sq-historial-acceso {
    display: block;
    margin: 0;
    padding: 26px;
    border: 1px solid #d5e6ce;
    border-radius: 23px;
    background: linear-gradient(120deg, #edf5e8, #f8faf4);
}

body[data-sqv] .sq-progreso-renovado .sq-historial-acceso p {
    margin: 0 0 18px;
    color: #637265;
    font-size: 14px;
    line-height: 1.7;
}

body[data-sqv] .sq-progreso-renovado .sq-historial-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    max-width: 100%;
    padding: 12px 18px;
    border: 0;
    border-radius: 13px;
    background: #246d3d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 1100px) {
    body[data-sqv] .sq-progreso-renovado .grid-progreso {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tabla convertida en tarjetas únicamente en móvil.
   Estos ajustes sustituyen las reglas móviles históricas. */
@media (max-width: 600px) {
    body[data-sqv] .sq-progreso-renovado .grid-progreso {
        gap: 10px;
        margin-bottom: 10px;
    }

    body[data-sqv] .sq-progreso-renovado .tarjeta-estadistica {
        min-height: 104px;
        gap: 9px;
        padding: 16px 13px;
        border-radius: 17px;
    }

    body[data-sqv] .sq-progreso-renovado
    .tarjeta-estadistica strong {
        font-size: 23px;
    }

    body[data-sqv] .sq-progreso-renovado .resumen-respuestas {
        gap: 10px;
        margin-bottom: 22px;
    }

    body[data-sqv] .sq-progreso-renovado .tarjeta-resumen {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        min-height: 90px;
        padding: 14px;
        border-radius: 17px;
    }

    body[data-sqv] .sq-progreso-renovado
    :is(.tarjeta-estadistica, .tarjeta-resumen) span {
        font-size: 12px;
    }

    body[data-sqv] .sq-progreso-renovado .historial-progreso {
        padding: 18px 12px;
        border-radius: 21px;
    }

    body[data-sqv] .sq-progreso-renovado
    :is(.historial-progreso, .sq-historial-acceso) h2 {
        font-size: 21px;
        margin-bottom: 16px;
    }

    body[data-sqv] .sq-progreso-renovado .tabla-progreso-usuario,
    body[data-sqv] .sq-progreso-renovado .tabla-progreso-usuario tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Encabezados accesibles, sin ocupar espacio visual. */
    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip-path: inset(50%);
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario tbody tr {
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px;
        padding: 14px;
        border: 1px solid #dfebdd;
        border-radius: 16px;
        background: #f8faf4;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario tbody td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 7px 0 !important;
        border: 0 !important;
        text-align: left !important;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario tbody td::before {
        content: attr(data-label);
        position: static !important;
        display: block !important;
        width: auto !important;
        margin-bottom: 5px;
        padding: 0;
        color: #637265;
        font-size: 11px;
        font-weight: 600;
        text-align: left;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Módulo"] {
        color: #173d29;
        font-size: 16px;
        font-weight: 750;
    }

    body[data-sqv] .sq-progreso-renovado .avance-tabla-progreso {
        width: 100%;
        min-width: 0;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario .boton-accion-admin {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        margin-top: 4px;
        border-radius: 12px;
    }

    body[data-sqv] .sq-progreso-renovado .sq-historial-acceso {
        padding: 20px 16px;
        border-radius: 21px;
    }

    body[data-sqv] .sq-progreso-renovado .sq-historial-boton {
        width: 100%;
    }
}

/* Paso 416 — Progreso móvil más sencillo */
@media (max-width: 600px) {
    body[data-sqv] .sq-progreso-renovado .tarjeta-estadistica {
        min-height: 88px;
        padding: 14px;
        gap: 8px;
        box-shadow: none;
    }

    body[data-sqv] .sq-progreso-renovado .tarjeta-resumen {
        min-height: 76px;
        padding: 12px 14px;
        gap: 6px;
    }

    body[data-sqv] .sq-progreso-renovado .historial-progreso {
        padding: 18px 12px 6px;
        box-shadow: none;
    }

    /* Cada módulo ocupa menos espacio. */
    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario tbody tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px 12px;
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 15px;
        background: #f8faf4;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario tbody td {
        grid-column: 1 / -1;
        margin: 0;
        padding: 0 !important;
    }

    /* Oculta solo las etiquetas repetidas, no sus datos. */
    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Curso"]::before,
    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Módulo"]::before,
    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Avance"]::before,
    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Acción"]::before {
        display: none !important;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Curso"] {
        color: #637265;
        font-size: 12px;
        font-weight: 600;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Módulo"] {
        font-size: 16px;
        line-height: 1.4;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Avance"] {
        padding: 4px 0 6px !important;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Última actualización"] {
        grid-column: 1;
        color: #637265;
        font-size: 11px;
        line-height: 1.5;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Última actualización"]::before {
        content: "Actualizado";
        margin-bottom: 2px;
        font-size: 11px;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario td[data-label="Acción"] {
        grid-column: 2;
        align-self: center;
    }

    body[data-sqv] .sq-progreso-renovado
    .tabla-progreso-usuario .boton-accion-admin {
        width: auto;
        min-height: 44px;
        margin: 0;
        padding: 10px 16px;
        font-size: 12px;
    }

    body[data-sqv] .sq-progreso-renovado .sq-historial-acceso {
        padding: 18px 16px;
        border-radius: 18px;
    }

    body[data-sqv] .sq-progreso-renovado .sq-historial-acceso h2 {
        margin-bottom: 10px;
        font-size: 20px;
    }

    body[data-sqv] .sq-progreso-renovado .sq-historial-acceso p {
        margin-bottom: 14px;
        font-size: 13px;
        line-height: 1.6;
    }
}

/* Paso 421 — Historial de SayyQuest */
body[data-sqv] .sq-historial-renovado .sq-volver-progreso {
    display: inline-block;
    margin-bottom: 18px;
    color: #246d3d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

body[data-sqv] .sq-historial-renovado .historial-progreso {
    min-width: 0;
    margin: 0;
    padding: 26px;
    border: 1px solid #dfebdd;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
}

body[data-sqv] .sq-historial-renovado .historial-progreso h2 {
    margin: 0 0 20px;
    color: #173d29;
    font-size: 23px;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

body[data-sqv] .sq-historial-renovado .tabla-contenedor-admin {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 14px;
}

body[data-sqv] .sq-historial-renovado .tabla-historial-usuario {
    width: 100%;
    border-collapse: collapse;
}

body[data-sqv] .sq-historial-renovado
.tabla-historial-usuario th {
    padding: 14px;
    background: #edf5e8;
    color: #246d3d;
    font-size: 12px;
    white-space: nowrap;
}

body[data-sqv] .sq-historial-renovado
.tabla-historial-usuario td {
    padding: 17px 14px;
    border-bottom: 1px solid #e5eddf;
    color: #173d29;
    font-size: 13px;
    line-height: 1.6;
}

body[data-sqv] .sq-historial-renovado
:is(.calificacion-reporte, .xp-pregunta-admin) {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 10px;
    background: #e0eddc;
    color: #246d3d;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
    white-space: nowrap;
}

/* En móvil, cada intento se presenta como una tarjeta compacta. */
@media (max-width: 600px) {
    body[data-sqv] .sq-historial-renovado .historial-progreso {
        padding: 18px 12px 6px;
        border-radius: 21px;
        box-shadow: none;
    }

    body[data-sqv] .sq-historial-renovado .historial-progreso h2 {
        margin-bottom: 16px;
        font-size: 20px;
    }

    body[data-sqv] .sq-historial-renovado .tabla-historial-usuario,
    body[data-sqv] .sq-historial-renovado .tabla-historial-usuario tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Conserva los encabezados para tecnologías de asistencia. */
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario thead {
        display: table-header-group !important;
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario tbody tr {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        width: 100% !important;
        margin: 0 0 12px;
        padding: 16px;
        border: 1px solid #dfebdd;
        border-radius: 16px;
        background: #f8faf4;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario tbody td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario tbody td::before {
        content: attr(data-label);
        position: static !important;
        display: block !important;
        width: auto !important;
        margin: 0 0 5px;
        padding: 0;
        color: #637265;
        font-size: 11px;
        font-weight: 500;
        line-height: 1.4;
        text-align: left;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Curso"] {
        grid-column: 1 / -1;
        grid-row: 1;
        color: #637265;
        font-size: 12px;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Módulo"] {
        grid-column: 1 / -1;
        grid-row: 2;
        color: #173d29;
        font-size: 16px;
        font-weight: 750;
        line-height: 1.4;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Calificación"] {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    /* Solo se omiten las etiquetas visuales redundantes. */
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Curso"]::before,
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Módulo"]::before {
        display: none !important;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Calificación"]::before {
        display: inline !important;
        margin-right: 8px;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Correctas"],
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Incorrectas"],
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="XP"] {
        grid-row: 4;
        padding: 10px 6px !important;
        border-radius: 11px;
        background: #ffffff;
        font-size: 16px;
        font-weight: 750;
        text-align: center !important;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Correctas"] {
        grid-column: 1;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Incorrectas"] {
        grid-column: 2;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="XP"] {
        grid-column: 3;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Correctas"]::before,
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Incorrectas"]::before,
    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="XP"]::before {
        text-align: center;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Fecha"] {
        grid-column: 1 / -1;
        grid-row: 5;
        color: #637265;
        font-size: 11px;
    }

    body[data-sqv] .sq-historial-renovado
    .tabla-historial-usuario td[data-label="Fecha"]::before {
        display: inline !important;
        margin-right: 7px;
    }

    body[data-sqv] .sq-historial-renovado .xp-pregunta-admin {
        padding: 0;
        background: transparent;
        font-size: 16px;
    }
}

/* Paso 427 — Insignias para PC y móvil */
body[data-sqv] .sq-insignias-renovadas .resumen-respuestas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-resumen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 105px;
    margin: 0;
    padding: 22px;
    border: 1px solid #dfebdd;
    border-radius: 21px;
    background: #e0eddc;
    box-shadow: none;
}

body[data-sqv] .sq-insignias-renovadas
.tarjeta-resumen:first-child {
    border-color: #16492b;
    background: #16492b;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-resumen span {
    color: #52634f;
    font-size: 13px;
    line-height: 1.5;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-resumen strong {
    color: #173d29;
    font-size: 28px;
    line-height: 1.2;
}

body[data-sqv] .sq-insignias-renovadas
.tarjeta-resumen:first-child span {
    color: #d9e9d1;
}

body[data-sqv] .sq-insignias-renovadas
.tarjeta-resumen:first-child strong {
    color: #ffffff;
}

body[data-sqv] .sq-insignias-renovadas .grid-insignias {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 24px;
    border: 1px solid #dfebdd;
    border-radius: 23px;
    background: linear-gradient(145deg, #ffffff, #f7faf2);
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
    text-align: left;
    opacity: 1;
    filter: none;
}

body[data-sqv] .sq-insignias-renovadas .icono-insignia {
    display: grid;
    place-items: center;
    flex: none;
    width: 58px;
    height: 58px;
    margin: 0 0 6px;
    padding: 0;
    border: 1px solid #eadbb4;
    border-radius: 18px;
    background: #fff1ca;
    color: #9b690d;
}

.sq-insignias-renovadas .sq-medalla-svg {
    display: block;
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia h2 {
    margin: 0;
    color: #173d29;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia p {
    flex: 1;
    margin: 0;
    color: #637265;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-insignias-renovadas .requisito-insignia {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 6px 10px;
    border-radius: 10px;
    background: #e0eddc;
    color: #246d3d;
    font-size: 12px;
    line-height: 1.5;
}

body[data-sqv] .sq-insignias-renovadas .fecha-insignia {
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #52634f;
    font-size: 12px;
    line-height: 1.5;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia.obtenida {
    border-color: #c4dcb9;
}

body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia.bloqueada {
    border-style: dashed;
    background: #f6f5ef;
    box-shadow: none;
    opacity: 1;
    filter: none;
}

body[data-sqv] .sq-insignias-renovadas
.bloqueada .icono-insignia {
    border-color: #d4dcd0;
    background: #e8ebe3;
    color: #637265;
}

body[data-sqv] .sq-insignias-renovadas
.bloqueada .requisito-insignia {
    background: #e8ebe3;
    color: #52634f;
}

body[data-sqv] .sq-insignias-renovadas
.grid-insignias > .mensaje-vacio {
    grid-column: 1 / -1;
}

@media (max-width: 1100px) {
    body[data-sqv] .sq-insignias-renovadas .grid-insignias {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body[data-sqv] .sq-insignias-renovadas .resumen-respuestas {
        gap: 10px;
        margin-bottom: 18px;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-resumen {
        min-height: 86px;
        gap: 8px;
        padding: 14px;
        border-radius: 17px;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-resumen span {
        font-size: 12px;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-resumen strong {
        font-size: 24px;
    }

    body[data-sqv] .sq-insignias-renovadas .grid-insignias {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: start;
        gap: 8px 12px;
        min-height: 0;
        padding: 18px 14px;
        border-radius: 19px;
    }

    body[data-sqv] .sq-insignias-renovadas .icono-insignia {
        grid-column: 1;
        grid-row: 1 / span 4;
        width: 44px;
        height: 44px;
        margin: 0;
        border-radius: 14px;
    }

    .sq-insignias-renovadas .sq-medalla-svg {
        width: 26px;
        height: 26px;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia h2,
    body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia p,
    body[data-sqv] .sq-insignias-renovadas .requisito-insignia,
    body[data-sqv] .sq-insignias-renovadas .fecha-insignia {
        grid-column: 2;
        min-width: 0;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia h2 {
        font-size: 18px;
    }

    body[data-sqv] .sq-insignias-renovadas .tarjeta-insignia p {
        font-size: 13px;
    }

    body[data-sqv] .sq-insignias-renovadas .requisito-insignia {
        justify-self: start;
        padding: 5px 8px;
        font-size: 11px;
    }

    body[data-sqv] .sq-insignias-renovadas .fecha-insignia {
        font-size: 11px;
    }
}
/* Paso 437 — Ranking para PC y móvil */
body[data-sqv] .sq-ranking-renovado .ranking-contenedor {
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: 0 auto;
}

body[data-sqv] .sq-ranking-renovado .ranking-encabezado {
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid #d5e6ce;
    border-radius: 24px;
    background: linear-gradient(120deg, #edf5e8, #e0eddc);
    text-align: left;
}

body[data-sqv] .sq-ranking-renovado .ranking-encabezado h1 {
    margin: 0 0 12px;
    color: #173d29;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

body[data-sqv] .sq-ranking-renovado .ranking-encabezado p {
    margin: 0;
    color: #637265;
    font-size: 14px;
    line-height: 1.7;
}

body[data-sqv] .sq-ranking-renovado .posicion-personal-ranking {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid #cfdfc9;
    border-radius: 13px;
    background: #ffffff;
    color: #173d29;
    font-size: 13px;
    line-height: 1.5;
}

body[data-sqv] .sq-ranking-renovado
.posicion-personal-ranking strong {
    color: #246d3d;
    font-size: 19px;
}

body[data-sqv] .sq-ranking-renovado .tabla-ranking-contenedor {
    overflow: hidden;
    border: 1px solid #dfebdd;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgb(23 61 41 / 5%);
}

body[data-sqv] .sq-ranking-renovado .tabla-ranking {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

body[data-sqv] .sq-ranking-renovado .tabla-ranking th {
    padding: 16px 20px;
    background: #edf5e8;
    color: #246d3d;
    font-size: 12px;
    font-weight: 750;
    text-align: left;
}

body[data-sqv] .sq-ranking-renovado .tabla-ranking td {
    padding: 18px 20px;
    border-bottom: 1px solid #e5eddf;
    background: transparent;
    color: #173d29;
    vertical-align: middle;
}

body[data-sqv] .sq-ranking-renovado .tabla-ranking tbody tr {
    background: #ffffff;
}

body[data-sqv] .sq-ranking-renovado
.tabla-ranking tbody tr.usuario-actual {
    background: #edf5e8;
}

body[data-sqv] .sq-ranking-renovado
.tabla-ranking tbody tr:last-child td {
    border-bottom: 0;
}

/* Posiciones */
body[data-sqv] .sq-ranking-renovado .numero-ranking {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dfebdd;
    border-radius: 12px;
    background: #f0f4eb;
    color: #397f50;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
}

body[data-sqv] .sq-ranking-renovado .primer-lugar {
    border-color: #e8d49c;
    background: #fff1ca;
    color: #85600e;
}

body[data-sqv] .sq-ranking-renovado .segundo-lugar {
    border-color: #d5ddd8;
    background: #edf0ed;
    color: #52645a;
}

body[data-sqv] .sq-ranking-renovado .tercer-lugar {
    border-color: #e6cbb4;
    background: #f8e7d8;
    color: #88552d;
}

/* Foto válida o avatar SVG de respaldo */
body[data-sqv] .sq-ranking-renovado .datos-estudiante {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body[data-sqv] .sq-ranking-renovado .sq-ranking-avatar {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 1px solid #d5e6ce;
    border-radius: 15px;
    background: #e0eddc;
    color: #397f50;
}

.sq-ranking-renovado .sq-ranking-avatar svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body[data-sqv] .sq-ranking-renovado
.sq-ranking-avatar .foto-ranking {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    object-fit: cover;
    background: #e0eddc;
}

body[data-sqv] .sq-ranking-renovado
.sq-ranking-avatar .foto-ranking[hidden] {
    display: none !important;
}

/* Nombre, XP y nivel */
body[data-sqv] .sq-ranking-renovado .nombre-estudiante {
    min-width: 0;
    color: #173d29;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-ranking-renovado .etiqueta-tu {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 7px;
    border-radius: 8px;
    background: #d5e8cc;
    color: #246d3d;
    font-size: 11px;
    font-weight: 750;
    vertical-align: middle;
}

body[data-sqv] .sq-ranking-renovado .xp-ranking {
    color: #246d3d;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

body[data-sqv] .sq-ranking-renovado .nivel-ranking {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 10px;
    background: #f0f4eb;
    color: #637265;
    font-size: 12px;
    white-space: nowrap;
}

body[data-sqv] .sq-ranking-renovado .acciones-ranking {
    margin-top: 22px;
}

/* Vista móvil */
@media (max-width: 700px) {
    body[data-sqv] .sq-ranking-renovado .ranking-encabezado {
        margin-bottom: 16px;
        padding: 22px 18px;
        border-radius: 21px;
    }

    body[data-sqv] .sq-ranking-renovado .ranking-encabezado h1 {
        font-size: 25px;
    }

    body[data-sqv] .sq-ranking-renovado .ranking-encabezado p {
        font-size: 13px;
    }

    body[data-sqv] .sq-ranking-renovado .posicion-personal-ranking {
        margin-top: 14px;
        padding: 8px 11px;
        font-size: 12px;
    }

    body[data-sqv] .sq-ranking-renovado .tabla-ranking-contenedor {
        border-radius: 20px;
    }

    body[data-sqv] .sq-ranking-renovado .tabla-ranking,
    body[data-sqv] .sq-ranking-renovado .tabla-ranking tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    body[data-sqv] .sq-ranking-renovado .tabla-ranking thead {
        display: table-header-group !important;
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip-path: inset(50%);
    }

    body[data-sqv] .sq-ranking-renovado .tabla-ranking tbody tr {
        display: grid !important;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        align-items: center;
        gap: 4px 9px;
        padding: 15px 12px;
        border-bottom: 1px solid #e5eddf;
    }

    body[data-sqv] .sq-ranking-renovado
    .tabla-ranking tbody tr:last-child {
        border-bottom: 0;
    }

    body[data-sqv] .sq-ranking-renovado .tabla-ranking tbody td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
    }

    body[data-sqv] .sq-ranking-renovado
    .tabla-ranking tbody td::before {
        display: none !important;
    }

    body[data-sqv] .sq-ranking-renovado
    .tabla-ranking td:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    body[data-sqv] .sq-ranking-renovado
    .tabla-ranking td:nth-child(2) {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    body[data-sqv] .sq-ranking-renovado
    .tabla-ranking td:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
        text-align: right;
    }

    body[data-sqv] .sq-ranking-renovado
    .tabla-ranking td.columna-nivel {
        display: block !important;
        grid-column: 3;
        grid-row: 2;
        text-align: right;
    }

    body[data-sqv] .sq-ranking-renovado .numero-ranking {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 13px;
    }

    body[data-sqv] .sq-ranking-renovado .datos-estudiante {
        gap: 8px;
    }

    body[data-sqv] .sq-ranking-renovado .sq-ranking-avatar {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .sq-ranking-renovado .sq-ranking-avatar svg {
        width: 21px;
        height: 21px;
    }

    body[data-sqv] .sq-ranking-renovado .nombre-estudiante {
        font-size: 13px;
    }

    body[data-sqv] .sq-ranking-renovado .xp-ranking {
        font-size: 13px;
    }

    body[data-sqv] .sq-ranking-renovado .nivel-ranking {
        padding: 0;
        background: transparent;
        font-size: 11px;
    }
}

/* Paso 443 — Posición personal sencilla y legible */
body[data-sqv] .sq-ranking-renovado .posicion-personal-ranking {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
    margin-top: 16px;
    padding: 10px 14px;
    border: 1px solid #c6d9bd;
    border-radius: 12px;
    background: #dcebd5;
    color: #173d29;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
    box-shadow: none;
}

body[data-sqv] .sq-ranking-renovado
.posicion-personal-ranking strong {
    display: inline;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #173d29;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (max-width: 700px) {
    body[data-sqv] .sq-ranking-renovado .posicion-personal-ranking {
        margin-top: 14px;
        padding: 10px 13px;
        font-size: 14px;
    }

    body[data-sqv] .sq-ranking-renovado
    .posicion-personal-ranking strong {
        font-size: 22px;
    }
}

/* Paso 448 — Notificaciones sencillas para PC y móvil */
body[data-sqv] .sq-notificaciones-renovadas
.encabezado-notificaciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

body[data-sqv] .sq-notificaciones-renovadas
.encabezado-notificaciones .subtitulo-pagina {
    margin-bottom: 0;
}

body[data-sqv] .sq-notificaciones-renovadas
.lista-notificaciones {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

body[data-sqv] .sq-notificaciones-renovadas
.tarjeta-notificacion {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    min-width: 0;
    margin: 0;
    padding: 22px;
    border: 1px solid #dfebdd;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgb(23 61 41 / 4%);
    opacity: 1;
    filter: none;
}

body[data-sqv] .sq-notificaciones-renovadas
.tarjeta-notificacion.notificacion-no-leida {
    border-color: #a6c59b;
    background: #f1f7ec;
}

body[data-sqv] .sq-notificaciones-renovadas
.tarjeta-notificacion.notificacion-leida {
    background: #ffffff;
    opacity: 1;
}

body[data-sqv] .sq-notificaciones-renovadas
.icono-notificacion {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #d5e6ce;
    border-radius: 14px;
    background: #e0eddc;
    color: #397f50;
}

.sq-notificaciones-renovadas .sq-aviso-svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body[data-sqv] .sq-notificaciones-renovadas
.contenido-notificacion {
    min-width: 0;
}

body[data-sqv] .sq-notificaciones-renovadas
.titulo-notificacion {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 7px;
}

body[data-sqv] .sq-notificaciones-renovadas
.titulo-notificacion h2 {
    min-width: 0;
    margin: 0;
    color: #173d29;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-notificaciones-renovadas
.etiqueta-no-leida {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    background: #d5e8cc;
    color: #246d3d;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
}

body[data-sqv] .sq-notificaciones-renovadas
.contenido-notificacion > p {
    margin: 0 0 8px;
    color: #637265;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-notificaciones-renovadas
.contenido-notificacion > small {
    display: block;
    margin: 0;
    color: #637265;
    font-size: 12px;
    line-height: 1.5;
}

body[data-sqv] .sq-notificaciones-renovadas
.acciones-notificacion {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

body[data-sqv] .sq-notificaciones-renovadas form {
    max-width: 100%;
    margin: 0;
}

body[data-sqv] .sq-notificaciones-renovadas
:is(.boton-abrir-notificacion, .boton-marcar-leida, .boton-leer-todas) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #cfdfc9;
    border-radius: 11px;
    background: #e0eddc;
    color: #16492b;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    cursor: pointer;
}

body[data-sqv] .sq-notificaciones-renovadas
.boton-abrir-notificacion {
    border-color: #246d3d;
    background: #246d3d;
    color: #ffffff;
}

body[data-sqv] .sq-notificaciones-renovadas
.boton-abrir-notificacion:hover {
    background: #16492b;
}

body[data-sqv] .sq-notificaciones-renovadas
:is(.boton-marcar-leida, .boton-leer-todas):hover {
    background: #d3e5cb;
}

body[data-sqv] .sq-notificaciones-renovadas
.mensaje-sin-notificaciones {
    padding: 32px 22px;
    border: 1px solid #dfebdd;
    border-radius: 21px;
    background: #ffffff;
    text-align: center;
}

body[data-sqv] .sq-notificaciones-renovadas
.sq-aviso-vacio-icono {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 17px;
    background: #e0eddc;
    color: #397f50;
}

@media (max-width: 600px) {
    body[data-sqv] .sq-notificaciones-renovadas
    .encabezado-notificaciones {
        gap: 12px;
        margin-bottom: 18px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .tarjeta-notificacion {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 11px;
        padding: 16px 13px;
        border-radius: 17px;
        box-shadow: none;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .icono-notificacion {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .sq-notificaciones-renovadas .sq-aviso-svg {
        width: 22px;
        height: 22px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .titulo-notificacion h2 {
        font-size: 16px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .contenido-notificacion > p {
        font-size: 13px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .contenido-notificacion > small {
        font-size: 11px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .acciones-notificacion {
        gap: 8px;
        margin-top: 10px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    :is(.boton-abrir-notificacion, .boton-marcar-leida, .boton-leer-todas) {
        padding: 10px 12px;
        font-size: 12px;
    }
}
/* Paso 450 — Separación del icono en notificaciones móviles */
@media (max-width: 600px) {
    body[data-sqv] .sq-notificaciones-renovadas
    .tarjeta-notificacion {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        column-gap: 16px;
        align-items: start;
        padding: 18px 16px;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .icono-notificacion {
        grid-column: 1;
        width: 36px;
        min-width: 36px;
        max-width: 36px;
        height: 36px;
        margin: 0;
        box-sizing: border-box;
    }

    body[data-sqv] .sq-notificaciones-renovadas
    .contenido-notificacion {
        grid-column: 2;
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0;
    }
}

/* Paso 457 — Configuración de SayyQuest */
body[data-sqv] .sq-configuracion .contenedor-perfil {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    margin: 24px auto 0;
}

body[data-sqv] .sq-configuracion .resumen-perfil {
    min-width: 0;
    margin: 0;
    padding: 26px 20px;
    border: 1px solid #d5e6ce;
    border-radius: 23px;
    background: linear-gradient(145deg, #edf5e8, #e0eddc);
    box-shadow: none;
    text-align: center;
}

body[data-sqv] .sq-configuracion .avatar-perfil {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 22px;
    background: #16492b;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
}

body[data-sqv] .sq-configuracion .resumen-perfil h2 {
    margin: 0 0 8px;
    color: #173d29;
    font-size: 21px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-configuracion .resumen-perfil > p {
    margin: 0;
    color: #52634f;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

body[data-sqv] .sq-configuracion .datos-perfil {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
}

body[data-sqv] .sq-configuracion .datos-perfil > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #cfdfc9;
    border-radius: 13px;
    background: rgb(255 255 255 / 65%);
}

body[data-sqv] .sq-configuracion .datos-perfil span {
    display: block;
    margin-bottom: 5px;
    color: #637265;
    font-size: 12px;
}

body[data-sqv] .sq-configuracion .datos-perfil strong {
    color: #173d29;
    font-size: 23px;
}

body[data-sqv] .sq-configuracion .resumen-perfil > small {
    color: #52634f;
    font-size: 12px;
    line-height: 1.6;
}

body[data-sqv] .sq-configuracion .formularios-perfil {
    display: grid;
    gap: 20px;
    min-width: 0;
}

body[data-sqv] .sq-configuracion .formulario-admin {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 28px;
    border: 1px solid #dfebdd;
    border-radius: 23px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgb(23 61 41 / 4%);
}

body[data-sqv] .sq-configuracion .formulario-admin h2 {
    margin: 0 0 18px;
    color: #173d29;
    font-size: 23px;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

body[data-sqv] .sq-configuracion .formulario-admin form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0;
}

body[data-sqv] .sq-configuracion .formulario-admin label {
    margin: 6px 0 0;
    color: #173d29;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
}

body[data-sqv] .sq-configuracion
.formulario-admin input:not([type="hidden"]) {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0 0 4px;
    padding: 12px 14px;
    border: 1px solid #cfdfc9;
    border-radius: 12px;
    background: #fffefa;
    color: #173d29;
    font-size: 16px;
    line-height: 1.5;
}

body[data-sqv] .sq-configuracion
:is(.texto-ayuda-password, .ayuda-campo-password) {
    display: block;
    margin: 0 0 12px;
    color: #637265;
    font-size: 13px;
    line-height: 1.6;
}

body[data-sqv] .sq-configuracion .acciones-formulario {
    margin: 12px 0 0;
}

body[data-sqv] .sq-configuracion .acciones-formulario button {
    min-height: 46px;
    max-width: 100%;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: #246d3d;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
}

body[data-sqv] .sq-configuracion
.acciones-formulario button:hover {
    background: #16492b;
}

@media (max-width: 1100px) {
    body[data-sqv] .sq-configuracion .contenedor-perfil {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 600px) {
    body[data-sqv] .sq-configuracion .contenedor-perfil {
        margin-top: 18px;
    }

    body[data-sqv] .sq-configuracion .resumen-perfil {
        padding: 20px 16px;
        border-radius: 20px;
    }

    body[data-sqv] .sq-configuracion .formulario-admin {
        padding: 22px 18px;
        border-radius: 20px;
    }

    body[data-sqv] .sq-configuracion .formulario-admin h2 {
        font-size: 21px;
    }

    body[data-sqv] .sq-configuracion .acciones-formulario button {
        width: 100%;
    }
}
