/* Lotofácil Expert 3.0 · folha de estilo única
   Direção "Bilhete reservado": papel claro, tinta berinjela, um acento. Sem framework. */

:root {
  --paper: #F5F0EC;
  --surface: #FFFDFA;
  --ink: #2B1B2E;
  --ink-2: #6B5B6E;
  --ink-3: #8A7C86;
  --mute: #B9AEB3;
  --line: #E6DEDA;
  --line-2: #D9CFD3;
  --soft: #EDE6E2;
  --berry: #9B2C6A;
  --green: #2E7D5B;
  --font: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --r: 16px;
  --r-lg: 22px;
  --nav-h: 76px;
  --maxw: 480px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.small { font-size: 13px; }
.lede { font-size: 16.5px; line-height: 1.45; color: var(--ink-2); max-width: 34ch; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; border-radius: 6px; }

/* layout */
.page { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px calc(var(--nav-h) + 28px); }
.page.no-nav { padding-bottom: 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.wordmark { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.hero { margin-top: 34px; display: flex; flex-direction: column; gap: 10px; }
.section { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head p { font-size: 14px; color: var(--ink-2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.iconbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink-2); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* cards e listas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; width: 100%; text-align: left; }
.item .t { font-size: 16px; font-weight: 600; }
.item .s { font-size: 13px; color: var(--ink-2); }
.item .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item .col.end { align-items: flex-end; text-align: right; }
.link { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.premiada { font-size: 16px; font-weight: 700; color: var(--green); }
.status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.status .l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status .ico { color: var(--green); }
.status.warn .ico { color: var(--berry); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.list .line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px; font-size: 15.5px; width: 100%; text-align: left; }
.list .line + .line { border-top: 1px solid var(--line); }
.list .line .k { color: var(--ink-2); }
.list .line .v { font-weight: 600; text-align: right; }
.month { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding-left: 4px; }

/* botões */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 0 20px; border-radius: var(--r); background: var(--ink); color: var(--paper); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; width: 100%; transition: transform 120ms ease, opacity 120ms ease; }
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-size: 15.5px; font-weight: 600; min-height: 50px; border-radius: 14px; }
.btn.quiet { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line-2); font-size: 15.5px; font-weight: 600; min-height: 52px; border-radius: 14px; }
.btn.paper { background: var(--paper); color: var(--ink); font-size: 16px; min-height: 54px; border-radius: 14px; }
.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }
.textbtn { display: flex; align-items: center; justify-content: center; min-height: 52px; font-size: 15.5px; font-weight: 600; color: var(--ink-2); width: 100%; }

/* volante 5x5 */
.vol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.vol.lg { gap: 8px; }
.vol .c { aspect-ratio: 1 / 1; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; color: var(--mute); transition: background 320ms ease, color 320ms ease, border-color 320ms ease, transform 320ms ease; }
.vol.lg .c { border-radius: 12px; font-size: 20px; }
.vol .c.on { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.vol .c.on.new { background: var(--berry); border-color: var(--berry); transform: scale(1.06); }
.vol .c.hit { background: var(--green); border-color: var(--green); color: var(--paper); font-weight: 700; }
.vol .c.mine { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.vol .c.drawn { border: 2px solid var(--berry); color: var(--ink); font-weight: 600; }
.vol .c.flick { background: var(--soft); color: var(--ink-2); }
.vol.heat .c { flex-direction: column; gap: 1px; color: var(--ink); }
.vol.heat .c b { font-size: 17px; font-weight: 700; }
.vol.heat .c small { font-size: 10.5px; opacity: 0.8; }
.vol.heat .c.deep { color: var(--paper); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.legend span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: block; width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }

/* bilhete */
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 20px 24px; }
.ticket-mid { background: var(--surface); border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px 0; }
.perf { height: 0; border-top: 2px dashed var(--line-2); margin: 0 20px; position: relative; }
.perf::before, .perf::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.perf::before { left: -31px; } .perf::after { right: -31px; }
.stub { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 16px 20px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.nums .n { aspect-ratio: 1 / 1; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.nums.sm { gap: 6px; }
.nums.sm .n { font-size: 15px; }
.jogo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.jogo-head { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.jogo-head b { color: var(--ink); font-weight: 700; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { min-width: 36px; height: 34px; padding: 0 8px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14.5px; font-weight: 700; background: var(--ink); color: var(--paper); }
.chips.soft span { background: var(--soft); color: var(--ink); }
.chips.line span { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2); }

/* fatos */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.fact .k { font-size: 13px; color: var(--ink-2); }
.fact .v { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.fact .s { font-size: 12.5px; color: var(--green); font-weight: 600; }
.placar { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; column-gap: 12px; }
.placar > div { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.placar > div:nth-child(3n+1) { font-weight: 700; white-space: nowrap; }
.placar > div:nth-child(3n+2) { color: var(--ink-2); }
.placar > div:nth-child(3n) { font-weight: 600; text-align: right; }
.placar > div:nth-last-child(-n+3) { border-bottom: 0; }
.dark { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.dark p, .dark .muted { color: var(--line-2); }
.dark h2 { color: var(--paper); }

/* geração */
.gen { display: flex; flex-direction: column; min-height: calc(100vh - 40px); }
.steps { display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 15.5px; color: var(--mute); transition: color 300ms ease; }
.step.active { color: var(--ink); font-weight: 600; }
.step.done { color: var(--ink-2); }
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 300ms ease; }
.step.active .dot { border-color: var(--berry); box-shadow: 0 0 0 4px rgba(155, 44, 106, 0.12); }
.step.done .dot { background: var(--ink); border-color: var(--ink); }
.step .dot svg { width: 12px; height: 12px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.step.done .dot svg { opacity: 1; }
.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; transition: width 240ms linear; }

/* controles do jogo do dia */
.ctrl { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.ctrl-row { display: flex; align-items: center; gap: 12px; }
.ctrl .lbl { width: 64px; font-size: 13.5px; color: var(--ink-2); flex-shrink: 0; }
.seg { display: flex; gap: 6px; flex: 1; }
.seg button { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mini { display: flex; align-items: center; gap: 16px; flex: 1; }
.mini b { font-size: 22px; font-weight: 700; min-width: 34px; text-align: center; }
.stepbtn.sm { width: 44px; height: 44px; }

/* personalizar */
.opt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); width: 100%; text-align: left; }
.opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--mute); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.opt.on .radio { border-color: var(--ink); }
.opt.on .radio::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.opt .n { font-size: 17px; font-weight: 700; width: 108px; }
.opt .d { font-size: 14px; color: var(--ink-2); margin-left: auto; text-align: right; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.stepper .big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stepper .mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stepbtn { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; }

.nav a { font-size: 11px; }

/* vídeo */
.video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--r); background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.banner { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); position: relative; }
.banner img { display: block; width: 100%; height: auto; }
.banner.locked img { opacity: 0.5; }
.banner.locked::after { content: 'Em breve'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--paper); background: rgba(43, 27, 46, 0.45); }

/* navegação inferior */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); }
.nav .items { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: stretch; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-height: 44px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.nav a .ico { width: 22px; height: 22px; }
.nav a.on { color: var(--ink); font-weight: 700; }

/* folha (bottom sheet) */
.sheet-host { position: fixed; inset: 0; z-index: 50; background: rgba(43, 27, 46, 0); display: flex; align-items: flex-end; justify-content: center; transition: background 260ms ease; }
.sheet-host.open { background: rgba(43, 27, 46, 0.45); }
.sheet { width: 100%; max-width: var(--maxw); max-height: 92vh; overflow: auto; background: var(--paper); border-radius: 26px 26px 0 0; padding: 12px 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; transform: translateY(100%); transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 -12px 40px rgba(43, 27, 46, 0.25); }
.sheet-host.open .sheet { transform: translateY(0); }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto; }
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 12px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(43, 27, 46, 0.25); }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 400px; margin: 0 auto; padding: 40px 28px; gap: 28px; }
.login .wordmark { font-size: 26px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 14px; color: var(--ink-2); }
.input { width: 100%; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 18px; letter-spacing: 0.04em; outline: none; }
.input:focus { border-color: var(--ink); }
.error { color: var(--berry); font-size: 14px; }

/* views (app.html) */
.view { display: none; }
.view.active { display: block; }
.rise { animation: rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (min-width: 720px) {
  .page { padding-top: 40px; }
  h1 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
