/* Paleta del manual de identidad Sahi Matcha v1 (2026). */
:root {
  --verde: #C6E0C2;
  --guinda: #6E0E00;
  --amarillo: #F8E296;
  --matcha: #3B5A25;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px 16px 48px;
  background: var(--matcha);
  color: var(--amarillo);
  font-family: "Alpino", "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

.tarjeta {
  max-width: 420px;
  margin: 0 auto;
  background: var(--amarillo);
  border: 3px solid var(--guinda);
  border-radius: 24px;
  padding: 28px 24px 32px;
  text-align: center;
  color: var(--guinda);
}

.logo { width: 190px; max-width: 70%; height: auto; margin-bottom: 8px; }

h1 { font-size: 1.5rem; margin: 12px 0 4px; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 16px; color: var(--matcha); }
p { margin: 10px 0; }

.grande { font-size: 2.6rem; font-weight: 700; margin: 4px 0; }
.apunte { font-size: .9rem; color: var(--matcha); }

label { display: block; text-align: left; font-weight: 600; margin: 16px 0 6px; }

input[type="text"], input[type="tel"], input[type="password"], input[type="date"], input[type="number"] {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  border: 2px solid var(--matcha);
  border-radius: 12px;
  background: #fff;
  color: var(--guinda);
}

/* El navegador dibuja el ícono de calendario con su propio color fijo;
   se invierte a algo cercano al guinda del manual de identidad para que no
   se vea como un elemento ajeno al resto del formulario. */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(14%) sepia(70%) saturate(6000%) hue-rotate(3deg);
  cursor: pointer;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--verde);
  background: var(--guinda);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

button:hover { background: var(--matcha); }

.sellos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px auto 8px;
  max-width: 220px;
}

.sello {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3C/svg%3E");
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.sello.puesto {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(0 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E");
}

/* La huella gira a un ángulo distinto por casilla (fijo por posición, no al
   azar en cada carga, para que no salte al recargar la página) pero el aro
   nunca rota, así la huella siempre queda dentro del círculo. */
.sello.puesto:nth-child(2) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(47 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }
.sello.puesto:nth-child(3) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(133 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }
.sello.puesto:nth-child(4) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(198 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }
.sello.puesto:nth-child(5) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(284 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }
.sello.puesto:nth-child(7) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(76 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }
.sello.puesto:nth-child(8) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(219 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }
.sello.puesto:nth-child(9) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='7'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='39' fill='none' stroke='%236E0E00' stroke-width='6' filter='url(%23r)'/%3E%3Cg fill='none' stroke='%236E0E00' stroke-width='6' stroke-linecap='round' transform='rotate(335 50 50)'%3E%3Cellipse cx='50' cy='62' rx='16' ry='13'/%3E%3Cellipse cx='27' cy='40' rx='7' ry='9' transform='rotate(-18 27 40)'/%3E%3Cellipse cx='41' cy='27' rx='7' ry='9' transform='rotate(-6 41 27)'/%3E%3Cellipse cx='59' cy='27' rx='7' ry='9' transform='rotate(6 59 27)'/%3E%3Cellipse cx='73' cy='40' rx='7' ry='9' transform='rotate(18 73 40)'/%3E%3C/g%3E%3C/svg%3E"); }

.sello.meta {
  color: var(--amarillo);
  font-family: "Alpino", "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .02em;
  line-height: 1.1;
  padding: 4px;
  transform: rotate(-4deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='m' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='2' seed='3' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='8'/%3E%3C/filter%3E%3Ccircle cx='50' cy='50' r='43' fill='%236E0E00' filter='url(%23m)'/%3E%3C/svg%3E");
}

.aviso, .error {
  padding: 12px;
  border-radius: 12px;
  margin: 14px 0;
  font-size: .95rem;
}

.aviso { background: var(--verde); }
.error { background: var(--guinda); color: var(--amarillo); }

.enlace { display: inline-block; margin-top: 18px; color: var(--matcha); }

.qr { background: #fff; padding: 16px; border-radius: 16px; }
.qr svg { width: 100%; height: auto; }

footer {
  max-width: 420px;
  margin: 18px auto 0;
  text-align: center;
  font-size: .8rem;
  color: var(--amarillo);
  opacity: .85;
}

/* QR de la tarjeta del cliente y pantalla del cajero */
.qr-cliente { width: 180px; margin: 16px auto 0; }
.qr-cliente svg { width: 100%; height: auto; display: block; }
.lector { width: 100%; margin: 8px 0; border-radius: 12px; overflow: hidden; }
.resultados { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; }
.resultados li { margin: 8px 0; }
.resultados a { display: block; padding: 12px; background: #fff; border: 2px solid var(--matcha);
  border-radius: 12px; color: var(--guinda); text-decoration: none; font-weight: 600; }

.boton-wallet { display: inline-block; margin-top: 16px; padding: 12px 22px; border-radius: 999px;
  background: #1f1f1f; color: #fff; font-weight: 600; text-decoration: none; }
.boton-wallet:hover { background: #000; }
/* El botón del celular que trae el cliente va primero; el otro, discreto. */
.wallets { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wallets.primero-apple { flex-direction: column-reverse; }
.boton-wallet.secundario { background: transparent; color: var(--guinda); border: 1px solid currentColor;
  padding: 8px 16px; font-size: .9rem; }

/* Caja: cargar sellos de la tarjeta física (plegado para no estorbar). */
details { margin: 1.25rem 0; text-align: left; }
details summary { cursor: pointer; font-weight: 600; }
details form { margin-top: .75rem; }
details input[type="number"] { width: 8rem; }

/* Aviso de bebida de temporada (sahi_temporada) arriba de los sellos. */
.temporada {
  background: #fff;
  border: 2px solid var(--guinda);
  color: var(--guinda);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0;
  text-align: left;
}
.temporada p { margin: 4px 0; }
.temporada-etiqueta { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.temporada-titulo { font-size: 1.15rem; font-weight: 700; }

/* Ayuda y error en línea bajo un campo (cumpleaños) */
.ayuda { text-align: left; font-size: .85rem; margin: 4px 0 0; opacity: .8; }
.error-campo { text-align: left; font-size: .9rem; font-weight: 600; color: var(--guinda); margin: 4px 0 0; }

/* Casilla de aceptación (aviso de privacidad) y texto largo */
label.casilla { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; }
label.casilla input { margin-top: 3px; flex: none; width: 1.1rem; height: 1.1rem; }
footer a { color: inherit; }
.texto { text-align: left; font-size: .92rem; line-height: 1.5; }
.texto h2 { font-size: 1.05rem; margin: 18px 0 4px; }
.texto ul { padding-left: 20px; margin: 6px 0; }

/* Pantallas del cajero en la tablet de la barra: más ancho y botones más
   altos para usar con el dedo. En celular no cambia nada. */
@media (min-width: 700px) {
  .tarjeta-caja { max-width: 640px; }
  .tarjeta-caja button,
  .tarjeta-caja input:not([type="checkbox"]):not([type="radio"]) { min-height: 48px; font-size: 1.05rem; }
  .tarjeta-caja .lector { max-width: 480px; margin-left: auto; margin-right: auto; }
}
