#grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  border: 3px solid var(--border-thick);
  border-radius: 4px;
  width: 368px;
  height: 368px;
  flex-shrink: 0;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
  position: relative;
}

/* thick 3x3 box borders */
.cell:nth-child(3n+1):not(:nth-child(1)):not(:nth-child(10)):not(:nth-child(19)):not(:nth-child(28)):not(:nth-child(37)):not(:nth-child(46)):not(:nth-child(55)):not(:nth-child(64)):not(:nth-child(73)) {
  border-left: 3px solid var(--border-thick);
}
.cell:nth-child(n+28):nth-child(-n+36),
.cell:nth-child(n+55):nth-child(-n+63) {
  border-top: 3px solid var(--border-thick);
}

.cell.given    { color: var(--text-given); background: var(--bg2); cursor: default; }
.cell.editable { color: var(--text-user); }
.cell.selected { background: var(--bg3) !important; }
.cell.highlight { background: var(--bg4); }
.cell.error    { color: var(--err-text) !important; background: var(--err-bg) !important; }
.cell.correct  { color: var(--ok-text) !important; }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  padding: 2px;
}

.note {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--note-col);
  line-height: 1;
}
