/* ==========================================================================
   Agente Valyon: el móvil con el asistente vivo (home y /agente).
   Identidad: Ion violeta, tinta, Inter. Sin verde de WhatsApp ni degradados.
   ========================================================================== */

.ag-marco {
  --ag-ion: var(--ion, #4B49E0);
  --ag-ion-dark: var(--ion-dark, #3937B8);
  --ag-ion-light: var(--ion-light, #B9B5F2);
  --ag-tint: var(--ion-tint, #F1F0FE);
  --ag-ink: var(--ink, #16171A);
  --ag-graphite: var(--graphite, #3B3C40);
  --ag-mist: #8E8D9A;
  --ag-line: #E7E6F2;
  position: relative;
  width: min(380px, 100%);
  margin-inline: auto;
  padding: 10px;
  border-radius: 46px;
  background: var(--ag-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 50px 100px -40px rgba(22, 23, 26, .55), 0 24px 40px -28px rgba(75, 73, 224, .5);
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
}
.ag-marco::before { /* altavoz */
  content: ""; position: absolute; z-index: 3; top: 17px; left: 50%; width: 64px; height: 6px;
  border-radius: 99px; background: rgba(255, 255, 255, .14); transform: translateX(-50%);
}

.ag-tel {
  display: flex; flex-direction: column; height: min(640px, 78vh); min-height: 520px;
  border-radius: 36px; overflow: hidden; background: #fff; color: var(--ag-ink);
}

/* ---------- Cabecera ---------- */
.ag-cab {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px;
  background: #fff; border-bottom: 1px solid var(--ag-line);
}
.ag-logo {
  flex: none; width: 42px; height: 42px; padding: 7px; border-radius: 50%;
  background: var(--ag-tint); border: 1px solid rgba(75, 73, 224, .12);
}
.ag-quien { min-width: 0; }
.ag-quien b { display: block; font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.ag-estado { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ag-mist); }
.ag-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2FBA6C; }
.ag-estado.is-escribiendo { color: var(--ag-ion); }
.ag-estado.is-escribiendo::before { background: var(--ag-ion); }

/* ---------- Conversación ---------- */
.ag-chat {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 12px 8px; display: flex; flex-direction: column; gap: 8px;
  background-color: #F4F3FB;
  background-image: radial-gradient(rgba(75, 73, 224, .09) 1px, transparent 1.2px);
  background-size: 16px 16px;
  scrollbar-width: thin; scrollbar-color: rgba(75, 73, 224, .25) transparent;
}
.ag-aviso {
  align-self: center; max-width: 92%; padding: 6px 12px; border-radius: 99px;
  background: rgba(255, 255, 255, .85); color: var(--ag-graphite); font-size: 11.5px; text-align: center;
  border: 1px solid var(--ag-line);
}
.ag-m {
  position: relative; max-width: 84%; padding: 9px 12px 19px; border-radius: 14px;
  font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; white-space: pre-wrap;
}
.ag-m a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.ag-m time { position: absolute; right: 10px; bottom: 4px; display: flex; align-items: center; gap: 3px; font-size: 10.5px; opacity: .6; }
.ag-m--bot { align-self: flex-start; background: #fff; border-top-left-radius: 4px; box-shadow: 0 1px 1px rgba(22, 23, 26, .06); }
.ag-m--yo { align-self: flex-end; background: var(--ag-ion); color: #fff; border-top-right-radius: 4px; }
.ag-m--yo time svg { width: 15px; height: 9px; }

.ag-escribiendo {
  align-self: flex-start; display: flex; gap: 4px; padding: 13px 14px; border-radius: 14px; border-top-left-radius: 4px; background: #fff;
}
.ag-escribiendo span { width: 7px; height: 7px; border-radius: 50%; background: var(--ag-mist); animation: ag-salta 1.2s infinite ease-in-out; }
.ag-escribiendo span:nth-child(2) { animation-delay: .15s; }
.ag-escribiendo span:nth-child(3) { animation-delay: .3s; }

/* ---------- Tarjeta de la cita ---------- */
.ag-cita {
  align-self: stretch; margin: 4px 4px 2px; padding: 14px 14px 14px; border-radius: 16px;
  background: #fff; border: 1px solid rgba(75, 73, 224, .22);
  box-shadow: 0 18px 32px -24px rgba(75, 73, 224, .55);
  display: flex; flex-direction: column; gap: 10px;
}
.ag-cita-cab { display: flex; align-items: center; gap: 10px; }
.ag-cita-ico {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--ag-ion); color: #fff;
}
.ag-cita-ico svg { width: 20px; height: 20px; }
.ag-cita-txt b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.ag-cita-txt span { display: block; font-size: 13px; color: var(--ag-graphite); line-height: 1.3; }
.ag-cita-enlace {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px;
  border-radius: 10px; background: var(--ag-ion); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
}
.ag-cita-enlace:hover { background: var(--ag-ion-dark); }

/* ---------- Sugerencias, entrada y pie ---------- */
.ag-sugerencias { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px 6px; background: #F4F3FB; scrollbar-width: none; }
.ag-sugerencias::-webkit-scrollbar { display: none; }
.ag-sugerencias[hidden] { display: none; }
.ag-sugerencias button {
  flex: none; padding: 9px 14px; border-radius: 99px; border: 1px solid rgba(75, 73, 224, .28);
  background: #fff; color: var(--ag-ion); font: 500 14px var(--font-body, 'Inter', system-ui, sans-serif); cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.ag-sugerencias button:hover { border-color: var(--ag-ion); }
.ag-sugerencias button:active { transform: scale(.96); }

.ag-form { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--ag-line); }
.ag-form input {
  flex: 1; min-width: 0; padding: 12px 16px; border-radius: 99px; border: 1px solid var(--ag-line); background: #F6F6F9;
  font: 16px var(--font-body, 'Inter', system-ui, sans-serif); color: var(--ag-ink); outline: none;
}
.ag-form input:focus { border-color: var(--ag-ion); background: #fff; }
.ag-form button {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--ag-ion); color: #fff; cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.ag-form button:active { transform: scale(.92); }
.ag-form button:disabled, .ag-form input:disabled { opacity: .55; cursor: default; }
.ag-legal { padding: 0 14px 10px; background: #fff; font-size: 11px; line-height: 1.4; color: var(--ag-mist); text-align: center; }
.ag-legal a { color: var(--ag-graphite); text-decoration: underline; }

.ag-marco :focus-visible { outline: 2px solid var(--ag-ion); outline-offset: 2px; }

/* ---------- Botón flotante (home): vuelve al agente ---------- */
.ag-flotante {
  position: fixed; z-index: 60; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 99px;
  background: var(--ion, #4B49E0); color: #fff; font: 600 15px var(--font-body, 'Inter', system-ui, sans-serif);
  text-decoration: none; box-shadow: 0 18px 36px -16px rgba(75, 73, 224, .8);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.ag-flotante.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.ag-flotante img { width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: #fff; }
.ag-flotante:hover { background: var(--ion-dark, #3937B8); }

@keyframes ag-salta { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 560px) {
  .ag-marco { padding: 7px; border-radius: 38px; }
  .ag-tel { border-radius: 31px; height: min(620px, 76vh); }
}
@media (prefers-reduced-motion: reduce) {
  .ag-escribiendo span { animation: none; }
  .ag-flotante { transition: none; }
}


/* ---------- Barra de estado del teléfono ---------- */
.ag-estado-tel { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px 0; font-size: 12.5px; font-weight: 600; color: var(--ag-ink); background: #fff; }
.ag-estado-tel .ag-iconos { display: flex; align-items: center; gap: 6px; }
.ag-estado-tel svg { height: 11px; width: auto; }
.ag-cab { padding-top: 14px; }

/* ==========================================================================
   Página /agente: hero con la conversación, escenas con movimiento y cierre
   ========================================================================== */

/* ---------- Hero ---------- */
.ag-hero { position: relative; overflow: hidden; padding: calc(var(--nav-h, 84px) + 40px) 0 72px; background: #fff; }
.ag-hero-fondo span { position: absolute; border-radius: 50%; pointer-events: none; }
.ag-hero-fondo span:nth-child(1) { width: 640px; height: 640px; right: -180px; top: -120px; background: radial-gradient(closest-side, rgba(75, 73, 224, .13), transparent); }
.ag-hero-fondo span:nth-child(2) { width: 420px; height: 420px; left: -160px; bottom: -160px; background: radial-gradient(closest-side, rgba(185, 181, 242, .35), transparent); }
.ag-hero-inner {
  position: relative; width: min(var(--container, 1240px), 100% - 2 * var(--gutter, 24px)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
}
.ag-hero-copy { display: flex; flex-direction: column; gap: 22px; }
.ag-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ion, #4B49E0); }
.ag-titulo { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-weight: 500; font-size: clamp(38px, 4.8vw, 62px); line-height: 1.03; letter-spacing: -0.035em; color: var(--ink, #16171A); text-wrap: balance; }
.ag-titulo em { font-style: normal; color: var(--ion, #4B49E0); }
.ag-sub { max-width: 50ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--graphite, #3B3C40); }
.ag-puntos { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 2px; }
.ag-puntos li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink, #16171A); }
.ag-puntos svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--ion, #4B49E0); }
.ag-alterna { font-size: 15px; color: var(--graphite, #3B3C40); }
.ag-alterna a { color: var(--ion, #4B49E0); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* El escenario del móvil: más grande y con tarjetas que flotan alrededor. */
.ag-escenario { position: relative; display: grid; place-items: center; }
.ag-escenario .ag-marco { width: min(410px, 100%); }
.ag-escenario .ag-tel { height: min(700px, 82vh); }
.ag-flota {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 11px 15px 11px 11px;
  border-radius: 16px; background: #fff; border: 1px solid rgba(75, 73, 224, .14);
  box-shadow: 0 24px 44px -26px rgba(22, 23, 26, .45);
  animation: ag-flota 6s ease-in-out infinite;
}
.ag-flota-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ion-tint, #F1F0FE); color: var(--ion, #4B49E0); }
.ag-flota-ico svg { width: 19px; height: 19px; }
.ag-flota b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink, #16171A); line-height: 1.25; }
.ag-flota i { display: block; font-style: normal; font-size: 12px; color: var(--mist, #8E8D9A); line-height: 1.3; }
.ag-flota--a { top: -20px; left: 4px; }
.ag-flota--b { bottom: -22px; right: 6px; animation-delay: -3s; }
@keyframes ag-flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- Escenas ---------- */
.ag-vive { padding: 88px 0 96px; background: var(--ion-tint, #F1F0FE); }
.ag-vive-inner { width: min(var(--container, 1240px), 100% - 2 * var(--gutter, 24px)); margin-inline: auto; display: flex; flex-direction: column; gap: 44px; }
.ag-vive-cab { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.ag-vive-cab h2 { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -0.03em; color: var(--ink, #16171A); text-wrap: balance; }
.ag-vive-cuerpo { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: stretch; }

.ag-vive-lista { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ag-vive-lista button {
  position: relative; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px;
  border-radius: 18px; border: 1px solid transparent; background: transparent; cursor: pointer; overflow: hidden;
  font: inherit; color: var(--graphite, #3B3C40);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, transform .2s ease;
}
.ag-vive-lista button b { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink, #16171A); }
.ag-vive-lista button span { font-size: 15.5px; line-height: 1.5; max-height: 0; opacity: 0; transition: max-height .4s ease, opacity .3s ease; }
.ag-vive-lista button:hover { background: rgba(255, 255, 255, .6); }
.ag-vive-lista button:active { transform: scale(.99); }
.ag-vive-lista button.is-activa { background: #fff; border-color: rgba(75, 73, 224, .16); box-shadow: 0 24px 40px -30px rgba(75, 73, 224, .55); }
.ag-vive-lista button.is-activa span { max-height: 120px; opacity: 1; }
.ag-vive-lista button:focus-visible { outline: 2px solid var(--ion, #4B49E0); outline-offset: 2px; }
.ag-progreso { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ion, #4B49E0); transform-origin: left; transform: scaleX(0); }
.ag-vive.is-visible:not(.is-pausada) .is-activa .ag-progreso { animation: ag-progreso 5.6s linear forwards; }
@keyframes ag-progreso { to { transform: scaleX(1); } }

.ag-escena-marco {
  position: relative; min-height: 400px; padding: 38px 28px 28px; border-radius: 28px; background: #fff;
  border: 1px solid rgba(75, 73, 224, .12); box-shadow: 0 40px 70px -46px rgba(22, 23, 26, .5); overflow: hidden;
  background-image: radial-gradient(rgba(75, 73, 224, .08) 1px, transparent 1.2px); background-size: 18px 18px;
}
.ag-escena-nota { position: absolute; top: 14px; right: 18px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mist, #8E8D9A); }
.ag-escena { display: none; flex-direction: column; gap: 18px; }
.ag-escena.is-activa { display: flex; }
.ag-e-titulo { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ion, #4B49E0); }

/* 1. Chat */
.ag-e-chat { display: flex; flex-direction: column; gap: 12px; }
.ag-e-m { position: relative; max-width: 82%; padding: 11px 14px 22px; border-radius: 16px; font-size: 16px; line-height: 1.42; opacity: 0; }
.ag-e-m time { position: absolute; right: 12px; bottom: 5px; font-size: 11px; opacity: .6; }
.ag-e-m--yo { align-self: flex-end; background: var(--ion, #4B49E0); color: #fff; border-top-right-radius: 4px; }
.ag-e-m--bot { align-self: flex-start; background: #fff; border: 1px solid var(--ag-line, #E7E6F2); border-top-left-radius: 4px; box-shadow: 0 10px 22px -18px rgba(22, 23, 26, .5); }
.ag-e-escribe { align-self: flex-start; display: flex; gap: 5px; padding: 15px 16px; border-radius: 16px; border-top-left-radius: 4px; background: #fff; border: 1px solid var(--ag-line, #E7E6F2); opacity: 0; }
.ag-e-escribe i { width: 7px; height: 7px; border-radius: 50%; background: var(--mist, #8E8D9A); animation: ag-salta 1.1s infinite ease-in-out; }
.ag-e-escribe i:nth-child(2) { animation-delay: .15s; }
.ag-e-escribe i:nth-child(3) { animation-delay: .3s; }
.ag-e-sello { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; opacity: 0; }
.ag-e-sello b { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-weight: 500; font-size: 44px; letter-spacing: -0.04em; color: var(--ion, #4B49E0); }
.ag-e-sello span { font-size: 15px; color: var(--graphite, #3B3C40); }
.ag-escena.is-activa .ag-e-m--yo { animation: ag-sube .45s .1s cubic-bezier(.16,.84,.44,1) forwards; }
.ag-escena.is-activa .ag-e-escribe { animation: ag-aparece-desaparece 1.5s .7s ease forwards; }
.ag-escena.is-activa .ag-e-m--bot { animation: ag-sube .45s 2.1s cubic-bezier(.16,.84,.44,1) forwards; }
.ag-escena.is-activa .ag-e-sello { animation: ag-sube .5s 2.9s cubic-bezier(.16,.84,.44,1) forwards; }

/* 2. Ficha del negocio */
.ag-e-ficha { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ag-e-ficha li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 13px 16px; border-radius: 14px;
  background: #fff; border: 1px solid var(--ag-line, #E7E6F2); opacity: 0;
}
.ag-e-ficha span { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mist, #8E8D9A); }
.ag-e-ficha b { font-size: 15.5px; font-weight: 500; color: var(--ink, #16171A); text-align: right; }
.ag-escena.is-activa .ag-e-ficha li { animation: ag-entra-lado .5s cubic-bezier(.16,.84,.44,1) forwards; }
.ag-escena.is-activa .ag-e-ficha li:nth-child(1) { animation-delay: .1s; }
.ag-escena.is-activa .ag-e-ficha li:nth-child(2) { animation-delay: .35s; }
.ag-escena.is-activa .ag-e-ficha li:nth-child(3) { animation-delay: .6s; }
.ag-escena.is-activa .ag-e-ficha li:nth-child(4) { animation-delay: .85s; }
.ag-escena.is-activa .ag-e-ficha li:nth-child(5) { animation-delay: 1.1s; }

.ag-e-rubros { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-e-rubros span { padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 500; color: var(--ion-dark, #3937B8); background: var(--ion-tint, #F1F0FE); opacity: 0; }
.ag-escena.is-activa .ag-e-rubros span { animation: ag-sube .4s cubic-bezier(.16,.84,.44,1) forwards; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(1) { animation-delay: 1.4s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(2) { animation-delay: 1.5s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(3) { animation-delay: 1.6s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(4) { animation-delay: 1.7s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(5) { animation-delay: 1.8s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(6) { animation-delay: 1.9s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(7) { animation-delay: 2s; }
.ag-escena.is-activa .ag-e-rubros span:nth-child(8) { animation-delay: 2.1s; }

/* 3. Semana */
.ag-e-semana { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ag-e-semana span { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--mist, #8E8D9A); }
.ag-e-semana i { display: block; height: 46px; border-radius: 10px; background: #fff; border: 1px solid var(--ag-line, #E7E6F2); }
.ag-e-semana i.ocupado { background: var(--ion-tint, #F1F0FE); border-color: rgba(75, 73, 224, .2); }
.ag-e-semana i.nueva { position: relative; }
.ag-escena.is-activa .ag-e-semana i.nueva { animation: ag-cita 1.1s .9s cubic-bezier(.16,.84,.44,1) forwards; }
@keyframes ag-cita { 0% { transform: scale(.9); } 55% { transform: scale(1.12); } 100% { transform: scale(1); background: var(--ion, #4B49E0); border-color: var(--ion, #4B49E0); } }

/* 4. Oportunidades */
.ag-e-pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ag-e-pipe > div { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(241, 240, 254, .7); min-height: 150px; }
.ag-e-pipe span { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ion-dark, #3937B8); }
.ag-e-pipe .tarjeta { display: block; height: 32px; border-radius: 9px; background: #fff; border: 1px solid var(--ag-line, #E7E6F2); }
.ag-e-pipe .t4 { background: var(--ion, #4B49E0); border-color: var(--ion, #4B49E0); opacity: 0; }
.ag-escena.is-activa .ag-e-pipe .t3 { animation: ag-sale .5s 1s ease forwards; }
.ag-escena.is-activa .ag-e-pipe .t4 { animation: ag-sube .5s 1.4s cubic-bezier(.16,.84,.44,1) forwards; }
@keyframes ag-sale { to { opacity: 0; transform: translateX(14px); } }

.ag-e-confirma {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 14px; background: #fff;
  border: 1px solid rgba(75, 73, 224, .22); font-size: 15px; color: var(--graphite, #3B3C40); opacity: 0;
}
.ag-e-confirma svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--ion, #4B49E0); }
.ag-e-confirma b { display: block; color: var(--ink, #16171A); font-weight: 600; }
.ag-escena.is-activa .ag-e-confirma { animation: ag-sube .5s 1.9s cubic-bezier(.16,.84,.44,1) forwards; }

@keyframes ag-sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ag-entra-lado { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes ag-aparece-desaparece { 0%, 100% { opacity: 0; } 15%, 80% { opacity: 1; } }

/* ---------- Cierre ---------- */
.ag-cierre { padding: 88px 0; background: var(--ink, #16171A); color: #fff; }
.ag-cierre-inner { width: min(860px, 100% - 2 * var(--gutter, 24px)); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.ag-cierre h2 { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-weight: 500; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.ag-cierre p { max-width: 54ch; font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
.ag-cierre-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.ag-cierre .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }

@media (max-width: 960px) {
  .ag-hero-inner { grid-template-columns: 1fr; }
  .ag-vive-cuerpo { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* Móvil: solo el titular y el chat, encuadrado a la pantalla (sin marco, sin extras). */
  .ag-hero {
    display: flex; flex-direction: column; align-items: center; min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
    padding: calc(var(--nav-h, 72px) + 6px) 0 12px;
  }
  .ag-hero-fondo { display: none; }
  .ag-hero-inner { flex: 1; display: flex; flex-direction: column; gap: 10px; width: calc(100% - 24px); margin: 0; min-height: 0; }
  .ag-hero-copy { gap: 0; flex: none; }
  .ag-eyebrow, .ag-sub, .ag-puntos, .ag-hero-copy .ag-alterna, .ag-flota { display: none; }
  .ag-titulo { font-size: clamp(25px, 7.4vw, 32px); line-height: 1.06; }
  .ag-escenario { flex: 1; display: flex; place-items: stretch; align-items: stretch; min-height: 0; }
  .ag-escenario [data-agente] { flex: 1; display: flex; min-height: 0; width: 100%; }
  .ag-escenario .ag-marco { flex: 1; width: 100%; padding: 0; border-radius: 22px; background: transparent; box-shadow: none; display: flex; }
  .ag-escenario .ag-marco::before, .ag-estado-tel { display: none; }
  .ag-escenario .ag-tel {
    flex: 1; height: auto; min-height: 0; border-radius: 22px;
    border: 1px solid var(--ag-line, #E7E6F2); box-shadow: 0 24px 44px -30px rgba(22, 23, 26, .5);
  }
  .ag-cab { padding-top: 12px; }
  .ag-vive, .ag-cierre { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-flota, .ag-e-escribe i { animation: none; }
  .ag-escena .ag-e-m, .ag-escena .ag-e-sello, .ag-escena .ag-e-ficha li, .ag-escena .ag-e-rubros span, .ag-escena .ag-e-confirma, .ag-escena .ag-e-pipe .t4 { opacity: 1 !important; animation: none !important; }
  .ag-escena .ag-e-escribe { display: none; }
  .ag-escena .ag-e-semana i.nueva { background: var(--ion, #4B49E0); border-color: var(--ion, #4B49E0); animation: none !important; }
  .ag-escena .ag-e-pipe .t3 { opacity: 1 !important; animation: none !important; }
}
