/* =========================================================
   Dinámicas Golden · Golden Premium Experience
   Mobile-first. Compatible con html2canvas (screen.js):
   sin background-clip:text ni filtros dentro de .page.
   ========================================================= */

:root {
  --bg: #0a0a0d;
  --bg-2: #0f0f14;
  --surface: #15151b;
  --surface-2: #1b1b23;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f5f3ee;
  --muted: #a19d94;
  --dim: #6f6c66;

  --gold: #e3b448;
  --gold-hi: #f6dc8c;
  --gold-lo: #a87a1c;
  --gold-grad: linear-gradient(135deg, #f8e19a 0%, #e3b448 45%, #b5841f 100%);
  --gold-soft: rgba(227, 180, 72, .12);
  --on-gold: #1a1406;

  --ok: #3ecf8e;
  --busy: #e8b04a;
  --busy-bg: #211b10;
  --busy-line: #5c4a22;
  --paid: #ff6b72;
  --paid-bg: #2a1316;
  --paid-line: #6e2a31;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --topbar: 60px;
}

@font-face {
  font-family: "Outfit"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
body.has-cart { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
p, h1, h2 { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Encabezado ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 10, 13, .82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 760px; height: var(--topbar); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(227, 180, 72, .35); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }
.brand-name b { color: var(--gold); font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; margin-left: auto; gap: 2px; }
.nav a { padding: 8px 10px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface); }

.live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.nav + .live { margin-left: 4px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.live[data-estado="vivo"] { color: var(--text); }
.live[data-estado="vivo"] .live-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(62, 207, 142, .6); animation: pulse 2s infinite; }
.live[data-estado="conectando"] .live-dot { background: var(--busy); animation: blink 1s infinite alternate; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }
@keyframes blink { to { opacity: .3; } }

/* ---------- Página (área que captura screen.js) ---------- */
.page {
  max-width: 760px; margin: 0 auto; padding: 12px var(--gutter) 28px;
  background: var(--bg);
}
.header { margin: 0 0 20px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.img_top_header { width: 100%; height: auto; }

.section { margin-bottom: 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }

/* ---------- Premios ---------- */
.sorteos { display: grid; gap: 8px; }
.sorteo {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px; box-shadow: var(--shadow);
  animation: rise .5s var(--ease) both;
}
.sorteo + .sorteo { animation-delay: .08s; }
.sorteo-principal {
  border-color: rgba(227, 180, 72, .35);
  background: linear-gradient(180deg, rgba(227, 180, 72, .09), rgba(227, 180, 72, 0) 60%), var(--surface);
}
.sorteo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.big-text-lottery { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--text); line-height: 1.2; }
.badge {
  flex: none; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.badge-gold { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; }

.premios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.premio {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 6px 4px; text-align: center; min-width: 0; border-radius: var(--r-sm);
}
.titulo-premio { font-size: 9px; font-weight: 600; letter-spacing: .03em; color: var(--muted); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.texto-premio { font-size: 15px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.premio.p2p { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); box-shadow: 0 6px 16px -10px rgba(227, 180, 72, .6); }
.premio.p2p .titulo-premio { color: rgba(26, 20, 6, .72); }

/* ---------- Tablero ---------- */
.price {
  flex: none; text-align: right; padding: 8px 12px; border-radius: var(--r);
  background: var(--gold-soft); border: 1px solid rgba(227, 180, 72, .3);
}
.text-price { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.text-price-value { font-size: 20px; font-weight: 800; color: var(--gold-hi); line-height: 1.1; font-variant-numeric: tabular-nums; }

.progress { margin-bottom: 12px; }
.progress-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress-row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-free b { color: var(--ok); }
.progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); transition: width .8s var(--ease); }

.estados { display: flex; gap: 6px; margin-bottom: 12px; }
.et {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 6px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.et i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.et span { color: var(--text); font-variant-numeric: tabular-nums; }
.et.disponible i { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.et.ocupado i { background: var(--busy); }
.et.pagado i { background: var(--paid); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg {
  border: 0; background: transparent; padding: 7px 12px; min-height: 36px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .2s, color .2s;
}
.seg.is-active { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 6px rgba(0, 0, 0, .4); }
.hint { font-size: 13px; color: var(--muted); margin-bottom: 10px; }

/* Cuadrícula: 1script.js fija grid-row/column en línea; aquí se ignoran para poder reorganizar. */
.carton {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px;
  margin: 0 calc(4px - var(--gutter));
}
.carton > .numero { grid-row: auto !important; grid-column: auto !important; }

.numero {
  position: relative; min-width: 0; aspect-ratio: 1; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  user-select: none; -webkit-user-select: none;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s;
}
.numero > span:first-child { font-size: 14px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.numero > span:last-child {
  max-width: 100%; font-size: 7.5px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; text-align: center;
  overflow: hidden; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.numero > span:last-child:empty { display: none; }

.numero.disponible { background: var(--surface-2); border-color: var(--line-2); cursor: pointer; }
.numero.disponible::after {
  content: "";
}
.numero.ocupado { background: var(--busy-bg); border-color: var(--busy-line); color: var(--busy); }
.numero.ocupado > span:last-child { color: #e9dcc0; }
.numero.pagado { background: var(--paid-bg); border-color: var(--paid-line); color: var(--paid); }
.numero.pagado > span:last-child { color: #f3d3d5; }
.numero.ocupado > span:first-child, .numero.pagado > span:first-child { font-size: 12px; }

@media (hover: hover) {
  .numero.disponible:hover { border-color: rgba(227, 180, 72, .6); transform: translateY(-1px); }
}
.numero.disponible:active { transform: scale(.94); }
.numero:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Seleccionado por el usuario */
.numero.is-sel {
  background: var(--gold-grad); border-color: transparent; color: var(--on-gold);
  box-shadow: 0 8px 20px -8px rgba(227, 180, 72, .75);
  animation: pop .32s var(--ease);
}
.numero.is-sel::after { content: ""; }
.numero.is-sel::before {
  content: ""; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--on-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6dc8c' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 8px no-repeat;
}
@keyframes pop { 0% { transform: scale(.88); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Recién apartado en vivo */
.numero.is-new { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(227, 180, 72, .55); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Esqueleto de carga (antes de recibir datos del socket) */
.numero.sk { background: var(--surface); border-color: var(--line); color: var(--dim); overflow: hidden; }
.numero.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* Filtro "Solo libres" */
.carton.solo-libres > .numero:not(.disponible):not(.sk) { display: none; }

.pasos { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.pasos li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pasos b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 13px; }
.pasos em { font-style: normal; color: var(--text); font-weight: 600; }

.foot { text-align: center; font-size: 12px; color: var(--dim); padding-top: 4px; }

/* ---------- Botones ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-primary { background: var(--gold-grad); color: var(--on-gold); box-shadow: 0 8px 20px -10px rgba(227, 180, 72, .8); }
@media (hover: hover) { .btn-primary:hover:not(:disabled) { box-shadow: 0 10px 26px -8px rgba(227, 180, 72, .9); } }
.btn-secondary { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
@media (hover: hover) { .btn-secondary:hover:not(:disabled) { border-color: rgba(255, 255, 255, .25); } }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--muted); }
@media (hover: hover) { .btn-ghost:hover:not(:disabled) { color: var(--text); border-color: rgba(227, 180, 72, .5); } }
.btn.is-done { background: linear-gradient(135deg, #6ee7b0, #2fb67a); color: #062214; }

/* Estado de carga: aplica a .is-loading y al botón de captura mientras screen.js lo deshabilita */
.btn.is-loading, .boton-captura:disabled { opacity: 1; cursor: progress; color: transparent !important; }
.btn.is-loading::after, .boton-captura:disabled::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--muted); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after { border-color: var(--on-gold); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Resumen de compra (barra inferior) ---------- */
.cart {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(115%); transition: transform .35s var(--ease);
  pointer-events: none;
}
.cart.is-open { transform: none; pointer-events: auto; }
.cart-inner {
  max-width: 740px; margin: 0 auto; padding: 12px;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "info total" "actions actions"; gap: 10px 12px;
  background: rgba(21, 21, 27, .94); border: 1px solid rgba(227, 180, 72, .3); border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 -4px 40px rgba(0, 0, 0, .55);
}
.cart-info { grid-area: info; min-width: 0; }
.cart-count { font-size: 13px; color: var(--muted); }
.cart-count b { color: var(--text); }
.cart-chips { display: flex; gap: 4px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.cart-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 9px;
  border-radius: 8px; background: var(--gold-soft); border: 1px solid rgba(227, 180, 72, .35);
  color: var(--gold-hi); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
  animation: pop .25s var(--ease);
}
.chip svg { width: 12px; height: 12px; opacity: .7; }
.cart-total { grid-area: total; text-align: right; }
.cart-total span { display: block; font-size: 12px; color: var(--muted); }
.cart-total b { font-size: 22px; font-weight: 800; color: var(--gold-hi); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cart-actions { grid-area: actions; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.cart-actions .btn-secondary { width: 46px; padding: 0; }

/* ---------- Notificaciones ---------- */
.toasts {
  position: fixed; left: 50%; top: calc(var(--topbar) + 10px); z-index: 50; transform: translateX(-50%);
  width: min(420px, calc(100% - 2 * var(--gutter))); display: grid; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px;
  background: rgba(27, 27, 35, .96); border: 1px solid var(--line-2); color: var(--text);
  font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: toastIn .3s var(--ease) both; pointer-events: auto;
}
.toast.is-out { animation: toastOut .25s ease-in both; }
.toast .ico { width: 20px; height: 20px; }
.toast-success .ico { color: var(--ok); }
.toast-error { border-color: rgba(255, 107, 114, .4); }
.toast-error .ico { color: var(--paid); }
.toast-warning .ico { color: var(--busy); }
.toast-info .ico { color: var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Tablet / escritorio ---------- */
@media (max-width: 479px) {
  .topbar-inner { gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 14px; line-height: 1.05; }
  .brand-name b { display: block; }
  .nav a { padding: 8px 7px; font-size: 13.5px; }
}
@media (max-width: 399px) {
  .live { padding: 7px; }
  .live-text { display: none; }
}
@media (min-width: 400px) {
  .numero > span:last-child { font-size: 8px; }
}
@media (min-width: 560px) {
  :root { --gutter: 20px; }
  .section-title { font-size: 26px; }
  .carton { gap: 5px; margin: 0; }
  .numero { border-radius: 9px; }
  .numero > span:first-child { font-size: 20px; }
  .numero.ocupado > span:first-child, .numero.pagado > span:first-child { font-size: 17px; }
  .numero > span:last-child { font-size: 10.5px; }
  .big-text-lottery { font-size: 15px; }
  .sorteo { padding: 12px; }
  .titulo-premio { font-size: 10.5px; }
  .texto-premio { font-size: 19px; }
  .premio { padding: 9px 8px; }
  .et { font-size: 12px; }
  .pasos { grid-template-columns: repeat(3, 1fr); }
  .pasos li { flex-direction: column; align-items: flex-start; }
  .cart-inner { grid-template-columns: 1fr auto auto; grid-template-areas: "info total actions"; align-items: center; padding: 12px 12px 12px 18px; }
  .cart-actions .btn-primary { min-width: 170px; }
}
@media (min-width: 900px) {
  .page { padding-top: 20px; }
  .sorteos { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mis números (participante identificado) ---------- */
.yo { margin-bottom: 10px; }
.yo-anonimo, .yo-identificado {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
}
.yo-identificado { border-color: rgba(62, 207, 142, .3); align-items: flex-start; }
.yo [hidden] { display: none; }
.yo-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.yo-ok { background: rgba(62, 207, 142, .14); color: var(--ok); }
.yo-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.yo-texto b { font-size: 14px; color: var(--text); font-weight: 600; }
.yo-numeros { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.yo-numeros:empty { display: none; }
.chip-static { cursor: default; padding: 0 9px; animation: none; }
.chip-ocupado { background: var(--busy-bg); border-color: var(--busy-line); color: var(--busy); }
.chip-pagado { background: rgba(62, 207, 142, .12); border-color: rgba(62, 207, 142, .35); color: #7ee2b4; }

/* Números de la persona identificada en el tablero */
.numero.is-mio { box-shadow: inset 0 0 0 2px var(--ok); }
.numero.is-mio::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
}

/* ---------- Hoja inferior (dialog) ---------- */
.sheet {
  width: 100%; max-width: 480px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
  background: transparent; color: var(--text); overflow: visible;
}
.sheet::backdrop { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheetIn .32s var(--ease); }
.sheet[open]::backdrop { animation: fadeIn .25s ease; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
body.sheet-abierta { overflow: hidden; }
.sheet-panel {
  position: relative; max-height: 92dvh; overflow-y: auto;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
}
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 14px; }
.sheet-cerrar {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.paso { display: grid; gap: 12px; animation: rise .3s var(--ease); }
.paso[hidden] { display: none; }
.sheet-title { font-size: 20px; font-weight: 700; line-height: 1.2; padding-right: 36px; }
.sheet-sub { font-size: 14px; color: var(--muted); margin-top: -6px; }
.sheet-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.sheet-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.sheet-icon .ico { width: 24px; height: 24px; }
.sheet-icon-ok { background: rgba(62, 207, 142, .14); color: var(--ok); }
.sheet-icon-info { background: var(--gold-soft); color: var(--gold); }
.sheet-links { display: flex; justify-content: space-between; gap: 8px; }

@media (min-width: 560px) {
  .sheet { margin: auto; }
  .sheet-panel { border-radius: 22px; border-bottom: 1px solid var(--line-2); padding-bottom: 22px; }
  .sheet-grip { display: none; }
}

/* ---------- Campos de formulario ---------- */
.campo { display: grid; gap: 6px; }
.campo-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.campo-input, .campo-codigo {
  display: flex; align-items: center; min-height: 52px; border-radius: 12px;
  background: var(--bg-2); border: 1.5px solid var(--line-2); transition: border-color .2s, box-shadow .2s;
}
.campo-input:focus-within, .campo-codigo:focus {
  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(227, 180, 72, .15); outline: none;
}
.campo-prefijo { padding: 0 4px 0 14px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.campo-input input {
  flex: 1; min-width: 0; height: 50px; padding: 0 14px 0 6px; border: 0; background: transparent; outline: none;
  color: var(--text); font: 600 18px/1 var(--font); letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.campo-codigo {
  width: 100%; padding: 0 14px; color: var(--text); text-align: center;
  font: 700 26px/1 var(--font); letter-spacing: .45em; text-indent: .45em; font-variant-numeric: tabular-nums;
}
input::placeholder { color: var(--dim); }
.campo-error { min-height: 0; font-size: 13px; color: var(--paid); }
.campo-error:empty { display: none; }
.campo.is-error .campo-input, .campo.is-error .campo-codigo { border-color: var(--paid); box-shadow: 0 0 0 4px rgba(255, 107, 114, .12); }

/* ---------- Pedido dentro de la hoja ---------- */
.pedido { padding: 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.pedido[hidden] { display: none; }
.pedido-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pedido-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.pedido-total b { font-size: 20px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }

/* ---------- Botones extra ---------- */
.btn-block { width: 100%; }
.btn-whatsapp { background: #25d366; color: #052e16; text-decoration: none; }
.btn-whatsapp[hidden] { display: none; }
@media (hover: hover) { .btn-whatsapp:hover { background: #2ee374; } }
.btn .ico + span, .btn span + .ico { margin: 0; }
.link {
  border: 0; background: none; padding: 8px 0; color: var(--gold); font-size: 14px; font-weight: 600; cursor: pointer;
}
.link:disabled { color: var(--dim); cursor: default; }
.link-center { justify-self: center; }

/* ---------- Póster de captura ----------
   screen.js clona .page dentro de un contenedor .capturing de 480 px fuera de pantalla
   y lo convierte en imagen a 3x (1440 px). Valores fijos: no dependen del dispositivo.
   Incluye el banner; debajo, una franja con fecha y valor del número. */
.capturing { position: fixed; left: -10000px; top: 0; width: 480px; background: var(--bg); color: var(--text); font-family: var(--font); }
.capturing *, .capturing *::before, .capturing *::after { animation: none !important; transition: none !important; }
.capturing [data-html2canvas-ignore], .capturing .section-head, .capturing .progress, .capturing .badge { display: none !important; }
.capturing .page { width: 480px; max-width: none; margin: 0; padding: 0 0 10px; }
.capturing .header { border-radius: 0; margin: 0; box-shadow: none; }

.capturing .poster-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid rgba(227, 180, 72, .25); margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(227, 180, 72, .10), rgba(227, 180, 72, 0));
}
.capturing .poster-brand { flex: 1; min-width: 0; }
.capturing .poster-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); line-height: 1.2; }
.capturing .poster-title b { color: var(--gold); }
.capturing .poster-date { font-size: 16px; font-weight: 700; color: var(--text); }
.capturing .poster-price { text-align: right; padding: 5px 10px; border-radius: 10px; background: var(--gold-soft); border: 1px solid rgba(227, 180, 72, .3); }
.capturing .poster-price span { display: block; font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.capturing .poster-price b { font-size: 17px; font-weight: 800; color: var(--gold-hi); line-height: 1.1; }

.capturing .section { margin: 0 8px 8px; }
.capturing .sorteos { grid-template-columns: 1fr; gap: 4px; }
.capturing .sorteo, .capturing .sorteo-principal {
  display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 6px;
  padding: 5px 5px 5px 9px; border-radius: 10px; box-shadow: none;
}
.capturing .sorteo-head { margin: 0; }
.capturing .big-text-lottery { font-size: 10.5px; line-height: 1.15; }
.capturing .sorteo-principal .big-text-lottery { color: var(--gold-hi); }
.capturing .premios { gap: 4px; }
.capturing .premio { padding: 3px 2px; border-radius: 7px; }
.capturing .titulo-premio { font-size: 7.5px; letter-spacing: .02em; }
.capturing .texto-premio { font-size: 13px; margin-top: 0; }
.capturing .premio.p2p { box-shadow: none; }

.capturing .estados { margin: 0 0 6px; gap: 4px; }
.capturing .et { font-size: 10px; padding: 4px; }
.capturing .carton { margin: 0 -4px; gap: 2px; }
.capturing .carton > .numero { display: flex; border-radius: 6px; }
.capturing .numero > span:first-child { font-size: 16px; }
.capturing .numero.ocupado > span:first-child, .capturing .numero.pagado > span:first-child { font-size: 13px; }
.capturing .numero > span:last-child { font-size: 8px; letter-spacing: -.01em; }
.capturing .foot { padding-top: 0; font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Aviso dentro de la hoja (cupo, cierre de ventas, números tomados) */
.aviso-caja {
  padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4;
  background: var(--busy-bg); border: 1px solid var(--busy-line); color: #f1dfb6;
}
.aviso-caja[hidden] { display: none; }

/* "¿No te llegó el código?" */
.nollego {
  display: grid; gap: 2px; width: 100%; padding: 12px; border-radius: 12px; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px dashed var(--line-2); color: var(--muted); font: 400 13px/1.4 var(--font);
}
.nollego b { color: var(--gold); font-size: 14px; font-weight: 600; }

/* ---------- Enlace "Todas las rifas" (página de cada sorteo) ---------- */
.volver {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -4px; padding: 6px 10px 6px 4px;
  border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 600; transition: color .2s, background .2s;
}
.volver .ico { width: 18px; height: 18px; }
@media (hover: hover) { .volver:hover { color: var(--text); background: var(--surface); } }

/* ---------- Página principal: todas las rifas ---------- */
.hero { padding: 18px 2px 8px; margin-bottom: 18px; }
.hero-title { font-size: 30px; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin: 4px 0 10px; }
.hero-title span { color: var(--gold); }
.hero-sub { font-size: 15px; color: var(--muted); max-width: 32ch; }
.hero-chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hero-chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text);
}
.hero-chips .ico { width: 15px; height: 15px; color: var(--gold); }

.rifas { display: grid; gap: 14px; }
.rifa-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  animation: rise .5s var(--ease) both;
}
.rifa-card:nth-child(2) { animation-delay: .06s; }
.rifa-card:nth-child(3) { animation-delay: .12s; }
.rifa-card.is-abierta { border-color: rgba(227, 180, 72, .32); }
@media (hover: hover) {
  .rifa-card:hover { transform: translateY(-2px); border-color: rgba(227, 180, 72, .55); box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .8); }
}
.rifa-card:active { transform: scale(.99); }
.rifa-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.rifa-media { position: relative; aspect-ratio: 1600 / 533; background: var(--surface-2); }
.rifa-media img { width: 100%; height: 100%; object-fit: cover; }
.rifa-card.is-cerrada .rifa-media img, .rifa-card.is-agotada .rifa-media img { filter: grayscale(.6) brightness(.7); }
.rifa-estado {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(10, 10, 13, .82); color: var(--text); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.rifa-estado i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.rifa-estado [data-cuenta] { font-weight: 500; color: var(--muted); }
.rifa-card.is-urgente .rifa-estado { border-color: var(--busy-line); }
.rifa-card.is-urgente .rifa-estado [data-cuenta] { color: var(--busy); font-weight: 700; }
.rifa-card.is-agotada .rifa-estado { color: var(--paid); }
.rifa-card.is-cerrada .rifa-estado { color: var(--muted); }

.rifa-body { display: grid; gap: 12px; padding: 14px; }
.rifa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rifa-nombre { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.rifa-precio { text-align: right; line-height: 1.1; }
.rifa-precio b { display: block; font-size: 18px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.rifa-precio span { font-size: 11px; color: var(--muted); }
.rifa-loteria { font-size: 14px; font-weight: 600; margin-top: -6px; }
.rifa-loteria span { color: var(--muted); font-weight: 500; }
.rifa-loteria small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.rifa-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rifa-stats div { padding: 9px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.rifa-stats div > span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rifa-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.rifa-stats b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.rifa-stats .oro { color: var(--gold-hi); }
.rifa-card .progress-track { height: 6px; margin-top: -4px; }
.rifa-cta { pointer-events: none; }
[data-libres].is-cambio { animation: pop .5s var(--ease); color: var(--gold-hi); }

@media (min-width: 560px) {
  .hero-title { font-size: 40px; }
  .rifas { grid-template-columns: 1fr 1fr; }
}

/* ---------- Promos, buscador y Al azar ---------- */
.promo-tag {
  margin-top: 4px; padding: 2px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em;
  background: var(--gold-grad); color: var(--on-gold); text-align: center;
}
.toolbar-buscar { margin-bottom: 10px; }
.toolbar-buscar .btn { flex: none; }
.buscar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--muted);
}
.buscar:focus-within { border-color: var(--gold); }
.buscar input {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; outline: none; color: var(--text);
  font: 600 15px var(--font); font-variant-numeric: tabular-nums;
}
.numero.is-buscado { animation: buscado 2.2s var(--ease); z-index: 1; }
@keyframes buscado { 0%, 40% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(227, 180, 72, .7); transform: scale(1.12); } 100% { box-shadow: 0 0 0 0 transparent; transform: none; } }
.cart-ahorro { font-size: 12px; font-weight: 600; color: var(--ok); margin-top: 2px; }
.cart-ahorro:empty { display: none; }

/* ---------- Tarjeta: pago pendiente ---------- */
.yo-mis { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--gold); }
.yo-pago {
  width: 100%; margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r);
  background: var(--busy-bg); border: 1px solid var(--busy-line); color: var(--text); text-align: left; cursor: pointer;
  font: inherit; animation: rise .35s var(--ease);
}
.yo-pago[hidden] { display: none; }
.yo-pago.is-revision { background: var(--gold-soft); border-color: rgba(227, 180, 72, .35); }
.yo-pago-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; color: #e9dcc0; }
.yo-pago-txt b { font-size: 14.5px; color: var(--busy); font-variant-numeric: tabular-nums; }
.yo-pago.is-revision .yo-pago-txt b { color: var(--gold-hi); }
.yo-pago-cta { flex: none; padding: 8px 14px; border-radius: 10px; background: var(--gold-grad); color: var(--on-gold); font-weight: 700; font-size: 13.5px; }

/* ---------- Pantalla de pago ---------- */
.pago-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-right: 36px; }
.pago-top .sheet-title { padding-right: 0; }
.reloj {
  flex: none; display: grid; text-align: center; padding: 6px 10px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.reloj span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.reloj b { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--gold-hi); }
.reloj.is-urgente { border-color: var(--paid-line); background: var(--paid-bg); }
.reloj.is-urgente b { color: var(--paid); animation: blink .8s infinite alternate; }

.paso-num {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%;
  background: var(--gold-soft); color: var(--gold); font-size: 12px; vertical-align: 1px;
}
.cuentas { display: grid; gap: 8px; }
.cuentas-lista { display: grid; gap: 6px; }
.cuenta {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); border: 1.5px solid var(--line-2); transition: border-color .2s, background .2s;
}
.cuenta:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.cuenta input { accent-color: var(--gold); width: 18px; height: 18px; flex: none; }
.cuenta-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cuenta-info b { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cuenta-info span { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cuentas-titular { font-size: 12.5px; color: var(--muted); }
.cuentas-titular:empty { display: none; }

.subir {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; cursor: pointer;
  background: var(--bg-2); border: 1.5px dashed var(--line-2); transition: border-color .2s;
}
.subir:hover, .subir:focus-within { border-color: var(--gold); }
.subir input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.subir-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); }
.subir-texto { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.subir-texto b { font-size: 15px; color: var(--text); }
#p-preview { width: 52px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; border: 1px solid var(--line-2); }
#p-preview:not([hidden]) + .subir-ico { display: none; }
.link-dim { color: var(--muted); font-weight: 500; }

/* ---------- Página "Mis números" ---------- */
.mis .login-card { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.mis-rifas { display: grid; gap: 12px; margin-bottom: 22px; }
.mis-rifa { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.mis-rifa-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mis-rifa-cab div { display: flex; flex-direction: column; min-width: 0; }
.mis-rifa-cab b { font-size: 17px; }
.mis-rifa-cab span { font-size: 12.5px; color: var(--muted); }
.mis-ir { flex: none; color: var(--gold) !important; font-weight: 600; font-size: 13px !important; }
.mis-rifa .yo-pago { margin: 0; text-decoration: none; }
.mis-vacio { font-size: 13px; color: var(--muted); }
.mis-sub { font-size: 16px; margin: 0 0 10px; }
.estado-chip { padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.estado-chip.ok { background: rgba(62, 207, 142, .14); color: var(--ok); }
.estado-chip.gold { background: var(--gold-soft); color: var(--gold-hi); }
.estado-chip.busy { background: var(--busy-bg); color: var(--busy); }
.estado-chip.paid { background: var(--paid-bg); color: var(--paid); }
.estado-chip.dim { background: var(--surface-2); color: var(--muted); }
.fila-lado .estado-chip { align-self: flex-end; }
.rifa-precio .promo-tag { display: block; margin-top: 4px; }
.mis .lista { display: grid; gap: 8px; }
.mis .fila { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.mis .fila-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.mis .fila-info b { color: var(--text); font-size: 15px; font-weight: 600; }
.mis .fila-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mis .fila-total { color: var(--gold-hi); font-size: 16px; font-variant-numeric: tabular-nums; }
.mis .aviso { color: var(--busy); font-weight: 600; }
.mis .vacio { padding: 20px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r); }

/* ---------- Privacidad ---------- */
.consentimiento { font-size: 12px; color: var(--dim); text-align: center; line-height: 1.4; margin-top: -4px; }
.consentimiento a, .foot a { color: var(--muted); text-decoration: underline; }
.legal { max-width: 720px; }
.legal h1 { margin: 6px 0 4px; }
.legal h2 { font-size: 17px; margin: 22px 0 8px; color: var(--gold); }
.legal p, .legal li { font-size: 14.5px; color: #d8d4cb; line-height: 1.6; }
.legal ul { padding-left: 20px; margin: 0; display: grid; gap: 6px; }
.legal mark { background: var(--busy-bg); color: var(--busy); padding: 0 4px; border-radius: 4px; }
.legal-fecha { font-size: 12.5px !important; color: var(--muted) !important; }
.aviso-cookies {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45;
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  border-radius: 16px; background: rgba(27, 27, 35, .97); border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: rise .35s var(--ease) both;
}
.aviso-cookies p { flex: 1; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.aviso-cookies a { color: var(--gold); }
body.has-cart .aviso-cookies { bottom: calc(150px + env(safe-area-inset-bottom)); }

/* ---------- Cuenta regresiva (página de cada sorteo) ---------- */
.cierre {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 18px; padding: 12px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid rgba(227, 180, 72, .3); box-shadow: var(--shadow);
}
.cierre-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cierre-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.cierre-cuando { font-size: 15px; font-weight: 700; margin-top: 2px; }
.cierre-loteria { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cierre-reloj { display: flex; gap: 5px; flex: none; }
.cierre-reloj > div {
  display: grid; justify-items: center; min-width: 46px; padding: 6px 4px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.cierre-reloj b { font-size: 20px; font-weight: 800; line-height: 1.05; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.cierre-reloj span { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cierre.is-urgente { border-color: var(--paid-line); }
.cierre.is-urgente .cierre-reloj b { color: var(--paid); }
.cierre.is-cerrada { border-color: var(--line); }
.cierre.is-cerrada .cierre-label { color: var(--paid); }
.cierre.is-cerrada .cierre-reloj { opacity: .45; }
/* Celular: una sola fila compacta */
@media (max-width: 559px) {
  .cierre { gap: 8px; margin: -10px 0 14px; padding: 8px 8px 8px 12px; border-radius: var(--r); }
  .cierre-label { font-size: 9.5px; }
  .cierre-cuando { font-size: 13px; margin-top: 1px; }
  .cierre-loteria { font-size: 10.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cierre-reloj { gap: 3px; }
  .cierre-reloj > div { min-width: 34px; padding: 4px 2px; border-radius: 8px; }
  .cierre-reloj b { font-size: 15px; }
  .cierre-reloj span { font-size: 8px; letter-spacing: .02em; }
}

/* ---------- Color propio de cada rifa (config sorteos.<clave>.color) ---------- */
/* Página principal: tarjeta */
.rifa-card { --acento: var(--gold); --acento-hi: var(--gold-hi); --acento-grad: var(--gold-grad); --on-acento: var(--on-gold); --acento-soft: var(--gold-soft); --acento-line: rgba(227, 180, 72, .4); }
.rifa-card.is-abierta { border-color: var(--acento-line); }
@media (hover: hover) { .rifa-card:hover { border-color: var(--acento); } }
.rifa-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--acento-grad); }
.rifa-punto { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 3px var(--acento-soft); vertical-align: 2px; }
.rifa-precio b, .rifa-stats .oro { color: var(--acento-hi); }
.rifa-card .progress-bar { background: var(--acento-grad); }
.rifa-card .promo-tag { background: var(--acento-grad); color: var(--on-acento); }
.rifa-card .btn-primary.rifa-cta { background: var(--acento-grad); color: var(--on-acento); box-shadow: 0 8px 20px -10px var(--acento); }
.rifa-card.is-abierta .rifa-estado { border-color: var(--acento-line); }

/* Página de la rifa */
body.rifa { --acento: var(--gold); --acento-hi: var(--gold-hi); --acento-grad: var(--gold-grad); --on-acento: var(--on-gold); --acento-soft: var(--gold-soft); --acento-line: rgba(227, 180, 72, .4); }
body.rifa .topbar { box-shadow: inset 0 -2px 0 var(--acento); }
body.rifa .eyebrow, body.rifa .cierre-label { color: var(--acento); }
body.rifa .cierre { border-color: var(--acento-line); }
body.rifa .cierre-reloj b { color: var(--acento-hi); }
body.rifa .cierre.is-urgente .cierre-reloj b { color: var(--paid); }
body.rifa .price { background: var(--acento-soft); border-color: var(--acento-line); }
body.rifa .text-price-value { color: var(--acento-hi); }
body.rifa .promo-tag { background: var(--acento-grad); color: var(--on-acento); }
body.rifa .sorteo-principal { border-color: var(--acento-line); background: linear-gradient(180deg, var(--acento-soft), transparent 60%), var(--surface); }
body.rifa .badge-gold, body.rifa .premio.p2p { background: var(--acento-grad); color: var(--on-acento); }
body.rifa .premio.p2p .titulo-premio { color: var(--on-acento); opacity: .8; }
body.rifa .progress-bar { background: var(--acento-grad); }
body.rifa .yo-mis { color: var(--acento); }
.capturing .poster-head { border-bottom-color: var(--acento-line, rgba(227, 180, 72, .25)); }
.capturing .poster-title { color: var(--acento, var(--gold)); }
.capturing .poster-price b { color: var(--acento-hi, var(--gold-hi)); }

/* Datos del cliente nuevo */
.datos-tel { font-size: 14px; color: var(--muted); margin-top: -4px; }
.datos-tel b { color: var(--text); font-variant-numeric: tabular-nums; }
.datos-tel .link { padding: 0 0 0 6px; font-size: 13px; }

/* Premio en producto (ej. tacos de billar): sin montos en dinero */
.premio-producto {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r);
  background: var(--acento-grad, var(--gold-grad)); color: var(--on-acento, var(--on-gold));
}
.premio-producto-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.premio-producto-ico .ico { width: 22px; height: 22px; }
.premio-producto .titulo-premio { color: inherit; opacity: .8; min-height: 0; display: block; text-align: left; }
.premio-producto .texto-premio { font-size: 18px; font-weight: 800; text-align: left; line-height: 1.2; }
.rifa-premio-txt b { font-size: 15px !important; line-height: 1.2; display: block; }
.capturing .premio-producto { padding: 8px; }
.capturing .premio-producto .texto-premio { font-size: 14px; }

/* "Pagado + promo" (Tacos): igual que pagado, con marca verde */
.numero.promo { background: rgba(62, 207, 142, .12); border-color: rgba(62, 207, 142, .45); color: #7ee2b4; }
.numero.promo > span:last-child { color: #d4f5e6; }
.numero.promo > span:first-child { font-size: 12px; }
@media (min-width: 560px) { .numero.promo > span:first-child { font-size: 17px; } }
