/* Loaded only on Sudoku. Candidates are manual marks, not answers. */
#sudoku-game .sudoku-cell {
  width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  aspect-ratio: 1;
  padding: 0;
  border-right: 1px solid #899c98;
  border-bottom: 1px solid #899c98;
  font-size: clamp(1rem, 4vw, 1.45rem);
}
#sudoku-game .sudoku-cell:nth-child(9n + 3),
#sudoku-game .sudoku-cell:nth-child(9n + 6) { border-right: 2px solid #183333; }
#sudoku-game .sudoku-cell:nth-child(n + 19):nth-child(-n + 27),
#sudoku-game .sudoku-cell:nth-child(n + 46):nth-child(-n + 54) { border-bottom: 2px solid #183333; }
#sudoku-game .sudoku-cell:nth-child(9n) { border-right: 0; }
#sudoku-game .sudoku-cell:nth-child(n + 73) { border-bottom: 0; }
.sudoku-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  padding: 2px;
  color: #36514f;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sudoku-notes span { display: grid; place-items: center; min-width: 0; }
.sudoku-notes-bar { max-width: 600px; margin: 1rem auto 0; }
.sudoku-edit-controls { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.sudoku-notes-toggle, .sudoku-undo {
  min-height: 44px;
  max-width: 100%;
  padding: .5rem 1rem;
  border: 2px solid #183333;
  border-radius: 2rem;
  background: #fffdf7;
  color: #183333;
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
}
.sudoku-notes-toggle[aria-pressed="true"] { background: #183333; color: #fffdf7; }
.sudoku-notes-help, .sudoku-notes-summary {
  margin-top: .5rem;
  color: #36514f;
  font-size: .875rem;
  line-height: 1.5;
}
.sudoku-notes-summary { font-weight: 700; }
#sudoku-game [data-number][aria-pressed="true"] { background: #183333; color: #fffdf7; }
#sudoku-game [data-number]:disabled, #sudoku-game [data-action="erase"]:disabled,
.sudoku-notes-toggle:disabled, .sudoku-undo:disabled { opacity: .45; cursor: not-allowed; }
#sudoku-game .sudoku-cell:focus-visible { outline: 3px solid #183333; outline-offset: -3px; z-index: 1; }
.sudoku-notes-toggle:focus-visible, .sudoku-undo:focus-visible { outline: 3px solid #183333; outline-offset: 3px; }
@media (min-width: 640px) {
  .sudoku-notes { padding: 3px; font-size: .875rem; }
}
@media (max-width: 639px) {
  #sudoku-game > div > div:first-child { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem; }
  #sudoku-game .game-mode-control { min-width:0; }
  #sudoku-game .game-mode-switch { display:flex;width:100%;max-width:240px; }
  #sudoku-game .game-mode-button { flex:1;min-width:0;padding:.5rem .4rem;white-space:normal; }
  #sudoku-game .game-sound-toggle { width:44px;height:44px;padding:0;justify-content:center; }
  #sudoku-game .game-sound-toggle > span:last-child { display:none; }
  #sudoku-game .game-mode-caption { font-size:.75rem; }
  #sudoku-game > div > div:nth-child(2) { margin-bottom:1rem;gap:.7rem; }
}
