:root {
  --verde: #367c2b;
  --verde-osc: #1e4a18;
  --verde-noche: #12300f;
  --amarillo: #ffde00;
  --amarillo-osc: #e6c200;
  --crema: #f6f8f1;
  --tinta: #13240f;
  --gris: #5f6f5a;
  --borde: #d5dfcd;
  --radio: 18px;
  font-family: "Barlow", system-ui, sans-serif;
  color: var(--tinta);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 50% -200px, #4c9a3e 0%, transparent 70%),
    linear-gradient(180deg, var(--verde) 0%, var(--verde-osc) 55%, var(--verde-noche) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
  -webkit-tap-highlight-color: transparent;
}
.titulo {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.92;
  color: var(--amarillo);
  text-align: center;
  margin: 8px 0 4px;
  font-size: clamp(2.6rem, 11vw, 4.2rem);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}
.titulo small {
  display: block;
  font-size: 0.36em;
  letter-spacing: 0.18em;
  color: #fff;
  font-weight: 600;
  margin-bottom: 6px;
}
.cono { width: 74px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--radio);
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  margin-top: 20px;
}
.card.ancha { max-width: 1100px; }
label.lbl {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris);
  margin: 0 0 8px;
}
.campo { margin-bottom: 18px; }
input[type="text"], input[type="password"], select {
  width: 100%;
  font: inherit;
  font-size: 1.15rem;
  padding: 14px 14px;
  border: 2px solid var(--borde);
  border-radius: 12px;
  background: var(--crema);
  color: var(--tinta);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, select:focus { border-color: var(--verde); background: #fff; }

/* Selector de género */
.generos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.generos input { position: absolute; opacity: 0; pointer-events: none; }
.generos label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 16px 8px;
  border: 2px solid var(--borde);
  border-radius: 14px;
  background: var(--crema);
  font-weight: 700; font-size: 1.1rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.generos label .ico { font-size: 1.8rem; line-height: 1; }
.generos input:checked + label {
  border-color: var(--verde);
  background: var(--verde);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(54, 124, 43, 0.2);
}
.generos input:focus-visible + label { outline: 3px solid var(--amarillo); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--amarillo);
  color: var(--verde-noche);
  cursor: pointer;
  box-shadow: 0 5px 0 var(--amarillo-osc);
  transition: transform 0.08s, box-shadow 0.08s, opacity 0.15s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--amarillo-osc); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.verde { background: var(--verde); color: #fff; box-shadow: 0 5px 0 var(--verde-osc); }
.btn.chico {
  width: auto; font-size: 0.95rem; padding: 8px 14px; border-radius: 10px;
  box-shadow: 0 3px 0 var(--amarillo-osc);
}
.btn.chico.verde { box-shadow: 0 3px 0 var(--verde-osc); }
.btn.fantasma { background: transparent; color: var(--verde); box-shadow: none; border: 2px solid var(--verde); }

.error {
  background: #fff7cc; color: #5c4a00; border: 2px solid var(--amarillo-osc);
  padding: 10px 12px; border-radius: 10px; font-weight: 600; margin-bottom: 14px;
}
.oculto { display: none !important; }
.pie { margin-top: 28px; color: rgba(255,255,255,.6); font-size: .8rem; text-align: center; letter-spacing: .05em; }

/* Confirmación */
.ok { text-align: center; }
.ok .check {
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--verde); color: var(--amarillo);
  display: grid; place-items: center; margin: 0 auto 14px;
  font-size: 3.2rem; font-weight: 800;
  animation: pop 0.45s cubic-bezier(.2,1.6,.4,1);
}
.ok h2 {
  font-family: "Barlow Condensed", sans-serif; font-size: 2rem; text-transform: uppercase;
  margin: 0 0 6px; color: var(--verde);
}
.ok .quien { font-size: 1.3rem; margin: 0 0 4px; }
.ok .quien b { color: var(--verde-osc); }
.ok .sub { color: var(--gris); margin: 0 0 22px; }
.barra { height: 12px; background: var(--crema); border-radius: 99px; overflow: hidden; border: 1px solid var(--borde); }
.barra > div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--verde), #5cae4b); transform-origin: left; }
.cuenta { margin: 10px 0 16px; color: var(--gris); font-weight: 600; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Páginas de pantalla completa sin scroll (registro y sorteo) */
html.fija, html.fija body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.fija {
  position: fixed; inset: 0;
  min-height: 0;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom));
}
body.fija .cono { width: clamp(30px, 7dvh, 64px); }
body.fija .titulo { font-size: clamp(1.8rem, min(10vw, 6.5dvh), 3.6rem); margin: 4px 0 0; }
body.fija .card { margin-top: clamp(8px, 2.2dvh, 20px); padding: clamp(14px, 2.8dvh, 24px) 18px; }
body.fija .campo { margin-bottom: clamp(10px, 2.2dvh, 18px); }
body.fija .generos label { padding: clamp(10px, 2.2dvh, 18px) 8px; font-size: 1.15rem; }
body.fija input[type="text"] { padding: clamp(10px, 1.8dvh, 14px) 14px; }
body.fija .btn:not(.chico) { padding: clamp(10px, 2dvh, 16px) 20px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body.fija .ok .check { width: clamp(56px, 11dvh, 92px); height: clamp(56px, 11dvh, 92px); font-size: clamp(2rem, 6dvh, 3.2rem); margin-bottom: clamp(6px, 1.5dvh, 14px); }
body.fija .ok .sub { margin-bottom: clamp(12px, 2.5dvh, 22px); }
