/* ─────────────────────────────────────────────────────────────────────
   Little Legionnaire — peeks in from the right edge after a delay,
   delivers an "insight", retracts. Repeats on an annoying cadence.
   Only ever appears on Truthsayer (not TGFDT).
   ───────────────────────────────────────────────────────────────────── */
#legion-root {
  position: fixed;
  right: -150px;             /* off-screen by default */
  bottom: 60px;
  z-index: 99996;
  display: flex; align-items: flex-end; gap: 10px;
  transition: right 700ms cubic-bezier(0.34, 1.56, 0.64, 1);   /* bouncy slide */
  pointer-events: none;
  font: 14px/1.35 -apple-system, "Segoe UI", system-ui, sans-serif;
}
#legion-root.is-peeking { right: 16px; }

.legion-bubble {
  position: relative;
  max-width: 240px;
  background: #fffaf0;
  color: #2a1b08;
  padding: 10px 14px;
  border: 2px solid #8b1a1a;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  font-style: italic;
  pointer-events: auto;
  cursor: default;
  opacity: 0;
  transition: opacity 280ms ease 250ms;   /* fades in 250 ms after slide */
}
#legion-root.is-peeking .legion-bubble { opacity: 1; }
.legion-bubble::after {
  /* speech-bubble tail pointing at the legionnaire */
  content: '';
  position: absolute;
  right: -10px; bottom: 16px;
  border: 6px solid transparent;
  border-left-color: #8b1a1a;
}
.legion-bubble::before {
  content: '';
  position: absolute;
  right: -6px; bottom: 18px;
  border: 4px solid transparent;
  border-left-color: #fffaf0;
  z-index: 1;
}
.legion-bubble .legion-close {
  position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #8b1a1a; color: #fffaf0;
  border: 0; cursor: pointer; line-height: 1;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.legion-figure { width: 140px; height: auto; display: block; }

/* Mobile — narrower bubble, slightly smaller figure */
@media (max-width: 640px) {
  .legion-figure { width: 110px; }
  .legion-bubble { max-width: 180px; font-size: 12.5px; padding: 8px 12px; }
}
