/* ════════════════════════════════════════════════════════════════════
   lobby-anfitrion.css — la voz de tu party sigue en las demás pestañas
   (Edgar 2026-10-16). El porqué y las piezas, en js/lobby-anfitrion.js.

   Dos cosas:
   · LA CAPA: el marco donde el lobby abre Cursos, Ideas, Social, Mensajes
     o Perfil sin irse (si se fuera, la voz se cortaría). Tapa el lobby
     entero, menú y barra incluidos: la página de dentro trae los suyos.
     Mientras está, el lobby no se pinta ni anima (visibility y las
     animaciones en pausa): la voz sigue, el escenario descansa.
   · LA PASTILLA: la voz a la vista, como la de Discord. Quién habla con su
     Pío, tu micrófono y salir. En computadora abajo a la izquierda del
     contenido (donde acaba el menú); en el teléfono encima de la barra de
     abajo. Dentro del lobby solo sale cuando el escenario está tapado
     (en «Elige un modo»): con el escenario a la vista ya está el botón
     del micrófono y cada caja dice «Hablando», y Edgar no quiere dos
     micrófonos (2026-10-08).
   ════════════════════════════════════════════════════════════════════ */

/* ── La capa ── */
.lb-anf {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1500;
  background: #0E0819;
  /* Dentro, el marco mide el alto visible de verdad (lobby-anfitrion.js lo
     ajusta con visualViewport): así, con el teclado del teléfono abierto,
     lo que la página de dentro tiene pegado abajo (el campo de comentar)
     sube con él. */
  overflow: hidden; -webkit-overflow-scrolling: touch;
}
.lb-anf iframe { display: block; width: 100%; height: 100%; min-width: 100%; border: 0; background: #0E0819; }
/* Mientras la página de dentro no ha dicho «aquí estoy», un aro (el
   mismo del vestidor): el marco ya ocupa su sitio, pero sin salto. */
.lb-anf-aro {
  position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 3px solid rgba(196, 166, 255, .25); border-top-color: #C4A6FF; animation: lb-anf-gira .8s linear infinite;
  pointer-events: none;
}
.lb-anf.is-listo .lb-anf-aro { display: none; }
@keyframes lb-anf-gira { to { transform: rotate(360deg); } }

/* El lobby descansa mientras aloja: no se pinta y sus animaciones (el
   Pío, los pedestales, los avisos) se quedan quietas. visibility y no
   display: el escenario conserva su medida y al volver no se reacomoda. */
html[data-anfitrion] .lb, html[data-anfitrion] .header, html[data-anfitrion] .bottom-nav { visibility: hidden !important; }
html[data-anfitrion] .lb * { animation-play-state: paused !important; }
body.lb-anf-abierto { overflow: hidden; }

/* ── La pastilla ── */
.lb-pastilla {
  position: fixed; z-index: 1600; left: calc(var(--riel-w, 0px) + 16px); bottom: 16px;
  display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 6px 0 6px; border-radius: 999px;
  color: #F4F0FF; font-family: 'Nunito', system-ui, sans-serif;
  background: rgba(20, 14, 34, .94); border: 1px solid rgba(196, 166, 255, .22);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .25);
  animation: lb-pastilla-entra .45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.lb-pastilla[hidden] { display: none; }
@keyframes lb-pastilla-entra { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.lb-pastilla button {
  appearance: none; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; margin: 0;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lb-pastilla button:focus { outline: none; }
.lb-pastilla button:focus-visible { outline: 2px solid #FF8A00; outline-offset: 2px; border-radius: 999px; }

/* Quién: los Píos de tu party (hasta cuatro) y una línea de texto. Es un
   botón mientras el lobby aloja otra página: te regresa al lobby. */
.lb-pastilla-quien { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 2px; border-radius: 999px; text-align: left; min-width: 0; }
.lb-pastilla-quien:not([disabled]):hover { background: rgba(255, 255, 255, .06); }
.lb-pastilla-pios { display: flex; align-items: center; flex-shrink: 0; }
.lb-pastilla-pio {
  position: relative; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: rgba(139, 92, 246, .3); box-shadow: 0 0 0 2px #171026;
  transition: box-shadow .18s ease, transform .18s ease;
}
.lb-pastilla-pio + .lb-pastilla-pio { margin-left: -9px; }
.lb-pastilla-pio > .pio, .lb-pastilla-pio > span { width: 100%; height: 100%; display: block; }
/* Hablando: el aro rosa del lobby (--lb-rosa), que respira. */
.lb-pastilla-pio.is-habla { box-shadow: 0 0 0 2px #171026, 0 0 0 4px #F472B6; z-index: 1; animation: lb-pastilla-late .9s ease-in-out infinite; }
@keyframes lb-pastilla-late { 50% { transform: scale(1.07); } }
.lb-pastilla-pio.is-off { opacity: .45; }
.lb-pastilla-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.15; }
.lb-pastilla-tx b { font-size: 12.5px; font-weight: 900; letter-spacing: .2px; white-space: nowrap; }
.lb-pastilla-tx small { font-size: 11.5px; font-weight: 700; color: #B9AFD0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.lb-pastilla.is-hablan .lb-pastilla-tx small { color: #F9A8D4; }

/* Los dos redondos: tu micrófono y salir de la voz. */
.lb-pastilla-mic, .lb-pastilla-salir {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1.5px solid transparent;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.lb-pastilla-mic:hover, .lb-pastilla-salir:hover { background: rgba(255, 255, 255, .14); }
.lb-pastilla-mic[aria-pressed="true"] { border-color: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.lb-pastilla-mic[aria-pressed="false"] { color: #FCA5A5; background: rgba(60, 18, 32, .82); border-color: rgba(248, 113, 113, .45); }
.lb-pastilla.is-yo-hablo .lb-pastilla-mic { border-color: #F472B6; box-shadow: 0 0 0 4px rgba(244, 114, 182, .3); }
.lb-pastilla-salir { color: #FCA5A5; }
.lb-pastilla-salir:hover { background: rgba(248, 113, 113, .18); }
.lb-pastilla-salir[hidden] { display: none; }

/* En el teléfono: encima de la barra de abajo, pegada a la izquierda. El
   texto se acorta para que quepa con los Píos y los dos botones. */
@media (max-width: 760px) {
  .lb-pastilla { left: 10px; bottom: calc(var(--bnav-h, 50px) + 10px); height: 48px; max-width: calc(100% - 20px); }
  .lb-pastilla-tx small { max-width: 130px; }
  .lb-pastilla-pio { width: 30px; height: 30px; }
  .lb-pastilla-mic, .lb-pastilla-salir { width: 40px; height: 40px; }
}
@media (max-width: 360px) {
  .lb-pastilla-tx small { max-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-pastilla, .lb-anf-aro { animation: none; }
  .lb-pastilla-pio.is-habla { animation: none; }
}
