/* POLARIS - hoja unica. Dos familias (POLARIS_DISENO.md):
   pantallas administrativas claras (familia web de Freylesoft, como ARQA) y sala en vivo oscura y neutra.
   Sin sombras, sin degradados, sin chips ni pildoras, sin iconos. Tipografias servidas desde la aplicacion. */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  --texto: #1d1d1f; --texto-suave: #6e6e73;
  --borde: #e8e8ed; --borde-fuerte: #d2d2d7; --separador: #f1f1f4;
  --fondo: #f5f5f7; --blanco: #ffffff;
  --navy: #00205b; --navy-hover: #003087;
  --info-fondo: #eef2f9; --info-borde: #cfdcef;
  --ok: #007a3d; --ok-fondo: #eef8f2; --ok-borde: #bfe3cf;
  --revisar: #8a5a00; --revisar-fondo: #fff6e6; --revisar-borde: #f0d9a8;
  --falta: #a3213f; --falta-fondo: #fdf0f3; --falta-borde: #efc9d4;
  --radius: 8px; --radius-lg: 12px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Consolas', monospace;

  /* Sala oscura */
  --s-fondo: #14161b; --s-barra: #0d0f13; --s-relleno: #262a33; --s-borde: rgba(190, 196, 208, 0.55);
  --s-activo: #343a46; --s-texto: #f2f3f5; --s-texto2: #b3b8c2; --s-texto3: #8f95a1; --s-linea: rgba(190, 196, 208, 0.20);
  --s-acento: #2f5fe0; --s-banda: #2449b8; --s-aro: #6f9bff;
  --s-ayuda: #f59e0b; --s-ayuda-txt: #fcd34d; --s-habla: #93c5fd; --s-mic: #4ade80; --s-mic-txt: #052e16;
  --s-peligro: #f87171; --s-peligro-txt: #fecaca;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.45; color: var(--texto); background: var(--fondo); }
a { color: var(--navy); }
a:hover { color: var(--navy-hover); }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.cifra, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.oculto { display: none !important; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.txt-ok { color: var(--ok); font-weight: 600; }
.txt-info { color: var(--navy); font-weight: 600; }
.txt-revisar { color: var(--revisar); font-weight: 600; }
.txt-falta { color: var(--falta); font-weight: 600; }
.txt-suave { color: var(--texto-suave); }
.derecha { text-align: right; }

/* ------------------------------------------------------------------ */
/* Botones y campos (claros)                                           */
/* ------------------------------------------------------------------ */
.boton, .boton-sec, .boton-peligro, .boton-texto {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border-radius: var(--radius); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.boton { border: 1px solid var(--navy); background: var(--navy); color: #fff; }
.boton:hover { background: var(--navy-hover); color: #fff; }
.boton-sec { border: 1px solid var(--borde-fuerte); background: #fff; color: var(--texto); font-weight: 500; }
.boton-sec:hover { border-color: var(--texto-suave); color: var(--texto); }
.boton-peligro { border: 1px solid var(--falta); background: #fff; color: var(--falta); }
.boton-texto { border: 0; background: transparent; color: var(--navy); padding: 0 8px; font-weight: 500; }
.boton-grande { min-height: 50px; font-size: 16px; }
.boton-chico { min-height: 40px; padding: 0 14px; font-size: 13px; }
button:disabled, .boton[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.boton-ancho { width: 100%; }

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label, .etiqueta { font-size: 13px; font-weight: 500; }
.campo input[type=text], .campo input[type=email], .campo input[type=password], .campo input[type=number], .campo input[type=date],
.campo input[type=datetime-local], .campo input[type=search], .campo select, .campo textarea, .entrada-texto {
  min-height: 46px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--borde-fuerte); background: #fff;
  color: var(--texto); font-family: inherit; font-size: 16px; width: 100%;
}
.campo textarea { padding: 10px 12px; min-height: 110px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.campo .ayuda { font-size: 13px; color: var(--texto-suave); }
.campo .error { font-size: 13px; color: var(--falta); font-weight: 500; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.casilla input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--navy); }
.fila-botones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.en-linea { display: inline; }

.aviso { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--info-borde); background: var(--info-fondo); font-size: 14px; }
.aviso-ok { border-color: var(--ok-borde); background: var(--ok-fondo); color: #0b4a2a; }
.aviso-error { border-color: var(--falta-borde); background: var(--falta-fondo); color: #6d1229; }
.aviso-revisar { border-color: var(--revisar-borde); background: var(--revisar-fondo); color: #5c3c00; }

/* ------------------------------------------------------------------ */
/* Pantallas administrativas                                           */
/* ------------------------------------------------------------------ */
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 10px 40px; background: #fff; border-bottom: 1px solid var(--borde-fuerte); }
.marca { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.marca b { font-size: 17px; line-height: 19px; font-weight: 700; letter-spacing: 0.04em; color: var(--navy); }
.marca span { font-size: 9px; line-height: 10px; font-weight: 700; letter-spacing: 0.15em; color: var(--texto-suave); }
.menu { display: flex; flex-wrap: wrap; gap: 4px; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; text-decoration: none; color: var(--texto-suave); border-bottom: 2px solid transparent; }
.menu a.activo { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.barra-usuario { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--texto-suave); }

.pagina { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 24px; }
.encabezado { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.encabezado > div:first-child { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sobretitulo { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }
.encabezado h1 { font-size: 28px; line-height: 34px; }
.subtitulo { font-size: 15px; line-height: 22px; color: var(--texto-suave); max-width: 680px; }
.seccion { display: flex; flex-direction: column; gap: 10px; }
.seccion h2 { font-size: 17px; line-height: 23px; }
.seccion-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.rejilla { display: flex; flex-wrap: wrap; gap: 12px; }
.rejilla > * { flex: 1 1 420px; min-width: 0; }

.tarjeta { padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--borde); background: #fff; display: flex; flex-direction: column; gap: 12px; }
.tarjeta-info { border-radius: var(--radius-lg); border: 1px solid var(--info-borde); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.tarjeta-info .cab { padding: 10px 20px; background: var(--info-fondo); border-bottom: 1px solid var(--info-borde); font-size: 13px; font-weight: 600; color: var(--navy); }
.tarjeta-info .cuerpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.etiqueta-suave { font-size: 13px; font-weight: 500; color: var(--texto-suave); }
.enlace-salon { font-family: var(--mono); font-size: 15px; line-height: 22px; font-weight: 500; color: var(--navy); word-break: break-all; }
.cifras { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.cifras > div { display: flex; flex-direction: column; }
.cifras .grande { font-family: var(--mono); font-size: 26px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cifras .pie { font-size: 12px; color: var(--texto-suave); }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 14px; }
.datos dt { color: var(--texto-suave); }
.datos dd { margin: 0; }

.tabla-caja { border-radius: var(--radius-lg); border: 1px solid var(--borde); background: #fff; overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; }
.tabla th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-suave); background: var(--fondo); white-space: nowrap; }
.tabla td { padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--separador); vertical-align: top; }
.tabla td.num, .tabla th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tabla td.acciones { text-align: right; padding-top: 6px; padding-bottom: 6px; white-space: nowrap; }
.tabla a { text-decoration: none; font-weight: 500; }
.tabla .vacia { color: var(--texto-suave); text-align: center; padding: 24px; }

.pestanas { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--borde-fuerte); }
.pestanas a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 14px; text-decoration: none; color: var(--texto-suave); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pestanas a.activo { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filtros .campo { min-width: 180px; }
.barra-escala { display: flex; height: 10px; border-radius: 4px; overflow: hidden; background: var(--separador); min-width: 160px; }
.barra-escala span { display: block; background: var(--navy); }
.formulario { max-width: 680px; display: flex; flex-direction: column; gap: 18px; }

/* Pantallas de entrada del participante e ingreso: fondo claro, tarjeta blanca. */
body.entrada { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.tarjeta-entrada { width: 100%; max-width: 520px; padding: 28px; border-radius: 14px; border: 1px solid var(--borde-fuerte); background: #fff; display: flex; flex-direction: column; gap: 18px; }
.tarjeta-entrada.ancha { max-width: 640px; }
.tarjeta-entrada .marca b { font-size: 22px; line-height: 24px; }
.tarjeta-entrada .marca span { font-size: 10px; line-height: 12px; }
.tarjeta-entrada h1 { font-size: 24px; line-height: 30px; }
.tarjeta-entrada .texto { font-size: 15px; line-height: 22px; color: var(--texto-suave); }
.consentimiento { font-size: 13px; line-height: 19px; color: var(--texto-suave); padding: 12px 14px; background: var(--fondo); border-radius: var(--radius); }
.lista-chequeo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lista-chequeo li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--borde); border-radius: var(--radius); }
.lista-chequeo li .nombre { font-weight: 600; min-width: 150px; }
.lista-chequeo li .estado { font-size: 14px; }
.lista-chequeo li .detalle { font-size: 13px; color: var(--texto-suave); }

/* Dialogos (confirmaciones) */
.velo { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(29, 29, 31, 0.55); }
.dialogo { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--borde-fuerte); background: #fff; }
.dialogo h2 { font-size: 19px; line-height: 25px; }
.dialogo p { font-size: 14px; line-height: 20px; color: var(--texto-suave); }

/* ------------------------------------------------------------------ */
/* Sala en vivo (oscura y neutra)                                      */
/* ------------------------------------------------------------------ */
body.sala { background: var(--s-fondo); color: var(--s-texto); min-height: 100vh; display: flex; flex-direction: column; }
body.sala a { color: var(--s-habla); }
.s-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 10px 16px; background: var(--s-barra); border-bottom: 1px solid rgba(190, 196, 208, 0.18); }
.s-marca { display: flex; flex-direction: column; gap: 2px; }
.s-marca b { font-size: 16px; line-height: 18px; font-weight: 700; letter-spacing: 0.04em; }
.s-marca span { font-size: 9px; line-height: 10px; font-weight: 700; letter-spacing: 0.15em; color: var(--s-texto3); }
.s-titulo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s-titulo b { font-size: 15px; line-height: 20px; font-weight: 600; }
.s-titulo span { font-size: 12px; line-height: 16px; color: var(--s-texto2); }
.s-reloj { display: flex; flex-direction: column; gap: 2px; }
.s-reloj b { font-family: var(--mono); font-size: 16px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.s-reloj span { font-size: 12px; line-height: 16px; color: var(--s-texto2); }
.s-controles { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.s-boton { min-height: 44px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--s-borde); background: var(--s-relleno); color: var(--s-texto);
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.s-boton:hover { background: var(--s-activo); }
.s-boton.principal { border-color: var(--s-acento); background: var(--s-acento); color: #fff; font-weight: 600; }
.s-boton.blanco { border-color: #fff; background: #fff; color: var(--s-barra); font-weight: 600; }
.s-boton.resaltado { border-color: var(--s-habla); background: var(--s-activo); color: #fff; font-weight: 600; }
.s-boton.peligro { border-color: var(--s-peligro); background: transparent; color: var(--s-peligro-txt); font-weight: 600; }
.s-boton.peligro-lleno { border-color: var(--s-peligro); background: #7f1d1d; color: #fff; font-weight: 600; }
.s-boton.ayuda { border-color: var(--s-ayuda); background: transparent; color: var(--s-ayuda-txt); font-weight: 600; }
.s-boton.transparente { background: transparent; }
.s-boton.chico { min-height: 36px; padding: 0 10px; font-size: 13px; }
.s-boton[aria-pressed="true"] { background: var(--s-activo); color: #fff; font-weight: 600; }

.banda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 16px; background: var(--s-banda); color: #fff; }
.banda b { font-size: 14px; font-weight: 600; }
.banda span { font-size: 13px; color: #dbe6ff; }
.banda.gris { background: var(--s-activo); }
.banda.gris span { color: #d3d6dc; }
.banda.ambar { background: #3a2a06; }
.banda.ambar b { color: var(--s-ayuda-txt); }
.banda.roja { background: #4a1414; }
.banda .s-boton { min-height: 36px; }

.s-conteos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 8px 16px; border-bottom: 1px solid rgba(190, 196, 208, 0.12); }
.s-conteos .c { font-size: 13px; color: var(--s-texto2); }
.s-conteos .c b { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--s-texto); margin-right: 4px; }
.s-conteos .c.ayuda, .s-conteos .c.ayuda b { color: var(--s-ayuda-txt); }
.s-conteos .derecha { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.segmentado { display: flex; border: 1px solid var(--s-borde); border-radius: var(--radius); overflow: hidden; }
.segmentado button { min-height: 44px; padding: 0 12px; border: 0; border-left: 1px solid var(--s-borde); background: transparent; color: var(--s-texto2); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.segmentado button:first-child { border-left: 0; }
.segmentado button[aria-pressed="true"] { background: var(--s-activo); color: #fff; font-weight: 600; }
.s-etiqueta { font-size: 12px; color: var(--s-texto2); }

.s-cuerpo { flex: 1 1 auto; display: flex; min-height: 0; }
.s-principal { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* Tablero */
.tablero { padding: 14px 16px 18px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(var(--min-recuadro, 260px), 1fr)); align-content: start; }
.tablero.ajustado { overflow: hidden; }
.recuadro { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--s-relleno);
  box-shadow: 0 0 0 1px rgba(190, 196, 208, 0.22); cursor: pointer; padding: 0; border: 0; color: inherit; font: inherit; text-align: left; display: block; }
.recuadro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0d0f13; }
.recuadro .r-centro { position: absolute; inset: 0 0 24px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 10px; text-align: center; }
.recuadro .r-centro b { font-size: 13px; font-weight: 600; }
.recuadro .r-centro span { font-size: 11px; line-height: 14px; color: var(--s-texto2); }
.recuadro .r-velo { position: absolute; inset: 0 0 24px 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 12, 16, 0.6); font-size: 12px; font-weight: 600; }
.recuadro .r-pie { position: absolute; left: 0; right: 0; bottom: 0; min-height: 24px; display: flex; align-items: center; gap: 10px; padding: 4px 8px; background: rgba(10, 12, 16, 0.88); }
.recuadro .r-nombre { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; line-height: 16px; font-weight: 600; color: #f1f5fb; }
.recuadro .r-eti { flex: none; font-size: 11px; line-height: 16px; font-weight: 600; white-space: nowrap; color: #d3d6dc; }
.r-eti.ayuda { color: var(--s-ayuda-txt); }
.r-eti.foco { color: #9db8ff; }
.r-eti.debil { color: var(--s-peligro-txt); }
.r-eti.habla { color: var(--s-habla); }
.recuadro.habla { box-shadow: 0 0 0 2px var(--s-habla); }
.recuadro.foco { box-shadow: 0 0 0 3px var(--s-aro); }
.recuadro.ayuda { box-shadow: 0 0 0 3px var(--s-ayuda); }
.recuadro.sefue { opacity: 0.6; }
.recuadro:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Pantalla ampliada */
.ampliada { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; min-height: 0; }
.ampliada .a-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ampliada .a-cab b { font-size: 17px; }
.ampliada .a-cab .estado { font-size: 13px; color: var(--s-texto2); }
.ampliada .a-video { position: relative; flex: 1 1 auto; min-height: 240px; background: #0d0f13; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(190, 196, 208, 0.22); }
.ampliada .a-video.foco { box-shadow: 0 0 0 3px var(--s-aro); }
.ampliada .a-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ampliada .a-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.tira { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tira .recuadro { width: 180px; flex: none; }

/* Panel lateral */
.panel { width: 340px; flex: none; display: flex; flex-direction: column; background: var(--s-barra); border-left: 1px solid rgba(190, 196, 208, 0.18); min-height: 0; }
.panel-pestanas { display: flex; border-bottom: 1px solid rgba(190, 196, 208, 0.18); padding: 0 6px; }
.panel-pestanas button { min-height: 44px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--s-texto2); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.panel-pestanas button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; font-weight: 600; }
.panel-pestanas .cerrar { margin-left: auto; }
.panel-cuerpo { flex: 1 1 auto; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.panel-pie { padding: 12px 14px 16px; border-top: 1px solid rgba(190, 196, 208, 0.18); display: flex; flex-direction: column; gap: 6px; }
.s-campo { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: var(--radius); border: 1px solid rgba(190, 196, 208, 0.4); background: var(--s-relleno); color: var(--s-texto); font-family: inherit; font-size: 14px; }
textarea.s-campo { padding: 8px 12px; min-height: 70px; resize: vertical; }
.s-fila { display: flex; gap: 8px; }
.s-rotulo { font-size: 12px; font-weight: 500; color: var(--s-texto2); }
.msg { display: flex; flex-direction: column; gap: 3px; }
.msg .quien { display: flex; align-items: baseline; gap: 8px; }
.msg .quien b { font-size: 13px; font-weight: 600; }
.msg .quien b.instructor { color: var(--s-habla); }
.msg .quien b.yo { color: #bbf7d0; }
.msg .quien span { font-family: var(--mono); font-size: 11px; color: var(--s-texto3); }
.msg p { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; white-space: pre-wrap; }
.lista-s { display: flex; flex-direction: column; gap: 8px; }
.lista-s .item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--s-linea); border-radius: var(--radius); }
.lista-s .item .nom { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-s .item .est { font-size: 12px; color: var(--s-texto2); white-space: nowrap; }
.lista-s .item .est.ayuda { color: var(--s-ayuda-txt); font-weight: 600; }
.sondeo-res { display: flex; flex-direction: column; gap: 6px; }
.sondeo-res .op { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.sondeo-res .op .barra-s { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--s-relleno); overflow: hidden; }
.sondeo-res .op .barra-s span { display: block; height: 100%; background: var(--s-acento); }
.s-tarjeta { border: 1px solid var(--s-linea); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.s-tarjeta h3 { font-size: 14px; }

/* Dialogo oscuro */
.s-velo { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 12, 16, 0.78); }
.s-dialogo { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--s-borde); background: var(--s-relleno); }
.s-dialogo h2 { font-size: 19px; line-height: 25px; }
.s-dialogo p { font-size: 14px; line-height: 20px; color: #d3d6dc; }

/* Sala del participante */
.p-cuerpo { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: stretch; }
.p-principal { flex: 999 1 560px; min-width: 0; display: flex; justify-content: center; padding: 14px 16px; }
.p-escena { width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 12px; }
.escenario { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--s-relleno); box-shadow: 0 0 0 1px rgba(190, 196, 208, 0.22); }
.escenario video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0d0f13; }
.escenario .e-vacio { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 16px; color: var(--s-texto2); }
.escenario .e-rotulo { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-top-right-radius: 8px; background: rgba(10, 12, 16, 0.88); }
.escenario .e-rotulo b { font-size: 12px; font-weight: 600; color: #f1f5fb; }
.escenario .e-rotulo span { font-size: 12px; color: var(--s-texto2); }
.p-aviso { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--s-linea); background: var(--s-relleno); }
.p-aviso > div { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p-aviso b { font-size: 17px; line-height: 23px; font-weight: 600; }
.p-aviso span { font-size: 13px; color: #d3d6dc; }
.p-aviso.ambar { border: 2px solid var(--s-ayuda); background: #1a1408; }
.p-aviso.azul { border: 2px solid var(--s-aro); background: #121a33; }
.p-aviso.rojo { border: 2px solid var(--s-peligro); background: #2a1010; }
.p-avisos { display: flex; flex-direction: column; gap: 8px; }
.p-linea { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; background: var(--s-activo); font-size: 14px; }
.p-linea .s-boton { margin-left: auto; min-height: 36px; }
.p-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px; background: var(--s-barra); border-top: 1px solid rgba(190, 196, 208, 0.18); }
.p-boton { min-height: 48px; padding: 0 18px; border-radius: var(--radius); border: 1px solid #f2f3f5; background: #f2f3f5; color: #14161b; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.p-boton:hover { background: #fff; }
.p-boton.principal { border-color: var(--s-acento); background: var(--s-acento); color: #fff; }
.p-boton.mic-abierto { border-color: var(--s-mic); background: var(--s-mic); color: var(--s-mic-txt); }
.p-boton.ayuda { border-color: var(--s-ayuda); background: var(--s-ayuda); color: #1a1408; }
.p-boton.ayuda-activa { border-color: var(--s-ayuda); background: transparent; color: var(--s-ayuda-txt); }
.p-boton.salir { border-color: var(--s-peligro); background: transparent; color: var(--s-peligro-txt); }
.p-boton.grande { min-height: 56px; padding: 0 28px; font-size: 17px; }
.p-estado-pantalla { margin-left: auto; font-size: 13px; font-weight: 600; }
.p-estado-pantalla.si { color: #86efac; }
.p-estado-pantalla.no { color: var(--s-ayuda-txt); }
.p-panel { flex: 1 1 300px; min-width: 0; max-width: 420px; display: flex; flex-direction: column; background: var(--s-barra); border-left: 1px solid rgba(190, 196, 208, 0.18); }
.p-sondeo .opciones { display: flex; flex-wrap: wrap; gap: 8px; }

/* Paso guiado y chequeo en la sala (claros dentro del oscuro no; se usan claros en pantallas de entrada) */
.paso { max-width: 640px; margin: 40px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 18px; }
.paso h1 { font-size: 26px; line-height: 32px; }
.paso p { font-size: 15px; line-height: 23px; color: #d3d6dc; }
.paso ol { margin: 0; padding-left: 22px; font-size: 15px; line-height: 26px; color: #d3d6dc; }
.paso .guia-imagen { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(190, 196, 208, 0.35); }

@media (max-width: 760px) {
  .barra { padding: 10px 16px; }
  .pagina { padding: 20px 16px 40px; }
  .panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 40; width: min(100%, 360px); }
}

/* Guia mientras esta abierta la ventana del navegador para escoger que compartir (captura.js).
   Va a la izquierda: la ventana del navegador sale arriba y al centro y taparia una franja superior. */
.guia-compartir { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 1000; width: 230px; display: flex; flex-direction: column; gap: 12px;
  padding: 18px; background: #fff4cc; color: #1d1d1f; border: 2px solid #f59e0b; border-radius: 12px; font-size: 18px; line-height: 25px; }
.guia-compartir b { font-weight: 700; }
