:root {
  --vino: #2a1420; --vino-2: #3d1f2e; --vino-3: #54303f;
  --crema: #fbf3e3; --crema-2: #f3e6cd; --tinta: #2a1420; --tinta-2: #6c5560;
  --tomate: #e4572e; --tomate-d: #c2431e; --mostaza: #f2b632; --oliva: #6d7a3a; --oliva-s: #e6ead2;
  --disp: 'Bricolage Grotesque', Georgia, serif; --text: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--text); background: var(--vino); color: var(--crema); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1, h2 { font-family: var(--disp); font-weight: 800; letter-spacing: -.02em; line-height: 1.04; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
.marca { font-family: var(--disp); font-weight: 800; font-size: clamp(18px, 2.2vmin, 30px); color: var(--mostaza); letter-spacing: -.01em; }
.fila { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.btn { border: 2px solid transparent; background: var(--crema-2); color: var(--tinta); border-radius: 14px; padding: 12px 20px; font-weight: 700; font-size: clamp(16px, 2vmin, 24px); transition: transform .12s; }
.btn:not(:disabled):active { transform: scale(.97); }
.btn.pri { background: var(--tomate); color: #fff; }
.btn.claro { background: transparent; border-color: rgba(251, 243, 227, .4); color: var(--crema); }
.btn.grande { width: 100%; padding: 18px 22px; font-size: 20px; border-radius: 16px; }
.btn.chico { padding: 7px 12px; font-size: clamp(13px, 1.5vmin, 18px); }
.btn:focus-visible, .op:focus-visible, .juego:focus-visible, .servilleta:focus-visible, .plato:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--mostaza); outline-offset: 2px; }
.aviso { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--crema); color: var(--tinta); padding: 12px 20px; border-radius: 12px; font-weight: 700; z-index: 20; max-width: calc(100vw - 32px); }

/* el mantel a cuadros, la firma visual */
.mantel { position: fixed; left: 0; right: 0; bottom: 0; height: clamp(26px, 5.5vmin, 64px); z-index: 1; pointer-events: none;
  background-color: var(--crema); background-image: linear-gradient(90deg, rgba(228, 87, 46, .88) 50%, transparent 50%), linear-gradient(rgba(228, 87, 46, .62) 50%, transparent 50%);
  background-size: clamp(26px, 5.5vmin, 64px) clamp(26px, 5.5vmin, 64px); }

/* ---------- portada ---------- */
.portada { min-height: 100dvh; padding: 8vmin 6vw 14vmin; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 980px; margin: auto; }
.portada h1 { font-size: clamp(42px, 8.4vmin, 104px); }
.portada .sub { font-size: clamp(17px, 2.6vmin, 28px); color: #e6d6c6; max-width: 34em; line-height: 1.4; }
.portada .fila { justify-content: flex-start; }
.portada .btn.grande { width: auto; padding: 18px 34px; font-size: clamp(19px, 2.6vmin, 30px); }
.unir label { display: block; font-weight: 700; margin-bottom: 8px; color: #e6d6c6; }
.unir .fila { gap: 8px; }
.unir input { width: 150px; padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(251, 243, 227, .4); background: transparent; color: var(--crema); font-size: 18px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.unir input::placeholder { letter-spacing: 0; text-transform: none; color: #c9b3a8; font-weight: 500; }

/* ---------- pantalla compartida ---------- */
.tv { min-height: 100dvh; padding: 4vmin 5vw clamp(50px, 9vmin, 100px); display: flex; }
.centro { margin: auto; width: 100%; max-width: 1200px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2.6vmin; }
.centro.ancho { max-width: 1400px; }
.centro h1 { font-size: clamp(38px, 8vmin, 96px); }
.centro h1.pregunta { font-size: clamp(32px, 6.4vmin, 78px); max-width: 20em; }
.ante { font-size: clamp(17px, 2.8vmin, 32px); color: var(--mostaza); font-weight: 700; max-width: 34em; }
.sub { font-size: clamp(16px, 2.4vmin, 28px); color: #e6d6c6; line-height: 1.4; max-width: 34em; }
.estado { font-size: clamp(17px, 2.6vmin, 30px); color: var(--crema); font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.top { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.chip { background: var(--vino-3); color: var(--crema); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: clamp(13px, 1.8vmin, 20px); }
.reloj { width: clamp(52px, 8vmin, 88px); height: clamp(52px, 8vmin, 88px); border-radius: 50%; background: var(--mostaza); color: var(--tinta); display: grid; place-items: center; font-family: var(--disp); font-weight: 800; font-size: clamp(22px, 3.8vmin, 42px); }
canvas.barras { width: min(760px, 86vw); height: auto; max-height: 22vmin; }
.persona { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.persona i { font-style: normal; }
.persona.xl { font-family: var(--disp); font-weight: 800; font-size: clamp(40px, 9vmin, 110px); gap: 16px; letter-spacing: -.02em; line-height: 1.05; color: var(--mostaza); }
.cita { font-family: var(--disp); font-size: clamp(22px, 4vmin, 48px); font-weight: 500; max-width: 26em; }

/* sala */
.sala { margin: auto; width: 100%; max-width: 1500px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5vw; align-items: center; }
.sala-izq { display: flex; flex-direction: column; gap: 2vmin; align-items: flex-start; }
.sala-izq h1 { font-size: clamp(36px, 7.2vmin, 88px); }
.qr { background: var(--crema); padding: 1.4vmin; border-radius: 18px; width: min(38vmin, 340px); }
.qr svg { display: block; width: 100%; height: auto; }
.unirse { font-size: clamp(14px, 2vmin, 22px); color: #e6d6c6; line-height: 1.5; overflow-wrap: anywhere; }
.cod { font-family: var(--disp); font-weight: 800; color: var(--mostaza); letter-spacing: .08em; font-size: 1.35em; }
.sala-der { display: flex; flex-direction: column; gap: 2.2vmin; min-width: 0; align-items: flex-start; }
.sala-der h2 { font-size: clamp(24px, 4vmin, 48px); }
.mesa { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.mesa li { background: var(--crema); color: var(--tinta); font-weight: 700; padding: 8px 14px; border-radius: 999px; font-size: clamp(15px, 2.2vmin, 26px); display: flex; gap: 8px; align-items: center; }
.mesa li i { font-style: normal; }
.mesa li small { color: var(--tomate-d); font-weight: 700; }
.mesa li.vacio { background: transparent; color: #c9b3a8; font-weight: 500; padding-left: 0; }
.juegos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.juego { text-align: left; border: 0; border-radius: 20px; padding: 2.2vmin 2.4vmin; display: flex; flex-direction: column; gap: 8px; color: var(--tinta); transition: transform .14s; }
.juego:not(:disabled):hover { transform: translateY(-3px); }
.juego b { font-family: var(--disp); font-weight: 800; font-size: clamp(22px, 3.4vmin, 42px); line-height: 1.05; letter-spacing: -.01em; }
.juego span { font-size: clamp(14px, 1.9vmin, 21px); line-height: 1.35; }
.juego small { font-weight: 700; font-size: clamp(12px, 1.6vmin, 17px); }
.juego.abu { background: var(--mostaza); }
.juego.qui { background: var(--crema); }

/* votos y servilletas */
.fin .tabla { width: 100%; }
.tabla { list-style: none; margin: 0; padding: 0; width: min(620px, 90vw); display: flex; flex-direction: column; gap: 8px; }
.tabla li { display: flex; gap: 14px; align-items: center; background: var(--vino-2); border-radius: 14px; padding: 10px 18px; font-size: clamp(18px, 2.8vmin, 32px); }
.tabla li.top { background: var(--mostaza); color: var(--tinta); }
.tabla i { font-style: normal; }
.tabla b { flex: 1; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.servilletas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; width: 100%; }
.servilleta { background: var(--crema); color: var(--tinta); border: 0; border-radius: 6px 22px 6px 22px; padding: 2.2vmin 2.4vmin; font-family: var(--disp); font-weight: 500; font-size: clamp(18px, 2.9vmin, 34px); line-height: 1.2; text-align: left; overflow-wrap: anywhere; }
button.servilleta:disabled { opacity: 1; }
.servilletas.chicas .servilleta { font-size: clamp(15px, 2.1vmin, 24px); background: var(--vino-2); color: var(--crema); }
.servilleta small { display: block; color: var(--mostaza); font-family: var(--text); font-weight: 700; font-size: .78em; margin-bottom: 4px; }

/* fin */
.fin { margin: auto; width: 100%; max-width: 1400px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 5vw; align-items: start; }
.fin > div { display: flex; flex-direction: column; gap: 2vmin; align-items: flex-start; min-width: 0; }
.fin h1 { font-size: clamp(36px, 7vmin, 84px); }
.fin h2 { font-size: clamp(22px, 3.8vmin, 44px); }
.historias { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.historias li { background: var(--vino-2); border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; font-size: clamp(15px, 2.2vmin, 24px); }
.historias span { color: #e6d6c6; }
.historias .fila { justify-content: flex-start; gap: 8px; }
.nota { color: var(--mostaza); font-size: clamp(14px, 1.9vmin, 20px); font-weight: 500; }

/* ---------- celular ---------- */
.cel { min-height: 100dvh; padding: 0 18px calc(22px + env(safe-area-inset-bottom)); background: var(--crema); color: var(--tinta); display: flex; flex-direction: column; gap: 14px; font-size: 18px; }
.cel .marca { color: var(--tomate-d); font-size: 24px; }
.cel h1 { font-size: 36px; }
.cel h2 { font-size: 30px; }
.cel .sub { color: var(--tinta-2); font-size: 18px; text-align: center; }
.cel .sub.izq { text-align: left; }
.cel .btn { background: var(--crema-2); }
.cel .btn.pri { background: var(--tomate); color: #fff; }
.cel .btn.claro { background: transparent; border-color: rgba(42, 20, 32, .3); color: var(--tinta); }
.cel.medio { text-align: center; align-items: stretch; }
.cel.medio h1 { margin-top: auto; }
.cel.medio > :last-child { margin-bottom: auto; }
.cel.gano { background: var(--mostaza); }
.cel.gano .sub { color: var(--tinta); }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 0 10px; font-weight: 700; font-size: 16px; border-bottom: 2px solid rgba(42, 20, 32, .12); text-align: left; }
.cab span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tiempo { background: var(--mostaza); padding: 2px 10px; border-radius: 999px; }
.lbl { font-weight: 700; color: var(--tomate-d); font-size: 16px; }
.entrada { padding-top: calc(28px + env(safe-area-inset-top)); }
.sala-cod { color: var(--tinta-2); font-weight: 700; }
#f { display: flex; flex-direction: column; gap: 12px; }
#f label { font-weight: 700; }
.cel input, .cel textarea { width: 100%; padding: 14px 16px; font: inherit; font-size: 20px; border-radius: 14px; border: 2px solid rgba(42, 20, 32, .25); background: #fff; color: var(--tinta); }
.platos { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.plato { border: 2px solid transparent; background: transparent; font-size: 26px; padding: 6px 0; border-radius: 12px; line-height: 1; }
.plato.on { background: var(--mostaza); }
.capitan { display: flex; flex-direction: column; gap: 10px; margin-bottom: auto; margin-top: 8px; text-align: left; }
.opciones { display: flex; flex-direction: column; gap: 10px; }
.op { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 2px solid rgba(42, 20, 32, .16); padding: 16px 18px; border-radius: 16px; font-weight: 700; font-size: 20px; color: var(--tinta); overflow-wrap: anywhere; }
.op i { font-style: normal; font-size: 26px; }
.op.texto { font-weight: 500; line-height: 1.3; }
.op.libre { background: var(--crema-2); font-weight: 700; }
.op:active { background: var(--mostaza); }
.poker { font-size: 72px; margin-top: auto; line-height: 1; }
.poker + h1 { margin-top: 8px !important; }
.listo { display: flex; align-items: center; gap: 12px; background: var(--oliva-s); color: #3f4a1b; padding: 16px 18px; border-radius: 16px; font-weight: 700; }
.listo span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--oliva); color: #fff; display: grid; place-items: center; }
.listo .gira { background: none; border: 3px solid var(--oliva); border-top-color: transparent; animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
#adv { display: flex; flex-direction: column; gap: 12px; }
#adv textarea { resize: none; }

/* grabador */
.grabador { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0 4px; text-align: center; }
.mic { position: relative; margin: 22px 0; width: 136px; height: 136px; border-radius: 50%; border: 0; background: var(--tomate); display: grid; place-items: center; box-shadow: 0 10px 24px rgba(228, 87, 46, .35); }
.mic-i { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; background: #fff; transition: border-radius .15s; }
.mic.on { background: var(--tomate-d); }
.mic.on .mic-i { border-radius: 8px; }
.mic-nivel { position: absolute; inset: 0; border-radius: 50%; background: rgba(228, 87, 46, .28); transition: transform .08s; }
.mic-t { font-weight: 700; font-size: 20px; }
.mic-s { color: var(--tinta-2); font-size: 16px; }
.mic-err { color: var(--tomate-d); font-weight: 700; text-align: center; }
.grabador .btn.grande { margin-top: 6px; }

@media (max-width: 760px) {
  .sala, .fin { grid-template-columns: 1fr; gap: 26px; }
  .juegos { grid-template-columns: 1fr; }
  .juego { padding: 16px; }
  .qr { width: min(56vw, 240px); padding: 8px; }
  .centro { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
