/* Points: Caveman Circus "Paper and sun" look. */
.cp-board, .cp-champ {
  --cp-ink: #1A1814; --cp-cream: #F3EBD8; --cp-white: #FFFFFF; --cp-ember: #E2531B; --cp-yellow: #F5E04A; --cp-muted: #5C554B;
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--cp-ink); background: var(--cp-cream);
  border: 1px solid var(--cp-ink); box-shadow: 4px 4px 0 var(--cp-ink);
  box-sizing: border-box; max-width: 640px; margin: 0 0 24px; line-height: 1.35;
  container-type: inline-size;
}
.cp-board *, .cp-champ * { box-sizing: border-box; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--cp-white); border-bottom: 1px solid var(--cp-ink); flex-wrap: wrap; }
.cp-title { font-weight: 800; font-size: 20px; letter-spacing: .01em; }
.cp-title::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--cp-ember); border: 1px solid var(--cp-ink); vertical-align: 1px; }
.cp-tabs { display: inline-flex; border: 1px solid var(--cp-ink); }
.cp-tab { font: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; margin: 0; border: 0; background: var(--cp-white); color: var(--cp-ink); cursor: pointer; }
.cp-tab + .cp-tab { border-left: 1px solid var(--cp-ink); }
.cp-tab.cp-on { background: var(--cp-yellow); }
.cp-tab:focus-visible { outline: 3px solid var(--cp-ember); outline-offset: 1px; }
.cp-panel { padding: 12px 14px 4px; }
.cp-panel[hidden] { display: none; }
.cp-sub { display: flex; justify-content: space-between; font-size: 13px; color: var(--cp-muted); margin-bottom: 8px; }
.cp-label { font-weight: 700; color: var(--cp-ink); }
.cp-me { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; margin-bottom: 8px; background: var(--cp-ember); color: var(--cp-white); border: 1px solid var(--cp-ink); font-weight: 800; font-size: 14px; }
.cp-me[hidden] { display: none; }
.cp-board .cp-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--cp-ink); background: var(--cp-white); }
.cp-board .cp-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 0; border-bottom: 1px solid #E7DFCC; font-size: 14px; }
.cp-board .cp-list li::before { content: none; }
.cp-board .cp-list li:last-child { border-bottom: 0; }
.cp-rank { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--cp-ink); font-weight: 800; font-size: 12px; }
.cp-list li:first-child .cp-rank { background: var(--cp-yellow); }
.cp-init { display: flex; align-items: center; font-weight: 800; letter-spacing: .08em; min-width: 52px; max-width: 55%; overflow: hidden; white-space: nowrap; }
.cp-init .cc-mname { letter-spacing: normal; }
.cp-you { flex: none; margin-left: 6px; letter-spacing: normal; }
.cp-total { flex: none; min-width: 40px; text-align: right; font-weight: 900; font-size: 16px; }
.cp-list li.cp-mine { background: #FFF1E8; }
.cp-list li.cp-mine .cp-init { color: var(--cp-ember); }
.cp-empty { margin: 0; padding: 12px; border: 1px solid var(--cp-ink); background: var(--cp-white); font-size: 14px; color: var(--cp-muted); }
.cp-foot { margin: 0; padding: 10px 14px 12px; font-size: 12px; color: var(--cp-muted); }

/* ---------- 1.2.0: a column per game, headed by its icon ---------- */
.cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cp-cols { display: none; }
/* Narrow boards (phones): rank and total either side, the name with the games played under it. */
.cp-board .cp-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "r n t" "r g t"; column-gap: 10px; row-gap: 5px; align-items: center; }
.cp-board .cp-list li .cp-rank { grid-area: r; }
.cp-board .cp-list li .cp-init { grid-area: n; max-width: 100%; }
.cp-board .cp-list li .cp-total { grid-area: t; }
.cp-gs { grid-area: g; display: flex; flex-wrap: wrap; gap: 3px 10px; }
.cp-g { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-g img { display: block; width: 18px; height: 18px; }
.cp-g.cp-off { display: none; }
/* Wide boards: a proper table. */
@container (min-width: 720px) {
  .cp-panel { padding: 12px 16px 4px; }
  .cp-cols,
  .cp-board .cp-list li { display: grid; grid-template-columns: 40px minmax(170px, 1.4fr) repeat(var(--cp-n, 6), minmax(56px, 1fr)) 80px; grid-template-areas: none; column-gap: 8px; align-items: center; }
  .cp-cols { padding: 10px 14px 8px; background: var(--cp-white); border: 1px solid var(--cp-ink); border-bottom: 2px solid var(--cp-ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cp-muted); align-items: end; }
  .cp-col { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 10.5px; letter-spacing: .04em; line-height: 1.1; }
  .cp-col img { display: block; width: 40px; height: 40px; }
  .cp-col-t { text-align: right; }
  .cp-board .cp-list { border-top: 0; }
  .cp-board .cp-list li { padding: 9px 14px; row-gap: 0; }
  .cp-board .cp-list li .cp-rank, .cp-board .cp-list li .cp-init, .cp-board .cp-list li .cp-total { grid-area: auto; }
  .cp-gs { display: contents; }
  .cp-g { justify-content: center; font-size: 17px; }
  .cp-g img { display: none; }
  .cp-g.cp-off { display: inline-flex; color: #C9C1B2; font-weight: 600; }
  .cp-g.cp-max::after { content: ""; width: 7px; height: 7px; margin: 0 0 9px 2px; border-radius: 50%; background: #2F8A3F; }
  .cp-total { font-size: 22px; }
}

/* Yesterday's champion */
.cp-champ { padding: 12px 14px; max-width: 320px; }
.cp-champ-k { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cp-ember); }
.cp-champ-n { font-size: 30px; font-weight: 900; letter-spacing: .06em; line-height: 1.1; margin-top: 2px; }
.cp-champ-p { font-size: 14px; font-weight: 700; color: var(--cp-muted); }
.cp-champ-empty .cp-champ-n { font-size: 18px; letter-spacing: 0; color: var(--cp-muted); }
