@layer blocks {
  /*
    Rows share the board's columns through subgrid, so every row lines up.
    Tiles grow to 3.25rem and no further, and the board centers in whatever room is left.
  */
  .board {
    display: grid;
    grid-template-columns: var(--avatars-column, auto) 2.5ch repeat(5, minmax(0, 3.25rem));
    justify-content: center;
    gap: var(--space-2xs);

    /*
      The game board keeps room for a full stack of avatars, 3 and a "+N", so tiles don't
      change size when someone shows up. Wide screens get the same room on the right too,
      which puts the tiles in the middle of the screen.
    */
    &[data-avatars] {
      --avatars-column: calc(4 * var(--avatar-size) - 3 * var(--avatar-overlap));

      @media (width >= 40rem) {
        grid-template-columns:
          var(--avatars-column) 2.5ch repeat(5, minmax(0, 3.25rem))
          calc(var(--avatars-column) + var(--space-2xs) + 2.5ch);
      }
    }
  }

  .board__row {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
  }

  .board__points {
    font-size: var(--step--1);
    font-weight: var(--font-weight-bold);
    font-variant-numeric: tabular-nums;
    text-align: end;
    color: var(--color-text-muted);
  }
}
