/* Five in a Row: a hand-drawn game on graph paper. */
.five {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  container-type: size;
}
.five-board {
  position: relative;
  width: min(100cqw, 100cqh);
  aspect-ratio: 1;
  background: var(--paper);
  outline: 2px solid var(--game);
  border-radius: 3px 2px 4px 2px;
}
.five-board svg,
.five-cells { position: absolute; inset: 0; width: 100%; height: 100%; }
.five-board svg { pointer-events: none; }
.five-grid { fill: none; stroke: var(--grid); stroke-width: 1; }
.five-cells {
  display: grid;
  grid-template: repeat(var(--five-size), minmax(0, 1fr)) / repeat(var(--five-size), minmax(0, 1fr));
}
.five-cell {
  position: relative;
  appearance: none;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}
.five-cell[aria-disabled="false"] { cursor: pointer; }
.five-cell[aria-disabled="false"]:active { background: color-mix(in srgb, var(--game) 20%, transparent); }
.five-cell:focus-visible { outline: 2px solid var(--game); outline-offset: -2px; }
.five-cell.last::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  right: 2px;
  bottom: 2px;
  border-radius: 50%;
  background: var(--game);
}
.five-board .five-mark { stroke-width: 2.6; }
.five-board .five-win { stroke: var(--game-2); stroke-width: 3.6; opacity: 0.75; }
