/* Chat de NaviFiesta (Lobby y salas): verde bosque y dorado, objetivos táctiles de 44 px */
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-lista { list-style: none; margin: 0; padding: 10px; height: 280px; overflow-y: auto; border-radius: 14px; background: #FFFDF8; border: 1px solid #E5DDC8; }
.chat-vacio { color: #6B6A5E; font-size: 0.9rem; text-align: center; padding: 18px 0; }
.chat-msg { padding: 6px 4px; border-bottom: 1px solid #F0EADA; overflow-wrap: anywhere; font-size: 0.95rem; }
.chat-msg:last-child { border-bottom: 0; }
.chat-autor { color: #12402A; margin-right: 6px; }
.chat-acciones { display: inline-flex; gap: 6px; margin-left: 8px; opacity: 0.55; }
.chat-msg:hover .chat-acciones, .chat-msg:focus-within .chat-acciones { opacity: 1; }
.chat-mini { min-height: 28px; padding: 2px 8px; border-radius: 8px; border: 1px solid #CFC5AA; background: transparent; color: #4A4A42; font: inherit; font-size: 0.78rem; cursor: pointer; }
.chat-aviso { background: #FFF4D6; border-radius: 10px; padding: 8px 10px; border: 0; margin: 4px 0; }
.chat-aviso a { color: #7A4B00; font-weight: 700; text-decoration: none; }
.chat-aviso a:hover { text-decoration: underline; }
.chat-error { margin: 0; padding: 8px 10px; border-radius: 10px; background: #FDE8E6; color: #8C1D18; font-size: 0.88rem; }
.chat-form { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-nombre { flex: 1 1 100%; }
.chat-texto { flex: 1 1 160px; min-width: 0; }
.chat-nombre, .chat-texto { min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid #CFC5AA; font: inherit; background: #fff; }
.chat-enviar { min-height: 44px; }
.chat-reacciones { display: flex; gap: 8px; }
.chat-reaccion { width: 48px; height: 44px; border-radius: 12px; border: 1px solid #CFC5AA; background: #FFFDF8; font-size: 1.4rem; cursor: pointer; transition: transform 0.15s; }
.chat-reaccion:hover { transform: scale(1.12); }
.chat-reaccion:active { transform: scale(0.95); }
.chat button:focus-visible, .chat input:focus-visible, .chat-fab:focus-visible { outline: 3px solid #C9A24A; outline-offset: 2px; }

/* Emoji que flota hacia arriba y desaparece en la pantalla de todos */
.chat-flota { position: fixed; bottom: 10vh; z-index: 90; font-size: 2.2rem; pointer-events: none; animation: chat-sube 2.6s ease-out forwards; }
.chat-flota.quieto { animation: chat-desvanece 1.4s ease-out forwards; bottom: 40vh; }
@keyframes chat-sube { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-6vh) scale(1.1); } 100% { transform: translateY(-62vh) translateX(18px) scale(1); opacity: 0; } }
@keyframes chat-desvanece { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

/* Chat de una sala en /jugar/: botón flotante y panel */
.chat-fab { position: fixed; left: 12px; bottom: 12px; z-index: 80; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 0; background: #12402A; color: #FFFDF8; font: inherit; font-weight: 600; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chat-fab-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #C62828; color: #fff; font-size: 0.8rem; line-height: 22px; text-align: center; }
.chat-panel { position: fixed; left: 12px; bottom: 70px; z-index: 85; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; padding: 12px; border-radius: 18px; background: #F8F5F0; border: 1px solid #CFC5AA; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3); }
.chat-panel[hidden] { display: none; }
.chat-panel-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chat-panel .chat-lista { height: 220px; }

/* Lobby: el chat general junto a las salas en pantallas anchas */
@media (min-width: 900px) { .sl-con-chat { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; } .sl-chat { position: sticky; top: 88px; } }
.sl-chat { padding: 16px; border-radius: 18px; background: #F3EEDF; border: 1px solid #E5DDC8; margin-top: 24px; }
@media (min-width: 900px) { .sl-chat { margin-top: 0; } }
.sl-chat h2 { margin: 0 0 4px; font-size: 1.15rem; }
.sl-chat-sub { margin: 0 0 10px; font-size: 0.85rem; color: #5B5A50; }

/* VIP: borde dorado y corona en el chat; Tarjeta de Perfil VIP: fondo de verde a dorado */
.chat-vip { border-left: 4px solid #C9A24A; padding-left: 8px; box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.45); border-radius: 8px; }
.chat-vip .chat-autor { color: #7A4B00; }
/* Avatar al lado del mensaje; VIP vigente: aro dorado brillante */
.chat-av { width: 1.9em; height: 1.9em; margin-right: 6px; vertical-align: middle; flex: none; }
.chat-av img { border-radius: 50%; }
.chat-av-vip { border-radius: 50%; box-shadow: 0 0 0 2px #C9A24A, 0 0 8px 2px rgba(230, 196, 108, 0.75); }
.chat-tarjeta-vip { background: linear-gradient(90deg, rgba(18, 64, 42, 0.14), rgba(201, 162, 74, 0.28)); }
.chat-estrellas { background: #FFF0C2; color: #5C3B00; font-weight: 600; }
