@font-face { font-family: "Manrope"; src: url("/fuentes/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --cristal: rgba(17, 22, 30, .88);
  --cristal-borde: rgba(255, 255, 255, .1);
  --texto: #f3f6f9;
  --apagado: #9fb0bd;
  --tenue: #7f8f9d;
  --linea: rgba(255, 255, 255, .1);
  --acento: #37d6ef;
  --acento-hondo: #1e9df0;
  --acento-mas: #1546d6;
  --persona: #eef3f6;
  --persona-texto: #10151a;
  --iris: rgba(255, 255, 255, .08);
  --aviso: #f3c76a;
  --sombra: 0 24px 70px rgba(0, 0, 0, .52), 0 2px 8px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #f6f1ea; color: var(--texto); font: 500 16px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }

.demo { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #f6f1ea; }

.volver {
  position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 20;
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(17, 22, 30, .82); color: #fff; text-decoration: none; font-weight: 700; font-size: 13.5px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: .82; transition: opacity .2s;
}
.volver:hover { opacity: 1; }

.ventana {
  position: fixed; right: 24px; bottom: 24px; z-index: 10;
  width: 420px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column;
  background: var(--cristal); border: 1px solid var(--cristal-borde); border-radius: 26px;
  -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5);
  box-shadow: var(--sombra); overflow: hidden; transition: left .35s ease, right .35s ease;
}
.ventana.izquierda { right: auto; left: 24px; }

.barra { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 4px 18px; }
.marca { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.marca::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 10px var(--acento); }
.botones { display: flex; gap: 3px; align-items: center; }
.icono { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--apagado); flex: none; }
.icono:hover { background: rgba(255, 255, 255, .08); color: var(--texto); }
.icono svg { width: 19px; height: 19px; }
.icono[aria-pressed="true"], .icono[aria-expanded="true"] { color: var(--acento); }
.barra .inicio { display: none; text-decoration: none; }

.charla { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 6px 18px 12px; --giro: 0deg; }
.ojo-caja { position: relative; width: 92px; height: 72px; display: grid; place-items: center; }
.ojo { position: relative; width: 88px; height: auto; animation: respirar 4.5s ease-in-out infinite; }
@keyframes respirar { 50% { transform: scale(1.04); } }
.halo { position: absolute; inset: 9px 4px; border-radius: 50%; background: conic-gradient(from var(--giro), var(--acento), var(--acento-hondo), var(--acento-mas), #8ff3c9, var(--acento)); filter: blur(17px); opacity: .25; transition: opacity .3s; }
.charla[data-estado="hablando"] .halo, .charla[data-estado="pensando"] .halo { opacity: .7; animation: girar 3s linear infinite; }
.charla[data-estado="escuchando"] .halo { opacity: .85; }
@property --giro { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@keyframes girar { to { --giro: 360deg; } }
.charla-texto { min-width: 0; }
.subtitulo { margin: 0; font-size: 18px; line-height: 1.5; text-wrap: pretty; max-height: 9em; overflow-y: auto; }
.subtitulo.oyendo { color: var(--apagado); font-style: italic; }
.estado { margin: 4px 0 0; color: var(--acento); font-size: 13px; min-height: 1.2em; font-weight: 700; letter-spacing: .02em; }

.recorrido { padding: 0 18px 12px; }
.recorrido-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.recorrido-paso { font-size: 13.5px; color: var(--apagado); font-weight: 700; }
.recorrido-controles { display: flex; gap: 6px; flex: none; }
.recorrido-btn { border: 1px solid var(--linea); background: rgba(255, 255, 255, .05); color: var(--texto); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; min-height: 34px; }
.recorrido-btn:hover { border-color: var(--acento); color: var(--acento); }
.recorrido-btn.apagado { color: var(--apagado); font-weight: 600; }
.recorrido-pista { height: 7px; display: flex; gap: 3px; }
.recorrido-tramo { flex: 1; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; position: relative; }
.recorrido-tramo.hecho { background: var(--acento); }
.recorrido-tramo.ahora::after { content: ""; position: absolute; inset: 0; background: var(--acento); border-radius: 999px; transform-origin: left; transform: scaleX(var(--avance, 0)); transition: transform .25s linear; }
.recorrido.en-pausa .recorrido-tramo.ahora::after { background: var(--aviso); }

.hilo { display: none; overflow-y: auto; padding: 10px 16px 6px; flex-direction: column; gap: 10px; max-height: min(42vh, 420px); border-bottom: 1px solid var(--linea); }
.ventana[data-tam="ampliada"] .hilo { display: flex; }
.burbuja { max-width: 90%; padding: 9px 14px; border-radius: 17px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; flex-shrink: 0; }
.burbuja.iris { background: var(--iris); border-bottom-left-radius: 5px; align-self: flex-start; }
.burbuja.persona { background: var(--persona); color: var(--persona-texto); border-bottom-right-radius: 5px; align-self: flex-end; }

.tarjeta-caja { margin: 0 18px 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--linea); font-size: 14.5px; color: #d6dee4; }
.tarjeta-caja b { color: var(--texto); display: block; margin-bottom: 4px; font-size: 15.5px; }
.tarjeta-caja a.whatsapp { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 48px; border-radius: 14px; background: #1fa855; color: #fff; text-decoration: none; font-weight: 800; }

.opciones { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 12px; }
.opciones:empty { display: none; }
.opciones button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  border: 1.5px solid rgba(55, 214, 239, .45); color: #d7f8fe; background: rgba(55, 214, 239, .09);
  border-radius: 14px; padding: 11px 16px; cursor: pointer; font-size: 15.5px; font-weight: 700; text-align: left; min-height: 48px;
}
.opciones button::after { content: "›"; font-size: 20px; line-height: 1; color: var(--acento); opacity: .7; }
.opciones button:hover { background: rgba(55, 214, 239, .2); border-color: var(--acento); }
.opciones button:first-child { background: rgba(55, 214, 239, .17); border-color: rgba(55, 214, 239, .7); }

.pie { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px 14px; border-top: 1px solid var(--linea); }
.hablar {
  display: flex; align-items: center; gap: 8px; flex: none; border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
  font-weight: 800; font-size: 15px; color: #04121a; min-height: 48px;
  background: linear-gradient(135deg, var(--acento), var(--acento-hondo) 60%, var(--acento-mas)); box-shadow: 0 6px 20px rgba(55, 214, 239, .25);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.hablar svg { width: 19px; height: 19px; }
.hablar[aria-pressed="true"] { color: #fff; background: #e5484d; box-shadow: 0 6px 20px rgba(229, 72, 77, .3); }
.forma { flex: 1; min-width: 0; display: flex; gap: 7px; align-items: flex-end; }
.forma textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--linea); border-radius: 18px; padding: 12px 14px; background: rgba(255, 255, 255, .07); color: var(--texto); line-height: 1.4; max-height: 110px; font-size: 15.5px; }
.forma textarea::placeholder { color: var(--apagado); }
.forma textarea:focus { border-color: var(--acento); outline: none; }
.enviar { width: 48px; height: 48px; background: rgba(255, 255, 255, .1); color: var(--texto); }

.bienvenida { padding: 4px 18px 18px; font-size: 14.5px; overflow-y: auto; }
.bienvenida p { margin: 0 0 10px; color: #d6dee4; }
.bienvenida .titular { font-size: 19px; font-weight: 800; color: var(--texto); margin-bottom: 6px; }
.bienvenida details { margin: 2px 0 14px; }
.bienvenida summary { cursor: pointer; color: var(--acento); font-weight: 700; font-size: 13.5px; list-style: none; }
.bienvenida summary::-webkit-details-marker { display: none; }
.bienvenida details[open] summary { margin-bottom: 8px; }
.bienvenida details p { font-size: 13px; color: var(--apagado); }
.principal { width: 100%; padding: 13px; border-radius: 15px; border: 0; color: #04121a; font-weight: 800; font-size: 16.5px; cursor: pointer; min-height: 54px; background: linear-gradient(135deg, var(--acento), var(--acento-hondo) 60%, var(--acento-mas)); box-shadow: 0 6px 20px rgba(55, 214, 239, .3); }
.principal:disabled { opacity: .55; cursor: progress; }

.burbuja-ojo { position: fixed; right: 22px; bottom: 22px; z-index: 11; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--cristal-borde); background: var(--cristal); display: grid; place-items: center; cursor: pointer; box-shadow: var(--sombra); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.burbuja-ojo img { position: relative; width: 60px; height: auto; }
.burbuja-ojo .halo { inset: 14px; opacity: .55; animation: girar 4s linear infinite; }

@media (max-width: 640px) {
  .ventana, .ventana.izquierda { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; max-height: 62vh; border-radius: 22px; }
  .charla { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 4px 14px 10px; }
  .ojo-caja { width: 64px; height: 52px; }
  .ojo { width: 62px; }
  .subtitulo { font-size: 16px; }
  .hablar span { display: none; }
  .hablar { padding: 11px 14px; }
  .volver { display: none; }
  .barra .inicio { display: grid; }
}
