@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-500.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-800.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/figtree-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/figtree-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/figtree-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kalam-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/kalam-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Game Night Pad: the scorepad on the table after dinner. Cool white paper, deep indigo ink, pencil red.
   One memorable element: every score sheet is a ruled pad page with a red margin, and the numbers are handwritten (Kalam). */
:root {
  --bg: #F4F5F9; --surface: #FFFFFF; --ink: #1E2235; --muted: #50566E; --line: #D5D9E6;
  --accent: #B8361F; --accent-ink: #FFFFFF; --rule: #C9D6EE; --margin: #E06A5A; --lead: #FFE9A8;
  --good: #1E7A4B; --watch: #8A5A00; --replace: #B3261E;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif; --font-body: 'Figtree', system-ui, sans-serif; --hand: 'Kalam', 'Comic Neue', cursive;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151826; --surface: #1D2133; --ink: #E7E9F3; --muted: #A9AEC6; --line: #33384F;
    --accent: #FF9A7A; --accent-ink: #1A0F0B; --rule: #2E3654; --margin: #A8473C; --lead: #4A3F12;
    --good: #7FD3A8; --watch: #F2C35B; --replace: #FF8A8E;
  }
}
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); }
header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo b { color: var(--accent); font-weight: 800; }
.logo .pad { width: 16px; height: 20px; border-radius: 2px; background: repeating-linear-gradient(to bottom, var(--surface) 0 4px, var(--rule) 4px 5px); border: 2px solid var(--ink); border-top-width: 4px; }
nav.top a { color: var(--muted); }
nav.top a[aria-current="page"] { color: var(--ink); font-weight: 700; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; }
h1 { font-size: clamp(32px, 5.4vw, 48px); line-height: 1.05; font-weight: 800; }
h2 { font-size: 26px; margin-top: 44px; font-weight: 700; }
h3 { font-size: 19px; }
.lede { color: var(--muted); max-width: 60ch; }
a { color: var(--accent); text-underline-offset: 3px; }
details { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 0; }
.tool { border-radius: 10px; box-shadow: none; }
.g-title { font-family: var(--font-display); font-weight: 700; margin: 0 0 8px; }
.big { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin: 8px 0; }
.big.bad { color: var(--replace); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost.sm, button.sm { min-height: 38px; padding: 0 12px; font-size: 15px; }
a.btnlink { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.field-inline { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; }
.field-inline label { font-weight: 600; font-size: 15px; }
.field-inline input, .field-inline select { width: auto; min-height: 40px; }
.chk { display: inline-flex; gap: 6px; align-items: center; margin: 4px 16px 4px 0; font-weight: 500; }
.chk input { width: auto; min-height: 0; }

/* players */
.plist { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.plist li { display: flex; gap: 4px; align-items: center; }
.plist input { width: 140px; min-height: 38px; }
.sk-opts { margin: 10px 0; }

/* ---- The signature: the ruled pad ---- */
table.scores { border-collapse: collapse; width: auto; min-width: 100%; background: var(--surface); }
table.scores tr > :first-child { border-right: 2px solid var(--margin); padding-right: 12px; }
table.scores th, table.scores td { border: 0; border-bottom: 1px solid var(--rule); padding: 2px 6px; background: transparent; }
table.scores thead th { font-family: var(--font-display); font-weight: 700; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.scores tbody th, table.scores tfoot th { font-weight: 600; font-size: 15px; text-align: left; white-space: nowrap; }
table.scores input { font-family: var(--hand); font-size: 22px; font-weight: 700; color: var(--ink); background: transparent; border: 0; border-radius: 4px; min-height: 38px; width: 78px; text-align: right; padding: 0 6px; }
table.scores input::placeholder { font: 14px var(--font-body); color: var(--muted); }
table.scores input:hover { background: color-mix(in srgb, var(--rule) 40%, transparent); }
table.scores td.num { font-family: var(--hand); font-size: 20px; text-align: right; }
table.scores tr.sub th, table.scores tr.sub td { color: var(--muted); font-size: 15px; }
table.scores tfoot td, table.scores tfoot th { border-top: 2px solid var(--ink); border-bottom: 0; }
table.scores td.total { font-family: var(--hand); font-weight: 700; font-size: 24px; }
table.scores td.lead { background: var(--lead); border-radius: 4px; }
.sk-lead { font-weight: 600; min-height: 1.4em; }
.yz-helper { margin: 10px 0 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; }
.yz-choices { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

/* farkle dice */
.dice-shown, .dice-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; min-height: 56px; align-items: center; }
button.die { font-size: 44px; line-height: 1; min-height: 56px; min-width: 56px; padding: 0 4px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; }
.dice-pick button.die { border-style: dashed; color: var(--muted); }
.rules-opts form { display: block; }

/* cribbage */
.crib-form { display: flex !important; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
fieldset.card-pick { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 0; display: flex; gap: 4px; }
fieldset.card-pick legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
fieldset.card-pick select { width: auto; min-height: 40px; }
.cb-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; margin: 10px 0; }
.cb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-bar { height: 22px; border-radius: 11px; background: repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px calc(100% / 24)); border: 1px solid var(--line); overflow: hidden; display: block; }
.cb-fill { display: block; height: 100%; background: var(--accent); border-radius: 11px; }
.p1 .cb-fill { background: #2F5DA8; } .p2 .cb-fill { background: #1E7A4B; }
.cb-score { font-family: var(--hand); font-size: 26px; text-align: right; }
.cb-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.cb-add .cb-name { width: 110px; }
.cb-add input { width: 64px; min-height: 38px; }

/* phase 10 */
ol.phases { font-size: 19px; line-height: 1.7; }
fieldset.p10-player { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
fieldset.p10-player legend { font-weight: 700; }
fieldset.p10-player input.num { width: 90px; }
.p10-round { display: block !important; margin-top: 14px; }
.p10-calc { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

/* catan */
svg.catan { width: 100%; max-width: 620px; height: auto; display: block; margin: 0 auto; }
.cat-opts { display: block !important; margin: 10px 0; }

/* poker */
table.hands td.cards { font-size: 19px; white-space: nowrap; }
table.hands .red { color: var(--replace); }
.poker-form { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
@media (max-width: 720px) { .poker-form { grid-template-columns: 1fr; } }

ul.gamelist { list-style: none; padding: 0; }
ul.gamelist li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
ul.gamelist a { font-weight: 700; font-size: 18px; }
ul.gamelist span { color: var(--muted); }

/* printing: blank sheets only show on paper */
.printsheet { display: none; }
@media print {
  header.site, footer.site, nav, .ad-slot, .skip, .tool, details, .row-btns, button, .hello, h2, .gamelist, .shop { display: none !important; }
  main:has(.printsheet) .wrap > *:not(.printsheet) { display: none !important; }
  main:has(.printsheet) .printsheet { display: block !important; }
  main:not(:has(.printsheet)) .wrap > *:not(h1):not(.lede):not(.table-scroll:has(table.hands)) { display: none !important; }
  .printsheet table { width: 100%; border-collapse: collapse; }
  .printsheet th, .printsheet td { border: 1px solid #000; height: 28px; padding: 2px 6px; font: 13px var(--font-body); text-align: left; }
  .printsheet .ps-title { font: 800 24px var(--font-display); margin: 0 0 8px; }
  .printsheet .ps-foot { font-size: 11px; color: #555; margin-top: 6px; }
  body { background: #fff; color: #000; }
}
