/* Actividad «La mujer en el mundo»: estilos propios (copiados de design-ejemplos/actividad-mapa-boceto.html, con las rutas de las imágenes desde la raíz).
   Esta actividad lleva todos sus estilos aquí (no usa actividad.css). Lo común de las subpáginas (espirales del fondo, logo, firma) está en subpagina.css. */
:root {
  --negro: #101010; --blanco: #F5F5F0; --morado: #6B2D8C; --oro: #C9A24B; --oro-claro: #E8CE86; --rosa: #C2386E; --violeta: #8a4cc2;
  --fondo: #101010; --panel: #17121f; --linea: rgba(201, 162, 75, .35); --suave: #b9b1c9;
  --tierra: #3a3050; --tierra-borde: rgba(185, 177, 201, .4);
  --fuente-titulos: "Cinzel Decorative", Georgia, serif; --fuente-nombres: "Cinzel", Georgia, serif;
  --fuente-texto: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--fondo); color: var(--blanco); font-family: var(--fuente-texto); font-size: 1rem; line-height: 1.5; }
/* Foco con teclado: brillo dorado detrás, no un cuadrado. drop-shadow sigue la forma real (también en botones con borde de imagen y en SVG).
   Los campos de texto y los contenedores con scroll llevan un brillo normal (box-shadow), para no iluminar todo su contenido. */
html :focus-visible { outline: none; }
html :focus-visible:not([tabindex="-1"]) { filter: drop-shadow(0 0 5px rgba(232, 206, 134, .95)) drop-shadow(0 0 12px rgba(201, 162, 75, .75)); }
html input:focus-visible, html select:focus-visible, html textarea:focus-visible, html [tabindex="0"]:not(a):not(button):not(summary):not(svg):not(g):not(path):focus-visible { filter: none; box-shadow: 0 0 12px 3px rgba(232, 206, 134, .7); }
a { color: var(--oro-claro); }
[hidden] { display: none !important; }
.envoltorio { width: min(1700px, 100% - 32px); margin-inline: auto; }   /* más ancho que otras actividades: el mapa gana sitio y caben más nombres */
header.cab { padding: 18px 0 4px; }
.logo { display: block; width: fit-content; font-family: var(--fuente-titulos); font-weight: 700; font-size: 1.4rem; color: var(--blanco); text-decoration: none; }
h1 { display: inline-block; margin: 22px 0 8px; padding: .25em .7em; background: var(--morado); color: var(--blanco); transform: rotate(-1.2deg); box-shadow: 5px 5px 0 var(--blanco);
  font-family: var(--fuente-titulos); font-weight: 700; font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1.25; }
.sub { max-width: 62ch; color: #e6e0f0; margin: 6px 0 0; }
.ref-enlace a { color: var(--oro-claro); }
main { padding-bottom: 36px; }
h2 { font-family: var(--fuente-nombres); font-weight: 700; font-size: 1.25rem; margin: 0 0 12px; color: var(--oro-claro); }

/* ---------- controles: pastillas redondeadas de oro y plata, como el botón «Parar efectos» ---------- */
.controles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 22px 0 14px; }
.controles .rotulo { font-family: var(--fuente-nombres); font-weight: 700; font-size: .95rem; color: var(--oro-claro); margin-right: 4px; }
.chip, .zoom-flot button, .btn-efectos { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 14px; font: inherit; font-size: .9rem; font-weight: 700; color: var(--blanco);
  background: rgba(23, 18, 31, .85); border: 1px solid rgba(185, 177, 201, .5); border-radius: 99px; cursor: pointer; touch-action: manipulation; }
.chip:hover, .zoom-flot button:hover, .btn-efectos:hover { border-color: var(--oro-claro); color: var(--oro-claro); }
.chip[aria-pressed="true"] { background: var(--oro); border-color: var(--oro-claro); color: #2b1805; box-shadow: 0 0 12px 3px rgba(232, 206, 134, .65); }
.btn-info { position: absolute; right: 14px; top: 84px; z-index: 3; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 2px solid rgba(185, 177, 201, .55); background: rgba(23, 18, 31, .9); color: var(--oro-claro); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.btn-info:hover { border-color: var(--oro-claro); }
/* ventana «Cómo funciona»: misma caja con la corona de rosas que en las demás actividades */
dialog.intro { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 20px); overflow-y: auto; padding: 22px 30px; color: var(--blanco); border: 2px solid rgba(185, 177, 201, .55); border-radius: 18px;
  background: linear-gradient(180deg, #1b1426, #120d1a); box-shadow: inset 0 0 0 5px #120d1a, inset 0 0 0 6px rgba(185, 177, 201, .25), 0 20px 60px rgba(0, 0, 0, .7); }
dialog.intro::backdrop { background: rgba(0, 0, 0, .75); }
dialog.intro[open] { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "corona titulo" "corona texto" "boton boton"; gap: 2px 32px; align-items: center; }
dialog.intro .corona { grid-area: corona; width: clamp(110px, 24vw, 190px); height: auto; display: block; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }
dialog.intro h2 { grid-area: titulo; align-self: end; margin: 0; font-family: var(--fuente-nombres); font-weight: 700; font-size: clamp(1.35rem, 4vw, 1.6rem); color: var(--oro-claro); }
dialog.intro h2::after { content: ""; display: block; height: 26px; width: min(220px, 70%); background: url("/img/opt/adorno-dorado-2.webp") left center / contain no-repeat; }
dialog.intro .texto-intro { grid-area: texto; align-self: start; }
dialog.intro p { margin: 0; font-size: clamp(1rem, 3.3vw, 1.15rem); line-height: 1.45; }
dialog.intro .btn { grid-area: boton; justify-self: center; margin-top: 12px; }
@media (max-width: 560px) {
  dialog.intro[open] { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "titulo" "corona" "texto" "boton"; justify-items: center; text-align: center; }
  dialog.intro .corona { width: 130px; } dialog.intro h2 { align-self: auto; } dialog.intro h2::after { margin-inline: auto; background-position: center; width: min(220px, 100%); }
}
.zoom-flot { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.zoom-flot button { min-width: 40px; padding: 6px 12px; font-size: 1.15rem; line-height: 1; background: rgba(23, 18, 31, .9); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.buscador { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.buscador select { min-width: 0; }   /* si el rótulo es más largo (p. ej. «Escoller tema:» en gallego), el desplegable encoge y no se sale de la pantalla */
.buscador select { min-height: 40px; max-width: 220px; padding: 6px 12px; font: inherit; font-size: .9rem; color: var(--blanco); background: rgba(23, 18, 31, .85); border: 1px solid rgba(185, 177, 201, .5); border-radius: 99px; }
/* flecha del selector propia y separada del borde redondeado (la del navegador queda pegada al filo) */
.buscador select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F5F5F0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 12px 8px; }

/* ---------- el mapa, en el marco de rosas de las otras actividades ---------- */
.tablero { position: relative; padding: 14px; border: 2px solid rgba(185, 177, 201, .5); border-radius: 20px; background: var(--panel); }
.tablero::before { content: ""; position: absolute; inset: -14px; pointer-events: none; z-index: 2; --esq: clamp(96px, 20vw, 136px);
  background: url("/img/opt/esquina-rosas-tl.webp") left top / var(--esq) auto no-repeat, url("/img/opt/esquina-rosas-tr.webp") right top / var(--esq) auto no-repeat,
              url("/img/opt/esquina-rosas-bl.webp") left bottom / var(--esq) auto no-repeat, url("/img/opt/esquina-rosas-br.webp") right bottom / var(--esq) auto no-repeat;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); }
.mapa-caja { position: relative; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #1d1530 0%, #120d1d 100%); touch-action: none; cursor: grab; }
.mapa-caja.arrastrando { cursor: grabbing; }
#mapa { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.pais { fill: var(--tierra); stroke: var(--tierra-borde); stroke-width: .7; vector-effect: non-scaling-stroke; fill-rule: evenodd; transition: fill .2s; cursor: pointer; }
.pais:hover { fill: #4d4268; }
.pais.sel { stroke: var(--oro-claro); stroke-width: 2.2; filter: drop-shadow(0 0 4px rgba(232, 206, 134, .95)); }
.etiqueta { fill: var(--blanco); font-family: var(--fuente-texto); font-weight: 700; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: rgba(16, 16, 16, .78); stroke-linejoin: round; pointer-events: none; }
/* panel del tema: el juego a la izquierda y la leyenda (con interruptores) a la derecha */
.panel-tema { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 430px); gap: 18px; align-items: start; margin: 0 0 16px; }
.panel-tema .juego { margin: 0; max-width: none; }
/* KAN-2 2.2: leyenda más pequeña y sin título visible (se entiende sola); el título queda para los lectores de pantalla */
.leyenda-caja { padding: 8px 10px; border: 1px solid rgba(185, 177, 201, .5); border-radius: 14px; background: var(--panel); }
.leyenda-cab { display: none; }
.leyenda-caja h3 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leyenda { display: grid; gap: 6px; font-size: .9rem; color: var(--blanco); }
.ico-cat { display: inline-block; margin-right: .4em; font-size: 1.75em; line-height: 1; vertical-align: -.14em; }   /* emoticono de la categoría, en grande para que se distinga */
.ley-fila { display: flex; align-items: center; gap: 8px; }   /* «No hay datos» y el interruptor general, en la misma fila */
.ley-fila .ley-item { flex: 1; min-height: 32px; padding: 3px 10px 3px 8px; font-size: .85rem; }
.leyenda .vacia { margin: 0; color: var(--suave); font-size: .92rem; }
/* cada categoría es un interruptor: se enciende (color) o se apaga (sin color) */
.ley-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 4px 12px 4px 8px; font: inherit; font-size: .9rem; text-align: left; color: var(--blanco); background: rgba(245, 245, 240, .05); border: 1px solid rgba(185, 177, 201, .45); border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.ley-item:hover { border-color: var(--oro-claro); }
.ley-item .sw { position: relative; flex: none; width: 38px; height: 20px; border-radius: 99px; background: var(--c, #555); border: 1px solid rgba(245, 245, 240, .55); transition: background .2s; }
.ley-item .sw::after { content: ""; position: absolute; top: 2px; left: 19px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transition: left .2s; }
.ley-item[aria-checked="false"] { color: var(--suave); }
.ley-item[aria-checked="false"] .sw { background: transparent; }
.ley-item[aria-checked="false"] .sw::after { left: 2px; background: rgba(245, 245, 240, .6); }
body.sin-efectos .ley-item .sw, body.sin-efectos .ley-item .sw::after { transition: none; }
/* interruptor general (lila), arriba a la derecha: enciende o apaga todos los colores; a medias si solo algunos están encendidos */
.ley-general { display: inline-flex; align-items: center; flex: none; padding: 6px 2px; background: none; border: 0; border-radius: 99px; cursor: pointer; touch-action: manipulation; }
.ley-general .sw { position: relative; flex: none; width: 44px; height: 24px; border-radius: 99px; background: #a678e0; border: 1px solid #d8c3f5; transition: background .2s; }
.ley-general .sw::after { content: ""; position: absolute; top: 3px; left: 23px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transition: left .2s; }
.ley-general[aria-checked="false"] .sw { background: transparent; }
.ley-general[aria-checked="false"] .sw::after { left: 3px; background: rgba(245, 245, 240, .6); }
.ley-general[aria-checked="mixed"] .sw { background: rgba(166, 120, 224, .45); }
.ley-general[aria-checked="mixed"] .sw::after { left: 13px; }
body.sin-efectos .ley-general .sw, body.sin-efectos .ley-general .sw::after { transition: none; }
/* países pintados según el tema (el color va en línea, desde los datos) */
.pais.tema { fill-opacity: .94; }
/* juego: los países por adivinar se iluminan en azul (el azul no se parece a ninguno de los tres colores finales) */
.pais.pista { stroke: #cfe0ff; stroke-width: 1.6; animation: pulsa 1.8s ease-in-out infinite; }
@keyframes pulsa { 50% { fill-opacity: .68; } }
body.sin-efectos .pais.pista { animation: none; }
@media (prefers-reduced-motion: reduce) { .pais.pista { animation: none; } }
.pais.tema:hover { filter: brightness(1.22); }
/* título y subtítulo del tema */
.tema-cab { margin: 0 0 8px; max-width: 80ch; }
.tema-cab h2 { margin: 0 0 6px; font-size: clamp(1.3rem, 3.6vw, 1.8rem); line-height: 1.25; }
.tema-cab p { margin: 0; font-size: 1rem; color: #e6e0f0; }
#selTema { max-width: min(100%, 400px); }
.buscador + .buscador { margin-left: 30px; }   /* separa el selector de país del de tema, para que el de tema tenga más sitio */
.panel-tema { margin: 0 0 12px; }
.juego { padding: 12px 16px; }
/* panel del juego (preguntas, respuestas y botones) */
.juego { margin: 0 0 16px; padding: 16px 18px; border-left: 6px solid var(--rosa); background: var(--panel); border-radius: 0 12px 12px 0; max-width: 90ch; }
.juego p { margin: 0 0 8px; }
.juego .j-num { font-family: var(--fuente-nombres); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; color: var(--oro-claro); }
.juego .j-pregunta { font-family: var(--fuente-nombres); font-weight: 700; font-size: clamp(1.15rem, 3vw, 1.45rem); line-height: 1.3; color: var(--blanco); }
.j-opciones { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 12px 0 6px; }
.opcion { min-height: 56px; padding: 10px 16px; font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--blanco); text-align: left; background: rgba(245, 245, 240, .06); border: 2px solid rgba(185, 177, 201, .55); border-radius: 14px; cursor: pointer; touch-action: manipulation; }
.opcion:hover:not(:disabled) { border-color: var(--oro-claro); background: rgba(232, 206, 134, .1); }
.opcion:disabled { cursor: default; }
.opcion.elegida { border-color: var(--oro-claro); box-shadow: 0 0 14px 3px rgba(232, 206, 134, .6); }
.opcion.correcta { border-color: var(--oro-claro); background: rgba(232, 206, 134, .14); }
.opcion i { display: inline-block; width: 16px; height: 16px; margin-right: 10px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(245, 245, 240, .5); }
.j-fb { font-family: var(--fuente-nombres); font-weight: 700; font-size: 1.25rem; color: var(--oro-claro); }
.j-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }
.j-saltar { padding: 6px 4px; font: inherit; font-size: .92rem; color: var(--suave); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.j-saltar:hover { color: var(--oro-claro); }
/* botones de pastilla de la UI del videojuego (naranja = principal) */
.btn { font: inherit; font-family: var(--fuente-nombres); font-weight: 700; letter-spacing: .04em; cursor: pointer; min-height: 64px; min-width: 130px; padding: 0 6px; color: #2b1805; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); touch-action: manipulation;
  border: 20px solid transparent; border-width: 20px 24px; background: none; border-image: url("/img/opt/boton-naranja.webp") 30% 26% fill / 20px 24px stretch; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.15); } .btn:active { transform: translateY(2px) scale(.97); filter: brightness(.85); }
.aviso-tema { margin: 12px 4px 0; padding: 8px 12px; border-left: 4px solid var(--oro); border-radius: 0 10px 10px 0; background: rgba(201, 162, 75, .08); font-size: .9rem; color: var(--oro-claro); }
.aviso-tema p { margin: 0 0 4px; } .aviso-tema p:last-child { margin: 0; }
.fuente-tema { margin: 10px 4px 0; font-size: .88rem; color: var(--suave); }
/* el pie y la frase del ratón se apartan de las esquinas de rosas del marco para que no las tapen */
.bajo-mapa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; align-items: start; margin-top: 22px; }
.bajo-mapa .ficha { margin: 0; max-width: none; }
.notas-mapa .aviso-tema { margin: 0 0 12px; }
.notas-mapa .fuente-tema, .notas-mapa .ayuda-mapa { margin: 0 0 8px; }
.ayuda-mapa { margin: 8px 4px 0; font-size: .85rem; color: var(--suave); }

/* ---------- ficha del país tocado ---------- */
.ficha { margin: 22px 0 0; padding: 16px 18px; border-left: 6px solid var(--rosa); background: var(--panel); border-radius: 0 12px 12px 0; max-width: 70ch; min-height: 5.2em; }
/* KAN-2 2.4: al elegir un país la ficha parpadea un momento y la página baja hasta ella si no se veía */
.ficha.nueva { animation: nueva 1.4s ease-out; }
@keyframes nueva { 0% { box-shadow: 0 0 0 3px var(--oro-claro); background: #2a2140; } 100% { box-shadow: 0 0 0 0 transparent; } }
body.sin-efectos .ficha.nueva { animation: none; }
.ficha .volver { margin-top: 8px; padding: 6px 2px; font: inherit; font-size: .9rem; color: var(--oro-claro); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.ficha h3 { margin: 0 0 4px; font-family: var(--fuente-nombres); font-size: 1.3rem; color: var(--oro-claro); }
.ficha p { margin: 0; color: #e6e0f0; } .ficha .en { color: var(--suave); font-size: .9rem; }
.ficha .res-tema { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 8px 12px; border-left: 8px solid var(--oro); border-radius: 0 10px 10px 0; background: rgba(245, 245, 240, .06); font-size: 1.12rem; font-weight: 700; color: var(--blanco); }
.ficha details { margin: 8px 0 0; color: #e6e0f0; }
.ficha summary { cursor: pointer; color: var(--oro-claro); font-weight: 700; }
.ficha .detalle { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ficha .detalle li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: rgba(245, 245, 240, .05); }
.ficha .detalle b { font-family: var(--fuente-nombres); color: var(--oro-claro); }

footer { margin-top: auto; background: #000; border-top: 2px solid rgba(185, 177, 201, .35); }
footer .envoltorio { padding: 20px 0 26px; }
.firma { margin: 0; font-family: var(--fuente-titulos); font-weight: 700; font-size: 1.05rem; color: var(--oro-claro); }
.fuente-pie { margin: 10px 0 0; font-size: .85rem; color: var(--suave); }

header.cab, main, footer { position: relative; z-index: 1; }
header.cab .envoltorio { position: relative; }
.btn-efectos { position: absolute; right: 0; top: 18px; }
body.sin-efectos .esp { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .ficha.nueva { animation: none; } }
body.sin-efectos .pais { transition: none; }
@media (prefers-reduced-motion: reduce) { .esp { animation: none; } .pais { transition: none; } }
@media (max-width: 900px) { .panel-tema, .bajo-mapa { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .buscador select { max-width: 160px; } }
/* móvil: el panel del juego va fijo abajo (como la bandeja de la línea del tiempo) y el mapa queda arriba, a la vista */
@media (max-width: 700px) {
  main.envoltorio { display: flex; flex-direction: column; }
  .panel-tema { display: contents; }
  .tablero { order: 1; }
  .leyenda-caja { order: 2; margin-top: 14px; }
  .juego { order: 3; position: sticky; bottom: 0; z-index: 30; margin: 12px -16px 0; padding: 12px 16px 14px; max-height: 56vh; overflow-y: auto; border-left: 0; border-top: 3px solid var(--rosa); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 20px rgba(0, 0, 0, .6); }
  .bajo-mapa { order: 4; margin-top: 14px; }
  #zReset { font-size: 0; width: 40px; padding: 0; }   /* en móvil «Ver todo» es solo el icono, para no tapar el mapa */
  #zReset::before { content: "⤢"; font-size: 1.25rem; }
  .j-opciones { grid-template-columns: 1fr; gap: 8px; margin: 8px 0 4px; } .opcion { min-height: 48px; padding: 8px 14px; font-size: 1rem; }
}
