/* Una hoja para las tres pantallas. La tele es oscura y grande; el móvil,
   claro y con botones que se pulsan con el pulgar. */
:root {
  --fondo: #f6f3ee;
  --tinta: #1c1a17;
  --suave: #6b665e;
  --linea: #ddd7cc;
  --acento: #e6532d;
  --acento-2: #2d7de6;
  --ok: #2c9a5b;
  --tarjeta: #fff;
  --radio: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--fondo); color: var(--tinta); font-size: 17px; line-height: 1.35; }
button, input, select { font: inherit; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
.oculto { display: none !important; }
.suave { color: var(--suave); }

/* --- Portada y móvil --------------------------------------------------- */
.movil { max-width: 480px; margin: 0 auto; padding: 16px; padding-bottom: 40px; }
.movil header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0 12px; }
.marca { font-weight: 800; letter-spacing: .02em; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; margin-bottom: 12px; }
.campo { display: block; width: 100%; padding: 14px; font-size: 18px; border: 2px solid var(--linea); border-radius: 12px; background: #fff; margin: 6px 0 12px; }
.campo:focus { outline: none; border-color: var(--acento-2); }
.codigo-campo { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; text-align: center; font-size: 26px; }
.boton { display: block; width: 100%; padding: 16px; border: 0; border-radius: 12px; background: var(--acento); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.boton.secundario { background: #fff; color: var(--tinta); border: 2px solid var(--linea); }
.boton.pequeno { width: auto; padding: 8px 14px; font-size: 15px; display: inline-block; }
.boton:disabled { opacity: .45; cursor: default; }
.avatares { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.avatares button { font-size: 28px; width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--linea); background: #fff; cursor: pointer; }
.avatares button.elegido { border-color: var(--acento); background: #fff1ec; }
.premisa { font-size: 22px; font-weight: 700; margin: 4px 0 12px; }
.opciones { display: flex; flex-direction: column; gap: 10px; }
.opcion { text-align: left; padding: 14px 16px; border: 2px solid var(--linea); border-radius: 12px; background: #fff; font-size: 18px; cursor: pointer; }
.opcion.elegida { border-color: var(--acento-2); background: #eaf2ff; }
.opcion.elegida-ia { border-color: var(--acento); background: #fff1ec; }
.opcion:disabled { opacity: .5; }
.contador { font-variant-numeric: tabular-nums; font-weight: 700; }
.aviso { background: #fff4d6; border: 1px solid #f0d58a; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.error { background: #ffe1db; border-color: #f2a795; }
.lista { list-style: none; padding: 0; margin: 0; }
.lista li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.lista li:last-child { border-bottom: 0; }
.puntos { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.segmentos { display: flex; gap: 6px; margin: 6px 0 12px; }
.segmentos button { flex: 1; padding: 10px; border: 2px solid var(--linea); background: #fff; border-radius: 10px; cursor: pointer; }
.segmentos button.activo { border-color: var(--acento-2); background: #eaf2ff; font-weight: 700; }
.centrado { text-align: center; }
.grande { font-size: 40px; }
.espera { text-align: center; padding: 24px 0; }
.espera .icono { font-size: 56px; }

.codigo-grande { font-weight: 900; letter-spacing: .25em; margin: 2px 0 6px; }
.reveladas li { display: block; padding: 10px 12px; margin: 8px 0; border: 2px solid var(--linea); border-radius: 12px; }
.reveladas li.ganadora { border-color: #f0b429; background: #fff8e6; }
.reveladas li.ia { border-color: var(--acento); }
.reveladas .fila { display: flex; gap: 10px; align-items: flex-start; }
.reveladas .texto { font-weight: 700; font-size: 18px; flex: 1; }
.votos-chip { background: var(--acento-2); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.comentario-paco { border-left: 5px solid var(--acento); font-size: 18px; }
details summary { cursor: pointer; }

/* --- Tele ---------------------------------------------------------------- */
.tv { background: #14120f; color: #f6f3ee; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; font-size: clamp(18px, 2.2vw, 30px); }
.tv header { display: flex; justify-content: space-between; align-items: center; padding: 1.2vw 2.5vw; border-bottom: 1px solid #2c2822; }
.tv header .codigo { font-size: 1.6em; font-weight: 800; letter-spacing: .25em; }
.tv main { padding: 2vw 3vw; display: flex; flex-direction: column; justify-content: center; gap: 1.2vw; }
.tv footer { display: flex; gap: 1.5vw; padding: 1vw 2.5vw; border-top: 1px solid #2c2822; overflow-x: auto; }
.tv .jugador-chip { display: flex; align-items: center; gap: .4em; padding: .3em .7em; border-radius: 999px; background: #262219; white-space: nowrap; font-size: .85em; }
.tv .jugador-chip.fuera { opacity: .4; }
.tv .jugador-chip.listo { background: #1f4d33; }
.tv .jugador-chip .mando { font-size: .8em; }
.tv .premisa { font-size: clamp(30px, 4.2vw, 64px); font-weight: 800; line-height: 1.15; margin: 0 0 .3em; }
.tv .contador { font-size: 1.4em; color: #ffb38a; }
.tv .qr-bloque { display: grid; grid-template-columns: auto 1fr; gap: 3vw; align-items: center; }
.tv .qr-bloque img { width: clamp(180px, 22vw, 340px); background: #fff; padding: .6em; border-radius: 1em; }
.tv .respuestas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22em), 1fr)); gap: 1vw; }
.tv .respuesta { background: #221e18; border: 2px solid #2c2822; border-radius: .8em; padding: .8em 1em; display: flex; flex-direction: column; gap: .4em; position: relative; }
.tv .respuesta .texto { font-size: 1.15em; font-weight: 700; }
.tv .respuesta .autor { color: #bfb8ac; display: flex; align-items: center; gap: .4em; }
.tv .respuesta .votos { position: absolute; top: -.6em; right: .8em; background: var(--acento-2); color: #fff; border-radius: 999px; padding: .1em .6em; font-weight: 800; }
.tv .respuesta.ganadora { border-color: #f0b429; box-shadow: 0 0 0 .2em #f0b42933; }
.tv .respuesta.ia { border-color: var(--acento); }
.tv .respuesta .premio { color: #f0b429; font-weight: 700; }
.tv .comentario { background: #2a2418; border-left: .35em solid var(--acento); padding: .8em 1em; border-radius: .5em; font-size: 1.05em; }
.tv .clasificacion { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; max-width: 30em; }
.tv .clasificacion li { display: flex; align-items: center; gap: .6em; background: #221e18; padding: .6em 1em; border-radius: .6em; }
.tv .clasificacion li:first-child { background: #3a3013; }
.tv .clasificacion .puntos { margin-left: auto; font-weight: 800; }
.tv .letrero { font-size: 1.3em; color: #bfb8ac; }
.tv .titulo { font-size: clamp(40px, 6vw, 96px); font-weight: 900; letter-spacing: -.02em; }
.tv .progreso { height: .5em; background: #2c2822; border-radius: 999px; overflow: hidden; }
.tv .progreso > div { height: 100%; background: var(--acento); transition: width 1s linear; }
@media (max-width: 700px) { .tv .qr-bloque { grid-template-columns: 1fr; } }
