/* Manual de uso (/manual_usuario). Usa los colores y piezas de app.css. Ver Documentacion/18_MANUAL_USUARIO.md. */

/* Página larga: se desplaza la ventana (no el body), para que funcionen el índice fijo, los enlaces a secciones y «Volver arriba». */
html:has(body.pagina-manual), body.pagina-manual { height: auto; }
body.pagina-manual { overflow-x: clip; }
.pagina-manual .aurora { opacity: .55; }
.m-pagina { max-width: 1240px; margin: 0 auto; padding: 18px 28px 28px; padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }

/* ---------- Cabecera y portada ---------- */
.m-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.m-cabeza .logo-emblema { width: 44px; height: 44px; }
.m-cabeza .logo-texto { height: 24px; }
.m-cabeza nav { display: flex; align-items: center; gap: 10px; }
.m-idioma select, .pie-idioma select { width: auto; padding: 7px 12px; border-radius: 12px; font-size: .88rem; cursor: pointer; }
.m-entrar { padding: 9px 16px; }

.m-hero { text-align: center; padding: 46px 0 34px; max-width: 760px; margin: 0 auto; }
.m-pildora { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 14px; border-radius: 99px; background: var(--cristal-2); border: 1px solid var(--borde-2); color: var(--sol); font-weight: 650; font-size: .88rem; }
.m-pildora .ico { width: 17px; height: 17px; }
.m-hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; margin-bottom: 14px; }
.m-hero h1 em { font-style: normal; background: var(--grad-texto); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; }
.m-entradilla { color: var(--texto-suave); font-size: 1.12rem; line-height: 1.6; margin: 0; }

/* ---------- Cuerpo: índice + contenido ---------- */
.m-cuerpo { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 34px; align-items: start; }
.m-lateral { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.m-lateral-barra { display: flex; gap: 8px; }
.m-buscador { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--cristal-solido); border: 1px solid var(--borde-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: border-color .2s, box-shadow .2s; }
.m-buscador:focus-within { border-color: var(--turquesa); box-shadow: 0 0 0 3px rgb(46 230 197 / .18); }
.m-buscador .ico { color: var(--texto-tenue); }
.m-buscador input, .m-buscador input:focus { flex: 1; min-width: 0; width: auto; padding: 13px 0; background: none; border: 0; border-radius: 0; box-shadow: none; outline: none; -webkit-appearance: none; appearance: none; color: var(--texto); font: inherit; font-size: 1rem; }
.m-buscador input::-webkit-search-cancel-button { display: none; }
.m-limpiar { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--texto-suave); cursor: pointer; }
.m-limpiar:hover { background: var(--cristal-3); }
.m-limpiar .ico { width: 17px; height: 17px; }
.m-boton-indice { display: none; }
.m-resultados { margin: 0; padding: 9px 12px; border-radius: 12px; background: rgb(46 230 197 / .1); border: 1px solid rgb(46 230 197 / .3); color: var(--turquesa); font-size: .88rem; font-weight: 600; }
.m-resultados.vacio { background: rgb(255 194 77 / .1); border-color: rgb(255 194 77 / .35); color: var(--aviso); font-weight: 500; }
.m-indice { overflow-y: auto; padding: 8px; border-radius: var(--radio); background: var(--cristal-solido); border: 1px solid var(--borde); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.m-indice ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.m-indice a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--texto-suave); text-decoration: none; font-weight: 550; font-size: .93rem; line-height: 1.3; transition: background .15s, color .15s; }
.m-indice a .ico { width: 17px; height: 17px; color: var(--texto-tenue); }
.m-indice a:hover { background: var(--cristal-2); color: var(--texto); }
.m-indice li.activa a { background: rgb(255 61 139 / .14); color: var(--texto); }
.m-indice li.activa a .ico { color: var(--buganvilla); }

/* ---------- Contenido ---------- */
.m-contenido { min-width: 0; font-size: 1.04rem; line-height: 1.7; }
.m-cargando { display: grid; place-items: center; min-height: 40vh; }
.m-girando { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--cristal-3); border-top-color: var(--buganvilla); animation: m-gira .8s linear infinite; }
@keyframes m-gira { to { transform: rotate(360deg); } }
.m-error { padding: 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }

.m-sec { position: relative; padding: 30px 34px 26px; margin-bottom: 22px; border-radius: 24px; background: var(--cristal-solido); border: 1px solid var(--borde); box-shadow: var(--sombra); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3); scroll-margin-top: 16px; }
.m-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 1.65rem; margin-bottom: 10px; }
.m-sec-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 8px 24px -8px rgb(255 61 139 / .7); }
.m-sec:nth-of-type(3n+2) .m-sec-ico { background: var(--grad-frio); color: #04121a; box-shadow: 0 8px 24px -8px rgb(46 230 197 / .6); }
.m-sec:nth-of-type(3n) .m-sec-ico { background: linear-gradient(135deg, var(--mango), var(--sol)); color: #2a1600; box-shadow: 0 8px 24px -8px rgb(255 166 61 / .6); }
.m-sec-ico .ico { width: 22px; height: 22px; }
.m-sec h3 { display: flex; align-items: center; gap: 6px; font-size: 1.22rem; margin: 30px 0 8px; color: var(--sol); scroll-margin-top: 16px; }
.m-sec p { margin: 0 0 12px; }
.m-sec ul, .m-sec ol { margin: 0 0 14px; padding-left: 1.3em; }
.m-sec li { margin: 4px 0; }
.m-sec li::marker { color: var(--buganvilla); }
.m-sec b { color: #fff; font-weight: 700; }
.m-sec a { color: var(--turquesa); text-underline-offset: 3px; }
.m-resumen { font-size: 1.14rem; color: var(--texto-suave); padding-bottom: 6px; }
kbd { display: inline-block; padding: 1px 7px; border-radius: 7px; border: 1px solid var(--borde-2); border-bottom-width: 3px; background: var(--cristal-2); font: 600 .86em var(--fuente); color: var(--texto); }

/* Botón de copiar el enlace (aparece al pasar por el título). */
.m-copiar { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 4px; border: 0; border-radius: 9px; background: none; color: var(--texto-tenue); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.m-copiar .ico { width: 16px; height: 16px; }
h2:hover .m-copiar, h3:hover .m-copiar, .m-copiar:focus-visible { opacity: 1; }
.m-copiar:hover { background: var(--cristal-3); color: var(--texto); }
.m-copiar.hecho { opacity: 1; color: var(--ok); }
@media (hover: none) { .m-copiar { opacity: .55; } }
.m-destello { animation: m-destello 1.6s var(--suave); }
@keyframes m-destello { 0%, 30% { box-shadow: 0 0 0 3px rgb(46 230 197 / .55), var(--sombra); } 100% { box-shadow: var(--sombra); } }
h3.m-destello, details.m-destello { animation: m-destello-texto 1.6s var(--suave); }
@keyframes m-destello-texto { 0%, 30% { background: rgb(46 230 197 / .16); } 100% { background: transparent; } }

/* Pasos numerados. */
.m-sec ol.m-pasos { list-style: none; padding: 0; counter-reset: paso; display: grid; gap: 10px; }
.m-pasos > li { counter-increment: paso; position: relative; margin: 0; padding: 10px 14px 10px 54px; min-height: 44px; border-radius: 14px; background: var(--cristal); border: 1px solid var(--borde); }
.m-pasos > li::before { content: counter(paso); position: absolute; left: 11px; top: 9px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font: 750 .95rem var(--display); }

/* Cajas «Consejo» y «Ojo». */
.m-caja { display: grid; gap: 4px; margin: 16px 0; padding: 14px 18px 14px 54px; border-radius: 16px; position: relative; }
.m-caja::before { position: absolute; left: 16px; top: 13px; font-size: 1.35rem; line-height: 1; }
.m-caja strong { font-family: var(--display); font-size: 1rem; letter-spacing: .01em; }
.m-caja p { margin: 0; }
.m-caja.consejo { background: rgb(46 230 197 / .09); border: 1px solid rgb(46 230 197 / .32); }
.m-caja.consejo::before { content: "💡"; }
.m-caja.consejo strong { color: var(--turquesa); }
.m-caja.ojo { background: rgb(255 194 77 / .09); border: 1px solid rgb(255 194 77 / .38); }
.m-caja.ojo::before { content: "⚠️"; }
.m-caja.ojo strong { color: var(--aviso); }

/* Listas con icono, botones y prohibiciones. */
.m-sec ul.m-lista-icono { list-style: none; padding: 0; display: grid; gap: 12px; }
.m-lista-icono li { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.m-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--cristal-2); border: 1px solid var(--borde-2); color: var(--turquesa); }
.m-sec ul.m-botones { list-style: none; padding: 0; display: grid; gap: 8px; }
.m-botones li { position: relative; margin: 0; padding: 10px 0 10px 60px; min-height: 44px; }
.m-tecla { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 50%; background: var(--cristal-3); border: 1px solid var(--borde-2); font-size: 1.1rem; }
.m-tecla-salir { border-radius: 22px; background: rgb(255 92 116 / .85); color: #fff; font-weight: 700; font-size: .92rem; }
.m-sec ul.m-lista-no { list-style: none; padding: 0; }
.m-lista-no li { position: relative; padding-left: 28px; }
.m-lista-no li::before { content: "✕"; position: absolute; left: 4px; top: 0; color: var(--peligro); font-weight: 800; }

/* Capturas. */
.m-fig { margin: 18px 0 20px; display: grid; justify-items: center; gap: 8px; }
.m-fig img { display: block; max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--borde-2); box-shadow: 0 18px 50px -18px rgb(0 0 0 / .8); background: var(--noche-2); cursor: zoom-in; transition: transform .25s var(--suave); }
.m-fig img:hover { transform: translateY(-2px); }
.m-fig figcaption { color: var(--texto-tenue); font-size: .88rem; text-align: center; }
.m-fig.dialogo img { max-width: min(100%, 560px); }
.m-fig.movil img { width: 270px; border-radius: 30px; border: 6px solid #1d1a33; box-shadow: 0 0 0 1px var(--borde-2), 0 24px 60px -18px rgb(0 0 0 / .85); }
.m-galeria { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.m-galeria .m-fig { margin: 10px 0; }
.m-galeria .m-fig.movil img { width: 210px; }

/* Tablas. */
.m-tabla-envoltura { overflow-x: auto; margin: 10px 0 18px; border-radius: 16px; border: 1px solid var(--borde); }
.m-tabla { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.m-tabla th, .m-tabla td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--borde); vertical-align: top; }
.m-tabla thead th { background: var(--cristal-2); font-family: var(--display); color: var(--sol); }
.m-tabla tbody th { color: var(--texto-suave); font-weight: 600; }
.m-tabla tr:last-child > * { border-bottom: 0; }

/* Preguntas desplegables. */
.m-pregunta { margin: 10px 0; border-radius: 14px; background: var(--cristal); border: 1px solid var(--borde); scroll-margin-top: 16px; }
.m-pregunta summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; font-weight: 700; font-size: 1.04rem; }
.m-pregunta summary::-webkit-details-marker { display: none; }
.m-pregunta summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cristal-3); color: var(--turquesa); font-size: 1.2rem; transition: transform .2s; }
.m-pregunta[open] summary::after { transform: rotate(45deg); }
.m-pregunta[open] { background: var(--cristal-2); }
.m-pregunta > :not(summary) { margin-left: 18px; margin-right: 18px; }
.m-pregunta > :last-child { margin-bottom: 16px; }
.m-contacto { margin: 18px 0 !important; }

/* Resaltado de la búsqueda. */
mark.m-marca { background: rgb(255 214 90 / .32); color: #fff; border-radius: 4px; padding: 0 1px; box-shadow: 0 0 0 1px rgb(255 214 90 / .5); }

/* Volver arriba y visor. */
.m-arriba { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 20; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--borde-2); background: var(--cristal-solido); color: var(--texto); cursor: pointer; box-shadow: var(--sombra); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.m-arriba:hover { background: var(--cristal-3); }
.m-visor { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: none; overflow: visible; cursor: zoom-out; }
.m-visor::backdrop { background: rgb(4 3 10 / .88); backdrop-filter: blur(6px); }
.m-visor img { display: block; max-width: 96vw; max-height: 86vh; border-radius: 14px; margin: 0 auto; }
.m-visor-pie { margin: 10px 0 0; text-align: center; color: var(--texto-suave); }
.m-visor-cerrar { position: fixed; top: 14px; right: 14px; background: var(--cristal-3); border-radius: 50%; }
.pagina-manual .pie-sitio { margin-top: 30px; }

/* ---------- Móvil y ventanas estrechas ---------- */
@media (max-width: 900px) {
  .m-pagina { padding: 12px 16px 20px; }
  .m-cabeza .logo-texto { display: none; }
  .m-entrar { padding: 8px 12px; font-size: .9rem; }
  .m-hero { padding: 26px 0 18px; }
  .m-entradilla { font-size: 1.02rem; }
  .m-cuerpo { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .m-lateral { top: 0; max-height: none; margin: 0 -16px; padding: 10px 16px; background: rgb(7 6 15 / .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--borde); }
  .m-boton-indice { display: flex; align-items: center; gap: 6px; flex: none; padding: 0 12px; border-radius: 14px; border: 1px solid var(--borde-2); background: var(--cristal-2); color: var(--texto); font-weight: 650; cursor: pointer; }
  .m-boton-indice .m-flecha { width: 16px; height: 16px; transition: transform .2s; }
  .m-lateral.abierto .m-flecha { transform: rotate(180deg); }
  .m-indice { display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 6px); max-height: 66vh; box-shadow: var(--sombra); background: #120f24; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .m-lateral.abierto .m-indice { display: block; }
  .m-sec { padding: 22px 18px 18px; border-radius: 20px; scroll-margin-top: 76px; }
  .m-sec h2 { font-size: 1.38rem; }
  .m-sec-ico { width: 38px; height: 38px; border-radius: 12px; }
  .m-sec h3, .m-pregunta { scroll-margin-top: 76px; }
  .m-contenido { font-size: 1rem; }
  .m-caja { padding-left: 46px; }
  .m-caja::before { left: 13px; }
  .m-fig.movil img { width: min(240px, 72vw); }
  .m-galeria .m-fig.movil img { width: min(240px, 72vw); }
  .m-tabla { font-size: .88rem; }
  .m-tabla th, .m-tabla td { padding: 9px 10px; }
}
@media (max-width: 420px) {
  .m-boton-indice span { display: none; }
  .m-entrar span { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .m-fig img, .m-destello, .m-girando { animation: none; transition: none; }
}
