.board-wrap {
  position: relative;
  display: block;
  width: fit-content;
  margin: 8px auto 24px;
  max-width: 100%;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 112px));
  gap: 10px;
  justify-content: center;
  padding: 16px;
  background: #000;
  border: 1px solid var(--line);
}
.win-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
  z-index: 2;
  overflow: visible;
}
.win-line.is-on { display: block; }
.win-line line {
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.win-line.is-x line { stroke: #e10600; }
.win-line.is-o line { stroke: #16a34a; }
.cell {
  aspect-ratio: 1;
  width: 100%;
  min-height: 84px;
  background: #0a0a0a;
  border: 1px solid var(--line);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.cell:hover {
  border-color: var(--accent);
  background: #111;
}
.cell.x { color: #e10600; animation: popIn 0.28s ease; }
.cell.o { color: #16a34a; animation: popIn 0.28s ease; }
.cell.win { background: rgba(255, 255, 255, 0.06); }
.board.is-mine .cell:not(.x):not(.o) { box-shadow: inset 0 0 0 1px rgba(225, 6, 0, 0.28); }

@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
