/* The umbrella site: what the hub, the Bingo pages and the printables add to Roomful Trivia's site.css (copied in by
   tools/build_gamenight.py, so both sites share one look). Printing: two cards per US Letter page, or the caller
   sheet on one page; ink-friendly black on white. */

.gn .landing-top { flex-wrap: wrap; }
.gn main { min-width: 0; }
.gn .lede { font-size: 1.15rem; color: var(--paper-dim); max-width: 42em; }
.gn .crumbs { margin: 0; color: var(--muted); font-size: 0.95rem; }
.gn .crumbs a { color: var(--paper-dim); }
.gn ol.steps, .gn .bingo-page ul:not([class]), .gn .cards-info ul:not([class]), .gn ol.how { padding-left: 1.3em; }
.gn ol.steps li, .gn .bingo-page ul:not([class]) li, .gn ol.how li { margin: 6px 0; }

/* ---------- Hub ---------- */
.gn-hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin: 8px 0 14px; }
.games { list-style: none; padding: 0; margin: 30px 0 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.game { background: var(--night); border: 2px solid rgba(255, 246, 229, 0.14); border-radius: 18px; padding: 18px 20px 6px; display: flex; flex-direction: column; }
.game h3 { font-size: 1.8rem; margin: 2px 0 8px; }
.game p { color: var(--paper-dim); }
/* The button row sits at the bottom of the card, so buttons line up across cards; the text stays under its heading. */
.game .game-cta { margin-top: auto; padding-top: 6px; }
.game-status { display: inline-block; align-self: flex-start; margin: 0 0 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.gn .game-status.live { background: var(--accent); color: var(--ink); }
.gn .game-status.soon { background: transparent; color: var(--paper); border: 2px solid var(--paper-dim); }
.soon-games { margin-top: 14px; }

/* ---------- The small join box (hub and /bingo/, js/join-box.js) ---------- */
.join-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; max-width: 36em; margin: 18px 0 4px; padding: 10px 14px; border: 2px solid rgba(255, 246, 229, 0.16); border-radius: 14px; background: rgba(11, 20, 80, 0.3); }
.join-strip label { font-weight: 650; color: var(--paper); text-wrap: balance; }
.join-strip-row { display: flex; gap: 8px; align-items: center; }
.gn .join-strip input { width: 6.4em; font-size: 1.15rem; font-weight: 800; font-stretch: 75%; letter-spacing: 0.25em; text-align: center; text-transform: uppercase; padding: 0.3em 0 0.3em 0.25em; }
.join-strip-error { flex-basis: 100%; margin: 0; color: #ffb4ab; font-weight: 650; text-wrap: balance; }
.join-strip-error:empty { display: none; }
.join-strip-note { flex-basis: 100%; margin: 0; color: var(--paper-dim); font-size: 0.95rem; }

/* ---------- Coming-soon game pages (/charades, /mystery, /words) ---------- */
.coming-page .game-status { margin-top: 18px; font-size: 1rem; padding: 4px 14px; }
.coming-page h1 { margin-top: 6px; }
.soon-note { font-size: 1.1rem; }
@media (max-width: 560px) {
  .coming-page .cta-row .btn { width: 100%; text-align: center; }
}

/* ---------- Bingo pages ---------- */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 22px 0 6px; }
.btn.soon { background: transparent; color: var(--paper-dim); border-color: var(--paper-dim); border-style: dashed; box-shadow: none; cursor: default; }
.draft-note { display: inline-block; margin: 12px 0 0; padding: 6px 12px; border-radius: 10px; background: var(--lemon); color: var(--ink); font-weight: 750; }
.item-grid { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.item-grid li { display: grid; grid-template-columns: 2.2em 1fr; column-gap: 10px; align-items: start; background: var(--night); border: 2px solid rgba(255, 246, 229, 0.14); border-radius: 14px; padding: 12px 14px; }
.item-grid .emoji { grid-row: span 2; font-size: 1.7rem; line-height: 1.1; text-align: center; }
.item-grid strong { font-size: 1.08rem; }
.item-grid .fact { color: var(--paper-dim); font-size: 0.95rem; line-height: 1.35; }
.print-form { display: grid; gap: 8px; max-width: 26em; margin: 14px 0; }
.print-form.inline { grid-template-columns: auto 6em auto; align-items: center; max-width: none; justify-content: start; gap: 10px 14px; }
.print-form input[type="number"] { width: 6em; }
.print-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
@media (max-width: 560px) {
  .print-form.inline { grid-template-columns: 1fr; }
}

/* ---------- Print page: the on-screen preview ---------- */
.print-page main { max-width: none; }
.print-sheet { display: grid; gap: 22px; margin-top: 26px; }
.print-sheet:empty { display: none; }
.bcard, .callsheet {
  background: #fff; color: #111; border-radius: 12px; padding: 14px; max-width: 680px; width: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
.bcard header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.bcard-title { font-weight: 900; font-size: 1.25rem; letter-spacing: 0.02em; }
.bcard-set { font-weight: 650; font-size: 0.95rem; color: #333; }
.bcard-letters, .bcard-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.bcard-letters span { text-align: center; font-weight: 900; font-size: 1.5rem; padding: 2px 0 4px; }
.bcard-grid { list-style: none; margin: 0; padding: 0; border: 2px solid #111; }
.bcard-grid li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  min-height: 4.6em; padding: 4px 3px; border: 1px solid #111; font-size: 0.85rem; font-weight: 650; line-height: 1.15;
  overflow-wrap: anywhere;
}
.bcard-grid .e { font-size: 1.45rem; line-height: 1; }
.bcard-grid li.free { background: #ececec; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; }
.bcard-grid li.free .e { font-size: 1.7rem; }
.bcard-grid.numbers li:not(.free) .l { font-size: 2.2em; font-weight: 800; font-variant-numeric: tabular-nums; }
.bcard footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 0.72rem; color: #444; }
.bcard-no { font-weight: 750; color: #111; letter-spacing: 0.04em; }
.callsheet h2 { color: #111; font-size: 1.5rem; margin: 0 0 4px; }
.callsheet p { margin: 0 0 8px; font-size: 0.85rem; color: #333; }
.callsheet ol { list-style: none; margin: 8px 0 0; padding: 0; columns: 3; column-gap: 18px; font-size: 0.85rem; }
.callsheet li { break-inside: avoid; display: flex; gap: 6px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid #ddd; }
.callsheet .box { flex: none; width: 0.95em; height: 0.95em; border: 1.5px solid #111; border-radius: 2px; transform: translateY(0.12em); }
.callsheet .n { flex: none; min-width: 1.7em; color: #555; font-variant-numeric: tabular-nums; }
.callsheet ol.many { columns: 5; column-gap: 12px; }
@media (max-width: 560px) {
  .bcard { padding: 8px; }
  .bcard-grid li { min-height: 4em; font-size: 0.7rem; }
  .bcard-grid .e { font-size: 1.15rem; }
  .callsheet ol { columns: 2; }
}

/* ---------- Printing ---------- */
@page { size: letter portrait; margin: 0.4in; }
@media print {
  html, body { background: #fff !important; color: #111 !important; }
  body { min-height: 0; font-size: 12pt; }
  .page { max-width: none; padding: 0; margin: 0; }
  .landing-top, .site-foot, .print-controls { display: none !important; }
  .print-sheet { display: block; margin: 0; }
  body[data-print="caller"] #cards, body:not([data-print="caller"]) #caller { display: none !important; }
  body[data-print="caller"] #caller { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .bcard {
    width: 7in; height: 4.85in; max-width: none; margin: 0 auto 0.3in; padding: 0.12in 0.15in; border-radius: 0;
    display: flex; flex-direction: column; break-inside: avoid; page-break-inside: avoid; font-size: 10pt;
  }
  .bcard:nth-child(2n) { margin-bottom: 0; break-after: page; page-break-after: always; }
  .bcard:last-child { break-after: auto; page-break-after: auto; }
  .bcard header { margin-bottom: 0.03in; }
  .bcard-title { font-size: 15pt; }
  .bcard-set { font-size: 10pt; }
  .bcard-letters span { font-size: 18pt; padding: 0 0 0.03in; }
  .bcard-grid { flex: 1; grid-template-rows: repeat(5, 1fr); }
  .bcard-grid li { min-height: 0; font-size: 10pt; padding: 0.03in; }
  .bcard-grid .e { font-size: 17pt; }
  .bcard-grid li.free .e { font-size: 19pt; }
  .bcard footer { font-size: 7.5pt; margin-top: 0.04in; }

  .callsheet { width: 7.7in; max-width: none; padding: 0; border-radius: 0; font-size: 12pt; }
  .callsheet h2 { font-size: 20pt; margin-bottom: 0.08in; }
  .callsheet p { font-size: 11pt; }
  .callsheet ol { columns: 3; column-gap: 0.25in; font-size: 13pt; margin-top: 0.15in; }
  .callsheet li { padding: 0.12in 0; }
  .callsheet ol.many { columns: 5; column-gap: 0.18in; font-size: 12pt; }
  .callsheet ol.many li { padding: 0.055in 0; }
}

/* ---------- The live game (Phase 2): TV, joining, the phone card, results. App screens, no ads. ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; max-width: min(90vw, 32rem);
  background: var(--paper); color: var(--ink); border: 3px solid var(--deep); border-radius: 12px; padding: 10px 16px; font-weight: 650; box-shadow: var(--press-small); }
.bingo-screen .crumbs { margin-bottom: 4px; }
.bingo-setup { display: grid; gap: 8px; max-width: 30em; margin: 18px 0; }
.bingo-setup label.check { display: flex; gap: 10px; align-items: center; font-weight: 650; margin-top: 6px; }
.bingo-setup label.check input { width: 1.3em; height: 1.3em; }
.bingo-setup .btn { margin-top: 10px; justify-self: start; }
.bingo-setup .voice-picker { display: grid; gap: 8px; padding-left: 2.3em; }
.voice-picker[hidden] { display: none; }
.voice-row { display: flex; gap: 10px; align-items: center; }
.voice-row select { flex: 1; min-width: 0; }
.bingo-setup .voice-row .btn { margin-top: 0; }
.voice-note { margin: 0; font-size: 0.9em; }
.bingo-join { max-width: 26em; display: grid; gap: 8px; }
.bingo-join input#joinCode { font-size: 2rem; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 800; }

/* TV: lobby */
.bingo-lobby { display: grid; grid-template-columns: minmax(260px, 0.9fr) 1.1fr; gap: 36px; align-items: start; margin-top: 8px; }
.bingo-join-box { background: var(--night); border: 2px solid rgba(255, 246, 229, 0.14); border-radius: 20px; padding: 22px; text-align: center; }
.bingo-join-box .kicker, .winner-banner .kicker, .last-call .kicker { margin: 0; font-size: 0.85rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.join-url { font-size: clamp(1.05rem, 1.8vw, 1.5rem); font-weight: 800; margin: 6px 0 14px; overflow-wrap: anywhere; }
.code-big { font-size: clamp(2.4rem, 4.6vw, 4.2rem); margin-bottom: 18px; }
canvas.qr { width: min(240px, 60vw); height: auto; border-radius: 12px; image-rendering: pixelated; }
.bingo-lobby-side h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin-bottom: 10px; }
.bingo-players { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.bingo-players li { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); color: var(--ink); border: 2px solid var(--deep); border-radius: 999px; padding: 4px 6px 4px 14px; font-weight: 700; }
.bingo-players li.away { opacity: 0.55; }
.bingo-players .kick { appearance: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.3rem; line-height: 1; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.bingo-players .kick:hover, .bingo-players .kick:focus-visible { background: rgba(20, 24, 58, 0.12); }

/* TV: the caller (readable across a living room: the call scales with the screen) */
.bingo-tv .tv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: clamp(1rem, 1.6vw, 1.4rem); }
.bingo-tv .tv-top .code-tiles { font-size: 1.6em; }
.tv-meta, .tv-count { margin: 0; color: var(--paper-dim); font-weight: 650; }
.tv-count { margin-left: auto; color: var(--paper); font-weight: 800; }
.current-call { text-align: center; margin: 18px 0; padding: 20px 16px; background: var(--night); border: 2px solid rgba(255, 246, 229, 0.14); border-radius: 24px; }
.call-emoji { display: block; font-size: clamp(3.5rem, 9vw, 8rem); line-height: 1.1; }
.call-label { margin: 6px 0 0; font-weight: 800; font-stretch: 80%; line-height: 1.02; font-size: clamp(3rem, 8.5vw, 9rem); overflow-wrap: anywhere; }
.call-fact { margin: 14px auto 0; max-width: 40em; color: var(--paper-dim); font-size: clamp(1.1rem, 2.1vw, 1.8rem); }
.paused-note { margin: 12px 0 0; font-weight: 800; color: var(--accent); font-size: clamp(1.3rem, 2.5vw, 2rem); }
.winner-banner { text-align: center; margin: 14px 0 0; padding: 16px; border-radius: 20px; background: var(--accent); color: var(--ink); }
.winner-banner .kicker { color: var(--ink); font-size: clamp(1.4rem, 3vw, 2.4rem); }
.winner-names { margin: 4px 0 0; font-weight: 800; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.05; }
.tv-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 8px 0 18px; }
.check-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center; margin: 0 0 18px; }
.check-card input { width: 9em; }
.check-result { flex-basis: 100%; display: grid; justify-items: center; gap: 8px; }
.check-words { margin: 0; font-weight: 800; }
.check-result.won .check-words, .check-result.tie .check-words { color: var(--accent); }
.mini-card { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; width: min(100%, 520px); }
.mini-card li { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 4px 3px; font-size: 0.8rem; font-weight: 650; text-align: center; line-height: 1.15; min-height: 3.2em; display: grid; place-items: center; opacity: 0.5; }
.mini-card li.hit { opacity: 1; }
.mini-card li.line { outline: 3px solid var(--accent); outline-offset: -3px; }
.call-board { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.call-board li { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; border: 2px solid rgba(255, 246, 229, 0.12); color: var(--paper-dim); font-weight: 650; font-size: clamp(0.85rem, 1.2vw, 1.05rem); }
.call-board li.called { background: var(--paper); color: var(--ink); border-color: var(--deep); }
.call-board .mark { flex: none; width: 1.2em; font-weight: 900; }
/* Number bingo's board (a "columns" set): five rows, B to O, 15 numbers each. */
.number-board { display: grid; gap: 6px; align-content: start; }
.board-row { display: grid; grid-template-columns: 2.2em 1fr; gap: 8px; align-items: center; }
.board-letter { font-weight: 900; font-size: clamp(1.2rem, 2vw, 1.8rem); text-align: center; color: var(--accent); }
.call-board.letter-row { grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; }
.call-board.letter-row li { justify-content: center; padding: 6px 0; font-variant-numeric: tabular-nums; font-size: clamp(0.8rem, 1.3vw, 1.2rem); }

/* Phone: the card (portrait; a stamp shape marks a square, not only color) */
.bingo-phone { max-width: 560px; margin: 0 auto; }
.page.bingo-play-page { padding-left: 8px; padding-right: 8px; }
.last-call { text-align: center; background: var(--night); border: 2px solid rgba(255, 246, 229, 0.14); border-radius: 16px; padding: 10px 12px; }
.last-label { margin: 2px 0 0; font-size: clamp(1.5rem, 7vw, 2.2rem); font-weight: 800; line-height: 1.1; }
.play-status { text-align: center; font-weight: 750; margin: 12px 0 0; }
.play-status.win { color: var(--accent); font-size: 1.4rem; }
.phone-card { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
/* Number bingo on a phone: the B I N G O letters over the columns, and big numbers in the squares. */
.phone-letters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 12px 0 -8px; text-align: center; font-weight: 900; font-size: 1.4rem; color: var(--accent); }
.phone-card.numbers .sq-label { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.phone-card li { min-width: 0; }
.phone-card button { position: relative; appearance: none; width: 100%; aspect-ratio: 1 / 1.08; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 2px; border: 2px solid var(--deep); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; touch-action: manipulation; overflow: hidden; }
.phone-card .sq-emoji { font-size: 1.35rem; line-height: 1; }
/* 16 px; a label whose longest word doesn't fit steps down a size (bingo-play.js fitLabels), so words never split */
.phone-card .sq-label { font-size: 16px; font-weight: 700; line-height: 1.05; overflow-wrap: normal; word-break: normal; max-width: 100%; }
.phone-card .sq-label.px14 { font-size: 14px; }
.phone-card .sq-label.px12 { font-size: 12px; }
.phone-card .sq-label.px11 { font-size: 11px; }
.phone-card .sq-label.px10 { font-size: 10px; }
.phone-card .sq-label.hyph { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.phone-card button.marked { background: var(--lemon); }
.phone-card button.free { background: var(--accent); }
.phone-card .stamp { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; display: grid; place-items: center; font-size: 13px; font-weight: 900; line-height: 1;
  color: var(--paper); background: var(--ink); border-radius: 50%; pointer-events: none; }
.phone-card button.marked { box-shadow: inset 0 0 0 3px var(--ink); }
.phone-card.auto button { cursor: default; }
/* Always in reach: on a short phone the card pushes it below the fold, so it sticks to the bottom of the screen. */
.bingo-btn { width: 100%; font-size: 2rem; letter-spacing: 0.06em; position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 5; }
.bingo-btn:disabled { opacity: 0.4; }
.play-note { text-align: center; font-weight: 700; margin: 12px 0; padding: 10px; border-radius: 12px; background: var(--night); }
.play-note.win { background: var(--accent); color: var(--ink); }
.play-note.error { color: #ffc9c9; }

/* Results */
.winners { font-size: 1.4rem; font-weight: 750; }
.called-list { columns: 3 14em; column-gap: 24px; padding-left: 1.6em; }
.called-list li { break-inside: avoid; margin: 3px 0; }

@media (max-width: 760px) {
  .bingo-lobby { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Roomful Cards' site pages (/cards/ and /cards/<game>) ---------- */
.cards-info .game-facts { margin: 10px 0 0; color: var(--muted); font-weight: 650; }
.cards-info .chips-note { display: inline-block; margin: 14px 0 0; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--lemon); background: var(--night); font-weight: 700; }

/* ---------- Admin overview (/admin): Roomful Trivia's admin classes from site.css, plus these ---------- */
.admin-page main { max-width: 1100px; }
.admin-sign { max-width: 26em; }
.admin-sign .phone-card { display: grid; gap: 10px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.admin-head h1 { margin: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-page h2 { margin-top: 30px; }
.attention { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.attention li { background: var(--night); border: 2px solid var(--lemon); border-radius: 14px; padding: 10px 14px; }
.attention li.calm { border-color: rgba(255, 246, 229, 0.14); color: var(--paper-dim); }
.admin-page .columns.small { height: 90px; gap: 1px; }
.admin-page .columns.small .col-label { font-size: 0.65rem; }
.admin-page table.glance tr.section th { color: var(--paper); font-size: 0.95rem; padding-top: 16px; border-top: 0; }
.admin-page table.glance td:first-child { white-space: normal; min-width: 10em; }
.admin-page .stat-card .stat-tiles { margin-top: 4px; grid-template-columns: repeat(2, 1fr); }
.admin-page .toolbar { margin-bottom: 10px; }
