:root {
  --verde: #0b6b5c;
  --verde-oscuro: #084c42;
  --verde-claro: #e6f4f1;
  --dorado: #c4a35a;
  --texto: #1c2b2a;
  --muted: #5b6b69;
  --fondo: #f6f8f7;
  --blanco: #fff;
  --sombra: 0 10px 30px rgba(8, 76, 66, .08);
  --radio: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.55;
}
a { color: var(--verde); text-decoration: none; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
body[data-page="tema"] .wrap { width: min(1360px, calc(100% - 24px)); }

header {
  background: var(--blanco);
  border-bottom: 1px solid #e4ece9;
  position: sticky; top: 0; z-index: 20;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.logo { font-weight: 800; font-size: 1.35rem; color: var(--verde-oscuro); letter-spacing: -.03em; }
.logo span { color: var(--dorado); }
.nav a.menu { color: var(--texto); font-weight: 600; margin-left: 18px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; border: 0; cursor: pointer;
  font: inherit;
}
.btn-pri { background: var(--verde); color: #fff; }
.btn-pri:hover { background: var(--verde-oscuro); }
.btn-sec { background: var(--verde-claro); color: var(--verde-oscuro); }
.btn-ghost { border: 1px solid #cfe0db; background: #fff; color: var(--texto); }

.hero {
  background: linear-gradient(160deg, #084c42 0%, #0b6b5c 55%, #147d6c 100%);
  color: #fff; padding: 64px 0 56px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; max-width: none; white-space: nowrap; }
.hero p { margin: 16px 0 28px; max-width: 58ch; color: #d7efe9; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-pri { background: var(--dorado); color: #1c2b2a; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.pill { background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; font-size: .85rem; }

section { padding: 56px 0; }
h2 { font-size: 1.7rem; margin-bottom: 8px; }
.lead { color: var(--muted); margin-bottom: 28px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 22px; border: 1px solid #e8efed;
}
.card h3 { margin-bottom: 6px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--verde); background: var(--verde-claro); padding: 3px 8px; border-radius: 999px; margin-bottom: 10px; }
.tag-oro { color: #7a5b12; background: #fff3d4; }

footer { background: var(--verde-oscuro); color: #cfe4df; padding: 28px 0; font-size: .92rem; }
footer a { color: #fff; }

.form { display: grid; gap: 12px; max-width: 380px; }
input, select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #c9d8d4; font: inherit;
}
.tema { background: #fff; padding: 24px; border-radius: var(--radio); box-shadow: var(--sombra); margin-bottom: 28px; }
.tema h3 { margin: 8px 0 12px; }
.tema .enunciado { font-style: italic; color: var(--muted); margin-bottom: 16px; }
.tema ul { margin: 8px 0 16px 18px; }
.tema li { margin: 6px 0; }
.pregunta { margin: 10px 0; padding-bottom: 8px; border-bottom: 1px solid #eef3f1; line-height: 1.5; text-align: left; }
.opciones { display: block; margin: 6px 0 0; max-width: 52rem; }
.opcion {
  display: block !important;
  width: auto;
  margin: 0 0 2px;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.5;
  text-align: left;
}
.opcion input[type="radio"] {
  display: inline-block;
  width: auto;
  margin: 0 8px 0 0;
  vertical-align: middle;
  float: none;
}
.opcion .letra,
.opcion .txt {
  display: inline;
  float: none;
  width: auto;
  flex: none;
}
.opcion .letra { font-weight: 700; margin-right: 6px; }
.pregunta label.opcion:hover { background: var(--verde-claro); }
.ok { color: #0b6b5c; font-weight: 700; margin-top: 12px; }
.ko { color: #a33; font-weight: 700; margin-top: 12px; }
.aviso { background: #fff7e6; border: 1px solid #ead7a0; padding: 12px 14px; border-radius: 10px; margin: 16px 0 24px; }
.lock { opacity: .55; }
.cat-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 24px; }
.cat-nav a {
  background: #fff; border: 1px solid #d5e4e0; border-radius: 999px;
  padding: 6px 12px; font-size: .9rem; font-weight: 600; color: var(--texto);
}
.cat-nav a:hover, .cat-nav a.active { background: var(--verde); color: #fff; border-color: var(--verde); }
.meta { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.origen { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.detalle { display: none; margin-top: 8px; font-size: .92rem; color: var(--muted); }
.detalle.visible { display: block; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 20px; }
.tab {
  border: 1px solid #d5e4e0; background: #fff; border-radius: 999px;
  padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; color: var(--texto);
}
.tab.activa, .tab[aria-selected="true"] { background: var(--verde); color: #fff; border-color: var(--verde); }
.tabpanel { display: none; }
.tabpanel.activa { display: block; }
.capitulo-sec { margin: 18px 0; padding-top: 8px; border-top: 1px solid #eef3f1; }
.capitulo-sec h4 { margin-bottom: 8px; }
.pregunta label.bien { background: #e6f4f1; outline: 2px solid #0b6b5c; }
.pregunta label.mal { background: #fdecec; }
.pregunta label.solucion { outline: 2px solid var(--dorado); }
.feedback { margin-top: 10px; font-size: .92rem; padding: 10px 12px; border-radius: 8px; }
.ok-fb { background: #e6f4f1; color: var(--verde-oscuro); }
.ko-fb { background: #fff4f4; color: #7a2e2e; }
.pill-nav { background: var(--verde-claro); color: var(--verde-oscuro); padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.temario-lista { list-style: none; margin: 12px 0 28px; }
.temario-lista li { background: #fff; border: 1px solid #e8efed; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.temario-lista li.abierto { border-color: var(--dorado); }
.temario-lista li.hecho { border-color: var(--verde); }
.temario-lista li.pendiente { color: var(--muted); }
.indice { margin-top: 32px; }
.tema-nav { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0 20px; }
#visor-host { position: relative; }
.visor { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; border: 1px solid #e8efed; }
.visor-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e8efed; }
.visor-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.visor-lienzo {
  position: relative; background: #edf2f0; padding: 12px;
  text-align: center; user-select: none;
  height: min(82vh, 980px); overflow: auto; overscroll-behavior: contain;
}
.visor-lienzo canvas { max-width: 100%; height: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.visor-marca {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; font-size: 2.2rem; font-weight: 800; color: rgba(8,76,66,.12);
  transform: rotate(-24deg);
}
.visor-aviso { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
.visor-frame { width: 100%; height: 76vh; border: 0; background: #edf2f0; }
.zoom-inner { transform-origin: top center; display: inline-block; min-width: 100%; }
.visor-nota { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.pdf-acciones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 10px 12px 0; }
.crono-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--verde); color: #fff; padding: 10px 16px; border-radius: 10px; margin-bottom: 16px;
}
.crono-bar.urgente { background: #a33; }
.es-reserva { background: #fffaf0; padding: 8px; border-radius: 8px; }
.visor-grid { display: grid; grid-template-columns: 1fr 220px; gap: 0; }
.pagina-wrap { position: relative; display: inline-block; max-width: none; transform-origin: top center; }
.pagina-img { width: 100%; max-width: none; height: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); cursor: crosshair; background: #fff; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  border: 0; background: #fff; width: 32px; height: 32px;
  border-radius: 50%; font-size: 1.15rem; cursor: pointer; line-height: 32px;
  box-shadow: 0 4px 10px rgba(0,0,0,.2); padding: 0;
}
.marca-ico { margin-right: 4px; }
.picker-marca {
  position: absolute; right: 16px; top: 70px; z-index: 8;
  background: #fff; border: 1px solid #d5e4e0; border-radius: 12px;
  padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); width: 260px;
}
.picker-marca p { margin: 0 0 8px; font-weight: 700; }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.picker-ico {
  border: 1px solid #e8efed; background: #f4f8f6; border-radius: 8px;
  padding: 6px 4px; cursor: pointer; font: inherit; font-size: 1.2rem;
}
.picker-ico small { display: block; font-size: .7rem; color: var(--muted); }
.picker-nota { display: block; margin: 10px 0 6px; font-size: .85rem; }
.picker-nota input { display: block; width: 100%; margin-top: 4px; padding: 6px; }
.marcas-box { background: #f4f8f6; padding: 14px; border-left: 1px solid #e8efed; text-align: left; height: min(82vh, 980px); overflow: auto; display: flex; flex-direction: column; }
.marcas-box h4 { margin: 0 0 8px; }
.marcas-box ul { list-style: none; margin: 0; padding: 0; }
.marcas-box li { font-size: .85rem; margin: 8px 0; }
.linkish { background: none; border: 0; color: var(--verde); cursor: pointer; text-decoration: underline; padding: 0; font: inherit; }
@media (max-width: 900px) {
  .visor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links .menu { display: none; }
  .hero { padding: 40px 0; }
}
footer a { font-weight: 700; }
#vista-box { position: fixed; right: 16px; bottom: 16px; z-index: 40; }
.vista-toggle {
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--verde); color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.vista-panel {
  position: absolute; right: 0; bottom: 56px; width: 220px;
  background: var(--blanco); border: 1px solid #d5e4e0; border-radius: 12px;
  padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.vista-panel label, .vista-panel select { display: block; width: 100%; margin: 8px 0; }
.vista-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.vista-fila button { padding: 6px 10px; border-radius: 8px; border: 1px solid #d5e4e0; background: #fff; cursor: pointer; font: inherit; font-weight: 700; }

body.noche {
  --verde: #7ad4c4;
  --verde-oscuro: #c8efe7;
  --verde-claro: #16312d;
  --texto: #e8f2f0;
  --muted: #9bb4b0;
  --fondo: #101918;
  --blanco: #182422;
  background: #101918;
  color: #e8f2f0;
}
body.noche header, body.noche .tema, body.noche .card, body.noche .visor,
body.noche .form, body.noche .aviso, body.noche .marcas-box, body.noche .vista-panel {
  background: #182422;
  border-color: #2a403c;
  color: #e8f2f0;
}
body.noche .pregunta { border-color: #2a403c; }
body.noche .opcion { color: #e8f2f0; }
body.noche input, body.noche select, body.noche textarea {
  background: #101918; color: #e8f2f0; border-color: #2a403c;
}
body.noche .visor-lienzo { background: #0c1413; }
body.noche .btn-ghost { color: #e8f2f0; }
body.noche .crono-bar { background: #0b6b5c; }
.cats-edit { border: 1px solid #e8efed; border-radius: 10px; padding: 10px 12px; margin: 8px 0 14px; }
.cats-edit legend { font-weight: 700; padding: 0 6px; }
.cats-edit .chk { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 4px 0; }
.cats-edit .chk input { width: auto; margin: 0; }
.acc-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 4px 0; border-bottom: 1px dashed #e8efed; }
.acc-fila .chk { flex: 1 1 200px; }
.acc-fecha { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.acc-fecha input { width: auto; padding: 4px 6px; }
.caducado { color: #b42318; font-size: .85rem; font-weight: 600; }
.bloque-descargas { margin: 20px 0; }
.bloque-descargas h4 { margin: 14px 0 6px; font-size: 1rem; }
.lista-descargas { list-style: none; padding: 0; margin: 0; }
.lista-descargas li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid #e8efed; }
.lista-descargas .desc-nombre { flex: 1 1 220px; overflow-wrap: anywhere; }
.btn-mini { padding: 6px 12px; font-size: .9rem; }
.tabla-users { width: 100%; border-collapse: collapse; margin: 24px 0 48px; background: var(--blanco); }
@media (max-width: 720px) { .tabla-users { display: block; overflow-x: auto; } }
.tabla-users th, .tabla-users td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e8efed; vertical-align: top; }
.tabla-users th { font-size: .85rem; color: var(--muted); }
.tag-pi { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #f6e3a8; color: #6b4e00;
  font-size: .78rem; font-weight: 700; vertical-align: 2px; }
.seg-orden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.seg-orden select { width: auto; }
.seg-temas { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 4px; }
.seg-tema { width: 34px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; background: #e4e9e8; color: #5b6b69; }
.seg-tema.visto { background: #f6e3a8; color: #6b4e00; }
.seg-tema.terminado { background: #0b6b5c; color: #fff; }
.seg-leyenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--muted); }
.seg-leyenda span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: #e4e9e8; }
.seg-leyenda .l-visto::before { background: #f6e3a8; }
.seg-leyenda .l-terminado::before { background: #0b6b5c; }
.seg-grafica { width: 100%; max-width: 640px; height: auto; display: block; margin: 8px 0; }
.seg-grafica text { fill: var(--muted); font-size: 11px; }
.seg-grafica .eje { stroke: #d5e4e0; }
.seg-grafica .corte { stroke: #b42318; stroke-dasharray: 4 4; }
.seg-grafica .linea { stroke: var(--verde); fill: none; stroke-width: 2.5; }
.seg-grafica .punto { fill: var(--verde); }
.seg-grafica .punto.ko { fill: #b42318; }
.seg-grafica .barra { fill: var(--verde); }




.logo { display:flex; flex-direction:row; align-items:center; gap:12px; text-decoration:none; flex-wrap:nowrap; }
.logo-img { height:72px; width:auto; max-width:280px; object-fit:contain; object-position:left center; background:#f7f3ea; border-radius:10px; }
.logo-text { display:flex; flex-direction:column; line-height:1.05; gap:3px; min-width:0; }
.logo-name { white-space:nowrap; font-weight:800; font-size:1.55rem; letter-spacing:-.02em; color:inherit; }
.logo-sub { font-size:12px; font-weight:500; letter-spacing:.01em; opacity:.72; white-space:nowrap; }
@media (max-width:720px){
  .logo-img { height:52px; max-width:200px; }
  .logo-name { font-size:1.25rem; }
  .logo-sub { display:none; }
}

.cara-avance { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.cara-avance svg { width: 64px; height: 64px; flex: 0 0 auto; }
.cara-avance .cara-txt { font-size: 0.92rem; color: var(--muted, #5c6b66); }
.card-avance .cara-avance svg { width: 84px; height: 84px; }
#cara-visor .cara-avance { margin: 0; }
#cara-visor .cara-avance svg { width: 42px; height: 42px; }

.atajos { margin-top: 18px; padding-top: 12px; border-top: 1px solid #e8efed; }
.atajos h4 { margin: 0 0 8px; }
.atajos ul { list-style: none; margin: 0; padding: 0; }
.atajos li { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: 0.88rem; }
.atajos kbd { min-width: 3.2em; text-align: center; padding: 2px 6px; border: 1px solid #c9d5d0; border-bottom-width: 2px; border-radius: 6px; background: #f6faf8; font-family: inherit; font-size: 0.82rem; }
.visor:fullscreen { background: #fff; overflow: auto; }

.cara-emoji { font-size: 2.6rem; line-height: 1; }
.card-avance .cara-emoji { font-size: 3.4rem; }
#cara-visor .cara-emoji { font-size: 1.7rem; }

.marcas-lista { flex: 1 1 auto; }
.atajos { margin-top: auto; }
.atajo-ico { font-size: 1rem; }

.aviso-user { border-radius: 12px; padding: 12px 14px; margin: 12px 0; border: 1px solid transparent; }
.aviso-user h3 { margin: 0 0 6px; }
.aviso-basica { background: #f3faf7; border-color: #b7ddd0; border-left: 6px solid #1f8a70; }
.aviso-importante { background: #fff8e8; border-color: #efd39a; border-left: 6px solid #d0891e; }
.aviso-urgente { background: #fff1f0; border-color: #f0b4ae; border-left: 6px solid #c0392b; }
.aviso-urgente h3 { color: #9b2c20; }

.aviso-ok { background: #eef8f2; border-color: #b7ddd0; }
.temario-lista li.pendiente { background: #fff8e8; }
.temario-lista li.abierto { background: #f7fbff; }

/* Páginas legales */
.legal h3 { margin: 24px 0 8px; }
.legal p, .legal ul { margin-bottom: 10px; }
.legal ul { padding-left: 22px; }
.tabla-legal { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: .95rem; }
.tabla-legal th, .tabla-legal td { border: 1px solid #d6e3df; padding: 8px 10px; text-align: left; vertical-align: top; }
.tabla-legal th { background: var(--verde-claro); }
.legal { overflow-wrap: anywhere; }
@media (max-width: 640px) { .tabla-legal { display: block; overflow-x: auto; } }
.hueco { background: #fff3b0; padding: 0 3px; border-radius: 3px; }
.acc-mod { width: auto; padding: 3px 6px; font-size: .85rem; }
.feedback .explicacion { display: block; margin-top: 6px; font-weight: 400; }

/* Valoraciones de los alumnos (js/valoraciones.js) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.val-estrellas { color: #c4a35a; letter-spacing: 1px; white-space: nowrap; }
.val-texto { white-space: pre-line; overflow-wrap: anywhere; }
.val-zona { margin: 20px 0; }
.val-form { display: grid; gap: 14px; max-width: 620px; }
.val-form textarea, .val-respuesta textarea, .val-responder textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #c9d8d4; font: inherit; resize: vertical;
}
.val-campo { border: 1px solid #e8efed; border-radius: 10px; padding: 8px 12px 10px; }
.val-campo legend { font-weight: 700; padding: 0 6px; }
.val-campo .chk { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 4px 0; }
.val-campo .chk input, .val-acepto input { width: auto; margin: 0; }
.val-acepto { display: flex; gap: 10px; align-items: flex-start; }
.val-acepto input { margin-top: 4px; }
.val-pulsar { display: flex; gap: 2px; }
.val-estrella { position: relative; cursor: pointer; font-size: 2rem; line-height: 1; color: #cfd9d6; padding: 2px; }
.val-estrella input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.val-estrella.on { color: #c4a35a; }
.val-estrella:focus-within { outline: 2px solid var(--verde); border-radius: 6px; }
.val-pulsar:hover .val-estrella { color: #c4a35a; }
.val-pulsar .val-estrella:hover ~ .val-estrella { color: #cfd9d6; }
.val-alias { display: block; margin: 4px 0 4px 28px; }
.val-alias[hidden] { display: none; }
.val-respuesta { border-left: 4px solid var(--verde); background: var(--verde-claro); padding: 8px 12px; border-radius: 8px; margin: 10px 0; }
.val-respuesta p { margin: 4px 0 0; }
.val-lista { display: grid; gap: 16px; margin: 16px 0; }
.val-card h3 { margin: 6px 0; }
.val-cabeza { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.2rem; }
.val-cabeza .tag { margin: 0; font-size: .75rem; }
.val-notas { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 8px 0; font-size: .88rem; color: var(--muted); }
.val-autor { margin: 8px 0 2px; }
.val-verificado { color: var(--verde); font-weight: 700; font-size: .88rem; }
.val-util { margin: 8px 0 0; }
.val-resumen { display: grid; grid-template-columns: auto 1fr 1fr; gap: 20px 32px; align-items: center; margin-bottom: 20px; }
.val-media { display: grid; justify-items: center; text-align: center; gap: 4px; }
.val-media-n { font-size: 3rem; font-weight: 800; line-height: 1; }
.val-media .val-estrellas { font-size: 1.4rem; }
.val-barra { display: grid; grid-template-columns: 3em 1fr 2em; gap: 8px; align-items: center; font-size: .9rem; }
.val-barra-fondo { height: 10px; background: #e8efed; border-radius: 999px; overflow: hidden; }
.val-barra-fondo span { display: block; height: 100%; background: #c4a35a; }
.val-aspectos { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.val-filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.val-filtros label { display: grid; gap: 4px; font-size: .9rem; font-weight: 700; flex: 1 1 180px; }
.val-corto { display: inline-block; margin-top: 14px; color: inherit; }
.val-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.val-rechazo { display: inline-flex; gap: 6px; align-items: center; }
.val-rechazo select { width: auto; padding: 6px 8px; }
.val-responder summary { cursor: pointer; color: var(--verde); font-weight: 700; margin: 6px 0; }
.val-responder button { margin-top: 6px; }
.val-estado-pendiente { color: #7a5b12; background: #fff3d4; }
.val-estado-rechazada, .val-estado-retirada { color: #7a2e2e; background: #fff1f0; }
@media (max-width: 720px) {
  .val-resumen { grid-template-columns: 1fr; }
}
body.noche .val-campo, body.noche .val-barra-fondo { border-color: #2a403c; }
body.noche .val-barra-fondo { background: #2a403c; }
body.noche .val-estrella { color: #3b524e; }

/* ---- Tests: corrección bloqueada, ventana de preguntas en blanco y repaso de fallos ---- */
.test-block[data-corregido="1"] .opcion { cursor: default; }
.test-block[data-corregido="1"] [data-corregir] { opacity: .6; cursor: default; }
.ventana-fondo { position: fixed; inset: 0; background: rgba(10, 20, 18, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.ventana { background: #fff; color: var(--texto); border-radius: 14px; padding: 20px; max-width: 440px; width: 100%; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.ventana p { margin: 0 0 16px; font-size: 1.05rem; }
.ventana-botones { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ventana-botones .btn { min-height: 44px; }
body.noche .ventana { background: #182422; color: #e8f2f0; }
.aviso-reincide { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #fff1e0; border: 1px solid #f0b46a; color: #8a4b00; font-weight: 700; font-size: .92rem; }
body.noche .aviso-reincide { background: #3a2a14; border-color: #8a5a1e; color: #ffd8a8; }
.ficha-fallo { border: 1px solid #e3ece9; border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: #fff; }
.ficha-fallo.en-revision { border-left: 6px solid #e08a1e; }
.ficha-fallo .meta { margin-bottom: 6px; }
.ficha-fallo .tag { margin: 0; }
.ficha-q { font-weight: 700; margin: 0 0 8px; }
.ficha-pie { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 0; }
.ficha-pie .btn { min-height: 44px; }
.tag-hoy { background: #fff1e0; color: #8a4b00; }
body.noche .ficha-fallo { background: #182422; border-color: #2a403c; }
.cifras-repaso { list-style: none; padding: 0; margin: 0; }
.cifras-repaso li { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.cifras-repaso strong { font-size: 1.3rem; min-width: 2ch; }
.cifras-repaso .naranja { color: #c26a00; }
.btn-peq { padding: 6px 12px; font-size: .88rem; }

/* ---- Fase B: notas en preguntas, etiqueta de repaso y bloc de notas ---- */
.tag-repaso { background: #e8f0ff; color: #234a8a; margin: 0; }
body.noche .tag-repaso { background: #1d2c45; color: #c9dcff; }
.nota-preg { margin-top: 10px; }
.nota-texto { background: #fffbe8; border: 1px solid #ecdca0; border-radius: 8px; padding: 8px 10px; margin: 0 0 4px; white-space: pre-wrap; }
body.noche .nota-texto { background: #2e2a17; border-color: #5c5124; color: #f1e6b8; }
.nota-editor { display: block; font-weight: 700; font-size: .92rem; }
.nota-editor textarea, #bloc-area { display: block; width: 100%; margin-top: 6px; font: inherit; padding: 10px; border: 1px solid #cfdcd8; border-radius: 8px; resize: vertical; box-sizing: border-box; }
.nota-contador { margin: 4px 0; }
.nota-error { color: #9b2c20; font-weight: 700; margin: 4px 0; }
.nota-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.nota-botones .btn { min-height: 40px; }
.bloc-texto { margin: 16px 0 28px; }
#bloc-area { min-height: 280px; }
.bloc-marcas { padding-left: 18px; }
.bloc-marcas li { margin: 6px 0; }
.solo-impresion { display: none; }
.bloc-espejo { white-space: pre-wrap; }
.cabecera-impresion img { height: 48px; width: auto; }
@media print {
  @page { size: A4; margin: 16mm; }
  body, body.noche { background: #fff !important; color: #000 !important; }
  header, footer, #header-priv, #vista-box, .no-imprimir, .nota-preg button, .ventana-fondo { display: none !important; }
  .solo-impresion { display: block !important; }
  span.solo-impresion { display: inline !important; }
  .cabecera-impresion { display: flex !important; gap: 12px; align-items: center; border-bottom: 2px solid #0b6b5c; padding-bottom: 8px; margin-bottom: 12px; }
  .ficha-fallo, .nota-texto { break-inside: avoid; background: #fff !important; color: #000 !important; border-color: #999 !important; }
  .bloc-espejo { font-size: 11pt; line-height: 1.45; }
  a { color: #000; text-decoration: none; }
}

/* ---- Fase C: casilla «Dudosa», «Mis exámenes», gráfico e impresión de exámenes ---- */
.dudosa { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .9rem; color: var(--muted); cursor: pointer; min-height: 32px; }
.dudosa input { width: 18px; height: 18px; }
.cifras-examenes .cifra { font-size: 1.8rem; font-weight: 800; margin: 0; }
.grafico-box { margin: 18px 0; }
.grafico-notas { width: 100%; height: auto; display: block; margin-top: 8px; }
.g-rejilla { stroke: #e3ece9; stroke-width: 1; }
.g-eje { fill: var(--muted); font-size: 14px; }
.g-corte { stroke: #d0891e; stroke-width: 2; stroke-dasharray: 6 5; }
.g-corte-txt { fill: #b06a00; font-size: 14px; font-weight: 700; }
.g-linea { fill: none; stroke: var(--verde); stroke-width: 2.5; }
.g-punto { fill: #c0392b; stroke: #fff; stroke-width: 1.5; }
.g-punto.apto { fill: var(--verde); }
body.noche .g-rejilla { stroke: #2a403c; }
body.noche .g-punto { stroke: #182422; }
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
.tabla-examenes { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.tabla-examenes th, .tabla-examenes td { padding: 8px 6px; border-bottom: 1px solid #e3ece9; text-align: left; vertical-align: middle; }
.tabla-examenes .acciones { white-space: nowrap; }
body.noche .tabla-examenes th, body.noche .tabla-examenes td { border-color: #2a403c; }
.res-apto { color: var(--verde-oscuro); font-weight: 700; }
.res-noapto { color: #9b2c20; font-weight: 700; }
body.noche .res-apto { color: #7fd6bf; }
body.noche .res-noapto { color: #f0a59c; }
.paginacion { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.botones-imprimir { display: flex; gap: 10px; flex-wrap: wrap; }
.cabecera-titulo { margin-left: auto; font-weight: 700; }
.solo-impresion-blanco { display: none; }
.imp-opciones { list-style: none; padding-left: 14px; margin: 4px 0 0; }
.hoja-columnas { display: flex; gap: 24px; align-items: flex-start; }
.hoja-resp { border-collapse: collapse; }
.hoja-resp th, .hoja-resp td { border: 1px solid #555; padding: 3px 8px; text-align: center; font-size: 10pt; }
.hoja-resp .num { font-weight: 700; }
.plantilla { list-style: none; padding: 0; columns: 5; column-gap: 18px; }
.plantilla li { break-inside: avoid; padding: 2px 0; }
@media print {
  #ver-corregido .pregunta { break-inside: avoid; border-color: #999 !important; }
  #ver-corregido .feedback { background: #fff !important; color: #000 !important; border: 1px solid #bbb; }
  #ver-corregido .nota-preg button, .botones-imprimir, .dudosa input { display: none !important; }
  body.imprimir-blanco #ver-corregido { display: none !important; }
  body.imprimir-blanco .solo-impresion-blanco { display: block !important; }
  .imp-pregunta { break-inside: avoid; margin: 0 0 10px; font-size: 10.5pt; }
  .salto-pagina { break-before: page; page-break-before: always; }
}

/* ---- Fase D: temas flojos, avisos de errores en preguntas y «más falladas» ---- */
.aviso-tema-flojo { font-weight: 700; color: #8a4b00; margin: 0 0 8px; }
body.noche .aviso-tema-flojo { color: #ffd8a8; }
.aviso-error { margin-top: 6px; }
.aviso-form { margin-top: 8px; padding: 10px; border: 1px solid #e3ece9; border-radius: 8px; }
.aviso-form label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.aviso-form select, .aviso-form textarea { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 8px; border: 1px solid #cfdcd8; border-radius: 8px; box-sizing: border-box; }
.aviso-enviado { margin: 6px 0 0; }
.mis-avisos { list-style: none; padding: 0; margin: 0; }
.mis-avisos li { padding: 8px 0; border-bottom: 1px solid #eef3f1; }
.estado-aviso { margin: 0; }
.estado-aviso.corregido { background: #e6f4f1; color: var(--verde-oscuro); }
.estado-aviso.descartado { background: #f1f1f1; color: #555; }
.estado-aviso.revisado { background: #e8f0ff; color: #234a8a; }
.respuesta-aviso { margin: 6px 0 0; background: #f3faf7; border-radius: 8px; padding: 6px 10px; }
body.noche .respuesta-aviso { background: #1d2e2a; }
.lista-falladas li { margin: 10px 0; }
@media print { .aviso-error { display: none !important; } }
/* En el móvil, los botones pequeños y los enlaces de nota y aviso también tienen un tamaño cómodo para el dedo. */
@media (max-width: 600px) {
  .btn-peq { min-height: 44px; display: inline-flex; align-items: center; }
  [data-nota-editar], [data-aviso-abrir], .dudosa { min-height: 40px; padding: 6px 0; }
}

/* ---- Guía «Cómo funciona» ---- */
.guia-indice { margin: 20px 0; }
.guia-indice ol { columns: 2; column-gap: 32px; padding-left: 1.4em; }
.guia-indice li { margin: 4px 0; break-inside: avoid; }
.guia-paso { margin: 20px 0; scroll-margin-top: 90px; }
.guia-paso ul { padding-left: 1.2em; }
.guia-paso li { margin: 6px 0; }
.guia-paso h4 { margin: 16px 0 6px; font-size: 1.02rem; }
.guia-faq dt { font-weight: 700; margin-top: 12px; }
.guia-faq dd { margin: 4px 0 0; }
@media (max-width: 600px) { .guia-indice ol { columns: 1; } }

/* Estadísticas (estadisticas.html, solo superusuario) */
.est-titulo { margin-top: 28px; }
.est-periodo { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.est-tarjetas { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.est-cifra strong { display: block; font-size: 2rem; color: var(--verde-oscuro); line-height: 1.2; }
.est-cifra .meta { margin-bottom: 4px; }
.est-grafico { width: 100%; height: auto; display: block; margin-top: 8px; }
.est-l1 { fill: none; stroke: var(--verde); stroke-width: 2.5; }
.est-l2 { fill: none; stroke: var(--dorado); stroke-width: 2; stroke-dasharray: 6 4; }
.est-l1-punto { fill: var(--verde); stroke: #fff; stroke-width: 1.5; }
.est-l2-punto { fill: var(--dorado); stroke: #fff; stroke-width: 1.5; }
.est-leyenda { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-top: 6px; }
.est-m1, .est-m2 { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--verde); }
.est-m2 { border-top: 3px dashed var(--dorado); margin-left: 10px; }
.est-tablas { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin: 16px 0; }
.est-tabla { padding: 18px; }
.tabla-est { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla-est th, .tabla-est td { padding: 7px 6px; border-bottom: 1px solid #e3ece9; text-align: left; vertical-align: top; }
.tabla-est th.num, .tabla-est td.num { text-align: right; white-space: nowrap; width: 1%; }
.est-nombre { display: block; word-break: break-word; }
.est-barra { display: block; height: 4px; border-radius: 2px; background: var(--verde); opacity: .35; margin-top: 4px; min-width: 2px; }
body.noche .est-cifra strong { color: #7fd6bf; }
body.noche .tabla-est th, body.noche .tabla-est td { border-color: #2a403c; }
body.noche .est-l1-punto, body.noche .est-l2-punto { stroke: #182422; }
@media (max-width: 520px) {
  .est-tablas { grid-template-columns: 1fr; }
  .est-cifra { padding: 14px 16px; }
  .est-cifra strong { font-size: 1.5rem; }
}

/* ---- Juegos (juegos.html) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.juegos-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 8px 0 24px; }
.juego-card { display: flex; flex-direction: column; }
.juego-card p:last-child { margin-top: auto; padding-top: 8px; }
.juego-icono { font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
.juego-pronto { opacity: .78; }
.juego-pronto h3 { color: var(--muted); }
.btn-grande { min-height: 48px; padding: 12px 20px; font-size: 1.02rem; }
.botones-juego { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.ambito-form fieldset { border: 1px solid #d5e4e0; border-radius: 12px; padding: 12px 16px 16px; background: var(--blanco); }
.ambito-form legend { font-weight: 700; padding: 0 6px; }
.ambito-op { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed #e4ece9; font-weight: 600; }
.ambito-op input[type="radio"] { width: 22px; height: 22px; accent-color: var(--verde); }
.ambito-op select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #cfe0db; max-width: 100%; flex: 1 1 260px; }
.amb-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; padding: 8px 0 0 30px; }
.amb-tema { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #d5e4e0; border-radius: 10px; cursor: pointer; min-height: 44px; }
.amb-tema input { width: 20px; height: 20px; accent-color: var(--verde); }
.amb-problema { color: #9b2c20; font-weight: 700; }
.jp { background: var(--blanco); border: 1px solid #e4ece9; border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); }
.jp-enunciado { font-size: 1.12rem; line-height: 1.45; margin: 4px 0 14px; }
.jp-enunciado:focus { outline: none; }
.jp-enunciado:focus-visible { outline: 3px solid var(--dorado); outline-offset: 4px; }
.jp-tema { margin-bottom: 4px; }
.jp-opciones { display: grid; gap: 10px; }
.jp-opcion {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 52px; padding: 12px 14px; text-align: left;
  font: inherit; color: var(--texto); background: var(--blanco); border: 2px solid #cfe0db; border-radius: 12px; cursor: pointer;
}
.jp-opcion:hover:not(:disabled) { background: var(--verde-claro); border-color: var(--verde); }
.jp-opcion:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }
.jp-opcion:disabled { cursor: default; opacity: 1; }
.jp-letra { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--verde-claro); color: var(--verde-oscuro); font-weight: 800; }
.jp-txt { flex: 1 1 auto; padding-top: 3px; }
.jp-marca { flex: 0 0 auto; font-weight: 800; padding-top: 3px; white-space: nowrap; }
.jp-opcion.jp-bien { border-color: #0b6b5c; background: #e6f4f1; color: #084c42; }
.jp-opcion.jp-mal { border-color: #b03a2e; background: #fdecec; color: #7a2e2e; border-style: dashed; }
.jp-teclas { margin: 10px 0 0; }
@media (hover: none) and (pointer: coarse) { .jp-teclas { display: none; } }
.jp-feedback:empty { display: none; }
.jp-feedback { margin-top: 12px; padding: 12px 14px; border-radius: 10px; }
.cr-barra { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.cr-tiempo { font-size: 1.15rem; }
.cr-reloj { height: 10px; border-radius: 999px; background: #e4ece9; overflow: hidden; margin-bottom: 12px; }
.cr-reloj-relleno { height: 100%; width: 100%; background: var(--verde); transition: width .2s linear; }
.cr-reloj.urgente .cr-reloj-relleno { background: #b03a2e; }
.jq-panel, .jp, [data-siguiente], [data-seguir] { scroll-margin-top: 150px; scroll-margin-bottom: 24px; }
.jq-zona { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .jq-zona { grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); } }
.jq-tablero-box { width: min(100%, 420px); margin-inline: auto; padding: 12px; }
.tablero { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.casilla {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: #fff; font-weight: 800; font-size: clamp(.6rem, 2.6vw, .82rem); line-height: 1; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
@media (min-width: 900px) { .casilla { font-size: .8rem; } }
.casilla-salida { background: #1c2b2a; }
.casilla-quesito { border-radius: 50%; }
.casilla-quesito.conseguido { opacity: .55; }
.casilla.destino { outline: 3px solid var(--dorado); outline-offset: 2px; z-index: 2; }
.casilla.aqui { outline: 3px solid #1c2b2a; outline-offset: 2px; z-index: 3; }
.casilla .ficha { position: absolute; top: -70%; left: 50%; transform: translateX(-50%); font-size: 1.1rem; }
.tablero-centro { position: absolute; left: 50%; top: 50%; width: 56%; height: 56%; transform: translate(-50%, -50%); }
.quesera { display: block; width: 100%; height: 100%; }
.jq-donde { text-align: center; margin-top: 8px; }
.jq-mensaje { font-size: 1.08rem; margin: 6px 0 4px; }
.jq-destinos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 10px; }
.jq-destino { flex-direction: column; text-align: center; line-height: 1.3; }
.jq-destino small { font-weight: 600; font-size: .85rem; }
.jq-grupo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding-left: 8px; border-left: 6px solid; font-weight: 600; }
.jq-extra { display: inline-block; font-weight: 800; margin-bottom: 8px; }
.muestra-color { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 6px; color: #fff; font-weight: 800; font-size: .8rem; }
.jq-leyenda { margin: 16px 0; }
.jq-leyenda summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.leyenda-grupos { list-style: none; display: grid; gap: 6px; }
.leyenda-grupos .tengo { color: var(--verde); }
.jr-resumen { background: var(--verde-claro); border-radius: var(--radio); padding: 18px; margin: 8px 0 4px; }
.jr-resumen:focus { outline: none; }
.jr-titular { font-size: 1.4rem; font-weight: 800; color: var(--verde-oscuro); }
.jr-record { font-size: 1.15rem; font-weight: 800; color: #7a5b12; margin-top: 6px; }
.jr-tuya { color: #7a2e2e; font-weight: 600; margin: 4px 0; }
body.noche .jp, body.noche .ambito-form fieldset, body.noche .jp-opcion { border-color: #2a403c; }
body.noche .jp-opcion.jp-bien { background: #12352f; color: #c8efe7; border-color: #7ad4c4; }
body.noche .jp-opcion.jp-mal { background: #3a1d1b; color: #ffd0cb; border-color: #e07a70; }
body.noche .jr-tuya { color: #ffb4ab; }
body.noche .jr-record { color: #f3d48a; }
body.noche .amb-problema { color: #ffb4ab; }
body.noche .casilla.aqui { outline-color: #e8f2f0; }
@media (max-width: 520px) {
  .jp { padding: 12px; }
  .botones-juego .btn { flex: 1 1 100%; }
  .amb-temas { padding-left: 0; }
}

/* ---- Juegos del glosario: rueda, ahorcado y crucigrama ---- */
.ru-zona, .ah-zona, .cg-zona { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .ru-zona { grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); }
  .ah-zona { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
  .cg-zona { grid-template-columns: auto minmax(260px, 1fr); }
}
.ru-rosco-box { width: min(100%, 380px); margin-inline: auto; padding: 10px; }
@media (max-width: 899px) {
  .ru-zona .ru-panel { order: -1; }
  .ru-rosco-box { width: min(100%, 250px); padding: 6px; }
  .rosco-letra { font-size: .62rem; border-width: 1px; }
  .rosco-tiempo { font-size: 1.5rem; }
}
.rosco { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.rosco-letra {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #2c5282; color: #fff; font-weight: 800; font-size: clamp(.7rem, 3vw, .95rem); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.rosco-letra.r-bien { background: #276749; }
.rosco-letra.r-mal { background: #9b2c20; }
.rosco-letra.r-pasada { background: #975a16; }
.rosco-letra.actual { outline: 3px solid var(--dorado); outline-offset: 2px; transform: translate(-50%, -50%) scale(1.18); z-index: 2; }
.rosco-sim { position: absolute; right: -6px; bottom: -6px; background: #fff; color: #1c2b2a; border-radius: 50%; width: 16px; height: 16px; font-size: .65rem; display: flex; align-items: center; justify-content: center; border: 1px solid #cfe0db; }
.rosco-centro { position: absolute; inset: 22%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--blanco); border-radius: 50%; border: 1px solid #cfe0db; }
.rosco-tiempo { font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 800; color: var(--verde-oscuro); font-variant-numeric: tabular-nums; }
.rosco-tiempo.urgente { color: #9b2c20; }
.rosco-cuenta { font-weight: 700; color: var(--muted); }
.ru-letra { font-size: 1.15rem; margin-bottom: 6px; }
.ru-l { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 1.3rem; }
.ru-reloj { float: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.ru-reloj .urgente { color: #9b2c20; }
.ru-ultimo:empty { display: none; }
.ru-ultimo { padding: 8px 12px; border-radius: 10px; background: var(--verde-claro); margin-bottom: 10px; }
.ru-form input { width: 100%; font: inherit; font-size: 1.1rem; padding: 12px 14px; border-radius: 12px; border: 2px solid #cfe0db; min-height: 52px; background: var(--blanco); color: var(--texto); }
.ru-form input:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }
.ah-dibujo-box { text-align: center; }
.ah-dibujo { width: min(100%, 200px); height: auto; }
.ah-horca, .ah-cuerpo line, .ah-cuerpo circle { fill: none; stroke: var(--texto); stroke-width: 3; stroke-linecap: round; }
.ah-fallos { margin-top: 6px; }
@media (max-width: 899px) {
  .ah-dibujo-box { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: left; }
  .ah-dibujo { width: 96px; }
  .ah-palabra { gap: 4px 14px; }
  .ah-grupo { gap: 4px; }
  .ah-palabra .ah-hueco { width: min(26px, calc((100vw - 96px) / var(--n, 10) - 4px)); height: 34px; font-size: min(1.25rem, calc((100vw - 96px) / var(--n, 10) - 6px)); }
  .ah-fila { gap: 4px; }
  .ah-tecla { min-height: 44px; font-size: 1rem; }
}
.ah-palabra { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 16px; }
.ah-grupo { display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.ah-hueco { display: inline-flex; align-items: flex-end; justify-content: center; width: 30px; height: 40px; border-bottom: 3px solid var(--texto); font-size: 1.5rem; font-weight: 800; }
.ah-revelada { color: #9b2c20; }
/* Medallas, racha y ranking (juegos.html) */
.juegos-estado { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 6px; font-size: 1.02rem; }
.medallas-box { margin: 0 0 14px; }
.medallas-box summary { cursor: pointer; font-weight: 700; color: var(--verde); min-height: 44px; display: flex; align-items: center; }
.medallas { list-style: none; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 6px; }
.medalla { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid #d5e4e0; border-radius: 10px; background: var(--blanco); opacity: .75; }
.medalla.conseguida { opacity: 1; border-color: var(--dorado); background: #fffaf0; }
.medalla-icono { font-size: 1.5rem; line-height: 1; }
.jr-medallas { background: #fffaf0; border: 1px solid var(--dorado); border-radius: 12px; padding: 10px 14px; margin: 12px 0; display: grid; gap: 4px; }
.ranking-box { margin: 8px 0 20px; }
.ranking-box h3 { margin-bottom: 8px; }
.rk-acepto { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; cursor: pointer; }
.rk-acepto input { width: 22px; height: 22px; accent-color: var(--verde); }
.rk-alta { display: grid; gap: 8px; margin: 6px 0 12px; max-width: 560px; }
.rk-alta label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; }
.rk-alta input[type="text"] { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #cfe0db; flex: 1 1 200px; min-height: 44px; }
.rk-alta button { justify-self: start; }
.rk-filtros { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 10px 0; }
.rk-filtros select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #cfe0db; min-height: 44px; margin-left: 6px; }
.rk-periodo { display: inline-flex; gap: 6px; }
.rk-lista { list-style: none; display: grid; gap: 4px; margin: 6px 0 10px; max-width: 560px; }
.rk-lista li { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: var(--fondo); }
.rk-lista li.rk-yo { background: var(--verde-claro); font-weight: 700; }
.rk-pos { min-width: 2.6em; font-weight: 800; }
.rk-apodo { flex: 1; overflow-wrap: anywhere; }
.rk-marca { color: var(--muted); font-size: .92rem; text-align: right; }
.rk-mia { font-size: 1.02rem; }
/* Juegos de la muestra (muestra.html) */
.muestra-juegos { margin: 28px 0 8px; padding-top: 18px; border-top: 2px solid #d5e4e0; }
.muestra-juegos-tit { font-size: 1.3rem; margin-bottom: 4px; }
.aviso-muestra { margin: 14px 0; }
.aviso-muestra a { font-weight: 700; }
body.noche .medalla, body.noche .rk-lista li { background: #182422; border-color: #2a403c; }
body.noche .medalla.conseguida, body.noche .jr-medallas { background: #2b2614; }
body.noche .rk-lista li.rk-yo { background: #12352f; }
.ah-teclado { display: grid; gap: 6px; }
.ah-fila { display: flex; gap: 6px; justify-content: center; }
.ah-tecla { flex: 1 1 0; max-width: 46px; min-height: 48px; border-radius: 8px; border: 2px solid #cfe0db; background: var(--blanco); color: var(--texto); font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; padding: 0; }
.ah-tecla:hover:not(:disabled) { background: var(--verde-claro); border-color: var(--verde); }
.ah-tecla:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }
.ah-tecla:disabled { cursor: default; }
.ah-tecla.ah-si { background: #e6f4f1; border-color: #0b6b5c; color: #084c42; }
.ah-tecla.ah-si::after { content: "✓"; font-size: .6rem; vertical-align: super; }
.ah-tecla.ah-no { background: #f1f1f1; border-color: #c9c9c9; color: #8a8a8a; text-decoration: line-through; }
.cruci { --celda: min(36px, calc((min(100vw, 1120px) - 48px) / var(--cols))); display: grid; grid-template-columns: repeat(var(--cols), var(--celda)); grid-auto-rows: var(--celda); gap: 0; width: max-content; margin-inline: auto; border: 2px solid #1c2b2a; background: #1c2b2a; }
.cc { position: relative; background: #fff; border: 1px solid #9fb3ae; }
.cc-negra { background: #1c2b2a; border-color: #1c2b2a; }
.cc-num { position: absolute; top: 0; left: 2px; font-size: .55rem; font-weight: 700; color: #1c2b2a; line-height: 1; pointer-events: none; }
.cc-in { width: 100%; height: 100%; border: 0; padding: 0; text-align: center; font: inherit; font-size: 16px; font-weight: 800; text-transform: uppercase; background: transparent; color: #1c2b2a; caret-color: #0b6b5c; }
.cc-in:focus { outline: 3px solid var(--dorado); outline-offset: -3px; }
.cc.activa { background: #e6f4f1; }
.cc.mal { background: #fdecec; outline: 2px dashed #9b2c20; outline-offset: -4px; }
.cc.pista { background: #fff3d4; }
.cc-sol { display: flex; align-items: center; justify-content: center; }
.cc-letra { font-weight: 800; }
.cg-botones { justify-content: center; }
.cg-actual { background: var(--verde-claro); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; min-height: 3.2em; max-width: 520px; margin-inline: auto; }
.cg-estado:empty { display: none; }
.cg-estado { text-align: center; font-weight: 700; }
.cg-lista { list-style: none; display: grid; gap: 4px; margin-bottom: 14px; }
.cg-pista { display: block; width: 100%; text-align: left; font: inherit; color: var(--texto); background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.cg-pista:hover, .cg-pista.activa { background: var(--verde-claro); border-color: #cfe0db; }
.cg-solucion { margin: 16px 0; }
.cg-solucion summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.cg-lista-sol { list-style: none; margin-top: 10px; display: grid; gap: 4px; }
body.noche .rosco-centro, body.noche .ah-tecla { background: #182422; border-color: #2a403c; color: #e8f2f0; }
body.noche .ah-tecla.ah-si { background: #12352f; color: #c8efe7; }
body.noche .ah-tecla.ah-no { background: #101918; color: #6f8582; }
body.noche .ru-form input { border-color: #2a403c; }

/* ---- Contenido de juegos (administración) ---- */
.tabla-scroll { overflow-x: auto; }
.cj-resumen { margin: 12px 0 24px; font-size: .92rem; }
.cj-resumen caption { text-align: left; padding-bottom: 6px; }
.cj-si { color: #276749; font-weight: 700; }
.cj-no { color: var(--muted); }
.cj-filtros { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 12px 0; }
.cj-filtros label { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; gap: 4px; }
.cj-filtros select, .cj-filtros input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #cfe0db; min-height: 40px; }
.cj-cuenta { margin: 8px 0; }
.cj-ficha .cj-termino { font-size: 1.08rem; margin: 4px 0; }
.cj-ficha .cj-def { margin: 4px 0 8px; }
.cj-fuente { border-left: 4px solid #cfe0db; padding: 6px 10px; margin: 6px 0 10px; color: var(--muted); font-size: .92rem; }
.cj-avisos { list-style: none; color: #8a4b00; font-size: .9rem; margin: 4px 0; }
.cj-avisos li.cj-filtro { color: #1f3f74; background: #eef3fb; border-left: 4px solid #2b5797; padding: 4px 8px; margin: 2px 0; }
body.noche .cj-avisos li.cj-filtro { color: #d6e4ff; background: #1c2a40; }
.cj-chk { font-weight: 700; }
.cj-revisado { border-left: 6px solid #276749; }
.cj-descartado { opacity: .7; border-left: 6px solid #9b2c20; }
.cj-editor { max-width: 760px; }
.cj-editor textarea, .cj-editor input { width: 100%; }

/* ---- Juegos de la fase C: Completa la ley, Parejas, Ordénalo (y fichas de datos del repaso) ---- */
.ley-zona, .pj-zona, .ord-zona { background: var(--blanco); border: 1px solid #e4ece9; border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); }
.ley-norma { margin: 0 0 8px; }
.ley-texto { font-size: 1.08rem; line-height: 1.9; margin: 0 0 14px; }
.ley-texto:focus { outline: none; }
.ley-texto:focus-visible { outline: 3px solid var(--dorado); outline-offset: 4px; }
.ley-hueco { display: inline; padding: 2px 6px; border-radius: 6px; border-bottom: 2px solid var(--verde); background: var(--verde-claro); color: var(--verde-oscuro); font-weight: 700; white-space: normal; }
.ley-hueco.vacio { background: #fff7e0; border-bottom: 2px dashed #9a6b00; color: #6b4a00; }
.ley-hueco.bien { background: #e6f4f1; border-bottom-color: #0b6b5c; }
.ley-hueco.mal { background: #fdecec; border-bottom: 2px dashed #b03a2e; color: #7a2e2e; }
.ley-hueco s { font-weight: 400; }
.ley-num { display: inline-block; min-width: 1.4em; margin-right: 4px; padding: 0 4px; border-radius: 999px; background: var(--verde-oscuro); color: #fff; font-size: .78rem; text-align: center; line-height: 1.5; vertical-align: 2px; }
.ley-marca { margin-right: 4px; }
.ley-huecos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ley-op { border: 1px solid #e4ece9; border-radius: 12px; padding: 8px 12px 12px; margin: 0; }
.ley-op legend { font-weight: 800; padding: 0 4px; }
.ley-opcion { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; margin-top: 8px; border: 2px solid #cfe0db; border-radius: 10px; cursor: pointer; }
.ley-opcion:hover { background: var(--verde-claro); border-color: var(--verde); }
.ley-opcion input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--verde); }
.ley-opcion:has(input:checked) { border-color: var(--verde); background: var(--verde-claro); font-weight: 700; }
.ley-opcion:has(input:focus-visible) { outline: 3px solid var(--dorado); outline-offset: 2px; }
.ley-opcion.ley-ok { border-color: #0b6b5c; background: #e6f4f1; color: #084c42; }
.ley-opcion.ley-ko { border-color: #b03a2e; background: #fdecec; color: #7a2e2e; border-style: dashed; }
.ley-etq { margin-left: auto; font-weight: 800; white-space: nowrap; font-size: .9rem; }
.pj-titulo { margin: 0 0 4px; font-size: 1.05rem; }
.pj-titulo:focus { outline: none; }
.pj-ayuda { margin: 0 0 12px; }
.pj-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pj-col { display: grid; gap: 8px; align-content: start; }
.pj-cab { margin: 0; font-weight: 800; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; }
.pj-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 10px 12px; text-align: left; font: inherit; color: var(--texto);
  background: var(--blanco); border: 2px solid #cfe0db; border-radius: 12px; cursor: pointer; overflow-wrap: anywhere; }
.pj-btn:hover:not(:disabled) { background: var(--verde-claro); border-color: var(--verde); }
.pj-btn:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }
.pj-btn.pj-sel { border-color: var(--verde-oscuro); background: #d3ece6; box-shadow: inset 0 0 0 2px var(--verde-oscuro); font-weight: 700; }
.pj-btn.pj-sel::before { content: "▶"; font-size: .8rem; }
.pj-btn.pj-hecho { cursor: default; background: #e6f4f1; border-color: #0b6b5c; color: #084c42; }
.pj-btn.pj-hecho.pj-tarde { background: #fff7e0; border-color: #9a6b00; color: #5b4100; }
.pj-btn.pj-sin { cursor: default; opacity: .75; border-style: dashed; }
.pj-par { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--verde-oscuro); color: #fff; font-weight: 800; font-size: .85rem; }
.pj-tarde .pj-par { background: #9a6b00; }
.dato-parejas, .dato-pasos { margin: 8px 0 4px 20px; }
.dato-parejas li, .dato-pasos li { margin: 3px 0; }
.ord-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ord-item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 8px 6px 4px; background: var(--blanco); border: 2px solid #cfe0db; border-radius: 12px; user-select: none; -webkit-user-select: none; }
.ord-item.arrastrando { border-color: var(--verde-oscuro); box-shadow: 0 8px 20px rgba(8, 76, 66, .25); background: #f0f8f6; position: relative; z-index: 2; }
.ord-asa { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 44px; font-size: 1.4rem; color: var(--muted); cursor: grab; touch-action: none; border-radius: 8px; }
.ord-asa:active { cursor: grabbing; background: var(--verde-claro); }
@media (pointer: fine) { .ord-item:not(.ord-bien):not(.ord-mal) { cursor: grab; } }
.ord-num { flex: 0 0 auto; min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--verde-claro); color: var(--verde-oscuro); font-weight: 800; }
.ord-txt { flex: 1 1 auto; overflow-wrap: anywhere; }
.ord-botones { flex: 0 0 auto; display: flex; gap: 6px; }
.ord-mover { width: 44px; height: 44px; border-radius: 10px; border: 2px solid #cfe0db; background: var(--blanco); color: var(--texto); font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; }
.ord-mover:hover:not(:disabled) { background: var(--verde-claro); border-color: var(--verde); }
.ord-mover:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }
.ord-mover:disabled { opacity: .35; cursor: default; }
.ord-item.ord-bien { border-color: #0b6b5c; background: #e6f4f1; color: #084c42; }
.ord-item.ord-mal { border-color: #b03a2e; background: #fdecec; color: #7a2e2e; border-style: dashed; }
.ord-marca { flex: 0 0 auto; width: 28px; text-align: center; font-weight: 800; font-size: 1.1rem; }
@media (max-width: 520px) {
  .pj-cols { gap: 6px; }
  .pj-btn { padding: 8px; font-size: .92rem; min-height: 48px; }
  .ley-texto { font-size: 1rem; }
  .ord-botones { flex-direction: column; gap: 4px; }
  .ord-mover { width: 40px; height: 40px; }
  .ord-asa { width: 30px; }
  .ord-item { gap: 6px; }
}
.cj-literal { line-height: 1.7; }
.cj-hueco { background: #fff1b8; padding: 0 3px; border-radius: 4px; font-weight: 700; }
.cj-hueco sup { color: var(--muted); margin-right: 2px; }
.cj-opciones { margin: 4px 0 8px 18px; font-size: .92rem; }
.cj-parejas { margin: 6px 0 10px; font-size: .92rem; }
.cj-pasos { margin: 6px 0 10px 22px; }
body.noche .ley-zona, body.noche .pj-zona, body.noche .ord-zona, body.noche .ley-op { border-color: #2a403c; }
body.noche .ley-opcion, body.noche .pj-btn, body.noche .ord-item, body.noche .ord-mover { background: #182422; border-color: #2a403c; color: #e8f2f0; }
body.noche .ley-hueco { background: #12352f; color: #c8efe7; }
body.noche .ley-hueco.vacio { background: #3a2f12; color: #ffe2a0; }
body.noche .ley-hueco.mal, body.noche .ley-opcion.ley-ko, body.noche .ord-item.ord-mal { background: #3a1d1b; color: #ffd0cb; border-color: #e07a70; }
body.noche .ley-hueco.bien, body.noche .ley-opcion.ley-ok, body.noche .pj-btn.pj-hecho, body.noche .ord-item.ord-bien { background: #12352f; color: #c8efe7; border-color: #7ad4c4; }
body.noche .pj-btn.pj-sel, body.noche .ley-opcion:has(input:checked) { background: #1d4a42; border-color: #7ad4c4; }
body.noche .pj-btn.pj-hecho.pj-tarde { background: #3a2f12; color: #ffe2a0; border-color: #d9a640; }
body.noche .ord-item.arrastrando { background: #1d4a42; }
body.noche .cj-hueco { background: #4a3f12; color: #ffe2a0; }

/* Aviso a los superusuarios: avisos de errores en preguntas sin revisar */
.insignia-super {
  display: inline-block; min-width: 1.4em; padding: 1px 6px; margin-left: 4px;
  border-radius: 999px; background: #c0392b; color: #fff;
  font-size: .75rem; font-weight: 800; line-height: 1.4; text-align: center; vertical-align: 1px;
}
.insignia-super[hidden], .franja-super[hidden] { display: none; }
.franja-super { background: #fdecea; border-top: 1px solid #f3c2bc; color: #7a1f16; font-weight: 600; font-size: .92rem; }
.franja-super .wrap { padding: 8px 0; }
.franja-super a { color: #a3271b; text-decoration: underline; font-weight: 700; }
body.noche .franja-super { background: #4a1f1b; border-top-color: #6e2c25; color: #ffd9d4; }
body.noche .franja-super a { color: #ffb3a8; }
/* Al saltar a un apartado de la administración, que la cabecera fija no tape el título */
#avisos-pregunta, #valoraciones { scroll-margin-top: 170px; }
