@layer blocks {
  .game {
    flex: 1;
    min-block-size: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
  }

  /*
    The scroll container is reversed so it starts at the bottom, by the newest guess and the input row.
    The board inside still runs top to bottom.
  */
  .game__board {
    flex: 1;
    min-block-size: 0;
    display: flex;
    flex-direction: column-reverse;
    padding: var(--space-3xs) var(--space-3xs) var(--space-xs);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;

    /* Keeps a short board at the top. justify-content: flex-end would too, but overflow would then spill out where you can't scroll */
    > * {
      margin-block-end: auto;
    }
  }

  .game__controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }
}
