* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f7f5ef;
  color: #292929;
}


/* ---------- Portada ---------- */

.hero {
  background: linear-gradient(135deg, #7b3f28, #b96c45);
  color: white;
  padding: 45px 20px 55px;
  text-align: center;
  border-radius: 0 0 32px 32px;
}

.hero .curso {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  opacity: .9;
}

.hero h1 {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 12px;
}

.hero h2 {
  font-size: 17px;
  font-weight: normal;
  opacity: .95;
}

.hero .motivo {
  max-width: 420px;
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.5;
  opacity: .9;
}

.hero .precio {
  display: inline-block;
  margin-top: 24px;
  background: white;
  color: #7b3f28;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
}


/* ---------- Contenido y tarjetas ---------- */

main {
  max-width: 700px;
  margin: auto;
  padding: 25px 16px 140px;
}

.card {
  background: white;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,.06);
}

.card h2 {
  color: #7b3f28;
  font-size: 22px;
  margin-bottom: 15px;
}


/* ---------- Premios y fecha ---------- */

.premio {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.premio:last-child {
  border-bottom: 0;
}

.premio strong {
  display: block;
  margin-bottom: 3px;
}

.fecha {
  text-align: center;
}

.fecha strong {
  color: #7b3f28;
  font-size: 20px;
}


/* ---------- Selección de números ---------- */

.titulo-numeros {
  margin-bottom: 8px;
}

.instruccion {
  font-size: 14px;
  color: #666;
  margin-bottom: 18px;
}

.leyenda {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 18px;
}

.leyenda span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.punto {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.disponible {
  background: #f3eee7;
}

.seleccionado {
  background: #7b3f28;
}

.vendido {
  background: #bbb;
}

.numeros {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.numero {
  border: 0;
  background: #f3eee7;
  border-radius: 10px;
  padding: 13px 3px;
  font-size: 14px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  transition: .15s;
}

.numero:active {
  transform: scale(.94);
}

.numero.activo {
  background: #7b3f28;
  color: white;
}

.numero.vendido {
  background: #ddd;
  color: #999;
  text-decoration: line-through;
  cursor: not-allowed;
}

.seleccion-lista {
  margin-top: 18px;
  padding: 13px;
  background: #faf8f4;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}


/* ---------- Encabezado de los pasos 2 y 3 ---------- */

.encabezado-paso {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.volver {
  border: 0;
  background: none;
  color: #7b3f28;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 12px 12px 0;
  cursor: pointer;
}

.progreso {
  font-size: 13px;
  color: #777;
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
}


/* ---------- Números elegidos (chips) ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  background: #7b3f28;
  color: white;
  font-weight: bold;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 10px;
}

.linea-total {
  font-size: 15px;
  color: #555;
  margin-bottom: 16px;
}

.linea-total strong {
  color: #7b3f28;
}

.boton-secundario {
  width: 100%;
  border: 1.5px solid #e3d8cc;
  background: white;
  color: #7b3f28;
  font-size: 15px;
  font-weight: bold;
  padding: 13px;
  border-radius: 14px;
  cursor: pointer;
}

.boton-secundario:active {
  background: #faf8f4;
}


/* ---------- Formulario ---------- */

.campo {
  margin-bottom: 18px;
}

.campo:last-child {
  margin-bottom: 0;
}

.campo label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 7px;
}

.opcional {
  font-weight: normal;
  color: #888;
}

/* 16px evita que el iPhone haga zoom al tocar el campo */
.campo input {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  border: 1.5px solid #e3d8cc;
  border-radius: 12px;
  background: #fffdfa;
  color: #292929;
  font-family: inherit;
}

.campo input:focus {
  outline: none;
  border-color: #b96c45;
  box-shadow: 0 0 0 3px rgba(185,108,69,.15);
}

.campo input[aria-invalid="true"] {
  border-color: #c0392b;
}

.campo-telefono {
  display: flex;
  gap: 8px;
}

.prefijo {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #f3eee7;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #555;
}

.error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 6px;
}

.error:empty {
  display: none;
}


/* ---------- Resumen ---------- */

.detalle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  margin-bottom: 18px;
  font-size: 15px;
}

.detalle dt {
  color: #777;
}

.detalle dd {
  font-weight: bold;
  text-align: right;
  word-break: break-word;
}

.totales {
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.total-final {
  font-size: 18px;
  color: #7b3f28 !important;
}

.aviso {
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.5;
  padding: 0 10px;
}


/* ---------- Solicitud lista ---------- */

.listo {
  text-align: center;
}

.listo-icono {
  font-size: 48px;
  margin-bottom: 10px;
}

.listo p {
  color: #555;
  line-height: 1.5;
  margin-bottom: 22px;
}


/* ---------- Barra inferior fija ---------- */

.barra-compra {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  z-index: 20;
}

.barra-interior {
  max-width: 700px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.resumen small {
  display: block;
  color: #777;
  margin-bottom: 2px;
}

.resumen strong {
  font-size: 21px;
  color: #7b3f28;
}

.continuar {
  border: 0;
  background: #7b3f28;
  color: white;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.continuar:disabled {
  background: #ccc;
  cursor: not-allowed;
}


/* ---------- Pantallas más anchas ---------- */

@media (min-width: 500px) {
  .numeros {
    grid-template-columns: repeat(10, 1fr);
  }

  .hero h1 {
    font-size: 48px;
  }
}
