/* ===== Colores y base ===== */
:root {
  --fondo: #fff6f9;
  --tinta: #2b2240;
  --gris: #5f5475;
  --rosa: #d6336c;
  --rosa-texto: #b3245a;
  --linea: #f1e4ec;
  --verde: #17784a;
  --verde-suave: #ddf6ea;
  --rojo: #b02525;
  --rojo-suave: #fde5e6;
  --celeste: #e6f7fb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: "Nunito", system-ui, sans-serif;
}
h1,
h2,
h3 {
  font-family: "Fredoka", sans-serif;
  margin: 0;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
.wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.pantalla {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.oculto {
  display: none !important;
}
.centro {
  text-align: center;
}
.fuerte {
  font-weight: 800;
}
.sub {
  color: var(--gris);
  font-size: 14px;
  margin: 0;
}

/* ===== Bloques ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding-top: 12px;
}
.hero p {
  margin: 0;
  color: var(--gris);
}
.logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--rosa);
  display: grid;
  place-items: center;
  font-size: 42px;
}
.check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #2bb673;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
}
.card {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fila-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fila-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Formularios ===== */
label {
  font-weight: 700;
  font-size: 14px;
  margin-top: 8px;
  display: block;
}
label small {
  font-weight: 600;
  color: var(--gris);
}
input {
  width: 100%;
  padding: 14px;
  font:
    700 18px "Nunito",
    sans-serif;
  color: var(--tinta);
  border: 2px solid var(--linea);
  background: #fffafc;
  border-radius: 14px;
  outline: none;
}
input:focus {
  border-color: #3cc6e8;
}
input.mal {
  border-color: #c92a2a;
  background: #fff0f0;
}
.hint {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gris);
}
.hint.centro {
  justify-content: center;
}
.err {
  color: var(--rojo);
  font-size: 13px;
  font-weight: 800;
  min-height: 18px;
}

/* ===== Botones ===== */
.btn {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--rosa);
  color: #fff;
  font:
    600 18px "Fredoka",
    sans-serif;
  cursor: pointer;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.oscuro {
  background: var(--tinta);
}
.btn.borde {
  background: transparent;
  color: var(--gris);
  border: 2px solid var(--linea);
}
.link {
  background: none;
  border: 0;
  color: var(--rosa-texto);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 10px;
}
.btn-icono {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--linea);
  background: #fff;
  font-size: 26px;
  color: var(--tinta);
  cursor: pointer;
}

/* ===== Tarjeta de sellos ===== */
.tarjeta {
  background: var(--rosa);
  color: #fff;
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pill {
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  color: var(--rosa-texto);
  border-radius: 999px;
  padding: 3px 10px;
}
.sellos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.sello {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed #ffd0e0;
  display: grid;
  place-items: center;
  font:
    600 18px "Fredoka",
    sans-serif;
}
.sello.lleno {
  background: #fff;
  border: 0;
  font-size: 36px;
}
.sello.nuevo {
  box-shadow: 0 0 0 4px #ffd84d;
  animation: aparecer 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.sello.premio {
  font-size: 13px;
  font-weight: 700;
}
@keyframes aparecer {
  from {
    transform: scale(0) rotate(-30deg);
  }
  to {
    transform: scale(1) rotate(0);
  }
}
.gratis-box {
  background: #fff;
  color: var(--tinta);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
}
.num {
  font:
    700 30px "Fredoka",
    sans-serif;
  color: var(--rosa-texto);
}
.num.rosa {
  color: var(--rosa-texto);
}
.num.verde {
  color: var(--verde);
}

/* ===== Compra ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stepper button {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid var(--linea);
  background: #fff;
  font:
    600 26px "Fredoka",
    sans-serif;
  color: var(--tinta);
  cursor: pointer;
}
.stepper button:disabled {
  opacity: 0.35;
}
.valor {
  font:
    700 40px "Fredoka",
    sans-serif;
}
.resumen {
  background: var(--celeste);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #1f3d47;
}
.resumen .linea-res {
  display: flex;
  justify-content: space-between;
}

/* ===== Espera y confirmado ===== */
.espera-icono {
  width: 120px;
  height: 120px;
  margin: 20px auto 0;
  border-radius: 50%;
  background: #fff4d6;
  border: 3px dashed #e0a100;
  display: grid;
  place-items: center;
  font-size: 58px;
  animation: mecer 1.4s ease-in-out infinite;
}
@keyframes mecer {
  50% {
    transform: rotate(8deg) scale(1.05);
  }
}
.nombre-grande {
  font:
    700 30px "Fredoka",
    sans-serif;
}
.grid2,
.grid3 {
  display: grid;
  gap: 10px;
}
.grid2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center;
}
.mini {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 14px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
}
.grid2 .mini {
  background: var(--fondo);
}
.en-vivo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--verde);
}
.punto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2bb673;
}

/* ===== Historial ===== */
.historial {
  list-style: none;
  margin: 0;
  padding: 0;
}
.historial li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--linea);
  font-size: 14px;
}
.historial li:last-child {
  border-bottom: 0;
}
.tag {
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 9px;
}
.tag.ok {
  background: var(--verde-suave);
  color: var(--verde);
}
.tag.no {
  background: var(--rojo-suave);
  color: var(--rojo);
}

/* ===== Aviso flotante ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 120px);
  background: var(--tinta);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.3s;
  max-width: 90%;
  text-align: center;
}
.toast.ver {
  transform: translate(-50%, 0);
}
