/* public/seiya.css — Seiya de Pegasus: avatar animado + chat (partes 146-152).
   Parte 153: compartido por las dos vistas (index.html y beta.html). Usa las variables de color
   de cada página (--panel-border, --text, --muted, --green, --amber, --red). */
.seiya-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  width: 68px; height: 68px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(245,197,66,0.55);
  background: radial-gradient(circle at 35% 30%, #1d2a44 0%, #0b1220 70%);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 0 rgba(245,197,66,0.4);
  animation: seiyaBreath 4s ease-in-out infinite;
}
.seiya-fab:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.seiya-fab .seiya-tag {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  background: #0b1220; color: #f5c542; border: 1px solid rgba(245,197,66,0.5);
  font: 600 9px/1 'JetBrains Mono', monospace; letter-spacing: .08em; padding: 3px 6px; border-radius: 999px;
}
.seiya-avatar { width: 100%; height: 100%; display: block; }
.seiya-avatar .lines { stroke: rgba(245,197,66,0.55); stroke-width: 1.8; fill: none; stroke-linecap: round;
  stroke-dasharray: 160; stroke-dashoffset: 0; }
.seiya-avatar .star { fill: #ffe9a8; transform-box: fill-box; transform-origin: center; animation: seiyaTwinkle 3s ease-in-out infinite; }
.seiya-avatar .star.big { fill: #fff3c4; }
.seiya-avatar .star:nth-of-type(2n) { animation-delay: .7s; }
.seiya-avatar .star:nth-of-type(3n) { animation-delay: 1.4s; }
.seiya-avatar .halo { fill: none; stroke: rgba(245,197,66,0.0); stroke-width: 2; }
.seiya-thinking .seiya-avatar .lines { animation: seiyaDraw 1.6s linear infinite; stroke: rgba(245,197,66,0.85); }
.seiya-thinking .seiya-avatar .halo { animation: seiyaHalo 1.2s ease-out infinite; }
.seiya-speaking .seiya-avatar .star { animation-duration: .6s; }
.seiya-speaking .seiya-avatar .halo { animation: seiyaHalo 0.9s ease-out infinite; }
@keyframes seiyaTwinkle { 0%,100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes seiyaDraw { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
@keyframes seiyaHalo { from { stroke: rgba(245,197,66,0.7); r: 40; } to { stroke: rgba(245,197,66,0); r: 49; } }
@keyframes seiyaBreath { 0%,100% { box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 0 rgba(245,197,66,0.25); } 50% { box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 8px rgba(245,197,66,0); } }
@media (prefers-reduced-motion: reduce) {
  .seiya-fab, .seiya-avatar .star, .seiya-avatar .lines, .seiya-avatar .halo { animation: none !important; }
}
.seiya-panel {
  position: fixed; right: 16px; bottom: 96px; z-index: 901;
  width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 130px));
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid rgba(245,197,66,0.35); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6); overflow: hidden;
}
.seiya-panel[hidden] { display: none; }
.seiya-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #121c30, var(--panel)); }
.seiya-head .mini { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; border: 1px solid rgba(245,197,66,0.5);
  background: radial-gradient(circle at 35% 30%, #1d2a44 0%, #0b1220 70%); }
.seiya-head .who { flex: 1; min-width: 0; }
.seiya-head .who b { display: block; color: #f5c542; font-size: 14px; letter-spacing: .02em; }
.seiya-head .who span { color: var(--muted); font-size: 11px; }
.seiya-head button { background: transparent; border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 8px; min-width: 34px; min-height: 34px; cursor: pointer; font-size: 14px; }
.seiya-head button.on { border-color: var(--green); color: var(--green); }
.seiya-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.seiya-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.seiya-msg.bot { align-self: flex-start; background: #141d2c; border: 1px solid #22314a; }
.seiya-msg.me { align-self: flex-end; background: rgba(91,156,246,0.16); border: 1px solid rgba(91,156,246,0.4); }
.seiya-msg.err { align-self: flex-start; color: var(--amber); background: transparent; border: 1px dashed rgba(245,166,35,0.5); }
.seiya-msg.typing { color: var(--muted); font-style: italic; }
.seiya-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 8px; }
.seiya-chips button { flex: 0 0 auto; background: transparent; border: 1px solid rgba(245,197,66,0.4); color: #f5c542;
  border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; min-height: 32px; font-family: inherit; }
.seiya-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--panel-border); }
.seiya-input textarea { flex: 1; resize: none; height: 42px; max-height: 120px; background: #0b1018; color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 10px; padding: 10px; font: 13px/1.4 inherit; font-family: inherit; }
.seiya-input button { background: #f5c542; color: #1a1300; border: none; border-radius: 10px; padding: 0 14px; font-weight: 700; cursor: pointer; min-width: 64px; }
.seiya-input button:disabled { opacity: .5; cursor: default; }
/* Parte 148: micrófono para hablarle a Seiya */
.seiya-input button.seiya-mic { background: transparent; color: var(--text); border: 1px solid var(--panel-border); min-width: 44px; padding: 0 10px; font-weight: 400; font-size: 18px; }
.seiya-input button.seiya-mic.on { border-color: var(--red); color: var(--red); animation: seiyaMicPulse 1s ease-in-out infinite; }
@keyframes seiyaMicPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(240,85,107,0.5); } 50% { box-shadow: 0 0 0 6px rgba(240,85,107,0); } }
.seiya-listening .seiya-avatar .halo { animation: seiyaHalo 1.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .seiya-input button.seiya-mic.on, .seiya-listening .seiya-avatar .halo { animation: none !important; } }
.seiya-foot { color: var(--muted); font-size: 10px; text-align: center; padding: 0 12px 8px; }
/* Parte 202a: Atenea en el mismo chat (selector y sus mensajes en violeta) */
.seiya-modo { display: flex; gap: 6px; padding: 8px 12px 0; }
.seiya-modo[hidden] { display: none; }
.seiya-modo button { flex: 1; background: transparent; border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 999px; padding: 6px 8px; font-size: 12px; cursor: pointer; min-height: 32px; font-family: inherit; }
.seiya-modo button.on { border-color: #f5c542; color: #f5c542; }
.seiya-modo button[data-modo="atenea"].on { border-color: #a78bfa; color: #a78bfa; }
.seiya-msg.bot.atenea { background: #1a1630; border-color: #3b3168; }
.seiya-who { display: block; font-size: 11px; color: #f5c542; margin-bottom: 3px; }
.seiya-msg.atenea .seiya-who { color: #a78bfa; }
/* Parte 208: se ve quién habla (Seiya: su constelación; Atenea: su logo con estrellas que titilan, más rápido y con
   el dibujo más brillante mientras habla) y la burbuja y el chat se arrastran con el mouse o el dedo */
.avatar-seiya, .avatar-atenea { display: block; width: 100%; height: 100%; }
.avatar-atenea { display: none; position: relative; border-radius: 50%; overflow: hidden; }
.es-atenea .avatar-seiya { display: none; }
.es-atenea .avatar-atenea { display: block; }
.avatar-atenea img, .avatar-atenea .seiya-avatar { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar-atenea img { object-fit: cover; }
.avatar-atenea .star, .avatar-atenea .star.big { fill: #fff6d6; }
.seiya-speaking .avatar-atenea img { animation: ateneaGlow 1.2s ease-in-out infinite; }
@keyframes ateneaGlow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35) saturate(1.15); } }
.seiya-fab, .seiya-head { touch-action: none; }
.seiya-head { cursor: grab; user-select: none; -webkit-user-select: none; }
.seiya-head .who span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seiya-moviendo, .seiya-moviendo .seiya-head { cursor: grabbing; }
.seiya-fab.seiya-moviendo { animation: none; }
@media (prefers-reduced-motion: reduce) { .seiya-speaking .avatar-atenea img { animation: none !important; } }
@media (max-width: 520px) {
  .seiya-panel { right: 0; left: 0; bottom: 0; width: 100vw; height: 78vh; border-radius: 14px 14px 0 0; }
  .seiya-fab.open { display: none; }
}
