/* Kyra: botón flotante y panel de voz */
/* Botón flotante: solo la esfera de Kyra (la misma de PuntoCom IA), que se pasea suave por la pantalla (kyra.js) */
.kyra-fab { position: fixed; left: 0; top: 0; z-index: 60; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; will-change: transform; }
.kyra-fab-orb { display: block; width: 68px; height: 68px; border-radius: 50%; background: url("/static/kyra-esfera.webp") center / 120% no-repeat; box-shadow: 0 0 22px 4px rgba(166, 61, 232, .40), 0 8px 24px rgba(60, 20, 140, .28); animation: kyra-late 4.2s ease-in-out infinite; transition: transform .15s, box-shadow .15s; }
.kyra-fab:hover .kyra-fab-orb, .kyra-fab:focus-visible .kyra-fab-orb { transform: scale(1.12); box-shadow: 0 0 28px 8px rgba(166, 61, 232, .55), 0 8px 24px rgba(60, 20, 140, .3); }
.kyra-fab:focus-visible { outline: 3px solid #b05cf7; outline-offset: 3px; }
@keyframes kyra-late { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18) saturate(1.1); } }
@media (max-width: 760px) { .kyra-fab-orb { width: 58px; height: 58px; } }
@media (prefers-reduced-motion: reduce) { .kyra-fab-orb { animation: none; } }

.kyra-panel { position: fixed; right: 22px; bottom: 22px; z-index: 61; width: min(370px, calc(100vw - 24px)); max-height: calc(100vh - 44px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px 10px; border-radius: 22px; background: radial-gradient(120% 90% at 50% 0%, #2a1650 0%, #120d22 55%, #0b0814 100%); border: 1px solid #5b3fa8; box-shadow: 0 24px 60px rgba(0, 0, 0, .65), 0 0 40px rgba(123, 63, 228, .25); --lvl: 0; }
.kyra-panel header { align-self: stretch; display: flex; justify-content: space-between; align-items: flex-start; }
.kyra-panel header b { display: block; font: 800 20px/1.1 "Barlow", sans-serif; }
.kyra-panel header small { color: #b9a6e6; font-size: 12px; }
.kyra-close { border: 0; background: #ffffff12; color: #ddd; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 17px; }
.kyra-close:hover { background: #ffffff25; }

.kyra-sphere { position: relative; width: 132px; height: 132px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; flex: none; }
.kyra-sphere .core { width: 100%; height: 100%; border-radius: 50%; background: url("/static/kyra-esfera.webp") center / 118% no-repeat; box-shadow: 0 0 34px rgba(176, 92, 247, .65); transform: scale(calc(1 + var(--lvl) * .22)); transition: transform .08s linear; animation: kbreath 3.2s ease-in-out infinite; }
@keyframes kbreath { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
.kyra-panel[data-mode="listening"] .core { box-shadow: 0 0 0 6px rgba(176, 92, 247, .25), 0 0 54px rgba(200, 120, 255, .85); }
.kyra-panel[data-mode="speaking"] .core { animation: kspeak .7s ease-in-out infinite; }
@keyframes kspeak { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.kyra-panel[data-mode="thinking"] .core { animation: kthink 2.4s linear infinite; }
@keyframes kthink { to { transform: rotate(360deg); } }
.kyra-status { margin: 0; min-height: 20px; color: #cdbdf3; font-size: 14px; text-align: center; }

.kyra-log { align-self: stretch; display: grid; gap: 6px; max-height: 26vh; overflow: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: #4a3a80 transparent; }
.kmsg { padding: 7px 11px; border-radius: 12px; font-size: 13.5px; line-height: 1.35; max-width: 92%; }
.kmsg.user { justify-self: end; background: #5b3fd1; }
.kmsg.bot { justify-self: start; background: #221538; border: 1px solid #3a2766; }

.kyra-bar { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 2px; }
.kyra-mic { width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; font-size: 28px; color: #fff; background: linear-gradient(135deg, #b05cf7, #6b3fe0); box-shadow: 0 6px 20px rgba(123, 63, 228, .55); display: grid; place-items: center; }
.kyra-mic.rec { background: linear-gradient(135deg, #ff6b8a, #e0245e); box-shadow: 0 0 0 6px rgba(255, 107, 138, .25), 0 6px 20px rgba(224, 36, 94, .55); animation: krec 1.1s ease-in-out infinite; }
@keyframes krec { 50% { transform: scale(1.06); } }
.kyra-ico { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #4a3a80; background: #1a1230; color: #b9a6e6; cursor: pointer; font-size: 19px; display: grid; place-items: center; }
.kyra-ico.on { background: #3a2380; color: #fff; border-color: #b05cf7; }
.kyra-form { align-self: stretch; display: flex; gap: 6px; }
.kyra-input { flex: 1; min-width: 0; height: 38px; border-radius: 10px; border: 1px solid #4a3a80; background: #0c0818; color: #f4f4f8; padding: 0 12px; font: 400 14px "Barlow", sans-serif; }
.kyra-input:focus { outline: 2px solid #b05cf7; outline-offset: 1px; }
.kyra-form button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #b05cf7; color: #fff; cursor: pointer; font-size: 17px; }
.kyra-foot { margin: 0; color: #7c6fa8; font-size: 11px; text-align: center; }

@media (max-width: 980px) {
  .kyra-panel { right: 12px; left: 12px; bottom: 12px; width: auto; }
}
@media (max-height: 640px) {
  .kyra-sphere { width: 92px; height: 92px; }
  .kyra-log { max-height: 16vh; }
}
