.movil { max-width: 520px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(150px + env(safe-area-inset-bottom)); }
.movil.sin-carta { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.logo { font-family: var(--pixel); font-size: 1.35rem; text-align: center; margin: 1.2em 0 .3em; color: var(--rojo); text-shadow: 3px 3px 0 #000; }
.logo-gafas { width: 140px; margin: 0 auto 1em; display: block; }
.subtitulo { text-align: center; color: var(--suave); margin-bottom: 1.6em; }
.cabecera { display: flex; align-items: center; gap: 12px; margin-bottom: 1.2em; }
.cabecera .avatar { width: 48px; height: 48px; }
.cabecera .nombre { font-weight: 800; font-size: 1.1rem; }
.cabecera .sala { margin-left: auto; font-family: var(--pixel); font-size: .8rem; color: var(--suave); text-align: right; }
.panel { background: var(--fondo-2); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; margin-bottom: 14px; }
.titular { font-family: var(--pixel); font-size: 1.05rem; line-height: 1.5; text-align: center; margin: .4em 0 .8em; }
.titular.rojo { color: var(--rojo); }
.titular.amarillo { color: var(--amarillo); }
.titular.verde { color: var(--verde); }

.lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.ficha { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .85rem; font-weight: 600; position: relative; min-width: 0; }
.ficha .avatar { width: 62px; height: 62px; }
.ficha .nombre { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha.desconectado .avatar { opacity: .35; }
.ficha.fuera .avatar { filter: grayscale(1); opacity: .4; }
.ficha .marca { position: absolute; top: -4px; right: calc(50% - 38px); background: var(--verde); color: #04210f; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .75rem; font-weight: 900; }

/* Selfie */
.selfie-marco { position: relative; width: 100%; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: #000; margin-bottom: 14px; }
.selfie-marco video, .selfie-marco img { width: 100%; height: 100%; object-fit: cover; display: block; }
.selfie-marco video { transform: scaleX(-1); }
.selfie-guia { position: absolute; inset: 0; pointer-events: none; }
.selfie-guia::before { content: ''; position: absolute; left: 19%; right: 19%; top: 8%; bottom: 10%; border: 3px dashed rgba(255,255,255,.8); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.selfie-guia .ojos { position: absolute; left: 22%; right: 22%; top: 42%; border-top: 2px dotted var(--amarillo); }
.selfie-guia .ojos span { position: absolute; right: 0; top: 4px; font-size: .7rem; color: var(--amarillo); font-weight: 700; }
.selfie-prueba .gafas-caen { animation: none; }
.botones { display: flex; gap: 10px; }
.botones .btn { flex: 1; }
.selfie-mio { position: relative; display: inline-block; }
.cambiar-foto { background: none; border: 0; color: var(--azul); font-weight: 700; padding: 0; cursor: pointer; font-size: .85rem; }

/* Turno */
.turno-yo { text-align: center; padding: 26px 18px; background: linear-gradient(160deg, #3b1f5c, #26113d); border: 2px solid var(--amarillo); }
.turno-yo .titular { font-size: 1.5rem; color: var(--amarillo); }
.turno-otro { text-align: center; }
.turno-otro .avatar { width: 110px; height: 110px; margin: 0 auto 10px; border: 4px solid var(--amarillo); }
.orden { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; }
.orden .ficha { flex: none; width: 64px; font-size: .72rem; }
.orden .ficha .avatar { width: 44px; height: 44px; }
.orden .ficha.hecho { opacity: .45; }
.orden .ficha.ahora .avatar { outline: 3px solid var(--amarillo); outline-offset: 2px; }

/* Votación */
.votos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.voto { border: 3px solid transparent; background: var(--tarjeta); border-radius: 18px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.voto .avatar { width: 78px; height: 78px; }
.voto.elegido { border-color: var(--rojo); background: #3a1830; }

/* Resultado */
.recuento { display: flex; flex-direction: column; gap: 8px; }
.barra { display: flex; align-items: center; gap: 10px; }
.barra .avatar { width: 36px; height: 36px; }
.barra .nom { width: 72px; font-weight: 700; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra .relleno { flex: 1; height: 26px; background: rgba(255,255,255,.06); border-radius: 8px; overflow: hidden; }
.barra .relleno i { display: block; height: 100%; background: var(--rojo); border-radius: 8px; }
.barra .n { font-family: var(--pixel); font-size: .8rem; width: 2ch; text-align: right; }

.marcador { display: flex; flex-direction: column; gap: 6px; }
.marcador .fila { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.04); }
.marcador .fila .avatar { width: 34px; height: 34px; }
.marcador .fila .pts { margin-left: auto; font-family: var(--pixel); font-size: .85rem; }
.marcador .fila .mas { color: var(--verde); font-weight: 800; margin-left: 6px; }
.marcador .fila.yo { outline: 2px solid var(--azul); }

.revela { text-align: center; }
.revela .dato { font-size: 1.05rem; margin: .3em 0; }
.revela .dato b { color: var(--amarillo); }
.final-movil .gafas-escena { width: min(70vw, 300px); }
.final-movil .pillado { width: min(60vw, 260px); }

/* Carta secreta */
.carta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 496px; margin: 0 auto; height: 120px; border-radius: 20px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: pointer;
}
.carta-cara { position: absolute; inset: 0; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; text-align: center; }
.carta-tapa {
  background: repeating-linear-gradient(45deg, #2d2550 0 14px, #251e44 14px 28px);
  border: 2px solid var(--borde); box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.carta-icono { font-size: 2rem; }
.carta-secreto { background: var(--texto); color: #160f2a; visibility: hidden; flex-direction: column; gap: 4px; border: 4px solid var(--amarillo); }
.carta.vista .carta-secreto { visibility: visible; }
.carta.vista .carta-tapa { visibility: hidden; }
.carta-secreto .etiqueta { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #5d5680; }
.carta-secreto .grande { font-family: var(--pixel); font-size: clamp(1rem, 6vw, 1.5rem); line-height: 1.3; word-break: break-word; }
.carta-secreto.impostor { background: var(--rojo); color: #fff; }
.carta-secreto.impostor .etiqueta { color: #ffe1e4; }

/* Inicio */
.separador { display: flex; align-items: center; gap: 12px; color: var(--suave); margin: 18px 0; font-size: .9rem; }
.separador::before, .separador::after { content: ''; flex: 1; border-top: 1px solid var(--borde); }

/* Cabecera con menú */
.menu-btn { margin-left: 8px; background: var(--tarjeta); border: 0; border-radius: 12px; width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer; flex: none; }
.corona { font-size: .8rem; }

/* Invitar */
.invitar { text-align: center; }
.invitar .codigo { font-family: var(--pixel); font-size: 2.6rem; color: var(--amarillo); letter-spacing: .12em; text-shadow: 4px 4px 0 #000; margin: .2em 0 .35em; }
.invitar .qr { width: 190px; background: #fff; border-radius: 14px; padding: 8px; display: block; margin: 0 auto 12px; }
.invitar.compacto .qr { width: 150px; }

/* Lista con acciones del anfitrión */
.ficha .quitar { position: absolute; top: -6px; left: calc(50% + 14px); width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--rojo); color: #fff; font-weight: 900; cursor: pointer; line-height: 1; }
.ficha .estado-voto { position: absolute; top: -4px; right: calc(50% - 38px); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 900; background: var(--tarjeta); color: var(--suave); }
.ficha .estado-voto.si { background: var(--verde); color: #04210f; }
.ajuste { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; color: var(--suave); }
.ajuste input { width: 6ch; background: var(--fondo); border: 2px solid var(--borde); border-radius: 10px; padding: .45em; text-align: center; font-size: 1.1rem; }
.anfitrion { border-color: var(--amarillo); }
.anfitrion-etiqueta { font-size: .75rem; font-weight: 800; color: var(--amarillo); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.pila { display: flex; flex-direction: column; gap: 10px; }

/* Hoja de menú */
.hoja { width: min(520px, 100vw); max-width: 100vw; margin: auto auto 0; border: 1px solid var(--borde); border-radius: 22px 22px 0 0; background: var(--fondo-2); color: var(--texto); padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; }
.hoja::backdrop { background: rgba(0,0,0,.6); }
.hoja h3 { margin-top: 18px; }
.hoja .fila { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.hoja .fila .avatar { width: 40px; height: 40px; font-size: 1.1rem; }
.hoja .fila .btn { margin-left: auto; }
.hoja form { margin-top: 16px; }

.selfie-plan-b { width: 100%; height: 100%; border: 3px dashed var(--borde); background: var(--fondo-2); color: var(--texto); border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.selfie-plan-b .icono { font-size: 4rem; }
