/* FamilyGameRules.com
   Layout: a felt "table" hero that shows the game's own pieces, then one reading column
   with a sticky contents rail on wide screens. Tokens first; see docs/DESIGN.md. */

@font-face { font-family: "Coustard"; src: url("fonts/coustard-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #FFFFFF;
  --paper-2: #F3F7F4;
  --ink: #1B2420;
  --ink-soft: #55625B;
  --rule: #D9E1DC;
  --felt: #1E6A4C;
  --felt-hi: #2A7E5D;
  --felt-ink: #FFFFFF;
  --felt-soft: rgba(255, 255, 255, .82);
  --felt-line: rgba(255, 255, 255, .2);
  --rail: #6B4428;
  --rail-hi: #8E5E39;
  --link: #19694A;
  --link-hover: #0E5034;
  --on-link: #FFFFFF;
  --red: #C2302C;
  --tint: #EAF3EE;
  --focus: #E3A21F;
  --shadow: rgba(10, 30, 20, .45);

  --display: "Coustard", "Rockwell", "Roboto Slab", Georgia, serif;
  --text: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --wide: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121815;
    --paper-2: #1A221E;
    --ink: #E5ECE8;
    --ink-soft: #A2B0A8;
    --rule: #2C3732;
    --felt: #1B5C43;
    --felt-hi: #236B50;
    --rail: #5A3922;
    --rail-hi: #74492A;
    --link: #7BD1A8;
    --link-hover: #A5E4C5;
    --on-link: #0D1A13;
    --red: #EF6A63;
    --tint: #18261F;
    --shadow: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
  font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
}
img { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { width: min(var(--wide), 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper); color: var(--ink); padding: .5rem .8rem; z-index: 10; }
.skip:focus { left: .5rem; }
.red { color: var(--red); }
.suit { font-family: "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", var(--text); }
.muted { color: var(--ink-soft); }
.small { font-size: 1rem; }

/* ------------------------------------------------------------------ site header */
.site-head { background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 2.1rem; height: 2.1rem; flex: none; }
.brand span { font: 900 clamp(1.05rem, .8rem + 1.3vw, 1.3rem)/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.site-nav { display: flex; gap: 1.25rem; font-weight: 600; font-size: 1rem; }
.site-nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--link); text-decoration: underline; }
.site-nav .wide-only { display: none; }
@media (min-width: 48rem) { .site-nav .wide-only { display: inline; } }
@media (max-width: 22rem) { .site-head .wrap { gap: .6rem; } .brand { gap: .45rem; } .brand svg { width: 1.8rem; height: 1.8rem; } .brand span { font-size: 1rem; } }

/* ------------------------------------------------------------------ the felt table */
.felt {
  background-color: var(--felt);
  background-image:
    radial-gradient(110% 80% at 18% 0%, var(--felt-hi) 0%, transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  color: var(--felt-ink);
}
.rail-bottom { border-bottom: 12px solid var(--rail); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.rail-top { border-top: 12px solid var(--rail); }
.felt a { color: var(--felt-ink); }
.felt a:hover { color: var(--felt-ink); }

.felt { overflow-x: clip; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem 3.5rem; padding-block: 1.1rem 2.25rem; }
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; padding-block: 1.75rem 3rem; }
  .game-hero { grid-template-areas: "head spread" "facts spread"; align-items: start; row-gap: 0; }
  .game-hero .hero-head { grid-area: head; }
  .game-hero .spread { grid-area: spread; align-self: center; }
  .game-hero .hero-facts { grid-area: facts; }
}
.hero-head, .hero-facts { min-width: 0; }
.hero-facts .facts { margin-top: .25rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .55rem; padding: 0; margin: 0 0 .75rem; font-size: .95rem; color: var(--felt-soft); }
.crumbs li + li::before { content: "/"; margin-right: .55rem; opacity: .55; }
.crumbs a { color: var(--felt-soft); }
.hero h1 { font: 900 clamp(2.6rem, 1.9rem + 3.4vw, 4.4rem)/1.02 var(--display); letter-spacing: -.012em; margin: 0 0 .7rem; text-wrap: balance; }
.lede { font-size: 1.2rem; line-height: 1.55; max-width: 36rem; margin: 0 0 .6rem; color: var(--felt-soft); }
.aka { font-size: 1rem; margin: 0 0 1.25rem; color: var(--felt-soft); }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem 1.75rem; margin: 1.1rem 0 0; max-width: 42rem; }
@media (min-width: 40rem) { .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.facts div { border-top: 1px solid var(--felt-line); padding-top: .45rem; min-width: 0; }
.facts dt { font-size: .95rem; font-weight: 600; color: var(--felt-soft); }
.facts dd { margin: 0; font-size: 1.05rem; line-height: 1.45; }
.brand-note { font-size: .9rem; color: var(--felt-soft); margin: 1.25rem 0 0; max-width: 40rem; }

/* pieces laid on the table */
.spread { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; min-width: 0; }
.spread .pieces { display: flex; justify-content: center; align-items: flex-end; gap: 1.75rem; max-width: 100%; }
.spread img { display: block; height: auto; filter: drop-shadow(0 9px 9px var(--shadow)); }
.spread figcaption { font-size: .95rem; line-height: 1.45; color: var(--felt-soft); text-align: center; max-width: 27rem; }
.layout-fan .pieces { padding-top: 1.2rem; }
.layout-fan.kind-sorry .pieces { gap: .4rem; }  /* the Sorry cards are wider than playing cards */
.layout-fan { --card: clamp(4.6rem, 3.4rem + 4vw, 7.4rem); --step: 5deg; }
@media (min-width: 40rem) { .layout-fan { --step: 7deg; } }
.layout-fan img { width: var(--card); margin-inline: calc(var(--card) * -.22); transform: rotate(calc(var(--i, 0) * var(--step))); transform-origin: 50% 135%; }
.layout-melds .pieces { flex-wrap: wrap; row-gap: 1rem; }
.layout-melds .meld { display: flex; }
.layout-melds img { width: clamp(4.2rem, 3.2rem + 3.4vw, 6.4rem); }
.layout-melds img + img { margin-left: calc(clamp(4.2rem, 3.2rem + 3.4vw, 6.4rem) * -.45); }
.layout-dice .pieces { gap: clamp(.55rem, .3rem + 1vw, .8rem); flex-wrap: wrap; }
.layout-dice img { width: clamp(2.85rem, 2rem + 3vw, 5rem); transform: rotate(var(--r, 0deg)); }
.layout-dice img.token { width: auto; height: clamp(2.6rem, 1.9rem + 3vw, 5rem); }
.layout-dice img.pit { width: auto; height: clamp(3.6rem, 2.6rem + 3.4vw, 5.8rem); }
.layout-dice img.chip { width: auto; height: clamp(2.2rem, 1.6rem + 2vw, 3.6rem); }
.layout-dice img.tile, .layout-line img.tile, .layout-melds img.tile { width: auto; height: clamp(4.2rem, 3.2rem + 3.4vw, 6.4rem); }
.layout-melds img.tile + img.tile { margin-left: .2rem; }
.layout-line[class*="kind-"] .pieces { width: 100%; }
.layout-line img.tile { height: auto; width: min(4.4rem, calc(100% / var(--n, 9) - .2rem)); margin-inline: .1rem; }
.layout-line .pieces { align-items: center; gap: 0; }
.layout-line img.h { height: clamp(2.6rem, 2rem + 1.8vw, 3.6rem); width: auto; }
.layout-line img.v { height: clamp(5.2rem, 4rem + 3.6vw, 7.2rem); width: auto; margin-inline: .1rem; }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .65); }

/* ------------------------------------------------------------------ page body */
.page { width: min(var(--wide), 100% - 2rem); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 1.5rem 4.5rem; }
@media (min-width: 64rem) {
  .page { grid-template-columns: 12.5rem minmax(0, 44rem); gap: 4rem; justify-content: center; padding-top: 2.75rem; }
}
.toc h2 { font: 700 .95rem/1.3 var(--text); color: var(--ink-soft); margin: 0 0 .5rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: flex; gap: .25rem 1.1rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: .4rem; }
.toc a { display: block; white-space: nowrap; color: var(--ink-soft); text-decoration: none; font-size: 1rem; font-weight: 600; padding: .2rem 0; border-bottom: 3px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--felt); }
@media (max-width: 63.99rem) { .toc { border-bottom: 1px solid var(--rule); } }
@media (min-width: 64rem) {
  .toc { position: sticky; top: 1.5rem; align-self: start; }
  .toc ol { flex-direction: column; overflow: visible; }
  .toc a { white-space: normal; border-bottom: 0; border-left: 3px solid transparent; padding: .28rem 0 .28rem .75rem; font-weight: 400; }
  .toc a[aria-current="true"] { border-left-color: var(--felt); font-weight: 600; }
}

.rules { min-width: 0; }
.rules > section { scroll-margin-top: 1rem; }
.rules > section + section, .rules > .ad-slot + section { margin-top: 3.75rem; }
.rules h2 { font: 900 clamp(1.75rem, 1.5rem + 1vw, 2.15rem)/1.15 var(--display); letter-spacing: -.005em; margin: 0 0 1rem; text-wrap: balance; }
.rules h3 { font: 700 1.375rem/1.3 var(--text); margin: 0 0 .35rem; text-wrap: balance; }
.rules p { margin: 0 0 .9rem; max-width: var(--measure); }
.rules ul, .rules ol { max-width: var(--measure); }
.lead { font-size: 1.2rem; }

/* quick start: the six steps, big numerals */
.qs { list-style: none; counter-reset: qs; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem 2.25rem; max-width: none; }
@media (min-width: 46rem) { .qs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.qs li { counter-increment: qs; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .6rem; align-items: start; }
.qs li::before { content: counter(qs); font: 900 2.5rem/.95 var(--display); color: var(--red); text-align: center; }

/* numbered steps */
.steps { list-style: none; counter-reset: st; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: 1rem; }
.steps > li { counter-increment: st; position: relative; padding-left: 2.6rem; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: -.05em; width: 2rem; text-align: center; font: 900 1.6rem/1.2 var(--display); color: var(--red); }
.steps.play { gap: 2rem; }
.steps.play > li::before { top: .02em; }
.more { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: .35rem; font-size: 1.05rem; }
.more li::marker { color: var(--rule); }
.notes { padding-left: 1.1rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: .4rem; margin: 1rem 0; }

/* printables */
.sheets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto; gap: .7rem 1.75rem; max-width: 36rem; margin-top: 1.25rem; }
.sheet { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: .7rem; min-width: 0; }
.sheet .thumb { align-self: end; display: block; border-radius: 4px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--rule), 0 16px 28px -16px var(--shadow); transition: transform .15s ease; }
.sheet .thumb img { display: block; width: 100%; height: auto; border-radius: 4px; }
@media (hover: hover) { .sheet .thumb:hover { transform: translateY(-3px); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem; padding: .55rem 1rem; border-radius: 7px; background: var(--link); color: var(--on-link); font-weight: 700; font-size: 1.02rem; line-height: 1.2; text-decoration: none; text-align: center; }
.btn:hover { background: var(--link-hover); color: var(--on-link); text-decoration: none; }
.btn small { font-weight: 400; opacity: .85; }
.sheet .meta { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; max-width: 44rem; }
table { border-collapse: collapse; width: 100%; font-size: 1.05rem; line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
caption { text-align: left; font-weight: 700; font-size: 1.1rem; padding-bottom: .45rem; }
th, td { text-align: left; vertical-align: top; padding: .5rem .9rem .5rem 0; border-bottom: 1px solid var(--rule); }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid var(--ink); white-space: nowrap; vertical-align: bottom; }
td.num, th.num { text-align: right; white-space: nowrap; }
@media (max-width: 40rem) { thead th, th.num { white-space: normal; } }
/* the sources table stacks on phones: one block per topic, each value labeled */
@media (max-width: 40rem) {
  table.diff, .diff tbody, .diff tr, .diff td { display: block; }
  .diff thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .diff tr { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
  .diff td { border: 0; padding: .15rem 0; }
  .diff td:first-child { font-weight: 700; padding-bottom: .3rem; }
  .diff td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-soft); }
}
tr.total td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
tr.total + tr.total td { border-top: 0; padding-top: .2rem; }

/* diagrams */
.diagram { margin: 1.25rem 0 .5rem; padding: .85rem 1.1rem 1rem; background: var(--paper-2); border-radius: 12px; max-width: 44rem; }
.example .diagram { background: var(--paper); }
.dg { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; padding-block: .45rem; }
@media (min-width: 40rem) {
  .dg { grid-template-columns: 10.5rem minmax(0, 1fr); column-gap: 1rem; align-items: center; }
  .dg-note { grid-column: 2; }
}
.dg-label { font-weight: 600; font-size: 1rem; line-height: 1.35; margin: 0; }
.dg-pieces { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; min-width: 0; }
.dg-pieces img { display: block; height: auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .14)); }
.dg-pieces img.card { width: 3.4rem; }
.dg-pieces img.die { width: 2.6rem; }
.dg-pieces img.v { width: 2.25rem; }
.dg-pieces img.h { width: 4.5rem; }
.dg-pieces.stack { flex-wrap: nowrap; gap: 0; }
.dg-pieces.stack img + img { margin-left: -2.55rem; }
.dg-pieces.line { gap: 0; flex-wrap: nowrap; }
.dg-pieces.line img { flex-shrink: 1; min-width: 0; }
.dg-pieces.line img.v { margin-inline: .08rem; }
.dg-pieces img.tile { width: auto; height: 3.5rem; }
.dg-pieces img.token { width: auto; height: 2.4rem; }
.dg-pieces img.chip { width: auto; height: 1.9rem; }
.dg-pieces img.pit { width: auto; height: 3.4rem; }
/* boards: the drawing keeps its own light frame in dark mode, like the pieces */
.dg-board { margin: .15rem 0 .5rem; min-width: 0; }
.dg-board img { display: block; width: 100%; height: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .16)); }
.dg-board-checkers img { max-width: 26rem; }
.dg-board-backgammon img { max-width: 38rem; }
.dg-board-mancala img { max-width: 40rem; }
@media (max-width: 30rem) { .dg-board { margin-inline: -.6rem; } }
.dg-note { font-size: .98rem; line-height: 1.45; color: var(--ink-soft); margin: 0; }
.diagram figcaption { font-size: .98rem; line-height: 1.45; color: var(--ink-soft); margin-top: .45rem; }

/* worked examples */
.example { margin: 1.75rem 0 .5rem; padding: 1.25rem 1.3rem 1.1rem; background: var(--tint); border-radius: 14px; max-width: 44rem; }
.example h3 { margin-top: 0; }
.example p { max-width: none; }
.example .table-wrap { margin-bottom: .25rem; }

.win { font-size: 1.15rem; font-weight: 600; }

/* other ways to play, questions, words */
.version + .version { margin-top: 1.6rem; }
.house { margin: 1.25rem 0 0; display: flex; flex-direction: column; gap: 1rem; max-width: var(--measure); }
.house dt { font-weight: 700; }
.house dd { margin: 0; }
.qa + .qa { margin-top: 1.6rem; }
.words { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem 2.25rem; max-width: 44rem; }
@media (min-width: 46rem) { .words { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.words dt { font-weight: 700; }
.words dd { margin: 0; color: var(--ink-soft); }

/* what you need */
.need { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: 1rem; max-width: var(--measure); }
.need li { display: grid; gap: .15rem; }
.need strong { font-size: 1.1rem; }
.need span { color: var(--ink-soft); }

/* checked against */
.checked { background: var(--paper-2); border-radius: 14px; padding: 1.4rem 1.4rem 1.2rem; max-width: 44rem; }
.checked ol { padding-left: 1.3rem; display: flex; flex-direction: column; gap: .6rem; font-size: 1.02rem; }
.checked .role { font-weight: 600; }
.checked details { border-top: 1px solid var(--rule); padding-block: .75rem; }
.checked details:last-of-type { border-bottom: 1px solid var(--rule); }
.checked summary { cursor: pointer; font-weight: 700; }
.checked details[open] summary { margin-bottom: .6rem; }
.checked table { font-size: .98rem; }
.checked .notes { color: var(--ink); }

.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-weight: 600; font-size: 1.1rem; }

/* placeholders shown only in the preview build */
/* a live ad slot takes no room and shows no label until Google fills it, so an unfilled slot leaves no gap */
.ad-slot { margin: 0; max-width: 44rem; }
.ad-slot::before { content: "Advertisement"; display: none; font-size: .8rem; color: var(--ink-soft); margin-bottom: .25rem; }
.ad-slot:has(ins[data-ad-status="filled"]) { margin-top: 3rem; min-height: 120px; }
.ad-slot:has(ins[data-ad-status="filled"])::before { display: block; }
.ad-slot ins[data-ad-status="unfilled"] { display: none !important; }
/* the preview shows where ads will go */
.ad-demo { margin: 3rem 0 0; min-height: 280px; border: 2px dashed var(--rule); border-radius: 10px; color: var(--ink-soft); font-size: .95rem; display: grid; place-items: center; align-content: center; }
.ad-demo::before { display: block; align-self: end; }
.buy { display: inline-block; margin-top: .15rem; font-weight: 700; }
.affil { max-width: var(--measure); }
.placeholder { border: 2px dashed var(--rule); border-radius: 14px; padding: 1.25rem 1.3rem; max-width: 44rem; }
.placeholder p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ home */
.home-hero { padding-block: 1.75rem 2.5rem; }
.home-hero h1 { font-size: clamp(2.4rem, 1.7rem + 2.9vw, 3.75rem); }
.home-hero .lede { color: var(--felt-soft); }
.find { margin-top: 1.5rem; max-width: 30rem; }
.find label { display: block; font-weight: 600; margin-bottom: .4rem; }
.find input { width: 100%; font: 400 1.15rem/1.3 var(--text); padding: .8rem 1rem; border-radius: 8px; border: 2px solid transparent; background: #FFFFFF; color: #1B2420; }
.find input::placeholder { color: #6A766F; }
.find input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.players-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: 1.1rem; max-width: 30rem; }
.players-filter span { flex-basis: 100%; font-weight: 600; }
.players-filter button { flex: 1 1 0; min-width: 0; max-width: 3.4rem; font: 600 1rem/1 var(--text); min-height: 2.6rem; padding: .5rem .25rem; border-radius: 7px; border: 1px solid var(--felt-line); background: transparent; color: var(--felt-ink); cursor: pointer; }
.players-filter button[aria-pressed="true"] { background: var(--felt-ink); color: var(--felt); border-color: var(--felt-ink); }
.home-main { width: min(64rem, 100% - 2rem); margin-inline: auto; padding-block: 2.75rem 4.5rem; }
.index-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.index-group + .index-group { margin-top: 3.5rem; }
@media (min-width: 56rem) {
  .index-group { grid-template-columns: 18rem minmax(0, 1fr); gap: 2.75rem; align-items: start; }
  .group-photo { position: sticky; top: 1.5rem; }
}
.group-photo { margin: 0; }
.group-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 10px; }
@media (min-width: 56rem) { .group-photo img { aspect-ratio: 4 / 3; } }
.group-body { min-width: 0; }
.index-group h2 { font: 900 clamp(1.75rem, 1.5rem + 1vw, 2.15rem)/1.15 var(--display); margin: 0 0 .35rem; }
.group-blurb { color: var(--ink-soft); margin: 0 0 .5rem; }
.sub h3 { font: 700 1.05rem/1.3 var(--text); color: var(--ink-soft); margin: 1.1rem 0 0; }
.idx { list-style: none; margin: 0; padding: 0; }
.idx a { display: grid; grid-template-columns: auto minmax(1rem, 1fr) auto; grid-template-areas: "name lead players" "desc desc desc"; align-items: baseline; column-gap: .75rem; padding-block: .8rem; color: inherit; text-decoration: none; }
.idx-name { grid-area: name; font: 900 1.6rem/1.15 var(--display); }
.idx-lead { grid-area: lead; border-bottom: 3px dotted var(--rule); transform: translateY(-.3em); }
.idx-players { grid-area: players; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.idx-desc { grid-area: desc; color: var(--ink-soft); font-size: 1.02rem; margin-top: .15rem; }
.idx a:hover .idx-name { color: var(--link); }
.idx a:hover .idx-lead { border-bottom-color: var(--link); }
.idx-empty { color: var(--ink-soft); }
.printables-note { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.printables-note h2 { font: 900 clamp(1.75rem, 1.5rem + 1vw, 2.15rem)/1.15 var(--display); margin: 0 0 .5rem; }

/* ------------------------------------------------------------------ footer */
.site-foot { padding-block: 2.25rem 2.5rem; }
.site-foot .wrap { display: grid; gap: 2rem; }
@media (min-width: 62rem) { .site-foot .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); align-items: start; column-gap: 3rem; } }
.site-foot .brand { color: var(--felt-ink); }
.site-foot .brand svg { width: 2.4rem; height: 2.4rem; }
.site-foot p { margin: .6rem 0 0; color: var(--felt-soft); font-size: 1rem; max-width: 30rem; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem 1.5rem; }
@media (min-width: 46rem) { .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot-cols h2 { font: 700 .95rem/1.3 var(--text); color: var(--felt-soft); margin: 0 0 .6rem; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; font-weight: 600; font-size: 1rem; line-height: 1.35; }
.site-foot .copy { grid-column: 1 / -1; max-width: none; margin: 0; padding-top: 1.1rem; border-top: 1px solid var(--felt-line); font-size: .9rem; }

/* ------------------------------------------------------------------ other pages: hubs, score sheets, reference, site pages */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page-hero h1 { font-size: clamp(2.3rem, 1.75rem + 2.7vw, 3.6rem); }
.page-hero.no-art { padding-bottom: 2.75rem; }
@media (min-width: 62rem) { .page-hero.no-art { grid-template-columns: minmax(0, 1fr); } }
.page-hero .brand-note { margin-top: .4rem; }
.page-single { grid-template-columns: minmax(0, 44rem); justify-content: center; }
@media (min-width: 64rem) { .page-single { grid-template-columns: minmax(0, 44rem); } }
.btn-paper, .felt a.btn-paper { background: #FFFFFF; color: #134A33; }
.btn-paper:hover, .felt a.btn-paper:hover { background: #E4EFE9; color: #134A33; }
.page-hero .layout-dice img.token { height: clamp(3rem, 2rem + 4vw, 6.5rem); }
@media (max-width: 30rem) { .page-hero .layout-fan .pieces { gap: .5rem; } }

/* a printable lying on the felt */
.hero-sheet { margin: 0; display: grid; justify-items: center; gap: 1.1rem; }
.hero-sheet .thumb { display: block; width: min(100%, 21rem); background: #FFFFFF; border-radius: 3px; transform: rotate(-1.4deg); box-shadow: 0 26px 40px -22px rgba(0, 0, 0, .7); transition: transform .2s ease; }
.hero-sheet .thumb:hover { transform: rotate(0deg) translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .hero-sheet .thumb, .hero-sheet .thumb:hover { transition: none; } }
.hero-sheet img { display: block; width: 100%; height: auto; border-radius: 3px; }
.hero-sheet figcaption { display: grid; justify-items: center; gap: .45rem; text-align: center; font-size: .95rem; color: var(--felt-soft); }
.hero-sheet .thumb.wide { width: min(100%, 30rem); }

.page-body .plain-list { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .45rem; margin: 0 0 1rem; }
.page-body .steps { margin: 1rem 0 1.25rem; }
.callout { background: var(--tint); border-left: 4px solid var(--felt); border-radius: 0 10px 10px 0; padding: .9rem 1.15rem; font-weight: 600; }
.link-list { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-weight: 600; font-size: 1.08rem; }
.email-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.1rem; }
.email-address { font-weight: 600; user-select: all; }
.brand-list { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .9rem; max-width: var(--measure); }
.brand-list li { display: grid; gap: .1rem; }
.brand-list span { color: var(--ink-soft); font-size: 1.02rem; }

/* the list of games on a hub */
.gcards { list-style: none; padding: 0; margin: 1rem 0 0; max-width: 44rem; }
.gcard { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 1.1rem; align-items: start; padding-block: 1.15rem; border-top: 1px solid var(--rule); }
.gcard:last-child { border-bottom: 1px solid var(--rule); }
.gc-icon { display: block; width: 100%; max-height: 4.6rem; object-fit: contain; object-position: center top; filter: drop-shadow(0 4px 5px rgba(10, 30, 20, .28)); }
.gc-icon.gc-dice, .gc-icon.gc-lcr, .gc-icon.gc-checkers, .gc-icon.gc-pawns, .gc-icon.gc-mancala { width: 80%; margin-inline: auto; }
.gc-body { min-width: 0; }
.rules .gcard h3 { font: 900 1.55rem/1.15 var(--display); margin: 0 0 .25rem; }
.gcard h3 a { color: var(--ink); text-decoration: none; }
.gcard h3 a:hover { color: var(--link); text-decoration: underline; }
.rules .gc-meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: 0 0 .35rem; font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.gc-best { color: var(--felt); background: var(--tint); border-radius: 999px; padding: 0 .6rem; }
@media (prefers-color-scheme: dark) { .gc-best { color: var(--link); } }
.rules .gc-desc { margin: 0 0 .45rem; }
.rules .gc-note { margin: -.2rem 0 .45rem; font-size: 1rem; color: var(--ink-soft); }
.rules .gc-links { display: flex; flex-wrap: wrap; gap: .25rem 1.15rem; margin: 0; font-size: 1rem; font-weight: 600; }

/* a printable inside the page */
.pcard { display: grid; grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; margin: 1.25rem 0; max-width: 44rem; }
@media (max-width: 30rem) { .pcard { grid-template-columns: minmax(0, 1fr); } .pcard .thumb { max-width: 13rem; } }
.pcard .thumb { display: block; background: #FFFFFF; border-radius: 4px; box-shadow: 0 0 0 1px var(--rule), 0 16px 28px -16px var(--shadow); }
.pcard .thumb img { display: block; width: 100%; height: auto; border-radius: 4px; }
.rules .pcard h3 { margin-top: .1rem; }
.pcard .meta { font-size: .95rem; color: var(--ink-soft); margin: .6rem 0 0; }

/* every printable, by kind of game */
.print-group + .print-group { margin-top: 2.25rem; }
.rules .print-group h3 { font: 900 1.4rem/1.2 var(--display); margin: 0 0 .9rem; scroll-margin-top: 1rem; }
.print-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.6rem 1.25rem; max-width: 44rem; }
.rules .pg-name { margin: 0 0 .45rem; font-weight: 700; line-height: 1.3; }
.pg-sheets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; align-items: end; }
.pg-sheet { display: grid; gap: .3rem; text-decoration: none; color: var(--ink-soft); font-size: .88rem; font-weight: 600; }
.pg-sheet img { display: block; width: 100%; height: auto; background: #FFFFFF; border-radius: 3px; box-shadow: 0 0 0 1px var(--rule), 0 8px 14px -10px var(--shadow); }
.pg-sheet:hover { color: var(--link); }

/* home: links to the hubs and printables */
.group-more { margin: .9rem 0 0; font-weight: 600; }
.players-note { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.players-note h2 { font: 900 clamp(1.75rem, 1.5rem + 1vw, 2.15rem)/1.15 var(--display); margin: 0 0 .9rem; }
.player-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.player-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--rule); font-weight: 700; text-decoration: none; color: var(--ink); }
.player-links a:hover { border-color: var(--link); color: var(--link); }

/* ------------------------------------------------------------------ 404 */
.notfound { width: min(40rem, 100% - 2rem); margin: 0 auto; padding-block: 3rem 5rem; }
.notfound h1 { font: 900 clamp(2.2rem, 1.8rem + 2vw, 3rem)/1.1 var(--display); margin: 0 0 1rem; }

/* ------------------------------------------------------------------ print the web page */
/* hero shortcuts on game pages */
.hero-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.hero-links a { display: inline-flex; align-items: center; min-height: 2.6rem; padding: .45rem 1.05rem; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .65); font-weight: 700; text-decoration: none; }
.hero-links a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.hero-links a:first-child { background: #FFFFFF; color: #134A33; border-color: #FFFFFF; }
.hero-links a:first-child:hover { background: #E4EFE9; color: #134A33; }

/* plain pages (preview: try the scorekeepers) */
.plain { width: min(44rem, 100% - 2rem); margin: 0 auto; padding-block: 2.5rem 4.5rem; }
.plain h1 { font: 900 clamp(2.2rem, 1.8rem + 2vw, 3rem)/1.1 var(--display); margin: 0 0 1rem; }
.plain h2 { font: 900 1.8rem/1.2 var(--display); margin: 3rem 0 .75rem; }
.try-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .1rem; }
.try-list li { display: grid; gap: .1rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.try-list a { font: 900 1.25rem/1.2 var(--display); text-decoration: none; }
.try-list span { color: var(--ink-soft); font-size: 1rem; }

/* ------------------------------------------------------------------ scorekeeper */
.sk { margin-top: 1.25rem; max-width: 44rem; }
.sk-nojs { border: 2px dashed var(--rule); border-radius: 12px; padding: 1rem 1.2rem; }
.sk-table { border-radius: 16px; padding: 1rem; border-bottom: 10px solid var(--rail); box-shadow: 0 22px 34px -26px var(--shadow); display: grid; gap: 1rem; min-width: 0; }
@media (min-width: 40rem) { .sk-table { padding: 1.25rem 1.4rem 1.35rem; } }
.sk-table > * { min-width: 0; }
.sk-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the players' cards on the table */
.sk-sides { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 34rem) {
  .sk-sides.sk-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sk-sides.sk-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sk-side { background: #FBFCFB; color: #1B2420; border-radius: 10px; padding: .65rem .75rem .7rem; box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 12px 20px -14px rgba(0, 0, 0, .7); display: grid; gap: .4rem; align-content: start; min-width: 0; }
@media (prefers-color-scheme: dark) { .sk-side { background: #EEF2EF; } }
.sk-pick { all: unset; display: grid; gap: .35rem; cursor: pointer; border-radius: 6px; }
.sk-pick:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sk-chosen { box-shadow: 0 0 0 3px var(--focus), 0 12px 20px -14px rgba(0, 0, 0, .7); }
.sk-current { box-shadow: 0 0 0 3px var(--focus), 0 12px 20px -14px rgba(0, 0, 0, .7); }
.sk-name { font-weight: 700; font-size: .98rem; line-height: 1.2; overflow-wrap: anywhere; }
.sk-score { font: 900 clamp(2rem, 1.6rem + 2vw, 2.6rem)/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums lining-nums; }
.sk-score-word { font-size: clamp(1.35rem, 1.2rem + 1vw, 1.7rem); }
.sk-lead .sk-score { color: #19694A; }
.sk-sub { font-size: .9rem; line-height: 1.3; color: #4E5B54; font-weight: 600; }
.sk-bar { display: block; height: 5px; background: #DCE5E0; border-radius: 3px; overflow: hidden; }
.sk-bar span { display: block; height: 100%; background: #1E6A4C; border-radius: 3px; }
.sk-sides.sk-n1 { grid-template-columns: minmax(0, 20rem); }
.sk-out { background: #DCE5E0; box-shadow: none; }
@media (prefers-color-scheme: dark) { .sk-out { background: #C9D4CE; } }
/* lives (31): one dot a life; letters (Spoons): the word so far, the rest as faint gaps */
.sk-lives { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .3rem; }
.sk-life { width: .8rem; height: .8rem; border-radius: 50%; background: #1E6A4C; }
.sk-life-lost { background: transparent; box-shadow: inset 0 0 0 2px #7A877F; }
.sk-letters { display: block; container-type: inline-size; }
.sk-word { display: flex; gap: .12em; white-space: nowrap; }
@container (min-width: 1px) { .sk-word { font-size: min(1em, calc(100cqi / var(--n) / 1.08)); } }
.sk-gap { color: #6B776F; }

/* buttons and fields on the felt */
.sk-btn { font: 700 1rem/1.15 var(--text); min-height: 2.75rem; padding: .55rem .95rem; border-radius: 8px; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); color: var(--felt-ink); cursor: pointer; touch-action: manipulation; }
.sk-btn:hover { background: rgba(255, 255, 255, .18); }
.sk-btn:disabled { opacity: .45; cursor: default; }
.sk-main { background: #FFFFFF; border-color: #FFFFFF; color: #134A33; }
.sk-main:hover { background: #E4EFE9; }
.sk-warn { background: #B32B27; border-color: #B32B27; color: #FFFFFF; }
.sk-warn:hover { background: #962320; }
.sk-ghost { background: transparent; }
.sk-small-btn { min-height: 2.5rem; padding: .4rem .7rem; font-size: .95rem; }
.sk-wide { width: 100%; }
.sk-side .sk-btn { border-color: #1E6A4C; color: #134A33; background: #FFFFFF; }
.sk-side .sk-btn:hover { background: #E6F0EA; }
.sk-quick { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.sk-side .sk-quick { gap: .3rem; }
.sk-side .sk-quick .sk-btn { flex: 1 1 0; min-width: 2.75rem; padding-inline: .2rem; }
@media (max-width: 26rem) { .sk-side { padding-inline: .55rem; } }
.sk-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sk-end { justify-content: flex-start; }
.sk-entry { display: grid; gap: .8rem; }
.sk-prompt { margin: 0; font-weight: 700; font-size: 1.08rem; }
.sk-small { font-size: .92rem; line-height: 1.35; margin: 0; color: var(--felt-soft); }
.sk-lab { font-weight: 600; font-size: .95rem; color: var(--felt-soft); }
.sk-field { display: grid; gap: .3rem; justify-items: start; }
.sk-num, .sk-nameinput, .sk-table select, .sk-step input { font: 600 1.12rem/1.2 var(--text); color: #1B2420; background: #FFFFFF; border: 2px solid transparent; border-radius: 8px; min-height: 2.75rem; padding: .45rem .7rem; }
.sk-num { width: 6.5rem; }
.sk-table select { padding-right: 2rem; max-width: 100%; }
.sk-num:focus-visible, .sk-nameinput:focus-visible, .sk-table select:focus-visible, .sk-step input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.sk-check { display: inline-flex; gap: .55rem; align-items: center; font-weight: 600; cursor: pointer; line-height: 1.3; }
.sk-check input { width: 1.3rem; height: 1.3rem; accent-color: #E3A21F; flex: none; }
.sk-step { display: inline-flex; align-items: stretch; gap: .25rem; }
.sk-step input { width: 3.4rem; text-align: center; padding-inline: .2rem; }
.sk-stepbtn { font: 700 1.35rem/1 var(--text); width: 2.75rem; min-height: 2.75rem; border-radius: 8px; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); color: var(--felt-ink); cursor: pointer; touch-action: manipulation; }
.sk-stepbtn:hover { background: rgba(255, 255, 255, .18); }
.sk-msg { margin: 0; min-height: 1.4em; font-weight: 600; }
.sk-msg:empty { display: none; }
.sk-bad { color: #FFD9A6; }
.sk-note { margin: 0; background: rgba(0, 0, 0, .14); border-left: 4px solid var(--focus); padding: .55rem .8rem; border-radius: 6px; }
.sk-result { background: #FBFCFB; color: #1B2420; border-radius: 10px; padding: .85rem 1rem; display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; }
.sk-result p { margin: 0; font-weight: 700; font-size: 1.1rem; }
.sk-result .sk-main { background: #1E6A4C; border-color: #1E6A4C; color: #FFFFFF; }

/* setup */
.sk-setup { display: grid; gap: .9rem; }
.sk-setup h3 { margin: 0; font: 900 1.4rem/1.2 var(--display); }
.sk-names { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); }
.sk-nameinput { width: 100%; }
.sk-setup .sk-main { justify-self: start; }

/* lists of players: hearts, phase 10 */
.sk-list { display: grid; }
.sk-line { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; padding: .6rem 0; border-top: 1px solid rgba(255, 255, 255, .2); }
.sk-lname { font-weight: 700; min-width: 6rem; flex: 1 1 6rem; overflow-wrap: anywhere; }
.sk-line-p10 .sk-check { flex: 1 1 12rem; }
.sk-signed { display: inline-flex; align-items: stretch; gap: .3rem; }
.sk-sign[aria-pressed="true"] { background: #FFFFFF; border-color: #FFFFFF; color: #B32B27; }
.sk-sign[aria-pressed="true"]:hover { background: #F6E3E2; }
.sk-num-neg { color: #B32B27; }

/* the gin final count, on the light result card */
.sk-final { flex: 1 1 100%; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.sk-final caption { text-align: left; font-weight: 700; padding-bottom: .3rem; }
.sk-final th, .sk-final td { padding: .35rem .6rem .35rem 0; border-bottom: 1px solid #D9E1DC; text-align: right; }
.sk-final th[scope="row"] { text-align: left; font-weight: 600; color: #4E5B54; }
.sk-final th:last-child, .sk-final td:last-child { padding-right: 0; }
.sk-final thead th { color: #1B2420; overflow-wrap: break-word; }
.sk-final-total th[scope="row"], .sk-final-total td { color: #1B2420; font-weight: 700; border-bottom: 0; border-top: 2px solid #1B2420; }
.sk-pts { display: grid; gap: .4rem; }
.sk-seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.sk-segbtn { font: 700 1rem/1.15 var(--text); min-height: 2.75rem; min-width: 2.75rem; padding: .5rem .9rem; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .6); background: transparent; color: var(--felt-ink); cursor: pointer; }
.sk-segbtn[aria-pressed="true"] { background: #FFFFFF; color: #134A33; border-color: #FFFFFF; }

/* spades */
.sk-teams { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-team { border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; padding: .55rem .6rem .7rem; margin: 0; display: grid; gap: .6rem; min-width: 0; }
.sk-team legend { font-weight: 700; padding: 0 .3rem; overflow-wrap: anywhere; }
@media (max-width: 26rem) {
  .sk-team .sk-stepbtn { width: 2.4rem; }
  .sk-team .sk-step input { width: 2.6rem; }
  .sk-team { padding-inline: .45rem; }
}

/* pinochle: the other team's counters, filled in, and the 9 of trump question */
.sk-given { margin: 0; min-height: 2.75rem; display: flex; align-items: center; font: 700 1.2rem/1.2 var(--text); font-variant-numeric: tabular-nums; }
.sk-pin-team { align-content: start; }
.sk-pin-nine { display: grid; gap: .45rem; }
.sk-pin-nine[hidden] { display: none; }

/* dice entry */
.sk-dice { display: grid; gap: .6rem; }
.sk-tray, .sk-faces { display: flex; flex-wrap: wrap; gap: .4rem; }
.sk-die, .sk-face { width: 3rem; height: 3rem; padding: .25rem; border-radius: 9px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.sk-die img, .sk-face img { width: 100%; height: 100%; display: block; }
.sk-die-empty { border: 2px dashed rgba(255, 255, 255, .4); cursor: default; }
.sk-face { background: rgba(0, 0, 0, .14); }
.sk-face:hover { background: rgba(0, 0, 0, .24); }
.sk-face:disabled { opacity: .35; cursor: default; }
/* Left Right Center: the dice show L, C, R or a dot */
.sk-lrcfaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; max-width: 26rem; }
.sk-lrcbtn { display: grid; justify-items: center; align-content: center; gap: .2rem; padding: .45rem .2rem; font-size: .9rem; }
.sk-lrcbtn b, .sk-lrc { font: 900 1.4rem/1 var(--display); }
.sk-lrcbtn b { display: grid; place-items: center; height: 1.4rem; }
.sk-lrc { background: #FBFCFB; color: #1B2420; box-shadow: 0 6px 10px -8px rgba(0, 0, 0, .8); }
.sk-pip { display: block; width: .75rem; height: .75rem; border-radius: 50%; background: currentColor; }
.sk-turnhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; }
.sk-turn { margin: 0; font-weight: 600; }
.sk-turn b { font: 900 1.6rem/1 var(--display); margin-left: .25rem; }
.sk-read { margin: 0; font-weight: 600; }
.sk-boxes { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.sk-boxbtn { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem .8rem; border-radius: 8px; border: 0; background: #FBFCFB; color: #1B2420; font: 600 1rem/1.2 var(--text); cursor: pointer; text-align: left; }
.sk-boxbtn b { font: 900 1.2rem/1 var(--display); }
.sk-boxbtn:hover { background: #E6F0EA; }
.sk-zero { background: rgba(255, 255, 255, .72); color: #4E5B54; }

/* cribbage board and hand counter */
.sk-boardwrap { background: linear-gradient(180deg, #8E5E39, #6B4428); border-radius: 12px; padding: .5rem .55rem .3rem; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.sk-board { display: block; width: 100%; height: auto; }
.sk-hole { fill: #2A1A0F; }
.sk-gamehole { stroke: #E9D9B8; stroke-width: .9; }
.sk-skunk { stroke: #F6C9A9; stroke-width: .8; stroke-dasharray: 2 2; }
.sk-bname { fill: #F4EFE4; font: 700 9.5px var(--text); }
.sk-bnum { fill: #E9D9B8; font: 600 6.5px var(--text); }
.sk-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .4rem; vertical-align: -.05rem; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45); }
.sk-bred { fill: #FFC2B5; }
.sk-peg { stroke: rgba(0, 0, 0, .55); stroke-width: .8; }
.sk-back { opacity: .65; }
.sk-counter { background: rgba(0, 0, 0, .14); border-radius: 10px; padding: .7rem .85rem; display: grid; gap: .7rem; }
.sk-counter summary { font-weight: 700; cursor: pointer; }
.sk-counter[open] { gap: .75rem; }
.sk-slots { display: flex; flex-wrap: wrap; gap: .45rem; }
.sk-slot { display: grid; justify-items: center; gap: .2rem; border: 2px solid transparent; background: transparent; color: var(--felt-ink); border-radius: 9px; padding: .2rem .25rem .3rem; cursor: pointer; font: 600 .78rem/1 var(--text); }
.sk-slot-on { border-color: var(--focus); }
.sk-mini { display: inline-grid; justify-items: center; align-content: center; gap: .15rem; width: 2.6rem; height: 3.4rem; background: #FFFFFF; color: #1B2420; border-radius: 6px; font: 900 1.05rem/1 var(--display); box-shadow: 0 6px 10px -8px rgba(0, 0, 0, .8); }
.sk-mini-empty { background: rgba(255, 255, 255, .15); color: var(--felt-ink); box-shadow: none; border: 2px dashed rgba(255, 255, 255, .45); }
.sk-red { color: #C2302C; }
.sk-suit { width: 1rem; height: 1rem; fill: currentColor; display: block; }
.sk-inl { display: inline-flex; align-items: center; gap: .05rem; font-weight: 700; }
.sk-inl .sk-suit { width: .85em; height: .85em; }
.sk-count .sk-red { color: #FFB3A9; }
.sk-ranks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
@media (min-width: 40rem) { .sk-ranks { grid-template-columns: repeat(13, minmax(0, 1fr)); } }
.sk-rank, .sk-suitbtn { min-height: 2.6rem; border-radius: 7px; border: 0; background: #FFFFFF; color: #1B2420; font: 900 1rem/1 var(--display); cursor: pointer; display: grid; place-items: center; padding: 0; touch-action: manipulation; }
.sk-rank[aria-pressed="true"] { background: var(--focus); }
.sk-suits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; max-width: 18rem; }
.sk-suitbtn .sk-suit { width: 1.35rem; height: 1.35rem; }
.sk-suitbtn.sk-red { color: #C2302C; }
.sk-rank:disabled, .sk-suitbtn:disabled { opacity: .4; cursor: default; }
.sk-count ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.sk-count li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .2); padding: .2rem 0; }
.sk-counttotal { margin: .4rem 0 .6rem; font: 900 1.4rem/1.1 var(--display); }

/* under the felt: controls and the running score sheet */
.sk-paper .sk-btn { color: var(--link); border-color: var(--rule); background: transparent; }
.sk-paper .sk-btn:hover { background: var(--tint); }
.sk-paper .sk-warn { background: #B32B27; border-color: #B32B27; color: #FFFFFF; }
.sk-paper .sk-small-btn { min-width: 2.75rem; }
.sk-bar-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .85rem; }
.sk-confirm { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-weight: 600; }
.sk-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; font-size: .95rem; color: var(--ink-soft); margin-top: .9rem; }
.sk-foot .sk-check input { accent-color: var(--link); }
.sk-wrap { margin: 1rem 0 0; }
.sk-sheet { font-size: 1rem; }
.sk-sheet th, .sk-sheet td { padding: .45rem .7rem .45rem 0; }
.sk-sheet tbody th { font-weight: 600; color: var(--ink-soft); }
.sk-cell { display: grid; gap: .05rem; }
.sk-cell b { font-weight: 700; }
.sk-cell .sk-small { color: var(--ink-soft); }
.sk-run { color: var(--ink-soft); font-size: .9rem; font-variant-numeric: tabular-nums; }
.sk-dim { color: var(--ink-soft); }
.sk-cell .sk-bad { color: var(--red); }
.sk-card th[scope="row"] { white-space: nowrap; font-weight: 600; color: var(--ink); }
.sk-card td { padding: .15rem .35rem; text-align: center; vertical-align: middle; }
.sk-card th { vertical-align: middle; }
.sk-card thead th { text-align: center; }
.sk-card thead th:first-child { text-align: left; }
.sk-card .sk-now { color: var(--ink); box-shadow: inset 0 -3px 0 var(--focus); }
.sk-section th { font: 900 1.05rem/1.2 var(--display); color: var(--ink); padding-top: .9rem; }
.sk-sum th, .sk-sum td { background: var(--paper-2); }
.sk-grand th, .sk-grand td { background: var(--tint); font-weight: 700; font-size: 1.05rem; }
.sk-cellbtn { width: 100%; min-height: 2.4rem; border: 0; background: transparent; color: inherit; font: 600 1rem/1 var(--text); cursor: pointer; border-radius: 6px; }
.sk-cellbtn.sk-open { background: var(--paper-2); }
.sk-cellbtn:hover { background: var(--tint); }
.sk-hint { color: var(--ink-soft); font-style: italic; font-weight: 400; }
.sk-picked .sk-cellbtn { outline: 3px solid var(--focus); outline-offset: -3px; }
.sk-picker { margin-top: 1rem; border: 1px solid var(--rule); border-radius: 12px; padding: .8rem .9rem; display: grid; gap: .6rem; background: var(--paper); }
.sk-vals { display: flex; flex-wrap: wrap; gap: .35rem; }
.sk-picker .sk-prompt { color: var(--ink); }

@media print {
  .site-head, .toc, .ad-slot, .placeholder, #printables, #scorekeeper, .hero-links, .site-foot, .related, .skip { display: none !important; }
  .felt { background: none !important; color: #000; border: 0; box-shadow: none; }
  .felt a, .crumbs, .crumbs a, .lede, .aka, .facts dt, .spread figcaption, .brand-note { color: #000 !important; }
  .page { display: block; padding-top: 0; }
  .rules > section { break-inside: auto; }
  .example, .diagram, .checked { background: none; border: 1px solid #999; }
  a { color: #000; }
}
