/* Bingo pages (src/bingo.js) + cards (engine.js cardMarkup) + print. Static on purpose. */
:root { --navy: #1e3a8a; --navy2: #172554; --red: #dc2626; --cream: #fbf7ef; --line: #c7cbe0; --gold: #f59e0b; --ink: #111827; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--cream); color: #374151; min-height: 100vh; }
.container { max-width: 760px; margin: 0 auto; padding: 26px 18px 48px; }
.crumb { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.crumb a { color: var(--navy); text-decoration: none; }
.top { text-align: center; margin-bottom: 20px; }
.balls { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.ball { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 19px; color: #fff; box-shadow: inset -4px -5px 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.2); position: relative; }
.ball::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: rgba(255,255,255,.92); z-index: 0; }
.ball b { position: relative; z-index: 1; color: var(--ink); font-size: 16px; }
.ball.B { background: #2563eb; } .ball.I { background: #dc2626; } .ball.N { background: #6b7280; } .ball.G { background: #16a34a; } .ball.O { background: #f59e0b; }
h1 { font-size: 32px; line-height: 1.15; font-weight: 800; color: var(--ink); letter-spacing: -0.015em; margin-bottom: 10px; }
.lede { font-size: 16.5px; line-height: 1.55; color: #4b5563; max-width: 36em; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip { display: inline-block; background: #fff; border: 1.5px solid #dbe1f3; color: var(--navy); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--navy); }
.panel { background: #fff; border-radius: 16px; padding: 22px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(30,58,138,.05); margin-bottom: 22px; }
.panel h2 { font-size: 22px; font-weight: 750; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.01em; }
.panel h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 18px 0 6px; }
.panel p { font-size: 15.5px; line-height: 1.65; margin-bottom: 12px; }
.panel ul, .panel ol { margin: 6px 0 14px 22px; }
.panel li { font-size: 15.5px; line-height: 1.6; margin-bottom: 5px; }
.panel a { color: var(--navy); }
.about { color: #6b7280; font-size: 15px; margin-bottom: 14px; }
.set-grid { display: grid; grid-template-columns: minmax(0, 330px) 1fr; gap: 22px; align-items: start; }
.set-grid .bc { max-width: 330px; }
.controls label { display: block; font-size: 13.5px; font-weight: 650; color: #1f2937; margin: 10px 0 5px; }
.controls select, .controls input[type=text], .controls input[type=number], .controls textarea {
  width: 100%; padding: 10px 11px; border: 2px solid #e5e7eb; border-radius: 9px; font-size: 16px; font-family: inherit; background: #fff; color: #111;
}
.controls textarea { min-height: 220px; line-height: 1.45; resize: vertical; }
.controls select:focus, .controls input:focus, .controls textarea:focus { outline: none; border-color: var(--navy); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--navy); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font-size: 15.5px; font-weight: 700; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn:hover { background: var(--navy2); }
.btn.red { background: var(--red); } .btn.red:hover { background: #b91c1c; }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid #dbe1f3; }
.btn.ghost:hover { border-color: var(--navy); }
.btn.wide { width: 100%; }
.btn.big { font-size: 20px; padding: 16px 22px; border-radius: 14px; }
.btns { display: grid; gap: 8px; margin-top: 12px; }
.btns2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.muted { color: #6b7280; font-size: 13px; line-height: 1.5; }
.count { font-size: 13px; color: #6b7280; margin-top: 5px; }
.count.bad { color: var(--red); font-weight: 600; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; font-size: 14.5px; border: 2px solid #e5e7eb; border-radius: 9px; padding: 8px 12px; cursor: pointer; background: #fff; }
.radios input { accent-color: var(--navy); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; margin-top: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.words { columns: 3 150px; column-gap: 18px; margin: 4px 0 0; padding: 0; list-style: none; }
.words li { font-size: 14px; line-height: 1.5; margin: 0 0 3px; break-inside: avoid; color: #374151; }
.words.human { columns: 2 220px; }
details.wl { margin-top: 14px; }
details.wl summary { cursor: pointer; font-weight: 650; font-size: 14.5px; color: var(--navy); }
details.wl[open] summary { margin-bottom: 8px; }
.share { margin-top: 12px; background: #eef2ff; border-radius: 10px; padding: 12px; font-size: 14px; display: none; }
.share.show { display: block; }
.share input { width: 100%; font-size: 13px; padding: 8px; border: 1px solid #c7d2fe; border-radius: 7px; margin: 6px 0; background: #fff; }
.faq h3 { margin-top: 14px; }
.more { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.more a { display: block; background: #fff; border: 1.5px solid #dbe1f3; border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 15px; }
.more a small { display: block; font-weight: 400; color: #6b7280; font-size: 13px; margin-top: 3px; }
.more a:hover { border-color: var(--navy); }
.foot { text-align: center; font-size: 13px; color: #9ca3af; margin-top: 18px; line-height: 2; }
.foot a { color: var(--navy); text-decoration: none; margin: 0 7px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.hub-grid a.tile { display: block; text-decoration: none; color: var(--ink); background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.hub-grid a.tile:hover { box-shadow: 0 0 0 2px var(--navy); }
.hub-grid .tile strong { display: block; font-size: 16px; margin-top: 10px; }
.hub-grid .tile small { display: block; color: #6b7280; font-size: 13px; margin-top: 3px; line-height: 1.4; }
@media (max-width: 640px) {
  h1 { font-size: 27px; }
  .set-grid { grid-template-columns: 1fr; }
  .set-grid .bc { margin: 0 auto; }
  .panel { padding: 18px 15px; }
}

/* ---- the card ---- */
.bc { container-type: inline-size; background: #fff; border: 3px solid var(--navy); border-radius: 12px; padding: 2.4cqi; color: var(--ink); width: 100%; }
.bc-head { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4cqi; margin-bottom: 1.6cqi; }
.bc-head span { background: var(--navy); color: #fff; text-align: center; font-weight: 900; font-size: 11cqi; line-height: 1.25; border-radius: 1.6cqi; }
.bc-title { text-align: center; font-weight: 850; font-size: 7.5cqi; line-height: 1.2; color: var(--navy); padding: 0.5cqi 2cqi 1.6cqi; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.bc-sub { text-align: center; font-size: 4.2cqi; font-weight: 600; color: #4b5563; margin: -0.8cqi 0 1.4cqi; }
.bc-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 2px solid var(--navy); border-radius: 3px; overflow: hidden; }
.bc.s4 .bc-grid { grid-template-columns: repeat(4, 1fr); }
.bc.s3 .bc-grid { grid-template-columns: repeat(3, 1fr); }
.bc-cell { aspect-ratio: 1 / 1; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.1cqi; position: relative; overflow: hidden; overflow-wrap: break-word; line-height: 1.12; font-weight: 650; font-size: 3.9cqi; }
.bc-cell span { position: relative; z-index: 1; }
.bc-cell.l1 { font-size: 3.35cqi; } .bc-cell.l2 { font-size: 2.85cqi; } .bc-cell.l3 { font-size: 2.45cqi; } .bc-cell.l4 { font-size: 2.15cqi; font-weight: 600; } .bc-cell.l5 { font-size: 1.9cqi; font-weight: 600; }
.bc.s4 .bc-cell { font-size: 5cqi; } .bc.s4 .bc-cell.l1 { font-size: 4.2cqi; } .bc.s4 .bc-cell.l2 { font-size: 3.5cqi; } .bc.s4 .bc-cell.l3 { font-size: 3cqi; } .bc.s4 .bc-cell.l4 { font-size: 2.6cqi; } .bc.s4 .bc-cell.l5 { font-size: 2.3cqi; }
.bc.s3 .bc-cell { font-size: 7cqi; } .bc.s3 .bc-cell.l1 { font-size: 5.6cqi; } .bc.s3 .bc-cell.l2 { font-size: 4.6cqi; } .bc.s3 .bc-cell.l3 { font-size: 3.9cqi; } .bc.s3 .bc-cell.l4 { font-size: 3.3cqi; } .bc.s3 .bc-cell.l5 { font-size: 2.9cqi; }
.bc.n75 .bc-cell { font-size: 9cqi; font-weight: 800; }
.bc-cell.free { background: #fef3c7; flex-direction: column; }
.bc-cell.free b { font-size: 4.2cqi; letter-spacing: .06em; color: #92400e; position: relative; z-index: 1; }
.bc-cell.free i { font-style: normal; font-size: 7cqi; color: var(--gold); line-height: 1; position: relative; z-index: 1; }
.bc.s3 .bc-cell.free b { font-size: 6.5cqi; } .bc.s3 .bc-cell.free i { font-size: 11cqi; }
.bc.human .bc-cell { align-items: flex-start; padding-top: 2cqi; font-weight: 600; }
.bc.human .bc-cell.free { align-items: center; padding-top: 1cqi; }
.bc.human .bc-cell u { position: absolute; left: 12%; right: 12%; bottom: 10%; border-bottom: 1px solid #9ca3af; }
.bc-cell.on::after { content: ""; position: absolute; width: 78%; height: 78%; left: 11%; top: 11%; border-radius: 50%; background: radial-gradient(circle at 40% 38%, rgba(239,68,68,.55), rgba(220,38,38,.42) 60%, rgba(220,38,38,.3)); z-index: 0; }
.bc-cell.win { background: #fde68a; }
.bc-foot { display: flex; justify-content: space-between; font-size: 2.9cqi; color: #6b7280; margin-top: 1.4cqi; padding: 0 0.5cqi; }
.bc-foot span:first-child { font-weight: 700; color: var(--navy); }

/* ---- play + caller ---- */
.play-wrap { max-width: 560px; margin: 0 auto; padding: 14px 12px 40px; }
.play-wrap .bc .bc-cell { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.play-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; }
.overlay { position: fixed; inset: 0; background: rgba(23,37,84,.88); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.overlay.show { display: flex; }
.overlay .box { background: #fff; border-radius: 18px; padding: 28px 22px; text-align: center; max-width: 380px; width: 100%; }
.overlay .box .big { font-size: 54px; font-weight: 900; color: var(--red); letter-spacing: .03em; }
.overlay .box .num { font-size: 22px; font-weight: 800; color: var(--navy); margin: 8px 0 14px; }
.now { text-align: center; padding: 18px 10px 8px; }
.now .callball { width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: #2563eb; box-shadow: inset -12px -14px 0 rgba(0,0,0,.18), 0 3px 10px rgba(0,0,0,.2); position: relative; }
.now .callball::before { content: ""; position: absolute; inset: 26px; border-radius: 50%; background: #fff; }
.now .callball div { position: relative; z-index: 1; text-align: center; line-height: 1; color: var(--ink); }
.now .callball .L { font-size: 26px; font-weight: 900; }
.now .callball .V { font-size: 54px; font-weight: 900; }
.now .callball.word { width: auto; min-height: 120px; height: auto; border-radius: 18px; padding: 22px 26px; background: var(--navy); }
.now .callball.word::before { inset: 8px; border-radius: 12px; }
.now .callball.word .V { font-size: 30px; padding: 10px 14px; overflow-wrap: anywhere; }
.now .callball.idle .V { font-size: 22px; color: #6b7280; }
.now .meta { font-size: 14px; color: #6b7280; }
.board75 { display: grid; grid-template-columns: 32px repeat(15, 1fr); gap: 3px; font-size: 12.5px; }
.board75 .L { font-weight: 900; color: #fff; background: var(--navy); border-radius: 4px; display: grid; place-items: center; }
.board75 .n, .boardw .n { background: #f3f4f6; color: #9ca3af; border-radius: 4px; text-align: center; padding: 5px 0; font-weight: 700; }
.board75 .n.on, .boardw .n.on { background: var(--red); color: #fff; }
.board75 .n.last, .boardw .n.last { outline: 3px solid var(--gold); }
.boardw { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 5px; }
.boardw .n { padding: 6px 6px; font-size: 13px; line-height: 1.2; font-weight: 600; }
.check-out { margin-top: 12px; }
.check-out .bc { max-width: 340px; margin: 10px auto 0; }
.verdict { text-align: center; font-weight: 800; font-size: 18px; margin-top: 10px; }
.verdict.yes { color: #15803d; } .verdict.no { color: #6b7280; }
@media (max-width: 520px) { .board75 { grid-template-columns: 22px repeat(15, 1fr); font-size: 10px; gap: 2px; } .board75 .n { padding: 4px 0; } }

/* ---- print ---- */
#bg-print { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#bg-print) { display: none !important; }
  #bg-print { display: block; }
  .pp { break-after: page; page-break-after: always; display: flex; align-items: center; justify-content: center; gap: 0.3in; }
  .pp:last-child { break-after: auto; page-break-after: auto; }
  .pp .bc { flex: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp1 { height: 10.25in; } .pp1 .bc { width: 7.4in; }
  .pp2 { height: 7.75in; } .pp2 .bc { width: 4.95in; }
  .pp4 { height: 10.25in; flex-wrap: wrap; align-content: center; gap: 0.25in 0.3in; } .pp4 .bc { width: 3.75in; }
  .pl { break-after: page; page-break-after: always; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: #111; }
  .pl:last-child { break-after: auto; page-break-after: auto; }
  .pl h2 { font-size: 20pt; margin-bottom: 4pt; } .pl p { font-size: 10pt; color: #555; margin-bottom: 10pt; }
  .pl ol { columns: 3; column-gap: 0.3in; list-style: none; padding: 0; margin: 0; }
  .pl ol li { font-size: 11pt; padding: 3pt 0; break-inside: avoid; display: flex; gap: 6pt; align-items: flex-start; }
  .pl ol li::before { content: ""; flex: none; width: 10pt; height: 10pt; border: 1pt solid #333; margin-top: 2pt; }
  .slips { display: grid; grid-template-columns: repeat(4, 1fr); }
  .slips div { border: 1pt dashed #999; height: 0.9in; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4pt; font-size: 12pt; font-weight: 700; break-inside: avoid; }
  .pl .b75 { display: grid; grid-template-columns: 0.45in repeat(15, 1fr); gap: 3pt; }
  .pl .b75 div { border: 1pt solid #333; text-align: center; padding: 6pt 0; font-size: 12pt; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pl .b75 .L { background: #1e3a8a; color: #fff; }
}
