/* =====================================================================
   La Vecindad de Amelia — estilos (teléfono, pantalla grande y panel)
   ===================================================================== */
:root {
  --madera: #8B5A2B;
  --madera-osc: #5A3818;
  --pared: #F6E2B3;
  --crema: #FFF8E6;
  --amarillo: #FFC93C;
  --verde: #3E8E41;
  --rojo: #E2463B;
  --azul: #2D7DD2;
  --rosa: #EC5B8B;
  --tinta: #2B1D0E;
  --gris: #7A6A55;
  --borde: 3px solid var(--tinta);
  --sombra: 0 5px 0 var(--tinta);
  --radio: 18px;
  --titulo: 'Luckiest Guy', 'Fredoka', system-ui, sans-serif;
  --texto: 'Fredoka', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--texto);
  color: var(--tinta);
  background-color: var(--pared);
  /* ladrillos de la vecindad */
  background-image:
    linear-gradient(rgba(139, 90, 43, .10) 2px, transparent 2px),
    linear-gradient(90deg, rgba(139, 90, 43, .10) 2px, transparent 2px);
  background-size: 64px 32px, 64px 64px;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

.titulo { font-family: var(--titulo); font-weight: 400; letter-spacing: .5px; line-height: 1.05; margin: .2em 0 .4em; }
.centro { text-align: center; }
.nota { color: var(--gris); font-size: .9rem; }
.error-txt { color: var(--rojo); font-weight: 600; }

/* ---------- piezas comunes ---------- */
.tarjeta {
  background: var(--crema);
  border: var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 20px;
  margin-bottom: 18px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--amarillo);
  border: var(--borde);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--tinta);
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .06s, box-shadow .06s;
  margin: 4px 2px;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tinta); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-grande { width: 100%; font-size: 1.25rem; padding: 16px; }
.btn-sec { background: #fff; }
.btn-verde { background: #7BD389; }
.btn-rojo { background: #FF8A80; }
.btn-azul { background: #8EC5FF; }
.btn-chico { padding: 6px 10px; font-size: .85rem; border-width: 2px; box-shadow: 0 2px 0 var(--tinta); border-radius: 10px; }

.campo {
  width: 100%;
  border: var(--borde);
  border-radius: 12px;
  padding: 14px;
  font-size: 1.15rem;
  background: #fff;
  margin: 6px 0 12px;
}
textarea.campo { min-height: 120px; resize: vertical; }

.av {
  --c: var(--madera);
  display: inline-grid; place-items: center;
  width: 2.4em; height: 2.4em;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid var(--tinta);
  font-size: 1em;
  line-height: 1;
  flex: none;
}
.av > span { font-size: 1.3em; }

.emoji-xl { font-size: 4.5rem; line-height: 1; margin: 6px 0; }
.cargando { font-size: 4rem; text-align: center; padding-top: 30vh; animation: rebote 1s infinite; }

.aviso {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, calc(100% + 40px)); opacity: 0;
  background: var(--tinta); color: #fff;
  padding: 12px 18px; border-radius: 14px;
  font-weight: 600; max-width: 90vw; text-align: center;
  transition: transform .25s, opacity .25s; z-index: 50;
}
.aviso.ver { transform: translate(-50%, 0); opacity: 1; }

.checks { list-style: none; padding: 0; }
.checks li { padding: 8px 0; border-bottom: 1px dashed #d9c9a3; }
.checks small { display: block; color: var(--rojo); }

/* tiempo restante */
.barra { height: 14px; border: var(--borde); border-radius: 99px; background: #fff; overflow: hidden; margin: 10px 0; }
.barra > i { display: block; height: 100%; width: calc(var(--p, 1) * 100%); background: var(--verde); transition: width .25s linear; }
.barra.poco > i { background: var(--rojo); }

/* Colores de opciones de trivia */
.op0 { --oc: var(--rojo); } .op1 { --oc: var(--azul); } .op2 { --oc: var(--amarillo); } .op3 { --oc: var(--verde); }
.op0 .forma::before { content: '▲'; } .op1 .forma::before { content: '◆'; }
.op2 .forma::before { content: '●'; } .op3 .forma::before { content: '■'; }

@keyframes rebote { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes entra { from { opacity: 0; transform: scale(.85) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes giro { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* =====================================================================
   TELÉFONO DEL JUGADOR
   ===================================================================== */
.app { max-width: 520px; margin: 0 auto; padding: 16px 16px 120px; }
.cab {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--madera); color: #fff;
  border-bottom: var(--borde);
}
.cab .av { font-size: .85rem; }
.cab .nombre { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab .pts { background: var(--amarillo); color: var(--tinta); border: 2px solid var(--tinta); border-radius: 99px; padding: 3px 10px; font-weight: 700; white-space: nowrap; }

.entrada .titulo { font-size: 2.1rem; }
.avatares { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 16px; }
.avatares label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border: 2px solid transparent; border-radius: 12px; cursor: pointer; font-size: .72rem; text-align: center; line-height: 1.1; }
.avatares input { position: absolute; opacity: 0; pointer-events: none; }
.avatares .av { font-size: 1rem; }
.avatares input:checked + label { border-color: var(--tinta); background: var(--amarillo); }

.etiqueta { display: inline-block; background: var(--madera); color: #fff; border-radius: 99px; padding: 4px 12px; font-weight: 600; font-size: .9rem; }
.pregunta-txt { font-size: 1.35rem; font-weight: 700; margin: 8px 0 14px; }
.opciones { display: grid; gap: 10px; }
.op {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--oc); color: #fff;
  border: var(--borde); border-radius: 16px; box-shadow: 0 5px 0 var(--tinta);
  padding: 16px; font-size: 1.15rem; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.op2 { color: var(--tinta); text-shadow: none; }
.op:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tinta); }
.op .forma { font-size: 1.5rem; width: 1.2em; text-align: center; }
.op.elegida { outline: 5px solid var(--tinta); outline-offset: 3px; }

.resultado { text-align: center; padding: 26px 18px; }
.resultado.bien { background: #D8F5D0; }
.resultado.mal { background: #FFE0DC; }
.resultado .titulo { font-size: 2rem; }
.grande-pts { font-family: var(--titulo); font-size: 3rem; color: var(--verde); }

/* lienzo de dibujo */
.lienzo-caja { position: relative; }
#lienzo { width: 100%; aspect-ratio: 1; background: #fff; border: var(--borde); border-radius: 14px; touch-action: none; display: block; }
.herramientas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 12px 0; }
.color { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--tinta); background: var(--c); padding: 0; }
.color.activo, .grosor.activo { outline: 3px solid var(--tinta); outline-offset: 2px; }
.grosor { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--tinta); background: #fff; display: grid; place-items: center; padding: 0; }
.grosor i { display: block; border-radius: 50%; background: var(--tinta); }
.tema-dibujo { font-size: 1.3rem; text-align: center; margin: 4px 0 8px; }
.tema-dibujo b { display: block; font-family: var(--titulo); font-weight: 400; font-size: 1.9rem; color: var(--madera); }

.galeria-voto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dib { position: relative; padding: 0; border: var(--borde); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 4px 0 var(--tinta); }
.dib img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.dib .num { position: absolute; top: 6px; left: 6px; background: var(--amarillo); border: 2px solid var(--tinta); border-radius: 99px; padding: 0 8px; font-weight: 700; }
.dib .tema-mini { display: block; font-size: .75rem; padding: 4px; background: var(--crema); border-top: 2px solid var(--tinta); }
.dib.propio { opacity: .45; }
.dib.votado { outline: 5px solid var(--verde); outline-offset: 2px; }

.lista-votar { display: grid; gap: 8px; }
.lista-votar button { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: var(--borde); border-radius: 14px; background: #fff; font-weight: 700; font-size: 1.1rem; box-shadow: 0 3px 0 var(--tinta); text-align: left; }
.lista-votar .av { font-size: .8rem; }

.penitencia-card { background: var(--rojo); color: #fff; text-align: center; }
.penitencia-card .titulo { font-size: 2.6rem; text-shadow: 0 3px 0 var(--tinta); }
.penitencia-card .txt, .txt-pen { font-size: 1.35rem; font-weight: 600; background: #fff; color: var(--tinta); border: var(--borde); border-radius: 14px; padding: 14px; }
.girando { font-size: 5rem; display: inline-block; animation: giro 1s linear infinite; }

.reacciones-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: rgba(90, 56, 24, .92); border-top: var(--borde); z-index: 20; }
.reacciones-bar button { font-size: 1.6rem; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--tinta); background: var(--crema); padding: 0; }
.reacciones-bar button:active { transform: scale(.9); }
.btn-carta { position: fixed; right: 14px; bottom: 82px; z-index: 21; border-radius: 99px; }

/* =====================================================================
   PANTALLA GRANDE (TV / proyector)
   ===================================================================== */
body.pantalla {
  height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
  font-size: clamp(14px, 2.2vmin, 40px);
  background-color: #F3D9A0;
}
.pan-top { display: flex; align-items: center; justify-content: space-between; padding: 1.2vmin 2.5vmin; background: var(--madera); color: #fff; border-bottom: 5px solid var(--tinta); }
.pan-logo { font-family: var(--titulo); font-size: 1.6em; letter-spacing: 1px; }
.pan-logo b { color: var(--amarillo); font-weight: 400; }
.pan-unete { display: flex; align-items: center; gap: 1vmin; font-size: .85em; line-height: 1.2; }
.pan-unete b { color: var(--amarillo); }
.qr-mini { background: #fff; padding: 4px; border-radius: 6px; }
.qr-mini img, .qr-mini canvas { width: 7vmin !important; height: 7vmin !important; }
.escena { flex: 1; min-height: 0; padding: 2.5vmin 4vmin; display: flex; flex-direction: column; position: relative; }
.escena > * { animation: entra .45s ease-out both; }
.pan-titulo { font-family: var(--titulo); font-weight: 400; font-size: 3.2em; margin: 0 0 .25em; text-align: center; color: var(--madera-osc); text-shadow: 0 3px 0 #fff; line-height: 1.05; }
.pan-sub { text-align: center; font-size: 1.4em; margin: 0 0 1em; font-weight: 600; }

/* sala de espera */
.lobby { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4vmin; align-items: center; flex: 1; min-height: 0; }
.lobby .bienvenida .pan-titulo { font-size: 4.4em; text-align: left; }
.lobby .bienvenida .pan-sub { text-align: left; }
.lobby .cumple { color: var(--rojo); }
.qr-grande { background: #fff; border: 5px solid var(--tinta); border-radius: 24px; padding: 2.4vmin; box-shadow: 0 8px 0 var(--tinta); text-align: center; }
.qr-grande #qrGrande { display: inline-block; }
.qr-grande #qrGrande img, .qr-grande #qrGrande canvas { width: 34vmin !important; height: 34vmin !important; }
.qr-grande .url { font-weight: 700; font-size: 1.3em; margin-top: 1vmin; word-break: break-all; }
.jugadores-grid { display: flex; flex-wrap: wrap; gap: 1.2vmin; justify-content: center; margin-top: 2vmin; max-height: 30vh; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: .5em; background: #fff; border: 3px solid var(--tinta); border-radius: 99px; padding: .25em .9em .25em .25em; font-weight: 700; animation: entra .4s both; }
.chip .av { font-size: .7em; }
.chip.listo { background: #C9F2C4; }
.chip.off { opacity: .4; }

/* reloj circular */
.reloj {
  --p: 1;
  width: 13vmin; height: 13vmin; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--titulo); font-size: 2.6em;
  border: 5px solid var(--tinta);
  background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--verde) calc(var(--p) * 360deg), #e8dcc0 0);
  flex: none;
}
.reloj.poco { background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--rojo) calc(var(--p) * 360deg), #e8dcc0 0); animation: latido .5s infinite; }

/* trivia */
.trivia-top { display: flex; align-items: center; gap: 3vmin; margin-bottom: 2.5vmin; }
.trivia-top .pregunta-pan { flex: 1; font-size: 2.6em; font-weight: 700; line-height: 1.15; background: #fff; border: 5px solid var(--tinta); border-radius: 22px; padding: .6em .8em; box-shadow: 0 6px 0 var(--tinta); }
.ops-pan { display: grid; grid-template-columns: 1fr 1fr; gap: 2vmin; flex: 1; min-height: 0; }
.op-pan { position: relative; display: flex; align-items: center; gap: .6em; background: var(--oc); color: #fff; border: 5px solid var(--tinta); border-radius: 22px; padding: .5em .9em; font-size: 2em; font-weight: 700; box-shadow: 0 6px 0 var(--tinta); text-shadow: 0 2px 3px rgba(0,0,0,.35); overflow: hidden; }
.op-pan.op2 { color: var(--tinta); text-shadow: none; }
.op-pan .forma { font-size: 1.2em; }
.op-pan .cuenta-op { margin-left: auto; font-family: var(--titulo); font-size: 1.1em; }
.op-pan .relleno { position: absolute; inset: auto 0 0 0; height: 10px; background: rgba(0,0,0,.25); width: 0; transition: width .8s; }
.ops-pan.revelado .op-pan:not(.correcta) { opacity: .35; filter: grayscale(.6); }
.ops-pan.revelado .op-pan.correcta { animation: latido 1s infinite; }
.op-pan.correcta .cuenta-op::before { content: '✔ '; }
.revela-lado .ops-pan { grid-template-columns: 1fr; gap: 1.4vmin; }
.revela-lado .op-pan { font-size: 1.5em; padding: .35em .8em; }
.pie-estado { display: flex; align-items: center; gap: 2vmin; margin-top: 2vmin; font-size: 1.2em; font-weight: 700; }
.pie-estado .avs { display: flex; flex-wrap: wrap; gap: .3em; }
.pie-estado .avs .av { font-size: .55em; }

.revela-lado { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3vmin; flex: 1; min-height: 0; }
.panel-aciertos { background: #fff; border: 5px solid var(--tinta); border-radius: 22px; padding: 1.4em; box-shadow: 0 6px 0 var(--tinta); overflow: hidden; }
.panel-aciertos h3 { font-family: var(--titulo); font-weight: 400; font-size: 2em; margin: 0 0 .4em; color: var(--verde); }
.fila-pts { display: flex; align-items: center; gap: .6em; padding: .3em 0; font-size: 1.15em; font-weight: 700; border-bottom: 2px dashed #e5d6b4; animation: entra .4s both; }
.fila-pts .av { font-size: .6em; }
.fila-pts .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-pts .p { color: var(--verde); }

/* dibujos */
.tema-pan { text-align: center; font-size: 2em; }
.tema-pan b { display: block; font-family: var(--titulo); font-weight: 400; font-size: 2.6em; color: var(--rojo); text-shadow: 0 4px 0 var(--tinta); }
.centro-reloj { display: flex; justify-content: center; margin: 2vmin 0; }
.galeria-pan { flex: 1; min-height: 0; display: grid; gap: 2vmin; grid-template-columns: repeat(auto-fit, minmax(22vmin, 1fr)); align-content: center; overflow: hidden; }
.galeria-pan .dib { box-shadow: 0 6px 0 var(--tinta); border-width: 5px; }
.galeria-pan .dib .num { font-size: 1.2em; }
.galeria-pan .dib .tema-mini { font-size: .9em; }
.podio { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3vmin; }
.podio .lugar { width: 24vmin; text-align: center; animation: entra .6s both; }
.podio .lugar .dib { margin-bottom: 1vmin; }
.podio .lugar:nth-child(1) { order: 2; width: 31vmin; }
.podio .lugar:nth-child(2) { order: 1; animation-delay: .4s; }
.podio .lugar:nth-child(3) { order: 3; animation-delay: .8s; }
.podio .medalla { font-size: 3em; line-height: 1; }
.podio .quien { font-weight: 700; font-size: 1.3em; }
.podio .votos { font-family: var(--titulo); font-size: 1.4em; color: var(--verde); }

/* penitencia */
.ruleta { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 3vmin; }
.barril {
  width: 60vmin; padding: 3vmin; border-radius: 30px;
  background: repeating-linear-gradient(90deg, var(--madera) 0 8vmin, var(--madera-osc) 8vmin calc(8vmin + 6px));
  border: 6px solid var(--tinta); box-shadow: 0 8px 0 var(--tinta);
  text-align: center;
}
.barril .rollo { background: #fff; border: 5px solid var(--tinta); border-radius: 18px; font-family: var(--titulo); font-size: 3.2em; padding: .25em .4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.elegido { display: flex; align-items: center; gap: 2vmin; font-family: var(--titulo); font-size: 3.6em; color: var(--rojo); text-shadow: 0 4px 0 var(--tinta); }
.elegido .av { font-size: .5em; }
.texto-penitencia { max-width: 80vw; background: #fff; border: 6px solid var(--tinta); border-radius: 26px; box-shadow: 0 8px 0 var(--tinta); padding: 1em 1.4em; font-size: 2.2em; font-weight: 700; text-align: center; line-height: 1.2; }
.sello { position: absolute; right: 5vmin; bottom: 4vh; transform: rotate(-12deg); border: 8px solid var(--verde); color: var(--verde); font-family: var(--titulo); font-size: 4em; padding: .1em .4em; border-radius: 16px; background: rgba(255,255,255,.85); animation: entra .4s both; }

/* votación */
.pregunta-voto { font-size: 2.8em; font-weight: 700; text-align: center; background: #fff; border: 5px solid var(--tinta); border-radius: 24px; box-shadow: 0 6px 0 var(--tinta); padding: .6em 1em; margin: 0 auto 2vmin; max-width: 85vw; line-height: 1.15; }
.barras { display: grid; gap: 1.4vmin; max-width: 80vw; width: 100%; margin: 0 auto; }
.barra-voto { display: grid; grid-template-columns: auto 10em 1fr auto; align-items: center; gap: .8em; font-size: 2em; font-weight: 700; animation: entra .4s both; }
.barra-voto .av { font-size: .6em; }
.barra-voto .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-voto .b { height: 1.3em; border: 3px solid var(--tinta); border-radius: 99px; background: #fff; overflow: hidden; }
.barra-voto .b i { display: block; height: 100%; background: var(--amarillo); width: 0; transition: width 1s ease-out; }
.barra-voto.gana .b i { background: var(--rojo); }
.corona { font-size: 1.2em; }
.ganador-voto { justify-content: center; margin: 0 0 2.5vmin; font-size: 3em; }

/* mensajes */
.muro { flex: 1; min-height: 0; columns: 3 22em; column-gap: 2vmin; overflow: hidden; }
.msj { break-inside: avoid; background: #fff; border: 4px solid var(--tinta); border-radius: 18px; padding: .8em 1em; margin-bottom: 2vmin; box-shadow: 0 5px 0 var(--tinta); font-size: 1.15em; }
.msj:nth-child(4n+1) { background: #FFF1B8; } .msj:nth-child(4n+2) { background: #DDF3FF; } .msj:nth-child(4n+3) { background: #FFE0EA; }
.msj .de { display: flex; align-items: center; gap: .5em; font-weight: 700; margin-top: .5em; color: var(--madera-osc); font-size: .85em; }
.msj .de .av { font-size: .55em; }
.msj.nuevo { animation: entra .6s both; }

/* tabla de puntos */
.tabla { display: grid; gap: 1.1vmin; max-width: 80vw; width: 100%; margin: 0 auto; }
.tabla .fila { display: grid; grid-template-columns: 2.2em auto 1fr auto; align-items: center; gap: .8em; background: #fff; border: 4px solid var(--tinta); border-radius: 16px; padding: .35em .9em; font-size: 1.35em; font-weight: 700; box-shadow: 0 4px 0 var(--tinta); animation: entra .4s both; }
.tabla .fila:nth-child(1) { background: var(--amarillo); font-size: 1.6em; }
.tabla .fila:nth-child(2) { background: #E3E7EA; }
.tabla .fila:nth-child(3) { background: #F2C79B; }
.tabla .pos { font-family: var(--titulo); font-size: 1.3em; text-align: center; }
.tabla .av { font-size: .6em; }

/* cumpleaños */
.cumple-final { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cumple-final .pastel { font-size: 9em; line-height: 1; animation: rebote 1.4s infinite; }
.cumple-final .pan-titulo { font-size: 5.5em; color: var(--rojo); text-shadow: 0 5px 0 var(--tinta); }
.carrusel { min-height: 34vh; display: grid; place-items: center; width: 100%; }
.carrusel .msj { font-size: 1.8em; max-width: 70vw; animation: entra .6s both; }
.carrusel .dib { width: 32vh; animation: entra .6s both; }
.carrusel figcaption { font-weight: 700; font-size: 1.3em; margin-top: .4em; }

/* reacciones flotantes */
.capa-reacciones { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.flota { position: absolute; bottom: -12vh; display: flex; flex-direction: column; align-items: center; animation: sube 4.5s ease-out forwards; }
.flota .e { font-size: 8vmin; line-height: 1; }
.flota .q { font-size: 1em; font-weight: 700; background: rgba(255,255,255,.9); border: 2px solid var(--tinta); border-radius: 99px; padding: 0 .6em; }
@keyframes sube { 0% { transform: translateY(0) scale(.6); opacity: 0; } 10% { opacity: 1; transform: translateY(-10vh) scale(1); } 100% { transform: translateY(-95vh) scale(1.1) rotate(10deg); opacity: 0; } }
.confeti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
.btn-sonido { position: fixed; right: 1.5vmin; bottom: 1.5vmin; z-index: 45; border: 3px solid var(--tinta); background: #fff; border-radius: 99px; padding: .3em .9em; font-weight: 700; font-size: .9rem; opacity: .85; }
.btn-sonido.activo { opacity: .35; }

/* =====================================================================
   PANEL DE CONTROL
   ===================================================================== */
.panel { max-width: 980px; margin: 0 auto; padding: 14px 14px 80px; }
.panel .tarjeta { padding: 16px; }
.panel h2 { font-family: var(--titulo); font-weight: 400; font-size: 1.5rem; margin: 0 0 10px; }
.estado-barra { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--madera); color: #fff; border: var(--borde); border-radius: var(--radio); padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--sombra); }
.estado-barra .fase { font-weight: 700; font-size: 1.1rem; flex: 1; min-width: 200px; }
.estado-barra .fase small { display: block; font-weight: 400; opacity: .85; }
.estado-barra .btn { margin: 0; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 0 14px; }
.fila-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.fila-ctrl label { font-weight: 600; font-size: .9rem; }
.fila-ctrl select, .fila-ctrl input[type=text] { border: 2px solid var(--tinta); border-radius: 10px; padding: 8px; background: #fff; flex: 1; min-width: 120px; }
.uso { font-size: .82rem; color: var(--gris); }
.lista-jug { list-style: none; padding: 0; margin: 0; }
.lista-jug li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 0; border-bottom: 1px dashed #d9c9a3; }
.lista-jug .av { font-size: .7rem; }
.lista-jug .n { flex: 1 1 90px; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: #bbb; flex: none; }
.punto.on { background: #2ECC40; }
.lista-msj { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; }
.lista-msj li { padding: 8px 0; border-bottom: 1px dashed #d9c9a3; display: flex; gap: 10px; align-items: flex-start; }
.lista-msj li.oculto { opacity: .45; text-decoration: line-through; }
.lista-msj p { margin: 0; flex: 1; }
.lista-msj small { color: var(--gris); display: block; }
.peligro { border-color: var(--rojo); }
.btn-avanzar { background: #7BD389; font-size: 1.05rem; }

@media (max-width: 700px) {
  .lobby { grid-template-columns: 1fr; }
}
