/* nuevarifa.com — página pública de una rifa (publico.html, RF-043). Se carga tras home.css y paginas.css.
   Estilo «Papel», como los carteles, el panel y la pantalla del local: neutros cálidos, un acento y los números en
   Kumbh Sans. El organizador elige un color al crear la rifa: solo cambia el acento. */

body.theme-fatima  { --accent: #1d4ed8; --accent-hover: #1e40af; --accent-soft: #e0e7ff; --accent-ink: #1d4ed8; --ring: #1d4ed8; }
body.theme-gold    { --accent: #a16207; --accent-hover: #854d0e; --accent-soft: #fef3c7; --accent-ink: #854d0e; --ring: #a16207; }
body.theme-emerald { --accent: #0b6e4f; --accent-hover: #08583e; --accent-soft: #ecfdf5; --accent-ink: #065f46; --ring: #0b6e4f; }
body.theme-neon    { --accent: #6d28d9; --accent-hover: #5b21b6; --accent-soft: #ede9fe; --accent-ink: #6d28d9; --ring: #6d28d9; }

:root {
  --display: 'Kumbh Sans', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --ok: #0b6e4f;
  --ok-hover: #08583e;
  --warn-bg: #fdf3dc;
  --warn-ink: #5c4307;
  --error-ink: #b42318;
  --header-h: 64px;
}

/* ---------- Base móvil: sin destello al tocar, sin retardo y sin seleccionar el texto de los controles ---------- */
html { -webkit-tap-highlight-color: transparent; color-scheme: light; }
body { accent-color: var(--accent, #0b6e4f); }
button, a, summary, [role="button"], .pay-method { touch-action: manipulation; }
button, .btn, .chip, .hundreds-tab, summary { -webkit-user-select: none; user-select: none; }

/* Modern Web Guidance (`defer-rendering-heavy-content`): pospone el cálculo de secciones bajo el pliegue inicial */
.raffle-about, .other-raffles, .site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

/* La marca de la web se mantiene con el color institucional */
.brand-dot { color: #0b6e4f; }
/* El logo no cambia con el tema de la rifa */
.brand-logo { filter: none; }

.raffle-wrap { max-width: 760px; }

/* ---------- Primera pantalla: el premio ---------- */
.raffle-hero { padding: 12px 0 24px; }
.hero-grid { display: grid; gap: 16px; }
.hero-media:empty { display: none; }

.media-container {
  position: relative; overflow: hidden; border-radius: 16px;
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0; background: #f8fafc;
}
.raffle-banner {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 16px; border: 0; background: var(--n-100);
}
.raffle-video {
  display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain;
  border-radius: 16px; border: 0; background: #0f172a;
}

.organizer-badge-wrap { margin-bottom: 4px; }
.organizer-line {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 0; background: transparent; border: 0;
  font-size: 0.88rem; font-weight: 600; color: #475569; overflow-wrap: anywhere;
}
.organizer-line a {
  color: #0f172a; font-weight: 800; text-decoration: none; border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
}
.organizer-line a:not([href]) { border-bottom: 0; }
/* RF-047 F3: logo del organizador junto a su nombre. */
.organizer-logo { flex: none; max-width: 28px; max-height: 28px; width: auto; height: auto; object-fit: contain; border-radius: 6px; background: #fff; }
.organizer-place { color: #475569; font-weight: 600; }

.raffle-title {
  margin-top: 2px; font-family: var(--display); font-weight: 900;
  font-size: clamp(1.65rem, 5.5vw, 2.25rem); line-height: 1.08; letter-spacing: -0.03em;
  color: #0f172a; overflow-wrap: anywhere;
}

.prize-highlight-card {
  margin-top: 8px; display: grid; gap: 2px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--accent);
  background: transparent;
}
.prize-kicker {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-ink);
}
.raffle-prize {
  margin: 0; font-family: var(--display); font-size: 1.05rem; font-weight: 800;
  color: #0f172a; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere;
}

/* Ficha de datos limpia y compacta */
.raffle-facts-card {
  margin-top: 12px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 2px 10px -4px rgba(15, 23, 42, 0.06);
}
.raffle-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.fact {
  position: relative; min-width: 0; padding: 0; background: transparent; border: 0; border-radius: 0;
  display: grid; align-content: start; gap: 2px;
}
.fact-wide { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.fact-place, .fact-delivery-fact { grid-column: auto; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.fact-place.hidden + .fact-delivery-fact { grid-column: 1 / -1; }
@media (max-width: 380px) {
  .fact-place, .fact-delivery-fact { grid-column: 1 / -1; }
}
.fact dt { font-size: 0.72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.fact dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.fact-price .fact-big {
  font-family: var(--display); font-weight: 900; font-size: clamp(1.5rem, 5vw, 1.9rem);
  line-height: 1.05; color: var(--accent-ink); font-variant-numeric: tabular-nums;
}
.fact-mid, .fact-draw .fact-mid {
  font-family: var(--display); font-weight: 800; font-size: 0.94rem; line-height: 1.3; color: #0f172a;
}
.organizer-place { display: none; }
.fact-delivery { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.delivery-nearby-link { font-size: 0.84rem; font-weight: 700; color: var(--accent-ink, var(--accent)); text-decoration: none; }
.rcard-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; line-height: 1.3; }
.rcard-tag.is-pickup { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.rcard-tag.is-shipping { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.rcard-tag.is-both { background: #fefce8; color: #854d0e; border: 1px solid #fef08a; }

.fact-progress { background: transparent; }
.fact-left { display: block; font-family: var(--display); font-weight: 800; font-size: 0.96rem; line-height: 1.2; font-variant-numeric: tabular-nums; color: #0f172a; }
.left-bar { display: block; height: 8px; margin-top: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.left-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transform: scaleX(0); transform-origin: left; transition: transform 400ms var(--ease-out); }

.facts-trust-row {
  margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid #f1f5f9;
  font-size: 0.76rem; font-weight: 600; color: #475569;
}

.start { margin-top: 16px; }
.start-btn {
  width: 100%; min-height: 52px; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; border-radius: 12px;
  background: var(--accent); color: #ffffff; border: 0;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.22); display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; cursor: pointer; transition: transform 120ms ease, background-color 120ms ease;
}
.start-btn::after {
  content: '↓'; font-size: 1.25rem; font-weight: 900; line-height: 1;
}
.start-btn:active { transform: scale(0.98); }
.btn-xl { width: 100%; min-height: 58px; padding: 0 22px; font-size: 1.15rem; font-weight: 800; border-radius: 14px; }
.start-how { margin-top: 12px; color: #475569; font-size: 0.9rem; line-height: 1.5; text-align: center; }

.small-links { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.small-links a, .small-links button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.85rem; font-weight: 600; color: #475569; text-decoration: underline; text-underline-offset: 3px;
}

/* Cierre de la rifa (RF-027): el ganador o el sorteo oficial programado */
.end-banner {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--accent-soft); border: 1px solid var(--accent); display: grid; gap: 4px; justify-items: start;
}
.end-eyebrow { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.end-text { font-weight: 700; }
.end-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.review-alert {
  margin: 0 0 16px; padding: 16px 18px; border-radius: var(--radius-md);
  background: #fef3f2; border: 1px solid #f5c2bd; color: #7a271a; font-size: 0.95rem;
}
.review-alert-title { font-weight: 800; color: #912018; }
.review-alert p + p { margin-top: 4px; }

/* ---------- Próximamente y rifa retirada (RF-028): tarjeta destacada de lanzamiento ---------- */
.launch { margin-top: 18px; }
.gone { margin-top: 0; padding: 24px 0; }
.launch-card {
  position: relative; overflow: hidden;
  padding: clamp(22px, 4.5vw, 30px); border-radius: 22px;
  border: 1.5px solid #e2e8f0; border-top: 4px solid var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 20px 44px -16px rgba(15, 23, 42, 0.14), 0 4px 12px -4px rgba(15, 23, 42, 0.06);
}
.launch-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
}
.launch-eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}
.launch-title {
  margin-top: 12px; font-family: var(--display);
  font-size: clamp(1.38rem, 3.8vw, 1.78rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 900; color: #0f172a;
}
.launch-when { margin-top: 8px; color: #475569; font-size: 0.96rem; font-weight: 600; line-height: 1.45; }
.launch-countdown {
  margin-top: 16px; padding: 14px 16px; border-radius: 16px;
  background: var(--accent-soft); border: 1.5px solid color-mix(in srgb, var(--accent) 26%, transparent);
  text-align: center; font-family: var(--display);
  font-size: clamp(1.55rem, 5.2vw, 2.15rem); font-weight: 900; letter-spacing: -0.01em; line-height: 1.15;
  font-variant-numeric: tabular-nums; color: var(--accent-ink);
}
.launch-countdown::before {
  content: 'Apertura en'; display: block; margin-bottom: 4px;
  font-family: var(--font); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  opacity: 0.78;
}
.launch-form { margin-top: 18px; display: grid; gap: 14px; }
.launch-form .field label { font-weight: 800; font-size: 0.9rem; color: #0f172a; margin-bottom: 6px; display: block; }
.launch-form .input { min-height: 48px; border-radius: 12px; border: 1.5px solid #cbd5e1; background: #ffffff; }
.launch-form .check { align-items: flex-start; gap: 10px; font-size: 0.9rem; line-height: 1.42; color: #334155; }
.launch-form .btn-primary { width: 100%; min-height: 52px; border-radius: 14px; font-weight: 800; font-size: 1rem; }
.launch-form .field-help {
  margin-top: 2px; padding-top: 12px; border-top: 1px solid #e2e8f0;
  font-size: 0.8rem; line-height: 1.45; color: #64748b;
}
/* Campo trampa (RF-036 adenda A): fuera de la vista y del teclado, sin display:none para que los bots lo rellenen. */
.launch-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.launch-msg { padding: 12px 14px; border-radius: var(--radius-md); background: var(--accent-soft); font-weight: 700; color: var(--accent-ink); }
.launch-msg.is-error { background: #fdecea; color: #912018; }
.nearby { padding: 0 0 calc(var(--section) * 0.6); }
.nearby-title { font-weight: 800; }
.nearby-text { margin-top: 4px; color: var(--text-muted); }
.nearby-text a { color: var(--accent-ink); font-weight: 700; }
body.is-upcoming #numeros, body.is-upcoming #publicDrawer, body.is-upcoming .skip-link, body.is-upcoming .start,
body.is-upcoming #publicLeftFact, body.is-upcoming #como-se-sortea, body.is-upcoming .facts-trust-row,
body.is-gone .raffle-hero, body.is-gone #numeros, body.is-gone #publicDrawer, body.is-gone .skip-link, body.is-gone #como-se-sortea, body.is-gone .raffle-disclaimer { display: none; }
body.is-upcoming .hero-body { display: flex; flex-direction: column; }
body.is-upcoming .organizer-badge-wrap { order: 1; }
body.is-upcoming .raffle-title { order: 2; }
body.is-upcoming .load-error { order: 3; }
body.is-upcoming .prize-highlight-card { order: 4; }
body.is-upcoming #launchLanding { order: 5; margin-top: 2px; }
body.is-upcoming .raffle-facts-card { order: 6; margin-top: 4px; }
/* Rifa sorteada (RF-043 adenda E): solo el resultado; lo de comprar no se pinta. */
body.is-drawn #numeros, body.is-drawn #como-se-sortea, body.is-drawn #publicDrawer, body.is-drawn .raffle-facts-card, body.is-drawn .raffle-facts, body.is-drawn .start,
body.is-drawn .prize-highlight-card, body.is-drawn .raffle-prize, body.is-drawn .skip-link, body.is-drawn .nearby-form, body.is-drawn .small-links [data-action="openHowDraw"] { display: none; }
.drawn { margin-top: 16px; display: grid; gap: 16px; }
.drawn-card { padding: clamp(20px, 5vw, 28px); border-radius: var(--radius-lg); background: var(--accent); color: var(--n-0); text-align: center; overflow-wrap: anywhere; }
.drawn-eyebrow { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.drawn-number { margin-top: 4px; font-family: var(--display); font-size: clamp(4rem, 19vw, 6.5rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
/* RF-050: premio desierto, texto en lugar del número. */
.drawn-number.is-deserted { font-size: clamp(2.2rem, 10vw, 3.5rem); letter-spacing: -0.01em; }
.drawn-prize { margin-top: 10px; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.drawn-proof { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 0.35); font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.drawn-count { margin-top: 2px; font-size: 0.9rem; }
.drawn-check-label { display: block; font-weight: 800; }
.drawn-check-row { margin-top: 8px; display: flex; gap: 8px; }
.drawn-check-row .input { flex: 1; min-width: 0; font-size: 1rem; }
.drawn-check-row .btn { flex: none; }
.drawn-answer { min-height: 1.5em; margin-top: 8px; font-weight: 700; line-height: 1.5; color: var(--text-muted); overflow-wrap: anywhere; }
.drawn-answer[data-kind="winner"] { color: var(--accent-ink); font-weight: 800; }
.drawn-answer[data-kind="lost"] { color: var(--text); }
.drawn-acta { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.drawn-acta-title { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-weight: 800; cursor: pointer; }
body.is-drawn .rcards {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; margin-top: 16px;
}
body.is-drawn .rcard { flex: 0 0 min(78vw, 280px); scroll-snap-align: start; }
body.is-drawn .nearby { padding-top: 24px; }

/* ---------- Tablero ---------- */
.numbers { padding: 24px 0 36px; border-top: 1px solid #e2e8f0; scroll-margin-top: var(--header-h); }
.numbers:focus { outline: none; }
.numbers-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.numbers-title { font-family: var(--display); font-size: clamp(1.3rem, 4.5vw, 1.65rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 900; color: #0f172a; }
.numbers-range { font-size: 0.82rem; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.numbers-hint { margin-top: 4px; color: #475569; font-size: 0.88rem; }

.board-bar {
  margin-top: 12px; padding: 10px 0 12px;
  background: rgba(250, 248, 245, 0.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0; z-index: 5;
}
@media (min-height: 700px) { .board-bar { position: sticky; top: var(--header-h); } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 0.84rem; font-weight: 700; color: #334155; }
.legend li { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: transparent; border: 0; }
/* .legend .sw y no .sw: home.css ya pinta .legend i (la leyenda de la portada). */
.legend .sw { width: 13px; height: 13px; border-radius: 4px; display: inline-block; flex: none; }
.legend .sw-free { background: #ffffff; border: 1.5px solid #94a3b8; }
.legend .sw-taken { background: repeating-linear-gradient(135deg, #cbd5e1 0 3px, #e2e8f0 3px 6px); border: 1px solid #cbd5e1; }
.legend .sw-mine { background: var(--accent); border-color: var(--accent); }
.board-bar .legend { margin-top: 0; font-size: 0.84rem; color: #334155; }

.board-tools { margin-top: 10px; display: flex; gap: 8px; }
.btn-outline { background: #ffffff; color: #0f172a; border: 1.5px solid #7c8798; border-radius: 10px; font-weight: 700; }
.board-tools .btn { flex: none; min-height: 46px; padding: 0 14px; font-size: 0.9rem; }
.search { flex: 1; min-width: 0; }
.search .input { height: 46px; border-radius: 10px; border: 1.5px solid #7c8798; background: #ffffff; font-size: 0.94rem; font-weight: 600; padding: 0 12px; }
.search-msg { min-height: 1.4em; margin-top: 6px; font-size: 0.88rem; font-weight: 700; color: var(--n-800); }
.search-msg:empty { min-height: 0; margin-top: 0; }

.hundreds { margin-top: 8px; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.hundreds-tab {
  flex: none; scroll-snap-align: start; min-height: 48px; padding: 4px 14px; border-radius: 12px;
  border: 1.5px solid #cbd5e1; background: #ffffff; cursor: pointer; color: #1e293b;
  display: grid; justify-items: center; line-height: 1.15; font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.hundreds-tab span { font-size: 0.92rem; font-weight: 800; }
.hundreds-tab small { font-size: 0.75rem; font-weight: 600; color: #475569; }
.hundreds-tab[aria-pressed="true"] { background: var(--n-950); border-color: var(--n-950); color: var(--n-0); }
.hundreds-tab[aria-pressed="true"] small { color: #cbd5e1; }
.page-select-box { margin-top: 8px; }
.page-select { height: 48px; border-radius: 12px; border: 1.5px solid #7c8798; font-weight: 700; }

.board-notice {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; line-height: 1.5;
}
/* UX-02: la rifa o sus números no cargaron. Mismo tono de aviso que el 409, con su botón para reintentar. */
.load-error {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; line-height: 1.5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.load-error.hidden { display: none; }
/* UX-01: números apartados en este navegador y sin pagar, con «Ver cómo pagar». */
.pending-reservation {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; line-height: 1.5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.pending-reservation.hidden { display: none; }
.pending-reservation .btn { min-height: 44px; }
.load-error .btn { min-height: 44px; }

.public-ticket-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 420px) and (max-width: 559px) {
  .public-ticket-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.public-ticket-grid:focus { outline: none; }
.public-ticket-grid:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }
.public-num-cell {
  position: relative; min-height: 44px; padding: 7px 2px; display: grid; place-items: center;
  border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 10px; background: #ffffff; color: #0f172a;
  font-family: var(--display); font-size: clamp(0.98rem, 4.2vw, 1.18rem); font-weight: 800; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background-color 110ms var(--ease-out), color 110ms var(--ease-out), transform 110ms var(--ease-out), border-color 110ms var(--ease-out);
}
.public-ticket-grid.is-long .public-num-cell { font-size: clamp(0.86rem, 3.4vw, 1rem); letter-spacing: -0.02em; }
.public-num-cell:active:not(:disabled) { transform: scale(0.94); }
.public-num-cell.is-mine {
  background: var(--accent); border-color: var(--accent-hover); color: var(--n-0); font-weight: 900;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16); z-index: 2;
}
.public-num-cell.is-mine::after {
  content: ''; position: absolute; top: 5px; right: 6px; width: 6px; height: 11px;
  border: solid var(--n-0); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
/* Casillas pequeñas o números de 3 y 4 cifras: el ✓ en la esquina, sin pisar el número. */
.public-ticket-grid.is-long .public-num-cell.is-mine::after { top: 3px; right: 4px; width: 4px; height: 8px; border-width: 0 2px 2px 0; }
@media (min-width: 1024px) {
  .public-num-cell.is-mine::after { top: 3px; right: 4px; width: 4px; height: 8px; border-width: 0 2px 2px 0; }
}
.public-num-cell.is-taken {
  background: repeating-linear-gradient(135deg, #e9e4dc 0 5px, #f2efe9 5px 10px);
  border: 1px dashed #cbd5e1; color: #6b655c; font-weight: 700; cursor: not-allowed; opacity: 0.65;
}
.public-num-cell.is-found { outline: 3px solid var(--n-950); outline-offset: 3px; z-index: 1; }
.public-num-cell.is-flash { animation: cell-flash 1.1s var(--ease-out); z-index: 3; }
@keyframes cell-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 7px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Cómo se sortea (plegado) ---------- */
.how-draw { padding: 0 0 36px; }
.how-draw-box {
  border: 1.5px solid #e2e8f0; border-radius: 16px; background: #ffffff;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04); overflow: hidden;
}
.how-draw-box summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  padding: 0 18px; cursor: pointer; list-style: none;
}
.how-draw-box summary::-webkit-details-marker { display: none; }
.how-draw-box summary::after { content: '+'; font-size: 1.4rem; font-weight: 700; color: #475569; }
.how-draw-box[open] summary::after { content: '−'; }
.how-draw-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.draw-box { padding: 0 18px 18px; font-size: 0.95rem; line-height: 1.55; display: grid; gap: 8px; overflow-wrap: anywhere; }
.draw-strong { font-weight: 700; color: var(--text); }
.draw-win { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--accent-ink); }
.draw-muted { color: var(--n-800); }
.draw-code { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; color: var(--n-800); word-break: break-all; }
.draw-small { font-size: 0.85rem; color: var(--text-muted); word-break: break-all; }
.draw-warn { font-size: 0.88rem; font-weight: 600; color: #8a5a00; }
.draw-how { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Barra fija con la elección ---------- */
.public-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -10px 32px -4px rgba(0, 0, 0, 0.12);
  transform: translateY(110%); visibility: hidden; pointer-events: none;
  transition: transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
.public-drawer.open { transform: none; visibility: visible; pointer-events: auto; transition: transform 220ms var(--ease-out); }
body.has-dialog .public-drawer { display: none; }
.drawer-inner { display: flex; align-items: center; gap: 14px; }
.drawer-sum { flex: 1; min-width: 0; }
.drawer-total { font-family: var(--display); font-size: 1.3rem; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.drawer-hint { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.chips { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 4px 0 10px; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink); font-family: var(--display); font-size: 0.94rem; font-weight: 800;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.chip-x { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; font-size: 1.1rem; }
.chip-x::after { content: ''; position: absolute; inset: -9px; }
.chip.is-more { padding: 0 10px; cursor: default; }
.drawer-inner > .btn {
  flex: none; min-width: 9rem; min-height: 50px; font-size: 1.04rem; font-weight: 800; border-radius: 12px;
  background: var(--accent); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}
body.has-drawer .site-footer { padding-bottom: 170px; }

/* ---------- Diálogos ---------- */
body.has-dialog { overflow: hidden; }
.dialog-panel:focus { outline: none; }
.dialog-head h2 { font-family: var(--display); font-weight: 900; font-size: 1.5rem; }

/* Tus datos: hoja que sube desde abajo en el móvil, ventana centrada en pantallas grandes. */
.dialog.is-sheet { padding: 0; align-items: flex-end; }
.dialog.is-sheet .dialog-panel {
  max-width: 560px; margin: auto auto 0; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0;
  animation: sheet-in 260ms var(--ease-out); box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.16);
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: #cbd5e1; }
@media (min-width: 640px) {
  .dialog.is-sheet { padding: 16px; align-items: center; }
  .dialog.is-sheet .dialog-panel { margin: auto; border-radius: var(--radius-lg); padding: 24px 28px 28px; }
  .sheet-grab { display: none; }
}

.recap {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -4px 0 18px;
  padding: 14px 16px; border-radius: 14px; background: #f1f5f9; border: 1px solid #e2e8f0; font-weight: 700;
}
.recap-numbers, .recap-total { font-family: var(--display); font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.recap-total { flex: none; color: #0b6e4f; }

.form .field label, .pay-methods legend { font-size: 1rem; font-weight: 800; color: #0f172a; }
.form .input { min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
.phone-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px; }
.field-help { margin-top: 6px; font-size: 0.88rem; line-height: 1.5; color: var(--text-muted); }
.field-help a, .dialog-foot a, .fine a { color: var(--accent-ink); font-weight: 700; }
.field-error { margin-top: 6px; font-size: 0.92rem; font-weight: 700; color: var(--error-ink); }
.input[aria-invalid="true"] { border-color: var(--error-ink); }
.form-error { padding: 12px 14px; border-radius: var(--radius-md); background: #fef3f2; color: #7a271a; font-weight: 700; }
.form-error.is-ok { background: #ecfdf5; color: #065f46; }

.pay-methods { border: 0; padding: 0; margin: 0; }
.pay-methods legend { margin-bottom: 8px; }
.pay-method-options { display: grid; gap: 8px; }
.pay-method {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; cursor: pointer;
  border: 2px solid var(--n-300); border-radius: 14px; background: var(--surface); font-size: 1.05rem; font-weight: 700;
}
/* .form .field label (home.css) pone display: block; aquí cada método es una fila con su radio. */
.form .pay-methods .pay-method { display: flex; margin: 0; font-size: 1.05rem; }
body.is-upcoming .small-links [data-action="openHowDraw"] { display: none; }
.pay-method input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.pay-method:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pay-method:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }

.opt-email { border: 2px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; padding: 0 14px; }
.opt-email summary { display: flex; align-items: center; gap: 10px; min-height: 52px; font-weight: 700; cursor: pointer; list-style: none; }
.opt-email summary::-webkit-details-marker { display: none; }
.opt-email summary::before {
  content: '+'; display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 99px;
  background: var(--n-100); font-weight: 800;
}
.opt-email[open] summary::before { content: '−'; }
.opt-email .field { padding-bottom: 14px; }

.fine { font-size: 0.85rem; line-height: 1.5; color: var(--text-muted); }

/* Pagar: pantalla completa en el móvil, ventana ancha en pantallas grandes. */
.dialog.is-screen { padding: 0; background: var(--bg); }
.dialog.is-screen .dialog-panel {
  max-width: 620px; min-height: 100dvh; margin: 0 auto; border-radius: 0; box-shadow: none; background: var(--bg);
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 720px) {
  .dialog.is-screen { padding: 24px; background: rgb(22 19 15 / 0.55); }
  .dialog.is-screen .dialog-panel { min-height: 0; margin: auto; border-radius: 24px; background: var(--bg); padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.18); }
}

/* Cabecera de éxito */
.pay-celebration-hero { padding: 8px 0 14px; }
.pay-intro { margin: 14px 0 0; font-size: 1rem; line-height: 1.5; color: #334155; font-weight: 600; }
.pay-done { display: flex; align-items: center; gap: 14px; }
.pay-title-group { display: flex; flex-direction: column; gap: 2px; }
.pay-eyebrow-pill { font-size: 0.8rem; font-weight: 800; color: #047857; letter-spacing: 0.04em; text-transform: uppercase; }
.pay-done h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.5rem, 6vw, 1.95rem); line-height: 1.15; letter-spacing: -0.025em; color: #0f172a; margin: 0; }
.ok-mark {
  flex: none; width: 48px; height: 48px; border-radius: 99px; background: var(--ok);
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(11, 110, 79, 0.35);
}
.ok-mark::after { content: ''; width: 11px; height: 20px; border: solid #ffffff; border-width: 0 3.5px 3.5px 0; transform: translate(0, -2px) rotate(45deg); }

/* Tarjeta visual del resguardo / ticket digital */
.pay-reserved-card {
  margin-top: 10px; background: #ffffff; border: 1.5px solid #e2e8f0; border-radius: 18px;
  padding: 16px; box-shadow: 0 6px 18px -2px rgba(22, 19, 15, 0.06);
}
.res-pass-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed #cbd5e1;
}
.res-pass-media {
  flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
  border: 1px solid #e2e8f0; background: #faf8f5;
}
.res-pass-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-pass-info { flex: 1; min-width: 0; }
.res-pass-kicker {
  margin: 0 0 2px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: #475569;
}
.res-pass-title {
  margin: 0; font-family: var(--display); font-size: 1.04rem; font-weight: 800;
  color: #0f172a; line-height: 1.2; overflow-wrap: anywhere;
}
.res-pass-prize {
  margin: 3px 0 0; font-size: 0.84rem; font-weight: 600; color: #047857;
  overflow-wrap: anywhere;
}
.res-pass-body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
}
.res-pass-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px; border-radius: 12px; background: #faf8f5; border: 1.5px dashed #cbd5e1;
}
.res-pass-qr {
  width: 96px; height: 96px; padding: 5px; background: #ffffff; border-radius: 8px;
  border: 1px solid #e2e8f0; display: grid; place-items: center;
}
.res-pass-qr img, .res-pass-qr canvas { width: 84px !important; height: 84px !important; display: block; }
.res-pass-qr-label { font-size: 0.68rem; font-weight: 800; color: #475569; text-align: center; }
@media (max-width: 480px) {
  .res-pass-body { grid-template-columns: minmax(0, 1fr); }
  .res-pass-qr-wrap { justify-self: center; }
}
.pay-lead { font-size: 0.82rem; font-weight: 800; color: #475569; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 10px; }
.ticket-row { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ticket-row b {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 42px; padding: 0 10px;
  border: 1.5px solid #a7f3d0; border-radius: 12px; background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
  font-family: var(--display); font-size: 1.25rem; font-weight: 900; line-height: 1; color: #065f46; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(11, 110, 79, 0.07);
}

/* Plazo y aviso límite */
.pay-deadline-box {
  margin-top: 14px; padding: 14px 16px; border-radius: 16px;
  background: #fffbeb; border: 1.5px solid #fde68a; display: flex; gap: 12px; align-items: flex-start;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.06);
}
.deadline-icon-wrap { font-size: 1.35rem; line-height: 1; flex: none; margin-top: 1px; }
.deadline-body { flex: 1; min-width: 0; }
.pay-deadline { margin: 0; font-size: 0.92rem; line-height: 1.5; color: #78350f; font-weight: 600; }
.pay-deadline strong { color: #451a03; font-weight: 800; }

/* Pasos numerados del pago */
.pay-steps { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; counter-reset: paso; list-style: none; padding: 0; }
.pay-step-item {
  min-width: 0; counter-increment: paso; padding: 16px;
  border: 1.5px solid #e2e8f0; border-radius: 18px; background: #ffffff;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
}
/* La bolita va dentro de la cabecera: así el contenido del paso usa todo el ancho de la tarjeta, también en 375 px. */
.pay-step-item .step-header { display: flex; align-items: center; gap: 12px; }
.pay-step-item .step-header::before {
  content: counter(paso); flex: none; width: 32px; height: 32px; border-radius: 99px;
  background: #0f172a; color: #ffffff; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.step-header h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 900; line-height: 1.25; color: #0f172a; margin: 0; letter-spacing: -0.015em; }
.pay-help { margin-top: 6px; font-size: 0.88rem; line-height: 1.5; color: #475569; }
.pay-help strong { color: #0f172a; font-weight: 800; }

/* Caja de copia Bizum / IBAN */
.copy-box-modern {
  margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 14px; padding: 12px;
}
.copy-box-modern.is-link-box { grid-template-columns: minmax(0, 1fr); }
.copy-input-container { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bizum-pill-tag, .iban-pill-tag {
  font-size: 0.72rem; font-weight: 900; padding: 3px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.04em; background: #008782; color: #ffffff; flex: none;
}
.iban-pill-tag { background: #0369a1; }
.copy-value {
  flex: 1; width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: #0f172a;
  font-family: var(--display); font-weight: 900; font-variant-numeric: tabular-nums;
}
.copy-value.is-phone { font-size: 1.45rem; letter-spacing: 0.03em; }
.copy-value.is-iban { font-size: 1.05rem; letter-spacing: 0.02em; }
.btn-copy {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 12px; font-size: 1rem; font-weight: 800;
  background: #ffffff; border: 1.5px solid #cbd5e1; color: #1e293b; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.btn-copy::before { content: '📋'; font-size: 1.05rem; line-height: 1; }
.btn-copy.is-done::before { content: '✓'; font-weight: 900; }
.btn-copy.is-done { background: var(--ok); border-color: var(--ok); color: #ffffff; }
.copy-status { min-height: 1.3em; margin-top: 6px; font-size: 0.88rem; font-weight: 700; color: var(--ok); }

/* La regla base `.btn` es `white-space: nowrap; line-height: 1`: en 375 px un texto largo se salía de la caja. */
.pay-panel .btn { white-space: normal; line-height: 1.25; min-height: 52px; padding-top: 12px; padding-bottom: 12px; text-align: center; }

/* Acciones de aviso y WhatsApp */
.pay-action-buttons { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.btn-wa-modern {
  width: 100%; min-height: 52px; padding: 0 18px; border-radius: 14px;
  background: #25d366; color: #ffffff; border: 0; font-size: 1.05rem; font-weight: 900;
  box-shadow: 0 6px 18px -2px rgba(37, 211, 102, 0.4); display: flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn-wa-modern:active { transform: scale(0.98); }
.btn-wa-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1.5px solid #22c55e !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.12) !important;
}
@media (hover: hover) and (pointer: fine) {
  .btn-wa-secondary:hover {
    background: #dcfce7 !important;
    border-color: #16a34a !important;
    color: #14532d !important;
  }
}
.pay-panel .btn-notify { display: block; }
.btn-notify::before { content: '🔔'; font-size: 1.1rem; line-height: 1; margin-right: 8px; }
.btn-notify.is-done::before { content: '✓'; font-weight: 900; }
.pay-notify-hint { margin: 2px 0 0; font-size: 0.9rem; line-height: 1.5; color: #475569; }
.pay-notify-hint-strong { font-weight: 800; color: #0f172a; }
.btn-notify-web {
  width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px;
  background: #ffffff; border: 1.5px solid #cbd5e1; color: #1e293b; font-size: 0.95rem; font-weight: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: all 120ms ease;
}
.btn-notify-web.is-done { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; font-weight: 800; }
.notify-status-msg { margin: 0; min-height: 1.25rem; font-weight: 700; font-size: 0.88rem; text-align: center; }

/* Enlace personal sin email */
.personal-link { margin-top: 16px; padding: 18px; border: 1.5px dashed #cbd5e1; border-radius: 16px; background: #ffffff; }
.personal-link-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.personal-link-head h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 900; color: #0f172a; margin: 0; }
.copy-value.is-link { font-family: var(--font); font-size: 0.85rem; font-weight: 600; overflow-wrap: anywhere; }
.share-link { width: 100%; margin-top: 10px; min-height: 48px; border-radius: 12px; }

/* Avisos y pie de pago */
.pay-notices-group { margin-top: 16px; display: grid; gap: 10px; }
.notice { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-size: 0.92rem; line-height: 1.5; }
.notice.is-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.pay-completion-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; text-align: center; }
.pay-after { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 0.95rem; line-height: 1.45; font-weight: 700; }
.pay-back {
  width: 100%; min-height: 50px; border-radius: 14px; background: #ffffff; border: 1.5px solid #cbd5e1;
  color: #0f172a; font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dialog-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--text-muted); }
.dialog-foot .link-danger { margin-top: 0; min-height: 44px; }

/* El cambio de color de la rifa no afecta a la denuncia */
.btn-danger { background: #b42318; color: var(--n-0); }

/* Diálogo «Mis números» (#myTicketsModal) */
#myTicketsModal .dialog-panel {
  max-width: 460px;
  border-radius: 24px;
  padding: 28px 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25);
}
#myTicketsModal .dialog-head {
  margin-bottom: 18px;
}
#myTicketsModal .dialog-head h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #171512;
  display: flex;
  align-items: center;
  gap: 8px;
}
#myTicketsModal .dialog-head h2::before {
  content: '🎟️';
  font-size: 1.25rem;
}
#myTicketsModal #myTicketsLead {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #475569;
}
#myTicketsModal .field label {
  font-weight: 800;
  font-size: 0.92rem;
  color: #0f172a;
  margin-bottom: 6px;
  display: block;
}
#myTicketsModal .input {
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid #7c8798;
  font-size: 1rem;
  padding: 0 14px;
  width: 100%;
}
#myTicketsModal .input:focus-visible {
  border-color: #0b6e4f;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
#myTicketsModal .btn-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b6e4f 0%, #08523b 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  box-shadow: 0 4px 14px rgba(11, 110, 79, 0.28);
  cursor: pointer;
}
#myTicketsModal .btn-primary:active {
  transform: translateY(0);
}
#myTicketsModal .dialog-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}
#myTicketsModal .dialog-foot p {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
}

/* ---------- Pantallas grandes: el premio fijo a la izquierda y el tablero a la derecha ---------- */
@media (min-width: 1024px) {
  .raffle-main {
    display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); column-gap: 48px; align-items: start;
    width: 100%; max-width: 1140px; margin: 0 auto; padding: 24px var(--gutter) 0;
  }
  .raffle-main > * { grid-column: 1 / -1; }
  .raffle-main .wrap { padding: 0; }
  .raffle-main .raffle-hero { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100dvh - var(--header-h) - 24px); overflow-y: auto; padding: 0 4px 24px 0; }
  .raffle-main .review-wrap, .raffle-main #numeros, .raffle-main #como-se-sortea { grid-column: 2; }
  .raffle-main .raffle-disclaimer { grid-column: 1 / -1; grid-row: 3; margin-top: 16px; padding: 20px 0 36px; border-top: 1px solid #e2e8f0; }
  .raffle-main .raffle-wrap { max-width: none; }
  .raffle-main #numeros { border-top: 0; padding-top: 0; }
  .public-ticket-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .public-num-cell { font-size: 1.1rem; }
  .public-ticket-grid.is-long .public-num-cell { font-size: 0.95rem; }
  .start { display: none; }
  body.is-gone .raffle-main { display: block; max-width: 760px; }
  body.is-upcoming .raffle-main { display: block; max-width: 1080px; padding-bottom: 32px; }
  body.is-upcoming .raffle-main .raffle-hero { position: static; padding-bottom: 16px; }
  body.is-upcoming .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 430px);
    gap: 20px 44px; align-items: start;
  }
  body.is-upcoming .hero-media { grid-column: 1; }
  body.is-upcoming .hero-body { display: contents; }
  body.is-upcoming .hero-body > * { grid-column: 1; }
  body.is-upcoming #launchLanding {
    grid-column: 2; grid-row: 1 / span 10;
    position: sticky; top: calc(var(--header-h) + 24px); margin-top: 0;
  }
  body.is-drawn .raffle-main { display: block; }
  body.is-drawn .raffle-main .raffle-hero { position: static; padding: 0; }
  body.is-drawn .hero-grid { max-width: 640px; margin-inline: auto; }
  body.is-drawn .hero-grid:has(.hero-media > :not(.hidden)) { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; align-items: start; }
  body.is-drawn .rcards { margin-inline: 0; padding-inline: 0; }
}
@media (min-width: 560px) and (max-width: 1023px) {
  .public-ticket-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
}

/* Hover solo con ratón: en el móvil un toque no deja el botón «pulsado». */
@media (hover: hover) and (pointer: fine) {
  .delivery-nearby-link:hover { text-decoration: underline; }
  .public-num-cell:not(.is-taken):not(.is-mine):hover {
    border-color: var(--accent); background: var(--accent-soft);
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(11, 110, 79, 0.15);
  }
  .start-btn:hover {
    box-shadow: 0 12px 28px -4px rgba(11, 110, 79, 0.5); transform: translateY(-2px);
  }
  .hundreds-tab:hover { border-color: var(--n-950); }
  .btn-outline:hover { border-color: var(--n-950); }
  .chip:hover { background: var(--accent); color: var(--n-0); }
  .btn-wa:hover { background: var(--ok-hover); }
  .btn-wa-modern:hover { background: #20bd5a; box-shadow: 0 8px 24px -2px rgba(37, 211, 102, 0.5); transform: translateY(-1px); }
  .btn-notify-web:hover { border-color: #0f172a; background: #f8fafc; }
  .btn-copy:not(.is-done):hover { border-color: #0f172a; background: #f8fafc; }
  .pay-back:hover { background: #f8fafc; border-color: #0f172a; }
  .small-links a:hover, .small-links button:hover { color: var(--text); }
  .pay-method:hover { border-color: var(--n-950); }
  .btn-danger:hover { background: #912018; }
  #myTicketsModal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(11, 110, 79, 0.35);
  }
}

/* ---------- Aviso de responsabilidad del organizador ---------- */
.raffle-disclaimer { padding: 8px 0 28px; }
.raffle-disclaimer p { font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); max-width: 70ch; }

/* ---------- Consentimiento opcional de avisos de nuevas rifas ---------- */
.opt-marketing { margin-top: 2px; }
.opt-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}
.opt-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent, #0b6e4f);
  cursor: pointer;
}
.opt-check:has(input:checked) {
  border-color: var(--accent, #0b6e4f);
  background: #f0fdf4;
}

/* Ficha pública sobria sin estilo IA, botón visible de denuncia y anticaptcha */
.fact-pill-delivery {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
}
.raffle-disclaimer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-report-inline {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #991b1b;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn-report-inline:hover {
    background: #fee2e2;
    border-color: #f87171;
  }
}
.report-captcha-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (pointer: coarse) {
  .chip,
  .btn-report-inline {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .public-drawer,
  .btn-report-inline {
    transition: none;
  }
}
