/* go: rules used only by the go pages (loaded after base.css). */
/* Go board: intersections rather than squares, built as absolutely
   positioned lines/points inside a padded square (see go-app.js) rather
   than a CSS gradient grid, since that's more predictable across the
   older browsers found on E-Ink devices. */
.go-board {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: var(--square-light);
  border: 3px solid var(--border);
  box-sizing: border-box;
  padding: 6%;
}

.go-line {
  position: absolute;
  background: var(--border);
}

.go-line-h {
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-1px);
}

.go-line-v {
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
}

.go-hoshi {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--border);
  pointer-events: none;
}

.go-point {
  position: absolute;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
}

.go-stone {
  position: absolute;
  top: 4%;
  right: 4%;
  bottom: 4%;
  left: 4%;
  border-radius: 50%;
  box-sizing: border-box;
  pointer-events: none;
}

/* Board size and colour under the board (task 160): always visible, since
   the page starts a game at once and the settings panel stays closed. */
.go-setup {
  margin-top: 12px;
}

.go-setup-title {
  font-size: 1em;
  margin: 10px 0 6px;
}

.go-picks {
  display: flex;
  flex-wrap: wrap;
}

/* margin instead of flex `gap` (old E-Ink browsers) */
.go-picks .go-pick {
  min-height: 44px;
  min-width: 44px;
  margin: 0 6px 6px 0;
  flex: 1 1 auto;
}

.go-pick[aria-pressed="true"] {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  font-weight: 800;
}

.go-pick[aria-pressed="true"] .go-stone-black {
  border: 2px solid #ffffff;
}

/* "You play White (second move)." above the board (task 161). */
.go-you {
  margin: 0 0 6px;
  font-weight: 700;
}

.go-setup-note {
  margin: 6px 0 0;
}

.go-point.last-move .go-stone::after {
  content: "";
  position: absolute;
  top: -22%;
  right: -22%;
  bottom: -22%;
  left: -22%;
  border: 2px solid var(--accent);
  border-radius: 50%;
}
