/* Asistente guiado «¿Qué hago ahora?» (2026-11-25). Cabecera oscura con dorado de vela (como la portada), cuerpo claro y legible. */
.as { --as-oscuro: #17211f; --as-oro: #f2c56b; --as-oro-suave: #f8e7bd; --as-ease: cubic-bezier(.23, 1, .32, 1); font-family: var(--sans); }
.as [hidden] { display: none !important; }

/* lanzador */
.as-lanzador { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: .7rem; padding: 6px 20px 6px 6px;
  border: 1px solid rgba(242, 197, 107, .35); border-radius: 999px; background: var(--as-oscuro); color: #fff; cursor: pointer; font: inherit; text-align: left;
  box-shadow: 0 10px 30px rgba(10, 18, 16, .32), 0 0 0 4px rgba(242, 197, 107, .08); transition: transform 160ms var(--as-ease), box-shadow 200ms ease;
  animation: as-entra 600ms var(--as-ease) 1.2s both; }
.as-lanzador:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(10, 18, 16, .36), 0 0 0 5px rgba(242, 197, 107, .14); }
.as-lanzador:active { transform: scale(.97); }
.as-lanz-foto { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; }
.as-lanz-foto img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--as-oro); }
.as-lanz-foto::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(242, 197, 107, .5); animation: as-halo 3.2s ease-out infinite; }
.as-lanz-txt { display: flex; flex-direction: column; line-height: 1.2; }
.as-lanz-txt b { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; }
.as-lanz-txt small { color: var(--as-oro-suave); font-size: .8rem; opacity: .9; }
.as.abierto .as-lanzador { opacity: 0; pointer-events: none; transform: scale(.9); }
@keyframes as-entra { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes as-halo { 0% { transform: scale(.92); opacity: .9; } 70%, 100% { transform: scale(1.25); opacity: 0; } }
body.con-barra .as-lanzador { bottom: calc(5rem + env(safe-area-inset-bottom)); }

/* globo de ayuda */
.as-globo { position: fixed; right: 24px; bottom: 92px; z-index: 60; max-width: 250px; padding: .8rem 2.1rem .8rem 1rem; background: #fff; color: var(--tinta);
  border-radius: 14px 14px 4px 14px; box-shadow: 0 12px 30px rgba(10, 18, 16, .18); cursor: pointer; animation: as-entra 400ms var(--as-ease) both; }
.as-globo p { margin: 0; font-size: .95rem; line-height: 1.4; }
.as-globo-x { position: absolute; top: 4px; right: 6px; width: 28px; height: 28px; border: 0; background: none; font-size: 1.2rem; color: var(--tinta-suave); cursor: pointer; border-radius: 50%; }
.as-globo-x:hover { background: var(--granito); }

/* panel */
.as-panel { position: fixed; right: 20px; bottom: 20px; z-index: 61; width: 410px; height: min(700px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: var(--granito); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(10, 18, 16, .35), 0 0 0 1px rgba(0, 0, 0, .06);
  transform-origin: bottom right; animation: as-abre 260ms var(--as-ease) both; }
@keyframes as-abre { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.as-cab { display: flex; align-items: center; gap: .75rem; padding: .85rem .8rem .85rem 1rem; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(242, 197, 107, .2), transparent 55%), var(--as-oscuro); }
.as-cab-foto { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--as-oro); flex: none; }
.as-cab-txt { flex: 1; min-width: 0; }
.as-cab h2 { font-size: 1.06rem; margin: 0; color: #fff; outline: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-cab p { margin: 0; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--as-oro-suave); opacity: .9; }
.as-cab-botones { display: flex; gap: .15rem; }
.as-ico { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: inherit;
  cursor: pointer; font: 700 .9rem/1 var(--sans); transition: background 150ms ease, transform 120ms ease; }
.as-ico:hover { background: rgba(255, 255, 255, .1); }
.as-ico:active { transform: scale(.94); }
.as-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.as-ico[aria-pressed="true"] { background: rgba(242, 197, 107, .22); color: var(--as-oro); }
.as-insignia { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--as-oro); color: var(--as-oscuro); font-size: .7rem; line-height: 17px; }
.as-urgencia { margin: 0; padding: .4rem 1rem; background: #fbf3e2; color: #5d430c; font-size: .84rem; border-bottom: 1px solid #efe1bf; }
.as-urgencia a { color: #7a2e1d; font-weight: 700; }

/* conversación */
.as-chat { position: relative; flex: 1; overflow-y: auto; padding: 1rem .9rem .6rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.as-fila { display: flex; gap: .5rem; align-items: flex-end; margin-top: .65rem; animation: as-msg 280ms var(--as-ease) both; }
.as-fila.seguida { margin-top: .35rem; }
@keyframes as-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.as-mini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; align-self: flex-start; }
.as-bot.seguida .as-burbuja { margin-left: 38px; }
.as-burbuja { max-width: 100%; min-width: 0; }
.as-bot > .as-burbuja > p { margin: 0; padding: .65rem .85rem; background: #fff; border-radius: 4px 14px 14px 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); line-height: 1.5; }
.as-yo { justify-content: flex-end; }
.as-yo .as-burbuja p { margin: 0; padding: .55rem .85rem; background: var(--cipres); color: #fff; border-radius: 14px 14px 4px 14px; }
.as-pensando .as-burbuja { display: flex; gap: 4px; padding: .8rem .9rem; background: #fff; border-radius: 4px 14px 14px 14px; margin-left: 38px; }
.as-pensando:not(.seguida) .as-burbuja { margin-left: 38px; }
.as-pensando span { width: 7px; height: 7px; border-radius: 50%; background: #9aa6a2; animation: as-punto 1s ease-in-out infinite; }
.as-pensando span:nth-child(2) { animation-delay: .15s; } .as-pensando span:nth-child(3) { animation-delay: .3s; }
@keyframes as-punto { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* opciones */
.as-opciones { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 .2rem 38px; }
.as-chip { border: 1px solid #bcd0c8; background: #fff; color: var(--cipres-oscuro); border-radius: 999px; padding: .45rem .85rem; font: 600 .9rem/1.25 var(--sans); cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease; text-align: left; }
.as-chip:hover:not(:disabled) { background: var(--cipres-claro); border-color: var(--cipres); }
.as-chip:active:not(:disabled) { transform: scale(.97); }
.as-chip.fuerte { background: var(--cipres); border-color: var(--cipres); color: #fff; }
.as-chip.fuerte:hover:not(:disabled) { background: var(--cipres-oscuro); }
.as-chip:disabled { opacity: .45; cursor: default; }
.as-chip.elegida { opacity: 1; background: var(--cipres-claro); border-color: var(--cipres); color: var(--cipres-oscuro); }
.as-opciones:has(.elegida) .as-chip:not(.elegida) { display: none; }
.as-opciones:has(.elegida) { display: none; }

/* tarjetas con texto de las guías */
.as-tarjeta { background: #fff; border-radius: 4px 14px 14px 14px; padding: .8rem .95rem .7rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); border-left: 3px solid var(--as-oro); }
.as-fuente { margin: 0 0 .25rem; font-size: .74rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ocre); font-weight: 700; }
.as-tarjeta h3 { font-size: 1.02rem; margin: 0 0 .4rem; }
.as-cuerpo p, .as-cuerpo li { font-size: .94rem; line-height: 1.55; }
.as-cuerpo p { margin: 0 0 .5rem; }
.as-cuerpo ul { margin: 0 0 .5rem; padding-left: 1.1rem; }
.as-cuerpo li { margin-bottom: .2rem; }
.as-tarjeta:not(.abierta) .as-extra { display: none; }
.as-pie { display: flex; flex-wrap: wrap; gap: .3rem .9rem; padding-top: .35rem; border-top: 1px solid var(--linea); margin-top: .3rem; }
.as-pie.suelto { border: 0; margin: .4rem 0 0 38px; }
.as-link { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem 0; border: 0; background: none; color: var(--cipres); font: 700 .86rem/1.3 var(--sans); cursor: pointer; text-decoration: none; }
.as-link:hover { color: var(--cipres-oscuro); text-decoration: underline; }
.as-link:disabled { color: var(--tinta-suave); cursor: default; text-decoration: none; }
.as-link.peligro { color: #9b2c1f; }
.as-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms var(--as-ease); }
.as-link svg.relleno, .as-mini-boton svg.relleno { fill: currentColor; stroke: none; }
.as-link:hover svg { transform: translateX(2px); }

/* pasos en orden */
.as-pasos { list-style: none; margin: .3rem 0 .2rem; padding: 0; counter-reset: paso; }
.as-pasos li { position: relative; padding-left: 2.1rem; counter-increment: paso; }
.as-pasos li::before { content: counter(paso); position: absolute; left: 0; top: .35rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--as-oscuro); color: var(--as-oro);
  font: 700 .8rem/1.5rem var(--sans); text-align: center; }
.as-pasos li:not(:last-child)::after { content: ""; position: absolute; left: .72rem; top: 2rem; bottom: -.2rem; width: 2px; background: #e4e0d4; }
.as-pasos summary { cursor: pointer; padding: .35rem 0; font-weight: 700; font-size: .95rem; list-style: none; }
.as-pasos summary::-webkit-details-marker { display: none; }
.as-pasos summary::after { content: " +"; color: var(--cipres); }
.as-pasos details[open] summary::after { content: " –"; }

/* cifra (cuota mortuoria) */
.as-cifra { display: grid; gap: .1rem; padding: .85rem 1rem; border-radius: 4px 14px 14px 14px; background: var(--as-oscuro); color: #fff; }
.as-cifra small { color: var(--as-oro-suave); font-size: .8rem; }
.as-cifra strong { font: 600 1.7rem/1.2 var(--serif); color: var(--as-oro); }
.as-cifra span { font-size: .82rem; opacity: .8; }
.as-cifra .as-link { color: #fff; }

/* ubicación */
.as-lugar { background: #fff; border-radius: 4px 14px 14px 14px; padding: .8rem .9rem; }
.as-boton { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border: 0; border-radius: 10px; background: var(--cipres); color: #fff; font: 700 .95rem/1 var(--sans);
  cursor: pointer; transition: background 150ms ease, transform 120ms ease; }
.as-boton:hover { background: var(--cipres-oscuro); } .as-boton:active { transform: scale(.97); }
.as-boton svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.as-hint { margin: .5rem 0 0; font-size: .86rem; color: var(--tinta-suave); }

/* funerarias recomendadas */
.as-recs { display: grid; gap: .45rem; margin: .5rem 0 0 38px; }
.as-rec { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .55rem; background: #fff; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); animation: as-msg 300ms var(--as-ease) both; transition: transform 160ms var(--as-ease), box-shadow 160ms ease; }
.as-rec:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10, 18, 16, .1); }
.as-rec:nth-child(2) { animation-delay: 60ms; } .as-rec:nth-child(3) { animation-delay: 120ms; } .as-rec:nth-child(4) { animation-delay: 180ms; } .as-rec:nth-child(5) { animation-delay: 240ms; }
.as-rec img, .as-rec-sin { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--cipres-claro); }
.as-rec-nom { display: block; font-weight: 700; font-size: .93rem; line-height: 1.3; color: var(--tinta); text-decoration: none; }
.as-rec-nom:hover { color: var(--cipres); text-decoration: underline; }
.as-rec-meta { margin: .1rem 0 0; font-size: .8rem; color: var(--tinta-suave); }
.as-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin: .25rem 0 0; }
.as-tags span { font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 5px; background: var(--cipres-claro); color: var(--cipres-oscuro); }
.as-tags .pub { background: #fbf3e2; color: #6b4d0e; }
.as-rec-acc { display: flex; flex-direction: column; gap: .3rem; }
.as-mini-boton { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 38px; height: 34px; padding: 0 .6rem; border: 1px solid #bcd0c8; border-radius: 9px;
  background: #fff; color: var(--cipres-oscuro); font: 700 .8rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background 150ms ease, transform 120ms ease; }
.as-mini-boton:hover { background: var(--cipres-claro); }
.as-mini-boton:active { transform: scale(.95); }
.as-mini-boton svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.as-mini-boton.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.as-mini-boton.wa:hover { background: #18773f; }
.as-rec-acc { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 130px; }

/* mi lista */
.as-lista ul { list-style: none; margin: .5rem 0; padding: 0; }
.as-lista li { display: grid; grid-template-columns: auto 1fr auto; gap: .55rem; align-items: start; padding: .4rem 0; border-bottom: 1px dashed var(--linea); }
.as-lista input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--cipres); }
.as-lista label { font-size: .92rem; line-height: 1.4; cursor: pointer; }
.as-lista input:checked + label { text-decoration: line-through; color: var(--tinta-suave); }
.as-ver { color: var(--tinta-suave); } .as-ver svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.as-progreso { height: 6px; border-radius: 3px; background: #ece8dc; overflow: hidden; }
.as-progreso span { display: block; height: 100%; background: linear-gradient(90deg, var(--cipres), #4f8f7d); transition: width 300ms var(--as-ease); }

/* escribir */
.as-form { position: relative; display: flex; gap: .35rem; align-items: center; padding: .6rem .7rem; background: #fff; border-top: 1px solid var(--linea); }
.as-form input { flex: 1; min-width: 0; height: 44px; padding: 0 .85rem; border: 1px solid var(--linea); border-radius: 12px; font: 400 1rem var(--sans); color: var(--tinta); background: var(--granito); }
.as-form input:focus { outline: 2px solid var(--cipres); outline-offset: 0; background: #fff; }
.as-form .as-ico { color: var(--cipres); }
.as-form .as-ico:hover { background: var(--cipres-claro); }
.as-mic.escuchando { color: #b3261e; background: #fde8e6; animation: as-latido 1s ease-in-out infinite; }
@keyframes as-latido { 50% { transform: scale(1.08); } }
.as-enviar { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--cipres); color: #fff; cursor: pointer; transition: background 150ms ease, transform 120ms ease; }
.as-enviar:hover { background: var(--cipres-oscuro); } .as-enviar:active { transform: scale(.94); }
.as-enviar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.as-sugerencias { position: absolute; left: .7rem; right: .7rem; bottom: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10, 18, 16, .18); max-height: 240px; overflow-y: auto; }
.as-sugerencias button { display: block; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 8px; background: none; text-align: left; font: 400 .92rem/1.35 var(--sans); color: var(--tinta); cursor: pointer; }
.as-sugerencias button:hover, .as-sugerencias button:focus { background: var(--cipres-claro); outline: none; }
.as-aviso { margin: 0; padding: .1rem 1rem .55rem; background: #fff; font-size: .72rem; color: var(--tinta-suave); text-align: center; }

/* letra grande */
.as-panel.grande .as-cuerpo p, .as-panel.grande .as-cuerpo li, .as-panel.grande .as-bot > .as-burbuja > p, .as-panel.grande .as-yo p { font-size: 1.12rem; }
.as-panel.grande .as-chip { font-size: 1.02rem; padding: .55rem 1rem; }
.as-panel.grande .as-tarjeta h3 { font-size: 1.18rem; }

/* celular: lanzador compacto y panel a pantalla completa */
@media (max-width: 640px) {
  .as-lanzador { right: 12px; bottom: 12px; padding: 5px 14px 5px 5px; gap: .5rem; }
  .as-lanz-foto, .as-lanz-foto img { width: 44px; height: 44px; }
  .as-lanz-txt b { font-size: .92rem; } .as-lanz-txt small { font-size: .72rem; }
  .as-panel { inset: 0; width: auto; height: 100%; height: 100dvh; border-radius: 0; }
  .as-opciones, .as-recs, .as-pie.suelto { margin-left: 0; }
  .as-bot.seguida .as-burbuja, .as-pensando .as-burbuja, .as-pensando:not(.seguida) .as-burbuja { margin-left: 0; }
  .as-rec { grid-template-columns: 48px minmax(0, 1fr); }
  .as-rec img, .as-rec-sin { width: 48px; height: 48px; }
  .as-rec-acc { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
  .as-rec-acc .as-mini-boton { flex: 1; height: 40px; }
}
html.as-bloqueo, html.as-bloqueo body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .as *, .as *::before, .as *::after { animation: none !important; transition: none !important; } .as-lanzador { animation: none; } }
@media print { .as { display: none !important; } }

/* fuentes oficiales al pie de páginas generales (no es del asistente; va aquí porque sitio.css es muy grande para editar) */
.fuentes-oficiales { margin: 1.5rem auto 2rem; }
.fuentes-oficiales p { margin: 0; }
