/* Shhhot — estilos. Móvil primero; en escritorio la app se centra en una columna. */
:root {
  --fondo: #17132B;
  --fondo-2: #241E3F;
  --fondo-3: #2E2752;
  --borde: #5A5285;
  --texto: #FFFFFF;
  --suave: #B8B2D1;
  --coral: #FF6B5E;
  --amarillo: #FFD23F;
  --verde: #2FA398;
  --oscuro: #17132B;
  --radio: 16px;
  --titulos: "Avenir Next", "Segoe UI Variable Display", "Helvetica Neue", system-ui, sans-serif;
  --cuerpo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); }
body { font-family: var(--cuerpo); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--amarillo); }
a:hover { color: #FFE27A; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
       padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); gap: 20px; }

.barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marca { font-family: var(--titulos); font-weight: 700; font-size: 14px; letter-spacing: 1.5px; color: var(--amarillo);
         text-decoration: none; }
.barra-der { display: flex; align-items: center; gap: 8px; }

.etiqueta { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: var(--amarillo); text-transform: uppercase; }
h1 { margin: 0; font-family: var(--titulos); font-size: 32px; font-weight: 700; line-height: 1.1; }
h2 { margin: 0; font-family: var(--titulos); font-size: 20px; font-weight: 700; }
.cab { display: flex; flex-direction: column; gap: 6px; }
.suave { color: var(--suave); }
.pequeno { font-size: 13px; }
.centro { text-align: center; }
p { margin: 0; }

.tarjeta { background: var(--fondo-2); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px;
       border-radius: var(--radio); border: 1px solid var(--borde); background: transparent; color: var(--texto);
       font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--texto); border-color: var(--suave); }
.btn-principal { background: var(--coral); border-color: var(--coral); color: var(--oscuro); font-family: var(--titulos);
                 font-weight: 700; font-size: 17px; min-height: 56px; }
.btn-principal:hover { color: var(--oscuro); background: #FF8478; border-color: #FF8478; }
.btn-amarillo { background: var(--amarillo); border-color: var(--amarillo); color: var(--oscuro); }
.btn-amarillo:hover { color: var(--oscuro); background: #FFE27A; }
.btn-texto { border: 0; min-height: 44px; color: var(--suave); }
.btn-chip { min-height: 44px; border-radius: 999px; padding: 0 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.fila-botones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pie { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* formularios */
label, .rotulo { font-size: 13px; font-weight: 600; color: var(--suave); }
.campo { display: flex; flex-direction: column; gap: 8px; }
input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--borde); border-radius: 14px;
  background: var(--fondo-2); color: var(--texto); font-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
.error, .errorlist { color: #FF9C93; font-size: 14px; margin: 0; padding: 0; list-style: none; }
.mensajes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mensajes li { background: var(--fondo-3); border-radius: 12px; padding: 12px 14px; font-size: 14px; }

.segmentado { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px;
              background: var(--fondo-2); border-radius: 14px; }
.segmentado.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmentado input { position: absolute; opacity: 0; pointer-events: none; }
.segmentado label { min-height: 44px; border-radius: 10px; display: flex; flex-direction: column; align-items: center;
                    justify-content: center; color: var(--suave); font-size: 15px; cursor: pointer; text-align: center; }
.segmentado label strong { font-family: var(--titulos); font-size: 18px; color: inherit; }
.segmentado input:checked + label { background: var(--amarillo); color: var(--oscuro); }
.segmentado input:focus-visible + label { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor .pista-sw { flex-shrink: 0; width: 56px; height: 32px; border-radius: 999px; background: var(--fondo-3);
                         padding: 3px; display: flex; transition: background .15s; }
.interruptor .pista-sw::after { content: ""; width: 26px; height: 26px; border-radius: 999px; background: #fff;
                                transition: transform .15s; }
.interruptor input:checked + .pista-sw { background: var(--verde); }
.interruptor input:checked + .pista-sw::after { transform: translateX(24px); }
.interruptor input:focus-visible + .pista-sw { outline: 3px solid var(--amarillo); outline-offset: 2px; }

/* galería al crear */
.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.galeria input { position: absolute; opacity: 0; }
.galeria label { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; cursor: pointer;
                 border: 3px solid transparent; }
.galeria img { width: 100%; height: 100%; object-fit: cover; }
.galeria input:checked + label { border-color: var(--amarillo); }
.galeria input:focus-visible + label { outline: 3px solid #fff; outline-offset: 2px; }
.subir { min-height: 180px; border: 2px dashed var(--borde); border-radius: 18px; display: flex; flex-direction: column;
         align-items: center; justify-content: center; gap: 8px; color: var(--suave); font-size: 15px; cursor: pointer;
         overflow: hidden; position: relative; text-align: center; padding: 16px; transition: border-color .15s, background .15s; }
.subir:hover { border-color: var(--suave); }
.subir.arrastrando { border-color: var(--amarillo); background: rgba(255, 210, 63, .08); color: #fff; }
.subir.con-foto { padding: 0; aspect-ratio: 1; }
.subir.con-foto #texto-zona, .subir.con-foto svg { display: none; }
.subir #nombre-foto { position: relative; z-index: 1; color: #fff; font-weight: 600; word-break: break-all; }
.subir.con-foto #nombre-foto { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 10px;
                               background: rgba(23, 19, 43, .75); }
body.soltando::after { content: "Suelta la foto"; position: fixed; inset: 12px; border: 3px dashed var(--amarillo);
                       border-radius: 24px; background: rgba(23, 19, 43, .85); color: var(--amarillo); display: flex;
                       align-items: center; justify-content: center; font-family: var(--titulos); font-size: 28px;
                       font-weight: 700; z-index: 50; pointer-events: none; }
.subir img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oculto { display: none !important; }

/* tablero */
.puzzle { position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--fondo-3); }
.puzzle .fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.2);
                 opacity: .55; }
.rejilla { position: absolute; inset: 0; display: grid; }
.casilla { position: relative; border: 1px solid var(--fondo); display: flex; align-items: center; justify-content: center;
           background: var(--fondo-3); color: var(--suave); text-decoration: none; perspective: 600px; }
.casilla:hover { background: #3A3266; color: #fff; }
.casilla.siguiente { background: var(--amarillo); color: var(--oscuro); }
.casilla.girada { background: transparent; border-color: rgba(23, 19, 43, .35); }
.casilla.girada img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.casilla .letra { position: relative; width: 40%; aspect-ratio: 1; border-radius: 999px; background: var(--fondo);
                  color: var(--amarillo); display: flex; align-items: center; justify-content: center;
                  font-family: var(--titulos); font-weight: 700; font-size: clamp(14px, 5vw, 24px); }
.casilla svg { width: 34%; height: 34%; }
.girando { animation: girar .6s ease both; }
@keyframes girar { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
@media (prefers-reduced-motion: reduce) { .girando { animation: none; } }

.progreso { height: 8px; border-radius: 999px; background: var(--fondo-3); overflow: hidden; }
.progreso > div { height: 100%; background: var(--coral); }
.leyenda { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.leyenda div { padding: 12px 8px; border-radius: 14px; background: var(--fondo-2); display: flex; flex-direction: column;
               align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.leyenda svg { width: 24px; height: 24px; }

.letras { display: flex; gap: 6px; }
.ficha { flex: 1 1 0; min-width: 0; max-width: 44px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
         font-family: var(--titulos); font-weight: 700; font-size: clamp(14px, 5vw, 22px); background: var(--amarillo); color: var(--oscuro); }
.ficha.vacia { background: transparent; border: 2px dashed var(--borde); }

.rivales { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.rival { padding: 10px; border-radius: 14px; background: var(--fondo-2); display: flex; flex-direction: column; gap: 6px;
         font-size: 13px; font-weight: 600; min-width: 0; }
.rival.yo { box-shadow: inset 0 0 0 2px var(--amarillo); }
.rival .nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rival .barra-mini { height: 6px; border-radius: 999px; background: var(--fondo); overflow: hidden; }
.rival .barra-mini > div { height: 100%; background: var(--verde); }
.crono { font-family: var(--titulos); font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.insignia { padding: 10px 14px; border-radius: 999px; background: var(--fondo-2); font-size: 14px; font-weight: 600;
            white-space: nowrap; }

/* minijuegos */
.cab-juego { display: flex; align-items: center; gap: 12px; }
.volver { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--borde); display: flex;
          align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.aviso { min-height: 24px; font-size: 15px; font-weight: 600; text-align: center; }
.aviso.bien { color: #5FD3C6; }
.aviso.mal { color: #FF9C93; }

.sudoku { align-self: center; width: min(100%, 340px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sudoku .bloque { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.celda { aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--fondo-2); color: var(--amarillo);
         font-family: var(--titulos); font-weight: 700; font-size: 32px; cursor: pointer; padding: 0; }
.celda.fija { background: var(--fondo-3); color: #fff; cursor: default; }
.celda.activa { box-shadow: inset 0 0 0 3px var(--coral); }
.celda.choque { color: #FF9C93; }
.teclas-num { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tecla-num { min-height: 60px; border: 0; border-radius: 16px; background: var(--fondo-3); color: #fff;
             font-family: var(--titulos); font-weight: 700; font-size: 24px; cursor: pointer; }
.tecla-num:hover { background: #3A3266; }

.pista-caja { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
              border-radius: 16px; background: var(--fondo-2); }
.vidas { display: flex; gap: 4px; }
.vidas svg { width: 18px; height: 18px; }
.huecos { display: grid; gap: 6px; padding: 20px 0 8px; }
.hueco { height: 52px; border-bottom: 3px solid var(--borde); display: flex; align-items: center; justify-content: center;
         font-family: var(--titulos); font-weight: 700; font-size: clamp(18px, 6vw, 28px); }
.teclado { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tecla { min-height: 48px; border: 0; border-radius: 10px; background: var(--fondo-3); color: #fff; font-weight: 600;
         font-size: 17px; cursor: pointer; padding: 0; }
.tecla:hover { background: #3A3266; }
.tecla.ok { background: var(--verde); color: var(--oscuro); }
.tecla.no { background: var(--fondo-2); color: #8F88B3; text-decoration: line-through; }

.panal { align-self: center; position: relative; width: 300px; height: 280px; }
.hex { position: absolute; width: 88px; height: 100px; border: 0; padding: 0; background: var(--fondo-3); color: #fff;
       font-family: var(--titulos); font-weight: 700; font-size: 30px; cursor: pointer;
       clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hex:hover { background: #3A3266; }
.hex.central { background: var(--amarillo); color: var(--oscuro); }
.entrada-pal { min-height: 56px; border-bottom: 3px solid var(--borde); display: flex; align-items: center;
               justify-content: center; font-family: var(--titulos); font-weight: 700; font-size: 30px; letter-spacing: 4px; }
.entrada-pal .c { color: var(--amarillo); }
.encontradas { display: flex; flex-wrap: wrap; gap: 8px; }
.encontradas span { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.encontradas .ok { background: var(--verde); color: var(--oscuro); }
.encontradas .vacia { border: 1px dashed var(--borde); color: var(--suave); }
.teclas-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* hoja inferior (atascado / palabreja) */
.velo { position: fixed; inset: 0; background: rgba(10, 8, 22, .7); display: flex; align-items: flex-end;
        justify-content: center; z-index: 10; }
.hoja { width: 100%; max-width: 480px; background: var(--fondo-2); border-radius: 28px 28px 0 0;
        padding: 26px 20px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.opcion { width: 100%; min-height: 68px; padding: 12px 16px; border: 1px solid var(--borde); border-radius: 16px;
          background: transparent; color: #fff; font-weight: 600; font-size: 16px; display: flex; align-items: center;
          justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; text-decoration: none; }
.opcion:hover { color: #fff; border-color: var(--suave); }
.opcion small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--suave); }
.precio { font-family: var(--titulos); font-weight: 700; font-size: 15px; white-space: nowrap; }

/* final y listas */
.mensaje-final { background: var(--fondo-2); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.mensaje-final p { font-family: var(--titulos); font-size: 20px; font-weight: 600; line-height: 1.35; }
.solucion { background: var(--amarillo); color: var(--oscuro); border-radius: 20px; padding: 18px 20px; }
.solucion .pal { font-family: var(--titulos); font-weight: 700; font-size: 32px; letter-spacing: 5px; word-break: break-all; }
.lista { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.fila { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--fondo-2);
        text-decoration: none; color: #fff; }
.fila:hover { color: #fff; background: #2B2449; }
.fila.yo { box-shadow: inset 0 0 0 2px var(--amarillo); }
.fila .pos { width: 32px; font-family: var(--titulos); font-weight: 700; font-size: 22px; color: var(--suave); }
.fila .pos.oro { color: var(--amarillo); }
.fila .cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.fila .cuerpo span { font-size: 13px; font-weight: 400; color: var(--suave); }
.fila .dato { font-family: var(--titulos); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.mini { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--fondo-3); }
.vacio { padding: 18px; border: 1px dashed var(--borde); border-radius: 16px; color: var(--suave); text-align: center; font-size: 14px; }

.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cifras div { padding: 14px 8px; border-radius: 16px; background: var(--fondo-2); text-align: center; }
.cifras strong { display: block; font-family: var(--titulos); font-size: 24px; }
.cifras span { font-size: 13px; color: var(--suave); }

.enlace-copiar { display: flex; gap: 8px; }
.enlace-copiar input { flex: 1; min-width: 0; font-size: 14px; }

.portada-img { border-radius: 24px; aspect-ratio: 1; object-fit: cover; }
.pasos { display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; counter-reset: paso; }
.pasos li { display: flex; gap: 12px; align-items: flex-start; }
.pasos li::before { counter-increment: paso; content: counter(paso); flex-shrink: 0; width: 32px; height: 32px;
                    border-radius: 999px; background: var(--fondo-3); color: var(--amarillo); display: flex;
                    align-items: center; justify-content: center; font-weight: 700; }
.legal { font-size: 13px; color: var(--suave); text-align: center; }
.legal a { color: var(--suave); }
.texto-legal { display: flex; flex-direction: column; gap: 12px; color: var(--suave); }
.texto-legal h2 { color: #fff; font-size: 18px; margin-top: 8px; }

/* ---------------------------------------------------------------- v3.0: inicio, candado y retos */
.enlace-tarjeta { color: #fff; text-decoration: none; }
.enlace-tarjeta:hover { color: #fff; background: #2B2449; }
.fila-regalo { display: flex; gap: 14px; align-items: center; }
.mini.grande { width: 88px; height: 88px; border-radius: 16px; }
.cuerpo-regalo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cuerpo-regalo strong { font-family: var(--titulos); font-size: 18px; }
.cuerpo-regalo .progreso { height: 6px; background: var(--fondo); }
.aviso-candado { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
                 background: var(--amarillo); color: var(--oscuro); font-size: 14px; font-weight: 600; }
.aviso-candado svg { flex-shrink: 0; }
.retos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.reto-tarjeta { padding: 12px 10px; border-radius: 16px; border: 1px solid var(--borde); color: #fff; text-decoration: none;
                display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 0; }
.reto-tarjeta:hover { color: #fff; border-color: var(--suave); }
.reto-tarjeta strong { font-family: var(--titulos); font-size: 14px; line-height: 1.2; }
.hecho { color: #5FD3C6; font-weight: 600; }
.duelo { color: var(--amarillo); font-weight: 600; }
.banda-candado { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 2px solid var(--amarillo);
                 color: #fff; text-decoration: none; }
.banda-candado:hover { color: #fff; background: #2B2449; }
.banda-candado .icono { width: 44px; height: 44px; border-radius: 12px; background: var(--fondo-3); display: flex;
                        align-items: center; justify-content: center; flex-shrink: 0; }
.banda-candado .texto { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; color: var(--suave); }
.banda-candado .texto strong { font-family: var(--titulos); font-size: 16px; color: #fff; }
.banda-candado .hoy { font-size: 12px; font-weight: 600; color: var(--amarillo); text-align: right; }
.sello { width: 88px; height: 88px; border-radius: 999px; background: var(--amarillo); display: flex; align-items: center;
         justify-content: center; }
.sello.cerrado { background: var(--fondo-3); }
.pequeno-sello { width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0; }
.casilla-form { display: contents; }
.casilla.elegible { border: 2px solid var(--amarillo); font-family: var(--titulos); font-weight: 700; font-size: 18px;
                    color: var(--amarillo); cursor: pointer; padding: 0; width: 100%; height: 100%; }
.casilla.elegible:hover { background: var(--amarillo); color: var(--oscuro); }
.rejilla-resultado { width: 132px; display: grid; gap: 6px; flex-shrink: 0; }
.rejilla-resultado span, .leyenda-mini i { aspect-ratio: 1; border-radius: 8px; display: block; }
.c-ok { background: var(--verde); }
.c-fallo { background: var(--amarillo); }
.c-no { background: var(--fondo-3); }
.leyenda-mini { display: flex; gap: 14px; font-size: 12px; color: var(--suave); flex-wrap: wrap; }
.leyenda-mini span { display: flex; align-items: center; gap: 6px; }
.leyenda-mini i { width: 10px; height: 10px; border-radius: 3px; aspect-ratio: auto; }

/* caja fuerte */
.caja { display: flex; flex-direction: column; gap: 8px; }
.caja-fila { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 76px; gap: 6px; align-items: center; }
.digito { height: 52px; border-radius: 12px; background: var(--fondo-3); display: flex; align-items: center; justify-content: center;
          font-family: var(--titulos); font-weight: 700; font-size: 26px; }
.digito.vacio-d { background: transparent; border: 2px dashed var(--borde); }
.digito.actual { box-shadow: inset 0 0 0 2px var(--amarillo); }
.pistas { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.punto { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }
.teclas-10 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }

/* ruedas */
.ruedas { align-self: center; display: flex; gap: 8px; padding: 16px 12px; border-radius: 24px; background: var(--fondo-3); }
.rueda { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.flecha { width: 52px; height: 44px; border: 0; border-radius: 12px; background: var(--fondo-2); display: flex;
          align-items: center; justify-content: center; padding: 0; cursor: pointer; color: #fff; }
.ventana { width: 52px; height: 140px; border-radius: 14px; background: var(--fondo-2); display: flex; flex-direction: column;
           align-items: center; justify-content: center; gap: 8px; }
.ventana .v { font-family: var(--titulos); font-weight: 700; font-size: 18px; color: var(--borde); }
.ventana .a { width: 52px; height: 54px; display: flex; align-items: center; justify-content: center;
              font-family: var(--titulos); font-weight: 700; font-size: 32px; background: var(--fondo-3); color: #fff; }
.ventana .a.bien { background: var(--amarillo); color: var(--oscuro); }
.historial { display: flex; flex-direction: column; gap: 6px; }
.historial div { display: flex; gap: 4px; }
.historial span { width: 30px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
                  font-family: var(--titulos); font-weight: 700; background: var(--fondo-3); }
.historial span.bien { background: var(--amarillo); color: var(--oscuro); }

/* patrón */
.patron { align-self: center; position: relative; width: 270px; height: 270px; touch-action: none; }
.patron svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nodo { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 999px; border: 0;
        background: var(--fondo-3); cursor: pointer; padding: 0; }
.nodo::after { content: ""; position: absolute; inset: 22px; border-radius: 999px; background: var(--suave); }
.nodo.on { background: rgba(255, 210, 63, .25); }
.nodo.on::after { background: var(--amarillo); }

/* cifrado */
.cifrado { font-family: var(--titulos); font-weight: 700; font-size: 22px; letter-spacing: 3px; line-height: 1.5;
           padding: 16px; border-radius: 16px; background: var(--fondo-2); text-align: center; word-break: break-word; }
.descifrado { font-family: var(--titulos); font-weight: 700; font-size: 20px; letter-spacing: 3px; line-height: 1.5;
              padding: 16px; border-radius: 16px; border: 2px dashed var(--borde); text-align: center; color: var(--amarillo);
              word-break: break-word; }
.selector { display: grid; grid-template-columns: 56px 1fr 56px; gap: 10px; align-items: center; }
.selector .valor { text-align: center; font-family: var(--titulos); font-weight: 700; font-size: 22px; }

/* luces fuera */
.luces { align-self: center; width: min(100%, 300px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.luz { aspect-ratio: 1; border: 0; border-radius: 14px; background: var(--fondo-3); cursor: pointer; padding: 0; }
.luz.on { background: var(--amarillo); box-shadow: 0 0 18px rgba(255, 210, 63, .5); }

/* ---------------------------------------------------------------- v4.0: fiesta «Pasa el móvil» */
.pasar { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 24px 12px;
         border-radius: 24px; background: var(--fondo-2); border: 3px solid var(--color); }
.pasar-nombre { font-family: var(--titulos); font-weight: 700; font-size: 44px; line-height: 1.05; color: var(--color);
                word-break: break-word; }
.pasar form { width: 100%; }
.pasar-boton { width: 100%; min-height: 64px; font-size: 19px; }
.marcador { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.marcador-j { flex: 1 0 72px; min-width: 72px; padding: 8px 10px; border-radius: 14px; background: var(--fondo-2);
              border-top: 4px solid var(--color); display: flex; flex-direction: column; gap: 2px; }
.marcador-j .nombre { font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marcador-j strong { font-family: var(--titulos); font-size: 22px; }
.marcador-j.activo { background: var(--fondo-3); box-shadow: 0 0 0 2px var(--color); }
.crono.urgente { color: var(--coral); }
.crono-pequeno { font-size: 30px; }
.jugadores { display: flex; flex-direction: column; gap: 8px; }
.jugador-fila { display: flex; gap: 8px; align-items: center; }
.jugador-fila input { flex: 1; min-width: 0; }
.jugador-fila .quitar { flex-shrink: 0; }

/* ---------------------------------------------------------------- v5.0: Google */
.btn-google { background: #FFFFFF; border-color: #FFFFFF; color: #1F1F1F; font-weight: 600; }
.btn-google:hover { background: #F2F2F2; border-color: #F2F2F2; color: #1F1F1F; }
.separador { display: flex; align-items: center; gap: 12px; color: var(--suave); font-size: 13px; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
