/* Home em estilo "rifa": papel claro, cartões, canhotos de bilhete.
   Só vale para <body class="rifa">; o resto do site continua no tema escuro. */

body.rifa {
  --ink: #0b1220;
  --paper: #efe9db;
  --card: #fffdf8;
  --rline: #d8cfba;
  --navy: #070d1f;
  --green: #15803d;
  --green-d: #0f5f2c;
  --gold: #ffb020;
  --rred: #c81e2d;
  --text: var(--ink);
  --muted: #59627a;
  color: var(--ink);
  background: var(--paper) radial-gradient(rgba(11, 18, 32, .07) 1px, transparent 1.4px) 0 0 / 18px 18px;
}
body.rifa::before { display: none; }

/* partes escuras mantêm as cores claras */
.rifa .site-header, .rifa .site-footer, .rifa .cookie-bar, .rifa .toast { --text: #f4f7fd; --muted: #9eabc7; }
.rifa .site-header, .rifa .site-header.solid { background: var(--navy); border-bottom: 4px solid var(--gold); backdrop-filter: none; }
.rifa .site-footer { background: var(--navy); border-top: 4px solid var(--gold); margin-top: 56px; }
.rifa .cookie-bar { background: var(--navy); color: #e6ecfa; border: 2px solid var(--gold); backdrop-filter: none; }
.rifa .cookie-bar a { color: var(--gold); }
.rifa .scroll-progress { background: var(--gold); }

/* faixa de destaques */
.rf-strip { background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700; }
.rf-strip .wrap { display: flex; gap: 6px 22px; justify-content: center; flex-wrap: wrap; padding: 9px 0; }
.rf-strip span { display: inline-flex; align-items: center; gap: 7px; }
.rf-strip svg { width: 15px; height: 15px; color: var(--gold); flex: none; }

/* cartão base */
.rf-card { background: var(--card); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); padding: clamp(16px, 3vw, 28px); position: relative; }
.rifa main a { color: #0b4fc4; }
.rf-sec { margin-top: clamp(22px, 3.5vw, 34px); }
.rf-h { font-size: clamp(1.4rem, 3.4vw, 1.9rem); text-transform: uppercase; font-weight: 900; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.rf-h::before { content: ""; width: 10px; height: 1.1em; background: var(--gold); border: 2px solid var(--ink); border-radius: 3px; flex: none; }
.rf-sub2 { color: var(--muted); font-size: .95rem; margin-top: 8px; max-width: 62ch; }
.rf-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---------- topo ---------- */
.rf-top { display: grid; gap: 24px; margin-top: clamp(18px, 3vw, 30px); align-items: start; }
@media (min-width: 980px) { .rf-top { grid-template-columns: minmax(0, 1fr) 410px; } .rf-buy { position: sticky; top: 92px; } }

.rf-camp { display: grid; gap: 22px; }
@media (min-width: 700px) { .rf-camp { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; } }

.rf-flyer { position: relative; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--navy); align-self: start; width: min(100%, 340px); margin-inline: auto; }
.rf-flyer img { width: 100%; height: auto; }
.rf-ribbon { position: absolute; top: 12px; left: 12px; background: var(--green); color: #fff; font-weight: 800; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 11px; border-radius: 8px; border: 2px solid var(--ink); max-width: calc(100% - 24px); }
.rf-ribbon.closed { background: var(--rred); }
.rf-note { position: absolute; right: 8px; bottom: 8px; background: rgba(11, 18, 32, .78); color: #fff; font-size: .68rem; padding: 3px 8px; border-radius: 6px; }

.rf-code { display: inline-block; background: var(--ink); color: var(--gold); font-weight: 800; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; }
.rf-info h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 900; text-transform: uppercase; line-height: .95; margin: 12px 0 10px; }
.rf-sub { display: inline-block; background: var(--gold); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 12px; font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.25rem); transform: rotate(-1deg); }
.rf-sub:empty { display: none; }

.rf-prog { margin: 22px 0 18px; }
.rf-prog-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rf-prog-top b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 900; line-height: 1; }
.rf-prog-top span { font-weight: 700; color: var(--muted); }
.rf-prog-top em { margin-left: auto; font-style: normal; font-weight: 800; font-size: .92rem; }
.rf-track { height: 22px; margin-top: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.rf-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: repeating-linear-gradient(-45deg, var(--green) 0 10px, #1ea34d 10px 20px); transition: width 1.2s cubic-bezier(.16, 1, .3, 1); }

.rf-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.rf-facts div { background: #f6f1e4; border: 1.5px dashed var(--rline); border-radius: 12px; padding: 10px 12px; }
.rf-facts dt { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rf-facts dd { margin: 3px 0 0; font-weight: 800; font-size: .98rem; }
.rf-desc { color: #2b3447; font-size: .96rem; line-height: 1.6; }

/* ---------- cartão de compra ---------- */
.rf-buy { background: #fff; padding: clamp(16px, 3vw, 24px); }
.rf-buy::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, var(--ink) 14px 28px); border-radius: 16px 16px 0 0; }
.rf-buy h2 { font-size: 1.5rem; text-transform: uppercase; font-weight: 900; margin-top: 10px; }
.rf-hint { color: var(--muted); font-size: .88rem; margin: 6px 0 14px; }

.rf-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rp { position: relative; display: grid; justify-items: center; gap: 1px; padding: 18px 4px 10px; background: #fff; border: 2px solid var(--rline); border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.rp:hover { border-color: var(--ink); transform: translateY(-2px); }
.rp[aria-pressed="true"] { border-color: var(--green); background: #e9f7ee; box-shadow: 0 0 0 2px var(--green) inset; }
.rp-q { font-family: var(--font-display); font-weight: 900; font-size: 1.45rem; line-height: 1; }
.rp-l { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rp-p { font-weight: 800; font-size: .92rem; margin-top: 5px; }
.rp-u { font-size: .68rem; color: var(--muted); }
.rp .flag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--gold); font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.rp .flag.off { background: var(--gold); color: var(--ink); border: 1.5px solid var(--ink); padding: 1px 7px; }

.rf-qty { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; margin-top: 16px; }
.rf-qbtn { min-height: 54px; border: 2px solid var(--ink); border-radius: 12px; background: var(--gold); font-size: 1.6rem; font-weight: 900; cursor: pointer; line-height: 1; }
.rf-qbtn:active { transform: translateY(2px); }
.rf-qty input { min-height: 54px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; width: 100%; min-width: 0; }
.rf-qty input:focus-visible, .rf-qbtn:focus-visible, .rp:focus-visible { outline: 3px solid #0b4fc4; outline-offset: 2px; }

.rf-next { margin-top: 12px; font-size: .86rem; color: #2b3447; display: grid; gap: 6px; min-height: 3.2em; }
.rf-next b { color: var(--green); }
.rf-bar { height: 8px; border-radius: 8px; background: #ece6d6; overflow: hidden; }
.rf-bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 8px; transition: width .5s; }

.rf-total { margin-top: 14px; padding: 14px 0; border-top: 2px dashed var(--ink); border-bottom: 2px dashed var(--ink); display: flex; justify-content: space-between; align-items: end; gap: 10px; flex-wrap: wrap; }
.rf-total span { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rf-total b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; line-height: 1.05; }
.rf-total small { color: var(--muted); font-size: .8rem; }

/* botão principal verde, em relevo */
.rifa main .btn-primary, .rifa dialog .btn-primary, .rifa .sticky-buy .btn-primary {
  background: var(--green); color: #fff; border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); text-transform: uppercase; letter-spacing: .02em; font-weight: 900;
}
.rifa main .btn-primary:hover, .rifa dialog .btn-primary:hover, .rifa .sticky-buy .btn-primary:hover { background: #17913f; filter: none; transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.rifa main .btn-primary:active, .rifa dialog .btn-primary:active, .rifa .sticky-buy .btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.rifa .btn-primary:disabled { background: #8d93a3; box-shadow: 0 4px 0 #5b6173; cursor: not-allowed; }
.rf-go { width: 100%; margin-top: 16px; }

.rf-trust { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; font-size: .84rem; color: #2b3447; }
.rf-trust li { display: flex; gap: 8px; align-items: center; }
.rf-trust svg { width: 16px; height: 16px; color: var(--green); flex: none; }
.rf-mine { margin-top: 12px; font-size: .86rem; text-align: center; }

/* ---------- premiação ---------- */
.rf-prem { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
@media (min-width: 800px) { .rf-prem { grid-template-columns: repeat(3, 1fr); } }
.rf-prem li { display: flex; gap: 14px; align-items: center; background: #f6f1e4; border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; }
.rf-prem .n { flex: none; width: 52px; height: 52px; display: grid; place-items: center; background: var(--gold); border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.rf-prem b { display: block; font-size: 1.02rem; text-transform: uppercase; }
.rf-prem span:not(.n) { color: #2b3447; font-size: .9rem; line-height: 1.35; display: block; margin-top: 2px; }

/* ---------- bilhetes premiados ---------- */
.rf-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.rf-seg button { border: 0; background: transparent; padding: 0 14px; min-height: 42px; font-weight: 800; font-size: .86rem; cursor: pointer; }
.rf-seg button + button { border-left: 2px solid var(--ink); }
.rf-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rf-tix { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rf-tk { display: grid; grid-template-columns: 104px 1fr; background: #fff; border: 2px solid var(--ink); border-radius: 12px; position: relative; min-height: 76px; }
.rf-tk::before, .rf-tk::after { content: ""; position: absolute; left: 104px; width: 16px; height: 16px; background: var(--card); border: 2px solid var(--ink); border-radius: 50%; transform: translateX(-50%); }
.rf-tk::before { top: -10px; clip-path: inset(50% 0 0 0); }
.rf-tk::after { bottom: -10px; clip-path: inset(0 0 50% 0); }
.rf-tk .n { display: grid; place-content: center; text-align: center; border-right: 2px dashed var(--ink); background: #f6f1e4; border-radius: 10px 0 0 10px; padding: 6px; }
.rf-tk .n small { font-size: .62rem; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.rf-tk .n b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.rf-tk .v { display: grid; align-content: center; padding: 8px 14px; gap: 2px; }
.rf-tk .v b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; }
.rf-tk .v small { font-size: .78rem; font-weight: 700; color: var(--green); }
.rf-tk.won { background: #ece8dc; }
.rf-tk.won .v b { text-decoration: line-through; text-decoration-thickness: 2px; color: #6a7186; }
.rf-tk.won .v small { color: var(--rred); }
.rf-more { display: block; margin: 16px auto 0; border: 2px solid var(--ink); background: #fff; border-radius: 12px; padding: 0 22px; min-height: 46px; font-weight: 800; cursor: pointer; }
.rf-more:hover { background: var(--gold); }
.rf-empty { text-align: center; padding: 28px 12px; color: var(--muted); font-weight: 700; border: 2px dashed var(--rline); border-radius: 12px; grid-column: 1 / -1; }

/* ---------- ranking ---------- */
.rf-rank { display: grid; gap: 8px; }
.rk { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border: 2px solid var(--rline); border-radius: 12px; }
.rk .pos { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; text-align: center; }
.rk .who { display: grid; min-width: 0; }
.rk .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk .who small { color: var(--muted); font-size: .8rem; }
.rk .pz { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.rk .pz.dim { color: #a7a08c; }
.rk[class*="top"] { border-color: var(--ink); padding-block: 14px; }
.rk[class*="top"] .pos { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); }
.rk.top1 { background: #fff3cf; }
.rk.top1 .pos { background: var(--gold); }
.rk.top2 { background: #eef0f4; }
.rk.top2 .pos { background: #cdd3de; }
.rk.top3 { background: #fbe9dc; }
.rk.top3 .pos { background: #e0a070; }

/* ---------- passos e dúvidas ---------- */
.rf-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
@media (min-width: 800px) { .rf-steps { grid-template-columns: repeat(3, 1fr); } }
.rf-steps li { display: flex; gap: 14px; align-items: flex-start; }
.rf-steps .n { flex: none; width: 38px; height: 38px; display: grid; place-items: center; background: var(--ink); color: var(--gold); border-radius: 10px; font-family: var(--font-display); font-weight: 900; }
.rf-steps b { text-transform: uppercase; font-size: .98rem; }
.rf-steps p { color: #2b3447; font-size: .92rem; margin-top: 3px; }
.rf-faq { border-bottom: 2px dashed var(--rline); }
.rf-faq:last-child { border-bottom: 0; }
.rf-faq summary { cursor: pointer; font-weight: 800; padding: 16px 28px 16px 0; list-style: none; position: relative; }
.rf-faq summary::-webkit-details-marker { display: none; }
.rf-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 900; }
.rf-faq[open] summary::after { content: "−"; }
.rf-faq p { padding: 0 0 16px; color: #2b3447; }
.rf-h + .rf-faq, .rf-h + .rf-steps { margin-top: 10px; }

/* ---------- barra de compra no celular ---------- */
.rifa .sticky-buy { background: var(--card); border-top: 3px solid var(--ink); backdrop-filter: none; --text: var(--ink); }
.rifa .sticky-buy .total-label { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rifa .sticky-buy .total-value { font-family: var(--font-display); font-weight: 900; color: var(--ink); }

/* ---------- janela de compra em papel claro ---------- */
.rifa dialog { --text: var(--ink); --muted: #59627a; --surface-3: #f3eddc; --line: #d8cfba; --line-2: #bdb39a; background: var(--card); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.rifa dialog::backdrop { background: rgba(7, 13, 31, .72); }
.rifa dialog a { color: #0b4fc4; }
.rifa dialog .dlg-head h2 { font-weight: 900; }
.rifa dialog .x { background: #fff; border: 2px solid var(--ink); color: var(--ink); }
.rifa dialog .stepper i { background: #ddd5bf; }
.rifa dialog .stepper i.on { background: var(--green); }
.rifa dialog .field input { background: #fff; border: 2px solid var(--ink); color: var(--ink); }
.rifa dialog .field input:focus { border-color: #0b4fc4; box-shadow: 0 0 0 4px rgba(11, 79, 196, .2); }
.rifa dialog .summary { background: #f6f1e4; border: 2px dashed var(--ink); }
.rifa dialog .summary b { color: var(--ink); }
.rifa dialog .pixbox { background: #f6f1e4; border: 2px dashed var(--ink); color: #0b3a8a; }
.rifa dialog .sim-banner { background: #fff0c2; border: 2px solid var(--ink); color: #5a3a00; }
.rifa dialog .numbers span { background: #fff; border: 1.5px solid var(--ink); color: var(--ink); }
.rifa dialog .numbers span.hit { background: #d6f3df; border-color: var(--green); color: var(--green-d); }
.rifa dialog .prize-hit { background: #d6f3df; border: 2px solid var(--green); color: var(--green-d); }
.rifa dialog .ok-msg { color: var(--green); }
.rifa dialog .btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.rifa dialog .hint { color: #59627a; }
.rifa dialog .err { color: var(--rred); }
.rifa dialog .check { color: #2b3447; }
.rifa dialog .field label { color: #2b3447; }

/* ---------- página de manutenção ---------- */
.rf-maint { min-height: 100vh; display: grid; place-items: center; padding: 24px 0; }
.rf-maint .rf-card { max-width: 520px; text-align: center; }
.rf-maint h1 { font-size: 2.4rem; text-transform: uppercase; margin: 16px 0 10px; }
.rf-maint p { color: #2b3447; }
.rf-maint p.small { color: #59627a; font-size: .9rem; margin-top: 14px; }
