/* Base styles shared by all themes: font, layout skeleton, accessible defaults.
   Themes add their look in themes/<id>/theme.css. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #f6f3ec;
  --ink: #1d2420;
  --muted: #4c5650;
  --accent: #2f5d50;
  --accent-ink: #ffffff;
  --line: #c9c3b6;
  --drawn: #2f5d50;
  --drawn-ink: #ffffff;
  --radius: 14px;
  --panel: #ffffff;
  --panel-2: #e9e5dc;
  --selected: #eef5f1;
}

* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
/* Touch devices (iPad): no double-tap zoom on controls, no grey tap flash, no text selection on long press. */
button, .tile, .chip, .choice, .switch, .tb { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
html, body { margin: 0; }
body {
  font: 22px/1.4 var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
:focus-visible { outline: 4px solid #e0a526; outline-offset: 3px; }

button, select, input {
  font: inherit;
  color: inherit;
}
.btn {
  min-height: 64px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.btn-main {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 28px;
  padding: 16px 36px;
}
.btn:disabled { opacity: .5; cursor: default; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Number board: cells are rendered and sized by ui/board.js (sets --cell and the grid). */
.board { display: grid; gap: 6px; grid-template-columns: repeat(var(--cols, 10), var(--cell, 40px)); }
.board-letter {
  font-weight: 800; display: grid; place-items: center;
  width: var(--cell, 40px); height: var(--cell, 40px); font-size: calc(var(--cell, 40px) * .55);
}
.board-cell {
  width: var(--cell, 40px); height: var(--cell, 40px);
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  font-weight: 700;
  font-size: calc(var(--cell, 40px) * .42);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.board[data-layout="tall"] .board-letter { height: 100%; font-size: calc(var(--cell, 40px) * .95); }
.board-cell.is-drawn { background: var(--drawn); border-color: var(--drawn); color: var(--drawn-ink); }

/* Bingo card view: rendered by ui/card-view.js */
.card { display: inline-grid; border: 3px solid #1d2420; border-radius: 10px; overflow: hidden; background: #fff; color: #1d2420; }
.card-head { display: contents; }
.card-head span { font-weight: 800; text-align: center; padding: 6px 0; background: #1d2420; color: #fff; }
.card-cell {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.card-cell.is-empty { background: repeating-linear-gradient(45deg, #f1eee7 0 6px, #e6e1d6 6px 12px); }
.card-cell.is-free { font-size: 16px; }
.card-cell.is-marked { background: #cfe3da; }
.card-cell.is-winning { background: #2f5d50; color: #fff; }
.card-meta { font-size: 16px; color: var(--muted); margin-top: 6px; }
