.grid-game-mark,
.grid-game-boundary,
.grid-game-strike {
  box-sizing: border-box;
}

.grid-game-mark {
  position: absolute;
  z-index: 7;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: multiply;
  transform: rotate(var(--mark-tilt, 0deg)) scale(.45);
  transition: opacity 120ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1);
  user-select: none;
}

.grid-game-mark.is-visible {
  opacity: 1;
  transform: rotate(var(--mark-tilt, 0deg)) scale(1);
}

.grid-game-mark[data-mark="o"]::before {
  content: "";
  width: 18px;
  height: 23px;
  border: 3px solid #009ec2;
  border-radius: 52% 47% 52% 48%;
  transform: rotate(29deg);
}

.grid-game-mark[data-mark="x"]::before,
.grid-game-mark[data-mark="x"]::after {
  content: "";
  grid-area: 1 / 1;
  width: 3.5px;
  height: 24px;
  border-radius: 70% 38% 65% 50%;
  background: #7154dc;
  transform: rotate(43deg);
}
.grid-game-mark[data-mark="x"]::after { transform: rotate(-42deg); }

.grid-game-boundary {
  position: absolute;
  z-index: 6;
  width: 102px;
  height: 102px;
  pointer-events: none;
  opacity: 0;
  border-top: 1px solid oklch(78% .22 205 / 13%);
  border-left: 1px solid oklch(78% .22 205 / 13%);
  border-right: 1px solid oklch(66% .24 292 / 13%);
  border-bottom: 1px solid oklch(66% .24 292 / 13%);
  transition: opacity 180ms ease;
  user-select: none;
}

.grid-game-boundary.is-visible { opacity: 1; }

.grid-game-strike {
  position: absolute;
  z-index: 8;
  width: 102px;
  height: 102px;
  overflow: visible;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.grid-game-strike[data-mark="o"] {
  color: #009ec2;
}

.grid-game-strike[data-mark="x"] {
  color: #7154dc;
}

.grid-game-strike path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke-dashoffset 420ms cubic-bezier(.22, .8, .3, 1);
}

.grid-game-strike__ghost {
  opacity: .18;
  stroke-width: 5px;
}

.grid-game-strike__ink { stroke-width: 2.8px; }
.grid-game-strike.is-visible path { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  .grid-game-mark,
  .grid-game-boundary,
  .grid-game-strike path {
    transition-duration: 1ms !important;
  }
}

@media print {
  .grid-game-mark,
  .grid-game-boundary,
  .grid-game-strike {
    display: none !important;
  }
}
