#stage.nine-stage {
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.nine {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
}

.nine svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.nine svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.08;
  stroke-linejoin: miter;
}

.points {
  position: absolute;
  inset: 0;
}

.point {
  position: absolute;
  z-index: 1;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: var(--board);
  color: transparent;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.point.x,
.point.o {
  color: var(--ink);
}

.point.x {
  background: var(--acid);
  border-color: var(--acid);
}

.point.o {
  background: var(--paper);
  border-color: var(--paper);
}

.point.selected {
  box-shadow: 0 0 0 3px var(--ink);
}

.point.open,
.point.take {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px var(--acid);
}

.point.win {
  box-shadow: 0 0 0 3px var(--acid);
}

.point:disabled {
  cursor: default;
}

.nine[hidden],
.nine-setup[hidden] {
  display: none !important;
}

.nine-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  text-align: center;
}

.nine-setup-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.nine-pad {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  width: min(100%, 280px);
}

.nine-pad button {
  min-width: 7rem;
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font: 500 1rem/1 "DM Sans", sans-serif;
  cursor: pointer;
}

.nine-pad button:hover {
  border-color: var(--acid);
  color: var(--acid);
}

@media (max-width: 420px) {
  .point {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.85rem;
  }
}
