/* Sudoku help: pad is never greyed out; conflicts, notes, hints, setting. */

/* Pad: every digit is a full-size touch target (iPad: 5 and 6 included). */
.sudoku-pad .sudoku-num {
  min-width: 48px;
  min-height: 52px;
  opacity: 1;
  filter: none;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
@media (max-width: 600px) {
  .sudoku-pad {
    flex-wrap: wrap;
  }
  .sudoku-pad .sudoku-num {
    min-height: 48px;
    flex: 1 1 44px;
  }
}

/* Cells carry the digit and, optionally, pencil notes. */
.sudoku-cell {
  position: relative;
}
.sudoku-cell .sudoku-v {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.sudoku-cell .sudoku-notes {
  position: absolute;
  inset: 3px;
  display: grid;
  grid-template-columns: repeat(var(--sudoku-note-cols, 3), 1fr);
  align-items: center;
  justify-items: center;
  font-size: clamp(0.55rem, 1.6vw, 0.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--muted, #5b6b73);
  pointer-events: none;
}
.sudoku-board--n9 .sudoku-cell .sudoku-notes {
  inset: 2px;
  font-size: clamp(0.45rem, 1.3vw, 0.65rem);
}

/* Rule break: red, but the number stays and can be erased. */
.sudoku-cell.is-conflict {
  background: #fdeaea;
  color: var(--danger, #b42318);
  box-shadow: inset 0 0 0 2px var(--danger, #b42318);
}
.sudoku-cell.is-conflict-peer {
  box-shadow: inset 0 0 0 2px var(--danger, #b42318);
}
.sudoku-cell.is-hint {
  animation: sudoku-hint-pulse 1.1s ease-in-out 3;
  box-shadow: inset 0 0 0 3px var(--accent, #e0a100);
}
@keyframes sudoku-hint-pulse {
  50% {
    background: #fff6d6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sudoku-cell.is-hint {
    animation: none;
    background: #fff6d6;
  }
}

/* Setting + tools */
.sudoku-help-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.sudoku-help-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted, #5b6b73);
}
.sudoku-help-select {
  min-height: 44px;
  padding: 6px 10px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border, #cfd8dc);
  background: #fff;
  max-width: 100%;
}
.sudoku-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.sudoku-tools[hidden],
.sudoku-tool[hidden] {
  display: none;
}
.sudoku-tool {
  min-height: 48px;
  min-width: 96px;
  padding: 0 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
}
.sudoku-tool.is-on {
  outline: 3px solid var(--accent, #e0a100);
  outline-offset: -3px;
}
