:root {
  color-scheme: light;
  --pine: #173d33;
  --deep: #102f27;
  --rubi: #a53146;
  --rubi-dark: #87263a;
  --paper: #f7f4e9;
  --linen: #e9ecdd;
  --gold: #d7bd7a;
  --muted: #486052;
  --line: #cbd2bd;
  --ease: cubic-bezier(.23, 1, .32, 1);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--pine);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, summary { font: inherit; -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; min-height: 48px; }
button:disabled { cursor: default; }
button, a, summary { outline-offset: 5px; }
:focus-visible { outline: 3px solid var(--rubi); }
.caller :focus-visible { outline-color: var(--gold); }
[hidden] { display: none !important; }
a { color: inherit; }
button svg, .game-rule svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; }
.shell { width: min(1180px, 100%); margin-inline: auto; padding: 22px 18px 28px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font: 700 19px/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.brand svg { width: 30px; height: 34px; flex: none; }
.version-badge { display: inline-flex; flex: none; padding: 7px 9px; border: 1px solid #b9c4b0; border-radius: 99px; font-size: 11px; line-height: 1.2; color: var(--muted); }
.intro { display: flex; flex-direction: column; gap: 16px; padding: 27px 0 24px; }
.intro h1 { font-size: clamp(37px, 6vw, 56px); line-height: 1.04; letter-spacing: -.055em; }
.intro p { font-size: 14px; line-height: 1.55; margin-top: 10px; color: var(--muted); }
.game-rule { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; line-height: 1.4; }
.game-rule svg { width: 17px; height: 17px; }
.preview-notice { font-size: 13px; line-height: 1.6; padding: 12px 15px; border-left: 3px solid var(--rubi); background: var(--linen); margin-bottom: 20px; }
.game { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; }
.caller { min-width: 0; border-radius: 22px; background: var(--pine); color: var(--paper); padding: 22px; display: flex; flex-direction: column; position: relative; }
.caller-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.caller-top h2 { font: 14px/1.4 Arial, sans-serif; }
.caller-top > span { font-size: 11px; line-height: 1.4; color: #d2dcca; }
.letter-rail { display: flex; align-items: center; justify-content: center; gap: 11px; padding-top: 24px; }
.letter-rail span { display: grid; place-items: center; width: 33px; height: 34px; border: 1px solid #6a8474; border-radius: 7px; color: #e0e7d8; font: 20px/1 Georgia, "Times New Roman", serif; }
.letter-rail .active { background: var(--paper); border-color: var(--paper); color: var(--pine); }
.number-stage { display: grid; place-items: center; flex: 1; padding: 31px 0 18px; }
.ball { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: clamp(206px, 62vw, 264px); height: clamp(206px, 62vw, 264px); border-radius: 50%; background: var(--paper); color: var(--pine); border: 7px solid var(--paper); box-shadow: inset 0 0 0 1px #c8b780, 0 12px 25px #08251f2b; }
.ball:before { content: ""; position: absolute; top: -19px; left: calc(50% - 16px); width: 32px; height: 14px; border-radius: 5px 5px 0 0; background: var(--gold); }
.ball:after { content: ""; position: absolute; top: -29px; left: calc(50% - 7px); width: 14px; height: 14px; border: 2px solid var(--gold); border-radius: 50%; }
.ball-letter { font: 26px/1 Georgia, "Times New Roman", serif; margin-top: 4px; }
.ball-number { font-size: clamp(108px, 31vw, 142px); line-height: .98; letter-spacing: -.07em; padding-right: .065em; font-weight: 700; font-variant-numeric: tabular-nums; }
.ball-caption { font-size: 10px; margin-top: 9px; color: var(--muted); }
.call-message { min-height: 39px; padding: 0 4px 16px; text-align: center; font-size: 13px; line-height: 1.5; color: #e0e7d8; }
.draw { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; padding: 17px 12px; min-height: 58px; border: 1px solid var(--paper); border-radius: 9px; color: var(--pine); background: var(--paper); font-weight: 700; font-size: 15px; line-height: 1.35; }
.draw svg { width: 22px; height: 22px; }
.draw:disabled { background: #d6ddcd; border-color: #d6ddcd; color: #36564a; }
.draw.is-complete svg { display: none; }
.caller-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin-top: 13px; }
.caller-bottom p { font-size: 11px; line-height: 1.5; color: #d2dcca; }
.caller-bottom strong { font-weight: 700; font-size: 17px; color: var(--paper); margin-right: 2px; font-variant-numeric: tabular-nums; }
.reset { border: 0; color: var(--paper); background: transparent; padding: 10px 0 10px 12px; min-height: 44px; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.reset:disabled { color: #9eb3a3; text-decoration: none; }
.registry { min-width: 0; background: #fffdf6; border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.registry-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 23px; }
.registry-heading h2 { font-size: 25px; letter-spacing: -.035em; line-height: 1.15; }
.count-badge { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; font-size: 11px; background: var(--linen); border-radius: 99px; padding: 7px 9px; }
.count-badge strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.small-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.small-heading h3 { font: 700 12px/1.4 Arial, sans-serif; }
.small-heading > span { font-size: 10px; line-height: 1.4; color: var(--muted); }
.recent-list { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 12px 0 0; }
.recent-list:empty { display: none; }
.recent-list li { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 59px; border-radius: 8px; background: var(--linen); color: var(--pine); }
.recent-list li small { font-size: 10px; line-height: 1.3; font-weight: 400; }
.recent-list li span { font-size: 23px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.recent-list li:first-child { background: var(--rubi); color: #fff; }
.empty { min-height: 71px; display: flex; align-items: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.board-section { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 17px; }
.board-legend { display: inline-flex; align-items: center; gap: 5px; }
.board-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--pine); }
.number-board { width: 100%; border-collapse: separate; border-spacing: 5px 4px; table-layout: fixed; margin: 10px 0 0; text-align: center; }
.number-board th { padding: 4px 0 8px; font: 24px/1 Georgia, "Times New Roman", serif; }
.number-board th span { display: block; margin-top: 5px; font: 9px/1.3 Arial, sans-serif; color: var(--muted); }
.number-board td { padding: 0; height: 27px; border: 1px solid #d7ddce; border-radius: 5px; color: #526456; background: #f5f5ec; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.number-board td.drawn { background: var(--pine); border-color: var(--pine); color: #fff; font-weight: 700; }
.number-board td.current { background: var(--rubi); border-color: var(--rubi); color: #fff; box-shadow: 0 0 0 1px #fffdf6, 0 0 0 2px var(--rubi); }
.board-note { display: flex; align-items: flex-start; gap: 6px; font-size: 10px; line-height: 1.5; color: var(--muted); margin-top: 11px; }
.board-note span { display: inline-block; flex: none; width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--rubi); }
.history { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 3px; }
summary { cursor: pointer; min-height: 48px; }
.history summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 11px 0; font-size: 12px; font-weight: 700; list-style: none; }
.history summary:after { content: "+"; font-size: 21px; font-weight: 400; }
.history[open] summary:after { content: "−"; }
.history summary span { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 400; }
summary::-webkit-details-marker { display: none; }
.history-list { list-style: none; margin: 5px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-height: 278px; overflow: auto; overscroll-behavior: contain; }
.history-list li { border: 1px solid var(--line); border-radius: 5px; text-align: center; padding: 8px 2px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.history-list li small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; margin-bottom: 2px; }
.history-list li:first-child { color: var(--rubi); border-color: var(--rubi); }
.history-empty { font-size: 12px; line-height: 1.5; padding: 3px 0 10px; color: var(--muted); }
.storage { font-size: 11px; line-height: 1.6; color: var(--muted); padding: 14px 3px 0; max-width: 90ch; }
.storage.warning { background: #fff0ce; border-left: 3px solid #986d19; color: #5b420e; padding: 12px 14px; margin-top: 16px; }
.extras { margin-top: 27px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.extras > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; list-style: none; font: 20px/1.3 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.summary-meta { display: flex; align-items: center; gap: 13px; font: 11px/1.4 Arial, sans-serif; letter-spacing: 0; color: var(--muted); }
.plus { font-size: 24px; line-height: 1; color: var(--pine); }
.extras[open] .plus { transform: rotate(45deg); }
.extras-content { padding-bottom: 24px; }
.cards-intro { display: flex; flex-direction: column; gap: 18px; margin-bottom: 22px; }
.cards-intro h2 { font-size: 25px; letter-spacing: -.03em; margin-bottom: 10px; }
.cards-intro p { font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 65ch; }
.cards-intro .sample-note { font-size: 11px; margin-top: 9px; }
.secondary { border: 1px solid #9fac96; color: var(--pine); background: var(--paper); padding: 13px 18px; border-radius: 7px; font-size: 13px; font-weight: 700; }
.cards-intro .secondary { align-self: flex-start; flex: none; }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.bingo-card { border: 1px solid var(--pine); border-radius: 7px; overflow: hidden; background: #fffdf6; break-inside: avoid; }
.bingo-card h3 { padding: 14px 8px; font: 17px/1.3 Georgia, "Times New Roman", serif; text-align: center; }
.bingo-card table { border-collapse: collapse; width: 100%; table-layout: fixed; text-align: center; }
.bingo-card th { font: 20px/1.2 Georgia, "Times New Roman", serif; background: var(--pine); color: var(--paper); padding: 8px; }
.bingo-card td { height: 48px; border: 1px solid var(--line); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bingo-card td.free { color: var(--rubi); font-size: 11px; background: #f5e9e5; }
.bingo-card p { font-size: 10px; line-height: 1.4; text-align: center; padding: 9px; color: var(--muted); }
footer { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
footer > span { font: 17px/1.4 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
footer p { font-size: 11px; line-height: 1.6; max-width: 68ch; color: var(--muted); }
dialog { max-width: 420px; max-height: calc(100% - 32px); overflow: auto; width: calc(100% - 36px); padding: 28px; border: 1px solid var(--line); border-radius: 19px; color: var(--pine); background: var(--paper); }
dialog::backdrop { background: #102f27bf; }
.dialog-symbol { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid #d7b4b5; color: var(--rubi); font-size: 27px; border-radius: 50%; margin-bottom: 19px; }
dialog h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.035em; }
dialog p { line-height: 1.6; color: var(--muted); font-size: 14px; margin-top: 14px; }
.dialog-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 25px; }
.danger { background: var(--rubi); color: #fff; border: 1px solid var(--rubi); padding: 13px 18px; border-radius: 7px; font-size: 13px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 14px; background: var(--paper); transform: translateY(-150%); }
.skip:focus { transform: none; }
noscript { display: block; padding: 18px; color: #5b420e; background: #fff0ce; }

@media (min-width: 600px) {
  .shell { padding: 28px 28px 32px; }
  .brand { font-size: 22px; gap: 10px; }
  .brand svg { width: 33px; height: 38px; }
  .version-badge { font-size: 12px; padding: 8px 11px; }
  .intro { padding-block: 31px 29px; }
  .intro p { font-size: 16px; }
  .caller { padding: 30px; }
  .caller-top h2 { font-size: 15px; }
  .caller-top > span { font-size: 12px; }
  .ball { width: 280px; height: 280px; }
  .ball-number { font-size: 150px; }
  .draw { font-size: 17px; }
  .caller-bottom p { font-size: 12px; }
  .reset { font-size: 13px; }
  .registry { padding: 26px; }
  .registry-heading h2 { font-size: 29px; }
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .extras > summary { font-size: 24px; }
  .summary-meta { font-size: 12px; }
}
@media (min-width: 860px) {
  .shell { padding: 28px 38px 32px; }
  .intro { flex-direction: row; justify-content: space-between; align-items: end; gap: 24px; padding-block: 38px 32px; }
  .game-rule { margin-bottom: 4px; font-size: 13px; }
  .game { grid-template-columns: minmax(0,1fr) minmax(0,1.04fr); gap: 24px; }
  .caller { padding: 30px; border-radius: 25px; }
  .letter-rail { padding-top: 34px; gap: 14px; }
  .letter-rail span { width: 38px; height: 39px; font-size: 22px; }
  .number-stage { padding-top: 43px; padding-bottom: 26px; }
  .ball { width: min(100%, 318px); height: auto; aspect-ratio: 1; }
  .ball-letter { font-size: 32px; }
  .ball-number { font-size: clamp(146px, 14vw, 176px); }
  .ball-caption { font-size: 11px; margin-top: 12px; }
  .call-message { font-size: 14px; padding-bottom: 24px; }
  .draw { min-height: 62px; }
  .caller-bottom { margin-top: 18px; }
  .registry { border-radius: 25px; }
  .registry-heading { margin-bottom: 21px; }
  .registry-heading h2 { font-size: 27px; }
  .small-heading h3 { font-size: 12px; }
  .recent-list li { min-height: 60px; }
  .recent-list li span { font-size: 25px; }
  .number-board { border-spacing: 6px 4px; }
  .number-board td { height: 25px; font-size: 12px; }
  .cards-intro { flex-direction: row; align-items: center; justify-content: space-between; gap: 30px; }
  .cards-intro .secondary { align-self: center; }
  footer { flex-direction: row; justify-content: space-between; gap: 30px; }
  footer p { max-width: 57ch; }
}
@media (max-width: 359px) {
  .shell { padding-inline: 12px; }
  .brand { font-size: 17px; gap: 5px; }
  .brand svg { width: 25px; }
  .version-badge { font-size: 10px; padding: 6px 7px; }
  .intro h1 { font-size: 35px; }
  .caller, .registry { padding: 18px; }
  .caller-top > span { font-size: 10px; }
  .draw { font-size: 14px; gap: 9px; }
  .registry-heading h2 { font-size: 23px; }
  .summary-meta { font-size: 10px; max-width: 102px; gap: 9px; }
  .extras > summary { font-size: 19px; }
}
@media (hover: hover) and (pointer: fine) {
  .draw:enabled:hover { background: var(--linen); border-color: var(--linen); }
  .reset:enabled:hover { color: var(--gold); }
  .secondary:hover { background: var(--linen); }
  .danger:hover { background: var(--rubi-dark); }
  .history summary:hover, .extras > summary:hover { color: var(--rubi); }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease); }
  .draw:enabled:active { transform: scale(.985); }
  .ball.flash { animation: number-reveal 210ms var(--ease); }
  @keyframes number-reveal { from { transform: scale(.97); } to { transform: scale(1); } }
  dialog[open] { animation: dialog-in 180ms var(--ease); }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Prévia incorporável: a mesma UI e o mesmo sorteio, em apresentação compacta.
   A ativação requer preview=1 E embed=1; a rodada real não usa este modo. */
.embed .shell { max-width: 480px; padding: 16px; }
.embed .masthead { padding-bottom: 12px; gap: 8px; }
.embed .brand { font-size: 18px; pointer-events: none; }
.embed .brand svg { width: 27px; height: 31px; }
.embed .version-badge { font-size: 10px; padding: 6px 8px; }
.embed .intro, .embed .storage, .embed .extras, .embed footer, .embed .board-section, .embed .history, .embed .registry-heading { display: none; }
.embed .preview-notice { margin-top: 14px; margin-bottom: 16px; font-size: 11px; padding: 10px 12px; line-height: 1.5; }
.embed .game { grid-template-columns: minmax(0,1fr); gap: 13px; }
.embed .caller { padding: 20px; border-radius: 20px; }
.embed .caller-top h2 { font-size: 14px; }
.embed .caller-top > span { font-size: 10px; }
.embed .letter-rail { padding-top: 20px; gap: 11px; }
.embed .letter-rail span { width: 31px; height: 32px; font-size: 19px; }
.embed .number-stage { padding-top: 31px; padding-bottom: 17px; }
.embed .ball { width: min(100%, 226px); height: auto; aspect-ratio: 1; }
.embed .ball-letter { font-size: 25px; }
.embed .ball-number { font-size: clamp(110px, 30vw, 126px); }
.embed .ball-caption { font-size: 10px; margin-top: 7px; }
.embed .call-message { font-size: 12px; min-height: 36px; padding-bottom: 13px; }
.embed .draw { min-height: 55px; font-size: 14px; gap: 9px; }
.embed .draw svg { width: 20px; height: 20px; }
.embed .caller-bottom { margin-top: 9px; }
.embed .caller-bottom p { font-size: 10px; }
.embed .reset { font-size: 11px; }
.embed .registry { padding: 17px 20px; border-radius: 16px; }
.embed .recent-list li { min-height: 51px; }
.embed .recent-list li span { font-size: 22px; }
.embed .recent-list { margin-top: 10px; }
.embed .small-heading h3 { font-size: 11px; }
.embed .small-heading > span { font-size: 9px; }

@page { size: A4 portrait; margin: 12mm; }
@media print {
  body { background: #fff; color: #000; }
  .shell, .embed .shell { max-width: none; padding: 0; }
  .skip, .masthead, .intro, .preview-notice, .game, .storage, footer, .extras > summary, .cards-intro, dialog, noscript { display: none !important; }
  .extras, .embed .extras { display: block !important; margin: 0; border: 0; }
  .extras-content { padding: 0; }
  .cards { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10mm; }
  .bingo-card { border: 1px solid #000; border-radius: 0; background: #fff; }
  .bingo-card h3 { font-size: 15pt; }
  .bingo-card th { background: #fff; color: #000; border: 1px solid #000; }
  .bingo-card td { height: 16mm; font-size: 19pt; color: #000; border-color: #777; }
  .bingo-card td.free { font-size: 10pt; background: #fff; color: #000; }
  .bingo-card p { color: #000; font-size: 9pt; }
}
