:root {
  --color: #1e3a8a;
  --color-texto: #ffffff;
  --navy: #10213f;
  --cyan: #00b4e6;
  --fondo: #f5f7fb;
  --texto: #334155;
  --suave: #64748b;
  --borde: #dbe4f0;
  --ok: #15803d;
  --error: #b91c1c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.45;
  min-height: 100vh;
}

.pagina { max-width: 28rem; margin: 0 auto; padding: 0 1rem 2rem; }

/* cabecera con el color del negocio */
.cabecera {
  background: var(--color);
  color: var(--color-texto);
  margin: 0 -1rem 1.25rem;
  padding: 1.6rem 1.25rem 1.5rem;
  border-radius: 0 0 1.4rem 1.4rem;
}
.etiqueta { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; font-weight: 600; }
.cabecera h1 { font-size: 1.7rem; line-height: 1.15; margin-top: 0.3rem; }
.sub { margin-top: 0.5rem; font-size: 0.98rem; opacity: 0.95; }

/* avisos */
.aviso { padding: 0.75rem 1rem; border-radius: 0.8rem; margin-bottom: 1rem; background: #e0f2fe; color: #075985; font-weight: 600; font-size: 0.95rem; }
.aviso.ok { background: #dcfce7; color: #166534; }
.aviso.error { background: #fee2e2; color: #991b1b; }
.aviso[hidden] { display: none; }

/* tarjeta de sellos */
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: 1.2rem; padding: 1.2rem 1rem 1.1rem; box-shadow: 0 6px 20px rgba(16, 33, 63, 0.07); }
.tarjeta[hidden] { display: none; }
.progreso { font-weight: 800; font-size: 1.15rem; color: var(--navy); text-align: center; }
.sellos { display: grid; grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr)); gap: 0.6rem; margin: 1rem 0; justify-items: center; }
.sello {
  width: 3rem; height: 3rem; border-radius: 50%;
  border: 2px dashed var(--borde);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--suave); background: #f8fafc;
}
.sello.lleno { border: 2px solid var(--color); background: var(--color); color: var(--color-texto); font-size: 1.25rem; }
.mensaje { text-align: center; font-size: 0.97rem; }

/* reseña */
.resena { margin-top: 1.1rem; text-align: center; }
.resena[hidden] { display: none; }
.nota { font-size: 0.82rem; color: var(--suave); margin-top: 0.4rem; }

/* zona del personal */
.personal { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px dashed var(--borde); text-align: center; }
.personal[hidden] { display: none; }
.personal h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--suave); margin-bottom: 0.7rem; }

/* botones */
.boton {
  display: block; width: 100%; padding: 0.9rem 1rem; margin-top: 0.6rem;
  background: var(--color); color: var(--color-texto);
  border: 0; border-radius: 0.9rem; font: inherit; font-weight: 700; font-size: 1rem; text-align: center; text-decoration: none; cursor: pointer;
}
.boton:disabled { opacity: 0.6; cursor: wait; }
.boton-sec { background: #fff; color: var(--navy); border: 2px solid var(--borde); }
.boton-premio { background: var(--ok); color: #fff; }
.boton[hidden] { display: none; }

.pie { margin-top: 2rem; text-align: center; font-size: 0.8rem; color: var(--suave); }
.pie p + p { margin-top: 0.3rem; }

/* ventana del PIN */
dialog { border: 0; border-radius: 1.2rem; padding: 1.4rem 1.2rem; width: min(22rem, calc(100vw - 2rem)); margin: auto; box-shadow: 0 20px 50px rgba(16, 33, 63, 0.35); }
dialog::backdrop { background: rgba(16, 33, 63, 0.6); }
dialog h2 { font-size: 1.2rem; color: var(--navy); text-align: center; }
dialog input {
  display: block; width: 100%; margin-top: 0.9rem; padding: 0.7rem; text-align: center;
  font-size: 1.8rem; letter-spacing: 0.6rem; border: 2px solid var(--borde); border-radius: 0.8rem;
}
dialog .nota { text-align: center; }
.error { color: var(--error); font-size: 0.9rem; font-weight: 600; text-align: center; min-height: 1.3rem; margin-top: 0.5rem; }
.botones { display: flex; gap: 0.6rem; }
.botones .boton { margin-top: 0.4rem; }

/* página de inicio */
.inicio .cabecera { background: var(--navy); }
.inicio h2 { color: var(--navy); margin: 1.2rem 0 0.5rem; font-size: 1.1rem; }
.inicio ul { margin-left: 1.1rem; }
.inicio li { margin-bottom: 0.4rem; }
.inicio .logo { display: block; height: 3rem; margin: 0 auto 0.5rem; }
