/* The board has no gaps, so edge clues can be placed by plain percentages. */
.board {
  --size: 6;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--size), 1fr);
  grid-template-rows: repeat(var(--size), 1fr);
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  user-select: none;
  -webkit-user-select: none;
}

.cell {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  box-shadow: inset -1px -1px 0 var(--line);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.cell.last-col { box-shadow: inset 0 -1px 0 var(--line); }
.cell.last-row { box-shadow: inset -1px 0 0 var(--line); }
.cell.last-col.last-row { box-shadow: none; }
.cell:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.cell.given { background-color: var(--surface-2); cursor: default; }
.cell.error { background-image: repeating-linear-gradient(-45deg, var(--error-bg) 0 5px, transparent 5px 10px); }
.cell.flash { animation: flash 0.9s ease; }

.cell .tile { width: 58%; transition: scale 0.12s ease; }
.cell .tile.b { width: 44%; }
.cell:active:not(.given) .tile { scale: 0.9; }

.edge {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
  color: var(--muted);
  font: 700 14px/1 var(--font);
  pointer-events: none;
}
.edge.error { color: var(--error); box-shadow: 0 0 0 2px var(--error); }

.board.solved .tile { animation: pop 0.5s ease both; animation-delay: calc(var(--wave) * 45ms); }
