.sudoku-game {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.sudoku-game .tool-controls {
  flex-wrap: wrap;
}

.sudoku-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 6px 12px;
}

#sudoku-timer {
  color: #dceaea;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

#sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  width: min(100%, 410px);
  border: 2px solid #4d646d;
  border-radius: 6px;
  overflow: hidden;
  background: #e8eff1;
}

.sudoku-cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-inline-end: 1px solid #acbec5;
  border-block-end: 1px solid #acbec5;
  border-radius: 0;
  background: #f7fafb;
  color: #076336;
  font: inherit;
  font-size: clamp(.82rem, 4vw, 1.35rem);
  line-height: 1;
}

.sudoku-cell:nth-child(3n) { border-inline-end: 2px solid #4d646d; }
.sudoku-cell:nth-child(9n) { border-inline-end: 0; }
.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-block-end: 2px solid #4d646d; }
.sudoku-cell:nth-child(n+73) { border-block-end: 0; }
.sudoku-cell[data-fixed="true"] { font-weight: 750; color: #24343c; }
.sudoku-cell[data-peer="true"] { background: #edf5ef; }
.sudoku-cell[data-error="true"] { color: #921d30; background: #fce6e8; }
.sudoku-cell[data-selected="true"] { box-shadow: inset 0 0 0 2px #078842; }
.sudoku-cell:focus-visible { z-index: 1; outline-offset: -3px; }

.sudoku-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  position: absolute;
  inset: 1px;
  align-items: center;
  font-size: clamp(.42rem, 1.7vw, .65rem);
  color: #3a515d;
}

.sudoku-keypad {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 3px;
  width: min(100%, 410px);
}

.sudoku-keypad button {
  min-width: 0;
  padding: 0;
}

#sudoku-pencil[aria-pressed="true"] {
  border-color: #50d88e;
  background: #235337;
}

#sudoku-status {
  min-height: 1.4em;
  margin: 0;
  color: #e1eee8;
}
