:root {
  --pri: #e11d48; --pri-2: #be123c; --sec: #0f172a; --acc: #facc15;
  --fondo: #f5f6fa; --blanco: #fff; --borde: #e5e7ef; --texto: #0f172a; --texto-2: #52607a; --texto-3: #98a2b8;
  --verde: #16a34a; --rojo: #dc2626; --ambar: #f59e0b;
  --radio: 16px; --sombra: 0 2px 6px rgba(15,23,42,.05), 0 10px 30px rgba(15,23,42,.08);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto); font-size: 16px; line-height: 1.5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--pri); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
.contenedor { width: min(1180px, 100% - 32px); margin: 0 auto; }
.oculto { display: none !important; }

/* ---------- header ---------- */
.cabecera { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--sec) 92%, transparent); backdrop-filter: blur(10px); color: #fff; }
.cabecera .contenedor { display: flex; align-items: center; gap: 14px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; min-width: 0; }
.logo img, .logo .letra { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.logo .letra { background: var(--pri); display: grid; place-items: center; }
.logo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { color: #e2e8f0; text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav .btn-wa { background: #22c55e; color: #fff; }
.nav .btn-wa:hover { background: #16a34a; }
@media (max-width: 720px) { .nav a.opt { display: none; } .nav a { padding: 8px 10px; font-size: 14px; } }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 12px; padding: 12px 20px; font-weight: 700; cursor: pointer; text-decoration: none; background: #fff; color: var(--texto); border: 1px solid var(--borde); min-height: 46px; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-pri { background: var(--pri); color: #fff; border-color: var(--pri); box-shadow: 0 6px 18px color-mix(in srgb, var(--pri) 35%, transparent); }
.btn-pri:hover { background: var(--pri-2); }
.btn-acc { background: var(--acc); color: #111; border-color: var(--acc); }
.btn-verde { background: #22c55e; color: #fff; border-color: #22c55e; }
.btn-bloque { width: 100%; }
.btn-chico { padding: 6px 12px; min-height: 34px; font-size: 14px; border-radius: 9px; }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--pri) 55%, transparent), transparent 60%), var(--sec); overflow: hidden; }
.hero.con-imagen { background-size: cover; background-position: center; }
.hero.con-imagen::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--sec) 92%, transparent), color-mix(in srgb, var(--sec) 55%, transparent)); }
.hero .contenedor { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 56px 0 64px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--acc); }
.hero p { color: #cbd5e1; font-size: 18px; margin: 14px 0 26px; max-width: 520px; }
.hero .chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero .chips span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 6px 12px; border-radius: 99px; font-size: 14px; }
.destacada { background: #fff; color: var(--texto); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.35); text-decoration: none; display: block; transform: rotate(1deg); transition: transform .2s; }
.destacada:hover { transform: rotate(0) translateY(-4px); }
.destacada .foto { aspect-ratio: 16/10; background: #ddd center/cover; position: relative; }
.destacada .foto .etq { position: absolute; top: 14px; left: 14px; background: var(--acc); color: #111; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 99px; }
.destacada .cuerpo { padding: 18px 20px 20px; }
.destacada h3 { font-size: 22px; }
@media (max-width: 860px) { .hero .contenedor { grid-template-columns: 1fr; padding: 36px 0 44px; gap: 28px; } .destacada { transform: none; } }

/* ---------- secciones ---------- */
.seccion { padding: 56px 0; }
.seccion-cab { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.seccion-cab h2 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; }
.seccion-cab p { margin: 6px 0 0; color: var(--texto-2); }

.rejilla-rifas { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { background: #fff; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; border: 1px solid var(--borde); }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,23,42,.14); }
.card .foto { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--sec), var(--pri)) center/cover; position: relative; }
.card .foto .estado { position: absolute; top: 12px; left: 12px; }
.card .foto .precio { position: absolute; bottom: 12px; right: 12px; background: #fff; color: var(--texto); font-weight: 800; padding: 6px 12px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.card .cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 19px; }
.card .meta { color: var(--texto-2); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.card .btn { margin-top: auto; }

.etiqueta { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }
.et-activa { background: #22c55e; color: #fff; } .et-pausada { background: var(--ambar); color: #fff; }
.et-cerrada { background: #2563eb; color: #fff; } .et-finalizada { background: #7c3aed; color: #fff; }

.progreso { display: flex; flex-direction: column; gap: 5px; }
.progreso .barra { height: 10px; background: #edf0f5; border-radius: 99px; overflow: hidden; }
.progreso .barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri), var(--acc)); border-radius: 99px; transition: width .8s; }
.progreso small { color: var(--texto-2); font-size: 13px; display: flex; justify-content: space-between; }

.cuenta { display: flex; gap: 8px; }
.cuenta div { background: var(--sec); color: #fff; border-radius: 10px; padding: 6px 0; min-width: 54px; text-align: center; }
.cuenta b { display: block; font-size: 20px; line-height: 1.1; }
.cuenta span { font-size: 11px; color: #cbd5e1; text-transform: uppercase; }
.cuenta.chica div { min-width: 44px; padding: 4px 0; } .cuenta.chica b { font-size: 16px; }

.pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: paso; }
.paso { background: #fff; border-radius: var(--radio); padding: 22px; border: 1px solid var(--borde); position: relative; }
.paso::before { counter-increment: paso; content: counter(paso); width: 38px; height: 38px; border-radius: 12px; background: var(--pri); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }

/* ---------- detalle de rifa ---------- */
.detalle { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "foto info" "premios info"; grid-template-rows: auto 1fr; gap: 22px 28px; align-items: start; padding: 28px 0 60px; }
.detalle > * { min-width: 0; }
.d-foto { grid-area: foto; } .d-info { grid-area: info; } .d-premios { grid-area: premios; }
@media (max-width: 920px) { .detalle { grid-template-columns: minmax(0, 1fr); grid-template-areas: "foto" "info" "premios"; grid-template-rows: auto; gap: 18px; padding-top: 16px; } }
.galeria-principal { border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--sec), var(--pri)) center/cover; position: relative; box-shadow: var(--sombra); }
.galeria-principal img { width: 100%; height: 100%; object-fit: cover; }
.galeria-principal .flecha { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); cursor: pointer; font-size: 20px; }
.galeria-principal .izq { left: 12px; } .galeria-principal .der { right: 12px; }
.miniaturas { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.miniaturas img { width: 76px; height: 58px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: .6; border: 2px solid transparent; flex-shrink: 0; }
.miniaturas img.activa { opacity: 1; border-color: var(--pri); }
.caja { background: #fff; border-radius: var(--radio); padding: 20px; border: 1px solid var(--borde); box-shadow: var(--sombra); }
.caja + .caja { margin-top: 18px; }
.caja h2 { font-size: 20px; margin-bottom: 12px; }
.titulo-rifa { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin: 8px 0 10px; }
.precio-grande { font-size: 30px; font-weight: 800; color: var(--pri); }
.precio-grande small { font-size: 15px; color: var(--texto-2); font-weight: 600; margin-left: 6px; }
.premios { display: grid; gap: 10px; }
.premio { display: flex; gap: 12px; align-items: center; border: 1px solid var(--borde); border-radius: 12px; padding: 10px; }
.premio img, .premio .ph { width: 72px; height: 56px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: #eef1f6; display: grid; place-items: center; font-size: 26px; }
.premio .pos { font-size: 12px; font-weight: 800; color: var(--pri); text-transform: uppercase; }
.premio .gan { margin-top: 3px; font-size: 14px; color: var(--verde); font-weight: 700; }
.descripcion { white-space: pre-line; color: var(--texto-2); }

/* compra */
.pestanas { display: flex; background: #eef1f6; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.pestanas button { flex: 1; border: none; background: transparent; border-radius: 9px; padding: 10px; font-weight: 700; cursor: pointer; color: var(--texto-2); }
.pestanas button.activo { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.combos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.combo { border: 2px solid var(--borde); border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer; background: #fff; position: relative; }
.combo b { display: block; font-size: 22px; } .combo span { font-size: 13px; color: var(--texto-2); }
.combo.sel { border-color: var(--pri); background: color-mix(in srgb, var(--pri) 7%, #fff); }
.combo .tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--acc); color: #111; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.contador { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 6px 0 14px; }
.contador button { width: 50px; height: 50px; border-radius: 14px; border: 1px solid var(--borde); background: #fff; font-size: 24px; font-weight: 700; cursor: pointer; }
.contador input { width: 110px; text-align: center; font-size: 28px; font-weight: 800; border: 2px solid var(--borde); border-radius: 14px; padding: 6px; }
.bloques { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.bloques button { border: 1px solid var(--borde); background: #fff; border-radius: 9px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; }
.bloques button.activo { background: var(--sec); color: #fff; border-color: var(--sec); }
.grilla { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.grilla.d4, .grilla.d5 { grid-template-columns: repeat(8, 1fr); }
@media (max-width: 480px) { .grilla { grid-template-columns: repeat(7, 1fr); } .grilla.d4, .grilla.d5 { grid-template-columns: repeat(5, 1fr); } }
.n { border: 1px solid var(--borde); border-radius: 9px; background: #fff; padding: 8px 0; text-align: center; font-weight: 700; font-family: ui-monospace, Consolas, monospace; font-size: 14px; cursor: pointer; user-select: none; }
.n:hover { border-color: var(--pri); }
.n.ocupado { cursor: not-allowed; color: #fff; }
.n.ocupado.vendido { background: #16a34a; border-color: #16a34a; }
.n.ocupado.apartado { background: #f59e0b; border-color: #f59e0b; }
.n.sel { background: var(--pri); color: #fff; border-color: var(--pri); }
.buscar-num { display: flex; gap: 8px; margin-bottom: 10px; }
.buscar-num input { flex: 1; }
.leyenda { display: flex; gap: 14px; font-size: 13px; color: var(--texto-2); margin: 8px 0; flex-wrap: wrap; }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--borde); }
.resumen { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--borde); margin: 16px -20px -20px; padding: 14px 20px; border-radius: 0 0 var(--radio) var(--radio); display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.resumen .total b { font-size: 24px; display: block; line-height: 1.1; }
.resumen .total span { font-size: 13px; color: var(--texto-2); }
.sel-lista { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--texto-2); max-height: 60px; overflow: auto; }

/* formularios */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo span { font-weight: 700; font-size: 14px; }
.campo small { color: var(--texto-3); font-size: 13px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; border: 1.5px solid var(--borde); border-radius: 12px; padding: 12px 14px; background: #fff; outline: none; min-height: 48px; font-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pri) 15%, transparent); }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .fila2 { grid-template-columns: 1fr; } }

/* pago */
.pago-cab { text-align: center; padding: 8px 0 16px; }
.reloj { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--pri); }
.reloj.vencido { color: var(--rojo); }
.metodos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.metodo { border: 2px solid var(--borde); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; display: flex; align-items: center; gap: 10px; font-weight: 700; text-align: left; }
.metodo img { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; }
.metodo.sel { border-color: var(--pri); background: color-mix(in srgb, var(--pri) 7%, #fff); }
.datos-pago { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.datos-pago .l { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef1f6; align-items: center; }
.datos-pago .l:last-child { border-bottom: none; }
.datos-pago .l span { color: var(--texto-2); font-size: 14px; }
.datos-pago .l b { text-align: right; word-break: break-all; }
.copiar { border: none; background: #e2e8f0; border-radius: 7px; padding: 3px 8px; font-size: 12px; font-weight: 700; cursor: pointer; margin-left: 6px; }
.monto-pagar { text-align: center; background: var(--sec); color: #fff; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.monto-pagar b { font-size: 30px; display: block; }
.monto-pagar span { color: #cbd5e1; font-size: 14px; }
.archivo { border: 2px dashed var(--borde); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; color: var(--texto-2); }
.archivo.lleno { border-color: var(--verde); color: var(--verde); font-weight: 700; }

/* ticket */
.ticket { background: linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--pri) 70%, var(--sec))); color: #fff; border-radius: 20px; padding: 22px; position: relative; overflow: hidden; }
.ticket::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ticket .nums { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ticket .nums span { background: #fff; color: var(--sec); font-weight: 800; font-family: ui-monospace, Consolas, monospace; padding: 6px 12px; border-radius: 10px; font-size: 18px; }
.estado-orden { display: inline-block; font-weight: 800; padding: 6px 14px; border-radius: 99px; font-size: 14px; }
.eo-aprobada { background: #dcfce7; color: #15803d; } .eo-por_verificar { background: #fef3c7; color: #b45309; }
.eo-reservada { background: #e0e7ff; color: #3730a3; } .eo-rechazada, .eo-cancelada, .eo-expirada { background: #fee2e2; color: #b91c1c; }

.aviso { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.error-caja { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.ok-caja { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.vacio { text-align: center; color: var(--texto-2); padding: 40px 10px; }
.cargando { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 22px; height: 22px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: gira .7s linear infinite; }
.cargando .spinner { width: 40px; height: 40px; color: var(--pri); }
@keyframes gira { to { transform: rotate(360deg); } }

.ganadores { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ganador { background: #fff; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); }
.ganador .foto { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--sec), var(--pri)) center/cover; }
.ganador .cuerpo { padding: 14px 16px; }
.ganador .num { font-family: ui-monospace, Consolas, monospace; font-weight: 800; background: var(--acc); color: #111; padding: 2px 8px; border-radius: 7px; }

.pie { background: var(--sec); color: #94a3b8; padding: 40px 0 28px; margin-top: 30px; font-size: 14px; }
.pie .contenedor { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 26px; }
.pie h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.pie a { color: #cbd5e1; text-decoration: none; display: block; padding: 3px 0; }
.pie a:hover { color: #fff; }
.pie .legal { grid-column: 1 / -1; border-top: 1px solid #1e293b; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 720px) { .pie .contenedor { grid-template-columns: 1fr; } }

.wa-flotante { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(34,197,94,.45); z-index: 30; text-decoration: none; }
.wa-flotante svg { width: 30px; height: 30px; }

.modal-fondo { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; padding: 22px; }
.modal h3 { margin-bottom: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--sec); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 90; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }
.toast.error { background: var(--rojo); }
.banner-mant { background: var(--ambar); color: #111; text-align: center; padding: 8px 16px; font-weight: 700; }
.migas { font-size: 14px; color: var(--texto-2); padding-top: 18px; }
.migas a { color: var(--texto-2); }
@media (max-width: 480px) { .nav .btn-wa { display: none; } .logo { font-size: 16px; } }

.miles { width: auto !important; min-height: 38px !important; padding: 6px 10px !important; font-size: 14px !important; margin-bottom: 8px; font-family: ui-monospace, Consolas, monospace; font-weight: 700; }

/* ---------- botón de ticket en "Mis tickets" ---------- */
.ticket-btn { display: block; width: 100%; text-align: left; border: none; cursor: pointer; margin-bottom: 12px; font: inherit; color: #fff; }
.ticket-btn:active { transform: scale(.99); }
.ticket-accion { margin-top: 10px; background: rgba(255,255,255,.16); border-radius: 10px; padding: 9px 12px; font-weight: 800; text-align: center; }
.pagina-estrecha { max-width: 720px; padding: 28px 0 60px; }

/* ---------- TELÉFONO: todo más compacto ---------- */
@media (max-width: 600px) {
  :root { font-size: 15px; }
  .contenedor { width: calc(100% - 24px); }
  .cabecera .contenedor { height: 54px; gap: 8px; }
  .logo { font-size: 15px; gap: 8px; }
  .logo img, .logo .letra { width: 32px; height: 32px; border-radius: 8px; }
  .nav a { padding: 6px 8px; font-size: 13px; }

  .btn { padding: 9px 14px; min-height: 42px; border-radius: 10px; font-size: 15px; }
  .btn-chico { padding: 5px 10px; min-height: 32px; font-size: 13px; }

  .hero .contenedor { padding: 22px 0 26px; gap: 18px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 15px; margin: 8px 0 16px; }
  .hero .chips { gap: 6px; margin-top: 14px; }
  .hero .chips span { font-size: 12px; padding: 4px 9px; }
  .destacada { border-radius: 16px; }
  .destacada .cuerpo { padding: 12px 14px 14px; }
  .destacada h3 { font-size: 18px; }

  .seccion { padding: 28px 0; }
  .seccion-cab { margin-bottom: 14px; }
  .seccion-cab h2 { font-size: 22px; }
  .seccion-cab p { font-size: 14px; }
  .rejilla-rifas { gap: 14px; }
  .card .foto { aspect-ratio: 16/10; }
  .card .cuerpo { padding: 12px 14px 14px; gap: 8px; }
  .card h3 { font-size: 17px; }
  .card .meta { font-size: 13px; gap: 8px; }
  .pasos { gap: 10px; }
  .paso { padding: 14px; font-size: 14px; }
  .paso::before { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 8px; }

  .cuenta { gap: 5px; }
  .cuenta div, .cuenta.chica div { min-width: 40px; padding: 3px 0; border-radius: 8px; }
  .cuenta b, .cuenta.chica b { font-size: 15px; }
  .cuenta span { font-size: 9px; }
  .progreso .barra { height: 8px; }
  .progreso small { font-size: 12px; }

  .migas { padding-top: 10px; font-size: 13px; }
  .detalle { gap: 12px; padding: 10px 0 40px; }
  .galeria-principal { border-radius: 14px; aspect-ratio: 16/11; }
  .miniaturas img { width: 58px; height: 44px; }
  .caja { padding: 14px; border-radius: 14px; }
  .caja + .caja { margin-top: 12px; }
  .caja h2 { font-size: 17px; margin-bottom: 10px; }
  .titulo-rifa { font-size: 22px; margin: 6px 0; }
  .precio-grande { font-size: 24px; }
  .precio-grande small { font-size: 13px; }
  .premio { padding: 8px; gap: 10px; }
  .premio img, .premio .ph { width: 56px; height: 44px; }
  .descripcion { font-size: 14px; }

  .pestanas { margin-bottom: 12px; }
  .pestanas button { padding: 8px 6px; font-size: 13px; }
  .buscar-num input { min-height: 40px; padding: 8px 12px; font-size: 15px; }
  .bloques button { padding: 5px 8px; font-size: 12px; }
  .grilla { gap: 4px; }
  .n { padding: 7px 0; font-size: 13px; border-radius: 7px; }
  .combos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .combo { padding: 9px 4px; }
  .combo b { font-size: 18px; }
  .combo span { font-size: 11px; }
  .contador { gap: 12px; margin: 4px 0 10px; }
  .contador button { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
  .contador input { width: 86px; font-size: 22px; padding: 4px; }
  .resumen { margin: 12px -14px -14px; padding: 10px 14px; gap: 10px; flex-wrap: nowrap; }
  .resumen .total b { font-size: 20px; }
  .resumen .total span { font-size: 12px; }
  .resumen .btn { flex-shrink: 0; }
  .sel-lista { font-size: 12px; max-height: 34px; }

  input:not([type=checkbox]):not([type=radio]), select, textarea { padding: 10px 12px; min-height: 44px; border-radius: 10px; }
  .campo { margin-bottom: 10px; gap: 4px; }
  .campo span { font-size: 13px; }
  .modal { padding: 16px; border-radius: 16px; }

  .pagina-estrecha, .contenedor[style*="max-width:640px"] { padding: 14px 0 40px !important; }
  .pago-cab { padding: 0 0 10px; }
  .reloj { font-size: 28px; }
  .ticket { padding: 14px; border-radius: 16px; }
  .ticket h2 { font-size: 20px !important; }
  .ticket .nums { gap: 6px; margin: 10px 0; }
  .ticket .nums span { font-size: 15px; padding: 4px 9px; border-radius: 8px; }
  .estado-orden { font-size: 12px; padding: 4px 10px; }
  .metodos { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
  .metodo { padding: 10px; font-size: 14px; }
  .monto-pagar { padding: 10px; margin-bottom: 10px; border-radius: 12px; }
  .monto-pagar b { font-size: 24px; }
  .datos-pago { padding: 10px 12px; }
  .datos-pago .l { padding: 5px 0; font-size: 14px; }
  .archivo { padding: 12px; font-size: 14px; }

  .pie { padding: 26px 0 20px; font-size: 13px; }
  .pie .contenedor { gap: 16px; }
  .wa-flotante { width: 50px; height: 50px; right: 12px; bottom: 12px; }
  .wa-flotante svg { width: 26px; height: 26px; }
}
.solo-movil { display: none; }
@media (max-width: 600px) {
  .solo-pc { display: none; }
  .solo-movil { display: inline; }
  .card .foto { aspect-ratio: 16/9; }
  body[data-pag="rifa"] .wa-flotante, body[data-pag="orden"] .wa-flotante { display: none; }
}
.nav .btn-instalar { background: var(--acc); color: #111; }
.nav .btn-instalar:hover { background: var(--acc); color: #111; filter: brightness(.95); }
.modal ol { padding-left: 20px; line-height: 1.7; }
.btn-copiar-todo { background: var(--sec); color: #fff; border-color: var(--sec); margin-bottom: 8px; min-height: 44px; }
.copiar-claro { background: rgba(255,255,255,.18); color: #fff; margin: 8px 0 0; padding: 5px 12px; font-size: 13px; }
.hero-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-botones .btn { padding: 8px 14px; min-height: 38px; font-size: 14px; border-radius: 10px; }
@media (max-width: 600px) {
  .hero-botones .btn { padding: 7px 12px; min-height: 36px; font-size: 13px; }
  .hero p { margin-bottom: 12px; }
}

[hidden] { display: none !important; }
.aviso-push { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, #fff); }
/* ---------- cabecera con el logo al centro ---------- */
.cab-grid { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px !important; }
.nav-izq { margin: 0; justify-self: start; }
.nav-der { margin: 0; justify-self: end; }
.cabecera .logo { justify-self: center; flex-direction: row; gap: 10px; }
.cabecera .logo img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.cabecera .logo span { font-size: 19px; }
@media (max-width: 600px) {
  .cab-grid { height: 60px !important; grid-template-columns: 1fr auto 1fr; }
  .cabecera .logo { flex-direction: column; gap: 0; }
  .cabecera .logo img { width: 34px; height: 34px; border-radius: 9px; }
  .cabecera .logo span { font-size: 11px; font-weight: 800; letter-spacing: .04em; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .nav-izq .opt { display: none; }
}
/* ---------- anuncio para descargar la app ---------- */
.banner-app { background: linear-gradient(90deg, var(--pri), color-mix(in srgb, var(--pri) 60%, #7a0f2e)); color: #fff; }
.banner-app .contenedor { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.banner-app img { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.25); flex-shrink: 0; }
.banner-app .ba-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.banner-app .ba-txt b { font-size: 16px; }
.banner-app .ba-txt span { font-size: 13px; opacity: .9; }
.banner-app .ba-x { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; opacity: .8; padding: 4px; }
@media (max-width: 600px) { .banner-app .ba-txt b { font-size: 15px; } .banner-app .ba-txt span { font-size: 12px; } .banner-app img { width: 40px; height: 40px; } }
/* ---------- logo en círculo, centrado debajo de la barra ---------- */
.cab-grid { height: 56px !important; }
.logo-circulo { position: relative; z-index: 41; display: flex; flex-direction: column; align-items: center; text-decoration: none; margin: -26px auto 6px; width: max-content; }
.logo-circulo img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #fff; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(15,23,42,.25); }
.logo-circulo span { margin-top: 6px; font-weight: 800; font-size: 17px; color: var(--texto); letter-spacing: .01em; }
body { background: var(--fondo); }
@media (max-width: 600px) {
  .cab-grid { height: 50px !important; }
  .logo-circulo { margin-top: -22px; }
  .logo-circulo img { width: 72px; height: 72px; }
  .logo-circulo span { font-size: 15px; }
}
/* ---------- permiso de notificaciones obligatorio en la app ---------- */
.muro-push { position: fixed; inset: 0; z-index: 200; background: var(--sec); display: grid; place-items: center; padding: 20px; }
.muro-caja { background: #fff; border-radius: 20px; padding: 26px 22px; max-width: 420px; width: 100%; text-align: center; }
.muro-caja img { width: 84px; height: 84px; border-radius: 50%; margin: -64px auto 10px; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); background: #fff; object-fit: cover; }
.muro-caja h2 { font-size: 21px; margin-bottom: 8px; }
.muro-caja p { color: var(--texto-2); font-size: 15px; margin: 0 0 16px; }
.muro-caja .aviso { font-size: 13px; line-height: 1.6; }
/* ---------- logo fijo: cuelga de la barra y no se mueve al deslizar ---------- */
.cabecera { overflow: visible; }
.logo-circulo { position: absolute; left: 50%; top: 100%; transform: translate(-50%, -50%); margin: 0; z-index: 42; }
.logo-circulo span { display: none; }
.espacio-logo { height: 46px; }
@media (max-width: 600px) { .espacio-logo { height: 40px; } .logo-circulo img { width: 70px; height: 70px; } }

/* ---------- botón volver ---------- */
.btn-volver { margin-top: 10px; border: 1px solid var(--borde); background: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--texto); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.btn-volver:hover { border-color: var(--pri); color: var(--pri); }

/* ---------- tarjetas de rifas más compactas ---------- */
.rejilla-rifas { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card .foto { aspect-ratio: 16/10; }
.card .cuerpo { padding: 12px 14px 14px; gap: 7px; }
.card h3 { font-size: 16px; }
.card .meta { font-size: 12.5px; gap: 8px; }
.card .btn { min-height: 38px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.card .foto .precio { font-size: 13px; padding: 4px 9px; bottom: 8px; right: 8px; }
.card .cuenta div { min-width: 38px; padding: 2px 0; } .card .cuenta b { font-size: 14px; } .card .cuenta span { font-size: 8.5px; }
@media (max-width: 600px) {
  .rejilla-rifas { grid-template-columns: 1fr; gap: 10px; }
  /* en el teléfono: foto a la izquierda y datos a la derecha */
  .card { flex-direction: row; border-radius: 14px; }
  .card .foto { aspect-ratio: auto; width: 118px; min-height: 100%; flex-shrink: 0; }
  .card .foto .estado { top: 6px; left: 6px; font-size: 9px; padding: 2px 6px; }
  .card .foto .precio { font-size: 12px; padding: 3px 7px; bottom: 6px; right: 6px; left: 6px; text-align: center; }
  .card .foto .precio small { display: none; }
  .card .cuerpo { padding: 10px 12px; gap: 5px; min-width: 0; }
  .card h3 { font-size: 15px; line-height: 1.2; }
  .card .meta { font-size: 12px; }
  .card .progreso .barra { height: 6px; }
  .card .progreso small { font-size: 11px; }
  .card .cuenta { display: none; }
  .card .btn { min-height: 34px; font-size: 13px; padding: 5px 10px; }
  .destacada .foto { aspect-ratio: 16/9; }
}

.btn-vivo { background: #dc2626; color: #fff; border-color: #dc2626; margin-top: 12px; animation: vivo 1.4s ease-in-out infinite; }
.en-vivo { align-self: flex-start; background: #dc2626; color: #fff; font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 99px; animation: vivo 1.4s ease-in-out infinite; }
@keyframes vivo { 50% { box-shadow: 0 0 0 6px rgba(220,38,38,.18); } }

/* ---------- Pestañas de la portada: En curso · Cerradas · Ganadores ---------- */
.pestanas-caja { margin-top: 22px; }
.pestanas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 5px; box-shadow: 0 2px 10px rgba(0,0,0,.04); max-width: 560px; margin: 0 auto; }
.pestanas a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--texto-2); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.pestanas a:hover { background: rgba(0,0,0,.04); }
.pestanas a.activa { background: var(--pri); color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.pestanas i { font-style: normal; }
.pestanas em { font-style: normal; font-size: 11.5px; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: rgba(0,0,0,.08); text-align: center; }
.pestanas a.activa em { background: rgba(255,255,255,.25); }
.seccion-lista { padding-top: 22px; }
.card-gan .lista-gan { display: grid; gap: 6px; margin-top: 4px; }
.card-gan .fila-gan { background: #fff8e1; border: 1px solid #f3e0a0; border-radius: 9px; padding: 6px 9px; font-size: 14px; }
.card-gan .fila-gan small { display: block; color: var(--texto-2); font-size: 12px; }
.card-gan .num { font-family: ui-monospace, Consolas, monospace; font-weight: 800; background: var(--acc); color: #111; padding: 1px 7px; border-radius: 6px; margin-right: 4px; }
@media (max-width: 640px) {
  .pestanas-caja { margin-top: 14px; }
  .pestanas a { font-size: 13px; padding: 9px 3px; gap: 4px; }
  .pestanas i { display: none; }
  .pestanas em { font-size: 11px; min-width: 18px; padding: 1px 5px; }
  .seccion-lista { padding-top: 14px; }
  .card-gan .fila-gan { font-size: 13px; padding: 5px 8px; }
}
