/* ==========================================================================
   MOTOBOX — Sorteo: popup de entrada, inscripción, pago del manual y comprobante
   Lógica en rifa.js · Datos en SORTEO_CONFIG (data.js)
   ========================================================================== */

.rf,
.rf-pill,
.rf-btn {
  --rf-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --rf-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --rf-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --rf-ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --rf-red: #e02e24;
  --rf-red-dark: #c4241b;
  --rf-red-text: #b3241b;
  --rf-ink: #1d1d1f;
  --rf-ink-2: #6e6e73;
  --rf-line: #e8e8ed;
  --rf-soft: #f5f5f7;
  --rf-green: #147a3f;
  --rf-green-dark: #0f5f31;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif);
  color: var(--rf-ink);
  -webkit-font-smoothing: antialiased;
}

.rf[hidden],
.rf [hidden],
.rf-pill[hidden] {
  display: none !important;
}

html.rf-lock,
html.rf-lock body {
  overflow: hidden;
}

/* ── Contenedor y fondo ── */
.rf {
  position: fixed;
  inset: 0;
  z-index: 300;
  --rf-w: 300px;
  --rf-ring: 16px;
  --rf-label-r: 92px;
  --rf-peg-r: 126px;
  --rf-bulb-r: 142px;
  --rf-hub: 68px;
}
@media (max-width: 359px) {
  .rf {
    --rf-w: 260px;
    --rf-ring: 14px;
    --rf-label-r: 79px;
    --rf-peg-r: 109px;
    --rf-bulb-r: 123px;
    --rf-hub: 60px;
  }
}

.rf-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: rf-fade-in 300ms var(--rf-ease-out) backwards;
}
.rf.is-closing .rf-scrim {
  animation: rf-fade-out 220ms var(--rf-ease-out) forwards;
}

/* ── Hoja inferior (mobile) ── */
.rf-dialog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: max(20px, env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  outline: none;
  animation: rf-sheet-in 500ms var(--rf-ease-drawer) backwards;
}
.rf.is-closing .rf-dialog {
  animation: rf-sheet-out 240ms var(--rf-ease-out) forwards;
}

.rf-grabber {
  flex: none;
  width: 40px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: #d2d2d7;
}

.rf-top {
  position: sticky;
  top: 0;
  z-index: 4;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: #ffffff;
}

.rf-icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0f0f2;
  color: var(--rf-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms var(--rf-ease-out), background-color 160ms ease;
}
.rf-icon-btn:active { transform: scale(0.94); }
.rf-icon-btn.is-hidden { visibility: hidden; }
@media (hover: hover) {
  .rf-icon-btn:hover { background: #e8e8ed; }
}

.rf-progress {
  flex: 1;
  display: flex;
  gap: 6px;
}
.rf-progress span {
  flex: 1;
  position: relative;
  height: 4px;
  border-radius: 100px;
  background: var(--rf-line);
  overflow: hidden;
}
.rf-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--rf-red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 500ms var(--rf-ease-in-out);
}
.rf-progress span.is-done::after { transform: scaleX(1); }

/* ── Panel del premio ── */
.rf-prize {
  display: none;
  flex: none;
  flex-direction: column;
  gap: 14px;
  padding: 0 20px;
}
.rf[data-step="intro"] .rf-prize {
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
}
.rf[data-step="intro"] .rf-steps { flex: 0 0 auto; }

.rf-stage {
  position: relative;
  flex: none;
  padding: 8px 0 22px;
}
.rf-stage-shadow {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 70%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  filter: blur(12px);
}
.rf-float {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 330 / 196;
  perspective: 1000px;
  animation: rf-float 6s var(--rf-ease-in-out) infinite;
}
@media (max-width: 899px) and (min-height: 780px) {
  .rf-float { aspect-ratio: 4 / 3; }
}
.rf-card3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.rf-prize-card {
  position: absolute;
  top: 4%;
  width: 60%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #eeeeee;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 18px 30px rgba(0, 0, 0, 0.18);
}
.rf-prize-card--1 {
  left: 2%;
  transform: rotate(-5deg);
}
.rf-prize-card--2 {
  right: 2%;
  top: 16%;
  transform: translateZ(40px) rotate(4deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 22px 40px rgba(0, 0, 0, 0.22), 0 40px 60px rgba(224, 46, 36, 0.14);
}
.rf-prize-card--1 { animation: rf-card-in-1 760ms var(--rf-ease-out) 140ms backwards; }
.rf-prize-card--2 { animation: rf-card-in-2 760ms var(--rf-ease-out) 260ms backwards; }
@keyframes rf-card-in-1 { from { opacity: 0; transform: translateY(70px) rotate(-16deg) scale(0.9); } }
@keyframes rf-card-in-2 { from { opacity: 0; transform: translateZ(0) translateY(80px) rotate(16deg) scale(0.9); } }
.rf-prize-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rf-prize-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2c2c2e;
  color: rgba(255, 255, 255, 0.5);
}
.rf-prize-name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  height: 28px;
  padding: 0 11px;
  border-radius: 100px;
  background: #ffffff;
  color: var(--rf-ink);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}
.rf-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--rf-red-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rf-card3d-img {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #eeeeee;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 18px 30px rgba(0, 0, 0, 0.16), 0 40px 60px rgba(224, 46, 36, 0.14);
}
.rf-card3d-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.rf-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 55%);
  opacity: var(--glare, 0);
  pointer-events: none;
}
.rf-sheen {
  position: absolute;
  top: -10%;
  left: 0;
  width: 36%;
  height: 120%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  transform: translateX(-160%) skewX(-18deg);
  animation: rf-sheen 1400ms var(--rf-ease-out) 700ms backwards;
  pointer-events: none;
}

.rf-prize-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rf-title {
  font-size: 30px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.rf-sub {
  font-size: 15px;
  line-height: 1.45;
  color: var(--rf-ink-2);
}

.rf-stats {
  display: flex;
  gap: 8px;
}
.rf-stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--rf-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rf-stat strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rf-stat span {
  font-size: 12px;
  color: var(--rf-ink-2);
}

.rf-legal {
  font-size: 11px;
  line-height: 1.4;
  color: var(--rf-ink-2);
  text-align: center;
}
.rf-legal strong { font-weight: 700; color: var(--rf-ink); }
.rf-legal a {
  color: inherit;
  text-decoration: underline;
}
.rf-legal--desk { display: none; }

/* Entrada escalonada */
.rf-st { animation: rf-rise 300ms var(--rf-ease-out) backwards; }
.rf-d1 { animation-delay: 120ms; }
.rf-d2 { animation-delay: 170ms; }
.rf-d3 { animation-delay: 220ms; }
.rf-d4 { animation-delay: 270ms; }

/* ── Pasos ── */
.rf-steps {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.rf-step {
  display: none;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 14px;
  padding: 12px 20px 24px;
}
.rf-step.is-active { display: flex; }
.rf-step.is-fwd { animation: rf-in-fwd 300ms var(--rf-ease-out) backwards; }
.rf-step.is-back { animation: rf-in-back 300ms var(--rf-ease-out) backwards; }
.rf-step[data-step="intro"] { padding-top: 4px; }

.rf-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rf-h {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.rf-p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--rf-ink-2);
}

.rf-cta-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.rf-caption {
  font-size: 13px;
  line-height: 1.4;
  color: var(--rf-ink-2);
  text-align: center;
}

/* ── Botones ── */
.rf-btn {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  transition: transform 160ms var(--rf-ease-out), background-color 160ms ease, box-shadow 160ms ease;
}
.rf-btn:active { transform: scale(0.97); }
.rf-btn-red {
  background: var(--rf-red);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(224, 46, 36, 0.32);
}
.rf-btn-red:disabled {
  background: var(--rf-line);
  color: var(--rf-ink-2);
  box-shadow: none;
  cursor: default;
  transform: none;
}
.rf-btn-white {
  height: 52px;
  background: #ffffff;
  color: var(--rf-ink);
  font-size: 16px;
}
.rf-btn-wa {
  background: var(--rf-green);
  color: #ffffff;
}
.rf-btn-outline {
  background: #ffffff;
  color: var(--rf-ink);
  box-shadow: inset 0 0 0 1.5px var(--rf-ink);
}
@media (hover: hover) {
  .rf-btn-outline:hover { background: var(--rf-soft); }
}
.rf-btn-ghost {
  height: 44px;
  background: transparent;
  color: var(--rf-ink);
  font-size: 15px;
  font-weight: 600;
}
@media (hover: hover) {
  .rf-btn-red:not(:disabled):hover { background: var(--rf-red-dark); }
  .rf-btn-wa:hover { background: var(--rf-green-dark); }
}
.rf-btn-shine {
  position: relative;
  overflow: hidden;
}
.rf-btn-shine > span { position: relative; }
.rf-btn-shine::before {
  content: "";
  position: absolute;
  left: 0;
  top: -10px;
  width: 60px;
  height: 76px;
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-120%) skewX(-20deg);
  animation: rf-shine 3.6s var(--rf-ease-in-out) 1.2s infinite;
}
.rf-btn-shine:disabled::before { display: none; }


.rf-note {
  font-size: 12px;
  color: var(--rf-ink-2);
  text-align: center;
}

/* ── Acceso flotante (con el popup cerrado) ── */
.rf-pill {
  position: fixed;
  z-index: 96;
  left: 12px;
  right: 12px;
  bottom: calc(var(--bottom-bar-height, 56px) + env(safe-area-inset-bottom, 0px) + 10px);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: rf-pill-in 400ms var(--rf-ease-out) backwards;
}
.rf-pill-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: transform 160ms var(--rf-ease-out);
}
.rf-pill-main:active { transform: scale(0.98); }
.rf-pill-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--rf-soft);
}
.rf-pill-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rf-pill-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rf-pill-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rf-red-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rf-pill-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--rf-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rf-pill-cta {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 100px;
  background: var(--rf-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.rf-pill-x {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rf-ink-2);
}
.rf-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rf-red);
  position: relative;
}
/* El pulso es un aro aparte (escala y opacidad): no redibuja en cada cuadro. */
.rf-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--rf-red);
  animation: rf-pulse 1.6s ease-out infinite;
}

/* ── Desktop: modal en dos columnas ── */
@media (min-width: 900px) {
  .rf {
    --rf-w: 340px;
    --rf-ring: 17px;
    --rf-label-r: 104px;
    --rf-peg-r: 144px;
    --rf-bulb-r: 161px;
    --rf-hub: 76px;
  }
  .rf-dialog {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: min(1080px, calc(100vw - 48px));
    height: min(760px, calc(100vh - 48px));
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "prize top" "prize steps";
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    animation: rf-modal-in 320ms var(--rf-ease-out) backwards;
  }
  .rf.is-closing .rf-dialog { animation: rf-modal-out 200ms var(--rf-ease-out) forwards; }
  .rf-grabber { display: none; }
  .rf-top {
    grid-area: top;
    position: relative;
    padding: 24px 28px 8px 44px;
  }
  .rf-prize,
  .rf[data-step="intro"] .rf-prize {
    grid-area: prize;
    display: flex;
    gap: 18px;
    padding: 36px 44px 32px;
    background: var(--rf-ink);
    color: #ffffff;
    overflow: hidden;
  }
  .rf-float { max-width: 440px; }
  .rf-stage-shadow { background: rgba(0, 0, 0, 0.55); }
  .rf-title { font-size: 38px; }
  .rf-sub { font-size: 16px; color: rgba(255, 255, 255, 0.7); }
  .rf-stat { background: rgba(255, 255, 255, 0.06); }
  .rf-stat span { color: rgba(255, 255, 255, 0.62); }
  .rf-kicker { color: #ff8a82; }
  .rf-legal--desk strong { color: #ffffff; }
  .rf-legal--desk {
    display: block;
    margin-top: auto;
    text-align: left;
    color: rgba(255, 255, 255, 0.62);
  }
  .rf-steps {
    grid-area: steps;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .rf-step { padding: 8px 44px 32px; }
  .rf-ticket-stage { padding: 0 0 4px; }
  .rf-h { font-size: 32px; }
  .rf-label {
    width: 76px;
    height: 42px;
    margin: -21px 0 0 -38px;
  }
  .rf-label b { font-size: 22px; }
  .rf-label.is-word b { font-size: 14px; }
  .rf-label small { font-size: 9px; }
  .rf-hub { font-size: 18px; }
  .rf-pill {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: 380px;
  }
}
@media (min-width: 900px) and (max-height: 760px) {
  .rf-float { max-width: 340px; }
  .rf-title { font-size: 32px; }
}

/* ── Animaciones ── */
@keyframes rf-fade-in { from { opacity: 0; } }
@keyframes rf-fade-out { to { opacity: 0; } }
@keyframes rf-sheet-in { from { transform: translateY(100%); } }
@keyframes rf-sheet-out { to { transform: translateY(100%); } }
@keyframes rf-modal-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes rf-modal-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes rf-rise { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }
@keyframes rf-in-fwd { from { opacity: 0; transform: translateX(24px); filter: blur(2px); } }
@keyframes rf-in-back { from { opacity: 0; transform: translateX(-24px); filter: blur(2px); } }
@keyframes rf-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes rf-sheen {
  from { transform: translateX(-160%) skewX(-18deg); }
  to { transform: translateX(420%) skewX(-18deg); }
}
@keyframes rf-shine {
  0%, 72% { transform: translateX(-120%) skewX(-20deg); }
  100% { transform: translateX(700%) skewX(-20deg); }
}



@keyframes rf-pill-in { from { opacity: 0; transform: translateY(24px) scale(0.96); } }
@keyframes rf-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rf-float,
  .rf-sheen,
  .rf-live,
  .rf-live::after,
  .rf-btn-shine::before {
    animation: none !important;
  }
  
  .rf-prize-card--1,
  .rf-prize-card--2 { animation: none !important; }
}

/* ==========================================================================
   Inscripción: opciones, formulario, pago y confirmación
   ========================================================================== */
.rf-intro-head { margin-top: 2px; }
.rf-options { display: flex; flex-direction: column; gap: 10px; }
.rf-option {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  text-align: left;
  box-shadow: inset 0 0 0 1.5px var(--rf-line);
  transition: box-shadow 160ms ease, transform 160ms var(--rf-ease-out), background-color 160ms ease;
}
.rf-option:active { transform: scale(0.98); }
.rf-option.is-selected { background: #fff6f5; box-shadow: inset 0 0 0 2px var(--rf-red); }
.rf-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--rf-soft);
  color: var(--rf-ink);
}
.rf-option.is-selected .rf-option-icon { background: var(--rf-red); color: #ffffff; }
.rf-option-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rf-option-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.rf-option-desc { font-size: 13px; line-height: 1.35; color: var(--rf-ink-2); }
.rf-option-price { font-size: 17px; font-weight: 800; white-space: nowrap; }
.rf-option.is-selected .rf-option-price { color: var(--rf-red-text); }

.rf-form { display: flex; flex-direction: column; gap: 12px; }
.rf-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.rf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rf-label-t { font-size: 13px; font-weight: 700; color: var(--rf-ink); }

.rf-field input,
.rf-field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid var(--rf-line);
  background: #ffffff;
  color: var(--rf-ink);
  font: inherit;
  font-size: 16px; /* 16 px evita el zoom automático de iOS */
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.rf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.rf-field input:focus,
.rf-field select:focus { outline: none; border-color: var(--rf-ink); box-shadow: 0 0 0 4px rgba(29, 29, 31, 0.08); }
.rf-field.is-invalid input,
.rf-field.is-invalid select { border-color: var(--rf-red); }
.rf-hint { font-size: 12px; line-height: 1.35; color: var(--rf-ink-2); }
.rf-err { font-size: 12px; font-weight: 600; color: var(--rf-red-text); min-height: 0; }
.rf-err:empty { display: none; }
.rf-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--rf-ink); }
.rf-check input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--rf-red); }
.rf-check a { text-decoration: underline; text-underline-offset: 2px; }
.rf-form-error {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fdecea;
  color: #8f1d16;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.rf-upload-title { font-size: 16px; font-weight: 800; }

.rf-done { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 6px; text-align: center; }
.rf-ticket-lite {
  position: relative;
  width: min(320px, 100%);
  padding: 22px 20px 20px;
  border-radius: 24px;
  background: var(--rf-ink);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.45);
  animation: rf-ticket-in 600ms var(--rf-ease-back) backwards;
}
.rf-ticket-lite::before,
.rf-ticket-lite::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: #ffffff;
}
.rf-ticket-lite::before { left: -11px; }
.rf-ticket-lite::after { right: -11px; }
.rf-tl-kicker { font-size: 12px; font-weight: 700; color: #ff8a82; }
.rf-tl-label { font-size: 13px; color: rgba(255, 255, 255, 0.6); margin-top: 6px; }
.rf-tl-num { font-size: 48px; font-weight: 800; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.rf-tl-name { font-size: 14px; color: rgba(255, 255, 255, 0.75); }
@keyframes rf-ticket-in { from { opacity: 0; transform: translateY(20px) scale(0.92) rotate(-2deg); } }

.rf-done-status { font-size: 15px; line-height: 1.45; color: var(--rf-ink); max-width: 36ch; }
@media (min-width: 900px) {
  .rf[data-step="intro"] .rf-steps { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-ticket-lite { animation: none; }
}
.rf-fallback-wa { margin-top: 10px; height: 48px; font-size: 15px; }

/* ── Atracción: la opción de compra brilla, el acceso flotante llama la atención ── */
.rf-option { position: relative; overflow: hidden; }
.rf-option[data-rf-modo="compra"]::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-120%) skewX(-18deg);
  animation: rf-option-shine 4.5s var(--rf-ease-in-out) 1.4s infinite;
  pointer-events: none;
}
@keyframes rf-option-shine {
  0%, 62% { transform: translateX(-120%) skewX(-18deg); }
  85%, 100% { transform: translateX(320%) skewX(-18deg); }
}
.rf-option-chip {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 100px;
  background: #1d1d1f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}
.rf-option.is-selected .rf-option-icon { animation: rf-pop 420ms var(--rf-ease-back); }
@keyframes rf-pop { 40% { transform: scale(1.18); } }

/* El acceso flotante da un pequeño salto cada tantos segundos */
.rf-pill:not([hidden]) .rf-pill-main { animation: rf-nudge 7s var(--rf-ease-out) 3s infinite; }
@keyframes rf-nudge {
  0%, 88%, 100% { transform: none; }
  91% { transform: translateY(-6px) rotate(-1deg); }
  94% { transform: translateY(0) rotate(0.6deg); }
  97% { transform: translateY(-2px); }
}

/* Número de participación: cada dígito gira como un contador y frena en el suyo */
.rf-tl-num { display: inline-flex; justify-content: center; }
.rf-roll {
  display: inline-block;
  height: 1.05em;
  overflow: hidden;
  line-height: 1.05;
}
.rf-roll-strip {
  display: flex;
  flex-direction: column;
  animation: rf-roll 1.2s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--i) * 90ms + 200ms);
  transform: translateY(calc(-100% + 1.05em));   /* el último dígito de la tira es el número real */
}
.rf-roll-strip b { display: block; height: 1.05em; font-weight: 800; }
@keyframes rf-roll { from { transform: translateY(0); } }

/* Papel picado */
.rf-done { position: relative; }
.rf-confetti-burst {
  position: absolute;
  left: 50%;
  top: 46px;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}
.rf-confetti-burst i {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: rf-confetti 1.3s cubic-bezier(0.16, 1, 0.3, 1) var(--d) forwards;
}
@keyframes rf-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 140px)) rotate(var(--r)) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rf-option[data-rf-modo="compra"]::after,
  .rf-pill:not([hidden]) .rf-pill-main,
  .rf-option.is-selected .rf-option-icon,
  .rf-roll-strip { animation: none !important; }
  .rf-confetti-burst { display: none; }
}

/* ── Paso final: seguir en WhatsApp ── */
.rf-wa-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 20px; background: #effaf2; }
.rf-btn-wa { gap: 10px; }
.rf-btn-pulse { position: relative; isolation: isolate; }
.rf-btn-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rf-green);
  animation: rf-wa-pulse 2.2s ease-out infinite;
}
@keyframes rf-wa-pulse {
  0% { transform: scale(1); opacity: 0.45; }
  70%, 100% { transform: scale(1.08, 1.35); opacity: 0; }
}
.rf-check-sm { font-size: 13px; color: var(--rf-ink-2); margin-top: -4px; }
.rf-check-sm input { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .rf-btn-pulse::before { animation: none; } }

/* Campo trampa para bots: fuera de la vista y de la navegación con teclado */
.rf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   CHANCES EXTRAS — Paquetes de chances para el sorteo
   ========================================================================== */
.chances-section {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--rf-line, #e8e8ed);
  border-bottom: 1px solid var(--rf-line, #e8e8ed);
}

.chances-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .chances-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .chances-grid { grid-template-columns: repeat(3, 1fr); }
}

.chance-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid var(--rf-line, #e8e8ed);
  border-radius: 20px;
  padding: 1.35rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), border-color 200ms, box-shadow 200ms;
}
.chance-card:hover {
  border-color: #c8c8cc;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Badge */
.chance-card-badge {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.chance-badge-pop {
  background: var(--rf-red, #e02e24);
  color: #ffffff;
}
.chance-badge-best {
  background: var(--rf-green, #147a3f);
  color: #ffffff;
}
.chance-badge-max {
  background: linear-gradient(135deg, #ff6b4a, #e02e24);
  color: #ffffff;
}

/* Popular variant */
.chance-card--popular {
  border-color: var(--rf-red, #e02e24);
  box-shadow: 0 0 0 1px var(--rf-red, #e02e24);
}
.chance-card--popular:hover {
  box-shadow: 0 0 0 1px var(--rf-red, #e02e24), 0 8px 24px rgba(224, 46, 36, 0.15);
}

/* Best value */
.chance-card--best {
  border-color: var(--rf-green, #147a3f);
  box-shadow: 0 0 0 1px var(--rf-green, #147a3f);
}
.chance-card--best:hover {
  box-shadow: 0 0 0 1px var(--rf-green, #147a3f), 0 8px 24px rgba(20, 122, 63, 0.15);
}

/* Premium variant */
.chance-card--premium {
  background: var(--rf-ink, #1d1d1f);
  border-color: rgba(255, 255, 255, 0.12);
}
.chance-card--premium .chance-card-qty,
.chance-card--premium .chance-card-price { color: #ffffff; }
.chance-card-old {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #8e8e93);
  text-decoration: line-through;
}
.chance-card--premium .chance-card-old { color: rgba(255, 255, 255, 0.55); }
.chances-promo {
  margin: -0.5rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff4e0;
  color: #8a4b00;
  font-weight: 600;
}
.chance-card--premium .chance-card-label,
.chance-card--premium .chance-card-unit { color: rgba(255, 255, 255, 0.5); }
.chance-card--premium .chance-card-btn {
  background: var(--rf-red, #e02e24);
  color: #ffffff;
  border-color: var(--rf-red, #e02e24);
}
.chance-card--premium .chance-card-btn:hover {
  background: var(--rf-red-dark, #c4241b);
  border-color: var(--rf-red-dark, #c4241b);
}
.chance-card--premium:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Card inner */
.chance-card-qty {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--rf-ink, #1d1d1f);
  letter-spacing: -0.04em;
  line-height: 1;
}
.chance-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rf-ink-2, #6e6e73);
  margin-bottom: 0.4rem;
}
.chance-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rf-ink, #1d1d1f);
  letter-spacing: -0.02em;
  margin-bottom: 0.1rem;
}
.chance-card-unit {
  font-size: 0.7rem;
  color: var(--rf-ink-2, #6e6e73);
  font-weight: 500;
  margin-bottom: 0.85rem;
}
.chance-card-btn {
  display: inline-block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 100px;
  border: 1.5px solid var(--rf-line, #e8e8ed);
  background: var(--rf-soft, #f5f5f7);
  color: var(--rf-ink, #1d1d1f);
  transition: all 200ms cubic-bezier(0.23, 1, 0.32, 1);
  margin-top: auto;
}
.chance-card-btn:hover {
  background: var(--rf-red, #e02e24);
  color: #ffffff;
  border-color: var(--rf-red, #e02e24);
  transform: translateY(-1px);
}



/* ==========================================================================
   PACK LIST — Vertical radio-style list for selecting chances
   ========================================================================== */
.rf-pack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(380px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -20px;
  padding: 4px 20px;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) {
  .rf-pack-list { max-height: none; margin: 0 -44px; padding: 4px 44px; }
}

.rf-pack-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--rf-line);
  background: #ffffff;
  cursor: pointer;
  transition: transform 140ms var(--rf-ease-out), border-color 140ms, box-shadow 140ms, background 140ms;
  text-align: left;
}
.rf-pack-row:active { transform: scale(0.98); }

/* Radio circle */
.rf-pack-radio {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #c8c8cc;
  background: #fff;
  position: relative;
  transition: border-color 160ms, background 160ms;
}
.rf-pack-row.is-selected .rf-pack-radio {
  border-color: var(--rf-red);
  background: var(--rf-red);
}
.rf-pack-row.is-selected .rf-pack-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

/* Info block */
.rf-pack-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rf-pack-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--rf-ink);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rf-pack-desc {
  font-size: 12px;
  color: var(--rf-ink-2);
  font-weight: 500;
  line-height: 1.35;
}

/* Price */
.rf-pack-price {
  flex: none;
  font-size: 16px;
  font-weight: 900;
  color: var(--rf-ink);
  white-space: nowrap;
}

/* Selected state */
.rf-pack-row.is-selected {
  border-color: var(--rf-red);
  background: #fff6f5;
  box-shadow: 0 0 0 1px var(--rf-red);
}
.rf-pack-row.is-selected .rf-pack-title { color: var(--rf-red-text); }
.rf-pack-row.is-selected .rf-pack-price { color: var(--rf-red-text); }

/* Badge inline */
.rf-pack-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--rf-red);
  color: #ffffff;
  font-style: normal;
  line-height: 1.4;
  vertical-align: middle;
}
.rf-pack-badge--green { background: var(--rf-green); }
.rf-pack-badge--gold { background: linear-gradient(135deg, #ff9f43, #e02e24); }
.rf-pack-badge--promo { background: #ff9f0a; color: #1c1c1e; }

/* Promo: precio original tachado + cartel */
.rf-pack-old {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--rf-ink-2);
  text-align: right;
}
.rf-pack-row--premium .rf-pack-old { color: rgba(255, 255, 255, 0.55); }
.rf-promo {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4e0;
  color: #8a4b00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

/* Premium row */
.rf-pack-row--premium {
  background: var(--rf-ink);
  border-color: rgba(255, 255, 255, 0.15);
}
.rf-pack-row--premium .rf-pack-title,
.rf-pack-row--premium .rf-pack-price { color: #ffffff; }
.rf-pack-row--premium .rf-pack-desc { color: rgba(255, 255, 255, 0.55); }
.rf-pack-row--premium .rf-pack-radio { border-color: rgba(255, 255, 255, 0.4); background: transparent; }
.rf-pack-row--premium.is-selected {
  background: #2a1210;
  border-color: var(--rf-red);
  box-shadow: 0 0 0 1px var(--rf-red);
}
.rf-pack-row--premium.is-selected .rf-pack-title,
.rf-pack-row--premium.is-selected .rf-pack-price { color: #ff8a82; }
.rf-pack-row--premium.is-selected .rf-pack-radio {
  border-color: var(--rf-red);
  background: var(--rf-red);
}

/* Hover */
@media (hover: hover) {
  .rf-pack-row:hover:not(.is-selected) { border-color: #c8c8cc; background: var(--rf-soft); }
  .rf-pack-row--premium:hover:not(.is-selected) { background: #2c2c2e; border-color: rgba(255, 255, 255, 0.3); }
}

/* Pack divider between 1 chance and extra packs */
.rf-pack-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rf-ink-2);
}
.rf-pack-divider::before,
.rf-pack-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rf-line);
}

/* Plan summary box in form step */
.rf-plan-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #fff6f5;
  border: 1.5px solid rgba(224, 46, 36, 0.25);
}
.rf-ps-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--rf-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rf-ps-icon svg { width: 18px; height: 18px; }
.rf-ps-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rf-ps-body strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--rf-red-text);
  line-height: 1.2;
}
.rf-ps-body span {
  font-size: 12px;
  color: var(--rf-ink-2);
}
.rf-ps-btn {
  flex: none;
  border: none;
  background: transparent;
  color: var(--rf-red-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 6px;
}

/* Number chips for multiple chances in confirmation step */
.rf-tl-num--range {
  font-size: clamp(20px, 4.5vw, 28px) !important;
  letter-spacing: -0.02em !important;
}
.rf-tl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-height: 130px;
  overflow-y: auto;
  padding: 8px 4px;
  margin: 6px 0 10px;
}
.rf-num-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(224, 46, 36, 0.08);
  border: 1px solid rgba(224, 46, 36, 0.2);
  color: var(--rf-red-text);
  font-family: monospace, ui-monospace;
  font-size: 12px;
  font-weight: 800;
}
.rf-num-chip--more {
  background: var(--rf-soft);
  border-color: var(--rf-line);
  color: var(--rf-ink-2);
  font-family: inherit;
}

