/* Centro de ayuda, panel lateral de la ayuda de cada pantalla y recorridos guiados. Móvil primero.
   Todo con el prefijo «ayuda-» para no pisar las clases de otras pantallas; usa los colores de tc.css (:root). */

/* --- botón «?» de la barra ---------------------------------------------------------------------------------------- */
.ayuda-boton {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--rosa); border: 1.5px solid #f6c7d6; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; line-height: 1; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.ayuda-boton:hover, .ayuda-boton:focus-visible { background: var(--rosa); color: #fff; border-color: var(--rosa); }
.ayuda-boton:active { transform: scale(.94); }
.ayuda-boton--muestra { width: 26px; height: 26px; font-size: .85rem; vertical-align: middle; margin: 0 .15rem; }

/* --- panel lateral ------------------------------------------------------------------------------------------------- */
.ayuda-panel {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0; width: min(100vw, 460px); height: 100dvh;
  max-width: 100vw; max-height: 100dvh; background: var(--fondo); color: var(--texto); display: none;
  flex-direction: column; box-shadow: -30px 0 80px -30px rgba(6, 5, 52, .55); overflow: hidden;
}
.ayuda-panel[open] { display: flex; animation: ayuda-entra .22s ease-out; }
.ayuda-panel::backdrop { background: rgba(6, 5, 52, .35); backdrop-filter: blur(2px); }
@keyframes ayuda-entra { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 760px) { .ayuda-panel { border-radius: 22px 0 0 22px; } }
.ayuda-panel__cabeza {
  display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; background: var(--degradado-noche); color: #fff;
  padding-top: max(.8rem, env(safe-area-inset-top, 0px));
}
.ayuda-panel__marca { margin: 0 auto 0 0; display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.05rem; }
.ayuda-panel__icono { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--degradado); font-size: .9rem; }
.ayuda-panel__centro { color: #ffd2dd; font-size: .82rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ayuda-panel__centro:hover { color: #fff; text-decoration: underline; }
.ayuda-panel__cerrar, .ayuda-panel__atras {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 1.4rem; line-height: 1;
}
.ayuda-panel__atras { font-size: 1.1rem; }
.ayuda-panel__cerrar:hover, .ayuda-panel__atras:hover { background: rgba(255, 255, 255, .24); }
.ayuda-panel__atras[hidden] { display: none; }
.ayuda-panel__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 1rem 2rem; padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px)); }
.ayuda-panel .ayuda-ia { margin-top: 1.2rem; }
.ayuda-panel .ayuda-ia .tarjeta-panel { box-shadow: none; border: 1px solid var(--linea); }
.ayuda-panel__cuerpo[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.ayuda-panel__bloque { padding-top: .4rem; }
.ayuda-panel__eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 600; color: var(--rosa); margin: 1.2rem 0 .3rem; }
.ayuda-panel__titulo { font-size: 1.25rem; font-weight: 700; margin: 0 0 .3rem; }
.ayuda-panel__resumen { color: var(--tenue); margin: 0 0 .8rem; }
.ayuda-panel .ayuda-guia__titulo2 { font-size: 1rem; }

/* --- buscador ------------------------------------------------------------------------------------------------------ */
.ayuda-buscador {
  display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 999px; padding: .35rem .35rem .35rem 1rem;
  border: 1.5px solid var(--linea); box-shadow: var(--sombra); min-width: 0;
}
.ayuda-buscador:focus-within { border-color: var(--rosa); }
.ayuda-buscador svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--rosa); stroke-width: 2.2; stroke-linecap: round; }
.ayuda-buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--tinta); padding: .55rem 0; }
.ayuda-buscador .boton { flex: none; }
.ayuda-buscador--panel { margin: .8rem 1rem .2rem; box-shadow: none; }
.ayuda-buscador--lado { margin-bottom: 1rem; padding-right: 1rem; }

/* --- portada ------------------------------------------------------------------------------------------------------- */
.ayuda-portada {
  position: relative; overflow: hidden; border-radius: var(--radio); padding: 1.6rem 1.2rem 1.4rem; margin-bottom: 1rem;
  background: var(--degradado-noche); color: #fff;
}
.ayuda-portada::after {
  content: ""; position: absolute; width: 340px; height: 340px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 66, 51, .55), transparent 65%); pointer-events: none;
}
.ayuda-portada > * { position: relative; z-index: 1; }
.ayuda-portada__eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; color: #ff9db6; margin: 0 0 .3rem; }
.ayuda-portada__titulo { color: #fff; margin: 0 0 .3rem; }
.ayuda-portada__texto { color: #d9d8f2; margin: 0 0 1rem; }
.ayuda-portada .ayuda-buscador { max-width: 640px; border-color: transparent; }
.ayuda-portada .ayuda-buscador input { font-size: 1.05rem; }
.ayuda-portada__pista { color: #d9d8f2; font-size: .85rem; margin: .9rem 0 0; }
.ayuda-portada__pista .ayuda-boton { border-color: transparent; }
@media (min-width: 760px) { .ayuda-portada { padding: 2.4rem 2.2rem 2rem; } }

.ayuda-indice { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.ayuda-indice__enlace {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 999px; background: #fff;
  color: var(--tinta); text-decoration: none; font-size: .85rem; font-weight: 500; box-shadow: 0 6px 18px -14px rgba(17, 16, 77, .5);
}
.ayuda-indice__enlace .icono { width: 18px; height: 18px; color: var(--rosa); }
.ayuda-indice__enlace small { color: var(--tenue); font-weight: 600; }
.ayuda-indice__enlace:hover { color: var(--rosa); }

.ayuda-secciones { display: grid; gap: 1rem; }
@media (min-width: 960px) { .ayuda-secciones { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.ayuda-seccion { margin: 0; scroll-margin-top: 80px; }
.ayuda-seccion__cabeza { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .4rem; }
.ayuda-seccion__cabeza h2 { margin: 0; font-size: 1.1rem; }
.ayuda-seccion__cabeza .tenue { margin: 0; font-size: .85rem; }
.ayuda-seccion__icono { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: #fdeef3; color: var(--rosa); }

.ayuda-lista { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; }
.ayuda-lista li + li { border-top: 1px solid var(--linea); }
.ayuda-lista__enlace { display: grid; gap: .1rem; padding: .7rem .2rem; text-decoration: none; color: var(--tinta); border-radius: 10px; }
.ayuda-lista__enlace b { font-weight: 600; font-size: .95rem; }
.ayuda-lista__enlace small { color: var(--tenue); font-size: .82rem; line-height: 1.4; }
.ayuda-lista__enlace:hover b { color: var(--rosa); }
.ayuda-vacio { color: var(--tenue); margin: .4rem 0 1rem; }
.ayuda-resultados h2 { font-size: 1.1rem; }
.ayuda-admin { margin-top: 1rem; }

/* --- la guía ------------------------------------------------------------------------------------------------------- */
.ayuda-cabecera { align-items: flex-start; }
.ayuda-cabecera h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.ayuda-cabecera__resumen { color: var(--texto); font-size: 1.02rem; margin: .4rem 0 .6rem; max-width: 70ch; }
.ayuda-para { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; font-size: .8rem; color: var(--tenue); }
.ayuda-dos { display: grid; gap: 1rem; }
.ayuda-dos__principal { min-width: 0; }
.ayuda-dos__lado { min-width: 0; }
@media (min-width: 1000px) {
  .ayuda-dos { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .ayuda-dos__lado { position: sticky; top: 90px; }
  .ayuda-dos--iguales { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ayuda-guia { max-width: 75ch; overflow-wrap: anywhere; }
.ayuda-guia p, .ayuda-guia li { line-height: 1.6; }
.ayuda-guia ul { padding-left: 1.2rem; }
.ayuda-guia ul li { margin-bottom: .35rem; }
.ayuda-guia__intro { font-size: 1rem; }
.ayuda-guia__intro p:first-child { margin-top: 0; }
.ayuda-guia__titulo2 { font-size: 1.08rem; margin: 1.4rem 0 .6rem; }
.ayuda-pasos { list-style: none; counter-reset: ayuda-paso; padding: 0; margin: 0; display: grid; gap: .7rem; }
.ayuda-pasos li { counter-increment: ayuda-paso; position: relative; padding: .1rem 0 0 2.6rem; min-height: 2rem; }
.ayuda-pasos li::before {
  content: counter(ayuda-paso); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--degradado); color: #fff; font-weight: 700; font-size: .85rem;
  box-shadow: 0 6px 14px -8px rgba(216, 25, 86, .8);
}
.ayuda-consejos { background: #fdeef3; border-radius: var(--radio-s); padding: .9rem 1rem .5rem; margin: 1.3rem 0; }
.ayuda-consejos__titulo { margin: 0 0 .3rem; font-weight: 700; color: var(--rosa); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.ayuda-consejos ul { margin: 0; }
.ayuda-dudas { display: grid; gap: .5rem; }
.ayuda-duda { background: var(--fondo); border-radius: var(--radio-s); padding: .1rem .9rem; }
.ayuda-panel .ayuda-duda { background: #fff; }
.ayuda-duda summary { cursor: pointer; font-weight: 600; color: var(--tinta); padding: .7rem 0; list-style-position: inside; }
.ayuda-duda p { margin: 0 0 .8rem; }
.ayuda-captura { margin: 1.2rem 0; }
.ayuda-captura img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--linea); box-shadow: var(--sombra); background: #fff; }
.ayuda-captura figcaption { font-size: .8rem; color: var(--tenue); margin-top: .45rem; }
.ayuda-ensename { margin: .2rem 0 .6rem; }
.ayuda-ensename .icono { width: 16px; height: 16px; fill: currentColor; stroke: none; }

/* --- ¿Te ha servido? ----------------------------------------------------------------------------------------------- */
.ayuda-valorar { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--linea); }
.ayuda-valorar__pregunta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.ayuda-valorar__pregunta p { margin: 0; font-weight: 600; color: var(--tinta); }
.ayuda-valorar__botones { display: flex; gap: .5rem; }
.ayuda-valorar__comentario .campo { margin-bottom: .6rem; }
.ayuda-valorar__comentario textarea { min-height: 80px; }
.ayuda-valorar__gracias { margin: 0; color: var(--ok); font-weight: 600; }
.ayuda-enlace { border: 0; background: none; padding: 0; font: inherit; font-size: .85rem; color: var(--tenue); text-decoration: underline; cursor: pointer; font-weight: 400; }
.ayuda-registro { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.ayuda-registro li { overflow-wrap: anywhere; }

/* --- recorrido guiado ---------------------------------------------------------------------------------------------- */
.ayuda-recorrido {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; overflow: hidden;
}
.ayuda-recorrido::backdrop { background: transparent; }
.ayuda-recorrido [hidden], .ayuda-panel [hidden], .ayuda-valorar [hidden] { display: none !important; }
.ayuda-recorrido__foco {
  position: fixed; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .95),
  0 0 0 9999px rgba(6, 5, 52, .58); transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.ayuda-recorrido__foco--centro { top: 50%; left: 50%; width: 0; height: 0; box-shadow: 0 0 0 9999px rgba(6, 5, 52, .58); }
.ayuda-recorrido__globo {
  position: fixed; width: min(340px, calc(100vw - 24px)); background: #fff; color: var(--texto); border-radius: 18px;
  padding: 1rem 1.1rem .9rem; box-shadow: 0 30px 70px -20px rgba(6, 5, 52, .7); transition: top .25s ease, left .25s ease;
}
.ayuda-recorrido__paso { margin: 0 0 .25rem; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rosa); }
.ayuda-recorrido__titulo { margin: 0 0 .35rem; font-size: 1.1rem; color: var(--tinta); }
.ayuda-recorrido__texto { margin: 0 0 .9rem; line-height: 1.5; }
.ayuda-recorrido__botones { display: flex; align-items: center; gap: .5rem; }
.ayuda-recorrido__botones .ayuda-enlace { margin-right: auto; }
.ayuda-recorrido__puntos { display: flex; gap: 4px; margin-right: auto; }
.ayuda-recorrido__puntos span { width: 6px; height: 6px; border-radius: 50%; background: var(--linea); }
.ayuda-recorrido__puntos span.ayuda-actual { background: var(--rosa); width: 16px; border-radius: 4px; }

/* Invitación de la primera vez: discreta, abajo, sin quitar el foco al lector de la caja */
.ayuda-invita {
  position: fixed; z-index: 48; right: 12px; left: 12px; bottom: calc(84px + var(--abajo)); display: flex; align-items: center;
  gap: .7rem; flex-wrap: wrap; padding: .8rem .9rem; border-radius: 18px; background: var(--degradado-noche); color: #fff;
  box-shadow: 0 24px 60px -20px rgba(6, 5, 52, .7); animation: ayuda-sube .3s ease-out;
}
.ayuda-invita p { margin: 0; flex: 1 1 180px; font-size: .9rem; }
.ayuda-invita b { color: #fff; }
.ayuda-invita .boton { min-height: 38px; padding: .45rem 1rem; font-size: .85rem; }
.ayuda-invita .ayuda-enlace { color: #d9d8f2; }
@media (min-width: 760px) { .ayuda-invita { left: auto; bottom: 20px; width: 380px; } }
@keyframes ayuda-sube { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ayuda-panel[open], .ayuda-invita { animation: none; } .ayuda-recorrido__foco, .ayuda-recorrido__globo { transition: none; } }
@media print { .ayuda-boton, .ayuda-panel, .ayuda-invita, .ayuda-valorar { display: none !important; } }
.ayuda-ia { margin-bottom: 1rem; }
.ayuda-ia:not(:has(*)) { display: none; }
